* 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 16:50 Injecting packets into the kernel Andreas Kinzler
@ 2001-12-22 16:54 ` Andreas Steinmetz
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Steinmetz @ 2001-12-22 16:54 UTC (permalink / raw)
To: Andreas Kinzler; +Cc: linux-kernel
You can use a raw socket:
socket(AF_INET,SOCK_RAW,IPPROTO_RAW);
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.
>
> Andreas
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
Andreas Steinmetz
D.O.M. Datenverarbeitung GmbH
^ 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
* Re: Injecting packets into the kernel
2001-12-22 18:26 Andreas Kinzler
@ 2001-12-22 20:57 ` Jeff Dike
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Dike @ 2001-12-22 20:57 UTC (permalink / raw)
To: Andreas Kinzler; +Cc: linux-kernel
akinzler@gmx.de said:
> 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).
Jeff
^ 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, 0 replies; 6+ messages in thread
From: Jeff Dike @ 2001-12-22 22:11 UTC (permalink / raw)
To: Andreas Kinzler; +Cc: linux-kernel
akinzler@gmx.de said:
> but the packets written to such a device have no effect, they do not
> seem to make their way through the kernel.
Hmmm, well that's exactly what UML does and its packets are treated in
exactly the way you seem to want. They are treated as coming from a totally
different machine (although UML, as a complete machine, has a complete network
stack, network devices with their own IP addresses, etc, so you might just
not be making your packets look "remote" enough).
Jeff
^ 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