ifconfig.c (104337) | ifconfig.c (105760) |
---|---|
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 104337 2002-10-02 02:17:59Z dd $"; | 45 "$FreeBSD: head/sbin/ifconfig/ifconfig.c 105760 2002-10-23 03:40:47Z 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> --- 220 unchanged lines hidden (view full) --- 274 { "wepmode", NEXTARG, set80211wepmode }, 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 | 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> --- 220 unchanged lines hidden (view full) --- 274 { "wepmode", NEXTARG, set80211wepmode }, 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 }, 284#endif |
|
282 { "rxcsum", IFCAP_RXCSUM, setifcap }, 283 { "-rxcsum", -IFCAP_RXCSUM, setifcap }, 284 { "txcsum", IFCAP_TXCSUM, setifcap }, 285 { "-txcsum", -IFCAP_TXCSUM, setifcap }, 286 { "netcons", IFCAP_NETCONS, setifcap }, 287 { "-netcons", -IFCAP_NETCONS, setifcap }, 288 { "normal", -IFF_LINK0, setifflags }, 289 { "compress", IFF_LINK0, setifflags }, --- 71 unchanged lines hidden (view full) --- 361 { "media", AF_UNSPEC, media_status, NULL, NULL, }, /* XXX not real!! */ 362#endif 363#ifdef USE_VLANS 364 { "vlan", AF_UNSPEC, vlan_status, NULL, NULL, }, /* XXX not real!! */ 365#endif 366#ifdef USE_IEEE80211 367 { "ieee80211", AF_UNSPEC, ieee80211_status, NULL, NULL, }, /* XXX not real!! */ 368#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 }, 292 { "compress", IFF_LINK0, setifflags }, --- 71 unchanged lines hidden (view full) --- 364 { "media", AF_UNSPEC, media_status, NULL, NULL, }, /* XXX not real!! */ 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, }, |
|
369#endif | 374#endif |
375#endif |
|
370 { 0, 0, 0, 0 } 371}; 372 373/* 374 * Expand the compacted form of addresses as returned via the 375 * configuration read via sysctl(). 376 */ 377 --- 762 unchanged lines hidden (view full) --- 1140#ifdef USE_VLANS 1141 if (allfamilies || afp->af_status == vlan_status) 1142 vlan_status(s, NULL); 1143#endif 1144#ifdef USE_IEEE80211 1145 if (allfamilies || afp->af_status == ieee80211_status) 1146 ieee80211_status(s, NULL); 1147#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(). 382 */ 383 --- 762 unchanged lines hidden (view full) --- 1146#ifdef USE_VLANS 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); 1157#endif |
|
1148 strncpy(ifs.ifs_name, name, sizeof ifs.ifs_name); 1149 if (ioctl(s, SIOCGIFSTATUS, &ifs) == 0) 1150 printf("%s", ifs.ascii); 1151 1152 if (!allfamilies && !p && afp->af_status != media_status && 1153 afp->af_status != link_status 1154#ifdef USE_VLANS 1155 && afp->af_status != vlan_status --- 799 unchanged lines hidden --- | 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 1165 && afp->af_status != vlan_status --- 799 unchanged lines hidden --- |