-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
69 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifdef TARGET_ARCH_amd64 | ||
#include "vmlinux_x86_64.h" | ||
#endif | ||
|
||
#ifdef TARGET_ARCH_arm64 | ||
#include "vmlinux_aarch64.h" | ||
#endif | ||
|
||
#include <bpf/bpf_tracing.h> | ||
#include <bpf/bpf_endian.h> | ||
#include <bpf/bpf_helpers.h> | ||
#include <bpf/bpf_core_read.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
const __u32 MAX_SIZE = 4096; | ||
const __u32 MAX_ENTRIES_HASH = 4096; | ||
|
||
struct ssl_event_meta_t { | ||
__u32 pid; | ||
__u64 timestamp; | ||
__u32 dataSize; | ||
}; | ||
|
||
struct ssl_event_t { | ||
struct ssl_event_meta_t meta; | ||
__u8 data[MAX_SIZE]; | ||
}; | ||
|
||
struct ssl_context_t { | ||
__u64 size; | ||
__u64 buffer; | ||
}; | ||
|
||
struct target_t { | ||
_Bool enabled; | ||
}; | ||
|
||
struct { | ||
__uint(type, BPF_MAP_TYPE_HASH); | ||
__uint(max_entries, 1024); | ||
__type(key, __u64); | ||
__type(value, struct ssl_context_t); | ||
} ssl_contexts SEC(".maps"); | ||
|
||
struct { | ||
__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY); | ||
__type(key, __u32); | ||
__type(value, struct ssl_event_t); | ||
__uint(max_entries, 1); | ||
} ssl_event SEC(".maps"); | ||
|
||
struct { | ||
__uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY); | ||
} ssl_events SEC(".maps"); | ||
|
||
struct { | ||
__uint(type, BPF_MAP_TYPE_HASH); | ||
__uint(max_entries, MAX_ENTRIES_HASH); | ||
__type(key, __u32); | ||
__type(value, struct target_t); | ||
} targets SEC(".maps"); |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters