/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: sk-unix.proto */

#ifndef PROTOBUF_C_sk_2dunix_2eproto__INCLUDED
#define PROTOBUF_C_sk_2dunix_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 protobuf-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1005002 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protobuf-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protobuf-c.
#endif

#include "opts.pb-c.h"
#include "fown.pb-c.h"
#include "sk-opts.pb-c.h"

typedef struct FilePermsEntry FilePermsEntry;
typedef struct UnixSkEntry UnixSkEntry;


/* --- enums --- */


/* --- messages --- */

struct  FilePermsEntry
{
  ProtobufCMessage base;
  uint32_t mode;
  uint32_t uid;
  uint32_t gid;
};
#define FILE_PERMS_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&file_perms_entry__descriptor) \
, 0, 0, 0 }


struct  UnixSkEntry
{
  ProtobufCMessage base;
  /*
   * Few words about why we need both -- id and ino.
   * The former one is used to link file descriptor from
   * fdinfo image with the unix_sk_entry that should be
   * opened under it.
   * The latter one ties together unix peers -- the peer
   * member on this structure is the ino one of its peer
   * and simetimes vise-versa.
   */
  uint32_t id;
  uint32_t ino;
  uint32_t type;
  uint32_t state;
  uint32_t flags;
  uint32_t uflags;
  uint32_t backlog;
  uint32_t peer;
  FownEntry *fown;
  SkOptsEntry *opts;
  /*
   * Abstract name may contain \0 at any point,
   * so we need to carry it as byte sequence...
   */
  ProtobufCBinaryData name;
  protobuf_c_boolean has_shutdown;
  SkShutdown shutdown;
  FilePermsEntry *file_perms;
  /*
   * Relative socket name may have prefix.
   */
  char *name_dir;
  protobuf_c_boolean has_deleted;
  protobuf_c_boolean deleted;
  protobuf_c_boolean has_ns_id;
  uint32_t ns_id;
  /*
   * Please, don't use field with number 18. 
   */
  protobuf_c_boolean has_mnt_id;
  int32_t mnt_id;
};
#define UNIX_SK_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&unix_sk_entry__descriptor) \
, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, {0,NULL}, 0, SK_SHUTDOWN__NONE, NULL, NULL, 0, 0, 0, 0, 0, -1 }


/* FilePermsEntry methods */
void   file_perms_entry__init
                     (FilePermsEntry         *message);
size_t file_perms_entry__get_packed_size
                     (const FilePermsEntry   *message);
size_t file_perms_entry__pack
                     (const FilePermsEntry   *message,
                      uint8_t             *out);
size_t file_perms_entry__pack_to_buffer
                     (const FilePermsEntry   *message,
                      ProtobufCBuffer     *buffer);
FilePermsEntry *
       file_perms_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   file_perms_entry__free_unpacked
                     (FilePermsEntry *message,
                      ProtobufCAllocator *allocator);
/* UnixSkEntry methods */
void   unix_sk_entry__init
                     (UnixSkEntry         *message);
size_t unix_sk_entry__get_packed_size
                     (const UnixSkEntry   *message);
size_t unix_sk_entry__pack
                     (const UnixSkEntry   *message,
                      uint8_t             *out);
size_t unix_sk_entry__pack_to_buffer
                     (const UnixSkEntry   *message,
                      ProtobufCBuffer     *buffer);
UnixSkEntry *
       unix_sk_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   unix_sk_entry__free_unpacked
                     (UnixSkEntry *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*FilePermsEntry_Closure)
                 (const FilePermsEntry *message,
                  void *closure_data);
typedef void (*UnixSkEntry_Closure)
                 (const UnixSkEntry *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCMessageDescriptor file_perms_entry__descriptor;
extern const ProtobufCMessageDescriptor unix_sk_entry__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_sk_2dunix_2eproto__INCLUDED */
