From: Julien Iguchi-C. <jul...@un...> - 2008-09-04 09:18:19
|
Hello Jeff, Both solutions don't satisfy my needs. - My UML machines run only in terminal mode (no X) - I don't want to use mechanisms which require root rights. I've investigated the code of uml_switch and I think a slight modification can offer a user-level sniff for UML: add a new request type (uml_switch.c) and create a simple program which connect to the uml_switch and just dump (in raw or libpcap format) in standard input the traffic. I don't think it requires a lot of works... Julien. Jeff Dike wrote: > On Mon, Sep 01, 2008 at 05:44:39PM +0200, Julien Iguchi-Cartigny wrote: >> I'm using Netkit (www.netkit.org): it's a network simulator using UML >> and I want to show packets exchanged between the UML machines. I believe >> the best way is to >> >> - use wireshark with the flag "-" to capture packets in the standard input. >> - use netcat to read the data socket of uml_switch and print to the >> standard output >> >> But uml_switch uses a ctl socket to open new port. I need a way to >> manually open a port by uml_switch to connect netcat. I don't think >> uml_switch offer command-line instruction for this, so is the best way >> to write a short program writing on the ctl socket of uml_switch ? If >> yes, what data to send to uml_switch ? > > If you want to capture UML network traffic going over uml_switch (be > it with wireshark or tcpdump - it doesn't matter), there are two basic > ways of doing it: > enable hub mode (uml_switch -hub) and then either > > sniff from a UML's eth0 (a third UML if you don't want to > interfere with the communicating UMLs), or > add a host tap device to the switch (uml_switch -tap tap<n>) > and sniff that. > > Jeff > -- Trouble-a-cat Limited |