* kernel module to generate UDP & TCP traffic?
@ 2002-04-15 23:36 Ben Greear
2002-04-15 23:43 ` David S. Miller
2002-04-15 23:43 ` Amit Kucheria
0 siblings, 2 replies; 8+ messages in thread
From: Ben Greear @ 2002-04-15 23:36 UTC (permalink / raw)
To: linux-net
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
--
Ben Greear <greearb@candelatech.com> <Ben_Greear AT excite.com>
President of Candela Technologies Inc http://www.candelatech.com
ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kernel module to generate UDP & TCP traffic?
2002-04-15 23:36 kernel module to generate UDP & TCP traffic? Ben Greear
@ 2002-04-15 23:43 ` David S. Miller
2002-04-16 0:25 ` Ben Greear
2002-04-15 23:43 ` Amit Kucheria
1 sibling, 1 reply; 8+ messages in thread
From: David S. Miller @ 2002-04-15 23:43 UTC (permalink / raw)
To: greearb; +Cc: linux-net
net/core/pg3.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kernel module to generate UDP & TCP traffic?
2002-04-15 23:36 kernel module to generate UDP & TCP traffic? Ben Greear
2002-04-15 23:43 ` David S. Miller
@ 2002-04-15 23:43 ` Amit Kucheria
2002-04-15 23:52 ` Ben Greear
2002-04-16 6:39 ` injecting packets Vasu
1 sibling, 2 replies; 8+ messages in thread
From: Amit Kucheria @ 2002-04-15 23:43 UTC (permalink / raw)
To: Ben Greear; +Cc: linux-net
On Mon, 15 Apr 2002, Ben Greear wrote:
> 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?
http://vtun.sourceforge.net
--
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
____________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kernel module to generate UDP & TCP traffic?
2002-04-15 23:43 ` Amit Kucheria
@ 2002-04-15 23:52 ` Ben Greear
2002-04-16 6:39 ` injecting packets Vasu
1 sibling, 0 replies; 8+ messages in thread
From: Ben Greear @ 2002-04-15 23:52 UTC (permalink / raw)
To: Amit Kucheria; +Cc: linux-net
Amit Kucheria wrote:
> On Mon, 15 Apr 2002, Ben Greear wrote:
>
>
>>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?
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.
>
> http://vtun.sourceforge.net
>
>
--
Ben Greear <greearb@candelatech.com> <Ben_Greear AT excite.com>
President of Candela Technologies Inc http://www.candelatech.com
ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kernel module to generate UDP & TCP traffic?
2002-04-15 23:43 ` David S. Miller
@ 2002-04-16 0:25 ` Ben Greear
0 siblings, 0 replies; 8+ messages in thread
From: Ben Greear @ 2002-04-16 0:25 UTC (permalink / raw)
To: David S. Miller; +Cc: linux-net
David S. Miller wrote:
> 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
--
Ben Greear <greearb@candelatech.com> <Ben_Greear AT excite.com>
President of Candela Technologies Inc http://www.candelatech.com
ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear
^ permalink raw reply [flat|nested] 8+ messages in thread
* injecting packets
2002-04-15 23:43 ` Amit Kucheria
2002-04-15 23:52 ` Ben Greear
@ 2002-04-16 6:39 ` Vasu
2002-04-16 8:15 ` Avniwb
2002-04-16 22:27 ` Casey Carter
1 sibling, 2 replies; 8+ messages in thread
From: Vasu @ 2002-04-16 6:39 UTC (permalink / raw)
To: linux-net
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: injecting packets
2002-04-16 6:39 ` injecting packets Vasu
@ 2002-04-16 8:15 ` Avniwb
2002-04-16 22:27 ` Casey Carter
1 sibling, 0 replies; 8+ messages in thread
From: Avniwb @ 2002-04-16 8:15 UTC (permalink / raw)
To: 'Vasu', 'linux-net'
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: linux-net-owner@vger.kernel.org
[mailto:linux-net-owner@vger.kernel.org]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 majordomo@vger.kernel.org
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.
***************************************************************************
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: injecting packets
2002-04-16 6:39 ` injecting packets Vasu
2002-04-16 8:15 ` Avniwb
@ 2002-04-16 22:27 ` Casey Carter
1 sibling, 0 replies; 8+ messages in thread
From: Casey Carter @ 2002-04-16 22:27 UTC (permalink / raw)
To: Vasu; +Cc: linux-net
It sounds like you want the Universal Tunnel/Tap driver, that lives in
drivers/net/tun.c
Vasu wrote:
>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 majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-04-16 22:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-15 23:36 kernel module to generate UDP & TCP traffic? Ben Greear
2002-04-15 23:43 ` David S. Miller
2002-04-16 0:25 ` Ben Greear
2002-04-15 23:43 ` Amit Kucheria
2002-04-15 23:52 ` Ben Greear
2002-04-16 6:39 ` injecting packets Vasu
2002-04-16 8:15 ` Avniwb
2002-04-16 22:27 ` Casey Carter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).