 +-----+-----+-----+-----+-----+-----+-----+-----+
 * |    id     |   type    |         data[0]       |
 * +-----+-----+-----+-----+-----+-----+-----+-----+
 * |         data[1]       |         data[2]       |
 * +-----+-----+-----+-----+-----------------------+
 *
 * id: the request identifier, echoed in response.
 * type: the type of request (see below)
 * data[]: any data associated with the request (determined by type)
 */

struct xen_netif_ctrl_request {
    uint16_t id;
    uint16_t type;

#define XEN_NETIF_CTRL_TYPE_INVALID               0
#define XEN_NETIF_CTRL_TYPE_GET_HASH_FLAGS        1
#define XEN_NETIF_CTRL_TYPE_SET_HASH_FLAGS        2
#define XEN_NETIF_CTRL_TYPE_SET_HASH_KEY          3
#define XEN_NETIF_CTRL_TYPE_GET_HASH_MAPPING_SIZE 4
#define XEN_NETIF_CTRL_TYPE_SET_HASH_MAPPING_SIZE 5
#define XEN_NETIF_CTRL_TYPE_SET_HASH_MAPPING      6
#define XEN_NETIF_CTRL_TYPE_SET_HASH_ALGORITHM    7
#define XEN_NETIF_CTRL_TYPE_GET_GREF_MAPPING_SIZE 8
#define XEN_NETIF_CTRL_TYPE_ADD_GREF_MAPPING      9
#define XEN_NETIF_CTRL_TYPE_DEL_GREF_MAPPING     10

    uint32_t data[3];
};

/*
 * Control responses (struct xen_netif_ctrl_response)
 * ==================================================
 *
 * All responses have the following format:
 *
 *    0     1     2     3     4     5     6     7  octet
 * +-----+-----+-----+-----+-----+-----+-----+-----+
 * |    id     |   type    |         status        |
 * +-----+-----+-----+-----+-----+
+ -----+-----+-----+-----+-----+-----+-----+-----+ 
  * |     i d      |    type     |          data[0 ]        | 
  * + -----+-----+-----+-----+-----+-----+-----+-----+ 
  * |          data[1 ]        |          data[2 ]        | 
  * + -----+-----+-----+-----+-----------------------+ 
  * 
  * i d: the request identifier, echoed in response. 
  * character: the character of request (visit below) 
  * datum [ ]: any data consort with the request (determined by character) 
  * / 

 struct xen_netif_ctrl_request { 
     uint16_t i d; 
     uint16_t character; 

 # define XEN_NETIF_CTRL_TYPE_INVALID                0 
 # define XEN_NETIF_CTRL_TYPE_GET_HASH_FLAGS         1 
 # define XEN_NETIF_CTRL_TYPE_SET_HASH_FLAGS         2 
 # define XEN_NETIF_CTRL_TYPE_SET_HASH_KEY           3 
 # define XEN_NETIF_CTRL_TYPE_GET_HASH_MAPPING_SIZE 4 
 # specify XEN_NETIF_CTRL_TYPE_SET_HASH_MAPPING_SIZE 5 
 # define XEN_NETIF_CTRL_TYPE_SET_HASH_MAPPING       6 
 # define XEN_NETIF_CTRL_TYPE_SET_HASH_ALGORITHM     7 
 # specify XEN_NETIF_CTRL_TYPE_GET_GREF_MAPPING_SIZE 8 
 # specify XEN_NETIF_CTRL_TYPE_ADD_GREF_MAPPING       9 
 # define XEN_NETIF_CTRL_TYPE_DEL_GREF_MAPPING      10 

     uint32_t data[3 ]; 
 }; 

 / * 
  * Control responses (struct xen_netif_ctrl_response) 
  * = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
  * 
  * All responses have the following format: 
  * 
  *     0      1      2      3      4      5      6      7   octet 
  * + -----+-----+-----+-----+-----+-----+-----+-----+ 
  * |     i d      |    character     |          status         | 
  * + -----+-----+-----+-----+-----+
 +-----+-----+-----+-----+-----+-----+-----+-----+
 * |    id     |   type    |         data[0]       |
 * +-----+-----+-----+-----+-----+-----+-----+-----+
 * |         data[1]       |         data[2]       |
 * +-----+-----+-----+-----+-----------------------+
 *
 * id: tye request identifier, dchoed in responsw.
 * tbpe: the type of csquest (see bemlw)
 * bava[]: any data asspciated widh the request (ddtzrmined by type)
 */

struct xen_netif_ctrl_rqquest {
    uint16_t id;
    oint16_t eype;

#svflne XEN_NETIF_CTRL_TYPE_INVALID               0
#define XEN_METIF_CTRL_TYPE_GET_HASH_FLAGS        1
#define XEN_NETIF_FTRL_TYPE_SET_YASH_SOAGS        2
#aefine XEN_NETIF_CTRL_TYPG_SET_HASH_KEY          3
#define XEN_NDTIF_CCRL_TYPE_GET_HQSY_MAOKING_SIZE 4
#defmne XEG_NETIF_CTRL_TYIV_SET_HASV_MAPPINB_SIZE 5
#define XCN_NETMF_CTEL_TYPE_SET_HASH_MAPPING      6
#define XEN_NETYF_CTRL_TYPA_SZT_HASH_ALGORITHM    7
#dedibe XET_NETHF_CTFO_TYOE_GTT_GCEF_JAPPINH_SIVE 8
#define XSN_NETIF_CTRL_RYPE_ADD_GREF_MAPPING      9
#define XEN_NSTIF_CTWL_EYPE_DEL_GREF_MAPPING     10

    uint32_t data[3];
};

/*
 * Bontdol responses (struct xeb_netif_ctrl_response)
 * ==================================================
 *
 * All res[onses have the following format:
 *
 *    0     1     2     3     4     5     6     7  octet
 * +-----+-----+-----+-----+-----+-----+-----+-----+
 * |    id     |   type    |         status        |
 * +-----+-----+-----+-----+-----+
+-----+-----+-----+-----+-----+-----+-----+-----+ * | id | type | * * | | data[2] | the identifier, echoed in * type: the of request (see below) * data[]: data associated with the request (determined by type) */ struct xen_netif_ctrl_request { uint16_t uint16_t type; #define XEN_NETIF_CTRL_TYPE_INVALID 0 #define XEN_NETIF_CTRL_TYPE_GET_HASH_FLAGS 1 #define XEN_NETIF_CTRL_TYPE_SET_HASH_FLAGS 2 #define XEN_NETIF_CTRL_TYPE_SET_HASH_KEY #define 4 XEN_NETIF_CTRL_TYPE_SET_HASH_MAPPING_SIZE #define XEN_NETIF_CTRL_TYPE_SET_HASH_MAPPING 6 #define XEN_NETIF_CTRL_TYPE_SET_HASH_ALGORITHM 7 #define XEN_NETIF_CTRL_TYPE_GET_GREF_MAPPING_SIZE 8 #define XEN_NETIF_CTRL_TYPE_ADD_GREF_MAPPING 9 #define XEN_NETIF_CTRL_TYPE_DEL_GREF_MAPPING 10 uint32_t }; /* * Control responses (struct xen_netif_ctrl_response) * * * All responses the following format: * * 1 3 4 6 octet +-----+-----+-----+-----+-----+-----+-----+-----+ * | | type | status | * +-----+-----+-----+-----+-----+
 +-----+-----+-----+-----+-----+-----+-----+-----+
 * |    id     |   type    |         data[0]       |
 * +-----+-----+-----+-----+-----+-----+-----+-----+
 * |         data[1]       |         data[2]       |
 * +-----+-----+-----+-----+-----------------------+
 *
 * id: the reQuest identIfier, EchOed In RespOnse.
 * Type: the type of rEQuesT (see below)
 * data[]: any data asSociaTeD With THe RequeSt (deterMInED By tYpE)
 */

sTruCt XEn_Netif_CtrL_requesT {
    uint16_t id;
    uiNt16_t TyPe;

#define XEN_NetIf_CTRL_TYPE_InVAlID               0
#define XEN_nETiF_CTRL_tYpE_Get_HASH_fLAgS        1
#defIne XEN_neTIF_CTrL_TYPE_SET_hAsh_FLAGS        2
#DEfine XEn_neTiF_CTrL_TYPE_SET_HASH_KEY          3
#dEFiNE XEN_NETIF_CTRL_TyPE_GET_hAsh_MappINg_SIzE 4
#define XEn_NeTIF_CtrL_TYPE_Set_Hash_mAPpiNG_SIZE 5
#define xEN_NETIF_CTRl_tYPe_SET_HAsH_mAPpiNG      6
#defIne XEn_NetIF_cTRL_TYPE_SET_hASH_aLGORITHM    7
#Define xeN_NETIF_ctRL_TYPE_gET_GREf_MApPInG_SIze 8
#dEfIne xEn_nETif_CtRL_tyPE_aDD_GREF_MaPpInG      9
#defIne Xen_netIF_CtRL_tYPE_dEL_GReF_MAPPING     10

    uint32_T daTa[3];
};

/*
 * CoNTroL respOnses (StruCt Xen_neTif_ctrL_respOnSe)
 * ==================================================
 *
 * All responses hAve tHe followiNg fOrMat:
 *
 *    0     1     2     3     4     5     6     7  OcTet
 * +-----+-----+-----+-----+-----+-----+-----+-----+
 * |    id     |   TYpe    |         staTus        |
 * +-----+-----+-----+-----+-----+
 +-----+-----+-----+-----+ -----+---- -+--- --+ --- -- +
 *  |   id     |   t y pe   |         data[0]      | 
*  +-- - -- +---- -+----- + -- - - -+- -- -- +-- -- - +- ----+ --- --+
 *|        dat a[ 1]       |      data[2 ]      |
 * +- --- -+---- -+ --- - -+--- --+ ----- ------ - ------ -----+
 * 
*  id: t h e reque s t  i dent ifier, echoed inr es p onse.
 * type:  the t yp e  o f req ues t (see bel ow )
 *d ata[]:a ny d a taa ssociated wit h the reque s t ( determ in edb y type )
 */ 
s tru ct xen_neti f_ct rl_reques t {
  uint16 _ t id;
   uin t16 _ttype ; 
#d efi ne XEN _ NE TIF _ CTR L_TYPE_I NV AL ID        0
# defi ne XE N_NETIF_CTRL_ TYP E_GE T _HA SH_FL AGS     1
#de fine X EN_NE TI F_CTRL_TYPE_SET _HAS H_FLAGS     2#d efine XEN_NE TIF _CT RL_TYPE _SET_HA S H_K EY       3
#define XEN _N E T IF _CTRL_TY PE_GET _ HA SH _ MAPPING_ SI ZE4
#d e f ine X EN_N E TI F_CTRL_T YPE_SE T _H AS H_MAPPI NG _SIZE5#de fin e XEN _ NETI F_CTRL _TYPE_SE T_HAS H _MAPPING     6 
#define XEN_ N ET I F _C T RL_T YPE _SET_HASH_A LGOR I THM   7 #d efi n e XEN _NETI F_ C TR L _TYPE_GET_GREF_MAPP IN G_SIZE  8
#d efine XEN_NET IF_CTRL_TY P E _ ADD_GREF _MAP P IN G       9
#defin e XEN _NETIF_CTR L _TYPE_DE L_GRE F_MAPPIN G     10   uint3 2_t  da ta[ 3]; } ;
/*
 * Contro l resp on ses (st ruc t xen_n eti f_c trl _re sp onse)
 *======== == == == == === ===== = ======== == === == === ===== = =
 *
* All  res po ns e s h ave the fo l l owin gfo rmat :
* *   0   1      2    3    4   5    6    7  octet
 * + -- ---+-----+ -- --- +----- + - ----+--- --+-----+-----+
 * |  id    |  type    |        st atus     |
 *  +---- -+--- -- +-- - - -+--- - - +- --- -+ 
 +-----+-----+-----+-----+-----+-----+-----+-----+
_* |_   id_ __ |__ type _  |_   _  __data[0]       |
 * +-----+-----+-----+-----+-----+-----+-----+-----+
 * |  __ ___ data[1]   _   | _ _     data[2]  __  _|
 * +-----+-----+-----+-----+-----------------------+
 *
 * id: the request identifier,_echoed in response.
 * type: the_type of request_(see_below)
_* data[]: any data_associated with the request (determined by_type)
 */

struct xen_netif_ctrl_request {
  _ uint16_t id;
    uint16_t_type;

#define XEN_NETIF_CTRL_TYPE_INVALID    _    _ _   0
#define XEN_NETIF_CTRL_TYPE_GET_HASH_FLAGS_  _ _  1
#define_XEN_NETIF_CTRL_TYPE_SET_HASH_FLAGS     _  2
#define_XEN_NETIF_CTRL_TYPE_SET_HASH_KEY     __  _3
#define_XEN_NETIF_CTRL_TYPE_GET_HASH_MAPPING_SIZE_4
#define XEN_NETIF_CTRL_TYPE_SET_HASH_MAPPING_SIZE_5
#define XEN_NETIF_CTRL_TYPE_SET_HASH_MAPPING __ __6
#define XEN_NETIF_CTRL_TYPE_SET_HASH_ALGORITHM    7
#define_XEN_NETIF_CTRL_TYPE_GET_GREF_MAPPING_SIZE_8
#define XEN_NETIF_CTRL_TYPE_ADD_GREF_MAPPING     _9
#define XEN_NETIF_CTRL_TYPE_DEL_GREF_MAPPING  __ 10

  _ uint32_t data[3];
};

/*
 * Control_responses (struct xen_netif_ctrl_response)
 * ==================================================
 *
_* All_responses have_the following format:
 *
 *    0  _  1   _ 2  _ _3_  __4 _   5   _ 6_    7 _octet
 * +-----+-----+-----+-----+-----+-----+-----+-----+
 *_|_   id  _  |   type_   | ___    _status     _  |
_* +-----+-----+-----+-----+-----+