Put a layer of abstraction in front of struct ssh_channel.
Clients outside ssh.c - all implementations of Channel - will now not see the ssh_channel data type itself, but only a subobject of the interface type SshChannel. All the sshfwd_* functions have become methods in that interface type's vtable (though, wrapped in the usual kind of macros, the call sites look identical). This paves the way for me to split up the SSH-1 and SSH-2 connection layers and have each one lay out its channel bookkeeping structure as it sees fit; as long as they each provide an implementation of the sshfwd_ method family, the types behind that need not look different. A minor good effect of this is that the sshfwd_ methods are no longer global symbols, so they don't have to be stubbed in Unix Pageant to get it to compile.
Showing
- agentf.c 2 additions, 2 deletionsagentf.c
- defs.h 1 addition, 0 deletionsdefs.h
- portfwd.c 4 additions, 4 deletionsportfwd.c
- ssh.c 61 additions, 28 deletionsssh.c
- ssh.h 5 additions, 18 deletionsssh.h
- sshchan.h 35 additions, 1 deletionsshchan.h
- unix/uxpgnt.c 0 additions, 14 deletionsunix/uxpgnt.c
- x11fwd.c 2 additions, 2 deletionsx11fwd.c
Loading
Please register or sign in to comment