The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Functions | Variables
base.c File Reference

Functions to send/receive BFD packets. More...

#include <fcntl.h>
#include <ctype.h>
#include "attrs.h"
#include <freeradius-devel/io/pair.h>
#include <freeradius-devel/util/net.h>
#include <freeradius-devel/util/proto.h>
#include <freeradius-devel/util/udp.h>
+ Include dependency graph for base.c:

Go to the source code of this file.

Functions

void fr_bfd_global_free (void)
 
int fr_bfd_global_init (void)
 
bool fr_bfd_packet_ok (char const **err, uint8_t const *packet, size_t packet_len)
 

Variables

fr_dict_attr_t const * attr_bfd_additional_data
 
fr_dict_attr_t const * attr_bfd_packet
 
fr_dict_attr_t const * attr_packet_type
 
fr_table_num_ordered_t const bfd_auth_type_table []
 
size_t const bfd_auth_type_table_len = NUM_ELEMENTS(bfd_auth_type_table)
 
fr_dict_t const * dict_bfd
 
fr_dict_t const * dict_freeradius
 
char const * fr_bfd_packet_names [FR_BFD_CODE_MAX]
 
static uint32_t instance_count = 0
 
fr_dict_autoload_t libfreeradius_bfd_dict []
 
fr_dict_attr_autoload_t libfreeradius_bfd_dict_attr []
 
fr_dict_protocol_t libfreeradius_bfd_dict_protocol
 

Detailed Description

Functions to send/receive BFD packets.

Id
75daba373437b0ce1565c8aab7cd95d89d6f830b

Definition in file base.c.

Function Documentation

◆ fr_bfd_global_free()

void fr_bfd_global_free ( void  )

Definition at line 244 of file base.c.

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

◆ fr_bfd_global_init()

int fr_bfd_global_init ( void  )

Definition at line 221 of file base.c.

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

◆ fr_bfd_packet_ok()

bool fr_bfd_packet_ok ( char const **  err,
uint8_t const *  packet,
size_t  packet_len 
)

Definition at line 83 of file base.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ attr_bfd_additional_data

fr_dict_attr_t const* attr_bfd_additional_data

Definition at line 52 of file base.c.

◆ attr_bfd_packet

fr_dict_attr_t const* attr_bfd_packet

Definition at line 51 of file base.c.

◆ attr_packet_type

fr_dict_attr_t const* attr_packet_type

Definition at line 50 of file base.c.

◆ bfd_auth_type_table

fr_table_num_ordered_t const bfd_auth_type_table[]
Initial value:
= {
{ L("none"), BFD_AUTH_RESERVED },
{ L("simple"), BFD_AUTH_SIMPLE },
{ L("keyed-md5"), BFD_AUTH_KEYED_MD5 },
{ L("met-keyed-md5"), BFD_AUTH_MET_KEYED_MD5 },
{ L("keyed-sha1"), BFD_AUTH_KEYED_SHA1 },
{ L("met-keyed-sha1"), BFD_AUTH_MET_KEYED_SHA1 },
}
@ BFD_AUTH_MET_KEYED_MD5
Definition: bfd.h:56
@ BFD_AUTH_MET_KEYED_SHA1
Definition: bfd.h:58
@ BFD_AUTH_SIMPLE
Definition: bfd.h:54
@ BFD_AUTH_KEYED_SHA1
Definition: bfd.h:57
@ BFD_AUTH_KEYED_MD5
Definition: bfd.h:55
@ BFD_AUTH_RESERVED
Definition: bfd.h:53
#define L(_str)
Helper for initialising arrays of string literals.
Definition: build.h:207

Definition at line 70 of file base.c.

◆ bfd_auth_type_table_len

size_t const bfd_auth_type_table_len = NUM_ELEMENTS(bfd_auth_type_table)

Definition at line 78 of file base.c.

◆ dict_bfd

fr_dict_t const* dict_bfd

Definition at line 41 of file base.c.

◆ dict_freeradius

fr_dict_t const* dict_freeradius

Definition at line 40 of file base.c.

◆ fr_bfd_packet_names

char const* fr_bfd_packet_names[FR_BFD_CODE_MAX]
Initial value:
= {
"Admin-Down",
"Down",
"Init",
"Up",
}

Definition at line 63 of file base.c.

◆ instance_count

uint32_t instance_count = 0
static

Definition at line 38 of file base.c.

◆ libfreeradius_bfd_dict

fr_dict_autoload_t libfreeradius_bfd_dict
Initial value:
= {
{ .out = &dict_freeradius, .proto = "freeradius" },
{ .out = &dict_bfd, .proto = "bfd" },
{ NULL }
}
fr_dict_t const * dict_freeradius
Definition: base.c:77
fr_dict_t const * dict_bfd
Definition: base.c:41

Definition at line 44 of file base.c.

◆ libfreeradius_bfd_dict_attr

fr_dict_attr_autoload_t libfreeradius_bfd_dict_attr
Initial value:
= {
{ .out = &attr_packet_type, .name = "Packet-Type", .type = FR_TYPE_UINT32, .dict = &dict_bfd },
{ .out = &attr_bfd_packet, .name = "Packet", .type = FR_TYPE_STRUCT, .dict = &dict_bfd },
{ .out = &attr_bfd_additional_data, .name = "Additional-Data", .type = FR_TYPE_GROUP, .dict = &dict_bfd },
{ NULL }
}
fr_dict_attr_t const * attr_packet_type
Definition: base.c:91
@ FR_TYPE_UINT32
32 Bit unsigned integer.
Definition: merged_model.c:99
@ FR_TYPE_STRUCT
like TLV, but without T or L, and fixed-width children
Definition: merged_model.c:119
@ FR_TYPE_GROUP
A grouping of other attributes.
Definition: merged_model.c:124
fr_dict_attr_t const * attr_bfd_packet
Definition: base.c:51
fr_dict_attr_t const * attr_bfd_additional_data
Definition: base.c:52

Definition at line 55 of file base.c.

◆ libfreeradius_bfd_dict_protocol

fr_dict_protocol_t libfreeradius_bfd_dict_protocol
Initial value:
= {
.name = "bfd",
.default_type_size = 1,
.default_type_length = 1,
}
int fr_bfd_global_init(void)
Definition: base.c:221
void fr_bfd_global_free(void)
Definition: base.c:244

Definition at line 254 of file base.c.