comparison dbutil.h @ 871:aa689d140928

- Sockets are set to lowdelay priority initially to improve conneciton setup time - Set non-pty connections to bulk for client and server
author Matt Johnston <matt@ucc.asn.au>
date Tue, 03 Dec 2013 00:04:48 +0800
parents 80af450dae76
children 7cd89d4e0335
comparison
equal deleted inserted replaced
870:80af450dae76 871:aa689d140928
59 void printhex(const char * label, const unsigned char * buf, int len); 59 void printhex(const char * label, const unsigned char * buf, int len);
60 void printmpint(const char *label, mp_int *mp); 60 void printmpint(const char *label, mp_int *mp);
61 extern int debug_trace; 61 extern int debug_trace;
62 #endif 62 #endif
63 63
64 enum dropbear_prio {
65 DROPBEAR_PRIO_DEFAULT,
66 DROPBEAR_PRIO_LOWDELAY,
67 DROPBEAR_PRIO_BULK,
68 };
69
64 char * stripcontrol(const char * text); 70 char * stripcontrol(const char * text);
65 void get_socket_address(int fd, char **local_host, char **local_port, 71 void get_socket_address(int fd, char **local_host, char **local_port,
66 char **remote_host, char **remote_port, int host_lookup); 72 char **remote_host, char **remote_port, int host_lookup);
67 void getaddrstring(struct sockaddr_storage* addr, 73 void getaddrstring(struct sockaddr_storage* addr,
68 char **ret_host, char **ret_port, int host_lookup); 74 char **ret_host, char **ret_port, int host_lookup);
69 void set_sock_nodelay(int sock); 75 void set_sock_nodelay(int sock);
70 void set_sock_priority(int sock); 76 void set_sock_priority(int sock, enum dropbear_prio prio);
71 int dropbear_listen(const char* address, const char* port, 77 int dropbear_listen(const char* address, const char* port,
72 int *socks, unsigned int sockcount, char **errstring, int *maxfd); 78 int *socks, unsigned int sockcount, char **errstring, int *maxfd);
73 int spawn_command(void(*exec_fn)(void *user_data), void *exec_data, 79 int spawn_command(void(*exec_fn)(void *user_data), void *exec_data,
74 int *writefd, int *readfd, int *errfd, pid_t *pid); 80 int *writefd, int *readfd, int *errfd, pid_t *pid);
75 void run_shell_command(const char* cmd, unsigned int maxfd, char* usershell); 81 void run_shell_command(const char* cmd, unsigned int maxfd, char* usershell);