From: Ted Lemon Date: Mon, 16 Mar 1998 06:11:03 +0000 (+0000) Subject: Include dhcpd.h only once. Clean up dangling ifdef. Clean up interface discovery... X-Git-Tag: carrel-2~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb74bda94fe76586662759d53d8826d65906f919;p=thirdparty%2Fdhcp.git Include dhcpd.h only once. Clean up dangling ifdef. Clean up interface discovery messages. --- diff --git a/common/dlpi.c b/common/dlpi.c index f30a5af2c..7d02ec0b6 100644 --- a/common/dlpi.c +++ b/common/dlpi.c @@ -85,42 +85,40 @@ #include "dhcpd.h" #if defined (USE_DLPI_SEND) || defined (USE_DLPI_RECEIVE) -#include "dhcpd.h" -#ifdef USE_DLPI -#include -#include -#include -#include -#ifdef USE_DLPI_PFMOD -# include -#endif -#ifdef USE_POLL -# include -#endif +# include +# include +# include +# include +# ifdef USE_DLPI_PFMOD +# include +# endif +# ifdef USE_POLL +# include +# endif -#include -#include "includes/netinet/ip.h" -#include "includes/netinet/udp.h" -#include "includes/netinet/if_ether.h" +# include +# include "includes/netinet/ip.h" +# include "includes/netinet/udp.h" +# include "includes/netinet/if_ether.h" -#ifdef USE_DLPI_PFMOD -# ifdef USE_DLPI_RAW -# define DLPI_MODNAME "DLPI+RAW+PFMOD" -# else -# define DLPI_MODNAME "DLPI+PFMOD" -# endif -#else -# ifdef USE_DLPI_RAW -# define DLPI_MODNAME "DLPI+RAW" +# ifdef USE_DLPI_PFMOD +# ifdef USE_DLPI_RAW +# define DLPI_MODNAME "DLPI+RAW+PFMOD" +# else +# define DLPI_MODNAME "DLPI+PFMOD" +# endif # else -# define DLPI_MODNAME "DLPI" +# ifdef USE_DLPI_RAW +# define DLPI_MODNAME "DLPI+RAW" +# else +# define DLPI_MODNAME "DLPI" +# endif # endif -#endif -#ifndef ABS -# define ABS(x) ((x) >= 0 ? (x) : 0-(x)) -#endif +# ifndef ABS +# define ABS(x) ((x) >= 0 ? (x) : 0-(x)) +# endif static int strioctl PROTO ((int fd, int cmd, int timeout, int len, char *dp)); @@ -163,9 +161,9 @@ static int dlpiunitdataind PROTO ((int fd, unsigned char *data, int datalen)); -#ifndef USE_POLL +# ifndef USE_POLL static void sigalrm PROTO ((int sig)); -#endif +# endif static int expected PROTO ((unsigned long prim, union DL_primitives *dlp, int msgflags)); static int strgetmsg PROTO ((int fd, struct strbuf *ctlp, @@ -343,8 +341,8 @@ void if_register_send (info) #endif if (!quiet_interface_discovery) - note ("Sending on %s/%s/%s", - DLPI_MODNAME, + note ("Sending on DLPI/%s/%s/%s", + info -> name, print_hw_addr (info -> hw_address.htype, info -> hw_address.hlen, info -> hw_address.haddr), @@ -425,8 +423,8 @@ void if_register_receive (info) #endif if (!quiet_interface_discovery) - note ("Listening on %s/%s/%s", - DLPI_MODNAME, + note ("Listening on DLPI/%s/%s/%s", + info -> name, print_hw_addr (info -> hw_address.htype, info -> hw_address.hlen, info -> hw_address.haddr),