From 3bd556fd59f403d962ea9a203c46451332b0ee46 Mon Sep 17 00:00:00 2001 From: Wenji Huang Date: Tue, 22 Dec 2009 14:25:00 +0800 Subject: Update tapset related to struct inet_sock for 2.6.33 * tapset/inet_sock.stp : Add prefix "inet_" to field. * tapset/ip.stp : Ditto. * tapset/tcp.stp : Ditto. * tapset/tcpmib.stp : Ditto. --- tapset/ip.stp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tapset/ip.stp') diff --git a/tapset/ip.stp b/tapset/ip.stp index 299d88d2..ec17b7c0 100644 --- a/tapset/ip.stp +++ b/tapset/ip.stp @@ -26,13 +26,21 @@ function ip_ntop:string (addr:long) /* return the source IP address for a given sock */ function __ip_sock_saddr:long (sock:long) { +%(kernel_v < "2.6.33" %? return @cast(sock, "inet_sock")->saddr +%: + return @cast(sock, "inet_sock")->inet_saddr +%) } /* return the destination IP address for a given sock */ function __ip_sock_daddr:long (sock:long) { +%(kernel_v < "2.6.33" %? return @cast(sock, "inet_sock")->daddr +%: + return @cast(sock, "inet_sock")->inet_daddr +%) } /* Get the IP header for recent (> 2.6.21) kernels */ -- cgit