Main Page
|
Alphabetical List
|
Data Structures
|
File List
|
Data Fields
|
Globals
autoproc.c File Reference
The command-line client for autoprocd.
More...
Defines
#define
LOCAL_SOCKET
"/tmp/autoproc-0"
FIFO path.
#define
HOSTNAME_SIZE
256
Size of m_hostname.
#define
UNIX_FIFO_NAME
"/tmp/autoproc-0"
Path of UNIX FIFO.
#define
INPUT_BUFFER_SIZE
128
Size of input buffer for autoproc_set_command.
#define
LINE_BUFFER_SIZE
1024
Size of line buffer for main.
Functions
static void
autoproc_set_host_port
(const char *optval)
Extracts host and port from a string "<host>[:<port>]".
static void
autoproc_set_host
(const char *command)
Treats input line which starts with "host".
static void
autoproc_print_prompt
()
Prints out a prompt.
static void
autoproc_send_command
(char *cmd, FILE *stream)
Sends a command.
static void
autoproc_open_connection
()
Opens the current socket and stream.
static void
autoproc_close_connection
()
Closes the current socket and stream.
int
main
(int argc, char **argv)
Main function.
Variables
static char
m_hostname
[HOSTNAME_SIZE]
Hostname which is displayed in the prompt.
static int
m_port
Remote port used for a network connection.
static int
m_is_remote_connection
true (1) if the current connection is a remote connection
static int
m_is_interactive
true (1) if this program runs in interactive mode
static FILE *
m_current_stream
= NULL
I/O stream on curent socket.
int
m_current_socket
= -1
socket used for communication with autoprocd
Detailed Description
The command-line client for autoprocd.
Function Documentation
static void autoproc_set_host
(
const char *
command
)
[static]
Treats input line which starts with "host".
Parameters:
command
An input line.
Generated on Fri Jan 20 10:12:18 2006 by
1.4.2