* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
- u_long ii_ipaddr; /* IP address of this interface */
- u_long ii_netmask; /* subnet or net mask */
+ in_addr_t ii_ipaddr; /* IP address of this interface */
+ in_addr_t ii_netmask; /* subnet or net mask */
void init_one __P((char *));
void init_all __P((void));
void rarp_loop __P((void));
void lookup_eaddr __P((char *, u_char *));
void init_one __P((char *));
void init_all __P((void));
void rarp_loop __P((void));
void lookup_eaddr __P((char *, u_char *));
-void rarp_reply __P((struct if_info *, struct ether_header *, u_long));
-void update_arptab __P((u_char *, u_long));
+void rarp_reply __P((struct if_info *, struct ether_header *, in_addr_t));
+void update_arptab __P((u_char *, in_addr_t));
void err __P((int, const char *,...));
void debug __P((const char *,...));
void err __P((int, const char *,...));
void debug __P((const char *,...));
int aflag = 0; /* listen on "all" interfaces */
int dflag = 0; /* print debugging messages */
int fflag = 0; /* don't fork */
int aflag = 0; /* listen on "all" interfaces */
int dflag = 0; /* print debugging messages */
int fflag = 0; /* don't fork */
- (void) sprintf(device, "/dev/bpf%d", n++);
+ (void) snprintf(device, sizeof(device), "/dev/bpf%d", n++);
fd = open(device, O_RDWR);
} while (fd < 0 && errno == EBUSY);
fd = open(device, O_RDWR);
} while (fd < 0 && errno == EBUSY);
ii->ii_ipaddr & ii->ii_netmask, ii->ii_netmask);
if (target_ipaddr == 0) {
ii->ii_ipaddr & ii->ii_netmask, ii->ii_netmask);
if (target_ipaddr == 0) {