[Click] Generating packets in ns-3-click
Jesse Brown
jbrown at atl.lmco.com
Fri Sep 21 15:22:34 EDT 2012
All:
Note: I've also posted this to the ns-3-users list but I've got no
response so far.
I am running ns-3 with click integration and I'd like to generate
packets from within the click graph instead of from within ns-3
components. I'm having trouble, however, getting the packets to inject
properly into the simulation. Here is my approach:
From within a click element I create a new packet with Packet::make.
Source IP is assigned the node that is creating the packet and
destination is the broadcast address 10.1.255.255. If I place a Print
element in line after this in the router I see the following:
...: 36 | 45000024 00000000 40110000 0a010101 0a01ffff 02ba02ba
00100000 31302e31 2e312e31
which looks reasonable. I also have UDP traffic being generated from an
ns3::UdpSocketFactory. That traffic looks like
...: 540 | 4500021c 02610000 40110000 0a010101 0a010102 c001c350
02080000 00000000 00000000
So the format looks reasonable but the click packet hits the wire as
some LLC protocol (presumably from lack of proper header application)
while the ns-3 packet goes out as a proper UDP packet. Every packet
follows the same path out of the router.
I tried to modify simclick_simpacketinfo within the packet to properly
represent the simulation id but with no luck.
Is there some process by which packets generated within click can be
incorporated into a running simulation?
Thank you,
Jesse
More information about the click
mailing list