updates.
[silc.git] / apps / silcd / packet_send.h
index 08bb1e62f6281fd8cf7775c91af32fa71840cfa1..b055904d42d9461d76838614d321705aac53f45b 100644 (file)
 
 int silc_server_packet_send_real(SilcServer server,
                                 SilcSocketConnection sock,
-                                int force_send);
+                                bool force_send);
 void silc_server_packet_send(SilcServer server,
                             SilcSocketConnection sock, 
                             SilcPacketType type, 
                             SilcPacketFlags flags,
                             unsigned char *data, 
-                            unsigned int data_len,
-                            int force_send);
+                            uint32 data_len,
+                            bool force_send);
 void silc_server_packet_send_dest(SilcServer server,
                                  SilcSocketConnection sock, 
                                  SilcPacketType type, 
@@ -40,8 +40,8 @@ void silc_server_packet_send_dest(SilcServer server,
                                  void *dst_id,
                                  SilcIdType dst_id_type,
                                  unsigned char *data, 
-                                 unsigned int data_len,
-                                 int force_send);
+                                 uint32 data_len,
+                                 bool force_send);
 void silc_server_packet_send_srcdest(SilcServer server,
                                     SilcSocketConnection sock, 
                                     SilcPacketType type, 
@@ -51,8 +51,8 @@ void silc_server_packet_send_srcdest(SilcServer server,
                                     void *dst_id,
                                     SilcIdType dst_id_type,
                                     unsigned char *data, 
-                                    unsigned int data_len,
-                                    int force_send);
+                                    uint32 data_len,
+                                    bool force_send);
 void silc_server_packet_broadcast(SilcServer server,
                                  SilcSocketConnection sock,
                                  SilcPacketContext *packet);
@@ -63,25 +63,26 @@ void silc_server_packet_send_to_channel(SilcServer server,
                                        SilcSocketConnection sender,
                                        SilcChannelEntry channel,
                                        SilcPacketType type,
-                                       unsigned char route,
+                                       bool route,
                                        unsigned char *data,
-                                       unsigned int data_len,
-                                       int force_send);
+                                       uint32 data_len,
+                                       bool force_send);
 void silc_server_packet_relay_to_channel(SilcServer server,
                                         SilcSocketConnection sender_sock,
                                         SilcChannelEntry channel,
                                         void *sender, 
                                         SilcIdType sender_type,
+                                        void *sender_entry,
                                         unsigned char *data,
-                                        unsigned int data_len,
-                                        int force_send);
+                                        uint32 data_len,
+                                        bool force_send);
 void silc_server_packet_send_local_channel(SilcServer server,
                                           SilcChannelEntry channel,
                                           SilcPacketType type,
                                           SilcPacketFlags flags,
                                           unsigned char *data,
-                                          unsigned int data_len,
-                                          int force_send);
+                                          uint32 data_len,
+                                          bool force_send);
 void silc_server_send_private_message(SilcServer server,
                                      SilcSocketConnection dst_sock,
                                      SilcCipher cipher,
@@ -96,107 +97,115 @@ void silc_server_send_notify(SilcServer server,
                             SilcSocketConnection sock,
                             int broadcast,
                             SilcNotifyType type,
-                            unsigned int argc, ...);
+                            uint32 argc, ...);
+void silc_server_send_notify_args(SilcServer server,
+                                 SilcSocketConnection sock,
+                                 int broadcast,
+                                 SilcNotifyType type,
+                                 uint32 argc,
+                                 SilcBuffer args);
 void silc_server_send_notify_channel_change(SilcServer server,
                                            SilcSocketConnection sock,
                                            int broadcast,
                                            SilcChannelID *old_id,
-                                           SilcChannelID *new_id,
-                                           unsigned int id_len);
+                                           SilcChannelID *new_id);
 void silc_server_send_notify_nick_change(SilcServer server,
                                         SilcSocketConnection sock,
                                         int broadcast,
                                         SilcClientID *old_id,
-                                        SilcClientID *new_id,
-                                        unsigned int id_len);
+                                        SilcClientID *new_id);
 void silc_server_send_notify_join(SilcServer server,
                                  SilcSocketConnection sock,
                                  int broadcast,
                                  SilcChannelEntry channel,
-                                 SilcClientID *client_id,
-                                 unsigned int client_id_len);
+                                 SilcClientID *client_id);
 void silc_server_send_notify_leave(SilcServer server,
                                   SilcSocketConnection sock,
                                   int broadcast,
                                   SilcChannelEntry channel,
-                                  SilcClientID *client_id,
-                                  unsigned int client_id_len);
+                                  SilcClientID *client_id);
 void silc_server_send_notify_cmode(SilcServer server,
                                   SilcSocketConnection sock,
                                   int broadcast,
                                   SilcChannelEntry channel,
-                                  unsigned int mode_mask,
-                                  SilcClientID *client_id,
-                                  unsigned int client_id_len);
+                                  uint32 mode_mask,
+                                  void *id, SilcIdType id_type,
+                                  char *cipher, char *hmac);
 void silc_server_send_notify_cumode(SilcServer server,
                                    SilcSocketConnection sock,
                                    int broadcast,
                                    SilcChannelEntry channel,
-                                   unsigned int mode_mask,
-                                   SilcClientID *client_id,
-                                   unsigned int client_id_len,
-                                   SilcClientID *target,
-                                   unsigned int target_len);
+                                   uint32 mode_mask,
+                                   void *id, SilcIdType id_type,
+                                   SilcClientID *target);
 void silc_server_send_notify_signoff(SilcServer server,
                                     SilcSocketConnection sock,
                                     int broadcast,
                                     SilcClientID *client_id,
-                                    unsigned int client_id_len,
                                     char *message);
-void silc_server_send_notify_server_signoff(SilcServer server,
-                                           SilcSocketConnection sock,
-                                           int broadcast,
-                                           SilcServerID *server_id,
-                                           unsigned int server_id_len);
 void silc_server_send_notify_topic_set(SilcServer server,
                                       SilcSocketConnection sock,
                                       int broadcast,
                                       SilcChannelEntry channel,
                                       SilcClientID *client_id,
-                                      unsigned int client_id_len,
                                       char *topic);
 void silc_server_send_notify_kicked(SilcServer server,
                                    SilcSocketConnection sock,
                                    int broadcast,
                                    SilcChannelEntry channel,
                                    SilcClientID *client_id,
-                                   unsigned int client_id_len,
                                    char *comment);
 void silc_server_send_notify_killed(SilcServer server,
                                    SilcSocketConnection sock,
                                    int broadcast,
                                    SilcClientID *client_id,
-                                   unsigned int client_id_len,
                                    char *comment);
+void silc_server_send_notify_umode(SilcServer server,
+                                  SilcSocketConnection sock,
+                                  int broadcast,
+                                  SilcClientID *client_id,
+                                  uint32 mode_mask);
+void silc_server_send_notify_ban(SilcServer server,
+                                SilcSocketConnection sock,
+                                int broadcast,
+                                SilcChannelEntry channel,
+                                char *add, char *del);
+void silc_server_send_notify_invite(SilcServer server,
+                                   SilcSocketConnection sock,
+                                   int broadcast,
+                                   SilcChannelEntry channel,
+                                   SilcClientID *client_id,
+                                   char *add, char *del);
 void silc_server_send_notify_dest(SilcServer server,
                                  SilcSocketConnection sock,
                                  int broadcast,
                                  void *dest_id,
                                  SilcIdType dest_id_type,
                                  SilcNotifyType type,
-                                 unsigned int argc, ...);
+                                 uint32 argc, ...);
 void silc_server_send_notify_to_channel(SilcServer server,
                                        SilcSocketConnection sender,
                                        SilcChannelEntry channel,
                                        unsigned char route_notify,
                                        SilcNotifyType type,
-                                       unsigned int argc, ...);
+                                       uint32 argc, ...);
 void silc_server_send_notify_on_channels(SilcServer server,
-                                        SilcSocketConnection sender,
+                                        SilcClientEntry sender,
                                         SilcClientEntry client,
                                         SilcNotifyType type,
-                                        unsigned int argc, ...);
+                                        uint32 argc, ...);
 void silc_server_send_new_id(SilcServer server,
                             SilcSocketConnection sock,
                             int broadcast,
                             void *id, SilcIdType id_type, 
-                            unsigned int id_len);
+                            uint32 id_len);
 void silc_server_send_new_channel(SilcServer server,
                                  SilcSocketConnection sock,
                                  int broadcast,
                                  char *channel_name,
                                  void *channel_id, 
-                                 unsigned int channel_id_len);
+                                 uint32 channel_id_len,
+                                 uint32 mode);
 void silc_server_send_channel_key(SilcServer server,
                                  SilcSocketConnection sender,
                                  SilcChannelEntry channel,
@@ -204,23 +213,21 @@ void silc_server_send_channel_key(SilcServer server,
 void silc_server_send_command(SilcServer server, 
                              SilcSocketConnection sock,
                              SilcCommand command, 
-                             unsigned int argc, ...);
+                             uint16 ident,
+                             uint32 argc, ...);
 void silc_server_send_heartbeat(SilcServer server,
                                SilcSocketConnection sock);
-void silc_server_send_key_agreement(SilcServer server,
-                                   SilcSocketConnection dst_sock,
-                                   SilcCipher cipher,
-                                   SilcHmac hmac,
-                                   SilcPacketContext *packet);
-void silc_server_send_private_message_key(SilcServer server,
-                                         SilcSocketConnection dst_sock,
-                                         SilcCipher cipher,
-                                         SilcHmac hmac,
-                                         SilcPacketContext *packet);
-void silc_server_packet_relay_notify(SilcServer server,
-                                    SilcSocketConnection dst_sock,
-                                    SilcCipher cipher,
-                                    SilcHmac hmac,
-                                    SilcPacketContext *packet);
+void silc_server_relay_packet(SilcServer server,
+                             SilcSocketConnection dst_sock,
+                             SilcCipher cipher,
+                             SilcHmac hmac,
+                             SilcPacketContext *packet,
+                             bool force_send);
+void silc_server_send_connection_auth_request(SilcServer server,
+                                             SilcSocketConnection sock,
+                                             uint16 conn_type,
+                                             SilcAuthMethod auth_meth);
+void silc_server_packet_queue_purge(SilcServer server,
+                                   SilcSocketConnection sock);
 
 #endif