[SOLVED] sending MAC packets --- again, and again

2005-05-21 Thread Daniel Valencia
Hello all Thanks to your answers, and thanks to Charles Swiger for mentioning the timeout value, i went to the manpage and re-read that, and figured out that I had misinterpreted the timeout purpose. I thought that if I set it to zero, I would wait forever and as soon as a packet arrived I would

Re: sending MAC packets --- again, and again

2005-05-21 Thread Daniel Valencia
Hello --- Charles Swiger <[EMAIL PROTECTED]> wrote: > pcap_dispatch() will not > necessarily > return when the read times out; on some > platforms, the read > timeout > isn't supported, and, on other platforms, > the timer doesn't > start until > at least one packe

Re: sending MAC packets --- again, and again

2005-05-21 Thread Charles Swiger
On May 21, 2005, at 12:27 PM, Daniel Valencia wrote: [ ...pcap reading code stalling... ] Is this normal pcap behaviour, or is it some FreeBSD-specific behaviour, or is it just me? It's unfortunately normal. You're running into this (from "man pcap"): NOTE: when reading a live capture

Re: sending MAC packets --- again, and again

2005-05-21 Thread Charles Swiger
On May 20, 2005, at 11:16 PM, Daniel Valencia wrote: I know this may sound funny, but I'm still wrestling with libpcap because I send packets and I cannot read them. I tried also some example code of a toy sniffer from a tutorial to pcap, and it behaves just like my code. As my code is pretty c

Re: sending MAC packets --- again, and again

2005-05-21 Thread Daniel Valencia
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 fro