lkml.org 
[lkml]   [1999]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: How does raw socket implementation handle ICMP (or any other non-kernel related protocols)
From
Date
shankarv@future.futsoft.com (Shankar Vasudevan) writes:

> hi gurus,
>
> I make the following assumption (text in bold), if its wrong tell me the actual story.
>
> "In ip.c ip gives the whole ip packet (with header) to the raw socket implementation. (RSI)

Correct.

But please don't invent new acronyms like that.

>
>
> RSI strips the ip header off and gives the "raw ICMP" packet to the application which uses the socket.

Raw sockets always deliver with the IP header.


>
>
> Also the application when it wants to send a "raw ICMP" packet, it gives it to the RSI, which in turn
> gives it to ip.c which wraps it with IP header and sends it out."

Unless you set IP_HDRINCL yes.

>
> is the story same for any other non-kernel related protocols.
>

Yes. And even for kernel related protocols.

This all and more is documented in raw(7), part of manpages 1.25+


-Andi
--
This is like TV. I don't like TV.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.040 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site