I would like to create an array of maps so I can iterate through them. For instance I have the three pinned maps below.
BPF_TABLE_PINNED("hash", struct mapkey, struct output_f, map1, mapSize, "/sys/fs/bpf/map1");
BPF_TABLE_PINNED("hash", struct mapkey, struct output_f, map2, mapSize, "/sys/fs/bpf/map2");
BPF_TABLE_PINNED("hash", struct mapkey, struct output_f, map3, mapSize, "/sys/fs/bpf/map3");
How could I iterate through these three maps? I tried making an array of void pointers, but I can't directly access the map afterwards since they each are their own type.
void* mapArray[] = {&map1, &map2, &map3};
I also tried using BPF_ARRAY_OF_MAPS, but I couldn't figure out how to use it