/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#ifndef _VIRNETPROTOCOL_H_RPCGEN
#define _VIRNETPROTOCOL_H_RPCGEN

#include <rpc/rpc.h>


#ifdef __cplusplus
extern "C" {
#endif

#include "internal.h"
#include "virxdrdefs.h"
#include <arpa/inet.h>
#define VIR_NET_MESSAGE_INITIAL 65536
#define VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX 262120
#define VIR_NET_MESSAGE_MAX 33554432
#define VIR_NET_MESSAGE_HEADER_MAX 24
#define VIR_NET_MESSAGE_PAYLOAD_MAX 33554408
#define VIR_NET_MESSAGE_LEN_MAX 4
#define VIR_NET_MESSAGE_STRING_MAX 4194304
#define VIR_NET_MESSAGE_NUM_FDS_MAX 32

enum virNetMessageType {
        VIR_NET_CALL = 0,
        VIR_NET_REPLY = 1,
        VIR_NET_MESSAGE = 2,
        VIR_NET_STREAM = 3,
        VIR_NET_CALL_WITH_FDS = 4,
        VIR_NET_REPLY_WITH_FDS = 5,
        VIR_NET_STREAM_HOLE = 6,
};
typedef enum virNetMessageType virNetMessageType;

enum virNetMessageStatus {
        VIR_NET_OK = 0,
        VIR_NET_ERROR = 1,
        VIR_NET_CONTINUE = 2,
};
typedef enum virNetMessageStatus virNetMessageStatus;
#define VIR_NET_MESSAGE_HEADER_XDR_LEN 4

struct virNetMessageHeader {
        u_int prog;
        u_int vers;
        int proc;
        virNetMessageType type;
        u_int serial;
        virNetMessageStatus status;
};
typedef struct virNetMessageHeader virNetMessageHeader;

typedef char virNetMessageUUID[VIR_UUID_BUFLEN];

typedef char *virNetMessageNonnullString;

typedef virNetMessageNonnullString *virNetMessageString;

struct virNetMessageNonnullDomain {
        virNetMessageNonnullString name;
        virNetMessageUUID uuid;
        int id;
};
typedef struct virNetMessageNonnullDomain virNetMessageNonnullDomain;

struct virNetMessageNonnullNetwork {
        virNetMessageNonnullString name;
        virNetMessageUUID uuid;
};
typedef struct virNetMessageNonnullNetwork virNetMessageNonnullNetwork;

typedef virNetMessageNonnullDomain *virNetMessageDomain;

typedef virNetMessageNonnullNetwork *virNetMessageNetwork;

struct virNetMessageError {
        int code;
        int domain;
        virNetMessageString message;
        int level;
        virNetMessageDomain dom;
        virNetMessageString str1;
        virNetMessageString str2;
        virNetMessageString str3;
        int int1;
        int int2;
        virNetMessageNetwork net;
};
typedef struct virNetMessageError virNetMessageError;

struct virNetStreamHole {
        int64_t length;
        u_int flags;
};
typedef struct virNetStreamHole virNetStreamHole;

/* the xdr functions */

#if defined(__STDC__) || defined(__cplusplus)
extern  bool_t xdr_virNetMessageType (XDR *, virNetMessageType*);
extern  bool_t xdr_virNetMessageStatus (XDR *, virNetMessageStatus*);
extern  bool_t xdr_virNetMessageHeader (XDR *, virNetMessageHeader*);
extern  bool_t xdr_virNetMessageUUID (XDR *, virNetMessageUUID);
extern  bool_t xdr_virNetMessageNonnullString (XDR *, virNetMessageNonnullString*);
extern  bool_t xdr_virNetMessageString (XDR *, virNetMessageString*);
extern  bool_t xdr_virNetMessageNonnullDomain (XDR *, virNetMessageNonnullDomain*);
extern  bool_t xdr_virNetMessageNonnullNetwork (XDR *, virNetMessageNonnullNetwork*);
extern  bool_t xdr_virNetMessageDomain (XDR *, virNetMessageDomain*);
extern  bool_t xdr_virNetMessageNetwork (XDR *, virNetMessageNetwork*);
extern  bool_t xdr_virNetMessageError (XDR *, virNetMessageError*);
extern  bool_t xdr_virNetStreamHole (XDR *, virNetStreamHole*);

#else /* K&R C */
extern bool_t xdr_virNetMessageType ();
extern bool_t xdr_virNetMessageStatus ();
extern bool_t xdr_virNetMessageHeader ();
extern bool_t xdr_virNetMessageUUID ();
extern bool_t xdr_virNetMessageNonnullString ();
extern bool_t xdr_virNetMessageString ();
extern bool_t xdr_virNetMessageNonnullDomain ();
extern bool_t xdr_virNetMessageNonnullNetwork ();
extern bool_t xdr_virNetMessageDomain ();
extern bool_t xdr_virNetMessageNetwork ();
extern bool_t xdr_virNetMessageError ();
extern bool_t xdr_virNetStreamHole ();

#endif /* K&R C */

#ifdef __cplusplus
}
#endif

#endif /* !_VIRNETPROTOCOL_H_RPCGEN */
