OpenBSD CVS

CVS log for src/usr.bin/aucat/Attic/listen.c


[BACK] Up to [local] / src / usr.bin / aucat

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.22, Tue Nov 12 06:47:34 2013 UTC (10 years, 6 months ago) by ratchov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.21: +1 -1 lines
FILE REMOVED

remove bogus legacy server-specific bits that cause confusion

Revision 1.21 / (download) - annotate - [select for diffs], Wed Mar 13 08:28:34 2013 UTC (11 years, 2 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

don't display warnings if accept() returns ECONNABORTED or
EWOULDBLOCK, as we do in other daemons

Revision 1.20 / (download) - annotate - [select for diffs], Wed Jun 27 06:53:13 2012 UTC (11 years, 10 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.19: +7 -13 lines
Diff to previous 1.19 (colored)

Uniformize error messages printing, use err() instead of fprintf()
when appropriate. From Michael W. Bombardieri <mb at ii.net>

Revision 1.19 / (download) - annotate - [select for diffs], Wed Apr 11 06:05:43 2012 UTC (12 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

Use "unsigned int" rather than "unsigned". No object change.
suggested by deraadt@

Revision 1.18 / (download) - annotate - [select for diffs], Thu Mar 29 20:08:22 2012 UTC (12 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.17: +10 -5 lines
Diff to previous 1.17 (colored)

Don't spin if accept() fails because it is out of file descriptors,
instead set a flag that skips the listening socket from the poll()
event loop. The flag is cleared whenever a file descriptor is closed
allowing accept() to be retried.
Explained by deraadt@

Revision 1.17 / (download) - annotate - [select for diffs], Wed Oct 12 07:20:04 2011 UTC (12 years, 7 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.16: +27 -21 lines
Diff to previous 1.16 (colored)

Simplify and improve the way options are parsed and remove ~300 lines
of code that becomes unused. Few command line arguments changes are
required though:

  - stream definitions (-ios) now must follow devices definitions they
    are attached to (-fMn)

  - the -n option is now a special "loopback" device and is thus used
    like -f, eg it must precede streams

  - in midicat, midi thru boxes are not created automatically anymore,
    the new "-M" option must be used for that

  - channel numbers (-Cc options) correspond always to channel numbers
    of the hardware.

  - the -u option isn't needed anymore

  - increase the log verbosity so user errors are logged
    without using -d

tested by many, help from jmc

Revision 1.16 / (download) - annotate - [select for diffs], Tue May 3 08:00:54 2011 UTC (13 years ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

If the string of the address to listen on is '-' then listen on all
addresses (ie pass NULL to getaddrinfo which would return 0.0.0.0
and :: in most cases)

Revision 1.15 / (download) - annotate - [select for diffs], Mon May 2 22:24:23 2011 UTC (13 years ago) by ratchov
Branch: MAIN
Changes since 1.14: +12 -2 lines
Diff to previous 1.14 (colored)

set the TCP_NODELAY option for TCP connections

Revision 1.14 / (download) - annotate - [select for diffs], Thu Apr 28 06:19:57 2011 UTC (13 years ago) by ratchov
Branch: MAIN
Changes since 1.13: +66 -1 lines
Diff to previous 1.13 (colored)

Implement a new authentication method allowing aucat and midicat to
work over TCP, for instance, to expose the sound card of one machine
with other machines of the network.

The first client generates a 128-bit random number (aka the
session cookie), saves it in $HOME/.aucat_cookie and sends it to the
server. Successive clients load the cookie from $HOME/.aucat_cookie
and send it to the server but the server accepts only clients whose
cookie matches the session cookie. When all clients are gone, the
session is over, and another cookie could start a new session, and so
on.

TCP is enabled on the server with the new -L option, and on the client
side hostnames are specified with a new optional component in the
device name.

hints from damien, dlg and deraadt, tweaks from jmc

Revision 1.13 / (download) - annotate - [select for diffs], Wed Apr 27 17:58:43 2011 UTC (13 years ago) by deraadt
Branch: MAIN
Changes since 1.12: +2 -1 lines
Diff to previous 1.12 (colored)

use more volatile sig_atomic_t in signal handlers
ok ratchov

Revision 1.12 / (download) - annotate - [select for diffs], Tue Apr 19 00:02:29 2011 UTC (13 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.11: +24 -10 lines
Diff to previous 1.11 (colored)

don't hold a pointer to "listen" structure. Instead, when it must
be free()ed, iterate over the file_list, and find the structure
to free. This is safer and simpler. No behaviour change

Revision 1.11 / (download) - annotate - [select for diffs], Sun Sep 27 11:51:20 2009 UTC (14 years, 7 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.10: +1 -2 lines
Diff to previous 1.10 (colored)

remove all debug traces

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jul 25 10:52:19 2009 UTC (14 years, 9 months ago) by ratchov
Branch: MAIN
Changes since 1.9: +4 -4 lines
Diff to previous 1.9 (colored)

fix comments, remove no longer needed declaration, reorder includes
from Thomas Pfaff

Revision 1.9 / (download) - annotate - [select for diffs], Sat Jul 25 08:44:27 2009 UTC (14 years, 9 months ago) by ratchov
Branch: MAIN
Changes since 1.8: +3 -17 lines
Diff to previous 1.8 (colored)

Currently midi capable programs can control midi hardware, but
cannot cooperate with other programs.  The aim of this change is
to allow any program to send midi data to other programs as they
were midi hardware. For instance, this change should solve the
longstanding problem of using a midi sequencer with software
synthesizers. More precisely:

 - new midicat(1) utility (actually hardlink to aucat(1)).
   it creates software midi thru boxes, allowing programs
   to send midi messages to other programs as they were
   midi(4) hardware.

 - new midi api in libsndio (see mio_open(3)), to access
   midi(4) devices and midicat(1) sockets in a uniform way.

 - new device naming scheme <service>:<unit>[.<option>],
   common to audio and midi.

 - new sndio(7) manual describing concepts and naming

The current audio device naming still works, but people having
scripts or configuration files containing device names could read
the sndio(7) man page and slowly start updating device names.

discussed with jakemsr@ and deraadt@, help form jmc@

Revision 1.8 / (download) - annotate - [select for diffs], Wed Feb 4 20:35:14 2009 UTC (15 years, 3 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.7: +15 -7 lines
Diff to previous 1.7 (colored)

if there are too many connections, stop acceping new ones rather
than exit()ing with ``too many open files'' fatal error

Revision 1.7 / (download) - annotate - [select for diffs], Tue Feb 3 19:44:58 2009 UTC (15 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.6: +4 -6 lines
Diff to previous 1.6 (colored)

in server mode, create /tmp/aucat-userid/ directory with
permissions 0700, and create sockets in it. This prevents
one local user to eavesdrop or disturb audio programs of
other users.

if you're using the ``-s socket'' option with an absolute
path as argument, please update it to use a socket name.

requested by many, bits from jakemsr and otto
ok jakemsr

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jan 23 17:38:15 2009 UTC (15 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

spacing + typo fix from Matt Jibson <matt.jibson(at)gmail.com>

Revision 1.5 / (download) - annotate - [select for diffs], Sun Nov 16 20:44:03 2008 UTC (15 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.4: +11 -2 lines
Diff to previous 1.4 (colored)

allow aucat to listen on multiple sockets. Each socket carries its
channel and volume settings allowing multiple configuration to
coexist. Mostly useful for envy(4)-like devices, but can be used
to force different apps to use different settings.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Nov 16 18:34:56 2008 UTC (15 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.3: +7 -3 lines
Diff to previous 1.3 (colored)

add ``template'' parameters to sockets rather than using device
parameters. No functional change.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Nov 16 16:30:22 2008 UTC (15 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.2: +4 -3 lines
Diff to previous 1.2 (colored)

Make clients inherit the volume parameter when the -v option is used in
server mode. It gives the maximum volume a client may have. This wastes
dynamic range, but allows volume to stay constant when other clients
connect or disconnect.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Oct 29 22:40:56 2008 UTC (15 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.1: +6 -1 lines
Diff to previous 1.1 (colored)

chmod(2) the aucat socket, as if aucat(1) was started with
umask = 0, this allows one user to start the server and another
user to use it (eg. _mpd).
ok todd, deraadt, jakemsr

Revision 1.1 / (download) - annotate - [select for diffs], Sun Oct 26 08:49:44 2008 UTC (15 years, 6 months ago) by ratchov
Branch: MAIN

add minimal server capability to aucat(1). When started in server
mode, it listens on an unix socket and mixes/demultiplexes any number
of full-duplex streams, doing necessary format conversions and
resampling on the fly.

programs can use the new libsa(3) library to play and record audio.
The library provides a very simple API to connect to the audio server;
if aucat(1) isn't running, it uses the audio(4) driver transparently
instead.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.