aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2003-12-02 18:33:36 +0000
committerBrooks Davis <brooks@FreeBSD.org>2003-12-02 18:33:36 +0000
commit352ec47813304ee7ee9a19078ea485430e0c35a9 (patch)
treeb739dd0ef1fe4aa6328fdb670d911eb8067e4628
parent965575f97c41ba491915667faac038cb6d3a850e (diff)
downloadsrc-352ec47813304ee7ee9a19078ea485430e0c35a9.tar.gz
src-352ec47813304ee7ee9a19078ea485430e0c35a9.zip
This is a direct commit to the vendor branch with code from the vendor.
Replace the if_name and if_unit members of struct ifnet with new members if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Submitted by: darrenr Approved by: re (scottl)
Notes
Notes: svn path=/vendor/ipfilter/dist/; revision=123109
-rw-r--r--contrib/ipfilter/ipt.c6
-rw-r--r--contrib/ipfilter/kmem.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/contrib/ipfilter/ipt.c b/contrib/ipfilter/ipt.c
index 48f35cf89e6f..d33a38d00f03 100644
--- a/contrib/ipfilter/ipt.c
+++ b/contrib/ipfilter/ipt.c
@@ -443,7 +443,8 @@ char *getifname(ptr)
void *ptr;
{
#if defined(NetBSD) && (NetBSD >= 199905) && (NetBSD < 1991011) || \
- defined(__OpenBSD__)
+ defined(__OpenBSD__) || \
+ (defined(__FreeBSD__) && (__FreeBSD_version >= 501113))
#else
char buf[32], *s;
int len;
@@ -458,7 +459,8 @@ void *ptr;
if (kmemcpy((char *)&netif, (u_long)ptr, sizeof(netif)) == -1)
return "X";
#if defined(NetBSD) && (NetBSD >= 199905) && (NetBSD < 1991011) || \
- defined(__OpenBSD__)
+ defined(__OpenBSD__) || \
+ (defined(__FreeBSD__) && (__FreeBSD_version >= 501113))
return strdup(netif.if_xname);
#else
if (kmemcpy(buf, (u_long)netif.if_name, sizeof(buf)) == -1)
diff --git a/contrib/ipfilter/kmem.c b/contrib/ipfilter/kmem.c
index 17622cdb79cc..470d2574eea2 100644
--- a/contrib/ipfilter/kmem.c
+++ b/contrib/ipfilter/kmem.c
@@ -204,7 +204,8 @@ void *ptr;
return ifname;
#else
# if defined(NetBSD) && (NetBSD >= 199905) && (NetBSD < 1991011) || \
- defined(__OpenBSD__)
+ defined(__OpenBSD__) || \
+ (defined(__FreeBSD__) && (__FreeBSD_version >= 501113))
#else
char buf[32];
int len;
@@ -219,7 +220,8 @@ void *ptr;
if (kmemcpy((char *)&netif, (u_long)ptr, sizeof(netif)) == -1)
return "X";
# if defined(NetBSD) && (NetBSD >= 199905) && (NetBSD < 1991011) || \
- defined(__OpenBSD__)
+ defined(__OpenBSD__) || \
+ (defined(__FreeBSD__) && (__FreeBSD_version >= 501113))
return strdup(netif.if_xname);
# else
if (kstrncpy(buf, (u_long)netif.if_name, sizeof(buf)) == -1)