freebsd-dev/libexec/bootpd/tools/bootptest/bootptest.h
Robert Watson 45c0d45bb5 Emply contemporary function prototypes in bootpd, rather than relying on
locally defined K&R prototypes in .c files; use appropriate casts for
pointer types now that types for arguments are available at compile time.
This ensures that compilers with multiple incompatible calling conventions
can select the correct calling convention for external functions.

Sponsored by:	DARPA, AFRL
MFC after:	1 week
2017-03-26 14:37:12 +00:00

27 lines
712 B
C

/* bootptest.h */
/* $FreeBSD$ */
/*
* Hacks for sharing print-bootp.c between tcpdump and bootptest.
*/
#define ESRC(p) (p)
#define EDST(p) (p)
#ifndef USE_BFUNCS
/* Use mem/str functions */
/* There are no overlapped copies, so memcpy is OK. */
#define bcopy(a,b,c) memcpy(b,a,c)
#define bzero(p,l) memset(p,0,l)
#define bcmp(a,b,c) memcmp(a,b,c)
#endif
extern int vflag; /* verbose flag */
/* global pointers to beginning and end of current packet (during printing) */
extern unsigned char *packetp;
extern unsigned char *snapend;
void bootp_print(struct bootp *bp, int length, u_short sport,
u_short dport);
char *ipaddr_string(struct in_addr *);
int printfn(u_char *s, u_char *ep);