Skip to contentSkip to conversation

Sending IP datagrams

DISCUSSION Josef E. Galea 3 participants 5 messages Mar 7, 2005 – Mar 8, 2005

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 3 lines · Josef E. Galea

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

#2 lore raw
Quoted 12 lines · Scott Feldman
Quoted 3 lines · Josef E. Galea

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

#3 lore raw
Quoted 1 line · Josef E. Galea

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

#4 lore raw
In reply to Josef E. Galea
Quoted 11 lines · Josef E. Galea
Quoted 9 lines · Scott Feldman
Quoted 3 lines · Josef E. Galea

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

Quoted 5 lines
Quoted 4 lines

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

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com