ifconfig.c (76276) | ifconfig.c (77217) |
---|---|
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 76276 2001-05-04 18:45:36Z jesper $"; | 45 "$FreeBSD: head/sbin/ifconfig/ifconfig.c 77217 2001-05-26 09:27:08Z phk $"; |
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> --- 164 unchanged lines hidden (view full) --- 218 { "mediaopt", NEXTARG, setmediaopt }, 219 { "-mediaopt", NEXTARG, unsetmediaopt }, 220#endif 221#ifdef USE_VLANS 222 { "vlan", NEXTARG, setvlantag }, 223 { "vlandev", NEXTARG, setvlandev }, 224 { "-vlandev", NEXTARG, unsetvlandev }, 225#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> --- 164 unchanged lines hidden (view full) --- 218 { "mediaopt", NEXTARG, setmediaopt }, 219 { "-mediaopt", NEXTARG, unsetmediaopt }, 220#endif 221#ifdef USE_VLANS 222 { "vlan", NEXTARG, setvlantag }, 223 { "vlandev", NEXTARG, setvlandev }, 224 { "-vlandev", NEXTARG, unsetvlandev }, 225#endif |
226#ifdef USE_IEEE80211 227 { "ssid", NEXTARG, set80211ssid }, 228 { "nwid", NEXTARG, set80211ssid }, 229 { "stationname", NEXTARG, set80211stationname }, 230 { "station", NEXTARG, set80211stationname }, /* BSD/OS */ 231 { "channel", NEXTARG, set80211channel }, 232 { "authmode", NEXTARG, set80211authmode }, 233 { "powersavemode", NEXTARG, set80211powersavemode }, 234 { "powersave", 1, set80211powersave }, 235 { "-powersave", 0, set80211powersave }, 236 { "powersavesleep", NEXTARG, set80211powersavesleep }, 237 { "wepmode", NEXTARG, set80211wepmode }, 238 { "wep", 1, set80211wep }, 239 { "-wep", 0, set80211wep }, 240 { "weptxkey", NEXTARG, set80211weptxkey }, 241 { "wepkey", NEXTARG, set80211wepkey }, 242 { "nwkey", NEXTARG, set80211nwkey }, /* NetBSD */ 243 { "-nwkey", 0, set80211wep }, /* NetBSD */ 244#endif |
|
226 { "normal", -IFF_LINK0, setifflags }, 227 { "compress", IFF_LINK0, setifflags }, 228 { "noicmp", IFF_LINK1, setifflags }, 229 { "mtu", NEXTARG, setifmtu }, 230 { "lladdr", NEXTARG, setiflladdr }, 231 { 0, 0, setifaddr }, 232 { 0, 0, setifdstaddr }, 233}; --- 52 unchanged lines hidden (view full) --- 286 0, SIOCSIFLLADDR, NULL, C(ridreq) }, 287#if 0 /* XXX conflicts with the media command */ 288#ifdef USE_IF_MEDIA 289 { "media", AF_UNSPEC, media_status, NULL, NULL, }, /* XXX not real!! */ 290#endif 291#ifdef USE_VLANS 292 { "vlan", AF_UNSPEC, vlan_status, NULL, NULL, }, /* XXX not real!! */ 293#endif | 245 { "normal", -IFF_LINK0, setifflags }, 246 { "compress", IFF_LINK0, setifflags }, 247 { "noicmp", IFF_LINK1, setifflags }, 248 { "mtu", NEXTARG, setifmtu }, 249 { "lladdr", NEXTARG, setiflladdr }, 250 { 0, 0, setifaddr }, 251 { 0, 0, setifdstaddr }, 252}; --- 52 unchanged lines hidden (view full) --- 305 0, SIOCSIFLLADDR, NULL, C(ridreq) }, 306#if 0 /* XXX conflicts with the media command */ 307#ifdef USE_IF_MEDIA 308 { "media", AF_UNSPEC, media_status, NULL, NULL, }, /* XXX not real!! */ 309#endif 310#ifdef USE_VLANS 311 { "vlan", AF_UNSPEC, vlan_status, NULL, NULL, }, /* XXX not real!! */ 312#endif |
313#ifdef USE_IEEE80211 314 { "ieee80211", AF_UNSPEC, ieee80211_status, NULL, NULL, }, /* XXX not real!! */ |
|
294#endif | 315#endif |
316#endif |
|
295 { 0, 0, 0, 0 } 296}; 297 298/* 299 * Expand the compacted form of addresses as returned via the 300 * configuration read via sysctl(). 301 */ 302 --- 662 unchanged lines hidden (view full) --- 965#ifdef USE_IF_MEDIA 966 if (allfamilies || afp->af_status == media_status) 967 media_status(s, NULL); 968#endif 969#ifdef USE_VLANS 970 if (allfamilies || afp->af_status == vlan_status) 971 vlan_status(s, NULL); 972#endif | 317 { 0, 0, 0, 0 } 318}; 319 320/* 321 * Expand the compacted form of addresses as returned via the 322 * configuration read via sysctl(). 323 */ 324 --- 662 unchanged lines hidden (view full) --- 987#ifdef USE_IF_MEDIA 988 if (allfamilies || afp->af_status == media_status) 989 media_status(s, NULL); 990#endif 991#ifdef USE_VLANS 992 if (allfamilies || afp->af_status == vlan_status) 993 vlan_status(s, NULL); 994#endif |
995#ifdef USE_IEEE80211 996 if (allfamilies || afp->af_status == ieee80211_status) 997 ieee80211_status(s, NULL); 998#endif |
|
973 strncpy(ifs.ifs_name, name, sizeof ifs.ifs_name); 974 if (ioctl(s, SIOCGIFSTATUS, &ifs) == 0) 975 printf("%s", ifs.ascii); 976 977 if (!allfamilies && !p && afp->af_status != media_status && 978 afp->af_status != ether_status 979#ifdef USE_VLANS 980 && afp->af_status != vlan_status --- 675 unchanged lines hidden --- | 999 strncpy(ifs.ifs_name, name, sizeof ifs.ifs_name); 1000 if (ioctl(s, SIOCGIFSTATUS, &ifs) == 0) 1001 printf("%s", ifs.ascii); 1002 1003 if (!allfamilies && !p && afp->af_status != media_status && 1004 afp->af_status != ether_status 1005#ifdef USE_VLANS 1006 && afp->af_status != vlan_status --- 675 unchanged lines hidden --- |