summaryrefslogtreecommitdiffstats
path: root/tapset/tcpmib.stp
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-12-23 09:14:02 +0100
committerTim Moore <timoore@redhat.com>2009-12-23 09:14:02 +0100
commit69ce6c79dbcb2cec2d1245935ef20bf832ffe70a (patch)
tree0b6aea71ef4f3ca5c797494d062819bfba63e7f7 /tapset/tcpmib.stp
parent72195f6b17c0ed2e508c58bf3cadd5b9dc4e28ac (diff)
parent0ee3adb42f2f6d8bffe177e77a415b3a74f3a777 (diff)
downloadsystemtap-steved-69ce6c79dbcb2cec2d1245935ef20bf832ffe70a.tar.gz
systemtap-steved-69ce6c79dbcb2cec2d1245935ef20bf832ffe70a.tar.xz
systemtap-steved-69ce6c79dbcb2cec2d1245935ef20bf832ffe70a.zip
Merge remote branch 'origin/master'
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();
%}