public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* tcp/ip connect on demand
@ 2008-07-03 11:29 Jens-Michael Hoffmann
  2008-07-03 18:28 ` H. Peter Anvin
  0 siblings, 1 reply; 5+ messages in thread
From: Jens-Michael Hoffmann @ 2008-07-03 11:29 UTC (permalink / raw)
  To: linux-kernel


hi,

what is the right way to implement a "connect on demand" feature?
Example: user types url in firefox and presses return. Then
the system should set up network devices and proceed as usual.

Is there a hook in the kernel we can use?

Best regards

Jens-Michael Hoffmann

ps: please cc me in replies since I'am not subscribed with this email.

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

* Re: tcp/ip connect on demand
  2008-07-03 11:29 tcp/ip connect on demand Jens-Michael Hoffmann
@ 2008-07-03 18:28 ` H. Peter Anvin
  2008-07-03 19:07   ` Jan Engelhardt
  0 siblings, 1 reply; 5+ messages in thread
From: H. Peter Anvin @ 2008-07-03 18:28 UTC (permalink / raw)
  To: Jens-Michael Hoffmann; +Cc: linux-kernel

Jens-Michael Hoffmann wrote:
> hi,
> 
> what is the right way to implement a "connect on demand" feature?
> Example: user types url in firefox and presses return. Then
> the system should set up network devices and proceed as usual.
> 
> Is there a hook in the kernel we can use?

In the kernel, no.  Nor do you need one; the best place to hook into 
this is probably the name service system (so you catch it on trying to 
look up hostnames.)

Alternatively, you can set up a bridge device which you can listen to 
via a tap device; when you see traffic, you bring up the real network 
and attach it to the bridge.

	-hpa

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

* Re: tcp/ip connect on demand
  2008-07-03 18:28 ` H. Peter Anvin
@ 2008-07-03 19:07   ` Jan Engelhardt
  2008-07-03 19:15     ` H. Peter Anvin
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2008-07-03 19:07 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Jens-Michael Hoffmann, linux-kernel


On Thursday 2008-07-03 20:28, H. Peter Anvin wrote:
> Jens-Michael Hoffmann wrote:
>> hi,
>> 
>> what is the right way to implement a "connect on demand" feature?
>> Example: user types url in firefox and presses return. Then
>> the system should set up network devices and proceed as usual.
>> 
>> Is there a hook in the kernel we can use?
>
> In the kernel, no.  Nor do you need one; the best place to hook into this is
> probably the name service system (so you catch it on trying to look up
> hostnames.)
>
> Alternatively, you can set up a bridge device which you can listen to via a tap
> device; when you see traffic, you bring up the real network and attach it to
> the bridge.

There is on-demand for PPP devices; though that is probably specific
to PPP.

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

* Re: tcp/ip connect on demand
  2008-07-03 19:07   ` Jan Engelhardt
@ 2008-07-03 19:15     ` H. Peter Anvin
  2008-07-04 11:04       ` AW: " Jens-Michael Hoffmann
  0 siblings, 1 reply; 5+ messages in thread
From: H. Peter Anvin @ 2008-07-03 19:15 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Jens-Michael Hoffmann, linux-kernel

Jan Engelhardt wrote:
> On Thursday 2008-07-03 20:28, H. Peter Anvin wrote:
>> Jens-Michael Hoffmann wrote:
>>> hi,
>>>
>>> what is the right way to implement a "connect on demand" feature?
>>> Example: user types url in firefox and presses return. Then
>>> the system should set up network devices and proceed as usual.
>>>
>>> Is there a hook in the kernel we can use?
>> In the kernel, no.  Nor do you need one; the best place to hook into this is
>> probably the name service system (so you catch it on trying to look up
>> hostnames.)
>>
>> Alternatively, you can set up a bridge device which you can listen to via a tap
>> device; when you see traffic, you bring up the real network and attach it to
>> the bridge.
> 
> There is on-demand for PPP devices; though that is probably specific
> to PPP.

Yes, those monitor traffic at the PPP device port, I believe.

	-hpa

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

* AW: tcp/ip connect on demand
  2008-07-03 19:15     ` H. Peter Anvin
@ 2008-07-04 11:04       ` Jens-Michael Hoffmann
  0 siblings, 0 replies; 5+ messages in thread
From: Jens-Michael Hoffmann @ 2008-07-04 11:04 UTC (permalink / raw)
  To: H. Peter Anvin, Jan Engelhardt; +Cc: linux-kernel

>Jan Engelhardt wrote:
>> On Thursday 2008-07-03 20:28, H. Peter Anvin wrote:
>>> Jens-Michael Hoffmann wrote:
>>>> hi,
>>>>
>>>> what is the right way to implement a "connect on demand" feature?
>>>> Example: user types url in firefox and presses return. Then
>>>> the system should set up network devices and proceed as usual.
>>>>
>>>> Is there a hook in the kernel we can use?
>>> In the kernel, no.  Nor do you need one; the best place to hook into this is
>>> probably the name service system (so you catch it on trying to look up
>>> hostnames.)
>>>
>>> Alternatively, you can set up a bridge device which you can listen to via a tap
>>> device; when you see traffic, you bring up the real network and attach it to
>>> the bridge.
>> 
>> There is on-demand for PPP devices; though that is probably specific
>> to PPP.

> Yes, those monitor traffic at the PPP device port, I believe.

thanks for the help guys, that looks like what we are looking for.

Best regards

Jens-Michael Hoffmann

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

end of thread, other threads:[~2008-07-04 11:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-03 11:29 tcp/ip connect on demand Jens-Michael Hoffmann
2008-07-03 18:28 ` H. Peter Anvin
2008-07-03 19:07   ` Jan Engelhardt
2008-07-03 19:15     ` H. Peter Anvin
2008-07-04 11:04       ` AW: " Jens-Michael Hoffmann

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