1814a7e6dSreyk /* Automatically generated from ofp.h, do not edit */ 2*07d35acaSrzalamena /* $OpenBSD: ofp_map.c,v 1.2 2016/12/02 17:10:20 rzalamena Exp $ */ 3814a7e6dSreyk 4814a7e6dSreyk /* 5814a7e6dSreyk * Copyright (c) 2013-2016 Reyk Floeter <reyk@openbsd.org> 6814a7e6dSreyk * Copyright (c) 2016 Kazuya GODA <goda@openbsd.org> 7814a7e6dSreyk * 8814a7e6dSreyk * Permission to use, copy, modify, and distribute this software for any 9814a7e6dSreyk * purpose with or without fee is hereby granted, provided that the above 10814a7e6dSreyk * copyright notice and this permission notice appear in all copies. 11814a7e6dSreyk * 12814a7e6dSreyk * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13814a7e6dSreyk * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14814a7e6dSreyk * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 15814a7e6dSreyk * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16814a7e6dSreyk * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17814a7e6dSreyk * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 18814a7e6dSreyk * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19814a7e6dSreyk */ 20814a7e6dSreyk 21814a7e6dSreyk #include <sys/types.h> 22814a7e6dSreyk #include <net/ofp.h> 23814a7e6dSreyk #include "ofp_map.h" 24814a7e6dSreyk 25814a7e6dSreyk struct constmap ofp_v_map[] = { 26814a7e6dSreyk { OFP_V_0, "0" }, 27814a7e6dSreyk { OFP_V_1_0, "1_0" }, 28814a7e6dSreyk { OFP_V_1_1, "1_1" }, 29814a7e6dSreyk { OFP_V_1_2, "1_2" }, 30814a7e6dSreyk { OFP_V_1_3, "1_3" }, 31814a7e6dSreyk { OFP_V_1_4, "1_4" }, 32814a7e6dSreyk { OFP_V_1_5, "1_5" }, 33814a7e6dSreyk { 0 } 34814a7e6dSreyk }; 35814a7e6dSreyk struct constmap ofp_t_map[] = { 36814a7e6dSreyk { OFP_T_HELLO, "HELLO" }, 37814a7e6dSreyk { OFP_T_ERROR, "ERROR" }, 38814a7e6dSreyk { OFP_T_ECHO_REQUEST, "ECHO_REQUEST" }, 39814a7e6dSreyk { OFP_T_ECHO_REPLY, "ECHO_REPLY" }, 40814a7e6dSreyk { OFP_T_EXPERIMENTER, "EXPERIMENTER" }, 41814a7e6dSreyk { OFP_T_FEATURES_REQUEST, "FEATURES_REQUEST" }, 42814a7e6dSreyk { OFP_T_FEATURES_REPLY, "FEATURES_REPLY" }, 43814a7e6dSreyk { OFP_T_GET_CONFIG_REQUEST, "GET_CONFIG_REQUEST" }, 44814a7e6dSreyk { OFP_T_GET_CONFIG_REPLY, "GET_CONFIG_REPLY" }, 45814a7e6dSreyk { OFP_T_SET_CONFIG, "SET_CONFIG" }, 46814a7e6dSreyk { OFP_T_PACKET_IN, "PACKET_IN" }, 47814a7e6dSreyk { OFP_T_FLOW_REMOVED, "FLOW_REMOVED" }, 48814a7e6dSreyk { OFP_T_PORT_STATUS, "PORT_STATUS" }, 49814a7e6dSreyk { OFP_T_PACKET_OUT, "PACKET_OUT" }, 50814a7e6dSreyk { OFP_T_FLOW_MOD, "FLOW_MOD" }, 51814a7e6dSreyk { OFP_T_GROUP_MOD, "GROUP_MOD" }, 52814a7e6dSreyk { OFP_T_PORT_MOD, "PORT_MOD" }, 53814a7e6dSreyk { OFP_T_TABLE_MOD, "TABLE_MOD" }, 54814a7e6dSreyk { OFP_T_MULTIPART_REQUEST, "MULTIPART_REQUEST" }, 55814a7e6dSreyk { OFP_T_MULTIPART_REPLY, "MULTIPART_REPLY" }, 56814a7e6dSreyk { OFP_T_BARRIER_REQUEST, "BARRIER_REQUEST" }, 57814a7e6dSreyk { OFP_T_BARRIER_REPLY, "BARRIER_REPLY" }, 58814a7e6dSreyk { OFP_T_QUEUE_GET_CONFIG_REQUEST, "QUEUE_GET_CONFIG_REQUEST" }, 59814a7e6dSreyk { OFP_T_QUEUE_GET_CONFIG_REPLY, "QUEUE_GET_CONFIG_REPLY" }, 60814a7e6dSreyk { OFP_T_ROLE_REQUEST, "ROLE_REQUEST" }, 61814a7e6dSreyk { OFP_T_ROLE_REPLY, "ROLE_REPLY" }, 62814a7e6dSreyk { OFP_T_GET_ASYNC_REQUEST, "GET_ASYNC_REQUEST" }, 63814a7e6dSreyk { OFP_T_GET_ASYNC_REPLY, "GET_ASYNC_REPLY" }, 64814a7e6dSreyk { OFP_T_SET_ASYNC, "SET_ASYNC" }, 65814a7e6dSreyk { OFP_T_METER_MOD, "METER_MOD" }, 66814a7e6dSreyk { 0 } 67814a7e6dSreyk }; 68814a7e6dSreyk struct constmap ofp_pktin_map[] = { 69814a7e6dSreyk { OFP_PKTIN_REASON_NO_MATCH, "REASON_NO_MATCH" }, 70814a7e6dSreyk { OFP_PKTIN_REASON_ACTION, "REASON_ACTION" }, 71814a7e6dSreyk { OFP_PKTIN_REASON_TTL, "REASON_TTL" }, 72814a7e6dSreyk { 0 } 73814a7e6dSreyk }; 74814a7e6dSreyk struct constmap ofp_port_map[] = { 75814a7e6dSreyk { OFP_PORT_MAX, "MAX" }, 76814a7e6dSreyk { OFP_PORT_INPUT, "INPUT" }, 77814a7e6dSreyk { OFP_PORT_FLOWTABLE, "FLOWTABLE" }, 78814a7e6dSreyk { OFP_PORT_NORMAL, "NORMAL" }, 79814a7e6dSreyk { OFP_PORT_FLOOD, "FLOOD" }, 80814a7e6dSreyk { OFP_PORT_ALL, "ALL" }, 81814a7e6dSreyk { OFP_PORT_CONTROLLER, "CONTROLLER" }, 82814a7e6dSreyk { OFP_PORT_LOCAL, "LOCAL" }, 83814a7e6dSreyk { OFP_PORT_ANY, "ANY" }, 84814a7e6dSreyk { 0 } 85814a7e6dSreyk }; 86814a7e6dSreyk struct constmap ofp_pktout_map[] = { 87814a7e6dSreyk { OFP_PKTOUT_NO_BUFFER, "NO_BUFFER" }, 88814a7e6dSreyk { 0 } 89814a7e6dSreyk }; 90814a7e6dSreyk struct constmap ofp_oxm_c_map[] = { 91814a7e6dSreyk { OFP_OXM_C_NXM_0, "NXM_0" }, 92814a7e6dSreyk { OFP_OXM_C_NXM_1, "NXM_1" }, 93814a7e6dSreyk { OFP_OXM_C_OPENFLOW_BASIC, "OPENFLOW_BASIC" }, 94814a7e6dSreyk { OFP_OXM_C_OPENFLOW_EXPERIMENTER, "OPENFLOW_EXPERIMENTER" }, 95814a7e6dSreyk { 0 } 96814a7e6dSreyk }; 97814a7e6dSreyk struct constmap ofp_xm_t_map[] = { 98814a7e6dSreyk { OFP_XM_T_IN_PORT, "IN_PORT" }, 99814a7e6dSreyk { OFP_XM_T_IN_PHY_PORT, "IN_PHY_PORT" }, 100814a7e6dSreyk { OFP_XM_T_META, "META" }, 101814a7e6dSreyk { OFP_XM_T_ETH_DST, "ETH_DST" }, 102814a7e6dSreyk { OFP_XM_T_ETH_SRC, "ETH_SRC" }, 103814a7e6dSreyk { OFP_XM_T_ETH_TYPE, "ETH_TYPE" }, 104814a7e6dSreyk { OFP_XM_T_VLAN_VID, "VLAN_VID" }, 105814a7e6dSreyk { OFP_XM_T_VLAN_PCP, "VLAN_PCP" }, 106814a7e6dSreyk { OFP_XM_T_IP_DSCP, "IP_DSCP" }, 107814a7e6dSreyk { OFP_XM_T_IP_ECN, "IP_ECN" }, 108814a7e6dSreyk { OFP_XM_T_IP_PROTO, "IP_PROTO" }, 109814a7e6dSreyk { OFP_XM_T_IPV4_SRC, "IPV4_SRC" }, 110814a7e6dSreyk { OFP_XM_T_IPV4_DST, "IPV4_DST" }, 111814a7e6dSreyk { OFP_XM_T_TCP_SRC, "TCP_SRC" }, 112814a7e6dSreyk { OFP_XM_T_TCP_DST, "TCP_DST" }, 113814a7e6dSreyk { OFP_XM_T_UDP_SRC, "UDP_SRC" }, 114814a7e6dSreyk { OFP_XM_T_UDP_DST, "UDP_DST" }, 115814a7e6dSreyk { OFP_XM_T_SCTP_SRC, "SCTP_SRC" }, 116814a7e6dSreyk { OFP_XM_T_SCTP_DST, "SCTP_DST" }, 117814a7e6dSreyk { OFP_XM_T_ICMPV4_TYPE, "ICMPV4_TYPE" }, 118814a7e6dSreyk { OFP_XM_T_ICMPV4_CODE, "ICMPV4_CODE" }, 119814a7e6dSreyk { OFP_XM_T_ARP_OP, "ARP_OP" }, 120814a7e6dSreyk { OFP_XM_T_ARP_SPA, "ARP_SPA" }, 121814a7e6dSreyk { OFP_XM_T_ARP_TPA, "ARP_TPA" }, 122814a7e6dSreyk { OFP_XM_T_ARP_SHA, "ARP_SHA" }, 123814a7e6dSreyk { OFP_XM_T_ARP_THA, "ARP_THA" }, 124814a7e6dSreyk { OFP_XM_T_IPV6_SRC, "IPV6_SRC" }, 125814a7e6dSreyk { OFP_XM_T_IPV6_DST, "IPV6_DST" }, 126814a7e6dSreyk { OFP_XM_T_IPV6_FLABEL, "IPV6_FLABEL" }, 127814a7e6dSreyk { OFP_XM_T_ICMPV6_TYPE, "ICMPV6_TYPE" }, 128814a7e6dSreyk { OFP_XM_T_ICMPV6_CODE, "ICMPV6_CODE" }, 129814a7e6dSreyk { OFP_XM_T_IPV6_ND_TARGET, "IPV6_ND_TARGET" }, 130814a7e6dSreyk { OFP_XM_T_IPV6_ND_SLL, "IPV6_ND_SLL" }, 131814a7e6dSreyk { OFP_XM_T_IPV6_ND_TLL, "IPV6_ND_TLL" }, 132814a7e6dSreyk { OFP_XM_T_MPLS_LABEL, "MPLS_LABEL" }, 133814a7e6dSreyk { OFP_XM_T_MPLS_TC, "MPLS_TC" }, 134814a7e6dSreyk { OFP_XM_T_MPLS_BOS, "MPLS_BOS" }, 135814a7e6dSreyk { OFP_XM_T_PBB_ISID, "PBB_ISID" }, 136814a7e6dSreyk { OFP_XM_T_TUNNEL_ID, "TUNNEL_ID" }, 137814a7e6dSreyk { OFP_XM_T_IPV6_EXTHDR, "IPV6_EXTHDR" }, 138814a7e6dSreyk { 0 } 139814a7e6dSreyk }; 140814a7e6dSreyk struct constmap ofp_config_map[] = { 141814a7e6dSreyk { OFP_CONFIG_FRAG_NORMAL, "FRAG_NORMAL" }, 142814a7e6dSreyk { OFP_CONFIG_FRAG_DROP, "FRAG_DROP" }, 143814a7e6dSreyk { OFP_CONFIG_FRAG_REASM, "FRAG_REASM" }, 144814a7e6dSreyk { OFP_CONFIG_FRAG_MASK, "FRAG_MASK" }, 145814a7e6dSreyk { 0 } 146814a7e6dSreyk }; 147814a7e6dSreyk struct constmap ofp_controller_maxlen_map[] = { 148814a7e6dSreyk { OFP_CONTROLLER_MAXLEN_MAX, "MAX" }, 149814a7e6dSreyk { OFP_CONTROLLER_MAXLEN_NO_BUFFER, "NO_BUFFER" }, 150814a7e6dSreyk { 0 } 151814a7e6dSreyk }; 152814a7e6dSreyk struct constmap ofp_instruction_t_map[] = { 153814a7e6dSreyk { OFP_INSTRUCTION_T_GOTO_TABLE, "GOTO_TABLE" }, 154814a7e6dSreyk { OFP_INSTRUCTION_T_WRITE_META, "WRITE_META" }, 155814a7e6dSreyk { OFP_INSTRUCTION_T_WRITE_ACTIONS, "WRITE_ACTIONS" }, 156814a7e6dSreyk { OFP_INSTRUCTION_T_APPLY_ACTIONS, "APPLY_ACTIONS" }, 157814a7e6dSreyk { OFP_INSTRUCTION_T_CLEAR_ACTIONS, "CLEAR_ACTIONS" }, 158814a7e6dSreyk { OFP_INSTRUCTION_T_METER, "METER" }, 159814a7e6dSreyk { OFP_INSTRUCTION_T_EXPERIMENTER, "EXPERIMENTER" }, 160814a7e6dSreyk { 0 } 161814a7e6dSreyk }; 162814a7e6dSreyk struct constmap ofp_portstate_map[] = { 163814a7e6dSreyk { OFP_PORTSTATE_LINK_DOWN, "LINK_DOWN" }, 164814a7e6dSreyk { OFP_PORTSTATE_STP_LISTEN, "STP_LISTEN" }, 165814a7e6dSreyk { OFP_PORTSTATE_STP_LEARN, "STP_LEARN" }, 166814a7e6dSreyk { OFP_PORTSTATE_STP_FORWARD, "STP_FORWARD" }, 167814a7e6dSreyk { OFP_PORTSTATE_STP_BLOCK, "STP_BLOCK" }, 168814a7e6dSreyk { OFP_PORTSTATE_STP_MASK, "STP_MASK" }, 169814a7e6dSreyk { 0 } 170814a7e6dSreyk }; 171814a7e6dSreyk struct constmap ofp_portconfig_map[] = { 172814a7e6dSreyk { OFP_PORTCONFIG_PORT_DOWN, "PORT_DOWN" }, 173814a7e6dSreyk { OFP_PORTCONFIG_NO_STP, "NO_STP" }, 174814a7e6dSreyk { OFP_PORTCONFIG_NO_RECV, "NO_RECV" }, 175814a7e6dSreyk { OFP_PORTCONFIG_NO_RECV_STP, "NO_RECV_STP" }, 176814a7e6dSreyk { OFP_PORTCONFIG_NO_FLOOD, "NO_FLOOD" }, 177814a7e6dSreyk { OFP_PORTCONFIG_NO_FWD, "NO_FWD" }, 178814a7e6dSreyk { OFP_PORTCONFIG_NO_PACKET_IN, "NO_PACKET_IN" }, 179814a7e6dSreyk { 0 } 180814a7e6dSreyk }; 181814a7e6dSreyk struct constmap ofp_portmedia_map[] = { 182814a7e6dSreyk { OFP_PORTMEDIA_10MB_HD, "10MB_HD" }, 183814a7e6dSreyk { OFP_PORTMEDIA_10MB_FD, "10MB_FD" }, 184814a7e6dSreyk { OFP_PORTMEDIA_100MB_HD, "100MB_HD" }, 185814a7e6dSreyk { OFP_PORTMEDIA_100MB_FD, "100MB_FD" }, 186814a7e6dSreyk { OFP_PORTMEDIA_1GB_HD, "1GB_HD" }, 187814a7e6dSreyk { OFP_PORTMEDIA_1GB_FD, "1GB_FD" }, 188814a7e6dSreyk { OFP_PORTMEDIA_10GB_FD, "10GB_FD" }, 189814a7e6dSreyk { OFP_PORTMEDIA_COPPER, "COPPER" }, 190814a7e6dSreyk { OFP_PORTMEDIA_FIBER, "FIBER" }, 191814a7e6dSreyk { OFP_PORTMEDIA_AUTONEG, "AUTONEG" }, 192814a7e6dSreyk { OFP_PORTMEDIA_PAUSE, "PAUSE" }, 193814a7e6dSreyk { OFP_PORTMEDIA_PAUSE_ASYM, "PAUSE_ASYM" }, 194814a7e6dSreyk { 0 } 195814a7e6dSreyk }; 196814a7e6dSreyk struct constmap ofp_pktin_reason_map[] = { 197814a7e6dSreyk { OFP_PKTIN_REASON_NO_MATCH, "NO_MATCH" }, 198814a7e6dSreyk { OFP_PKTIN_REASON_ACTION, "ACTION" }, 199814a7e6dSreyk { OFP_PKTIN_REASON_TTL, "TTL" }, 200814a7e6dSreyk { 0 } 201814a7e6dSreyk }; 202814a7e6dSreyk struct constmap ofp_swcap_map[] = { 203814a7e6dSreyk { OFP_SWCAP_FLOW_STATS, "FLOW_STATS" }, 204814a7e6dSreyk { OFP_SWCAP_TABLE_STATS, "TABLE_STATS" }, 205814a7e6dSreyk { OFP_SWCAP_PORT_STATS, "PORT_STATS" }, 206814a7e6dSreyk { OFP_SWCAP_GROUP_STATS, "GROUP_STATS" }, 207814a7e6dSreyk { OFP_SWCAP_IP_REASM, "IP_REASM" }, 208814a7e6dSreyk { OFP_SWCAP_QUEUE_STATS, "QUEUE_STATS" }, 209814a7e6dSreyk { OFP_SWCAP_ARP_MATCH_IP, "ARP_MATCH_IP" }, 210814a7e6dSreyk { OFP_SWCAP_PORT_BLOCKED, "PORT_BLOCKED" }, 211814a7e6dSreyk { 0 } 212814a7e6dSreyk }; 213814a7e6dSreyk struct constmap ofp_table_id_map[] = { 214814a7e6dSreyk { OFP_TABLE_ID_MAX, "MAX" }, 215814a7e6dSreyk { OFP_TABLE_ID_ALL, "ALL" }, 216814a7e6dSreyk { 0 } 217814a7e6dSreyk }; 218814a7e6dSreyk struct constmap ofp_match_map[] = { 219814a7e6dSreyk { OFP_MATCH_STANDARD, "STANDARD" }, 220814a7e6dSreyk { OFP_MATCH_OXM, "OXM" }, 221814a7e6dSreyk { 0 } 222814a7e6dSreyk }; 223814a7e6dSreyk struct constmap ofp_mp_t_map[] = { 224814a7e6dSreyk { OFP_MP_T_DESC, "DESC" }, 225814a7e6dSreyk { OFP_MP_T_FLOW, "FLOW" }, 226814a7e6dSreyk { OFP_MP_T_AGGREGATE, "AGGREGATE" }, 227814a7e6dSreyk { OFP_MP_T_TABLE, "TABLE" }, 228814a7e6dSreyk { OFP_MP_T_PORT_STATS, "PORT_STATS" }, 229814a7e6dSreyk { OFP_MP_T_QUEUE, "QUEUE" }, 230814a7e6dSreyk { OFP_MP_T_GROUP, "GROUP" }, 231814a7e6dSreyk { OFP_MP_T_GROUP_DESC, "GROUP_DESC" }, 232814a7e6dSreyk { OFP_MP_T_GROUP_FEATURES, "GROUP_FEATURES" }, 233814a7e6dSreyk { OFP_MP_T_METER, "METER" }, 234814a7e6dSreyk { OFP_MP_T_METER_CONFIG, "METER_CONFIG" }, 235814a7e6dSreyk { OFP_MP_T_METER_FEATURES, "METER_FEATURES" }, 236814a7e6dSreyk { OFP_MP_T_TABLE_FEATURES, "TABLE_FEATURES" }, 237814a7e6dSreyk { OFP_MP_T_PORT_DESC, "PORT_DESC" }, 238814a7e6dSreyk { OFP_MP_T_EXPERIMENTER, "EXPERIMENTER" }, 239814a7e6dSreyk { 0 } 240814a7e6dSreyk }; 241814a7e6dSreyk struct constmap ofp_action_map[] = { 242814a7e6dSreyk { OFP_ACTION_OUTPUT, "OUTPUT" }, 243814a7e6dSreyk { OFP_ACTION_COPY_TTL_OUT, "COPY_TTL_OUT" }, 244814a7e6dSreyk { OFP_ACTION_COPY_TTL_IN, "COPY_TTL_IN" }, 245814a7e6dSreyk { OFP_ACTION_SET_MPLS_TTL, "SET_MPLS_TTL" }, 246814a7e6dSreyk { OFP_ACTION_DEC_MPLS_TTL, "DEC_MPLS_TTL" }, 247814a7e6dSreyk { OFP_ACTION_PUSH_VLAN, "PUSH_VLAN" }, 248814a7e6dSreyk { OFP_ACTION_POP_VLAN, "POP_VLAN" }, 249814a7e6dSreyk { OFP_ACTION_PUSH_MPLS, "PUSH_MPLS" }, 250814a7e6dSreyk { OFP_ACTION_POP_MPLS, "POP_MPLS" }, 251814a7e6dSreyk { OFP_ACTION_SET_QUEUE, "SET_QUEUE" }, 252814a7e6dSreyk { OFP_ACTION_GROUP, "GROUP" }, 253814a7e6dSreyk { OFP_ACTION_SET_NW_TTL, "SET_NW_TTL" }, 254814a7e6dSreyk { OFP_ACTION_DEC_NW_TTL, "DEC_NW_TTL" }, 255814a7e6dSreyk { OFP_ACTION_SET_FIELD, "SET_FIELD" }, 256814a7e6dSreyk { OFP_ACTION_PUSH_PBB, "PUSH_PBB" }, 257814a7e6dSreyk { OFP_ACTION_POP_PBB, "POP_PBB" }, 258814a7e6dSreyk { OFP_ACTION_EXPERIMENTER, "EXPERIMENTER" }, 259814a7e6dSreyk { 0 } 260814a7e6dSreyk }; 261814a7e6dSreyk struct constmap ofp_flowcmd_map[] = { 262814a7e6dSreyk { OFP_FLOWCMD_ADD, "ADD" }, 263814a7e6dSreyk { OFP_FLOWCMD_MODIFY, "MODIFY" }, 264814a7e6dSreyk { OFP_FLOWCMD_MODIFY_STRICT, "MODIFY_STRICT" }, 265814a7e6dSreyk { OFP_FLOWCMD_DELETE, "DELETE" }, 266814a7e6dSreyk { OFP_FLOWCMD_DELETE_STRICT, "DELETE_STRICT" }, 267814a7e6dSreyk { 0 } 268814a7e6dSreyk }; 269814a7e6dSreyk struct constmap ofp_flowflag_map[] = { 270814a7e6dSreyk { OFP_FLOWFLAG_SEND_FLOW_REMOVED, "SEND_FLOW_REMOVED" }, 271814a7e6dSreyk { OFP_FLOWFLAG_CHECK_OVERLAP, "CHECK_OVERLAP" }, 272814a7e6dSreyk { OFP_FLOWFLAG_RESET_COUNTS, "RESET_COUNTS" }, 273814a7e6dSreyk { OFP_FLOWFLAG_NO_PACKET_COUNTS, "NO_PACKET_COUNTS" }, 274814a7e6dSreyk { OFP_FLOWFLAG_NO_BYTE_COUNTS, "NO_BYTE_COUNTS" }, 275814a7e6dSreyk { 0 } 276814a7e6dSreyk }; 277814a7e6dSreyk struct constmap ofp_flowrem_reason_map[] = { 278814a7e6dSreyk { OFP_FLOWREM_REASON_IDLE_TIMEOUT, "IDLE_TIMEOUT" }, 279814a7e6dSreyk { OFP_FLOWREM_REASON_HARD_TIMEOUT, "HARD_TIMEOUT" }, 280814a7e6dSreyk { OFP_FLOWREM_REASON_DELETE, "DELETE" }, 281814a7e6dSreyk { OFP_FLOWREM_REASON_GROUP_DELETE, "GROUP_DELETE" }, 282814a7e6dSreyk { 0 } 283814a7e6dSreyk }; 284814a7e6dSreyk struct constmap ofp_group_id_map[] = { 285814a7e6dSreyk { OFP_GROUP_ID_MAX, "MAX" }, 286814a7e6dSreyk { OFP_GROUP_ID_ALL, "ALL" }, 287814a7e6dSreyk { OFP_GROUP_ID_ANY, "ANY" }, 288814a7e6dSreyk { 0 } 289814a7e6dSreyk }; 290814a7e6dSreyk struct constmap ofp_errtype_map[] = { 291814a7e6dSreyk { OFP_ERRTYPE_HELLO_FAILED, "HELLO_FAILED" }, 292814a7e6dSreyk { OFP_ERRTYPE_BAD_REQUEST, "BAD_REQUEST" }, 293814a7e6dSreyk { OFP_ERRTYPE_BAD_ACTION, "BAD_ACTION" }, 294814a7e6dSreyk { OFP_ERRTYPE_BAD_INSTRUCTION, "BAD_INSTRUCTION" }, 295814a7e6dSreyk { OFP_ERRTYPE_BAD_MATCH, "BAD_MATCH" }, 296814a7e6dSreyk { OFP_ERRTYPE_FLOW_MOD_FAILED, "FLOW_MOD_FAILED" }, 297814a7e6dSreyk { OFP_ERRTYPE_GROUP_MOD_FAILED, "GROUP_MOD_FAILED" }, 298814a7e6dSreyk { OFP_ERRTYPE_PORT_MOD_FAILED, "PORT_MOD_FAILED" }, 299814a7e6dSreyk { OFP_ERRTYPE_TABLE_MOD_FAILED, "TABLE_MOD_FAILED" }, 300814a7e6dSreyk { OFP_ERRTYPE_QUEUE_OP_FAILED, "QUEUE_OP_FAILED" }, 301814a7e6dSreyk { OFP_ERRTYPE_SWITCH_CFG_FAILED, "SWITCH_CFG_FAILED" }, 302814a7e6dSreyk { OFP_ERRTYPE_ROLE_REQUEST_FAILED, "ROLE_REQUEST_FAILED" }, 303814a7e6dSreyk { OFP_ERRTYPE_METER_MOD_FAILED, "METER_MOD_FAILED" }, 304814a7e6dSreyk { OFP_ERRTYPE_TABLE_FEATURES_FAILED, "TABLE_FEATURES_FAILED" }, 305814a7e6dSreyk { OFP_ERRTYPE_EXPERIMENTER, "EXPERIMENTER" }, 306814a7e6dSreyk { 0 } 307814a7e6dSreyk }; 308814a7e6dSreyk struct constmap ofp_errflowmod_map[] = { 309814a7e6dSreyk { OFP_ERRFLOWMOD_UNKNOWN, "UNKNOWN" }, 310*07d35acaSrzalamena { OFP_ERRFLOWMOD_TABLE_FULL, "TABLE_FULL" }, 311814a7e6dSreyk { OFP_ERRFLOWMOD_TABLE_ID, "TABLE_ID" }, 312814a7e6dSreyk { OFP_ERRFLOWMOD_OVERLAP, "OVERLAP" }, 313814a7e6dSreyk { OFP_ERRFLOWMOD_EPERM, "EPERM" }, 314814a7e6dSreyk { OFP_ERRFLOWMOD_BAD_TIMEOUT, "BAD_TIMEOUT" }, 315814a7e6dSreyk { OFP_ERRFLOWMOD_BAD_COMMAND, "BAD_COMMAND" }, 316814a7e6dSreyk { OFP_ERRFLOWMOD_BAD_FLAGS, "BAD_FLAGS" }, 317814a7e6dSreyk { 0 } 318814a7e6dSreyk }; 319814a7e6dSreyk struct constmap ofp_errmatch_map[] = { 320814a7e6dSreyk { OFP_ERRMATCH_BAD_TYPE, "BAD_TYPE" }, 321814a7e6dSreyk { OFP_ERRMATCH_BAD_LEN, "BAD_LEN" }, 322814a7e6dSreyk { OFP_ERRMATCH_BAD_TAG, "BAD_TAG" }, 323814a7e6dSreyk { OFP_ERRMATCH_BAD_DL_ADDR_MASK, "BAD_DL_ADDR_MASK" }, 324814a7e6dSreyk { OFP_ERRMATCH_BAD_NW_ADDR_MASK, "BAD_NW_ADDR_MASK" }, 325814a7e6dSreyk { OFP_ERRMATCH_BAD_WILDCARDS, "BAD_WILDCARDS" }, 326814a7e6dSreyk { OFP_ERRMATCH_BAD_FIELD, "BAD_FIELD" }, 327814a7e6dSreyk { OFP_ERRMATCH_BAD_VALUE, "BAD_VALUE" }, 328814a7e6dSreyk { OFP_ERRMATCH_BAD_MASK, "BAD_MASK" }, 329814a7e6dSreyk { OFP_ERRMATCH_BAD_PREREQ, "BAD_PREREQ" }, 330814a7e6dSreyk { OFP_ERRMATCH_DUP_FIELD, "DUP_FIELD" }, 331814a7e6dSreyk { OFP_ERRMATCH_EPERM, "EPERM" }, 332814a7e6dSreyk { 0 } 333814a7e6dSreyk }; 334814a7e6dSreyk struct constmap ofp_errinst_map[] = { 335814a7e6dSreyk { OFP_ERRINST_UNKNOWN_INST, "UNKNOWN_INST" }, 336814a7e6dSreyk { OFP_ERRINST_UNSUPPORTED_INST, "UNSUPPORTED_INST" }, 337814a7e6dSreyk { OFP_ERRINST_TABLE_ID, "TABLE_ID" }, 338814a7e6dSreyk { OFP_ERRINST_UNSUPP_META, "UNSUPP_META" }, 339814a7e6dSreyk { OFP_ERRINST_UNSUPP_META_MASK, "UNSUPP_META_MASK" }, 340814a7e6dSreyk { OFP_ERRINST_BAD_EXPERIMENTER, "BAD_EXPERIMENTER" }, 341814a7e6dSreyk { OFP_ERRINST_BAD_EXPERIMENTER_TYPE, "BAD_EXPERIMENTER_TYPE" }, 342814a7e6dSreyk { OFP_ERRINST_BAD_LEN, "BAD_LEN" }, 343814a7e6dSreyk { OFP_ERRINST_EPERM, "EPERM" }, 344814a7e6dSreyk { 0 } 345814a7e6dSreyk }; 346814a7e6dSreyk struct constmap ofp_errreq_map[] = { 347814a7e6dSreyk { OFP_ERRREQ_VERSION, "VERSION" }, 348814a7e6dSreyk { OFP_ERRREQ_TYPE, "TYPE" }, 349814a7e6dSreyk { OFP_ERRREQ_MULTIPART, "MULTIPART" }, 350814a7e6dSreyk { OFP_ERRREQ_EXPERIMENTER, "EXPERIMENTER" }, 351814a7e6dSreyk { OFP_ERRREQ_EXP_TYPE, "EXP_TYPE" }, 352814a7e6dSreyk { OFP_ERRREQ_EPERM, "EPERM" }, 353*07d35acaSrzalamena { OFP_ERRREQ_BAD_LEN, "BAD_LEN" }, 354814a7e6dSreyk { OFP_ERRREQ_BUFFER_EMPTY, "BUFFER_EMPTY" }, 355814a7e6dSreyk { OFP_ERRREQ_BUFFER_UNKNOWN, "BUFFER_UNKNOWN" }, 356814a7e6dSreyk { OFP_ERRREQ_TABLE_ID, "TABLE_ID" }, 357814a7e6dSreyk { OFP_ERRREQ_IS_SLAVE, "IS_SLAVE" }, 358814a7e6dSreyk { OFP_ERRREQ_PORT, "PORT" }, 359814a7e6dSreyk { OFP_ERRREQ_PACKET, "PACKET" }, 360814a7e6dSreyk { OFP_ERRREQ_MULTIPART_OVERFLOW, "MULTIPART_OVERFLOW" }, 361814a7e6dSreyk { 0 } 362814a7e6dSreyk }; 363814a7e6dSreyk struct constmap ofp_table_featprop_map[] = { 364814a7e6dSreyk { OFP_TABLE_FEATPROP_INSTRUCTION, "INSTRUCTION" }, 365814a7e6dSreyk { OFP_TABLE_FEATPROP_INSTRUCTION_MISS, "INSTRUCTION_MISS" }, 366814a7e6dSreyk { OFP_TABLE_FEATPROP_NEXT_TABLES, "NEXT_TABLES" }, 367814a7e6dSreyk { OFP_TABLE_FEATPROP_NEXT_TABLES_MISS, "NEXT_TABLES_MISS" }, 368814a7e6dSreyk { OFP_TABLE_FEATPROP_WRITE_ACTIONS, "WRITE_ACTIONS" }, 369814a7e6dSreyk { OFP_TABLE_FEATPROP_WRITE_ACTIONS_MISS, "WRITE_ACTIONS_MISS" }, 370814a7e6dSreyk { OFP_TABLE_FEATPROP_APPLY_ACTIONS, "APPLY_ACTIONS" }, 371814a7e6dSreyk { OFP_TABLE_FEATPROP_APPLY_ACTIONS_MISS, "APPLY_ACTIONS_MISS" }, 372814a7e6dSreyk { OFP_TABLE_FEATPROP_MATCH, "MATCH" }, 373814a7e6dSreyk { OFP_TABLE_FEATPROP_WILDCARDS, "WILDCARDS" }, 374814a7e6dSreyk { OFP_TABLE_FEATPROP_WRITE_SETFIELD, "WRITE_SETFIELD" }, 375814a7e6dSreyk { OFP_TABLE_FEATPROP_WRITE_SETFIELD_MISS, "WRITE_SETFIELD_MISS" }, 376814a7e6dSreyk { OFP_TABLE_FEATPROP_APPLY_SETFIELD, "APPLY_SETFIELD" }, 377814a7e6dSreyk { OFP_TABLE_FEATPROP_APPLY_SETFIELD_MISS, "APPLY_SETFIELD_MISS" }, 378814a7e6dSreyk { OFP_TABLE_FEATPROP_EXPERIMENTER, "EXPERIMENTER" }, 379814a7e6dSreyk { OFP_TABLE_FEATPROP_EXPERIMENTER_MISS, "EXPERIMENTER_MISS" }, 380814a7e6dSreyk { 0 } 381814a7e6dSreyk }; 382