#define GETREQ 0
#define GETNEXTREQ 1
#define GETRESP 2
#define SETREQ 3
#define TRAP 4
#define GT_ENTERPRISE 6
char *DECODE_ErrorStatus();
char *DECODE_GenericTrap();
/*
* This is the definition for the Any-Data-Type storage used purely for
* temporary internal representation while decoding an ASN.1 data stream.
*/
struct be {
unsigned long asnlen;
union {
caddr_t raw;
long integer;
unsigned long uns;
unsigned char *str;
} data;
unsigned char form, class, id; /* tag info */
u_char type;
#define BE_ANY 255
#define BE_NONE 0
#define BE_NULL 1
#define BE_OCTET 2
#define BE_OID 3
#define BE_INT 4
#define BE_UNS 5
#define BE_STR 6
#define BE_SEQ 7
#define BE_INETADDR 8
#define BE_PDU 9
};
/*
* Defaults for SNMP PDU components
*/
#define DEF_COMMUNITY "public"
#define DEF_VERSION 0
int asn1_parse();
void asn1_print();
syntax highlighted by Code2HTML, v. 0.9.1