patch-2.1.53 linux/net/ipv6/af_inet6.c

Next file: linux/net/ipv6/tcp_ipv6.c
Previous file: linux/net/ipv6/addrconf.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.52/linux/net/ipv6/af_inet6.c linux/net/ipv6/af_inet6.c
@@ -7,7 +7,7 @@
  *
  *	Adapted from linux/net/ipv4/af_inet.c
  *
- *	$Id: af_inet6.c,v 1.19 1997/06/02 14:40:40 alan Exp $
+ *	$Id: af_inet6.c,v 1.21 1997/08/20 11:25:00 alan Exp $
  *
  *	This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
@@ -71,7 +71,7 @@
 	struct sock *sk;
 	struct proto *prot;
 
-	sk = sk_alloc(GFP_KERNEL);
+	sk = sk_alloc(AF_INET6, GFP_KERNEL);
 	if (sk == NULL) 
 		goto do_oom;
 
@@ -167,10 +167,6 @@
 	return -ENOBUFS;
 }
 
-static int inet6_dup(struct socket *newsock, struct socket *oldsock)
-{
-	return(inet6_create(newsock, oldsock->sk->protocol));
-}
 
 /* bind for INET6 API */
 static int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
@@ -249,11 +245,6 @@
 	return inet_release(sock, peer);
 }
 
-static int inet6_socketpair(struct socket *sock1, struct socket *sock2)
-{
-	return(-EOPNOTSUPP);
-}
-
 /*
  *	This does both peername and sockname.
  */
@@ -364,11 +355,14 @@
 	case SIOCSIFSLAVE:
 	case SIOCGIFSLAVE:
 	case SIOGIFINDEX:
-
+	case SIOGIFNAME:
+	case SIOCGIFCOUNT:
 		return(dev_ioctl(cmd,(void *) arg));		
 		
 	case SIOCSIFADDR:
 		return addrconf_add_ifaddr((void *) arg);
+	case SIOCDIFADDR:
+		return addrconf_del_ifaddr((void *) arg);
 	case SIOCSIFDSTADDR:
 		return addrconf_set_dstaddr((void *) arg);
 	default:
@@ -387,11 +381,11 @@
 struct proto_ops inet6_stream_ops = {
 	AF_INET6,
 
-	inet6_dup,
+	sock_no_dup,
 	inet6_release,
 	inet6_bind,
 	inet_stream_connect,		/* ok		*/
-	inet6_socketpair,		/* a do nothing	*/
+	sock_no_socketpair,		/* a do nothing	*/
 	inet_accept,			/* ok		*/
 	inet6_getname, 
 	inet_poll,			/* ok		*/
@@ -408,11 +402,11 @@
 struct proto_ops inet6_dgram_ops = {
 	AF_INET6,
 
-	inet6_dup,
+	sock_no_dup,
 	inet6_release,
 	inet6_bind,
 	inet_dgram_connect,		/* ok		*/
-	inet6_socketpair,		/* a do nothing	*/
+	sock_no_socketpair,		/* a do nothing	*/
 	inet_accept,			/* ok		*/
 	inet6_getname, 
 	datagram_poll,			/* ok		*/

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov