X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/f2046003ab70e7a1c8bc7ec7a2f880f2d5e07c4a..aa37262ac40d0a26f1607f0f79202c5685605aa0:/print-ldp.c diff --git a/print-ldp.c b/print-ldp.c index 4e71ade4..ab4f6c63 100644 --- a/print-ldp.c +++ b/print-ldp.c @@ -210,7 +210,7 @@ static const struct tok ldp_fec_martini_ifparm_vccv_cv_values[] = { { 0, NULL} }; -static int ldp_pdu_print(netdissect_options *, register const u_char *); +static int ldp_pdu_print(netdissect_options *, const u_char *); /* * ldp tlv header @@ -230,11 +230,11 @@ static int ldp_pdu_print(netdissect_options *, register const u_char *); */ #define TLV_TCHECK(minlen) \ - ND_TCHECK2(*tptr, minlen); if (tlv_tlen < minlen) goto badtlv; + ND_TCHECK_LEN(tptr, minlen); if (tlv_tlen < minlen) goto badtlv; static int ldp_tlv_print(netdissect_options *ndo, - register const u_char *tptr, + const u_char *tptr, u_short msg_tlen) { struct ldp_tlv_header { @@ -304,7 +304,7 @@ ldp_tlv_print(netdissect_options *ndo, switch (af) { case AFNUM_INET: while(tlv_tlen >= sizeof(struct in_addr)) { - ND_TCHECK2(*tptr, sizeof(struct in_addr)); + ND_TCHECK_LEN(tptr, sizeof(struct in_addr)); ND_PRINT((ndo, " %s", ipaddr_string(ndo, tptr))); tlv_tlen-=sizeof(struct in_addr); tptr+=sizeof(struct in_addr); @@ -312,7 +312,7 @@ ldp_tlv_print(netdissect_options *ndo, break; case AFNUM_INET6: while(tlv_tlen >= sizeof(struct in6_addr)) { - ND_TCHECK2(*tptr, sizeof(struct in6_addr)); + ND_TCHECK_LEN(tptr, sizeof(struct in6_addr)); ND_PRINT((ndo, " %s", ip6addr_string(ndo, tptr))); tlv_tlen-=sizeof(struct in6_addr); tptr+=sizeof(struct in6_addr); @@ -544,7 +544,7 @@ badtlv: void ldp_print(netdissect_options *ndo, - register const u_char *pptr, register u_int len) + const u_char *pptr, u_int len) { int processed; while (len > (sizeof(struct ldp_common_header) + sizeof(struct ldp_msg_header))) { @@ -558,7 +558,7 @@ ldp_print(netdissect_options *ndo, static int ldp_pdu_print(netdissect_options *ndo, - register const u_char *pptr) + const u_char *pptr) { const struct ldp_common_header *ldp_com_header; const struct ldp_msg_header *ldp_msg_header; @@ -607,7 +607,7 @@ ldp_pdu_print(netdissect_options *ndo, while(tlen>0) { /* did we capture enough for fully decoding the msg header ? */ - ND_TCHECK2(*tptr, sizeof(struct ldp_msg_header)); + ND_TCHECK_LEN(tptr, sizeof(struct ldp_msg_header)); ldp_msg_header = (const struct ldp_msg_header *)tptr; msg_len=EXTRACT_BE_U_2(ldp_msg_header->length); @@ -640,7 +640,7 @@ ldp_pdu_print(netdissect_options *ndo, msg_tlen=msg_len-(sizeof(struct ldp_msg_header)-4); /* Type & Length fields not included */ /* did we capture enough for fully decoding the message ? */ - ND_TCHECK2(*tptr, msg_len); + ND_TCHECK_LEN(tptr, msg_len); hexdump=FALSE; switch(msg_type) {