libpcap  1.10.1
About: libpcap is a packet filter library used by tools like tcpdump.
  Fossies Dox: libpcap-1.10.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

pcap-enet.c File Reference
#include <sys/types.h>
#include <sys/time.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
#include <pcap/bpf.h>
#include <net/enet.h>
#include <netinet/in.h>
#include <netinet/if_ether.h>
#include <stdio.h>
#include <errno.h>
#include "interface.h"
Include dependency graph for pcap-enet.c:

Go to the source code of this file.

Data Structures

struct  packet_header
 

Macros

#define BUFSPACE   (4*1024)
 

Functions

static void efReadError (int, char *)
 
void readloop (int cnt, int if_fd, struct bpf_program *fp, printfunc printit)
 
void wrapup (int fd)
 
int initdevice (char *device, int pflag, int *linktype)
 

Variables

int errno
 

Macro Definition Documentation

◆ BUFSPACE

#define BUFSPACE   (4*1024)

Definition at line 42 of file pcap-enet.c.

Function Documentation

◆ efReadError()

static void efReadError ( int  fid,
char *  msg 
)
static

Definition at line 105 of file pcap-enet.c.

References errno, lseek(), and perror().

Referenced by readloop().

◆ initdevice()

int initdevice ( char *  device,
int  pflag,
int *  linktype 
)

Definition at line 148 of file pcap-enet.c.

References BUFSPACE, DLT_EN10MB, error(), ioctl(), and perror().

◆ readloop()

void readloop ( int  cnt,
int  if_fd,
struct bpf_program fp,
printfunc  printit 
)

Definition at line 48 of file pcap-enet.c.

References bpf_program::bf_insns, BUFSPACE, efReadError(), pcap_filter(), read(), and wrapup().

◆ wrapup()

void wrapup ( int  fd)

Definition at line 123 of file pcap-enet.c.

References close(), ioctl(), and perror().

Referenced by readloop().

Variable Documentation

◆ errno

int errno
extern

Referenced by accept_connection(), accept_connections(), acn_parse_hosts_file(), activate_pf_packet(), add_addr_to_dev(), add_dev(), airpcap_activate(), bpf_bind(), bpf_open(), bt_activate(), bt_findalldevs(), bt_monitor_activate(), bt_monitor_read(), bt_read_linux(), bt_stats_linux(), bufferToFile(), capture_thread_func(), check_bpf_bindable(), create_ring(), daemon_AuthUserPwd(), daemon_msg_auth_req(), daemon_unpackapplyfilter(), dag_activate(), dag_create(), dag_get_datalink(), dag_platform_cleanup(), dag_setnonblock(), device_still_exists(), dlpromiscon(), efReadError(), empty_unit(), fix_program(), get_gai_errstring(), get_if_flags(), get_if_ioctl_socket(), iface_bind(), iface_dsa_get_proto_info(), iface_get_arptype(), iface_get_id(), iface_get_mtu(), init_tpacket(), install_bpf_program(), main(), netfilter_activate(), netfilter_findalldevs(), netfilter_read_linux(), netfilter_send_config_msg(), nit_setflags(), open_dlpi_device(), open_with_IOP(), pcap_activate_bpf(), pcap_activate_dlpi(), pcap_activate_haiku(), pcap_activate_libdlpi(), pcap_activate_linux(), pcap_activate_nit(), pcap_activate_npf(), pcap_activate_pf(), pcap_activate_sita(), pcap_activate_snit(), pcap_activate_snoop(), pcap_alloc_databuf(), pcap_alloc_pcap_t(), pcap_check_header(), pcap_cleanup_bpf(), pcap_compile(), pcap_create(), pcap_create_interface(), pcap_dump_open(), pcap_dump_open_append(), pcap_findalldevs_ex(), pcap_findalldevs_ex_remote(), pcap_findalldevs_interfaces(), pcap_fopen_offline_with_tstamp_precision(), pcap_getnonblock_fd(), pcap_inject(), pcap_inject_bpf(), pcap_inject_dlpi(), pcap_inject_linux(), pcap_inject_nit(), pcap_inject_pf(), pcap_inject_snit(), pcap_inject_snoop(), pcap_list_datalinks(), pcap_list_tstamp_types(), pcap_lookupnet(), pcap_netmap_activate(), pcap_netmap_dispatch(), pcap_next_packet(), pcap_ng_check_header(), pcap_open_offline_with_tstamp_precision(), pcap_open_rpcap(), pcap_platform_finddevs(), pcap_read_bpf(), pcap_read_dlpi(), pcap_read_haiku(), pcap_read_libdlpi(), pcap_read_nit(), pcap_read_nocb_remote(), pcap_read_pf(), pcap_read_snit(), pcap_read_snoop(), pcap_remoteact_accept_ex(), pcap_sendpacket(), pcap_setfilter_bpf(), pcap_setfilter_linux(), pcap_setfilter_pf(), pcap_setnonblock_fd(), pcap_setup_dump(), pcap_startcapture_remote(), pcap_stats_bpf(), pcap_stats_haiku(), pcap_stats_linux(), pcap_stats_snoop(), pcap_wait_for_frames_mmap(), process_client_data(), rdmasniff_read(), read_bytes(), read_infile(), recv_ack(), reset_kernel_filter(), rpcap_deseraddr(), send_request(), set_kernel_filter(), setup_mmapped(), snf_create(), snf_findalldevs(), sock_geterror(), sock_recv(), sock_recv_dgram(), sock_send(), split_dname(), translate_IOP_to_pcap_name(), usb_activate(), usb_read_linux_bin(), usb_read_linux_mmap(), usb_set_ring_size(), and usb_stats_linux_bin().