2018-07-30 12:05:03 -04:00
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
/* Generated from: session.proto */
# ifndef PROTOBUF_C_session_2eproto__INCLUDED
# define PROTOBUF_C_session_2eproto__INCLUDED
# include <protobuf-c/protobuf-c.h>
PROTOBUF_C__BEGIN_DECLS
# if PROTOBUF_C_VERSION_NUMBER < 1003000
# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
2022-05-27 00:01:51 -04:00
# elif 1004000 < PROTOBUF_C_MIN_COMPILER_VERSION
2018-07-30 12:05:03 -04:00
# 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.
# endif
# include "sec0.pb-c.h"
# include "sec1.pb-c.h"
2022-05-30 05:33:54 -04:00
# include "sec2.pb-c.h"
2018-07-30 12:05:03 -04:00
2022-05-27 00:01:51 -04:00
typedef struct SessionData SessionData ;
2018-07-30 12:05:03 -04:00
/* --- enums --- */
/*
* Allowed values for the type of security
2022-05-27 00:01:51 -04:00
* being used in a protocomm session
2018-07-30 12:05:03 -04:00
*/
typedef enum _SecSchemeVersion {
/*
2022-05-27 00:01:51 -04:00
* ! < Unsecured - plaintext communication
2018-07-30 12:05:03 -04:00
*/
SEC_SCHEME_VERSION__SecScheme0 = 0 ,
/*
* ! < Security scheme 1 - Curve25519 + AES - 256 - CTR
*/
2022-05-30 05:33:54 -04:00
SEC_SCHEME_VERSION__SecScheme1 = 1 ,
/*
* ! < Security scheme 2 - SRP6a + AES - 256 - GCM
*/
SEC_SCHEME_VERSION__SecScheme2 = 2
2018-07-30 12:05:03 -04:00
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE ( SEC_SCHEME_VERSION )
} SecSchemeVersion ;
/* --- messages --- */
typedef enum {
SESSION_DATA__PROTO__NOT_SET = 0 ,
SESSION_DATA__PROTO_SEC0 = 10 ,
2022-05-30 05:33:54 -04:00
SESSION_DATA__PROTO_SEC1 = 11 ,
SESSION_DATA__PROTO_SEC2 = 12
2022-05-27 00:01:51 -04:00
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE ( SESSION_DATA__PROTO__CASE )
2018-07-30 12:05:03 -04:00
} SessionData__ProtoCase ;
/*
* Data structure exchanged when establishing
2022-05-27 00:01:51 -04:00
* secure session between Host and Client
2018-07-30 12:05:03 -04:00
*/
2022-05-27 00:01:51 -04:00
struct SessionData
2018-07-30 12:05:03 -04:00
{
ProtobufCMessage base ;
/*
2022-05-27 00:01:51 -04:00
* ! < Type of security
2018-07-30 12:05:03 -04:00
*/
SecSchemeVersion sec_ver ;
SessionData__ProtoCase proto_case ;
union {
/*
2022-05-27 00:01:51 -04:00
* ! < Payload data in case of security 0
2018-07-30 12:05:03 -04:00
*/
Sec0Payload * sec0 ;
/*
2022-05-27 00:01:51 -04:00
* ! < Payload data in case of security 1
2018-07-30 12:05:03 -04:00
*/
Sec1Payload * sec1 ;
2022-05-30 05:33:54 -04:00
/*
* ! < Payload data in case of security 2
*/
Sec2Payload * sec2 ;
2018-07-30 12:05:03 -04:00
} ;
} ;
# define SESSION_DATA__INIT \
{ PROTOBUF_C_MESSAGE_INIT ( & session_data__descriptor ) \
, SEC_SCHEME_VERSION__SecScheme0 , SESSION_DATA__PROTO__NOT_SET , { 0 } }
/* SessionData methods */
void session_data__init
( SessionData * message ) ;
size_t session_data__get_packed_size
( const SessionData * message ) ;
size_t session_data__pack
( const SessionData * message ,
uint8_t * out ) ;
size_t session_data__pack_to_buffer
( const SessionData * message ,
ProtobufCBuffer * buffer ) ;
SessionData *
session_data__unpack
( ProtobufCAllocator * allocator ,
size_t len ,
const uint8_t * data ) ;
void session_data__free_unpacked
( SessionData * message ,
ProtobufCAllocator * allocator ) ;
/* --- per-message closures --- */
typedef void ( * SessionData_Closure )
( const SessionData * message ,
void * closure_data ) ;
/* --- services --- */
/* --- descriptors --- */
extern const ProtobufCEnumDescriptor sec_scheme_version__descriptor ;
extern const ProtobufCMessageDescriptor session_data__descriptor ;
PROTOBUF_C__END_DECLS
# endif /* PROTOBUF_C_session_2eproto__INCLUDED */