API: Cleanup APIs interface.api
[vpp.git] / src / vnet / interface_types.api
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 u32 interface_index;
18
19 enum if_status_flags
20 {
21   IF_STATUS_API_FLAG_ADMIN_UP = 1,
22   IF_STATUS_API_FLAG_LINK_UP = 2,
23 };
24
25 /* Per protocol MTU */
26 enum mtu_proto
27 {
28   MTU_PROTO_API_L3,                     /* Default payload MTU (without L2 headers) */
29   MTU_PROTO_API_IP4,                    /* Per-protocol MTUs overriding default */
30   MTU_PROTO_API_IP6,
31   MTU_PROTO_API_MPLS,
32   MTU_PROTO_API_N,
33 };
34
35 enum link_duplex
36 {
37   LINK_DUPLEX_API_UNKNOWN = 0,
38   LINK_DUPLEX_API_HALF = 1,
39   LINK_DUPLEX_API_FULL = 2,
40 };
41
42 enum sub_if_flags
43 {
44   SUB_IF_API_FLAG_NO_TAGS = 1,
45   SUB_IF_API_FLAG_ONE_TAG = 2,
46   SUB_IF_API_FLAG_TWO_TAGS = 4,
47   SUB_IF_API_FLAG_DOT1AD = 8,
48   SUB_IF_API_FLAG_EXACT_MATCH = 16,
49   SUB_IF_API_FLAG_DEFAULT = 32,
50   SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY = 64,
51   SUB_IF_API_FLAG_INNER_VLAN_ID_ANY = 128,
52   SUB_IF_API_FLAG_MASK_VNET = 254, /* use with vnet_sub_interface_t raw_flags */
53   SUB_IF_API_FLAG_DOT1AH = 256,
54 };
55
56 enum rx_mode
57 {
58   RX_MODE_API_UNKNOWN = 0,
59   RX_MODE_API_POLLING,
60   RX_MODE_API_INTERRUPT,
61   RX_MODE_API_ADAPTIVE,
62   RX_MODE_API_DEFAULT,
63 };