diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2011-04-27 21:20:37 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2011-04-27 21:20:37 +0000 |
commit | 9491636254186651db93c19f61db8ec10bb16dfe (patch) | |
tree | 917eb2e0bdae7678112c5e546318e00696e4cd50 | |
parent | 6c680bdf200957b0ebc81425047938eed9603414 (diff) |
move amsg.h containing protocol defs from aucat side to libsndio side.
requested by deraadt
-rw-r--r-- | lib/libsndio/Makefile | 5 | ||||
-rw-r--r-- | lib/libsndio/amsg.h (renamed from usr.bin/aucat/amsg.h) | 16 | ||||
-rw-r--r-- | usr.bin/aucat/Makefile | 4 | ||||
-rw-r--r-- | usr.bin/aucat/aucat.c | 3 | ||||
-rw-r--r-- | usr.bin/aucat/conf.h | 9 |
5 files changed, 20 insertions, 17 deletions
diff --git a/lib/libsndio/Makefile b/lib/libsndio/Makefile index 73913d645b6..642b8b6382e 100644 --- a/lib/libsndio/Makefile +++ b/lib/libsndio/Makefile @@ -1,11 +1,10 @@ -# $OpenBSD: Makefile,v 1.7 2011/04/16 10:52:22 ratchov Exp $ +# $OpenBSD: Makefile,v 1.8 2011/04/27 21:20:36 ratchov Exp $ LIB= sndio MAN= sio_open.3 mio_open.3 sndio.7 SRCS= debug.c aucat.c sio_aucat.c sio_sun.c sio.c \ mio_rmidi.c mio_aucat.c mio.c -CFLAGS+=-Wall -Wstrict-prototypes -Werror -Wundef -DDEBUG \ - -I${.CURDIR} -I${.CURDIR}/../../usr.bin/aucat +CFLAGS+=-Wall -Wstrict-prototypes -Werror -Wundef -DDEBUG MLINKS = \ sio_open.3 sio_close.3 \ diff --git a/usr.bin/aucat/amsg.h b/lib/libsndio/amsg.h index 2125c20abf2..c37068dca0a 100644 --- a/usr.bin/aucat/amsg.h +++ b/lib/libsndio/amsg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: amsg.h,v 1.21 2011/04/27 20:33:40 deraadt Exp $ */ +/* $OpenBSD: amsg.h,v 1.1 2011/04/27 21:20:36 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -18,8 +18,13 @@ #define AMSG_H #include <stdint.h> -#include <sys/signal.h> -#include "conf.h" + +/* + * socket and option names + */ +#define AUCAT_PATH "aucat" +#define MIDICAT_PATH "midicat" +#define DEFAULT_OPT "default" /* * WARNING: since the protocol may be simultaneously used by static @@ -42,6 +47,7 @@ struct amsg { #define AMSG_SETVOL 9 /* set volume */ #define AMSG_HELLO 10 /* say hello, check versions and so ... */ #define AMSG_BYE 11 /* ask server to drop connection */ +#define AMSG_AUTH 12 /* send authentication cookie */ uint32_t cmd; uint32_t __pad; union { @@ -80,6 +86,10 @@ struct amsg { char opt[12]; /* profile name */ char who[12]; /* hint for leases */ } hello; + struct amsg_auth { +#define AMSG_COOKIELEN 16 + uint8_t cookie[AMSG_COOKIELEN]; + } auth; } u; }; diff --git a/usr.bin/aucat/Makefile b/usr.bin/aucat/Makefile index fa6270b335f..ee125d29e39 100644 --- a/usr.bin/aucat/Makefile +++ b/usr.bin/aucat/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.14 2010/07/31 08:48:01 ratchov Exp $ +# $OpenBSD: Makefile,v 1.15 2011/04/27 21:20:36 ratchov Exp $ PROG= aucat SRCS= aucat.c abuf.c aparams.c aproc.c dev.c midi.c file.c headers.c \ siofile.c miofile.c sock.c pipe.c listen.c opt.c wav.c dbg.c MAN= aucat.1 midicat.1 LINKS= ${BINDIR}/aucat ${BINDIR}/midicat -CFLAGS+= -Wall -Wstrict-prototypes -Wundef -DDEBUG +CFLAGS+= -Wall -Wstrict-prototypes -Wundef -DDEBUG -I${.CURDIR}/../../lib/libsndio LDADD+= -lsndio .include <bsd.prog.mk> diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c index c03d41611fe..2f59d1eac6d 100644 --- a/usr.bin/aucat/aucat.c +++ b/usr.bin/aucat/aucat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aucat.c,v 1.111 2011/04/27 17:58:43 deraadt Exp $ */ +/* $OpenBSD: aucat.c,v 1.112 2011/04/27 21:20:36 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -32,6 +32,7 @@ #include <unistd.h> #include "abuf.h" +#include "amsg.h" #include "aparams.h" #include "aproc.h" #include "conf.h" diff --git a/usr.bin/aucat/conf.h b/usr.bin/aucat/conf.h index 3d70a2b8de9..f0d03aa9e0d 100644 --- a/usr.bin/aucat/conf.h +++ b/usr.bin/aucat/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.20 2011/04/27 17:58:43 deraadt Exp $ */ +/* $OpenBSD: conf.h,v 1.21 2011/04/27 21:20:36 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -31,13 +31,6 @@ extern volatile sig_atomic_t debug_level; #endif /* - * socket and option names - */ -#define AUCAT_PATH "aucat" -#define MIDICAT_PATH "midicat" -#define DEFAULT_OPT "default" - -/* * MIDI buffer size */ #define MIDI_BUFSZ 3125 /* 1 second at 31.25kbit/s */ |