Go to the source code of this file.
Defines | |
#define | STATUS_BUF_SIZ 16384 |
#define | LOCK_GHBN() |
#define | UNLOCK_GHBN() |
Functions | |
int | execute (char *cmd_line, int quiet) |
Execute a shell command. | |
struct in_addr * | wd_gethostbyname (const char *name) |
char * | get_iface_ip (char *ifname) |
char * | get_iface_mac (char *ifname) |
char * | get_ext_iface (void) |
void | mark_online () |
void | mark_offline () |
int | is_online () |
void | mark_auth_online () |
void | mark_auth_offline () |
int | is_auth_online () |
char * | get_status_text () |
Definition in file util.h.
#define LOCK_GHBN | ( | ) |
Value:
do { \ debug(LOG_DEBUG, "Locking wd_gethostbyname()"); \ pthread_mutex_lock(&ghbn_mutex); \ debug(LOG_DEBUG, "wd_gethostbyname() locked"); \ } while (0)
Definition at line 65 of file util.h.
Referenced by wd_gethostbyname().
#define UNLOCK_GHBN | ( | ) |
Value:
do { \ debug(LOG_DEBUG, "Unlocking wd_gethostbyname()"); \ pthread_mutex_unlock(&ghbn_mutex); \ debug(LOG_DEBUG, "wd_gethostbyname() unlocked"); \ } while (0)
Definition at line 71 of file util.h.
Referenced by wd_gethostbyname().
int execute | ( | char * | cmd_line, | |
int | quiet | |||
) |
Execute a shell command.
Fork a child and execute a shell command, the parent process waits for the child to return and returns the child's exit() value.
Definition at line 96 of file util.c.
References debug, and safe_fork().