| #ifndef VSF_PRIVSOCK_H |
| #define VSF_PRIVSOCK_H |
| |
| struct mystr; |
| struct vsf_session; |
| |
| |
| |
| |
| |
| |
| |
| |
| void priv_sock_init(struct vsf_session* p_sess); |
| |
| |
| |
| |
| |
| |
| |
| |
| void priv_sock_close(struct vsf_session* p_sess); |
| |
| |
| |
| |
| |
| |
| |
| |
| void priv_sock_set_parent_context(struct vsf_session* p_sess); |
| |
| |
| |
| |
| |
| |
| |
| |
| void priv_sock_set_child_context(struct vsf_session* p_sess); |
| |
| |
| |
| |
| |
| |
| |
| |
| void priv_sock_send_cmd(int fd, char cmd); |
| |
| |
| |
| |
| |
| |
| |
| |
| void priv_sock_send_str(int fd, const struct mystr* p_str); |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| void priv_sock_send_buf(int fd, const char* p_buf, unsigned int len); |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| void priv_sock_recv_buf(int fd, char* p_buf, unsigned int len); |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| char priv_sock_get_result(int fd); |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| char priv_sock_get_cmd(int fd); |
| |
| |
| |
| |
| |
| |
| |
| |
| void priv_sock_get_str(int fd, struct mystr* p_dest); |
| |
| |
| |
| |
| |
| |
| |
| |
| void priv_sock_send_result(int fd, char res); |
| |
| |
| |
| |
| |
| |
| |
| |
| void priv_sock_send_fd(int fd, int send_fd); |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| int priv_sock_recv_fd(int fd); |
| |
| |
| |
| |
| |
| |
| |
| |
| void priv_sock_send_int(int fd, int the_int); |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| int priv_sock_get_int(int fd); |
| |
| #define PRIV_SOCK_LOGIN 1 |
| #define PRIV_SOCK_CHOWN 2 |
| #define PRIV_SOCK_GET_DATA_SOCK 3 |
| #define PRIV_SOCK_GET_USER_CMD 4 |
| #define PRIV_SOCK_WRITE_USER_RESP 5 |
| #define PRIV_SOCK_DO_SSL_HANDSHAKE 6 |
| #define PRIV_SOCK_DO_SSL_CLOSE 7 |
| #define PRIV_SOCK_DO_SSL_READ 8 |
| #define PRIV_SOCK_DO_SSL_WRITE 9 |
| #define PRIV_SOCK_PASV_CLEANUP 10 |
| #define PRIV_SOCK_PASV_ACTIVE 11 |
| #define PRIV_SOCK_PASV_LISTEN 12 |
| #define PRIV_SOCK_PASV_ACCEPT 13 |
| |
| #define PRIV_SOCK_RESULT_OK 1 |
| #define PRIV_SOCK_RESULT_BAD 2 |
| |
| #endif /* VSF_PRIVSOCK_H */ |
| |