You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.1 KiB
C
34 lines
1.1 KiB
C
13 years ago
|
// (c) 2012 Timothy Pearson
|
||
|
// (c) 2012 Raptor Engineering
|
||
|
// ALL RIGHTS RESERVED
|
||
|
|
||
|
#include <unistd.h>
|
||
|
|
||
|
#include <sys/types.h>
|
||
|
|
||
|
typedef unsigned char bool;
|
||
|
#define true 1
|
||
|
#define false 0
|
||
|
|
||
|
// SM_STATUS_ALLOCATED: Server is not yet started
|
||
|
// SM_STATUS_RUNNING: Server is up, but client is not connected
|
||
|
// SM_STATUS_CONNECTED: Server is up and client is connected
|
||
|
enum raptor_sm_status {
|
||
|
SM_STATUS_ALLOCATED,
|
||
|
SM_STATUS_RUNNING,
|
||
|
SM_STATUS_CONNECTED,
|
||
|
SM_STATUS_FORCEKILL
|
||
|
};
|
||
|
|
||
|
char* raptor_sm_get_ip_for_hostname(char* hostname, char* err);
|
||
|
char* raptor_sm_get_hostname_for_username(char* username, bool create);
|
||
|
|
||
|
char* raptor_sm_get_ip_for_username(char* username, bool create);
|
||
|
pid_t raptor_sm_run_remote_server(char* username, char *const argv[]);
|
||
|
char* raptor_sm_server_started(char* username, pid_t pid, int display);
|
||
|
int raptor_sm_get_display_for_username(char* username);
|
||
|
void raptor_sm_wait_for_pid_exit(char* username, pid_t pid);
|
||
|
void raptor_sm_session_terminated(char* username);
|
||
|
int raptor_sm_get_new_unique_display(int mindisplay, int maxdisplay);
|
||
|
bool raptor_sm_sesslimit_reached(char* username);
|
||
|
char raptor_sm_set_session_state(int display, int state);
|