int
pcap_stats_dlpi(pcap_t *p, struct pcap_stat *ps)
{
- struct pcap_dlpi *pd = p->private;
+ struct pcap_dlpi *pd = p->priv;
/*
* "ps_recv" counts packets handed to the filter, not packets
pcap_process_pkts(pcap_t *p, pcap_handler callback, u_char *user,
int count, u_char *bufp, int len)
{
- struct pcap_dlpi *pd = p->private;
+ struct pcap_dlpi *pd = p->priv;
int n, caplen, origlen;
u_char *ep, *pk;
struct pcap_pkthdr pkthdr;
pcap_getnonblock_bpf(pcap_t *p, char *errbuf)
{
#ifdef HAVE_ZEROCOPY_BPF
- struct pcap_bpf *pb = p->private;
+ struct pcap_bpf *pb = p->priv;
if (pb->zerocopy)
return (pb->nonblock);
pcap_setnonblock_bpf(pcap_t *p, int nonblock, char *errbuf)
{
#ifdef HAVE_ZEROCOPY_BPF
- struct pcap_bpf *pb = p->private;
+ struct pcap_bpf *pb = p->priv;
if (pb->zerocopy) {
pb->nonblock = nonblock;
static int
pcap_next_zbuf_shm(pcap_t *p, int *cc)
{
- struct pcap_bpf *pb = p->private;
+ struct pcap_bpf *pb = p->priv;
struct bpf_zbuf_header *bzh;
if (pb->zbuffer == pb->zbuf2 || pb->zbuffer == NULL) {
static int
pcap_next_zbuf(pcap_t *p, int *cc)
{
- struct pcap_bpf *pb = p->private;
+ struct pcap_bpf *pb = p->priv;
struct bpf_zbuf bz;
struct timeval tv;
struct timespec cur;
static int
pcap_ack_zbuf(pcap_t *p)
{
- struct pcap_bpf *pb = p->private;
+ struct pcap_bpf *pb = p->priv;
atomic_store_rel_int(&pb->bzh->bzh_user_gen,
pb->bzh->bzh_kernel_gen);
static int
pcap_read_bpf(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
- struct pcap_bpf *pb = p->private;
+ struct pcap_bpf *pb = p->priv;
int cc;
int n = 0;
register u_char *bp, *ep;
static void
pcap_cleanup_bpf(pcap_t *p)
{
- struct pcap_bpf *pb = p->private;
+ struct pcap_bpf *pb = p->priv;
#ifdef HAVE_BSD_IEEE80211
int sock;
struct ifmediareq req;
static int
pcap_activate_bpf(pcap_t *p)
{
- struct pcap_bpf *pb = p->private;
+ struct pcap_bpf *pb = p->priv;
int status = 0;
int fd;
#ifdef LIFNAMSIZ
static int
monitor_mode(pcap_t *p, int set)
{
- struct pcap_bpf *pb = p->private;
+ struct pcap_bpf *pb = p->priv;
int sock;
struct ifmediareq req;
int *media_list;
static int
pcap_setfilter_bpf(pcap_t *p, struct bpf_program *fp)
{
- struct pcap_bpf *pb = p->private;
+ struct pcap_bpf *pb = p->priv;
/*
* Free any user-mode filter we might happen to have installed.
static int
bt_activate(pcap_t* handle)
{
- struct pcap_bt *handlep = handle->private;
+ struct pcap_bt *handlep = handle->priv;
struct sockaddr_hci addr;
int opt;
int dev_id;
static int
bt_stats_linux(pcap_t *handle, struct pcap_stat *stats)
{
- struct pcap_bt *handlep = handle->private;
+ struct pcap_bt *handlep = handle->priv;
int ret;
struct hci_dev_info dev_info;
struct hci_dev_stats * s = &dev_info.stat;
static int
can_activate(pcap_t* handle)
{
- struct pcap_can *handlep = handle->private;
+ struct pcap_can *handlep = handle->priv;
struct sockaddr_can addr;
struct ifreq ifr;
if (p == NULL)
return (NULL);
- canusb = p->private;
+ canusb = p->priv;
canusb->ctx = NULL;
canusb->dev = NULL;
canusb->rdpipe = -1;
static void canusb_close(pcap_t* handle)
{
- struct pcap_canusb *canusb = handle->private;
+ struct pcap_canusb *canusb = handle->priv;
canusb->loop = 0;
pthread_join(canusb->worker, NULL);
static int canusb_activate(pcap_t* handle)
{
- struct pcap_canusb *canusb = handle->private;
+ struct pcap_canusb *canusb = handle->priv;
char *serial;
if (libusb_init(&canusb->ctx) != 0) {
struct pcap_dag *pd;
if (p != NULL) {
- pd = p->private;
+ pd = p->priv;
#ifdef HAVE_DAG_STREAMS_API
if(dag_stop_stream(p->fd, pd->dag_stream) < 0)
fprintf(stderr,"dag_stop_stream: %s\n", strerror(errno));
static int
dag_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
- struct pcap_dag *pd = p->private;
+ struct pcap_dag *pd = p->priv;
unsigned int processed = 0;
int flags = pd->dag_offset_flags;
unsigned int nonblocking = flags & DAGF_NONBLOCK;
*/
static int dag_activate(pcap_t* handle)
{
- struct pcap_dag *handlep = handle->private;
+ struct pcap_dag *handlep = handle->priv;
#if 0
char conf[30]; /* dag configure string */
#endif
static int
dag_stats(pcap_t *p, struct pcap_stat *ps) {
- struct pcap_dag *pd = p->private;
+ struct pcap_dag *pd = p->priv;
/* This needs to be filled out correctly. Hopefully a dagapi call will
provide all necessary information.
static int
dag_setnonblock(pcap_t *p, int nonblock, char *errbuf)
{
- struct pcap_dag *pd = p->private;
+ struct pcap_dag *pd = p->priv;
/*
* Set non-blocking mode on the FD.
static int
dag_get_datalink(pcap_t *p)
{
- struct pcap_dag *pd = p->private;
+ struct pcap_dag *pd = p->priv;
int index=0, dlt_index=0;
uint8_t types[255];
static int
dbus_read(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user)
{
- struct pcap_dbus *handlep = handle->private;
+ struct pcap_dbus *handlep = handle->priv;
struct pcap_pkthdr pkth;
DBusMessage *message;
dbus_write(pcap_t *handle, const void *buf, size_t size)
{
/* XXX, not tested */
- struct pcap_dbus *handlep = handle->private;
+ struct pcap_dbus *handlep = handle->priv;
DBusError error = DBUS_ERROR_INIT;
DBusMessage *msg;
static int
dbus_stats(pcap_t *handle, struct pcap_stat *stats)
{
- struct pcap_dbus *handlep = handle->private;
+ struct pcap_dbus *handlep = handle->priv;
stats->ps_recv = handlep->packets_read;
stats->ps_drop = 0;
static void
dbus_cleanup(pcap_t *handle)
{
- struct pcap_dbus *handlep = handle->private;
+ struct pcap_dbus *handlep = handle->priv;
dbus_connection_unref(handlep->conn);
#define N_RULES sizeof(rules)/sizeof(rules[0])
- struct pcap_dbus *handlep = handle->private;
+ struct pcap_dbus *handlep = handle->priv;
const char *dev = handle->opt.source;
DBusError error = DBUS_ERROR_INIT;
pcap_inject_dlpi(pcap_t *p, const void *buf, size_t size)
{
#ifdef DL_HP_RAWDLS
- struct pcap_dlpi *pd = p->private;
+ struct pcap_dlpi *pd = p->priv;
#endif
int ret;
pcap_cleanup_dlpi(pcap_t *p)
{
#ifdef DL_HP_RAWDLS
- struct pcap_dlpi *pd = p->private;
+ struct pcap_dlpi *pd = p->priv;
if (pd->send_fd >= 0) {
close(pd->send_fd);
pcap_activate_dlpi(pcap_t *p)
{
#ifdef DL_HP_RAWDLS
- struct pcap_dlpi *pd = p->private;
+ struct pcap_dlpi *pd = p->priv;
#endif
register char *cp;
int ppa;
return (NULL);
#ifdef DL_HP_RAWDLS
- pd = p->private;
+ pd = p->priv;
pd->send_fd = -1; /* it hasn't been opened yet */
#endif
*/
static int pcap_activate_dos (pcap_t *pcap)
{
- struct pcap_dos *pcapd = pcap->private;
+ struct pcap_dos *pcapd = pcap->priv;
if (pcap->opt.rfmon) {
/*
static int
pcap_read_one (pcap_t *p, pcap_handler callback, u_char *data)
{
- struct pcap_dos *pd = p->private;
+ struct pcap_dos *pd = p->priv;
struct pcap_pkthdr pcap;
struct timeval now, expiry = { 0,0 };
BYTE *rx_buf;
static int
pcap_read_dos (pcap_t *p, int cnt, pcap_handler callback, u_char *data)
{
- struct pcap_dos *pd = p->private;
+ struct pcap_dos *pd = p->priv;
int rc, num = 0;
while (num <= cnt || (cnt < 0))
FLUSHK();
- pd = p->private;
+ pd = p->priv;
pd->stat.ps_recv = stats->rx_packets;
pd->stat.ps_drop += stats->rx_missed_errors;
pd->stat.ps_ifdrop = stats->rx_dropped + /* queue full */
if (p && !exc_occured)
{
- pd = p->private;
+ pd = p->priv;
if (pcap_stats(p,NULL) < 0)
pd->stat.ps_drop = 0;
if (!get_device(p->fd))
struct pcap_dos *pd;
if (p)
{
- pd = p->private;
+ pd = p->priv;
pd->wait_proc = yield;
p->opt.timeout = wait;
}
int break_loop; /* flag set to force break from packet-reading loop */
- void *private; /* private data for methods */
+ void *priv; /* private data for methods */
int swapped;
FILE *rfile; /* null if live capture, non-null if savefile */
static int
pcap_activate_libdlpi(pcap_t *p)
{
- struct pcap_dlpi *pd = p->private;
+ struct pcap_dlpi *pd = p->priv;
int retv;
dlpi_handle_t dh;
dlpi_info_t dlinfo;
static int
dlpromiscon(pcap_t *p, bpf_u_int32 level)
{
- struct pcap_dlpi *pd = p->private;
+ struct pcap_dlpi *pd = p->priv;
int retv;
int err;
static int
pcap_read_libdlpi(pcap_t *p, int count, pcap_handler callback, u_char *user)
{
- struct pcap_dlpi *pd = p->private;
+ struct pcap_dlpi *pd = p->priv;
int len;
u_char *bufp;
size_t msglen;
static int
pcap_inject_libdlpi(pcap_t *p, const void *buf, size_t size)
{
- struct pcap_dlpi *pd = p->private;
+ struct pcap_dlpi *pd = p->priv;
int retv;
retv = dlpi_send(pd->dlpi_hd, NULL, 0, buf, size, NULL);
static void
pcap_cleanup_libdlpi(pcap_t *p)
{
- struct pcap_dlpi *pd = p->private;
+ struct pcap_dlpi *pd = p->priv;
if (pd->dlpi_hd != NULL) {
dlpi_close(pd->dlpi_hd);
static int
enter_rfmon_mode_mac80211(pcap_t *handle, int sock_fd, const char *device)
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
int ret;
char phydev_path[PATH_MAX+1];
struct nl80211_state nlstate;
static void pcap_cleanup_linux( pcap_t *handle )
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
struct ifreq ifr;
#ifdef HAVE_LIBNL
struct nl80211_state nlstate;
static int
pcap_activate_linux(pcap_t *handle)
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
const char *device;
int status = 0;
static inline int
linux_check_direction(const pcap_t *handle, const struct sockaddr_ll *sll)
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
if (sll->sll_pkttype == PACKET_OUTGOING) {
/*
static int
pcap_read_packet(pcap_t *handle, pcap_handler callback, u_char *userdata)
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
u_char *bp;
int offset;
#ifdef HAVE_PF_PACKET_SOCKETS
static int
pcap_inject_linux(pcap_t *handle, const void *buf, size_t size)
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
int ret;
#ifdef HAVE_PF_PACKET_SOCKETS
static int
pcap_stats_linux(pcap_t *handle, struct pcap_stat *stats)
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
#ifdef HAVE_TPACKET_STATS
struct tpacket_stats kstats;
socklen_t len = sizeof (struct tpacket_stats);
return -1;
}
- handlep = handle->private;
+ handlep = handle->priv;
/* Make our private copy of the filter */
pcap_setdirection_linux(pcap_t *handle, pcap_direction_t d)
{
#ifdef HAVE_PF_PACKET_SOCKETS
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
if (!handlep->sock_packet) {
handle->direction = d;
activate_new(pcap_t *handle)
{
#ifdef HAVE_PF_PACKET_SOCKETS
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
const char *device = handle->opt.source;
int is_any_device = (strcmp(device, "any") == 0);
int sock_fd = -1, arptype;
static int
activate_mmap(pcap_t *handle, int *status)
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
int ret;
/*
static int
prepare_tpacket_socket(pcap_t *handle)
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
#ifdef HAVE_TPACKET2
socklen_t len;
int val;
static int
create_ring(pcap_t *handle, int *status)
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
unsigned i, j, frames_per_block;
struct tpacket_req req;
socklen_t len;
static void
destroy_ring(pcap_t *handle)
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
/* tell the kernel to destroy the ring*/
struct tpacket_req req;
{
struct oneshot_userdata *sp = (struct oneshot_userdata *)user;
pcap_t *handle = sp->pd;
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
*sp->hdr = *h;
memcpy(handlep->oneshot_buffer, bytes, h->caplen);
static void
pcap_cleanup_linux_mmap( pcap_t *handle )
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
destroy_ring(handle);
if (handlep->oneshot_buffer != NULL) {
static int
pcap_getnonblock_mmap(pcap_t *p, char *errbuf)
{
- struct pcap_linux *handlep = p->private;
+ struct pcap_linux *handlep = p->priv;
/* use negative value of timeout to indicate non blocking ops */
return (handlep->timeout<0);
static int
pcap_setnonblock_mmap(pcap_t *p, int nonblock, char *errbuf)
{
- struct pcap_linux *handlep = p->private;
+ struct pcap_linux *handlep = p->priv;
/*
* Map each value to their corresponding negation to
static inline union thdr *
pcap_get_ring_frame(pcap_t *handle, int status)
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
union thdr h;
h.raw = RING_GET_FRAME(handle);
pcap_read_linux_mmap(pcap_t *handle, int max_packets, pcap_handler callback,
u_char *user)
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
int timeout;
int pkts = 0;
char c;
static int
pcap_setfilter_linux_mmap(pcap_t *handle, struct bpf_program *filter)
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
int n, offset;
int ret;
* value of -ENFILE. (Return values are negative errnos.) We
* could probably use that to find an unused device.
*/
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
int err;
struct iwreq ireq;
struct iw_priv_args *priv;
static int
activate_old(pcap_t *handle)
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
int arptype;
struct ifreq ifr;
const char *device = handle->opt.source;
static int
fix_program(pcap_t *handle, struct sock_fprog *fcode, int is_mmapped)
{
- struct pcap_linux *handlep = handle->private;
+ struct pcap_linux *handlep = handle->priv;
size_t prog_size;
register int i;
register struct bpf_insn *p;
static int
netfilter_read_linux(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user)
{
- struct pcap_netfilter *handlep = handle->private;
+ struct pcap_netfilter *handlep = handle->priv;
const unsigned char *buf;
int count = 0;
int len;
static int
netfilter_stats_linux(pcap_t *handle, struct pcap_stat *stats)
{
- struct pcap_netfilter *handlep = handle->private;
+ struct pcap_netfilter *handlep = handle->priv;
stats->ps_recv = handlep->packets_read;
stats->ps_drop = 0;
static int
pcap_stats_nit(pcap_t *p, struct pcap_stat *ps)
{
- struct pcap_nit *pn = p->private;
+ struct pcap_nit *pn = p->priv;
/*
* "ps_recv" counts packets handed to the filter, not packets
static int
pcap_read_nit(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
- struct pcap_nit *pn = p->private;
+ struct pcap_nit *pn = p->priv;
register int cc, n;
register u_char *bp, *cp, *ep;
register struct nit_hdr *nh;
static int
pcap_read_pf(pcap_t *pc, int cnt, pcap_handler callback, u_char *user)
{
- struct pcap_pf *pf = pc->private;
+ struct pcap_pf *pf = pc->priv;
register u_char *p, *bp;
register int cc, n, buflen, inc;
register struct enstamp *sp;
static int
pcap_stats_pf(pcap_t *p, struct pcap_stat *ps)
{
- struct pcap_pf *pf = p->private;
+ struct pcap_pf *pf = p->priv;
/*
* If packet filtering is being done in the kernel:
static int
pcap_activate_pf(pcap_t *p)
{
- struct pcap_pf *pf = p->private;
+ struct pcap_pf *pf = p->priv;
short enmode;
int backlog = -1; /* request the most */
struct enfilter Filter;
static int
pcap_setfilter_pf(pcap_t *p, struct bpf_program *fp)
{
- struct pcap_pf *pf = p->private;
+ struct pcap_pf *pf = p->priv;
struct bpf_version bv;
/*
*/
static int septel_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user) {
- struct pcap_septel *ps = p->private;
+ struct pcap_septel *ps = p->priv;
HDR *h;
MSG *m;
int processed = 0 ;
}
static int septel_stats(pcap_t *p, struct pcap_stat *ps) {
- struct pcap_septel *handlep = p->private;
+ struct pcap_septel *handlep = p->priv;
/*handlep->stat.ps_recv = 0;*/
/*handlep->stat.ps_drop = 0;*/
static void
snf_platform_cleanup(pcap_t *p)
{
- struct pcap_snf *ps = p->private;
+ struct pcap_snf *ps = p->priv;
if (p == NULL)
return;
static int
snf_getnonblock(pcap_t *p, char *errbuf)
{
- struct pcap_snf *ps = p->private;
+ struct pcap_snf *ps = p->priv;
return (ps->snf_timeout == 0);
}
static int
snf_setnonblock(pcap_t *p, int nonblock, char *errbuf)
{
- struct pcap_snf *ps = p->private;
+ struct pcap_snf *ps = p->priv;
if (nonblock)
ps->snf_timeout = 0;
static int
snf_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
- struct pcap_snf *ps = p->private;
+ struct pcap_snf *ps = p->priv;
struct pcap_pkthdr hdr;
int i, flags, err, caplen, n;
struct snf_recv_req req;
static int
snf_activate(pcap_t* p)
{
- struct pcap_snf *ps = p->private;
+ struct pcap_snf *ps = p->priv;
char *device = p->opt.source;
const char *nr = NULL;
int err;
p = pcap_create_common(device, ebuf, sizeof (struct pcap_snf));
if (p == NULL)
return NULL;
- ps = p->private;
+ ps = p->priv;
p->activate_op = snf_activate;
ps->snf_boardnum = boardnum;
static int
pcap_stats_snit(pcap_t *p, struct pcap_stat *ps)
{
- struct pcap_snit *psn = p->private;
+ struct pcap_snit *psn = p->priv;
/*
* "ps_recv" counts packets handed to the filter, not packets
static int
pcap_read_snit(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
- struct pcap_snit *psn = p->private;
+ struct pcap_snit *psn = p->priv;
register int cc, n;
register u_char *bp, *cp, *ep;
register struct nit_bufhdr *hdrp;
static int
pcap_read_snoop(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
- struct pcap_snoop *psn = p->private;
+ struct pcap_snoop *psn = p->priv;
int cc;
register struct snoopheader *sh;
register u_int datalen;
static int
pcap_stats_snoop(pcap_t *p, struct pcap_stat *ps)
{
- struct pcap_snoop *psn = p->private;
+ struct pcap_snoop *psn = p->priv;
register struct rawstats *rs;
struct rawstats rawstats;
static
int usb_mmap(pcap_t* handle)
{
- struct pcap_usb_linux *handlep = handle->private;
+ struct pcap_usb_linux *handlep = handle->priv;
int len = ioctl(handle->fd, MON_IOCQ_RING_SIZE);
if (len < 0)
return 0;
static int
usb_activate(pcap_t* handle)
{
- struct pcap_usb_linux *handlep = handle->private;
+ struct pcap_usb_linux *handlep = handle->priv;
char full_path[USB_LINE_LEN];
/* Initialize some components of the pcap structure. */
* /usr/src/linux/Documentation/usb/usbmon.txt
* for message format
*/
- struct pcap_usb_linux *handlep = handle->private;
+ struct pcap_usb_linux *handlep = handle->priv;
unsigned timestamp;
int tag, cnt, ep_num, dev_addr, dummy, ret, urb_len, data_len;
char etype, pipeid1, pipeid2, status[16], urb_tag, line[USB_LINE_LEN];
static int
usb_stats_linux(pcap_t *handle, struct pcap_stat *stats)
{
- struct pcap_usb_linux *handlep = handle->private;
+ struct pcap_usb_linux *handlep = handle->priv;
int dummy, ret, consumed, cnt;
char string[USB_LINE_LEN];
char token[USB_LINE_LEN];
static int
usb_stats_linux_bin(pcap_t *handle, struct pcap_stat *stats)
{
- struct pcap_usb_linux *handlep = handle->private;
+ struct pcap_usb_linux *handlep = handle->priv;
int ret;
struct mon_bin_stats st;
ret = ioctl(handle->fd, MON_IOCG_STATS, &st);
static int
usb_read_linux_bin(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user)
{
- struct pcap_usb_linux *handlep = handle->private;
+ struct pcap_usb_linux *handlep = handle->priv;
struct mon_bin_get info;
int ret;
struct pcap_pkthdr pkth;
static int
usb_read_linux_mmap(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user)
{
- struct pcap_usb_linux *handlep = handle->private;
+ struct pcap_usb_linux *handlep = handle->priv;
struct mon_bin_mfetch fetch;
int32_t vec[VEC_SIZE];
struct pcap_pkthdr pkth;
static void
usb_cleanup_linux_mmap(pcap_t* handle)
{
- struct pcap_usb_linux *handlep = handle->private;
+ struct pcap_usb_linux *handlep = handle->priv;
/* if we have a memory-mapped buffer, unmap it */
if (handlep->mmapbuf != NULL) {
static int
pcap_read_win32_dag(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
- struct pcap_win *pw = p->private;
+ struct pcap_win *pw = p->priv;
u_char *dp = NULL;
int packet_len = 0, caplen = 0;
struct pcap_pkthdr pcap_header;
static int
pcap_activate_win32(pcap_t *p)
{
- struct pcap_win *pw = p->private;
+ struct pcap_win *pw = p->priv;
NetType type;
if (p->opt.rfmon) {
static int
pcap_getnonblock_win32(pcap_t *p, char *errbuf)
{
- struct pcap_win *pw = p->private;
+ struct pcap_win *pw = p->priv;
/*
* XXX - if there were a PacketGetReadTimeout() call, we
static int
pcap_setnonblock_win32(pcap_t *p, int nonblock, char *errbuf)
{
- struct pcap_win *pw = p->private;
+ struct pcap_win *pw = p->priv;
int newtimeout;
if (nonblock) {
if (size == 0) {
/* No private data was requested. */
- p->private = NULL;
+ p->priv = NULL;
} else {
/*
* Set the pointer to the private data; that's the structure
* of size "size" following the pcap_t.
*/
- p->private = (void *)(chunk + sizeof (pcap_t));
+ p->priv = (void *)(chunk + sizeof (pcap_t));
}
return (p);
u_int tsresol;
u_int64_t tsoffset;
- ps = p->private;
+ ps = p->priv;
/*
* Count this interface.
return (NULL);
}
p->swapped = swapped;
- ps = p->private;
+ ps = p->priv;
/*
* What precision does the user want?
static void
pcap_ng_cleanup(pcap_t *p)
{
- struct pcap_ng_sf *ps = p->private;
+ struct pcap_ng_sf *ps = p->priv;
free(ps->ifaces);
sf_cleanup(p);
static int
pcap_ng_next_packet(pcap_t *p, struct pcap_pkthdr *hdr, u_char **data)
{
- struct pcap_ng_sf *ps = p->private;
+ struct pcap_ng_sf *ps = p->priv;
struct block_cursor cursor;
int status;
struct enhanced_packet_block *epbp;
p->next_packet_op = pcap_next_packet;
- ps = p->private;
+ ps = p->priv;
p->opt.tstamp_precision = precision;
static int
pcap_next_packet(pcap_t *p, struct pcap_pkthdr *hdr, u_char **data)
{
- struct pcap_sf *ps = p->private;
+ struct pcap_sf *ps = p->priv;
struct pcap_sf_patched_pkthdr sf_hdr;
FILE *fp = p->rfile;
size_t amt_read;