Interesting topic. This is the Control Socket for XMMS. I'm not C savvy, but this seems to be implemented in xmms/controlsocket.c, as:

<snip>
saddr.sun_family = AF_UNIX;
g_snprintf(saddr.sun_path, 108, "%s/xmms_%s.%d",
g_get_tmp_dir(), g_get_user_name(), i);
</snip>

The form of this file under /tmp is /xmms_<username>.<id> where `id' is the number of the XMMS instance (given that you have multiple instances activated. It's zero-indexed. This is a socket file.

netstat reports no information about this socket, yet lsof reports:

<output>
[EMAIL PROTECTED]:/tmp$ lsof -d /tmp/xmms_jose.*
lsof: WARNING: can't stat() ext3 file system /dev/.static/dev
      Output information may be incomplete.
COMMAND   PID USER   FD   TYPE     DEVICE SIZE     NODE NAME
xmms    12667 jose    4u  unix 0xc6124320      12008814 /tmp/xmms_jose.1
</output>

I guess that reading thoroughly controlsocket.c you can tell what really happens through that socket. I googled around and found several threads on the XMMS-DEVEL list. Critical was [1]. I think that this socket is not well-documented, but we can come around with something like:

<proposal>
XMMS uses a standard UDS socket in /tmp/xmms_<username>.n, where n is your XMMS instance ID (zero-indexed).

Through this socket the users are able to query XMMS status (song information, actual configuration: reproducing shuffle, normal, etc., volume level) and to set several variables, even song title.

Access to the socket information is done through xmmsctrl.h like this:

1. Open a socket and connect it to XMMS's control socket, if possible
2. Send a query or command
3. If a query was sent, read the response (blocking I/O)
4. Read a simple acknowledgement (blocking I/O)
5. Close socket and return result (if any)

This socket is not well documented and is used by the XMMS-Infopipe plugin. In the future, this socket is going to evolve into a well-documented API that will be security-enhanced (providing better authentication control and only item-toggling)
</proposal>

Greetings,
Jose

[1] http://lists.xmms.org/pipermail/xmms-devel/2000-May/001416.html

--
José Parrella > en Debian Etch con Kernel 2.6.14
Escuela de Ingeniería Eléctrica - UCV
Servicio Autónomo de Propiedad Intelectual

Reply via email to