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-libdlpi.c File Reference
#include <sys/types.h>
#include <sys/time.h>
#include <sys/bufmod.h>
#include <sys/stream.h>
#include <libdlpi.h>
#include <errno.h>
#include <memory.h>
#include <stropts.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pcap-int.h"
#include "dlpisubs.h"
Include dependency graph for pcap-libdlpi.c:

Go to the source code of this file.

Data Structures

struct  linknamelist
 
struct  linkwalk
 

Macros

#define STRINGIFY(n)   #n
 

Typedefs

typedef struct linknamelist linknamelist_t
 
typedef struct linkwalk linkwalk_t
 

Functions

static int dlpromiscon (pcap_t *, bpf_u_int32)
 
static int pcap_read_libdlpi (pcap_t *, int, pcap_handler, u_char *)
 
static int pcap_inject_libdlpi (pcap_t *, const void *, int)
 
static void pcap_libdlpi_err (const char *, const char *, int, char *)
 
static void pcap_cleanup_libdlpi (pcap_t *)
 
static boolean_t list_interfaces (const char *, void *)
 
static int pcap_activate_libdlpi (pcap_t *p)
 
static int is_dlpi_interface (const char *name)
 
static int get_if_flags (const char *name, bpf_u_int32 *flags, char *errbuf)
 
int pcap_platform_finddevs (pcap_if_list_t *devlistp, char *errbuf)
 
pcap_tpcap_create_interface (const char *device, char *ebuf)
 
const char * pcap_lib_version (void)
 

Macro Definition Documentation

◆ STRINGIFY

#define STRINGIFY (   n)    #n

Definition at line 256 of file pcap-libdlpi.c.

Typedef Documentation

◆ linknamelist_t

typedef struct linknamelist linknamelist_t

◆ linkwalk_t

typedef struct linkwalk linkwalk_t

Function Documentation

◆ dlpromiscon()

static int dlpromiscon ( pcap_t p,
bpf_u_int32  level 
)
static

◆ get_if_flags()

static int get_if_flags ( const char *  name,
bpf_u_int32 flags,
char *  errbuf 
)
static

Definition at line 291 of file pcap-libdlpi.c.

References PCAP_IF_CONNECTION_STATUS_NOT_APPLICABLE, and PCAP_IF_LOOPBACK.

Referenced by pcap_platform_finddevs().

◆ is_dlpi_interface()

static int is_dlpi_interface ( const char *  name)
static

Definition at line 285 of file pcap-libdlpi.c.

Referenced by pcap_platform_finddevs().

◆ list_interfaces()

static boolean_t list_interfaces ( const char *  linkname,
void *  arg 
)
static

◆ pcap_activate_libdlpi()

◆ pcap_cleanup_libdlpi()

static void pcap_cleanup_libdlpi ( pcap_t p)
static

Definition at line 453 of file pcap-libdlpi.c.

References pcap::fd, pcap_cleanup_live_common(), pd, and pcap::priv.

Referenced by pcap_activate_libdlpi().

◆ pcap_create_interface()

pcap_t* pcap_create_interface ( const char *  device,
char *  ebuf 
)

Definition at line 476 of file pcap-libdlpi.c.

References pcap::activate_op, pcap_activate_libdlpi(), and PCAP_CREATE_COMMON.

◆ pcap_inject_libdlpi()

static int pcap_inject_libdlpi ( pcap_t p,
const void *  buf,
int  size 
)
static

Definition at line 430 of file pcap-libdlpi.c.

References pcap::errbuf, pcap_libdlpi_err(), pd, and pcap::priv.

Referenced by pcap_activate_libdlpi().

◆ pcap_lib_version()

const char* pcap_lib_version ( void  )

Definition at line 492 of file pcap-libdlpi.c.

References PCAP_VERSION_STRING.

◆ pcap_libdlpi_err()

static void pcap_libdlpi_err ( const char *  linkname,
const char *  func,
int  err,
char *  errbuf 
)
static

◆ pcap_platform_finddevs()

◆ pcap_read_libdlpi()

static int pcap_read_libdlpi ( pcap_t p,
int  count,
pcap_handler  callback,
u_char *  user 
)
static