blob: 6b468be461a73470f00980c092f7ca9d0202c77f [file] [log] [blame]
Neale Rannsd0df49f2018-08-08 01:06:40 -07001/* Hey Emacs use -*- mode: C -*- */
Neale Ranns810086d2017-11-05 16:26:46 -08002/*
Florin Coras10dc2ea2019-04-10 07:08:01 -07003 * Copyright (c) 2018-2019 Cisco and/or its affiliates.
Neale Ranns810086d2017-11-05 16:26:46 -08004 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Neale Rannsd0df49f2018-08-08 01:06:40 -070017/**
18 * @file
19 *
20 * This file defines vpp UDP control-plane API messages which are generally
21 * called through a shared memory interface.
22 */
Neale Ranns810086d2017-11-05 16:26:46 -080023
Neale Rannsd0df49f2018-08-08 01:06:40 -070024option version = "1.1.0";
25
26import "vnet/ip/ip_types.api";
27
28
29/**
30 * @brief UDP Encap object
31 * @param table_id - table ID associated with the encap destination
32 * @param dst_ip - Encap destination address
33 * @param src_ip - Encap source address
34 * @param dst_port - Encap destination port
Vladislav Grishenko5c801b32022-06-23 00:45:16 +050035 * @param src_port - Encap source port, 0 for entopy per rfc7510
Neale Ranns9c0a3c42018-09-07 08:57:41 -070036 * @param id - VPP assigned id; ignored in add message, set in dump
Neale Rannsd0df49f2018-08-08 01:06:40 -070037 */
38typedef udp_encap
39{
Neale Rannsd0df49f2018-08-08 01:06:40 -070040 u32 table_id;
41 u16 src_port;
42 u16 dst_port;
43 vl_api_address_t src_ip;
44 vl_api_address_t dst_ip;
Neale Ranns9c0a3c42018-09-07 08:57:41 -070045 u32 id;
Neale Rannsd0df49f2018-08-08 01:06:40 -070046};
47
Arthur de Kerhor8a6f5d32021-05-20 11:48:00 +020048enum udp_decap_next_proto
49{
50 UDP_API_DECAP_PROTO_IP4,
51 UDP_API_DECAP_PROTO_IP6,
52 UDP_API_DECAP_PROTO_MPLS,
53};
54
55/**
56 * @brief UDP Decap object
57 * @param is_ip4 - IPv4 if non-zero, else IPv6
58 * @param port - port to listen on for the decap
59 * @param next_proto - the protocol of the inner header
60 */
61typedef udp_decap
62{
63 u8 is_ip4;
64 u16 port;
65 vl_api_udp_decap_next_proto_t next_proto;
66};
67
Neale Rannsd0df49f2018-08-08 01:06:40 -070068/**
69 * @brief Add UDP encap
70 * @param client_index - opaque cookie to identify the sender
71 * @param context - sender context, to match reply w/ request
72 * @param udp_encap - UDP encap description
73 */
Neale Ranns9c0a3c42018-09-07 08:57:41 -070074define udp_encap_add
Neale Rannsd0df49f2018-08-08 01:06:40 -070075{
76 u32 client_index;
77 u32 context;
78 vl_api_udp_encap_t udp_encap;
79};
80
81/**
Neale Ranns9c0a3c42018-09-07 08:57:41 -070082 * @brief Add UDP encap reply
83 * @param context - sender context, to match reply w/ request
84 * @param retval - success/failure return value
85 * @param id - The ID of the encap object that should be used on delete
86 * and when reading stats from the stats segment.
87 */
88define udp_encap_add_reply
89{
90 u32 context;
91 i32 retval;
92 u32 id;
93};
94
95/**
Neale Rannsd0df49f2018-08-08 01:06:40 -070096 * @brief Del UDP encap
97 * @param client_index - opaque cookie to identify the sender
98 * @param context - sender context, to match reply w/ request
99 * @param id - ID of the encap object the client chose during the add
Neale Ranns810086d2017-11-05 16:26:46 -0800100*/
Neale Rannsd0df49f2018-08-08 01:06:40 -0700101autoreply define udp_encap_del
Neale Ranns810086d2017-11-05 16:26:46 -0800102{
103 u32 client_index;
104 u32 context;
105 u32 id;
Neale Ranns810086d2017-11-05 16:26:46 -0800106};
107
Neale Rannsd0df49f2018-08-08 01:06:40 -0700108/**
109 * @brief dump UDP encaps
110 */
Neale Ranns810086d2017-11-05 16:26:46 -0800111define udp_encap_dump
112{
113 u32 client_index;
114 u32 context;
115};
116
Neale Rannsd0df49f2018-08-08 01:06:40 -0700117/**
118 * @brief UDP encap details during dump
119 */
Neale Ranns810086d2017-11-05 16:26:46 -0800120define udp_encap_details
121{
122 u32 context;
Neale Rannsd0df49f2018-08-08 01:06:40 -0700123 vl_api_udp_encap_t udp_encap;
Neale Ranns810086d2017-11-05 16:26:46 -0800124};
125
Arthur de Kerhor8a6f5d32021-05-20 11:48:00 +0200126/**
127 * @brief Add/Del UDP decap
128 * @param client_index - opaque cookie to identify the sender
129 * @param context - sender context, to match reply w/ request
130 * @param is_add - add decap if non-zero, else delete
131 * @param udp_decap - UDP decap description
132 */
133autoreply define udp_decap_add_del
134{
135 u32 client_index;
136 u32 context;
137 bool is_add;
138 vl_api_udp_decap_t udp_decap;
139};
140
Neale Ranns810086d2017-11-05 16:26:46 -0800141/*
142 * Local Variables:
143 * eval: (c-set-style "gnu")
144 * End:
145 */