The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Enumerations | Functions | Variables
vmps.h File Reference

Structures and prototypes for Cisco's VLAN Query Protocol. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FR_VMPS_PACKET_CODE_VALID(_code)   (((_code) > 0) && ((_code) < FR_VMPS_CODE_MAX))
 
#define FR_VQP_HDR_LEN   (8)
 
#define FR_VQP_VERSION   (1)
 

Enumerations

enum  fr_vmps_packet_code_t {
  FR_VMPS_INVALID = 0 ,
  FR_VMPS_JOIN_REQUEST = 1 ,
  FR_VMPS_JOIN_RESPONSE = 2 ,
  FR_VMPS_RECONFIRM_REQUEST = 3 ,
  FR_VMPS_RECONFIRM_RESPONSE = 4 ,
  FR_VMPS_CODE_MAX = 5 ,
  FR_VMPS_DO_NOT_RESPOND = 256
}
 

Functions

int fr_vmps_decode (TALLOC_CTX *ctx, fr_pair_list_t *out, uint8_t const *data, size_t data_len, unsigned int *code)
 
ssize_t fr_vmps_encode (fr_dbuff_t *dbuff, uint8_t const *original, int code, uint32_t id, fr_dcursor_t *cursor))
 
void fr_vmps_global_free (void)
 
int fr_vmps_global_init (void)
 
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...
 

Variables

char const * fr_vmps_packet_names [FR_VMPS_CODE_MAX]
 

Detailed Description

Structures and prototypes for Cisco's VLAN Query Protocol.

Id
3204df5be810535955c8d364f54b18b03460cb5d
Id
144fbf87e5247bf3519e7fff0ba57b8b53d4370c

Definition in file vmps.h.

Macro Definition Documentation

◆ FR_VMPS_PACKET_CODE_VALID

#define FR_VMPS_PACKET_CODE_VALID (   _code)    (((_code) > 0) && ((_code) < FR_VMPS_CODE_MAX))

Definition at line 58 of file vmps.h.

◆ FR_VQP_HDR_LEN

#define FR_VQP_HDR_LEN   (8)

Definition at line 34 of file vmps.h.

◆ FR_VQP_VERSION

#define FR_VQP_VERSION   (1)

Definition at line 35 of file vmps.h.

Enumeration Type Documentation

◆ fr_vmps_packet_code_t

Enumerator
FR_VMPS_INVALID 
FR_VMPS_JOIN_REQUEST 
FR_VMPS_JOIN_RESPONSE 
FR_VMPS_RECONFIRM_REQUEST 
FR_VMPS_RECONFIRM_RESPONSE 
FR_VMPS_CODE_MAX 
FR_VMPS_DO_NOT_RESPOND 

Definition at line 48 of file vmps.h.

Function Documentation

◆ fr_vmps_decode()

int fr_vmps_decode ( TALLOC_CTX *  ctx,
fr_pair_list_t out,
uint8_t const *  data,
size_t  data_len,
unsigned int *  code 
)

Definition at line 154 of file vmps.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_vmps_encode()

ssize_t fr_vmps_encode ( fr_dbuff_t dbuff,
uint8_t const *  original,
int  code,
uint32_t  id,
fr_dcursor_t cursor 
)

Definition at line 267 of file vmps.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_vmps_global_free()

void fr_vmps_global_free ( void  )

Definition at line 79 of file base.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_vmps_global_init()

int fr_vmps_global_init ( void  )

Definition at line 55 of file base.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_vmps_ok()

bool fr_vmps_ok ( uint8_t const *  packet,
size_t packet_len 
)

Definition at line 83 of file vmps.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_vmps_packet_size()

ssize_t fr_vmps_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 370 of file vmps.c.

+ Here is the call graph for this function:

◆ 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.

+ Here is the call graph for this function:

Variable Documentation

◆ fr_vmps_packet_names

char const* fr_vmps_packet_names[FR_VMPS_CODE_MAX]
extern

Definition at line 75 of file vmps.c.