54 while(oid[i] != ((uint32_t)-1)) {
55 varbind->
oid[i] = oid[i];
58 varbind->
oid[i] = ((uint32_t)-1);
65 snmp_api_replace_oid(varbind, oid);
66 varbind->
value_type = BER_DATA_TYPE_OCTET_STRING;
67 varbind->value.string.
string = string;
68 varbind->value.string.
length = strlen(
string);
75 snmp_api_replace_oid(varbind, oid);
76 varbind->
value_type = SNMP_DATA_TYPE_TIME_TICKS;
77 varbind->value.
integer = integer;
84 snmp_api_replace_oid(varbind, oid);
86 varbind->value.
oid = ret_oid;
An implementation of the Simple Network Management Protocol (RFC 3411-3418)
uint32_t length
The string length.
An implementation of the Simple Network Management Protocol (RFC 3411-3418)
uint32_t oid[SNMP_MSG_OID_MAX_LEN]
The OID.
An implementation of the Simple Network Management Protocol (RFC 3411-3418)
const char * string
A pointer to the string value from this varbind.
uint8_t value_type
The type in this varbind.
uint32_t * oid
A pointer to the beggining of a oid array.
void snmp_api_set_string(snmp_varbind_t *varbind, uint32_t *oid, char *string)
Function to set a varbind with a string.
void snmp_api_add_resource(snmp_mib_resource_t *new_resource)
Function to add a new resource.
void snmp_api_set_time_ticks(snmp_varbind_t *varbind, uint32_t *oid, uint32_t integer)
Function to set a varbind with a time tick.
The public API for the Contiki-NG SNMP implementation
uint32_t integer
The integer value.
void snmp_api_set_oid(snmp_varbind_t *varbind, uint32_t *oid, uint32_t *ret_oid)
Function to set a varbind with a oid.
void snmp_mib_add(snmp_mib_resource_t *new_resource)
Adds a resource into the linked list.