From owner-freebsd-questions Tue Mar 7 03:26:14 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id DAA13022 for questions-outgoing; Tue, 7 Mar 1995 03:26:14 -0800 Received: from django.inria.fr (django.inria.fr [138.96.24.70]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id DAA13009 for ; Tue, 7 Mar 1995 03:26:05 -0800 Received: by django.inria.fr (8.6.10/8.6.10) id MAA10762; Tue, 7 Mar 1995 12:25:34 +0100 Message-Id: <199503071125.MAA10762@django.inria.fr> To: nlawson@statler.csc.calpoly.edu (Nathan Lawson) cc: questions@FreeBSD.org Subject: Re: tcpdump work? In-reply-to: your message of Mon, 06 Mar 1995 16:07:01 PST. Date: Tue, 07 Mar 1995 12:25:34 +0100 From: Andres Vega Garcia Sender: questions-owner@FreeBSD.org Precedence: bulk : nlawson@statler.csc.calpoly.edu (Nathan Lawson) wrote: >> I realized I can display just the packets for my PC but, >> if I try with other host it doesn't work. > >The "-p" option turns on the promiscuous mode for your interface. > I have the bpf support and I had the promiscuous mode support for the ep driver but the thing still doesn't work, am I missing something else? Thank you. ====== doesn't work pci3-1002-/usr/user/avega# tcpdump host pax and merlot tcpdump: listening on ep1 ====== in another xterm while in tcpdump: [pci3-129-~:> ifconfig ep1 ep1: flags=4963 mtu 1500 inet 138.96.24.100 netmask 0xfffff800 broadcast 138.96.31.255 =======from dmesg: 3 3C509 board(s) on ISA found at 0x310/10/10 0x320/11/11 0x330/15/15 ep0 not found at 0x300 ep1 at 0x310-0x31f irq 10 on isa ep1: aui/bnc/utp[*AUI*] address 00:20:af:05:09:a0 bpf: ep1 attached =======from my code if_ep.c .... void epsetfilter(sc) struct ep_softc *sc; { struct ifnet *ifp = &sc->arpcom.ac_if; unsigned short filter = FIL_INDIVIDUAL | FIL_BRDCST; if (ifp->if_flags & IFF_MULTICAST) filter |= FIL_GROUP; if (ifp->if_flags & IFF_PROMISC) filter |= FIL_ALL; outw(BASE + EP_COMMAND, SET_RX_FILTER | filter); } .... case SIOCSIFFLAGS: if ((ifp->if_flags & IFF_UP) == 0 && ifp->if_flags & IFF_RUNNING) { ifp->if_flags &= ~IFF_RUNNING; epstop(ifp->if_unit); epmbufempty(sc); } else if (ifp->if_flags & IFF_UP && (ifp->if_flags & IFF_RUNNING) == 0) epinit(ifp->if_unit); else { epsetfilter(sc); epsetlink(sc); } break; Andres ------------------------------ INRIA Sophia-Antipolis, France avega@pax.inria.fr