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/tcp.stp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tapset/tcp.stp') diff --git a/tapset/tcp.stp b/tapset/tcp.stp index 2c5dce7e..094161c9 100644 --- a/tapset/tcp.stp +++ b/tapset/tcp.stp @@ -76,7 +76,11 @@ function tcp_ts_get_info_state:long(sock:long) /* return the TCP destination port for a given sock */ function __tcp_sock_dport:long (sock:long){ +%(kernel_v < "2.6.33" %? return @cast(sock, "inet_sock")->dport +%: + return @cast(sock, "inet_sock")->inet_dport +%) } /* returns the TCP header for recent (<2.6.21) kernel */ @@ -145,7 +149,11 @@ function __tcp_skb_dport:long (tcphdr){ /* return the TCP source port for a given sock */ function __tcp_sock_sport:long (sock:long){ +%(kernel_v < "2.6.33" %? return @cast(sock, "inet_sock")->sport +%: + return @cast(sock, "inet_sock")->inet_sport +%) } global sockstate[13], sockstate_init_p -- cgit