ifconfig.c (105760) | ifconfig.c (105825) |
---|---|
1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94"; 43#endif 44static const char rcsid[] = | 1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94"; 43#endif 44static const char rcsid[] = |
45 "$FreeBSD: head/sbin/ifconfig/ifconfig.c 105760 2002-10-23 03:40:47Z rwatson $"; | 45 "$FreeBSD: head/sbin/ifconfig/ifconfig.c 105825 2002-10-23 22:50:04Z rwatson $"; |
46#endif /* not lint */ 47 48#include <sys/param.h> 49#include <sys/ioctl.h> 50#include <sys/socket.h> 51#include <sys/sysctl.h> 52#include <sys/time.h> 53#include <sys/module.h> --- 221 unchanged lines hidden (view full) --- 275 { "wep", 1, set80211wep }, 276 { "-wep", 0, set80211wep }, 277 { "weptxkey", NEXTARG, set80211weptxkey }, 278 { "wepkey", NEXTARG, set80211wepkey }, 279 { "nwkey", NEXTARG, set80211nwkey }, /* NetBSD */ 280 { "-nwkey", 0, set80211wep }, /* NetBSD */ 281#endif 282#ifdef USE_MAC | 46#endif /* not lint */ 47 48#include <sys/param.h> 49#include <sys/ioctl.h> 50#include <sys/socket.h> 51#include <sys/sysctl.h> 52#include <sys/time.h> 53#include <sys/module.h> --- 221 unchanged lines hidden (view full) --- 275 { "wep", 1, set80211wep }, 276 { "-wep", 0, set80211wep }, 277 { "weptxkey", NEXTARG, set80211weptxkey }, 278 { "wepkey", NEXTARG, set80211wepkey }, 279 { "nwkey", NEXTARG, set80211nwkey }, /* NetBSD */ 280 { "-nwkey", 0, set80211wep }, /* NetBSD */ 281#endif 282#ifdef USE_MAC |
283 { "mac", NEXTARG, setifmac }, | 283 { "maclabel", NEXTARG, setifmaclabel }, |
284#endif 285 { "rxcsum", IFCAP_RXCSUM, setifcap }, 286 { "-rxcsum", -IFCAP_RXCSUM, setifcap }, 287 { "txcsum", IFCAP_TXCSUM, setifcap }, 288 { "-txcsum", -IFCAP_TXCSUM, setifcap }, 289 { "netcons", IFCAP_NETCONS, setifcap }, 290 { "-netcons", -IFCAP_NETCONS, setifcap }, 291 { "normal", -IFF_LINK0, setifflags }, --- 73 unchanged lines hidden (view full) --- 365#endif 366#ifdef USE_VLANS 367 { "vlan", AF_UNSPEC, vlan_status, NULL, NULL, }, /* XXX not real!! */ 368#endif 369#ifdef USE_IEEE80211 370 { "ieee80211", AF_UNSPEC, ieee80211_status, NULL, NULL, }, /* XXX not real!! */ 371#endif 372#ifdef USE_MAC | 284#endif 285 { "rxcsum", IFCAP_RXCSUM, setifcap }, 286 { "-rxcsum", -IFCAP_RXCSUM, setifcap }, 287 { "txcsum", IFCAP_TXCSUM, setifcap }, 288 { "-txcsum", -IFCAP_TXCSUM, setifcap }, 289 { "netcons", IFCAP_NETCONS, setifcap }, 290 { "-netcons", -IFCAP_NETCONS, setifcap }, 291 { "normal", -IFF_LINK0, setifflags }, --- 73 unchanged lines hidden (view full) --- 365#endif 366#ifdef USE_VLANS 367 { "vlan", AF_UNSPEC, vlan_status, NULL, NULL, }, /* XXX not real!! */ 368#endif 369#ifdef USE_IEEE80211 370 { "ieee80211", AF_UNSPEC, ieee80211_status, NULL, NULL, }, /* XXX not real!! */ 371#endif 372#ifdef USE_MAC |
373 { "mac", AF_UNSPEC, mac_status, NULL, NULL, }, | 373 { "maclabel", AF_UNSPEC, maclabel_status, NULL, NULL, }, |
374#endif 375#endif 376 { 0, 0, 0, 0 } 377}; 378 379/* 380 * Expand the compacted form of addresses as returned via the 381 * configuration read via sysctl(). --- 765 unchanged lines hidden (view full) --- 1147 if (allfamilies || afp->af_status == vlan_status) 1148 vlan_status(s, NULL); 1149#endif 1150#ifdef USE_IEEE80211 1151 if (allfamilies || afp->af_status == ieee80211_status) 1152 ieee80211_status(s, NULL); 1153#endif 1154#ifdef USE_MAC | 374#endif 375#endif 376 { 0, 0, 0, 0 } 377}; 378 379/* 380 * Expand the compacted form of addresses as returned via the 381 * configuration read via sysctl(). --- 765 unchanged lines hidden (view full) --- 1147 if (allfamilies || afp->af_status == vlan_status) 1148 vlan_status(s, NULL); 1149#endif 1150#ifdef USE_IEEE80211 1151 if (allfamilies || afp->af_status == ieee80211_status) 1152 ieee80211_status(s, NULL); 1153#endif 1154#ifdef USE_MAC |
1155 if (allfamilies || afp->af_status == mac_status) 1156 mac_status(s, NULL); | 1155 if (allfamilies || afp->af_status == maclabel_status) 1156 maclabel_status(s, NULL); |
1157#endif 1158 strncpy(ifs.ifs_name, name, sizeof ifs.ifs_name); 1159 if (ioctl(s, SIOCGIFSTATUS, &ifs) == 0) 1160 printf("%s", ifs.ascii); 1161 1162 if (!allfamilies && !p && afp->af_status != media_status && 1163 afp->af_status != link_status 1164#ifdef USE_VLANS --- 800 unchanged lines hidden --- | 1157#endif 1158 strncpy(ifs.ifs_name, name, sizeof ifs.ifs_name); 1159 if (ioctl(s, SIOCGIFSTATUS, &ifs) == 0) 1160 printf("%s", ifs.ascii); 1161 1162 if (!allfamilies && !p && afp->af_status != media_status && 1163 afp->af_status != link_status 1164#ifdef USE_VLANS --- 800 unchanged lines hidden --- |