Question about memory in C

Victor Detoni victordetoni at
Wed Feb 10 08:40:44 EST 2016

Hi all,

I'm working for a network security prototype and I would like to know the
best way to read diferent configs from the memory, for example:

My program will receive many pkts from network interface and it needs to
know what's profile it will use based on source ip address.

First all, I'm thinking to use array in C, for example:

for (i=0;i<=PROFILES;i++) {
    if (pkt.ip_addr == source_ip[i])

I will process at about millions entries per second and ~100 profiles. What
do you think? It will work fine? fast? any suggest?

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Kernelnewbies mailing list