diff options
Diffstat (limited to 'include/net/udp.h')
| -rw-r--r-- | include/net/udp.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/include/net/udp.h b/include/net/udp.h index c6669c0a74c7..3e55a99b0ba3 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
| @@ -115,7 +115,7 @@ static inline void udp_lib_unhash(struct sock *sk) | |||
| 115 | write_lock_bh(&udp_hash_lock); | 115 | write_lock_bh(&udp_hash_lock); |
| 116 | if (sk_del_node_init(sk)) { | 116 | if (sk_del_node_init(sk)) { |
| 117 | inet_sk(sk)->num = 0; | 117 | inet_sk(sk)->num = 0; |
| 118 | sock_prot_inuse_add(sk->sk_prot, -1); | 118 | sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); |
| 119 | } | 119 | } |
| 120 | write_unlock_bh(&udp_hash_lock); | 120 | write_unlock_bh(&udp_hash_lock); |
| 121 | } | 121 | } |
| @@ -125,6 +125,8 @@ static inline void udp_lib_close(struct sock *sk, long timeout) | |||
| 125 | sk_common_release(sk); | 125 | sk_common_release(sk); |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | extern int udp_lib_get_port(struct sock *sk, unsigned short snum, | ||
| 129 | int (*)(const struct sock*,const struct sock*)); | ||
| 128 | 130 | ||
| 129 | /* net/ipv4/udp.c */ | 131 | /* net/ipv4/udp.c */ |
| 130 | extern int udp_get_port(struct sock *sk, unsigned short snum, | 132 | extern int udp_get_port(struct sock *sk, unsigned short snum, |
| @@ -183,24 +185,23 @@ DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6); | |||
| 183 | 185 | ||
| 184 | /* /proc */ | 186 | /* /proc */ |
| 185 | struct udp_seq_afinfo { | 187 | struct udp_seq_afinfo { |
| 186 | struct module *owner; | ||
| 187 | char *name; | 188 | char *name; |
| 188 | sa_family_t family; | 189 | sa_family_t family; |
| 189 | struct hlist_head *hashtable; | 190 | struct hlist_head *hashtable; |
| 190 | int (*seq_show) (struct seq_file *m, void *v); | 191 | struct file_operations seq_fops; |
| 191 | struct file_operations *seq_fops; | 192 | struct seq_operations seq_ops; |
| 192 | }; | 193 | }; |
| 193 | 194 | ||
| 194 | struct udp_iter_state { | 195 | struct udp_iter_state { |
| 196 | struct seq_net_private p; | ||
| 195 | sa_family_t family; | 197 | sa_family_t family; |
| 196 | struct hlist_head *hashtable; | 198 | struct hlist_head *hashtable; |
| 197 | int bucket; | 199 | int bucket; |
| 198 | struct seq_operations seq_ops; | ||
| 199 | }; | 200 | }; |
| 200 | 201 | ||
| 201 | #ifdef CONFIG_PROC_FS | 202 | #ifdef CONFIG_PROC_FS |
| 202 | extern int udp_proc_register(struct udp_seq_afinfo *afinfo); | 203 | extern int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo); |
| 203 | extern void udp_proc_unregister(struct udp_seq_afinfo *afinfo); | 204 | extern void udp_proc_unregister(struct net *net, struct udp_seq_afinfo *afinfo); |
| 204 | 205 | ||
| 205 | extern int udp4_proc_init(void); | 206 | extern int udp4_proc_init(void); |
| 206 | extern void udp4_proc_exit(void); | 207 | extern void udp4_proc_exit(void); |
