summaryrefslogtreecommitdiffstats
path: root/usr.sbin/switchd
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2016-11-18 16:49:35 +0000
committerreyk <reyk@openbsd.org>2016-11-18 16:49:35 +0000
commitc55171fd6915eaabd7783336d8c4fee2053a1c33 (patch)
tree378aec89906aae312cc08ac6b6f90f7494d15550 /usr.sbin/switchd
parentRemove leading _ from include guards as this violates the reserved space. (diff)
downloadwireguard-openbsd-c55171fd6915eaabd7783336d8c4fee2053a1c33.tar.xz
wireguard-openbsd-c55171fd6915eaabd7783336d8c4fee2053a1c33.zip
Define constmap in ofp_map.h to be shared along with ofp_map.c
Diffstat (limited to 'usr.sbin/switchd')
-rw-r--r--usr.sbin/switchd/genmap.sh9
-rw-r--r--usr.sbin/switchd/ofp_map.h8
-rw-r--r--usr.sbin/switchd/switchd.h3
-rw-r--r--usr.sbin/switchd/types.h8
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,