Date: Mon, 8 Sep 2003 12:03:55 +0400 (MSD) From: Dmitry Morozovsky <marck@rinet.ru> To: Lev Walkin <vlm@netli.com> Cc: hackers@freebsd.org Subject: Re: if bpf fd's select()able? Message-ID: <20030908120036.V55683@woozle.rinet.ru> In-Reply-To: <3F5C3549.8050607@netli.com> References: <20030907233940.M18589@woozle.rinet.ru> <3F5BB991.2050601@netli.com> <20030908113632.R55683@woozle.rinet.ru> <3F5C3549.8050607@netli.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 8 Sep 2003, Lev Walkin wrote: [snip] LW> > LW> Yes, you're missing the interactive mode. LW> > LW> Refer to BIOCIMMEDIATE in the bpf(4) manual page. LW> > LW> > Unfortunately not ;-) LW> LW> Fortunately, yes. LW> LW> > if (ioctl(fd, BIOCPROMISC, NULL) == -1) LW> > err(1, "can't set promisc mode"); LW> > if (ioctl(fd, BIOCIMMEDIATE, &yes) == -1) LW> > err(1, "can't set IMMEDIATE mode"); LW> LW> Are you sure that "yes" variable holds the truth value? Yes. Just attaching file from wrong directory. However, I found a (really stupid, yeah) bug: the first parameter of select() in this test case should be fd+1, not 1 ;-) Thanks for the fresh look ;-) Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030908120036.V55683>