On 11.04.2012 13:52, Daniel Shahaf wrote: > Johan Corveleyn wrote on Wed, Apr 11, 2012 at 13:43:57 +0200: >> If anyone has any suggestions on capturing network traffic on >> localhost on Windows XP ... I'm all ears. >> >> Maybe the easiest thing to do is to set up Apache on a second machine, >> so I don't have to go over the loopback device ... >> > One option: don't use the loopback device, use some other interface. > > That is, have httpd listen on 0.0.0.0 and pass --url=http://192.168.9.199 > to foo_tests.py, where 192.168.9.199 is your externally-visible > IP address.
The traffic will still get routed through the loopback device if it's on the same machine. At least I hope so, though could be that Microsoft has another "enhancement" in their TCP stack in this regard. brane@zulu:~$ ifconfig en0 en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=27<RXCSUM,TXCSUM,VLAN_MTU,TSO4> ether 34:15:9e:03:09:74 inet6 fe80::3615:9eff:fe03:974%en0 prefixlen 64 scopeid 0x4 inet 172.23.17.71 netmask 0xffffff00 broadcast 172.23.17.255 media: autoselect (1000baseT <full-duplex,flow-control>) status: active brane@zulu:~$ route get 172.23.17.71 route to: 172.23.17.71 destination: 172.23.17.71 interface: lo0 flags: <UP,HOST,DONE,STATIC> recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire 49152 49152 0 0 0 0 16384 0 -- Brane