]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-egp.c
Avoiding conditional directives that break statements
[tcpdump] / print-egp.c
index 9c5c811e74e53bc399a555866e8a27298b52e055..e87d0d664c06ed3caf825b832723379a8a06cef1 100644 (file)
  * Initial contribution from Jeff Honig ([email protected]).
  */
 
-#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "addrtoname.h"
 #include "extract.h"
 
@@ -152,7 +151,7 @@ egpnrprint(netdissect_options *ndo,
                net = 0;
                netlen = 0;
        }
-       cp = (uint8_t *)(egp + 1);
+       cp = (const uint8_t *)(egp + 1);
 
        t_gateways = egp->egp_intgw + egp->egp_extgw;
        for (gateways = 0; gateways < t_gateways; ++gateways) {
@@ -215,7 +214,7 @@ egp_print(netdissect_options *ndo,
        register int code;
        register int type;
 
-       egp = (struct egp_packet *)bp;
+       egp = (const struct egp_packet *)bp;
         if (!ND_TTEST2(*egp, length)) {
                ND_PRINT((ndo, "[|egp]"));
                return;