-/****h* silccore/silcpacket.h
- *
- * NAME
- *
- * silcpacket.h
- *
- * COPYRIGHT
- *
- * Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
- *
- * Copyright (C) 1997 - 2001 Pekka Riikonen
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+/*
+
+ silcpacket.h
+
+ Author: Pekka Riikonen <priikone@silcnet.org>
+
+ Copyright (C) 1997 - 2001 Pekka Riikonen
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+*/
+
+/****h* silccore/SilcPacketAPI
*
* DESCRIPTION
*
#ifndef SILCPACKET_H
#define SILCPACKET_H
-/* Amount of bytes to be read from the socket connection at once. */
-#define SILC_PACKET_READ_SIZE 16384
-
/* Default byte size of the packet. */
-#define SILC_PACKET_DEFAULT_SIZE 1024
+#define SILC_PACKET_DEFAULT_SIZE SILC_SOCKET_BUF_SIZE
/* Header length without source and destination ID's. */
#define SILC_PACKET_HEADER_LEN 8 + 2
#define SILC_PACKET_REKEY_DONE 23 /* Re-key done */
#define SILC_PACKET_HEARTBEAT 24 /* Heartbeat */
#define SILC_PACKET_KEY_AGREEMENT 25 /* Key Agreement request */
-#define SILC_PACKET_CELL_ROUTERS 26 /* Cell routers backup */
+#define SILC_PACKET_RESUME_ROUTER 26 /* Backup router resume */
+#define SILC_PACKET_FTP 27 /* File Transfer */
#define SILC_PACKET_PRIVATE 200 /* Private range start */
#define SILC_PACKET_MAX 255 /* RESERVED */
* silc_packet_* routines. If not provided the library will calculate
* the values.
*
- * in users;
+ * int users;
*
* Reference counter for this context. The context is freed only
* after the reference counter hits zero. The counter is added
* calling silc_packet_context_dup and decreased by calling the
* silc_packet_context_free.
*
+ * uint32 sequence;
+ *
+ * Packet sequence number.
+ *
***/
typedef struct {
SilcBuffer buffer;
SilcSocketConnection sock;
int users;
+
+ uint32 sequence;
} SilcPacketContext;
/****s* silccore/SilcPacketAPI/SilcPacketParserContext