diff options
author | Toni <matzeton@googlemail.com> | 2020-11-09 16:18:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-09 16:18:05 +0100 |
commit | af02ffb60f7cd6b44c2b99f7719323e9dc6fcfa8 (patch) | |
tree | 8745f48b61447a059edf5af77393110edefe614d | |
parent | ac18d5a0840ff225c122849a311f3e1429c2b795 (diff) |
Support raw IPv4 / IPv6 pcap packet processing. (#1053)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r-- | example/reader_util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/example/reader_util.c b/example/reader_util.c index 78959db71..9708e49b1 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -1646,6 +1646,16 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow, } break; + case DLT_IPV4: + type = ETH_P_IP; + ip_offset = 0; + break; + + case DLT_IPV6: + type = ETH_P_IPV6; + ip_offset = 0; + break; + /* IEEE 802.3 Ethernet - 1 */ case DLT_EN10MB: ethernet = (struct ndpi_ethhdr *) &packet[eth_offset]; |