From 30d239bc4c510432e65a84fa1c14ed67a3ab1c92 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Wed, 24 Oct 2007 19:04:04 +0000 Subject: Merge first in a series of TrustedBSD MAC Framework KPI changes from Mac OS X Leopard--rationalize naming for entry points to the following general forms: mac__ mac__check_ The previous naming scheme was inconsistent and mostly reversed from the new scheme. Also, make object types more consistent and remove spaces from object types that contain multiple parts ("posix_sem" -> "posixsem") to make mechanical parsing easier. Introduce a new "netinet" object type for certain IPv4/IPv6-related methods. Also simplify, slightly, some entry point names. All MAC policy modules will need to be recompiled, and modules not updates as part of this commit will need to be modified to conform to the new KPI. Sponsored by: SPARTA (original patches against Mac OS X) Obtained from: TrustedBSD Project, Apple Computer --- sys/net/if.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/net/if.c') diff --git a/sys/net/if.c b/sys/net/if.c index 0b602bcff67e..a6db03d4bcfc 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -478,8 +478,8 @@ if_attach(struct ifnet *ifp) ifp->if_data.ifi_datalen = sizeof(struct if_data); #ifdef MAC - mac_init_ifnet(ifp); - mac_create_ifnet(ifp); + mac_ifnet_init(ifp); + mac_ifnet_create(ifp); #endif ifdev_byindex(ifp->if_index) = make_dev(&net_cdevsw, @@ -758,7 +758,7 @@ if_detach(struct ifnet *ifp) IF_AFDATA_UNLOCK(ifp); #ifdef MAC - mac_destroy_ifnet(ifp); + mac_ifnet_destroy(ifp); #endif /* MAC */ KNOTE_UNLOCKED(&ifp->if_klist, NOTE_EXIT); knlist_clear(&ifp->if_klist, 0); @@ -1534,7 +1534,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) #ifdef MAC case SIOCGIFMAC: - error = mac_ioctl_ifnet_get(td->td_ucred, ifr, ifp); + error = mac_ifnet_ioctl_get(td->td_ucred, ifr, ifp); break; #endif @@ -1610,7 +1610,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) #ifdef MAC case SIOCSIFMAC: - error = mac_ioctl_ifnet_set(td->td_ucred, ifr, ifp); + error = mac_ifnet_ioctl_set(td->td_ucred, ifr, ifp); break; #endif -- cgit v1.2.3