Lines Matching defs:pc
88 pcap_read_pf(pcap_t *pc, int cnt, pcap_handler callback, u_char *user)
101 cc = pc->cc;
103 cc = read(pc->fd, (char *)pc->buffer + pc->offset, pc->bufsize);
108 lseek(pc->fd, 0L, SEEK_CUR) + pc->bufsize < 0) {
115 (void)lseek(pc->fd, 0L, SEEK_SET);
118 snprintf(pc->errbuf, sizeof(pc->errbuf), "pf read: %s",
122 bp = pc->buffer + pc->offset;
124 bp = pc->bp;
130 pad = pc->fddipad;
142 if (pc->break_loop) {
144 pc->break_loop = 0;
147 pc->cc = cc;
148 pc->bp = bp;
153 snprintf(pc->errbuf, sizeof(pc->errbuf),
165 snprintf(pc->errbuf, sizeof(pc->errbuf),
173 if (buflen > pc->snapshot)
174 buflen = pc->snapshot;
180 pc->md.TotPkts++;
181 pc->md.TotDrops += sp->ens_dropped;
182 pc->md.TotMissed = sp->ens_ifoverflows;
183 if (pc->md.OrigMissed < 0)
184 pc->md.OrigMissed = pc->md.TotMissed;
193 * that pc->fddipad was the amount of padding
199 if (pc->md.use_bpf ||
200 bpf_filter(pc->fcode.bf_insns, p, sp->ens_count, buflen)) {
202 pc->md.TotAccepted++;
216 pc->cc = cc;
217 pc->bp = bp;
222 pc->cc = 0;