5.11.0.0R3
Software Development Kit
 
Loading...
Searching...
No Matches
Snmp

SNMP Agent MIB registration. More...

Data Structures

struct  MIB
 
struct  MIBTAB
 
struct  MIBVAR
 
struct  OID
 

Variables

int(* MIB::index )(int varix, int tabix)
 
void(* MIB::init )(uint16_t type)
 
uint16_t MIBTAB::ix [MAXKEY]
 
uint16_t MIBTAB::len
 
int16_t MIBVAR::len
 
const MIBTABMIB::mtp
 
const MIBVARMIB::mvp
 
uint8_t OID::name [MAXOID]
 
uint8_t MIBTAB::nix
 
uint8_t OID::nlen
 
int(* MIB::numtabs )(void)
 
int(* MIB::numvars )(void)
 
OID MIBTAB::oid
 
OID MIBVAR::oid
 
uint8_t MIBVAR::opt
 
void * MIBVAR::ptr
 
int(* MIB::set )(int varix, int tabix)
 
uint8_t MIBVAR::type
 

Return Values.

These defines are the return values that can be returned by the various MIB handler callback functions.

enum  SnmpOperationType
 

Maximums

This define specifies the maximum number of keys. For example, the standard MIB-II includes the tcpConnTable which has four values in its INDEX clause. When encoded in the identifier, two of those index values may be 8 bytes each and the other two may be 3 bytes each for a total of 22 bytes. These values cannot be changed by the SDK.

#define MAXOID   32
 

MIB variable characteristics.

These defines are options used to define the charactistics for a MIB variable.

#define MIBOPT_IMMED   0x01
 
#define MIBOPT_IMMED2   0x02
 
#define MIBOPT_BASE1   0x03
 
#define MIBOPT_SCALAR   0x04
 
#define MIBOPT_W   0x08
 
#define MIBOPT_SX   0x10
 
#define MIBOPT_NWORDER   0x20
 
#define MIBOPT_CAR   0x40
 
#define MIBOPT_CAW   0x80
 

MIB variable types.

These defines are the MIB variable types.

#define SNMP_OctetString   0x14
 

Detailed Description

SNMP Agent MIB registration.

This module is used to register MIB handlers for custom MIB implementations.

Macro Definition Documentation

◆ MAXOID

#define MAXOID   32

This define specifies the maximum length of an OID in encoded format. This value cannot be changed by the SDK.

◆ MIBOPT_BASE1

#define MIBOPT_BASE1   0x03

base 0 in data space, base 1 in MIB

◆ MIBOPT_CAR

#define MIBOPT_CAR   0x40

call application cbk for read

◆ MIBOPT_CAW

#define MIBOPT_CAW   0x80

call application cbk for write

◆ MIBOPT_IMMED

#define MIBOPT_IMMED   0x01

immediate value located in (MIBVAR->len)

◆ MIBOPT_IMMED2

#define MIBOPT_IMMED2   0x02

immediate value (MIBVAR->type + MIBVAR->len)

◆ MIBOPT_NWORDER

#define MIBOPT_NWORDER   0x20

network byte ordering for basic type

◆ MIBOPT_SCALAR

#define MIBOPT_SCALAR   0x04

table not indexed directly (no offset)

◆ MIBOPT_SX

#define MIBOPT_SX   0x10

sequential table index inferred

◆ MIBOPT_W

#define MIBOPT_W   0x08

writes are allowed

◆ SNMP_OctetString

#define SNMP_OctetString   0x14

Uses length, not zero termination. Externally seen as 0x04.

Enumeration Type Documentation

◆ SnmpOperationType

This enum defines the SNMP Operation of the request.

Variable Documentation

◆ index

int(* MIB::index) (int varix, int tabix)

index cbk

◆ init

void(* MIB::init) (uint16_t type)

init cbk

◆ ix

uint16_t MIBTAB::ix[MAXKEY]

Index values (offsets)

◆ len [1/2]

uint16_t MIBTAB::len

length of the table where the data lives

◆ len [2/2]

int16_t MIBVAR::len

length/size of the data pointed to by 'ptr'

◆ mtp

const MIBTAB* MIB::mtp

array of MIB tables

◆ mvp

const MIBVAR* MIB::mvp

array of MIB variables

◆ name

uint8_t OID::name[MAXOID]

encoded OID elements

◆ nix

uint8_t MIBTAB::nix

number of indices for the table

◆ nlen

uint8_t OID::nlen

number of elements in the OID

◆ numtabs

int(* MIB::numtabs) (void)

function to return the number of tables

◆ numvars

int(* MIB::numvars) (void)

function to return the number of variables

◆ oid [1/2]

OID MIBTAB::oid

base OID for the table

◆ oid [2/2]

OID MIBVAR::oid

OID for the variable

◆ opt

uint8_t MIBVAR::opt

options (see defines above)

◆ ptr

void* MIBVAR::ptr

pointer to the (possible) variable data

◆ set

int(* MIB::set) (int varix, int tabix)

set cbk

◆ type

uint8_t MIBVAR::type

variable SNMP SMI type (see defines above)