Date: Sat, 9 May 1998 10:57:18 -0500 (GMT+5) From: CyberPsychotic <fygrave@freenet.bishkek.su> To: brian mitchell <brian@deity.loa.com> Cc: freebsd-hackers@FreeBSD.ORG Subject: bpf Message-ID: <Pine.LNX.3.96.980509104957.2591m-100000@freenet.bishkek.su> In-Reply-To: <Pine.GSO.3.96.980508081827.19665A-100000@deity.loa.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > Use bpf, it is the same as sock packet, except it does not suck nearly as > much. > yeah. That's what i need. but i got stuck abit with using bpf. I looked to the manual page for bpf. Some things confused me there aliltle. Would you mind clarifying it abit: +++ from manual page for bpf +++ The packet filter appears as a character special device, /dev/bpf0, /dev/bpf1, etc. After opening the device, the file descriptor must be bound to a specific network interface with the BIOCSETIF ioctl. A given interface can be shared be multiple listeners, and the filter underlying each descriptor will see an identical packet stream. The total number of open files is limited to the value given in the kernel co +++ end of quote +++ could you please give the sample of BIOCSETIF ioctl call? I think i should ivolve some particular structure or something here, but i checked manual and didn't find any reference (like in Linux i used : strcpy(ifr.ifr_name, interface); if (ioctl(s, SIOCGIFFLAGS, &ifr) < 0) { perror("ioctl(SIOCGIFFLAGS)"); return 1; } ) would appreciate any sample code or hints,... Thanks beforehands Fyodor To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.96.980509104957.2591m-100000>