LIBTRACEEVENT(3)
π LIBTRACEEVENT(3) β the libtraceevent manual, bestie edition π
okay so welcome to the libtraceevent manual page, and today we're hyperfixating on endianness, which sounds boring but is literally the difference between your raw data making sense and your raw data being a cursed scrambled mess π«
β¨ NAME β¨
tep_is_file_bigendian, tep_set_file_bigendian β get / set the endianness of the raw data being accessed by the tep handler π
β¨ SYNOPSIS β¨
#include <event-parse.h>
enum tep_endian {
TEP_LITTLE_ENDIAN = 0,
TEP_BIG_ENDIAN
};
bool tep_is_file_bigendian(struct tep_handle *tep);
void tep_set_file_bigendian(struct tep_handle *tep, enum tep_endian endian);
β¨ DESCRIPTION β¨
tep_is_file_bigendian()
this one gets the endianness of the raw data that's being accessed by the tep handler, no cap π the tep argument is the trace event parser context β that's your lil main character struct holding everything together π
tep_set_file_bigendian()
and this one sets the endianness of the raw data being accessed by the tep handler β¨ again, tep is the trace event parser context, same bestie as before.
the endian argument is the endianness, and it's giving two options:
TEP_LITTLE_ENDIANβ the raw data is in little endian format π£TEP_BIG_ENDIANβ the raw data is in big endian format π
β¨ RETURN VALUE β¨
tep_is_file_bigendian() returns true if the data is in bigendian format, and false otherwise. simple as that, no plot twist πΈ
β¨ EXAMPLE β¨
#include <event-parse.h>
...
struct tep_handle *tep = tep_alloc();
...
tep_set_file_bigendian(tep, TEP_LITTLE_ENDIAN);
...
if (tep_is_file_bigendian(tep)) {
/* The raw data is in big endian */
} else {
/* The raw data is in little endian */
}
β¨ FILES β¨
event-parse.hβ header file to include in order to have access to the library APIs π-ltraceeventβ linker switch to add when building a program that uses the library π
β¨ SEE ALSO β¨
libtraceevent(3), trace-cmd(1) β go read those too, they're iconic fr fr π
β¨ AUTHOR β¨
- Steven Rostedt
<rostedt@goodmis.org>β author of libtraceevent π«Ά - Tzvetomir Stoyanov
<tz.stoyanov@gmail.com>β author of this man page βοΈ
β¨ REPORTING BUGS β¨
found a bug? report it to <linux-trace-devel@vger.kernel.org> β they wanna know, seriously, don't gatekeep π
β¨ LICENSE β¨
libtraceevent is Free Software licensed under the GNU LGPL 2.1 βοΈ
β¨ RESOURCES β¨
https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/ β the source, go lurk π§
β¨ NOTES β¨
rostedt@goodmis.orgβmailto:rostedt@goodmis.orgtz.stoyanov@gmail.comβmailto:tz.stoyanov@gmail.comlinux-trace-devel@vger.kernel.orgβmailto:linux-trace-devel@vger.kernel.org
and that's the whole page bestie, every flag, every value, every default accounted for β nothing skipped, nothing invented πβ¨
libtraceevent 1.9.0 Β· dated 06/15/2026 π slay, go parse some endianness, you got this ππ
π¦ where this page comes from
- ubuntu stonking: libtraceevent-doc 1:1.9.0-2 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms