diff options
Diffstat (limited to 'print-rpki-rtr.c')
-rw-r--r-- | print-rpki-rtr.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/print-rpki-rtr.c b/print-rpki-rtr.c index 5c52863b..67ba86b0 100644 --- a/print-rpki-rtr.c +++ b/print-rpki-rtr.c @@ -200,7 +200,7 @@ rpki_rtr_pdu_print (netdissect_options *ndo, const u_char *tptr, const u_int len ND_TCHECK2(*tptr, sizeof(rpki_rtr_pdu)); pdu_header = (const rpki_rtr_pdu *)tptr; pdu_type = pdu_header->pdu_type; - pdu_len = EXTRACT_32BITS(pdu_header->length); + pdu_len = EXTRACT_BE_32BITS(pdu_header->length); /* Do not check bounds with pdu_len yet, do it in the case blocks * below to make it possible to decode at least the beginning of * a truncated Error Report PDU or a truncated encapsulated PDU. @@ -229,8 +229,8 @@ rpki_rtr_pdu_print (netdissect_options *ndo, const u_char *tptr, const u_int len msg = (const u_char *)(pdu_header + 1); ND_PRINT((ndo, "%sSession ID: 0x%04x, Serial: %u", indent_string(indent+2), - EXTRACT_16BITS(pdu_header->u.session_id), - EXTRACT_32BITS(msg))); + EXTRACT_BE_16BITS(pdu_header->u.session_id), + EXTRACT_BE_32BITS(msg))); break; /* @@ -253,7 +253,7 @@ rpki_rtr_pdu_print (netdissect_options *ndo, const u_char *tptr, const u_int len /* no additional boundary to check */ ND_PRINT((ndo, "%sSession ID: 0x%04x", indent_string(indent+2), - EXTRACT_16BITS(pdu_header->u.session_id))); + EXTRACT_BE_16BITS(pdu_header->u.session_id))); break; case RPKI_RTR_IPV4_PREFIX_PDU: @@ -268,7 +268,7 @@ rpki_rtr_pdu_print (netdissect_options *ndo, const u_char *tptr, const u_int len indent_string(indent+2), ipaddr_string(ndo, pdu->prefix), pdu->prefix_length, pdu->max_length, - EXTRACT_32BITS(pdu->as), pdu->flags)); + EXTRACT_BE_32BITS(pdu->as), pdu->flags)); } break; @@ -284,7 +284,7 @@ rpki_rtr_pdu_print (netdissect_options *ndo, const u_char *tptr, const u_int len indent_string(indent+2), ip6addr_string(ndo, pdu->prefix), pdu->prefix_length, pdu->max_length, - EXTRACT_32BITS(pdu->as), pdu->flags)); + EXTRACT_BE_32BITS(pdu->as), pdu->flags)); } break; @@ -302,10 +302,10 @@ rpki_rtr_pdu_print (netdissect_options *ndo, const u_char *tptr, const u_int len * data element, more data elements may be present. */ pdu = (const rpki_rtr_pdu_error_report *)tptr; - encapsulated_pdu_length = EXTRACT_32BITS(pdu->encapsulated_pdu_length); + encapsulated_pdu_length = EXTRACT_BE_32BITS(pdu->encapsulated_pdu_length); tlen += 4; - error_code = EXTRACT_16BITS(pdu->pdu_header.u.error_code); + error_code = EXTRACT_BE_16BITS(pdu->pdu_header.u.error_code); ND_PRINT((ndo, "%sError code: %s (%u), Encapsulated PDU length: %u", indent_string(indent+2), tok2str(rpki_rtr_error_codes, "Unknown", error_code), @@ -347,7 +347,7 @@ rpki_rtr_pdu_print (netdissect_options *ndo, const u_char *tptr, const u_int len /* * Extract, trail-zero and print the Error message. */ - text_length = EXTRACT_32BITS(tptr + tlen); + text_length = EXTRACT_BE_32BITS(tptr + tlen); tlen += 4; if (text_length) { |