Contiki-NG
Data Fields

The varbind struct. More...

#include <os/net/app-layer/snmp/snmp.h>

Data Fields

snmp_oid_t oid
 The OID. More...
 
uint8_t value_type
 The type in this varbind.
 
union {
   uint32_t   integer
 The integer value.
 
   struct {
      const char *   string
 A pointer to the string value from this varbind. More...
 
      uint32_t   length
 The string length. More...
 
   }   string
 A struct that contains the string.
 
   snmp_oid_t   oid
 The OID value.
 
value
 A union to represent the value in this varbind. More...
 

Detailed Description

The varbind struct.

Definition at line 159 of file snmp.h.

Field Documentation

◆ length

uint32_t snmp_varbind_s::length

The string length.

Remarks
Do not use strlen on the string since it might not be null terminated

Definition at line 193 of file snmp.h.

◆ oid

snmp_oid_t snmp_varbind_s::oid

The OID.

The OID value.

Definition at line 163 of file snmp.h.

Referenced by snmp_api_set_oid(), snmp_api_set_string(), and snmp_api_set_time_ticks().

◆ string

const char* snmp_varbind_s::string

A pointer to the string value from this varbind.

Remarks
This pointer points to a string that cannot be changed

Definition at line 187 of file snmp.h.

Referenced by snmp_api_set_string().

◆ value

union { ... } snmp_varbind_s::value

A union to represent the value in this varbind.

Remarks
A union is used since the varbind can only have one value of one type

Referenced by snmp_api_set_oid(), snmp_api_set_string(), and snmp_api_set_time_ticks().