mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-02 23:35:23 +00:00
Clean up bogus Sun CC pointer type mismatches. Clean up signed vs. unsigned character pointer mismatches.
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
responses. */
|
responses. */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997 The Internet Software Consortium.
|
* Copyright (c) 1997, 1998 The Internet Software Consortium.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
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 */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -86,7 +86,8 @@ void icmp_startup (routep, handler)
|
|||||||
(char *)&state, sizeof state) < 0)
|
(char *)&state, sizeof state) < 0)
|
||||||
error ("Unable to disable SO_DONTROUTE on ICMP socket: %m");
|
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)
|
int icmp_echorequest (addr)
|
||||||
@@ -144,7 +145,7 @@ void icmp_echoreply (protocol)
|
|||||||
void (*handler) PROTO ((struct iaddr, u_int8_t *, int));
|
void (*handler) PROTO ((struct iaddr, u_int8_t *, int));
|
||||||
|
|
||||||
len = sizeof from;
|
len = sizeof from;
|
||||||
status = recvfrom (protocol -> fd, icbuf, sizeof icbuf, 0,
|
status = recvfrom (protocol -> fd, (char *)icbuf, sizeof icbuf, 0,
|
||||||
(struct sockaddr *)&from, &len);
|
(struct sockaddr *)&from, &len);
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
warn ("icmp_echoreply: %m");
|
warn ("icmp_echoreply: %m");
|
||||||
@@ -170,7 +171,8 @@ void icmp_echoreply (protocol)
|
|||||||
|
|
||||||
/* If we were given a second-stage handler, call it. */
|
/* If we were given a second-stage handler, call it. */
|
||||||
if (protocol -> local) {
|
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);
|
memcpy (ia.iabuf, &from.sin_addr, sizeof from.sin_addr);
|
||||||
ia.len = sizeof from.sin_addr;
|
ia.len = sizeof from.sin_addr;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user