[dhcp-agent-commits] dhcp-agent/src dhcp-rawnet.c,1.12,1.13
Status: Alpha
Brought to you by:
actmodern
From: <act...@us...> - 2003-07-16 05:42:31
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv23074/src Modified Files: dhcp-rawnet.c Log Message: added pcap_setnonblock Index: dhcp-rawnet.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-rawnet.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** dhcp-rawnet.c 6 Jul 2003 05:37:23 -0000 1.12 --- dhcp-rawnet.c 16 Jul 2003 05:42:24 -0000 1.13 *************** *** 187,190 **** --- 187,200 ---- #endif /* HAVE_PCAP_FREECODE */ + #if defined(HAVE_PCAP_NONBLOCK) + + if(pcap_setnonblock(pcap, 1, errbuf) < 0) { + ERROR_MESSAGE("could not set pcap into nonblocking mode: %s", errbuf); + pcap_close(pcap); + return NULL; + } + + #endif /* HAVE_PCAP_NONBLOCK */ + #if defined(HAVE_BPF_IMMEDIATE) /* FreeBSD, and possibly other flavors with BPF need us to |