+ flag_ax25 + flag_netrom + flag_igmp;
+ flag_ax25 + flag_netrom + flag_igmp + flag_x25;
int main (int argc, char *argv[]) {    int i;    int lop;    struct option longopts[] =    {	AFTRANS_OPTS,	{"version", 0, 0, 'V'},	{"interfaces", 0, 0, 'i'},	{"help", 0, 0, 'h'},	{"route", 0, 0, 'r'},	{"netlink", 2, 0, 'L'},#if HAVE_FW_MASQUERADE	{"masquerade", 0, 0, 'M'},#endif	{"protocol", 1, 0, 'A'},	{"tcp", 0, 0, 't'},	{"udp", 0, 0, 'u'},	{"raw", 0, 0, 'w'},	{"unix", 0, 0, 'x'},	{"listening", 0, 0, 'l'},	{"all", 0, 0, 'a'},	{"timers", 0, 0, 'o'},	{"continuous", 0, 0, 'c'},	{"extend", 0, 0, 'e'},	{"programs", 0, 0, 'p'},	{"verbose", 0, 0, 'v'},	{"statistics", 0, 0, 's'},	{"numeric", 0, 0, 'n'},	{"symbolic", 0, 0, 'N'},	{"cache", 0, 0, 'C'},	{"fib", 0, 0, 'F'},	{"groups", 0, 0, 'g'},	{NULL, 0, 0, 0}    };#if I18N    bindtextdomain("net-tools", "/usr/share/locale");    textdomain("net-tools");#endif    getroute_init();		/* Set up AF routing support */    afname[0] = '\0';    while ((i = getopt_long(argc, argv, "MCFA:acdegphinNorstuVv?wxl", longopts, &lop)) != EOF)	switch (i) {	case -1:	    break;	case 1:	    if (lop < 0 || lop >= AFTRANS_CNT) {		EINTERN("netstat.c", "longopts 1 range");		break;	    }	    if (aftrans_opt(longopts[lop].name))		exit(1);	    break;	case 'A':	    if (aftrans_opt(optarg))		exit(1);	    break;	case 'M':	    flag_mas++;	    break;	case 'a':	    flag_all++;	    break;	case 'l':	    flag_lst++;	    break;	case 'c':	    flag_cnt++;	    break;	case 'd':	    flag_deb++;	    break;	case 'g':	    flag_igmp++;	    break;	case 'e':	    flag_exp++;	    break;	case 'p':	    flag_prg++;	    break;	case 'i':	    flag_int++;	    break;	case 'n':	    flag_not |= FLAG_NUM;	    break;	case 'N':	    flag_not |= FLAG_SYM;	    break;	case 'C':	    flag_cf |= FLAG_CACHE;	    break;	case 'F':	    flag_cf |= FLAG_FIB;	    break;	case 'o':	    flag_opt++;	    break;	case 'V':	    version();	    /*NOTREACHED */	case 'v':	    flag_ver |= FLAG_VERBOSE;	    break;	case 'r':	    flag_rou++;	    break;	case 't':	    flag_tcp++;	    break;	case 'u':	    flag_udp++;	    break;	case 'w':	    flag_raw++;	    break;	case 'x':	    if (aftrans_opt("unix"))		exit(1);	    break;	case '?':	case 'h':	    usage();	case 's':	    flag_sta++;	}    if (flag_int + flag_rou + flag_mas + flag_sta > 1)	usage();    if ((flag_inet || flag_inet6 || flag_sta) && !(flag_tcp || flag_udp || flag_raw))	flag_tcp = flag_udp = flag_raw = 1;    if ((flag_tcp || flag_udp || flag_raw || flag_igmp) && !(flag_inet || flag_inet6))        flag_inet = flag_inet6 = 1;    flag_arg = flag_tcp + flag_udp + flag_raw + flag_unx + flag_ipx	+ flag_ax25 + flag_netrom + flag_igmp;    if (flag_mas) {#if HAVE_FW_MASQUERADE && HAVE_AFINET#if MORE_THAN_ONE_MASQ_AF	if (!afname[0])	    strcpy(afname, DFLT_AF);#endif	for (;;) {	    i = ip_masq_info(flag_not, flag_exp);	    if (i || !flag_cnt)		break;	    sleep(1);	}#else	ENOSUPP("netstat.c", "FW_MASQUERADE");	i = -1;#endif	return (i);    }    if (flag_sta) {        inittab();	parsesnmp(flag_raw, flag_tcp, flag_udp);	exit(0);    }        if (flag_rou) {	int options = 0;	if (!afname[0])	    strcpy(afname, DFLT_AF);	if (flag_exp == 2)	    flag_exp = 1;	else if (flag_exp == 1)	    flag_exp = 2;	options = (flag_exp & FLAG_EXT) | flag_not | flag_cf | flag_ver;	if (!flag_cf)	    options |= FLAG_FIB;	for (;;) {	    i = route_info(afname, options);	    if (i || !flag_cnt)		break;	    sleep(1);	}	return (i);    }    if (flag_int) {	for (;;) {	    i = iface_info();	    if (!flag_cnt || i)		break;	    sleep(1);	}	return (i);    }    for (;;) {	if (!flag_arg || flag_tcp || flag_udp || flag_raw) {#if HAVE_AFINET	    prg_cache_load();	    printf(_("Active Internet connections "));	/* xxx */	    if (flag_all)		printf(_("(servers and established)"));	    else {	      if (flag_lst)		printf(_("(only servers)"));	      else		printf(_("(w/o servers)"));	    }	    printf(_("\nProto Recv-Q Send-Q Local Address           Foreign Address         State      "));	/* xxx */	    if (flag_exp > 1)		printf(_(" User       Inode     "));	    print_progname_banner();	    if (flag_opt)		printf(_(" Timer"));	/* xxx */	    printf("\n");#else	    if (flag_arg) {		i = 1;		ENOSUPP("netstat", "AF INET");	    }#endif	}#if HAVE_AFINET	if (!flag_arg || flag_tcp) {	    i = tcp_info();	    if (i)		return (i);	}	if (!flag_arg || flag_udp) {	    i = udp_info();	    if (i)		return (i);	}	if (!flag_arg || flag_raw) {	    i = raw_info();	    if (i)		return (i);	}	if (flag_igmp) {#if HAVE_AFINET6	    printf( "IPv6/");#endif	    printf( _("IPv4 Group Memberships\n") );	    printf( _("Interface       RefCnt Group\n") );	    printf( "--------------- ------ ---------------------\n" );	    i = igmp_info();	    if (i)	        return (i);	}#endif	if (!flag_arg || flag_unx) {#if HAVE_AFUNIX	    prg_cache_load();	    i = unix_info();	    if (i)		return (i);#else	    if (flag_arg) {		i = 1;		ENOSUPP("netstat", "AF UNIX");	    }#endif	}	if (!flag_arg || flag_ipx) {#if HAVE_AFIPX	    i = ipx_info();	    if (i)		return (i);#else	    if (flag_arg) {		i = 1;		ENOSUPP("netstat", "AF IPX");	    }#endif	}	if (!flag_arg || flag_ax25) {#if HAVE_AFAX25	    i = ax25_info();	    if (i)		return (i);#else	    if (flag_arg) {		i = 1;		ENOSUPP("netstat", "AF AX25");	    }#endif	}	if (!flag_arg || flag_netrom) {#if HAVE_AFNETROM	    i = netrom_info();	    if (i)		return (i);#else	    if (flag_arg) {		i = 1;		ENOSUPP("netstat", "AF NETROM");	    }#endif	}	if (!flag_cnt || i)	    break;	sleep(1);	prg_cache_clear();    }    return (i);}