/*
 * Copyright (c) 2015-2017 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.
 */

vl_api_version 1.0.0

typeonly manual_print manual_endian define one_local_locator
{
  u32 sw_if_index;
  u8 priority;
  u8 weight;
};

/** \brief add or delete locator_set
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_add - add address if non-zero, else delete
    @param locator_set_name - locator name
    @param locator_num - number of locators
    @param locators - locator records
*/
manual_endian manual_print define one_add_del_locator_set
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 locator_set_name[64];
  u32 locator_num;
  vl_api_one_local_locator_t locators[locator_num];
};

/** \brief Reply for locator_set add/del
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
    @param ls_index - locator set index
*/
define one_add_del_locator_set_reply
{
  u32 context;
  i32 retval;
  u32 ls_index;
};

/** \brief add or delete locator for locator set
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_add - add address if non-zero, else delete
    @param locator_set_name - name of locator_set to add/del locator
    @param sw_if_index - index of the interface
    @param priority - priority of the locator
    @param weight - weight of the locator
*/
autoreply define one_add_del_locator
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 locator_set_name[64];
  u32 sw_if_index;
  u8 priority;
  u8 weight;
};

/** \brief add or delete ONE eid-table
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_add - add address if non-zero, else delete
    @param eid_type:
      0 : ipv4
      1 : ipv6
      2 : mac
    @param eid - EID can be ip4, ip6 or mac
    @param prefix_len - prefix len
    @param locator_set_name - name of locator_set to add/del eid-table
    @param vni - virtual network instance
    @param key_id
      HMAC_NO_KEY           0
      HMAC_SHA_1_96         1
      HMAC_SHA_256_128      2
    @param key - secret key
*/
autoreply define one_add_del_local_eid
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 eid_type;
  u8 eid[16];
  u8 prefix_len;
  u8 locator_set_name[64];
  u32 vni;
  u16 key_id;
  u8 key[64];
};

/** \brief Set TTL for map register messages
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param ttl - time to live
*/
autoreply define one_map_register_set_ttl
{
  u32 client_index;
  u32 context;
  u32 ttl;
};

/** \brief Get TTL for map register messages
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define show_one_map_register_ttl
{
  u32 client_index;
  u32 context;
};

/** \brief Contains current TTL for map register messages
    @param client_index - opaque cookie to identify the sender
    @param retval - return code
    @param ttl - time to live
*/
define show_one_map_register_ttl_reply
{
  u32 context;
  i32 retval;
  u32 ttl;
};

/** \brief Add/delete map server
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_add - add address if non-zero; delete otherwise
    @param is_ipv6 - if non-zero the address is ipv6, else ipv4
    @param ip_address - map server IP address
*/
autoreply define one_add_del_map_server
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 is_ipv6;
  u8 ip_address[16];
};

/** \brief add or delete map-resolver
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_add - add address if non-zero, else delete
    @param is_ipv6 - if non-zero the address is ipv6, else ipv4
    @param ip_address - array of address bytes
*/
autoreply define one_add_del_map_resolver
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 is_ipv6;
  u8 ip_address[16];
};

/** \brief enable or disable ONE feature
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_en - enable protocol if non-zero, else disable
*/
autoreply define one_enable_disable
{
  u32 client_index;
  u32 context;
  u8 is_en;
};

/** \brief configure or delete ONE NSH mapping
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param ls_name - locator set name
    @param is_add - add locator set if non-zero; delete otherwise
*/
autoreply define one_nsh_set_locator_set
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 ls_name[64];
};

/** \brief configure or disable ONE PITR node
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param ls_name - locator set name
    @param is_add - add locator set if non-zero, else disable pitr
*/
autoreply define one_pitr_set_locator_set
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 ls_name[64];
};

/** \brief configure or disable use of PETR
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_ip4 - Address is IPv4 if set and IPv6 otherwise
    @param address - PETR IP address
    @param is_add - add locator set if non-zero, else disable PETR
*/
autoreply define one_use_petr
{
  u32 client_index;
  u32 context;
  u8 is_ip4;
  u8 address[16];
  u8 is_add;
};

/** \brief Request for ONE PETR status
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define show_one_use_petr
{
  u32 client_index;
  u32 context;
};

/** \brief ONE PETR status, enable or disable
    @param context - sender context, to match reply w/ request
    @param status - ONE PETR enable if non-zero, else disable
    @param is_ip4 - Address is IPv4 if non-zero, else IPv6
    @param address - PETR IP address
*/
define show_one_use_petr_reply
{
  u32 context;
  i32 retval;
  u8 status;
  u8 is_ip4;
  u8 address[16];
};

/** \brief Get state of ONE RLOC probing
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define show_one_rloc_probe_state
{
  u32 client_index;
  u32 context;
};

/** \brief Reply for show_one_rloc_probe_state
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
    @param is_enabled - state of RLOC probing
*/
define show_one_rloc_probe_state_reply
{
  u32 context;
  i32 retval;
  u8 is_enabled;
};

/** \brief enable/disable ONE RLOC probing
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_enable - enable if non-zero; disable otherwise
*/
autoreply define one_rloc_probe_enable_disable
{
  u32 client_index;
  u32 context;
  u8 is_enabled;
};

/** \brief enable/disable ONE map-register
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_enable - enable if non-zero; disable otherwise
*/
autoreply define one_map_register_enable_disable
{
  u32 client_index;
  u32 context;
  u8 is_enabled;
};

/** \brief Get state of ONE map-register
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define show_one_map_register_state
{
  u32 client_index;
  u32 context;
};

/** \brief Reply for show_one_map_register_state
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
*/
define show_one_map_register_state_reply
{
  u32 context;
  i32 retval;
  u8 is_enabled;
};

/** \brief set ONE map-request mode. Based on configuration VPP will send
      src/dest or just normal destination map requests.
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param mode - new map-request mode. Supported values are:
      0 - destination only
      1 - source/destaination
*/
autoreply define one_map_request_mode
{
  u32 client_index;
  u32 context;
  u8 mode;
};

/** \brief Request for ONE map-request mode
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define show_one_map_request_mode
{
  u32 client_index;
  u32 context;
};

/** \brief Reply for show_one_map_request_mode
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
    @param mode - map-request mode
*/
define show_one_map_request_mode_reply
{
  u32 context;
  i32 retval;
  u8 mode;
};

typeonly manual_endian manual_print define one_remote_locator
{
  u8 is_ip4;
  u8 priority;
  u8 weight;
  u8 addr[16];
};

/** \brief add or delete remote static mapping
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_add - add address if non-zero, else delete
    @param is_src_dst - flag indicating src/dst based routing policy
    @param del_all - if set, delete all remote mappings
    @param vni - virtual network instance
    @param action - negative map-reply action
    @param eid_type -
      0 : ipv4
      1 : ipv6
      2 : mac
      3 : NSH : both information (service path ID and service index) are
        encoded in 'eid' field in a following way:

        |4 B |1 B |
        -----------
        |SPI | SI |
    @param deid - dst EID
    @param seid - src EID, valid only if is_src_dst is enabled
    @param rloc_num - number of remote locators
    @param rlocs - remote locator records
*/
autoreply manual_print manual_endian define one_add_del_remote_mapping
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 is_src_dst;
  u8 del_all;
  u32 vni;
  u8 action;
  u8 eid_type;
  u8 eid[16];
  u8 eid_len;
  u8 seid[16];
  u8 seid_len;
  u32 rloc_num;
  vl_api_one_remote_locator_t rlocs[rloc_num];
};

/** \brief Add/delete L2 ARP entries
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_add - add if non-zero; delete otherwise
    @param bd - bridge domain
    @param mac - MAC address
    @param ip4 - IPv4 address
*/
autoreply define one_add_del_l2_arp_entry
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 mac[6];
  u32 bd;
  u32 ip4;
};

/** \brief Request for L2 ARP entries from specified bridge domain
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param bd - bridge domain
*/
define one_l2_arp_entries_get
{
  u32 client_index;
  u32 context;
  u32 bd;
};

typeonly manual_print manual_endian define one_l2_arp_entry
{
  u8 mac[6];
  u32 ip4;
};

/** \brief Reply with L2 ARP entries from specified bridge domain
    @param context - sender context, to match reply w/ request
    @param retval - error code
    @param count - number of elements in the list
    @param vl_api_one_arp_entry_t - list of entries
*/
manual_print manual_endian define one_l2_arp_entries_get_reply
{
  u32 context;
  i32 retval;
  u32 count;
  vl_api_one_l2_arp_entry_t entries[count];
};

autoreply define one_add_del_ndp_entry
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 mac[6];
  u32 bd;
  u8 ip6[16];
};

define one_ndp_entries_get
{
  u32 client_index;
  u32 context;
  u32 bd;
};

typeonly manual_print manual_endian define one_ndp_entry
{
  u8 mac[6];
  u8 ip6[16];
};

manual_print manual_endian define one_ndp_entries_get_reply
{
  u32 context;
  i32 retval;
  u32 count;
  vl_api_one_ndp_entry_t entries[count];
};

/** \brief Set ONE transport protocol
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param protocol - supported vaules:
      1: UDP based LISP (default)
      2: binary API
*/
autoreply define one_set_transport_protocol
{
  u32 client_index;
  u32 context;
  u8 protocol;
};

define one_get_transport_protocol
{
  u32 client_index;
  u32 context;
};

define one_get_transport_protocol_reply
{
  u32 context;
  i32 retval;
  u8 protocol;
};

/** \brief Request for list of bridge domains used by neighbor discovery
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define one_ndp_bd_get
{
  u32 client_index;
  u32 context;
};

/** \brief Reply with list of bridge domains used by neighbor discovery
    @param context - sender context, to match reply w/ request
    @param count - number of elements in the list
    @param bridge_domains - list of BDs
*/
manual_print manual_endian define one_ndp_bd_get_reply
{
  u32 context;
  i32 retval;
  u32 count;
  u32 bridge_domains[count];
};

/** \brief Request for list of bridge domains used by L2 ARP table
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define one_l2_arp_bd_get
{
  u32 client_index;
  u32 context;
};

/** \brief Reply with list of bridge domains used by L2 ARP table
    @param context - sender context, to match reply w/ request
    @param count - number of elements in the list
    @param bridge_domains - list of BDs
*/
manual_print manual_endian define one_l2_arp_bd_get_reply
{
  u32 context;
  i32 retval;
  u32 count;
  u32 bridge_domains[count];
};

/** \brief add or delete ONE adjacency adjacency
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_add - add address if non-zero, else delete
    @param vni - virtual network instance
    @param eid_type -
      0 : ipv4
      1 : ipv6
      2 : mac
    @param reid - remote EID
    @param leid - local EID
*/
autoreply define one_add_del_adjacency
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u32 vni;
  u8 eid_type;
  u8 reid[16];
  u8 leid[16];
  u8 reid_len;
  u8 leid_len;
};

/** \brief add or delete map request itr rlocs
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_add - add address if non-zero, else delete
    @param locator_set_name - locator set name
*/
autoreply define one_add_del_map_request_itr_rlocs
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 locator_set_name[64];
};

/** \brief map/unmap vni/bd_index to vrf
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_add - add or delete mapping
    @param dp_table - virtual network id/bridge domain index
    @param vrf - vrf
*/
autoreply define one_eid_table_add_del_map
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u32 vni;
  u32 dp_table;
  u8 is_l2;
};

/** \brief Request for map one locator status
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param locator_set_index - index of locator_set
    @param ls_name - locator set name
    @param is_index_set - flag indicating whether ls_name or ls_index is set
 */
define one_locator_dump
{
  u32 client_index;
  u32 context;
  u32 ls_index;
  u8 ls_name[64];
  u8 is_index_set;
};

/** \brief ONE locator_set status
    @param local - if is set, then locator is local
    @param locator_set_name - name of the locator_set
    @param sw_if_index - sw_if_index of the locator
    @param priority - locator priority
    @param weight - locator weight
  */
define one_locator_details
{
  u32 context;
  u8 local;
  u32 sw_if_index;
  u8 is_ipv6;
  u8 ip_address[16];
  u8 priority;
  u8 weight;
};

/** \brief ONE locator_set status
    @param context - sender context, to match reply w/ request
    @param ls_index - locator set index
    @param ls_name - name of the locator set
 */
define one_locator_set_details
{
  u32 context;
  u32 ls_index;
  u8 ls_name[64];
};

/** \brief Request for locator_set summary status
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param filter - filter type
      Supported values:
        0: all locator sets
        1: local locator sets
        2: remote locator sets
 */
define one_locator_set_dump
{
  u32 client_index;
  u32 context;
  u8 filter;
};

/** \brief Dump ONE eid-table
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param locator_set_index - index of locator_set, if ~0 then the mapping
                                is negative
    @param action - negative map request action
    @param is_local - local if non-zero, else remote
    @param eid_type:
      0 : ipv4
      1 : ipv6
      2 : mac
    @param is_src_dst - EID is type of source/destination
    @param eid - EID can be ip4, ip6 or mac
    @param eid_prefix_len - prefix length
    @param seid - source EID can be ip4, ip6 or mac
    @param seid_prefix_len - source prefix length
    @param vni - virtual network instance
    @param ttl - time to live
    @param authoritative - authoritative
    @param key_id
      HMAC_NO_KEY           0
      HMAC_SHA_1_96         1
      HMAC_SHA_256_128      2
    @param key - secret key
*/

define one_eid_table_details
{
  u32 context;
  u32 locator_set_index;
  u8 action;
  u8 is_local;
  u8 eid_type;
  u8 is_src_dst;
  u32 vni;
  u8 eid[16];
  u8 eid_prefix_len;
  u8 seid[16];
  u8 seid_prefix_len;
  u32 ttl;
  u8 authoritative;
  u16 key_id;
  u8 key[64];
};

/** \brief Request for eid table summary status
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param eid_set - if non-zero request info about specific mapping
    @param vni - virtual network instance; valid only if eid_set != 0
    @param prefix_length - prefix length if EID is IP address;
      valid only if eid_set != 0
    @param eid_type - EID type; valid only if eid_set != 0
      Supported values:
        0: EID is IPv4
        1: EID is IPv6
        2: EID is ethernet address
        3 : NSH : both information (service path ID and service index) are
          encoded in 'eid' field in a following way:

          |4 B |1 B |
          -----------
          |SPI | SI |
    @param eid - endpoint identifier
    @param filter - filter type;
      Support values:
        0: all eid
        1: local eid
        2: remote eid
 */
define one_eid_table_dump
{
  u32 client_index;
  u32 context;
  u8 eid_set;
  u8 prefix_length;
  u32 vni;
  u8 eid_type;
  u8 eid[16];
  u8 filter;
};

/** \brief ONE adjacency
    @param eid_type -
      0 : ipv4
      1 : ipv6
      2 : mac
    @param reid - remote EID
    @param leid - local EID
    @param reid_prefix_len - remote EID IP prefix length
    @param leid_prefix_len - local EID IP prefix length
  */
typeonly manual_print manual_endian define one_adjacency
{
  u8 eid_type;
  u8 reid[16];
  u8 leid[16];
  u8 reid_prefix_len;
  u8 leid_prefix_len;
};

/** \brief ONE adjacency reply
    @param count - number of adjacencies
    @param adjacencies - array of adjacencies
  */
manual_endian manual_print define one_adjacencies_get_reply
{
  u32 context;
  i32 retval;
  u32 count;
  vl_api_one_adjacency_t adjacencies[count];
};

/** \brief Request for ONE adjacencies
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param vni - filter adjacencies by VNI
 */
define one_adjacencies_get
{
  u32 client_index;
  u32 context;
  u32 vni;
};

/** \brief Shows relationship between vni and vrf/bd
    @param dp_table - VRF index or bridge domain index
    @param vni - vitual network instance
  */
define one_eid_table_map_details
{
  u32 context;
  u32 vni;
  u32 dp_table;
};

/** \brief Request for one_eid_table_map_details
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_l2 - if set dump vni/bd mappings else vni/vrf
 */
define one_eid_table_map_dump
{
  u32 client_index;
  u32 context;
  u8 is_l2;
};

/** \brief Dumps all VNIs used in mappings
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
  */
define one_eid_table_vni_dump
{
  u32 client_index;
  u32 context;
};

/** \brief reply to one_eid_table_vni_dump
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param vni - virtual network instance
 */
define one_eid_table_vni_details
{
  u32 client_index;
  u32 context;
  u32 vni;
};

/** \brief ONE map resolver status
    @param is_ipv6 - if non-zero the address is ipv6, else ipv4
    @param ip_address - array of address bytes
 */
define one_map_resolver_details
{
  u32 context;
  u8 is_ipv6;
  u8 ip_address[16];
};

/** \brief Request for map resolver summary status
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
 */
define one_map_resolver_dump
{
  u32 client_index;
  u32 context;
};

/** \brief ONE map server details
    @param is_ipv6 - if non-zero the address is ipv6, else ipv4
    @param ip_address - array of address bytes
 */
define one_map_server_details
{
  u32 context;
  u8 is_ipv6;
  u8 ip_address[16];
};

/** \brief Request for map server summary status
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
 */
define one_map_server_dump
{
  u32 client_index;
  u32 context;
};

/** \brief Request for ONE status
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define show_one_status
{
  u32 client_index;
  u32 context;
};

/** \brief ONE status
    @param context - sender context, to match reply w/ request
    @param feature_status - enabled if non-zero, else disabled
    @param gpe_status - enabled if non-zero, else disabled
*/
define show_one_status_reply
{
  u32 context;
  i32 retval;
  u8 feature_status;
  u8 gpe_status;
};

/** \brief Get ONE map request itr rlocs status
    @param context - sender context, to match reply w/ request
    @param locator_set_name - name of the locator_set
 */
define one_get_map_request_itr_rlocs
{
  u32 client_index;
  u32 context;
};

/** \brief Request for map request itr rlocs summary status
 */
define one_get_map_request_itr_rlocs_reply
{
  u32 context;
  i32 retval;
  u8 locator_set_name[64];
};

/** \brief Request for ONE NSH mapping
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define show_one_nsh_mapping
{
  u32 client_index;
  u32 context;
};

/** \brief Reply for ONE NSH mapping
    @param context - sender context, to match reply w/ request
    @param is_set - is ONE NSH mapping set
    @param locator_set_name - name of the locator_set if NSH mapping is set
*/
define show_one_nsh_mapping_reply
{
  u32 context;
  i32 retval;
  u8 is_set;
  u8 locator_set_name[64];
};

/** \brief Request for ONE PITR status
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define show_one_pitr
{
  u32 client_index;
  u32 context;
};

/** \brief Status of ONE PITR, enable or disable
    @param context - sender context, to match reply w/ request
    @param status - ONE PITR enable if non-zero, else disable
    @param locator_set_name -  name of the locator_set
*/
define show_one_pitr_reply
{
  u32 context;
  i32 retval;
  u8 status;
  u8 locator_set_name[64];
};

define one_stats_dump
{
  u32 client_index;
  u32 context;
};

define one_stats_details
{
  u32 context;
  u32 vni;
  u8 eid_type;
  u8 deid[16];
  u8 seid[16];
  u8 deid_pref_len;
  u8 seid_pref_len;
  u8 is_ip4;
  u8 rloc[16];
  u8 lloc[16];

  u32 pkt_count;
  u32 bytes;
};

autoreply define one_stats_flush
{
  u32 client_index;
  u32 context;
};

autoreply define one_stats_enable_disable
{
  u32 client_index;
  u32 context;
  u8 is_en;
};

define show_one_stats_enable_disable
{
  u32 client_index;
  u32 context;
};

define show_one_stats_enable_disable_reply
{
  u32 context;
  i32 retval;
  u8 is_en;
};

autoreply define one_map_register_fallback_threshold
{
  u32 client_index;
  u32 context;
  u32 value;
};

define show_one_map_register_fallback_threshold
{
  u32 client_index;
  u32 context;
};

define show_one_map_register_fallback_threshold_reply
{
  u32 context;
  i32 retval;
  u32 value;
};

autoreply define one_enable_disable_xtr_mode
{
  u32 client_index;
  u32 context;
  u8 is_en;
};

define one_show_xtr_mode
{
  u32 client_index;
  u32 context;
};

define one_show_xtr_mode_reply
{
  u32 context;
  i32 retval;
  u8 is_en;
};

autoreply define one_enable_disable_petr_mode
{
  u32 client_index;
  u32 context;
  u8 is_en;
};

define one_show_petr_mode
{
  u32 client_index;
  u32 context;
};

define one_show_petr_mode_reply
{
  u32 context;
  i32 retval;
  u8 is_en;
};

autoreply define one_enable_disable_pitr_mode
{
  u32 client_index;
  u32 context;
  u8 is_en;
};

define one_show_pitr_mode
{
  u32 client_index;
  u32 context;
};

define one_show_pitr_mode_reply
{
  u32 context;
  i32 retval;
  u8 is_en;
};

/*
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */
