kerberos dissect KERBEROS_AD_GSS_API_ETYPE_NEGOTIATION content
[metze/wireshark/wip.git] / wiretap / logcat.h
1 /* logcat.h
2  *
3  * Copyright 2014, Michal Labedzki for Tieto Corporation
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  *
7  */
8
9 #ifndef __LOGCAT_H__
10 #define __LOGCAT_H__
11
12 #include <glib.h>
13
14 #include "wtap.h"
15
16 /* The log format can be found on:
17  * https://android.googlesource.com/platform/system/core/+/master/include/log/logger.h
18  * Log format is assumed to be little-endian (Android platform).
19  */
20 /* maximum size of a message payload in a log entry */
21 #define LOGGER_ENTRY_MAX_PAYLOAD 4076
22
23 struct logger_entry {
24     guint16 len;    /* length of the payload */
25     guint16 __pad;  /* no matter what, we get 2 bytes of padding */
26     gint32  pid;    /* generating process's pid */
27     gint32  tid;    /* generating process's tid */
28     gint32  sec;    /* seconds since Epoch */
29     gint32  nsec;   /* nanoseconds */
30 /*    char    msg[0]; *//* the entry's payload */
31 };
32
33 struct logger_entry_v2 {
34     guint16 len;    /* length of the payload */
35     guint16 hdr_size; /* sizeof(struct logger_entry_v2) */
36     gint32  pid;    /* generating process's pid */
37     gint32  tid;    /* generating process's tid */
38     gint32  sec;    /* seconds since Epoch */
39     gint32  nsec;   /* nanoseconds */
40     union {
41                         /* v1: not present */
42         guint32 euid;   /* v2: effective UID of logger */
43         guint32 lid;    /* v3: log id of the payload */
44     } id;
45 /*    char    msg[0]; *//* the entry's payload */
46 };
47
48 wtap_open_return_val  logcat_open(wtap *wth, int *err, gchar **err_info);
49
50 gboolean logcat_binary_dump_open(wtap_dumper *wdh, int *err);
51
52 int      logcat_dump_can_write_encap(int encap);
53
54 gint     logcat_exported_pdu_length(const guint8 *pd);
55 #endif
56
57 /*
58  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
59  *
60  * Local variables:
61  * c-basic-offset: 4
62  * tab-width: 8
63  * indent-tabs-mode: nil
64  * End:
65  *
66  * vi: set shiftwidth=4 tabstop=8 expandtab:
67  * :indentSize=4:tabSize=8:noTabs=true:
68  */