]> git.proxmox.com Git - mirror_ovs.git/blame - lib/ofp-parse.h
Implement Openflow 1.4 Vacancy Events for OFPT_TABLE_MOD.
[mirror_ovs.git] / lib / ofp-parse.h
CommitLineData
f22716dc 1/*
db5076ee 2 * Copyright (c) 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
f22716dc
JP
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:
d295e8e9 7 *
f22716dc 8 * http://www.apache.org/licenses/LICENSE-2.0
d295e8e9 9 *
f22716dc
JP
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.
d295e8e9
JP
15 */
16
f22716dc
JP
17/* OpenFlow protocol string to flow parser. */
18
19#ifndef OFP_PARSE_H
20#define OFP_PARSE_H 1
21
88ca35ee 22#include <stdbool.h>
f22716dc 23#include <stdint.h>
15f1f1b6 24#include <stdio.h>
bdda5aca 25#include "compiler.h"
4caacc1e 26#include "openvswitch/types.h"
3bd0fd39 27#include "packets.h"
f22716dc 28
ccbe50f8 29struct flow;
88ca35ee 30struct ofpbuf;
a9a2da38 31struct ofputil_flow_mod;
2b07c8b1 32struct ofputil_flow_monitor_request;
81d1ea94 33struct ofputil_flow_stats_request;
7395c052 34struct ofputil_group_mod;
638a19b0 35struct ofputil_meter_mod;
918f2b82 36struct ofputil_table_mod;
6159c531 37struct ofputil_geneve_table_mod;
5a0a5702 38struct simap;
db0b6c29 39enum ofputil_protocol;
f22716dc 40
db0b6c29 41char *parse_ofp_str(struct ofputil_flow_mod *, int command, const char *str_,
ba2fe8e9 42 enum ofputil_protocol *usable_protocols)
cab50449 43 OVS_WARN_UNUSED_RESULT;
0199c526 44
bdda5aca 45char *parse_ofp_flow_mod_str(struct ofputil_flow_mod *, const char *string,
db5076ee 46 int command,
ba2fe8e9 47 enum ofputil_protocol *usable_protocols)
cab50449 48 OVS_WARN_UNUSED_RESULT;
918f2b82
AZ
49
50char *parse_ofp_table_mod(struct ofputil_table_mod *,
51 const char *table_id, const char *flow_miss_handling,
82c22d34 52 uint32_t *usable_versions)
cab50449 53 OVS_WARN_UNUSED_RESULT;
918f2b82 54
db5076ee 55char *parse_ofp_flow_mod_file(const char *file_name, int command,
db0b6c29 56 struct ofputil_flow_mod **fms, size_t *n_fms,
ba2fe8e9 57 enum ofputil_protocol *usable_protocols)
cab50449 58 OVS_WARN_UNUSED_RESULT;
8050b31d 59
bdda5aca 60char *parse_ofp_flow_stats_request_str(struct ofputil_flow_stats_request *,
db0b6c29 61 bool aggregate, const char *string,
ba2fe8e9 62 enum ofputil_protocol *usable_protocols)
cab50449 63 OVS_WARN_UNUSED_RESULT;
f22716dc 64
5a0a5702
GS
65char *parse_ofp_exact_flow(struct flow *flow, struct flow *mask, const char *s,
66 const struct simap *portno_names);
ccbe50f8 67
bdda5aca 68char *parse_ofp_meter_mod_str(struct ofputil_meter_mod *, const char *string,
db0b6c29
JR
69 int command,
70 enum ofputil_protocol *usable_protocols)
cab50449 71 OVS_WARN_UNUSED_RESULT;
638a19b0 72
bdda5aca 73char *parse_flow_monitor_request(struct ofputil_flow_monitor_request *,
db0b6c29
JR
74 const char *,
75 enum ofputil_protocol *usable_protocols)
cab50449 76 OVS_WARN_UNUSED_RESULT;
2b07c8b1 77
7395c052
NZ
78char *parse_ofp_group_mod_file(const char *file_name, uint16_t command,
79 struct ofputil_group_mod **gms, size_t *n_gms,
80 enum ofputil_protocol *usable_protocols)
cab50449 81 OVS_WARN_UNUSED_RESULT;
7395c052
NZ
82
83char *parse_ofp_group_mod_str(struct ofputil_group_mod *, uint16_t command,
84 const char *string,
85 enum ofputil_protocol *usable_protocols)
cab50449 86 OVS_WARN_UNUSED_RESULT;
7395c052 87
6159c531
JG
88char *parse_ofp_geneve_table_mod_str(struct ofputil_geneve_table_mod *,
89 uint16_t command, const char *string,
90 enum ofputil_protocol *usable_protocols)
91 OVS_WARN_UNUSED_RESULT;
92
4caacc1e 93char *str_to_u8(const char *str, const char *name, uint8_t *valuep)
cab50449 94 OVS_WARN_UNUSED_RESULT;
4caacc1e 95char *str_to_u16(const char *str, const char *name, uint16_t *valuep)
cab50449
TG
96 OVS_WARN_UNUSED_RESULT;
97char *str_to_u32(const char *str, uint32_t *valuep) OVS_WARN_UNUSED_RESULT;
98char *str_to_u64(const char *str, uint64_t *valuep) OVS_WARN_UNUSED_RESULT;
99char *str_to_be64(const char *str, ovs_be64 *valuep) OVS_WARN_UNUSED_RESULT;
74ff3298 100char *str_to_mac(const char *str, struct eth_addr *mac) OVS_WARN_UNUSED_RESULT;
cab50449 101char *str_to_ip(const char *str, ovs_be32 *ip) OVS_WARN_UNUSED_RESULT;
d787ad39 102char *str_to_connhelper(const char *str, uint16_t *alg) OVS_WARN_UNUSED_RESULT;
de7d3c07
SJ
103char *parse_ofp_table_vacancy(struct ofputil_table_mod *,
104 const char *flow_miss_handling)
105 OVS_WARN_UNUSED_RESULT;
4caacc1e 106
f22716dc 107#endif /* ofp-parse.h */