nmsg 1.1.2
ncap.pb-c.h
1/* Generated by the protocol buffer compiler. DO NOT EDIT! */
2/* Generated from: nmsg/base/ncap.proto */
3
4#ifndef PROTOBUF_C_nmsg_2fbase_2fncap_2eproto__INCLUDED
5#define PROTOBUF_C_nmsg_2fbase_2fncap_2eproto__INCLUDED
6
7#include <protobuf-c/protobuf-c.h>
8
9PROTOBUF_C__BEGIN_DECLS
10
11#if PROTOBUF_C_VERSION_NUMBER < 1000000
12# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
13#elif 1004001 < PROTOBUF_C_MIN_COMPILER_VERSION
14# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
15#endif
16
17
19
20
21/* --- enums --- */
22
23typedef enum _Nmsg__Base__Ncap__NcapType {
24 NMSG__BASE__NCAP__NCAP_TYPE__IPV4 = 0,
25 NMSG__BASE__NCAP__NCAP_TYPE__IPV6 = 1,
26 NMSG__BASE__NCAP__NCAP_TYPE__Legacy = 2
27 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(NMSG__BASE__NCAP__NCAP_TYPE)
28} Nmsg__Base__Ncap__NcapType;
29typedef enum _Nmsg__Base__Ncap__NcapLegacyType {
30 NMSG__BASE__NCAP__NCAP_LEGACY_TYPE__UDP = 0,
31 NMSG__BASE__NCAP__NCAP_LEGACY_TYPE__TCP = 1,
32 NMSG__BASE__NCAP__NCAP_LEGACY_TYPE__ICMP = 2
33 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(NMSG__BASE__NCAP__NCAP_LEGACY_TYPE)
34} Nmsg__Base__Ncap__NcapLegacyType;
35
36/* --- messages --- */
37
39{
40 ProtobufCMessage base;
41 Nmsg__Base__Ncap__NcapType type;
42 ProtobufCBinaryData payload;
43 /*
44 * legacy NCAP fields
45 */
46 protobuf_c_boolean has_ltype;
47 Nmsg__Base__Ncap__NcapLegacyType ltype;
48 protobuf_c_boolean has_srcip;
49 ProtobufCBinaryData srcip;
50 protobuf_c_boolean has_dstip;
51 ProtobufCBinaryData dstip;
52 protobuf_c_boolean has_lint0;
53 uint32_t lint0;
54 protobuf_c_boolean has_lint1;
55 uint32_t lint1;
56};
57#define NMSG__BASE__NCAP__INIT \
58 { PROTOBUF_C_MESSAGE_INIT (&nmsg__base__ncap__descriptor) \
59, NMSG__BASE__NCAP__NCAP_TYPE__IPV4, {0,NULL}, 0, NMSG__BASE__NCAP__NCAP_LEGACY_TYPE__UDP, 0, {0,NULL}, 0, {0,NULL}, 0, 0, 0, 0 }
60
61
62/* Nmsg__Base__Ncap methods */
63void nmsg__base__ncap__init
64 (Nmsg__Base__Ncap *message);
65size_t nmsg__base__ncap__get_packed_size
66 (const Nmsg__Base__Ncap *message);
67size_t nmsg__base__ncap__pack
68 (const Nmsg__Base__Ncap *message,
69 uint8_t *out);
70size_t nmsg__base__ncap__pack_to_buffer
71 (const Nmsg__Base__Ncap *message,
72 ProtobufCBuffer *buffer);
74 nmsg__base__ncap__unpack
75 (ProtobufCAllocator *allocator,
76 size_t len,
77 const uint8_t *data);
78void nmsg__base__ncap__free_unpacked
79 (Nmsg__Base__Ncap *message,
80 ProtobufCAllocator *allocator);
81/* --- per-message closures --- */
82
83typedef void (*Nmsg__Base__Ncap_Closure)
84 (const Nmsg__Base__Ncap *message,
85 void *closure_data);
86
87/* --- services --- */
88
89
90/* --- descriptors --- */
91
92extern const ProtobufCMessageDescriptor nmsg__base__ncap__descriptor;
93extern const ProtobufCEnumDescriptor nmsg__base__ncap__ncap_type__descriptor;
94extern const ProtobufCEnumDescriptor nmsg__base__ncap__ncap_legacy_type__descriptor;
95
96PROTOBUF_C__END_DECLS
97
98
99#endif /* PROTOBUF_C_nmsg_2fbase_2fncap_2eproto__INCLUDED */