diff --git a/libebpfdiscoveryshared/headers/ebpfdiscoveryshared/Types.h b/libebpfdiscoveryshared/headers/ebpfdiscoveryshared/Types.h index 29ac5b66..c48fc93c 100644 --- a/libebpfdiscoveryshared/headers/ebpfdiscoveryshared/Types.h +++ b/libebpfdiscoveryshared/headers/ebpfdiscoveryshared/Types.h @@ -134,6 +134,7 @@ __attribute__((always_inline)) inline static void discoverySessionFlagsSetIPv6(D struct DiscoverySessionMeta { __u8 sourceIPData[16]; DiscoverySessionFlags flags; + __u32 pid; }; struct DiscoverySession { diff --git a/libebpfdiscoveryskel/src/Handlers.h b/libebpfdiscoveryskel/src/Handlers.h index b870810b..69e56e0e 100644 --- a/libebpfdiscoveryskel/src/Handlers.h +++ b/libebpfdiscoveryskel/src/Handlers.h @@ -150,6 +150,7 @@ __attribute__((always_inline)) inline static void handleRead( } sessionPtr->id = allSessionStatePtr->sessionCounter; + sessionPtr->meta.pid = event.dataKey.pid; allSessionStatePtr->sessionCounter++; sessionFillIP((struct DiscoveryTrackedSessionKey*)&event.dataKey, sessionPtr); } else {