Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dgollub
libpcap
libpcap-0.9.8-socket-timeout.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libpcap-0.9.8-socket-timeout.diff of Package libpcap
Index: pcap-linux.c =================================================================== --- pcap-linux.c.orig +++ pcap-linux.c @@ -1811,6 +1811,18 @@ activate_new(pcap_t *handle) } handle->bufsize = handle->snapshot; + if (to_ms > 0) { + struct timeval timeout; + timeout.tv_sec = to_ms / 1000; + timeout.tv_usec = (to_ms * 1000) % 1000000; + if (setsockopt(sock_fd, SOL_SOCKET, SO_RCVTIMEO, + &timeout, sizeof(timeout)) == -1) { + snprintf(ebuf, PCAP_ERRBUF_SIZE, + "setsockopt: %s", pcap_strerror(errno)); + break; + }; + } + /* Save the socket FD in the pcap structure */ handle->fd = sock_fd;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor