X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilccore%2Fsilcchannel_i.h;h=34dc5bb085924b28ec3175e4a1590a238ef10a94;hb=054c9b2c9b21c3cbe87e53c0e0bacb2bff918e68;hp=372094d1e2270320bd2257f564ba20881c016a22;hpb=61af85976e943396cf2cbe9bdaee3e4119c74aec;p=silc.git diff --git a/lib/silccore/silcchannel_i.h b/lib/silccore/silcchannel_i.h index 372094d1..34dc5bb0 100644 --- a/lib/silccore/silcchannel_i.h +++ b/lib/silccore/silcchannel_i.h @@ -41,40 +41,6 @@ struct SilcChannelPayloadStruct { }; -/****************************************************************************** - - Channel Message Payload - -******************************************************************************/ - -/* Calculates padding length for message payload */ -#define SILC_CHANNEL_MESSAGE_PAD(__payloadlen) (16 - ((__payloadlen) % 16)) - -/* Header length plus maximum padding length */ -#define SILC_CHANNEL_MESSAGE_HLEN 6 + 16 - -/* Returns the data length that fits to the packet. If data length is too - big it will be truncated to fit to the payload. */ -#define SILC_CHANNEL_MESSAGE_DATALEN(data_len, header_len) \ - ((data_len + SILC_CHANNEL_MESSAGE_HLEN + header_len) > \ - SILC_PACKET_MAX_LEN ? \ - data_len - ((data_len + SILC_CHANNEL_MESSAGE_HLEN + header_len) - \ - SILC_PACKET_MAX_LEN) : data_len) - -/* Channel Message Payload structure. Contents of this structure is parsed - from SILC packets. */ -struct SilcChannelMessagePayloadStruct { - unsigned char *data; - unsigned char *pad; - unsigned char *mac; - unsigned char *iv; - SilcMessageFlags flags; - SilcUInt16 data_len; - SilcUInt16 pad_len; - SilcUInt16 iv_len; -}; - - /****************************************************************************** Channel Key Payload