All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Functions | Variables
proto_arp.c File Reference
#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/protocol.h>
#include <freeradius-devel/modules.h>
#include <freeradius-devel/process.h>
#include <freeradius-devel/rad_assert.h>
#include <freeradius-devel/pcap.h>
#include <net/if_arp.h>
+ Include dependency graph for proto_arp.c:

Go to the source code of this file.

Data Structures

struct  arp_decode_t
 
struct  arp_over_ether
 
struct  arp_socket_t
 

Typedefs

typedef struct arp_decode_t arp_decode_t
 
typedef struct arp_over_ether arp_over_ether_t
 
typedef struct arp_socket_t arp_socket_t
 

Functions

static const char * arp_pcap_filter_builder (UNUSED rad_listen_t *this)
 Build PCAP filter string to pass to libpcap Will be called by init_pcap. More...
 
static int arp_process (REQUEST *request)
 
static int arp_socket_decode (UNUSED rad_listen_t *listener, REQUEST *request)
 
static int arp_socket_encode (UNUSED rad_listen_t *listener, UNUSED REQUEST *request)
 
static void arp_socket_free (rad_listen_t *this)
 
static int arp_socket_parse (CONF_SECTION *cs, rad_listen_t *this)
 
static int arp_socket_print (const rad_listen_t *this, char *buffer, size_t bufsize)
 
static int arp_socket_recv (rad_listen_t *listener)
 
static int arp_socket_send (UNUSED rad_listen_t *listener, UNUSED REQUEST *request)
 

Variables

static const arp_decode_t header_names []
 
fr_protocol_t proto_arp
 

Data Structure Documentation

struct arp_decode_t

Definition at line 177 of file proto_arp.c.

Data Fields
size_t len
char const * name
struct arp_over_ether

Definition at line 40 of file proto_arp.c.

Data Fields
uint8_t hlen Length of hardware address.
uint16_t htype Format of hardware address.
uint8_t op 1 - Request, 2 - Reply.
uint8_t plen Length of protocol address.
uint16_t ptype Format of protocol address.
uint8_t sha[ETHER_ADDR_LEN] sender hardware address.
uint8_t spa[4] Sender protocol address.
uint8_t tha[ETHER_ADDR_LEN] Target hardware address.
uint8_t tpa[4] Target protocol address.
struct arp_socket_t

Definition at line 31 of file proto_arp.c.

+ Collaboration diagram for arp_socket_t:
Data Fields
RADCLIENT client
uint64_t counter
listen_socket_t lsock

Typedef Documentation

typedef struct arp_decode_t arp_decode_t
typedef struct arp_socket_t arp_socket_t

Function Documentation

static const char* arp_pcap_filter_builder ( UNUSED rad_listen_t this)
static

Build PCAP filter string to pass to libpcap Will be called by init_pcap.

Parameters
thislisten section (not used)
Returns
PCAP filter string

Definition at line 251 of file proto_arp.c.

+ Here is the caller graph for this function:

static int arp_process ( REQUEST request)
static

Definition at line 52 of file proto_arp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int arp_socket_decode ( UNUSED rad_listen_t listener,
REQUEST request 
)
static

Definition at line 196 of file proto_arp.c.

+ Here is the call graph for this function:

static int arp_socket_encode ( UNUSED rad_listen_t listener,
UNUSED REQUEST request 
)
static

Definition at line 171 of file proto_arp.c.

static void arp_socket_free ( rad_listen_t this)
static

Definition at line 237 of file proto_arp.c.

static int arp_socket_parse ( CONF_SECTION cs,
rad_listen_t this 
)
static

Definition at line 256 of file proto_arp.c.

+ Here is the call graph for this function:

static int arp_socket_print ( const rad_listen_t this,
char *  buffer,
size_t  bufsize 
)
static

Definition at line 296 of file proto_arp.c.

+ Here is the call graph for this function:

static int arp_socket_recv ( rad_listen_t listener)
static

Definition at line 95 of file proto_arp.c.

+ Here is the call graph for this function:

static int arp_socket_send ( UNUSED rad_listen_t listener,
UNUSED REQUEST request 
)
static

Definition at line 165 of file proto_arp.c.

Variable Documentation

const arp_decode_t header_names[]
static
Initial value:
= {
{ "ARP-Hardware-Format", 2 },
{ "ARP-Protocol-Format", 2 },
{ "ARP-Hardware-Address-Length", 1 },
{ "ARP-Protocol-Address-Length", 1 },
{ "ARP-Operation", 2 },
{ "ARP-Sender-Hardware-Address", 6 },
{ "ARP-Sender-Protocol-Address", 4 },
{ "ARP-Target-Hardware-Address", 6 },
{ "ARP-Target-Protocol-Address", 4 },
{ NULL, 0 }
}

Definition at line 182 of file proto_arp.c.

fr_protocol_t proto_arp
Initial value:
= {
.magic = RLM_MODULE_INIT,
.name = "arp",
.inst_size = sizeof(arp_socket_t),
.transports = 0,
.tls = false,
.parse = arp_socket_parse,
.free = arp_socket_free,
.recv = arp_socket_recv,
.send = arp_socket_send,
.print = arp_socket_print,
.encode = arp_socket_encode,
}
void common_packet_debug(REQUEST *request, RADIUS_PACKET *packet, bool received)
Definition: listen.c:1153
static int arp_socket_send(UNUSED rad_listen_t *listener, UNUSED REQUEST *request)
Definition: proto_arp.c:165
static int arp_socket_print(const rad_listen_t *this, char *buffer, size_t bufsize)
Definition: proto_arp.c:296
#define RLM_MODULE_INIT
Definition: modules.h:86
static int arp_socket_parse(CONF_SECTION *cs, rad_listen_t *this)
Definition: proto_arp.c:256
static void arp_socket_free(rad_listen_t *this)
Definition: proto_arp.c:237
int common_socket_open(CONF_SECTION *cs, rad_listen_t *this)
Definition: listen.c:1599
struct arp_socket_t arp_socket_t
static int arp_socket_encode(UNUSED rad_listen_t *listener, UNUSED REQUEST *request)
Definition: proto_arp.c:171
static int arp_socket_recv(rad_listen_t *listener)
Definition: proto_arp.c:95
static int arp_socket_decode(UNUSED rad_listen_t *listener, REQUEST *request)
Definition: proto_arp.c:196

Definition at line 306 of file proto_arp.c.