nmsg  0.13.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 
9 PROTOBUF_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 1000001 < 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 
18 typedef struct _Nmsg__Base__Ncap Nmsg__Base__Ncap;
19 
20 
21 /* --- enums --- */
22 
23 typedef enum _Nmsg__Base__NcapType {
24  NMSG__BASE__NCAP_TYPE__IPV4 = 0,
25  NMSG__BASE__NCAP_TYPE__IPV6 = 1,
26  NMSG__BASE__NCAP_TYPE__Legacy = 2
27  PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(NMSG__BASE__NCAP_TYPE)
28 } Nmsg__Base__NcapType;
29 typedef enum _Nmsg__Base__NcapLegacyType {
30  NMSG__BASE__NCAP_LEGACY_TYPE__UDP = 0,
31  NMSG__BASE__NCAP_LEGACY_TYPE__TCP = 1,
32  NMSG__BASE__NCAP_LEGACY_TYPE__ICMP = 2
33  PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(NMSG__BASE__NCAP_LEGACY_TYPE)
34 } Nmsg__Base__NcapLegacyType;
35 
36 /* --- messages --- */
37 
38 struct _Nmsg__Base__Ncap
39 {
40  ProtobufCMessage base;
41  Nmsg__Base__NcapType type;
42  ProtobufCBinaryData payload;
43  protobuf_c_boolean has_ltype;
44  Nmsg__Base__NcapLegacyType ltype;
45  protobuf_c_boolean has_srcip;
46  ProtobufCBinaryData srcip;
47  protobuf_c_boolean has_dstip;
48  ProtobufCBinaryData dstip;
49  protobuf_c_boolean has_lint0;
50  uint32_t lint0;
51  protobuf_c_boolean has_lint1;
52  uint32_t lint1;
53 };
54 #define NMSG__BASE__NCAP__INIT \
55  { PROTOBUF_C_MESSAGE_INIT (&nmsg__base__ncap__descriptor) \
56  , 0, {0,NULL}, 0,0, 0,{0,NULL}, 0,{0,NULL}, 0,0, 0,0 }
57 
58 
59 /* Nmsg__Base__Ncap methods */
60 void nmsg__base__ncap__init
61  (Nmsg__Base__Ncap *message);
62 size_t nmsg__base__ncap__get_packed_size
63  (const Nmsg__Base__Ncap *message);
64 size_t nmsg__base__ncap__pack
65  (const Nmsg__Base__Ncap *message,
66  uint8_t *out);
67 size_t nmsg__base__ncap__pack_to_buffer
68  (const Nmsg__Base__Ncap *message,
69  ProtobufCBuffer *buffer);
70 Nmsg__Base__Ncap *
71  nmsg__base__ncap__unpack
72  (ProtobufCAllocator *allocator,
73  size_t len,
74  const uint8_t *data);
75 void nmsg__base__ncap__free_unpacked
76  (Nmsg__Base__Ncap *message,
77  ProtobufCAllocator *allocator);
78 /* --- per-message closures --- */
79 
80 typedef void (*Nmsg__Base__Ncap_Closure)
81  (const Nmsg__Base__Ncap *message,
82  void *closure_data);
83 
84 /* --- services --- */
85 
86 
87 /* --- descriptors --- */
88 
89 extern const ProtobufCEnumDescriptor nmsg__base__ncap_type__descriptor;
90 extern const ProtobufCEnumDescriptor nmsg__base__ncap_legacy_type__descriptor;
91 extern const ProtobufCMessageDescriptor nmsg__base__ncap__descriptor;
92 
93 PROTOBUF_C__END_DECLS
94 
95 
96 #endif /* PROTOBUF_C_nmsg_2fbase_2fncap_2eproto__INCLUDED */