mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Merge remote-tracking branch 'origin/topic/dnthayer/ticket1757'
* origin/topic/dnthayer/ticket1757: Fix a build failure on OpenBSD BIT-1757 #merged
This commit is contained in:
commit
9b9c3a6104
6 changed files with 27 additions and 9 deletions
10
CHANGES
10
CHANGES
|
@ -1,4 +1,14 @@
|
|||
|
||||
2.5-6 | 2016-11-29 12:51:04 -0800
|
||||
|
||||
* Fix a build failure on OpenBSD relating to pcap_pkthdr. Also fixes
|
||||
an include issue on OpenBSD. (Daniel Thayer)
|
||||
|
||||
* Fix compile error in krb-types.pac. (Johanna Amann)
|
||||
|
||||
* Update krb-types.pac: KerberosString formatting for the principal
|
||||
principal name is now compliant with RFC 4120 section 5.2.2. (jamesecorrenti)
|
||||
|
||||
2.5 | 2016-11-16 14:51:59 -0800
|
||||
|
||||
* Release 2.5.
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
2.5
|
||||
2.5-6
|
||||
|
|
|
@ -761,7 +761,7 @@ void NetSessions::DoNextInnerPacket(double t, const Packet* pkt,
|
|||
uint32 caplen, len;
|
||||
caplen = len = inner->TotalLen();
|
||||
|
||||
struct timeval ts;
|
||||
pkt_timeval ts;
|
||||
int link_type;
|
||||
Layer3Proto l3_proto;
|
||||
|
||||
|
|
|
@ -3343,7 +3343,7 @@ function dump_packet%(pkt: pcap_packet, file_name: string%) : bool
|
|||
|
||||
if ( addl_pkt_dumper )
|
||||
{
|
||||
struct timeval ts;
|
||||
pkt_timeval ts;
|
||||
uint32 caplen, len, link_type;
|
||||
u_char *data;
|
||||
|
||||
|
|
|
@ -9,13 +9,14 @@ extern "C" {
|
|||
#elif defined(HAVE_SYS_ETHERNET_H)
|
||||
#include <sys/ethernet.h>
|
||||
#elif defined(HAVE_NETINET_IF_ETHER_H)
|
||||
#include <net/if_arp.h>
|
||||
#include <netinet/if_ether.h>
|
||||
#elif defined(HAVE_NET_ETHERTYPES_H)
|
||||
#include <net/ethertypes.h>
|
||||
#endif
|
||||
}
|
||||
|
||||
void Packet::Init(int arg_link_type, struct timeval *arg_ts, uint32 arg_caplen,
|
||||
void Packet::Init(int arg_link_type, pkt_timeval *arg_ts, uint32 arg_caplen,
|
||||
uint32 arg_len, const u_char *arg_data, int arg_copy,
|
||||
std::string arg_tag)
|
||||
{
|
||||
|
@ -588,7 +589,7 @@ static iosource::PktDumper* dump = 0;
|
|||
|
||||
Packet* Packet::Unserialize(UnserialInfo* info)
|
||||
{
|
||||
struct timeval ts;
|
||||
pkt_timeval ts;
|
||||
uint32 len, link_type;
|
||||
|
||||
if ( ! (UNSERIALIZE((uint32 *)&ts.tv_sec) &&
|
||||
|
|
|
@ -5,6 +5,13 @@
|
|||
#include "IP.h"
|
||||
#include "NetVar.h"
|
||||
|
||||
#if defined(__OpenBSD__)
|
||||
#include <net/bpf.h>
|
||||
typedef struct bpf_timeval pkt_timeval;
|
||||
#else
|
||||
typedef struct timeval pkt_timeval;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The Layer 3 type of a packet, as determined by the parsing code in Packet.
|
||||
*/
|
||||
|
@ -48,7 +55,7 @@ public:
|
|||
* @param tag A textual tag to associate with the packet for
|
||||
* differentiating the input streams.
|
||||
*/
|
||||
Packet(int link_type, struct timeval *ts, uint32 caplen,
|
||||
Packet(int link_type, pkt_timeval *ts, uint32 caplen,
|
||||
uint32 len, const u_char *data, int copy = false,
|
||||
std::string tag = std::string(""))
|
||||
: data(0), l2_src(0), l2_dst(0)
|
||||
|
@ -61,7 +68,7 @@ public:
|
|||
*/
|
||||
Packet() : data(0), l2_src(0), l2_dst(0)
|
||||
{
|
||||
struct timeval ts = {0, 0};
|
||||
pkt_timeval ts = {0, 0};
|
||||
Init(0, &ts, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
@ -96,7 +103,7 @@ public:
|
|||
* @param tag A textual tag to associate with the packet for
|
||||
* differentiating the input streams.
|
||||
*/
|
||||
void Init(int link_type, struct timeval *ts, uint32 caplen,
|
||||
void Init(int link_type, pkt_timeval *ts, uint32 caplen,
|
||||
uint32 len, const u_char *data, int copy = false,
|
||||
std::string tag = std::string(""));
|
||||
|
||||
|
@ -155,7 +162,7 @@ public:
|
|||
// These are passed in through the constructor.
|
||||
std::string tag; /// Used in serialization
|
||||
double time; /// Timestamp reconstituted as float
|
||||
struct timeval ts; /// Capture timestamp
|
||||
pkt_timeval ts; /// Capture timestamp
|
||||
const u_char* data; /// Packet data.
|
||||
uint32 len; /// Actual length on wire
|
||||
uint32 cap_len; /// Captured packet length
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue