diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/9p/9p.h | 121 | ||||
-rw-r--r-- | include/net/9p/client.h | 124 | ||||
-rw-r--r-- | include/net/9p/transport.h | 55 | ||||
-rw-r--r-- | include/net/bluetooth/bluetooth.h | 4 | ||||
-rw-r--r-- | include/net/ieee80211.h | 2 | ||||
-rw-r--r-- | include/net/ip.h | 2 | ||||
-rw-r--r-- | include/net/ip_vs.h | 4 | ||||
-rw-r--r-- | include/net/irda/irda.h | 2 | ||||
-rw-r--r-- | include/net/mac80211.h | 3 | ||||
-rw-r--r-- | include/net/ndisc.h | 5 | ||||
-rw-r--r-- | include/net/netfilter/nf_nat_core.h | 8 | ||||
-rw-r--r-- | include/net/netns/x_tables.h | 4 | ||||
-rw-r--r-- | include/net/sctp/sctp.h | 2 |
13 files changed, 161 insertions, 175 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index c3626c0ba9d3..d2c60c73619d 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -27,8 +27,6 @@ | |||
27 | #ifndef NET_9P_H | 27 | #ifndef NET_9P_H |
28 | #define NET_9P_H | 28 | #define NET_9P_H |
29 | 29 | ||
30 | #ifdef CONFIG_NET_9P_DEBUG | ||
31 | |||
32 | /** | 30 | /** |
33 | * enum p9_debug_flags - bits for mount time debug parameter | 31 | * enum p9_debug_flags - bits for mount time debug parameter |
34 | * @P9_DEBUG_ERROR: more verbose error messages including original error string | 32 | * @P9_DEBUG_ERROR: more verbose error messages including original error string |
@@ -39,6 +37,7 @@ | |||
39 | * @P9_DEBUG_TRANS: transport tracing | 37 | * @P9_DEBUG_TRANS: transport tracing |
40 | * @P9_DEBUG_SLABS: memory management tracing | 38 | * @P9_DEBUG_SLABS: memory management tracing |
41 | * @P9_DEBUG_FCALL: verbose dump of protocol messages | 39 | * @P9_DEBUG_FCALL: verbose dump of protocol messages |
40 | * @P9_DEBUG_FID: fid allocation/deallocation tracking | ||
42 | * | 41 | * |
43 | * These flags are passed at mount time to turn on various levels of | 42 | * 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. | 43 | * verbosity and tracing which will be output to the system logs. |
@@ -53,30 +52,33 @@ enum p9_debug_flags { | |||
53 | P9_DEBUG_TRANS = (1<<6), | 52 | P9_DEBUG_TRANS = (1<<6), |
54 | P9_DEBUG_SLABS = (1<<7), | 53 | P9_DEBUG_SLABS = (1<<7), |
55 | P9_DEBUG_FCALL = (1<<8), | 54 | P9_DEBUG_FCALL = (1<<8), |
55 | P9_DEBUG_FID = (1<<9), | ||
56 | P9_DEBUG_PKT = (1<<10), | ||
56 | }; | 57 | }; |
57 | 58 | ||
58 | extern unsigned int p9_debug_level; | 59 | extern unsigned int p9_debug_level; |
59 | 60 | ||
61 | #ifdef CONFIG_NET_9P_DEBUG | ||
60 | #define P9_DPRINTK(level, format, arg...) \ | 62 | #define P9_DPRINTK(level, format, arg...) \ |
61 | do { \ | 63 | do { \ |
62 | if ((p9_debug_level & level) == level) \ | 64 | if ((p9_debug_level & level) == level) {\ |
63 | printk(KERN_NOTICE "-- %s (%d): " \ | 65 | if (level == P9_DEBUG_9P) \ |
64 | format , __FUNCTION__, task_pid_nr(current) , ## arg); \ | 66 | printk(KERN_NOTICE "(%8.8d) " \ |
67 | format , task_pid_nr(current) , ## arg); \ | ||
68 | else \ | ||
69 | printk(KERN_NOTICE "-- %s (%d): " \ | ||
70 | format , __func__, task_pid_nr(current) , ## arg); \ | ||
71 | } \ | ||
65 | } while (0) | 72 | } while (0) |
66 | 73 | ||
67 | #define PRINT_FCALL_ERROR(s, fcall) P9_DPRINTK(P9_DEBUG_ERROR, \ | ||
68 | "%s: %.*s\n", s, fcall?fcall->params.rerror.error.len:0, \ | ||
69 | fcall?fcall->params.rerror.error.str:""); | ||
70 | |||
71 | #else | 74 | #else |
72 | #define P9_DPRINTK(level, format, arg...) do { } while (0) | 75 | #define P9_DPRINTK(level, format, arg...) do { } while (0) |
73 | #define PRINT_FCALL_ERROR(s, fcall) do { } while (0) | ||
74 | #endif | 76 | #endif |
75 | 77 | ||
76 | #define P9_EPRINTK(level, format, arg...) \ | 78 | #define P9_EPRINTK(level, format, arg...) \ |
77 | do { \ | 79 | do { \ |
78 | printk(level "9p: %s (%d): " \ | 80 | printk(level "9p: %s (%d): " \ |
79 | format , __FUNCTION__, task_pid_nr(current), ## arg); \ | 81 | format , __func__, task_pid_nr(current), ## arg); \ |
80 | } while (0) | 82 | } while (0) |
81 | 83 | ||
82 | /** | 84 | /** |
@@ -325,33 +327,6 @@ struct p9_qid { | |||
325 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat | 327 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat |
326 | */ | 328 | */ |
327 | 329 | ||
328 | struct p9_stat { | ||
329 | u16 size; | ||
330 | u16 type; | ||
331 | u32 dev; | ||
332 | struct p9_qid qid; | ||
333 | u32 mode; | ||
334 | u32 atime; | ||
335 | u32 mtime; | ||
336 | u64 length; | ||
337 | struct p9_str name; | ||
338 | struct p9_str uid; | ||
339 | struct p9_str gid; | ||
340 | struct p9_str muid; | ||
341 | struct p9_str extension; /* 9p2000.u extensions */ | ||
342 | u32 n_uid; /* 9p2000.u extensions */ | ||
343 | u32 n_gid; /* 9p2000.u extensions */ | ||
344 | u32 n_muid; /* 9p2000.u extensions */ | ||
345 | }; | ||
346 | |||
347 | /* | ||
348 | * file metadata (stat) structure used to create Twstat message | ||
349 | * The is identical to &p9_stat, but the strings don't point to | ||
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 | |||
355 | struct p9_wstat { | 330 | struct p9_wstat { |
356 | u16 size; | 331 | u16 size; |
357 | u16 type; | 332 | u16 type; |
@@ -493,12 +468,12 @@ struct p9_tstat { | |||
493 | }; | 468 | }; |
494 | 469 | ||
495 | struct p9_rstat { | 470 | struct p9_rstat { |
496 | struct p9_stat stat; | 471 | struct p9_wstat stat; |
497 | }; | 472 | }; |
498 | 473 | ||
499 | struct p9_twstat { | 474 | struct p9_twstat { |
500 | u32 fid; | 475 | u32 fid; |
501 | struct p9_stat stat; | 476 | struct p9_wstat stat; |
502 | }; | 477 | }; |
503 | 478 | ||
504 | struct p9_rwstat { | 479 | struct p9_rwstat { |
@@ -509,8 +484,9 @@ struct p9_rwstat { | |||
509 | * @size: prefixed length of the structure | 484 | * @size: prefixed length of the structure |
510 | * @id: protocol operating identifier of type &p9_msg_t | 485 | * @id: protocol operating identifier of type &p9_msg_t |
511 | * @tag: transaction id of the request | 486 | * @tag: transaction id of the request |
487 | * @offset: used by marshalling routines to track currentposition in buffer | ||
488 | * @capacity: used by marshalling routines to track total capacity | ||
512 | * @sdata: payload | 489 | * @sdata: payload |
513 | * @params: per-operation parameters | ||
514 | * | 490 | * |
515 | * &p9_fcall represents the structure for all 9P RPC | 491 | * &p9_fcall represents the structure for all 9P RPC |
516 | * transactions. Requests are packaged into fcalls, and reponses | 492 | * transactions. Requests are packaged into fcalls, and reponses |
@@ -523,68 +499,15 @@ struct p9_fcall { | |||
523 | u32 size; | 499 | u32 size; |
524 | u8 id; | 500 | u8 id; |
525 | u16 tag; | 501 | u16 tag; |
526 | void *sdata; | 502 | |
527 | 503 | size_t offset; | |
528 | union { | 504 | size_t capacity; |
529 | struct p9_tversion tversion; | 505 | |
530 | struct p9_rversion rversion; | 506 | uint8_t *sdata; |
531 | struct p9_tauth tauth; | ||
532 | struct p9_rauth rauth; | ||
533 | struct p9_rerror rerror; | ||
534 | struct p9_tflush tflush; | ||
535 | struct p9_rflush rflush; | ||
536 | struct p9_tattach tattach; | ||
537 | struct p9_rattach rattach; | ||
538 | struct p9_twalk twalk; | ||
539 | struct p9_rwalk rwalk; | ||
540 | struct p9_topen topen; | ||
541 | struct p9_ropen ropen; | ||
542 | struct p9_tcreate tcreate; | ||
543 | struct p9_rcreate rcreate; | ||
544 | struct p9_tread tread; | ||
545 | struct p9_rread rread; | ||
546 | struct p9_twrite twrite; | ||
547 | struct p9_rwrite rwrite; | ||
548 | struct p9_tclunk tclunk; | ||
549 | struct p9_rclunk rclunk; | ||
550 | struct p9_tremove tremove; | ||
551 | struct p9_rremove rremove; | ||
552 | struct p9_tstat tstat; | ||
553 | struct p9_rstat rstat; | ||
554 | struct p9_twstat twstat; | ||
555 | struct p9_rwstat rwstat; | ||
556 | } params; | ||
557 | }; | 507 | }; |
558 | 508 | ||
559 | struct p9_idpool; | 509 | struct p9_idpool; |
560 | 510 | ||
561 | int p9_deserialize_stat(void *buf, u32 buflen, struct p9_stat *stat, | ||
562 | int dotu); | ||
563 | int p9_deserialize_fcall(void *buf, u32 buflen, struct p9_fcall *fc, int dotu); | ||
564 | void p9_set_tag(struct p9_fcall *fc, u16 tag); | ||
565 | struct p9_fcall *p9_create_tversion(u32 msize, char *version); | ||
566 | struct p9_fcall *p9_create_tattach(u32 fid, u32 afid, char *uname, | ||
567 | char *aname, u32 n_uname, int dotu); | ||
568 | struct p9_fcall *p9_create_tauth(u32 afid, char *uname, char *aname, | ||
569 | u32 n_uname, int dotu); | ||
570 | struct p9_fcall *p9_create_tflush(u16 oldtag); | ||
571 | struct p9_fcall *p9_create_twalk(u32 fid, u32 newfid, u16 nwname, | ||
572 | char **wnames); | ||
573 | struct p9_fcall *p9_create_topen(u32 fid, u8 mode); | ||
574 | struct p9_fcall *p9_create_tcreate(u32 fid, char *name, u32 perm, u8 mode, | ||
575 | char *extension, int dotu); | ||
576 | struct p9_fcall *p9_create_tread(u32 fid, u64 offset, u32 count); | ||
577 | struct p9_fcall *p9_create_twrite(u32 fid, u64 offset, u32 count, | ||
578 | const char *data); | ||
579 | struct p9_fcall *p9_create_twrite_u(u32 fid, u64 offset, u32 count, | ||
580 | const char __user *data); | ||
581 | struct p9_fcall *p9_create_tclunk(u32 fid); | ||
582 | struct p9_fcall *p9_create_tremove(u32 fid); | ||
583 | struct p9_fcall *p9_create_tstat(u32 fid); | ||
584 | struct p9_fcall *p9_create_twstat(u32 fid, struct p9_wstat *wstat, | ||
585 | int dotu); | ||
586 | |||
587 | int p9_printfcall(char *buf, int buflen, struct p9_fcall *fc, int dotu); | ||
588 | int p9_errstr2errno(char *errstr, int len); | 511 | int p9_errstr2errno(char *errstr, int len); |
589 | 512 | ||
590 | struct p9_idpool *p9_idpool_create(void); | 513 | struct p9_idpool *p9_idpool_create(void); |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index c936dd14de41..1f17f3d93727 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -26,6 +26,87 @@ | |||
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 | /* Number of requests per row */ | ||
30 | #define P9_ROW_MAXTAG 255 | ||
31 | |||
32 | /** | ||
33 | * enum p9_trans_status - different states of underlying transports | ||
34 | * @Connected: transport is connected and healthy | ||
35 | * @Disconnected: transport has been disconnected | ||
36 | * @Hung: transport is connected by wedged | ||
37 | * | ||
38 | * This enumeration details the various states a transport | ||
39 | * instatiation can be in. | ||
40 | */ | ||
41 | |||
42 | enum p9_trans_status { | ||
43 | Connected, | ||
44 | Disconnected, | ||
45 | Hung, | ||
46 | }; | ||
47 | |||
48 | /** | ||
49 | * enum p9_req_status_t - virtio request status | ||
50 | * @REQ_STATUS_IDLE: request slot unused | ||
51 | * @REQ_STATUS_ALLOC: request has been allocated but not sent | ||
52 | * @REQ_STATUS_UNSENT: request waiting to be sent | ||
53 | * @REQ_STATUS_SENT: request sent to server | ||
54 | * @REQ_STATUS_FLSH: a flush has been sent for this request | ||
55 | * @REQ_STATUS_RCVD: response received from server | ||
56 | * @REQ_STATUS_FLSHD: request has been flushed | ||
57 | * @REQ_STATUS_ERROR: request encountered an error on the client side | ||
58 | * | ||
59 | * The @REQ_STATUS_IDLE state is used to mark a request slot as unused | ||
60 | * but use is actually tracked by the idpool structure which handles tag | ||
61 | * id allocation. | ||
62 | * | ||
63 | */ | ||
64 | |||
65 | enum p9_req_status_t { | ||
66 | REQ_STATUS_IDLE, | ||
67 | REQ_STATUS_ALLOC, | ||
68 | REQ_STATUS_UNSENT, | ||
69 | REQ_STATUS_SENT, | ||
70 | REQ_STATUS_FLSH, | ||
71 | REQ_STATUS_RCVD, | ||
72 | REQ_STATUS_FLSHD, | ||
73 | REQ_STATUS_ERROR, | ||
74 | }; | ||
75 | |||
76 | /** | ||
77 | * struct p9_req_t - request slots | ||
78 | * @status: status of this request slot | ||
79 | * @t_err: transport error | ||
80 | * @flush_tag: tag of request being flushed (for flush requests) | ||
81 | * @wq: wait_queue for the client to block on for this request | ||
82 | * @tc: the request fcall structure | ||
83 | * @rc: the response fcall structure | ||
84 | * @aux: transport specific data (provided for trans_fd migration) | ||
85 | * @req_list: link for higher level objects to chain requests | ||
86 | * | ||
87 | * Transport use an array to track outstanding requests | ||
88 | * instead of a list. While this may incurr overhead during initial | ||
89 | * allocation or expansion, it makes request lookup much easier as the | ||
90 | * tag id is a index into an array. (We use tag+1 so that we can accomodate | ||
91 | * the -1 tag for the T_VERSION request). | ||
92 | * This also has the nice effect of only having to allocate wait_queues | ||
93 | * once, instead of constantly allocating and freeing them. Its possible | ||
94 | * other resources could benefit from this scheme as well. | ||
95 | * | ||
96 | */ | ||
97 | |||
98 | struct p9_req_t { | ||
99 | int status; | ||
100 | int t_err; | ||
101 | u16 flush_tag; | ||
102 | wait_queue_head_t *wq; | ||
103 | struct p9_fcall *tc; | ||
104 | struct p9_fcall *rc; | ||
105 | void *aux; | ||
106 | |||
107 | struct list_head req_list; | ||
108 | }; | ||
109 | |||
29 | /** | 110 | /** |
30 | * struct p9_client - per client instance state | 111 | * struct p9_client - per client instance state |
31 | * @lock: protect @fidlist | 112 | * @lock: protect @fidlist |
@@ -36,9 +117,20 @@ | |||
36 | * @conn: connection state information used by trans_fd | 117 | * @conn: connection state information used by trans_fd |
37 | * @fidpool: fid handle accounting for session | 118 | * @fidpool: fid handle accounting for session |
38 | * @fidlist: List of active fid handles | 119 | * @fidlist: List of active fid handles |
120 | * @tagpool - transaction id accounting for session | ||
121 | * @reqs - 2D array of requests | ||
122 | * @max_tag - current maximum tag id allocated | ||
39 | * | 123 | * |
40 | * The client structure is used to keep track of various per-client | 124 | * The client structure is used to keep track of various per-client |
41 | * state that has been instantiated. | 125 | * state that has been instantiated. |
126 | * In order to minimize per-transaction overhead we use a | ||
127 | * simple array to lookup requests instead of a hash table | ||
128 | * or linked list. In order to support larger number of | ||
129 | * transactions, we make this a 2D array, allocating new rows | ||
130 | * when we need to grow the total number of the transactions. | ||
131 | * | ||
132 | * Each row is 256 requests and we'll support up to 256 rows for | ||
133 | * a total of 64k concurrent requests per session. | ||
42 | * | 134 | * |
43 | * Bugs: duplicated data and potentially unnecessary elements. | 135 | * Bugs: duplicated data and potentially unnecessary elements. |
44 | */ | 136 | */ |
@@ -48,11 +140,16 @@ struct p9_client { | |||
48 | int msize; | 140 | int msize; |
49 | unsigned char dotu; | 141 | unsigned char dotu; |
50 | struct p9_trans_module *trans_mod; | 142 | struct p9_trans_module *trans_mod; |
51 | struct p9_trans *trans; | 143 | enum p9_trans_status status; |
144 | void *trans; | ||
52 | struct p9_conn *conn; | 145 | struct p9_conn *conn; |
53 | 146 | ||
54 | struct p9_idpool *fidpool; | 147 | struct p9_idpool *fidpool; |
55 | struct list_head fidlist; | 148 | struct list_head fidlist; |
149 | |||
150 | struct p9_idpool *tagpool; | ||
151 | struct p9_req_t *reqs[P9_ROW_MAXTAG]; | ||
152 | int max_tag; | ||
56 | }; | 153 | }; |
57 | 154 | ||
58 | /** | 155 | /** |
@@ -65,8 +162,6 @@ struct p9_client { | |||
65 | * @uid: the numeric uid of the local user who owns this handle | 162 | * @uid: the numeric uid of the local user who owns this handle |
66 | * @aux: transport specific information (unused?) | 163 | * @aux: transport specific information (unused?) |
67 | * @rdir_fpos: tracks offset of file position when reading directory contents | 164 | * @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 | 165 | * @flist: per-client-instance fid tracking |
71 | * @dlist: per-dentry fid tracking | 166 | * @dlist: per-dentry fid tracking |
72 | * | 167 | * |
@@ -83,8 +178,6 @@ struct p9_fid { | |||
83 | void *aux; | 178 | void *aux; |
84 | 179 | ||
85 | int rdir_fpos; | 180 | int rdir_fpos; |
86 | int rdir_pos; | ||
87 | struct p9_fcall *rdir_fcall; | ||
88 | struct list_head flist; | 181 | struct list_head flist; |
89 | struct list_head dlist; /* list of all fids attached to a dentry */ | 182 | struct list_head dlist; /* list of all fids attached to a dentry */ |
90 | }; | 183 | }; |
@@ -103,15 +196,18 @@ int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode, | |||
103 | char *extension); | 196 | char *extension); |
104 | int p9_client_clunk(struct p9_fid *fid); | 197 | int p9_client_clunk(struct p9_fid *fid); |
105 | int p9_client_remove(struct p9_fid *fid); | 198 | int p9_client_remove(struct p9_fid *fid); |
106 | int p9_client_read(struct p9_fid *fid, char *data, u64 offset, u32 count); | 199 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, |
107 | int p9_client_readn(struct p9_fid *fid, char *data, u64 offset, u32 count); | 200 | u64 offset, u32 count); |
108 | int p9_client_write(struct p9_fid *fid, char *data, u64 offset, u32 count); | 201 | int p9_client_write(struct p9_fid *fid, char *data, const char __user *udata, |
109 | int p9_client_uread(struct p9_fid *fid, char __user *data, u64 offset, | 202 | u64 offset, u32 count); |
110 | u32 count); | 203 | struct p9_wstat *p9_client_stat(struct p9_fid *fid); |
111 | int p9_client_uwrite(struct p9_fid *fid, const char __user *data, u64 offset, | ||
112 | u32 count); | ||
113 | struct p9_stat *p9_client_stat(struct p9_fid *fid); | ||
114 | int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst); | 204 | int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst); |
115 | struct p9_stat *p9_client_dirread(struct p9_fid *fid, u64 offset); | 205 | |
206 | struct p9_req_t *p9_tag_lookup(struct p9_client *, u16); | ||
207 | void p9_client_cb(struct p9_client *c, struct p9_req_t *req); | ||
208 | |||
209 | int p9stat_read(char *, int, struct p9_wstat *, int); | ||
210 | void p9stat_free(struct p9_wstat *); | ||
211 | |||
116 | 212 | ||
117 | #endif /* NET_9P_CLIENT_H */ | 213 | #endif /* NET_9P_CLIENT_H */ |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 3ca737120a90..6d5886efb102 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
@@ -26,52 +26,6 @@ | |||
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 | #include <linux/module.h> | ||
30 | |||
31 | /** | ||
32 | * enum p9_trans_status - different states of underlying transports | ||
33 | * @Connected: transport is connected and healthy | ||
34 | * @Disconnected: transport has been disconnected | ||
35 | * @Hung: transport is connected by wedged | ||
36 | * | ||
37 | * This enumeration details the various states a transport | ||
38 | * instatiation can be in. | ||
39 | */ | ||
40 | |||
41 | enum p9_trans_status { | ||
42 | Connected, | ||
43 | Disconnected, | ||
44 | Hung, | ||
45 | }; | ||
46 | |||
47 | /** | ||
48 | * struct p9_trans - per-transport state and API | ||
49 | * @status: transport &p9_trans_status | ||
50 | * @msize: negotiated maximum packet size (duplicate from client) | ||
51 | * @extended: negotiated protocol extensions (duplicate from client) | ||
52 | * @priv: transport private data | ||
53 | * @close: member function to disconnect and close the transport | ||
54 | * @rpc: member function to issue a request to the transport | ||
55 | * | ||
56 | * This is the basic API for a transport instance. It is used as | ||
57 | * a handle by the client to issue requests. This interface is currently | ||
58 | * in flux during reorganization. | ||
59 | * | ||
60 | * Bugs: there is lots of duplicated data here and its not clear that | ||
61 | * the member functions need to be per-instance versus per transport | ||
62 | * module. | ||
63 | */ | ||
64 | |||
65 | struct p9_trans { | ||
66 | enum p9_trans_status status; | ||
67 | int msize; | ||
68 | unsigned char extended; | ||
69 | void *priv; | ||
70 | void (*close) (struct p9_trans *); | ||
71 | int (*rpc) (struct p9_trans *t, struct p9_fcall *tc, | ||
72 | struct p9_fcall **rc); | ||
73 | }; | ||
74 | |||
75 | /** | 29 | /** |
76 | * struct p9_trans_module - transport module interface | 30 | * struct p9_trans_module - transport module interface |
77 | * @list: used to maintain a list of currently available transports | 31 | * @list: used to maintain a list of currently available transports |
@@ -79,12 +33,14 @@ struct p9_trans { | |||
79 | * @maxsize: transport provided maximum packet size | 33 | * @maxsize: transport provided maximum packet size |
80 | * @def: set if this transport should be considered the default | 34 | * @def: set if this transport should be considered the default |
81 | * @create: member function to create a new connection on this transport | 35 | * @create: member function to create a new connection on this transport |
36 | * @request: member function to issue a request to the transport | ||
37 | * @cancel: member function to cancel a request (if it hasn't been sent) | ||
82 | * | 38 | * |
83 | * This is the basic API for a transport module which is registered by the | 39 | * This is the basic API for a transport module which is registered by the |
84 | * transport module with the 9P core network module and used by the client | 40 | * transport module with the 9P core network module and used by the client |
85 | * to instantiate a new connection on a transport. | 41 | * to instantiate a new connection on a transport. |
86 | * | 42 | * |
87 | * Bugs: the transport module list isn't protected. | 43 | * BUGS: the transport module list isn't protected. |
88 | */ | 44 | */ |
89 | 45 | ||
90 | struct p9_trans_module { | 46 | struct p9_trans_module { |
@@ -92,8 +48,11 @@ struct p9_trans_module { | |||
92 | char *name; /* name of transport */ | 48 | char *name; /* name of transport */ |
93 | int maxsize; /* max message size of transport */ | 49 | int maxsize; /* max message size of transport */ |
94 | int def; /* this transport should be default */ | 50 | int def; /* this transport should be default */ |
95 | struct p9_trans * (*create)(const char *, char *, int, unsigned char); | ||
96 | struct module *owner; | 51 | struct module *owner; |
52 | int (*create)(struct p9_client *, const char *, char *); | ||
53 | void (*close) (struct p9_client *); | ||
54 | int (*request) (struct p9_client *, struct p9_req_t *req); | ||
55 | int (*cancel) (struct p9_client *, struct p9_req_t *req); | ||
97 | }; | 56 | }; |
98 | 57 | ||
99 | void v9fs_register_trans(struct p9_trans_module *m); | 58 | void v9fs_register_trans(struct p9_trans_module *m); |
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 6f8418bf4241..996d12df7594 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -54,8 +54,8 @@ | |||
54 | #define SOL_RFCOMM 18 | 54 | #define SOL_RFCOMM 18 |
55 | 55 | ||
56 | #define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg) | 56 | #define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg) |
57 | #define BT_DBG(fmt, arg...) printk(KERN_INFO "%s: " fmt "\n" , __FUNCTION__ , ## arg) | 57 | #define BT_DBG(fmt, arg...) printk(KERN_INFO "%s: " fmt "\n" , __func__ , ## arg) |
58 | #define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __FUNCTION__ , ## arg) | 58 | #define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __func__ , ## arg) |
59 | 59 | ||
60 | /* Connection and socket states */ | 60 | /* Connection and socket states */ |
61 | enum { | 61 | enum { |
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index 6048579d0b24..93a56de3594b 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -114,7 +114,7 @@ extern u32 ieee80211_debug_level; | |||
114 | #define IEEE80211_DEBUG(level, fmt, args...) \ | 114 | #define IEEE80211_DEBUG(level, fmt, args...) \ |
115 | do { if (ieee80211_debug_level & (level)) \ | 115 | do { if (ieee80211_debug_level & (level)) \ |
116 | printk(KERN_DEBUG "ieee80211: %c %s " fmt, \ | 116 | printk(KERN_DEBUG "ieee80211: %c %s " fmt, \ |
117 | in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) | 117 | in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0) |
118 | static inline bool ieee80211_ratelimit_debug(u32 level) | 118 | static inline bool ieee80211_ratelimit_debug(u32 level) |
119 | { | 119 | { |
120 | return (ieee80211_debug_level & level) && net_ratelimit(); | 120 | return (ieee80211_debug_level & level) && net_ratelimit(); |
diff --git a/include/net/ip.h b/include/net/ip.h index 1cbccaf0de3f..bc026ecb513f 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -396,7 +396,7 @@ extern void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport, | |||
396 | int ipv4_doint_and_flush(ctl_table *ctl, int write, | 396 | int ipv4_doint_and_flush(ctl_table *ctl, int write, |
397 | struct file* filp, void __user *buffer, | 397 | struct file* filp, void __user *buffer, |
398 | size_t *lenp, loff_t *ppos); | 398 | size_t *lenp, loff_t *ppos); |
399 | int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen, | 399 | int ipv4_doint_and_flush_strategy(ctl_table *table, |
400 | void __user *oldval, size_t __user *oldlenp, | 400 | void __user *oldval, size_t __user *oldlenp, |
401 | void __user *newval, size_t newlen); | 401 | void __user *newval, size_t newlen); |
402 | #ifdef CONFIG_PROC_FS | 402 | #ifdef CONFIG_PROC_FS |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 0b2071d9326d..fe9fcf73c85e 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -165,13 +165,13 @@ static inline const char *ip_vs_dbg_addr(int af, char *buf, size_t buf_len, | |||
165 | do { \ | 165 | do { \ |
166 | if (level <= ip_vs_get_debug_level()) \ | 166 | if (level <= ip_vs_get_debug_level()) \ |
167 | printk(KERN_DEBUG "Enter: %s, %s line %i\n", \ | 167 | printk(KERN_DEBUG "Enter: %s, %s line %i\n", \ |
168 | __FUNCTION__, __FILE__, __LINE__); \ | 168 | __func__, __FILE__, __LINE__); \ |
169 | } while (0) | 169 | } while (0) |
170 | #define LeaveFunction(level) \ | 170 | #define LeaveFunction(level) \ |
171 | do { \ | 171 | do { \ |
172 | if (level <= ip_vs_get_debug_level()) \ | 172 | if (level <= ip_vs_get_debug_level()) \ |
173 | printk(KERN_DEBUG "Leave: %s, %s line %i\n", \ | 173 | printk(KERN_DEBUG "Leave: %s, %s line %i\n", \ |
174 | __FUNCTION__, __FILE__, __LINE__); \ | 174 | __func__, __FILE__, __LINE__); \ |
175 | } while (0) | 175 | } while (0) |
176 | #else | 176 | #else |
177 | #define EnterFunction(level) do {} while (0) | 177 | #define EnterFunction(level) do {} while (0) |
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h index 08387553b57e..7e582061b230 100644 --- a/include/net/irda/irda.h +++ b/include/net/irda/irda.h | |||
@@ -72,7 +72,7 @@ do { if (irda_debug >= (n)) \ | |||
72 | #define IRDA_ASSERT(expr, func) \ | 72 | #define IRDA_ASSERT(expr, func) \ |
73 | do { if(!(expr)) { \ | 73 | do { if(!(expr)) { \ |
74 | printk( "Assertion failed! %s:%s:%d %s\n", \ | 74 | printk( "Assertion failed! %s:%s:%d %s\n", \ |
75 | __FILE__,__FUNCTION__,__LINE__,(#expr) ); \ | 75 | __FILE__,__func__,__LINE__,(#expr) ); \ |
76 | func } } while (0) | 76 | func } } while (0) |
77 | #define IRDA_ASSERT_LABEL(label) label | 77 | #define IRDA_ASSERT_LABEL(label) label |
78 | #else | 78 | #else |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 5617a1613c91..d861197f83c7 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -645,7 +645,8 @@ enum ieee80211_key_flags { | |||
645 | * - Temporal Encryption Key (128 bits) | 645 | * - Temporal Encryption Key (128 bits) |
646 | * - Temporal Authenticator Tx MIC Key (64 bits) | 646 | * - Temporal Authenticator Tx MIC Key (64 bits) |
647 | * - Temporal Authenticator Rx MIC Key (64 bits) | 647 | * - Temporal Authenticator Rx MIC Key (64 bits) |
648 | * | 648 | * @icv_len: FIXME |
649 | * @iv_len: FIXME | ||
649 | */ | 650 | */ |
650 | struct ieee80211_key_conf { | 651 | struct ieee80211_key_conf { |
651 | enum ieee80211_key_alg alg; | 652 | enum ieee80211_key_alg alg; |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index a01b7c4dc763..11dd0137c6a5 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h | |||
@@ -129,9 +129,8 @@ 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, | 132 | int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, |
133 | int nlen, void __user *oldval, | 133 | void __user *oldval, size_t __user *oldlenp, |
134 | size_t __user *oldlenp, | ||
135 | void __user *newval, size_t newlen); | 134 | void __user *newval, size_t newlen); |
136 | #endif | 135 | #endif |
137 | 136 | ||
diff --git a/include/net/netfilter/nf_nat_core.h b/include/net/netfilter/nf_nat_core.h index f29eeb9777e0..58684066388c 100644 --- a/include/net/netfilter/nf_nat_core.h +++ b/include/net/netfilter/nf_nat_core.h | |||
@@ -25,4 +25,12 @@ static inline int nf_nat_initialized(struct nf_conn *ct, | |||
25 | else | 25 | else |
26 | return test_bit(IPS_DST_NAT_DONE_BIT, &ct->status); | 26 | return test_bit(IPS_DST_NAT_DONE_BIT, &ct->status); |
27 | } | 27 | } |
28 | |||
29 | struct nlattr; | ||
30 | |||
31 | extern int | ||
32 | (*nfnetlink_parse_nat_setup_hook)(struct nf_conn *ct, | ||
33 | enum nf_nat_manip_type manip, | ||
34 | struct nlattr *attr); | ||
35 | |||
28 | #endif /* _NF_NAT_CORE_H */ | 36 | #endif /* _NF_NAT_CORE_H */ |
diff --git a/include/net/netns/x_tables.h b/include/net/netns/x_tables.h index 0cb63ed2c1fc..b8093971ccb4 100644 --- a/include/net/netns/x_tables.h +++ b/include/net/netns/x_tables.h | |||
@@ -2,9 +2,9 @@ | |||
2 | #define __NETNS_X_TABLES_H | 2 | #define __NETNS_X_TABLES_H |
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/net.h> | 5 | #include <linux/netfilter.h> |
6 | 6 | ||
7 | struct netns_xt { | 7 | struct netns_xt { |
8 | struct list_head tables[NPROTO]; | 8 | struct list_head tables[NFPROTO_NUMPROTO]; |
9 | }; | 9 | }; |
10 | #endif | 10 | #endif |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 703305d00365..ed71b110edf7 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -303,7 +303,7 @@ extern int sctp_debug_flag; | |||
303 | #define SCTP_ASSERT(expr, str, func) \ | 303 | #define SCTP_ASSERT(expr, str, func) \ |
304 | if (!(expr)) { \ | 304 | if (!(expr)) { \ |
305 | SCTP_DEBUG_PRINTK("Assertion Failed: %s(%s) at %s:%s:%d\n", \ | 305 | SCTP_DEBUG_PRINTK("Assertion Failed: %s(%s) at %s:%s:%d\n", \ |
306 | str, (#expr), __FILE__, __FUNCTION__, __LINE__); \ | 306 | str, (#expr), __FILE__, __func__, __LINE__); \ |
307 | func; \ | 307 | func; \ |
308 | } | 308 | } |
309 | 309 | ||