1libtraceevent(3) 2================ 3 4NAME 5---- 6tep_is_file_bigendian, tep_set_file_bigendian - Get / set the endianness of the 7raw data being accessed by the tep handler. 8 9SYNOPSIS 10-------- 11[verse] 12-- 13*#include <event-parse.h>* 14 15enum *tep_endian* { 16 TEP_LITTLE_ENDIAN = 0, 17 TEP_BIG_ENDIAN 18}; 19 20bool *tep_is_file_bigendian*(struct tep_handle pass:[*]_tep_); 21void *tep_set_file_bigendian*(struct tep_handle pass:[*]_tep_, enum tep_endian _endian_); 22 23-- 24DESCRIPTION 25----------- 26The _tep_is_file_bigendian()_ function gets the endianness of the raw data, 27being accessed by the tep handler. The _tep_ argument is trace event parser 28context. 29 30The _tep_set_file_bigendian()_ function sets the endianness of raw data being 31accessed by the tep handler. The _tep_ argument is trace event parser context. 32[verse] 33-- 34The _endian_ argument is the endianness: 35 _TEP_LITTLE_ENDIAN_ - the raw data is in little endian format, 36 _TEP_BIG_ENDIAN_ - the raw data is in big endian format. 37-- 38RETURN VALUE 39------------ 40The _tep_is_file_bigendian()_ function returns true if the data is in bigendian 41format, false otherwise. 42 43EXAMPLE 44------- 45[source,c] 46-- 47#include <event-parse.h> 48... 49struct tep_handle *tep = tep_alloc(); 50... 51 tep_set_file_bigendian(tep, TEP_LITTLE_ENDIAN); 52... 53 if (tep_is_file_bigendian(tep)) { 54 /* The raw data is in big endian */ 55 } else { 56 /* The raw data is in little endian */ 57 } 58-- 59 60FILES 61----- 62[verse] 63-- 64*event-parse.h* 65 Header file to include in order to have access to the library APIs. 66*-ltraceevent* 67 Linker switch to add when building a program that uses the library. 68-- 69 70SEE ALSO 71-------- 72_libtraceevent(3)_, _trace-cmd(1)_ 73 74AUTHOR 75------ 76[verse] 77-- 78*Steven Rostedt* <rostedt@goodmis.org>, author of *libtraceevent*. 79*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page. 80-- 81REPORTING BUGS 82-------------- 83Report bugs to <linux-trace-devel@vger.kernel.org> 84 85LICENSE 86------- 87libtraceevent is Free Software licensed under the GNU LGPL 2.1 88 89RESOURCES 90--------- 91https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 92