-
-static const char *ipxaddr_string(u_int32_t, const u_char *);
-void ipx_decode(const struct ipxHdr *, const u_char *, u_int);
-void ipx_sap_print(const u_short *, u_int);
-void ipx_rip_print(const u_short *, u_int);
+/* well-known sockets */
+#define IPX_SKT_NCP 0x0451
+#define IPX_SKT_SAP 0x0452
+#define IPX_SKT_RIP 0x0453
+#define IPX_SKT_NETBIOS 0x0455
+#define IPX_SKT_DIAGNOSTICS 0x0456
+#define IPX_SKT_NWLINK_DGM 0x0553 /* NWLink datagram, may contain SMB */
+#define IPX_SKT_EIGRP 0x85be /* Cisco EIGRP over IPX */
+
+/* IPX transport header */
+struct ipxHdr {
+ uint16_t cksum; /* Checksum */
+ uint16_t length; /* Length, in bytes, including header */
+ uint8_t tCtl; /* Transport Control (i.e. hop count) */
+ uint8_t pType; /* Packet Type (i.e. level 2 protocol) */
+ uint16_t dstNet[2]; /* destination net */
+ uint8_t dstNode[6]; /* destination node */
+ uint16_t dstSkt; /* destination socket */
+ uint16_t srcNet[2]; /* source net */
+ uint8_t srcNode[6]; /* source node */
+ uint16_t srcSkt; /* source socket */
+};
+
+#define ipxSize 30
+
+static const char *ipxaddr_string(uint32_t, const u_char *);
+static void ipx_decode(netdissect_options *, const struct ipxHdr *, const u_char *, u_int);
+static void ipx_sap_print(netdissect_options *, const u_short *, u_int);
+static void ipx_rip_print(netdissect_options *, const u_short *, u_int);