diff options
author | fche <fche> | 2007-10-05 02:19:35 +0000 |
---|---|---|
committer | fche <fche> | 2007-10-05 02:19:35 +0000 |
commit | bfb724429e55072f53e82f3d4037f2b7e80f1203 (patch) | |
tree | b6e0cc03a0483c1ed4de4957dfb998eeb1de8a85 /tapset | |
parent | 0986ac384c966a2c789d7a0fd63fa190029143be (diff) | |
download | systemtap-steved-bfb724429e55072f53e82f3d4037f2b7e80f1203.tar.gz systemtap-steved-bfb724429e55072f53e82f3d4037f2b7e80f1203.tar.xz systemtap-steved-bfb724429e55072f53e82f3d4037f2b7e80f1203.zip |
rhbz 319611: htonl and friends in tapset
2007-10-04 Frank Ch. Eigler <fche@elastic.org>
* stapfuncs.5.in: Document inet.stp tapset functions.
* buildok/inet-embedded.stp: Test inet.stp functions.
* inet.stp: New tapset for htonl and friends.
Diffstat (limited to 'tapset')
-rw-r--r-- | tapset/ChangeLog | 4 | ||||
-rw-r--r-- | tapset/inet.stp | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog index dc48455b..e22dde29 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,7 @@ +2007-10-04 Frank Ch. Eigler <fche@elastic.org> + + * inet.stp: New tapset for htonl and friends. + 2007-10-04 Zhaolei <zhaolei@cn.fujitsu.com> * queue_stats.stp (qsq_print): Make value of ops/s output as float diff --git a/tapset/inet.stp b/tapset/inet.stp new file mode 100644 index 00000000..0fdd4bab --- /dev/null +++ b/tapset/inet.stp @@ -0,0 +1,8 @@ +/* Some functions from libc <arpa/inet.h> */ + +function htonll:long (x:long) %{ THIS->__retvalue = (int64_t) cpu_to_be64 ((u64) THIS->x); %} +function htonl:long (x:long) %{ THIS->__retvalue = (int64_t) cpu_to_be32 ((u32) THIS->x); %} +function htons:long (x:long) %{ THIS->__retvalue = (int64_t) cpu_to_be16 ((u16) THIS->x); %} +function ntohll:long (x:long) %{ THIS->__retvalue = (int64_t) be64_to_cpu ((u64) THIS->x); %} +function ntohl:long (x:long) %{ THIS->__retvalue = (int64_t) be32_to_cpu ((u32) THIS->x); %} +function ntohs:long (x:long) %{ THIS->__retvalue = (int64_t) be16_to_cpu ((u16) THIS->x); %} |