7cc1504616
tests & ok benoit@, thanks
40 lines
2.0 KiB
Plaintext
40 lines
2.0 KiB
Plaintext
$OpenBSD: patch-nsock_include_nsock_h,v 1.7 2012/07/16 07:39:31 giovanni Exp $
|
|
--- nsock/include/nsock.h.orig Thu Mar 1 10:05:02 2012
|
|
+++ nsock/include/nsock.h Fri May 25 09:37:23 2012
|
|
@@ -80,6 +80,8 @@
|
|
extern "C" {
|
|
#endif
|
|
|
|
+#include <pcap.h>
|
|
+
|
|
/* The read calls will generally return after reading at least this
|
|
* much data so that the caller can process it and so that the
|
|
* connection spewing data doesn't monopolize resources. The caller
|
|
@@ -176,7 +178,7 @@ void *nsp_getud(nsock_pool nsp);
|
|
* everything. The basetime can be NULL to print trace lines with the current
|
|
* time, otherwise the difference between the current time and basetime will be
|
|
* used (the time program execution starts would be a good candidate) */
|
|
-void nsp_settrace(nsock_pool nsp, FILE *file, int level, const struct timeval *basetime);
|
|
+void nsp_settrace(nsock_pool nsp, FILE *file, int level, const struct bpf_timeval *basetime);
|
|
|
|
/* Turns on or off broadcast support on new sockets. Default is off (0, false)
|
|
* set in nsp_new(). Any non-zero (true) value sets SO_BROADCAST on all new
|
|
@@ -514,7 +516,7 @@ int nsock_event_cancel(nsock_pool ms_pool, nsock_event
|
|
* avoid a system call, but in many circumstances it is better to use nsock's
|
|
* time rather than the system time. If nsock has never obtained the time when
|
|
* you call it, it will do so before returning */
|
|
-const struct timeval *nsock_gettimeofday();
|
|
+const struct bpf_timeval *nsock_gettimeofday();
|
|
|
|
|
|
#ifdef HAVE_PCAP
|
|
@@ -545,7 +547,7 @@ nsock_event_id nsock_pcap_read_packet(nsock_pool nsp,
|
|
* think that host is a bit further.
|
|
* */
|
|
void nse_readpcap(nsock_event nsee, const unsigned char **l2_data, size_t *l2_len, const unsigned char **l3_data, size_t *l3_len,
|
|
- size_t *packet_len, struct timeval *ts);
|
|
+ size_t *packet_len, struct bpf_timeval *ts);
|
|
|
|
/* Well. Just pcap-style datalink. Like DLT_EN10MB or DLT_SLIP. Check in pcap(3) manpage. */
|
|
int nsi_pcap_linktype(nsock_iod nsiod);
|