summaryrefslogtreecommitdiffstats
path: root/tapset/tcpmib.stp
diff options
context:
space:
mode:
authorWenji Huang <wenji.huang@oracle.com>2009-12-22 14:25:00 +0800
committerWenji Huang <wenji.huang@oracle.com>2009-12-22 14:54:20 +0800
commit3bd556fd59f403d962ea9a203c46451332b0ee46 (patch)
treef9c021608520afb89caac421af328076d3c46cff /tapset/tcpmib.stp
parentd5d6f6f18b4ed3e2cd02b6a6a0740938582df89b (diff)
downloadsystemtap-steved-3bd556fd59f403d962ea9a203c46451332b0ee46.tar.gz
systemtap-steved-3bd556fd59f403d962ea9a203c46451332b0ee46.tar.xz
systemtap-steved-3bd556fd59f403d962ea9a203c46451332b0ee46.zip
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.
Diffstat (limited to 'tapset/tcpmib.stp')
-rw-r--r--tapset/tcpmib.stp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tapset/tcpmib.stp b/tapset/tcpmib.stp
index aba7837b..cfaaf9c7 100644
--- a/tapset/tcpmib.stp
+++ b/tapset/tcpmib.stp
@@ -53,7 +53,11 @@ function tcpmib_get_state:long (sk:long)
function tcpmib_local_addr:long(sk:long)
%{ /* pure */
struct inet_sock *inet = (struct inet_sock *) (long) THIS->sk;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
+ THIS->__retvalue = ntohl(kread(&(inet->inet_saddr)));
+#else
THIS->__retvalue = ntohl(kread(&(inet->saddr)));
+#endif
CATCH_DEREF_FAULT();
%}
@@ -67,7 +71,11 @@ function tcpmib_local_addr:long(sk:long)
function tcpmib_remote_addr:long(sk:long)
%{ /* pure */
struct inet_sock *inet = (struct inet_sock *) (long) THIS->sk;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
+ THIS->__retvalue = ntohl(kread(&(inet->inet_daddr)));
+#else
THIS->__retvalue = ntohl(kread(&(inet->daddr)));
+#endif
CATCH_DEREF_FAULT();
%}
@@ -81,7 +89,11 @@ function tcpmib_remote_addr:long(sk:long)
function tcpmib_local_port:long(sk:long)
%{ /* pure */
struct inet_sock *inet = (struct inet_sock *) (long) THIS->sk;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
+ THIS->__retvalue = ntohs(kread(&(inet->inet_sport)));
+#else
THIS->__retvalue = ntohs(kread(&(inet->sport)));
+#endif
CATCH_DEREF_FAULT();
%}
@@ -95,7 +107,11 @@ function tcpmib_local_port:long(sk:long)
function tcpmib_remote_port:long(sk:long)
%{ /* pure */
struct inet_sock *inet = (struct inet_sock *) (long) THIS->sk;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
+ THIS->__retvalue = ntohs(kread(&(inet->inet_dport)));
+#else
THIS->__retvalue = ntohs(kread(&(inet->dport)));
+#endif
CATCH_DEREF_FAULT();
%}