HEX
Server: LiteSpeed
System: Linux vearitale.com 5.14.0-570.32.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 6 11:30:41 EDT 2025 x86_64
User: yunab9059 (2007)
PHP: 8.3.21
Disabled: NONE
Upload Files
File: //usr/share/systemtap/tapset/dyninst/inet.stp
/* Some functions from libc <arpa/inet.h> */

/* NB: functionally equivalent to linux/inet.stp
 * ... but we have the advantage of using (mostly) direct equivalents!
 */

%{
#include <arpa/inet.h>
#include <endian.h>
%}

function htonll:long (x:long)
%{
	/* pure */ STAP_RETVALUE = htobe64 ((uint64_t) STAP_ARG_x);
%}

function htonl:long (x:long)
%{
	/* pure */ STAP_RETVALUE = htonl ((uint32_t) STAP_ARG_x);
%}

function htons:long (x:long)
%{
	/* pure */ STAP_RETVALUE = htons ((uint16_t) STAP_ARG_x);
%}

function ntohll:long (x:long)
%{
	/* pure */ STAP_RETVALUE = be64toh ((uint64_t) STAP_ARG_x);
%}

function ntohl:long (x:long)
%{
	/* pure */ STAP_RETVALUE = ntohl ((uint32_t) STAP_ARG_x);
%}

function ntohs:long (x:long)
%{
	/* pure */ STAP_RETVALUE = ntohs ((uint16_t) STAP_ARG_x);
%}