1
2
3
4
5
6
7
8
9
10
11
16
17
22
23
24
29
30
31
36
37
38
39
40
46
47
48
55
56
61
62
67
68
69
74
75
76
81
82
83
84
85
91
92
93
100
101
106
107
112
113
114
119
120
121
126
127
128
129
130
136
137
138
145
146
151
152
157
158
159
164
165
166
171
172
173
174
175
181
182
183
190
191
196
197
202
203
204
209
210
211
216
217
218
219
220
226
227
228
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
266
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
330
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
368
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
432
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
522
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
550
553
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
#ifndef PROTOBUF_C__NO_DEPRECATED
#define PROTOBUF_C__NO_DEPRECATED
#endif
#include "sec2.pb-c.h"
void s2_session_cmd0__init
(S2SessionCmd0 *message)
{
static const S2SessionCmd0 init_value = S2_SESSION_CMD0__INIT;
*message = init_value;
}{ ... }
size_t s2_session_cmd0__get_packed_size
(const S2SessionCmd0 *message)
{
assert(message->base.descriptor == &s2_session_cmd0__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}{ ... }
size_t s2_session_cmd0__pack
(const S2SessionCmd0 *message,
uint8_t *out)
{
assert(message->base.descriptor == &s2_session_cmd0__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}{ ... }
size_t s2_session_cmd0__pack_to_buffer
(const S2SessionCmd0 *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &s2_session_cmd0__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}{ ... }
S2SessionCmd0 *
s2_session_cmd0__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (S2SessionCmd0 *)
protobuf_c_message_unpack (&s2_session_cmd0__descriptor,
allocator, len, data);
}{ ... }
void s2_session_cmd0__free_unpacked
(S2SessionCmd0 *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &s2_session_cmd0__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}{ ... }
void s2_session_resp0__init
(S2SessionResp0 *message)
{
static const S2SessionResp0 init_value = S2_SESSION_RESP0__INIT;
*message = init_value;
}{ ... }
size_t s2_session_resp0__get_packed_size
(const S2SessionResp0 *message)
{
assert(message->base.descriptor == &s2_session_resp0__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}{ ... }
size_t s2_session_resp0__pack
(const S2SessionResp0 *message,
uint8_t *out)
{
assert(message->base.descriptor == &s2_session_resp0__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}{ ... }
size_t s2_session_resp0__pack_to_buffer
(const S2SessionResp0 *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &s2_session_resp0__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}{ ... }
S2SessionResp0 *
s2_session_resp0__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (S2SessionResp0 *)
protobuf_c_message_unpack (&s2_session_resp0__descriptor,
allocator, len, data);
}{ ... }
void s2_session_resp0__free_unpacked
(S2SessionResp0 *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &s2_session_resp0__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}{ ... }
void s2_session_cmd1__init
(S2SessionCmd1 *message)
{
static const S2SessionCmd1 init_value = S2_SESSION_CMD1__INIT;
*message = init_value;
}{ ... }
size_t s2_session_cmd1__get_packed_size
(const S2SessionCmd1 *message)
{
assert(message->base.descriptor == &s2_session_cmd1__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}{ ... }
size_t s2_session_cmd1__pack
(const S2SessionCmd1 *message,
uint8_t *out)
{
assert(message->base.descriptor == &s2_session_cmd1__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}{ ... }
size_t s2_session_cmd1__pack_to_buffer
(const S2SessionCmd1 *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &s2_session_cmd1__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}{ ... }
S2SessionCmd1 *
s2_session_cmd1__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (S2SessionCmd1 *)
protobuf_c_message_unpack (&s2_session_cmd1__descriptor,
allocator, len, data);
}{ ... }
void s2_session_cmd1__free_unpacked
(S2SessionCmd1 *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &s2_session_cmd1__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}{ ... }
void s2_session_resp1__init
(S2SessionResp1 *message)
{
static const S2SessionResp1 init_value = S2_SESSION_RESP1__INIT;
*message = init_value;
}{ ... }
size_t s2_session_resp1__get_packed_size
(const S2SessionResp1 *message)
{
assert(message->base.descriptor == &s2_session_resp1__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}{ ... }
size_t s2_session_resp1__pack
(const S2SessionResp1 *message,
uint8_t *out)
{
assert(message->base.descriptor == &s2_session_resp1__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}{ ... }
size_t s2_session_resp1__pack_to_buffer
(const S2SessionResp1 *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &s2_session_resp1__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}{ ... }
S2SessionResp1 *
s2_session_resp1__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (S2SessionResp1 *)
protobuf_c_message_unpack (&s2_session_resp1__descriptor,
allocator, len, data);
}{ ... }
void s2_session_resp1__free_unpacked
(S2SessionResp1 *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &s2_session_resp1__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}{ ... }
void sec2_payload__init
(Sec2Payload *message)
{
static const Sec2Payload init_value = SEC2_PAYLOAD__INIT;
*message = init_value;
}{ ... }
size_t sec2_payload__get_packed_size
(const Sec2Payload *message)
{
assert(message->base.descriptor == &sec2_payload__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}{ ... }
size_t sec2_payload__pack
(const Sec2Payload *message,
uint8_t *out)
{
assert(message->base.descriptor == &sec2_payload__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}{ ... }
size_t sec2_payload__pack_to_buffer
(const Sec2Payload *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &sec2_payload__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}{ ... }
Sec2Payload *
sec2_payload__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Sec2Payload *)
protobuf_c_message_unpack (&sec2_payload__descriptor,
allocator, len, data);
}{ ... }
void sec2_payload__free_unpacked
(Sec2Payload *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &sec2_payload__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}{ ... }
static const ProtobufCFieldDescriptor s2_session_cmd0__field_descriptors[2] =
{
{
"client_username",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0,
offsetof(S2SessionCmd0, client_username),
NULL,
NULL,
0,
0,NULL,NULL
}{...},
{
"client_pubkey",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0,
offsetof(S2SessionCmd0, client_pubkey),
NULL,
NULL,
0,
0,NULL,NULL
}{...},
}{...};
static const unsigned s2_session_cmd0__field_indices_by_name[] = {
1,
0,
}{...};
static const ProtobufCIntRange s2_session_cmd0__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 2 }
}{...};
const ProtobufCMessageDescriptor s2_session_cmd0__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"S2SessionCmd0",
"S2SessionCmd0",
"S2SessionCmd0",
"",
sizeof(S2SessionCmd0),
2,
s2_session_cmd0__field_descriptors,
s2_session_cmd0__field_indices_by_name,
1, s2_session_cmd0__number_ranges,
(ProtobufCMessageInit) s2_session_cmd0__init,
NULL,NULL,NULL
}{...};
static const ProtobufCFieldDescriptor s2_session_resp0__field_descriptors[3] =
{
{
"status",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_ENUM,
0,
offsetof(S2SessionResp0, status),
&status__descriptor,
NULL,
0,
0,NULL,NULL
}{...},
{
"device_pubkey",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0,
offsetof(S2SessionResp0, device_pubkey),
NULL,
NULL,
0,
0,NULL,NULL
}{...},
{
"device_salt",
3,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0,
offsetof(S2SessionResp0, device_salt),
NULL,
NULL,
0,
0,NULL,NULL
}{...},
}{...};
static const unsigned s2_session_resp0__field_indices_by_name[] = {
1,
2,
0,
}{...};
static const ProtobufCIntRange s2_session_resp0__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 3 }
}{...};
const ProtobufCMessageDescriptor s2_session_resp0__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"S2SessionResp0",
"S2SessionResp0",
"S2SessionResp0",
"",
sizeof(S2SessionResp0),
3,
s2_session_resp0__field_descriptors,
s2_session_resp0__field_indices_by_name,
1, s2_session_resp0__number_ranges,
(ProtobufCMessageInit) s2_session_resp0__init,
NULL,NULL,NULL
}{...};
static const ProtobufCFieldDescriptor s2_session_cmd1__field_descriptors[1] =
{
{
"client_proof",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0,
offsetof(S2SessionCmd1, client_proof),
NULL,
NULL,
0,
0,NULL,NULL
}{...},
}{...};
static const unsigned s2_session_cmd1__field_indices_by_name[] = {
0,
}{...};
static const ProtobufCIntRange s2_session_cmd1__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 1 }
}{...};
const ProtobufCMessageDescriptor s2_session_cmd1__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"S2SessionCmd1",
"S2SessionCmd1",
"S2SessionCmd1",
"",
sizeof(S2SessionCmd1),
1,
s2_session_cmd1__field_descriptors,
s2_session_cmd1__field_indices_by_name,
1, s2_session_cmd1__number_ranges,
(ProtobufCMessageInit) s2_session_cmd1__init,
NULL,NULL,NULL
}{...};
static const ProtobufCFieldDescriptor s2_session_resp1__field_descriptors[3] =
{
{
"status",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_ENUM,
0,
offsetof(S2SessionResp1, status),
&status__descriptor,
NULL,
0,
0,NULL,NULL
}{...},
{
"device_proof",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0,
offsetof(S2SessionResp1, device_proof),
NULL,
NULL,
0,
0,NULL,NULL
}{...},
{
"device_nonce",
3,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0,
offsetof(S2SessionResp1, device_nonce),
NULL,
NULL,
0,
0,NULL,NULL
}{...},
}{...};
static const unsigned s2_session_resp1__field_indices_by_name[] = {
2,
1,
0,
}{...};
static const ProtobufCIntRange s2_session_resp1__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 3 }
}{...};
const ProtobufCMessageDescriptor s2_session_resp1__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"S2SessionResp1",
"S2SessionResp1",
"S2SessionResp1",
"",
sizeof(S2SessionResp1),
3,
s2_session_resp1__field_descriptors,
s2_session_resp1__field_indices_by_name,
1, s2_session_resp1__number_ranges,
(ProtobufCMessageInit) s2_session_resp1__init,
NULL,NULL,NULL
}{...};
static const ProtobufCFieldDescriptor sec2_payload__field_descriptors[5] =
{
{
"msg",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_ENUM,
0,
offsetof(Sec2Payload, msg),
&sec2_msg_type__descriptor,
NULL,
0,
0,NULL,NULL
}{...},
{
"sc0",
20,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(Sec2Payload, payload_case),
offsetof(Sec2Payload, sc0),
&s2_session_cmd0__descriptor,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_ONEOF,
0,NULL,NULL
}{...},
{
"sr0",
21,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(Sec2Payload, payload_case),
offsetof(Sec2Payload, sr0),
&s2_session_resp0__descriptor,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_ONEOF,
0,NULL,NULL
}{...},
{
"sc1",
22,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(Sec2Payload, payload_case),
offsetof(Sec2Payload, sc1),
&s2_session_cmd1__descriptor,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_ONEOF,
0,NULL,NULL
}{...},
{
"sr1",
23,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(Sec2Payload, payload_case),
offsetof(Sec2Payload, sr1),
&s2_session_resp1__descriptor,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_ONEOF,
0,NULL,NULL
}{...},
}{...};
static const unsigned sec2_payload__field_indices_by_name[] = {
0,
1,
3,
2,
4,
}{...};
static const ProtobufCIntRange sec2_payload__number_ranges[2 + 1] =
{
{ 1, 0 },
{ 20, 1 },
{ 0, 5 }
}{...};
const ProtobufCMessageDescriptor sec2_payload__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"Sec2Payload",
"Sec2Payload",
"Sec2Payload",
"",
sizeof(Sec2Payload),
5,
sec2_payload__field_descriptors,
sec2_payload__field_indices_by_name,
2, sec2_payload__number_ranges,
(ProtobufCMessageInit) sec2_payload__init,
NULL,NULL,NULL
}{...};
static const ProtobufCEnumValue sec2_msg_type__enum_values_by_number[4] =
{
{ "S2Session_Command0", "SEC2_MSG_TYPE__S2Session_Command0", 0 },
{ "S2Session_Response0", "SEC2_MSG_TYPE__S2Session_Response0", 1 },
{ "S2Session_Command1", "SEC2_MSG_TYPE__S2Session_Command1", 2 },
{ "S2Session_Response1", "SEC2_MSG_TYPE__S2Session_Response1", 3 },
}{...};
static const ProtobufCIntRange sec2_msg_type__value_ranges[] = {
{0, 0},{0, 4}
}{...};
static const ProtobufCEnumValueIndex sec2_msg_type__enum_values_by_name[4] =
{
{ "S2Session_Command0", 0 },
{ "S2Session_Command1", 2 },
{ "S2Session_Response0", 1 },
{ "S2Session_Response1", 3 },
}{...};
const ProtobufCEnumDescriptor sec2_msg_type__descriptor =
{
PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
"Sec2MsgType",
"Sec2MsgType",
"Sec2MsgType",
"",
4,
sec2_msg_type__enum_values_by_number,
4,
sec2_msg_type__enum_values_by_name,
1,
sec2_msg_type__value_ranges,
NULL,NULL,NULL,NULL
}{...};