-#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-igrp.c,v 1.10 1999-10-30 05:11:14 itojun Exp $ (LBL)";
-#endif
-
-#include <sys/param.h>
-#include <sys/types.h> /* concession to AIX */
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-
-#include <errno.h>
-#include <stdio.h>
-
-#include "interface.h"
-#include "addrtoname.h"
-#include "igrp.h"
-#include "extract.h" /* must come after interface.h */
+/* \summary: Interior Gateway Routing Protocol (IGRP) printer */
+
+#include <config.h>
+
+#include "netdissect-stdinc.h"
+
+#include "netdissect.h"
+#include "extract.h"
+
+/* Cisco IGRP definitions */
+
+/* IGRP Header */
+
+struct igrphdr {
+ nd_uint8_t ig_vop; /* protocol version number / opcode */
+#define IGRP_V(x) (((x) & 0xf0) >> 4)
+#define IGRP_OP(x) ((x) & 0x0f)
+ nd_uint8_t ig_ed; /* edition number */
+ 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 outside AS */
+ nd_uint16_t ig_sum; /* checksum of IGRP header & data */
+};
+
+#define IGRP_UPDATE 1
+#define IGRP_REQUEST 2
+
+/* IGRP routing entry */
+
+struct igrprte {
+ nd_byte igr_net[3]; /* 3 significant octets of IP address */
+ nd_uint24_t igr_dly; /* delay in tens of microseconds */
+ nd_uint24_t igr_bw; /* bandwidth in units of 1 kb/s */
+ nd_uint16_t igr_mtu; /* MTU in octets */
+ nd_uint8_t igr_rel; /* percent packets successfully tx/rx */
+ nd_uint8_t igr_ld; /* percent of channel occupied */
+ nd_uint8_t igr_hct; /* hop count */
+};
+
+#define IGRP_RTE_SIZE 14 /* sizeof() is accurate now */