Function silc_packet_send_prepare
SYNOPSIS
bool silc_packet_send_prepare(SilcSocketConnection sock,
SilcUInt32 header_len,
SilcUInt32 pad_len,
SilcUInt32 data_len,
SilcHmac hmac,
const SilcBuffer packet);
DESCRIPTION
This function can be used to prepare the outgoing data buffer in
the socket connection specified by `sock' for packet sending.
This is used internally by packet sending routines, but application
may call this if it doesn't call silc_packet_assemble function.
If that function is called then application must not call this since
that function calls this internally.
This returns the prepared data area into the `packet' pointer provided
caller, which can be used then to add data to it, and later encrypt
it. The `packet' includes reference to the socket connection's
outgoing buffer. The `packet' may be freely modified (like
encrypted etc.) but it must not be freed, since it is reference from
`sock' outgoing buffer, and it is const.
|