/* Hey Emacs use -*- mode: C -*- */
/*
 * Copyright (c) 2015 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* Define a simple binary API to control the feature */

define vpncrack_pwh_update {
    /* Client identifier, set from api_main.my_client_index */
    u32 client_index;

    /* Arbitrary context, so client can match reply to request */
    u32 context;

    u32 serverip;

    u8 pwh[16];
    u32 ulen;
    u8 username[257];
};
define vpncrack_pwh_update_reply {
    /* Client identifier, set from api_main.my_client_index */
    u32 context;

    /* Arbitrary context, so client can match reply to request */
    u32 retval;

};
define vpncrack_pwh_clean {
    /* Client identifier, set from api_main.my_client_index */
    u32 client_index;

    /* Arbitrary context, so client can match reply to request */
    u32 context;

};
define vpncrack_pwh_clean_reply {
    /* Client identifier, set from api_main.my_client_index */
    u32 context;

    /* Arbitrary context, so client can match reply to request */
    u32 retval;

};
define vpncrack_globle_config {
    /* Client identifier, set from api_main.my_client_index */
    u32 client_index;

    /* Arbitrary context, so client can match reply to request */
    u32 context;
	u8 is_add;
    u8 global_src_mac[6];
    u32 global_local_ip;

};
define vpncrack_globle_config_reply {
    /* Client identifier, set from api_main.my_client_index */
   u32 context;

    /* Arbitrary context, so client can match reply to request */
    u32 retval;

};
/** \brief Tell server the statistics
    @param event_type --user_off,user_on,USER_UPDATE,user_dns 
    @param flag
*/
define vpncrack_decrypt_event
{
   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;
};

define vpncrack_timesync_event
{
   u32 client_index;
   u32 pid;
   u8 board_type;
   u8 frame_num;
   u8 event_type; 
   u8 seq; 
   u8 entry_num;
   u64 timestamp;
   u32 body_len;
};
