summaryrefslogtreecommitdiffstats
path: root/common/os_calls.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/os_calls.h')
-rw-r--r--common/os_calls.h59
1 files changed, 35 insertions, 24 deletions
diff --git a/common/os_calls.h b/common/os_calls.h
index 0682195a..acfbe475 100644
--- a/common/os_calls.h
+++ b/common/os_calls.h
@@ -27,6 +27,20 @@
#include "arch.h"
+#define g_tcp_can_recv g_sck_can_recv
+#define g_tcp_can_send g_sck_can_send
+#define g_tcp_recv g_sck_recv
+#define g_tcp_send g_sck_send
+#define g_tcp_close g_sck_close
+#define g_tcp_last_error_would_block g_sck_last_error_would_block
+#define g_tcp_set_non_blocking g_sck_set_non_blocking
+#define g_tcp_local_socket g_sck_local_socket
+#define g_tcp_local_connect g_sck_local_connect
+#define g_tcp_listen g_sck_listen
+#define g_tcp_local_bind g_sck_local_bind
+#define g_tcp_select g_sck_select
+#define g_close_wait_obj g_delete_wait_obj
+
int APP_CC g_rm_temp_dir(void);
int APP_CC g_mk_temp_dir(const char* app_name);
void APP_CC g_init(const char* app_name);
@@ -49,39 +63,36 @@ int APP_CC g_sck_set_send_buffer_bytes(int sck, int bytes);
int APP_CC g_sck_get_send_buffer_bytes(int sck, int *bytes);
int APP_CC g_sck_set_recv_buffer_bytes(int sck, int bytes);
int APP_CC g_sck_get_recv_buffer_bytes(int sck, int *bytes);
-int APP_CC g_tcp_local_socket(void);
+int APP_CC g_sck_local_socket(void);
int APP_CC g_sck_get_peer_cred(int sck, int *pid, int *uid, int *gid);
-void APP_CC g_tcp_close(int sck);
+void APP_CC g_sck_close(int sck);
int APP_CC g_tcp_connect(int sck, const char* address, const char* port);
-int APP_CC g_tcp_local_connect(int sck, const char* port);
-int APP_CC g_tcp_force_send(int sck, char* data, int len);
-int APP_CC g_tcp_force_recv(int sck, char* data, int len);
-int APP_CC g_tcp_set_non_blocking(int sck);
+int APP_CC g_sck_local_connect(int sck, const char* port);
+int APP_CC g_sck_set_non_blocking(int sck);
int APP_CC g_tcp_bind(int sck, const char *port);
-int APP_CC g_tcp_local_bind(int sck, const char* port);
+int APP_CC g_sck_local_bind(int sck, const char* port);
int APP_CC g_tcp_bind_address(int sck, const char* port, const char* address);
-int APP_CC g_tcp_listen(int sck);
+int APP_CC g_sck_listen(int sck);
int APP_CC g_tcp_accept(int sck);
int APP_CC g_sck_accept(int sck, char *addr, int addr_bytes,
char *port, int port_bytes);
-int APP_CC g_tcp_recv(int sck, void* ptr, int len, int flags);
-int APP_CC g_tcp_send(int sck, const void* ptr, int len, int flags);
-int APP_CC g_tcp_last_error_would_block(int sck);
-int APP_CC g_tcp_socket_ok(int sck);
-int APP_CC g_tcp_can_send(int sck, int millis);
-int APP_CC g_tcp_can_recv(int sck, int millis);
-int APP_CC g_tcp_select(int sck1, int sck2);
+int APP_CC g_sck_recv(int sck, void* ptr, int len, int flags);
+int APP_CC g_sck_send(int sck, const void* ptr, int len, int flags);
+int APP_CC g_sck_last_error_would_block(int sck);
+int APP_CC g_sck_socket_ok(int sck);
+int APP_CC g_sck_can_send(int sck, int millis);
+int APP_CC g_sck_can_recv(int sck, int millis);
+int APP_CC g_sck_select(int sck1, int sck2);
void APP_CC g_write_ip_address(int rcv_sck, char* ip_address, int bytes);
void APP_CC g_sleep(int msecs);
-tbus APP_CC g_create_wait_obj(char* name);
-tbus APP_CC g_create_wait_obj_from_socket(tbus socket, int write);
-void APP_CC g_delete_wait_obj_from_socket(tbus wait_obj);
-int APP_CC g_set_wait_obj(tbus obj);
-int APP_CC g_reset_wait_obj(tbus obj);
-int APP_CC g_is_wait_obj_set(tbus obj);
-int APP_CC g_delete_wait_obj(tbus obj);
-int APP_CC g_close_wait_obj(tbus obj);
-int APP_CC g_obj_wait(tbus* read_objs, int rcount, tbus* write_objs,
+tintptr APP_CC g_create_wait_obj(char* name);
+tintptr APP_CC g_create_wait_obj_from_socket(tintptr socket, int write);
+void APP_CC g_delete_wait_obj_from_socket(tintptr wait_obj);
+int APP_CC g_set_wait_obj(tintptr obj);
+int APP_CC g_reset_wait_obj(tintptr obj);
+int APP_CC g_is_wait_obj_set(tintptr obj);
+int APP_CC g_delete_wait_obj(tintptr obj);
+int APP_CC g_obj_wait(tintptr* read_objs, int rcount, tintptr* write_objs,
int wcount,int mstimeout);
void APP_CC g_random(char* data, int len);
int APP_CC g_abs(int i);