#include "snmp_pdu.h"
Go to the source code of this file.
Macros | |
#define | SNMP_VERSION_1 0 /* RFC 1157 */ |
#define | SNMP_VERSION_2 1 /* RFC 1901 */ |
Functions | |
u_char * | snmp_msg_Encode (u_char *, int *, u_char *, int, int, struct snmp_pdu *) |
u_char * | snmp_msg_Decode (u_char *, int *, u_char *, int *, int *, struct snmp_pdu *) |
Macro Definition Documentation
◆ SNMP_VERSION_1
#define SNMP_VERSION_1 0 /* RFC 1157 */ |
Definition at line 40 of file snmp_msg.h.
◆ SNMP_VERSION_2
#define SNMP_VERSION_2 1 /* RFC 1901 */ |
Definition at line 41 of file snmp_msg.h.
Function Documentation
◆ snmp_msg_Decode()
u_char * snmp_msg_Decode | ( | u_char * | Packet, |
int * | PacketLenP, | ||
u_char * | Community, | ||
int * | CommLenP, | ||
int * | Version, | ||
struct snmp_pdu * | PDU | ||
) |
Definition at line 252 of file snmp_msg.c.
References ASN_CONSTRUCTOR, ASN_PARSE_ERROR, asn_parse_header(), asn_parse_int(), asn_parse_string(), ASN_SEQUENCE, NULL, snmp_pdu_decode(), snmp_var_DecodeVarBind(), SNMP_VERSION_1, SNMP_VERSION_2, snmplib_debug(), and snmp_pdu::variables.
Referenced by snmp_parse().
◆ snmp_msg_Encode()
u_char * snmp_msg_Encode | ( | u_char * | Buffer, |
int * | BufLenP, | ||
u_char * | Community, | ||
int | CommLen, | ||
int | Version, | ||
struct snmp_pdu * | PDU | ||
) |
Definition at line 133 of file snmp_msg.c.
References asn_build_header(), asn_build_int(), asn_build_string(), ASN_CONSTRUCTOR, ASN_INTEGER, ASN_OCTET_STR, ASN_PRIMITIVE, ASN_SEQUENCE, ASN_UNIVERSAL, snmp_pdu::command, NULL, snmp_pdu_encode(), snmp_var_EncodeVarBind(), snmplib_debug(), and snmp_pdu::variables.
Referenced by snmp_build().