1 /* $OpenBSD: ofp_map.h,v 1.1 2016/11/18 17:37:03 reyk Exp $ */ 2 3 /* 4 * Copyright (c) 2013-2016 Reyk Floeter <reyk@openbsd.org> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 #ifndef OFP_MAP_H 20 #define OFP_MAP_H 21 22 struct constmap { 23 unsigned int cm_type; 24 const char *cm_name; 25 const char *cm_descr; 26 }; 27 28 /* 29 * Each map is generated from lists of #define's in ofp.h, using the format: 30 * #define OFP_{MAPNAME}_FLAG {value} / * COMMENT * / 31 * 32 * Please make sure that the flags in ofp.h match this style (incl. comment) 33 */ 34 35 /* OpenFlow 1.0 maps */ 36 extern struct constmap ofp10_t_map[]; 37 extern struct constmap ofp10_port_map[]; 38 extern struct constmap ofp10_action_map[]; 39 extern struct constmap ofp10_wildcard_map[]; 40 extern struct constmap ofp10_errtype_map[]; 41 extern struct constmap ofp10_errflowmod_map[]; 42 43 /* OpenFlow 1.3+ maps */ 44 extern struct constmap ofp_v_map[]; 45 extern struct constmap ofp_t_map[]; 46 extern struct constmap ofp_pktin_map[]; 47 extern struct constmap ofp_port_map[]; 48 extern struct constmap ofp_pktout_map[]; 49 extern struct constmap ofp_oxm_c_map[]; 50 extern struct constmap ofp_xm_t_map[]; 51 extern struct constmap ofp_config_map[]; 52 extern struct constmap ofp_controller_maxlen_map[]; 53 extern struct constmap ofp_instruction_t_map[]; 54 extern struct constmap ofp_portstate_map[]; 55 extern struct constmap ofp_portconfig_map[]; 56 extern struct constmap ofp_portmedia_map[]; 57 extern struct constmap ofp_pktin_reason_map[]; 58 extern struct constmap ofp_swcap_map[]; 59 extern struct constmap ofp_table_id_map[]; 60 extern struct constmap ofp_match_map[]; 61 extern struct constmap ofp_mp_t_map[]; 62 extern struct constmap ofp_action_map[]; 63 extern struct constmap ofp_flowcmd_map[]; 64 extern struct constmap ofp_flowflag_map[]; 65 extern struct constmap ofp_flowrem_reason_map[]; 66 extern struct constmap ofp_group_id_map[]; 67 extern struct constmap ofp_errtype_map[]; 68 extern struct constmap ofp_errflowmod_map[]; 69 extern struct constmap ofp_errmatch_map[]; 70 extern struct constmap ofp_errinst_map[]; 71 extern struct constmap ofp_errreq_map[]; 72 extern struct constmap ofp_table_featprop_map[]; 73 74 #endif /* OFP_MAP_H */ 75