public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Injecting packets into the kernel
@ 2001-12-22 16:50 Andreas Kinzler
  2001-12-22 16:54 ` Andreas Steinmetz
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Kinzler @ 2001-12-22 16:50 UTC (permalink / raw)
  To: linux-kernel

I am trying to fix a problem in diald (demand dialing tool). The problem is that
somewhen you need to resubmit IP packets to the kernel that were buffered while the
link (PPP in most cases) was down. However, a bit of debugging showed that the method
used in diald does not work. You cannot submit to ppp0 directly because of masq/forwaring
issues. Can somebody give me some hints how to submit packets from a user mode programm.

Andreas


^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: Injecting packets into the kernel
@ 2001-12-22 18:26 Andreas Kinzler
  2001-12-22 20:57 ` Jeff Dike
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Kinzler @ 2001-12-22 18:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: ast

> You can use a raw socket:
> socket(AF_INET,SOCK_RAW,IPPROTO_RAW);

Just tried it. It really submits the packets. However, for the kernel they
are now LOCAL packets, which are not masq'ed. To make that work, they need
to look "remote" (means: received by a device). Any ideas?

> On 22-Dec-2001 Andreas Kinzler wrote:
>> I am trying to fix a problem in diald (demand dialing tool). The problem
>> is
>> that
>> somewhen you need to resubmit IP packets to the kernel that were buffered
>> while the
>> link (PPP in most cases) was down. However, a bit of debugging showed
>> that
>> the method
>> used in diald does not work. You cannot submit to ppp0 directly because
>> of
>> masq/forwaring
>> issues. Can somebody give me some hints how to submit packets from a user
>> mode programm.


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: Injecting packets into the kernel
@ 2001-12-22 20:22 Andreas Kinzler
  2001-12-22 22:11 ` Jeff Dike
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Kinzler @ 2001-12-22 20:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: jdike

>> However, for the kernel they are now LOCAL packets, which are not
>> masq'ed. To make that work, they need to look "remote" (means:
>> received by a device). Any ideas?
> Use a TUN/TAP device (or ethertap on 2.2).

That is exactly what diald does, but the packets written to such a device have
no effect, they do not seem to make their way through the kernel.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-12-22 20:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-22 16:50 Injecting packets into the kernel Andreas Kinzler
2001-12-22 16:54 ` Andreas Steinmetz
  -- strict thread matches above, loose matches on Subject: below --
2001-12-22 18:26 Andreas Kinzler
2001-12-22 20:57 ` Jeff Dike
2001-12-22 20:22 Andreas Kinzler
2001-12-22 22:11 ` Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox