paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Macros | Functions | Variables
audioc.c File Reference

The client program used to connect to para_audiod. More...

#include <netinet/in.h>
#include <sys/socket.h>
#include <regex.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <sys/un.h>
#include <netdb.h>
#include <signal.h>
#include <lopsub.h>
#include "audiod_cmd.lsg.h"
#include "audioc.lsg.h"
#include "para.h"
#include "error.h"
#include "lsu.h"
#include "net.h"
#include "string.h"
#include "fd.h"
#include "version.h"
#include "list.h"
#include "sched.h"
#include "buffer_tree.h"
#include "interactive.h"

Macros

#define CMD_PTR   (lls_cmd(0, audioc_suite))
 
#define OPT_RESULT(_name)    (lls_opt_result(LSG_AUDIOC_PARA_AUDIOC_OPT_ ## _name, lpr))
 
#define OPT_GIVEN(_name)   (lls_opt_given(OPT_RESULT(_name)))
 
#define OPT_STRING_VAL(_name)   (lls_string_val(0, OPT_RESULT(_name)))
 
#define OPT_UINT32_VAL(_name)   (lls_uint32_val(0, OPT_RESULT(_name)))
 
#define LSG_AUDIOD_CMD_CMD(_name)
 

Functions

int main (int argc, char *argv[])
 The client program to connect to para_audiod. More...
 

Variables

 DEFINE_PARA_ERRLIST
 Array of error strings. More...
 
__printf_2_3 void(* para_log )(int, const char *,...) = stderr_log
 

Detailed Description

The client program used to connect to para_audiod.

Macro Definition Documentation

◆ CMD_PTR

#define CMD_PTR   (lls_cmd(0, audioc_suite))

◆ OPT_RESULT

#define OPT_RESULT (   _name)     (lls_opt_result(LSG_AUDIOC_PARA_AUDIOC_OPT_ ## _name, lpr))

◆ OPT_GIVEN

#define OPT_GIVEN (   _name)    (lls_opt_given(OPT_RESULT(_name)))

◆ OPT_STRING_VAL

#define OPT_STRING_VAL (   _name)    (lls_string_val(0, OPT_RESULT(_name)))

◆ OPT_UINT32_VAL

#define OPT_UINT32_VAL (   _name)    (lls_uint32_val(0, OPT_RESULT(_name)))

◆ LSG_AUDIOD_CMD_CMD

#define LSG_AUDIOD_CMD_CMD (   _name)
Value:
{.name = #_name, \
.completer = _name ## _completer}

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

The client program to connect to para_audiod.

Parameters
argcUsual argument count.
argvUsual argument vector.

It connects to the "well-known" local socket to communicate with para_audiod. Authentication is performed by sending a ucred buffer containing the user id to the local socket.

Any data received from the socket is written to stdout.

Returns
EXIT_SUCCESS or EXIT_FAILURE.
See also
send_cred_buffer(), para_audioc(1), para_audiod(1).

References CMD_PTR, and lls().

Variable Documentation

◆ DEFINE_PARA_ERRLIST

DEFINE_PARA_ERRLIST

Array of error strings.

◆ para_log

__printf_2_3 void(* para_log) (int, const char *,...) = stderr_log