FD.io VPP  v20.09-64-g4f7b92f0a
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 /* ECN code points - RFC 3168
27  https://tools.ietf.org/html/rfc3168
28 */
29 enum ip_ecn : u8 {
34 };
35 
36 /* DSCP code points - RFC 2474
37  https://tools.ietf.org/html/rfc2474
38  Values other than these RFC defined values are accepted.
39 */
40 enum ip_dscp : u8 {
62 };
63 
64 enum ip_proto : u8 {
78 };
79 
81  vl_api_ip4_address_t ip4;
82  vl_api_ip6_address_t ip6;
83 };
84 
85 manual_print typedef address {
86  vl_api_address_family_t af;
87  vl_api_address_union_t un;
88 };
89 
90 manual_print typedef prefix {
91  vl_api_address_t address;
93 };
94 
96 {
97  vl_api_ip4_address_t addr;
98  vl_api_ip4_address_t mask;
99 };
100 
101 typedef ip6_address_and_mask
102 {
103  vl_api_ip6_address_t addr;
104  vl_api_ip6_address_t mask;
105 };
106 
107 typedef mprefix {
108  vl_api_address_family_t af;
110  vl_api_address_union_t grp_address;
111  vl_api_address_union_t src_address;
112 };
113 
114 manual_print typedef ip6_prefix {
115  vl_api_ip6_address_t address;
116  u8 len;
117 };
118 
119 manual_print typedef ip4_prefix {
120  vl_api_ip4_address_t address;
121  u8 len;
122 };
123 
124 /** \brief
125  *
126  * The vl_api_[ip4|ip6]_address_with_prefix_t types are used as a type to denote
127  * both an IP address and a prefix. I.e. in CIDR notation
128  * '192.168.10.1/24' the address is 192.168.10.1 and the network
129  * prefix is 192.168.10.0/24.
130  *
131  * If only an address is needed use: vl_api_address_t types and if
132  * only a network prefix is needed (i.e. no hosts bits), then use the
133  * vl_api_prefix_t types.
134  *
135  **/
136 
137 manual_print typedef vl_api_prefix_t address_with_prefix;
138 manual_print typedef vl_api_ip4_prefix_t ip4_address_with_prefix;
139 manual_print typedef vl_api_ip6_prefix_t ip6_address_with_prefix;
140 
141 /** \brief A context for matching prefixes against. (Think ip prefix list.)
142  The meaning (exact match / want subnets) of an unset matcher is left to the implementer.
143  @param le - le mut be <= to prefix.len. Default: 255 (not set).
144  @param ge - ge must be greater than le and <= max_size of prefix. Default: 255 (not set).
145 
146 */
147 typedef prefix_matcher {
148  u8 le; /* [default=255] */
149  u8 ge; /* [default=255] */
150 };
typedef prefix_matcher
A context for matching prefixes against.
Definition: ip_types.api:147
manual_print typedef u8 ip4_address[4]
Definition: ip_types.api:18
ip_proto
Definition: ip_types.api:64
manual_print typedef ip4_prefix
Definition: ip_types.api:119
ip_ecn
Definition: ip_types.api:29
manual_print typedef vl_api_ip4_prefix_t ip4_address_with_prefix
Definition: ip_types.api:138
vhost_vring_addr_t addr
Definition: vhost_user.h:111
unsigned char u8
Definition: types.h:56
ip_dscp
Definition: ip_types.api:40
manual_print typedef ip6_prefix
Definition: ip_types.api:114
manual_print typedef prefix
Definition: ip_types.api:90
typedef ip4_address_and_mask
Definition: ip_types.api:96
vl_api_ip6_address_t ip6
Definition: ip_types.api:82
unsigned short u16
Definition: types.h:57
address_family
Definition: ip_types.api:21
u16 grp_address_length
Definition: ip_types.api:109
vl_api_address_union_t src_address
Definition: ip_types.api:111
u8 len
Definition: ip_types.api:92
option version
Definition: ip_types.api:17
manual_print typedef address
Definition: ip_types.api:85
vl_api_ip4_address_t mask
Definition: ip_types.api:98
manual_print typedef u8 ip6_address[16]
Definition: ip_types.api:19
typedef mprefix
Definition: ip_types.api:107
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:122
manual_print typedef vl_api_ip6_prefix_t ip6_address_with_prefix
Definition: ip_types.api:139
vl_api_address_union_t grp_address
Definition: ip_types.api:110
u8 ge
Definition: ip_types.api:149
typedef ip6_address_and_mask
Definition: ip_types.api:102
vl_api_address_union_t un
Definition: ip_types.api:87
vl_api_ip4_address_t ip4
Definition: ip_types.api:81