Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <20031023025857.932.qmail@web303.mail.yahoo.co.jp> Date: Thu, 23 Oct 2003 11:58:57 +0900 (JST) From: Takeshi Honda Subject: select() doesn't respond To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp 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 #include #include #include #include #include #include #include #include #include #include #define SNIF_PORT 2010 void printable_fwrite(char *data,int len,FILE *fp) { int i; for (i=0;ith_dport) == SNIF_PORT){ length-=sizeof(struct ip)-sizeof(struct tcphdr); memcpy(&ia,&(ip_header->ip_src),sizeof(struct in_addr)); strcpy(sourceIP,(char *)inet_ntoa(ia)); printf("\n\n>\n"); printf("From %s\n",sourceIP); printable_fwrite(recvbuf+sizeof(struct ip)+sizeof(struct tcphdr), length,stdout); } } } return(0); } __________________________________________________ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/