*/
static int
ip_printroute(netdissect_options *ndo,
- register const u_char *cp, u_int length)
+ const u_char *cp, u_int length)
{
- register u_int ptr;
- register u_int len;
+ u_int ptr;
+ u_int len;
if (length < 3) {
ND_PRINT((ndo, " [bad length %u]", length));
if (len < 2)
break;
}
- ND_TCHECK2(*cp, len);
+ ND_TCHECK_LEN(cp, len);
switch (tt) {
case IPOPT_SSRR:
static int
ip_printts(netdissect_options *ndo,
- register const u_char *cp, u_int length)
+ const u_char *cp, u_int length)
{
- register u_int ptr;
- register u_int len;
+ u_int ptr;
+ u_int len;
int hoplen;
const char *type;
for (len = 4; len < length; len += hoplen) {
if (ptr == len)
type = " ^ ";
- ND_TCHECK2(cp[len], hoplen);
+ ND_TCHECK_LEN(cp + len, hoplen);
ND_PRINT((ndo, "%s%d@%s", type, EXTRACT_BE_U_4(cp + len + hoplen - 4),
hoplen!=8 ? "" : ipaddr_string(ndo, cp + len)));
type = " ";
*/
static void
ip_optprint(netdissect_options *ndo,
- register const u_char *cp, u_int length)
+ const u_char *cp, u_int length)
{
- register u_int option_len;
+ u_int option_len;
const char *sep = "";
for (; length > 0; cp += option_len, length -= option_len) {
return;
}
- ND_TCHECK2(*cp, option_len);
+ ND_TCHECK_LEN(cp, option_len);
switch (option_code) {
case IPOPT_EOL:
switch (ipds->nh) {
case IPPROTO_AH:
- if (!ND_TTEST(*ipds->cp)) {
+ if (!ND_TTEST_1(ipds->cp)) {
ND_PRINT((ndo, "[|AH]"));
break;
}
}
void
-ipN_print(netdissect_options *ndo, register const u_char *bp, register u_int length)
+ipN_print(netdissect_options *ndo, const u_char *bp, u_int length)
{
if (length < 1) {
ND_PRINT((ndo, "truncated-ip %d", length));