FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
udp.api
Go to the documentation of this file.
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2018-2019 Cisco and/or its affiliates.
4  * 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 
17 /**
18  * @file
19  *
20  * This file defines vpp UDP control-plane API messages which are generally
21  * called through a shared memory interface.
22  */
23 
24 option version = "1.1.0";
25 
26 import "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
35  * @param src_port - Encap source port
36  * @param id - VPP assigned id; ignored in add message, set in dump
37  */
38 typedef udp_encap
39 {
40  u32 table_id;
43  vl_api_address_t src_ip;
44  vl_api_address_t dst_ip;
46 };
47 
49 {
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  */
61 typedef udp_decap
62 {
63  u8 is_ip4;
65  vl_api_udp_decap_next_proto_t next_proto;
66 };
67 
68 /**
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  */
74 define udp_encap_add
75 {
78  vl_api_udp_encap_t udp_encap;
79 };
80 
81 /**
82  * @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  */
88 define udp_encap_add_reply
89 {
93 };
94 
95 /**
96  * @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
100 */
101 autoreply define udp_encap_del
102 {
106 };
107 
108 /**
109  * @brief dump UDP encaps
110  */
111 define udp_encap_dump
112 {
115 };
116 
117 /**
118  * @brief UDP encap details during dump
119  */
120 define udp_encap_details
121 {
123  vl_api_udp_encap_t udp_encap;
124 };
125 
126 /**
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  */
133 autoreply define udp_decap_add_del
134 {
137  bool is_add;
138  vl_api_udp_decap_t udp_decap;
139 };
140 
141 /*
142  * Local Variables:
143  * eval: (c-set-style "gnu")
144  * End:
145  */
UDP_API_DECAP_PROTO_IP4
@ UDP_API_DECAP_PROTO_IP4
Definition: udp.api:50
vl_api_udp_decap_add_del_t::context
u32 context
Definition: udp.api:136
port
u16 port
Definition: udp.api:64
vl_api_udp_decap_add_del_t::client_index
u32 client_index
Definition: udp.api:135
src_ip
vl_api_address_t src_ip
Definition: udp.api:43
vl_api_udp_encap_details_t
UDP encap details during dump.
Definition: udp.api:120
version
option version
Definition: udp.api:24
u16
unsigned short u16
Definition: types.h:57
vl_api_udp_encap_details_t::udp_encap
vl_api_udp_encap_t udp_encap
Definition: udp.api:123
i32
signed int i32
Definition: types.h:77
vl_api_udp_encap_add_reply_t::retval
i32 retval
Definition: udp.api:91
vl_api_udp_encap_add_reply_t::context
u32 context
Definition: udp.api:90
vl_api_udp_encap_add_t::context
u32 context
Definition: udp.api:77
dst_ip
vl_api_address_t dst_ip
Definition: udp.api:44
vl_api_udp_encap_add_reply_t
Add UDP encap reply.
Definition: udp.api:88
UDP_API_DECAP_PROTO_MPLS
@ UDP_API_DECAP_PROTO_MPLS
Definition: udp.api:52
vl_api_udp_encap_del_t::context
u32 context
Definition: udp.api:104
src_port
u16 src_port
Definition: udp.api:41
vl_api_udp_encap_add_t
Add UDP encap.
Definition: udp.api:74
vl_api_udp_encap_del_t
Del UDP encap.
Definition: udp.api:101
udp_encap
typedef udp_encap
UDP Encap object.
Definition: udp.api:39
vl_api_udp_encap_dump_t::context
u32 context
Definition: udp.api:114
vl_api_udp_encap_del_t::id
u32 id
Definition: udp.api:105
dst_port
u16 dst_port
Definition: udp.api:42
udp_decap
typedef udp_decap
UDP Decap object.
Definition: udp.api:62
u32
unsigned int u32
Definition: types.h:88
vl_api_udp_encap_add_t::client_index
u32 client_index
Definition: udp.api:76
vl_api_udp_encap_add_reply_t::id
u32 id
Definition: udp.api:92
id
u32 id
Definition: udp.api:45
table_id
u32 table_id
Definition: wireguard.api:102
vl_api_udp_encap_add_t::udp_encap
vl_api_udp_encap_t udp_encap
Definition: udp.api:78
next_proto
vl_api_udp_decap_next_proto_t next_proto
Definition: udp.api:65
u8
unsigned char u8
Definition: types.h:56
vl_api_udp_encap_dump_t
dump UDP encaps
Definition: udp.api:111
UDP_API_DECAP_PROTO_IP6
@ UDP_API_DECAP_PROTO_IP6
Definition: udp.api:51
vl_api_udp_decap_add_del_t::udp_decap
vl_api_udp_decap_t udp_decap
Definition: udp.api:138
udp_decap_next_proto
udp_decap_next_proto
Definition: udp.api:48
vl_api_udp_encap_details_t::context
u32 context
Definition: udp.api:122
vl_api_udp_decap_add_del_t
Add/Del UDP decap.
Definition: udp.api:133
vl_api_udp_encap_dump_t::client_index
u32 client_index
Definition: udp.api:113
vl_api_udp_encap_del_t::client_index
u32 client_index
Definition: udp.api:103
vl_api_udp_decap_add_del_t::is_add
bool is_add
Definition: udp.api:137