summaryrefslogtreecommitdiffstats
path: root/src/plugins/lisp/lisp-cp/lisp.api
blob: 4b6b1a21460d2cf846e3322d87777bae355a6276 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
}
@media (prefers-color-scheme: light) {
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
}
# Intel AVF device plugin for VPP    {#avf_plugin_doc}

##Overview
This plugins provides native device support for intel Adaptive Virtual
Function (AVF). AVF is driver specification for current and future
Intel Virtual Function devices. AVF defines communication channel between
Physical Functions (PF) and VF.
In essence, today this driver can be used only with 
Intel XL710 / X710 / XXV710 adapters.

##Prerequisites
 * Driver requires newer i40e PF linux driver to be installed on the system,
which supports virtualchnl interface. This code is tested with i40e driver
version 2.4.6.

* Driver requires MSI-X interrupt support, which is not supported by
uio_pci_generic driver, so vfio-pci needs to be used. On systems without IOMMU
vfio driver can still be used with recent kernels which support no-iommu mode.

##Known issues
This driver is still in experimental phase, however it shows very good 
performance numbers.

## Usage
### System setup

1. load VFIO driver
```
sudo modprobe vfio-pci
```

2. (systems without IOMMU only) enable unsafe NOIOMMU mode
```
echo Y | sudo tee /sys/module/vfio/parameters/enable_unsafe_noiommu_mode
```

3. Create and bind SR-IOV virtual function(s)

Following script creates VF, assigns MAC address and binds VF to vfio-pci
```bash
#!/bin/bash

if [ $USER != "root" ] ; then
	echo "Restarting script with sudo..."
	sudo $0 ${*}
	exit
fi

setup () {
  cd /sys/bus/pci/devices/${1}
  driver=$(basename $(readlink driver))
  if [ "${driver}" != "i40e" ]; then
    echo ${1} | tee driver/unbind
    echo ${1} | tee /sys/bus/pci/drivers/i40e/bind
  fi
  ifname=$(basename net/*)
  echo 0 | tee sriov_numvfs > /dev/null
  echo 1 | tee sriov_numvfs > /dev/null
  ip link set dev ${ifname} vf 0 mac ${2}
  ip link show dev ${ifname}
  vf=$(basename $(readlink virtfn0))
  echo ${vf} | tee virtfn0/driver/unbind
  echo vfio-pci | tee virtfn0/driver_override
  echo ${vf} | sudo tee /sys/bus/pci/drivers/vfio-pci/bind
  echo  | tee virtfn0/driver_override
}

# Setup one VF on PF 0000:3b:00.0 and assign MAC address
setup 0000:3b:00.0 00:11:22:33:44:00
# Setup one VF on PF 0000:3b:00.1 and assign MAC address
setup 0000:3b:00.1 00:11:22:33:44:01
```

### Promisc mode
In cases when interface is used in the L2 mode or promisc mode is needed for some other reason,
trust needs to be set to "on" using the linux "ip link" utility.
```
ip link set dev <PF inteface name> vf <VF id> trust on
```

### L2 spoofing check
By default Virtual Function is not allowed to send ethernet frames which
have source MAC address different than address assigned to the VF.
In some cases it is expected that VPP will send such frames (e.g. L2 bridging,
bonding, l2 cross-connect) and in such cases spoof chack needs to be turned
off by issuing following command:
```
ip link set dev <PF inteface name> vf <VF id> spoofchk off
```

### Interface Creation
Interfaces can be dynamically created by using following CLI:
```
create interface avf 0000:3b:02.0
set int state avf-0/3b/2/0 up
```

### Interface Deletion
Interface can be deleted with following CLI:
```
delete interface avf <interface name>
```

### Interface Statistics
Interface statistics can be displayed with `sh hardware-interface <if-name>`
command.
575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674
/*
 * Copyright (c) 2015-2016 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.
 */

option version = "2.0.0";

import "vnet/interface_types.api";
import "plugins/lisp/lisp-cp/lisp_types.api";

/** \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 - LISP locator records
*/
define lisp_add_del_locator_set
{
  u32 client_index;
  u32 context;
  bool is_add [default=true];
  string locator_set_name[64];
  u32 locator_num;
  vl_api_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 lisp_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 lisp locator
    @param weight - weight of the lisp locator
*/
autoreply define lisp_add_del_locator
{
  u32 client_index;
  u32 context;
  bool is_add [default=true];
  string locator_set_name[64];
  vl_api_interface_index_t sw_if_index;
  u8 priority;
  u8 weight;
};

/** \brief add or delete lisp 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 - endpoint identifier
        @param locator_set_name - name of locator_set to add/del eid-table
        @param vni - virtual network instance
        @param key - secret key
*/
autoreply define lisp_add_del_local_eid
{
  u32 client_index;
  u32 context;
  bool is_add [default=true];
  vl_api_eid_t eid;
  string locator_set_name[64];
  u32 vni;
  vl_api_hmac_key_t key;
};

/** \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 ip_address - map server IP address
*/
autoreply define lisp_add_del_map_server
{
  u32 client_index;
  u32 context;
  bool is_add [default=true];
  vl_api_address_t ip_address;
};

/** \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 ip_address - ip address
*/
autoreply define lisp_add_del_map_resolver
{
  u32 client_index;
  u32 context;
  bool is_add [default=true];
  vl_api_address_t ip_address;
};

/** \brief enable or disable LISP 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 lisp_enable_disable
{
  u32 client_index;
  u32 context;
  bool is_enable [default=true];
};

/** \brief configure or disable LISP 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 lisp_pitr_set_locator_set
{
  u32 client_index;
  u32 context;
  bool is_add [default=true];
  string 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 ip_address - PETR IP address
    @param is_add - add locator set if non-zero, else disable pitr
*/
autoreply define lisp_use_petr
{
  u32 client_index;
  u32 context;
  vl_api_address_t ip_address;
  bool is_add [default=true];
};

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

/** \brief LISP PETR status, enable or disable
    @param context - sender context, to match reply w/ request
    @param status - LISP PETR enable if non-zero, else disable
    @param address - PETR IP address
*/
define show_lisp_use_petr_reply
{
  u32 context;
  i32 retval;
  bool is_petr_enable;
  vl_api_address_t ip_address;
};

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

/** \brief Reply for show_lisp_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_lisp_rloc_probe_state_reply
{
  u32 context;
  i32 retval;
  bool is_enabled;
};

/** \brief enable/disable LISP 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 lisp_rloc_probe_enable_disable
{
  u32 client_index;
  u32 context;
  bool is_enable [default=true];
};

/** \brief enable/disable LISP 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 lisp_map_register_enable_disable
{
  u32 client_index;
  u32 context;
  bool is_enable [default=true];
};

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

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

/** \brief set LISP 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 is_src_dst - if non-zero source/destination else destination only
*/
autoreply define lisp_map_request_mode
{
  u32 client_index;
  u32 context;
  bool is_src_dst;
};

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

/** \brief Reply for show_lisp_map_request_mode
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
    @param is_src_dst - if non-zero source/destination else destination only
*/
define show_lisp_map_request_mode_reply
{
  u32 context;
  i32 retval;
  bool is_src_dst;
};

/** \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 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 define lisp_add_del_remote_mapping
{
  u32 client_index;
  u32 context;
  bool is_add [default=true];
  bool is_src_dst;
  bool del_all;
  u32 vni;
  u8 action;
  vl_api_eid_t deid;
  vl_api_eid_t seid;
  u32 rloc_num;
  vl_api_remote_locator_t rlocs[rloc_num];
};

/** \brief add or delete LISP 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 reid - remote EID
    @param leid - local EID
*/
autoreply define lisp_add_del_adjacency
{
  u32 client_index;
  u32 context;
  bool is_add [default=true];
  u32 vni;
  vl_api_eid_t reid;
  vl_api_eid_t leid;
};

/** \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 lisp_add_del_map_request_itr_rlocs
{
  u32 client_index;
  u32 context;
  bool is_add [default=true];
  string locator_set_name[64];
};

/** \brief Reply for lisp_add_del_map_request_itr_rlocs
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
*/

/** \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 lisp_eid_table_add_del_map
{
  u32 client_index;
  u32 context;
  bool is_add [default=true];
  u32 vni;
  u32 dp_table;
  bool is_l2;
};

/** \brief Request for map lisp 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 lisp_locator_dump
{
  u32 client_index;
  u32 context;
  u32 ls_index;
  string ls_name[64];
  u8 is_index_set;
};

/** \brief LISP 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 ip_address - ip address
    @param priority - locator priority
    @param weight - locator weight
  */
define lisp_locator_details
{
  u32 context;
  u8 local;
  vl_api_interface_index_t sw_if_index;
  vl_api_address_t ip_address;
  u8 priority;
  u8 weight;
};

/** \brief LISP 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 lisp_locator_set_details
{
  u32 context;
  u32 ls_index;
  string ls_name[64];
};

enum lisp_locator_set_filter : u8 {
        LISP_LOCATOR_SET_FILTER_API_ALL = 0,
        LISP_LOCATOR_SET_FILTER_API_LOCAL = 1,
        LISP_LOCATOR_SET_FILTER_API_REMOTE = 2,
};

/** \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
 */
define lisp_locator_set_dump
{
  u32 client_index;
  u32 context;
  vl_api_lisp_locator_set_filter_t filter;
};

/** \brief Dump lisp 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 is_src_dst - EID is type of source/destination
    @param deid - dst EID
    @param seid - src EID
    @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 lisp_eid_table_details
{
  u32 context;
  u32 locator_set_index;
  u8 action;
  bool is_local;
  bool is_src_dst;
  u32 vni;
  vl_api_eid_t deid;
  vl_api_eid_t seid;
  u32 ttl;
  u8 authoritative;
  vl_api_hmac_key_t key;
};

/** \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 - endpoint identifier
    @param filter - filter type;
      Support values:
        0: all eid
        1: local eid
        2: remote eid
 */
define lisp_eid_table_dump
{
  u32 client_index;
  u32 context;
  u8 eid_set;
  u8 prefix_length;
  u32 vni;
  vl_api_eid_t eid;
  vl_api_lisp_locator_set_filter_t filter;
};

/** \brief LISP adjacency
    @param reid - remote EID
    @param leid - local EID
  */
typedef lisp_adjacency
{
  vl_api_eid_t reid;
  vl_api_eid_t leid;
};

/** \brief LISP adjacency reply
    @param count - number of adjacencies
    @param adjacencies - array of adjacencies
  */
define lisp_adjacencies_get_reply
{
  u32 context;
  i32 retval;
  u32 count;
  vl_api_lisp_adjacency_t adjacencies[count];
};

/** \brief Request for LISP 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 lisp_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 - virtual network instance
  */
define lisp_eid_table_map_details
{
  u32 context;
  u32 vni;
  u32 dp_table;
};

/** \brief Request for lisp_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 lisp_eid_table_map_dump
{
  u32 client_index;
  u32 context;
  bool 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 lisp_eid_table_vni_dump
{
  u32 client_index;
  u32 context;
};

/** \brief reply to lisp_eid_table_vni_dump
    @param context - sender context, to match reply w/ request
    @param vni - virtual network instance
 */
define lisp_eid_table_vni_details
{
  u32 context;
  u32 vni;
};

/** \brief LISP map resolver status
    @param ip_address - array of address bytes
 */
define lisp_map_resolver_details
{
  u32 context;
  vl_api_address_t ip_address;
};

/** \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 lisp_map_resolver_dump
{
  u32 client_index;
  u32 context;
};

/** \brief LISP map server details
    @param ip_address - array of address bytes
 */
define lisp_map_server_details
{
  u32 context;
  vl_api_address_t ip_address;
};

/** \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 lisp_map_server_dump
{
  u32 client_index;
  u32 context;
};

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

/** \brief Status of lisp, enable or disable
    @param context - sender context, to match reply w/ request
    @param feature_status - lisp enable if non-zero, else disable
    @param gpe_status - lisp enable if non-zero, else disable
*/
define show_lisp_status_reply
{
  u32 context;
  i32 retval;
  bool is_lisp_enabled;
  bool is_gpe_enabled;
};

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

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

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

/** \brief Status of lisp pitr, enable or disable
    @param context - sender context, to match reply w/ request
    @param status - lisp pitr enable if non-zero, else disable
    @param locator_set_name -  name of the locator_set
*/
define show_lisp_pitr_reply
{
  u32 context;
  i32 retval;
  bool is_enabled;
  string locator_set_name[64];
};

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