A LOT updates. Cannot separate. :)
[silc.git] / lib / silccore / silcpacket.h
index 9b026f9f85263815ecdd200426bbbf39673a090d..fe0c81f436ea9f0f8bd125139bb8a35d8d284f54 100644 (file)
@@ -124,6 +124,10 @@ typedef struct {
 
   /* For padding generation */
   SilcRng rng;
+
+  /* Back pointers */
+  void *context;
+  SilcSocketConnection sock;
 } SilcPacketContext;
 
 /* 
@@ -204,6 +208,9 @@ typedef void (*SilcPacketParserCallback)(SilcPacketParserContext
 #define SILC_PACKET_NEW_CHANNEL_USER_LIST 25     /* List of users on "" */
 #define SILC_PACKET_REPLACE_ID           26      /* To replace old ID */
 #define SILC_PACKET_REMOVE_ID            27      /* To remove ID */
+#define SILC_PACKET_REMOVE_CHANNEL_USER  28      /* Remove user from channel */
+#define SILC_PACKET_REKEY                29
+#define SILC_PACKET_REKEY_DONE           30
 /* #define SILC_PACKET_MAX               255 */
 
 /* Macros */
@@ -234,11 +241,12 @@ int silc_packet_read(int sock, SilcBuffer dest);
 int silc_packet_receive(SilcSocketConnection sock);
 int silc_packet_decrypt(SilcCipher cipher, SilcHmac hmac,
                        SilcBuffer buffer, SilcPacketContext *packet);
-int silc_packet_receive_process(SilcSocketConnection sock, 
-                               SilcCipher cipher, SilcHmac hmac,
-                               SilcPacketParserCallback parser, 
-                               void *context);
+void silc_packet_receive_process(SilcSocketConnection sock,
+                                SilcCipher cipher, SilcHmac hmac,
+                                SilcPacketParserCallback parser,
+                                void *context);
 SilcPacketType silc_packet_parse(SilcPacketContext *ctx);
 SilcPacketType silc_packet_parse_special(SilcPacketContext *ctx);
+SilcPacketContext *silc_packet_context_dup(SilcPacketContext *ctx);
 
 #endif