Changeset View
Changeset View
Standalone View
Standalone View
sbin/ifconfig/ifconfig.c
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | |||||
static size_t descrlen = 64; | static size_t descrlen = 64; | ||||
#endif | #endif | ||||
static int setaddr; | static int setaddr; | ||||
static int setmask; | static int setmask; | ||||
static int doalias; | static int doalias; | ||||
static int clearaddr; | static int clearaddr; | ||||
int newaddr = 1; | int newaddr = 1; | ||||
struct ifconfig_args global_args; | |||||
int exit_code = 0; | int exit_code = 0; | ||||
static char ifname_to_print[IFNAMSIZ]; /* Helper for printifnamemaybe() */ | static char ifname_to_print[IFNAMSIZ]; /* Helper for printifnamemaybe() */ | ||||
/* Formatter Strings */ | /* Formatter Strings */ | ||||
char *f_inet, *f_inet6, *f_ether, *f_addr; | char *f_inet, *f_inet6, *f_ether, *f_addr; | ||||
#ifdef WITHOUT_NETLINK | #ifdef WITHOUT_NETLINK | ||||
▲ Show 20 Lines • Show All 494 Lines • ▼ Show 20 Lines | |||||
int | int | ||||
main(int ac, char *av[]) | main(int ac, char *av[]) | ||||
{ | { | ||||
char *envformat; | char *envformat; | ||||
int flags; | int flags; | ||||
#ifdef JAIL | #ifdef JAIL | ||||
int jid; | int jid; | ||||
#endif | #endif | ||||
struct ifconfig_args *args = &global_args; | struct ifconfig_args _args = {}; | ||||
struct ifconfig_args *args = &_args; | |||||
f_inet = f_inet6 = f_ether = f_addr = NULL; | f_inet = f_inet6 = f_ether = f_addr = NULL; | ||||
lifh = ifconfig_open(); | lifh = ifconfig_open(); | ||||
if (lifh == NULL) | if (lifh == NULL) | ||||
err(EXIT_FAILURE, "ifconfig_open"); | err(EXIT_FAILURE, "ifconfig_open"); | ||||
envformat = getenv("IFCONFIG_FORMAT"); | envformat = getenv("IFCONFIG_FORMAT"); | ||||
▲ Show 20 Lines • Show All 1,433 Lines • Show Last 20 Lines |