updates.
[silc.git] / lib / silccore / silcpacket.h
index 7d1b11ba1c837fb2a9f8f551b682dea318f489f1..792482276e7efd13b0447949f9bc0477b2033822 100644 (file)
@@ -61,8 +61,8 @@ typedef unsigned char SilcPacketFlags;
 #define SILC_PACKET_FLAG_PRIVMSG_KEY      0x01
 #define SILC_PACKET_FLAG_LIST             0x02
 #define SILC_PACKET_FLAG_BROADCAST        0x04
-#define SILC_PACKET_FLAG_TUNNELED         0x08
 /* Rest of flags still available
+#define SILC_PACKET_FLAG_XXX              0x08
 #define SILC_PACKET_FLAG_XXX              0x10
 #define SILC_PACKET_FLAG_XXX              0x20
 #define SILC_PACKET_FLAG_XXX              0x40
@@ -94,14 +94,14 @@ typedef unsigned char SilcPacketFlags;
        Packet flags. Flags are defined above.
 
    unsigned char *src_id
-   unsigned short src_id_len
+   uint16 src_id_len
    unsigned char src_id_type
 
        Source ID, its length and type. On packet reception retuned ID's
        are always the hash values of the ID's from the packet.
 
   unsigned char *dst_id;
-  unsigned short dst_id_len;
+  uint16 dst_id_len;
   unsigned char src_id_type;
 
        Destination ID, its length and type. On packet reception retuned
@@ -119,15 +119,15 @@ typedef struct {
   SilcPacketFlags flags;
 
   unsigned char *src_id;
-  unsigned short src_id_len;
+  uint16 src_id_len;
   unsigned char src_id_type;
 
   unsigned char *dst_id;
-  unsigned short dst_id_len;
+  uint16 dst_id_len;
   unsigned char dst_id_type;
 
-  unsigned short truelen;
-  unsigned short padlen;
+  uint16 truelen;
+  uint16 padlen;
 
   /* Back pointers */
   void *context;
@@ -158,14 +158,6 @@ typedef struct {
 
        The associated connection.
 
-   SilcCipher cipher
-
-       The cipher to be used in the decryption.
-
-   SilcHmac hmac
-
-       The HMAC to be used in the decryption.
-
    void *context
 
        User context that is sent to the silc_packet_receive_process
@@ -177,8 +169,6 @@ typedef struct {
 typedef struct {
   SilcPacketContext *packet;
   SilcSocketConnection sock;
-  SilcCipher cipher;
-  SilcHmac hmac;
   void *context;
 } SilcPacketParserContext;
 
@@ -242,12 +232,12 @@ do {                                                                           \
 int silc_packet_write(int sock, SilcBuffer src);
 int silc_packet_send(SilcSocketConnection sock, int force_send);
 void silc_packet_encrypt(SilcCipher cipher, SilcHmac hmac, 
-                        SilcBuffer buffer, unsigned int len);
+                        SilcBuffer buffer, uint32 len);
 void silc_packet_assemble(SilcPacketContext *ctx);
 void silc_packet_send_prepare(SilcSocketConnection sock,
-                             unsigned int header_len,
-                             unsigned int padlen,
-                             unsigned int data_len);
+                             uint32 header_len,
+                             uint32 padlen,
+                             uint32 data_len);
 int silc_packet_read(int sock, SilcBuffer dest);
 int silc_packet_receive(SilcSocketConnection sock);
 int silc_packet_decrypt(SilcCipher cipher, SilcHmac hmac,