blob: 7526fdd135d7269717e9ee45a61f74a36dc72b49 [file] [log] [blame]
Jian Li7e8f57e2019-01-24 18:31:03 +09001/*
2 * Copyright 2016-present Open Networking Foundation
3 *
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 */
16package org.onosproject.k8snetworking.api;
17
Jian Li66f6e3c2019-01-25 10:24:44 +090018import org.onlab.packet.MacAddress;
19
Jian Li7e8f57e2019-01-24 18:31:03 +090020/**
Jian Li66f6e3c2019-01-25 10:24:44 +090021 * Provides constants used in kubernetes network switching and routing.
Jian Li7e8f57e2019-01-24 18:31:03 +090022 */
23public final class Constants {
24
25 private Constants() {
26 }
27
28 public static final String K8S_NETWORKING_APP_ID = "org.onosproject.k8snetworking";
Jian Li66f6e3c2019-01-25 10:24:44 +090029
30 public static final String ARP_BROADCAST_MODE = "broadcast";
31 public static final String ARP_PROXY_MODE = "proxy";
32
33 public static final String DEFAULT_GATEWAY_MAC_STR = "fe:00:00:00:00:02";
Jian Li4aa17642019-01-30 00:01:11 +090034 public static final String DEFAULT_HOST_MAC_STR = "fe:00:00:00:00:08";
Jian Li66f6e3c2019-01-25 10:24:44 +090035 public static final MacAddress DEFAULT_GATEWAY_MAC =
36 MacAddress.valueOf(DEFAULT_GATEWAY_MAC_STR);
37
Jian Libde20bf2019-01-25 17:34:43 +090038 public static final String PORT_NAME_PREFIX_CONTAINER = "veth";
39
Jian Li66f6e3c2019-01-25 10:24:44 +090040 public static final String ANNOTATION_NETWORK_ID = "networkId";
41 public static final String ANNOTATION_PORT_ID = "portId";
42 public static final String ANNOTATION_CREATE_TIME = "createTime";
43 public static final String ANNOTATION_SEGMENT_ID = "segId";
44
45 // flow priority
46 public static final int PRIORITY_SNAT_RULE = 26000;
Jian Li4aa17642019-01-30 00:01:11 +090047 public static final int PRIORITY_TUNNEL_TAG_RULE = 30000;
Jian Li66f6e3c2019-01-25 10:24:44 +090048 public static final int PRIORITY_DHCP_RULE = 42000;
49 public static final int PRIORITY_ADMIN_RULE = 32000;
50 public static final int PRIORITY_ACL_RULE = 31000;
51 public static final int PRIORITY_ACL_INGRESS_RULE = 30000;
52 public static final int PRIORITY_CT_HOOK_RULE = 30500;
53 public static final int PRIORITY_CT_RULE = 32000;
54 public static final int PRIORITY_CT_DROP_RULE = 32500;
Jian Li4aa17642019-01-30 00:01:11 +090055 public static final int PRIORITY_SWITCHING_RULE = 30000;
Jian Li66f6e3c2019-01-25 10:24:44 +090056 public static final int PRIORITY_ARP_GATEWAY_RULE = 41000;
57 public static final int PRIORITY_ARP_SUBNET_RULE = 40000;
58 public static final int PRIORITY_ARP_CONTROL_RULE = 40000;
59 public static final int PRIORITY_ARP_REPLY_RULE = 40000;
60 public static final int PRIORITY_ARP_REQUEST_RULE = 40000;
61 public static final int PRIORITY_ARP_FLOOD_RULE = 39000;
62 public static final int PRIORITY_FORCED_ACL_RULE = 50000;
63 public static final int PRIORITY_ICMP_PROBE_RULE = 50000;
64
65 // flow table index
66 public static final int STAT_INBOUND_TABLE = 0;
67 public static final int VTAP_INBOUND_TABLE = 1;
68 public static final int VTAP_INBOUND_MIRROR_TABLE = 2;
69 public static final int STAT_FLAT_OUTBOUND_TABLE = 10;
70 public static final int VTAP_FLAT_OUTBOUND_TABLE = 11;
71 public static final int VTAP_FLAT_OUTBOUND_MIRROR_TABLE = 12;
72 public static final int DHCP_TABLE = 5;
73 public static final int VTAG_TABLE = 30;
74 public static final int ARP_TABLE = 35;
75 public static final int ACL_EGRESS_TABLE = 40;
76 public static final int ACL_INGRESS_TABLE = 44;
77 public static final int CT_TABLE = 45;
78 public static final int ACL_RECIRC_TABLE = 43;
79 public static final int JUMP_TABLE = 50;
80 public static final int ROUTING_TABLE = 60;
81 public static final int STAT_OUTBOUND_TABLE = 70;
82 public static final int VTAP_OUTBOUND_TABLE = 71;
83 public static final int VTAP_OUTBOUND_MIRROR_TABLE = 72;
84 public static final int FORWARDING_TABLE = 80;
85 public static final int ERROR_TABLE = 100;
86
87 // group table index
88 public static final int VTAP_INBOUND_GROUP_TABLE = 1;
89 public static final int VTAP_FLAT_OUTBOUND_GROUP_TABLE = 2;
90 public static final int VTAP_OUTBOUND_GROUP_TABLE = 3;
Jian Li7e8f57e2019-01-24 18:31:03 +090091}