for (; noct-- > 0; len--, hdr++) {
elem->asnlen = (elem->asnlen << ASN_SHIFT8) | EXTRACT_U_1(p);
p++;
}
}
if (len < elem->asnlen) {
for (; noct-- > 0; len--, hdr++) {
elem->asnlen = (elem->asnlen << ASN_SHIFT8) | EXTRACT_U_1(p);
p++;
}
}
if (len < elem->asnlen) {
- ND_PRINT((ndo, "[len%d<asnlen%u]", len, elem->asnlen));
+ ND_PRINT("[len%d<asnlen%u]", len, elem->asnlen);
- ND_PRINT((ndo, "[class?%c/%d]", *Form[form], class));
+ ND_PRINT("[class?%c/%d]", *Form[form], class);
- ND_PRINT((ndo, "[id?%c/%s/%d]", *Form[form], Class[class].name, id));
+ ND_PRINT("[id?%c/%s/%d]", *Form[form], Class[class].name, id);
- ND_PRINT((ndo, "[P/%s/%s]", Class[class].name, Class[class].Id[id]));
+ ND_PRINT("[P/%s/%s]", Class[class].name, Class[class].Id[id]);
- ND_PRINT((ndo, "C/%s/%s", Class[class].name, Class[class].Id[id]));
+ ND_PRINT("C/%s/%s", Class[class].name, Class[class].Id[id]);
if (fn_printn(ndo, p, asnlen, ndo->ndo_snapend)) {
if (fn_printn(ndo, p, asnlen, ndo->ndo_snapend)) {
- ND_PRINT((ndo, "%s(%u)", Class[CONTEXT].Id[elem->id], elem->asnlen));
+ ND_PRINT("%s(%u)", Class[CONTEXT].Id[elem->id], elem->asnlen);
while (i >= 0 && length > 0) {
i = asn1_parse(ndo, p, length, &elem);
if (i >= 0) {
while (i >= 0 && length > 0) {
i = asn1_parse(ndo, p, length, &elem);
if (i >= 0) {
if (asn1_print(ndo, &elem) < 0)
return;
if (elem.type == BE_SEQ || elem.type == BE_PDU) {
if (asn1_print(ndo, &elem) < 0)
return;
if (elem.type == BE_SEQ || elem.type == BE_PDU) {
- ND_PRINT((ndo, "%s", nn->name));
- ND_PRINT((ndo, "(%d)", elem->data.integer));
+ ND_PRINT("%s", nn->name);
+ ND_PRINT("(%d)", elem->data.integer);
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_SEQ) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_SEQ) {
/* Sequence */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_SEQ) {
/* Sequence */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_SEQ) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_OID) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_OID) {
/* objVal (ANY) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
/* objVal (ANY) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
if (pduid == GETREQ || pduid == GETNEXTREQ
|| pduid == GETBULKREQ) {
if (elem.type != BE_NULL) {
if (pduid == GETREQ || pduid == GETNEXTREQ
|| pduid == GETBULKREQ) {
if (elem.type != BE_NULL) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
- ND_PRINT((ndo, "[errorStatus(%s)!=0]",
- DECODE_ErrorStatus(elem.data.integer)));
+ ND_PRINT("[errorStatus(%s)!=0]",
+ DECODE_ErrorStatus(elem.data.integer));
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
asn1_print(ndo, &elem);
return;
}
if ((pduid == GETREQ || pduid == GETNEXTREQ || pduid == SETREQ
|| pduid == INFORMREQ || pduid == V2TRAP || pduid == REPORT)
&& elem.data.integer != 0)
asn1_print(ndo, &elem);
return;
}
if ((pduid == GETREQ || pduid == GETNEXTREQ || pduid == SETREQ
|| pduid == INFORMREQ || pduid == V2TRAP || pduid == REPORT)
&& elem.data.integer != 0)
/* enterprise (oid) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_OID) {
/* enterprise (oid) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_OID) {
/* agent-addr (inetaddr) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INETADDR) {
/* agent-addr (inetaddr) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INETADDR) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
/* time-stamp (TimeTicks) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_UNS) { /* XXX */
/* time-stamp (TimeTicks) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_UNS) { /* XXX */
if ((count = asn1_parse(ndo, np, length, &pdu)) < 0)
return;
if (pdu.type != BE_PDU) {
if ((count = asn1_parse(ndo, np, length, &pdu)) < 0)
return;
if (pdu.type != BE_PDU) {
if (version == SNMP_VERSION_1 &&
(pdu.id == GETBULKREQ || pdu.id == INFORMREQ ||
pdu.id == V2TRAP || pdu.id == REPORT)) {
if (version == SNMP_VERSION_1 &&
(pdu.id == GETBULKREQ || pdu.id == INFORMREQ ||
pdu.id == V2TRAP || pdu.id == REPORT)) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_SEQ) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_SEQ) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
/* contextName (OCTET STRING) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
/* contextName (OCTET STRING) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
pdu_print(ndo, np, length, version);
}
pdu_print(ndo, np, length, version);
}
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
strncmp((const char *)elem.data.str, DEF_COMMUNITY,
sizeof(DEF_COMMUNITY) - 1) == 0)) {
/* ! "public" */
strncmp((const char *)elem.data.str, DEF_COMMUNITY,
sizeof(DEF_COMMUNITY) - 1) == 0)) {
/* ! "public" */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_SEQ) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_SEQ) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
/* msgAuthenticationParameters (OCTET STRING) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
/* msgAuthenticationParameters (OCTET STRING) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_SEQ) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_SEQ) {
}
/* msgID (INTEGER) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
}
/* msgID (INTEGER) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
return;
}
flags = EXTRACT_U_1(elem.data.str);
if (flags != 0x00 && flags != 0x01 && flags != 0x03
&& flags != 0x04 && flags != 0x05 && flags != 0x07) {
return;
}
flags = EXTRACT_U_1(elem.data.str);
if (flags != 0x00 && flags != 0x01 && flags != 0x03
&& flags != 0x04 && flags != 0x05 && flags != 0x07) {
/* msgSecurityModel (INTEGER) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
/* msgSecurityModel (INTEGER) */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_STR) {
}
scopedpdu_print(ndo, np, length, 3);
if (ndo->ndo_vflag) {
}
scopedpdu_print(ndo, np, length, 3);
if (ndo->ndo_vflag) {
/* initial Sequence */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_SEQ) {
/* initial Sequence */
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_SEQ) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {
if ((count = asn1_parse(ndo, np, length, &elem)) < 0)
return;
if (elem.type != BE_INT) {