aboutsummaryrefslogtreecommitdiffstats
path: root/slirp-android/socket.c
diff options
context:
space:
mode:
authorrich cannings <richc@google.com>2011-03-01 15:40:09 -0800
committerrich cannings <richc@google.com>2011-03-01 15:48:28 -0800
commitd952f28e527175cc3df9ebd91e739e34df2194c9 (patch)
tree7d184c1be6ce90acced09bc75d37ffb6a348338b /slirp-android/socket.c
parent68a65132248c244003b820e9ae7c60cda336ba45 (diff)
downloadexternal_qemu-d952f28e527175cc3df9ebd91e739e34df2194c9.zip
external_qemu-d952f28e527175cc3df9ebd91e739e34df2194c9.tar.gz
external_qemu-d952f28e527175cc3df9ebd91e739e34df2194c9.tar.bz2
qemu logging extensions
(1) Clear the logs upon receiving a SIGUSR1 signal (2) Add logging timestamps for network connections (3) Extended TCP redirect logs to include local src ip/port and fixed byte-ordering in log files Change-Id: I51e7293c8eeb5979a92e67f52f1c6416400d83c6
Diffstat (limited to 'slirp-android/socket.c')
-rw-r--r--slirp-android/socket.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/slirp-android/socket.c b/slirp-android/socket.c
index 285a8ef..439590a 100644
--- a/slirp-android/socket.c
+++ b/slirp-android/socket.c
@@ -578,12 +578,13 @@ sosendto(struct socket *so, struct mbuf *m)
int fport = addr_port;
if (slirp_should_net_forward(faddr, fport, &faddr, &fport)) {
- slirp_drop_log(
+ time_t timestamp = time(NULL);
+ slirp_drop_log(
"Redirected UDP: src: 0x%08lx:0x%04x org dst: 0x%08lx:0x%04x "
- "new dst: 0x%08lx:0x%04x\n",
+ "new dst: 0x%08lx:0x%04x %ld\n",
so->so_laddr_ip, so->so_laddr_port,
addr_ip, addr_port,
- faddr, fport
+ faddr, fport, timestamp
);
}
addr_ip = faddr;