summaryrefslogtreecommitdiffstats
path: root/src/uri.am
blob: 11dae54a5af97096dfab27849e1e12f4cedffef4 (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
# Copyright (c) 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.

noinst_PROGRAMS +=				\
	uri_udp_test				\
	uri_tcp_test				\
	uri_socket_test				\
	uri_socket_server

uri_udp_test_SOURCES = uri/uri_udp_test.c
uri_udp_test_LDADD = libvlibmemoryclient.la libsvm.la \
	libvppinfra.la -lpthread -lm -lrt

uri_tcp_test_SOURCES = uri/uri_tcp_test.c
uri_tcp_test_LDADD = libvlibmemoryclient.la libsvm.la \
	libvppinfra.la -lpthread -lm -lrt

uri_socket_test_SOURCES = uri/uri_socket_test.c
uri_socket_test_LDADD = libvppinfra.la -lpthread -lm -lrt

uri_socket_server_SOURCES = uri/uri_socket_server.c
uri_socket_server_LDADD = libvppinfra.la -lpthread -lm -lrt
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 */ }
option version = "1.0.0";

import "vnet/interface_types.api";

/** \brief /** \brief Set or delete an NSH header entry keyed by NSP/NSI
    @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 nsp_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI 
    @param md_type - metadata type [1|2] - only MDType1 supported today
    @param ver_o_c - version, O-bit and C-bit (see nsh_packet.h)
    @param ttl - indicates the maximum SFF hops for an SFP
    @param length - header length in n x 32bits, should be 6 for MDtype1
    @param next_protocol - next protocol encapsulated behind NSH header: 1=Ethernet, 2=IP4, 3=IP6
    @param c1 - 32bit Metadata type1 field (context1)
    @param c2 - 32bit Metadata type1 field (context2)
    @param c3 - 32bit Metadata type1 field (context3)
    @param c4 - 32bit Metadata type1 field (context4)
    @param tlvs - Metadata Type 2 only, Type Length Value metadata.
*/
define nsh_add_del_entry {
    u32 client_index;
    u32 context;
    bool is_add;
    u32 nsp_nsi;
    u8 md_type;
    u8 ver_o_c;
    u8 ttl;
    u8 length;
    u8 next_protocol;
    u32 c1;
    u32 c2;
    u32 c3;
    u32 c4;
    u8 tlv_length;
    u8 tlv[248];
};

/** \brief Reply from adding NSH entry (nsh_add_del_entry)
    @param context - sender context, to match reply w/ request
    @param retval - 0 means all ok
*/
define nsh_add_del_entry_reply {
    u32 context;
    i32 retval;
    u32 entry_index;
};


define nsh_entry_dump {
    u32 client_index;
    u32 context;
    u32 entry_index;
};

define nsh_entry_details {
    u32 context;
    u32 entry_index;
    u32 nsp_nsi;
    u8 md_type;
    u8 ver_o_c;
    u8 ttl;
    u8 length;
    u8 next_protocol;
    u32 c1;
    u32 c2;
    u32 c3;
    u32 c4;
    u8 tlv_length;
    u8 tlv[248];
};

/** \brief Set or delete a mapping from one NSH header to another and its egress (decap to inner packet, encap NSH with outer header)
    @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 nsh_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI
    @param mapped_nsp_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI this may be ~0
       if next action is to decap to NSH next protocol
       Note the following heuristic:
       	    - if nsp_nsi == mapped_nsp_nsi then use-case is like SFC SFF
    	    - if nsp_nsi != mapped_nsp_nsi then use-case is like SFC SF
       Note: these are heuristics. Rules about NSI decrement are out of scope
    @param sw_if_index - index number of outer encap for NSH egress
    @param next_node - explicitly which node to send to
      Note the above parameters are instantiated by "encap-gre-intf <x>" means sw_if_index x, next_node gre-input
*/
define nsh_add_del_map {
    u32 client_index;
    u32 context;
    bool is_add;
    u32 nsp_nsi;
    u32 mapped_nsp_nsi;
    u32 nsh_action;
    vl_api_interface_index_t sw_if_index;
    vl_api_interface_index_t rx_sw_if_index;
    u32 next_node;
};

/** \brief Reply from adding NSH map (nsh_add_del_map)
    @param context - sender context, to match reply w/ request
    @param retval - 0 means all ok
*/
define nsh_add_del_map_reply {
    u32 context;
    i32 retval;
    u32 map_index;
};

define nsh_map_dump {
    u32 client_index;
    u32 context;
    u32 map_index;
};

define nsh_map_details {
    u32 context;
    u32 map_index;
    u32 nsp_nsi;
    u32 mapped_nsp_nsi;
    u32 nsh_action;
    vl_api_interface_index_t sw_if_index;
    vl_api_interface_index_t rx_sw_if_index;
    u32 next_node;
};