mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-29 13:28:14 +00:00
Fix cross-platform compile warnings
This commit is contained in:
parent
cb3993fc65
commit
a7394d157f
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: icmp.c,v 1.26 2001/02/12 19:42:21 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: icmp.c,v 1.27 2001/02/17 21:34:50 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@ -233,7 +233,7 @@ isc_result_t icmp_echoreply (h)
|
|||||||
struct icmp *icfrom;
|
struct icmp *icfrom;
|
||||||
struct ip *ip;
|
struct ip *ip;
|
||||||
struct sockaddr_in from;
|
struct sockaddr_in from;
|
||||||
unsigned char icbuf [1500];
|
u_int8_t icbuf [1500];
|
||||||
int status;
|
int status;
|
||||||
SOCKLEN_T sl;
|
SOCKLEN_T sl;
|
||||||
int hlen, len;
|
int hlen, len;
|
||||||
@ -279,7 +279,7 @@ isc_result_t icmp_echoreply (h)
|
|||||||
if (trace_record ()) {
|
if (trace_record ()) {
|
||||||
iov [0].buf = (char *)&ia;
|
iov [0].buf = (char *)&ia;
|
||||||
iov [0].len = sizeof ia;
|
iov [0].len = sizeof ia;
|
||||||
iov [1].buf = icbuf;
|
iov [1].buf = (char *)icbuf;
|
||||||
iov [1].len = len;
|
iov [1].len = len;
|
||||||
trace_write_packet_iov (trace_icmp_input, 2, iov, MDL);
|
trace_write_packet_iov (trace_icmp_input, 2, iov, MDL);
|
||||||
}
|
}
|
||||||
@ -294,9 +294,9 @@ void trace_icmp_input_input (trace_type_t *ttype, unsigned length, char *buf)
|
|||||||
{
|
{
|
||||||
struct iaddr *ia;
|
struct iaddr *ia;
|
||||||
unsigned len;
|
unsigned len;
|
||||||
char *icbuf;
|
u_int8_t *icbuf;
|
||||||
ia = (struct iaddr *)buf;
|
ia = (struct iaddr *)buf;
|
||||||
icbuf = (char *)(ia + 1);
|
icbuf = (u_int8_t *)(ia + 1);
|
||||||
if (icmp_state -> icmp_handler)
|
if (icmp_state -> icmp_handler)
|
||||||
(*icmp_state -> icmp_handler) (*ia, icbuf,
|
(*icmp_state -> icmp_handler) (*ia, icbuf,
|
||||||
(int)(length - sizeof ia));
|
(int)(length - sizeof ia));
|
||||||
|
@ -139,7 +139,7 @@ static void trace_connection_output_stop (trace_type_t *ttype) { }
|
|||||||
isc_result_t omapi_connection_reader (omapi_object_t *h)
|
isc_result_t omapi_connection_reader (omapi_object_t *h)
|
||||||
{
|
{
|
||||||
#if defined (TRACING)
|
#if defined (TRACING)
|
||||||
return omapi_connection_reader_trace (h, 0, (char *)0, (int *)0);
|
return omapi_connection_reader_trace (h, 0, (char *)0, (unsigned *)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static isc_result_t omapi_connection_reader_trace (omapi_object_t *h,
|
static isc_result_t omapi_connection_reader_trace (omapi_object_t *h,
|
||||||
|
@ -237,7 +237,7 @@ isc_result_t omapi_connect_list (omapi_object_t *c,
|
|||||||
#if defined (TRACING)
|
#if defined (TRACING)
|
||||||
omapi_array_t *omapi_connections;
|
omapi_array_t *omapi_connections;
|
||||||
|
|
||||||
OMAPI_ARRAY_TYPE(omapi_connection, omapi_connection_object_t);
|
OMAPI_ARRAY_TYPE(omapi_connection, omapi_connection_object_t)
|
||||||
|
|
||||||
void omapi_connection_trace_setup (void) {
|
void omapi_connection_trace_setup (void) {
|
||||||
trace_connect = trace_type_register ("connect", (void *)0,
|
trace_connect = trace_type_register ("connect", (void *)0,
|
||||||
|
@ -313,7 +313,7 @@ isc_result_t omapi_listener_connect (omapi_connection_object_t **obj,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined (TRACING)
|
#if defined (TRACING)
|
||||||
OMAPI_ARRAY_TYPE(omapi_listener, omapi_listener_object_t);
|
OMAPI_ARRAY_TYPE(omapi_listener, omapi_listener_object_t)
|
||||||
|
|
||||||
void omapi_listener_trace_setup (void) {
|
void omapi_listener_trace_setup (void) {
|
||||||
trace_listener_accept =
|
trace_listener_accept =
|
||||||
|
@ -58,11 +58,11 @@ ssize_t trace_mr_send (int, void *, size_t, int);
|
|||||||
ssize_t trace_mr_read_playback (void *, size_t);
|
ssize_t trace_mr_read_playback (void *, size_t);
|
||||||
void trace_mr_read_record (void *, ssize_t);
|
void trace_mr_read_record (void *, ssize_t);
|
||||||
ssize_t trace_mr_recvfrom (int s, void *, size_t, int,
|
ssize_t trace_mr_recvfrom (int s, void *, size_t, int,
|
||||||
struct sockaddr *, socklen_t *);
|
struct sockaddr *, SOCKLEN_T *);
|
||||||
ssize_t trace_mr_read (int, void *, size_t);
|
ssize_t trace_mr_read (int, void *, size_t);
|
||||||
int trace_mr_connect (int s, const struct sockaddr *, socklen_t);
|
int trace_mr_connect (int s, const struct sockaddr *, SOCKLEN_T);
|
||||||
int trace_mr_socket (int, int, int);
|
int trace_mr_socket (int, int, int);
|
||||||
int trace_mr_bind (int, const struct sockaddr *, socklen_t);
|
int trace_mr_bind (int, const struct sockaddr *, SOCKLEN_T);
|
||||||
int trace_mr_close (int);
|
int trace_mr_close (int);
|
||||||
time_t trace_mr_time (time_t *);
|
time_t trace_mr_time (time_t *);
|
||||||
int trace_mr_select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
|
int trace_mr_select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
|
||||||
@ -177,7 +177,7 @@ void trace_mr_read_record (void *buf, ssize_t rv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ssize_t trace_mr_recvfrom (int s, void *buf, size_t len, int flags,
|
ssize_t trace_mr_recvfrom (int s, void *buf, size_t len, int flags,
|
||||||
struct sockaddr *from, socklen_t *fromlen)
|
struct sockaddr *from, SOCKLEN_T *fromlen)
|
||||||
{
|
{
|
||||||
ssize_t rv;
|
ssize_t rv;
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ ssize_t trace_mr_read (int d, void *buf, size_t nbytes)
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
int trace_mr_connect (int s, const struct sockaddr *name, socklen_t namelen)
|
int trace_mr_connect (int s, const struct sockaddr *name, SOCKLEN_T namelen)
|
||||||
{
|
{
|
||||||
if (!trace_playback ())
|
if (!trace_playback ())
|
||||||
return connect (s, name, namelen);
|
return connect (s, name, namelen);
|
||||||
@ -221,7 +221,7 @@ int trace_mr_socket (int domain, int type, int protocol)
|
|||||||
return 1000;
|
return 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
int trace_mr_bind (int s, const struct sockaddr *name, socklen_t namelen)
|
int trace_mr_bind (int s, const struct sockaddr *name, SOCKLEN_T namelen)
|
||||||
{
|
{
|
||||||
if (!trace_playback ())
|
if (!trace_playback ())
|
||||||
return bind (s, name, namelen);
|
return bind (s, name, namelen);
|
||||||
|
@ -387,7 +387,7 @@ void trace_file_replay (const char *filename)
|
|||||||
tracepacket_t *tpkt = (tracepacket_t *)0;
|
tracepacket_t *tpkt = (tracepacket_t *)0;
|
||||||
int status;
|
int status;
|
||||||
char *buf = (char *)0;
|
char *buf = (char *)0;
|
||||||
int buflen;
|
unsigned buflen;
|
||||||
unsigned bufmax = 0;
|
unsigned bufmax = 0;
|
||||||
trace_type_t *ttype = (trace_type_t *)0;
|
trace_type_t *ttype = (trace_type_t *)0;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user