From d24c1ddb59f93e30ff64fdd3703cf88de9c8e584 Mon Sep 17 00:00:00 2001 From: reyk Date: Tue, 19 Jul 2016 16:54:26 +0000 Subject: 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@ --- usr.sbin/switchd/Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 usr.sbin/switchd/Makefile (limited to 'usr.sbin/switchd/Makefile') 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 -- cgit v1.2.3-59-g8ed1b