EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
sync.pb-c.h
Go to the documentation of this file.
1 /* Generated by the protocol buffer compiler. DO NOT EDIT! */
2 /* Generated from: sync.proto */
3 
4 #ifndef PROTOBUF_C_sync_2eproto__INCLUDED
5 #define PROTOBUF_C_sync_2eproto__INCLUDED
6 
7 #include <protobuf-c/protobuf-c.h>
8 
9 PROTOBUF_C__BEGIN_DECLS
10 
11 #if PROTOBUF_C_VERSION_NUMBER < 1003000
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 
23 
24 /* --- enums --- */
25 
26 /* --- messages --- */
27 
28 typedef enum {
31  1,
33  2 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(
34  TDX__VOLT_API__SYNC__V1__PROTOBUF_SYNC_WRAPPER__HEADER_LOOKUP__CASE)
36 
37 /*
38  * Wraps arbitrary protobuf messages, with an index into the
39  * `ProtobufSyncConfigurationHeader` to indicate the specific message type this
40  * message wraps.
41  */
43  ProtobufCMessage base;
44  /*
45  * The message payload, in serialised protobuf binary format.
46  * n.b. the serialisation should **not** be length-prefixed.
47  */
48  ProtobufCBinaryData payload;
51  union {
52  /*
53  * The index number of the header for this message type in the Volt logger
54  * configuration file.
55  */
56  uint32_t header_index;
57  /*
58  * The name of the header for this message type, will be used to lookup
59  * against the `id` field in `ProtobufSyncConfiguration`. This will incur an
60  * overhead in terms of the packet size, but might be preferrable if volume
61  * is low or managing the header index is difficult.
62  */
63  char *header_id;
64  };
65 };
66 #define TDX__VOLT_API__SYNC__V1__PROTOBUF_SYNC_WRAPPER__INIT \
67  { \
68  PROTOBUF_C_MESSAGE_INIT( \
69  &tdx__volt_api__sync__v1__protobuf_sync_wrapper__descriptor) \
70  , {0, NULL}, \
71  TDX__VOLT_API__SYNC__V1__PROTOBUF_SYNC_WRAPPER__HEADER_LOOKUP__NOT_SET, \
72  { \
73  0 \
74  } \
75  }
76 
77 /*
78  * Describes a single message type.
79  * A set of one or more of these messages is specified in
80  * `ProtobufSyncConfigurationHeader`.
81  */
83  ProtobufCMessage base;
84  /*
85  * Optional id to associate with this configuration.
86  * This can be used in the `header_id` field of `ProtobufSyncWrapper` above to
87  * reference the configuration. If omitted the numerical index of the
88  * configuration in `ProtobufSyncConfigurationHeader` will be used instead
89  * (recommended).
90  */
91  char *id;
92  /*
93  * The actual protobuf definition text.
94  * Copy and paste the source protobuf definition from the `.proto` file.
95  * Only simple protobuf structures are currently supported, e.g. no imports
96  * from other packages etc.
97  */
99  /*
100  * The name of the message within `message_proto` above that represents the
101  * data to be sync'd, e.g. `TCPDumpPacket`.
102  */
104  /*
105  * The name of the table within the target database into which the message
106  * data for this type should be written.
107  */
108  char *table_name;
109 };
110 #define TDX__VOLT_API__SYNC__V1__PROTOBUF_SYNC_CONFIGURATION__INIT \
111  { \
112  PROTOBUF_C_MESSAGE_INIT( \
113  &tdx__volt_api__sync__v1__protobuf_sync_configuration__descriptor) \
114  , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, \
115  (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string \
116  }
117 
118 /*
119  * This message is written at the beginning of every file to be ingested using
120  * the `protoDbSync` utility. It contains a `header` entry for each message type
121  * that may appear in the file. If the `volt logger` command is used, it will
122  * create this header automatically based on the configuration it's given.
123  */
125  ProtobufCMessage base;
126  /*
127  * This should ideally be a persistent UUID, at minimum it must be unique
128  * within the set of types of file any given instance of `protoDbSync` is
129  * processing in a given folder. It is used to match up orphaned or split
130  * packets that might occur when receiving data from a wire, for example, if a
131  * log file is rotated midway through a packet arriving on the wire. This id
132  * should persist for the life time of the set of data it describes, i.e. if a
133  * wire publication is stopped and restarted at some later point, the same id
134  * should be used if possible.
135  */
136  char *id;
137  /*
138  * The set of possible configurations that can appear in any given protobuf
139  * sync data file. A serialised instance of this message must appear at the
140  * top of each data file. Each subsequent serialised message in the data file
141  * must be an instance of `ProtobufSyncWrapper`, and the `header_lookup` field
142  * refers to an entry in this list.
143  */
146  /*
147  * Optional maximum size of the serialised messages, this doesn't need to be
148  * exact and the default is 64K if omitted.
149  */
151 };
152 #define TDX__VOLT_API__SYNC__V1__PROTOBUF_SYNC_CONFIGURATION_HEADER__INIT \
153  { \
154  PROTOBUF_C_MESSAGE_INIT( \
155  &tdx__volt_api__sync__v1__protobuf_sync_configuration_header__descriptor) \
156  , (char *)protobuf_c_empty_string, 0, NULL, 0 \
157  }
158 
159 /* Tdx__VoltApi__Sync__V1__ProtobufSyncWrapper methods */
165  const Tdx__VoltApi__Sync__V1__ProtobufSyncWrapper *message, uint8_t *out);
168  ProtobufCBuffer *buffer);
171  ProtobufCAllocator *allocator, size_t len, const uint8_t *data);
174  ProtobufCAllocator *allocator);
175 /* Tdx__VoltApi__Sync__V1__ProtobufSyncConfiguration methods */
182  uint8_t *out);
185  ProtobufCBuffer *buffer);
188  ProtobufCAllocator *allocator, size_t len, const uint8_t *data);
191  ProtobufCAllocator *allocator);
192 /* Tdx__VoltApi__Sync__V1__ProtobufSyncConfigurationHeader methods */
195 size_t
200  uint8_t *out);
201 size_t
204  ProtobufCBuffer *buffer);
207  ProtobufCAllocator *allocator, size_t len, const uint8_t *data);
210  ProtobufCAllocator *allocator);
211 /* --- per-message closures --- */
212 
215  void *closure_data);
218  void *closure_data);
221  void *closure_data);
222 
223 /* --- services --- */
224 
225 /* --- descriptors --- */
226 
227 extern const ProtobufCMessageDescriptor
229 extern const ProtobufCMessageDescriptor
231 extern const ProtobufCMessageDescriptor
233 
234 PROTOBUF_C__END_DECLS
235 
236 #endif /* PROTOBUF_C_sync_2eproto__INCLUDED */
Tdx__VoltApi__Sync__V1__ProtobufSyncConfiguration ** configuration
Definition: sync.pb-c.h:145
size_t n_configuration
Definition: sync.pb-c.h:144
int32_t maximum_message_size
Definition: sync.pb-c.h:150
ProtobufCMessage base
Definition: sync.pb-c.h:125
char * message_proto
Definition: sync.pb-c.h:98
char * message_name
Definition: sync.pb-c.h:103
ProtobufCMessage base
Definition: sync.pb-c.h:83
char * table_name
Definition: sync.pb-c.h:108
uint32_t header_index
Definition: sync.pb-c.h:56
char * header_id
Definition: sync.pb-c.h:63
ProtobufCBinaryData payload
Definition: sync.pb-c.h:48
Tdx__VoltApi__Sync__V1__ProtobufSyncWrapper__HeaderLookupCase header_lookup_case
Definition: sync.pb-c.h:50
ProtobufCMessage base
Definition: sync.pb-c.h:43
const ProtobufCMessageDescriptor tdx__volt_api__sync__v1__protobuf_sync_configuration__descriptor
Definition: sync.pb-c.c:253
size_t tdx__volt_api__sync__v1__protobuf_sync_wrapper__pack(const Tdx__VoltApi__Sync__V1__ProtobufSyncWrapper *message, uint8_t *out)
Definition: sync.pb-c.c:23
void tdx__volt_api__sync__v1__protobuf_sync_configuration_header__free_unpacked(Tdx__VoltApi__Sync__V1__ProtobufSyncConfigurationHeader *message, ProtobufCAllocator *allocator)
Definition: sync.pb-c.c:141
Tdx__VoltApi__Sync__V1__ProtobufSyncConfiguration * tdx__volt_api__sync__v1__protobuf_sync_configuration__unpack(ProtobufCAllocator *allocator, size_t len, const uint8_t *data)
Definition: sync.pb-c.c:83
size_t tdx__volt_api__sync__v1__protobuf_sync_wrapper__pack_to_buffer(const Tdx__VoltApi__Sync__V1__ProtobufSyncWrapper *message, ProtobufCBuffer *buffer)
Definition: sync.pb-c.c:29
void tdx__volt_api__sync__v1__protobuf_sync_configuration__free_unpacked(Tdx__VoltApi__Sync__V1__ProtobufSyncConfiguration *message, ProtobufCAllocator *allocator)
Definition: sync.pb-c.c:90
size_t tdx__volt_api__sync__v1__protobuf_sync_configuration_header__pack_to_buffer(const Tdx__VoltApi__Sync__V1__ProtobufSyncConfigurationHeader *message, ProtobufCBuffer *buffer)
Definition: sync.pb-c.c:124
const ProtobufCMessageDescriptor tdx__volt_api__sync__v1__protobuf_sync_configuration_header__descriptor
Definition: sync.pb-c.c:317
size_t tdx__volt_api__sync__v1__protobuf_sync_configuration_header__pack(const Tdx__VoltApi__Sync__V1__ProtobufSyncConfigurationHeader *message, uint8_t *out)
Definition: sync.pb-c.c:115
size_t tdx__volt_api__sync__v1__protobuf_sync_configuration__pack(const Tdx__VoltApi__Sync__V1__ProtobufSyncConfiguration *message, uint8_t *out)
Definition: sync.pb-c.c:67
void(* Tdx__VoltApi__Sync__V1__ProtobufSyncConfiguration_Closure)(const Tdx__VoltApi__Sync__V1__ProtobufSyncConfiguration *message, void *closure_data)
Definition: sync.pb-c.h:216
size_t tdx__volt_api__sync__v1__protobuf_sync_configuration__pack_to_buffer(const Tdx__VoltApi__Sync__V1__ProtobufSyncConfiguration *message, ProtobufCBuffer *buffer)
Definition: sync.pb-c.c:74
size_t tdx__volt_api__sync__v1__protobuf_sync_configuration__get_packed_size(const Tdx__VoltApi__Sync__V1__ProtobufSyncConfiguration *message)
Definition: sync.pb-c.c:60
size_t tdx__volt_api__sync__v1__protobuf_sync_wrapper__get_packed_size(const Tdx__VoltApi__Sync__V1__ProtobufSyncWrapper *message)
Definition: sync.pb-c.c:16
void tdx__volt_api__sync__v1__protobuf_sync_configuration_header__init(Tdx__VoltApi__Sync__V1__ProtobufSyncConfigurationHeader *message)
Definition: sync.pb-c.c:99
Tdx__VoltApi__Sync__V1__ProtobufSyncWrapper * tdx__volt_api__sync__v1__protobuf_sync_wrapper__unpack(ProtobufCAllocator *allocator, size_t len, const uint8_t *data)
Definition: sync.pb-c.c:38
Tdx__VoltApi__Sync__V1__ProtobufSyncWrapper__HeaderLookupCase
Definition: sync.pb-c.h:28
@ TDX__VOLT_API__SYNC__V1__PROTOBUF_SYNC_WRAPPER__HEADER_LOOKUP_HEADER_INDEX
Definition: sync.pb-c.h:30
@ TDX__VOLT_API__SYNC__V1__PROTOBUF_SYNC_WRAPPER__HEADER_LOOKUP_HEADER_ID
Definition: sync.pb-c.h:32
@ TDX__VOLT_API__SYNC__V1__PROTOBUF_SYNC_WRAPPER__HEADER_LOOKUP__NOT_SET
Definition: sync.pb-c.h:29
void(* Tdx__VoltApi__Sync__V1__ProtobufSyncConfigurationHeader_Closure)(const Tdx__VoltApi__Sync__V1__ProtobufSyncConfigurationHeader *message, void *closure_data)
Definition: sync.pb-c.h:219
size_t tdx__volt_api__sync__v1__protobuf_sync_configuration_header__get_packed_size(const Tdx__VoltApi__Sync__V1__ProtobufSyncConfigurationHeader *message)
Definition: sync.pb-c.c:107
const ProtobufCMessageDescriptor tdx__volt_api__sync__v1__protobuf_sync_wrapper__descriptor
Definition: sync.pb-c.c:188
void(* Tdx__VoltApi__Sync__V1__ProtobufSyncWrapper_Closure)(const Tdx__VoltApi__Sync__V1__ProtobufSyncWrapper *message, void *closure_data)
Definition: sync.pb-c.h:213
void tdx__volt_api__sync__v1__protobuf_sync_wrapper__init(Tdx__VoltApi__Sync__V1__ProtobufSyncWrapper *message)
Definition: sync.pb-c.c:10
void tdx__volt_api__sync__v1__protobuf_sync_wrapper__free_unpacked(Tdx__VoltApi__Sync__V1__ProtobufSyncWrapper *message, ProtobufCAllocator *allocator)
Definition: sync.pb-c.c:45
Tdx__VoltApi__Sync__V1__ProtobufSyncConfigurationHeader * tdx__volt_api__sync__v1__protobuf_sync_configuration_header__unpack(ProtobufCAllocator *allocator, size_t len, const uint8_t *data)
Definition: sync.pb-c.c:134
void tdx__volt_api__sync__v1__protobuf_sync_configuration__init(Tdx__VoltApi__Sync__V1__ProtobufSyncConfiguration *message)
Definition: sync.pb-c.c:54