diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-11-22 23:54:09 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-11-22 23:54:09 +0100 |
commit | da20bc56d6100b5275d6f85c4a25bac1dab4e57e (patch) | |
tree | 643c746e737c54d5a13d0b0083049d847d2cff24 /print-vqp.c | |
parent | 3c8f3e13b03380742c24070f8a7b56fe12c6b8ee (diff) | |
download | tcpdump-da20bc56d6100b5275d6f85c4a25bac1dab4e57e.tar.gz |
Rename EXTRACT_ macros
Now all the macros have a name meaning a count in bytes.
With _S_: signed, _U_: unsigned
e.g.:
EXTRACT_BE_32BITS -> EXTRACT_BE_U_4
EXTRACT_LE_32BITS -> EXTRACT_LE_U_4
...
EXTRACT_BE_INT32 -> EXTRACT_BE_S_4
and have:
EXTRACT_8BITS -> EXTRACT_U_1
EXTRACT_INT8 -> EXTRACT_S_1
Diffstat (limited to 'print-vqp.c')
-rw-r--r-- | print-vqp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/print-vqp.c b/print-vqp.c index 0db04fd6..e931025c 100644 --- a/print-vqp.c +++ b/print-vqp.c @@ -143,7 +143,7 @@ vqp_print(netdissect_options *ndo, register const u_char *pptr, register u_int l tok2str(vqp_msg_type_values, "unknown (%u)",vqp_common_header->msg_type), tok2str(vqp_error_code_values, "unknown (%u)",vqp_common_header->error_code), vqp_common_header->error_code, - EXTRACT_BE_32BITS(&vqp_common_header->sequence), + EXTRACT_BE_U_4(&vqp_common_header->sequence), nitems, len)); @@ -157,8 +157,8 @@ vqp_print(netdissect_options *ndo, register const u_char *pptr, register u_int l ND_TCHECK(*vqp_obj_tlv); if (sizeof(struct vqp_obj_tlv_t) > tlen) goto trunc; - vqp_obj_type = EXTRACT_BE_32BITS(vqp_obj_tlv->obj_type); - vqp_obj_len = EXTRACT_BE_16BITS(vqp_obj_tlv->obj_length); + vqp_obj_type = EXTRACT_BE_U_4(vqp_obj_tlv->obj_type); + vqp_obj_len = EXTRACT_BE_U_2(vqp_obj_tlv->obj_length); tptr+=sizeof(struct vqp_obj_tlv_t); tlen-=sizeof(struct vqp_obj_tlv_t); @@ -180,7 +180,7 @@ vqp_print(netdissect_options *ndo, register const u_char *pptr, register u_int l case VQP_OBJ_IP_ADDRESS: if (vqp_obj_len != 4) goto trunc; - ND_PRINT((ndo, "%s (0x%08x)", ipaddr_string(ndo, tptr), EXTRACT_BE_32BITS(tptr))); + ND_PRINT((ndo, "%s (0x%08x)", ipaddr_string(ndo, tptr), EXTRACT_BE_U_4(tptr))); break; /* those objects have similar semantics - fall through */ case VQP_OBJ_PORT_NAME: |