summaryrefslogtreecommitdiff
path: root/print-ipx.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-06-16 17:23:21 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2019-03-26 21:06:24 +0100
commitee68aa36460d7efeca48747f33b7f2adc0900bfb (patch)
tree72c1b65d29301835c0e064b433ea685fc856a68e /print-ipx.c
parent1af20c3adc4dfef93de41d4fcd02f0aeb6bbfd4e (diff)
downloadtcpdump-ee68aa36460d7efeca48747f33b7f2adc0900bfb.tar.gz
Use the new GET_ macros instead of the EXTRACT_ ones
The exceptions are currently: Some EXTRACT_ in print-juniper.c, not used on packet buffer pointer. An EXTRACT_BE_U_3 in addrtoname.c, not always used on packet buffer pointer.
Diffstat (limited to 'print-ipx.c')
-rw-r--r--print-ipx.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/print-ipx.c b/print-ipx.c
index 67e0eb7f..4f4e3059 100644
--- a/print-ipx.c
+++ b/print-ipx.c
@@ -79,16 +79,16 @@ ipx_print(netdissect_options *ndo, const u_char *p, u_int length)
ND_TCHECK_2(ipx->srcSkt);
ND_PRINT("%s.%04x > ",
- ipxaddr_string(ndo, EXTRACT_BE_U_4(ipx->srcNet), ipx->srcNode),
- EXTRACT_BE_U_2(ipx->srcSkt));
+ ipxaddr_string(ndo, GET_BE_U_4(ipx->srcNet), ipx->srcNode),
+ GET_BE_U_2(ipx->srcSkt));
ND_PRINT("%s.%04x: ",
- ipxaddr_string(ndo, EXTRACT_BE_U_4(ipx->dstNet), ipx->dstNode),
- EXTRACT_BE_U_2(ipx->dstSkt));
+ ipxaddr_string(ndo, GET_BE_U_4(ipx->dstNet), ipx->dstNode),
+ GET_BE_U_2(ipx->dstSkt));
/* take length from ipx header */
ND_TCHECK_2(ipx->length);
- length = EXTRACT_BE_U_2(ipx->length);
+ length = GET_BE_U_2(ipx->length);
if (length < ipxSize) {
ND_PRINT("[length %u < %u]", length, ipxSize);
@@ -107,9 +107,9 @@ ipxaddr_string(netdissect_options *ndo, uint32_t net, const u_char *node)
static char line[256];
nd_snprintf(line, sizeof(line), "%08x.%02x:%02x:%02x:%02x:%02x:%02x",
- net, EXTRACT_U_1(node), EXTRACT_U_1(node + 1),
- EXTRACT_U_1(node + 2), EXTRACT_U_1(node + 3),
- EXTRACT_U_1(node + 4), EXTRACT_U_1(node + 5));
+ net, GET_U_1(node), GET_U_1(node + 1),
+ GET_U_1(node + 2), GET_U_1(node + 3),
+ GET_U_1(node + 4), GET_U_1(node + 5));
return line;
}
@@ -119,7 +119,7 @@ ipx_decode(netdissect_options *ndo, const struct ipxHdr *ipx, const u_char *data
{
u_short dstSkt;
- dstSkt = EXTRACT_BE_U_2(ipx->dstSkt);
+ dstSkt = GET_BE_U_2(ipx->dstSkt);
switch (dstSkt) {
case IPX_SKT_NCP:
ND_PRINT("ipx-ncp %u", length);
@@ -160,7 +160,7 @@ ipx_sap_print(netdissect_options *ndo, const u_char *ipx, u_int length)
int command, i;
ND_TCHECK_2(ipx);
- command = EXTRACT_BE_U_2(ipx);
+ command = GET_BE_U_2(ipx);
ipx += 2;
length -= 2;
@@ -173,7 +173,7 @@ ipx_sap_print(netdissect_options *ndo, const u_char *ipx, u_int length)
ND_PRINT("ipx-sap-nearest-req");
ND_TCHECK_2(ipx);
- ND_PRINT(" %s", ipxsap_string(ndo, htons(EXTRACT_BE_U_2(ipx))));
+ ND_PRINT(" %s", ipxsap_string(ndo, htons(GET_BE_U_2(ipx))));
break;
case 2:
@@ -187,7 +187,7 @@ ipx_sap_print(netdissect_options *ndo, const u_char *ipx, u_int length)
ND_TCHECK_2(ipx);
if (length < 2)
goto trunc;
- ND_PRINT(" %s '", ipxsap_string(ndo, htons(EXTRACT_BE_U_2(ipx))));
+ ND_PRINT(" %s '", ipxsap_string(ndo, htons(GET_BE_U_2(ipx))));
ipx += 2;
length -= 2;
if (length < 48) {
@@ -208,7 +208,7 @@ ipx_sap_print(netdissect_options *ndo, const u_char *ipx, u_int length)
if (length < 10)
goto trunc;
ND_PRINT(" addr %s",
- ipxaddr_string(ndo, EXTRACT_BE_U_4(ipx), ipx + 4));
+ ipxaddr_string(ndo, GET_BE_U_4(ipx), ipx + 4));
ipx += 10;
length -= 10;
/*
@@ -237,7 +237,7 @@ ipx_rip_print(netdissect_options *ndo, const u_char *ipx, u_int length)
int command, i;
ND_TCHECK_2(ipx);
- command = EXTRACT_BE_U_2(ipx);
+ command = GET_BE_U_2(ipx);
ipx += 2;
length -= 2;
@@ -248,8 +248,8 @@ ipx_rip_print(netdissect_options *ndo, const u_char *ipx, u_int length)
if (length < 8)
goto trunc;
ND_TCHECK_8(ipx);
- ND_PRINT(" %08x/%u.%u", EXTRACT_BE_U_4(ipx),
- EXTRACT_BE_U_2(ipx + 4), EXTRACT_BE_U_2(ipx + 6));
+ ND_PRINT(" %08x/%u.%u", GET_BE_U_4(ipx),
+ GET_BE_U_2(ipx + 4), GET_BE_U_2(ipx + 6));
}
break;
case 2:
@@ -258,8 +258,8 @@ ipx_rip_print(netdissect_options *ndo, const u_char *ipx, u_int length)
if (length < 8)
goto trunc;
ND_TCHECK_8(ipx);
- ND_PRINT(" %08x/%u.%u", EXTRACT_BE_U_4(ipx),
- EXTRACT_BE_U_2(ipx + 4), EXTRACT_BE_U_2(ipx + 6));
+ ND_PRINT(" %08x/%u.%u", GET_BE_U_4(ipx),
+ GET_BE_U_2(ipx + 4), GET_BE_U_2(ipx + 6));
ipx += 8;
length -= 8;