mio_config.h File Reference
Airframe Multiple I/O Configuration Support. More...
#include <airframe/mio.h>
#include <airframe/airopt.h>
Go to the source code of this file.
Defines | |
#define | MIO_F_CLI_INMASK 0x0000007F |
Mask covering input flag bits; used internally. | |
#define | MIO_F_CLI_FILE_IN 0x00000001 |
Enable configuration of file, glob, and standard input. | |
#define | MIO_F_CLI_DIR_IN 0x00000002 |
Enable configuration of file input from directory (requires FILE_IN). | |
#define | MIO_F_CLI_UDP_IN 0x00000004 |
Enable configuration of UDP passive socket input. | |
#define | MIO_F_CLI_TCP_IN 0x00000008 |
Enable configuration of single-thread TCP passive socket input. | |
#define | MIO_F_CLI_PCAP_IN 0x00000040 |
Enable configuration of libpcap dump file and live capture input. | |
#define | MIO_F_CLI_DEF_STDIN 0x00000080 |
Default to standard input with no input specifier (requires FILE_IN). | |
#define | MIO_F_CLI_OUTMASK 0x00007F00 |
Mask covering output flag bits; used internally. | |
#define | MIO_F_CLI_FILE_OUT 0x00000100 |
Enable configuration of file output. | |
#define | MIO_F_CLI_DIR_OUT 0x00000200 |
Enable configuration of file output to directory. | |
#define | MIO_F_CLI_UDP_OUT 0x00000400 |
Enable configuration of UDP active socket output. | |
#define | MIO_F_CLI_TCP_OUT 0x00000800 |
Enable configuration of TCP active socket output. | |
#define | MIO_F_CLI_DEF_STDOUT 0x00008000 |
Default to standard output with no output specifier with standard input. | |
Functions | |
gboolean | mio_add_option_group (AirOptionCtx *aoctx, uint32_t flags) |
Add an option group appropriate for parsing MIO options consistent with the given CLI flags to the given options context. | |
gboolean | mio_config_source (MIOSource *source, uint32_t cli_flags, uint32_t *miod_flags, GError **err) |
Configure an MIOSource from mio_config command-line and global application options. | |
gboolean | mio_config_sink (MIOSource *source, MIOSink *sink, char *basepat, uint32_t cli_flags, uint32_t *miod_flags, GError **err) |
Configure an MIOSink from mio_config command-line and global application options. | |
gboolean | mio_config_multisink_file (MIOSource *source, MIOSink *sink, char *basepat, uint32_t count, char **labels, uint32_t cli_flags, uint32_t *miod_flags, GError **err) |
Configure a multiple MIOSink array of file sinks of from mio_config command-line and global application options, as well as a set of application-defined labels. | |
Variables | |
char * | mio_ov_in |
Input specifier (--in argument). | |
char * | mio_ov_out |
Output specifier (--out argument). | |
char * | mio_ov_nextdir |
Next directory for file source (--nextdir argument), empty for delete, NULL for no routing. | |
char * | mio_ov_faildir |
Fail directory for file source (--faildir argument), empty for delete, NULL for no routing. | |
int | mio_ov_poll |
Polling delay (--poll argument). | |
gboolean | mio_ov_lock |
Lock option flag (TRUE if --lock present). | |
gboolean | mio_ov_live |
Live capture option flag (TRUE if --live present). | |
char * | mio_ov_bpf |
BPF expression for pcap filter (--bpf argument). | |
uint32_t | mio_ov_pcaplen |
Live capture length in octets. | |
uint32_t | mio_ov_pcapto |
Live capture timeout in milliseconds. | |
char * | mio_ov_port |
UDP/TCP source and sink default application service; string naming a service to be passed to getaddrinfo(3)/getservbyname(3), or a string containing an integer port number. | |
MIOType | mio_ov_filetype |
MIOType of the FILE_IN sources and FILE_OUT sinks; valid values are MIO_T_NULL, MIO_T_FD, and MIO_T_FP. |
Detailed Description
Airframe Multiple I/O Configuration Support.Supplies command-line processing and configuration of MIOSource and MIOSink instances for MIO-based applications.
Applications use mio_config by describing the source and sink types they support via a set of flags, passing these flags to mio_option_group to get an option group for GOption-based processing; then, after the command line has been parsed, the application calls mio_config_source() and mio_config_sink() to create an appropriate source and sink, respectively.
Function Documentation
|
Add an option group appropriate for parsing MIO options consistent with the given CLI flags to the given options context.
|
|
Configure a multiple MIOSink array of file sinks of from mio_config command-line and global application options, as well as a set of application-defined labels. See mio_sink_multi.h and mio_sink_file.h for more. Call this after calling mio_option_group() and g_option_context_parse() on a GOptionContext containing the returned MIO GOptionGroup.
|
|
Configure an MIOSink from mio_config command-line and global application options. Call this after calling mio_option_group() and g_option_context_parse() on a GOptionContext containing the returned MIO GOptionGroup.
|
|
Configure an MIOSource from mio_config command-line and global application options. Call this after calling mio_option_group() and g_option_context_parse() on a GOptionContext containing the returned MIO GOptionGroup.
|
Variable Documentation
|
BPF expression for pcap filter (--bpf argument). Global; do not modify. |
|
Fail directory for file source (--faildir argument), empty for delete, NULL for no routing. Global; do not modify. |
|
MIOType of the FILE_IN sources and FILE_OUT sinks; valid values are MIO_T_NULL, MIO_T_FD, and MIO_T_FP. Default is MIO_T_FP. Global application option; set before calling mio_config_source(), mio_config_sink(), or mio_dispatch(). |
|
Input specifier (--in argument). Global; do not modify. |
|
Live capture option flag (TRUE if --live present). Global; do not modify. |
|
Lock option flag (TRUE if --lock present). Global; do not modify. |
|
Next directory for file source (--nextdir argument), empty for delete, NULL for no routing. Global; do not modify. |
|
Output specifier (--out argument). Global; do not modify. |
|
Live capture length in octets. Global application option; set before calling mio_config_source() or mio_dispatch(). |
|
Live capture timeout in milliseconds. Global application option; set before calling mio_config_source() or mio_dispatch(). |
|
Polling delay (--poll argument). Amount of time in seconds mio_dispatch_loop() will sleep when no input is available for file source. Global; do not modify. |
|
UDP/TCP source and sink default application service; string naming a service to be passed to getaddrinfo(3)/getservbyname(3), or a string containing an integer port number. Global application option; set before calling mio_config_source(), mio_config_sink(), or mio_dispatch(). |