6 tep_read_number - Reads a number from raw data.
12 *#include <event-parse.h>*
14 unsigned long long *tep_read_number*(struct tep_handle pass:[*]_tep_, const void pass:[*]_ptr_, int _size_);
19 The _tep_read_number()_ function reads an integer from raw data, taking into
20 account the endianness of the raw data and the current host. The _tep_ argument
21 is the trace event parser context. The _ptr_ is a pointer to the raw data, where
22 the integer is, and the _size_ is the size of the integer.
26 The _tep_read_number()_ function returns the integer in the byte order of
27 the current host. In case of an error, 0 is returned.
33 #include <event-parse.h>
35 struct tep_handle *tep = tep_alloc();
37 void process_record(struct tep_record *record)
40 int data = tep_read_number(tep, record->data + offset, 4);
42 /* Read the 4 bytes at the offset 24 of data as an integer */
52 Header file to include in order to have access to the library APIs.
54 Linker switch to add when building a program that uses the library.
59 _libtraceevent(3)_, _trace-cmd(1)_
65 *Steven Rostedt* <rostedt@goodmis.org>, author of *libtraceevent*.
66 *Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page.
70 Report bugs to <linux-trace-devel@vger.kernel.org>
74 libtraceevent is Free Software licensed under the GNU LGPL 2.1
78 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git