In ND_PRINT() macro calls, *p++.
Partial list.
if (p + pl > endp)
goto trunc;
ND_PRINT((ndo, "pt=0x%02x, pl=%d, pb=", EXTRACT_8BITS((p - 2)), pl));
if (p + pl > endp)
goto trunc;
ND_PRINT((ndo, "pt=0x%02x, pl=%d, pb=", EXTRACT_8BITS((p - 2)), pl));
- while (pl-- > 0)
- ND_PRINT((ndo, " %02x", *p++));
+ while (pl-- > 0) {
+ ND_PRINT((ndo, " %02x", EXTRACT_8BITS(p)));
+ p++;
+ }
ND_TCHECK2(*p, 2);
if (p + 2 > endp)
goto trunc;
ND_TCHECK2(*p, 2);
if (p + 2 > endp)
goto trunc;
ND_TCHECK2(*p, al);
if (p + al > endp)
goto trunc;
ND_TCHECK2(*p, al);
if (p + al > endp)
goto trunc;
- while (al-- > 0)
- ND_PRINT((ndo, " %02x", *p++));
+ while (al-- > 0) {
+ ND_PRINT((ndo, " %02x", EXTRACT_8BITS(p)));
+ p++;
+ }
while (l > 0 && q < ep) {
if (q > p)
ND_PRINT((ndo,":"));
while (l > 0 && q < ep) {
if (q > p)
ND_PRINT((ndo,":"));
- ND_PRINT((ndo,"%02x", *q++));
+ ND_PRINT((ndo,"%02x", EXTRACT_8BITS(q)));
+ q++;
case AUTH_MSG_APPL_REQUEST:
cp += 2;
ND_TCHECK(*cp);
case AUTH_MSG_APPL_REQUEST:
cp += 2;
ND_TCHECK(*cp);
- ND_PRINT((ndo, "v%d ", *cp++));
+ ND_PRINT((ndo, "v%d ", EXTRACT_8BITS(cp)));
+ cp++;
- ND_PRINT((ndo, " (%d)", *cp++));
+ ND_PRINT((ndo, " (%d)", EXTRACT_8BITS(cp)));
+ cp++;
ND_TCHECK(*cp);
ND_PRINT((ndo, " (%d)", *cp));
break;
ND_TCHECK(*cp);
ND_PRINT((ndo, " (%d)", *cp));
break;
{
u_int i;
for (i=0; i<length; i++) {
{
u_int i;
for (i=0; i<length; i++) {
- ND_PRINT((ndo, "%c", *dat++));
+ ND_PRINT((ndo, "%c", EXTRACT_8BITS(dat)));
+ dat++;
{
u_int i;
for (i=0; i<length; i++) {
{
u_int i;
for (i=0; i<length; i++) {
- ND_PRINT((ndo, "%02x", *dat++));
+ ND_PRINT((ndo, "%02x", EXTRACT_8BITS(dat)));
+ dat++;
opt_len -= 3;
ND_PRINT((ndo, " id"));
opt_len -= 3;
ND_PRINT((ndo, " id"));
- while (opt_len--)
- ND_PRINT((ndo, " %u", *addr_id++));
+ while (opt_len--) {
+ ND_PRINT((ndo, " %u", EXTRACT_8BITS(addr_id)));
+ addr_id++;
+ }
ND_PRINT((ndo, ", Value "));
for (i = 0; i < val_size; i++) {
ND_TCHECK(*p);
ND_PRINT((ndo, ", Value "));
for (i = 0; i < val_size; i++) {
ND_TCHECK(*p);
- ND_PRINT((ndo, "%02x", *p++));
+ ND_PRINT((ndo, "%02x", EXTRACT_8BITS(p)));
+ p++;
}
name_size = len - (p - p0);
ND_PRINT((ndo, ", Name "));
}
name_size = len - (p - p0);
ND_PRINT((ndo, ", Name "));
{
int l = atoi(fmt + 1);
ND_TCHECK2(*buf, l);
{
int l = atoi(fmt + 1);
ND_TCHECK2(*buf, l);
- while (l--)
- ND_PRINT((ndo, "%02x", *buf++));
+ while (l--) {
+ ND_PRINT((ndo, "%02x", EXTRACT_8BITS(buf)));
+ buf++;
+ }
fmt++;
while (isdigit((unsigned char)*fmt))
fmt++;
fmt++;
while (isdigit((unsigned char)*fmt))
fmt++;