31 u8 h_source[ETH_ALEN];
39 enum l2_packet_filter_type {
40 L2_PACKET_FILTER_DHCP,
41 L2_PACKET_FILTER_NDISC,
62 const char *ifname,
const u8 *own_addr,
unsigned short protocol,
63 void (*rx_callback)(
void *ctx,
const u8 *src_addr,
64 const u8 *buf,
size_t len),
65 void *rx_callback_ctx,
int l2_hdr);
75 const char *br_ifname,
const char *ifname,
const u8 *own_addr,
76 unsigned short protocol,
77 void (*rx_callback)(
void *ctx,
const u8 *src_addr,
78 const u8 *buf,
size_t len),
79 void *rx_callback_ctx,
int l2_hdr);
108 const u8 *buf,
size_t len);
150 enum l2_packet_filter_type type);
struct l2_packet_data * l2_packet_init_bridge(const char *br_ifname, const char *ifname, const u8 *own_addr, unsigned short protocol, void(*rx_callback)(void *ctx, const u8 *src_addr, const u8 *buf, size_t len), void *rx_callback_ctx, int l2_hdr)
Like l2_packet_init() but with bridge workaround.
Definition: l2_packet_freebsd.c:255
struct l2_packet_data * l2_packet_init(const char *ifname, const u8 *own_addr, unsigned short protocol, void(*rx_callback)(void *ctx, const u8 *src_addr, const u8 *buf, size_t len), void *rx_callback_ctx, int l2_hdr)
Initialize l2_packet interface.
Definition: l2_packet_freebsd.c:223
void l2_packet_notify_auth_start(struct l2_packet_data *l2)
Notify l2_packet about start of authentication.
Definition: l2_packet_freebsd.c:316
int l2_packet_send(struct l2_packet_data *l2, const u8 *dst_addr, u16 proto, const u8 *buf, size_t len)
Send a packet.
Definition: l2_packet_freebsd.c:51
Definition: l2_packet_freebsd.c:32
int l2_packet_get_ip_addr(struct l2_packet_data *l2, char *buf, size_t len)
Get the current IP address from the interface.
Definition: l2_packet_freebsd.c:280
Definition: l2_packet.h:29
void l2_packet_deinit(struct l2_packet_data *l2)
Deinitialize l2_packet interface.
Definition: l2_packet_freebsd.c:267
int l2_packet_set_packet_filter(struct l2_packet_data *l2, enum l2_packet_filter_type type)
Set socket filter for l2_packet.
Definition: l2_packet_freebsd.c:321
int l2_packet_get_own_addr(struct l2_packet_data *l2, u8 *addr)
Get own layer 2 address.
Definition: l2_packet_freebsd.c:44