aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/LispUtil.py
AgeCommit message (Expand)AuthorFilesLines
2017-05-17CSIT-563: HC Test: improved Lisp test coveragejan.hradil1-0/+70
2016-12-16CSIT-484: HC Test: Lispselias1-0/+14
2016-12-16Pylint fixesTibor Frank1-7/+7
2016-10-03LISP - implement changes done in VPP-376Tibor Frank1-22/+21
2016-09-05CSIT-229: ip4-lispgpe-ip4Tibor Frank1-5/+12
2016-07-28CSIT-207: Update LISP Eid APIAndrej Kozemcak1-3/+3
2016-07-25CSIT-199: Use static adjacencies in LISP dp testsFlorin Coras1-1/+1
2016-07-18CSIT-195: Update LISP testAndrej Kozemcak1-43/+47
2016-06-17Lisp enable/disable testAndrej Kozemcak1-56/+15
2016-05-13CSIT-65: Add new test for LISP APIAndrej Kozemcak1-0/+257
#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 */ }
/* Hey Emacs use -*- mode: C -*- */
/*
 * Copyright (c) 2018 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.
 */

/** \file

    This file defines vpp IP neighbor control-plane API messages which are generally
    called through a shared memory interface. 
*/

option version = "1.0.0";

import "vnet/ip/ip_types.api";
import "vnet/ethernet/ethernet_types.api";
import "vnet/interface_types.api";

/** \brief IP neighbor flags
    @param is_static - A static neighbor Entry - there are not flushed
                       If the interface goes down.
    @param is_no_fib_entry - Do not create a corresponding entry in the FIB
                           table for the neighbor.
*/
enum ip_neighbor_flags: u8
{
  IP_API_NEIGHBOR_FLAG_NONE = 0,
  IP_API_NEIGHBOR_FLAG_STATIC = 0x1,
  IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY = 0x2,
};

/** \brief IP neighbor
    @param sw_if_index - interface used to reach neighbor
    @param flags - flags for the neighbor
    @param mac_address - l2 address of the neighbor
    @param ip_address - ip4 or ip6 address of the neighbor
*/
typedef ip_neighbor {
  vl_api_interface_index_t sw_if_index;
  vl_api_ip_neighbor_flags_t flags;
  vl_api_mac_address_t mac_address;
  vl_api_address_t ip_address;
};

/** \brief IP neighbor add / del request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_add - 1 to add neighbor, 0 to delete
    @param neighbor - the neighbor to add/remove
*/
define ip_neighbor_add_del
{
  u32 client_index;
  u32 context;
  /* 1 = add, 0 = delete */
  bool is_add;
  vl_api_ip_neighbor_t neighbor;
};
/** \brief IP neighbor add / del reply
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param retval - return value
    @param stats_index - the index to use for this neighbor in the stats segment
*/
define ip_neighbor_add_del_reply
{
  u32 context;
  i32 retval;
  u32 stats_index;
};

/** \brief Dump IP neighbors
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param sw_if_index - the interface to dump neighbors, ~0 == all
    @param af - address family is ipv[6|4]
*/
define ip_neighbor_dump
{
  u32 client_index;
  u32 context;
  vl_api_interface_index_t sw_if_index  [default=0xffffffff];
  vl_api_address_family_t af;
};

/** \brief IP neighbors dump response
    @param context - sender context which was passed in the request
    @param age - time between last update and sending this message, in seconds
    @param neighbour - the neighbor
*/
define ip_neighbor_details {
  u32 context;
  f64 age;
  vl_api_ip_neighbor_t neighbor;
};

/** \brief Enable/disable periodic IP neighbor scan
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param af - Address family v4/v6
    @param max_number - The maximum number of neighbours that will be created.
                         default 50k
    @param max_age - The maximum age (in seconds) before an inactive neighbour
                     is flushed
                         default 0 => never
    @param recycle - If max_number of neighbours is reached and new ones need
                      to be created should the oldest neighbour be 'recycled'.
*/
autoreply define ip_neighbor_config
{
  u32 client_index;
  u32 context;
  vl_api_address_family_t af;
  u32 max_number;
  u32 max_age;
  bool recycle;
};

/** \brief IP neighbour replace begin

    The use-case is that, for some unspecified reason, the control plane
    has a different set of neighbours it than VPP
    currently has. The CP would thus like to 'replace' VPP's set
    only by specifying what the new set shall be, i.e. it is not
    going to delete anything that already exists, rather, it wants any
    unspecified neighbors deleted implicitly.
    The CP declares the start of this procedure with this replace_begin
    API Call, and when it has populated all neighbours it wants, it calls
    the below replace_end API. From this point on it is of course free
    to add and delete neighbours as usual.
    The underlying mechanism by which VPP implements this replace is
    intentionally left unspecified.

    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
autoreply define ip_neighbor_replace_begin
{
  u32 client_index;
  u32 context;
};

/** \brief IP neighbour replace end

    see ip_neighbor_replace_begin description.

    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
autoreply define ip_neighbor_replace_end
{
  u32 client_index;
  u32 context;
};

/** \brief IP neighbor flush request - removes *all* neighbours.
     dynamic and static from API/CLI and dynamic from data-plane.

    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param af - Flush neighbours of this address family
    @param sw_if_index - Flush on this interface (~0 => all interfaces)
*/
autoreply define ip_neighbor_flush
{
  u32 client_index;
  u32 context;
  vl_api_address_family_t af;
  vl_api_interface_index_t sw_if_index [default=0xffffffff];
};

/** \brief Register for IP neighbour events creation
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param enable - 1 => register for events, 0 => cancel registration
    @param pid - sender's pid
    @param ip - exact IP address of interested neighbor resolution event
    @param sw_if_index - interface on which the IP address is present.
*/
autoreply define want_ip_neighbor_events
{
  option deprecated;
  u32 client_index;
  u32 context;
  bool enable;
  u32 pid;
  vl_api_address_t ip;
  vl_api_interface_index_t sw_if_index [default=0xffffffff];
};

/** \brief Tell client about an IP4 ARP resolution event or
           MAC/IP info from ARP requests in L2 BDs
    @param client_index - opaque cookie to identify the sender
    @param pid - client pid registered to receive notification
    @param neighbor - new neighbor created
*/
define ip_neighbor_event
{
  option deprecated;
  u32 client_index;
  u32 pid;
  vl_api_ip_neighbor_t neighbor;
};

service {
  rpc want_ip_neighbor_events returns want_ip_neighbor_events_reply
    events ip_neighbor_event;
};


/** \brief Register for IP neighbour events (creation or deletion)
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param enable - 1 => register for events, 0 => cancel registration
    @param pid - sender's pid
    @param ip - exact IP address of interested neighbor resolution event
    @param sw_if_index - interface on which the IP address is present.
*/
autoreply define want_ip_neighbor_events_v2
{
  u32 client_index;
  u32 context;
  bool enable;
  u32 pid;
  vl_api_address_t ip;
  vl_api_interface_index_t sw_if_index [default=0xffffffff];
};

enum ip_neighbor_event_flags
{
 /* The neighbor has been added/learned */
 IP_NEIGHBOR_API_EVENT_FLAG_ADDED = 0x1,
 /* The neighbor has been removed/expired */
 IP_NEIGHBOR_API_EVENT_FLAG_REMOVED = 0x2,
};

/** \brief Tell client about an IP4 ARP resolution event or
           MAC/IP info from ARP requests in L2 BDs
    @param client_index - opaque cookie to identify the sender
    @param pid - client pid registered to receive notification
    @param flags - Flags
    @param neighbor -  neighbor
*/
define ip_neighbor_event_v2
{
  u32 client_index;
  u32 pid;
  vl_api_ip_neighbor_event_flags_t flags;
  vl_api_ip_neighbor_t neighbor;
};

service {
  rpc want_ip_neighbor_events_v2 returns want_ip_neighbor_events_v2_reply
    events ip_neighbor_event_v2;
};

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