2 * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.openflowjava.protocol.impl.util;
12 * @author michal.polkorab
15 public final class ActionConstants {
17 /** Openflow v1.0 & v1.3 OFPAT_OUTPUT code */
18 public static final byte OUTPUT_CODE = 0;
19 /** Openflow v1.0 OFPAT_SET_VLAN_VID code */
20 public static final byte SET_VLAN_VID_CODE = 1;
21 /** Openflow v1.0 OFPAT_SET_VLAN_PCP code */
22 public static final byte SET_VLAN_PCP_CODE = 2;
23 /** Openflow v1.0 OFPAT_STRIP_VLAN code */
24 public static final byte STRIP_VLAN_CODE = 3;
25 /** Openflow v1.0 OFPAT_SET_DL_SRC code */
26 public static final byte SET_DL_SRC_CODE = 4;
27 /** Openflow v1.0 OFPAT_SET_DL_DST code */
28 public static final byte SET_DL_DST_CODE = 5;
29 /** Openflow v1.0 OFPAT_SET_NW_SRC code */
30 public static final byte SET_NW_SRC_CODE = 6;
31 /** Openflow v1.0 OFPAT_SET_NW_DST code */
32 public static final byte SET_NW_DST_CODE = 7;
33 /** Openflow v1.0 OFPAT_SET_NW_TOS code */
34 public static final byte SET_NW_TOS_CODE = 8;
35 /** Openflow v1.0 OFPAT_SET_TP_SRC code */
36 public static final byte SET_TP_SRC_CODE = 9;
37 /** Openflow v1.0 OFPAT_SET_TP_DST code */
38 public static final byte SET_TP_DST_CODE = 10;
39 /** Openflow v1.0 OFPAT_ENQUEUE code */
40 public static final byte ENQUEUE_CODE = 11;
41 /** Openflow v1.3 OFPAT_COPY_TTL_OUT code */
42 public static final byte COPY_TTL_OUT_CODE = 11;
43 /** Openflow v1.3 OFPAT_COPY_TTL_IN code */
44 public static final byte COPY_TTL_IN_CODE = 12;
45 /** Openflow v1.3 OFPAT_SET_MPLS_TTL code */
46 public static final byte SET_MPLS_TTL_CODE = 15;
47 /** Openflow v1.3 OFPAT_DEC_MPLS_TTL code */
48 public static final byte DEC_MPLS_TTL_CODE = 16;
49 /** Openflow v1.3 OFPAT_PUSH_VLAN code */
50 public static final byte PUSH_VLAN_CODE = 17;
51 /** Openflow v1.3 OFPAT_POP_VLAN code */
52 public static final byte POP_VLAN_CODE = 18;
53 /** Openflow v1.3 OFPAT_PUSH_MPLS code */
54 public static final byte PUSH_MPLS_CODE = 19;
55 /** Openflow v1.3 OFPAT_POP_MPLS code */
56 public static final byte POP_MPLS_CODE = 20;
57 /** Openflow v1.3 OFPAT_SET_QUEUE code */
58 public static final byte SET_QUEUE_CODE = 21;
59 /** Openflow v1.3 OFPAT_GROUP code */
60 public static final byte GROUP_CODE = 22;
61 /** Openflow v1.3 OFPAT_SET_NW_TTL code */
62 public static final byte SET_NW_TTL_CODE = 23;
63 /** Openflow v1.3 OFPAT_DEC_NW_TTL code */
64 public static final byte DEC_NW_TTL_CODE = 24;
65 /** Openflow v1.3 OFPAT_SET_FIELD code */
66 public static final int SET_FIELD_CODE = 25;
67 /** Openflow v1.3 OFPAT_PUSH_PBB code */
68 public static final byte PUSH_PBB_CODE = 26;
69 /** Openflow v1.3 OFPAT_POP_PBB code */
70 public static final byte POP_PBB_CODE = 27;
72 /** Padding in OFPAT_OUTPUT (OF v1.3) */
73 public static final byte OUTPUT_PADDING = 6;
74 /** Padding in OFPAT_SET_VLAN_VID (OF v1.3) */
75 public static final byte PADDING_IN_SET_VLAN_VID_ACTION = 2;
76 /** Padding in OFPAT_SET_VLAN_PCP (OF v1.3) */
77 public static final byte PADDING_IN_SET_VLAN_PCP_ACTION = 3;
78 /** Padding in OFPAT_SET_NW_TOS (OF v1.3) */
79 public static final byte PADDING_IN_SET_NW_TOS_ACTION = 3;
80 /** Padding in OFPAT_ENQUEUE (OF v1.3) */
81 public static final int PADDING_IN_ENQUEUE_ACTION = 6;
82 /** Padding in OFPAT_SET_MPLS_TTL (OF v1.3) */
83 public static final byte SET_MPLS_TTL_PADDING = 3;
84 /** Padding in OFPAT_SET_NW_TTL (OF v1.3) */
85 public static final byte SET_NW_TTL_PADDING = 3;
86 /** Padding in OFPAT_SET_DL_SRC and OFPAT_SET_DL_DST (OF v1.3) */
87 public static final byte PADDING_IN_DL_ADDRESS_ACTION = 6;
88 /** Padding in OFPAT_SET_TP_SRC and OFPAT_SET_TP_DST (OF v1.3) */
89 public static final byte PADDING_IN_TP_PORT_ACTION = 2;
90 /** Padding in action header (OF v1.3) */
91 public static final byte PADDING_IN_ACTION_HEADER = 4;
92 /** Padding in OFPAT_PUSH_VLAN, OFPAT_PUSH_MPLS, OFPAT_POP_MPLS
93 * and OFPAT_PUSH_PBB (OF v1.3) */
94 public static final byte ETHERTYPE_ACTION_PADDING = 2;
96 /** Most common action length */
97 public static final byte GENERAL_ACTION_LENGTH = 8;
98 /** Action larger than GENERAL_ACTION_LENGTH - currently
99 * only 16 bytes long actions for both OF v1.0 & v1.3*/
100 public static final byte LARGER_ACTION_LENGTH = 16;
101 /** Action header size */
102 public static final byte ACTION_IDS_LENGTH = 4;
104 private ActionConstants() {
105 throw new UnsupportedOperationException("Utility class shouldn't be instantiated");