diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/9p/9p.h | 240 | ||||
-rw-r--r-- | include/net/9p/client.h | 35 | ||||
-rw-r--r-- | include/net/9p/transport.h | 44 | ||||
-rw-r--r-- | include/net/addrconf.h | 22 | ||||
-rw-r--r-- | include/net/genetlink.h | 4 | ||||
-rw-r--r-- | include/net/inet_sock.h | 10 | ||||
-rw-r--r-- | include/net/ip.h | 2 | ||||
-rw-r--r-- | include/net/ipv6.h | 6 | ||||
-rw-r--r-- | include/net/irda/discovery.h | 3 | ||||
-rw-r--r-- | include/net/mac80211.h | 34 | ||||
-rw-r--r-- | include/net/ndisc.h | 4 | ||||
-rw-r--r-- | include/net/net_namespace.h | 11 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_extend.h | 1 | ||||
-rw-r--r-- | include/net/netlink.h | 31 | ||||
-rw-r--r-- | include/net/request_sock.h | 4 | ||||
-rw-r--r-- | include/net/sch_generic.h | 2 | ||||
-rw-r--r-- | include/net/sctp/structs.h | 17 | ||||
-rw-r--r-- | include/net/syncppp.h | 2 | ||||
-rw-r--r-- | include/net/tcp.h | 2 | ||||
-rw-r--r-- | include/net/transp_v6.h | 3 | ||||
-rw-r--r-- | include/net/udp.h | 1 | ||||
-rw-r--r-- | include/net/xfrm.h | 48 |
22 files changed, 453 insertions, 73 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 585eb4496990..b3d3e27c6299 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -29,14 +29,31 @@ | |||
29 | 29 | ||
30 | #ifdef CONFIG_NET_9P_DEBUG | 30 | #ifdef CONFIG_NET_9P_DEBUG |
31 | 31 | ||
32 | #define P9_DEBUG_ERROR (1<<0) | 32 | /** |
33 | #define P9_DEBUG_9P (1<<2) | 33 | * enum p9_debug_flags - bits for mount time debug parameter |
34 | #define P9_DEBUG_VFS (1<<3) | 34 | * @P9_DEBUG_ERROR: more verbose error messages including original error string |
35 | #define P9_DEBUG_CONV (1<<4) | 35 | * @P9_DEBUG_9P: 9P protocol tracing |
36 | #define P9_DEBUG_MUX (1<<5) | 36 | * @P9_DEBUG_VFS: VFS API tracing |
37 | #define P9_DEBUG_TRANS (1<<6) | 37 | * @P9_DEBUG_CONV: protocol conversion tracing |
38 | #define P9_DEBUG_SLABS (1<<7) | 38 | * @P9_DEBUG_MUX: trace management of concurrent transactions |
39 | #define P9_DEBUG_FCALL (1<<8) | 39 | * @P9_DEBUG_TRANS: transport tracing |
40 | * @P9_DEBUG_SLABS: memory management tracing | ||
41 | * @P9_DEBUG_FCALL: verbose dump of protocol messages | ||
42 | * | ||
43 | * These flags are passed at mount time to turn on various levels of | ||
44 | * verbosity and tracing which will be output to the system logs. | ||
45 | */ | ||
46 | |||
47 | enum p9_debug_flags { | ||
48 | P9_DEBUG_ERROR = (1<<0), | ||
49 | P9_DEBUG_9P = (1<<2), | ||
50 | P9_DEBUG_VFS = (1<<3), | ||
51 | P9_DEBUG_CONV = (1<<4), | ||
52 | P9_DEBUG_MUX = (1<<5), | ||
53 | P9_DEBUG_TRANS = (1<<6), | ||
54 | P9_DEBUG_SLABS = (1<<7), | ||
55 | P9_DEBUG_FCALL = (1<<8), | ||
56 | }; | ||
40 | 57 | ||
41 | extern unsigned int p9_debug_level; | 58 | extern unsigned int p9_debug_level; |
42 | 59 | ||
@@ -62,9 +79,47 @@ do { \ | |||
62 | format , __FUNCTION__, task_pid_nr(current), ## arg); \ | 79 | format , __FUNCTION__, task_pid_nr(current), ## arg); \ |
63 | } while (0) | 80 | } while (0) |
64 | 81 | ||
82 | /** | ||
83 | * enum p9_msg_t - 9P message types | ||
84 | * @P9_TVERSION: version handshake request | ||
85 | * @P9_RVERSION: version handshake response | ||
86 | * @P9_TAUTH: request to establish authentication channel | ||
87 | * @P9_RAUTH: response with authentication information | ||
88 | * @P9_TATTACH: establish user access to file service | ||
89 | * @P9_RATTACH: response with top level handle to file hierarchy | ||
90 | * @P9_TERROR: not used | ||
91 | * @P9_RERROR: response for any failed request | ||
92 | * @P9_TFLUSH: request to abort a previous request | ||
93 | * @P9_RFLUSH: response when previous request has been cancelled | ||
94 | * @P9_TWALK: descend a directory hierarchy | ||
95 | * @P9_RWALK: response with new handle for position within hierarchy | ||
96 | * @P9_TOPEN: prepare a handle for I/O on an existing file | ||
97 | * @P9_ROPEN: response with file access information | ||
98 | * @P9_TCREATE: prepare a handle for I/O on a new file | ||
99 | * @P9_RCREATE: response with file access information | ||
100 | * @P9_TREAD: request to transfer data from a file or directory | ||
101 | * @P9_RREAD: response with data requested | ||
102 | * @P9_TWRITE: reuqest to transfer data to a file | ||
103 | * @P9_RWRITE: response with out much data was transfered to file | ||
104 | * @P9_TCLUNK: forget about a handle to an entity within the file system | ||
105 | * @P9_RCLUNK: response when server has forgotten about the handle | ||
106 | * @P9_TREMOVE: request to remove an entity from the hierarchy | ||
107 | * @P9_RREMOVE: response when server has removed the entity | ||
108 | * @P9_TSTAT: request file entity attributes | ||
109 | * @P9_RSTAT: response with file entity attributes | ||
110 | * @P9_TWSTAT: request to update file entity attributes | ||
111 | * @P9_RWSTAT: response when file entity attributes are updated | ||
112 | * | ||
113 | * There are 14 basic operations in 9P2000, paired as | ||
114 | * requests and responses. The one special case is ERROR | ||
115 | * as there is no @P9_TERROR request for clients to transmit to | ||
116 | * the server, but the server may respond to any other request | ||
117 | * with an @P9_RERROR. | ||
118 | * | ||
119 | * See Also: http://plan9.bell-labs.com/sys/man/5/INDEX.html | ||
120 | */ | ||
65 | 121 | ||
66 | /* Message Types */ | 122 | enum p9_msg_t { |
67 | enum { | ||
68 | P9_TVERSION = 100, | 123 | P9_TVERSION = 100, |
69 | P9_RVERSION, | 124 | P9_RVERSION, |
70 | P9_TAUTH = 102, | 125 | P9_TAUTH = 102, |
@@ -95,30 +150,71 @@ enum { | |||
95 | P9_RWSTAT, | 150 | P9_RWSTAT, |
96 | }; | 151 | }; |
97 | 152 | ||
98 | /* open modes */ | 153 | /** |
99 | enum { | 154 | * enum p9_open_mode_t - 9P open modes |
155 | * @P9_OREAD: open file for reading only | ||
156 | * @P9_OWRITE: open file for writing only | ||
157 | * @P9_ORDWR: open file for reading or writing | ||
158 | * @P9_OEXEC: open file for execution | ||
159 | * @P9_OTRUNC: truncate file to zero-length before opening it | ||
160 | * @P9_OREXEC: close the file when an exec(2) system call is made | ||
161 | * @P9_ORCLOSE: remove the file when the file is closed | ||
162 | * @P9_OAPPEND: open the file and seek to the end | ||
163 | * @P9_OEXCL: only create a file, do not open it | ||
164 | * | ||
165 | * 9P open modes differ slightly from Posix standard modes. | ||
166 | * In particular, there are extra modes which specify different | ||
167 | * semantic behaviors than may be available on standard Posix | ||
168 | * systems. For example, @P9_OREXEC and @P9_ORCLOSE are modes that | ||
169 | * most likely will not be issued from the Linux VFS client, but may | ||
170 | * be supported by servers. | ||
171 | * | ||
172 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/open | ||
173 | */ | ||
174 | |||
175 | enum p9_open_mode_t { | ||
100 | P9_OREAD = 0x00, | 176 | P9_OREAD = 0x00, |
101 | P9_OWRITE = 0x01, | 177 | P9_OWRITE = 0x01, |
102 | P9_ORDWR = 0x02, | 178 | P9_ORDWR = 0x02, |
103 | P9_OEXEC = 0x03, | 179 | P9_OEXEC = 0x03, |
104 | P9_OEXCL = 0x04, | ||
105 | P9_OTRUNC = 0x10, | 180 | P9_OTRUNC = 0x10, |
106 | P9_OREXEC = 0x20, | 181 | P9_OREXEC = 0x20, |
107 | P9_ORCLOSE = 0x40, | 182 | P9_ORCLOSE = 0x40, |
108 | P9_OAPPEND = 0x80, | 183 | P9_OAPPEND = 0x80, |
109 | }; | 184 | P9_OEXCL = 0x1000, |
110 | 185 | }; | |
111 | /* permissions */ | 186 | |
112 | enum { | 187 | /** |
188 | * enum p9_perm_t - 9P permissions | ||
189 | * @P9_DMDIR: mode bite for directories | ||
190 | * @P9_DMAPPEND: mode bit for is append-only | ||
191 | * @P9_DMEXCL: mode bit for excluse use (only one open handle allowed) | ||
192 | * @P9_DMMOUNT: mode bite for mount points | ||
193 | * @P9_DMAUTH: mode bit for authentication file | ||
194 | * @P9_DMTMP: mode bit for non-backed-up files | ||
195 | * @P9_DMSYMLINK: mode bit for symbolic links (9P2000.u) | ||
196 | * @P9_DMLINK: mode bit for hard-link (9P2000.u) | ||
197 | * @P9_DMDEVICE: mode bit for device files (9P2000.u) | ||
198 | * @P9_DMNAMEDPIPE: mode bit for named pipe (9P2000.u) | ||
199 | * @P9_DMSOCKET: mode bit for socket (9P2000.u) | ||
200 | * @P9_DMSETUID: mode bit for setuid (9P2000.u) | ||
201 | * @P9_DMSETGID: mode bit for setgid (9P2000.u) | ||
202 | * @P9_DMSETVTX: mode bit for sticky bit (9P2000.u) | ||
203 | * | ||
204 | * 9P permissions differ slightly from Posix standard modes. | ||
205 | * | ||
206 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat | ||
207 | */ | ||
208 | enum p9_perm_t { | ||
113 | P9_DMDIR = 0x80000000, | 209 | P9_DMDIR = 0x80000000, |
114 | P9_DMAPPEND = 0x40000000, | 210 | P9_DMAPPEND = 0x40000000, |
115 | P9_DMEXCL = 0x20000000, | 211 | P9_DMEXCL = 0x20000000, |
116 | P9_DMMOUNT = 0x10000000, | 212 | P9_DMMOUNT = 0x10000000, |
117 | P9_DMAUTH = 0x08000000, | 213 | P9_DMAUTH = 0x08000000, |
118 | P9_DMTMP = 0x04000000, | 214 | P9_DMTMP = 0x04000000, |
215 | /* 9P2000.u extensions */ | ||
119 | P9_DMSYMLINK = 0x02000000, | 216 | P9_DMSYMLINK = 0x02000000, |
120 | P9_DMLINK = 0x01000000, | 217 | P9_DMLINK = 0x01000000, |
121 | /* 9P2000.u extensions */ | ||
122 | P9_DMDEVICE = 0x00800000, | 218 | P9_DMDEVICE = 0x00800000, |
123 | P9_DMNAMEDPIPE = 0x00200000, | 219 | P9_DMNAMEDPIPE = 0x00200000, |
124 | P9_DMSOCKET = 0x00100000, | 220 | P9_DMSOCKET = 0x00100000, |
@@ -127,8 +223,26 @@ enum { | |||
127 | P9_DMSETVTX = 0x00010000, | 223 | P9_DMSETVTX = 0x00010000, |
128 | }; | 224 | }; |
129 | 225 | ||
130 | /* qid.types */ | 226 | /** |
131 | enum { | 227 | * enum p9_qid_t - QID types |
228 | * @P9_QTDIR: directory | ||
229 | * @P9_QTAPPEND: append-only | ||
230 | * @P9_QTEXCL: excluse use (only one open handle allowed) | ||
231 | * @P9_QTMOUNT: mount points | ||
232 | * @P9_QTAUTH: authentication file | ||
233 | * @P9_QTTMP: non-backed-up files | ||
234 | * @P9_QTSYMLINK: symbolic links (9P2000.u) | ||
235 | * @P9_QTLINK: hard-link (9P2000.u) | ||
236 | * @P9_QTFILE: normal files | ||
237 | * | ||
238 | * QID types are a subset of permissions - they are primarily | ||
239 | * used to differentiate semantics for a file system entity via | ||
240 | * a jump-table. Their value is also the most signifigant 16 bits | ||
241 | * of the permission_t | ||
242 | * | ||
243 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat | ||
244 | */ | ||
245 | enum p9_qid_t { | ||
132 | P9_QTDIR = 0x80, | 246 | P9_QTDIR = 0x80, |
133 | P9_QTAPPEND = 0x40, | 247 | P9_QTAPPEND = 0x40, |
134 | P9_QTEXCL = 0x20, | 248 | P9_QTEXCL = 0x20, |
@@ -140,6 +254,7 @@ enum { | |||
140 | P9_QTFILE = 0x00, | 254 | P9_QTFILE = 0x00, |
141 | }; | 255 | }; |
142 | 256 | ||
257 | /* 9P Magic Numbers */ | ||
143 | #define P9_NOTAG (u16)(~0) | 258 | #define P9_NOTAG (u16)(~0) |
144 | #define P9_NOFID (u32)(~0) | 259 | #define P9_NOFID (u32)(~0) |
145 | #define P9_MAXWELEM 16 | 260 | #define P9_MAXWELEM 16 |
@@ -147,19 +262,69 @@ enum { | |||
147 | /* ample room for Twrite/Rread header */ | 262 | /* ample room for Twrite/Rread header */ |
148 | #define P9_IOHDRSZ 24 | 263 | #define P9_IOHDRSZ 24 |
149 | 264 | ||
265 | /** | ||
266 | * struct p9_str - length prefixed string type | ||
267 | * @len: length of the string | ||
268 | * @str: the string | ||
269 | * | ||
270 | * The protocol uses length prefixed strings for all | ||
271 | * string data, so we replicate that for our internal | ||
272 | * string members. | ||
273 | */ | ||
274 | |||
150 | struct p9_str { | 275 | struct p9_str { |
151 | u16 len; | 276 | u16 len; |
152 | char *str; | 277 | char *str; |
153 | }; | 278 | }; |
154 | 279 | ||
155 | /* qids are the unique ID for a file (like an inode */ | 280 | /** |
281 | * struct p9_qid - file system entity information | ||
282 | * @type: 8-bit type &p9_qid_t | ||
283 | * @version: 16-bit monotonically incrementing version number | ||
284 | * @path: 64-bit per-server-unique ID for a file system element | ||
285 | * | ||
286 | * qids are identifiers used by 9P servers to track file system | ||
287 | * entities. The type is used to differentiate semantics for operations | ||
288 | * on the entity (ie. read means something different on a directory than | ||
289 | * on a file). The path provides a server unique index for an entity | ||
290 | * (roughly analogous to an inode number), while the version is updated | ||
291 | * every time a file is modified and can be used to maintain cache | ||
292 | * coherency between clients and serves. | ||
293 | * Servers will often differentiate purely synthetic entities by setting | ||
294 | * their version to 0, signaling that they should never be cached and | ||
295 | * should be accessed synchronously. | ||
296 | * | ||
297 | * See Also://plan9.bell-labs.com/magic/man2html/2/stat | ||
298 | */ | ||
299 | |||
156 | struct p9_qid { | 300 | struct p9_qid { |
157 | u8 type; | 301 | u8 type; |
158 | u32 version; | 302 | u32 version; |
159 | u64 path; | 303 | u64 path; |
160 | }; | 304 | }; |
161 | 305 | ||
162 | /* Plan 9 file metadata (stat) structure */ | 306 | /** |
307 | * struct p9_stat - file system metadata information | ||
308 | * @size: length prefix for this stat structure instance | ||
309 | * @type: the type of the server (equivilent to a major number) | ||
310 | * @dev: the sub-type of the server (equivilent to a minor number) | ||
311 | * @qid: unique id from the server of type &p9_qid | ||
312 | * @mode: Plan 9 format permissions of type &p9_perm_t | ||
313 | * @atime: Last access/read time | ||
314 | * @mtime: Last modify/write time | ||
315 | * @length: file length | ||
316 | * @name: last element of path (aka filename) in type &p9_str | ||
317 | * @uid: owner name in type &p9_str | ||
318 | * @gid: group owner in type &p9_str | ||
319 | * @muid: last modifier in type &p9_str | ||
320 | * @extension: area used to encode extended UNIX support in type &p9_str | ||
321 | * @n_uid: numeric user id of owner (part of 9p2000.u extension) | ||
322 | * @n_gid: numeric group id (part of 9p2000.u extension) | ||
323 | * @n_muid: numeric user id of laster modifier (part of 9p2000.u extension) | ||
324 | * | ||
325 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat | ||
326 | */ | ||
327 | |||
163 | struct p9_stat { | 328 | struct p9_stat { |
164 | u16 size; | 329 | u16 size; |
165 | u16 type; | 330 | u16 type; |
@@ -179,10 +344,14 @@ struct p9_stat { | |||
179 | u32 n_muid; /* 9p2000.u extensions */ | 344 | u32 n_muid; /* 9p2000.u extensions */ |
180 | }; | 345 | }; |
181 | 346 | ||
182 | /* file metadata (stat) structure used to create Twstat message | 347 | /* |
183 | The is similar to p9_stat, but the strings don't point to | 348 | * file metadata (stat) structure used to create Twstat message |
184 | the same memory block and should be freed separately | 349 | * The is identical to &p9_stat, but the strings don't point to |
185 | */ | 350 | * the same memory block and should be freed separately |
351 | * | ||
352 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat | ||
353 | */ | ||
354 | |||
186 | struct p9_wstat { | 355 | struct p9_wstat { |
187 | u16 size; | 356 | u16 size; |
188 | u16 type; | 357 | u16 type; |
@@ -335,10 +504,20 @@ struct p9_twstat { | |||
335 | struct p9_rwstat { | 504 | struct p9_rwstat { |
336 | }; | 505 | }; |
337 | 506 | ||
338 | /* | 507 | /** |
339 | * fcall is the primary packet structure | 508 | * struct p9_fcall - primary packet structure |
340 | * | 509 | * @size: prefixed length of the structure |
341 | */ | 510 | * @id: protocol operating identifier of type &p9_msg_t |
511 | * @tag: transaction id of the request | ||
512 | * @sdata: payload | ||
513 | * @params: per-operation parameters | ||
514 | * | ||
515 | * &p9_fcall represents the structure for all 9P RPC | ||
516 | * transactions. Requests are packaged into fcalls, and reponses | ||
517 | * must be extracted from them. | ||
518 | * | ||
519 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/fcall | ||
520 | */ | ||
342 | 521 | ||
343 | struct p9_fcall { | 522 | struct p9_fcall { |
344 | u32 size; | 523 | u32 size; |
@@ -416,4 +595,5 @@ int p9_idpool_check(int id, struct p9_idpool *p); | |||
416 | 595 | ||
417 | int p9_error_init(void); | 596 | int p9_error_init(void); |
418 | int p9_errstr2errno(char *, int); | 597 | int p9_errstr2errno(char *, int); |
598 | int p9_trans_fd_init(void); | ||
419 | #endif /* NET_9P_H */ | 599 | #endif /* NET_9P_H */ |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index e52f93d9ac5f..c936dd14de41 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -26,6 +26,23 @@ | |||
26 | #ifndef NET_9P_CLIENT_H | 26 | #ifndef NET_9P_CLIENT_H |
27 | #define NET_9P_CLIENT_H | 27 | #define NET_9P_CLIENT_H |
28 | 28 | ||
29 | /** | ||
30 | * struct p9_client - per client instance state | ||
31 | * @lock: protect @fidlist | ||
32 | * @msize: maximum data size negotiated by protocol | ||
33 | * @dotu: extension flags negotiated by protocol | ||
34 | * @trans_mod: module API instantiated with this client | ||
35 | * @trans: tranport instance state and API | ||
36 | * @conn: connection state information used by trans_fd | ||
37 | * @fidpool: fid handle accounting for session | ||
38 | * @fidlist: List of active fid handles | ||
39 | * | ||
40 | * The client structure is used to keep track of various per-client | ||
41 | * state that has been instantiated. | ||
42 | * | ||
43 | * Bugs: duplicated data and potentially unnecessary elements. | ||
44 | */ | ||
45 | |||
29 | struct p9_client { | 46 | struct p9_client { |
30 | spinlock_t lock; /* protect client structure */ | 47 | spinlock_t lock; /* protect client structure */ |
31 | int msize; | 48 | int msize; |
@@ -38,6 +55,24 @@ struct p9_client { | |||
38 | struct list_head fidlist; | 55 | struct list_head fidlist; |
39 | }; | 56 | }; |
40 | 57 | ||
58 | /** | ||
59 | * struct p9_fid - file system entity handle | ||
60 | * @clnt: back pointer to instantiating &p9_client | ||
61 | * @fid: numeric identifier for this handle | ||
62 | * @mode: current mode of this fid (enum?) | ||
63 | * @qid: the &p9_qid server identifier this handle points to | ||
64 | * @iounit: the server reported maximum transaction size for this file | ||
65 | * @uid: the numeric uid of the local user who owns this handle | ||
66 | * @aux: transport specific information (unused?) | ||
67 | * @rdir_fpos: tracks offset of file position when reading directory contents | ||
68 | * @rdir_pos: (unused?) | ||
69 | * @rdir_fcall: holds response of last directory read request | ||
70 | * @flist: per-client-instance fid tracking | ||
71 | * @dlist: per-dentry fid tracking | ||
72 | * | ||
73 | * TODO: This needs lots of explanation. | ||
74 | */ | ||
75 | |||
41 | struct p9_fid { | 76 | struct p9_fid { |
42 | struct p9_client *clnt; | 77 | struct p9_client *clnt; |
43 | u32 fid; | 78 | u32 fid; |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index d2209ae9d18b..0db3a4038dc0 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
@@ -26,12 +26,40 @@ | |||
26 | #ifndef NET_9P_TRANSPORT_H | 26 | #ifndef NET_9P_TRANSPORT_H |
27 | #define NET_9P_TRANSPORT_H | 27 | #define NET_9P_TRANSPORT_H |
28 | 28 | ||
29 | /** | ||
30 | * enum p9_trans_status - different states of underlying transports | ||
31 | * @Connected: transport is connected and healthy | ||
32 | * @Disconnected: transport has been disconnected | ||
33 | * @Hung: transport is connected by wedged | ||
34 | * | ||
35 | * This enumeration details the various states a transport | ||
36 | * instatiation can be in. | ||
37 | */ | ||
38 | |||
29 | enum p9_trans_status { | 39 | enum p9_trans_status { |
30 | Connected, | 40 | Connected, |
31 | Disconnected, | 41 | Disconnected, |
32 | Hung, | 42 | Hung, |
33 | }; | 43 | }; |
34 | 44 | ||
45 | /** | ||
46 | * struct p9_trans - per-transport state and API | ||
47 | * @status: transport &p9_trans_status | ||
48 | * @msize: negotiated maximum packet size (duplicate from client) | ||
49 | * @extended: negotiated protocol extensions (duplicate from client) | ||
50 | * @priv: transport private data | ||
51 | * @close: member function to disconnect and close the transport | ||
52 | * @rpc: member function to issue a request to the transport | ||
53 | * | ||
54 | * This is the basic API for a transport instance. It is used as | ||
55 | * a handle by the client to issue requests. This interface is currently | ||
56 | * in flux during reorganization. | ||
57 | * | ||
58 | * Bugs: there is lots of duplicated data here and its not clear that | ||
59 | * the member functions need to be per-instance versus per transport | ||
60 | * module. | ||
61 | */ | ||
62 | |||
35 | struct p9_trans { | 63 | struct p9_trans { |
36 | enum p9_trans_status status; | 64 | enum p9_trans_status status; |
37 | int msize; | 65 | int msize; |
@@ -42,6 +70,21 @@ struct p9_trans { | |||
42 | struct p9_fcall **rc); | 70 | struct p9_fcall **rc); |
43 | }; | 71 | }; |
44 | 72 | ||
73 | /** | ||
74 | * struct p9_trans_module - transport module interface | ||
75 | * @list: used to maintain a list of currently available transports | ||
76 | * @name: the human-readable name of the transport | ||
77 | * @maxsize: transport provided maximum packet size | ||
78 | * @def: set if this transport should be considered the default | ||
79 | * @create: member function to create a new connection on this transport | ||
80 | * | ||
81 | * This is the basic API for a transport module which is registered by the | ||
82 | * transport module with the 9P core network module and used by the client | ||
83 | * to instantiate a new connection on a transport. | ||
84 | * | ||
85 | * Bugs: the transport module list isn't protected. | ||
86 | */ | ||
87 | |||
45 | struct p9_trans_module { | 88 | struct p9_trans_module { |
46 | struct list_head list; | 89 | struct list_head list; |
47 | char *name; /* name of transport */ | 90 | char *name; /* name of transport */ |
@@ -53,5 +96,4 @@ struct p9_trans_module { | |||
53 | void v9fs_register_trans(struct p9_trans_module *m); | 96 | void v9fs_register_trans(struct p9_trans_module *m); |
54 | struct p9_trans_module *v9fs_match_trans(const substring_t *name); | 97 | struct p9_trans_module *v9fs_match_trans(const substring_t *name); |
55 | struct p9_trans_module *v9fs_default_trans(void); | 98 | struct p9_trans_module *v9fs_default_trans(void); |
56 | |||
57 | #endif /* NET_9P_TRANSPORT_H */ | 99 | #endif /* NET_9P_TRANSPORT_H */ |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 0a2f0372df31..bbd3d583c6e6 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -94,6 +94,28 @@ extern void addrconf_join_solict(struct net_device *dev, | |||
94 | extern void addrconf_leave_solict(struct inet6_dev *idev, | 94 | extern void addrconf_leave_solict(struct inet6_dev *idev, |
95 | struct in6_addr *addr); | 95 | struct in6_addr *addr); |
96 | 96 | ||
97 | static inline unsigned long addrconf_timeout_fixup(u32 timeout, | ||
98 | unsigned unit) | ||
99 | { | ||
100 | if (timeout == 0xffffffff) | ||
101 | return ~0UL; | ||
102 | |||
103 | /* | ||
104 | * Avoid arithmetic overflow. | ||
105 | * Assuming unit is constant and non-zero, this "if" statement | ||
106 | * will go away on 64bit archs. | ||
107 | */ | ||
108 | if (0xfffffffe > LONG_MAX / unit && timeout > LONG_MAX / unit) | ||
109 | return LONG_MAX / unit; | ||
110 | |||
111 | return timeout; | ||
112 | } | ||
113 | |||
114 | static inline int addrconf_finite_timeout(unsigned long timeout) | ||
115 | { | ||
116 | return ~timeout; | ||
117 | } | ||
118 | |||
97 | /* | 119 | /* |
98 | * IPv6 Address Label subsystem (addrlabel.c) | 120 | * IPv6 Address Label subsystem (addrlabel.c) |
99 | */ | 121 | */ |
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index decdda546829..747c255d1df0 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
@@ -162,9 +162,9 @@ static inline int genlmsg_end(struct sk_buff *skb, void *hdr) | |||
162 | * @skb: socket buffer the message is stored in | 162 | * @skb: socket buffer the message is stored in |
163 | * @hdr: generic netlink message header | 163 | * @hdr: generic netlink message header |
164 | */ | 164 | */ |
165 | static inline int genlmsg_cancel(struct sk_buff *skb, void *hdr) | 165 | static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr) |
166 | { | 166 | { |
167 | return nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); | 167 | nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); |
168 | } | 168 | } |
169 | 169 | ||
170 | /** | 170 | /** |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index a42cd63d241a..9fabe5b38912 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -197,4 +197,14 @@ static inline int inet_iif(const struct sk_buff *skb) | |||
197 | return skb->rtable->rt_iif; | 197 | return skb->rtable->rt_iif; |
198 | } | 198 | } |
199 | 199 | ||
200 | static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops) | ||
201 | { | ||
202 | struct request_sock *req = reqsk_alloc(ops); | ||
203 | |||
204 | if (req != NULL) | ||
205 | inet_rsk(req)->opt = NULL; | ||
206 | |||
207 | return req; | ||
208 | } | ||
209 | |||
200 | #endif /* _INET_SOCK_H */ | 210 | #endif /* _INET_SOCK_H */ |
diff --git a/include/net/ip.h b/include/net/ip.h index 6d7bcd5e62d4..3b40bc2234be 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -210,7 +210,7 @@ int ip_dont_fragment(struct sock *sk, struct dst_entry *dst) | |||
210 | { | 210 | { |
211 | return (inet_sk(sk)->pmtudisc == IP_PMTUDISC_DO || | 211 | return (inet_sk(sk)->pmtudisc == IP_PMTUDISC_DO || |
212 | (inet_sk(sk)->pmtudisc == IP_PMTUDISC_WANT && | 212 | (inet_sk(sk)->pmtudisc == IP_PMTUDISC_WANT && |
213 | !(dst_metric(dst, RTAX_LOCK)&(1<<RTAX_MTU)))); | 213 | !(dst_metric_locked(dst, RTAX_MTU)))); |
214 | } | 214 | } |
215 | 215 | ||
216 | extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more); | 216 | extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more); |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index e0a612bc9c4e..f422f7218e1c 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -367,6 +367,12 @@ static inline int ipv6_addr_any(const struct in6_addr *a) | |||
367 | a->s6_addr32[2] | a->s6_addr32[3] ) == 0); | 367 | a->s6_addr32[2] | a->s6_addr32[3] ) == 0); |
368 | } | 368 | } |
369 | 369 | ||
370 | static inline int ipv6_addr_loopback(const struct in6_addr *a) | ||
371 | { | ||
372 | return ((a->s6_addr32[0] | a->s6_addr32[1] | | ||
373 | a->s6_addr32[2] | (a->s6_addr32[3] ^ htonl(1))) == 0); | ||
374 | } | ||
375 | |||
370 | static inline int ipv6_addr_v4mapped(const struct in6_addr *a) | 376 | static inline int ipv6_addr_v4mapped(const struct in6_addr *a) |
371 | { | 377 | { |
372 | return ((a->s6_addr32[0] | a->s6_addr32[1] | | 378 | return ((a->s6_addr32[0] | a->s6_addr32[1] | |
diff --git a/include/net/irda/discovery.h b/include/net/irda/discovery.h index e4efad1f9eff..0ce93398720d 100644 --- a/include/net/irda/discovery.h +++ b/include/net/irda/discovery.h | |||
@@ -57,9 +57,6 @@ typedef union { | |||
57 | __u8 byte[2]; | 57 | __u8 byte[2]; |
58 | } __u16_host_order; | 58 | } __u16_host_order; |
59 | 59 | ||
60 | /* Same purpose, different application */ | ||
61 | #define u16ho(array) (* ((__u16 *) array)) | ||
62 | |||
63 | /* Types of discovery */ | 60 | /* Types of discovery */ |
64 | typedef enum { | 61 | typedef enum { |
65 | DISCOVERY_LOG, /* What's in our discovery log */ | 62 | DISCOVERY_LOG, /* What's in our discovery log */ |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 4a80d74975e8..bcd1623245cb 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -595,6 +595,15 @@ enum ieee80211_key_alg { | |||
595 | ALG_CCMP, | 595 | ALG_CCMP, |
596 | }; | 596 | }; |
597 | 597 | ||
598 | /** | ||
599 | * enum ieee80211_key_len - key length | ||
600 | * @WEP40: WEP 5 byte long key | ||
601 | * @WEP104: WEP 13 byte long key | ||
602 | */ | ||
603 | enum ieee80211_key_len { | ||
604 | LEN_WEP40 = 5, | ||
605 | LEN_WEP104 = 13, | ||
606 | }; | ||
598 | 607 | ||
599 | /** | 608 | /** |
600 | * enum ieee80211_key_flags - key flags | 609 | * enum ieee80211_key_flags - key flags |
@@ -1594,13 +1603,16 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw); | |||
1594 | void ieee80211_scan_completed(struct ieee80211_hw *hw); | 1603 | void ieee80211_scan_completed(struct ieee80211_hw *hw); |
1595 | 1604 | ||
1596 | /** | 1605 | /** |
1597 | * ieee80211_iterate_active_interfaces - iterate active interfaces | 1606 | * ieee80211_iterate_active_interfaces- iterate active interfaces |
1598 | * | 1607 | * |
1599 | * This function iterates over the interfaces associated with a given | 1608 | * This function iterates over the interfaces associated with a given |
1600 | * hardware that are currently active and calls the callback for them. | 1609 | * hardware that are currently active and calls the callback for them. |
1610 | * This function allows the iterator function to sleep, when the iterator | ||
1611 | * function is atomic @ieee80211_iterate_active_interfaces_atomic can | ||
1612 | * be used. | ||
1601 | * | 1613 | * |
1602 | * @hw: the hardware struct of which the interfaces should be iterated over | 1614 | * @hw: the hardware struct of which the interfaces should be iterated over |
1603 | * @iterator: the iterator function to call, cannot sleep | 1615 | * @iterator: the iterator function to call |
1604 | * @data: first argument of the iterator function | 1616 | * @data: first argument of the iterator function |
1605 | */ | 1617 | */ |
1606 | void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, | 1618 | void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, |
@@ -1609,6 +1621,24 @@ void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, | |||
1609 | void *data); | 1621 | void *data); |
1610 | 1622 | ||
1611 | /** | 1623 | /** |
1624 | * ieee80211_iterate_active_interfaces_atomic - iterate active interfaces | ||
1625 | * | ||
1626 | * This function iterates over the interfaces associated with a given | ||
1627 | * hardware that are currently active and calls the callback for them. | ||
1628 | * This function requires the iterator callback function to be atomic, | ||
1629 | * if that is not desired, use @ieee80211_iterate_active_interfaces instead. | ||
1630 | * | ||
1631 | * @hw: the hardware struct of which the interfaces should be iterated over | ||
1632 | * @iterator: the iterator function to call, cannot sleep | ||
1633 | * @data: first argument of the iterator function | ||
1634 | */ | ||
1635 | void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw, | ||
1636 | void (*iterator)(void *data, | ||
1637 | u8 *mac, | ||
1638 | struct ieee80211_vif *vif), | ||
1639 | void *data); | ||
1640 | |||
1641 | /** | ||
1612 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. | 1642 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. |
1613 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 1643 | * @hw: pointer as obtained from ieee80211_alloc_hw(). |
1614 | * @ra: receiver address of the BA session recipient | 1644 | * @ra: receiver address of the BA session recipient |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 9c451ff2f4f4..a01b7c4dc763 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h | |||
@@ -129,6 +129,10 @@ extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, | |||
129 | void __user *buffer, | 129 | void __user *buffer, |
130 | size_t *lenp, | 130 | size_t *lenp, |
131 | loff_t *ppos); | 131 | loff_t *ppos); |
132 | int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, | ||
133 | int nlen, void __user *oldval, | ||
134 | size_t __user *oldlenp, | ||
135 | void __user *newval, size_t newlen); | ||
132 | #endif | 136 | #endif |
133 | 137 | ||
134 | extern void inet6_ifinfo_notify(int event, | 138 | extern void inet6_ifinfo_notify(int event, |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index aa540e6be502..d9dd0f707296 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -95,6 +95,11 @@ extern struct list_head net_namespace_list; | |||
95 | #ifdef CONFIG_NET_NS | 95 | #ifdef CONFIG_NET_NS |
96 | extern void __put_net(struct net *net); | 96 | extern void __put_net(struct net *net); |
97 | 97 | ||
98 | static inline int net_alive(struct net *net) | ||
99 | { | ||
100 | return net && atomic_read(&net->count); | ||
101 | } | ||
102 | |||
98 | static inline struct net *get_net(struct net *net) | 103 | static inline struct net *get_net(struct net *net) |
99 | { | 104 | { |
100 | atomic_inc(&net->count); | 105 | atomic_inc(&net->count); |
@@ -125,6 +130,12 @@ int net_eq(const struct net *net1, const struct net *net2) | |||
125 | return net1 == net2; | 130 | return net1 == net2; |
126 | } | 131 | } |
127 | #else | 132 | #else |
133 | |||
134 | static inline int net_alive(struct net *net) | ||
135 | { | ||
136 | return 1; | ||
137 | } | ||
138 | |||
128 | static inline struct net *get_net(struct net *net) | 139 | static inline struct net *get_net(struct net *net) |
129 | { | 140 | { |
130 | return net; | 141 | return net; |
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h index f736e842977f..f80c0ed6d870 100644 --- a/include/net/netfilter/nf_conntrack_extend.h +++ b/include/net/netfilter/nf_conntrack_extend.h | |||
@@ -15,6 +15,7 @@ enum nf_ct_ext_id | |||
15 | 15 | ||
16 | /* Extensions: optional stuff which isn't permanently in struct. */ | 16 | /* Extensions: optional stuff which isn't permanently in struct. */ |
17 | struct nf_ct_ext { | 17 | struct nf_ct_ext { |
18 | struct rcu_head rcu; | ||
18 | u8 offset[NF_CT_EXT_NUM]; | 19 | u8 offset[NF_CT_EXT_NUM]; |
19 | u8 len; | 20 | u8 len; |
20 | char data[0]; | 21 | char data[0]; |
diff --git a/include/net/netlink.h b/include/net/netlink.h index a5506c42f03c..dfc3701dfcc3 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -556,14 +556,12 @@ static inline void *nlmsg_get_pos(struct sk_buff *skb) | |||
556 | * @skb: socket buffer the message is stored in | 556 | * @skb: socket buffer the message is stored in |
557 | * @mark: mark to trim to | 557 | * @mark: mark to trim to |
558 | * | 558 | * |
559 | * Trims the message to the provided mark. Returns -1. | 559 | * Trims the message to the provided mark. |
560 | */ | 560 | */ |
561 | static inline int nlmsg_trim(struct sk_buff *skb, const void *mark) | 561 | static inline void nlmsg_trim(struct sk_buff *skb, const void *mark) |
562 | { | 562 | { |
563 | if (mark) | 563 | if (mark) |
564 | skb_trim(skb, (unsigned char *) mark - skb->data); | 564 | skb_trim(skb, (unsigned char *) mark - skb->data); |
565 | |||
566 | return -1; | ||
567 | } | 565 | } |
568 | 566 | ||
569 | /** | 567 | /** |
@@ -572,11 +570,11 @@ static inline int nlmsg_trim(struct sk_buff *skb, const void *mark) | |||
572 | * @nlh: netlink message header | 570 | * @nlh: netlink message header |
573 | * | 571 | * |
574 | * Removes the complete netlink message including all | 572 | * Removes the complete netlink message including all |
575 | * attributes from the socket buffer again. Returns -1. | 573 | * attributes from the socket buffer again. |
576 | */ | 574 | */ |
577 | static inline int nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh) | 575 | static inline void nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh) |
578 | { | 576 | { |
579 | return nlmsg_trim(skb, nlh); | 577 | nlmsg_trim(skb, nlh); |
580 | } | 578 | } |
581 | 579 | ||
582 | /** | 580 | /** |
@@ -772,12 +770,13 @@ static inline int __nla_parse_nested_compat(struct nlattr *tb[], int maxtype, | |||
772 | const struct nla_policy *policy, | 770 | const struct nla_policy *policy, |
773 | int len) | 771 | int len) |
774 | { | 772 | { |
775 | if (nla_len(nla) < len) | 773 | int nested_len = nla_len(nla) - NLA_ALIGN(len); |
776 | return -1; | 774 | |
777 | if (nla_len(nla) >= NLA_ALIGN(len) + sizeof(struct nlattr)) | 775 | if (nested_len < 0) |
778 | return nla_parse_nested(tb, maxtype, | 776 | return -EINVAL; |
779 | nla_data(nla) + NLA_ALIGN(len), | 777 | if (nested_len >= nla_attr_size(0)) |
780 | policy); | 778 | return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len), |
779 | nested_len, policy); | ||
781 | memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); | 780 | memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); |
782 | return 0; | 781 | return 0; |
783 | } | 782 | } |
@@ -1079,11 +1078,11 @@ static inline int nla_nest_compat_end(struct sk_buff *skb, struct nlattr *start) | |||
1079 | * @start: container attribute | 1078 | * @start: container attribute |
1080 | * | 1079 | * |
1081 | * Removes the container attribute and including all nested | 1080 | * Removes the container attribute and including all nested |
1082 | * attributes. Returns -1. | 1081 | * attributes. Returns -EMSGSIZE |
1083 | */ | 1082 | */ |
1084 | static inline int nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) | 1083 | static inline void nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) |
1085 | { | 1084 | { |
1086 | return nlmsg_trim(skb, start); | 1085 | nlmsg_trim(skb, start); |
1087 | } | 1086 | } |
1088 | 1087 | ||
1089 | /** | 1088 | /** |
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index b220b5f624de..0c96e7bed5db 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -115,8 +115,8 @@ struct request_sock_queue { | |||
115 | struct request_sock *rskq_accept_head; | 115 | struct request_sock *rskq_accept_head; |
116 | struct request_sock *rskq_accept_tail; | 116 | struct request_sock *rskq_accept_tail; |
117 | rwlock_t syn_wait_lock; | 117 | rwlock_t syn_wait_lock; |
118 | u16 rskq_defer_accept; | 118 | u8 rskq_defer_accept; |
119 | /* 2 bytes hole, try to pack */ | 119 | /* 3 bytes hole, try to pack */ |
120 | struct listen_sock *listen_opt; | 120 | struct listen_sock *listen_opt; |
121 | }; | 121 | }; |
122 | 122 | ||
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index ab502ec1c61c..a87fc0312edc 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -178,7 +178,7 @@ extern struct Qdisc *qdisc_alloc(struct net_device *dev, struct Qdisc_ops *ops); | |||
178 | extern struct Qdisc *qdisc_create_dflt(struct net_device *dev, | 178 | extern struct Qdisc *qdisc_create_dflt(struct net_device *dev, |
179 | struct Qdisc_ops *ops, u32 parentid); | 179 | struct Qdisc_ops *ops, u32 parentid); |
180 | extern void tcf_destroy(struct tcf_proto *tp); | 180 | extern void tcf_destroy(struct tcf_proto *tp); |
181 | extern void tcf_destroy_chain(struct tcf_proto *fl); | 181 | extern void tcf_destroy_chain(struct tcf_proto **fl); |
182 | 182 | ||
183 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, | 183 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, |
184 | struct sk_buff_head *list) | 184 | struct sk_buff_head *list) |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 0ce0443c5b79..7f25195f9855 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -548,7 +548,8 @@ struct sctp_af { | |||
548 | struct dst_entry *(*get_dst) (struct sctp_association *asoc, | 548 | struct dst_entry *(*get_dst) (struct sctp_association *asoc, |
549 | union sctp_addr *daddr, | 549 | union sctp_addr *daddr, |
550 | union sctp_addr *saddr); | 550 | union sctp_addr *saddr); |
551 | void (*get_saddr) (struct sctp_association *asoc, | 551 | void (*get_saddr) (struct sctp_sock *sk, |
552 | struct sctp_association *asoc, | ||
552 | struct dst_entry *dst, | 553 | struct dst_entry *dst, |
553 | union sctp_addr *daddr, | 554 | union sctp_addr *daddr, |
554 | union sctp_addr *saddr); | 555 | union sctp_addr *saddr); |
@@ -587,6 +588,7 @@ struct sctp_af { | |||
587 | int (*is_ce) (const struct sk_buff *sk); | 588 | int (*is_ce) (const struct sk_buff *sk); |
588 | void (*seq_dump_addr)(struct seq_file *seq, | 589 | void (*seq_dump_addr)(struct seq_file *seq, |
589 | union sctp_addr *addr); | 590 | union sctp_addr *addr); |
591 | void (*ecn_capable)(struct sock *sk); | ||
590 | __u16 net_header_len; | 592 | __u16 net_header_len; |
591 | int sockaddr_len; | 593 | int sockaddr_len; |
592 | sa_family_t sa_family; | 594 | sa_family_t sa_family; |
@@ -901,7 +903,10 @@ struct sctp_transport { | |||
901 | * calculation completes (i.e. the DATA chunk | 903 | * calculation completes (i.e. the DATA chunk |
902 | * is SACK'd) clear this flag. | 904 | * is SACK'd) clear this flag. |
903 | */ | 905 | */ |
904 | int rto_pending; | 906 | __u8 rto_pending; |
907 | |||
908 | /* Flag to track the current fast recovery state */ | ||
909 | __u8 fast_recovery; | ||
905 | 910 | ||
906 | /* | 911 | /* |
907 | * These are the congestion stats. | 912 | * These are the congestion stats. |
@@ -920,6 +925,9 @@ struct sctp_transport { | |||
920 | /* Data that has been sent, but not acknowledged. */ | 925 | /* Data that has been sent, but not acknowledged. */ |
921 | __u32 flight_size; | 926 | __u32 flight_size; |
922 | 927 | ||
928 | /* TSN marking the fast recovery exit point */ | ||
929 | __u32 fast_recovery_exit; | ||
930 | |||
923 | /* Destination */ | 931 | /* Destination */ |
924 | struct dst_entry *dst; | 932 | struct dst_entry *dst; |
925 | /* Source address. */ | 933 | /* Source address. */ |
@@ -1044,7 +1052,7 @@ void sctp_transport_route(struct sctp_transport *, union sctp_addr *, | |||
1044 | struct sctp_sock *); | 1052 | struct sctp_sock *); |
1045 | void sctp_transport_pmtu(struct sctp_transport *); | 1053 | void sctp_transport_pmtu(struct sctp_transport *); |
1046 | void sctp_transport_free(struct sctp_transport *); | 1054 | void sctp_transport_free(struct sctp_transport *); |
1047 | void sctp_transport_reset_timers(struct sctp_transport *); | 1055 | void sctp_transport_reset_timers(struct sctp_transport *, int); |
1048 | void sctp_transport_hold(struct sctp_transport *); | 1056 | void sctp_transport_hold(struct sctp_transport *); |
1049 | void sctp_transport_put(struct sctp_transport *); | 1057 | void sctp_transport_put(struct sctp_transport *); |
1050 | void sctp_transport_update_rto(struct sctp_transport *, __u32); | 1058 | void sctp_transport_update_rto(struct sctp_transport *, __u32); |
@@ -1134,6 +1142,9 @@ struct sctp_outq { | |||
1134 | /* How many unackd bytes do we have in-flight? */ | 1142 | /* How many unackd bytes do we have in-flight? */ |
1135 | __u32 outstanding_bytes; | 1143 | __u32 outstanding_bytes; |
1136 | 1144 | ||
1145 | /* Are we doing fast-rtx on this queue */ | ||
1146 | char fast_rtx; | ||
1147 | |||
1137 | /* Corked? */ | 1148 | /* Corked? */ |
1138 | char cork; | 1149 | char cork; |
1139 | 1150 | ||
diff --git a/include/net/syncppp.h b/include/net/syncppp.h index 877efa434700..e43f4070d892 100644 --- a/include/net/syncppp.h +++ b/include/net/syncppp.h | |||
@@ -59,7 +59,7 @@ struct ppp_device | |||
59 | 59 | ||
60 | static inline struct sppp *sppp_of(struct net_device *dev) | 60 | static inline struct sppp *sppp_of(struct net_device *dev) |
61 | { | 61 | { |
62 | struct ppp_device **ppp = dev->priv; | 62 | struct ppp_device **ppp = dev->ml_priv; |
63 | BUG_ON((*ppp)->dev != dev); | 63 | BUG_ON((*ppp)->dev != dev); |
64 | return &(*ppp)->sppp; | 64 | return &(*ppp)->sppp; |
65 | } | 65 | } |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 633147cb6bbc..cf54034019d9 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -139,7 +139,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
139 | #define MAX_TCP_KEEPINTVL 32767 | 139 | #define MAX_TCP_KEEPINTVL 32767 |
140 | #define MAX_TCP_KEEPCNT 127 | 140 | #define MAX_TCP_KEEPCNT 127 |
141 | #define MAX_TCP_SYNCNT 127 | 141 | #define MAX_TCP_SYNCNT 127 |
142 | #define MAX_TCP_ACCEPT_DEFERRED 65535 | ||
143 | 142 | ||
144 | #define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */ | 143 | #define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */ |
145 | 144 | ||
@@ -433,7 +432,6 @@ extern struct sk_buff * tcp_make_synack(struct sock *sk, | |||
433 | 432 | ||
434 | extern int tcp_disconnect(struct sock *sk, int flags); | 433 | extern int tcp_disconnect(struct sock *sk, int flags); |
435 | 434 | ||
436 | extern void tcp_unhash(struct sock *sk); | ||
437 | 435 | ||
438 | /* From syncookies.c */ | 436 | /* From syncookies.c */ |
439 | extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; | 437 | extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; |
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index 27394e0447d8..112934a3288d 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
@@ -40,7 +40,8 @@ extern int datagram_recv_ctl(struct sock *sk, | |||
40 | struct msghdr *msg, | 40 | struct msghdr *msg, |
41 | struct sk_buff *skb); | 41 | struct sk_buff *skb); |
42 | 42 | ||
43 | extern int datagram_send_ctl(struct msghdr *msg, | 43 | extern int datagram_send_ctl(struct net *net, |
44 | struct msghdr *msg, | ||
44 | struct flowi *fl, | 45 | struct flowi *fl, |
45 | struct ipv6_txoptions *opt, | 46 | struct ipv6_txoptions *opt, |
46 | int *hlimit, int *tclass); | 47 | int *hlimit, int *tclass); |
diff --git a/include/net/udp.h b/include/net/udp.h index 3e55a99b0ba3..ccce83707046 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -135,6 +135,7 @@ extern void udp_err(struct sk_buff *, u32); | |||
135 | 135 | ||
136 | extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, | 136 | extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, |
137 | struct msghdr *msg, size_t len); | 137 | struct msghdr *msg, size_t len); |
138 | extern void udp_flush_pending_frames(struct sock *sk); | ||
138 | 139 | ||
139 | extern int udp_rcv(struct sk_buff *skb); | 140 | extern int udp_rcv(struct sk_buff *skb); |
140 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); | 141 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index d1350bcccb03..2933d7474a79 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -648,14 +648,46 @@ extern void xfrm_audit_state_notfound(struct sk_buff *skb, u16 family, | |||
648 | extern void xfrm_audit_state_icvfail(struct xfrm_state *x, | 648 | extern void xfrm_audit_state_icvfail(struct xfrm_state *x, |
649 | struct sk_buff *skb, u8 proto); | 649 | struct sk_buff *skb, u8 proto); |
650 | #else | 650 | #else |
651 | #define xfrm_audit_policy_add(x, r, a, se, s) do { ; } while (0) | 651 | |
652 | #define xfrm_audit_policy_delete(x, r, a, se, s) do { ; } while (0) | 652 | static inline void xfrm_audit_policy_add(struct xfrm_policy *xp, int result, |
653 | #define xfrm_audit_state_add(x, r, a, se, s) do { ; } while (0) | 653 | u32 auid, u32 ses, u32 secid) |
654 | #define xfrm_audit_state_delete(x, r, a, se, s) do { ; } while (0) | 654 | { |
655 | #define xfrm_audit_state_replay_overflow(x, s) do { ; } while (0) | 655 | } |
656 | #define xfrm_audit_state_notfound_simple(s, f) do { ; } while (0) | 656 | |
657 | #define xfrm_audit_state_notfound(s, f, sp, sq) do { ; } while (0) | 657 | static inline void xfrm_audit_policy_delete(struct xfrm_policy *xp, int result, |
658 | #define xfrm_audit_state_icvfail(x, s, p) do { ; } while (0) | 658 | u32 auid, u32 ses, u32 secid) |
659 | { | ||
660 | } | ||
661 | |||
662 | static inline void xfrm_audit_state_add(struct xfrm_state *x, int result, | ||
663 | u32 auid, u32 ses, u32 secid) | ||
664 | { | ||
665 | } | ||
666 | |||
667 | static inline void xfrm_audit_state_delete(struct xfrm_state *x, int result, | ||
668 | u32 auid, u32 ses, u32 secid) | ||
669 | { | ||
670 | } | ||
671 | |||
672 | static inline void xfrm_audit_state_replay_overflow(struct xfrm_state *x, | ||
673 | struct sk_buff *skb) | ||
674 | { | ||
675 | } | ||
676 | |||
677 | static inline void xfrm_audit_state_notfound_simple(struct sk_buff *skb, | ||
678 | u16 family) | ||
679 | { | ||
680 | } | ||
681 | |||
682 | static inline void xfrm_audit_state_notfound(struct sk_buff *skb, u16 family, | ||
683 | __be32 net_spi, __be32 net_seq) | ||
684 | { | ||
685 | } | ||
686 | |||
687 | static inline void xfrm_audit_state_icvfail(struct xfrm_state *x, | ||
688 | struct sk_buff *skb, u8 proto) | ||
689 | { | ||
690 | } | ||
659 | #endif /* CONFIG_AUDITSYSCALL */ | 691 | #endif /* CONFIG_AUDITSYSCALL */ |
660 | 692 | ||
661 | static inline void xfrm_pol_hold(struct xfrm_policy *policy) | 693 | static inline void xfrm_pol_hold(struct xfrm_policy *policy) |