Lines Matching refs:ps

47 snf_pcap_stats(pcap_t *p, struct pcap_stat *ps)  in snf_pcap_stats()  argument
58 ps->ps_recv = stats.ring_pkt_recv + stats.ring_pkt_overflow; in snf_pcap_stats()
59 ps->ps_drop = stats.ring_pkt_overflow; in snf_pcap_stats()
60 ps->ps_ifdrop = stats.nic_pkt_overflow + stats.nic_pkt_bad; in snf_pcap_stats()
67 struct pcap_snf *ps = p->priv; in snf_platform_cleanup() local
73 if (ps->snf_inj) in snf_platform_cleanup()
74 snf_inject_close(ps->snf_inj); in snf_platform_cleanup()
76 snf_ring_close(ps->snf_ring); in snf_platform_cleanup()
77 snf_close(ps->snf_handle); in snf_platform_cleanup()
84 struct pcap_snf *ps = p->priv; in snf_getnonblock() local
86 return (ps->snf_timeout == 0); in snf_getnonblock()
92 struct pcap_snf *ps = p->priv; in snf_setnonblock() local
95 ps->snf_timeout = 0; in snf_setnonblock()
98 ps->snf_timeout = -1; /* forever */ in snf_setnonblock()
100 ps->snf_timeout = p->opt.timeout; in snf_setnonblock()
132 struct pcap_snf *ps = p->priv; in snf_read() local
142 timeout = ps->snf_timeout; in snf_read()
156 err = snf_ring_recv(ps->snf_ring, timeout, &req); in snf_read()
217 struct pcap_snf *ps = p->priv; in snf_inject() local
219 if (ps->snf_inj == NULL) { in snf_inject()
220 rc = snf_inject_open(ps->snf_boardnum, 0, &ps->snf_inj); in snf_inject()
228 rc = snf_inject_send(ps->snf_inj, -1, 0, buf, size); in snf_inject()
247 struct pcap_snf *ps = p->priv; in snf_activate() local
268 err = snf_open(ps->snf_boardnum, in snf_activate()
273 &ps->snf_handle); in snf_activate()
283 err = snf_ring_open_id(ps->snf_handle, ring_id, &ps->snf_ring); in snf_activate()
292 ps->snf_timeout = -1; in snf_activate()
294 ps->snf_timeout = p->opt.timeout; in snf_activate()
296 err = snf_start(ps->snf_handle); in snf_activate()
318 ps->snf_inj = NULL; in snf_activate()
429 struct pcap_snf *ps; in snf_create() local
476 ps = p->priv; in snf_create()
495 ps->snf_boardnum = boardnum; in snf_create()