diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2016-11-18 16:49:36 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2016-11-18 16:49:36 +0000 |
commit | 2572da0a217b77440ad6e4816bfd6b6d3a0d5eeb (patch) | |
tree | ba1bfc98eeb560e11ff7c5f14d08dd709d09ff66 /usr.sbin | |
parent | c3df06116520609c051a627c70e0e375c202e1d3 (diff) |
Define constmap in ofp_map.h to be shared along with ofp_map.c
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/switchd/genmap.sh | 9 | ||||
-rw-r--r-- | usr.sbin/switchd/ofp_map.h | 8 | ||||
-rw-r--r-- | usr.sbin/switchd/switchd.h | 3 | ||||
-rw-r--r-- | usr.sbin/switchd/types.h | 8 |
4 files changed, 12 insertions, 16 deletions
diff --git a/usr.sbin/switchd/genmap.sh b/usr.sbin/switchd/genmap.sh index 4feccf4b541..2c61975809e 100644 --- a/usr.sbin/switchd/genmap.sh +++ b/usr.sbin/switchd/genmap.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: genmap.sh,v 1.5 2016/11/18 13:36:32 reyk Exp $ +# $OpenBSD: genmap.sh,v 1.6 2016/11/18 16:49:35 reyk Exp $ # Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> # @@ -73,12 +73,7 @@ cat <<EOF #include <sys/types.h> ${INC} - -struct constmap { - unsigned int cm_type; - const char *cm_name; - const char *cm_descr; -}; +#include "ofp_map.h" EOF diff --git a/usr.sbin/switchd/ofp_map.h b/usr.sbin/switchd/ofp_map.h index ac67ca9aaef..5c22d20b693 100644 --- a/usr.sbin/switchd/ofp_map.h +++ b/usr.sbin/switchd/ofp_map.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ofp_map.h,v 1.7 2016/11/18 16:34:04 reyk Exp $ */ +/* $OpenBSD: ofp_map.h,v 1.8 2016/11/18 16:49:35 reyk Exp $ */ /* * Copyright (c) 2013-2016 Reyk Floeter <reyk@openbsd.org> @@ -19,6 +19,12 @@ #ifndef OFP_MAP_H #define OFP_MAP_H +struct constmap { + unsigned int cm_type; + const char *cm_name; + const char *cm_descr; +}; + /* * Each map is generated from lists of #define's in ofp.h, using the format: * #define OFP_{MAPNAME}_FLAG {value} / * COMMENT * / diff --git a/usr.sbin/switchd/switchd.h b/usr.sbin/switchd/switchd.h index 2090876adf6..8b3f73e9523 100644 --- a/usr.sbin/switchd/switchd.h +++ b/usr.sbin/switchd/switchd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: switchd.h,v 1.24 2016/11/18 16:34:04 reyk Exp $ */ +/* $OpenBSD: switchd.h,v 1.25 2016/11/18 16:49:35 reyk Exp $ */ /* * Copyright (c) 2013-2016 Reyk Floeter <reyk@openbsd.org> @@ -31,6 +31,7 @@ #include "ofp10.h" #include "types.h" #include "proc.h" +#include "ofp_map.h" struct switchd; diff --git a/usr.sbin/switchd/types.h b/usr.sbin/switchd/types.h index bc0af44cf0d..b89bae20712 100644 --- a/usr.sbin/switchd/types.h +++ b/usr.sbin/switchd/types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: types.h,v 1.9 2016/11/18 16:34:04 reyk Exp $ */ +/* $OpenBSD: types.h,v 1.10 2016/11/18 16:49:35 reyk Exp $ */ /* * Copyright (c) 2013-2016 Reyk Floeter <reyk@openbsd.org> @@ -49,12 +49,6 @@ #define ETHER_ADDR_LEN 6 #endif -struct constmap { - unsigned int cm_type; - const char *cm_name; - const char *cm_descr; -}; - enum imsg_type { IMSG_NONE = 0, IMSG_CTL_VERBOSE, |