diff --git a/api/daq_common.h b/api/daq_common.h index 4e184cf..0fd4a0f 100644 --- a/api/daq_common.h +++ b/api/daq_common.h @@ -391,6 +391,7 @@ typedef struct _daq_msg_pool_info #define DAQ_CAPA_DECODE_6IN6 0x00010000 /* decodes and tracks flows of IPv6 within IPv6. */ #define DAQ_CAPA_DECODE_MPLS 0x00020000 /* decodes and tracks flows within MPLS. */ #define DAQ_CAPA_DECODE_VXLAN 0x00040000 /* decodes and tracks flows within VXLAN. */ +#define DAQ_CAPA_DECODE_GENEVE 0x00080000 /* decodes and tracks flows within Geneve. */ /* * DAQ I/O Controls (DIOCTLs) diff --git a/configure.ac b/configure.ac index 7ab1b1a..a5781d6 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ m4_define([daq_major_version], [3]) m4_define([daq_minor_version], [0]) -m4_define([daq_patch_version], [9]) +m4_define([daq_patch_version], [10]) 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 diff --git a/modules/gwlb/daq_gwlb.cc b/modules/gwlb/daq_gwlb.cc index 1bedc27..7dd34e9 100644 --- a/modules/gwlb/daq_gwlb.cc +++ b/modules/gwlb/daq_gwlb.cc @@ -47,6 +47,9 @@ #define CALL_SUBAPI(ctxt, fname, ...) \ ctxt->subapi.fname.func(ctxt->subapi.fname.context, __VA_ARGS__) +#define CALL_SUBAPI_NOARGS(ctxt, fname) \ + ctxt->subapi.fname.func(ctxt->subapi.fname.context) + struct vlan_header { uint16_t tpid; uint16_t ether_type; @@ -283,6 +286,14 @@ static int gwlb_daq_inject_relative (void* handle, const DAQ_Msg_t* msg, const u return CALL_SUBAPI(ctx, inject_relative, msg, data, dlen, reverse); } +static uint32_t gwlb_daq_get_capabilities(void *handle) +{ + GWLBContext* ctx = static_cast(handle); + + return (CALL_SUBAPI_NOARGS(ctx, get_capabilities) | DAQ_CAPA_DECODE_GENEVE); +} + + extern "C" { #ifdef BUILDING_SO DAQ_SO_PUBLIC DAQ_ModuleAPI_t DAQ_MODULE_DATA = @@ -310,7 +321,7 @@ DAQ_ModuleAPI_t gwlb_daq_module_data = /* .get_stats = */ NULL, /* .reset_stats = */ NULL, /* .get_snaplen = */ NULL, - /* .get_capabilities = */ NULL, + /* .get_capabilities = */ gwlb_daq_get_capabilities, /* .get_datalink_type = */ NULL, /* .config_load = */ NULL, /* .config_swap = */ NULL,