Mercurial > dropbear
comparison dbutil.h @ 1051:359fba4b1a49
merge tcp fastopen
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 28 Feb 2015 23:24:30 +0800 |
parents | 01eea88963f3 |
children | 36557295418e |
comparison
equal
deleted
inserted
replaced
1045:31727a8abd4b | 1051:359fba4b1a49 |
---|---|
26 | 26 |
27 #define DROPBEAR_DBUTIL_H_ | 27 #define DROPBEAR_DBUTIL_H_ |
28 | 28 |
29 #include "includes.h" | 29 #include "includes.h" |
30 #include "buffer.h" | 30 #include "buffer.h" |
31 #include "queue.h" | |
31 | 32 |
32 #ifndef DISABLE_SYSLOG | 33 #ifndef DISABLE_SYSLOG |
33 void startsyslog(); | 34 void startsyslog(); |
34 #endif | 35 #endif |
35 | 36 |
60 void printmpint(const char *label, mp_int *mp); | 61 void printmpint(const char *label, mp_int *mp); |
61 void debug_start_net(); | 62 void debug_start_net(); |
62 extern int debug_trace; | 63 extern int debug_trace; |
63 #endif | 64 #endif |
64 | 65 |
65 enum dropbear_prio { | 66 char * stripcontrol(const char * text); |
66 DROPBEAR_PRIO_DEFAULT = 10, | |
67 DROPBEAR_PRIO_LOWDELAY = 11, | |
68 DROPBEAR_PRIO_BULK = 12, | |
69 }; | |
70 | 67 |
71 char * stripcontrol(const char * text); | |
72 void get_socket_address(int fd, char **local_host, char **local_port, | |
73 char **remote_host, char **remote_port, int host_lookup); | |
74 void getaddrstring(struct sockaddr_storage* addr, | |
75 char **ret_host, char **ret_port, int host_lookup); | |
76 void set_sock_nodelay(int sock); | |
77 void set_sock_priority(int sock, enum dropbear_prio prio); | |
78 int dropbear_listen(const char* address, const char* port, | |
79 int *socks, unsigned int sockcount, char **errstring, int *maxfd); | |
80 int spawn_command(void(*exec_fn)(void *user_data), void *exec_data, | 68 int spawn_command(void(*exec_fn)(void *user_data), void *exec_data, |
81 int *writefd, int *readfd, int *errfd, pid_t *pid); | 69 int *writefd, int *readfd, int *errfd, pid_t *pid); |
82 void run_shell_command(const char* cmd, unsigned int maxfd, char* usershell); | 70 void run_shell_command(const char* cmd, unsigned int maxfd, char* usershell); |
83 #ifdef ENABLE_CONNECT_UNIX | 71 #ifdef ENABLE_CONNECT_UNIX |
84 int connect_unix(const char* addr); | 72 int connect_unix(const char* addr); |
85 #endif | 73 #endif |
86 int connect_remote(const char* remotehost, const char* remoteport, char ** errstring); | |
87 int buf_readfile(buffer* buf, const char* filename); | 74 int buf_readfile(buffer* buf, const char* filename); |
88 int buf_getline(buffer * line, FILE * authfile); | 75 int buf_getline(buffer * line, FILE * authfile); |
89 | 76 |
90 void m_close(int fd); | 77 void m_close(int fd); |
91 void * m_malloc(size_t size); | 78 void * m_malloc(size_t size); |