File: inet.stp

package info (click to toggle)
systemtap 4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 36,436 kB
  • sloc: cpp: 72,388; ansic: 58,430; xml: 47,797; exp: 40,417; sh: 10,793; python: 2,759; perl: 2,252; tcl: 1,305; makefile: 1,119; lisp: 105; java: 102; awk: 101; asm: 91; sed: 16
file content (43 lines) | stat: -rw-r--r-- 1,456 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* Some functions from libc <arpa/inet.h> */

/* <tapsetdescription>
 * These functions convert between network (big-endian) and host byte
 * order, like their namesake C functions.
 * </tapsetdescription>
 */

/**
 * sfunction htonll - Convert 64-bit long long from host to network order
 * @x: Value to convert
 */
function htonll:long (x:long) %{ /* pure */ STAP_RETVALUE = (int64_t) cpu_to_be64 ((u64) STAP_ARG_x); %}

/**
 * sfunction htonl - Convert 32-bit long from host to network order
 * @x: Value to convert
 */
function htonl:long (x:long) %{ /* pure */ STAP_RETVALUE = (int64_t) cpu_to_be32 ((u32) STAP_ARG_x); %}

/**
 * sfunction htons - Convert 16-bit short from host to network order
 * @x: Value to convert
 */
function htons:long (x:long) %{ /* pure */ STAP_RETVALUE = (int64_t) cpu_to_be16 ((u16) STAP_ARG_x); %}

/**
 * sfunction ntohll - Convert 64-bit long long from network to host order
 * @x: Value to convert
 */
function ntohll:long (x:long) %{ /* pure */ STAP_RETVALUE = (int64_t) be64_to_cpu ((u64) STAP_ARG_x); %}

/**
 * sfunction ntohl - Convert 32-bit long from network to host order
 * @x: Value to convert
 */
function ntohl:long (x:long) %{ /* pure */ STAP_RETVALUE = (int64_t) be32_to_cpu ((u32) STAP_ARG_x); %}

/**
 * sfunction ntohs - Convert 16-bit short from network to host order
 * @x: Value to convert
 */
function ntohs:long (x:long) %{ /* pure */ STAP_RETVALUE = (int64_t) be16_to_cpu ((u16) STAP_ARG_x); %}