#include "squid.h"
#include "asn1.h"
#include "snmp.h"
#include "snmp_msg.h"
#include "snmp_pdu.h"
#include "snmp_vars.h"
Go to the source code of this file.
Macros | |
#define | ASN_PARSE_ERROR(x) { return(x); } |
Functions | |
u_char * | snmp_msg_Encode (u_char *Buffer, int *BufLenP, u_char *Community, int CommLen, int Version, struct snmp_pdu *PDU) |
u_char * | snmp_msg_Decode (u_char *Packet, int *PacketLenP, u_char *Community, int *CommLenP, int *Version, struct snmp_pdu *PDU) |
Macro Definition Documentation
◆ ASN_PARSE_ERROR
#define ASN_PARSE_ERROR | ( | x | ) | { return(x); } |
Definition at line 122 of file snmp_msg.c.
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().