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