Functions to send/receive ARP packets.
More...
#include <freeradius-devel/util/net.h>
#include <freeradius-devel/util/struct.h>
#include <freeradius-devel/util/syserror.h>
#include <freeradius-devel/io/test_point.h>
#include "attrs.h"
#include <net/if_arp.h>
Go to the source code of this file.
|
static int | encode_test_ctx (void **out, TALLOC_CTX *ctx) |
|
ssize_t | fr_arp_decode (TALLOC_CTX *ctx, fr_pair_list_t *out, uint8_t const *packet, size_t packet_len) |
| Decode a raw ARP packet into VPs. More...
|
|
static ssize_t | fr_arp_decode_proto (TALLOC_CTX *ctx, fr_pair_list_t *out, uint8_t const *data, size_t data_len, UNUSED void *proto_ctx) |
|
ssize_t | fr_arp_encode (fr_dbuff_t *dbuff, uint8_t const *original, fr_pair_list_t *vps) |
| Encode VPS into a raw ARP packet. More...
|
|
static ssize_t | fr_arp_encode_proto (UNUSED TALLOC_CTX *ctx, fr_pair_list_t *vps, uint8_t *data, size_t data_len, UNUSED void *proto_ctx) |
|
int | fr_arp_entry_add (UNUSED int fd, UNUSED char const *interface, UNUSED uint8_t ipaddr[static 4], UNUSED uint8_t macaddr[static 6]) |
|
void | fr_arp_global_free (void) |
|
int | fr_arp_global_init (void) |
|
Functions to send/receive ARP packets.
- Id
- 5deb6d5ea176b2ea4257e4e3bf71e0d0cb887f0a
- Copyright
- 2020 Network RADIUS SAS <legal.nosp@m.@net.nosp@m.workr.nosp@m.adiu.nosp@m.s.com?
Definition in file base.c.
◆ fr_arp_ctx_t
◆ COPY
Value: do { \
if (memcmp(arp->_a,
zeros,
sizeof(arp->_a)) == 0) { \
memcpy(arp->_a, our_original->_b, sizeof(arp->_a)); \
} \
} while (0)
static uint8_t const zeros[6]
◆ encode_test_ctx()
static int encode_test_ctx |
( |
void ** |
out, |
|
|
TALLOC_CTX * |
ctx |
|
) |
| |
|
static |
◆ fr_arp_decode()
Decode a raw ARP packet into VPs.
Definition at line 221 of file base.c.
◆ fr_arp_decode_proto()
◆ fr_arp_encode()
Encode VPS into a raw ARP packet.
Definition at line 146 of file base.c.
◆ fr_arp_encode_proto()
◆ fr_arp_entry_add()
◆ fr_arp_global_free()
void fr_arp_global_free |
( |
void |
| ) |
|
◆ fr_arp_global_init()
int fr_arp_global_init |
( |
void |
| ) |
|
◆ arp_tp_decode_proto
Initial value:= {
}
static int encode_test_ctx(void **out, TALLOC_CTX *ctx)
static ssize_t fr_arp_decode_proto(TALLOC_CTX *ctx, fr_pair_list_t *out, uint8_t const *data, size_t data_len, UNUSED void *proto_ctx)
Definition at line 347 of file base.c.
◆ arp_tp_encode_proto
Initial value:= {
}
static ssize_t fr_arp_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 335 of file base.c.
◆ attr_arp_packet
◆ dict_arp
◆ fr_arp_packet_codes
Initial value:= {
[1] = "Request",
[2] = "Reply",
[3] = "Reverse-Request",
[4] = "Reverse-Reply",
}
Definition at line 63 of file base.c.
◆ instance_count
◆ libfreeradius_arp_dict
Initial value:= {
{ NULL }
}
fr_dict_t const * dict_arp
Definition at line 46 of file base.c.
◆ libfreeradius_arp_dict_attr
Initial value:= {
{ NULL }
}
@ FR_TYPE_STRUCT
like TLV, but without T or L, and fixed-width children
fr_dict_attr_t const * attr_arp_packet
Definition at line 54 of file base.c.
◆ libfreeradius_arp_dict_protocol
Initial value:= {
.name = "arp",
.default_type_size = 4,
.default_type_length = 0,
}
void fr_arp_global_free(void)
int fr_arp_global_init(void)
Definition at line 294 of file base.c.
◆ zeros