openbsd-ports/net/nmap/patches/patch-nsock_include_nsock_h
giovanni e6fc392521 Update to 6.25
lot of improvements in nse scripting engine and in ipv6 support
Full changelog: http://nmap.org/changelog.html
Help and ok sthen@ and dcoppa@
2012-12-19 17:12:11 +00:00

40 lines
2.0 KiB
Plaintext

$OpenBSD: patch-nsock_include_nsock_h,v 1.8 2012/12/19 17:12:11 giovanni Exp $
--- nsock/include/nsock.h.orig Mon Nov 12 21:44:37 2012
+++ nsock/include/nsock.h Fri Nov 30 12:41:48 2012
@@ -90,6 +90,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
@@ -186,7 +188,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
@@ -550,7 +552,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
@@ -581,7 +583,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);