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

/* Do not generate deprecated warnings for self */
#ifndef PROTOBUF_C__NO_DEPRECATED
#define PROTOBUF_C__NO_DEPRECATED
#endif

#include "memfd.pb-c.h"
void   memfd_file_entry__init
                     (MemfdFileEntry         *message)
{
  static const MemfdFileEntry init_value = MEMFD_FILE_ENTRY__INIT;
  *message = init_value;
}
size_t memfd_file_entry__get_packed_size
                     (const MemfdFileEntry *message)
{
  assert(message->base.descriptor == &memfd_file_entry__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t memfd_file_entry__pack
                     (const MemfdFileEntry *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &memfd_file_entry__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t memfd_file_entry__pack_to_buffer
                     (const MemfdFileEntry *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &memfd_file_entry__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
MemfdFileEntry *
       memfd_file_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (MemfdFileEntry *)
     protobuf_c_message_unpack (&memfd_file_entry__descriptor,
                                allocator, len, data);
}
void   memfd_file_entry__free_unpacked
                     (MemfdFileEntry *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &memfd_file_entry__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   memfd_inode_entry__init
                     (MemfdInodeEntry         *message)
{
  static const MemfdInodeEntry init_value = MEMFD_INODE_ENTRY__INIT;
  *message = init_value;
}
size_t memfd_inode_entry__get_packed_size
                     (const MemfdInodeEntry *message)
{
  assert(message->base.descriptor == &memfd_inode_entry__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t memfd_inode_entry__pack
                     (const MemfdInodeEntry *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &memfd_inode_entry__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t memfd_inode_entry__pack_to_buffer
                     (const MemfdInodeEntry *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &memfd_inode_entry__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
MemfdInodeEntry *
       memfd_inode_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (MemfdInodeEntry *)
     protobuf_c_message_unpack (&memfd_inode_entry__descriptor,
                                allocator, len, data);
}
void   memfd_inode_entry__free_unpacked
                     (MemfdInodeEntry *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &memfd_inode_entry__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor memfd_file_entry__field_descriptors[5] =
{
  {
    "id",
    1,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_UINT32,
    0,   /* quantifier_offset */
    offsetof(MemfdFileEntry, id),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "flags",
    2,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_UINT32,
    0,   /* quantifier_offset */
    offsetof(MemfdFileEntry, flags),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "pos",
    3,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_UINT64,
    0,   /* quantifier_offset */
    offsetof(MemfdFileEntry, pos),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "fown",
    4,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_MESSAGE,
    0,   /* quantifier_offset */
    offsetof(MemfdFileEntry, fown),
    &fown_entry__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "inode_id",
    5,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_UINT32,
    0,   /* quantifier_offset */
    offsetof(MemfdFileEntry, inode_id),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned memfd_file_entry__field_indices_by_name[] = {
  1,   /* field[1] = flags */
  3,   /* field[3] = fown */
  0,   /* field[0] = id */
  4,   /* field[4] = inode_id */
  2,   /* field[2] = pos */
};
static const ProtobufCIntRange memfd_file_entry__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 5 }
};
const ProtobufCMessageDescriptor memfd_file_entry__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "memfd_file_entry",
  "MemfdFileEntry",
  "MemfdFileEntry",
  "",
  sizeof(MemfdFileEntry),
  5,
  memfd_file_entry__field_descriptors,
  memfd_file_entry__field_indices_by_name,
  1,  memfd_file_entry__number_ranges,
  (ProtobufCMessageInit) memfd_file_entry__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor memfd_inode_entry__field_descriptors[9] =
{
  {
    "name",
    1,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(MemfdInodeEntry, name),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "uid",
    2,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_UINT32,
    0,   /* quantifier_offset */
    offsetof(MemfdInodeEntry, uid),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "gid",
    3,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_UINT32,
    0,   /* quantifier_offset */
    offsetof(MemfdInodeEntry, gid),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "size",
    4,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_UINT64,
    0,   /* quantifier_offset */
    offsetof(MemfdInodeEntry, size),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "shmid",
    5,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_UINT32,
    0,   /* quantifier_offset */
    offsetof(MemfdInodeEntry, shmid),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "seals",
    6,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_UINT32,
    0,   /* quantifier_offset */
    offsetof(MemfdInodeEntry, seals),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "inode_id",
    7,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_UINT64,
    0,   /* quantifier_offset */
    offsetof(MemfdInodeEntry, inode_id),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "hugetlb_flag",
    8,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_UINT32,
    offsetof(MemfdInodeEntry, has_hugetlb_flag),
    offsetof(MemfdInodeEntry, hugetlb_flag),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "mode",
    9,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_UINT32,
    offsetof(MemfdInodeEntry, has_mode),
    offsetof(MemfdInodeEntry, mode),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned memfd_inode_entry__field_indices_by_name[] = {
  2,   /* field[2] = gid */
  7,   /* field[7] = hugetlb_flag */
  6,   /* field[6] = inode_id */
  8,   /* field[8] = mode */
  0,   /* field[0] = name */
  5,   /* field[5] = seals */
  4,   /* field[4] = shmid */
  3,   /* field[3] = size */
  1,   /* field[1] = uid */
};
static const ProtobufCIntRange memfd_inode_entry__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 9 }
};
const ProtobufCMessageDescriptor memfd_inode_entry__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "memfd_inode_entry",
  "MemfdInodeEntry",
  "MemfdInodeEntry",
  "",
  sizeof(MemfdInodeEntry),
  9,
  memfd_inode_entry__field_descriptors,
  memfd_inode_entry__field_indices_by_name,
  1,  memfd_inode_entry__number_ranges,
  (ProtobufCMessageInit) memfd_inode_entry__init,
  NULL,NULL,NULL    /* reserved[123] */
};
