Skip to content

Commit

Permalink
api: support for inner flow NAT
Browse files Browse the repository at this point in the history
  • Loading branch information
Raman Krishnan committed Jun 3, 2021
1 parent 3d31a7d commit 2a44b27
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion api/daq_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extern "C" {
#include <unistd.h>

// Comprehensive version number covering all elements of this header
#define DAQ_COMMON_API_VERSION 0x00030002
#define DAQ_COMMON_API_VERSION 0x00030003

#ifndef DAQ_SO_PUBLIC
# ifdef HAVE_VISIBILITY
Expand Down Expand Up @@ -159,6 +159,7 @@ typedef struct _daq_napt_info
uint16_t src_port;
uint16_t dst_port;
uint8_t flags;
uint8_t ip_layer;
} DAQ_NAPTInfo_t;

/* Decoded packet information parsed from the Packet message's data. Currently, all fields refer
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

m4_define([daq_major_version], [3])
m4_define([daq_minor_version], [0])
m4_define([daq_patch_version], [3])
m4_define([daq_patch_version], [4])
m4_define([daq_version_str], [daq_major_version.daq_minor_version.daq_patch_version])

# Kill the 'divert' macro with extreme prejudice so it stops clashing with references
Expand Down
2 changes: 1 addition & 1 deletion example/daqtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ static DAQ_Verdict handle_packet_message(DAQTestThreadContext *ctxt, DAQ_Msg_h m
inet_ntop(daq_napt_info_dst_addr_family(napti), &napti->dst_addr, dst_addr_str, sizeof(dst_addr_str));
dst_port = ntohs(napti->dst_port);

printf("NAPT: %s : %hu -> %s : %hu\n", src_addr_str, src_port, dst_addr_str, dst_port);
printf("NAPT: Layer %hhu: %s : %hu -> %s : %hu\n", napti->ip_layer, src_addr_str, src_port, dst_addr_str, dst_port);
}

const DAQ_PktDecodeData_t *pdd = (const DAQ_PktDecodeData_t *) daq_msg_get_meta(msg, DAQ_PKT_META_DECODE_DATA);
Expand Down

0 comments on commit 2a44b27

Please sign in to comment.