| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
logcat.h
Go to the documentation of this file.
1
9#ifndef __LOGCAT_H__
10#define __LOGCAT_H__
11
12#include "wtap.h"
13
14/* The log format can be found on:
15 * https://android.googlesource.com/platform/system/core/+/master/include/log/logger.h
16 * Log format is assumed to be little-endian (Android platform).
17 */
18/* maximum size of a message payload in a log entry */
19#define LOGGER_ENTRY_MAX_PAYLOAD 4076
20
21 struct logger_entry {
22 uint16_t len; /* length of the payload */
23 uint16_t __pad; /* no matter what, we get 2 bytes of padding */
24 int32_t pid; /* generating process's pid */
25 int32_t tid; /* generating process's tid */
26 int32_t sec; /* seconds since Epoch */
27 int32_t nsec; /* nanoseconds */
28/* char msg[0]; *//* the entry's payload */
29};
30
31 struct logger_entry_v2 {
32 uint16_t len; /* length of the payload */
33 uint16_t hdr_size; /* sizeof(struct logger_entry_v2) */
34 int32_t pid; /* generating process's pid */
35 int32_t tid; /* generating process's tid */
36 int32_t sec; /* seconds since Epoch */
37 int32_t nsec; /* nanoseconds */
38 union {
39 /* v1: not present */
40 uint32_t euid; /* v2: effective UID of logger */
41 uint32_t lid; /* v3: log id of the payload */
42 } id;
43/* char msg[0]; *//* the entry's payload */
44};
45
56 wtap_open_return_val logcat_open(wtap *wth, int *err, char **err_info);
57
66 int logcat_exported_pdu_length(const uint8_t *pd);
67#endif
68
69/*
70 * Editor modelines - https://www.wireshark.org/tools/modelines.html
71 *
72 * Local variables:
73 * c-basic-offset: 4
74 * tab-width: 8
75 * indent-tabs-mode: nil
76 * End:
77 *
78 * vi: set shiftwidth=4 tabstop=8 expandtab:
79 * :indentSize=4:tabSize=8:noTabs=true:
80 */
logcat_open
wtap_open_return_val logcat_open(wtap *wth, int *err, char **err_info)
Opens a logcat capture file for reading.
Definition logcat.c:235
logcat_exported_pdu_length
int logcat_exported_pdu_length(const uint8_t *pd)
Calculate the length of a PDU (Protocol Data Unit) in a Logcat packet.
Definition logcat.c:141
logger_entry_v2
Definition logcat.h:31
logger_entry
Definition logcat.h:21
wtap
Definition wtap_module.h:58
wtap.h
wtap_open_return_val
wtap_open_return_val
For registering file types that we can open.
Definition wtap.h:1751