summaryrefslogtreecommitdiffstats
path: root/tapset/aux_syscalls.stp
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-07-13 11:23:32 -0400
committerDave Brolley <brolley@redhat.com>2009-07-13 11:23:32 -0400
commitee03b2aaf05b2ffed68f2023c8ea61a6ebb5d0ee (patch)
tree2654459de4f19ade39c40f59d2bc4f368c24764f /tapset/aux_syscalls.stp
parent5739030625d3f1697c264e3d8f04e932d1e0773d (diff)
parent4a4edc21a14792a4cc240b601912734027945ae8 (diff)
downloadsystemtap-steved-ee03b2aaf05b2ffed68f2023c8ea61a6ebb5d0ee.tar.gz
systemtap-steved-ee03b2aaf05b2ffed68f2023c8ea61a6ebb5d0ee.tar.xz
systemtap-steved-ee03b2aaf05b2ffed68f2023c8ea61a6ebb5d0ee.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Conflicts: main.cxx
Diffstat (limited to 'tapset/aux_syscalls.stp')
-rw-r--r--tapset/aux_syscalls.stp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp
index 9cb7a3df..9347e46f 100644
--- a/tapset/aux_syscalls.stp
+++ b/tapset/aux_syscalls.stp
@@ -292,6 +292,9 @@ function _struct_sockaddr_u:string(uaddr:long, len:long)
#define DADDR (&inet->daddr)
#endif
+// Use kernel builtin instead of picking up user space ntohs (function).
+#define _stp_ntohs be16_to_cpu
+
//FIXME. Not done yet.
char *str = THIS->__retvalue;
const int strlen = MAXSTRINGLEN;
@@ -301,7 +304,7 @@ function _struct_sockaddr_u:string(uaddr:long, len:long)
struct sockaddr_in *sin = (struct sockaddr_in *)buf;
const unsigned char *addr = (unsigned char *)&sin->sin_addr;
snprintf(str, strlen, "{AF_INET, %d.%d.%d.%d, %d}",
- addr[0], addr[1], addr[2], addr[3], ntohs(sin->sin_port));
+ addr[0], addr[1], addr[2], addr[3], _stp_ntohs(sin->sin_port));
}
else if ((sa->sa_family == AF_UNIX)&&(len == sizeof(struct sockaddr_un)))
{
@@ -318,7 +321,7 @@ function _struct_sockaddr_u:string(uaddr:long, len:long)
// FIXME. Address is probably not correctly displayed
struct sockaddr_in6 *sin = (struct sockaddr_in6 *)buf;
snprintf(str, strlen, "{AF_INET6, %016llx, %d}",
- *(long long *)&sin->sin6_addr, ntohs(sin->sin6_port));
+ *(long long *)&sin->sin6_addr, _stp_ntohs(sin->sin6_port));
}
else if ((sa->sa_family == AF_PACKET)&&(len == sizeof(struct sockaddr_ll)))
{