Functions to send/receive VQP packets.
More...
#include <freeradius-devel/io/test_point.h>
#include <freeradius-devel/protocol/vmps/vmps.h>
#include <freeradius-devel/util/dbuff.h>
#include <freeradius-devel/util/proto.h>
#include <freeradius-devel/util/udp.h>
#include "vmps.h"
#include "attrs.h"
Go to the source code of this file.
|
static int | _decode_test_ctx (UNUSED fr_vmps_ctx_t *proto_ctx) |
|
static int | _encode_test_ctx (UNUSED fr_vmps_ctx_t *proto_ctx) |
|
static int | decode_test_ctx (void **out, TALLOC_CTX *ctx) |
|
static int | encode_test_ctx (void **out, TALLOC_CTX *ctx) |
|
int | fr_vmps_decode (TALLOC_CTX *ctx, fr_pair_list_t *out, uint8_t const *data, size_t data_len, unsigned int *code) |
|
static ssize_t | fr_vmps_decode_proto (TALLOC_CTX *ctx, fr_pair_list_t *out, uint8_t const *data, size_t data_len, void *proto_ctx) |
|
ssize_t | fr_vmps_encode (fr_dbuff_t *dbuff, uint8_t const *original, int code, uint32_t seq_no, fr_dcursor_t *cursor) |
|
static ssize_t | fr_vmps_encode_proto (UNUSED TALLOC_CTX *ctx, fr_pair_list_t *vps, uint8_t *data, size_t data_len, UNUSED void *proto_ctx) |
|
bool | fr_vmps_ok (uint8_t const *packet, size_t *packet_len) |
|
ssize_t | fr_vmps_packet_size (uint8_t const *data, size_t data_len) |
| See how big of a packet is in the buffer. More...
|
|
void | fr_vmps_print_hex (FILE *fp, uint8_t const *packet, size_t packet_len) |
| Print a raw VMPS packet as hex. More...
|
|
static void | print_hex_data (uint8_t const *ptr, int attrlen, int depth) |
|
Functions to send/receive VQP packets.
- Id
- 72236c487e6ee6b37baa4ed4ae406b247199f516
- Copyright
- 2007 Alan DeKok (aland.nosp@m.@dep.nosp@m.loyin.nosp@m.grad.nosp@m.ius.c.nosp@m.om)
Definition in file vmps.c.
◆ fr_vmps_ctx_t
Used as the decoder ctx.
Definition at line 40 of file vmps.c.
◆ _decode_test_ctx()
◆ _encode_test_ctx()
◆ decode_test_ctx()
static int decode_test_ctx |
( |
void ** |
out, |
|
|
TALLOC_CTX * |
ctx |
|
) |
| |
|
static |
◆ encode_test_ctx()
static int encode_test_ctx |
( |
void ** |
out, |
|
|
TALLOC_CTX * |
ctx |
|
) |
| |
|
static |
◆ fr_vmps_decode()
◆ fr_vmps_decode_proto()
◆ fr_vmps_encode()
◆ fr_vmps_encode_proto()
◆ fr_vmps_ok()
◆ fr_vmps_packet_size()
See how big of a packet is in the buffer.
Packet is not 'const * const' because we may update data_len, if there's more data in the UDP packet than in the VMPS packet.
- Parameters
-
data | pointer to the packet buffer |
data_len | length of the packet buffer |
- Returns
- <= 0 packet is bad. >0 how much of the data is a packet (can be larger than data_len)
Definition at line 370 of file vmps.c.
◆ fr_vmps_print_hex()
void fr_vmps_print_hex |
( |
FILE * |
fp, |
|
|
uint8_t const * |
packet, |
|
|
size_t |
packet_len |
|
) |
| |
Print a raw VMPS packet as hex.
Definition at line 462 of file vmps.c.
◆ print_hex_data()
static void print_hex_data |
( |
uint8_t const * |
ptr, |
|
|
int |
attrlen, |
|
|
int |
depth |
|
) |
| |
|
static |
◆ fr_vmps_packet_names
Initial value:= {
[FR_PACKET_TYPE_VALUE_JOIN_REQUEST] = "Join-Request",
[FR_PACKET_TYPE_VALUE_JOIN_RESPONSE] = "Join-Response",
[FR_PACKET_TYPE_VALUE_RECONFIRM_REQUEST] = "Reconfirm-Request",
[FR_PACKET_TYPE_VALUE_RECONFIRM_RESPONSE] = "Reconfirm-Response",
}
Definition at line 75 of file vmps.c.
◆ vmps_tp_decode_proto
Initial value:= {
}
static ssize_t fr_vmps_decode_proto(TALLOC_CTX *ctx, fr_pair_list_t *out, uint8_t const *data, size_t data_len, void *proto_ctx)
static int decode_test_ctx(void **out, TALLOC_CTX *ctx)
Definition at line 541 of file vmps.c.
◆ vmps_tp_encode_proto
Initial value:= {
}
static int encode_test_ctx(void **out, TALLOC_CTX *ctx)
static ssize_t fr_vmps_encode_proto(UNUSED TALLOC_CTX *ctx, fr_pair_list_t *vps, uint8_t *data, size_t data_len, UNUSED void *proto_ctx)
Definition at line 582 of file vmps.c.