From owner-freebsd-hackers Fri May 8 22:42:55 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA27906 for freebsd-hackers-outgoing; Fri, 8 May 1998 22:42:55 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from voland.freenet.bishkek.su (root@voland.freenet.bishkek.su [193.125.230.4]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA27863 for ; Fri, 8 May 1998 22:42:36 -0700 (PDT) (envelope-from fygrave@freenet.bishkek.su) Received: from freenet.bishkek.su (fygrave@freenet.bishkek.su [193.125.230.1]) by voland.freenet.bishkek.su (8.8.7/8.8.7) with ESMTP id LAA14591; Sat, 9 May 1998 11:45:38 +0600 Received: from localhost (fygrave@localhost) by freenet.bishkek.su (8.8.4/8.6.12) with SMTP id KAA16361; Sat, 9 May 1998 10:57:19 -0500 Date: Sat, 9 May 1998 10:57:18 -0500 (GMT+5) From: CyberPsychotic To: brian mitchell cc: freebsd-hackers@FreeBSD.ORG Subject: bpf In-Reply-To: Message-ID: X-copyright: The content of this message is intellectual property of its author. So are all mistakes. X-lummer: Bill Gates MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > 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