Browse files

moved nemo specific ioctl macro to if_nemo.h

  • Loading branch information...
1 parent 11167f1 commit 16d28a286d958a9b53c777cf56c264ee15293dd0 keiichi committed Feb 21, 2007
Showing with 6 additions and 58 deletions.
  1. +0 −3 freebsd5/sys/sys/sockio.h
  2. +1 −48 kame/sys/net/if_gif.c
  3. +5 −1 kame/sys/net/if_nemo.h
  4. +0 −3 netbsd/sys/sys/sockio.h
  5. +0 −3 openbsd/sys/sys/sockio.h
View
3 freebsd5/sys/sys/sockio.h
@@ -135,9 +135,6 @@
#define SIOCGLIFPHYADDR _IOWR('i', 75, struct if_laddrreq) /* get gif addrs */
#define SIOCGSTFMODE _IOWR('i', 76, struct ifreq) /* get stf mode */
#define SIOCSSTFMODE _IOW('i', 77, struct ifreq) /* set stf mode */
-#define SIOCSIFPHYNEXTHOP _IOW('i', 78, struct ifreq) /* set gif nexthop addres */
-#define SIOCDIFPHYNEXTHOP _IOW('i', 79, struct ifreq) /* delete gif nexthop addres */
-#define SIOCGIFPHYNEXTHOP _IOWR('i', 80, struct ifreq) /* get gif nexthop addr */
#define SIOCGPRIVATE_0 _IOWR('i', 80, struct ifreq) /* device private 0 */
#define SIOCGPRIVATE_1 _IOWR('i', 81, struct ifreq) /* device private 1 */
View
49 kame/sys/net/if_gif.c
@@ -1,4 +1,4 @@
-/* $KAME: if_gif.c,v 1.116 2005/07/23 07:34:14 jinmei Exp $ */
+/* $KAME: if_gif.c,v 1.117 2007/02/21 02:44:12 keiichi Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -908,54 +908,7 @@ gif_ioctl(ifp, cmd, data)
case SIOCSIFFLAGS:
/* if_ioctl() takes care of it */
break;
-#ifdef MIP6
- case SIOCSIFPHYNEXTHOP:
- case SIOCSIFPHYNEXTHOP_IN6: {
- struct sockaddr *nh = NULL;
- int nhlen = 0;
-
- switch (ifr->ifr_addr.sa_family) {
-#ifdef INET
- case AF_INET: /* IP supports Multicast */
- error = EAFNOSUPPORT;
- break;
-#endif /* INET */
-#ifdef INET6
- case AF_INET6: /* IP6 supports Multicast */
- nh = (struct sockaddr *)
- &(((struct in6_ifreq *)data)->ifr_addr);
- nhlen = sizeof(((struct in6_ifreq *)data)->ifr_addr);
- break;
-#endif /* INET6 */
- default: /* Other protocols doesn't support Multicast */
- error = EAFNOSUPPORT;
- break;
- }
-
- if (error)
- return error;
-
- /* if pointer is null, allocate memory */
- if (sc->gif_nexthop == NULL) {
- sc->gif_nexthop = (struct sockaddr *)malloc(nhlen, M_IFADDR, M_WAITOK);
- if (sc->gif_nexthop == NULL)
- return ENOMEM;
- bzero(sc->gif_nexthop, nhlen);
- }
- /* set request address into gif_nexthop */
- bcopy(nh, sc->gif_nexthop, nhlen);
- error = sa6_embedscope(satosin6(sc->gif_nexthop), 0);
- if (error != 0)
- return (error);
- break;
- }
- case SIOCDIFPHYNEXTHOP:
- /* if pointer is not null, free the memory */
- if (sc->gif_nexthop)
- free(sc->gif_nexthop, M_IFADDR);
- break;
-#endif
default:
error = EINVAL;
break;
View
6 kame/sys/net/if_nemo.h
@@ -1,4 +1,4 @@
-/* $KAME: if_nemo.h,v 1.4 2006/12/12 10:27:04 mitsuya Exp $ */
+/* $KAME: if_nemo.h,v 1.5 2007/02/21 02:44:13 keiichi Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -130,4 +130,8 @@ int nemo_encapcheck __P((const struct mbuf *, int, int, void *));
#endif /* !defined(__APPLE__) || (defined(__APPLE__) && defined(KERNEL_PRIVATE)) */
+#define SIOCSIFPHYNEXTHOP _IOW('i', 78, struct ifreq) /* set nemo nxthop */
+#define SIOCDIFPHYNEXTHOP _IOW('i', 79, struct ifreq) /* delete nemo nxthop */
+#define SIOCGIFPHYNEXTHOP _IOWR('i', 80, struct ifreq) /* get nemo nxthop */
+
#endif /* _NET_IF_GIF_H_ */
View
3 netbsd/sys/sys/sockio.h
@@ -135,9 +135,6 @@
#define SIOCGLIFPHYADDR _IOWR('i', 75, struct if_laddrreq) /* get gif addrs */
#define SIOCGSTFMODE _IOWR('i', 76, struct ifreq) /* get stf mode */
#define SIOCSSTFMODE _IOW('i', 77, struct ifreq) /* set stf mode */
-#define SIOCSIFPHYNEXTHOP _IOW('i', 78, struct ifreq) /* set gif addres */
-#define SIOCDIFPHYNEXTHOP _IOW('i', 79, struct ifreq) /* delete gif addres */
-#define SIOCGIFPHYNEXTHOP _IOW('i', 80, struct ifreq) /* get gif addres */
#define SIOCZIFDATA _IOWR('i', 129, struct ifdatareq) /* get if_data then
zero ctrs*/
View
3 openbsd/sys/sys/sockio.h
@@ -129,9 +129,6 @@
#define SIOCGLIFPHYADDR _IOWR('i', 75, struct if_laddrreq) /* get gif addrs */
#define SIOCGSTFMODE _IOWR('i', 76, struct ifreq) /* set stf mode */
#define SIOCSSTFMODE _IOW('i', 77, struct ifreq) /* get stf mode */
-#define SIOCSIFPHYNEXTHOP _IOW('i', 78, struct ifreq) /* set gif addres */
-#define SIOCDIFPHYNEXTHOP _IOW('i', 79, struct ifreq) /* delete gif addres */
-#define SIOCGIFPHYNEXTHOP _IOW('i', 80, struct ifreq) /* get gif addres */
#define SIOCBRDGADD _IOW('i', 60, struct ifbreq) /* add bridge ifs */
#define SIOCBRDGGSIFS _IOWR('i', 60, struct ifbreq) /* get span ifs */

0 comments on commit 16d28a2

Please sign in to comment.