X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fofp-util.h;h=4d0d8adcef4c56b6a6d57ec656078733c6d00837;hb=add037c6b692db9c66dd0c16dff2d4b1b46c7499;hp=c8bf11e17e81738b8ab1d8b376ded06dd0a0ce6e;hpb=4f13da568d49b4910cedf45e6c54c43ea318dd18;p=sliver-openvswitch.git diff --git a/lib/ofp-util.h b/lib/ofp-util.h index c8bf11e17..4d0d8adce 100644 --- a/lib/ofp-util.h +++ b/lib/ofp-util.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc. + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,6 @@ #ifndef OFP_UTIL_H #define OFP_UTIL_H 1 -#include #include #include #include @@ -507,6 +506,18 @@ enum ofperr ofputil_decode_port_mod(const struct ofp_header *, struct ofpbuf *ofputil_encode_port_mod(const struct ofputil_port_mod *, enum ofputil_protocol); +/* Abstract ofp_role_request and reply. */ +struct ofputil_role_request { + enum ofp12_controller_role role; + bool have_generation_id; + uint64_t generation_id; +}; + +enum ofperr ofputil_decode_role_message(const struct ofp_header *, + struct ofputil_role_request *); +struct ofpbuf *ofputil_encode_role_reply(const struct ofp_header *, + const struct ofputil_role_request *); + /* Abstract table stats. * * For now we use ofp12_table_stats as a superset of the other protocol @@ -603,7 +614,6 @@ bool ofputil_frag_handling_from_string(const char *, enum ofp_config_flags *); * OFPUTIL_NXAST_NOTE * OFPUTIL_NXAST_SET_TUNNEL64 * OFPUTIL_NXAST_MULTIPATH - * OFPUTIL_NXAST_AUTOPATH * OFPUTIL_NXAST_BUNDLE * OFPUTIL_NXAST_BUNDLE_LOAD * OFPUTIL_NXAST_RESUBMIT_TABLE @@ -676,15 +686,13 @@ union ofp_action *ofputil_actions_clone(const union ofp_action *, size_t n); /* Handy utility for parsing flows and actions. */ bool ofputil_parse_key_value(char **stringp, char **keyp, char **valuep); -struct ofpbuf *ofputlil_dump_ports(enum ofp_version ofp_version, int16_t port); - struct ofputil_port_stats { uint16_t port_no; struct netdev_stats stats; }; struct ofpbuf *ofputil_encode_dump_ports_request(enum ofp_version ofp_version, - int16_t port); + uint16_t port); void ofputil_append_port_stat(struct list *replies, const struct ofputil_port_stats *ops); size_t ofputil_count_port_stats(const struct ofp_header *);