diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2020-11-08 18:28:45 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2020-11-08 18:28:45 +0100 |
commit | da240d890d128d798a25884e2afdc619d4305657 (patch) | |
tree | d259b2cac19e8c19732fec2f27a8f11b2013b12f | |
parent | 89a363aff68b80f81e8f244a5292cdc5de4d5ec0 (diff) |
Support raw IPv4 / IPv6 pcap packet processing.improved/pcap_processing
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]; |