#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <pcap.h>
#include <dnet.h>
#include "common.h"
#include "eloop.h"
#include "l2_packet.h"
Include dependency graph for l2_packet_pcap.c:
Go to the source code of this file.
Data Structures | |
struct | l2_packet_data |
Functions | |
int | l2_packet_get_own_addr (struct l2_packet_data *l2, u8 *addr) |
Get own layer 2 address. | |
int | l2_packet_send (struct l2_packet_data *l2, const u8 *dst_addr, u16 proto, const u8 *buf, size_t len) |
Send a packet. | |
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. | |
void | l2_packet_deinit (struct l2_packet_data *l2) |
Deinitialize l2_packet interface. | |
int | l2_packet_get_ip_addr (struct l2_packet_data *l2, char *buf, size_t len) |
Get the current IP address from the interface. | |
void | l2_packet_notify_auth_start (struct l2_packet_data *l2) |
Notify l2_packet about start of authentication. |
Alternatively, this software may be distributed under the terms of BSD license.
See README and COPYING for more details.
Definition in file l2_packet_pcap.c.
|
Deinitialize l2_packet interface.
Definition at line 320 of file l2_packet_pcap.c. Here is the call graph for this function: |
|
Get the current IP address from the interface.
Definition at line 338 of file l2_packet_pcap.c. Here is the call graph for this function: |
|
Get own layer 2 address.
Definition at line 57 of file l2_packet_pcap.c. |
|
Initialize l2_packet interface.
Definition at line 283 of file l2_packet_pcap.c. |
|
Notify l2_packet about start of authentication.
Definition at line 374 of file l2_packet_pcap.c. Here is the call graph for this function: |
|
Send a packet.
Definition at line 91 of file l2_packet_pcap.c. |