summaryrefslogtreecommitdiff
path: root/cpack.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 /cpack.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 'cpack.c')
-rw-r--r--cpack.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/cpack.c b/cpack.c
index 94406f26..db3b6dc2 100644
--- a/cpack.c
+++ b/cpack.c
@@ -102,7 +102,7 @@ cpack_uint64(netdissect_options *ndo, struct cpack_state *cs, uint64_t *u)
if ((next = cpack_align_and_reserve(cs, sizeof(*u))) == NULL)
return -1;
- *u = EXTRACT_LE_U_8(next);
+ *u = GET_LE_U_8(next);
/* Move pointer past the uint64_t. */
cs->c_next = next + sizeof(*u);
@@ -118,7 +118,7 @@ cpack_int64(netdissect_options *ndo, struct cpack_state *cs, int64_t *u)
if ((next = cpack_align_and_reserve(cs, sizeof(*u))) == NULL)
return -1;
- *u = EXTRACT_LE_S_8(next);
+ *u = GET_LE_S_8(next);
/* Move pointer past the int64_t. */
cs->c_next = next + sizeof(*u);
@@ -134,7 +134,7 @@ cpack_uint32(netdissect_options *ndo, struct cpack_state *cs, uint32_t *u)
if ((next = cpack_align_and_reserve(cs, sizeof(*u))) == NULL)
return -1;
- *u = EXTRACT_LE_U_4(next);
+ *u = GET_LE_U_4(next);
/* Move pointer past the uint32_t. */
cs->c_next = next + sizeof(*u);
@@ -150,7 +150,7 @@ cpack_int32(netdissect_options *ndo, struct cpack_state *cs, int32_t *u)
if ((next = cpack_align_and_reserve(cs, sizeof(*u))) == NULL)
return -1;
- *u = EXTRACT_LE_S_4(next);
+ *u = GET_LE_S_4(next);
/* Move pointer past the int32_t. */
cs->c_next = next + sizeof(*u);
@@ -166,7 +166,7 @@ cpack_uint16(netdissect_options *ndo, struct cpack_state *cs, uint16_t *u)
if ((next = cpack_align_and_reserve(cs, sizeof(*u))) == NULL)
return -1;
- *u = EXTRACT_LE_U_2(next);
+ *u = GET_LE_U_2(next);
/* Move pointer past the uint16_t. */
cs->c_next = next + sizeof(*u);
@@ -182,7 +182,7 @@ cpack_int16(netdissect_options *ndo, struct cpack_state *cs, int16_t *u)
if ((next = cpack_align_and_reserve(cs, sizeof(*u))) == NULL)
return -1;
- *u = EXTRACT_LE_S_2(next);
+ *u = GET_LE_S_2(next);
/* Move pointer past the int16_t. */
cs->c_next = next + sizeof(*u);
@@ -197,7 +197,7 @@ cpack_uint8(netdissect_options *ndo, struct cpack_state *cs, uint8_t *u)
if ((size_t)(cs->c_next - cs->c_buf) >= cs->c_len)
return -1;
- *u = EXTRACT_U_1(cs->c_next);
+ *u = GET_U_1(cs->c_next);
/* Move pointer past the uint8_t. */
cs->c_next++;
@@ -212,7 +212,7 @@ cpack_int8(netdissect_options *ndo, struct cpack_state *cs, int8_t *u)
if ((size_t)(cs->c_next - cs->c_buf) >= cs->c_len)
return -1;
- *u = EXTRACT_S_1(cs->c_next);
+ *u = GET_S_1(cs->c_next);
/* Move pointer past the int8_t. */
cs->c_next++;