Hi, This psuedo-ibss a little modified version, your click is up to date.
You are getting this duplicated packet because physical device (ath0) doesnt receive the correct ack, and then it does 11 retrys. please revise this line: define($MAC_ADR 00:1B:11:BB:F1:78) //change, use u real hw mac This way when sta2 recives the packet its firmware automatically generates the correct ack to sta1, and viceversa. The drivers in monitor mode "needs" correct encapsulated raw frames: Radio header + wifi header + llc header + ip In fact, as all the headers are procesed by click, u can made your custom headers, but the driver really needs at least a correct radio header, this header describes some physical parameters that driver and firmware needs. regards Javier Sánchez On Thu, Sep 3, 2009 at 3:56 PM, <[email protected]> wrote: > Javier, Harald - Thanks, you guys rock! > > The psuedo-ibss code works a treat, thanks! The version in my > /click/conf/wifi seems to be out-of-date (although my click should be > current), so I really appreciate having some working sample code as a > starting point. > > But when I try to ping across the psuedo-ibss connection, I get > duplicate packets (see ping log below). Yet SSH seems to work fine. > Any idea why this would be? > > I am still battling to understand why I have to encapsulate my frames > and can't send them RAW. As far as I can see, I can deliver RAW > frames across the network OK ... I just seem to have problems > forwarding them to Linux. Oh well... by this time next week I'll have > twice the Click experience I have now; I'll learn. :-) > > Gratefully, > - Kevin > > PING 192.168.1.31 (192.168.1.31) 56(84) bytes of data. > 64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=1.68 ms > 64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=2.41 ms (DUP!) > 64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=3.18 ms (DUP!) > 64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=5.80 ms (DUP!) > 64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=6.58 ms (DUP!) > 64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=7.80 ms (DUP!) > 64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=9.33 ms (DUP!) > 64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=10.4 ms (DUP!) > 64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=11.5 ms (DUP!) > 64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=12.1 ms (DUP!) > 64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=14.6 ms (DUP!) > 64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=15.4 ms (DUP!) > > > Quoting Javier Sánchez <[email protected]>: > >> hi, >> >> at click/conf/wifi you have some click examples. As Harald says u have >> to pull & push the correct headers into the packet. >> >> u can begin with this basic pseudo-ibss script. >> >> regards >> Javier Sánchez >> >> >> >> // *** CONFIGURATION *** >> >> define($IP_ADR 6.0.0.1/8) >> define($MAC_ADR 00:1B:11:BB:F1:78) //change, use u real hw mac >> define($BSSID 00:00:00:00:00:00) >> define($TXPOWER 63) >> define($TXRATE 22) >> define($DEVICE ath0) >> >> >> // *** SEND *** >> >> FromHost(fake1, $IP_ADR, ETHER $MAC_ADR) >> -> Queue() >> -> WifiEncap(0, $BSSID) >> -> SetTXPower($TXPOWER) >> -> SetTXRate($TXRATE) >> -> RadiotapEncap() >> -> ToDevice($DEVICE); >> >> >> >> // *** RECEIVE *** >> >> FromDevice($DEVICE, PROMISC true, OUTBOUND true) >> -> RadiotapDecap() >> -> FilterPhyErr() >> -> FilterTX() >> -> WifiDupeFilter() >> -> WifiDecap() >> -> SetPacketType(HOST) >> -> ToHost(fake1); >> > > > > _______________________________________________ > click mailing list > [email protected] > https://amsterdam.lcs.mit.edu/mailman/listinfo/click > _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
