aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-31 18:51:00 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-31 18:51:00 -0400
commit0d6caa1795090bd22ede96b84daa4600b63eee37 (patch)
tree7b69aa68f7f812bd1a13b0c5e73573a01e671ef8 /include
parent88c8199b9d2f5ec0a8468a0495ba4c9656846500 (diff)
parent8072f085d79a0a73cc5a0333ffa7f0c5d35f76e0 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (41 commits) [RTNETLINK]: Fix warning for !CONFIG_KMOD [IPV4] ip_options.c: kmalloc + memset conversion to kzalloc [DECNET]: kmalloc + memset conversion to kzalloc [NET]: ethtool_perm_addr only has one implementation [NET]: ethtool ops are the only way [PPPOE]: Improve hashing function in hash_item(). [XFRM]: State selection update to use inner addresses. [IPSEC]: Ensure that state inner family is set [TCP]: Bidir flow must not disregard SACK blocks for lost marking [TCP]: Fix ratehalving with bidirectional flows [PPPOL2TP]: Add CONFIG_INET Kconfig dependency. [NET]: Page offsets and lengths need to be __u32. [AF_UNIX]: Make code static. [NETFILTER]: Make nf_ct_ipv6_skip_exthdr() static. [PKTGEN]: make get_ipsec_sa() static and non-inline [PPPoE]: move lock_sock() in pppoe_sendmsg() to the right location [PPPoX/E]: return ENOTTY on unknown ioctl requests [IPV6]: ipv6_addr_type() doesn't know about RFC4193 addresses. [NET]: Fix prio_tune() handling of root qdisc. [NET]: Fix sch_api to properly set sch->parent on the root. ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/ethtool.h4
-rw-r--r--include/linux/ipv6.h5
-rw-r--r--include/linux/notifier.h13
-rw-r--r--include/linux/skbuff.h4
-rw-r--r--include/net/af_unix.h29
-rw-r--r--include/net/bluetooth/l2cap.h50
-rw-r--r--include/net/ipv6.h1
-rw-r--r--include/net/netfilter/ipv6/nf_conntrack_ipv6.h3
-rw-r--r--include/net/tcp.h2
9 files changed, 46 insertions, 65 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 3a632244f31b..23ccea811297 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -270,8 +270,6 @@ u32 ethtool_op_get_sg(struct net_device *dev);
270int ethtool_op_set_sg(struct net_device *dev, u32 data); 270int ethtool_op_set_sg(struct net_device *dev, u32 data);
271u32 ethtool_op_get_tso(struct net_device *dev); 271u32 ethtool_op_get_tso(struct net_device *dev);
272int ethtool_op_set_tso(struct net_device *dev, u32 data); 272int ethtool_op_set_tso(struct net_device *dev, u32 data);
273int ethtool_op_get_perm_addr(struct net_device *dev,
274 struct ethtool_perm_addr *addr, u8 *data);
275u32 ethtool_op_get_ufo(struct net_device *dev); 273u32 ethtool_op_get_ufo(struct net_device *dev);
276int ethtool_op_set_ufo(struct net_device *dev, u32 data); 274int ethtool_op_set_ufo(struct net_device *dev, u32 data);
277 275
@@ -309,7 +307,6 @@ int ethtool_op_set_ufo(struct net_device *dev, u32 data);
309 * get_strings: Return a set of strings that describe the requested objects 307 * get_strings: Return a set of strings that describe the requested objects
310 * phys_id: Identify the device 308 * phys_id: Identify the device
311 * get_stats: Return statistics about the device 309 * get_stats: Return statistics about the device
312 * get_perm_addr: Gets the permanent hardware address
313 * 310 *
314 * Description: 311 * Description:
315 * 312 *
@@ -368,7 +365,6 @@ struct ethtool_ops {
368 int (*phys_id)(struct net_device *, u32); 365 int (*phys_id)(struct net_device *, u32);
369 int (*get_stats_count)(struct net_device *); 366 int (*get_stats_count)(struct net_device *);
370 void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); 367 void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *);
371 int (*get_perm_addr)(struct net_device *, struct ethtool_perm_addr *, u8 *);
372 int (*begin)(struct net_device *); 368 int (*begin)(struct net_device *);
373 void (*complete)(struct net_device *); 369 void (*complete)(struct net_device *);
374 u32 (*get_ufo)(struct net_device *); 370 u32 (*get_ufo)(struct net_device *);
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 97983dc9df13..4ca60c3320fb 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -219,7 +219,6 @@ enum {
219#include <linux/tcp.h> 219#include <linux/tcp.h>
220#include <linux/udp.h> 220#include <linux/udp.h>
221 221
222#include <net/if_inet6.h> /* struct ipv6_mc_socklist */
223#include <net/inet_sock.h> 222#include <net/inet_sock.h>
224 223
225static inline struct ipv6hdr *ipv6_hdr(const struct sk_buff *skb) 224static inline struct ipv6hdr *ipv6_hdr(const struct sk_buff *skb)
@@ -273,6 +272,10 @@ struct tcp6_request_sock {
273 struct inet6_request_sock tcp6rsk_inet6; 272 struct inet6_request_sock tcp6rsk_inet6;
274}; 273};
275 274
275struct ipv6_mc_socklist;
276struct ipv6_ac_socklist;
277struct ipv6_fl_socklist;
278
276/** 279/**
277 * struct ipv6_pinfo - ipv6 private area 280 * struct ipv6_pinfo - ipv6 private area
278 * 281 *
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index be3f2bb6fcf3..fad7ff17e468 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -157,6 +157,19 @@ extern int __srcu_notifier_call_chain(struct srcu_notifier_head *nh,
157 */ 157 */
158#define NOTIFY_STOP (NOTIFY_OK|NOTIFY_STOP_MASK) 158#define NOTIFY_STOP (NOTIFY_OK|NOTIFY_STOP_MASK)
159 159
160/* Encapsulate (negative) errno value (in particular, NOTIFY_BAD <=> EPERM). */
161static inline int notifier_from_errno(int err)
162{
163 return NOTIFY_STOP_MASK | (NOTIFY_OK - err);
164}
165
166/* Restore (negative) errno value from notify return value. */
167static inline int notifier_to_errno(int ret)
168{
169 ret &= ~NOTIFY_STOP_MASK;
170 return ret > NOTIFY_OK ? NOTIFY_OK - ret : 0;
171}
172
160/* 173/*
161 * Declared notifiers so far. I can imagine quite a few more chains 174 * Declared notifiers so far. I can imagine quite a few more chains
162 * over time (eg laptop power reset chains, reboot chain (to clean 175 * over time (eg laptop power reset chains, reboot chain (to clean
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index ce256438e619..93c27f71122a 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -134,8 +134,8 @@ typedef struct skb_frag_struct skb_frag_t;
134 134
135struct skb_frag_struct { 135struct skb_frag_struct {
136 struct page *page; 136 struct page *page;
137 __u16 page_offset; 137 __u32 page_offset;
138 __u16 size; 138 __u32 size;
139}; 139};
140 140
141/* This data is invariant across clones and lives at 141/* This data is invariant across clones and lives at
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
index 6de1e9e35c73..0864a775de24 100644
--- a/include/net/af_unix.h
+++ b/include/net/af_unix.h
@@ -12,37 +12,8 @@ extern void unix_gc(void);
12 12
13#define UNIX_HASH_SIZE 256 13#define UNIX_HASH_SIZE 256
14 14
15extern struct hlist_head unix_socket_table[UNIX_HASH_SIZE + 1];
16extern spinlock_t unix_table_lock;
17
18extern atomic_t unix_tot_inflight; 15extern atomic_t unix_tot_inflight;
19 16
20static inline struct sock *first_unix_socket(int *i)
21{
22 for (*i = 0; *i <= UNIX_HASH_SIZE; (*i)++) {
23 if (!hlist_empty(&unix_socket_table[*i]))
24 return __sk_head(&unix_socket_table[*i]);
25 }
26 return NULL;
27}
28
29static inline struct sock *next_unix_socket(int *i, struct sock *s)
30{
31 struct sock *next = sk_next(s);
32 /* More in this chain? */
33 if (next)
34 return next;
35 /* Look for next non-empty chain. */
36 for ((*i)++; *i <= UNIX_HASH_SIZE; (*i)++) {
37 if (!hlist_empty(&unix_socket_table[*i]))
38 return __sk_head(&unix_socket_table[*i]);
39 }
40 return NULL;
41}
42
43#define forall_unix_sockets(i, s) \
44 for (s = first_unix_socket(&(i)); s; s = next_unix_socket(&(i),(s)))
45
46struct unix_address { 17struct unix_address {
47 atomic_t refcnt; 18 atomic_t refcnt;
48 int len; 19 int len;
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 87df4e87622d..70e70f5d3dd6 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -34,7 +34,7 @@
34/* L2CAP socket address */ 34/* L2CAP socket address */
35struct sockaddr_l2 { 35struct sockaddr_l2 {
36 sa_family_t l2_family; 36 sa_family_t l2_family;
37 unsigned short l2_psm; 37 __le16 l2_psm;
38 bdaddr_t l2_bdaddr; 38 bdaddr_t l2_bdaddr;
39}; 39};
40 40
@@ -76,32 +76,32 @@ struct l2cap_conninfo {
76 76
77/* L2CAP structures */ 77/* L2CAP structures */
78struct l2cap_hdr { 78struct l2cap_hdr {
79 __u16 len; 79 __le16 len;
80 __u16 cid; 80 __le16 cid;
81} __attribute__ ((packed)); 81} __attribute__ ((packed));
82#define L2CAP_HDR_SIZE 4 82#define L2CAP_HDR_SIZE 4
83 83
84struct l2cap_cmd_hdr { 84struct l2cap_cmd_hdr {
85 __u8 code; 85 __u8 code;
86 __u8 ident; 86 __u8 ident;
87 __u16 len; 87 __le16 len;
88} __attribute__ ((packed)); 88} __attribute__ ((packed));
89#define L2CAP_CMD_HDR_SIZE 4 89#define L2CAP_CMD_HDR_SIZE 4
90 90
91struct l2cap_cmd_rej { 91struct l2cap_cmd_rej {
92 __u16 reason; 92 __le16 reason;
93} __attribute__ ((packed)); 93} __attribute__ ((packed));
94 94
95struct l2cap_conn_req { 95struct l2cap_conn_req {
96 __u16 psm; 96 __le16 psm;
97 __u16 scid; 97 __le16 scid;
98} __attribute__ ((packed)); 98} __attribute__ ((packed));
99 99
100struct l2cap_conn_rsp { 100struct l2cap_conn_rsp {
101 __u16 dcid; 101 __le16 dcid;
102 __u16 scid; 102 __le16 scid;
103 __u16 result; 103 __le16 result;
104 __u16 status; 104 __le16 status;
105} __attribute__ ((packed)); 105} __attribute__ ((packed));
106 106
107/* connect result */ 107/* connect result */
@@ -117,15 +117,15 @@ struct l2cap_conn_rsp {
117#define L2CAP_CS_AUTHOR_PEND 0x0002 117#define L2CAP_CS_AUTHOR_PEND 0x0002
118 118
119struct l2cap_conf_req { 119struct l2cap_conf_req {
120 __u16 dcid; 120 __le16 dcid;
121 __u16 flags; 121 __le16 flags;
122 __u8 data[0]; 122 __u8 data[0];
123} __attribute__ ((packed)); 123} __attribute__ ((packed));
124 124
125struct l2cap_conf_rsp { 125struct l2cap_conf_rsp {
126 __u16 scid; 126 __le16 scid;
127 __u16 flags; 127 __le16 flags;
128 __u16 result; 128 __le16 result;
129 __u8 data[0]; 129 __u8 data[0];
130} __attribute__ ((packed)); 130} __attribute__ ((packed));
131 131
@@ -149,23 +149,23 @@ struct l2cap_conf_opt {
149#define L2CAP_CONF_MAX_SIZE 22 149#define L2CAP_CONF_MAX_SIZE 22
150 150
151struct l2cap_disconn_req { 151struct l2cap_disconn_req {
152 __u16 dcid; 152 __le16 dcid;
153 __u16 scid; 153 __le16 scid;
154} __attribute__ ((packed)); 154} __attribute__ ((packed));
155 155
156struct l2cap_disconn_rsp { 156struct l2cap_disconn_rsp {
157 __u16 dcid; 157 __le16 dcid;
158 __u16 scid; 158 __le16 scid;
159} __attribute__ ((packed)); 159} __attribute__ ((packed));
160 160
161struct l2cap_info_req { 161struct l2cap_info_req {
162 __u16 type; 162 __le16 type;
163 __u8 data[0]; 163 __u8 data[0];
164} __attribute__ ((packed)); 164} __attribute__ ((packed));
165 165
166struct l2cap_info_rsp { 166struct l2cap_info_rsp {
167 __u16 type; 167 __le16 type;
168 __u16 result; 168 __le16 result;
169 __u8 data[0]; 169 __u8 data[0];
170} __attribute__ ((packed)); 170} __attribute__ ((packed));
171 171
@@ -207,7 +207,7 @@ struct l2cap_conn {
207 207
208struct l2cap_pinfo { 208struct l2cap_pinfo {
209 struct bt_sock bt; 209 struct bt_sock bt;
210 __u16 psm; 210 __le16 psm;
211 __u16 dcid; 211 __u16 dcid;
212 __u16 scid; 212 __u16 scid;
213 213
@@ -225,7 +225,7 @@ struct l2cap_pinfo {
225 225
226 __u8 ident; 226 __u8 ident;
227 227
228 __u16 sport; 228 __le16 sport;
229 229
230 struct l2cap_conn *conn; 230 struct l2cap_conn *conn;
231 struct sock *next_c; 231 struct sock *next_c;
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 46b9dce82f6e..9059e0ed7fe3 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -17,6 +17,7 @@
17 17
18#include <linux/ipv6.h> 18#include <linux/ipv6.h>
19#include <linux/hardirq.h> 19#include <linux/hardirq.h>
20#include <net/if_inet6.h>
20#include <net/ndisc.h> 21#include <net/ndisc.h>
21#include <net/flow.h> 22#include <net/flow.h>
22#include <net/snmp.h> 23#include <net/snmp.h>
diff --git a/include/net/netfilter/ipv6/nf_conntrack_ipv6.h b/include/net/netfilter/ipv6/nf_conntrack_ipv6.h
index 5a8965904377..070d12cb4634 100644
--- a/include/net/netfilter/ipv6/nf_conntrack_ipv6.h
+++ b/include/net/netfilter/ipv6/nf_conntrack_ipv6.h
@@ -7,9 +7,6 @@ extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6;
7extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6; 7extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6;
8extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6; 8extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6;
9 9
10extern int nf_ct_ipv6_skip_exthdr(const struct sk_buff *skb, int start,
11 u8 *nexthdrp, int len);
12
13extern int nf_ct_frag6_init(void); 10extern int nf_ct_frag6_init(void);
14extern void nf_ct_frag6_cleanup(void); 11extern void nf_ct_frag6_cleanup(void);
15extern struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb); 12extern struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb);
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 8b404b1ef7c8..c209361ab74a 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -660,7 +660,7 @@ struct tcp_congestion_ops {
660 /* new value of cwnd after loss (optional) */ 660 /* new value of cwnd after loss (optional) */
661 u32 (*undo_cwnd)(struct sock *sk); 661 u32 (*undo_cwnd)(struct sock *sk);
662 /* hook for packet ack accounting (optional) */ 662 /* hook for packet ack accounting (optional) */
663 void (*pkts_acked)(struct sock *sk, u32 num_acked, ktime_t last); 663 void (*pkts_acked)(struct sock *sk, u32 num_acked, s32 rtt_us);
664 /* get info for inet_diag (optional) */ 664 /* get info for inet_diag (optional) */
665 void (*get_info)(struct sock *sk, u32 ext, struct sk_buff *skb); 665 void (*get_info)(struct sock *sk, u32 ext, struct sk_buff *skb);
666 666