]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/net.h
[NET]: move struct proto_ops to const
[net-next-2.6.git] / include / linux / net.h
index 20cb226b22685fcd55428104c84b64ba14c4443c..28195a2d8ff0a50501a5ab180ef6bf3b252cbb28 100644 (file)
@@ -71,6 +71,7 @@ typedef enum {
  * @SOCK_RAW: raw socket
  * @SOCK_RDM: reliably-delivered message
  * @SOCK_SEQPACKET: sequential packet socket
+ * @SOCK_DCCP: Datagram Congestion Control Protocol socket
  * @SOCK_PACKET: linux specific way of getting packets at the dev level.
  *               For writing rarp and other similar things on the user level.
  *
@@ -84,6 +85,7 @@ enum sock_type {
        SOCK_RAW        = 3,
        SOCK_RDM        = 4,
        SOCK_SEQPACKET  = 5,
+       SOCK_DCCP       = 6,
        SOCK_PACKET     = 10,
 };
 
@@ -105,7 +107,7 @@ enum sock_type {
 struct socket {
        socket_state            state;
        unsigned long           flags;
-       struct proto_ops        *ops;
+       const struct proto_ops  *ops;
        struct fasync_struct    *fasync_list;
        struct file             *file;
        struct sock             *sk;
@@ -258,7 +260,7 @@ SOCKCALL_WRAP(name, recvmsg, (struct kiocb *iocb, struct socket *sock, struct ms
 SOCKCALL_WRAP(name, mmap, (struct file *file, struct socket *sock, struct vm_area_struct *vma), \
              (file, sock, vma)) \
              \
-static struct proto_ops name##_ops = {                 \
+static const struct proto_ops name##_ops = {                   \
        .family         = fam,                          \
        .owner          = THIS_MODULE,                  \
        .release        = __lock_##name##_release,      \
@@ -282,5 +284,15 @@ static struct proto_ops name##_ops = {                     \
 #define MODULE_ALIAS_NETPROTO(proto) \
        MODULE_ALIAS("net-pf-" __stringify(proto))
 
+#define MODULE_ALIAS_NET_PF_PROTO(pf, proto) \
+       MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto))
+
+#ifdef CONFIG_SYSCTL
+#include <linux/sysctl.h>
+extern ctl_table net_table[];
+extern int net_msg_cost;
+extern int net_msg_burst;
+#endif
+
 #endif /* __KERNEL__ */
 #endif /* _LINUX_NET_H */