11da177e4SLinus Torvalds /* 21da177e4SLinus Torvalds * NET An implementation of the SOCKET network access protocol. 31da177e4SLinus Torvalds * This is the master header file for the Linux NET layer, 41da177e4SLinus Torvalds * or, in plain English: the networking handling part of the 51da177e4SLinus Torvalds * kernel. 61da177e4SLinus Torvalds * 71da177e4SLinus Torvalds * Version: @(#)net.h 1.0.3 05/25/93 81da177e4SLinus Torvalds * 91da177e4SLinus Torvalds * Authors: Orest Zborowski, <obz@Kodak.COM> 1002c30a84SJesper Juhl * Ross Biro 111da177e4SLinus Torvalds * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 121da177e4SLinus Torvalds * 131da177e4SLinus Torvalds * This program is free software; you can redistribute it and/or 141da177e4SLinus Torvalds * modify it under the terms of the GNU General Public License 151da177e4SLinus Torvalds * as published by the Free Software Foundation; either version 161da177e4SLinus Torvalds * 2 of the License, or (at your option) any later version. 171da177e4SLinus Torvalds */ 181da177e4SLinus Torvalds #ifndef _LINUX_NET_H 191da177e4SLinus Torvalds #define _LINUX_NET_H 201da177e4SLinus Torvalds 211da177e4SLinus Torvalds #include <linux/wait.h> 221da177e4SLinus Torvalds #include <asm/socket.h> 231da177e4SLinus Torvalds 241da177e4SLinus Torvalds struct poll_table_struct; 251da177e4SLinus Torvalds struct inode; 261b8d7ae4SEric W. Biederman struct net; 271da177e4SLinus Torvalds 2817926a79SDavid Howells #define NPROTO 34 /* should be enough for now.. */ 291da177e4SLinus Torvalds 301da177e4SLinus Torvalds #define SYS_SOCKET 1 /* sys_socket(2) */ 311da177e4SLinus Torvalds #define SYS_BIND 2 /* sys_bind(2) */ 321da177e4SLinus Torvalds #define SYS_CONNECT 3 /* sys_connect(2) */ 331da177e4SLinus Torvalds #define SYS_LISTEN 4 /* sys_listen(2) */ 341da177e4SLinus Torvalds #define SYS_ACCEPT 5 /* sys_accept(2) */ 351da177e4SLinus Torvalds #define SYS_GETSOCKNAME 6 /* sys_getsockname(2) */ 361da177e4SLinus Torvalds #define SYS_GETPEERNAME 7 /* sys_getpeername(2) */ 371da177e4SLinus Torvalds #define SYS_SOCKETPAIR 8 /* sys_socketpair(2) */ 381da177e4SLinus Torvalds #define SYS_SEND 9 /* sys_send(2) */ 391da177e4SLinus Torvalds #define SYS_RECV 10 /* sys_recv(2) */ 401da177e4SLinus Torvalds #define SYS_SENDTO 11 /* sys_sendto(2) */ 411da177e4SLinus Torvalds #define SYS_RECVFROM 12 /* sys_recvfrom(2) */ 421da177e4SLinus Torvalds #define SYS_SHUTDOWN 13 /* sys_shutdown(2) */ 431da177e4SLinus Torvalds #define SYS_SETSOCKOPT 14 /* sys_setsockopt(2) */ 441da177e4SLinus Torvalds #define SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */ 451da177e4SLinus Torvalds #define SYS_SENDMSG 16 /* sys_sendmsg(2) */ 461da177e4SLinus Torvalds #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ 471da177e4SLinus Torvalds 481da177e4SLinus Torvalds typedef enum { 491da177e4SLinus Torvalds SS_FREE = 0, /* not allocated */ 501da177e4SLinus Torvalds SS_UNCONNECTED, /* unconnected to any socket */ 511da177e4SLinus Torvalds SS_CONNECTING, /* in process of connecting */ 521da177e4SLinus Torvalds SS_CONNECTED, /* connected to socket */ 531da177e4SLinus Torvalds SS_DISCONNECTING /* in process of disconnecting */ 541da177e4SLinus Torvalds } socket_state; 551da177e4SLinus Torvalds 561da177e4SLinus Torvalds #define __SO_ACCEPTCON (1 << 16) /* performed a listen */ 571da177e4SLinus Torvalds 581da177e4SLinus Torvalds #ifdef __KERNEL__ 59eacf17bdSDavid Woodhouse #include <linux/stringify.h> 60cb4db4c2SDavid Woodhouse #include <linux/random.h> 611da177e4SLinus Torvalds 621da177e4SLinus Torvalds #define SOCK_ASYNC_NOSPACE 0 631da177e4SLinus Torvalds #define SOCK_ASYNC_WAITDATA 1 641da177e4SLinus Torvalds #define SOCK_NOSPACE 2 651da177e4SLinus Torvalds #define SOCK_PASSCRED 3 66877ce7c1SCatherine Zhang #define SOCK_PASSSEC 4 671da177e4SLinus Torvalds 681da177e4SLinus Torvalds #ifndef ARCH_HAS_SOCKET_TYPES 694dc3b16bSPavel Pisa /** 704dc3b16bSPavel Pisa * enum sock_type - Socket types 714dc3b16bSPavel Pisa * @SOCK_STREAM: stream (connection) socket 724dc3b16bSPavel Pisa * @SOCK_DGRAM: datagram (conn.less) socket 734dc3b16bSPavel Pisa * @SOCK_RAW: raw socket 744dc3b16bSPavel Pisa * @SOCK_RDM: reliably-delivered message 754dc3b16bSPavel Pisa * @SOCK_SEQPACKET: sequential packet socket 768f2709b5SRandy Dunlap * @SOCK_DCCP: Datagram Congestion Control Protocol socket 774dc3b16bSPavel Pisa * @SOCK_PACKET: linux specific way of getting packets at the dev level. 784dc3b16bSPavel Pisa * For writing rarp and other similar things on the user level. 791da177e4SLinus Torvalds * 801da177e4SLinus Torvalds * When adding some new socket type please 811da177e4SLinus Torvalds * grep ARCH_HAS_SOCKET_TYPE include/asm-* /socket.h, at least MIPS 821da177e4SLinus Torvalds * overrides this enum for binary compat reasons. 831da177e4SLinus Torvalds */ 841da177e4SLinus Torvalds enum sock_type { 851da177e4SLinus Torvalds SOCK_STREAM = 1, 861da177e4SLinus Torvalds SOCK_DGRAM = 2, 871da177e4SLinus Torvalds SOCK_RAW = 3, 881da177e4SLinus Torvalds SOCK_RDM = 4, 891da177e4SLinus Torvalds SOCK_SEQPACKET = 5, 907c657876SArnaldo Carvalho de Melo SOCK_DCCP = 6, 911da177e4SLinus Torvalds SOCK_PACKET = 10, 921da177e4SLinus Torvalds }; 931da177e4SLinus Torvalds 941da177e4SLinus Torvalds #define SOCK_MAX (SOCK_PACKET + 1) 951da177e4SLinus Torvalds 961da177e4SLinus Torvalds #endif /* ARCH_HAS_SOCKET_TYPES */ 971da177e4SLinus Torvalds 981da177e4SLinus Torvalds /** 991da177e4SLinus Torvalds * struct socket - general BSD socket 1004dc3b16bSPavel Pisa * @state: socket state (%SS_CONNECTED, etc) 1014dc3b16bSPavel Pisa * @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc) 1024dc3b16bSPavel Pisa * @ops: protocol specific socket operations 1034dc3b16bSPavel Pisa * @fasync_list: Asynchronous wake up list 1044dc3b16bSPavel Pisa * @file: File back pointer for gc 1054dc3b16bSPavel Pisa * @sk: internal networking protocol agnostic socket representation 1064dc3b16bSPavel Pisa * @wait: wait queue for several uses 1074dc3b16bSPavel Pisa * @type: socket type (%SOCK_STREAM, etc) 1081da177e4SLinus Torvalds */ 1091da177e4SLinus Torvalds struct socket { 1101da177e4SLinus Torvalds socket_state state; 1111da177e4SLinus Torvalds unsigned long flags; 11290ddc4f0SEric Dumazet const struct proto_ops *ops; 1131da177e4SLinus Torvalds struct fasync_struct *fasync_list; 1141da177e4SLinus Torvalds struct file *file; 1151da177e4SLinus Torvalds struct sock *sk; 1161da177e4SLinus Torvalds wait_queue_head_t wait; 1171da177e4SLinus Torvalds short type; 1181da177e4SLinus Torvalds }; 1191da177e4SLinus Torvalds 1201da177e4SLinus Torvalds struct vm_area_struct; 1211da177e4SLinus Torvalds struct page; 1221da177e4SLinus Torvalds struct kiocb; 1231da177e4SLinus Torvalds struct sockaddr; 1241da177e4SLinus Torvalds struct msghdr; 1251da177e4SLinus Torvalds struct module; 1261da177e4SLinus Torvalds 1271da177e4SLinus Torvalds struct proto_ops { 1281da177e4SLinus Torvalds int family; 1291da177e4SLinus Torvalds struct module *owner; 1301da177e4SLinus Torvalds int (*release) (struct socket *sock); 1311da177e4SLinus Torvalds int (*bind) (struct socket *sock, 1321da177e4SLinus Torvalds struct sockaddr *myaddr, 1331da177e4SLinus Torvalds int sockaddr_len); 1341da177e4SLinus Torvalds int (*connect) (struct socket *sock, 1351da177e4SLinus Torvalds struct sockaddr *vaddr, 1361da177e4SLinus Torvalds int sockaddr_len, int flags); 1371da177e4SLinus Torvalds int (*socketpair)(struct socket *sock1, 1381da177e4SLinus Torvalds struct socket *sock2); 1391da177e4SLinus Torvalds int (*accept) (struct socket *sock, 1401da177e4SLinus Torvalds struct socket *newsock, int flags); 1411da177e4SLinus Torvalds int (*getname) (struct socket *sock, 1421da177e4SLinus Torvalds struct sockaddr *addr, 1431da177e4SLinus Torvalds int *sockaddr_len, int peer); 1441da177e4SLinus Torvalds unsigned int (*poll) (struct file *file, struct socket *sock, 1451da177e4SLinus Torvalds struct poll_table_struct *wait); 1461da177e4SLinus Torvalds int (*ioctl) (struct socket *sock, unsigned int cmd, 1471da177e4SLinus Torvalds unsigned long arg); 14889bbfc95SShaun Pereira int (*compat_ioctl) (struct socket *sock, unsigned int cmd, 14989bbfc95SShaun Pereira unsigned long arg); 1501da177e4SLinus Torvalds int (*listen) (struct socket *sock, int len); 1511da177e4SLinus Torvalds int (*shutdown) (struct socket *sock, int flags); 1521da177e4SLinus Torvalds int (*setsockopt)(struct socket *sock, int level, 1531da177e4SLinus Torvalds int optname, char __user *optval, int optlen); 1541da177e4SLinus Torvalds int (*getsockopt)(struct socket *sock, int level, 1551da177e4SLinus Torvalds int optname, char __user *optval, int __user *optlen); 1563fdadf7dSDmitry Mishin int (*compat_setsockopt)(struct socket *sock, int level, 1573fdadf7dSDmitry Mishin int optname, char __user *optval, int optlen); 1583fdadf7dSDmitry Mishin int (*compat_getsockopt)(struct socket *sock, int level, 1593fdadf7dSDmitry Mishin int optname, char __user *optval, int __user *optlen); 1601da177e4SLinus Torvalds int (*sendmsg) (struct kiocb *iocb, struct socket *sock, 1611da177e4SLinus Torvalds struct msghdr *m, size_t total_len); 1621da177e4SLinus Torvalds int (*recvmsg) (struct kiocb *iocb, struct socket *sock, 1631da177e4SLinus Torvalds struct msghdr *m, size_t total_len, 1641da177e4SLinus Torvalds int flags); 1651da177e4SLinus Torvalds int (*mmap) (struct file *file, struct socket *sock, 1661da177e4SLinus Torvalds struct vm_area_struct * vma); 1671da177e4SLinus Torvalds ssize_t (*sendpage) (struct socket *sock, struct page *page, 1681da177e4SLinus Torvalds int offset, size_t size, int flags); 1691da177e4SLinus Torvalds }; 1701da177e4SLinus Torvalds 1711da177e4SLinus Torvalds struct net_proto_family { 1721da177e4SLinus Torvalds int family; 1731b8d7ae4SEric W. Biederman int (*create)(struct net *net, struct socket *sock, int protocol); 1741da177e4SLinus Torvalds struct module *owner; 1751da177e4SLinus Torvalds }; 1761da177e4SLinus Torvalds 1771da177e4SLinus Torvalds struct iovec; 1781da177e4SLinus Torvalds struct kvec; 1791da177e4SLinus Torvalds 1801da177e4SLinus Torvalds extern int sock_wake_async(struct socket *sk, int how, int band); 181f0fd27d4SStephen Hemminger extern int sock_register(const struct net_proto_family *fam); 182f0fd27d4SStephen Hemminger extern void sock_unregister(int family); 1831da177e4SLinus Torvalds extern int sock_create(int family, int type, int proto, 1841da177e4SLinus Torvalds struct socket **res); 1851da177e4SLinus Torvalds extern int sock_create_kern(int family, int type, int proto, 1861da177e4SLinus Torvalds struct socket **res); 1871da177e4SLinus Torvalds extern int sock_create_lite(int family, int type, int proto, 1881da177e4SLinus Torvalds struct socket **res); 1891da177e4SLinus Torvalds extern void sock_release(struct socket *sock); 1901da177e4SLinus Torvalds extern int sock_sendmsg(struct socket *sock, struct msghdr *msg, 1911da177e4SLinus Torvalds size_t len); 1921da177e4SLinus Torvalds extern int sock_recvmsg(struct socket *sock, struct msghdr *msg, 1931da177e4SLinus Torvalds size_t size, int flags); 1941da177e4SLinus Torvalds extern int sock_map_fd(struct socket *sock); 1951da177e4SLinus Torvalds extern struct socket *sockfd_lookup(int fd, int *err); 1961da177e4SLinus Torvalds #define sockfd_put(sock) fput(sock->file) 1971da177e4SLinus Torvalds extern int net_ratelimit(void); 198aaa248f6SStephen Hemminger 199aaa248f6SStephen Hemminger #define net_random() random32() 200a64b78a0SAl Viro #define net_srandom(seed) srandom32((__force u32)seed) 2011da177e4SLinus Torvalds 2021da177e4SLinus Torvalds extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, 2031da177e4SLinus Torvalds struct kvec *vec, size_t num, size_t len); 2041da177e4SLinus Torvalds extern int kernel_recvmsg(struct socket *sock, struct msghdr *msg, 2051da177e4SLinus Torvalds struct kvec *vec, size_t num, 2061da177e4SLinus Torvalds size_t len, int flags); 2071da177e4SLinus Torvalds 208ac5a488eSSridhar Samudrala extern int kernel_bind(struct socket *sock, struct sockaddr *addr, 209ac5a488eSSridhar Samudrala int addrlen); 210ac5a488eSSridhar Samudrala extern int kernel_listen(struct socket *sock, int backlog); 211ac5a488eSSridhar Samudrala extern int kernel_accept(struct socket *sock, struct socket **newsock, 212ac5a488eSSridhar Samudrala int flags); 213ac5a488eSSridhar Samudrala extern int kernel_connect(struct socket *sock, struct sockaddr *addr, 214ac5a488eSSridhar Samudrala int addrlen, int flags); 215ac5a488eSSridhar Samudrala extern int kernel_getsockname(struct socket *sock, struct sockaddr *addr, 216ac5a488eSSridhar Samudrala int *addrlen); 217ac5a488eSSridhar Samudrala extern int kernel_getpeername(struct socket *sock, struct sockaddr *addr, 218ac5a488eSSridhar Samudrala int *addrlen); 219ac5a488eSSridhar Samudrala extern int kernel_getsockopt(struct socket *sock, int level, int optname, 220ac5a488eSSridhar Samudrala char *optval, int *optlen); 221ac5a488eSSridhar Samudrala extern int kernel_setsockopt(struct socket *sock, int level, int optname, 222ac5a488eSSridhar Samudrala char *optval, int optlen); 223ac5a488eSSridhar Samudrala extern int kernel_sendpage(struct socket *sock, struct page *page, int offset, 224ac5a488eSSridhar Samudrala size_t size, int flags); 225ac5a488eSSridhar Samudrala extern int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg); 226ac5a488eSSridhar Samudrala 2271da177e4SLinus Torvalds #ifndef CONFIG_SMP 2281da177e4SLinus Torvalds #define SOCKOPS_WRAPPED(name) name 2291da177e4SLinus Torvalds #define SOCKOPS_WRAP(name, fam) 2301da177e4SLinus Torvalds #else 2311da177e4SLinus Torvalds 2321da177e4SLinus Torvalds #define SOCKOPS_WRAPPED(name) __unlocked_##name 2331da177e4SLinus Torvalds 2341da177e4SLinus Torvalds #define SOCKCALL_WRAP(name, call, parms, args) \ 2351da177e4SLinus Torvalds static int __lock_##name##_##call parms \ 2361da177e4SLinus Torvalds { \ 2371da177e4SLinus Torvalds int ret; \ 2381da177e4SLinus Torvalds lock_kernel(); \ 2391da177e4SLinus Torvalds ret = __unlocked_##name##_ops.call args ;\ 2401da177e4SLinus Torvalds unlock_kernel(); \ 2411da177e4SLinus Torvalds return ret; \ 2421da177e4SLinus Torvalds } 2431da177e4SLinus Torvalds 2441da177e4SLinus Torvalds #define SOCKCALL_UWRAP(name, call, parms, args) \ 2451da177e4SLinus Torvalds static unsigned int __lock_##name##_##call parms \ 2461da177e4SLinus Torvalds { \ 2471da177e4SLinus Torvalds int ret; \ 2481da177e4SLinus Torvalds lock_kernel(); \ 2491da177e4SLinus Torvalds ret = __unlocked_##name##_ops.call args ;\ 2501da177e4SLinus Torvalds unlock_kernel(); \ 2511da177e4SLinus Torvalds return ret; \ 2521da177e4SLinus Torvalds } 2531da177e4SLinus Torvalds 2541da177e4SLinus Torvalds 2551da177e4SLinus Torvalds #define SOCKOPS_WRAP(name, fam) \ 2561da177e4SLinus Torvalds SOCKCALL_WRAP(name, release, (struct socket *sock), (sock)) \ 2571da177e4SLinus Torvalds SOCKCALL_WRAP(name, bind, (struct socket *sock, struct sockaddr *uaddr, int addr_len), \ 2581da177e4SLinus Torvalds (sock, uaddr, addr_len)) \ 2591da177e4SLinus Torvalds SOCKCALL_WRAP(name, connect, (struct socket *sock, struct sockaddr * uaddr, \ 2601da177e4SLinus Torvalds int addr_len, int flags), \ 2611da177e4SLinus Torvalds (sock, uaddr, addr_len, flags)) \ 2621da177e4SLinus Torvalds SOCKCALL_WRAP(name, socketpair, (struct socket *sock1, struct socket *sock2), \ 2631da177e4SLinus Torvalds (sock1, sock2)) \ 2641da177e4SLinus Torvalds SOCKCALL_WRAP(name, accept, (struct socket *sock, struct socket *newsock, \ 2651da177e4SLinus Torvalds int flags), (sock, newsock, flags)) \ 2661da177e4SLinus Torvalds SOCKCALL_WRAP(name, getname, (struct socket *sock, struct sockaddr *uaddr, \ 2671da177e4SLinus Torvalds int *addr_len, int peer), (sock, uaddr, addr_len, peer)) \ 2681da177e4SLinus Torvalds SOCKCALL_UWRAP(name, poll, (struct file *file, struct socket *sock, struct poll_table_struct *wait), \ 2691da177e4SLinus Torvalds (file, sock, wait)) \ 2701da177e4SLinus Torvalds SOCKCALL_WRAP(name, ioctl, (struct socket *sock, unsigned int cmd, \ 2711da177e4SLinus Torvalds unsigned long arg), (sock, cmd, arg)) \ 27289bbfc95SShaun Pereira SOCKCALL_WRAP(name, compat_ioctl, (struct socket *sock, unsigned int cmd, \ 27389bbfc95SShaun Pereira unsigned long arg), (sock, cmd, arg)) \ 2741da177e4SLinus Torvalds SOCKCALL_WRAP(name, listen, (struct socket *sock, int len), (sock, len)) \ 2751da177e4SLinus Torvalds SOCKCALL_WRAP(name, shutdown, (struct socket *sock, int flags), (sock, flags)) \ 2761da177e4SLinus Torvalds SOCKCALL_WRAP(name, setsockopt, (struct socket *sock, int level, int optname, \ 2771da177e4SLinus Torvalds char __user *optval, int optlen), (sock, level, optname, optval, optlen)) \ 2781da177e4SLinus Torvalds SOCKCALL_WRAP(name, getsockopt, (struct socket *sock, int level, int optname, \ 2791da177e4SLinus Torvalds char __user *optval, int __user *optlen), (sock, level, optname, optval, optlen)) \ 2801da177e4SLinus Torvalds SOCKCALL_WRAP(name, sendmsg, (struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len), \ 2811da177e4SLinus Torvalds (iocb, sock, m, len)) \ 2821da177e4SLinus Torvalds SOCKCALL_WRAP(name, recvmsg, (struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len, int flags), \ 2831da177e4SLinus Torvalds (iocb, sock, m, len, flags)) \ 2841da177e4SLinus Torvalds SOCKCALL_WRAP(name, mmap, (struct file *file, struct socket *sock, struct vm_area_struct *vma), \ 2851da177e4SLinus Torvalds (file, sock, vma)) \ 2861da177e4SLinus Torvalds \ 28790ddc4f0SEric Dumazet static const struct proto_ops name##_ops = { \ 2881da177e4SLinus Torvalds .family = fam, \ 2891da177e4SLinus Torvalds .owner = THIS_MODULE, \ 2901da177e4SLinus Torvalds .release = __lock_##name##_release, \ 2911da177e4SLinus Torvalds .bind = __lock_##name##_bind, \ 2921da177e4SLinus Torvalds .connect = __lock_##name##_connect, \ 2931da177e4SLinus Torvalds .socketpair = __lock_##name##_socketpair, \ 2941da177e4SLinus Torvalds .accept = __lock_##name##_accept, \ 2951da177e4SLinus Torvalds .getname = __lock_##name##_getname, \ 2961da177e4SLinus Torvalds .poll = __lock_##name##_poll, \ 2971da177e4SLinus Torvalds .ioctl = __lock_##name##_ioctl, \ 29889bbfc95SShaun Pereira .compat_ioctl = __lock_##name##_compat_ioctl, \ 2991da177e4SLinus Torvalds .listen = __lock_##name##_listen, \ 3001da177e4SLinus Torvalds .shutdown = __lock_##name##_shutdown, \ 3011da177e4SLinus Torvalds .setsockopt = __lock_##name##_setsockopt, \ 3021da177e4SLinus Torvalds .getsockopt = __lock_##name##_getsockopt, \ 3031da177e4SLinus Torvalds .sendmsg = __lock_##name##_sendmsg, \ 3041da177e4SLinus Torvalds .recvmsg = __lock_##name##_recvmsg, \ 3051da177e4SLinus Torvalds .mmap = __lock_##name##_mmap, \ 3061da177e4SLinus Torvalds }; 30789bbfc95SShaun Pereira 3081da177e4SLinus Torvalds #endif 3091da177e4SLinus Torvalds 3101da177e4SLinus Torvalds #define MODULE_ALIAS_NETPROTO(proto) \ 3111da177e4SLinus Torvalds MODULE_ALIAS("net-pf-" __stringify(proto)) 3121da177e4SLinus Torvalds 3134fdb3bb7SHarald Welte #define MODULE_ALIAS_NET_PF_PROTO(pf, proto) \ 3144fdb3bb7SHarald Welte MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto)) 3154fdb3bb7SHarald Welte 316*305e1e96SJean Delvare #define MODULE_ALIAS_NET_PF_PROTO_TYPE(pf, proto, type) \ 317*305e1e96SJean Delvare MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \ 318*305e1e96SJean Delvare "-type-" __stringify(type)) 319*305e1e96SJean Delvare 32020380731SArnaldo Carvalho de Melo #ifdef CONFIG_SYSCTL 32120380731SArnaldo Carvalho de Melo #include <linux/sysctl.h> 32220380731SArnaldo Carvalho de Melo extern ctl_table net_table[]; 32320380731SArnaldo Carvalho de Melo extern int net_msg_cost; 32420380731SArnaldo Carvalho de Melo extern int net_msg_burst; 32520380731SArnaldo Carvalho de Melo #endif 32620380731SArnaldo Carvalho de Melo 3271da177e4SLinus Torvalds #endif /* __KERNEL__ */ 3281da177e4SLinus Torvalds #endif /* _LINUX_NET_H */ 329