Re: [tcpdump-workers] Problems with select (the other way around...)

2009-05-16 Thread Ricardo Balbinot
tks.. a noob question (should have read the man page carefully). Regards, Ricardo 2009/5/15 Michael Richardson > > > "Ricardo" == Ricardo Balbinot writes: >Ricardo> tv.tv_sec = 1; >Ricardo> tv.tv_usec = 0; >Ricardo> FD_ZERO(&rfds); >Ricardo> FD_SET(handle_fd,&rfds); >Ri

Re: [tcpdump-workers] Problems with select (the other way around...)

2009-05-15 Thread Michael Richardson
> "Ricardo" == Ricardo Balbinot writes: Ricardo> tv.tv_sec = 1; Ricardo> tv.tv_usec = 0; Ricardo> FD_ZERO(&rfds); Ricardo> FD_SET(handle_fd,&rfds); Ricardo> retval = select(1, &rfds, NULL, NULL, &tv); The first argument to select is the highest FD that you want to look at

[tcpdump-workers] Problems with select (the other way around...)

2009-05-15 Thread Ricardo Balbinot
Hi, I have seen lots of messages around the list, but I do have a strange problem.. in the code below, the select NEVER returns that the pcap descriptor can be read... It returns a timeout normally, and if I just use the pcap_dispatch function, it works out just fine.. the problem is that I want