howm
howm
ipc.h File Reference

howm More...

Go to the source code of this file.

Enumerations

enum  ipc_errs {
  IPC_ERR_NONE, IPC_ERR_SYNTAX, IPC_ERR_ALLOC, IPC_ERR_NO_FUNC,
  IPC_ERR_TOO_MANY_ARGS, IPC_ERR_TOO_FEW_ARGS, IPC_ERR_ARG_NOT_INT, IPC_ERR_ARG_NOT_BOOL,
  IPC_ERR_ARG_TOO_LARGE, IPC_ERR_ARG_TOO_SMALL, IPC_ERR_UNKNOWN_TYPE, IPC_ERR_NO_CONFIG
}
 
enum  arg_types { TYPE_IGNORE, TYPE_INT, TYPE_STR }
 

Functions

void ipc_cleanup (void)
 Delete the UNIX socket file. More...
 
int ipc_init (void)
 Open a socket and return it. More...
 
int ipc_process (char *msg, int len)
 Process a message depending on its type - a config message or a function call message. More...
 

Detailed Description

howm

Author
Harvey Hunt
Date
2015

Enumeration Type Documentation

enum arg_types
Enumerator
TYPE_IGNORE 
TYPE_INT 
TYPE_STR 
enum ipc_errs
Enumerator
IPC_ERR_NONE 
IPC_ERR_SYNTAX 
IPC_ERR_ALLOC 
IPC_ERR_NO_FUNC 
IPC_ERR_TOO_MANY_ARGS 
IPC_ERR_TOO_FEW_ARGS 
IPC_ERR_ARG_NOT_INT 
IPC_ERR_ARG_NOT_BOOL 
IPC_ERR_ARG_TOO_LARGE 
IPC_ERR_ARG_TOO_SMALL 
IPC_ERR_UNKNOWN_TYPE 
IPC_ERR_NO_CONFIG 

Function Documentation

void ipc_cleanup ( void  )

Delete the UNIX socket file.

int ipc_init ( void  )

Open a socket and return it.

If a socket path is defined in the env variable defined as ENV_SOCK_VAR then use that - else use DEF_SOCK_PATH.

Returns
A socket file descriptor.
int ipc_process ( char *  msg,
int  len 
)

Process a message depending on its type - a config message or a function call message.

Parameters
msgA buffer containing the message sent by cottage.
lenThe length of the message.
Returns
An error code resulting from processing msg.