snmp.h File Reference


Detailed Description

Definitions for Simple Network Management Protocol.

 * $Id: snmp.h,v 1.1 2008/01/31 09:31:29 haraldkipp Exp $
 * 

Definition in file snmp.h.

Go to the source code of this file.

Defines

#define SNMP_PORT   161
 Standard UDP port for SNMP agents to receive requests messages.
#define SNMP_TRAP_PORT   162
 Standard UDP port for SNMP managers to receive notificaion messages.
#define SNMP_MAX_LEN   500
 Default maximum message size.
#define SNMP_VERSION_1   0
 SNMPv1.
#define SNMP_VERSION_2C   1
 SNMPv2c.
#define SNMP_VERSION_3   3
 SNMPv3.
#define SNMP_MSG_GET   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x0)
#define SNMP_MSG_GETNEXT   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x1)
#define SNMP_MSG_RESPONSE   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x2)
#define SNMP_MSG_SET   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x3)
#define SNMP_MSG_TRAP   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x4)
#define SNMP_MSG_GETBULK   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x5)
#define SNMP_MSG_INFORM   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x6)
#define SNMP_MSG_TRAP2   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x7)
#define SNMP_MSG_REPORT   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x8)
#define SNMP_NOSUCHOBJECT   (ASN_CONTEXT | ASN_PRIMITIVE | 0x0)
#define SNMP_NOSUCHINSTANCE   (ASN_CONTEXT | ASN_PRIMITIVE | 0x1)
#define SNMP_ENDOFMIBVIEW   (ASN_CONTEXT | ASN_PRIMITIVE | 0x2)
#define SNMP_ERR_NOERROR   0
#define SNMP_ERR_TOOBIG   1
#define SNMP_ERR_NOSUCHNAME   2
#define SNMP_ERR_BADVALUE   3
#define SNMP_ERR_READONLY   4
#define SNMP_ERR_GENERR   5
#define SNMP_ERR_NOACCESS   6
#define SNMP_ERR_WRONGTYPE   7
#define SNMP_ERR_WRONGLENGTH   8
#define SNMP_ERR_WRONGENCODING   9
#define SNMP_ERR_WRONGVALUE   10
#define SNMP_ERR_NOCREATION   11
#define SNMP_ERR_INCONSISTENTVALUE   12
#define SNMP_ERR_RESOURCEUNAVAILABLE   13
#define SNMP_ERR_COMMITFAILED   14
#define SNMP_ERR_UNDOFAILED   15
#define SNMP_ERR_AUTHORIZATIONERROR   16
#define SNMP_ERR_NOTWRITABLE   17
#define SNMP_ERR_INCONSISTENTNAME   18
#define SNMP_TRAP_COLDSTART   0
#define SNMP_TRAP_WARMSTART   1
#define SNMP_TRAP_LINKDOWN   2
#define SNMP_TRAP_LINKUP   3
#define SNMP_TRAP_AUTHFAIL   4
#define SNMP_TRAP_EGPNEIGHBORLOSS   5
#define SNMP_TRAP_ENTERPRISESPECIFIC   6
#define SNMP_OID_INTERNET   1, 3, 6, 1
#define SNMP_OID_ENTERPRISES   SNMP_OID_INTERNET, 4, 1
#define SNMP_OID_MIB2   SNMP_OID_INTERNET, 2, 1
#define SNMP_OID_SNMPV2   SNMP_OID_INTERNET, 6
#define SNMP_OID_SNMPMODULES   SNMP_OID_SNMPV2, 3
#define SNMP_PARSE_ERROR   -1
#define SNMP_BUILD_ERROR   -2
#define MAX_SID_LEN   32
 Maximum length of a community name.
#define MAX_NAME_LEN   128
 Maximum number of sub IDs in an OID.
#define SNMP_ACT_RESERVE1   0
#define SNMP_ACT_RESERVE2   1
#define SNMP_ACT_COMMIT   2
#define SNMP_ACT_ACTION   3
#define SNMP_ACT_FREE   4

Functions

CONST u_charSnmpVarParse (CONST u_char *, size_t *, OID *, size_t *, u_char *, u_char **, size_t *)
u_charSnmpVarBuild (u_char *, size_t *, CONST OID *, size_t, u_char, CONST u_char *, size_t)


Define Documentation

#define SNMP_PORT   161

Standard UDP port for SNMP agents to receive requests messages.

Definition at line 51 of file snmp.h.

#define SNMP_TRAP_PORT   162

Standard UDP port for SNMP managers to receive notificaion messages.

Definition at line 57 of file snmp.h.

#define SNMP_MAX_LEN   500

Default maximum message size.

Definition at line 63 of file snmp.h.

#define SNMP_VERSION_1   0

SNMPv1.

The original version, defined by RFC 1157.

Definition at line 70 of file snmp.h.

#define SNMP_VERSION_2C   1

SNMPv2c.

Community string-based SNMPv2, which was an attempt to combine the protocol operations of SNMPv2 with the security of SNMPv1, defined by RFCs 1901, 1905, and 1906.

Partly supplied by this code, work is in progress.

Definition at line 80 of file snmp.h.

#define SNMP_VERSION_3   3

SNMPv3.

An attempt by the IETF working group to merge the SNMPv2u and SNMPv2* proposals into a more widely accepted SNMPv3. The original version, defined by RFC 1157.

Not yet supported by this code.

Definition at line 90 of file snmp.h.

#define SNMP_MSG_GET   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x0)

Definition at line 95 of file snmp.h.

#define SNMP_MSG_GETNEXT   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x1)

Definition at line 96 of file snmp.h.

#define SNMP_MSG_RESPONSE   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x2)

Definition at line 97 of file snmp.h.

#define SNMP_MSG_SET   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x3)

Definition at line 98 of file snmp.h.

#define SNMP_MSG_TRAP   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x4)

Definition at line 103 of file snmp.h.

#define SNMP_MSG_GETBULK   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x5)

Definition at line 108 of file snmp.h.

#define SNMP_MSG_INFORM   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x6)

Definition at line 109 of file snmp.h.

#define SNMP_MSG_TRAP2   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x7)

Definition at line 110 of file snmp.h.

#define SNMP_MSG_REPORT   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x8)

Definition at line 115 of file snmp.h.

#define SNMP_NOSUCHOBJECT   (ASN_CONTEXT | ASN_PRIMITIVE | 0x0)

Definition at line 120 of file snmp.h.

#define SNMP_NOSUCHINSTANCE   (ASN_CONTEXT | ASN_PRIMITIVE | 0x1)

Definition at line 121 of file snmp.h.

#define SNMP_ENDOFMIBVIEW   (ASN_CONTEXT | ASN_PRIMITIVE | 0x2)

Definition at line 122 of file snmp.h.

#define SNMP_ERR_NOERROR   0

Definition at line 127 of file snmp.h.

#define SNMP_ERR_TOOBIG   1

Definition at line 128 of file snmp.h.

#define SNMP_ERR_NOSUCHNAME   2

Definition at line 129 of file snmp.h.

#define SNMP_ERR_BADVALUE   3

Definition at line 130 of file snmp.h.

#define SNMP_ERR_READONLY   4

Definition at line 131 of file snmp.h.

#define SNMP_ERR_GENERR   5

Definition at line 132 of file snmp.h.

#define SNMP_ERR_NOACCESS   6

Definition at line 137 of file snmp.h.

#define SNMP_ERR_WRONGTYPE   7

Definition at line 138 of file snmp.h.

#define SNMP_ERR_WRONGLENGTH   8

Definition at line 139 of file snmp.h.

#define SNMP_ERR_WRONGENCODING   9

Definition at line 140 of file snmp.h.

#define SNMP_ERR_WRONGVALUE   10

Definition at line 141 of file snmp.h.

#define SNMP_ERR_NOCREATION   11

Definition at line 142 of file snmp.h.

#define SNMP_ERR_INCONSISTENTVALUE   12

Definition at line 143 of file snmp.h.

#define SNMP_ERR_RESOURCEUNAVAILABLE   13

Definition at line 144 of file snmp.h.

#define SNMP_ERR_COMMITFAILED   14

Definition at line 145 of file snmp.h.

#define SNMP_ERR_UNDOFAILED   15

Definition at line 146 of file snmp.h.

#define SNMP_ERR_AUTHORIZATIONERROR   16

Definition at line 147 of file snmp.h.

#define SNMP_ERR_NOTWRITABLE   17

Definition at line 148 of file snmp.h.

#define SNMP_ERR_INCONSISTENTNAME   18

Definition at line 149 of file snmp.h.

#define SNMP_TRAP_COLDSTART   0

Definition at line 154 of file snmp.h.

#define SNMP_TRAP_WARMSTART   1

Definition at line 155 of file snmp.h.

#define SNMP_TRAP_LINKDOWN   2

Definition at line 156 of file snmp.h.

#define SNMP_TRAP_LINKUP   3

Definition at line 157 of file snmp.h.

#define SNMP_TRAP_AUTHFAIL   4

Definition at line 158 of file snmp.h.

#define SNMP_TRAP_EGPNEIGHBORLOSS   5

Definition at line 159 of file snmp.h.

#define SNMP_TRAP_ENTERPRISESPECIFIC   6

Definition at line 160 of file snmp.h.

#define SNMP_OID_INTERNET   1, 3, 6, 1

Definition at line 165 of file snmp.h.

#define SNMP_OID_ENTERPRISES   SNMP_OID_INTERNET, 4, 1

Definition at line 166 of file snmp.h.

#define SNMP_OID_MIB2   SNMP_OID_INTERNET, 2, 1

Definition at line 167 of file snmp.h.

#define SNMP_OID_SNMPV2   SNMP_OID_INTERNET, 6

Definition at line 168 of file snmp.h.

#define SNMP_OID_SNMPMODULES   SNMP_OID_SNMPV2, 3

Definition at line 169 of file snmp.h.

#define SNMP_PARSE_ERROR   -1

Definition at line 173 of file snmp.h.

#define SNMP_BUILD_ERROR   -2

Definition at line 174 of file snmp.h.

#define MAX_SID_LEN   32

Maximum length of a community name.

Definition at line 177 of file snmp.h.

#define MAX_NAME_LEN   128

Maximum number of sub IDs in an OID.

Definition at line 179 of file snmp.h.

#define SNMP_ACT_RESERVE1   0

Definition at line 181 of file snmp.h.

#define SNMP_ACT_RESERVE2   1

Definition at line 182 of file snmp.h.

#define SNMP_ACT_COMMIT   2

Definition at line 183 of file snmp.h.

#define SNMP_ACT_ACTION   3

Definition at line 184 of file snmp.h.

#define SNMP_ACT_FREE   4

Definition at line 185 of file snmp.h.


Function Documentation

CONST u_char* SnmpVarParse ( CONST u_char ,
size_t *  ,
OID ,
size_t *  ,
u_char ,
u_char **  ,
size_t *   
)

u_char* SnmpVarBuild ( u_char ,
size_t *  ,
CONST OID ,
size_t  ,
u_char  ,
CONST u_char ,
size_t   
)


© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/