c = getopt_long(argc, argv, "-ht:adsVvf", longopts, NULL);
c = getopt_long(argc, argv, "-ht:aHdsVvf", longopts, NULL);
int main(int argc, char **argv){    int result = 0, mode = 0, c, nargs = 0, verbose = 0;    char *args[3];    struct hostent *hp;    int fd;#if I18N    bindtextdomain("net-tools", "/usr/share/locale");    textdomain("net-tools");#endif#if HAVE_HWETHER    /* Get a default hardware type.  */    hardware = get_hwtype("ether");#endif    do {	c = getopt_long(argc, argv, "-ht:adsVvf", longopts, NULL);	switch (c) {	case EOF:	    break;	case 'h':	    usage();	case 'V':	    fprintf(stderr, version_string);	    exit(1);	    break;	case 'v':	    verbose++;	    break;	case 'a':	case 's':	case 'd':	    if (mode) {		fprintf(stderr, _("%s: illegal option mix.\n"), argv[0]);		usage();	    } else {		mode = (c == 'a' ? MODE_DISPLAY : (c == 'd' ? MODE_DELETE : MODE_SET));	    }	    break;	case 'f':	    mode = MODE_ETHERS;	    break;	case 't':	    if (optarg) {		hardware = get_hwtype(optarg);	    } else {		usage();	    }	    break;	case 1:	    if (nargs == 2) {		usage();		exit(1);	    } else {		args[nargs++] = optarg;	    }	    break;	default:	    usage();	}    } while (c != EOF);    if (hardware == NULL) {	fprintf(stderr, _("rarp: %s: unknown hardware type.\n"), optarg);	exit(1);    }    switch (mode) {    case 0:	usage();    case MODE_DISPLAY:	if (nargs != (mode - 1)) {	    usage();	}	result = display_cache();	break;    case MODE_DELETE:    case MODE_SET:	if (nargs != (mode - 1)) {	    usage();	}	if ((hp = gethostbyname(args[0])) == NULL) {	    fprintf(stderr, _("rarp: %s: unknown host\n"), args[0]);	    exit(1);	}	if (fd = socket(PF_INET, SOCK_DGRAM, 0), fd < 0) {	    perror("socket");	    exit(1);	}	result = (mode == MODE_DELETE) ? rarp_delete(fd, hp) : rarp_set(fd, hp, args[1]);	close(fd);	break;    case MODE_ETHERS:	if (nargs != 0 && nargs != 1)	    usage();	if (fd = socket(PF_INET, SOCK_DGRAM, 0), fd < 0) {	    perror("socket");	    exit(1);	}	result = rarp_file(fd, nargs ? args[0] : _PATH_ETHERS);	close(fd);    }    exit(result);}