c3bcdd88a4
I'll introduce a new internal function set named _libssh2_store_u32 _libssh2_store_u64 _libssh2_store_str That can be used all through the library to build binary outgoing packets. Using these instead of the current approach removes hundreds of lines from the library while at the same time greatly enhances readability. I've not yet fully converted everything to use these functions. I've converted LOTS of 'unsigned long' to 'size_t' where data/string lengths are dealt with internally. This is The Right Thing and it will help us make the transition to our size_t-polished API later on as well. I'm removing the PACKET_* error codes. They were originally introduced as a set of separate error codes from the transport layer, but having its own set of errors turned out to be very awkward and they were then converted into a set of #defines that simply maps them to the global libssh2 error codes instead. Now, I'l take the next logical step and simply replace the PACKET_* defines with the actual LIBSSH2_ERROR_* defines. It will increase readability and decrease confusion. I also separated packet stuff into its own packet.h header file.
8 строки
323 B
Makefile
8 строки
323 B
Makefile
CSOURCES = channel.c comp.c crypt.c hostkey.c kex.c mac.c misc.c \
|
|
packet.c publickey.c scp.c session.c sftp.c userauth.c transport.c \
|
|
version.c knownhost.c agent.c openssl.c libgcrypt.c pem.c keepalive.c \
|
|
global.c
|
|
|
|
HHEADERS = libssh2_priv.h openssl.h libgcrypt.h transport.h channel.h \
|
|
comp.h mac.h misc.h packet.h
|