summaryrefslogtreecommitdiff
path: root/print-sl.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-sl.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-sl.c')
-rw-r--r--print-sl.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/print-sl.c b/print-sl.c
index e9b82fa2..14f9bc1b 100644
--- a/print-sl.c
+++ b/print-sl.c
@@ -134,7 +134,7 @@ sliplink_print(netdissect_options *ndo,
int dir;
u_int hlen;
- dir = EXTRACT_U_1(p + SLX_DIR);
+ dir = GET_U_1(p + SLX_DIR);
switch (dir) {
case SLIPDIR_IN:
@@ -150,7 +150,7 @@ sliplink_print(netdissect_options *ndo,
dir = -1;
break;
}
- switch (EXTRACT_U_1(p + SLX_CHDR) & 0xf0) {
+ switch (GET_U_1(p + SLX_CHDR) & 0xf0) {
case TYPE_IP:
ND_PRINT("ip %u: ", length + SLIP_HDRLEN);
@@ -162,7 +162,7 @@ sliplink_print(netdissect_options *ndo,
* Get it from the link layer since sl_uncompress_tcp()
* has restored the IP header copy to IPPROTO_TCP.
*/
- lastconn = EXTRACT_U_1(((const struct ip *)(p + SLX_CHDR))->ip_p);
+ lastconn = GET_U_1(((const struct ip *)(p + SLX_CHDR))->ip_p);
ND_PRINT("utcp %u: ", lastconn);
if (dir == -1) {
/* Direction is bogus, don't use it */
@@ -180,13 +180,13 @@ sliplink_print(netdissect_options *ndo,
/* Direction is bogus, don't use it */
return 0;
}
- if (EXTRACT_U_1(p + SLX_CHDR) & TYPE_COMPRESSED_TCP) {
+ if (GET_U_1(p + SLX_CHDR) & TYPE_COMPRESSED_TCP) {
if (compressed_sl_print(ndo, p + SLX_CHDR, ip,
length, dir) == -1)
goto trunc;
ND_PRINT(": ");
} else
- ND_PRINT("slip-%u!: ", EXTRACT_U_1(p + SLX_CHDR));
+ ND_PRINT("slip-%u!: ", GET_U_1(p + SLX_CHDR));
}
return 0;
trunc:
@@ -199,9 +199,9 @@ print_sl_change(netdissect_options *ndo,
{
u_int i;
- if ((i = EXTRACT_U_1(cp)) == 0) {
+ if ((i = GET_U_1(cp)) == 0) {
cp++;
- i = EXTRACT_BE_U_2(cp);
+ i = GET_BE_U_2(cp);
cp += 2;
}
ND_PRINT(" %s%u", str, i);
@@ -214,9 +214,9 @@ print_sl_winchange(netdissect_options *ndo,
{
int16_t i;
- if ((i = EXTRACT_U_1(cp)) == 0) {
+ if ((i = GET_U_1(cp)) == 0) {
cp++;
- i = EXTRACT_BE_S_2(cp);
+ i = GET_BE_S_2(cp);
cp += 2;
}
if (i >= 0)
@@ -234,10 +234,10 @@ compressed_sl_print(netdissect_options *ndo,
const u_char *cp = chdr;
u_int flags, hlen;
- flags = EXTRACT_U_1(cp);
+ flags = GET_U_1(cp);
cp++;
if (flags & NEW_C) {
- lastconn = EXTRACT_U_1(cp);
+ lastconn = GET_U_1(cp);
cp++;
ND_PRINT("ctcp %u", lastconn);
} else