mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rob Landley <landley@trommello.org>
To: Xinwen - Fu <xinwenfu@cs.tamu.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: packet created by local raw socket
Date: Sun, 3 Feb 2002 19:51:20 -0500	[thread overview]
Message-ID: <20020204005015.DXSW15583.femail44.sdc1.sfba.home.com@there> (raw)
In-Reply-To: <Pine.SOL.4.10.10202031800220.24685-100000@dogbert>
In-Reply-To: <Pine.SOL.4.10.10202031800220.24685-100000@dogbert>

On Sunday 03 February 2002 07:24 pm, Xinwen - Fu wrote:
> Rob,
> 	Thanks for your reply! It's very good!
>
>
> 	In fact my problem is simpler to you( the
> last email is not clear):
>
> 	Now I create a raw socket(SOCK_RAW) on a local machine, construct
> a ICMP packet and send it out. So what queues will this packet go through?

Locally generated packets seem to go through the tests in the output table 
first, then on to postrouting.  I didn't think the type of the locally 
generated packet mattered.  (I know UDP, TCP, or ICMP don't...)

> 	I tested it and it seems that this packet first goes to OUTPUT
> queue. is that right?

Sounds about right.

> If so, then ip stack's interface to RAW socket
> should be below the function of appending IP header to a transport layer
> datagram but above the routing decision function and also above the
> OUTPUT queue, am I right?

If you asked for a raw socket, the system won't append an IP header to it for 
you.  You asked it not to.

It has to come before the routing decision.  Otherwise how does it know where 
to send it?  (You might have more than one network interface in the machine.  
Two ethernet cards, or ethernet and ppp...)

> Thanks!
>
> Fu

Have you tried the "logging" target?  It's loads of fun for this sort of 
thing...

Rob

  reply	other threads:[~2002-02-04  0:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-03 18:45 raw socket packet and iptables Xinwen - Fu
2002-02-03 22:15 ` Rob Landley
2002-02-04  0:24   ` packet created by local raw socket Xinwen - Fu
2002-02-04  0:51     ` Rob Landley [this message]
2002-02-04  1:34       ` Andi Kleen
2002-02-04  0:33   ` SOCK_PACKET bypasses IPTABLES queue? Xinwen - Fu
2002-02-04  2:35     ` packet_socket = socket(PF_PACKET, int socket_type, int protocol); Xinwen - Fu
2002-02-04  3:29       ` Rob Landley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020204005015.DXSW15583.femail44.sdc1.sfba.home.com@there \
    --to=landley@trommello.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xinwenfu@cs.tamu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®