Lines Matching +full:system +full:- +full:ctl
4 * Based on the MERIT NNstat etherifrt.c and the Ultrix pcap-pf.c
56 register struct bpf_insn *fcode = fp->bf_insns; in readloop()
74 caplen = ph->tap.th_wirelen > snaplen ? snaplen : ph->tap in readloop()
76 if (pcapint_filter(fcode, (char *)ph->packet, in readloop()
77 ph->tap.th_wirelen, caplen)) { in readloop()
78 if (cnt >= 0 && --cnt < 0) in readloop()
80 (*printit)((char *)ph->packet, in readloop()
81 (struct timeval *)ph->tap.th_timestamp, in readloop()
82 ph->tap.th_wirelen, caplen); in readloop()
84 inc = ph->length.PacketOffset; in readloop()
85 cc -= inc; in readloop()
91 if (cnt >= 0 && --cnt < 0) in readloop()
108 exit(-1); in efReadError()
116 exit(-1); in efReadError()
126 if (ioctl(fd, EIOSTATS, &es) == -1) { in wrapup()
128 exit(-1); in wrapup()
148 struct eniocb ctl; in initdevice() local
159 if (if_fd == -1) { in initdevice()
162 "your system may not be properly configured; see \"man enet(4)\""); in initdevice()
163 exit(-1); in initdevice()
168 if (ioctl(if_fd, EIOCGETP, (char *)&ctl) == -1) { in initdevice()
170 exit(-1); in initdevice()
176 ctl.en_rtout = 1 * ctl.en_hz; in initdevice()
177 ctl.en_tr_etherhead = 1; in initdevice()
178 ctl.en_tap_network = 1; in initdevice()
179 ctl.en_multi_packet = 1; in initdevice()
180 ctl.en_maxlen = BUFSPACE; in initdevice()
182 ctl.en_rtout = 64; /* randomly picked value for HZ */ in initdevice()
184 if (ioctl(if_fd, EIOCSETP, &ctl) == -1) { in initdevice()
186 exit(-1); in initdevice()
193 if (ioctl(if_fd, EIOCFLUSH) == -1) { in initdevice()
195 exit(-1); in initdevice()
200 maxwaiting = ctl.en_maxwaiting; in initdevice()
201 if (ioctl(if_fd, EIOCSETW, &maxwaiting) == -1) { in initdevice()
203 exit(-1); in initdevice()
209 if (ioctl(if_fd, EIOCLRSTAT, 0) == -1) { in initdevice()
211 exit(-1); in initdevice()
219 if (ioctl(if_fd, EIOCSETF, &filter) == -1) { in initdevice()
221 exit(-1); in initdevice()