projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The specific SSH cipher algorithms supported by PuTTY weren't listed anywhere
[u/mdw/putty]
/
network.h
diff --git
a/network.h
b/network.h
index
657bdcb
..
46ec6bb
100644
(file)
--- a/
network.h
+++ b/
network.h
@@
-25,6
+25,10
@@
typedef struct SockAddr_tag *SockAddr;
typedef struct socket_function_table **Socket;
typedef struct plug_function_table **Plug;
typedef struct socket_function_table **Socket;
typedef struct plug_function_table **Plug;
+#ifndef OSSOCKET_DEFINED
+typedef void *OSSocket;
+#endif
+
struct socket_function_table {
Plug(*plug) (Socket s, Plug p);
/* use a different plug (return the old one) */
struct socket_function_table {
Plug(*plug) (Socket s, Plug p);
/* use a different plug (return the old one) */
@@
-38,12
+42,12
@@
struct socket_function_table {
void *(*get_private_ptr) (Socket s);
void (*set_frozen) (Socket s, int is_frozen);
/* ignored by tcp, but vital for ssl */
void *(*get_private_ptr) (Socket s);
void (*set_frozen) (Socket s, int is_frozen);
/* ignored by tcp, but vital for ssl */
- char *(*socket_error) (Socket s);
+ c
onst c
har *(*socket_error) (Socket s);
};
struct plug_function_table {
int (*closing)
};
struct plug_function_table {
int (*closing)
- (Plug p, char *error_msg, int error_code, int calling_back);
+ (Plug p, c
onst c
har *error_msg, int error_code, int calling_back);
/* error_msg is NULL iff it is not an error (ie it closed normally) */
/* calling_back != 0 iff there is a Plug function */
/* currently running (would cure the fixme in try_send()) */
/* error_msg is NULL iff it is not an error (ie it closed normally) */
/* calling_back != 0 iff there is a Plug function */
/* currently running (would cure the fixme in try_send()) */
@@
-64,7
+68,7
@@
struct plug_function_table {
* on a socket is cleared or partially cleared. The new backlog
* size is passed in the `bufsize' parameter.
*/
* on a socket is cleared or partially cleared. The new backlog
* size is passed in the `bufsize' parameter.
*/
- int (*accepting)(Plug p,
void *
sock);
+ int (*accepting)(Plug p,
OSSocket
sock);
/*
* returns 0 if the host at address addr is a valid host for connecting or error
*/
/*
* returns 0 if the host at address addr is a valid host for connecting or error
*/
@@
-80,6
+84,12
@@
Socket new_listener(char *srcaddr, int port, Plug plug, int local_host_only,
SockAddr name_lookup(char *host, int port, char **canonicalname,
const Config *cfg);
SockAddr name_lookup(char *host, int port, char **canonicalname,
const Config *cfg);
+/* platform-dependent callback from new_connection() */
+Socket platform_new_connection(SockAddr addr, char *hostname,
+ int port, int privport,
+ int oobinline, int nodelay, Plug plug,
+ const Config *cfg);
+
/* socket functions */
void sk_init(void); /* called once at program startup */
/* socket functions */
void sk_init(void); /* called once at program startup */
@@
-100,7
+110,7
@@
Socket sk_new(SockAddr addr, int port, int privport, int oobinline,
Socket sk_newlistener(char *srcaddr, int port, Plug plug, int local_host_only);
Socket sk_newlistener(char *srcaddr, int port, Plug plug, int local_host_only);
-Socket sk_register(
void *
sock, Plug plug);
+Socket sk_register(
OSSocket
sock, Plug plug);
#define sk_plug(s,p) (((*s)->plug) (s, p))
#define sk_close(s) (((*s)->close) (s))
#define sk_plug(s,p) (((*s)->plug) (s, p))
#define sk_close(s) (((*s)->close) (s))
@@
-130,7
+140,7
@@
Socket sk_register(void *sock, Plug plug);
* if there's a problem. These functions extract an error message,
* or return NULL if there's no problem.
*/
* if there's a problem. These functions extract an error message,
* or return NULL if there's no problem.
*/
-char *sk_addr_error(SockAddr addr);
+c
onst c
har *sk_addr_error(SockAddr addr);
#define sk_socket_error(s) (((*s)->socket_error) (s))
/*
#define sk_socket_error(s) (((*s)->socket_error) (s))
/*