public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Sending IP datagrams
@ 2005-03-07 23:48 Josef E. Galea
  2005-03-08  0:42 ` Scott Feldman
  0 siblings, 1 reply; 5+ messages in thread
From: Josef E. Galea @ 2005-03-07 23:48 UTC (permalink / raw)
  To: linux-kernel

Hi,

Is there any way, other than socket buffers, to send IP datagrams from a 
kernel module? If yes, can you please point me to some good tutorial or 
sample code

Thanks
Josef Galea

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

* Re: Sending IP datagrams
  2005-03-07 23:48 Sending IP datagrams Josef E. Galea
@ 2005-03-08  0:42 ` Scott Feldman
  2005-03-08  0:53   ` Josef E. Galea
  0 siblings, 1 reply; 5+ messages in thread
From: Scott Feldman @ 2005-03-08  0:42 UTC (permalink / raw)
  To: Josef E. Galea; +Cc: linux-kernel


On Mar 7, 2005, at 3:48 PM, Josef E. Galea wrote:

> Hi,
>
> Is there any way, other than socket buffers, to send IP datagrams from 
> a kernel module? If yes, can you please point me to some good tutorial 
> or sample code

See net/core/pktgen.c for an example.

-scott


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

* Re: Sending IP datagrams
  2005-03-08  0:42 ` Scott Feldman
@ 2005-03-08  0:53   ` Josef E. Galea
  2005-03-08  1:15     ` Scott Feldman
  2005-03-08  1:29     ` Ben Greear
  0 siblings, 2 replies; 5+ messages in thread
From: Josef E. Galea @ 2005-03-08  0:53 UTC (permalink / raw)
  To: Scott Feldman; +Cc: linux-kernel

Scott Feldman wrote:

>
> On Mar 7, 2005, at 3:48 PM, Josef E. Galea wrote:
>
>> Hi,
>>
>> Is there any way, other than socket buffers, to send IP datagrams 
>> from a kernel module? If yes, can you please point me to some good 
>> tutorial or sample code
>
>
> See net/core/pktgen.c for an example.
>
> -scott
>
AFAIK that module uses socket buffers (struct sk_buff) to send the 
packets. I was asking whether there was another way to send the IP 
datagrams.

Thanks for your reply :)

Josef

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

* Re: Sending IP datagrams
  2005-03-08  0:53   ` Josef E. Galea
@ 2005-03-08  1:15     ` Scott Feldman
  2005-03-08  1:29     ` Ben Greear
  1 sibling, 0 replies; 5+ messages in thread
From: Scott Feldman @ 2005-03-08  1:15 UTC (permalink / raw)
  To: Josef E. Galea; +Cc: linux-kernel


On Mar 7, 2005, at 4:53 PM, Josef E. Galea wrote:

> AFAIK that module uses socket buffers (struct sk_buff) to send the 
> packets. I was asking whether there was another way to send the IP 
> datagrams.

Well the network device driver wants a sk_buff (hard_start_xmit) so 
you'd need to modify the network device driver to accept something else 
if you don't want to use sk_buffs.  What's wrong with sk_buffs for your 
problem?

-scott


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

* Re: Sending IP datagrams
  2005-03-08  0:53   ` Josef E. Galea
  2005-03-08  1:15     ` Scott Feldman
@ 2005-03-08  1:29     ` Ben Greear
  1 sibling, 0 replies; 5+ messages in thread
From: Ben Greear @ 2005-03-08  1:29 UTC (permalink / raw)
  To: Josef E. Galea; +Cc: Scott Feldman, linux-kernel

Josef E. Galea wrote:
> Scott Feldman wrote:
> 
>>
>> On Mar 7, 2005, at 3:48 PM, Josef E. Galea wrote:
>>
>>> Hi,
>>>
>>> Is there any way, other than socket buffers, to send IP datagrams 
>>> from a kernel module? If yes, can you please point me to some good 
>>> tutorial or sample code
>>
>>
>>
>> See net/core/pktgen.c for an example.
>>
>> -scott
>>
> AFAIK that module uses socket buffers (struct sk_buff) to send the 
> packets. I was asking whether there was another way to send the IP 
> datagrams.

The sk_buf is the thing you send to network drivers, it doesn't get
any more basic unless you are hacking a particular driver and DMA'ing memory
or something like that...

Maybe you should explain what you are really trying to do?

Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


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

end of thread, other threads:[~2005-03-08  1:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-07 23:48 Sending IP datagrams Josef E. Galea
2005-03-08  0:42 ` Scott Feldman
2005-03-08  0:53   ` Josef E. Galea
2005-03-08  1:15     ` Scott Feldman
2005-03-08  1:29     ` Ben Greear

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