Relative Content

Tag Archive for cebpf

ebpf compare two dynamic sized strings

… #define PATH_SEGMENT_LEN 255 typedef unsigned char path_segment[PATH_SEGMENT_LEN]; … path_segment *a = bpf_map_lookup_elem(&cpu_buffer, &j); if (!a) { break; } path_segment *b = current_element->path_elements[i]; … I need to know if a and b are equal, which both are dynamicly sized. I tried __builtin_memcmp but that still returns false even though the strings are equal. The compiler […]