summaryrefslogtreecommitdiff
path: root/src/protocol/connect_info.h
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-04-28 21:50:54 +0800
committerIru Cai <mytbk920423@gmail.com>2018-04-30 15:20:28 +0800
commitef70cc73c69d04e93c9af5fb49c5d762ba226801 (patch)
tree2f96375bb6047f1a6161c00f659e222711db3cd7 /src/protocol/connect_info.h
parentbec678f312d282cd467a4d13dbf29c37ea111ce7 (diff)
downloadfqterm-ef70cc73c69d04e93c9af5fb49c5d762ba226801.tar.xz
Add a connection info field in FQTermSocket
- the connection info record contains the name of the cipher and MAC algorithms, and the key hash - after doing a key exchange, the connection info will be filled
Diffstat (limited to 'src/protocol/connect_info.h')
-rw-r--r--src/protocol/connect_info.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/protocol/connect_info.h b/src/protocol/connect_info.h
new file mode 100644
index 0000000..0111a39
--- /dev/null
+++ b/src/protocol/connect_info.h
@@ -0,0 +1,25 @@
+#ifndef CONNECT_INFO_H
+#define CONNECT_INFO_H
+
+enum protocol
+{
+ PROTO_LOCAL,
+ PROTO_TELNET,
+ PROTO_SSH
+};
+
+typedef struct
+{
+ enum protocol proto;
+ struct
+ {
+ int proto_version;
+ const char *c2s_cipher;
+ const char *s2c_cipher;
+ const char *c2s_mac;
+ const char *s2c_mac;
+ unsigned char hash[32];
+ } ssh_proto_info;
+} conn_info_t;
+
+#endif