diff options
author | Roland McGrath <roland@gnu.org> | 2000-02-04 06:32:39 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2000-02-04 06:32:39 +0000 |
commit | db9a26cbd125ec106e040ea6084911f9bc0c0198 (patch) | |
tree | 8394aedf0addf9de2afd46d00c192d20d9eb9092 /pfinet/linux-src/net/ipv4/af_inet.c | |
parent | 8880a73970b23f10c720011cb910c0e0e1e02975 (diff) |
2000-02-03 Roland McGrath <roland@baalperazim.frob.com>
Complete overhaul of pfinet based on the IPv4 networking code from the
Linux 2.2.12 kernel sources. This page describes a single unified set
of interdependent changes, but there are so many changes that I have
broken up the log entry into paragraphs based on rough topical
divisions of the work involved.
Subset of verbatim Linux 2.2.12 sources imported on a vendor branch.
* linux-src: New directory, see README for details.
* README: New file, describes linux-src layout and procedures for
tracking Linux source updates.
Light modifications to linux-src files to avoid really bending over
backwards with the glue macros. All modifications to files in
linux-src are conditionalized by #ifdef _HURD_.
* linux-src/include/linux/net.h [_HURD_] (struct socket): New members
refcnt and identity; elide members fasync_list, file.
* linux-src/include/linux/rtnetlink.h [! CONFIG_RTNETLINK]
(rtnl_shlock, rtnl_shunlock) [! _HURD_]: Conditionalize contents on
this, making these no-ops #ifdef _HURD_.
* linux-src/net/core/dev.c [_HURD_] (dev_ioctl): Don't define the
function, instead #define it to 0.
* linux-src/net/ipv4/af_inet.c [_HURD_] (inet_ioctl): Likewise.
* linux-src/net/ipv4/arp.c [_HURD_] (arp_ioctl): Likewise.
* linux-src/net/ipv4/udp.c [_HURD_] (udp_ioctl): Likewise.
* linux-src/net/ipv4/tcp.c [_HURD_] (tcp_ioctl): Likewise.
[_HURD_] (tcp_tiocinq): New function, TIOCINQ code from tcp_ioctl.
* linux-src/net/ipv4/devinet.c [_HURD_] (devinet_ioctl): Don't define
the function, instead #define it to 0.
[_HURD_] (configure_device): New function, cobbled from SIOCSIFADDR
and SIOCSIFNETMASK code from devinet_ioctl.
* glue-include/asm, glue-include/linux: New directories.
These contain glue kludge headers that replace all of the
Linux <asm/*.h> headers except checksum.h, and several of
the Linux <linux/*.h> headers (the remainder come from
linux-src/include/linux and are mostly unmodified).
* glue-include/asm/atomic.h: New file, glue replacement header.
* glue-include/asm/bitops.h: New file, glue replacement header.
* glue-include/asm/byteorder.h: New file, glue replacement header.
* glue-include/asm/checksum.h: New file, glue replacement header.
* glue-include/asm/errno.h: New file, glue replacement header.
* glue-include/asm/hardirq.h: New file, glue replacement header.
* glue-include/asm/init.h: New file, glue replacement header.
* glue-include/asm/segment.h: New file, glue replacement header.
* glue-include/asm/spinlock.h: New file, glue replacement header.
* glue-include/asm/system.h: New file, glue replacement header.
* glue-include/asm/types.h: New file, glue replacement header.
* glue-include/asm/uaccess.h: New file, glue replacement header.
* glue-include/linux/autoconf.h: New file, glue replacement header.
* glue-include/linux/binfmts.h: New file, glue replacement header.
* glue-include/linux/config.h: New file, glue replacement header.
* glue-include/linux/errno.h: New file, glue replacement header.
* glue-include/linux/fcntl.h: New file, glue replacement header.
* glue-include/linux/fs.h: New file, glue replacement header.
* glue-include/linux/in.h: New file, glue replacement header.
* glue-include/linux/in6.h: New file, glue replacement header.
* glue-include/linux/interrupt.h: New file, glue replacement header.
* glue-include/linux/ioctl.h: New file, glue replacement header.
* glue-include/linux/ipv6.h: New file, glue replacement header.
* glue-include/linux/kernel.h: New file, glue replacement header.
* glue-include/linux/limits.h: New file, glue replacement header.
* glue-include/linux/major.h: New file, glue replacement header.
* glue-include/linux/malloc.h: New file, glue replacement header.
* glue-include/linux/mm.h: New file, glue replacement header.
* glue-include/linux/param.h: New file, glue replacement header.
* glue-include/linux/personality.h: New file, glue replacement header.
* glue-include/linux/poll.h: New file, glue replacement header.
* glue-include/linux/proc_fs.h: New file, glue replacement header.
* glue-include/linux/sched.h: New file, glue replacement header.
* glue-include/linux/slab.h: New file, glue replacement header.
* glue-include/linux/socket.h: New file, glue replacement header.
* glue-include/linux/sockios.h: New file, glue replacement header.
* glue-include/linux/stat.h: New file, glue replacement header.
* glue-include/linux/string.h: New file, glue replacement header.
* glue-include/linux/termios.h: New file, glue replacement header.
* glue-include/linux/time.h: New file, glue replacement header.
* glue-include/linux/timer.h: New file, glue replacement header.
* glue-include/linux/timex.h: New file, glue replacement header.
* glue-include/linux/types.h: New file, glue replacement header.
* glue-include/linux/un.h: New file, glue replacement header.
* glue-include/linux/version.h: New file, glue replacement header.
* glue-include/linux/wait.h: New file, glue replacement header.
* kmem_cache.c: New file. Glue code replaces Linux kmem_cache_t et al.
* stubs.c: New file. No-op functions and stub variables for a few
things the Linux networking code needs to link.
* Makefile (core-srcs, arch-lib-srcs, ethernet-srcs, ipv4-srcs): New
variables, listing sources used from linux-src subdirectories.
(LINUXSRCS): Define using those.
(SRCS): Remove devices.c; add kmem_cache.c, stubs.c.
(UNUSEDSRC): Variable removed.
(vpath %.c): Remove vpath for $(srcdir)/linux-inet directory.
Add vpaths for $(srcdir)/linux-src subdirectories.
(CPPFLAGS): Add -D_HURD_SYSTYPE defining it to $(asm_syntax) as a
double-quoted string. Add -I's for glue-include and linux-src/include.
* pfinet.h: Include <sys/socket.h>, and not <linux/netdevice.h>.
(master_device): Remove decl.
(global_lock, packet_queue_lock): Remove common defns.
(global_lock, net_bh_lock): Declare them as externs.
(struct sockaddr): Remove len member, make address member just a
struct sockaddr rather than a 0-length array.
(setup_loopback_device, become_task_protid, become_task): Remove decls.
(ethernet_initialize): Declare it.
(input_work_thread): Remove decl.
(net_bh_thread): Declare it.
(tcp_readable): Remove decl.
(tcp_tiocinq): Declare it.
* config.h: Rewritten based on Linux 2.2.12 set of CONFIG_* options.
(CONFIG_NET, CONFIG_INET, CONFIG_SKB_LARGE): These are the only
Linux config options we set.
(CONFIG_IP_NOSIOCRT): New macro (not a proper config option, but
used conveniently in the code).
* ethernet.c (ethernet_set_multi): Take only one parameter.
Remove assert, since we always get passed IGMP_ALL_HOSTS.
(ethernet_thread): Make static.
(ethernet_demuxer): Use __mutex_lock in place of mutex_lock, so as to
get cthreads instead of linux/spinlock.h glue macros. Lock
net_bh_lock instead of global_lock. Set SKB->protocol with
eth_type_trans before calling netif_rx.
(ethernet_initialize): New function, one-time initialization broken
out of ethernet_open.
(ethernet_open): Ports setup moved to ethernet_initialize.
Don't use `errno' to avoid glue conflicts.
Use get_privileged_ports here to get the master device port, and
deallocate it after calling device_open.
(ethernet_xmit): Use assert_perror. Only one arg to dev_kfree_skb now.
(setup_ethernet_device): Change initializations for structure changes.
Call dev_init_buffers and register_netdevice on the device.
* timer-emul.c (all functions): Use __mutex_lock instead of mutex_lock.
Adjust for renaming of `prevp' member to `prev' in struct timer_list.
(mod_timer): New function.
* socket.c (proto_ops): Variable removed.
(net_families): New variable replaces it.
(sock_register): Rewritten for new calling convention, set
net_families rather than proto_ops.
(make_sock_user, clean_socketport, sock_alloc, sock_release):
Functions moved here from misc.c.
* sched.c (packet_queue_lock): Variable removed.
(net_bh_lock, net_bh_wakeup): New variables.
(current): Variable removed (now a macro in the glue headers).
(interruptible_sleep_on, wake_up_interruptible): Functions removed.
They are replaced by inlines in the glue headers.
(become_task, become_task_protid): Functions removed; they are
replaced by macros in glue-include/linux/sched.h.
(net_bh_worker): New function.
* loopback.c: Completely rewritten, mostly copied from linux-2.2.12's
drivers/net/loopback.c source file.
* io-ops.c (all functions): Use __mutex_lock in place of mutex_lock.
(S_io_write): Call ops->sendmsg instead of ops->write,
which no longer exists. If O_NONBLOCK is set, set MSG_DONTWAIT in
msg_flags.
(S_io_read): Call ops->recvmsg instead of ops->read,
which no longer exists If O_NONBLOCK is set, pass MSG_DONTWAIT.
(S_io_readable): Use USER->sock->data in place of USER->sock->sk.
For SOCK_STREAM and SOCK_SEQPACKET types, call tcp_tiocinq.
(S_io_set_all_openmodes, S_io_get_openmodes, S_io_set_some_openmodes,
S_io_clear_some_openmodes): Member USER->sock->userflags is now
renamed USER->sock->flags.
(S_io_select): Completely rewritten using ops->poll.
(select_wait): Function removed.
(S_io_stat): Set st_mode to reflect S_IFSOCK.
* socket-ops.c (all functions): Use __mutex_lock instead of mutex_lock.
(S_socket_create): Don't set SOCK->ops or call SOCK->ops->create.
Instead, call net_families[PF_INET]->create.
(S_socket_listen): Remove extra checks; just call ops->listen.
(S_socket_accept): Remove extra checks before ops->accept call.
Avoid use of goto.
(S_socket_connect): Remove extra checks; just call ops->connect.
(S_socket_bind): Adjust for struct sock_addr changes.
(S_socket_create_address): Likewise.
(S_socket_whatis_address): Likewise.
(S_socket_connect2): Don't diddle data structures after
ops->socketpair call.
(S_socket_getopt): Use sock_getsockopt if LEVEL is SOL_SOCKET.
Accept any data size, not just sizeof (int).
(S_socket_setopt): Use sock_setsockopt if LEVEL is SOL_SOCKET.
(S_socket_send): Always use ops->sendmsg instead of ops->send or
ops->sendto, which no longer exist. If O_NONBLOCK is set, set
MSG_DONTWAIT in msg_flags.
(S_socket_recv): Always use ops->recvmsg instead of ops->recv, which
no longer exists. If O_NONBLOCK is set, set MSG_DONTWAIT in flags.
Check for error from S_socket_create_address.
* main.c (find_device): Don't try to set ether_dev.pa_mask (it's gone).
(main): Don't call init_devices. Call ethernet_initialize.
Start net_bh_worker instead of input_work_thread. Don't call
setup_loopback_device. Instead, take global_lock, do prepare_current,
and then call sk_init, skb_init, inet_proto_init, and net_dev_init.
Keep global_lock held while calling argp_parse.
Call arrange_shutdown_notification only after all that.
Fix error call for "contacting parent" to pass ERR instead of errno.
* options.c (ADDR): #undef before defining macro.
(parse_opt): #if 0 out EDESTADDRREQ check (I don't understand it).
To apply settings, call configure_devices.
(ADD_ADDR_OPT): #if 0 --address and --netmask options. Needs fixed.
* misc.c (make_sock_user, clean_socketport, sock_alloc, sock_release):
Functions moved to socket.c.
(sock_release_peer): Function removed.
(make_sockaddr_port): Use struct sockaddr_storage to size buffer.
Fix size calculation for new struct sock_addr layout.
Initialize sa_family and sa_len of new struct sock_addr.
Remove the old Linux (2.0.??) network stack and the glue code for it.
* linux-inet, asm, linux: Directories and all files removed.
Some of the new files in glue-include came from the old glue headers
in the asm and linux directories, but most were substantially modified.
* devices.c: File removed. The equivalent glue is now elsewhere.
Diffstat (limited to 'pfinet/linux-src/net/ipv4/af_inet.c')
-rw-r--r-- | pfinet/linux-src/net/ipv4/af_inet.c | 116 |
1 files changed, 61 insertions, 55 deletions
diff --git a/pfinet/linux-src/net/ipv4/af_inet.c b/pfinet/linux-src/net/ipv4/af_inet.c index e37eb6bd..04e05107 100644 --- a/pfinet/linux-src/net/ipv4/af_inet.c +++ b/pfinet/linux-src/net/ipv4/af_inet.c @@ -23,10 +23,10 @@ * when accept() ed * Alan Cox : Semantics of SO_LINGER aren't state moved * to close when you look carefully. With - * this fixed and the accept bug fixed + * this fixed and the accept bug fixed * some RPC stuff seems happier. * Niibe Yutaka : 4.4BSD style write async I/O - * Alan Cox, + * Alan Cox, * Tony Gale : Fixed reuse semantics. * Alan Cox : bind() shouldn't abort existing but dead * sockets. Stops FTP netin:.. I hope. @@ -141,7 +141,7 @@ int (*rarp_ioctl_hook)(unsigned int,void*) = NULL; /* * Destroy an AF_INET socket */ - + static __inline__ void kill_sk_queues(struct sock *sk) { struct sk_buff *skb; @@ -177,12 +177,12 @@ static __inline__ void kill_sk_later(struct sock *sk) { /* this should never happen. */ /* actually it can if an ack has just been sent. */ - /* + /* * It's more normal than that... * It can happen because a skb is still in the device queues * [PR] */ - + NETDEBUG(printk(KERN_DEBUG "Socket destroy delayed (r=%d w=%d)\n", atomic_read(&sk->rmem_alloc), atomic_read(&sk->wmem_alloc))); @@ -223,12 +223,12 @@ void destroy_sock(struct sock *sk) * socket object. Mostly it punts to the subprotocols of IP to do * the work. */ - + /* * Set socket options on an inet socket. */ - + int inet_setsockopt(struct socket *sock, int level, int optname, char *optval, int optlen) { @@ -275,7 +275,7 @@ static int inet_autobind(struct sock *sk) /* * Move a socket into listening state. */ - + int inet_listen(struct socket *sock, int backlog) { struct sock *sk = sock->sk; @@ -330,7 +330,7 @@ static int inet_create(struct socket *sock, int protocol) /* Compatibility */ if (sock->type == SOCK_PACKET) { - static int warned; + static int warned; if (net_families[PF_PACKET]==NULL) { #if defined(CONFIG_KMOD) && defined(CONFIG_PACKET_MODULE) @@ -348,7 +348,7 @@ static int inet_create(struct socket *sock, int protocol) sock->state = SS_UNCONNECTED; sk = sk_alloc(PF_INET, GFP_KERNEL, 1); - if (sk == NULL) + if (sk == NULL) goto do_oom; switch (sock->type) { @@ -392,13 +392,13 @@ static int inet_create(struct socket *sock, int protocol) } sock_init_data(sock,sk); - + sk->destruct = NULL; sk->zapped=0; #ifdef CONFIG_TCP_NAGLE_OFF sk->nonagle = 1; -#endif +#endif sk->family = PF_INET; sk->protocol = protocol; @@ -414,7 +414,7 @@ static int inet_create(struct socket *sock, int protocol) sk->ip_mc_ttl=1; sk->ip_mc_index=0; sk->ip_mc_list=NULL; - + if (sk->num) { /* It assumes that any protocol which allows * the user to assign a number at socket @@ -459,7 +459,7 @@ do_oom: * function we are destroying the object and from then on nobody * should refer to it. */ - + int inet_release(struct socket *sock, struct socket *peersock) { struct sock *sk = sock->sk; @@ -505,13 +505,13 @@ static int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) /* If the socket has its own bind function then use it. (RAW) */ if(sk->prot->bind) return sk->prot->bind(sk, uaddr, addr_len); - + /* Check these errors (active socket, bad address length, double bind). */ if ((sk->state != TCP_CLOSE) || (addr_len < sizeof(struct sockaddr_in)) || (sk->num != 0)) return -EINVAL; - + chk_addr_ret = inet_addr_type(addr->sin_addr.s_addr); if (addr->sin_addr.s_addr != 0 && chk_addr_ret != RTN_LOCAL && chk_addr_ret != RTN_MULTICAST && chk_addr_ret != RTN_BROADCAST) { @@ -538,10 +538,10 @@ static int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) /* The kernel masquerader needs some ports. */ if((snum >= PORT_MASQ_BEGIN) && (snum <= PORT_MASQ_END)) return -EADDRINUSE; -#endif +#endif if (snum && snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE)) return(-EACCES); - + /* Make sure we are allowed to bind here. */ if (sk->prot->get_port(sk, snum) != 0) return -EADDRINUSE; @@ -564,10 +564,10 @@ int inet_dgram_connect(struct socket *sock, struct sockaddr * uaddr, if (inet_autobind(sk) != 0) return(-EAGAIN); - if (sk->prot->connect == NULL) + if (sk->prot->connect == NULL) return(-EOPNOTSUPP); err = sk->prot->connect(sk, (struct sockaddr *)uaddr, addr_len); - if (err < 0) + if (err < 0) return(err); return(0); } @@ -594,7 +594,7 @@ static void inet_wait_for_connect(struct sock *sk) * Connect to a remote host. There is regrettably still a little * TCP 'magic' in here. */ - + int inet_stream_connect(struct socket *sock, struct sockaddr * uaddr, int addr_len, int flags) { @@ -609,7 +609,7 @@ int inet_stream_connect(struct socket *sock, struct sockaddr * uaddr, if(sock->state == SS_CONNECTING) { /* Note: tcp_connected contains SYN_RECV, which may cause - bogus results here. -AK */ + bogus results here. -AK */ if(tcp_connected(sk->state)) { sock->state = SS_CONNECTED; return 0; @@ -619,7 +619,7 @@ int inet_stream_connect(struct socket *sock, struct sockaddr * uaddr, if (flags & O_NONBLOCK) return -EALREADY; } else { - if (sk->prot->connect == NULL) + if (sk->prot->connect == NULL) return(-EOPNOTSUPP); /* We may need to bind the socket. */ @@ -635,11 +635,11 @@ int inet_stream_connect(struct socket *sock, struct sockaddr * uaddr, return(err); sock->state = SS_CONNECTING; } - + if (sk->state > TCP_FIN_WAIT2 && sock->state == SS_CONNECTING) goto sock_error; - if (sk->state != TCP_ESTABLISHED && (flags & O_NONBLOCK)) + if (sk->state != TCP_ESTABLISHED && (flags & O_NONBLOCK)) return (-EINPROGRESS); if (sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV) { @@ -650,15 +650,15 @@ int inet_stream_connect(struct socket *sock, struct sockaddr * uaddr, sock->state = SS_CONNECTED; if ((sk->state != TCP_ESTABLISHED) && sk->err) - goto sock_error; + goto sock_error; return(0); -sock_error: +sock_error: /* This is ugly but needed to fix a race in the ICMP error handler */ - if (sk->zapped && sk->state != TCP_CLOSE) { - lock_sock(sk); + if (sk->zapped && sk->state != TCP_CLOSE) { + lock_sock(sk); tcp_set_state(sk, TCP_CLOSE); - release_sock(sk); + release_sock(sk); sk->zapped = 0; } sock->state = SS_UNCONNECTED; @@ -735,16 +735,16 @@ do_err: /* * This does both peername and sockname. */ - + static int inet_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len, int peer) { struct sock *sk = sock->sk; struct sockaddr_in *sin = (struct sockaddr_in *)uaddr; - + sin->sin_family = AF_INET; if (peer) { - if (!tcp_connected(sk->state)) + if (!tcp_connected(sk->state)) return(-ENOTCONN); sin->sin_port = sk->dport; sin->sin_addr.s_addr = sk->daddr; @@ -767,10 +767,10 @@ int inet_recvmsg(struct socket *sock, struct msghdr *msg, int size, struct sock *sk = sock->sk; int addr_len = 0; int err; - + if (sock->flags & SO_ACCEPTCON) return(-EINVAL); - if (sk->prot->recvmsg == NULL) + if (sk->prot->recvmsg == NULL) return(-EOPNOTSUPP); /* We may need to bind the socket. */ if (inet_autobind(sk) != 0) @@ -793,7 +793,7 @@ int inet_sendmsg(struct socket *sock, struct msghdr *msg, int size, send_sig(SIGPIPE, current, 1); return(-EPIPE); } - if (sk->prot->sendmsg == NULL) + if (sk->prot->sendmsg == NULL) return(-EOPNOTSUPP); if(sk->err) return sock_error(sk); @@ -822,7 +822,7 @@ int inet_shutdown(struct socket *sock, int how) return(-ENOTCONN); if (sock->state == SS_CONNECTING && sk->state == TCP_ESTABLISHED) sock->state = SS_CONNECTED; - if (!tcp_connected(sk->state)) + if (!tcp_connected(sk->state)) return(-ENOTCONN); sk->shutdown |= how; if (sk->prot->shutdown) @@ -842,6 +842,10 @@ unsigned int inet_poll(struct file * file, struct socket *sock, poll_table *wait return sk->prot->poll(file, sock, wait); } +#ifdef _HURD_ +#define inet_ioctl 0 +#else + /* * ioctl() calls you can issue on an INET socket. Most of these are * device configuration and stuff and very rarely used. Some ioctls @@ -858,14 +862,14 @@ static int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) int err; int pid; - switch(cmd) + switch(cmd) { case FIOSETOWN: case SIOCSPGRP: err = get_user(pid, (int *) arg); if (err) - return err; - if (current->pid != pid && current->pgrp != -pid && + return err; + if (current->pid != pid && current->pgrp != -pid && !capable(CAP_NET_ADMIN)) return -EPERM; sk->proc = pid; @@ -905,18 +909,18 @@ static int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) case SIOCSIFNETMASK: case SIOCGIFDSTADDR: case SIOCSIFDSTADDR: - case SIOCSIFPFLAGS: - case SIOCGIFPFLAGS: + case SIOCSIFPFLAGS: + case SIOCGIFPFLAGS: case SIOCSIFFLAGS: return(devinet_ioctl(cmd,(void *) arg)); case SIOCGIFBR: case SIOCSIFBR: -#ifdef CONFIG_BRIDGE +#ifdef CONFIG_BRIDGE return(br_ioctl(cmd,(void *) arg)); #else return -ENOPKG; -#endif - +#endif + case SIOCADDDLCI: case SIOCDELDLCI: #ifdef CONFIG_DLCI @@ -946,13 +950,15 @@ static int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) #endif if (sk->prot->ioctl==NULL || (err=sk->prot->ioctl(sk, cmd, arg))==-ENOIOCTLCMD) - return(dev_ioctl(cmd,(void *) arg)); + return(dev_ioctl(cmd,(void *) arg)); return err; } /*NOTREACHED*/ return(0); } +#endif + struct proto_ops inet_stream_ops = { PF_INET, @@ -962,7 +968,7 @@ struct proto_ops inet_stream_ops = { inet_stream_connect, sock_no_socketpair, inet_accept, - inet_getname, + inet_getname, inet_poll, inet_ioctl, inet_listen, @@ -983,7 +989,7 @@ struct proto_ops inet_dgram_ops = { inet_dgram_connect, sock_no_socketpair, sock_no_accept, - inet_getname, + inet_getname, datagram_poll, inet_ioctl, sock_no_listen, @@ -1053,9 +1059,9 @@ extern void tcp_v4_init(struct net_proto_family *); /* - * Called by socket.c on kernel startup. + * Called by socket.c on kernel startup. */ - + __initfunc(void inet_proto_init(struct net_proto *pro)) { struct sk_buff *dummy_skb; @@ -1070,17 +1076,17 @@ __initfunc(void inet_proto_init(struct net_proto *pro)) } /* - * Tell SOCKET that we are alive... + * Tell SOCKET that we are alive... */ - + (void) sock_register(&inet_family_ops); /* - * Add all the protocols. + * Add all the protocols. */ printk(KERN_INFO "IP Protocols: "); - for(p = inet_protocol_base; p != NULL;) + for(p = inet_protocol_base; p != NULL;) { struct inet_protocol *tmp = (struct inet_protocol *) p->next; inet_add_protocol(p); @@ -1132,7 +1138,7 @@ __initfunc(void inet_proto_init(struct net_proto *pro)) #ifdef CONFIG_IP_MASQUERADE ip_masq_init(); #endif - + /* * Initialise the multicast router */ |