All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
vqp.c File Reference
#include <freeradius-devel/libradius.h>
#include <freeradius-devel/udp.h>
#include "vqp.h"
+ Include dependency graph for vqp.c:

Go to the source code of this file.

Macros

#define debug_pair(vp)
 
#define MAX_VMPS_LEN   (MAX_STRING_LEN - 1)
 
#define VQP_HDR_LEN   (8)
 
#define VQP_MAX_ATTRIBUTES   (12)
 
#define VQP_VERSION   (1)
 

Functions

int vqp_decode (RADIUS_PACKET *packet)
 
int vqp_encode (RADIUS_PACKET *packet, RADIUS_PACKET *original)
 
ssize_t vqp_packet_size (uint8_t const *data, size_t data_len)
 See how big of a packet is in the buffer. More...
 
RADIUS_PACKETvqp_recv (int sockfd)
 
static ssize_t vqp_recv_header (int sockfd)
 
int vqp_send (RADIUS_PACKET *packet)
 

Variables

static int contents [5][VQP_MAX_ATTRIBUTES]
 

Macro Definition Documentation

#define debug_pair (   vp)
Value:
do { if (fr_debug_lvl && fr_log_fp) { \
} \
} while(0)
FILE * fr_log_fp
Definition: radius.c:81
void fr_pair_fprint(FILE *, VALUE_PAIR const *vp)
Print one attribute and value to FP.
Definition: pair.c:2232
int fr_debug_lvl
Definition: misc.c:40

Definition at line 33 of file vqp.c.

#define MAX_VMPS_LEN   (MAX_STRING_LEN - 1)

Definition at line 30 of file vqp.c.

#define VQP_HDR_LEN   (8)

Definition at line 69 of file vqp.c.

#define VQP_MAX_ATTRIBUTES   (12)

Definition at line 71 of file vqp.c.

#define VQP_VERSION   (1)

Definition at line 70 of file vqp.c.

Function Documentation

int vqp_decode ( RADIUS_PACKET packet)

Definition at line 247 of file vqp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vqp_encode ( RADIUS_PACKET packet,
RADIUS_PACKET original 
)

Definition at line 374 of file vqp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ssize_t vqp_packet_size ( uint8_t const *  data,
size_t  data_len 
)

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
datapointer to the packet buffer
data_lenlength 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 551 of file vqp.c.

RADIUS_PACKET* vqp_recv ( int  sockfd)

Definition at line 114 of file vqp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ssize_t vqp_recv_header ( int  sockfd)
static

Definition at line 74 of file vqp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vqp_send ( RADIUS_PACKET packet)

Definition at line 229 of file vqp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

int contents[5][VQP_MAX_ATTRIBUTES]
static
Initial value:
= {
{ 0, 0, 0, 0, 0, 0 },
{ 0x0c01, 0x0c02, 0x0c03, 0x0c04, 0x0c07, 0x0c05 },
{ 0x0c03, 0x0c08, 0, 0, 0, 0 },
{ 0x0c01, 0x0c02, 0x0c03, 0x0c04, 0x0c07, 0x0c08 },
{ 0x0c03, 0x0c08, 0, 0, 0, 0 }
}

Definition at line 366 of file vqp.c.