Commit 5989ef46 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Try to fix building the network plugin on FreeBSD

There were two errors; one was an include of a linux-specific header,
the other a forward-declare of a class used in a container that seems to
work with more recent compilers but not the one on CI.
parent 1e9122ef
......@@ -28,8 +28,9 @@
#include <deque>
#include <atomic>
#include "Packet.h"
class pcap;
class Packet;
class Capture
{
......
......@@ -22,7 +22,7 @@
#include "Packet.h"
#include <arpa/inet.h>
#include <linux/if_ether.h>
#include <net/ethernet.h>
#include <netinet/ip.h>
#include <netinet/ip6.h>
#include <netinet/tcp.h>
......@@ -42,13 +42,13 @@ Packet::Packet(const TimeStamp::MicroSeconds &timeStamp, const uint8_t *data, ui
const sll_header *header = reinterpret_cast<const sll_header *>(data);
switch (ntohs(header->sll_protocol)) {
case ETH_P_IP:
case ETHERTYPE_IP:
m_networkProtocol = NetworkProtocolType::IPv4;
if (sizeof(sll_header) <= dataLength) {
parseIPv4(data + sizeof(sll_header));
}
break;
case ETH_P_IPV6:
case ETHERTYPE_IPV6:
m_networkProtocol = NetworkProtocolType::IPv6;
if (sizeof(sll_header) <= dataLength) {
parseIPv6(data + sizeof(sll_header));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment