networkclient
|
Attribute encoding and decoding routines. More...
#include <networkradius-devel/client.h>
Functions | |
ssize_t | nr_vp2vsa (const RADIUS_PACKET *packet, const RADIUS_PACKET *original, const VALUE_PAIR **pvp, uint8_t *ptr, size_t room) |
ssize_t | nr_vp2rfc (const RADIUS_PACKET *packet, const RADIUS_PACKET *original, const VALUE_PAIR **pvp, uint8_t *ptr, size_t room) |
ssize_t | nr_vp2attr (const RADIUS_PACKET *packet, const RADIUS_PACKET *original, const VALUE_PAIR **pvp, uint8_t *start, size_t room) |
ssize_t | nr_attr2vp_raw (const RADIUS_PACKET *packet, const RADIUS_PACKET *original, const uint8_t *data, size_t length, VALUE_PAIR **pvp) |
ssize_t | nr_attr2vp_rfc (const RADIUS_PACKET *packet, const RADIUS_PACKET *original, const uint8_t *data, size_t length, VALUE_PAIR **pvp) |
int | nr_tlv_ok (const uint8_t *data, size_t length, size_t dv_type, size_t dv_length) |
ssize_t | nr_attr2vp_vsa (const RADIUS_PACKET *packet, const RADIUS_PACKET *original, const uint8_t *data, size_t length, VALUE_PAIR **pvp) |
ssize_t | nr_attr2vp (const RADIUS_PACKET *packet, const RADIUS_PACKET *original, const uint8_t *data, size_t length, VALUE_PAIR **pvp) |
ssize_t | nr_attr2data (const RADIUS_PACKET *packet, ssize_t start, unsigned int attribute, unsigned int vendor, const uint8_t **pdata, size_t *plength) |
Attribute encoding and decoding routines.
ssize_t nr_vp2vsa | ( | const RADIUS_PACKET * | packet, |
const RADIUS_PACKET * | original, | ||
const VALUE_PAIR ** | pvp, | ||
uint8_t * | data, | ||
size_t | room | ||
) |
Encodes a Vendor-Specific VALUE_PAIR into an attribute.
[in] | packet | Where to place the encoded attribute. |
[in] | original | The original request (optional), if "packet" is a response |
[in,out] | pvp | The VALUE_PAIR to encode. On any return >=0, it is updated to point to the "next" VALUE_PAIR which should be encoded. |
[in] | data | Where the attribute is to be encoded. |
[in] | room | How many octets are available for attribute encoding. |
References nr_dict_attr::attr, value_pair::da, value_pair::next, nr_debug_error, NR_MAX_VENDOR, PW_VENDOR_SPECIFIC, return_NR_ERR, and nr_dict_attr::vendor.
Referenced by nr_vp2attr().