Re: sending MAC packets --- again, and again
From: Daniel Valencia (fetrovsky_at_yahoo.com)
Date: 05/21/05
- Previous message: Jon Simola: "Re: sending MAC packets --- again, and again"
- Next in thread: Charles Swiger: "Re: sending MAC packets --- again, and again"
- Reply: Charles Swiger: "Re: sending MAC packets --- again, and again"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 21 May 2005 09:27:38 -0700 (PDT) To: freebsd-net@freebsd.org
Hello and thanks for your prompt answer...
I followed your (Jon Simola's) advice, so i defined
BUFSIZ as 2000, although my tutorial said it was
defined somewhere in the pcap headers, and added a
pcap_loop instead of the pcap_next. I also modified
the program to only show packets that are sent from a
broadcast address and to a broadcast address (which is
how i'm sending my packets).
I can see almost all the packets I send. The issue is
a little interesting, because I'd expect in a network
with almost no trafic for my packets to show up
immediately. Actually, at startup my sniffer stalls
for a good minute and half, during which period some
of the packets I send will show up and some will not,
and after all the bunch is printed, it stalls again,
while I keep putting messages in the wire from the
other machine. After some more 60 seconds have
passed, i see all of the messages appear all at once.
Is this normal pcap behaviour, or is it some
FreeBSD-specific behaviour, or is it just me?
Thank you again
- Daniel
--- Jon Simola <jsimola@gmail.com> wrote:
> On 5/20/05, Daniel Valencia <fetrovsky@yahoo.com>
> wrote:
>
> > my sniffer just stalls and eventually will report
> a totally unrelated message.
> ...
> > handle = pcap_open_live( "xl0", BUFSIZ, 1,
> 0, errbuf );
>
> Uh, you're asking it to wait forever to see a
> packet. I don't see a
> #define in there for BUFSIZ, so you might be asking
> it to catch zero
> bytes. And what is the "totally unrelsated message"?
>
> I'd try using pcap_loop() or friends so you can
> catch and examine more
> than a single packet.
>
> And don't forget to call pcap_close() at the end,
> I'm not sure how
> polite pcap is about leaving dangling bpf devices.
>
> --
> Jon Simola
> Systems Administrator
> ABC Communications
>
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
- Previous message: Jon Simola: "Re: sending MAC packets --- again, and again"
- Next in thread: Charles Swiger: "Re: sending MAC packets --- again, and again"
- Reply: Charles Swiger: "Re: sending MAC packets --- again, and again"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|