kernel module to generate UDP & TCP traffic?
Subsystems (2)
I'm considering writing a kernel module that will be used to generate and receive copious amounts of Ethernet, UDP, and TCP traffic. I would prefer to tweak/use an existing tool if any is available. Any suggestions?
Thanks,
Ben
Signature · 3 lines
Ben Greear <[email protected]> <Ben_Greear AT excite.com> President of Candela Technologies Inc http://www.candelatech.com ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear
net/core/pg3.c
Quoted 1 line · David S. Miller
net/core/pg3.c
It appears to be net/core/pktgen.c, but I found it :)
After reading through it a few times, I have a few questions:
It appears I can interject spacing between packets, and it also appears that it will basically busy-spin while waiting. So, can I assume it would be a pretty bad idea to configure large times between packet transmits? (ie does the nanosleep consume the machine?)
If I wanted this thing to send a packet that would be routed, I would just set the MAC of the router and the IP of the eventualy destination, correct?
It appears impossible to run traffic on two interfaces simultaneously with this module, is that true?
Would you accept a patch that turned many of these counters into 64bit counters?
Is there any similar module that can receive these packets on the other side and verify a correct packet was received?
Would you accept a patch that placed timestamps and sequence counters in the packets for latency detection and packet-drop detection?
Thanks,
Ben
Signature · 3 lines
Ben Greear <[email protected]> <Ben_Greear AT excite.com> President of Candela Technologies Inc http://www.candelatech.com ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear
Quoted 7 lines · Ben Greear
I'm considering writing a kernel module that will be used to generate and receive copious amounts of Ethernet, UDP, and TCP traffic. I would prefer to tweak/use an existing tool if any is available. Any suggestions?
Thanks,
Ben
How about using the tun/tap devices in the 2.4. kernels which can RX/TX Ethernet frames from/to userspace?
Signature · 8 lines
I'm an angel!!! Honest!
The horns are just there to hold the halo up straight.
^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^
Amit Kucheria
EECS Grad. Research Assistant
University of Kansas @ Lawrence
(R)+1-(785)-830 8521 ||| (O)+1-(785)-864 7774
____________________________________________________Quoted 8 lines · Amit Kucheria
Quoted 5 lines · Ben Greear
I'm considering writing a kernel module that will be used to generate and receive copious amounts of Ethernet, UDP, and TCP traffic. I would prefer to tweak/use an existing tool if any is available. Any suggestions?
Quoted 6 lines
Quoted 3 lines
Thanks,
BenHow about using the tun/tap devices in the 2.4. kernels which can RX/TX Ethernet frames from/to userspace?
I can already send/rcv packets with raw sockets, but the problem is that causes coppies to/from user space, which not only decreases throughput, but adds considerable latency. If I can run the generation down in the kernel, it will run much faster.
Quoted 4 lines
Signature · 3 lines
Ben Greear <[email protected]> <Ben_Greear AT excite.com> President of Candela Technologies Inc http://www.candelatech.com ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear
injecting packets
In reply to Amit KucheriaHi.
I am trying to write a module that takes Ethernet packets from the user domain, and injects it into the proper place ( which I think is the sk_buffers ), so that to the IP, TCP layer, the packets look as if coming from the Ethernet device. Can someone please suggest me which files to look into, and which structs to handle, for getting this done. Also, I want to do the reverse task, i.e. take some particular packets ( say which come from a specific port ) from sk_buffers and send it to user space.
Please assume that this silly looking Rx/Tx has some importance :)
Regards.
Vasu.
III yr EE student.
RE: injecting packets
try dev_queue_xmit in dev.c.
or u can see chapter 13 of this...
http://www.cs.unh.edu/cnrg/gherrin/linux-net.html
ENJOY!!!
Avni :-)
-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Vasu
Sent: Tuesday, 16 April 2002 12:10 PM
To: linux-net
Subject: injecting packets
Hi.
I am trying to write a module that takes Ethernet packets from the user domain, and injects it into the proper place ( which I think is the sk_buffers ), so that to the IP, TCP layer, the packets look as if coming from the Ethernet device. Can someone please suggest me which files to look into, and which structs to handle, for getting this done. Also, I want to do the reverse task, i.e. take some particular packets ( say which come from a specific port ) from sk_buffers and send it to user space.
Please assume that this silly looking Rx/Tx has some importance :)
Regards.
Vasu.
III yr EE student.
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
***************************************************************************
This message is proprietary to Future Software Limited (FSL) and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended.
If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. FSL accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus.
***************************************************************************
Re: injecting packets
In reply to VasuIt sounds like you want the Universal Tunnel/Tap driver, that lives in drivers/net/tun.c
Quoted 23 lines · Vasu
Hi.
I am trying to write a module that takes Ethernet packets from the user domain, and injects it into the proper place ( which I think is the
sk_buffers), so that to the IP, TCP layer, the packets look as if coming from the Ethernet device. Can someone please suggest me which files to look into, and which structs to handle, for getting this done. Also, I want to do the reverse task, i.e. take some particular packets ( say which come from a specific port ) fromsk_buffersand send it to user space.Please assume that this silly looking Rx/Tx has some importance :)
Regards.
Vasu.
III yr EE student.-
To unsubscribe from this list: send the line "unsubscribe linux-net" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html