diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-08-25 09:12:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-08-25 09:12:35 +0000 |
commit | c7fc24dc4420057f103afe8fc64524ebc25c5d37 (patch) | |
tree | 3682407a599b8f9f03fc096298134cafba1c9b2f /include/net | |
parent | 1d793fade8b063fde3cf275bf1a5c2d381292cd9 (diff) |
o Merge with Linux 2.1.116.
o New Newport console code.
o New G364 console code.
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/ip.h | 6 | ||||
-rw-r--r-- | include/net/ip6_fib.h | 4 | ||||
-rw-r--r-- | include/net/ip6_route.h | 1 | ||||
-rw-r--r-- | include/net/ip_masq.h | 5 | ||||
-rw-r--r-- | include/net/ipv6.h | 40 | ||||
-rw-r--r-- | include/net/ndisc.h | 7 | ||||
-rw-r--r-- | include/net/netbeui.h | 150 | ||||
-rw-r--r-- | include/net/p8022tr.h | 8 | ||||
-rw-r--r-- | include/net/p8022trcall.h | 3 | ||||
-rw-r--r-- | include/net/sock.h | 17 | ||||
-rw-r--r-- | include/net/tcp.h | 17 | ||||
-rw-r--r-- | include/net/x25.h | 2 |
12 files changed, 68 insertions, 192 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index add85700b..63ef8b0a2 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -23,7 +23,6 @@ #define _IP_H -#include <linux/config.h> #include <linux/types.h> #include <linux/socket.h> #include <linux/ip.h> @@ -94,11 +93,6 @@ extern int ip_local_deliver(struct sk_buff *skb); extern int ip_mr_input(struct sk_buff *skb); extern int ip_output(struct sk_buff *skb); extern int ip_mc_output(struct sk_buff *skb); -#ifdef CONFIG_IP_ACCT -extern int ip_acct_output(struct sk_buff *skb); -#else -#define ip_acct_output dev_queue_xmit -#endif extern void ip_fragment(struct sk_buff *skb, int (*out)(struct sk_buff*)); extern int ip_do_nat(struct sk_buff *skb); extern void ip_send_check(struct iphdr *ip); diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 6b355cc12..5bd90dde7 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h @@ -141,7 +141,9 @@ extern int fib6_del(struct rt6_info *rt); extern void inet6_rt_notify(int event, struct rt6_info *rt); -extern void fib6_run_gc(unsigned long dummy); +extern void fib6_run_gc(unsigned long dummy); + +extern void fib6_gc_cleanup(void); #endif #endif diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 8fb0fbed7..8ca62a7ed 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h @@ -100,6 +100,7 @@ struct netlink_callback; extern int inet6_dump_fib(struct sk_buff *skb, struct netlink_callback *cb); extern int inet6_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg); extern int inet6_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg); +extern int inet6_rtm_getroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg); extern void rt6_ifdown(struct device *dev); diff --git a/include/net/ip_masq.h b/include/net/ip_masq.h index 65282bfcb..716eea2ef 100644 --- a/include/net/ip_masq.h +++ b/include/net/ip_masq.h @@ -258,9 +258,10 @@ extern atomic_t __ip_masq_lock; extern int ip_masq_get_debug_level(void); #ifndef CONFIG_IP_MASQ_NDEBUG -#define IP_MASQ_DEBUG(level, msg...) \ +#define IP_MASQ_DEBUG(level, msg...) do { \ if (level <= ip_masq_get_debug_level()) \ - printk(KERN_DEBUG "IP_MASQ:" ## msg) + printk(KERN_DEBUG "IP_MASQ:" ## msg); \ + } while (0) #else /* NO DEBUGGING at ALL */ #define IP_MASQ_DEBUG(level, msg...) do { } while (0) #endif diff --git a/include/net/ipv6.h b/include/net/ipv6.h index c3d2d5895..acf37b357 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -4,7 +4,7 @@ * Authors: * Pedro Roque <roque@di.fc.ul.pt> * - * $Id: ipv6.h,v 1.10 1998/04/30 16:24:14 freitag Exp $ + * $Id: ipv6.h,v 1.12 1998/07/15 05:05:02 davem Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -118,6 +118,31 @@ struct frag_queue { __u8 *nhptr; }; +struct ipv6_tlvtype +{ + u8 type; + u8 len; +}; + +struct ip6_ra_chain +{ + struct ip6_ra_chain *next; + struct sock *sk; + int sel; + void (*destructor)(struct sock *); +}; + +extern struct ip6_ra_chain *ip6_ra_chain; + +extern int ip6_ra_control(struct sock *sk, int sel, + void (*destructor)(struct sock *)); + + +extern int ip6_call_ra_chain(struct sk_buff *skb, int sel); + +extern int ip6_dstopt_unknown(struct sk_buff *skb, + struct ipv6_tlvtype *hdr); + extern int ipv6_routing_header(struct sk_buff **skb, struct device *dev, __u8 *nhptr, @@ -266,11 +291,16 @@ extern int ipv6_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen); +extern void ipv6_packet_init(void); -extern void ipv6_init(void); -extern void ipv6_cleanup(void); -#endif -#endif +extern void ipv6_netdev_notif_init(void); + +extern void ipv6_packet_cleanup(void); + +extern void ipv6_netdev_notif_cleanup(void); + +#endif /* __KERNEL__ */ +#endif /* _NET_IPV6_H */ diff --git a/include/net/ndisc.h b/include/net/ndisc.h index adaf76ef3..8ca371336 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h @@ -56,7 +56,8 @@ struct ra_msg { }; -extern void ndisc_init(struct net_proto_family *ops); +extern int ndisc_init(struct net_proto_family *ops); + extern void ndisc_cleanup(void); extern int ndisc_rcv(struct sk_buff *skb, @@ -91,7 +92,9 @@ struct rt6_info * dflt_rt_lookup(void); /* * IGMP */ -extern void igmp6_init(struct net_proto_family *ops); +extern int igmp6_init(struct net_proto_family *ops); + +extern void igmp6_cleanup(void); extern int igmp6_event_query(struct sk_buff *skb, struct icmp6hdr *hdr, diff --git a/include/net/netbeui.h b/include/net/netbeui.h deleted file mode 100644 index 417a27e2c..000000000 --- a/include/net/netbeui.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - * NetBEUI data structures - */ - -#ifndef __NET_NETBEUI_H -#define __NET_NETBEUI_H - - -#define NB_NAME_LEN 16 - -/* - * Used to keep lists of netbeui sessions - */ - -struct nb_ses -{ - struct nb_ses *next; - struct nb_nam *name; - struct nb_link *parent; /* Owner link */ - struct sock *sk; -}; - -/* - * A netbeui link - */ - -struct nb_link -{ - struct llc llc; /* Must be first */ - u8 mac[6]; /* Mac address of remote */ - struct device *dev; /* Device we heard him on */ - struct nb_ses *sessions;/* Netbeui sessions on this LLC link */ - struct wait_queue *wait;/* Wait queue for this netbios LLC */ - int busy; /* Track the LLC busy state */ - int state; /* Link state */ -#define NETBEUI_OPEN 1 /* Up and going */ -#define NETBEUI_CONNWAIT 2 /* Waiting to come up */ -#define NETBEUI_DISCWAIT 3 /* Waiting to drop and recover */ -#define NETBEUI_DEADWAIT 4 /* Trying to die */ -}; - - -/* - * Netbios name defence list - */ - -struct nb_name -{ - struct nb_name *next; /* Chain */ - struct device *dev; /* Device */ - char name[NB_NAME_LEN]; /* Object Name */ - int state; /* Name State */ -#define NB_NAME_ACQUIRE 1 /* We are trying to get a name */ -#define NB_NAME_COLLIDE 2 /* Name collided - we failed */ -#define NB_OURS 3 /* We own the name */ -#define NB_NAME_OTHER 4 /* Name found - owned by other */ -#define NB_NAME_GET 5 /* Trying to allocate a name */ -#define NB_STATE 7 /* State bits */ -#define NB_NAME_GROUP 8 /* Group name bit */ - int ours; /* We own this name */ - int users; /* Number of nb_ses's to this name */ - struct timer_list timer; /* Our timer */ - int timer_mode; /* Timer mode */ -#define NB_TIMER_ACQUIRE 1 /* Expiry means we got our name */ -#define NB_TIMER_COLLIDE 2 /* Expire a collided record */ -#define NB_TIMER_DROP 3 /* Drop a learned record */ -}; - - -/* - * LLC link manager - */ - -extern struct nb_link *netbeui_find_link(u8 macaddr); -extern struct nb_link *netbeui_create_link(u8 macaddr); -extern int netbeui_destroy_link(u8 macaddr); - -/* - * Namespace manager - */ - -extern struct nb_name *netbeui_find_name(char *name); -extern struct nb_name *netbeui_add_name(char *name, int ours); -extern struct nb_name *netbeui_lookup_name(char *name); -extern int nb_delete_name(struct nb_name *name); - -/* - * NetBEUI Protocol items - */ - -#define ADD_GROUP_NAME_QUERY 0x00 -#define ADD_NAME_QUERY 0x01 -#define NAME_IN_CONFLICT 0x02 -#define STATUS_QUERY 0x03 -#define TERMINATE_TRACE 0x07 -#define DATAGRAM 0x08 -#define DATAGRAM_BROADCAST 0x09 -#define NAME_QUERY 0x0A -#define ADD_NAME_RESPONSE 0x0D -#define NAME_RECOGNIZED 0x0E -#define STATUS_RESPONSE 0x0F -#define TERMINATE_TRACE2 0x13 -#define DATA_ACK 0x14 -#define DATA_FIRST_MIDDLE 0x15 -#define DATA_ONLY_LAST 0x16 -#define SESSION_CONFIRM 0x17 -#define SESSION_END 0x18 -#define SESSION_INITIALIZE 0x19 -#define NO_RECEIVE 0x1A -#define RECEIVE_OUTSTANDING 0x1B -#define RECEIVE_CONTINUE 0x1C -#define SESSION_ALIVE 0x1F - -#define NB_TRANSMIT_COUNT 6 -#define NB_TRANSMIT_TIMEOUT (HZ/2) - -#define NB_DESCRIM_1 0xEF -#define NB_DESCRIM_2 0xFF - -struct nb_dgram_pkt -{ - __u16 length; - __u8 descrim1; - __u8 descrim2; - __u8 command; - __u8 option1; - __u16 option2; - __u16 tx_seq; - __u16 rx_seq; - __u8 dest[NB_NAME_LEN]; - __u8 src[NB_NAME_LEN]; -}; - -struct nb_sess_pkt -{ - __u16 length; - __u8 descrim1; - __u8 descrim2; - __u8 command; - __u8 option1; - __u16 option2; - __u16 tx_seq; - __u16 rx_seq; - __u8 dnum; - __u8 snum; -}; - -#define NO_SEQ 0 - -#endif diff --git a/include/net/p8022tr.h b/include/net/p8022tr.h deleted file mode 100644 index f4231ecee..000000000 --- a/include/net/p8022tr.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _NET_P8022TR_H -#define _NET_P8022TR_H - -extern struct datalink_proto *register_8022tr_client(unsigned char type, int (*rcvfunc)(struct sk_buff *, struct device *, struct packet_type *)); -extern void unregister_8022tr_client(unsigned char type); - -#endif - diff --git a/include/net/p8022trcall.h b/include/net/p8022trcall.h deleted file mode 100644 index 3ce6f3cdb..000000000 --- a/include/net/p8022trcall.h +++ /dev/null @@ -1,3 +0,0 @@ -/* Separate to keep compilation of Space.c simpler */ -extern void p8022tr_proto_init(struct net_proto *); - diff --git a/include/net/sock.h b/include/net/sock.h index 29d7985be..ed05e12be 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -126,12 +126,6 @@ struct ipx_opt { unsigned char node[IPX_NODE_LEN]; #endif unsigned short type; -/* - * To handle asynchronous messages from the NetWare server, we have to - * know the connection this socket belongs to. - */ - struct ncp_server *ncp_server; - }; #endif @@ -454,6 +448,9 @@ struct sock { #if defined(CONFIG_IPX) || defined(CONFIG_IPX_MODULE) struct ipx_opt af_ipx; #endif +#if defined (CONFIG_DECNET) || defined(CONFIG_DECNET_MODULE) + struct dn_scp dn; +#endif #if defined (CONFIG_PACKET) || defined(CONFIG_PACKET_MODULE) struct packet_opt *af_packet; #endif @@ -462,19 +459,19 @@ struct sock { #endif #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) ax25_cb *ax25; +#endif #if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE) nr_cb *nr; #endif #if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE) rose_cb *rose; #endif -#endif -#if defined(CONFIG_DECNET) || defined(CONFIG_DECNET_MODULE) - dn_cb *dn; -#endif #ifdef CONFIG_NETLINK struct netlink_opt af_netlink; #endif +#if defined(CONFIG_ECONET) || defined(CONFIG_ECONET_MODULE) + struct econet_opt *af_econet; +#endif } protinfo; /* IP 'private area' or will be eventually. */ diff --git a/include/net/tcp.h b/include/net/tcp.h index ca1240b8a..225d40ad0 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -654,17 +654,24 @@ static __inline__ unsigned int tcp_current_mss(struct sock *sk) return mss_now; } -/* Compute the actual receive window we are currently advertising. */ +/* Compute the actual receive window we are currently advertising. + * Rcv_nxt can be after the window if our peer push more data + * than the offered window. + */ static __inline__ u32 tcp_receive_window(struct tcp_opt *tp) { - return tp->rcv_wup - (tp->rcv_nxt - tp->rcv_wnd); + s32 win = tp->rcv_wup + tp->rcv_wnd - tp->rcv_nxt; + + if (win < 0) + win = 0; + return (u32) win; } /* Choose a new window, without checks for shrinking, and without * scaling applied to the result. The caller does these things * if necessary. This is a "raw" window selection. */ -extern u32 __tcp_select_window(struct sock *sk); +extern u32 __tcp_select_window(struct sock *sk, u32 cur_win); /* Chose a new window to advertise, update state in tcp_opt for the * socket, and return result with RFC1323 scaling applied. The return @@ -674,8 +681,8 @@ extern u32 __tcp_select_window(struct sock *sk); extern __inline__ u16 tcp_select_window(struct sock *sk) { struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); - u32 new_win = __tcp_select_window(sk); u32 cur_win = tcp_receive_window(tp); + u32 new_win = __tcp_select_window(sk, cur_win); /* Never shrink the offered window */ if(new_win < cur_win) @@ -694,8 +701,8 @@ extern __inline__ u16 tcp_select_window(struct sock *sk) extern __inline__ int tcp_raise_window(struct sock *sk) { struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); - u32 new_win = __tcp_select_window(sk); u32 cur_win = tcp_receive_window(tp); + u32 new_win = __tcp_select_window(sk, cur_win); return (new_win && (new_win > (cur_win << 1))); } diff --git a/include/net/x25.h b/include/net/x25.h index a72bd0426..5ac507bd5 100644 --- a/include/net/x25.h +++ b/include/net/x25.h @@ -147,6 +147,7 @@ extern unsigned int x25_new_lci(struct x25_neigh *); extern struct sock *x25_find_socket(unsigned int, struct x25_neigh *); extern void x25_destroy_socket(struct sock *); extern int x25_rx_call_request(struct sk_buff *, struct x25_neigh *, unsigned int); +extern void x25_kill_by_neigh(struct x25_neigh *); #include <net/x25call.h> @@ -161,6 +162,7 @@ extern void x25_terminate_link(struct x25_neigh *); extern int x25_parse_facilities(struct sk_buff *, struct x25_facilities *); extern int x25_create_facilities(unsigned char *, struct x25_facilities *); extern int x25_negotiate_facilities(struct sk_buff *, struct sock *, struct x25_facilities *); +extern void x25_limit_facilities(struct x25_facilities *, struct x25_neigh *); /* x25_in.c */ extern int x25_process_rx_frame(struct sock *, struct sk_buff *); |