responses. */
/*
- * Copyright (c) 1997 The Internet Software Consortium.
+ * Copyright (c) 1997, 1998 The Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#ifndef lint
static char copyright[] =
-"$Id: icmp.c,v 1.8 1998/01/12 01:00:42 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n";
+"$Id: icmp.c,v 1.9 1998/03/16 06:13:01 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
(char *)&state, sizeof state) < 0)
error ("Unable to disable SO_DONTROUTE on ICMP socket: %m");
- add_protocol ("icmp", icmp_protocol_fd, icmp_echoreply, handler);
+ add_protocol ("icmp", icmp_protocol_fd,
+ icmp_echoreply, (void *)handler);
}
int icmp_echorequest (addr)
void (*handler) PROTO ((struct iaddr, u_int8_t *, int));
len = sizeof from;
- status = recvfrom (protocol -> fd, icbuf, sizeof icbuf, 0,
+ status = recvfrom (protocol -> fd, (char *)icbuf, sizeof icbuf, 0,
(struct sockaddr *)&from, &len);
if (status < 0) {
warn ("icmp_echoreply: %m");
/* If we were given a second-stage handler, call it. */
if (protocol -> local) {
- handler = protocol -> local;
+ handler = ((void (*) PROTO ((struct iaddr, u_int8_t *, int)))
+ protocol -> local);
memcpy (ia.iabuf, &from.sin_addr, sizeof from.sin_addr);
ia.len = sizeof from.sin_addr;