On Fri, Feb 22, 2013 at 5:40 PM, <[email protected]> wrote: > In that case, you *really* want to go look at how TCP and SCTP and other > protocols handle ICMP integration. You want an API that integrates your > ICMP > handling with the rest of the protocol stack, because otherwise you'll > end up with an unmaintainable mess. Also, it will be about 436 times > easier > to extend your protocol to work correctly over IPv6. :) > > I am gonna definetly suggest that to the team and see what their reply is; thanks for a nice suggestions :)
> Go look at net/ipv4/udp.c, functions __udp4_lib_err() and __udp_lib_rcv(), > particularly the latter's use of icmp_send(). You'll want to extend > icmp_send() > to handle your additional control information. > Checking the icmp_send() code, it seems to be doing exactly what I need to do but there's a little problem, icmp_send uses a function called skb_rtable which returns the routing table entry(hopefully I got it right :P) but that function is declared as static(the skb_rtable) and I didn't find a higher-level function that wraps it and is actually exported. Using icmp_send as it is wouldn't be as useful because my aim is to use ICMP(or actually any type of traffic, I wouldn't mind anything as long as it does the job and makes sense from an implementation prespective), to use ICMP, to send the information data I am exchanging to let my protocol work and that data might be 200 bytes long sometimes. Regards, Adel
_______________________________________________ Kernelnewbies mailing list [email protected] http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
