23 #ifndef _ASTERISK_IO_H 24 #define _ASTERISK_IO_H 29 #if defined(__cplusplus) || defined(c_plusplus) 34 #define AST_IO_IN POLLIN 36 #define AST_IO_OUT POLLOUT 38 #define AST_IO_PRI POLLPRI 42 #define AST_IO_ERR POLLERR 44 #define AST_IO_HUP POLLHUP 46 #define AST_IO_NVAL POLLNVAL 73 #define AST_IO_CB(a) ((ast_io_cb)(a)) 176 #if defined(__cplusplus) || defined(c_plusplus) int ast_io_wait(struct io_context *ioc, int howlong)
Waits for IO.
int ast_sd_get_fd_un(int type, const char *path)
Find a listening AF_LOCAL file descriptor provided by socket activation.
int ast_hide_password(int fd)
void ast_io_dump(struct io_context *ioc)
Dumps the IO array. Debugging: Dump everything in the I/O array.
int * ast_io_add(struct io_context *ioc, int fd, ast_io_cb callback, short events, void *data)
Adds an IO context.
static const struct adsi_event events[]
Socket address structure.
int ast_sd_get_fd(int type, const struct ast_sockaddr *addr)
Find a listening file descriptor provided by socket activation.
int ast_get_termcols(int fd)
int ast_restore_tty(int fd, int oldstatus)
Restores TTY mode. Call with result from previous ast_hide_password.
int(* ast_io_cb)(int *id, int fd, short events, void *cbdata)
void io_context_destroy(struct io_context *ioc)
Destroys a context.
int ast_sd_notify(const char *state)
a wrapper for sd_notify(): notify systemd of any state changes.
Global IO variables are now in a struct in order to be made threadsafe.
int ast_io_remove(struct io_context *ioc, int *id)
Removes an IO context.
int * ast_io_change(struct io_context *ioc, int *id, int fd, ast_io_cb callback, short events, void *data)
Changes an IO handler.
struct io_context * io_context_create(void)
Creates a context Create a context for I/O operations Basically mallocs an IO structure and sets up s...