1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-03 20:42:48 -05:00

Move SSH_MSG_UNEXPECTED generation into the BPP.

Now I've got a list macro defining all the packet types we recognise,
I can use it to write a test for 'is this a recognised code?', and use
that in turn to centralise detection of completely unrecognised codes
into the binary packet protocol, where any such messages will be
handled entirely internally and never even be seen by the next level
up. This lets me remove another big pile of boilerplate in ssh.c.
This commit is contained in:
Simon Tatham
2018-09-24 13:45:10 +01:00
parent 8cb68390e4
commit 09c3439b5a
6 changed files with 67 additions and 71 deletions

1
ssh.h
View File

@ -1299,6 +1299,7 @@ enum {
const char *ssh1_pkt_type(int type);
const char *ssh2_pkt_type(Pkt_KCtx pkt_kctx, Pkt_ACtx pkt_actx, int type);
int ssh2_pkt_type_code_valid(unsigned type);
/*
* Need this to warn about support for the original SSH-2 keyfile