aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/dccp.h12
-rw-r--r--include/linux/netdevice.h2
-rw-r--r--include/net/inet_hashtables.h6
-rw-r--r--include/net/inet_sock.h7
-rw-r--r--include/net/irda/ircomm_tty.h1
-rw-r--r--include/net/sch_generic.h15
-rw-r--r--include/net/sctp/auth.h1
-rw-r--r--include/net/sctp/sctp.h1
8 files changed, 29 insertions, 16 deletions
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
index f3fc4392e93d..333c3ea82a5d 100644
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -144,6 +144,8 @@ enum dccp_reset_codes {
144 DCCP_RESET_CODE_TOO_BUSY, 144 DCCP_RESET_CODE_TOO_BUSY,
145 DCCP_RESET_CODE_BAD_INIT_COOKIE, 145 DCCP_RESET_CODE_BAD_INIT_COOKIE,
146 DCCP_RESET_CODE_AGGRESSION_PENALTY, 146 DCCP_RESET_CODE_AGGRESSION_PENALTY,
147
148 DCCP_MAX_RESET_CODES /* Leave at the end! */
147}; 149};
148 150
149/* DCCP options */ 151/* DCCP options */
@@ -270,10 +272,9 @@ static inline struct dccp_hdr *dccp_zeroed_hdr(struct sk_buff *skb, int headlen)
270 return memset(skb_transport_header(skb), 0, headlen); 272 return memset(skb_transport_header(skb), 0, headlen);
271} 273}
272 274
273static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb) 275static inline struct dccp_hdr_ext *dccp_hdrx(const struct dccp_hdr *dh)
274{ 276{
275 return (struct dccp_hdr_ext *)(skb_transport_header(skb) + 277 return (struct dccp_hdr_ext *)((unsigned char *)dh + sizeof(*dh));
276 sizeof(struct dccp_hdr));
277} 278}
278 279
279static inline unsigned int __dccp_basic_hdr_len(const struct dccp_hdr *dh) 280static inline unsigned int __dccp_basic_hdr_len(const struct dccp_hdr *dh)
@@ -287,13 +288,12 @@ static inline unsigned int dccp_basic_hdr_len(const struct sk_buff *skb)
287 return __dccp_basic_hdr_len(dh); 288 return __dccp_basic_hdr_len(dh);
288} 289}
289 290
290static inline __u64 dccp_hdr_seq(const struct sk_buff *skb) 291static inline __u64 dccp_hdr_seq(const struct dccp_hdr *dh)
291{ 292{
292 const struct dccp_hdr *dh = dccp_hdr(skb);
293 __u64 seq_nr = ntohs(dh->dccph_seq); 293 __u64 seq_nr = ntohs(dh->dccph_seq);
294 294
295 if (dh->dccph_x != 0) 295 if (dh->dccph_x != 0)
296 seq_nr = (seq_nr << 32) + ntohl(dccp_hdrx(skb)->dccph_seq_low); 296 seq_nr = (seq_nr << 32) + ntohl(dccp_hdrx(dh)->dccph_seq_low);
297 else 297 else
298 seq_nr += (u32)dh->dccph_seq2 << 16; 298 seq_nr += (u32)dh->dccph_seq2 << 16;
299 299
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 811024e311bd..9b0c8f12373e 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -390,7 +390,7 @@ static inline void napi_complete(struct napi_struct *n)
390static inline void napi_disable(struct napi_struct *n) 390static inline void napi_disable(struct napi_struct *n)
391{ 391{
392 while (test_and_set_bit(NAPI_STATE_SCHED, &n->state)) 392 while (test_and_set_bit(NAPI_STATE_SCHED, &n->state))
393 msleep_interruptible(1); 393 msleep(1);
394} 394}
395 395
396/** 396/**
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index 8228b57eb18f..4427dcd1e53a 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -26,7 +26,6 @@
26 26
27#include <net/inet_connection_sock.h> 27#include <net/inet_connection_sock.h>
28#include <net/inet_sock.h> 28#include <net/inet_sock.h>
29#include <net/route.h>
30#include <net/sock.h> 29#include <net/sock.h>
31#include <net/tcp_states.h> 30#include <net/tcp_states.h>
32 31
@@ -266,11 +265,6 @@ out:
266 wake_up(&hashinfo->lhash_wait); 265 wake_up(&hashinfo->lhash_wait);
267} 266}
268 267
269static inline int inet_iif(const struct sk_buff *skb)
270{
271 return ((struct rtable *)skb->dst)->rt_iif;
272}
273
274extern struct sock *__inet_lookup_listener(struct inet_hashinfo *hashinfo, 268extern struct sock *__inet_lookup_listener(struct inet_hashinfo *hashinfo,
275 const __be32 daddr, 269 const __be32 daddr,
276 const unsigned short hnum, 270 const unsigned short hnum,
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index 62daf214931f..70013c5f4e59 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -24,6 +24,7 @@
24#include <net/flow.h> 24#include <net/flow.h>
25#include <net/sock.h> 25#include <net/sock.h>
26#include <net/request_sock.h> 26#include <net/request_sock.h>
27#include <net/route.h>
27 28
28/** struct ip_options - IP Options 29/** struct ip_options - IP Options
29 * 30 *
@@ -190,4 +191,10 @@ static inline int inet_sk_ehashfn(const struct sock *sk)
190 return inet_ehashfn(laddr, lport, faddr, fport); 191 return inet_ehashfn(laddr, lport, faddr, fport);
191} 192}
192 193
194
195static inline int inet_iif(const struct sk_buff *skb)
196{
197 return ((struct rtable *)skb->dst)->rt_iif;
198}
199
193#endif /* _INET_SOCK_H */ 200#endif /* _INET_SOCK_H */
diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h
index 8dabdd603fe1..eea2e6152389 100644
--- a/include/net/irda/ircomm_tty.h
+++ b/include/net/irda/ircomm_tty.h
@@ -127,7 +127,6 @@ extern int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file,
127 unsigned int cmd, unsigned long arg); 127 unsigned int cmd, unsigned long arg);
128extern void ircomm_tty_set_termios(struct tty_struct *tty, 128extern void ircomm_tty_set_termios(struct tty_struct *tty,
129 struct ktermios *old_termios); 129 struct ktermios *old_termios);
130extern hashbin_t *ircomm_tty;
131 130
132#endif 131#endif
133 132
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index a02ec9e5fea5..c9265518a378 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -316,4 +316,19 @@ static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen)
316 return rtab->data[slot]; 316 return rtab->data[slot];
317} 317}
318 318
319#ifdef CONFIG_NET_CLS_ACT
320static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask)
321{
322 struct sk_buff *n = skb_clone(skb, gfp_mask);
323
324 if (n) {
325 n->tc_verd = SET_TC_VERD(n->tc_verd, 0);
326 n->tc_verd = CLR_TC_OK2MUNGE(n->tc_verd);
327 n->tc_verd = CLR_TC_MUNGED(n->tc_verd);
328 n->iif = skb->iif;
329 }
330 return n;
331}
332#endif
333
319#endif 334#endif
diff --git a/include/net/sctp/auth.h b/include/net/sctp/auth.h
index 4945954a16af..9e8f13b7da5a 100644
--- a/include/net/sctp/auth.h
+++ b/include/net/sctp/auth.h
@@ -88,7 +88,6 @@ static inline void sctp_auth_key_hold(struct sctp_auth_bytes *key)
88 88
89void sctp_auth_key_put(struct sctp_auth_bytes *key); 89void sctp_auth_key_put(struct sctp_auth_bytes *key);
90struct sctp_shared_key *sctp_auth_shkey_create(__u16 key_id, gfp_t gfp); 90struct sctp_shared_key *sctp_auth_shkey_create(__u16 key_id, gfp_t gfp);
91void sctp_auth_shkey_free(struct sctp_shared_key *sh_key);
92void sctp_auth_destroy_keys(struct list_head *keys); 91void sctp_auth_destroy_keys(struct list_head *keys);
93int sctp_auth_asoc_init_active_key(struct sctp_association *asoc, gfp_t gfp); 92int sctp_auth_asoc_init_active_key(struct sctp_association *asoc, gfp_t gfp);
94struct sctp_shared_key *sctp_auth_get_shkey( 93struct sctp_shared_key *sctp_auth_get_shkey(
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 119f5a1ed499..93eb708609e7 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -156,7 +156,6 @@ int sctp_primitive_ASCONF(struct sctp_association *, void *arg);
156__u32 sctp_start_cksum(__u8 *ptr, __u16 count); 156__u32 sctp_start_cksum(__u8 *ptr, __u16 count);
157__u32 sctp_update_cksum(__u8 *ptr, __u16 count, __u32 cksum); 157__u32 sctp_update_cksum(__u8 *ptr, __u16 count, __u32 cksum);
158__u32 sctp_end_cksum(__u32 cksum); 158__u32 sctp_end_cksum(__u32 cksum);
159__u32 sctp_update_copy_cksum(__u8 *, __u8 *, __u16 count, __u32 cksum);
160 159
161/* 160/*
162 * sctp/input.c 161 * sctp/input.c