Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netiso add back the SIOCxxx_ISO ioctl's that were eroneo...
details: https://anonhg.NetBSD.org/src/rev/921af72db77a
branches: trunk
changeset: 467978:921af72db77a
user: chopps <chopps%NetBSD.org@localhost>
date: Thu Apr 01 06:51:48 1999 +0000
description:
add back the SIOCxxx_ISO ioctl's that were eroneously removed previously
diffstat:
sys/netiso/iso.c | 33 ++++++++++++++++-----------------
sys/netiso/iso_var.h | 13 ++++++++++++-
2 files changed, 28 insertions(+), 18 deletions(-)
diffs (121 lines):
diff -r 1c4c058e58c9 -r 921af72db77a sys/netiso/iso.c
--- a/sys/netiso/iso.c Thu Apr 01 06:05:04 1999 +0000
+++ b/sys/netiso/iso.c Thu Apr 01 06:51:48 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iso.c,v 1.21 1998/07/05 04:37:42 jonathan Exp $ */
+/* $NetBSD: iso.c,v 1.22 1999/04/01 06:51:48 chopps Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -450,7 +450,7 @@
register struct ifnet *ifp;
struct proc *p;
{
- register struct ifreq *ifr = (struct ifreq *) data;
+ register struct iso_ifreq *ifr = (struct iso_ifreq *) data;
register struct iso_ifaddr *ia = 0;
struct iso_aliasreq *ifra = (struct iso_aliasreq *) data;
int error, hostIsNew, maskIsNew;
@@ -465,15 +465,15 @@
switch (cmd) {
- case SIOCAIFADDR:
- case SIOCDIFADDR:
+ case SIOCAIFADDR_ISO:
+ case SIOCDIFADDR_ISO:
if (ifra->ifra_addr.siso_family == AF_ISO)
for (; ia != 0; ia = ia->ia_list.tqe_next) {
if (ia->ia_ifp == ifp &&
SAME_ISOADDR(&ia->ia_addr, &ifra->ifra_addr))
break;
}
- if (cmd == SIOCDIFADDR && ia == 0)
+ if (cmd == SIOCDIFADDR_ISO && ia == 0)
return (EADDRNOTAVAIL);
/* FALLTHROUGH */
#if 0
@@ -504,31 +504,30 @@
}
break;
- case SIOCGIFADDR:
- case SIOCGIFNETMASK:
- case SIOCGIFDSTADDR:
- case SIOCGIFBRDADDR:
+ case SIOCGIFADDR_ISO:
+ case SIOCGIFNETMASK_ISO:
+ case SIOCGIFDSTADDR_ISO:
if (ia == 0)
return (EADDRNOTAVAIL);
break;
}
switch (cmd) {
- case SIOCGIFADDR:
- *satosiso(&ifr->ifr_addr) = ia->ia_addr;
+ case SIOCGIFADDR_ISO:
+ ifr->ifr_Addr = ia->ia_addr;
break;
- case SIOCGIFDSTADDR:
+ case SIOCGIFDSTADDR_ISO:
if ((ifp->if_flags & IFF_POINTOPOINT) == 0)
return (EINVAL);
- *satosiso(&ifr->ifr_dstaddr) = ia->ia_dstaddr;
+ ifr->ifr_Addr = ia->ia_dstaddr;
break;
- case SIOCGIFNETMASK:
- *satosiso(&ifr->ifr_addr) = ia->ia_sockmask;
+ case SIOCGIFNETMASK_ISO:
+ ifr->ifr_Addr = ia->ia_sockmask;
break;
- case SIOCAIFADDR:
+ case SIOCAIFADDR_ISO:
maskIsNew = 0;
hostIsNew = 1;
error = 0;
@@ -557,7 +556,7 @@
ia->ia_snpaoffset = ifra->ifra_snpaoffset;
return (error);
- case SIOCDIFADDR:
+ case SIOCDIFADDR_ISO:
iso_ifscrub(ifp, ia);
TAILQ_REMOVE(&ifp->if_addrlist, (struct ifaddr *)ia, ifa_list);
TAILQ_REMOVE(&iso_ifaddr, ia, ia_list);
diff -r 1c4c058e58c9 -r 921af72db77a sys/netiso/iso_var.h
--- a/sys/netiso/iso_var.h Thu Apr 01 06:05:04 1999 +0000
+++ b/sys/netiso/iso_var.h Thu Apr 01 06:51:48 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iso_var.h,v 1.10 1996/09/08 14:28:14 mycroft Exp $ */
+/* $NetBSD: iso_var.h,v 1.11 1999/04/01 06:51:48 chopps Exp $ */
/*-
* Copyright (c) 1988, 1991, 1993
@@ -90,12 +90,23 @@
int ifra_snpaoffset;
};
+struct iso_ifreq {
+ char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
+ struct sockaddr_iso ifr_Addr;
+};
+
/*
* Given a pointer to an iso_ifaddr (ifaddr),
* return a pointer to the addr as a sockaddr_iso
*/
#define IA_SIS(ia) (&(((struct iso_ifaddr *)(ia))->ia_addr))
+#define SIOCDIFADDR_ISO _IOW('i',25, struct iso_ifreq) /* delete IF addr */
+#define SIOCAIFADDR_ISO _IOW('i',26, struct iso_aliasreq) /* add/chg IFalias */
+#define SIOCGIFADDR_ISO _IOWR('i',33, struct iso_ifreq) /* get ifnet address */
+#define SIOCGIFDSTADDR_ISO _IOWR('i',34, struct iso_ifreq) /* get dst address */
+#define SIOCGIFNETMASK_ISO _IOWR('i',37, struct iso_ifreq) /* get dst address */
+
/*
* This stuff should go in if.h or if_llc.h or someplace else,
* but for now . . .
Home |
Main Index |
Thread Index |
Old Index