FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
ip_types.api
Go to the documentation of this file.
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2018 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 option version = "3.0.0";
18 manual_print typedef u8 ip4_address[4];
19 manual_print typedef u8 ip6_address[16];
20 
24 };
25 
26 /**
27  * @brief The location at which to apply a feature
28  */
35 };
36 
37 /* ECN code points - RFC 3168
38  https://tools.ietf.org/html/rfc3168
39 */
40 enum ip_ecn : u8 {
45 };
46 
47 /* DSCP code points - RFC 2474
48  https://tools.ietf.org/html/rfc2474
49  Values other than these RFC defined values are accepted.
50 */
51 enum ip_dscp : u8 {
73 };
74 
75 enum ip_proto : u8 {
89 };
90 
92  vl_api_ip4_address_t ip4;
93  vl_api_ip6_address_t ip6;
94 };
95 
96 manual_print typedef address {
97  vl_api_address_family_t af;
98  vl_api_address_union_t un;
99 };
100 
101 manual_print typedef prefix {
102  vl_api_address_t address;
104 };
105 
106 typedef ip4_address_and_mask
107 {
108  vl_api_ip4_address_t addr;
109  vl_api_ip4_address_t mask;
110 };
111 
112 typedef ip6_address_and_mask
113 {
114  vl_api_ip6_address_t addr;
115  vl_api_ip6_address_t mask;
116 };
117 
118 typedef mprefix {
119  vl_api_address_family_t af;
121  vl_api_address_union_t grp_address;
122  vl_api_address_union_t src_address;
123 };
124 
125 manual_print typedef ip6_prefix {
126  vl_api_ip6_address_t address;
127  u8 len;
128 };
129 
130 manual_print typedef ip4_prefix {
131  vl_api_ip4_address_t address;
132  u8 len;
133 };
134 
135 /** \brief
136  *
137  * The vl_api_[ip4|ip6]_address_with_prefix_t types are used as a type to denote
138  * both an IP address and a prefix. I.e. in CIDR notation
139  * '192.168.10.1/24' the address is 192.168.10.1 and the network
140  * prefix is 192.168.10.0/24.
141  *
142  * If only an address is needed use: vl_api_address_t types and if
143  * only a network prefix is needed (i.e. no hosts bits), then use the
144  * vl_api_prefix_t types.
145  *
146  **/
147 
148 manual_print typedef vl_api_prefix_t address_with_prefix;
149 manual_print typedef vl_api_ip4_prefix_t ip4_address_with_prefix;
150 manual_print typedef vl_api_ip6_prefix_t ip6_address_with_prefix;
151 
152 /** \brief A context for matching prefixes against. (Think ip prefix list.)
153  The meaning (exact match / want subnets) of an unset matcher is left to the implementer.
154  @param le - le mut be <= to prefix.len. Default: 255 (not set).
155  @param ge - ge must be greater than le and <= max_size of prefix. Default: 255 (not set).
156 
157 */
158 typedef prefix_matcher {
159  u8 le; /* [default=255] */
160  u8 ge; /* [default=255] */
161 };
IP_API_DSCP_AF32
@ IP_API_DSCP_AF32
Definition: ip_types.api:63
IP_API_PROTO_IGMP
@ IP_API_PROTO_IGMP
Definition: ip_types.api:78
address_union::ip4
vl_api_ip4_address_t ip4
Definition: ip_types.api:92
IP_API_DSCP_AF31
@ IP_API_DSCP_AF31
Definition: ip_types.api:62
IP_API_DSCP_CS5
@ IP_API_DSCP_CS5
Definition: ip_types.api:69
address_family
address_family
Definition: ip_types.api:21
ip_proto
ip_proto
Definition: ip_types.api:75
IP_API_DSCP_CS1
@ IP_API_DSCP_CS1
Definition: ip_types.api:53
IP_API_DSCP_AF21
@ IP_API_DSCP_AF21
Definition: ip_types.api:58
IP_API_DSCP_AF23
@ IP_API_DSCP_AF23
Definition: ip_types.api:60
IP_API_PROTO_OSPF
@ IP_API_PROTO_OSPF
Definition: ip_types.api:86
IP_API_DSCP_AF33
@ IP_API_DSCP_AF33
Definition: ip_types.api:64
IP_API_PROTO_GRE
@ IP_API_PROTO_GRE
Definition: ip_types.api:81
IP_API_DSCP_AF43
@ IP_API_DSCP_AF43
Definition: ip_types.api:68
address_with_prefix
manual_print typedef vl_api_prefix_t address_with_prefix
The vl_api_[ip4|ip6]_address_with_prefix_t types are used as a type to denote both an IP address and ...
Definition: ip_types.api:133
ip4_address_and_mask
typedef ip4_address_and_mask
Definition: ip_types.api:107
u16
unsigned short u16
Definition: types.h:57
IP_API_PROTO_ICMP6
@ IP_API_PROTO_ICMP6
Definition: ip_types.api:84
IP_API_DSCP_CS4
@ IP_API_DSCP_CS4
Definition: ip_types.api:65
IP_API_FEATURE_DROP
@ IP_API_FEATURE_DROP
Definition: ip_types.api:34
address_union
Definition: ip_types.api:91
addr
vhost_vring_addr_t addr
Definition: vhost_user.h:130
IP_API_ECN_ECT0
@ IP_API_ECN_ECT0
Definition: ip_types.api:42
ADDRESS_IP6
@ ADDRESS_IP6
Definition: ip_types.api:23
IP_API_PROTO_AH
@ IP_API_PROTO_AH
Definition: ip_types.api:83
mprefix
typedef mprefix
Definition: ip_types.api:118
IP_API_PROTO_EIGRP
@ IP_API_PROTO_EIGRP
Definition: ip_types.api:85
ip6_prefix
manual_print typedef ip6_prefix
Definition: ip_types.api:125
prefix
manual_print typedef prefix
Definition: ip_types.api:101
IP_API_PROTO_ICMP
@ IP_API_PROTO_ICMP
Definition: ip_types.api:77
IP_API_DSCP_CS0
@ IP_API_DSCP_CS0
Definition: ip_types.api:52
len
u8 len
Definition: ip_types.api:103
ip_ecn
ip_ecn
Definition: ip_types.api:40
ip6_address_with_prefix
manual_print typedef vl_api_ip6_prefix_t ip6_address_with_prefix
Definition: ip_types.api:150
IP_API_DSCP_CS6
@ IP_API_DSCP_CS6
Definition: ip_types.api:71
version
option version
Definition: ip_types.api:17
IP_API_DSCP_AF22
@ IP_API_DSCP_AF22
Definition: ip_types.api:59
IP_API_DSCP_CS7
@ IP_API_DSCP_CS7
Definition: ip_types.api:72
IP_API_DSCP_AF41
@ IP_API_DSCP_AF41
Definition: ip_types.api:66
IP_API_DSCP_CS3
@ IP_API_DSCP_CS3
Definition: ip_types.api:61
IP_API_PROTO_TCP
@ IP_API_PROTO_TCP
Definition: ip_types.api:79
prefix_matcher
typedef prefix_matcher
A context for matching prefixes against.
Definition: ip_types.api:158
address
manual_print typedef address
Definition: ip_types.api:96
ge
u8 ge
Definition: ip_types.api:160
IP_API_DSCP_CS2
@ IP_API_DSCP_CS2
Definition: ip_types.api:57
IP_API_PROTO_UDP
@ IP_API_PROTO_UDP
Definition: ip_types.api:80
IP_API_FEATURE_INPUT
@ IP_API_FEATURE_INPUT
Definition: ip_types.api:30
IP_API_ECN_NONE
@ IP_API_ECN_NONE
Definition: ip_types.api:41
af
vl_api_address_family_t af
Definition: ip.api:619
IP_API_PROTO_HOPOPT
@ IP_API_PROTO_HOPOPT
Definition: ip_types.api:76
grp_address
vl_api_address_union_t grp_address
Definition: ip_types.api:121
ip4_address
manual_print typedef u8 ip4_address[4]
Definition: ip_types.api:18
IP_API_DSCP_AF42
@ IP_API_DSCP_AF42
Definition: ip_types.api:67
ip6_address
manual_print typedef u8 ip6_address[16]
Definition: ip_types.api:19
IP_API_DSCP_AF13
@ IP_API_DSCP_AF13
Definition: ip_types.api:56
ip4_prefix
manual_print typedef ip4_prefix
Definition: ip_types.api:130
IP_API_DSCP_EF
@ IP_API_DSCP_EF
Definition: ip_types.api:70
u8
unsigned char u8
Definition: types.h:56
address_union::ip6
vl_api_ip6_address_t ip6
Definition: ip_types.api:93
IP_API_DSCP_AF12
@ IP_API_DSCP_AF12
Definition: ip_types.api:55
ip4_address_with_prefix
manual_print typedef vl_api_ip4_prefix_t ip4_address_with_prefix
Definition: ip_types.api:149
mask
vl_api_ip4_address_t mask
Definition: ip_types.api:109
ip_dscp
ip_dscp
Definition: ip_types.api:51
IP_API_DSCP_AF11
@ IP_API_DSCP_AF11
Definition: ip_types.api:54
IP_API_FEATURE_PUNT
@ IP_API_FEATURE_PUNT
Definition: ip_types.api:33
IP_API_PROTO_RESERVED
@ IP_API_PROTO_RESERVED
Definition: ip_types.api:88
grp_address_length
u16 grp_address_length
Definition: ip_types.api:120
src_address
vl_api_address_union_t src_address
Definition: ip_types.api:122
ADDRESS_IP4
@ ADDRESS_IP4
Definition: ip_types.api:22
IP_API_PROTO_SCTP
@ IP_API_PROTO_SCTP
Definition: ip_types.api:87
IP_API_FEATURE_LOCAL
@ IP_API_FEATURE_LOCAL
Definition: ip_types.api:32
ip_feature_location
ip_feature_location
The location at which to apply a feature.
Definition: ip_types.api:29
IP_API_ECN_ECT1
@ IP_API_ECN_ECT1
Definition: ip_types.api:43
IP_API_ECN_CE
@ IP_API_ECN_CE
Definition: ip_types.api:44
IP_API_PROTO_ESP
@ IP_API_PROTO_ESP
Definition: ip_types.api:82
IP_API_FEATURE_OUTPUT
@ IP_API_FEATURE_OUTPUT
Definition: ip_types.api:31
ip6_address_and_mask
typedef ip6_address_and_mask
Definition: ip_types.api:113
un
vl_api_address_union_t un
Definition: ip_types.api:98