diff options
author | Tim Moore <timoore@redhat.com> | 2009-12-23 09:14:02 +0100 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-12-23 09:14:02 +0100 |
commit | 69ce6c79dbcb2cec2d1245935ef20bf832ffe70a (patch) | |
tree | 0b6aea71ef4f3ca5c797494d062819bfba63e7f7 /tapset/ip.stp | |
parent | 72195f6b17c0ed2e508c58bf3cadd5b9dc4e28ac (diff) | |
parent | 0ee3adb42f2f6d8bffe177e77a415b3a74f3a777 (diff) | |
download | systemtap-steved-69ce6c79dbcb2cec2d1245935ef20bf832ffe70a.tar.gz systemtap-steved-69ce6c79dbcb2cec2d1245935ef20bf832ffe70a.tar.xz systemtap-steved-69ce6c79dbcb2cec2d1245935ef20bf832ffe70a.zip |
Merge remote branch 'origin/master'
Diffstat (limited to 'tapset/ip.stp')
-rw-r--r-- | tapset/ip.stp | 8 |
1 files changed, 8 insertions, 0 deletions
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 */ |