2 * Routines for Google Protocol Buffers dissection
3 * Copyright 2017, Huang Qiangxiong <qiangxiong.huang@qq.com>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #ifndef __PACKET_PROTOBUF_H__
13 #define __PACKET_PROTOBUF_H__
15 /* Protobuf wire type. Must be kept in sync with WireType of protobuf wire_format_lite.h
16 0 used for int32, int64, uint32, uint64, sint32, sint64, bool, enum
17 1 used for fixed64, sfixed64, double
18 2 used for string, bytes, embedded messages, packed repeated fields
19 3 used for groups (deprecated)
20 4 used for groups (deprecated)
21 5 used for fixed32, sfixed32, float
23 #define protobuf_wire_type_VALUE_STRING_LIST(XXX) \
24 XXX(PROTOBUF_WIRETYPE_VARINT, 0, "varint") \
25 XXX(PROTOBUF_WIRETYPE_FIXED64, 1, "64-bit") \
26 XXX(PROTOBUF_WIRETYPE_LENGTH_DELIMITED, 2, "Length-delimited") \
27 XXX(PROTOBUF_WIRETYPE_START_GROUP, 3, "Start group (deprecated)") \
28 XXX(PROTOBUF_WIRETYPE_END_GROUP, 4, "End group (deprecated)") \
29 XXX(PROTOBUF_WIRETYPE_FIXED32, 5, "32-bit")
31 VALUE_STRING_ENUM(protobuf_wire_type
);
32 VALUE_STRING_ARRAY_GLOBAL_DCL(protobuf_wire_type
);
37 * Editor modelines - https://www.wireshark.org/tools/modelines.html
42 * indent-tabs-mode: nil
45 * vi: set shiftwidth=4 tabstop=8 expandtab:
46 * :indentSize=4:tabSize=8:noTabs=true: