diff options
Diffstat (limited to 'include/net')
35 files changed, 716 insertions, 460 deletions
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index d9fa68f26c41..9a36d9297114 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
@@ -40,8 +40,6 @@ | |||
40 | * @close: member function to discard a connection on this transport | 40 | * @close: member function to discard a connection on this transport |
41 | * @request: member function to issue a request to the transport | 41 | * @request: member function to issue a request to the transport |
42 | * @cancel: member function to cancel a request (if it hasn't been sent) | 42 | * @cancel: member function to cancel a request (if it hasn't been sent) |
43 | * @cancelled: member function to notify that a cancelled request will not | ||
44 | * not receive a reply | ||
45 | * | 43 | * |
46 | * This is the basic API for a transport module which is registered by the | 44 | * This is the basic API for a transport module which is registered by the |
47 | * transport module with the 9P core network module and used by the client | 45 | * transport module with the 9P core network module and used by the client |
@@ -60,7 +58,6 @@ struct p9_trans_module { | |||
60 | void (*close) (struct p9_client *); | 58 | void (*close) (struct p9_client *); |
61 | int (*request) (struct p9_client *, struct p9_req_t *req); | 59 | int (*request) (struct p9_client *, struct p9_req_t *req); |
62 | int (*cancel) (struct p9_client *, struct p9_req_t *req); | 60 | int (*cancel) (struct p9_client *, struct p9_req_t *req); |
63 | int (*cancelled)(struct p9_client *, struct p9_req_t *req); | ||
64 | int (*zc_request)(struct p9_client *, struct p9_req_t *, | 61 | int (*zc_request)(struct p9_client *, struct p9_req_t *, |
65 | char *, char *, int , int, int, int); | 62 | char *, char *, int , int, int, int); |
66 | }; | 63 | }; |
diff --git a/include/net/act_api.h b/include/net/act_api.h index b8ffac7b6bab..9e90fdff470d 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h | |||
@@ -82,36 +82,36 @@ struct tc_action_ops { | |||
82 | int (*walk)(struct sk_buff *, struct netlink_callback *, int, struct tc_action *); | 82 | int (*walk)(struct sk_buff *, struct netlink_callback *, int, struct tc_action *); |
83 | }; | 83 | }; |
84 | 84 | ||
85 | extern struct tcf_common *tcf_hash_lookup(u32 index, | 85 | struct tcf_common *tcf_hash_lookup(u32 index, struct tcf_hashinfo *hinfo); |
86 | struct tcf_hashinfo *hinfo); | 86 | void tcf_hash_destroy(struct tcf_common *p, struct tcf_hashinfo *hinfo); |
87 | extern void tcf_hash_destroy(struct tcf_common *p, struct tcf_hashinfo *hinfo); | 87 | int tcf_hash_release(struct tcf_common *p, int bind, |
88 | extern int tcf_hash_release(struct tcf_common *p, int bind, | 88 | struct tcf_hashinfo *hinfo); |
89 | struct tcf_hashinfo *hinfo); | 89 | int tcf_generic_walker(struct sk_buff *skb, struct netlink_callback *cb, |
90 | extern int tcf_generic_walker(struct sk_buff *skb, struct netlink_callback *cb, | 90 | int type, struct tc_action *a); |
91 | int type, struct tc_action *a); | 91 | u32 tcf_hash_new_index(u32 *idx_gen, struct tcf_hashinfo *hinfo); |
92 | extern u32 tcf_hash_new_index(u32 *idx_gen, struct tcf_hashinfo *hinfo); | 92 | int tcf_hash_search(struct tc_action *a, u32 index); |
93 | extern int tcf_hash_search(struct tc_action *a, u32 index); | 93 | struct tcf_common *tcf_hash_check(u32 index, struct tc_action *a, |
94 | extern struct tcf_common *tcf_hash_check(u32 index, struct tc_action *a, | 94 | int bind, struct tcf_hashinfo *hinfo); |
95 | int bind, struct tcf_hashinfo *hinfo); | 95 | struct tcf_common *tcf_hash_create(u32 index, struct nlattr *est, |
96 | extern struct tcf_common *tcf_hash_create(u32 index, struct nlattr *est, | 96 | struct tc_action *a, int size, |
97 | struct tc_action *a, int size, | 97 | int bind, u32 *idx_gen, |
98 | int bind, u32 *idx_gen, | 98 | struct tcf_hashinfo *hinfo); |
99 | struct tcf_hashinfo *hinfo); | 99 | void tcf_hash_insert(struct tcf_common *p, struct tcf_hashinfo *hinfo); |
100 | extern void tcf_hash_insert(struct tcf_common *p, struct tcf_hashinfo *hinfo); | ||
101 | 100 | ||
102 | extern int tcf_register_action(struct tc_action_ops *a); | 101 | int tcf_register_action(struct tc_action_ops *a); |
103 | extern int tcf_unregister_action(struct tc_action_ops *a); | 102 | int tcf_unregister_action(struct tc_action_ops *a); |
104 | extern void tcf_action_destroy(struct tc_action *a, int bind); | 103 | void tcf_action_destroy(struct tc_action *a, int bind); |
105 | extern int tcf_action_exec(struct sk_buff *skb, const struct tc_action *a, struct tcf_result *res); | 104 | int tcf_action_exec(struct sk_buff *skb, const struct tc_action *a, |
106 | extern struct tc_action *tcf_action_init(struct net *net, struct nlattr *nla, | 105 | struct tcf_result *res); |
107 | struct nlattr *est, char *n, int ovr, | 106 | struct tc_action *tcf_action_init(struct net *net, struct nlattr *nla, |
108 | int bind); | 107 | struct nlattr *est, char *n, int ovr, |
109 | extern struct tc_action *tcf_action_init_1(struct net *net, struct nlattr *nla, | 108 | int bind); |
110 | struct nlattr *est, char *n, int ovr, | 109 | struct tc_action *tcf_action_init_1(struct net *net, struct nlattr *nla, |
111 | int bind); | 110 | struct nlattr *est, char *n, int ovr, |
112 | extern int tcf_action_dump(struct sk_buff *skb, struct tc_action *a, int, int); | 111 | int bind); |
113 | extern int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int); | 112 | int tcf_action_dump(struct sk_buff *skb, struct tc_action *a, int, int); |
114 | extern int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); | 113 | int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int); |
115 | extern int tcf_action_copy_stats (struct sk_buff *,struct tc_action *, int); | 114 | int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); |
115 | int tcf_action_copy_stats(struct sk_buff *, struct tc_action *, int); | ||
116 | #endif /* CONFIG_NET_CLS_ACT */ | 116 | #endif /* CONFIG_NET_CLS_ACT */ |
117 | #endif | 117 | #endif |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index c7b181cb47a6..43fa31a610b8 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -53,51 +53,36 @@ struct prefix_info { | |||
53 | #define IN6_ADDR_HSIZE_SHIFT 4 | 53 | #define IN6_ADDR_HSIZE_SHIFT 4 |
54 | #define IN6_ADDR_HSIZE (1 << IN6_ADDR_HSIZE_SHIFT) | 54 | #define IN6_ADDR_HSIZE (1 << IN6_ADDR_HSIZE_SHIFT) |
55 | 55 | ||
56 | extern int addrconf_init(void); | 56 | int addrconf_init(void); |
57 | extern void addrconf_cleanup(void); | 57 | void addrconf_cleanup(void); |
58 | 58 | ||
59 | extern int addrconf_add_ifaddr(struct net *net, | 59 | int addrconf_add_ifaddr(struct net *net, void __user *arg); |
60 | void __user *arg); | 60 | int addrconf_del_ifaddr(struct net *net, void __user *arg); |
61 | extern int addrconf_del_ifaddr(struct net *net, | 61 | int addrconf_set_dstaddr(struct net *net, void __user *arg); |
62 | void __user *arg); | ||
63 | extern int addrconf_set_dstaddr(struct net *net, | ||
64 | void __user *arg); | ||
65 | 62 | ||
66 | extern int ipv6_chk_addr(struct net *net, | 63 | int ipv6_chk_addr(struct net *net, const struct in6_addr *addr, |
67 | const struct in6_addr *addr, | 64 | const struct net_device *dev, int strict); |
68 | const struct net_device *dev, | ||
69 | int strict); | ||
70 | 65 | ||
71 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) | 66 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) |
72 | extern int ipv6_chk_home_addr(struct net *net, | 67 | int ipv6_chk_home_addr(struct net *net, const struct in6_addr *addr); |
73 | const struct in6_addr *addr); | ||
74 | #endif | 68 | #endif |
75 | 69 | ||
76 | extern int ipv6_chk_prefix(const struct in6_addr *addr, | 70 | int ipv6_chk_prefix(const struct in6_addr *addr, struct net_device *dev); |
77 | struct net_device *dev); | 71 | |
78 | 72 | struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net, | |
79 | extern struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net, | 73 | const struct in6_addr *addr, |
80 | const struct in6_addr *addr, | 74 | struct net_device *dev, int strict); |
81 | struct net_device *dev, | 75 | |
82 | int strict); | 76 | int ipv6_dev_get_saddr(struct net *net, const struct net_device *dev, |
83 | 77 | const struct in6_addr *daddr, unsigned int srcprefs, | |
84 | extern int ipv6_dev_get_saddr(struct net *net, | 78 | struct in6_addr *saddr); |
85 | const struct net_device *dev, | 79 | int __ipv6_get_lladdr(struct inet6_dev *idev, struct in6_addr *addr, |
86 | const struct in6_addr *daddr, | 80 | unsigned char banned_flags); |
87 | unsigned int srcprefs, | 81 | int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr, |
88 | struct in6_addr *saddr); | 82 | unsigned char banned_flags); |
89 | extern int __ipv6_get_lladdr(struct inet6_dev *idev, | 83 | int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2); |
90 | struct in6_addr *addr, | 84 | void addrconf_join_solict(struct net_device *dev, const struct in6_addr *addr); |
91 | unsigned char banned_flags); | 85 | void addrconf_leave_solict(struct inet6_dev *idev, const struct in6_addr *addr); |
92 | extern int ipv6_get_lladdr(struct net_device *dev, | ||
93 | struct in6_addr *addr, | ||
94 | unsigned char banned_flags); | ||
95 | extern int ipv6_rcv_saddr_equal(const struct sock *sk, | ||
96 | const struct sock *sk2); | ||
97 | extern void addrconf_join_solict(struct net_device *dev, | ||
98 | const struct in6_addr *addr); | ||
99 | extern void addrconf_leave_solict(struct inet6_dev *idev, | ||
100 | const struct in6_addr *addr); | ||
101 | 86 | ||
102 | static inline unsigned long addrconf_timeout_fixup(u32 timeout, | 87 | static inline unsigned long addrconf_timeout_fixup(u32 timeout, |
103 | unsigned int unit) | 88 | unsigned int unit) |
@@ -124,41 +109,38 @@ static inline int addrconf_finite_timeout(unsigned long timeout) | |||
124 | /* | 109 | /* |
125 | * IPv6 Address Label subsystem (addrlabel.c) | 110 | * IPv6 Address Label subsystem (addrlabel.c) |
126 | */ | 111 | */ |
127 | extern int ipv6_addr_label_init(void); | 112 | int ipv6_addr_label_init(void); |
128 | extern void ipv6_addr_label_cleanup(void); | 113 | void ipv6_addr_label_cleanup(void); |
129 | extern void ipv6_addr_label_rtnl_register(void); | 114 | void ipv6_addr_label_rtnl_register(void); |
130 | extern u32 ipv6_addr_label(struct net *net, | 115 | u32 ipv6_addr_label(struct net *net, const struct in6_addr *addr, |
131 | const struct in6_addr *addr, | 116 | int type, int ifindex); |
132 | int type, int ifindex); | ||
133 | 117 | ||
134 | /* | 118 | /* |
135 | * multicast prototypes (mcast.c) | 119 | * multicast prototypes (mcast.c) |
136 | */ | 120 | */ |
137 | extern int ipv6_sock_mc_join(struct sock *sk, int ifindex, | 121 | int ipv6_sock_mc_join(struct sock *sk, int ifindex, |
138 | const struct in6_addr *addr); | 122 | const struct in6_addr *addr); |
139 | extern int ipv6_sock_mc_drop(struct sock *sk, int ifindex, | 123 | int ipv6_sock_mc_drop(struct sock *sk, int ifindex, |
140 | const struct in6_addr *addr); | 124 | const struct in6_addr *addr); |
141 | extern void ipv6_sock_mc_close(struct sock *sk); | 125 | void ipv6_sock_mc_close(struct sock *sk); |
142 | extern bool inet6_mc_check(struct sock *sk, | 126 | bool inet6_mc_check(struct sock *sk, const struct in6_addr *mc_addr, |
143 | const struct in6_addr *mc_addr, | 127 | const struct in6_addr *src_addr); |
144 | const struct in6_addr *src_addr); | 128 | |
145 | 129 | int ipv6_dev_mc_inc(struct net_device *dev, const struct in6_addr *addr); | |
146 | extern int ipv6_dev_mc_inc(struct net_device *dev, const struct in6_addr *addr); | 130 | int __ipv6_dev_mc_dec(struct inet6_dev *idev, const struct in6_addr *addr); |
147 | extern int __ipv6_dev_mc_dec(struct inet6_dev *idev, const struct in6_addr *addr); | 131 | int ipv6_dev_mc_dec(struct net_device *dev, const struct in6_addr *addr); |
148 | extern int ipv6_dev_mc_dec(struct net_device *dev, const struct in6_addr *addr); | 132 | void ipv6_mc_up(struct inet6_dev *idev); |
149 | extern void ipv6_mc_up(struct inet6_dev *idev); | 133 | void ipv6_mc_down(struct inet6_dev *idev); |
150 | extern void ipv6_mc_down(struct inet6_dev *idev); | 134 | void ipv6_mc_unmap(struct inet6_dev *idev); |
151 | extern void ipv6_mc_unmap(struct inet6_dev *idev); | 135 | void ipv6_mc_remap(struct inet6_dev *idev); |
152 | extern void ipv6_mc_remap(struct inet6_dev *idev); | 136 | void ipv6_mc_init_dev(struct inet6_dev *idev); |
153 | extern void ipv6_mc_init_dev(struct inet6_dev *idev); | 137 | void ipv6_mc_destroy_dev(struct inet6_dev *idev); |
154 | extern void ipv6_mc_destroy_dev(struct inet6_dev *idev); | 138 | void addrconf_dad_failure(struct inet6_ifaddr *ifp); |
155 | extern void addrconf_dad_failure(struct inet6_ifaddr *ifp); | 139 | |
156 | 140 | bool ipv6_chk_mcast_addr(struct net_device *dev, const struct in6_addr *group, | |
157 | extern bool ipv6_chk_mcast_addr(struct net_device *dev, | 141 | const struct in6_addr *src_addr); |
158 | const struct in6_addr *group, | 142 | |
159 | const struct in6_addr *src_addr); | 143 | void ipv6_mc_dad_complete(struct inet6_dev *idev); |
160 | |||
161 | extern void ipv6_mc_dad_complete(struct inet6_dev *idev); | ||
162 | /* | 144 | /* |
163 | * identify MLD packets for MLD filter exceptions | 145 | * identify MLD packets for MLD filter exceptions |
164 | */ | 146 | */ |
@@ -184,29 +166,31 @@ static inline bool ipv6_is_mld(struct sk_buff *skb, int nexthdr, int offset) | |||
184 | return false; | 166 | return false; |
185 | } | 167 | } |
186 | 168 | ||
187 | extern void addrconf_prefix_rcv(struct net_device *dev, | 169 | void addrconf_prefix_rcv(struct net_device *dev, |
188 | u8 *opt, int len, bool sllao); | 170 | u8 *opt, int len, bool sllao); |
189 | 171 | ||
190 | /* | 172 | /* |
191 | * anycast prototypes (anycast.c) | 173 | * anycast prototypes (anycast.c) |
192 | */ | 174 | */ |
193 | extern int ipv6_sock_ac_join(struct sock *sk,int ifindex, const struct in6_addr *addr); | 175 | int ipv6_sock_ac_join(struct sock *sk, int ifindex, |
194 | extern int ipv6_sock_ac_drop(struct sock *sk,int ifindex, const struct in6_addr *addr); | 176 | const struct in6_addr *addr); |
195 | extern void ipv6_sock_ac_close(struct sock *sk); | 177 | int ipv6_sock_ac_drop(struct sock *sk, int ifindex, |
196 | 178 | const struct in6_addr *addr); | |
197 | extern int ipv6_dev_ac_inc(struct net_device *dev, const struct in6_addr *addr); | 179 | void ipv6_sock_ac_close(struct sock *sk); |
198 | extern int __ipv6_dev_ac_dec(struct inet6_dev *idev, const struct in6_addr *addr); | 180 | |
199 | extern bool ipv6_chk_acast_addr(struct net *net, struct net_device *dev, | 181 | int ipv6_dev_ac_inc(struct net_device *dev, const struct in6_addr *addr); |
182 | int __ipv6_dev_ac_dec(struct inet6_dev *idev, const struct in6_addr *addr); | ||
183 | bool ipv6_chk_acast_addr(struct net *net, struct net_device *dev, | ||
200 | const struct in6_addr *addr); | 184 | const struct in6_addr *addr); |
201 | 185 | ||
202 | 186 | ||
203 | /* Device notifier */ | 187 | /* Device notifier */ |
204 | extern int register_inet6addr_notifier(struct notifier_block *nb); | 188 | int register_inet6addr_notifier(struct notifier_block *nb); |
205 | extern int unregister_inet6addr_notifier(struct notifier_block *nb); | 189 | int unregister_inet6addr_notifier(struct notifier_block *nb); |
206 | extern int inet6addr_notifier_call_chain(unsigned long val, void *v); | 190 | int inet6addr_notifier_call_chain(unsigned long val, void *v); |
207 | 191 | ||
208 | extern void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex, | 192 | void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex, |
209 | struct ipv6_devconf *devconf); | 193 | struct ipv6_devconf *devconf); |
210 | 194 | ||
211 | /** | 195 | /** |
212 | * __in6_dev_get - get inet6_dev pointer from netdevice | 196 | * __in6_dev_get - get inet6_dev pointer from netdevice |
@@ -240,7 +224,7 @@ static inline struct inet6_dev *in6_dev_get(const struct net_device *dev) | |||
240 | return idev; | 224 | return idev; |
241 | } | 225 | } |
242 | 226 | ||
243 | extern void in6_dev_finish_destroy(struct inet6_dev *idev); | 227 | void in6_dev_finish_destroy(struct inet6_dev *idev); |
244 | 228 | ||
245 | static inline void in6_dev_put(struct inet6_dev *idev) | 229 | static inline void in6_dev_put(struct inet6_dev *idev) |
246 | { | 230 | { |
@@ -258,7 +242,7 @@ static inline void in6_dev_hold(struct inet6_dev *idev) | |||
258 | atomic_inc(&idev->refcnt); | 242 | atomic_inc(&idev->refcnt); |
259 | } | 243 | } |
260 | 244 | ||
261 | extern void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp); | 245 | void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp); |
262 | 246 | ||
263 | static inline void in6_ifa_put(struct inet6_ifaddr *ifp) | 247 | static inline void in6_ifa_put(struct inet6_ifaddr *ifp) |
264 | { | 248 | { |
@@ -340,8 +324,8 @@ static inline bool ipv6_addr_is_solict_mult(const struct in6_addr *addr) | |||
340 | } | 324 | } |
341 | 325 | ||
342 | #ifdef CONFIG_PROC_FS | 326 | #ifdef CONFIG_PROC_FS |
343 | extern int if6_proc_init(void); | 327 | int if6_proc_init(void); |
344 | extern void if6_proc_exit(void); | 328 | void if6_proc_exit(void); |
345 | #endif | 329 | #endif |
346 | 330 | ||
347 | #endif | 331 | #endif |
diff --git a/include/net/af_rxrpc.h b/include/net/af_rxrpc.h index 03e6e9453623..e797d45a5ae6 100644 --- a/include/net/af_rxrpc.h +++ b/include/net/af_rxrpc.h | |||
@@ -31,24 +31,21 @@ enum { | |||
31 | 31 | ||
32 | typedef void (*rxrpc_interceptor_t)(struct sock *, unsigned long, | 32 | typedef void (*rxrpc_interceptor_t)(struct sock *, unsigned long, |
33 | struct sk_buff *); | 33 | struct sk_buff *); |
34 | extern void rxrpc_kernel_intercept_rx_messages(struct socket *, | 34 | void rxrpc_kernel_intercept_rx_messages(struct socket *, rxrpc_interceptor_t); |
35 | rxrpc_interceptor_t); | 35 | struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *, |
36 | extern struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *, | 36 | struct sockaddr_rxrpc *, |
37 | struct sockaddr_rxrpc *, | 37 | struct key *, |
38 | struct key *, | 38 | unsigned long, |
39 | unsigned long, | 39 | gfp_t); |
40 | gfp_t); | 40 | int rxrpc_kernel_send_data(struct rxrpc_call *, struct msghdr *, size_t); |
41 | extern int rxrpc_kernel_send_data(struct rxrpc_call *, struct msghdr *, | 41 | void rxrpc_kernel_abort_call(struct rxrpc_call *, u32); |
42 | size_t); | 42 | void rxrpc_kernel_end_call(struct rxrpc_call *); |
43 | extern void rxrpc_kernel_abort_call(struct rxrpc_call *, u32); | 43 | bool rxrpc_kernel_is_data_last(struct sk_buff *); |
44 | extern void rxrpc_kernel_end_call(struct rxrpc_call *); | 44 | u32 rxrpc_kernel_get_abort_code(struct sk_buff *); |
45 | extern bool rxrpc_kernel_is_data_last(struct sk_buff *); | 45 | int rxrpc_kernel_get_error_number(struct sk_buff *); |
46 | extern u32 rxrpc_kernel_get_abort_code(struct sk_buff *); | 46 | void rxrpc_kernel_data_delivered(struct sk_buff *); |
47 | extern int rxrpc_kernel_get_error_number(struct sk_buff *); | 47 | void rxrpc_kernel_free_skb(struct sk_buff *); |
48 | extern void rxrpc_kernel_data_delivered(struct sk_buff *); | 48 | struct rxrpc_call *rxrpc_kernel_accept_call(struct socket *, unsigned long); |
49 | extern void rxrpc_kernel_free_skb(struct sk_buff *); | 49 | int rxrpc_kernel_reject_call(struct socket *); |
50 | extern struct rxrpc_call *rxrpc_kernel_accept_call(struct socket *, | ||
51 | unsigned long); | ||
52 | extern int rxrpc_kernel_reject_call(struct socket *); | ||
53 | 50 | ||
54 | #endif /* _NET_RXRPC_H */ | 51 | #endif /* _NET_RXRPC_H */ |
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index dbdfd2b0f3b3..05442df4ca89 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h | |||
@@ -6,12 +6,12 @@ | |||
6 | #include <linux/mutex.h> | 6 | #include <linux/mutex.h> |
7 | #include <net/sock.h> | 7 | #include <net/sock.h> |
8 | 8 | ||
9 | extern void unix_inflight(struct file *fp); | 9 | void unix_inflight(struct file *fp); |
10 | extern void unix_notinflight(struct file *fp); | 10 | void unix_notinflight(struct file *fp); |
11 | extern void unix_gc(void); | 11 | void unix_gc(void); |
12 | extern void wait_for_unix_gc(void); | 12 | void wait_for_unix_gc(void); |
13 | extern struct sock *unix_get_socket(struct file *filp); | 13 | struct sock *unix_get_socket(struct file *filp); |
14 | extern struct sock *unix_peer_get(struct sock *); | 14 | struct sock *unix_peer_get(struct sock *); |
15 | 15 | ||
16 | #define UNIX_HASH_SIZE 256 | 16 | #define UNIX_HASH_SIZE 256 |
17 | #define UNIX_HASH_BITS 8 | 17 | #define UNIX_HASH_BITS 8 |
@@ -71,8 +71,8 @@ long unix_inq_len(struct sock *sk); | |||
71 | long unix_outq_len(struct sock *sk); | 71 | long unix_outq_len(struct sock *sk); |
72 | 72 | ||
73 | #ifdef CONFIG_SYSCTL | 73 | #ifdef CONFIG_SYSCTL |
74 | extern int unix_sysctl_register(struct net *net); | 74 | int unix_sysctl_register(struct net *net); |
75 | extern void unix_sysctl_unregister(struct net *net); | 75 | void unix_sysctl_unregister(struct net *net); |
76 | #else | 76 | #else |
77 | static inline int unix_sysctl_register(struct net *net) { return 0; } | 77 | static inline int unix_sysctl_register(struct net *net) { return 0; } |
78 | static inline void unix_sysctl_unregister(struct net *net) {} | 78 | static inline void unix_sysctl_unregister(struct net *net) {} |
diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h new file mode 100644 index 000000000000..7d64d3609ec9 --- /dev/null +++ b/include/net/af_vsock.h | |||
@@ -0,0 +1,175 @@ | |||
1 | /* | ||
2 | * VMware vSockets Driver | ||
3 | * | ||
4 | * Copyright (C) 2007-2013 VMware, Inc. All rights reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the Free | ||
8 | * Software Foundation version 2 and no later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
13 | * more details. | ||
14 | */ | ||
15 | |||
16 | #ifndef __AF_VSOCK_H__ | ||
17 | #define __AF_VSOCK_H__ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/workqueue.h> | ||
21 | #include <linux/vm_sockets.h> | ||
22 | |||
23 | #include "vsock_addr.h" | ||
24 | |||
25 | #define LAST_RESERVED_PORT 1023 | ||
26 | |||
27 | #define vsock_sk(__sk) ((struct vsock_sock *)__sk) | ||
28 | #define sk_vsock(__vsk) (&(__vsk)->sk) | ||
29 | |||
30 | struct vsock_sock { | ||
31 | /* sk must be the first member. */ | ||
32 | struct sock sk; | ||
33 | struct sockaddr_vm local_addr; | ||
34 | struct sockaddr_vm remote_addr; | ||
35 | /* Links for the global tables of bound and connected sockets. */ | ||
36 | struct list_head bound_table; | ||
37 | struct list_head connected_table; | ||
38 | /* Accessed without the socket lock held. This means it can never be | ||
39 | * modified outsided of socket create or destruct. | ||
40 | */ | ||
41 | bool trusted; | ||
42 | bool cached_peer_allow_dgram; /* Dgram communication allowed to | ||
43 | * cached peer? | ||
44 | */ | ||
45 | u32 cached_peer; /* Context ID of last dgram destination check. */ | ||
46 | const struct cred *owner; | ||
47 | /* Rest are SOCK_STREAM only. */ | ||
48 | long connect_timeout; | ||
49 | /* Listening socket that this came from. */ | ||
50 | struct sock *listener; | ||
51 | /* Used for pending list and accept queue during connection handshake. | ||
52 | * The listening socket is the head for both lists. Sockets created | ||
53 | * for connection requests are placed in the pending list until they | ||
54 | * are connected, at which point they are put in the accept queue list | ||
55 | * so they can be accepted in accept(). If accept() cannot accept the | ||
56 | * connection, it is marked as rejected so the cleanup function knows | ||
57 | * to clean up the socket. | ||
58 | */ | ||
59 | struct list_head pending_links; | ||
60 | struct list_head accept_queue; | ||
61 | bool rejected; | ||
62 | struct delayed_work dwork; | ||
63 | u32 peer_shutdown; | ||
64 | bool sent_request; | ||
65 | bool ignore_connecting_rst; | ||
66 | |||
67 | /* Private to transport. */ | ||
68 | void *trans; | ||
69 | }; | ||
70 | |||
71 | s64 vsock_stream_has_data(struct vsock_sock *vsk); | ||
72 | s64 vsock_stream_has_space(struct vsock_sock *vsk); | ||
73 | void vsock_pending_work(struct work_struct *work); | ||
74 | struct sock *__vsock_create(struct net *net, | ||
75 | struct socket *sock, | ||
76 | struct sock *parent, | ||
77 | gfp_t priority, unsigned short type); | ||
78 | |||
79 | /**** TRANSPORT ****/ | ||
80 | |||
81 | struct vsock_transport_recv_notify_data { | ||
82 | u64 data1; /* Transport-defined. */ | ||
83 | u64 data2; /* Transport-defined. */ | ||
84 | bool notify_on_block; | ||
85 | }; | ||
86 | |||
87 | struct vsock_transport_send_notify_data { | ||
88 | u64 data1; /* Transport-defined. */ | ||
89 | u64 data2; /* Transport-defined. */ | ||
90 | }; | ||
91 | |||
92 | struct vsock_transport { | ||
93 | /* Initialize/tear-down socket. */ | ||
94 | int (*init)(struct vsock_sock *, struct vsock_sock *); | ||
95 | void (*destruct)(struct vsock_sock *); | ||
96 | void (*release)(struct vsock_sock *); | ||
97 | |||
98 | /* Connections. */ | ||
99 | int (*connect)(struct vsock_sock *); | ||
100 | |||
101 | /* DGRAM. */ | ||
102 | int (*dgram_bind)(struct vsock_sock *, struct sockaddr_vm *); | ||
103 | int (*dgram_dequeue)(struct kiocb *kiocb, struct vsock_sock *vsk, | ||
104 | struct msghdr *msg, size_t len, int flags); | ||
105 | int (*dgram_enqueue)(struct vsock_sock *, struct sockaddr_vm *, | ||
106 | struct iovec *, size_t len); | ||
107 | bool (*dgram_allow)(u32 cid, u32 port); | ||
108 | |||
109 | /* STREAM. */ | ||
110 | /* TODO: stream_bind() */ | ||
111 | ssize_t (*stream_dequeue)(struct vsock_sock *, struct iovec *, | ||
112 | size_t len, int flags); | ||
113 | ssize_t (*stream_enqueue)(struct vsock_sock *, struct iovec *, | ||
114 | size_t len); | ||
115 | s64 (*stream_has_data)(struct vsock_sock *); | ||
116 | s64 (*stream_has_space)(struct vsock_sock *); | ||
117 | u64 (*stream_rcvhiwat)(struct vsock_sock *); | ||
118 | bool (*stream_is_active)(struct vsock_sock *); | ||
119 | bool (*stream_allow)(u32 cid, u32 port); | ||
120 | |||
121 | /* Notification. */ | ||
122 | int (*notify_poll_in)(struct vsock_sock *, size_t, bool *); | ||
123 | int (*notify_poll_out)(struct vsock_sock *, size_t, bool *); | ||
124 | int (*notify_recv_init)(struct vsock_sock *, size_t, | ||
125 | struct vsock_transport_recv_notify_data *); | ||
126 | int (*notify_recv_pre_block)(struct vsock_sock *, size_t, | ||
127 | struct vsock_transport_recv_notify_data *); | ||
128 | int (*notify_recv_pre_dequeue)(struct vsock_sock *, size_t, | ||
129 | struct vsock_transport_recv_notify_data *); | ||
130 | int (*notify_recv_post_dequeue)(struct vsock_sock *, size_t, | ||
131 | ssize_t, bool, struct vsock_transport_recv_notify_data *); | ||
132 | int (*notify_send_init)(struct vsock_sock *, | ||
133 | struct vsock_transport_send_notify_data *); | ||
134 | int (*notify_send_pre_block)(struct vsock_sock *, | ||
135 | struct vsock_transport_send_notify_data *); | ||
136 | int (*notify_send_pre_enqueue)(struct vsock_sock *, | ||
137 | struct vsock_transport_send_notify_data *); | ||
138 | int (*notify_send_post_enqueue)(struct vsock_sock *, ssize_t, | ||
139 | struct vsock_transport_send_notify_data *); | ||
140 | |||
141 | /* Shutdown. */ | ||
142 | int (*shutdown)(struct vsock_sock *, int); | ||
143 | |||
144 | /* Buffer sizes. */ | ||
145 | void (*set_buffer_size)(struct vsock_sock *, u64); | ||
146 | void (*set_min_buffer_size)(struct vsock_sock *, u64); | ||
147 | void (*set_max_buffer_size)(struct vsock_sock *, u64); | ||
148 | u64 (*get_buffer_size)(struct vsock_sock *); | ||
149 | u64 (*get_min_buffer_size)(struct vsock_sock *); | ||
150 | u64 (*get_max_buffer_size)(struct vsock_sock *); | ||
151 | |||
152 | /* Addressing. */ | ||
153 | u32 (*get_local_cid)(void); | ||
154 | }; | ||
155 | |||
156 | /**** CORE ****/ | ||
157 | |||
158 | int vsock_core_init(const struct vsock_transport *t); | ||
159 | void vsock_core_exit(void); | ||
160 | |||
161 | /**** UTILS ****/ | ||
162 | |||
163 | void vsock_release_pending(struct sock *pending); | ||
164 | void vsock_add_pending(struct sock *listener, struct sock *pending); | ||
165 | void vsock_remove_pending(struct sock *listener, struct sock *pending); | ||
166 | void vsock_enqueue_accept(struct sock *listener, struct sock *connected); | ||
167 | void vsock_insert_connected(struct vsock_sock *vsk); | ||
168 | void vsock_remove_bound(struct vsock_sock *vsk); | ||
169 | void vsock_remove_connected(struct vsock_sock *vsk); | ||
170 | struct sock *vsock_find_bound_socket(struct sockaddr_vm *addr); | ||
171 | struct sock *vsock_find_connected_socket(struct sockaddr_vm *src, | ||
172 | struct sockaddr_vm *dst); | ||
173 | void vsock_for_each_connected_socket(void (*fn)(struct sock *sk)); | ||
174 | |||
175 | #endif /* __AF_VSOCK_H__ */ | ||
diff --git a/include/net/arp.h b/include/net/arp.h index b630dae03411..7509d9da4e36 100644 --- a/include/net/arp.h +++ b/include/net/arp.h | |||
@@ -46,22 +46,22 @@ static inline struct neighbour *__ipv4_neigh_lookup(struct net_device *dev, u32 | |||
46 | return n; | 46 | return n; |
47 | } | 47 | } |
48 | 48 | ||
49 | extern void arp_init(void); | 49 | void arp_init(void); |
50 | extern int arp_find(unsigned char *haddr, struct sk_buff *skb); | 50 | int arp_find(unsigned char *haddr, struct sk_buff *skb); |
51 | extern int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg); | 51 | int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg); |
52 | extern void arp_send(int type, int ptype, __be32 dest_ip, | 52 | void arp_send(int type, int ptype, __be32 dest_ip, |
53 | struct net_device *dev, __be32 src_ip, | 53 | struct net_device *dev, __be32 src_ip, |
54 | const unsigned char *dest_hw, | 54 | const unsigned char *dest_hw, |
55 | const unsigned char *src_hw, const unsigned char *th); | 55 | const unsigned char *src_hw, const unsigned char *th); |
56 | extern int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir); | 56 | int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir); |
57 | extern void arp_ifdown(struct net_device *dev); | 57 | void arp_ifdown(struct net_device *dev); |
58 | 58 | ||
59 | extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, | 59 | struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, |
60 | struct net_device *dev, __be32 src_ip, | 60 | struct net_device *dev, __be32 src_ip, |
61 | const unsigned char *dest_hw, | 61 | const unsigned char *dest_hw, |
62 | const unsigned char *src_hw, | 62 | const unsigned char *src_hw, |
63 | const unsigned char *target_hw); | 63 | const unsigned char *target_hw); |
64 | extern void arp_xmit(struct sk_buff *skb); | 64 | void arp_xmit(struct sk_buff *skb); |
65 | int arp_invalidate(struct net_device *dev, __be32 ip); | 65 | int arp_invalidate(struct net_device *dev, __be32 ip); |
66 | 66 | ||
67 | #endif /* _ARP_H */ | 67 | #endif /* _ARP_H */ |
diff --git a/include/net/ax25.h b/include/net/ax25.h index 89ed9ac5701f..bf0396e9a5d3 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -195,7 +195,7 @@ static inline void ax25_hold_route(ax25_route *ax25_rt) | |||
195 | atomic_inc(&ax25_rt->refcount); | 195 | atomic_inc(&ax25_rt->refcount); |
196 | } | 196 | } |
197 | 197 | ||
198 | extern void __ax25_put_route(ax25_route *ax25_rt); | 198 | void __ax25_put_route(ax25_route *ax25_rt); |
199 | 199 | ||
200 | static inline void ax25_put_route(ax25_route *ax25_rt) | 200 | static inline void ax25_put_route(ax25_route *ax25_rt) |
201 | { | 201 | { |
@@ -272,30 +272,31 @@ static inline __be16 ax25_type_trans(struct sk_buff *skb, struct net_device *dev | |||
272 | /* af_ax25.c */ | 272 | /* af_ax25.c */ |
273 | extern struct hlist_head ax25_list; | 273 | extern struct hlist_head ax25_list; |
274 | extern spinlock_t ax25_list_lock; | 274 | extern spinlock_t ax25_list_lock; |
275 | extern void ax25_cb_add(ax25_cb *); | 275 | void ax25_cb_add(ax25_cb *); |
276 | struct sock *ax25_find_listener(ax25_address *, int, struct net_device *, int); | 276 | struct sock *ax25_find_listener(ax25_address *, int, struct net_device *, int); |
277 | struct sock *ax25_get_socket(ax25_address *, ax25_address *, int); | 277 | struct sock *ax25_get_socket(ax25_address *, ax25_address *, int); |
278 | extern ax25_cb *ax25_find_cb(ax25_address *, ax25_address *, ax25_digi *, struct net_device *); | 278 | ax25_cb *ax25_find_cb(ax25_address *, ax25_address *, ax25_digi *, |
279 | extern void ax25_send_to_raw(ax25_address *, struct sk_buff *, int); | 279 | struct net_device *); |
280 | extern void ax25_destroy_socket(ax25_cb *); | 280 | void ax25_send_to_raw(ax25_address *, struct sk_buff *, int); |
281 | extern ax25_cb * __must_check ax25_create_cb(void); | 281 | void ax25_destroy_socket(ax25_cb *); |
282 | extern void ax25_fillin_cb(ax25_cb *, ax25_dev *); | 282 | ax25_cb * __must_check ax25_create_cb(void); |
283 | extern struct sock *ax25_make_new(struct sock *, struct ax25_dev *); | 283 | void ax25_fillin_cb(ax25_cb *, ax25_dev *); |
284 | struct sock *ax25_make_new(struct sock *, struct ax25_dev *); | ||
284 | 285 | ||
285 | /* ax25_addr.c */ | 286 | /* ax25_addr.c */ |
286 | extern const ax25_address ax25_bcast; | 287 | extern const ax25_address ax25_bcast; |
287 | extern const ax25_address ax25_defaddr; | 288 | extern const ax25_address ax25_defaddr; |
288 | extern const ax25_address null_ax25_address; | 289 | extern const ax25_address null_ax25_address; |
289 | extern char *ax2asc(char *buf, const ax25_address *); | 290 | char *ax2asc(char *buf, const ax25_address *); |
290 | extern void asc2ax(ax25_address *addr, const char *callsign); | 291 | void asc2ax(ax25_address *addr, const char *callsign); |
291 | extern int ax25cmp(const ax25_address *, const ax25_address *); | 292 | int ax25cmp(const ax25_address *, const ax25_address *); |
292 | extern int ax25digicmp(const ax25_digi *, const ax25_digi *); | 293 | int ax25digicmp(const ax25_digi *, const ax25_digi *); |
293 | extern const unsigned char *ax25_addr_parse(const unsigned char *, int, | 294 | const unsigned char *ax25_addr_parse(const unsigned char *, int, |
294 | ax25_address *, ax25_address *, ax25_digi *, int *, int *); | 295 | ax25_address *, ax25_address *, ax25_digi *, int *, int *); |
295 | extern int ax25_addr_build(unsigned char *, const ax25_address *, | 296 | int ax25_addr_build(unsigned char *, const ax25_address *, |
296 | const ax25_address *, const ax25_digi *, int, int); | 297 | const ax25_address *, const ax25_digi *, int, int); |
297 | extern int ax25_addr_size(const ax25_digi *); | 298 | int ax25_addr_size(const ax25_digi *); |
298 | extern void ax25_digi_invert(const ax25_digi *, ax25_digi *); | 299 | void ax25_digi_invert(const ax25_digi *, ax25_digi *); |
299 | 300 | ||
300 | /* ax25_dev.c */ | 301 | /* ax25_dev.c */ |
301 | extern ax25_dev *ax25_dev_list; | 302 | extern ax25_dev *ax25_dev_list; |
@@ -306,33 +307,33 @@ static inline ax25_dev *ax25_dev_ax25dev(struct net_device *dev) | |||
306 | return dev->ax25_ptr; | 307 | return dev->ax25_ptr; |
307 | } | 308 | } |
308 | 309 | ||
309 | extern ax25_dev *ax25_addr_ax25dev(ax25_address *); | 310 | ax25_dev *ax25_addr_ax25dev(ax25_address *); |
310 | extern void ax25_dev_device_up(struct net_device *); | 311 | void ax25_dev_device_up(struct net_device *); |
311 | extern void ax25_dev_device_down(struct net_device *); | 312 | void ax25_dev_device_down(struct net_device *); |
312 | extern int ax25_fwd_ioctl(unsigned int, struct ax25_fwd_struct *); | 313 | int ax25_fwd_ioctl(unsigned int, struct ax25_fwd_struct *); |
313 | extern struct net_device *ax25_fwd_dev(struct net_device *); | 314 | struct net_device *ax25_fwd_dev(struct net_device *); |
314 | extern void ax25_dev_free(void); | 315 | void ax25_dev_free(void); |
315 | 316 | ||
316 | /* ax25_ds_in.c */ | 317 | /* ax25_ds_in.c */ |
317 | extern int ax25_ds_frame_in(ax25_cb *, struct sk_buff *, int); | 318 | int ax25_ds_frame_in(ax25_cb *, struct sk_buff *, int); |
318 | 319 | ||
319 | /* ax25_ds_subr.c */ | 320 | /* ax25_ds_subr.c */ |
320 | extern void ax25_ds_nr_error_recovery(ax25_cb *); | 321 | void ax25_ds_nr_error_recovery(ax25_cb *); |
321 | extern void ax25_ds_enquiry_response(ax25_cb *); | 322 | void ax25_ds_enquiry_response(ax25_cb *); |
322 | extern void ax25_ds_establish_data_link(ax25_cb *); | 323 | void ax25_ds_establish_data_link(ax25_cb *); |
323 | extern void ax25_dev_dama_off(ax25_dev *); | 324 | void ax25_dev_dama_off(ax25_dev *); |
324 | extern void ax25_dama_on(ax25_cb *); | 325 | void ax25_dama_on(ax25_cb *); |
325 | extern void ax25_dama_off(ax25_cb *); | 326 | void ax25_dama_off(ax25_cb *); |
326 | 327 | ||
327 | /* ax25_ds_timer.c */ | 328 | /* ax25_ds_timer.c */ |
328 | extern void ax25_ds_setup_timer(ax25_dev *); | 329 | void ax25_ds_setup_timer(ax25_dev *); |
329 | extern void ax25_ds_set_timer(ax25_dev *); | 330 | void ax25_ds_set_timer(ax25_dev *); |
330 | extern void ax25_ds_del_timer(ax25_dev *); | 331 | void ax25_ds_del_timer(ax25_dev *); |
331 | extern void ax25_ds_timer(ax25_cb *); | 332 | void ax25_ds_timer(ax25_cb *); |
332 | extern void ax25_ds_t1_timeout(ax25_cb *); | 333 | void ax25_ds_t1_timeout(ax25_cb *); |
333 | extern void ax25_ds_heartbeat_expiry(ax25_cb *); | 334 | void ax25_ds_heartbeat_expiry(ax25_cb *); |
334 | extern void ax25_ds_t3timer_expiry(ax25_cb *); | 335 | void ax25_ds_t3timer_expiry(ax25_cb *); |
335 | extern void ax25_ds_idletimer_expiry(ax25_cb *); | 336 | void ax25_ds_idletimer_expiry(ax25_cb *); |
336 | 337 | ||
337 | /* ax25_iface.c */ | 338 | /* ax25_iface.c */ |
338 | 339 | ||
@@ -342,107 +343,109 @@ struct ax25_protocol { | |||
342 | int (*func)(struct sk_buff *, ax25_cb *); | 343 | int (*func)(struct sk_buff *, ax25_cb *); |
343 | }; | 344 | }; |
344 | 345 | ||
345 | extern void ax25_register_pid(struct ax25_protocol *ap); | 346 | void ax25_register_pid(struct ax25_protocol *ap); |
346 | extern void ax25_protocol_release(unsigned int); | 347 | void ax25_protocol_release(unsigned int); |
347 | 348 | ||
348 | struct ax25_linkfail { | 349 | struct ax25_linkfail { |
349 | struct hlist_node lf_node; | 350 | struct hlist_node lf_node; |
350 | void (*func)(ax25_cb *, int); | 351 | void (*func)(ax25_cb *, int); |
351 | }; | 352 | }; |
352 | 353 | ||
353 | extern void ax25_linkfail_register(struct ax25_linkfail *lf); | 354 | void ax25_linkfail_register(struct ax25_linkfail *lf); |
354 | extern void ax25_linkfail_release(struct ax25_linkfail *lf); | 355 | void ax25_linkfail_release(struct ax25_linkfail *lf); |
355 | extern int __must_check ax25_listen_register(ax25_address *, | 356 | int __must_check ax25_listen_register(ax25_address *, struct net_device *); |
356 | struct net_device *); | 357 | void ax25_listen_release(ax25_address *, struct net_device *); |
357 | extern void ax25_listen_release(ax25_address *, struct net_device *); | 358 | int(*ax25_protocol_function(unsigned int))(struct sk_buff *, ax25_cb *); |
358 | extern int (*ax25_protocol_function(unsigned int))(struct sk_buff *, ax25_cb *); | 359 | int ax25_listen_mine(ax25_address *, struct net_device *); |
359 | extern int ax25_listen_mine(ax25_address *, struct net_device *); | 360 | void ax25_link_failed(ax25_cb *, int); |
360 | extern void ax25_link_failed(ax25_cb *, int); | 361 | int ax25_protocol_is_registered(unsigned int); |
361 | extern int ax25_protocol_is_registered(unsigned int); | ||
362 | 362 | ||
363 | /* ax25_in.c */ | 363 | /* ax25_in.c */ |
364 | extern int ax25_rx_iframe(ax25_cb *, struct sk_buff *); | 364 | int ax25_rx_iframe(ax25_cb *, struct sk_buff *); |
365 | extern int ax25_kiss_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); | 365 | int ax25_kiss_rcv(struct sk_buff *, struct net_device *, struct packet_type *, |
366 | struct net_device *); | ||
366 | 367 | ||
367 | /* ax25_ip.c */ | 368 | /* ax25_ip.c */ |
368 | extern int ax25_hard_header(struct sk_buff *, struct net_device *, | 369 | int ax25_hard_header(struct sk_buff *, struct net_device *, unsigned short, |
369 | unsigned short, const void *, | 370 | const void *, const void *, unsigned int); |
370 | const void *, unsigned int); | 371 | int ax25_rebuild_header(struct sk_buff *); |
371 | extern int ax25_rebuild_header(struct sk_buff *); | ||
372 | extern const struct header_ops ax25_header_ops; | 372 | extern const struct header_ops ax25_header_ops; |
373 | 373 | ||
374 | /* ax25_out.c */ | 374 | /* ax25_out.c */ |
375 | extern ax25_cb *ax25_send_frame(struct sk_buff *, int, ax25_address *, ax25_address *, ax25_digi *, struct net_device *); | 375 | ax25_cb *ax25_send_frame(struct sk_buff *, int, ax25_address *, ax25_address *, |
376 | extern void ax25_output(ax25_cb *, int, struct sk_buff *); | 376 | ax25_digi *, struct net_device *); |
377 | extern void ax25_kick(ax25_cb *); | 377 | void ax25_output(ax25_cb *, int, struct sk_buff *); |
378 | extern void ax25_transmit_buffer(ax25_cb *, struct sk_buff *, int); | 378 | void ax25_kick(ax25_cb *); |
379 | extern void ax25_queue_xmit(struct sk_buff *skb, struct net_device *dev); | 379 | void ax25_transmit_buffer(ax25_cb *, struct sk_buff *, int); |
380 | extern int ax25_check_iframes_acked(ax25_cb *, unsigned short); | 380 | void ax25_queue_xmit(struct sk_buff *skb, struct net_device *dev); |
381 | int ax25_check_iframes_acked(ax25_cb *, unsigned short); | ||
381 | 382 | ||
382 | /* ax25_route.c */ | 383 | /* ax25_route.c */ |
383 | extern void ax25_rt_device_down(struct net_device *); | 384 | void ax25_rt_device_down(struct net_device *); |
384 | extern int ax25_rt_ioctl(unsigned int, void __user *); | 385 | int ax25_rt_ioctl(unsigned int, void __user *); |
385 | extern const struct file_operations ax25_route_fops; | 386 | extern const struct file_operations ax25_route_fops; |
386 | extern ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev); | 387 | ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev); |
387 | extern int ax25_rt_autobind(ax25_cb *, ax25_address *); | 388 | int ax25_rt_autobind(ax25_cb *, ax25_address *); |
388 | extern struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, ax25_address *, ax25_digi *); | 389 | struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, |
389 | extern void ax25_rt_free(void); | 390 | ax25_address *, ax25_digi *); |
391 | void ax25_rt_free(void); | ||
390 | 392 | ||
391 | /* ax25_std_in.c */ | 393 | /* ax25_std_in.c */ |
392 | extern int ax25_std_frame_in(ax25_cb *, struct sk_buff *, int); | 394 | int ax25_std_frame_in(ax25_cb *, struct sk_buff *, int); |
393 | 395 | ||
394 | /* ax25_std_subr.c */ | 396 | /* ax25_std_subr.c */ |
395 | extern void ax25_std_nr_error_recovery(ax25_cb *); | 397 | void ax25_std_nr_error_recovery(ax25_cb *); |
396 | extern void ax25_std_establish_data_link(ax25_cb *); | 398 | void ax25_std_establish_data_link(ax25_cb *); |
397 | extern void ax25_std_transmit_enquiry(ax25_cb *); | 399 | void ax25_std_transmit_enquiry(ax25_cb *); |
398 | extern void ax25_std_enquiry_response(ax25_cb *); | 400 | void ax25_std_enquiry_response(ax25_cb *); |
399 | extern void ax25_std_timeout_response(ax25_cb *); | 401 | void ax25_std_timeout_response(ax25_cb *); |
400 | 402 | ||
401 | /* ax25_std_timer.c */ | 403 | /* ax25_std_timer.c */ |
402 | extern void ax25_std_heartbeat_expiry(ax25_cb *); | 404 | void ax25_std_heartbeat_expiry(ax25_cb *); |
403 | extern void ax25_std_t1timer_expiry(ax25_cb *); | 405 | void ax25_std_t1timer_expiry(ax25_cb *); |
404 | extern void ax25_std_t2timer_expiry(ax25_cb *); | 406 | void ax25_std_t2timer_expiry(ax25_cb *); |
405 | extern void ax25_std_t3timer_expiry(ax25_cb *); | 407 | void ax25_std_t3timer_expiry(ax25_cb *); |
406 | extern void ax25_std_idletimer_expiry(ax25_cb *); | 408 | void ax25_std_idletimer_expiry(ax25_cb *); |
407 | 409 | ||
408 | /* ax25_subr.c */ | 410 | /* ax25_subr.c */ |
409 | extern void ax25_clear_queues(ax25_cb *); | 411 | void ax25_clear_queues(ax25_cb *); |
410 | extern void ax25_frames_acked(ax25_cb *, unsigned short); | 412 | void ax25_frames_acked(ax25_cb *, unsigned short); |
411 | extern void ax25_requeue_frames(ax25_cb *); | 413 | void ax25_requeue_frames(ax25_cb *); |
412 | extern int ax25_validate_nr(ax25_cb *, unsigned short); | 414 | int ax25_validate_nr(ax25_cb *, unsigned short); |
413 | extern int ax25_decode(ax25_cb *, struct sk_buff *, int *, int *, int *); | 415 | int ax25_decode(ax25_cb *, struct sk_buff *, int *, int *, int *); |
414 | extern void ax25_send_control(ax25_cb *, int, int, int); | 416 | void ax25_send_control(ax25_cb *, int, int, int); |
415 | extern void ax25_return_dm(struct net_device *, ax25_address *, ax25_address *, ax25_digi *); | 417 | void ax25_return_dm(struct net_device *, ax25_address *, ax25_address *, |
416 | extern void ax25_calculate_t1(ax25_cb *); | 418 | ax25_digi *); |
417 | extern void ax25_calculate_rtt(ax25_cb *); | 419 | void ax25_calculate_t1(ax25_cb *); |
418 | extern void ax25_disconnect(ax25_cb *, int); | 420 | void ax25_calculate_rtt(ax25_cb *); |
421 | void ax25_disconnect(ax25_cb *, int); | ||
419 | 422 | ||
420 | /* ax25_timer.c */ | 423 | /* ax25_timer.c */ |
421 | extern void ax25_setup_timers(ax25_cb *); | 424 | void ax25_setup_timers(ax25_cb *); |
422 | extern void ax25_start_heartbeat(ax25_cb *); | 425 | void ax25_start_heartbeat(ax25_cb *); |
423 | extern void ax25_start_t1timer(ax25_cb *); | 426 | void ax25_start_t1timer(ax25_cb *); |
424 | extern void ax25_start_t2timer(ax25_cb *); | 427 | void ax25_start_t2timer(ax25_cb *); |
425 | extern void ax25_start_t3timer(ax25_cb *); | 428 | void ax25_start_t3timer(ax25_cb *); |
426 | extern void ax25_start_idletimer(ax25_cb *); | 429 | void ax25_start_idletimer(ax25_cb *); |
427 | extern void ax25_stop_heartbeat(ax25_cb *); | 430 | void ax25_stop_heartbeat(ax25_cb *); |
428 | extern void ax25_stop_t1timer(ax25_cb *); | 431 | void ax25_stop_t1timer(ax25_cb *); |
429 | extern void ax25_stop_t2timer(ax25_cb *); | 432 | void ax25_stop_t2timer(ax25_cb *); |
430 | extern void ax25_stop_t3timer(ax25_cb *); | 433 | void ax25_stop_t3timer(ax25_cb *); |
431 | extern void ax25_stop_idletimer(ax25_cb *); | 434 | void ax25_stop_idletimer(ax25_cb *); |
432 | extern int ax25_t1timer_running(ax25_cb *); | 435 | int ax25_t1timer_running(ax25_cb *); |
433 | extern unsigned long ax25_display_timer(struct timer_list *); | 436 | unsigned long ax25_display_timer(struct timer_list *); |
434 | 437 | ||
435 | /* ax25_uid.c */ | 438 | /* ax25_uid.c */ |
436 | extern int ax25_uid_policy; | 439 | extern int ax25_uid_policy; |
437 | extern ax25_uid_assoc *ax25_findbyuid(kuid_t); | 440 | ax25_uid_assoc *ax25_findbyuid(kuid_t); |
438 | extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); | 441 | int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); |
439 | extern const struct file_operations ax25_uid_fops; | 442 | extern const struct file_operations ax25_uid_fops; |
440 | extern void ax25_uid_free(void); | 443 | void ax25_uid_free(void); |
441 | 444 | ||
442 | /* sysctl_net_ax25.c */ | 445 | /* sysctl_net_ax25.c */ |
443 | #ifdef CONFIG_SYSCTL | 446 | #ifdef CONFIG_SYSCTL |
444 | extern int ax25_register_dev_sysctl(ax25_dev *ax25_dev); | 447 | int ax25_register_dev_sysctl(ax25_dev *ax25_dev); |
445 | extern void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev); | 448 | void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev); |
446 | #else | 449 | #else |
447 | static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0; } | 450 | static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0; } |
448 | static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {} | 451 | static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {} |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 7b0730aeb892..f49de283f50e 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -2841,7 +2841,7 @@ struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv); | |||
2841 | * | 2841 | * |
2842 | * Return: A non-negative wiphy index or a negative error code. | 2842 | * Return: A non-negative wiphy index or a negative error code. |
2843 | */ | 2843 | */ |
2844 | extern int wiphy_register(struct wiphy *wiphy); | 2844 | int wiphy_register(struct wiphy *wiphy); |
2845 | 2845 | ||
2846 | /** | 2846 | /** |
2847 | * wiphy_unregister - deregister a wiphy from cfg80211 | 2847 | * wiphy_unregister - deregister a wiphy from cfg80211 |
@@ -2852,14 +2852,14 @@ extern int wiphy_register(struct wiphy *wiphy); | |||
2852 | * pointer, but the call may sleep to wait for an outstanding | 2852 | * pointer, but the call may sleep to wait for an outstanding |
2853 | * request that is being handled. | 2853 | * request that is being handled. |
2854 | */ | 2854 | */ |
2855 | extern void wiphy_unregister(struct wiphy *wiphy); | 2855 | void wiphy_unregister(struct wiphy *wiphy); |
2856 | 2856 | ||
2857 | /** | 2857 | /** |
2858 | * wiphy_free - free wiphy | 2858 | * wiphy_free - free wiphy |
2859 | * | 2859 | * |
2860 | * @wiphy: The wiphy to free | 2860 | * @wiphy: The wiphy to free |
2861 | */ | 2861 | */ |
2862 | extern void wiphy_free(struct wiphy *wiphy); | 2862 | void wiphy_free(struct wiphy *wiphy); |
2863 | 2863 | ||
2864 | /* internal structs */ | 2864 | /* internal structs */ |
2865 | struct cfg80211_conn; | 2865 | struct cfg80211_conn; |
@@ -3014,14 +3014,14 @@ static inline void *wdev_priv(struct wireless_dev *wdev) | |||
3014 | * @band: band, necessary due to channel number overlap | 3014 | * @band: band, necessary due to channel number overlap |
3015 | * Return: The corresponding frequency (in MHz), or 0 if the conversion failed. | 3015 | * Return: The corresponding frequency (in MHz), or 0 if the conversion failed. |
3016 | */ | 3016 | */ |
3017 | extern int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band); | 3017 | int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band); |
3018 | 3018 | ||
3019 | /** | 3019 | /** |
3020 | * ieee80211_frequency_to_channel - convert frequency to channel number | 3020 | * ieee80211_frequency_to_channel - convert frequency to channel number |
3021 | * @freq: center frequency | 3021 | * @freq: center frequency |
3022 | * Return: The corresponding channel, or 0 if the conversion failed. | 3022 | * Return: The corresponding channel, or 0 if the conversion failed. |
3023 | */ | 3023 | */ |
3024 | extern int ieee80211_frequency_to_channel(int freq); | 3024 | int ieee80211_frequency_to_channel(int freq); |
3025 | 3025 | ||
3026 | /* | 3026 | /* |
3027 | * Name indirection necessary because the ieee80211 code also has | 3027 | * Name indirection necessary because the ieee80211 code also has |
@@ -3030,8 +3030,8 @@ extern int ieee80211_frequency_to_channel(int freq); | |||
3030 | * to include both header files you'll (rightfully!) get a symbol | 3030 | * to include both header files you'll (rightfully!) get a symbol |
3031 | * clash. | 3031 | * clash. |
3032 | */ | 3032 | */ |
3033 | extern struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy, | 3033 | struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy, |
3034 | int freq); | 3034 | int freq); |
3035 | /** | 3035 | /** |
3036 | * ieee80211_get_channel - get channel struct from wiphy for specified frequency | 3036 | * ieee80211_get_channel - get channel struct from wiphy for specified frequency |
3037 | * @wiphy: the struct wiphy to get the channel for | 3037 | * @wiphy: the struct wiphy to get the channel for |
@@ -3141,13 +3141,14 @@ struct ieee80211_radiotap_iterator { | |||
3141 | int _reset_on_ext; | 3141 | int _reset_on_ext; |
3142 | }; | 3142 | }; |
3143 | 3143 | ||
3144 | extern int ieee80211_radiotap_iterator_init( | 3144 | int |
3145 | struct ieee80211_radiotap_iterator *iterator, | 3145 | ieee80211_radiotap_iterator_init(struct ieee80211_radiotap_iterator *iterator, |
3146 | struct ieee80211_radiotap_header *radiotap_header, | 3146 | struct ieee80211_radiotap_header *radiotap_header, |
3147 | int max_length, const struct ieee80211_radiotap_vendor_namespaces *vns); | 3147 | int max_length, |
3148 | const struct ieee80211_radiotap_vendor_namespaces *vns); | ||
3148 | 3149 | ||
3149 | extern int ieee80211_radiotap_iterator_next( | 3150 | int |
3150 | struct ieee80211_radiotap_iterator *iterator); | 3151 | ieee80211_radiotap_iterator_next(struct ieee80211_radiotap_iterator *iterator); |
3151 | 3152 | ||
3152 | 3153 | ||
3153 | extern const unsigned char rfc1042_header[6]; | 3154 | extern const unsigned char rfc1042_header[6]; |
@@ -3307,7 +3308,7 @@ const u8 *cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type, | |||
3307 | * | 3308 | * |
3308 | * Return: 0 on success. -ENOMEM. | 3309 | * Return: 0 on success. -ENOMEM. |
3309 | */ | 3310 | */ |
3310 | extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2); | 3311 | int regulatory_hint(struct wiphy *wiphy, const char *alpha2); |
3311 | 3312 | ||
3312 | /** | 3313 | /** |
3313 | * wiphy_apply_custom_regulatory - apply a custom driver regulatory domain | 3314 | * wiphy_apply_custom_regulatory - apply a custom driver regulatory domain |
@@ -3321,9 +3322,8 @@ extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2); | |||
3321 | * default channel settings will be disregarded. If no rule is found for a | 3322 | * default channel settings will be disregarded. If no rule is found for a |
3322 | * channel on the regulatory domain the channel will be disabled. | 3323 | * channel on the regulatory domain the channel will be disabled. |
3323 | */ | 3324 | */ |
3324 | extern void wiphy_apply_custom_regulatory( | 3325 | void wiphy_apply_custom_regulatory(struct wiphy *wiphy, |
3325 | struct wiphy *wiphy, | 3326 | const struct ieee80211_regdomain *regd); |
3326 | const struct ieee80211_regdomain *regd); | ||
3327 | 3327 | ||
3328 | /** | 3328 | /** |
3329 | * freq_reg_info - get regulatory information for the given frequency | 3329 | * freq_reg_info - get regulatory information for the given frequency |
diff --git a/include/net/checksum.h b/include/net/checksum.h index 600d1d705bb8..8f59ca50477c 100644 --- a/include/net/checksum.h +++ b/include/net/checksum.h | |||
@@ -107,11 +107,11 @@ static inline void csum_replace2(__sum16 *sum, __be16 from, __be16 to) | |||
107 | } | 107 | } |
108 | 108 | ||
109 | struct sk_buff; | 109 | struct sk_buff; |
110 | extern void inet_proto_csum_replace4(__sum16 *sum, struct sk_buff *skb, | 110 | void inet_proto_csum_replace4(__sum16 *sum, struct sk_buff *skb, |
111 | __be32 from, __be32 to, int pseudohdr); | 111 | __be32 from, __be32 to, int pseudohdr); |
112 | extern void inet_proto_csum_replace16(__sum16 *sum, struct sk_buff *skb, | 112 | void inet_proto_csum_replace16(__sum16 *sum, struct sk_buff *skb, |
113 | const __be32 *from, const __be32 *to, | 113 | const __be32 *from, const __be32 *to, |
114 | int pseudohdr); | 114 | int pseudohdr); |
115 | 115 | ||
116 | static inline void inet_proto_csum_replace2(__sum16 *sum, struct sk_buff *skb, | 116 | static inline void inet_proto_csum_replace2(__sum16 *sum, struct sk_buff *skb, |
117 | __be16 from, __be16 to, | 117 | __be16 from, __be16 to, |
diff --git a/include/net/cls_cgroup.h b/include/net/cls_cgroup.h index 0fee0617fb7d..f55c14510bd6 100644 --- a/include/net/cls_cgroup.h +++ b/include/net/cls_cgroup.h | |||
@@ -24,7 +24,7 @@ struct cgroup_cls_state | |||
24 | u32 classid; | 24 | u32 classid; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | extern void sock_update_classid(struct sock *sk); | 27 | void sock_update_classid(struct sock *sk); |
28 | 28 | ||
29 | #if IS_BUILTIN(CONFIG_NET_CLS_CGROUP) | 29 | #if IS_BUILTIN(CONFIG_NET_CLS_CGROUP) |
30 | static inline u32 task_cls_classid(struct task_struct *p) | 30 | static inline u32 task_cls_classid(struct task_struct *p) |
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index e361f4882426..4b2b557fb0e8 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h | |||
@@ -10,21 +10,25 @@ | |||
10 | 10 | ||
11 | struct fib_rule { | 11 | struct fib_rule { |
12 | struct list_head list; | 12 | struct list_head list; |
13 | atomic_t refcnt; | ||
14 | int iifindex; | 13 | int iifindex; |
15 | int oifindex; | 14 | int oifindex; |
16 | u32 mark; | 15 | u32 mark; |
17 | u32 mark_mask; | 16 | u32 mark_mask; |
18 | u32 pref; | ||
19 | u32 flags; | 17 | u32 flags; |
20 | u32 table; | 18 | u32 table; |
21 | u8 action; | 19 | u8 action; |
20 | /* 3 bytes hole, try to use */ | ||
22 | u32 target; | 21 | u32 target; |
23 | struct fib_rule __rcu *ctarget; | 22 | struct fib_rule __rcu *ctarget; |
23 | struct net *fr_net; | ||
24 | |||
25 | atomic_t refcnt; | ||
26 | u32 pref; | ||
27 | int suppress_ifgroup; | ||
28 | int suppress_prefixlen; | ||
24 | char iifname[IFNAMSIZ]; | 29 | char iifname[IFNAMSIZ]; |
25 | char oifname[IFNAMSIZ]; | 30 | char oifname[IFNAMSIZ]; |
26 | struct rcu_head rcu; | 31 | struct rcu_head rcu; |
27 | struct net * fr_net; | ||
28 | }; | 32 | }; |
29 | 33 | ||
30 | struct fib_lookup_arg { | 34 | struct fib_lookup_arg { |
@@ -46,6 +50,8 @@ struct fib_rules_ops { | |||
46 | int (*action)(struct fib_rule *, | 50 | int (*action)(struct fib_rule *, |
47 | struct flowi *, int, | 51 | struct flowi *, int, |
48 | struct fib_lookup_arg *); | 52 | struct fib_lookup_arg *); |
53 | bool (*suppress)(struct fib_rule *, | ||
54 | struct fib_lookup_arg *); | ||
49 | int (*match)(struct fib_rule *, | 55 | int (*match)(struct fib_rule *, |
50 | struct flowi *, int); | 56 | struct flowi *, int); |
51 | int (*configure)(struct fib_rule *, | 57 | int (*configure)(struct fib_rule *, |
@@ -80,6 +86,8 @@ struct fib_rules_ops { | |||
80 | [FRA_FWMARK] = { .type = NLA_U32 }, \ | 86 | [FRA_FWMARK] = { .type = NLA_U32 }, \ |
81 | [FRA_FWMASK] = { .type = NLA_U32 }, \ | 87 | [FRA_FWMASK] = { .type = NLA_U32 }, \ |
82 | [FRA_TABLE] = { .type = NLA_U32 }, \ | 88 | [FRA_TABLE] = { .type = NLA_U32 }, \ |
89 | [FRA_SUPPRESS_PREFIXLEN] = { .type = NLA_U32 }, \ | ||
90 | [FRA_SUPPRESS_IFGROUP] = { .type = NLA_U32 }, \ | ||
83 | [FRA_GOTO] = { .type = NLA_U32 } | 91 | [FRA_GOTO] = { .type = NLA_U32 } |
84 | 92 | ||
85 | static inline void fib_rule_get(struct fib_rule *rule) | 93 | static inline void fib_rule_get(struct fib_rule *rule) |
diff --git a/include/net/irda/irlan_common.h b/include/net/irda/irlan_common.h index 0af8b8dfbc22..550c2d6ec7ff 100644 --- a/include/net/irda/irlan_common.h +++ b/include/net/irda/irlan_common.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/skbuff.h> | 33 | #include <linux/skbuff.h> |
34 | #include <linux/netdevice.h> | 34 | #include <linux/netdevice.h> |
35 | #include <linux/if_ether.h> | ||
35 | 36 | ||
36 | #include <net/irda/irttp.h> | 37 | #include <net/irda/irttp.h> |
37 | 38 | ||
@@ -161,7 +162,7 @@ struct irlan_provider_cb { | |||
161 | int access_type; /* Access type */ | 162 | int access_type; /* Access type */ |
162 | __u16 send_arb_val; | 163 | __u16 send_arb_val; |
163 | 164 | ||
164 | __u8 mac_address[6]; /* Generated MAC address for peer device */ | 165 | __u8 mac_address[ETH_ALEN]; /* Generated MAC address for peer device */ |
165 | }; | 166 | }; |
166 | 167 | ||
167 | /* | 168 | /* |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 5b7a3dadadde..e5f02909f1ad 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -2877,14 +2877,14 @@ enum ieee80211_tpt_led_trigger_flags { | |||
2877 | }; | 2877 | }; |
2878 | 2878 | ||
2879 | #ifdef CONFIG_MAC80211_LEDS | 2879 | #ifdef CONFIG_MAC80211_LEDS |
2880 | extern char *__ieee80211_get_tx_led_name(struct ieee80211_hw *hw); | 2880 | char *__ieee80211_get_tx_led_name(struct ieee80211_hw *hw); |
2881 | extern char *__ieee80211_get_rx_led_name(struct ieee80211_hw *hw); | 2881 | char *__ieee80211_get_rx_led_name(struct ieee80211_hw *hw); |
2882 | extern char *__ieee80211_get_assoc_led_name(struct ieee80211_hw *hw); | 2882 | char *__ieee80211_get_assoc_led_name(struct ieee80211_hw *hw); |
2883 | extern char *__ieee80211_get_radio_led_name(struct ieee80211_hw *hw); | 2883 | char *__ieee80211_get_radio_led_name(struct ieee80211_hw *hw); |
2884 | extern char *__ieee80211_create_tpt_led_trigger( | 2884 | char *__ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw, |
2885 | struct ieee80211_hw *hw, unsigned int flags, | 2885 | unsigned int flags, |
2886 | const struct ieee80211_tpt_blink *blink_table, | 2886 | const struct ieee80211_tpt_blink *blink_table, |
2887 | unsigned int blink_table_len); | 2887 | unsigned int blink_table_len); |
2888 | #endif | 2888 | #endif |
2889 | /** | 2889 | /** |
2890 | * ieee80211_get_tx_led_name - get name of TX LED | 2890 | * ieee80211_get_tx_led_name - get name of TX LED |
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 7e748ad8b50c..536501a3e58d 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -195,68 +195,67 @@ static inline void *neighbour_priv(const struct neighbour *n) | |||
195 | #define NEIGH_UPDATE_F_ISROUTER 0x40000000 | 195 | #define NEIGH_UPDATE_F_ISROUTER 0x40000000 |
196 | #define NEIGH_UPDATE_F_ADMIN 0x80000000 | 196 | #define NEIGH_UPDATE_F_ADMIN 0x80000000 |
197 | 197 | ||
198 | extern void neigh_table_init(struct neigh_table *tbl); | 198 | void neigh_table_init(struct neigh_table *tbl); |
199 | extern int neigh_table_clear(struct neigh_table *tbl); | 199 | int neigh_table_clear(struct neigh_table *tbl); |
200 | extern struct neighbour * neigh_lookup(struct neigh_table *tbl, | 200 | struct neighbour *neigh_lookup(struct neigh_table *tbl, const void *pkey, |
201 | const void *pkey, | 201 | struct net_device *dev); |
202 | struct net_device *dev); | 202 | struct neighbour *neigh_lookup_nodev(struct neigh_table *tbl, struct net *net, |
203 | extern struct neighbour * neigh_lookup_nodev(struct neigh_table *tbl, | 203 | const void *pkey); |
204 | struct net *net, | 204 | struct neighbour *__neigh_create(struct neigh_table *tbl, const void *pkey, |
205 | const void *pkey); | 205 | struct net_device *dev, bool want_ref); |
206 | extern struct neighbour * __neigh_create(struct neigh_table *tbl, | ||
207 | const void *pkey, | ||
208 | struct net_device *dev, | ||
209 | bool want_ref); | ||
210 | static inline struct neighbour *neigh_create(struct neigh_table *tbl, | 206 | static inline struct neighbour *neigh_create(struct neigh_table *tbl, |
211 | const void *pkey, | 207 | const void *pkey, |
212 | struct net_device *dev) | 208 | struct net_device *dev) |
213 | { | 209 | { |
214 | return __neigh_create(tbl, pkey, dev, true); | 210 | return __neigh_create(tbl, pkey, dev, true); |
215 | } | 211 | } |
216 | extern void neigh_destroy(struct neighbour *neigh); | 212 | void neigh_destroy(struct neighbour *neigh); |
217 | extern int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb); | 213 | int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb); |
218 | extern int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, | 214 | int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, u32 flags); |
219 | u32 flags); | 215 | void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev); |
220 | extern void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev); | 216 | int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev); |
221 | extern int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev); | 217 | int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb); |
222 | extern int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb); | 218 | int neigh_connected_output(struct neighbour *neigh, struct sk_buff *skb); |
223 | extern int neigh_connected_output(struct neighbour *neigh, struct sk_buff *skb); | 219 | int neigh_compat_output(struct neighbour *neigh, struct sk_buff *skb); |
224 | extern int neigh_compat_output(struct neighbour *neigh, struct sk_buff *skb); | 220 | int neigh_direct_output(struct neighbour *neigh, struct sk_buff *skb); |
225 | extern int neigh_direct_output(struct neighbour *neigh, struct sk_buff *skb); | 221 | struct neighbour *neigh_event_ns(struct neigh_table *tbl, |
226 | extern struct neighbour *neigh_event_ns(struct neigh_table *tbl, | ||
227 | u8 *lladdr, void *saddr, | 222 | u8 *lladdr, void *saddr, |
228 | struct net_device *dev); | 223 | struct net_device *dev); |
229 | 224 | ||
230 | extern struct neigh_parms *neigh_parms_alloc(struct net_device *dev, struct neigh_table *tbl); | 225 | struct neigh_parms *neigh_parms_alloc(struct net_device *dev, |
231 | extern void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms); | 226 | struct neigh_table *tbl); |
227 | void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms); | ||
232 | 228 | ||
233 | static inline | 229 | static inline |
234 | struct net *neigh_parms_net(const struct neigh_parms *parms) | 230 | struct net *neigh_parms_net(const struct neigh_parms *parms) |
235 | { | 231 | { |
236 | return read_pnet(&parms->net); | 232 | return read_pnet(&parms->net); |
237 | } | 233 | } |
238 | 234 | ||
239 | extern unsigned long neigh_rand_reach_time(unsigned long base); | 235 | unsigned long neigh_rand_reach_time(unsigned long base); |
240 | 236 | ||
241 | extern void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p, | 237 | void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p, |
242 | struct sk_buff *skb); | 238 | struct sk_buff *skb); |
243 | extern struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev, int creat); | 239 | struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, struct net *net, |
244 | extern struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl, | 240 | const void *key, struct net_device *dev, |
245 | struct net *net, | 241 | int creat); |
246 | const void *key, | 242 | struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl, struct net *net, |
247 | struct net_device *dev); | 243 | const void *key, struct net_device *dev); |
248 | extern int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev); | 244 | int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key, |
245 | struct net_device *dev); | ||
249 | 246 | ||
250 | static inline | 247 | static inline struct net *pneigh_net(const struct pneigh_entry *pneigh) |
251 | struct net *pneigh_net(const struct pneigh_entry *pneigh) | ||
252 | { | 248 | { |
253 | return read_pnet(&pneigh->net); | 249 | return read_pnet(&pneigh->net); |
254 | } | 250 | } |
255 | 251 | ||
256 | extern void neigh_app_ns(struct neighbour *n); | 252 | void neigh_app_ns(struct neighbour *n); |
257 | extern void neigh_for_each(struct neigh_table *tbl, void (*cb)(struct neighbour *, void *), void *cookie); | 253 | void neigh_for_each(struct neigh_table *tbl, |
258 | extern void __neigh_for_each_release(struct neigh_table *tbl, int (*cb)(struct neighbour *)); | 254 | void (*cb)(struct neighbour *, void *), void *cookie); |
259 | extern void pneigh_for_each(struct neigh_table *tbl, void (*cb)(struct pneigh_entry *)); | 255 | void __neigh_for_each_release(struct neigh_table *tbl, |
256 | int (*cb)(struct neighbour *)); | ||
257 | void pneigh_for_each(struct neigh_table *tbl, | ||
258 | void (*cb)(struct pneigh_entry *)); | ||
260 | 259 | ||
261 | struct neigh_seq_state { | 260 | struct neigh_seq_state { |
262 | struct seq_net_private p; | 261 | struct seq_net_private p; |
@@ -270,15 +269,14 @@ struct neigh_seq_state { | |||
270 | #define NEIGH_SEQ_IS_PNEIGH 0x00000002 | 269 | #define NEIGH_SEQ_IS_PNEIGH 0x00000002 |
271 | #define NEIGH_SEQ_SKIP_NOARP 0x00000004 | 270 | #define NEIGH_SEQ_SKIP_NOARP 0x00000004 |
272 | }; | 271 | }; |
273 | extern void *neigh_seq_start(struct seq_file *, loff_t *, struct neigh_table *, unsigned int); | 272 | void *neigh_seq_start(struct seq_file *, loff_t *, struct neigh_table *, |
274 | extern void *neigh_seq_next(struct seq_file *, void *, loff_t *); | 273 | unsigned int); |
275 | extern void neigh_seq_stop(struct seq_file *, void *); | 274 | void *neigh_seq_next(struct seq_file *, void *, loff_t *); |
276 | 275 | void neigh_seq_stop(struct seq_file *, void *); | |
277 | extern int neigh_sysctl_register(struct net_device *dev, | 276 | |
278 | struct neigh_parms *p, | 277 | int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p, |
279 | char *p_name, | 278 | char *p_name, proc_handler *proc_handler); |
280 | proc_handler *proc_handler); | 279 | void neigh_sysctl_unregister(struct neigh_parms *p); |
281 | extern void neigh_sysctl_unregister(struct neigh_parms *p); | ||
282 | 280 | ||
283 | static inline void __neigh_parms_put(struct neigh_parms *parms) | 281 | static inline void __neigh_parms_put(struct neigh_parms *parms) |
284 | { | 282 | { |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 84e37b1ca9e1..1313456a0994 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -119,7 +119,6 @@ struct net { | |||
119 | struct netns_ipvs *ipvs; | 119 | struct netns_ipvs *ipvs; |
120 | #endif | 120 | #endif |
121 | struct sock *diag_nlsk; | 121 | struct sock *diag_nlsk; |
122 | atomic_t rt_genid; | ||
123 | atomic_t fnhe_genid; | 122 | atomic_t fnhe_genid; |
124 | }; | 123 | }; |
125 | 124 | ||
@@ -333,14 +332,42 @@ static inline void unregister_net_sysctl_table(struct ctl_table_header *header) | |||
333 | } | 332 | } |
334 | #endif | 333 | #endif |
335 | 334 | ||
336 | static inline int rt_genid(struct net *net) | 335 | static inline int rt_genid_ipv4(struct net *net) |
337 | { | 336 | { |
338 | return atomic_read(&net->rt_genid); | 337 | return atomic_read(&net->ipv4.rt_genid); |
339 | } | 338 | } |
340 | 339 | ||
341 | static inline void rt_genid_bump(struct net *net) | 340 | static inline void rt_genid_bump_ipv4(struct net *net) |
342 | { | 341 | { |
343 | atomic_inc(&net->rt_genid); | 342 | atomic_inc(&net->ipv4.rt_genid); |
343 | } | ||
344 | |||
345 | #if IS_ENABLED(CONFIG_IPV6) | ||
346 | static inline int rt_genid_ipv6(struct net *net) | ||
347 | { | ||
348 | return atomic_read(&net->ipv6.rt_genid); | ||
349 | } | ||
350 | |||
351 | static inline void rt_genid_bump_ipv6(struct net *net) | ||
352 | { | ||
353 | atomic_inc(&net->ipv6.rt_genid); | ||
354 | } | ||
355 | #else | ||
356 | static inline int rt_genid_ipv6(struct net *net) | ||
357 | { | ||
358 | return 0; | ||
359 | } | ||
360 | |||
361 | static inline void rt_genid_bump_ipv6(struct net *net) | ||
362 | { | ||
363 | } | ||
364 | #endif | ||
365 | |||
366 | /* For callers who don't really care about whether it's IPv4 or IPv6 */ | ||
367 | static inline void rt_genid_bump_all(struct net *net) | ||
368 | { | ||
369 | rt_genid_bump_ipv4(net); | ||
370 | rt_genid_bump_ipv6(net); | ||
344 | } | 371 | } |
345 | 372 | ||
346 | static inline int fnhe_genid(struct net *net) | 373 | static inline int fnhe_genid(struct net *net) |
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 2ba9de89e8ec..bf2ec2202c56 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
@@ -77,5 +77,6 @@ struct netns_ipv4 { | |||
77 | struct fib_rules_ops *mr_rules_ops; | 77 | struct fib_rules_ops *mr_rules_ops; |
78 | #endif | 78 | #endif |
79 | #endif | 79 | #endif |
80 | atomic_t rt_genid; | ||
80 | }; | 81 | }; |
81 | #endif | 82 | #endif |
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h index 005e2c2e39a9..0fb2401197c5 100644 --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h | |||
@@ -72,6 +72,7 @@ struct netns_ipv6 { | |||
72 | #endif | 72 | #endif |
73 | #endif | 73 | #endif |
74 | atomic_t dev_addr_genid; | 74 | atomic_t dev_addr_genid; |
75 | atomic_t rt_genid; | ||
75 | }; | 76 | }; |
76 | 77 | ||
77 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) | 78 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) |
diff --git a/include/net/netprio_cgroup.h b/include/net/netprio_cgroup.h index 50ab8c26ab59..379dd5db0f2f 100644 --- a/include/net/netprio_cgroup.h +++ b/include/net/netprio_cgroup.h | |||
@@ -29,7 +29,7 @@ struct cgroup_netprio_state { | |||
29 | struct cgroup_subsys_state css; | 29 | struct cgroup_subsys_state css; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | extern void sock_update_netprioidx(struct sock *sk); | 32 | void sock_update_netprioidx(struct sock *sk); |
33 | 33 | ||
34 | #if IS_BUILTIN(CONFIG_NETPRIO_CGROUP) | 34 | #if IS_BUILTIN(CONFIG_NETPRIO_CGROUP) |
35 | 35 | ||
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 13174509cdfd..2ebef77a2f9a 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h | |||
@@ -14,8 +14,8 @@ struct tcf_walker { | |||
14 | int (*fn)(struct tcf_proto *, unsigned long node, struct tcf_walker *); | 14 | int (*fn)(struct tcf_proto *, unsigned long node, struct tcf_walker *); |
15 | }; | 15 | }; |
16 | 16 | ||
17 | extern int register_tcf_proto_ops(struct tcf_proto_ops *ops); | 17 | int register_tcf_proto_ops(struct tcf_proto_ops *ops); |
18 | extern int unregister_tcf_proto_ops(struct tcf_proto_ops *ops); | 18 | int unregister_tcf_proto_ops(struct tcf_proto_ops *ops); |
19 | 19 | ||
20 | static inline unsigned long | 20 | static inline unsigned long |
21 | __cls_set_class(unsigned long *clp, unsigned long cl) | 21 | __cls_set_class(unsigned long *clp, unsigned long cl) |
@@ -126,17 +126,17 @@ tcf_exts_exec(struct sk_buff *skb, struct tcf_exts *exts, | |||
126 | return 0; | 126 | return 0; |
127 | } | 127 | } |
128 | 128 | ||
129 | extern int tcf_exts_validate(struct net *net, struct tcf_proto *tp, | 129 | int tcf_exts_validate(struct net *net, struct tcf_proto *tp, |
130 | struct nlattr **tb, struct nlattr *rate_tlv, | 130 | struct nlattr **tb, struct nlattr *rate_tlv, |
131 | struct tcf_exts *exts, | 131 | struct tcf_exts *exts, |
132 | const struct tcf_ext_map *map); | 132 | const struct tcf_ext_map *map); |
133 | extern void tcf_exts_destroy(struct tcf_proto *tp, struct tcf_exts *exts); | 133 | void tcf_exts_destroy(struct tcf_proto *tp, struct tcf_exts *exts); |
134 | extern void tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst, | 134 | void tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst, |
135 | struct tcf_exts *src); | 135 | struct tcf_exts *src); |
136 | extern int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts, | 136 | int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts, |
137 | const struct tcf_ext_map *map); | 137 | const struct tcf_ext_map *map); |
138 | extern int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts, | 138 | int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts, |
139 | const struct tcf_ext_map *map); | 139 | const struct tcf_ext_map *map); |
140 | 140 | ||
141 | /** | 141 | /** |
142 | * struct tcf_pkt_info - packet information | 142 | * struct tcf_pkt_info - packet information |
@@ -239,14 +239,14 @@ struct tcf_ematch_ops { | |||
239 | struct list_head link; | 239 | struct list_head link; |
240 | }; | 240 | }; |
241 | 241 | ||
242 | extern int tcf_em_register(struct tcf_ematch_ops *); | 242 | int tcf_em_register(struct tcf_ematch_ops *); |
243 | extern void tcf_em_unregister(struct tcf_ematch_ops *); | 243 | void tcf_em_unregister(struct tcf_ematch_ops *); |
244 | extern int tcf_em_tree_validate(struct tcf_proto *, struct nlattr *, | 244 | int tcf_em_tree_validate(struct tcf_proto *, struct nlattr *, |
245 | struct tcf_ematch_tree *); | 245 | struct tcf_ematch_tree *); |
246 | extern void tcf_em_tree_destroy(struct tcf_proto *, struct tcf_ematch_tree *); | 246 | void tcf_em_tree_destroy(struct tcf_proto *, struct tcf_ematch_tree *); |
247 | extern int tcf_em_tree_dump(struct sk_buff *, struct tcf_ematch_tree *, int); | 247 | int tcf_em_tree_dump(struct sk_buff *, struct tcf_ematch_tree *, int); |
248 | extern int __tcf_em_tree_match(struct sk_buff *, struct tcf_ematch_tree *, | 248 | int __tcf_em_tree_match(struct sk_buff *, struct tcf_ematch_tree *, |
249 | struct tcf_pkt_info *); | 249 | struct tcf_pkt_info *); |
250 | 250 | ||
251 | /** | 251 | /** |
252 | * tcf_em_tree_change - replace ematch tree of a running classifier | 252 | * tcf_em_tree_change - replace ematch tree of a running classifier |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 388bf8b6d060..f7c24f8fbdc5 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -64,8 +64,8 @@ struct qdisc_watchdog { | |||
64 | struct Qdisc *qdisc; | 64 | struct Qdisc *qdisc; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | extern void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc); | 67 | void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc); |
68 | extern void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, u64 expires); | 68 | void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, u64 expires); |
69 | 69 | ||
70 | static inline void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, | 70 | static inline void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, |
71 | psched_time_t expires) | 71 | psched_time_t expires) |
@@ -73,31 +73,31 @@ static inline void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, | |||
73 | qdisc_watchdog_schedule_ns(wd, PSCHED_TICKS2NS(expires)); | 73 | qdisc_watchdog_schedule_ns(wd, PSCHED_TICKS2NS(expires)); |
74 | } | 74 | } |
75 | 75 | ||
76 | extern void qdisc_watchdog_cancel(struct qdisc_watchdog *wd); | 76 | void qdisc_watchdog_cancel(struct qdisc_watchdog *wd); |
77 | 77 | ||
78 | extern struct Qdisc_ops pfifo_qdisc_ops; | 78 | extern struct Qdisc_ops pfifo_qdisc_ops; |
79 | extern struct Qdisc_ops bfifo_qdisc_ops; | 79 | extern struct Qdisc_ops bfifo_qdisc_ops; |
80 | extern struct Qdisc_ops pfifo_head_drop_qdisc_ops; | 80 | extern struct Qdisc_ops pfifo_head_drop_qdisc_ops; |
81 | 81 | ||
82 | extern int fifo_set_limit(struct Qdisc *q, unsigned int limit); | 82 | int fifo_set_limit(struct Qdisc *q, unsigned int limit); |
83 | extern struct Qdisc *fifo_create_dflt(struct Qdisc *sch, struct Qdisc_ops *ops, | 83 | struct Qdisc *fifo_create_dflt(struct Qdisc *sch, struct Qdisc_ops *ops, |
84 | unsigned int limit); | 84 | unsigned int limit); |
85 | 85 | ||
86 | extern int register_qdisc(struct Qdisc_ops *qops); | 86 | int register_qdisc(struct Qdisc_ops *qops); |
87 | extern int unregister_qdisc(struct Qdisc_ops *qops); | 87 | int unregister_qdisc(struct Qdisc_ops *qops); |
88 | extern void qdisc_list_del(struct Qdisc *q); | 88 | void qdisc_list_del(struct Qdisc *q); |
89 | extern struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle); | 89 | struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle); |
90 | extern struct Qdisc *qdisc_lookup_class(struct net_device *dev, u32 handle); | 90 | struct Qdisc *qdisc_lookup_class(struct net_device *dev, u32 handle); |
91 | extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, | 91 | struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, |
92 | struct nlattr *tab); | 92 | struct nlattr *tab); |
93 | extern void qdisc_put_rtab(struct qdisc_rate_table *tab); | 93 | void qdisc_put_rtab(struct qdisc_rate_table *tab); |
94 | extern void qdisc_put_stab(struct qdisc_size_table *tab); | 94 | void qdisc_put_stab(struct qdisc_size_table *tab); |
95 | extern void qdisc_warn_nonwc(char *txt, struct Qdisc *qdisc); | 95 | void qdisc_warn_nonwc(char *txt, struct Qdisc *qdisc); |
96 | extern int sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q, | 96 | int sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q, |
97 | struct net_device *dev, struct netdev_queue *txq, | 97 | struct net_device *dev, struct netdev_queue *txq, |
98 | spinlock_t *root_lock); | 98 | spinlock_t *root_lock); |
99 | 99 | ||
100 | extern void __qdisc_run(struct Qdisc *q); | 100 | void __qdisc_run(struct Qdisc *q); |
101 | 101 | ||
102 | static inline void qdisc_run(struct Qdisc *q) | 102 | static inline void qdisc_run(struct Qdisc *q) |
103 | { | 103 | { |
@@ -105,10 +105,10 @@ static inline void qdisc_run(struct Qdisc *q) | |||
105 | __qdisc_run(q); | 105 | __qdisc_run(q); |
106 | } | 106 | } |
107 | 107 | ||
108 | extern int tc_classify_compat(struct sk_buff *skb, const struct tcf_proto *tp, | 108 | int tc_classify_compat(struct sk_buff *skb, const struct tcf_proto *tp, |
109 | struct tcf_result *res); | ||
110 | extern int tc_classify(struct sk_buff *skb, const struct tcf_proto *tp, | ||
111 | struct tcf_result *res); | 109 | struct tcf_result *res); |
110 | int tc_classify(struct sk_buff *skb, const struct tcf_proto *tp, | ||
111 | struct tcf_result *res); | ||
112 | 112 | ||
113 | /* Calculate maximal size of packet seen by hard_start_xmit | 113 | /* Calculate maximal size of packet seen by hard_start_xmit |
114 | routine of this device. | 114 | routine of this device. |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 6eab63363e59..ffc9d883b163 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -350,30 +350,32 @@ qdisc_class_find(const struct Qdisc_class_hash *hash, u32 id) | |||
350 | return NULL; | 350 | return NULL; |
351 | } | 351 | } |
352 | 352 | ||
353 | extern int qdisc_class_hash_init(struct Qdisc_class_hash *); | 353 | int qdisc_class_hash_init(struct Qdisc_class_hash *); |
354 | extern void qdisc_class_hash_insert(struct Qdisc_class_hash *, struct Qdisc_class_common *); | 354 | void qdisc_class_hash_insert(struct Qdisc_class_hash *, |
355 | extern void qdisc_class_hash_remove(struct Qdisc_class_hash *, struct Qdisc_class_common *); | 355 | struct Qdisc_class_common *); |
356 | extern void qdisc_class_hash_grow(struct Qdisc *, struct Qdisc_class_hash *); | 356 | void qdisc_class_hash_remove(struct Qdisc_class_hash *, |
357 | extern void qdisc_class_hash_destroy(struct Qdisc_class_hash *); | 357 | struct Qdisc_class_common *); |
358 | 358 | void qdisc_class_hash_grow(struct Qdisc *, struct Qdisc_class_hash *); | |
359 | extern void dev_init_scheduler(struct net_device *dev); | 359 | void qdisc_class_hash_destroy(struct Qdisc_class_hash *); |
360 | extern void dev_shutdown(struct net_device *dev); | 360 | |
361 | extern void dev_activate(struct net_device *dev); | 361 | void dev_init_scheduler(struct net_device *dev); |
362 | extern void dev_deactivate(struct net_device *dev); | 362 | void dev_shutdown(struct net_device *dev); |
363 | extern void dev_deactivate_many(struct list_head *head); | 363 | void dev_activate(struct net_device *dev); |
364 | extern struct Qdisc *dev_graft_qdisc(struct netdev_queue *dev_queue, | 364 | void dev_deactivate(struct net_device *dev); |
365 | struct Qdisc *qdisc); | 365 | void dev_deactivate_many(struct list_head *head); |
366 | extern void qdisc_reset(struct Qdisc *qdisc); | 366 | struct Qdisc *dev_graft_qdisc(struct netdev_queue *dev_queue, |
367 | extern void qdisc_destroy(struct Qdisc *qdisc); | 367 | struct Qdisc *qdisc); |
368 | extern void qdisc_tree_decrease_qlen(struct Qdisc *qdisc, unsigned int n); | 368 | void qdisc_reset(struct Qdisc *qdisc); |
369 | extern struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue, | 369 | void qdisc_destroy(struct Qdisc *qdisc); |
370 | struct Qdisc_ops *ops); | 370 | void qdisc_tree_decrease_qlen(struct Qdisc *qdisc, unsigned int n); |
371 | extern struct Qdisc *qdisc_create_dflt(struct netdev_queue *dev_queue, | 371 | struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue, |
372 | struct Qdisc_ops *ops, u32 parentid); | 372 | struct Qdisc_ops *ops); |
373 | extern void __qdisc_calculate_pkt_len(struct sk_buff *skb, | 373 | struct Qdisc *qdisc_create_dflt(struct netdev_queue *dev_queue, |
374 | const struct qdisc_size_table *stab); | 374 | struct Qdisc_ops *ops, u32 parentid); |
375 | extern void tcf_destroy(struct tcf_proto *tp); | 375 | void __qdisc_calculate_pkt_len(struct sk_buff *skb, |
376 | extern void tcf_destroy_chain(struct tcf_proto **fl); | 376 | const struct qdisc_size_table *stab); |
377 | void tcf_destroy(struct tcf_proto *tp); | ||
378 | void tcf_destroy_chain(struct tcf_proto **fl); | ||
377 | 379 | ||
378 | /* Reset all TX qdiscs greater then index of a device. */ | 380 | /* Reset all TX qdiscs greater then index of a device. */ |
379 | static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i) | 381 | static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i) |
@@ -692,7 +694,8 @@ static inline u64 psched_l2t_ns(const struct psched_ratecfg *r, | |||
692 | return ((u64)(len + r->overhead) * r->mult) >> r->shift; | 694 | return ((u64)(len + r->overhead) * r->mult) >> r->shift; |
693 | } | 695 | } |
694 | 696 | ||
695 | extern void psched_ratecfg_precompute(struct psched_ratecfg *r, const struct tc_ratespec *conf); | 697 | void psched_ratecfg_precompute(struct psched_ratecfg *r, |
698 | const struct tc_ratespec *conf); | ||
696 | 699 | ||
697 | static inline void psched_ratecfg_getrate(struct tc_ratespec *res, | 700 | static inline void psched_ratecfg_getrate(struct tc_ratespec *res, |
698 | const struct psched_ratecfg *r) | 701 | const struct psched_ratecfg *r) |
diff --git a/include/net/sctp/auth.h b/include/net/sctp/auth.h index 49bc9577c61e..754c511f4cf9 100644 --- a/include/net/sctp/auth.h +++ b/include/net/sctp/auth.h | |||
@@ -22,7 +22,7 @@ | |||
22 | * | 22 | * |
23 | * Please send any bug reports or fixes you make to the | 23 | * Please send any bug reports or fixes you make to the |
24 | * email address(es): | 24 | * email address(es): |
25 | * lksctp developers <lksctp-developers@lists.sourceforge.net> | 25 | * lksctp developers <linux-sctp@vger.kernel.org> |
26 | * | 26 | * |
27 | * Or submit a bug report through the following website: | 27 | * Or submit a bug report through the following website: |
28 | * http://www.sf.net/projects/lksctp | 28 | * http://www.sf.net/projects/lksctp |
diff --git a/include/net/sctp/checksum.h b/include/net/sctp/checksum.h index 0cb08e6fb6df..483e6303458d 100644 --- a/include/net/sctp/checksum.h +++ b/include/net/sctp/checksum.h | |||
@@ -25,7 +25,7 @@ | |||
25 | * | 25 | * |
26 | * Please send any bug reports or fixes you make to the | 26 | * Please send any bug reports or fixes you make to the |
27 | * email address(es): | 27 | * email address(es): |
28 | * lksctp developers <lksctp-developers@lists.sourceforge.net> | 28 | * lksctp developers <linux-sctp@vger.kernel.org> |
29 | * | 29 | * |
30 | * Or submit a bug report through the following website: | 30 | * Or submit a bug report through the following website: |
31 | * http://www.sf.net/projects/lksctp | 31 | * http://www.sf.net/projects/lksctp |
@@ -85,4 +85,19 @@ static inline __le32 sctp_end_cksum(__u32 crc32) | |||
85 | return cpu_to_le32(~crc32); | 85 | return cpu_to_le32(~crc32); |
86 | } | 86 | } |
87 | 87 | ||
88 | /* Calculate the CRC32C checksum of an SCTP packet. */ | ||
89 | static inline __le32 sctp_compute_cksum(const struct sk_buff *skb, | ||
90 | unsigned int offset) | ||
91 | { | ||
92 | const struct sk_buff *iter; | ||
93 | |||
94 | __u32 crc32 = sctp_start_cksum(skb->data + offset, | ||
95 | skb_headlen(skb) - offset); | ||
96 | skb_walk_frags(skb, iter) | ||
97 | crc32 = sctp_update_cksum((__u8 *) iter->data, | ||
98 | skb_headlen(iter), crc32); | ||
99 | |||
100 | return sctp_end_cksum(crc32); | ||
101 | } | ||
102 | |||
88 | #endif /* __sctp_checksum_h__ */ | 103 | #endif /* __sctp_checksum_h__ */ |
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index ca50e0751e47..a1e7aa5c8bbf 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h | |||
@@ -25,7 +25,7 @@ | |||
25 | * | 25 | * |
26 | * Please send any bug reports or fixes you make to the | 26 | * Please send any bug reports or fixes you make to the |
27 | * email address(es): | 27 | * email address(es): |
28 | * lksctp developers <lksctp-developers@lists.sourceforge.net> | 28 | * lksctp developers <linux-sctp@vger.kernel.org> |
29 | * | 29 | * |
30 | * Or submit a bug report through the following website: | 30 | * Or submit a bug report through the following website: |
31 | * http://www.sf.net/projects/lksctp | 31 | * http://www.sf.net/projects/lksctp |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index d8e37ecea691..cb28df9c2781 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * Please send any bug reports or fixes you make to the | 28 | * Please send any bug reports or fixes you make to the |
29 | * email address(es): | 29 | * email address(es): |
30 | * lksctp developers <lksctp-developers@lists.sourceforge.net> | 30 | * lksctp developers <linux-sctp@vger.kernel.org> |
31 | * | 31 | * |
32 | * Or submit a bug report through the following website: | 32 | * Or submit a bug report through the following website: |
33 | * http://www.sf.net/projects/lksctp | 33 | * http://www.sf.net/projects/lksctp |
@@ -613,7 +613,7 @@ static inline void sctp_v4_map_v6(union sctp_addr *addr) | |||
613 | */ | 613 | */ |
614 | static inline struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t) | 614 | static inline struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t) |
615 | { | 615 | { |
616 | if (t->dst && !dst_check(t->dst, 0)) { | 616 | if (t->dst && !dst_check(t->dst, t->dst_cookie)) { |
617 | dst_release(t->dst); | 617 | dst_release(t->dst); |
618 | t->dst = NULL; | 618 | t->dst = NULL; |
619 | } | 619 | } |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 2a82d1384706..2aa66dda4a5a 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * Please send any bug reports or fixes you make to the | 28 | * Please send any bug reports or fixes you make to the |
29 | * email addresses: | 29 | * email addresses: |
30 | * lksctp developers <lksctp-developers@lists.sourceforge.net> | 30 | * lksctp developers <linux-sctp@vger.kernel.org> |
31 | * | 31 | * |
32 | * Or submit a bug report through the following website: | 32 | * Or submit a bug report through the following website: |
33 | * http://www.sf.net/projects/lksctp | 33 | * http://www.sf.net/projects/lksctp |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index e745c92a1532..c0f4e29eedd5 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -25,7 +25,7 @@ | |||
25 | * | 25 | * |
26 | * Please send any bug reports or fixes you make to the | 26 | * Please send any bug reports or fixes you make to the |
27 | * email addresses: | 27 | * email addresses: |
28 | * lksctp developers <lksctp-developers@lists.sourceforge.net> | 28 | * lksctp developers <linux-sctp@vger.kernel.org> |
29 | * | 29 | * |
30 | * Or submit a bug report through the following website: | 30 | * Or submit a bug report through the following website: |
31 | * http://www.sf.net/projects/lksctp | 31 | * http://www.sf.net/projects/lksctp |
@@ -946,6 +946,7 @@ struct sctp_transport { | |||
946 | __u64 hb_nonce; | 946 | __u64 hb_nonce; |
947 | 947 | ||
948 | struct rcu_head rcu; | 948 | struct rcu_head rcu; |
949 | u32 dst_cookie; | ||
949 | }; | 950 | }; |
950 | 951 | ||
951 | struct sctp_transport *sctp_transport_new(struct net *, const union sctp_addr *, | 952 | struct sctp_transport *sctp_transport_new(struct net *, const union sctp_addr *, |
diff --git a/include/net/sctp/tsnmap.h b/include/net/sctp/tsnmap.h index 2c5d2b4d5d1e..c361d6f7e0cb 100644 --- a/include/net/sctp/tsnmap.h +++ b/include/net/sctp/tsnmap.h | |||
@@ -28,7 +28,7 @@ | |||
28 | * | 28 | * |
29 | * Please send any bug reports or fixes you make to the | 29 | * Please send any bug reports or fixes you make to the |
30 | * email address(es): | 30 | * email address(es): |
31 | * lksctp developers <lksctp-developers@lists.sourceforge.net> | 31 | * lksctp developers <linux-sctp@vger.kernel.org> |
32 | * | 32 | * |
33 | * Or submit a bug report through the following website: | 33 | * Or submit a bug report through the following website: |
34 | * http://www.sf.net/projects/lksctp | 34 | * http://www.sf.net/projects/lksctp |
diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h index ca4693b4e09e..34f0d34d22ce 100644 --- a/include/net/sctp/ulpevent.h +++ b/include/net/sctp/ulpevent.h | |||
@@ -31,7 +31,7 @@ | |||
31 | * | 31 | * |
32 | * Please send any bug reports or fixes you make to the | 32 | * Please send any bug reports or fixes you make to the |
33 | * email address(es): | 33 | * email address(es): |
34 | * lksctp developers <lksctp-developers@lists.sourceforge.net> | 34 | * lksctp developers <linux-sctp@vger.kernel.org> |
35 | * | 35 | * |
36 | * Or submit a bug report through the following website: | 36 | * Or submit a bug report through the following website: |
37 | * http://www.sf.net/projects/lksctp | 37 | * http://www.sf.net/projects/lksctp |
diff --git a/include/net/sctp/ulpqueue.h b/include/net/sctp/ulpqueue.h index 00e50ba3f24b..add3237a9fdb 100644 --- a/include/net/sctp/ulpqueue.h +++ b/include/net/sctp/ulpqueue.h | |||
@@ -30,7 +30,7 @@ | |||
30 | * | 30 | * |
31 | * Please send any bug reports or fixes you make to the | 31 | * Please send any bug reports or fixes you make to the |
32 | * email addresses: | 32 | * email addresses: |
33 | * lksctp developers <lksctp-developers@lists.sourceforge.net> | 33 | * lksctp developers <linux-sctp@vger.kernel.org> |
34 | * | 34 | * |
35 | * Or submit a bug report through the following website: | 35 | * Or submit a bug report through the following website: |
36 | * http://www.sf.net/projects/lksctp | 36 | * http://www.sf.net/projects/lksctp |
diff --git a/include/net/sock.h b/include/net/sock.h index 31d5cfbb51ec..ab6a8b75207e 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -746,11 +746,6 @@ static inline int sk_stream_wspace(const struct sock *sk) | |||
746 | 746 | ||
747 | extern void sk_stream_write_space(struct sock *sk); | 747 | extern void sk_stream_write_space(struct sock *sk); |
748 | 748 | ||
749 | static inline bool sk_stream_memory_free(const struct sock *sk) | ||
750 | { | ||
751 | return sk->sk_wmem_queued < sk->sk_sndbuf; | ||
752 | } | ||
753 | |||
754 | /* OOB backlog add */ | 749 | /* OOB backlog add */ |
755 | static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb) | 750 | static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb) |
756 | { | 751 | { |
@@ -950,6 +945,7 @@ struct proto { | |||
950 | unsigned int inuse_idx; | 945 | unsigned int inuse_idx; |
951 | #endif | 946 | #endif |
952 | 947 | ||
948 | bool (*stream_memory_free)(const struct sock *sk); | ||
953 | /* Memory pressure */ | 949 | /* Memory pressure */ |
954 | void (*enter_memory_pressure)(struct sock *sk); | 950 | void (*enter_memory_pressure)(struct sock *sk); |
955 | atomic_long_t *memory_allocated; /* Current allocated memory. */ | 951 | atomic_long_t *memory_allocated; /* Current allocated memory. */ |
@@ -1088,6 +1084,21 @@ static inline struct cg_proto *parent_cg_proto(struct proto *proto, | |||
1088 | } | 1084 | } |
1089 | #endif | 1085 | #endif |
1090 | 1086 | ||
1087 | static inline bool sk_stream_memory_free(const struct sock *sk) | ||
1088 | { | ||
1089 | if (sk->sk_wmem_queued >= sk->sk_sndbuf) | ||
1090 | return false; | ||
1091 | |||
1092 | return sk->sk_prot->stream_memory_free ? | ||
1093 | sk->sk_prot->stream_memory_free(sk) : true; | ||
1094 | } | ||
1095 | |||
1096 | static inline bool sk_stream_is_writeable(const struct sock *sk) | ||
1097 | { | ||
1098 | return sk_stream_wspace(sk) >= sk_stream_min_wspace(sk) && | ||
1099 | sk_stream_memory_free(sk); | ||
1100 | } | ||
1101 | |||
1091 | 1102 | ||
1092 | static inline bool sk_has_memory_pressure(const struct sock *sk) | 1103 | static inline bool sk_has_memory_pressure(const struct sock *sk) |
1093 | { | 1104 | { |
@@ -1509,6 +1520,7 @@ extern struct sk_buff *sock_rmalloc(struct sock *sk, | |||
1509 | unsigned long size, int force, | 1520 | unsigned long size, int force, |
1510 | gfp_t priority); | 1521 | gfp_t priority); |
1511 | extern void sock_wfree(struct sk_buff *skb); | 1522 | extern void sock_wfree(struct sk_buff *skb); |
1523 | extern void skb_orphan_partial(struct sk_buff *skb); | ||
1512 | extern void sock_rfree(struct sk_buff *skb); | 1524 | extern void sock_rfree(struct sk_buff *skb); |
1513 | extern void sock_edemux(struct sk_buff *skb); | 1525 | extern void sock_edemux(struct sk_buff *skb); |
1514 | 1526 | ||
@@ -2249,6 +2261,8 @@ static inline struct sock *skb_steal_sock(struct sk_buff *skb) | |||
2249 | extern void sock_enable_timestamp(struct sock *sk, int flag); | 2261 | extern void sock_enable_timestamp(struct sock *sk, int flag); |
2250 | extern int sock_get_timestamp(struct sock *, struct timeval __user *); | 2262 | extern int sock_get_timestamp(struct sock *, struct timeval __user *); |
2251 | extern int sock_get_timestampns(struct sock *, struct timespec __user *); | 2263 | extern int sock_get_timestampns(struct sock *, struct timespec __user *); |
2264 | extern int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len, | ||
2265 | int level, int type); | ||
2252 | 2266 | ||
2253 | /* | 2267 | /* |
2254 | * Enable debug/info messages | 2268 | * Enable debug/info messages |
diff --git a/include/net/tcp.h b/include/net/tcp.h index d1980054ec75..27b652f379ef 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -192,10 +192,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
192 | #define TCPOLEN_TIMESTAMP 10 | 192 | #define TCPOLEN_TIMESTAMP 10 |
193 | #define TCPOLEN_MD5SIG 18 | 193 | #define TCPOLEN_MD5SIG 18 |
194 | #define TCPOLEN_EXP_FASTOPEN_BASE 4 | 194 | #define TCPOLEN_EXP_FASTOPEN_BASE 4 |
195 | #define TCPOLEN_COOKIE_BASE 2 /* Cookie-less header extension */ | ||
196 | #define TCPOLEN_COOKIE_PAIR 3 /* Cookie pair header extension */ | ||
197 | #define TCPOLEN_COOKIE_MIN (TCPOLEN_COOKIE_BASE+TCP_COOKIE_MIN) | ||
198 | #define TCPOLEN_COOKIE_MAX (TCPOLEN_COOKIE_BASE+TCP_COOKIE_MAX) | ||
199 | 195 | ||
200 | /* But this is what stacks really send out. */ | 196 | /* But this is what stacks really send out. */ |
201 | #define TCPOLEN_TSTAMP_ALIGNED 12 | 197 | #define TCPOLEN_TSTAMP_ALIGNED 12 |
@@ -284,6 +280,7 @@ extern int sysctl_tcp_thin_dupack; | |||
284 | extern int sysctl_tcp_early_retrans; | 280 | extern int sysctl_tcp_early_retrans; |
285 | extern int sysctl_tcp_limit_output_bytes; | 281 | extern int sysctl_tcp_limit_output_bytes; |
286 | extern int sysctl_tcp_challenge_ack_limit; | 282 | extern int sysctl_tcp_challenge_ack_limit; |
283 | extern unsigned int sysctl_tcp_notsent_lowat; | ||
287 | 284 | ||
288 | extern atomic_long_t tcp_memory_allocated; | 285 | extern atomic_long_t tcp_memory_allocated; |
289 | extern struct percpu_counter tcp_sockets_allocated; | 286 | extern struct percpu_counter tcp_sockets_allocated; |
@@ -591,7 +588,6 @@ extern void tcp_initialize_rcv_mss(struct sock *sk); | |||
591 | extern int tcp_mtu_to_mss(struct sock *sk, int pmtu); | 588 | extern int tcp_mtu_to_mss(struct sock *sk, int pmtu); |
592 | extern int tcp_mss_to_mtu(struct sock *sk, int mss); | 589 | extern int tcp_mss_to_mtu(struct sock *sk, int mss); |
593 | extern void tcp_mtup_init(struct sock *sk); | 590 | extern void tcp_mtup_init(struct sock *sk); |
594 | extern void tcp_valid_rtt_meas(struct sock *sk, u32 seq_rtt); | ||
595 | extern void tcp_init_buffer_space(struct sock *sk); | 591 | extern void tcp_init_buffer_space(struct sock *sk); |
596 | 592 | ||
597 | static inline void tcp_bound_rto(const struct sock *sk) | 593 | static inline void tcp_bound_rto(const struct sock *sk) |
@@ -1094,15 +1090,6 @@ static inline void tcp_openreq_init(struct request_sock *req, | |||
1094 | ireq->loc_port = tcp_hdr(skb)->dest; | 1090 | ireq->loc_port = tcp_hdr(skb)->dest; |
1095 | } | 1091 | } |
1096 | 1092 | ||
1097 | /* Compute time elapsed between SYNACK and the ACK completing 3WHS */ | ||
1098 | static inline void tcp_synack_rtt_meas(struct sock *sk, | ||
1099 | struct request_sock *req) | ||
1100 | { | ||
1101 | if (tcp_rsk(req)->snt_synack) | ||
1102 | tcp_valid_rtt_meas(sk, | ||
1103 | tcp_time_stamp - tcp_rsk(req)->snt_synack); | ||
1104 | } | ||
1105 | |||
1106 | extern void tcp_enter_memory_pressure(struct sock *sk); | 1093 | extern void tcp_enter_memory_pressure(struct sock *sk); |
1107 | 1094 | ||
1108 | static inline int keepalive_intvl_when(const struct tcp_sock *tp) | 1095 | static inline int keepalive_intvl_when(const struct tcp_sock *tp) |
@@ -1549,6 +1536,19 @@ extern int tcp_gro_complete(struct sk_buff *skb); | |||
1549 | extern void __tcp_v4_send_check(struct sk_buff *skb, __be32 saddr, | 1536 | extern void __tcp_v4_send_check(struct sk_buff *skb, __be32 saddr, |
1550 | __be32 daddr); | 1537 | __be32 daddr); |
1551 | 1538 | ||
1539 | static inline u32 tcp_notsent_lowat(const struct tcp_sock *tp) | ||
1540 | { | ||
1541 | return tp->notsent_lowat ?: sysctl_tcp_notsent_lowat; | ||
1542 | } | ||
1543 | |||
1544 | static inline bool tcp_stream_memory_free(const struct sock *sk) | ||
1545 | { | ||
1546 | const struct tcp_sock *tp = tcp_sk(sk); | ||
1547 | u32 notsent_bytes = tp->write_seq - tp->snd_nxt; | ||
1548 | |||
1549 | return notsent_bytes < tcp_notsent_lowat(tp); | ||
1550 | } | ||
1551 | |||
1552 | #ifdef CONFIG_PROC_FS | 1552 | #ifdef CONFIG_PROC_FS |
1553 | extern int tcp4_proc_init(void); | 1553 | extern int tcp4_proc_init(void); |
1554 | extern void tcp4_proc_exit(void); | 1554 | extern void tcp4_proc_exit(void); |
diff --git a/include/net/udp.h b/include/net/udp.h index 74c10ec5e74f..ef2e0b7843a0 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -183,6 +183,7 @@ extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
183 | struct msghdr *msg, size_t len); | 183 | struct msghdr *msg, size_t len); |
184 | extern int udp_push_pending_frames(struct sock *sk); | 184 | extern int udp_push_pending_frames(struct sock *sk); |
185 | extern void udp_flush_pending_frames(struct sock *sk); | 185 | extern void udp_flush_pending_frames(struct sock *sk); |
186 | extern void udp4_hwcsum(struct sk_buff *skb, __be32 src, __be32 dst); | ||
186 | extern int udp_rcv(struct sk_buff *skb); | 187 | extern int udp_rcv(struct sk_buff *skb); |
187 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); | 188 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); |
188 | extern int udp_disconnect(struct sock *sk, int flags); | 189 | extern int udp_disconnect(struct sock *sk, int flags); |
diff --git a/include/net/vsock_addr.h b/include/net/vsock_addr.h new file mode 100644 index 000000000000..9ccd5316eac0 --- /dev/null +++ b/include/net/vsock_addr.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * VMware vSockets Driver | ||
3 | * | ||
4 | * Copyright (C) 2007-2013 VMware, Inc. All rights reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the Free | ||
8 | * Software Foundation version 2 and no later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
13 | * more details. | ||
14 | */ | ||
15 | |||
16 | #ifndef _VSOCK_ADDR_H_ | ||
17 | #define _VSOCK_ADDR_H_ | ||
18 | |||
19 | #include <linux/vm_sockets.h> | ||
20 | |||
21 | void vsock_addr_init(struct sockaddr_vm *addr, u32 cid, u32 port); | ||
22 | int vsock_addr_validate(const struct sockaddr_vm *addr); | ||
23 | bool vsock_addr_bound(const struct sockaddr_vm *addr); | ||
24 | void vsock_addr_unbind(struct sockaddr_vm *addr); | ||
25 | bool vsock_addr_equals_addr(const struct sockaddr_vm *addr, | ||
26 | const struct sockaddr_vm *other); | ||
27 | int vsock_addr_cast(const struct sockaddr *addr, size_t len, | ||
28 | struct sockaddr_vm **out_addr); | ||
29 | |||
30 | #endif | ||