rarpd.c (6c3f552a31dd0a0c8c59a028fd9bc507d43ec5cc) | rarpd.c (aa40a0da51cee66314cbf816546067d5177eed92) |
---|---|
1/* 2 * Copyright (c) 1990, 1991, 1992, 1993, 1996 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: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 4 unchanged lines hidden (view full) --- 13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 * the University nor the names of its contributors may be used to endorse 15 * or promote products derived from this software without specific prior 16 * written permission. 17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 */ | 1/* 2 * Copyright (c) 1990, 1991, 1992, 1993, 1996 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: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 4 unchanged lines hidden (view full) --- 13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 * the University nor the names of its contributors may be used to endorse 15 * or promote products derived from this software without specific prior 16 * written permission. 17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 */ |
21 |
|
21#ifndef lint | 22#ifndef lint |
22char copyright[] = | 23static const char copyright[] = |
23"@(#) Copyright (c) 1990, 1991, 1992, 1993, 1996\n\ 24The Regents of the University of California. All rights reserved.\n"; 25#endif /* not lint */ 26 27#ifndef lint 28static const char rcsid[] = | 24"@(#) Copyright (c) 1990, 1991, 1992, 1993, 1996\n\ 25The Regents of the University of California. All rights reserved.\n"; 26#endif /* not lint */ 27 28#ifndef lint 29static const char rcsid[] = |
29 "$Id: rarpd.c,v 1.15 1997/02/22 16:12:44 peter Exp $"; 30#endif | 30 "$Id$"; 31#endif /* not lint */ |
31 32/* 33 * rarpd - Reverse ARP Daemon 34 * 35 * Usage: rarpd -a [ -fsv ] [ hostname ] 36 * rarpd [ -fsv ] interface [ hostname ] 37 * 38 * 'hostname' is optional solely for backwards compatibility with Sun's rarpd. --- 110 unchanged lines hidden (view full) --- 149u_long ipaddrtonetmask __P((u_long)); 150char *eatoa __P((u_char *)); 151int rarp_bootable __P((u_long)); 152void rarp_loop __P((void)); 153int rarp_open __P((char *)); 154void rarp_process __P((struct if_info *, u_char *, u_int)); 155void rarp_reply __P((struct if_info *, struct ether_header *, u_long, u_int)); 156void update_arptab __P((u_char *, u_long)); | 32 33/* 34 * rarpd - Reverse ARP Daemon 35 * 36 * Usage: rarpd -a [ -fsv ] [ hostname ] 37 * rarpd [ -fsv ] interface [ hostname ] 38 * 39 * 'hostname' is optional solely for backwards compatibility with Sun's rarpd. --- 110 unchanged lines hidden (view full) --- 150u_long ipaddrtonetmask __P((u_long)); 151char *eatoa __P((u_char *)); 152int rarp_bootable __P((u_long)); 153void rarp_loop __P((void)); 154int rarp_open __P((char *)); 155void rarp_process __P((struct if_info *, u_char *, u_int)); 156void rarp_reply __P((struct if_info *, struct ether_header *, u_long, u_int)); 157void update_arptab __P((u_char *, u_long)); |
157void usage __P((void)); | 158static void usage __P((void)); |
158 159static u_char zero[6]; 160 161int sflag = 0; /* ignore /tftpboot */ 162 163void 164main(argc, argv) 165 int argc; --- 226 unchanged lines hidden (view full) --- 392 /* Verbose stuff */ 393 if (verbose) 394 for (ii = iflist; ii != NULL; ii = ii->ii_next) 395 syslog(LOG_DEBUG, "%s %s 0x%08x %s", 396 ii->ii_ifname, intoa(ntohl(ii->ii_ipaddr)), 397 ntohl(ii->ii_netmask), eatoa(ii->ii_eaddr)); 398} 399 | 159 160static u_char zero[6]; 161 162int sflag = 0; /* ignore /tftpboot */ 163 164void 165main(argc, argv) 166 int argc; --- 226 unchanged lines hidden (view full) --- 393 /* Verbose stuff */ 394 if (verbose) 395 for (ii = iflist; ii != NULL; ii = ii->ii_next) 396 syslog(LOG_DEBUG, "%s %s 0x%08x %s", 397 ii->ii_ifname, intoa(ntohl(ii->ii_ipaddr)), 398 ntohl(ii->ii_netmask), eatoa(ii->ii_eaddr)); 399} 400 |
400void | 401static void |
401usage() 402{ | 402usage() 403{ |
403 (void)fprintf(stderr, "usage: rarpd [ -afnv ] [ interface ]\n"); | 404 (void)fprintf(stderr, "usage: rarpd [-afnv] [interface]\n"); |
404 exit(1); 405} 406 407static int 408bpf_open() 409{ 410 int fd; 411 int n = 0; --- 598 unchanged lines hidden --- | 405 exit(1); 406} 407 408static int 409bpf_open() 410{ 411 int fd; 412 int n = 0; --- 598 unchanged lines hidden --- |