SNMP++  3.3.4
smi.h File Reference

Go to the source code of this file.

Classes

struct  SmiOCTETS
 
struct  SmiOID
 
struct  SmiCNTR64
 

Macros

#define WINFAR
 
#define STRCAT   strcat
 
#define STRLEN   strlen
 
#define MEMCPY   memcpy
 
#define STRCPY   strcpy
 
#define MEMCMP   memcmp
 
#define XPORT
 
#define sNMP_SYNTAX_SEQUENCE   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x10)
 
ASN/BER Base Types

Basic Encoding Rules (BER) (used in forming SYNTAXes and certain SNMP types/values).

#define aSN_UNIVERSAL   (0x00)
 
#define aSN_APPLICATION   (0x40)
 
#define aSN_CONTEXT   (0x80)
 
#define aSN_PRIVATE   (0xC0)
 
#define aSN_PRIMITIVE   (0x00)
 
#define aSN_CONSTRUCTOR   (0x20)
 
Syntax Types

These values are used in the "syntax" member of the smiVALUE structure which follows.

The get_syntax() method of any class derived from SnmpSyntax returns one of these values.

Note
UInt32 is indistinguishable from Gauge32 per SNMPv2 Draft Standard
NsapAddr is obsoleted as unique SMI type per SNMPv2 Draft Standard
#define sNMP_SYNTAX_INT   (aSN_UNIVERSAL | aSN_PRIMITIVE | 0x02)
 
#define sNMP_SYNTAX_BITS   (aSN_UNIVERSAL | aSN_PRIMITIVE | 0x03)
 
#define sNMP_SYNTAX_OCTETS   (aSN_UNIVERSAL | aSN_PRIMITIVE | 0x04)
 
#define sNMP_SYNTAX_NULL   (aSN_UNIVERSAL | aSN_PRIMITIVE | 0x05)
 
#define sNMP_SYNTAX_OID   (aSN_UNIVERSAL | aSN_PRIMITIVE | 0x06)
 
#define sNMP_SYNTAX_INT32   sNMP_SYNTAX_INT
 
#define sNMP_SYNTAX_IPADDR   (aSN_APPLICATION | aSN_PRIMITIVE | 0x00)
 
#define sNMP_SYNTAX_CNTR32   (aSN_APPLICATION | aSN_PRIMITIVE | 0x01)
 
#define sNMP_SYNTAX_GAUGE32   (aSN_APPLICATION | aSN_PRIMITIVE | 0x02)
 
#define sNMP_SYNTAX_TIMETICKS   (aSN_APPLICATION | aSN_PRIMITIVE | 0x03)
 
#define sNMP_SYNTAX_OPAQUE   (aSN_APPLICATION | aSN_PRIMITIVE | 0x04)
 
#define sNMP_SYNTAX_CNTR64   (aSN_APPLICATION | aSN_PRIMITIVE | 0x06)
 
#define sNMP_SYNTAX_UINT32   sNMP_SYNTAX_GAUGE32
 
Exception conditions for SNMPv2
#define sNMP_SYNTAX_NOSUCHOBJECT   (aSN_CONTEXT | aSN_PRIMITIVE | 0x00)
 
#define sNMP_SYNTAX_NOSUCHINSTANCE   (aSN_CONTEXT | aSN_PRIMITIVE | 0x01)
 
#define sNMP_SYNTAX_ENDOFMIBVIEW   (aSN_CONTEXT | aSN_PRIMITIVE | 0x02)
 
Pdu types
#define sNMP_PDU_GET   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x0)
 
#define sNMP_PDU_GETNEXT   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x1)
 
#define sNMP_PDU_RESPONSE   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x2)
 
#define sNMP_PDU_SET   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x3)
 
#define sNMP_PDU_V1TRAP   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x4)
 
#define sNMP_PDU_GETBULK   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x5)
 
#define sNMP_PDU_INFORM   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x6)
 
#define sNMP_PDU_TRAP   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x7)
 
#define sNMP_PDU_REPORT   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x8)
 

Typedefs

SMI typedefs

SNMP-related types from RFC1442 (SMI).

typedef unsigned char SmiBYTE
 
typedef unsigned char WINFARSmiLPBYTE
 
typedef long SmiINT
 
typedef long WINFARSmiLPINT
 
typedef SmiINT SmiINT32
 
typedef SmiINT WINFARSmiLPINT32
 
typedef unsigned long SmiUINT32
 
typedef unsigned long WINFARSmiLPUINT32
 
typedef struct SmiOCTETSSmiLPOCTETS
 
typedef SmiOCTETS SmiBITS
 
typedef SmiOCTETS WINFARSmiLPBITS
 
typedef struct SmiOIDSmiLPOID
 
typedef SmiOCTETS SmiIPADDR
 
typedef SmiOCTETS WINFARSmiLPIPADDR
 
typedef SmiUINT32 SmiCNTR32
 
typedef SmiUINT32 WINFARSmiLPCNTR32
 
typedef SmiUINT32 SmiGAUGE32
 
typedef SmiUINT32 WINFARSmiLPGAUGE32
 
typedef SmiUINT32 SmiTIMETICKS
 
typedef SmiUINT32 WINFARSmiLPTIMETICKS
 
typedef SmiOCTETS SmiOPAQUE
 
typedef SmiOCTETS WINFARSmiLPOPAQUE
 
typedef SmiOCTETS SmiNSAPADDR
 
typedef SmiOCTETS WINFARSmiLPNSAPADDR
 
typedef struct SmiCNTR64SmiLPCNTR64
 

Macro Definition Documentation

#define aSN_APPLICATION   (0x40)

Definition at line 78 of file smi.h.

#define aSN_CONSTRUCTOR   (0x20)

Definition at line 82 of file smi.h.

#define aSN_CONTEXT   (0x80)

Definition at line 79 of file smi.h.

#define aSN_PRIMITIVE   (0x00)

Definition at line 81 of file smi.h.

#define aSN_PRIVATE   (0xC0)

Definition at line 80 of file smi.h.

#define aSN_UNIVERSAL   (0x00)

Definition at line 77 of file smi.h.

#define MEMCMP   memcmp

Definition at line 67 of file smi.h.

#define MEMCPY   memcpy

Definition at line 65 of file smi.h.

Referenced by Oid::OidCopy(), and Oid::operator+=().

#define sNMP_PDU_GET   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x0)

Definition at line 128 of file smi.h.

#define sNMP_PDU_GETBULK   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x5)

Definition at line 133 of file smi.h.

#define sNMP_PDU_GETNEXT   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x1)

Definition at line 129 of file smi.h.

#define sNMP_PDU_INFORM   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x6)

Definition at line 134 of file smi.h.

#define sNMP_PDU_REPORT   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x8)

Definition at line 136 of file smi.h.

#define sNMP_PDU_RESPONSE   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x2)

Definition at line 130 of file smi.h.

#define sNMP_PDU_SET   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x3)

Definition at line 131 of file smi.h.

#define sNMP_PDU_TRAP   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x7)

Definition at line 135 of file smi.h.

#define sNMP_PDU_V1TRAP   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x4)

Definition at line 132 of file smi.h.

#define sNMP_SYNTAX_BITS   (aSN_UNIVERSAL | aSN_PRIMITIVE | 0x03)

Definition at line 101 of file smi.h.

#define sNMP_SYNTAX_CNTR32   (aSN_APPLICATION | aSN_PRIMITIVE | 0x01)

Definition at line 107 of file smi.h.

Referenced by Counter32::Counter32(), and Counter32::get_syntax().

#define sNMP_SYNTAX_CNTR64   (aSN_APPLICATION | aSN_PRIMITIVE | 0x06)

Definition at line 111 of file smi.h.

Referenced by Counter64::Counter64(), and Counter64::get_syntax().

#define sNMP_SYNTAX_ENDOFMIBVIEW   (aSN_CONTEXT | aSN_PRIMITIVE | 0x02)

Definition at line 122 of file smi.h.

#define sNMP_SYNTAX_GAUGE32   (aSN_APPLICATION | aSN_PRIMITIVE | 0x02)

Definition at line 108 of file smi.h.

Referenced by Gauge32::Gauge32(), and Gauge32::get_syntax().

#define sNMP_SYNTAX_INT   (aSN_UNIVERSAL | aSN_PRIMITIVE | 0x02)

Definition at line 100 of file smi.h.

#define sNMP_SYNTAX_INT32   sNMP_SYNTAX_INT

Definition at line 105 of file smi.h.

Referenced by SnmpInt32::get_syntax(), and SnmpInt32::SnmpInt32().

#define sNMP_SYNTAX_IPADDR   (aSN_APPLICATION | aSN_PRIMITIVE | 0x00)

Definition at line 106 of file smi.h.

Referenced by IpAddress::get_syntax().

#define sNMP_SYNTAX_NOSUCHINSTANCE   (aSN_CONTEXT | aSN_PRIMITIVE | 0x01)

Definition at line 121 of file smi.h.

#define sNMP_SYNTAX_NOSUCHOBJECT   (aSN_CONTEXT | aSN_PRIMITIVE | 0x00)

Definition at line 120 of file smi.h.

#define sNMP_SYNTAX_NULL   (aSN_UNIVERSAL | aSN_PRIMITIVE | 0x05)

Definition at line 103 of file smi.h.

Referenced by GenAddress::get_syntax().

#define sNMP_SYNTAX_OCTETS   (aSN_UNIVERSAL | aSN_PRIMITIVE | 0x04)

Definition at line 102 of file smi.h.

Referenced by OctetStr::get_syntax(), and UdpAddress::get_syntax().

#define sNMP_SYNTAX_OID   (aSN_UNIVERSAL | aSN_PRIMITIVE | 0x06)

Definition at line 104 of file smi.h.

Referenced by Oid::get_syntax(), and Oid::Oid().

#define sNMP_SYNTAX_OPAQUE   (aSN_APPLICATION | aSN_PRIMITIVE | 0x04)

Definition at line 110 of file smi.h.

Referenced by OpaqueStr::get_syntax(), and OpaqueStr::OpaqueStr().

#define sNMP_SYNTAX_SEQUENCE   (aSN_CONTEXT | aSN_CONSTRUCTOR | 0x10)

Definition at line 86 of file smi.h.

#define sNMP_SYNTAX_TIMETICKS   (aSN_APPLICATION | aSN_PRIMITIVE | 0x03)

Definition at line 109 of file smi.h.

Referenced by TimeTicks::get_syntax(), and TimeTicks::TimeTicks().

#define sNMP_SYNTAX_UINT32   sNMP_SYNTAX_GAUGE32

Definition at line 112 of file smi.h.

Referenced by SnmpUInt32::get_syntax(), and SnmpUInt32::SnmpUInt32().

#define STRCAT   strcat

Definition at line 63 of file smi.h.

#define STRCPY   strcpy

Definition at line 66 of file smi.h.

#define STRLEN   strlen

Definition at line 64 of file smi.h.

#define WINFAR

Definition at line 62 of file smi.h.

#define XPORT

Definition at line 68 of file smi.h.

Typedef Documentation

typedef SmiOCTETS SmiBITS

Definition at line 165 of file smi.h.

typedef unsigned char SmiBYTE

Definition at line 148 of file smi.h.

Definition at line 176 of file smi.h.

Definition at line 179 of file smi.h.

typedef long SmiINT

Definition at line 151 of file smi.h.

typedef SmiINT SmiINT32

Definition at line 154 of file smi.h.

Definition at line 173 of file smi.h.

Definition at line 165 of file smi.h.

typedef unsigned char WINFAR* SmiLPBYTE

Definition at line 148 of file smi.h.

Definition at line 176 of file smi.h.

typedef struct SmiCNTR64* SmiLPCNTR64

Definition at line 179 of file smi.h.

typedef long WINFAR* SmiLPINT

Definition at line 151 of file smi.h.

Definition at line 154 of file smi.h.

Definition at line 173 of file smi.h.

Definition at line 188 of file smi.h.

typedef struct SmiOCTETS* SmiLPOCTETS
typedef struct SmiOID* SmiLPOID

Definition at line 185 of file smi.h.

Definition at line 182 of file smi.h.

typedef unsigned long WINFAR* SmiLPUINT32

Definition at line 157 of file smi.h.

Definition at line 188 of file smi.h.

Definition at line 185 of file smi.h.

Definition at line 182 of file smi.h.

typedef unsigned long SmiUINT32

Definition at line 157 of file smi.h.