summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorratchov <ratchov@openbsd.org>2009-10-17 10:55:43 +0000
committerratchov <ratchov@openbsd.org>2009-10-17 10:55:43 +0000
commita5555ab81eeeadc6ce249a0e965d4d380393d09d (patch)
tree1bab0d308694d036b44e6bb0b097864007e76baf
parentAlways move the cursor position on !xenl terminals, since there is no invisible (diff)
downloadwireguard-openbsd-a5555ab81eeeadc6ce249a0e965d4d380393d09d.tar.xz
wireguard-openbsd-a5555ab81eeeadc6ce249a0e965d4d380393d09d.zip
Add version number to aucat protocol. It's not used yet,
but later, it will permit aucat to reject connections from clients statically linked to a unsupported version of libsndio. idea from kittenis, otto and sthen
-rw-r--r--lib/libsndio/aucat.c3
-rw-r--r--usr.bin/aucat/amsg.h6
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/libsndio/aucat.c b/lib/libsndio/aucat.c
index b8d274ef97b..cc1e977b1f1 100644
--- a/lib/libsndio/aucat.c
+++ b/lib/libsndio/aucat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aucat.c,v 1.28 2009/08/28 10:52:14 ratchov Exp $ */
+/* $OpenBSD: aucat.c,v 1.29 2009/10/17 10:55:43 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -236,6 +236,7 @@ sio_open_aucat(const char *str, unsigned mode, int nbio)
*/
AMSG_INIT(&hdl->wmsg);
hdl->wmsg.cmd = AMSG_HELLO;
+ hdl->wmsg.u.hello.version = AMSG_VERSION;
hdl->wmsg.u.hello.proto = 0;
if (mode & SIO_PLAY)
hdl->wmsg.u.hello.proto |= AMSG_PLAY;
diff --git a/usr.bin/aucat/amsg.h b/usr.bin/aucat/amsg.h
index 7536f99c7b9..9492f2bb8d1 100644
--- a/usr.bin/aucat/amsg.h
+++ b/usr.bin/aucat/amsg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: amsg.h,v 1.10 2009/08/28 06:37:06 ratchov Exp $ */
+/* $OpenBSD: amsg.h,v 1.11 2009/10/17 10:55:43 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -89,7 +89,9 @@ struct amsg {
#define AMSG_MIDIOUT 0x8 /* MIDI thru output */
#define AMSG_MIXER 0x10 /* MIDI mixer */
uint16_t proto; /* protocol type */
- uint8_t reserved1[6]; /* for future use */
+#define AMSG_VERSION 0
+ uint8_t version; /* protocol version */
+ uint8_t reserved1[5]; /* for future use */
char opt[12]; /* profile name */
char who[12]; /* hint for leases */
} hello;