Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if.c
Show All 31 Lines | |||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#include "opt_bpf.h" | #include "opt_bpf.h" | ||||
#include "opt_inet6.h" | #include "opt_inet6.h" | ||||
#include "opt_inet.h" | #include "opt_inet.h" | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/capsicum.h> | |||||
#include <sys/conf.h> | #include <sys/conf.h> | ||||
#include <sys/eventhandler.h> | #include <sys/eventhandler.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/domainset.h> | #include <sys/domainset.h> | ||||
#include <sys/sbuf.h> | #include <sys/sbuf.h> | ||||
#include <sys/bus.h> | #include <sys/bus.h> | ||||
#include <sys/epoch.h> | #include <sys/epoch.h> | ||||
#include <sys/mbuf.h> | #include <sys/mbuf.h> | ||||
▲ Show 20 Lines • Show All 2,913 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
struct ifnet *ifp; | struct ifnet *ifp; | ||||
struct ifreq *ifr; | struct ifreq *ifr; | ||||
int error; | int error; | ||||
int oif_flags; | int oif_flags; | ||||
#ifdef VIMAGE | #ifdef VIMAGE | ||||
bool shutdown; | bool shutdown; | ||||
#endif | #endif | ||||
/* | |||||
* Interface ioctls access a global namespace. There is currently no | |||||
* capability-based representation for interfaces, so the configuration | |||||
* interface is simply unaccessible from capability mode. If necessary, | |||||
* select ioctls may be permitted here. | |||||
*/ | |||||
if (IN_CAPABILITY_MODE(td)) | |||||
return (ECAPMODE); | |||||
oshogbo: ECAPMODE? | |||||
CURVNET_SET(so->so_vnet); | CURVNET_SET(so->so_vnet); | ||||
#ifdef VIMAGE | #ifdef VIMAGE | ||||
/* Make sure the VNET is stable. */ | /* Make sure the VNET is stable. */ | ||||
shutdown = VNET_IS_SHUTTING_DOWN(so->so_vnet); | shutdown = VNET_IS_SHUTTING_DOWN(so->so_vnet); | ||||
if (shutdown) { | if (shutdown) { | ||||
CURVNET_RESTORE(); | CURVNET_RESTORE(); | ||||
return (EBUSY); | return (EBUSY); | ||||
▲ Show 20 Lines • Show All 1,632 Lines • Show Last 20 Lines |
ECAPMODE?