Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if.c
Show First 20 Lines • Show All 2,895 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
#ifdef COMPAT_FREEBSD32 | #ifdef COMPAT_FREEBSD32 | ||||
union { | union { | ||||
struct ifconf ifc; | struct ifconf ifc; | ||||
struct ifdrv ifd; | struct ifdrv ifd; | ||||
struct ifgroupreq ifgr; | struct ifgroupreq ifgr; | ||||
struct ifmediareq ifmr; | struct ifmediareq ifmr; | ||||
} thunk; | } thunk; | ||||
caddr_t saved_data; | |||||
u_long saved_cmd; | u_long saved_cmd; | ||||
struct ifconf32 *ifc32; | struct ifconf32 *ifc32; | ||||
struct ifdrv32 *ifd32; | struct ifdrv32 *ifd32; | ||||
struct ifgroupreq32 *ifgr32; | struct ifgroupreq32 *ifgr32; | ||||
struct ifmediareq32 *ifmr32; | struct ifmediareq32 *ifmr32; | ||||
#endif | #endif | ||||
struct ifnet *ifp; | struct ifnet *ifp; | ||||
struct ifreq *ifr; | struct ifreq *ifr; | ||||
Show All 10 Lines | #ifdef VIMAGE | ||||
if (shutdown) { | if (shutdown) { | ||||
CURVNET_RESTORE(); | CURVNET_RESTORE(); | ||||
return (EBUSY); | return (EBUSY); | ||||
} | } | ||||
#endif | #endif | ||||
#ifdef COMPAT_FREEBSD32 | #ifdef COMPAT_FREEBSD32 | ||||
saved_cmd = cmd; | saved_cmd = cmd; | ||||
saved_data = data; | |||||
switch (cmd) { | switch (cmd) { | ||||
case SIOCGIFCONF32: | case SIOCGIFCONF32: | ||||
ifc32 = (struct ifconf32 *)data; | ifc32 = (struct ifconf32 *)data; | ||||
thunk.ifc.ifc_len = ifc32->ifc_len; | thunk.ifc.ifc_len = ifc32->ifc_len; | ||||
thunk.ifc.ifc_buf = PTRIN(ifc32->ifc_buf); | thunk.ifc.ifc_buf = PTRIN(ifc32->ifc_buf); | ||||
data = (caddr_t)&thunk.ifc; | data = (caddr_t)&thunk.ifc; | ||||
cmd = SIOCGIFCONF; | cmd = SIOCGIFCONF; | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 1,673 Lines • Show Last 20 Lines |