Rename ifconfig's "mac" argument to "maclabel" to prevent confusion
regarding 802.1 MAC and Mandatory Access Control (MAC). Some potential for confusion remains further in other areas of the system regarding Message Authentication Codes (MAC). Requested by: wollman Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
This commit is contained in:
parent
0b66b1e8eb
commit
97490f4b3c
@ -280,7 +280,7 @@ struct cmd {
|
||||
{ "-nwkey", 0, set80211wep }, /* NetBSD */
|
||||
#endif
|
||||
#ifdef USE_MAC
|
||||
{ "mac", NEXTARG, setifmac },
|
||||
{ "maclabel", NEXTARG, setifmaclabel },
|
||||
#endif
|
||||
{ "rxcsum", IFCAP_RXCSUM, setifcap },
|
||||
{ "-rxcsum", -IFCAP_RXCSUM, setifcap },
|
||||
@ -370,7 +370,7 @@ struct afswtch {
|
||||
{ "ieee80211", AF_UNSPEC, ieee80211_status, NULL, NULL, }, /* XXX not real!! */
|
||||
#endif
|
||||
#ifdef USE_MAC
|
||||
{ "mac", AF_UNSPEC, mac_status, NULL, NULL, },
|
||||
{ "maclabel", AF_UNSPEC, maclabel_status, NULL, NULL, },
|
||||
#endif
|
||||
#endif
|
||||
{ 0, 0, 0, 0 }
|
||||
@ -1152,8 +1152,8 @@ status(const struct afswtch *afp, int addrcount, struct sockaddr_dl *sdl,
|
||||
ieee80211_status(s, NULL);
|
||||
#endif
|
||||
#ifdef USE_MAC
|
||||
if (allfamilies || afp->af_status == mac_status)
|
||||
mac_status(s, NULL);
|
||||
if (allfamilies || afp->af_status == maclabel_status)
|
||||
maclabel_status(s, NULL);
|
||||
#endif
|
||||
strncpy(ifs.ifs_name, name, sizeof ifs.ifs_name);
|
||||
if (ioctl(s, SIOCGIFSTATUS, &ifs) == 0)
|
||||
|
@ -64,5 +64,5 @@ extern void set80211weptxkey(const char *, int, int, const struct afswtch *rafp)
|
||||
extern void set80211wepkey(const char *, int, int, const struct afswtch *rafp);
|
||||
extern void set80211nwkey(const char *, int, int, const struct afswtch *rafp);
|
||||
extern void ieee80211_status(int s, struct rt_addrinfo *);
|
||||
extern void mac_status(int s, struct rt_addrinfo *);
|
||||
extern void setifmac(const char *, int, int, const struct afswtch *rafp);
|
||||
extern void maclabel_status(int s, struct rt_addrinfo *);
|
||||
extern void setifmaclabel(const char *, int, int, const struct afswtch *rafp);
|
||||
|
@ -50,7 +50,7 @@
|
||||
#include "ifconfig.h"
|
||||
|
||||
void
|
||||
mac_status(int s, struct rt_addrinfo *info)
|
||||
maclabel_status(int s, struct rt_addrinfo *info)
|
||||
{
|
||||
struct ifreq ifr;
|
||||
mac_t label;
|
||||
@ -70,7 +70,7 @@ mac_status(int s, struct rt_addrinfo *info)
|
||||
goto mac_free;
|
||||
|
||||
if (strlen(label_text) != 0)
|
||||
printf("\tmac %s\n", label_text);
|
||||
printf("\tmaclabel %s\n", label_text);
|
||||
free(label_text);
|
||||
|
||||
mac_free:
|
||||
@ -78,7 +78,7 @@ mac_free:
|
||||
}
|
||||
|
||||
void
|
||||
setifmac(const char *val, int d, int s, const struct afswtch *rafp)
|
||||
setifmaclabel(const char *val, int d, int s, const struct afswtch *rafp)
|
||||
{
|
||||
struct ifreq ifr;
|
||||
mac_t label;
|
||||
|
Loading…
x
Reference in New Issue
Block a user