<div dir="ltr"><div class="im" style="font-family:arial,sans-serif;font-size:13px">On Fri, Feb 22, 2013 at 5:40 PM, <span dir="ltr"><<a href="mailto:Valdis.Kletnieks@vt.edu" target="_blank">Valdis.Kletnieks@vt.edu</a>></span> wrote:<br>
</div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><span style="color:rgb(34,34,34)">In that case, you *really* want to go look at how TCP and SCTP and other</span><br></div>protocols handle ICMP integration. You want an API that integrates your ICMP<br>handling with the rest of the protocol stack, because otherwise you'll<br>
end up with an unmaintainable mess. Also, it will be about 436 times easier<br>to extend your protocol to work correctly over IPv6. :)<br><br></blockquote></div><div>I am gonna definetly suggest that to the team and see what their reply is; thanks for a nice suggestions :) </div>
<div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Go look at net/ipv4/udp.c, functions __udp4_lib_err() and __udp_lib_rcv(),<br>
particularly the latter's use of icmp_send(). You'll want to extend icmp_send()<br>to handle your additional control information.<br></blockquote><div> </div></div></div>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.</div>
<div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">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.</div>
<div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px"><br></div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px"><br></div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">
Regards,<br>Adel</div></div>