man ber_encode_null () - Basic Encoding Rules (BER) tag encoding routines
NAME
Basic Encoding Rules (BER) tag encoding routines
LIBRARIES
Abz Library (-labz), Debug Library (-ldebug), BER Library (-lber)
SYNOPSIS
#include <ber/ber.h> int ber_encode_null(ber_t *ber"); int ber_encode_sequence(ber_t *ber, uint32_t length"); int ber_encode_get_request(ber_t *ber"); int ber_encode_get_next_request(ber_t *ber"); int ber_encode_get_response(ber_t *ber"); int ber_encode_set_request(ber_t *ber"); int ber_encode_trap(ber_t *ber"); int ber_encode_get_bulk_request(ber_t *ber"); int ber_encode_inform_request(ber_t *ber"); int ber_encode_snmpv2_trap(ber_t *ber"); int ber_encode_counter64(ber_t *ber, uint64_t value"); int ber_encode_integer(ber_t *ber, int32_t value"); int ber_encode_counter32(ber_t *ber, uint32_t value"); int ber_encode_gauge32(ber_t *ber, uint32_t value"); int ber_encode_timeticks(ber_t *ber, uint32_t ticks"); int ber_encode_ipaddress(ber_t *ber, uint32_t addr"); int ber_encode_octet_string(ber_t *ber, const octet_string_t *str"); int ber_encode_string(ber_t *ber, const char *str"); int ber_encode_oid(ber_t *ber, const uint32_t *oid"); int ber_encode_get_message(ber_t *ber"); int ber_encode_put_message(ber_t *ber"); int ber_encode_auth(ber_t *ber"); int ber_encode_reset(ber_t *ber"); int ber_encode_set_level(ber_t *ber");
DESCRIPTION
These routines are used to encode a BER stack. BER or Basic Encoding Rules (ITU X.690) is a language used to encode data so that it can be transferred and interpreted by different hosts in a platform independant manner.
BER is used to encode data in SNMP and LDAP and probably other popular protocols as well. This library used by the author's SNMP software.
RETURN VALUES
All of the functions return 0 if successful, -1 if some error occurred. Call abz_get_error(3) to retrieve error messages.
NOTES
You have to initialize ber_t (buf, offset, size) before calling any of the functions.
The functions encode the buffer from back to front. So after you've called the encoding functions, the buffer starts at ber->buf + ber->size - ber->offset.
Even though the size and offset field are unsigned 32-bit integers, the size of the buffer should not exceed 2147483647 bytes (maximum 32-bit signed integer value).
IP addresses are stored in network byte order.
SEE ALSO
ber_decode_null(3), makeoid(3), abz_get_error(3), mem_free(3)
AUTHOR
Written by Abraham vd Merwe <abz@blio.com>
CETTE PAGE DOCUMENTE AUSSI :
- ber_encode_auth
- ber_encode_counter32
- ber_encode_counter64
- ber_encode_gauge32
- ber_encode_get_bulk_request
- ber_encode_get_message
- ber_encode_get_next_request
- ber_encode_get_request
- ber_encode_get_response
- ber_encode_inform_request
- ber_encode_integer
- ber_encode_ipaddress
- ber_encode_octet_string
- ber_encode_oid
- ber_encode_put_message
- ber_encode_reset
- ber_encode_sequence
- ber_encode_set_level
- ber_encode_set_request
- ber_encode_snmpv2_trap
- ber_encode_string
- ber_encode_timeticks
- ber_encode_trap