/*
 * VLIB API definitions Fri Sep 15 08:47:02 2017
 * Input file: vpncrack/vpncrack.api.h
 * Automatically generated: please edit the input file NOT this file!
 */

#if defined(vl_msg_id)||defined(vl_union_id)||defined(vl_printfun) \
 ||defined(vl_endianfun)|| defined(vl_api_version)||defined(vl_typedefs) \
 ||defined(vl_msg_name)||defined(vl_msg_name_crc_list)
/* ok, something was selected */
#else
#warning no content included from vpncrack/vpncrack.api.h
#endif

#define VL_API_PACKED(x) x __attribute__ ((packed))


/****** Message ID / handler enum ******/

#ifdef vl_msg_id
vl_msg_id(VL_API_VPNCRACK_PWH_UPDATE, vl_api_vpncrack_pwh_update_t_handler)
vl_msg_id(VL_API_VPNCRACK_PWH_UPDATE_REPLY, vl_api_vpncrack_pwh_update_reply_t_handler)
vl_msg_id(VL_API_VPNCRACK_PWH_CLEAN, vl_api_vpncrack_pwh_clean_t_handler)
vl_msg_id(VL_API_VPNCRACK_PWH_CLEAN_REPLY, vl_api_vpncrack_pwh_clean_reply_t_handler)
vl_msg_id(VL_API_VPNCRACK_GLOBLE_CONFIG, vl_api_vpncrack_globle_config_t_handler)
vl_msg_id(VL_API_VPNCRACK_GLOBLE_CONFIG_REPLY, vl_api_vpncrack_globle_config_reply_t_handler)
vl_msg_id(VL_API_VPNCRACK_DECRYPT_EVENT, vl_api_vpncrack_decrypt_event_t_handler)
vl_msg_id(VL_API_VPNCRACK_TIMESYNC_EVENT, vl_api_vpncrack_timesync_event_t_handler)
#endif

/****** Message names ******/

#ifdef vl_msg_name
vl_msg_name(vl_api_vpncrack_pwh_update_t, 1)
vl_msg_name(vl_api_vpncrack_pwh_update_reply_t, 1)
vl_msg_name(vl_api_vpncrack_pwh_clean_t, 1)
vl_msg_name(vl_api_vpncrack_pwh_clean_reply_t, 1)
vl_msg_name(vl_api_vpncrack_globle_config_t, 1)
vl_msg_name(vl_api_vpncrack_globle_config_reply_t, 1)
vl_msg_name(vl_api_vpncrack_decrypt_event_t, 1)
vl_msg_name(vl_api_vpncrack_timesync_event_t, 1)
#endif


/****** Message name, crc list ******/

#ifdef vl_msg_name_crc_list
#define foreach_vl_msg_name_crc_vpncrack \
_(VL_API_VPNCRACK_PWH_UPDATE, vpncrack_pwh_update, ed22cbed) \
_(VL_API_VPNCRACK_PWH_UPDATE_REPLY, vpncrack_pwh_update_reply, 91dc1e3b) \
_(VL_API_VPNCRACK_PWH_CLEAN, vpncrack_pwh_clean, 9dde852b) \
_(VL_API_VPNCRACK_PWH_CLEAN_REPLY, vpncrack_pwh_clean_reply, 14354328) \
_(VL_API_VPNCRACK_GLOBLE_CONFIG, vpncrack_globle_config, e8bc54c7) \
_(VL_API_VPNCRACK_GLOBLE_CONFIG_REPLY, vpncrack_globle_config_reply, 8e791ff1) \
_(VL_API_VPNCRACK_DECRYPT_EVENT, vpncrack_decrypt_event, 0fce1b02) \
_(VL_API_VPNCRACK_TIMESYNC_EVENT, vpncrack_timesync_event, 78913a6d) 
#endif


/****** Typedefs *****/

#ifdef vl_typedefs

typedef VL_API_PACKED(struct _vl_api_vpncrack_pwh_update {
    u16 _vl_msg_id;
    u32 client_index;
    u32 context;
    u32 serverip;
    u8 pwh[16];
    u32 ulen;
    u8 username[257];
}) vl_api_vpncrack_pwh_update_t;

typedef VL_API_PACKED(struct _vl_api_vpncrack_pwh_update_reply {
    u16 _vl_msg_id;
    u32 context;
    u32 retval;
}) vl_api_vpncrack_pwh_update_reply_t;

typedef VL_API_PACKED(struct _vl_api_vpncrack_pwh_clean {
    u16 _vl_msg_id;
    u32 client_index;
    u32 context;
}) vl_api_vpncrack_pwh_clean_t;

typedef VL_API_PACKED(struct _vl_api_vpncrack_pwh_clean_reply {
    u16 _vl_msg_id;
    u32 context;
    u32 retval;
}) vl_api_vpncrack_pwh_clean_reply_t;

typedef VL_API_PACKED(struct _vl_api_vpncrack_globle_config {
    u16 _vl_msg_id;
    u32 client_index;
    u32 context;
    u8 is_add;
    u8 global_src_mac[6];
    u32 global_local_ip;
}) vl_api_vpncrack_globle_config_t;

typedef VL_API_PACKED(struct _vl_api_vpncrack_globle_config_reply {
    u16 _vl_msg_id;
    u32 context;
    u32 retval;
}) vl_api_vpncrack_globle_config_reply_t;

typedef VL_API_PACKED(struct _vl_api_vpncrack_decrypt_event {
    u16 _vl_msg_id;
    u32 client_index;
    u32 pid;
    u8 event_type;
    u8 flag;
    u8 username[257];
    u32 userNameLength;
    u32 serverip;
    u32 clientip;
    u64 on_time;
    u8 IMSI[8];
    u8 MSISDN[8];
    u8 challenge_mid[8];
    u8 ntRespond[24];
    u64 off_time;
    u8 ntPasswordHash[16];
    u8 domain_name[255];
    u32 domainNameLength;
}) vl_api_vpncrack_decrypt_event_t;

typedef VL_API_PACKED(struct _vl_api_vpncrack_timesync_event {
    u16 _vl_msg_id;
    u32 client_index;
    u32 pid;
    u8 board_type;
    u8 frame_num;
    u8 event_type;
    u8 seq;
    u8 entry_num;
    u64 timestamp;
    u32 body_len;
}) vl_api_vpncrack_timesync_event_t;

#endif /* vl_typedefs */

/****** Discriminated Union Definitions *****/

#ifdef vl_union_id


#endif /* vl_union_id */

/****** Print functions *****/

#ifdef vl_printfun

#ifdef LP64
#define _uword_fmt "%lld"
#define _uword_cast (long long)
#else
#define _uword_fmt "%ld"
#define _uword_cast long
#endif

static inline void *vl_api_vpncrack_pwh_update_t_print (vl_api_vpncrack_pwh_update_t *a,void *handle)
{
    vl_print(handle, "vl_api_vpncrack_pwh_update_t:\n");
    vl_print(handle, "_vl_msg_id: %u\n", (unsigned) a->_vl_msg_id);
    vl_print(handle, "client_index: %u\n", (unsigned) a->client_index);
    vl_print(handle, "context: %u\n", (unsigned) a->context);
    vl_print(handle, "serverip: %u\n", (unsigned) a->serverip);
    {
        int _i;
        for (_i = 0; _i < 16; _i++) {
            vl_print(handle, "pwh[%d]: %u\n", _i, a->pwh[_i]);
        }
    }
    vl_print(handle, "ulen: %u\n", (unsigned) a->ulen);
    {
        int _i;
        for (_i = 0; _i < 257; _i++) {
            vl_print(handle, "username[%d]: %u\n", _i, a->username[_i]);
        }
    }
    return handle;
}

static inline void *vl_api_vpncrack_pwh_update_reply_t_print (vl_api_vpncrack_pwh_update_reply_t *a,void *handle)
{
    vl_print(handle, "vl_api_vpncrack_pwh_update_reply_t:\n");
    vl_print(handle, "_vl_msg_id: %u\n", (unsigned) a->_vl_msg_id);
    vl_print(handle, "context: %u\n", (unsigned) a->context);
    vl_print(handle, "retval: %u\n", (unsigned) a->retval);
    return handle;
}

static inline void *vl_api_vpncrack_pwh_clean_t_print (vl_api_vpncrack_pwh_clean_t *a,void *handle)
{
    vl_print(handle, "vl_api_vpncrack_pwh_clean_t:\n");
    vl_print(handle, "_vl_msg_id: %u\n", (unsigned) a->_vl_msg_id);
    vl_print(handle, "client_index: %u\n", (unsigned) a->client_index);
    vl_print(handle, "context: %u\n", (unsigned) a->context);
    return handle;
}

static inline void *vl_api_vpncrack_pwh_clean_reply_t_print (vl_api_vpncrack_pwh_clean_reply_t *a,void *handle)
{
    vl_print(handle, "vl_api_vpncrack_pwh_clean_reply_t:\n");
    vl_print(handle, "_vl_msg_id: %u\n", (unsigned) a->_vl_msg_id);
    vl_print(handle, "context: %u\n", (unsigned) a->context);
    vl_print(handle, "retval: %u\n", (unsigned) a->retval);
    return handle;
}

static inline void *vl_api_vpncrack_globle_config_t_print (vl_api_vpncrack_globle_config_t *a,void *handle)
{
    vl_print(handle, "vl_api_vpncrack_globle_config_t:\n");
    vl_print(handle, "_vl_msg_id: %u\n", (unsigned) a->_vl_msg_id);
    vl_print(handle, "client_index: %u\n", (unsigned) a->client_index);
    vl_print(handle, "context: %u\n", (unsigned) a->context);
    vl_print(handle, "is_add: %u\n", (unsigned) a->is_add);
    {
        int _i;
        for (_i = 0; _i < 6; _i++) {
            vl_print(handle, "global_src_mac[%d]: %u\n", _i, a->global_src_mac[_i]);
        }
    }
    vl_print(handle, "global_local_ip: %u\n", (unsigned) a->global_local_ip);
    return handle;
}

static inline void *vl_api_vpncrack_globle_config_reply_t_print (vl_api_vpncrack_globle_config_reply_t *a,void *handle)
{
    vl_print(handle, "vl_api_vpncrack_globle_config_reply_t:\n");
    vl_print(handle, "_vl_msg_id: %u\n", (unsigned) a->_vl_msg_id);
    vl_print(handle, "context: %u\n", (unsigned) a->context);
    vl_print(handle, "retval: %u\n", (unsigned) a->retval);
    return handle;
}

static inline void *vl_api_vpncrack_decrypt_event_t_print (vl_api_vpncrack_decrypt_event_t *a,void *handle)
{
    vl_print(handle, "vl_api_vpncrack_decrypt_event_t:\n");
    vl_print(handle, "_vl_msg_id: %u\n", (unsigned) a->_vl_msg_id);
    vl_print(handle, "client_index: %u\n", (unsigned) a->client_index);
    vl_print(handle, "pid: %u\n", (unsigned) a->pid);
    vl_print(handle, "event_type: %u\n", (unsigned) a->event_type);
    vl_print(handle, "flag: %u\n", (unsigned) a->flag);
    {
        int _i;
        for (_i = 0; _i < 257; _i++) {
            vl_print(handle, "username[%d]: %u\n", _i, a->username[_i]);
        }
    }
    vl_print(handle, "userNameLength: %u\n", (unsigned) a->userNameLength);
    vl_print(handle, "serverip: %u\n", (unsigned) a->serverip);
    vl_print(handle, "clientip: %u\n", (unsigned) a->clientip);
    vl_print(handle, "on_time: %llu\n", (long long) a->on_time);
    {
        int _i;
        for (_i = 0; _i < 8; _i++) {
            vl_print(handle, "IMSI[%d]: %u\n", _i, a->IMSI[_i]);
        }
    }
    {
        int _i;
        for (_i = 0; _i < 8; _i++) {
            vl_print(handle, "MSISDN[%d]: %u\n", _i, a->MSISDN[_i]);
        }
    }
    {
        int _i;
        for (_i = 0; _i < 8; _i++) {
            vl_print(handle, "challenge_mid[%d]: %u\n", _i, a->challenge_mid[_i]);
        }
    }
    {
        int _i;
        for (_i = 0; _i < 24; _i++) {
            vl_print(handle, "ntRespond[%d]: %u\n", _i, a->ntRespond[_i]);
        }
    }
    vl_print(handle, "off_time: %llu\n", (long long) a->off_time);
    {
        int _i;
        for (_i = 0; _i < 16; _i++) {
            vl_print(handle, "ntPasswordHash[%d]: %u\n", _i, a->ntPasswordHash[_i]);
        }
    }
    {
        int _i;
        for (_i = 0; _i < 255; _i++) {
            vl_print(handle, "domain_name[%d]: %u\n", _i, a->domain_name[_i]);
        }
    }
    vl_print(handle, "domainNameLength: %u\n", (unsigned) a->domainNameLength);
    return handle;
}

static inline void *vl_api_vpncrack_timesync_event_t_print (vl_api_vpncrack_timesync_event_t *a,void *handle)
{
    vl_print(handle, "vl_api_vpncrack_timesync_event_t:\n");
    vl_print(handle, "_vl_msg_id: %u\n", (unsigned) a->_vl_msg_id);
    vl_print(handle, "client_index: %u\n", (unsigned) a->client_index);
    vl_print(handle, "pid: %u\n", (unsigned) a->pid);
    vl_print(handle, "board_type: %u\n", (unsigned) a->board_type);
    vl_print(handle, "frame_num: %u\n", (unsigned) a->frame_num);
    vl_print(handle, "event_type: %u\n", (unsigned) a->event_type);
    vl_print(handle, "seq: %u\n", (unsigned) a->seq);
    vl_print(handle, "entry_num: %u\n", (unsigned) a->entry_num);
    vl_print(handle, "timestamp: %llu\n", (long long) a->timestamp);
    vl_print(handle, "body_len: %u\n", (unsigned) a->body_len);
    return handle;
}

#endif /* vl_printfun */


/****** Endian swap functions *****/

#ifdef vl_endianfun

#undef clib_net_to_host_uword
#ifdef LP64
#define clib_net_to_host_uword clib_net_to_host_u64
#else
#define clib_net_to_host_uword clib_net_to_host_u32
#endif

static inline void vl_api_vpncrack_pwh_update_t_endian (vl_api_vpncrack_pwh_update_t *a)
{
    a->_vl_msg_id = clib_net_to_host_u16(a->_vl_msg_id);
    a->client_index = clib_net_to_host_u32(a->client_index);
    a->context = clib_net_to_host_u32(a->context);
    a->serverip = clib_net_to_host_u32(a->serverip);
    /* a->pwh[0..15] = a->pwh[0..15] (no-op) */
    a->ulen = clib_net_to_host_u32(a->ulen);
    /* a->username[0..256] = a->username[0..256] (no-op) */
}

static inline void vl_api_vpncrack_pwh_update_reply_t_endian (vl_api_vpncrack_pwh_update_reply_t *a)
{
    a->_vl_msg_id = clib_net_to_host_u16(a->_vl_msg_id);
    a->context = clib_net_to_host_u32(a->context);
    a->retval = clib_net_to_host_u32(a->retval);
}

static inline void vl_api_vpncrack_pwh_clean_t_endian (vl_api_vpncrack_pwh_clean_t *a)
{
    a->_vl_msg_id = clib_net_to_host_u16(a->_vl_msg_id);
    a->client_index = clib_net_to_host_u32(a->client_index);
    a->context = clib_net_to_host_u32(a->context);
}

static inline void vl_api_vpncrack_pwh_clean_reply_t_endian (vl_api_vpncrack_pwh_clean_reply_t *a)
{
    a->_vl_msg_id = clib_net_to_host_u16(a->_vl_msg_id);
    a->context = clib_net_to_host_u32(a->context);
    a->retval = clib_net_to_host_u32(a->retval);
}

static inline void vl_api_vpncrack_globle_config_t_endian (vl_api_vpncrack_globle_config_t *a)
{
    a->_vl_msg_id = clib_net_to_host_u16(a->_vl_msg_id);
    a->client_index = clib_net_to_host_u32(a->client_index);
    a->context = clib_net_to_host_u32(a->context);
    /* a->is_add = a->is_add (no-op) */
    /* a->global_src_mac[0..5] = a->global_src_mac[0..5] (no-op) */
    a->global_local_ip = clib_net_to_host_u32(a->global_local_ip);
}

static inline void vl_api_vpncrack_globle_config_reply_t_endian (vl_api_vpncrack_globle_config_reply_t *a)
{
    a->_vl_msg_id = clib_net_to_host_u16(a->_vl_msg_id);
    a->context = clib_net_to_host_u32(a->context);
    a->retval = clib_net_to_host_u32(a->retval);
}

static inline void vl_api_vpncrack_decrypt_event_t_endian (vl_api_vpncrack_decrypt_event_t *a)
{
    a->_vl_msg_id = clib_net_to_host_u16(a->_vl_msg_id);
    a->client_index = clib_net_to_host_u32(a->client_index);
    a->pid = clib_net_to_host_u32(a->pid);
    /* a->event_type = a->event_type (no-op) */
    /* a->flag = a->flag (no-op) */
    /* a->username[0..256] = a->username[0..256] (no-op) */
    a->userNameLength = clib_net_to_host_u32(a->userNameLength);
    a->serverip = clib_net_to_host_u32(a->serverip);
    a->clientip = clib_net_to_host_u32(a->clientip);
    a->on_time = clib_net_to_host_u64(a->on_time);
    /* a->IMSI[0..7] = a->IMSI[0..7] (no-op) */
    /* a->MSISDN[0..7] = a->MSISDN[0..7] (no-op) */
    /* a->challenge_mid[0..7] = a->challenge_mid[0..7] (no-op) */
    /* a->ntRespond[0..23] = a->ntRespond[0..23] (no-op) */
    a->off_time = clib_net_to_host_u64(a->off_time);
    /* a->ntPasswordHash[0..15] = a->ntPasswordHash[0..15] (no-op) */
    /* a->domain_name[0..254] = a->domain_name[0..254] (no-op) */
    a->domainNameLength = clib_net_to_host_u32(a->domainNameLength);
}

static inline void vl_api_vpncrack_timesync_event_t_endian (vl_api_vpncrack_timesync_event_t *a)
{
    a->_vl_msg_id = clib_net_to_host_u16(a->_vl_msg_id);
    a->client_index = clib_net_to_host_u32(a->client_index);
    a->pid = clib_net_to_host_u32(a->pid);
    /* a->board_type = a->board_type (no-op) */
    /* a->frame_num = a->frame_num (no-op) */
    /* a->event_type = a->event_type (no-op) */
    /* a->seq = a->seq (no-op) */
    /* a->entry_num = a->entry_num (no-op) */
    a->timestamp = clib_net_to_host_u64(a->timestamp);
    a->body_len = clib_net_to_host_u32(a->body_len);
}

#endif /* vl_endianfun */


#ifdef vl_api_version
vl_api_version(vpncrack.api, 0xb16c0fe5)

#endif

