doubts about how to detect an specific kind of tcp/ip packets.

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi folks,

    I'm writing a software, that needs to detect and do something
always when arrive some specific kind of tcp packet. below i'll try to
explain using a "pseudo code".

<pseudocode>
ifaces = listen (eth0, eth1)

busy_loop() {
    pkt = get_packet(ifaces);
    if (pkt.header == ARP && pkt.src == client.src  || pkt.header ==
47 /* Tunnel GRE */ && pkt.src == client.src ) {
        if (check_client (pkt))
             do_something();
    }
}
</pseudocode>

kernel or userland? daemon maybe... needs to be "light", I would like
to get some suggestions about the best way/practice to do this, maybe
could be possible the using libn3, libpcap. if someone knows any
project/code that i can use as a base, tell me! :)
--
Jorge Pereira
--
To unsubscribe from this list: send the line "unsubscribe lartc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux