Howto:Record, analyze and replay multiplayer flights with network tools: Difference between revisions

Jump to navigation Jump to search
(→‎tcprewrite magic: start of the paractical exemple)
Line 84: Line 84:
* the computer we will use to send the recorded packets: mac address 99:88:77:66:55:44, ip address 192.168.1.17
* the computer we will use to send the recorded packets: mac address 99:88:77:66:55:44, ip address 192.168.1.17


It's up to you to find your mac and ip address, you can use wireshark on some network traffic between the 2, or ifconfig on linux etc...
It's up to you to find your mac and ip address, you can use wireshark on some network traffic between the 2, or ifconfig on linux etc...<br>
here's the "magic" line:
 
tcprewrite -C --enet-smac=99:88:77:66:55:44 --enet-dmac=00:11:22:33:44:55
-S 0.0.0.0/0:192.168.1.17 -D 0.0.0.0/0:192.168.1.12 -i recorded.cap -o readytosend.cap
 
where:
 
* -C force a checksum recalculation, if not the packets arenot valid andarenot sent
* --enet-smac give the mac address of the sender
* --enet-dmac same with the receiver
* -S change source ip address
* -D idem destination
* -i input file (the previously recorded flight)
* -o output file
 
tcprewrite don't need to be root to be used, but using tcpreplay to see again the recorded traffic need a root access to use the network interface.<br>
Now we start FG, with mp protocol enabled by sending to a server (can be a mpserver, or the address of a valid local host on your network, eg 192.168.0.17). Finally we start replaying the flight, on the dedicaced PC:
tcpreplay -i eth0 readytosend.cap
 
be sure to use the correct name for the network interface, ifconfig/ipconfig is your friend here!
 
if you are to lazy to make a record yourself, you can use this [http://janodesbois.free.fr/flightgear/cap_files/vercors_test.cap.bz2 flight in french vercors] (3.4M), starting at LFLU with the ufo or a plane in the 400+ kts, and follow the leader F-4N in a vercors trip. It's better with a detailled scenery like "la france d'el maxo" or une scene 850. Just decompress it, and use tcprewrite to match your config.
 




434

edits

Navigation menu