]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/udp.h
[Netlink]: add nla_validate_nested()
[linux-2.6-omap-h63xx.git] / include / net / udp.h
index c496d10101dbda3f8ecda8762267730665e68054..db0c05f67546931c1b387dba2e2a7b64e3a812f6 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Version:    @(#)udp.h       1.0.2   05/07/93
  *
- * Authors:    Ross Biro, <bir7@leland.Stanford.Edu>
+ * Authors:    Ross Biro
  *             Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  *
  * Fixes:
 #ifndef _UDP_H
 #define _UDP_H
 
-#include <linux/udp.h>
-#include <linux/ip.h>
 #include <linux/list.h>
+#include <net/inet_sock.h>
 #include <net/sock.h>
 #include <net/snmp.h>
 #include <linux/seq_file.h>
 
 #define UDP_HTABLE_SIZE                128
 
-/* udp.c: This needs to be shared by v4 and v6 because the lookup
- *        and hashing code needs to work with different AF's yet
- *        the port space is shared.
- */
 extern struct hlist_head udp_hash[UDP_HTABLE_SIZE];
 extern rwlock_t udp_hash_lock;
 
-extern int udp_port_rover;
-
-static inline int udp_lport_inuse(u16 num)
-{
-       struct sock *sk;
-       struct hlist_node *node;
-
-       sk_for_each(sk, node, &udp_hash[num & (UDP_HTABLE_SIZE - 1)])
-               if (inet_sk(sk)->num == num)
-                       return 1;
-       return 0;
-}
 
 /* Note: this must match 'valbool' in sock_setsockopt */
 #define UDP_CSUM_NOXMIT                1
@@ -62,7 +45,10 @@ static inline int udp_lport_inuse(u16 num)
 
 extern struct proto udp_prot;
 
+struct sk_buff;
 
+extern int     udp_get_port(struct sock *sk, unsigned short snum,
+                            int (*saddr_cmp)(const struct sock *, const struct sock *));
 extern void    udp_err(struct sk_buff *, u32);
 
 extern int     udp_sendmsg(struct kiocb *iocb, struct sock *sk,
@@ -94,6 +80,11 @@ struct udp_iter_state {
        struct seq_operations   seq_ops;
 };
 
+#ifdef CONFIG_PROC_FS
 extern int udp_proc_register(struct udp_seq_afinfo *afinfo);
 extern void udp_proc_unregister(struct udp_seq_afinfo *afinfo);
+
+extern int  udp4_proc_init(void);
+extern void udp4_proc_exit(void);
+#endif
 #endif /* _UDP_H */