summaryrefslogtreecommitdiffstats
path: root/usr.sbin/switchd/Makefile
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2016-07-19 16:54:26 +0000
committerreyk <reyk@openbsd.org>2016-07-19 16:54:26 +0000
commitd24c1ddb59f93e30ff64fdd3703cf88de9c8e584 (patch)
tree57cf9e2fff53e04fe06029216d70c0bc35ae70ad /usr.sbin/switchd/Makefile
parentSince the mdoc/man parser unification, the parser is always allocated (diff)
downloadwireguard-openbsd-d24c1ddb59f93e30ff64fdd3703cf88de9c8e584.tar.xz
wireguard-openbsd-d24c1ddb59f93e30ff64fdd3703cf88de9c8e584.zip
Import switchd(8), a basic WIP OpenFlow implementation for OpenBSD.
switchd consists of two parts: 1. switchd(8) and switchctl(8), an OpenFlow controller or "vswitch". 2. switch(4), an OpenFlow-aware kernel "bridge". This the 1st part, the driver will be imported later. The code will remain disabled for a while, but it helps development to have it in the tree. switchd currently supports partial OpenFlow 1.0, but the goal is to use OpenFlow 1.3.5 instead (switch(4) already does 1.3.5). For more background information see: http://www.openbsd.org/papers/bsdcan2016-switchd.pdf https://youtu.be/Cuo0qT-lqig With help from yasuoka@ goda@ Import discussed with deraadt@
Diffstat (limited to 'usr.sbin/switchd/Makefile')
-rw-r--r--usr.sbin/switchd/Makefile36
1 files changed, 36 insertions, 0 deletions
diff --git a/usr.sbin/switchd/Makefile b/usr.sbin/switchd/Makefile
new file mode 100644
index 00000000000..2f546532cbb
--- /dev/null
+++ b/usr.sbin/switchd/Makefile
@@ -0,0 +1,36 @@
+# $OpenBSD: Makefile,v 1.1 2016/07/19 16:54:26 reyk Exp $
+
+NAME= switch
+
+PROG= ${NAME}d
+MAN= ${NAME}d.8 ${NAME}d.conf.5
+
+SRCS= imsg_util.c log.c packet.c switch.c timer.c util.c
+SRCS+= switchd.c ofp.c ofp10.c ofp13.c control.c proc.c
+SRCS+= ${.OBJDIR}/ofp_map.c ${.OBJDIR}/ofp10_map.c
+SRCS+= parse.y ofcconn.c
+
+LDADD= -levent -lutil
+DPADD= ${LIBEVENT} ${LIBUTIL}
+
+CFLAGS+= -DSWITCHD_NAME=\"${NAME}\"
+CFLAGS+= -Wall -I${.CURDIR} -I${.CURDIR}/../${NAME}d
+CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes
+CFLAGS+= -Wmissing-declarations
+CFLAGS+= -Wshadow -Wpointer-arith -Wcast-qual
+CFLAGS+= -Wsign-compare
+
+GENERATED= ofp_map.c ofp10_map.c
+CLEANFILES+= ${GENERATED} *~
+
+ofp_map.c: genmap.sh ${.CURDIR}/ofp.h
+ /bin/sh ${.CURDIR}/genmap.sh -i ${.CURDIR}/ofp.h -t ofp \
+ -m ${.CURDIR}/ofp_map.h -h '"ofp.h"' > $@
+ @touch $@
+
+ofp10_map.c: genmap.sh ${.CURDIR}/ofp10.h
+ /bin/sh ${.CURDIR}/genmap.sh -i ${.CURDIR}/ofp10.h -t ofp10 \
+ -m ${.CURDIR}/ofp_map.h -h '"ofp10.h"' > $@
+ @touch $@
+
+.include <bsd.prog.mk>