Solution for tutorial 2 - sender

From WirelessAfrica
Jump to navigation Jump to search
Change the $SRC and $DST to suite the IP addresses of your nodes
define($DEV ath0, $SRC 172.30.1.74, $DST 172.30.1.75)

InfiniteSource("Goodbye World", 1 )
 ->UDPIPEncap($SRC, 4001, $DST, 4002)
 ->IPPrint("my packet")
 ->arpq :: ARPQuerier($DEV)
 ->q :: Queue
 ->ToDevice($DEV)

FromDevice($DEV)
 -> c :: Classifier(12/0806 20/0002)
 -> [1] arpq

arpq[1] -> q