X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=lib%2Fofp-errors.h;h=2f28a42073708b78dc958bd923a224ae4674659a;hb=36a16881d032fce280e54de2f261640a52bf04c7;hp=76b65746fa83e0e0cda5383fb6f4acadd4fb47f9;hpb=aa319503aa099030d4e4796710b0ebace8907f2b;p=openvswitch diff --git a/lib/ofp-errors.h b/lib/ofp-errors.h index 76b65746..2f28a420 100644 --- a/lib/ofp-errors.h +++ b/lib/ofp-errors.h @@ -21,8 +21,9 @@ #include #include +#include "openflow/openflow.h" + struct ds; -struct ofp_header; struct ofpbuf; /* Error codes. @@ -495,30 +496,24 @@ enum ofperr { OFPERR_OFPET_EXPERIMENTER, }; -extern const struct ofperr_domain ofperr_of10; -extern const struct ofperr_domain ofperr_of11; -extern const struct ofperr_domain ofperr_of12; - -const struct ofperr_domain *ofperr_domain_from_version(uint8_t version); -const char *ofperr_domain_get_name(const struct ofperr_domain *); +const char *ofperr_domain_get_name(enum ofp_version); bool ofperr_is_valid(enum ofperr); bool ofperr_is_category(enum ofperr); bool ofperr_is_nx_extension(enum ofperr); -bool ofperr_is_encodable(enum ofperr, const struct ofperr_domain *); +bool ofperr_is_encodable(enum ofperr, enum ofp_version); -enum ofperr ofperr_decode(const struct ofperr_domain *, - uint16_t type, uint16_t code); -enum ofperr ofperr_decode_type(const struct ofperr_domain *, uint16_t type); +enum ofperr ofperr_decode(enum ofp_version, uint16_t type, uint16_t code); +enum ofperr ofperr_decode_type(enum ofp_version, uint16_t type); enum ofperr ofperr_from_name(const char *); enum ofperr ofperr_decode_msg(const struct ofp_header *, struct ofpbuf *payload); struct ofpbuf *ofperr_encode_reply(enum ofperr, const struct ofp_header *); -struct ofpbuf *ofperr_encode_hello(enum ofperr, const struct ofperr_domain *, +struct ofpbuf *ofperr_encode_hello(enum ofperr, enum ofp_version ofp_version, const char *); -int ofperr_get_type(enum ofperr, const struct ofperr_domain *); -int ofperr_get_code(enum ofperr, const struct ofperr_domain *); +int ofperr_get_type(enum ofperr, enum ofp_version); +int ofperr_get_code(enum ofperr, enum ofp_version); const char *ofperr_get_name(enum ofperr); const char *ofperr_get_description(enum ofperr);