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

#ifndef PROTOBUF_C_sk_2dinet_2eproto__INCLUDED
#define PROTOBUF_C_sk_2dinet_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"
#include "tcp-stream.pb-c.h"

typedef struct IpOptsRawEntry IpOptsRawEntry;
typedef struct IpOptsEntry IpOptsEntry;
typedef struct InetSkEntry InetSkEntry;


/* --- enums --- */


/* --- messages --- */

struct  IpOptsRawEntry
{
  ProtobufCMessage base;
  protobuf_c_boolean has_hdrincl;
  protobuf_c_boolean hdrincl;
  protobuf_c_boolean has_nodefrag;
  protobuf_c_boolean nodefrag;
  protobuf_c_boolean has_checksum;
  protobuf_c_boolean checksum;
  size_t n_icmpv_filter;
  uint32_t *icmpv_filter;
};
#define IP_OPTS_RAW_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&ip_opts_raw_entry__descriptor) \
, 0, 0, 0, 0, 0, 0, 0,NULL }


struct  IpOptsEntry
{
  ProtobufCMessage base;
  protobuf_c_boolean has_freebind;
  protobuf_c_boolean freebind;
  /*
   * Fields 2 and 3 are reserved for vz7 use
   */
  IpOptsRawEntry *raw;
  protobuf_c_boolean has_pktinfo;
  protobuf_c_boolean pktinfo;
  protobuf_c_boolean has_tos;
  uint32_t tos;
  protobuf_c_boolean has_ttl;
  uint32_t ttl;
};
#define IP_OPTS_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&ip_opts_entry__descriptor) \
, 0, 0, NULL, 0, 0, 0, 0, 0, 0 }


struct  InetSkEntry
{
  ProtobufCMessage base;
  /*
   * We have two IDs here -- id and ino. The first one
   * is used when restoring socket behind a file descriprot.
   * The fdinfo image's id is it. The second one is used
   * in sk-inet.c internally, in particular we identify
   * a TCP stream to restore into this socket using the
   * ino value.
   */
  uint32_t id;
  uint32_t ino;
  uint32_t family;
  uint32_t type;
  uint32_t proto;
  uint32_t state;
  uint32_t src_port;
  uint32_t dst_port;
  uint32_t flags;
  uint32_t backlog;
  size_t n_src_addr;
  uint32_t *src_addr;
  size_t n_dst_addr;
  uint32_t *dst_addr;
  FownEntry *fown;
  SkOptsEntry *opts;
  protobuf_c_boolean has_v6only;
  protobuf_c_boolean v6only;
  IpOptsEntry *ip_opts;
  /*
   * for ipv6, we need to send the ifindex to bind(); we keep the ifname
   * here and convert it on restore 
   */
  char *ifname;
  protobuf_c_boolean has_ns_id;
  uint32_t ns_id;
  protobuf_c_boolean has_shutdown;
  SkShutdown shutdown;
  TcpOptsEntry *tcp_opts;
};
#define INET_SK_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&inet_sk_entry__descriptor) \
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,NULL, 0,NULL, NULL, NULL, 0, 0, NULL, NULL, 0, 0, 0, SK_SHUTDOWN__NONE, NULL }


/* IpOptsRawEntry methods */
void   ip_opts_raw_entry__init
                     (IpOptsRawEntry         *message);
size_t ip_opts_raw_entry__get_packed_size
                     (const IpOptsRawEntry   *message);
size_t ip_opts_raw_entry__pack
                     (const IpOptsRawEntry   *message,
                      uint8_t             *out);
size_t ip_opts_raw_entry__pack_to_buffer
                     (const IpOptsRawEntry   *message,
                      ProtobufCBuffer     *buffer);
IpOptsRawEntry *
       ip_opts_raw_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   ip_opts_raw_entry__free_unpacked
                     (IpOptsRawEntry *message,
                      ProtobufCAllocator *allocator);
/* IpOptsEntry methods */
void   ip_opts_entry__init
                     (IpOptsEntry         *message);
size_t ip_opts_entry__get_packed_size
                     (const IpOptsEntry   *message);
size_t ip_opts_entry__pack
                     (const IpOptsEntry   *message,
                      uint8_t             *out);
size_t ip_opts_entry__pack_to_buffer
                     (const IpOptsEntry   *message,
                      ProtobufCBuffer     *buffer);
IpOptsEntry *
       ip_opts_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   ip_opts_entry__free_unpacked
                     (IpOptsEntry *message,
                      ProtobufCAllocator *allocator);
/* InetSkEntry methods */
void   inet_sk_entry__init
                     (InetSkEntry         *message);
size_t inet_sk_entry__get_packed_size
                     (const InetSkEntry   *message);
size_t inet_sk_entry__pack
                     (const InetSkEntry   *message,
                      uint8_t             *out);
size_t inet_sk_entry__pack_to_buffer
                     (const InetSkEntry   *message,
                      ProtobufCBuffer     *buffer);
InetSkEntry *
       inet_sk_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   inet_sk_entry__free_unpacked
                     (InetSkEntry *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*IpOptsRawEntry_Closure)
                 (const IpOptsRawEntry *message,
                  void *closure_data);
typedef void (*IpOptsEntry_Closure)
                 (const IpOptsEntry *message,
                  void *closure_data);
typedef void (*InetSkEntry_Closure)
                 (const InetSkEntry *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCMessageDescriptor ip_opts_raw_entry__descriptor;
extern const ProtobufCMessageDescriptor ip_opts_entry__descriptor;
extern const ProtobufCMessageDescriptor inet_sk_entry__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_sk_2dinet_2eproto__INCLUDED */
