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

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

#include "tun.pb-c.h"
void   tunfile_entry__init
                     (TunfileEntry         *message)
{
  static const TunfileEntry init_value = TUNFILE_ENTRY__INIT;
  *message = init_value;
}
size_t tunfile_entry__get_packed_size
                     (const TunfileEntry *message)
{
  assert(message->base.descriptor == &tunfile_entry__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tunfile_entry__pack
                     (const TunfileEntry *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &tunfile_entry__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tunfile_entry__pack_to_buffer
                     (const TunfileEntry *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &tunfile_entry__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
TunfileEntry *
       tunfile_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (TunfileEntry *)
     protobuf_c_message_unpack (&tunfile_entry__descriptor,
                                allocator, len, data);
}
void   tunfile_entry__free_unpacked
                     (TunfileEntry *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &tunfile_entry__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   tun_link_entry__init
                     (TunLinkEntry         *message)
{
  static const TunLinkEntry init_value = TUN_LINK_ENTRY__INIT;
  *message = init_value;
}
size_t tun_link_entry__get_packed_size
                     (const TunLinkEntry *message)
{
  assert(message->base.descriptor == &tun_link_entry__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tun_link_entry__pack
                     (const TunLinkEntry *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &tun_link_entry__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tun_link_entry__pack_to_buffer
                     (const TunLinkEntry *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &tun_link_entry__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
TunLinkEntry *
       tun_link_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (TunLinkEntry *)
     protobuf_c_message_unpack (&tun_link_entry__descriptor,
                                allocator, len, data);
}
void   tun_link_entry__free_unpacked
                     (TunLinkEntry *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &tun_link_entry__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor tunfile_entry__field_descriptors[4] =
{
  {
    "id",
    1,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_UINT32,
    0,   /* quantifier_offset */
    offsetof(TunfileEntry, id),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "netdev",
    2,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(TunfileEntry, netdev),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "detached",
    3,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_BOOL,
    offsetof(TunfileEntry, has_detached),
    offsetof(TunfileEntry, detached),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "ns_id",
    4,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_UINT32,
    offsetof(TunfileEntry, has_ns_id),
    offsetof(TunfileEntry, ns_id),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned tunfile_entry__field_indices_by_name[] = {
  2,   /* field[2] = detached */
  0,   /* field[0] = id */
  1,   /* field[1] = netdev */
  3,   /* field[3] = ns_id */
};
static const ProtobufCIntRange tunfile_entry__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 4 }
};
const ProtobufCMessageDescriptor tunfile_entry__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "tunfile_entry",
  "TunfileEntry",
  "TunfileEntry",
  "",
  sizeof(TunfileEntry),
  4,
  tunfile_entry__field_descriptors,
  tunfile_entry__field_indices_by_name,
  1,  tunfile_entry__number_ranges,
  (ProtobufCMessageInit) tunfile_entry__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor tun_link_entry__field_descriptors[5] =
{
  {
    "flags",
    1,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_UINT32,
    0,   /* quantifier_offset */
    offsetof(TunLinkEntry, flags),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "owner",
    2,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_INT32,
    0,   /* quantifier_offset */
    offsetof(TunLinkEntry, owner),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "group",
    3,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_INT32,
    0,   /* quantifier_offset */
    offsetof(TunLinkEntry, group),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "vnethdr",
    4,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_UINT32,
    0,   /* quantifier_offset */
    offsetof(TunLinkEntry, vnethdr),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "sndbuf",
    5,
    PROTOBUF_C_LABEL_REQUIRED,
    PROTOBUF_C_TYPE_UINT32,
    0,   /* quantifier_offset */
    offsetof(TunLinkEntry, sndbuf),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned tun_link_entry__field_indices_by_name[] = {
  0,   /* field[0] = flags */
  2,   /* field[2] = group */
  1,   /* field[1] = owner */
  4,   /* field[4] = sndbuf */
  3,   /* field[3] = vnethdr */
};
static const ProtobufCIntRange tun_link_entry__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 5 }
};
const ProtobufCMessageDescriptor tun_link_entry__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "tun_link_entry",
  "TunLinkEntry",
  "TunLinkEntry",
  "",
  sizeof(TunLinkEntry),
  5,
  tun_link_entry__field_descriptors,
  tun_link_entry__field_indices_by_name,
  1,  tun_link_entry__number_ranges,
  (ProtobufCMessageInit) tun_link_entry__init,
  NULL,NULL,NULL    /* reserved[123] */
};
