Lines Matching refs:pc
88 pcap_read_pf(pcap_t *pc, int cnt, pcap_handler callback, u_char *user)
101 fcode = pc->md.use_bpf ? NULL : pc->fcode.bf_insns;
103 cc = pc->cc;
105 cc = read(pc->fd, (char *)pc->buffer + pc->offset, pc->bufsize);
110 lseek(pc->fd, 0L, SEEK_CUR) + pc->bufsize < 0) {
117 (void)lseek(pc->fd, 0L, SEEK_SET);
120 snprintf(pc->errbuf, sizeof(pc->errbuf), "pf read: %s",
124 bp = pc->buffer + pc->offset;
126 bp = pc->bp;
132 pad = pc->fddipad;
144 if (pc->break_loop) {
146 pc->break_loop = 0;
149 pc->cc = cc;
150 pc->bp = bp;
155 snprintf(pc->errbuf, sizeof(pc->errbuf),
167 snprintf(pc->errbuf, sizeof(pc->errbuf),
175 if (buflen > pc->snapshot)
176 buflen = pc->snapshot;
182 pc->md.TotPkts++;
183 pc->md.TotDrops += sp->ens_dropped;
184 pc->md.TotMissed = sp->ens_ifoverflows;
185 if (pc->md.OrigMissed < 0)
186 pc->md.OrigMissed = pc->md.TotMissed;
194 * that pc->fddipad was the amount of padding
203 pc->md.TotAccepted++;
217 pc->cc = cc;
218 pc->bp = bp;
223 pc->cc = 0;