Re: select() doesn't respond

2003-10-23 Thread Corinna Vinschen
On Thu, Oct 23, 2003 at 11:58:57AM +0900, Takeshi Honda wrote: > I got linux packet monitoring program, > and succeeded to build. > > But when I tried to run, select() doens't respond and > program stops. > > I use cygwin 1.5.5-1. > > What can I do for this? > Please let me know. RAW sockets ar

Re: select() doesn't respond

2003-10-22 Thread Brian Dessent
Takeshi Honda wrote: >if ((sock=socket(AF_INET,SOCK_RAW,IPPROTO_TCP))==-1){ > printf("Can not create RAW socket.\n"); > return -1; > } > > FD_ZERO(&read_fd); > FD_SET(sock,&read_fd); > select(FD_SETSIZE,&read_fd,NULL,NULL,NULL); // program > stop here You create a socket but

select() doesn't respond

2003-10-22 Thread Takeshi Honda
I got linux packet monitoring program, and succeeded to build. But when I tried to run, select() doens't respond and program stops. I use cygwin 1.5.5-1. What can I do for this? Please let me know. The source code is as follows. #include #include