]>
Commit | Line | Data |
---|---|---|
50f96b10 | 1 | /* Copyright (c) 2011, 2012, 2013, 2014, 2017 Nicira, Inc. |
daff3353 EJ |
2 | * |
3 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
4 | * you may not use this file except in compliance with the License. | |
5 | * You may obtain a copy of the License at: | |
6 | * | |
7 | * http://www.apache.org/licenses/LICENSE-2.0 | |
8 | * | |
9 | * Unless required by applicable law or agreed to in writing, software | |
10 | * distributed under the License is distributed on an "AS IS" BASIS, | |
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 | * See the License for the specific language governing permissions and | |
13 | * limitations under the License. | |
14 | */ | |
15 | ||
16 | #ifndef BUNDLE_H | |
17 | #define BUNDLE_H 1 | |
18 | ||
b2befd5b BP |
19 | #include <sys/types.h> |
20 | #include <netinet/in.h> | |
daff3353 EJ |
21 | #include <arpa/inet.h> |
22 | #include <stdbool.h> | |
23 | #include <stddef.h> | |
24 | #include <stdint.h> | |
25 | ||
bdda5aca | 26 | #include "compiler.h" |
daff3353 | 27 | #include "openflow/nicira-ext.h" |
e03c096d | 28 | #include "openvswitch/ofp-errors.h" |
daff3353 EJ |
29 | #include "openvswitch/types.h" |
30 | ||
31 | struct ds; | |
32 | struct flow; | |
bcd2633a | 33 | struct flow_wildcards; |
67210a55 | 34 | struct match; |
f25d0cf3 | 35 | struct ofpact_bundle; |
daff3353 | 36 | struct ofpbuf; |
50f96b10 | 37 | struct ofputil_port_map; |
daff3353 EJ |
38 | |
39 | /* NXAST_BUNDLE helper functions. | |
40 | * | |
0da61033 | 41 | * See lib/ofp-actions.c for NXAST_BUNDLE specification. */ |
daff3353 | 42 | |
91fc374a | 43 | #define BUNDLE_MAX_MEMBERS 2048 |
c2d936a4 | 44 | |
4e022ec0 | 45 | ofp_port_t bundle_execute(const struct ofpact_bundle *, const struct flow *, |
bcd2633a | 46 | struct flow_wildcards *wc, |
91fc374a | 47 | bool (*member_enabled)(ofp_port_t ofp_port, void *aux), |
daff3353 | 48 | void *aux); |
4e022ec0 | 49 | enum ofperr bundle_check(const struct ofpact_bundle *, ofp_port_t max_ports, |
67210a55 | 50 | const struct match *); |
50f96b10 BP |
51 | char *bundle_parse(const char *, const struct ofputil_port_map *port_map, |
52 | struct ofpbuf *ofpacts) OVS_WARN_UNUSED_RESULT; | |
53 | char *bundle_parse_load(const char *, const struct ofputil_port_map *port_map, | |
54 | struct ofpbuf *ofpacts) | |
cab50449 | 55 | OVS_WARN_UNUSED_RESULT; |
50f96b10 BP |
56 | void bundle_format(const struct ofpact_bundle *, |
57 | const struct ofputil_port_map *, struct ds *); | |
daff3353 EJ |
58 | |
59 | #endif /* bundle.h */ |