Go to the source code of this file.
Macros | |
#define | MAX_SUBID 0xFFFFFFFF |
#define | MAX_OID_LEN 128 /* max subid's in an oid, per SNMP spec. */ |
#define | ASN_BOOLEAN (0x01) |
#define | ASN_INTEGER (0x02) |
#define | ASN_BIT_STR (0x03) |
#define | ASN_OCTET_STR (0x04) |
#define | ASN_NULL (0x05) |
#define | ASN_OBJECT_ID (0x06) |
#define | ASN_SEQUENCE (0x10) |
#define | ASN_SET (0x11) |
#define | ASN_UNIVERSAL (0x00) |
#define | ASN_APPLICATION (0x40) |
#define | ASN_CONTEXT (0x80) |
#define | ASN_PRIVATE (0xC0) |
#define | ASN_PRIMITIVE (0x00) |
#define | ASN_CONSTRUCTOR (0x20) |
#define | ASN_LONG_LEN (0x80) |
#define | ASN_EXTENSION_ID (0x1F) |
#define | ASN_BIT8 (0x80) |
#define | IS_CONSTRUCTOR(byte) ((byte) & ASN_CONSTRUCTOR) |
#define | IS_EXTENSION_ID(byte) (((byte) & ASN_EXTENSION_ID) == ASN_EXTENSION_ID) |
Typedefs | |
typedef u_int | oid |
Functions | |
u_char * | asn_build_header (u_char *, int *, u_char, int) |
u_char * | asn_parse_int (u_char *, int *, u_char *, int *, int) |
u_char * | asn_parse_unsigned_int (u_char *, int *, u_char *, u_int *, int) |
u_char * | asn_build_int (u_char *, int *, u_char, int *, int) |
u_char * | asn_build_unsigned_int (u_char *, int *, u_char, u_int *, int) |
u_char * | asn_parse_string (u_char *, int *, u_char *, u_char *, int *) |
u_char * | asn_build_string (u_char *, int *, u_char, u_char *, int) |
u_char * | asn_parse_header (u_char *, int *, u_char *) |
u_char * | asn_build_header_with_truth (u_char *, int *, u_char, int, int) |
u_char * | asn_parse_length (u_char *, u_int *) |
u_char * | asn_build_length (u_char *, int *, int, int) |
u_char * | asn_parse_objid (u_char *, int *, u_char *, oid *, int *) |
u_char * | asn_build_objid (u_char *, int *, u_char, oid *, int) |
u_char * | asn_parse_null (u_char *, int *, u_char *) |
u_char * | asn_build_null (u_char *, int *, u_char) |
u_char * | asn_build_exception (u_char *, int *, u_char) |
Macro Definition Documentation
◆ ASN_APPLICATION
◆ ASN_BIT8
◆ ASN_BIT_STR
◆ ASN_BOOLEAN
◆ ASN_CONSTRUCTOR
◆ ASN_CONTEXT
◆ ASN_EXTENSION_ID
◆ ASN_INTEGER
◆ ASN_LONG_LEN
◆ ASN_NULL
◆ ASN_OBJECT_ID
◆ ASN_OCTET_STR
◆ ASN_PRIMITIVE
◆ ASN_PRIVATE
◆ ASN_SEQUENCE
◆ ASN_SET
◆ ASN_UNIVERSAL
◆ IS_CONSTRUCTOR
#define IS_CONSTRUCTOR | ( | byte | ) | ((byte) & ASN_CONSTRUCTOR) |
◆ IS_EXTENSION_ID
#define IS_EXTENSION_ID | ( | byte | ) | (((byte) & ASN_EXTENSION_ID) == ASN_EXTENSION_ID) |
◆ MAX_OID_LEN
◆ MAX_SUBID
Typedef Documentation
◆ oid
Function Documentation
◆ asn_build_exception()
u_char * asn_build_exception | ( | u_char * | data, |
int * | datalength, | ||
u_char | type | ||
) |
Definition at line 837 of file asn1.c.
References asn_build_header_with_truth().
Referenced by snmp_var_EncodeVarBind().
◆ asn_build_header()
Definition at line 93 of file asn1.c.
References asn_build_header_with_truth().
Referenced by snmp_msg_Encode(), and snmp_var_EncodeVarBind().
◆ asn_build_header_with_truth()
u_char * asn_build_header_with_truth | ( | u_char * | data, |
int * | datalength, | ||
u_char | type, | ||
int | length, | ||
int | truth | ||
) |
Definition at line 513 of file asn1.c.
References asn_build_length(), NULL, snmp_set_api_error(), and SNMPERR_ASN_ENCODE.
Referenced by asn_build_exception(), asn_build_header(), asn_build_int(), asn_build_null(), asn_build_objid(), asn_build_string(), and asn_build_unsigned_int().
◆ asn_build_int()
Definition at line 245 of file asn1.c.
References asn_build_header_with_truth(), int, NULL, snmp_set_api_error(), and SNMPERR_ASN_ENCODE.
Referenced by snmp_msg_Encode(), snmp_pdu_encode(), and snmp_var_EncodeVarBind().
◆ asn_build_length()
Definition at line 570 of file asn1.c.
References ASN_LONG_LEN, NULL, snmp_set_api_error(), and SNMPERR_ASN_ENCODE.
Referenced by asn_build_header_with_truth().
◆ asn_build_null()
u_char * asn_build_null | ( | u_char * | data, |
int * | datalength, | ||
u_char | type | ||
) |
Definition at line 803 of file asn1.c.
References asn_build_header_with_truth().
Referenced by snmp_var_EncodeVarBind().
◆ asn_build_objid()
u_char * asn_build_objid | ( | u_char * | data, |
int * | datalength, | ||
u_char | type, | ||
oid * | objid, | ||
int | objidlength | ||
) |
Definition at line 723 of file asn1.c.
References ASN_BIT8, asn_build_header_with_truth(), MAX_OID_LEN, NULL, snmp_set_api_error(), and SNMPERR_ASN_DECODE.
Referenced by snmp_pdu_encode(), and snmp_var_EncodeVarBind().
◆ asn_build_string()
u_char * asn_build_string | ( | u_char * | data, |
int * | datalength, | ||
u_char | type, | ||
u_char * | string, | ||
int | strlength | ||
) |
Definition at line 433 of file asn1.c.
References asn_build_header_with_truth(), NULL, snmp_set_api_error(), and SNMPERR_ASN_DECODE.
Referenced by snmp_msg_Encode(), snmp_pdu_encode(), and snmp_var_EncodeVarBind().
◆ asn_build_unsigned_int()
u_char * asn_build_unsigned_int | ( | u_char * | data, |
int * | datalength, | ||
u_char | type, | ||
u_int * | intp, | ||
int | intsize | ||
) |
Definition at line 311 of file asn1.c.
References asn_build_header_with_truth(), int, NULL, snmp_set_api_error(), and SNMPERR_ASN_ENCODE.
Referenced by snmp_pdu_encode(), and snmp_var_EncodeVarBind().
◆ asn_parse_header()
u_char * asn_parse_header | ( | u_char * | data, |
int * | datalength, | ||
u_char * | type | ||
) |
Definition at line 470 of file asn1.c.
References asn_parse_length(), int, IS_EXTENSION_ID, NULL, snmp_set_api_error(), and SNMPERR_ASN_DECODE.
Referenced by snmp_msg_Decode(), snmp_pdu_decode(), and snmp_var_DecodeVarBind().
◆ asn_parse_int()
Definition at line 114 of file asn1.c.
References asn_parse_length(), int, NULL, snmp_set_api_error(), and SNMPERR_ASN_DECODE.
Referenced by snmp_msg_Decode(), snmp_pdu_decode(), and snmp_var_DecodeVarBind().
◆ asn_parse_length()
u_char * asn_parse_length | ( | u_char * | data, |
u_int * | length | ||
) |
Definition at line 539 of file asn1.c.
References ASN_LONG_LEN, int, NULL, snmp_set_api_error(), and SNMPERR_ASN_DECODE.
Referenced by asn_parse_header(), asn_parse_int(), asn_parse_objid(), asn_parse_string(), and asn_parse_unsigned_int().
◆ asn_parse_null()
u_char * asn_parse_null | ( | u_char * | , |
int * | , | ||
u_char * | |||
) |
◆ asn_parse_objid()
u_char * asn_parse_objid | ( | u_char * | data, |
int * | datalength, | ||
u_char * | type, | ||
oid * | objid, | ||
int * | objidlength | ||
) |
Definition at line 638 of file asn1.c.
References ASN_BIT8, asn_parse_length(), int, MAX_SUBID, NULL, snmp_set_api_error(), and SNMPERR_ASN_DECODE.
Referenced by snmp_pdu_decode(), and snmp_var_DecodeVarBind().
◆ asn_parse_string()
u_char * asn_parse_string | ( | u_char * | data, |
int * | datalength, | ||
u_char * | type, | ||
u_char * | string, | ||
int * | strlength | ||
) |
Definition at line 387 of file asn1.c.
References asn_parse_length(), int, NULL, snmp_set_api_error(), and SNMPERR_ASN_DECODE.
Referenced by snmp_msg_Decode(), snmp_pdu_decode(), and snmp_var_DecodeVarBind().
◆ asn_parse_unsigned_int()
u_char * asn_parse_unsigned_int | ( | u_char * | data, |
int * | datalength, | ||
u_char * | type, | ||
u_int * | intp, | ||
int | intsize | ||
) |
Definition at line 179 of file asn1.c.
References asn_parse_length(), int, NULL, snmp_set_api_error(), and SNMPERR_ASN_DECODE.
Referenced by snmp_pdu_decode(), and snmp_var_DecodeVarBind().