/* \summary: Interior Gateway Routing Protocol (IGRP) printer */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include "netdissect-stdinc.h"
nd_uint16_t ig_as; /* autonomous system number */
nd_uint16_t ig_ni; /* number of subnet in local net */
nd_uint16_t ig_ns; /* number of networks in AS */
- nd_uint16_t ig_nx; /* number of networks ouside AS */
+ nd_uint16_t ig_nx; /* number of networks outside AS */
nd_uint16_t ig_sum; /* checksum of IGRP header & data */
};
length -= sizeof(*hdr);
while (length >= IGRP_RTE_SIZE) {
const struct igrprte *igr = (const struct igrprte *)cp;
+ uint8_t net0 = GET_U_1(&igr->igr_net[0]);
+ uint8_t net1 = GET_U_1(&igr->igr_net[1]);
+ uint8_t net2 = GET_U_1(&igr->igr_net[2]);
+
if (nint > 0) {
- ND_PRINT(" *.%u.%u.%u", igr->igr_net[0], igr->igr_net[1], igr->igr_net[2]);
+ ND_PRINT(" *.%u.%u.%u", net0, net1, net2);
igrp_entry_print(ndo, igr);
--nint;
} else if (nsys > 0) {
- ND_PRINT(" %u.%u.%u.0", igr->igr_net[0], igr->igr_net[1], igr->igr_net[2]);
+ ND_PRINT(" %u.%u.%u.0", net0, net1, net2);
igrp_entry_print(ndo, igr);
--nsys;
} else if (next > 0) {
- ND_PRINT(" X%u.%u.%u.0", igr->igr_net[0], igr->igr_net[1], igr->igr_net[2]);
+ ND_PRINT(" X%u.%u.%u.0", net0, net1, net2);
igrp_entry_print(ndo, igr);
--next;
} else {