/* \summary: Simple Network Management Protocol (SNMP) printer */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include "netdissect-stdinc.h"
#include <stdio.h>
#include <string.h>
+#include <limits.h>
#ifdef USE_LIBSMI
#include <smi.h>
break;
case INTEGER: {
- int32_t data;
+ uint32_t data;
elem->type = BE_INT;
data = 0;
return -1;
}
if (GET_U_1(p) & ASN_BIT8) /* negative */
- data = -1;
+ data = UINT_MAX;
for (i = elem->asnlen; i != 0; p++, i--)
data = (data << ASN_SHIFT8) | GET_U_1(p);
elem->data.integer = data;
break;
case BE_OID: {
- int o = 0, first = -1;
+ int first = -1;
+ uint32_t o = 0;
p = (const u_char *)elem->data.raw;
i = asnlen;
}
if (NOTIFY_CLASS(pduid) && smiNode->access < SMI_ACCESS_NOTIFY) {
- ND_PRINT("[notNotifyable]");
+ ND_PRINT("[notNotifiable]");
}
if (READ_CLASS(pduid) && smiNode->access < SMI_ACCESS_READ_ONLY) {