diff options
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); %} |