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-dbus.c File Reference
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <dbus/dbus.h>
#include "pcap-int.h"
#include "pcap-dbus.h"
Include dependency graph for pcap-dbus.c:

Go to the source code of this file.

Data Structures

struct  pcap_dbus
 

Macros

#define EAVESDROPPING_RULE   "eavesdrop=true,"
 
#define N_RULES   sizeof(rules)/sizeof(rules[0])
 

Functions

static int dbus_read (pcap_t *handle, int max_packets, pcap_handler callback, u_char *user)
 
static int dbus_write (pcap_t *handle, const void *buf, int size)
 
static int dbus_stats (pcap_t *handle, struct pcap_stat *stats)
 
static void dbus_cleanup (pcap_t *handle)
 
static int dbus_getnonblock (pcap_t *p)
 
static int dbus_setnonblock (pcap_t *p, int nonblock)
 
static int dbus_activate (pcap_t *handle)
 
pcap_tdbus_create (const char *device, char *ebuf, int *is_ours)
 
int dbus_findalldevs (pcap_if_list_t *devlistp, char *err_str)
 

Macro Definition Documentation

◆ EAVESDROPPING_RULE

#define EAVESDROPPING_RULE   "eavesdrop=true,"

◆ N_RULES

#define N_RULES   sizeof(rules)/sizeof(rules[0])

Function Documentation

◆ dbus_activate()

◆ dbus_cleanup()

static void dbus_cleanup ( pcap_t handle)
static

Definition at line 139 of file pcap-dbus.c.

References pcap_dbus::conn, pcap_cleanup_live_common(), and pcap::priv.

Referenced by dbus_activate().

◆ dbus_create()

pcap_t* dbus_create ( const char *  device,
char *  ebuf,
int *  is_ours 
)

◆ dbus_findalldevs()

int dbus_findalldevs ( pcap_if_list_t devlistp,
char *  err_str 
)

Definition at line 335 of file pcap-dbus.c.

References add_dev(), and PCAP_IF_CONNECTION_STATUS_NOT_APPLICABLE.

◆ dbus_getnonblock()

static int dbus_getnonblock ( pcap_t p)
static

Definition at line 155 of file pcap-dbus.c.

References pcap::errbuf, PCAP_ERRBUF_SIZE, and snprintf().

Referenced by dbus_activate(), and dbus_create().

◆ dbus_read()

static int dbus_read ( pcap_t handle,
int  max_packets,
pcap_handler  callback,
u_char *  user 
)
static

◆ dbus_setnonblock()

static int dbus_setnonblock ( pcap_t p,
int  nonblock 
)
static

Definition at line 163 of file pcap-dbus.c.

References pcap::errbuf, PCAP_ERRBUF_SIZE, and snprintf().

Referenced by dbus_activate(), and dbus_create().

◆ dbus_stats()

static int dbus_stats ( pcap_t handle,
struct pcap_stat stats 
)
static

◆ dbus_write()

static int dbus_write ( pcap_t handle,
const void *  buf,
int  size 
)
static

Definition at line 106 of file pcap-dbus.c.

References pcap_dbus::conn, pcap::errbuf, error(), PCAP_ERRBUF_SIZE, pcap::priv, and snprintf().

Referenced by dbus_activate().