summaryrefslogtreecommitdiffstats
path: root/src/vnet/session-apps
AgeCommit message (Collapse)AuthorFilesLines
2018-10-31session: add wrk contextFlorin Coras1-1/+1
Change-Id: I66ca0ddea872948507d078e405eb90f9f3a0e897 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-23c11 safe string handling supportDave Barach4-22/+22
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-19vppinfra: add atomic macros for __sync builtinsSirshak Das1-4/+4
This is first part of addition of atomic macros with only macros for __sync builtins. - Based on earlier patch by Damjan (https://gerrit.fd.io/r/#/c/10729/) Additionally - clib_atomic_release macro added and used in the absence of any memory barrier. - clib_atomic_bool_cmp_and_swap added Change-Id: Ie4e48c1e184a652018d1d0d87c4be80ddd180a3b Original-patch-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Sirshak Das <sirshak.das@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com> Reviewed-by: Steve Capper <steve.capper@arm.com>
2018-10-18tls: fix connection failures/interrupts at scale (VPP-1464)Florin Coras1-10/+11
Change-Id: I0bc4062c1fd3202ee201acb36a2bb14fc6ee1543 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-17tcp: fix multiple fin retries (VPP-1461)Florin Coras1-1/+1
Change-Id: I1be7c59df7b48875f81ebeebf5f39ed15a43d2d8 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-16tls: fix multi threaded medium scale test (VPP-1457)Florin Coras2-3/+29
- ensure session enqueue epoch does not wrap between two enqueues - use 3 states for echo clients app, to distinguish between starting and closing phases - force tcp fin retransmit if out of buffers while sending a fin Change-Id: I6f2cab46affd1148aba2a33fb6d58bcc54f32805 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-02tls: fix disconnects for sessions with pending dataFlorin Coras1-0/+1
TLS can enqueue events to itself when app session queue cannot be entirely drained. If a pending disconnect is handled before any such event, session layer may try to dequeue data on deallocated sessions. Change-Id: I5bfc4d53ce95bc16b6a01e1b0e644aafa1ca311b Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-31vcl: add read/write udp supportFlorin Coras1-4/+6
Change-Id: Ie6171c12055cde6915856de340839f5da1b1b1da Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-17session: send ctrl msg over mqFlorin Coras1-1/+2
Change-Id: I242056bc46ddb671064665916b2687860292dcb2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-17session: use msg queue for eventsFlorin Coras6-81/+27
Change-Id: I3c58367eec2243fe19b75be78a175c5261863e9e Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-11tcp: cleanup connection/session fixesFlorin Coras1-2/+2
- Cleanup session state after last ack and avoid using a cleanup timer. - Change session cleanup to free the session as opposed to waiting for delete notify. - When in close-wait, postpone sending the fin on close until all outstanding data has been sent. - Don't flush rx fifo unless in closed state Change-Id: Ic2a4f0d5568b65c83f4b55b6c469a7b24b947f39 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-11udp: fix for multiple workers and add testFlorin Coras1-2/+3
Since the main thread is not used for session polling anymore, when vpp is started with multiple wokers, allocate connections on the first. Also add a simple udp make test. Change-Id: Id869f5d89e0fced51048f0384fa86a5022258b7c Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-08http server: do not close connections after replyFlorin Coras1-22/+29
Change-Id: I7add46258fe44bc4d23d805ffc7eae75e37cab82 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-05-16echo client: used fixed pool for preallocated sessionsFlorin Coras2-14/+9
Change-Id: I9e2cf74ebe3e8750fa8d03930d2d72f4cae453c2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-05-14proxy: fix active open connection cleanupFlorin Coras1-2/+2
Thanks to DucTM for spotting the issue. Change-Id: I7985560f224c99cf0fdeea0c8457a3ac6f10b03c Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-05-10session: fix proxy app multithreadingFlorin Coras1-15/+50
Change-Id: Ic5304749935f69018eb00183bb4670bb9f16273c Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-05-09session: cleanup session tx functionFlorin Coras2-4/+56
- rework the function to declutter and avoid building more than one tx frame - add dual loop although benefits in my tests seem to be minimal - improve tcp/udp echo external apps. They have slightly better throughput than internal echo apps. - udp bugfixes Change-Id: Iea4a245b1b1bb407a7f403dedcce2664a49f774b Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-05-03tcp: fix echo server rx retries counter vec allocFlorin Coras1-0/+2
If sessions are not preallocated, the rx retries counters are not correctly validated/initialized Change-Id: Iaf7456f3a0e2181fcea0c370613d694f8e98276d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-04-30tcp/session: debug improvements/fixesFlorin Coras1-2/+3
Change-Id: I906e58b4f9827a79a6ab673f8fa2e03036c69820 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-04-18session: coverity warningsFlorin Coras1-1/+1
Change-Id: I53bb1e289ba16ee6d9aed7285b18437c996077a4 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-04-18udp/session: refactor to support dgram modeFlorin Coras3-95/+132
- adds session layer support for datagram based protocols - updates udp to work in pure connectionless and datagram mode. The existing connected mode is now 'accessible' for apps as a dummy UDPC, as in, connected udp, protocol. - updates udp_echo, echo client, echo server code to work in datagram mode. Change-Id: I2960c0d2d246cb166005f545794ec31fe0d546dd Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-23tcp/session: sprinkle prefetchesFlorin Coras1-0/+1
Change-Id: Idef3c665580c13d72e99f43d16b8b13cc6ab746f Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-15tls: add openssl engineFlorin Coras3-3/+11
Change-Id: I6c215858d2c9c620787632b570950b15274c0df2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-08tls: make tls engines pluggableFlorin Coras1-1234/+0
- add infra for pluggable tls "engines" - makes mbedtls specific code a plugin Change-Id: I2c5b099e2b69d2be0038e3ef02b208ff907727e7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-07tls: enforce certificate verificationFlorin Coras3-42/+90
- add option to use test certificate in the ca chain - add hostname to extended session endpoint fields and connect api parameters. If hostname is present, certificate validation is enforced. - use /etc/ssl/certs/ca-certificates.crt to bootstrap CA cert. A different path can be provided via startup config Change-Id: I046f9c6ff3ae6a9c2d71220cb62eca8f7b10e5fb Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-05tls: add stop listen handlerFlorin Coras1-7/+28
Change-Id: I233d02a669b6a0504cd54590c6c8e4fefadc4713 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-02tls: clib_mem_alloc context to avoid dangling referencesFlorin Coras1-30/+32
Change-Id: I1e3b48dfd21c9dbebdbcc0af0d6e888b416b3ac5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-02session: first approximation implementation of tlsFlorin Coras5-9/+1204
It consists of two main parts. First, add an application transport type whereby applications can offer transport to other applications. For instance, a tls app can offer transport services to other applications. And second, a tls transport app that leverages the mbedtls library for tls protocol implementation. Change-Id: I616996c6e6539a9e2368fab8a1ac874d7c5d9838 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-02-14session: support local sessions and deprecate redirectsFlorin Coras3-18/+19
Memfd backed shared memory segments can only be negotiated over sockets. For such scenarios, the existing redirect mechanism that establishes cut-through sessions does not work anymore as the two peer application do not share such a socket. This patch adds support for local sessions, as opposed to sessions backed by a transport connection, in a way that is almost transparent to the two applications by reusing the existing binary api messages. Moreover, all segment allocations are now entirely done through the segment manager valloc, so segment overlaps due to independent allocations previously required for redirects are completely avoided. The one notable characteristic of local sessions (cut-through from app perspective) notification messages is that they carry pointers to two event queues, one for each app peer, instead of one. For transport-backed sessions one of the queues can be inferred but for local session they cannot. Change-Id: Ia443fb63e2d9d8e43490275062a708f039038175 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-02-05session: segment manager refactorFlorin Coras2-4/+14
- use valloc as a 'central' segment baseva manager - use per segment manager segment pools and use rwlocks to guard them - add session test that exercises segment creation - embed segment manager properties into application since they're shared - fix rw locks Change-Id: I761164c147275d9e8a926f1eda395e090d231f9a Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-27session: disconnect and echo client improvementsFlorin Coras1-7/+11
Change-Id: If421bad17b6cfe8e321257c93bb38931e37d7b64 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-26session: move builtin apps to their own folderFlorin Coras6-0/+2796
This consolidates builtin apps under session-apps folder. It also removes duplicate builtin echo server/client implementations. Change-Id: I75ed879399c5aa9b75b1eb38b33aedf69dd8df3f Signed-off-by: Florin Coras <fcoras@cisco.com>
ht .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 */ }
/*
 * 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.
 */

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
*/
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 Reply for locator add/del
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
*/
define one_add_del_locator_reply
{
  u32 context;
  i32 retval;
};

/** \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
*/
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 Reply for local_eid add/del
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
*/
define one_add_del_local_eid_reply
{
  u32 context;
  i32 retval;
};

/** \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
*/
define one_add_del_map_server
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 is_ipv6;
  u8 ip_address[16];
};

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

/** \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
*/
define one_add_del_map_resolver
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 is_ipv6;
  u8 ip_address[16];
};

/** \brief Reply for map_resolver add/del
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
*/
define one_add_del_map_resolver_reply
{
  u32 context;
  i32 retval;
};

/** \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
*/
define one_enable_disable
{
  u32 client_index;
  u32 context;
  u8 is_en;
};

/** \brief Reply for gpe enable/disable
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
*/
define one_enable_disable_reply
{
  u32 context;
  i32 retval;
};

/** \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
*/
define one_pitr_set_locator_set
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 ls_name[64];
};

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

/** \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
*/
define one_use_petr
{
  u32 client_index;
  u32 context;
  u8 is_ip4;
  u8 address[16];
  u8 is_add;
};

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

/** \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
*/
define one_rloc_probe_enable_disable
{
  u32 client_index;
  u32 context;
  u8 is_enabled;
};

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

/** \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
*/
define one_map_register_enable_disable
{
  u32 client_index;
  u32 context;
  u8 is_enabled;
};

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

/** \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
*/
define one_map_request_mode
{
  u32 client_index;
  u32 context;
  u8 mode;
};

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

/** \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
    @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
*/
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 Reply for one_add_del_remote_mapping
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
*/
define one_add_del_remote_mapping_reply
{
  u32 context;
  i32 retval;
};

/** \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
*/
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 Reply for one_add_del_adjacency
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
*/
define one_add_del_adjacency_reply
{
  u32 context;
  i32 retval;
};

/** \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
*/
define one_add_del_map_request_itr_rlocs
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 locator_set_name[64];
};

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

define one_add_del_map_request_itr_rlocs_reply
{
  u32 context;
  i32 retval;
};

/** \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
*/
define one_eid_table_add_del_map
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u32 vni;
  u32 dp_table;
  u8 is_l2;
};

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

/** \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
    @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 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;
};

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

define one_stats_enable_disable_reply
{
  u32 context;
  i32 retval;
};

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;
};

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