X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcsftp%2Fsftp_util.h;h=f8e9c3054d81c719098689202d70e649298b6a44;hb=4e64dd02ccecc9c497b8db8ecb09d017b9cef9a4;hp=ac43b06a9de8fdadce3e93963ccc18e4ad4f818b;hpb=d730ceaea07589410fb60047c45e221f63677513;p=silc.git diff --git a/lib/silcsftp/sftp_util.h b/lib/silcsftp/sftp_util.h index ac43b06a..f8e9c305 100644 --- a/lib/silcsftp/sftp_util.h +++ b/lib/silcsftp/sftp_util.h @@ -61,12 +61,16 @@ typedef uint32 SilcSFTPPacket; /* Encodes a SFTP packet of type `packet' of length `len'. The variable argument list is encoded as data payload to the buffer. Returns the encoded packet or NULL on error. The caller must free the returned - buffer. */ -SilcBuffer silc_sftp_packet_encode(SilcSFTPPacket packet, uint32 len, ...); + buffer. If `packet_buf' is non-NULL then the new packet data is put + to that buffer instead of allocating new one. If the new data cannot + fit to `packet_buf' will be reallocated. */ +SilcBuffer silc_sftp_packet_encode(SilcSFTPPacket packet, + SilcBuffer packet_buf, uint32 len, ...); /* Same as silc_sftp_packet_encode but takes the variable argument list pointer as argument. */ -SilcBuffer silc_sftp_packet_encode_vp(SilcSFTPPacket packet, uint32 len, +SilcBuffer silc_sftp_packet_encode_vp(SilcSFTPPacket packet, + SilcBuffer packet_buf, uint32 len, va_list vp); /* Decodes the SFTP packet data `data' and return the SFTP packet type.