]>
Commit | Line | Data |
---|---|---|
064af421 | 1 | /* |
05b3c97b | 2 | * Copyright (c) 2008, 2009, 2010 Nicira Networks |
a14bc59f BP |
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. | |
064af421 BP |
15 | */ |
16 | ||
17 | #ifndef OPENFLOW_NICIRA_EXT_H | |
18 | #define OPENFLOW_NICIRA_EXT_H 1 | |
19 | ||
20 | #include "openflow/openflow.h" | |
21 | ||
22 | #define NICIRA_OUI_STR "002320" | |
23 | ||
24 | /* The following vendor extensions, proposed by Nicira Networks, are not yet | |
25 | * ready for standardization (and may never be), so they are not included in | |
26 | * openflow.h. */ | |
27 | ||
28 | #define NX_VENDOR_ID 0x00002320 | |
29 | ||
30 | enum nicira_type { | |
31 | /* Switch status request. The request body is an ASCII string that | |
32 | * specifies a prefix of the key names to include in the output; if it is | |
33 | * the null string, then all key-value pairs are included. */ | |
34 | NXT_STATUS_REQUEST, | |
35 | ||
36 | /* Switch status reply. The reply body is an ASCII string of key-value | |
37 | * pairs in the form "key=value\n". */ | |
38 | NXT_STATUS_REPLY, | |
39 | ||
40 | /* Configure an action. Most actions do not require configuration | |
41 | * beyond that supplied in the actual action call. */ | |
42 | NXT_ACT_SET_CONFIG, | |
43 | ||
44 | /* Get configuration of action. */ | |
45 | NXT_ACT_GET_CONFIG, | |
46 | ||
2280e722 BP |
47 | /* No longer used. */ |
48 | NXT_COMMAND_REQUEST__OBSOLETE, | |
064af421 | 49 | |
2280e722 BP |
50 | /* No longer used. */ |
51 | NXT_COMMAND_REPLY__OBSOLETE, | |
064af421 BP |
52 | |
53 | /* No longer used. */ | |
54 | NXT_FLOW_END_CONFIG__OBSOLETE, | |
55 | ||
56 | /* No longer used. */ | |
57 | NXT_FLOW_END__OBSOLETE, | |
58 | ||
6468b79c BP |
59 | /* No longer used. */ |
60 | NXT_MGMT__OBSOLETE, | |
064af421 BP |
61 | }; |
62 | ||
63 | struct nicira_header { | |
64 | struct ofp_header header; | |
65 | uint32_t vendor; /* NX_VENDOR_ID. */ | |
66 | uint32_t subtype; /* One of NXT_* above. */ | |
67 | }; | |
05b3c97b | 68 | OFP_ASSERT(sizeof(struct nicira_header) == 16); |
064af421 BP |
69 | |
70 | ||
71 | enum nx_action_subtype { | |
72 | NXAST_SNAT__OBSOLETE, /* No longer used. */ | |
73 | NXAST_RESUBMIT /* Throw against flow table again. */ | |
74 | }; | |
75 | ||
76 | /* Action structure for NXAST_RESUBMIT. */ | |
77 | struct nx_action_resubmit { | |
78 | uint16_t type; /* OFPAT_VENDOR. */ | |
79 | uint16_t len; /* Length is 8. */ | |
80 | uint32_t vendor; /* NX_VENDOR_ID. */ | |
81 | uint16_t subtype; /* NXAST_RESUBMIT. */ | |
82 | uint16_t in_port; /* New in_port for checking flow table. */ | |
83 | uint8_t pad[4]; | |
84 | }; | |
85 | OFP_ASSERT(sizeof(struct nx_action_resubmit) == 16); | |
86 | ||
87 | /* Header for Nicira-defined actions. */ | |
88 | struct nx_action_header { | |
89 | uint16_t type; /* OFPAT_VENDOR. */ | |
90 | uint16_t len; /* Length is 8. */ | |
91 | uint32_t vendor; /* NX_VENDOR_ID. */ | |
92 | uint16_t subtype; /* NXAST_*. */ | |
93 | uint8_t pad[6]; | |
94 | }; | |
95 | OFP_ASSERT(sizeof(struct nx_action_header) == 16); | |
96 | ||
064af421 | 97 | #endif /* openflow/nicira-ext.h */ |