2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Update to protobuf-c 1.4.0

This commit is contained in:
Todd C. Miller
2022-06-03 12:50:31 -06:00
parent aee276ea63
commit 71c07579ba
5 changed files with 95 additions and 84 deletions

View File

@@ -10,27 +10,27 @@ 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.
#elif 1003003 < PROTOBUF_C_MIN_COMPILER_VERSION
#elif 1004000 < PROTOBUF_C_MIN_COMPILER_VERSION
# 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
typedef struct _ClientMessage ClientMessage;
typedef struct _TimeSpec TimeSpec;
typedef struct _IoBuffer IoBuffer;
typedef struct _InfoMessage InfoMessage;
typedef struct _InfoMessage__StringList InfoMessage__StringList;
typedef struct _InfoMessage__NumberList InfoMessage__NumberList;
typedef struct _AcceptMessage AcceptMessage;
typedef struct _RejectMessage RejectMessage;
typedef struct _ExitMessage ExitMessage;
typedef struct _AlertMessage AlertMessage;
typedef struct _RestartMessage RestartMessage;
typedef struct _ChangeWindowSize ChangeWindowSize;
typedef struct _CommandSuspend CommandSuspend;
typedef struct _ClientHello ClientHello;
typedef struct _ServerMessage ServerMessage;
typedef struct _ServerHello ServerHello;
typedef struct ClientMessage ClientMessage;
typedef struct TimeSpec TimeSpec;
typedef struct IoBuffer IoBuffer;
typedef struct InfoMessage InfoMessage;
typedef struct InfoMessage__StringList InfoMessage__StringList;
typedef struct InfoMessage__NumberList InfoMessage__NumberList;
typedef struct AcceptMessage AcceptMessage;
typedef struct RejectMessage RejectMessage;
typedef struct ExitMessage ExitMessage;
typedef struct AlertMessage AlertMessage;
typedef struct RestartMessage RestartMessage;
typedef struct ChangeWindowSize ChangeWindowSize;
typedef struct CommandSuspend CommandSuspend;
typedef struct ClientHello ClientHello;
typedef struct ServerMessage ServerMessage;
typedef struct ServerHello ServerHello;
/* --- enums --- */
@@ -53,14 +53,14 @@ typedef enum {
CLIENT_MESSAGE__TYPE_WINSIZE_EVENT = 11,
CLIENT_MESSAGE__TYPE_SUSPEND_EVENT = 12,
CLIENT_MESSAGE__TYPE_HELLO_MSG = 13
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CLIENT_MESSAGE__TYPE)
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CLIENT_MESSAGE__TYPE__CASE)
} ClientMessage__TypeCase;
/*
* Client message to the server. Messages on the wire are
* prefixed with a 32-bit size in network byte order.
*/
struct _ClientMessage
struct ClientMessage
{
ProtobufCMessage base;
ClientMessage__TypeCase type_case;
@@ -88,7 +88,7 @@ struct _ClientMessage
/*
* Equivalent of POSIX struct timespec
*/
struct _TimeSpec
struct TimeSpec
{
ProtobufCMessage base;
/*
@@ -108,7 +108,7 @@ struct _TimeSpec
/*
* I/O buffer with keystroke data
*/
struct _IoBuffer
struct IoBuffer
{
ProtobufCMessage base;
/*
@@ -125,7 +125,7 @@ struct _IoBuffer
, NULL, {0,NULL} }
struct _InfoMessage__StringList
struct InfoMessage__StringList
{
ProtobufCMessage base;
size_t n_strings;
@@ -136,7 +136,7 @@ struct _InfoMessage__StringList
, 0,NULL }
struct _InfoMessage__NumberList
struct InfoMessage__NumberList
{
ProtobufCMessage base;
size_t n_numbers;
@@ -153,14 +153,14 @@ typedef enum {
INFO_MESSAGE__VALUE_STRVAL = 3,
INFO_MESSAGE__VALUE_STRLISTVAL = 4,
INFO_MESSAGE__VALUE_NUMLISTVAL = 5
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(INFO_MESSAGE__VALUE)
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(INFO_MESSAGE__VALUE__CASE)
} InfoMessage__ValueCase;
/*
* Key/value pairs, like Privilege Manager struct info.
* The value may be a number, a string, or a list of strings.
*/
struct _InfoMessage
struct InfoMessage
{
ProtobufCMessage base;
char *key;
@@ -180,7 +180,7 @@ struct _InfoMessage
/*
* Event log data for command accepted by the policy.
*/
struct _AcceptMessage
struct AcceptMessage
{
ProtobufCMessage base;
/*
@@ -205,7 +205,7 @@ struct _AcceptMessage
/*
* Event log data for command rejected by the policy.
*/
struct _RejectMessage
struct RejectMessage
{
ProtobufCMessage base;
/*
@@ -230,7 +230,7 @@ struct _RejectMessage
/*
* Might revisit runtime and use end_time instead
*/
struct _ExitMessage
struct ExitMessage
{
ProtobufCMessage base;
/*
@@ -262,7 +262,7 @@ struct _ExitMessage
/*
* Alert message, policy module-specific.
*/
struct _AlertMessage
struct AlertMessage
{
ProtobufCMessage base;
/*
@@ -287,7 +287,7 @@ struct _AlertMessage
/*
* Used to restart an existing I/O log on the server.
*/
struct _RestartMessage
struct RestartMessage
{
ProtobufCMessage base;
/*
@@ -307,7 +307,7 @@ struct _RestartMessage
/*
* Window size change event.
*/
struct _ChangeWindowSize
struct ChangeWindowSize
{
ProtobufCMessage base;
/*
@@ -331,7 +331,7 @@ struct _ChangeWindowSize
/*
* Command suspend/resume event.
*/
struct _CommandSuspend
struct CommandSuspend
{
ProtobufCMessage base;
/*
@@ -351,7 +351,7 @@ struct _CommandSuspend
/*
* Hello message from client when connecting to server.
*/
struct _ClientHello
struct ClientHello
{
ProtobufCMessage base;
/*
@@ -371,14 +371,14 @@ typedef enum {
SERVER_MESSAGE__TYPE_LOG_ID = 3,
SERVER_MESSAGE__TYPE_ERROR = 4,
SERVER_MESSAGE__TYPE_ABORT = 5
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SERVER_MESSAGE__TYPE)
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SERVER_MESSAGE__TYPE__CASE)
} ServerMessage__TypeCase;
/*
* Server messages to the client. Messages on the wire are
* prefixed with a 32-bit size in network byte order.
*/
struct _ServerMessage
struct ServerMessage
{
ProtobufCMessage base;
ServerMessage__TypeCase type_case;
@@ -413,7 +413,7 @@ struct _ServerMessage
/*
* Hello message from server when client connects.
*/
struct _ServerHello
struct ServerHello
{
ProtobufCMessage base;
/*