projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updates
[silc.git]
/
lib
/
silcutil
/
silcsockconn.h
diff --git
a/lib/silcutil/silcsockconn.h
b/lib/silcutil/silcsockconn.h
index 7f6ea5f9c35ec0a6f0a02218205ed69e49549802..d7acdf95834fec56ec665effca95ac3846eeb539 100644
(file)
--- a/
lib/silcutil/silcsockconn.h
+++ b/
lib/silcutil/silcsockconn.h
@@
-153,12
+153,9
@@
typedef enum {
* Reference counter. When allocated it is set to one (1) and it won't
* be freed until it hits zero (0).
*
* Reference counter. When allocated it is set to one (1) and it won't
* be freed until it hits zero (0).
*
- * char *hostname
- * char *ip
- * SilcUInt16 port
+ * SilcSocketConnectionHB hb
*
*
- * Resolved hostname, IP address and port of the connection who owns
- * this object.
+ * The heartbeat context. If NULL, heartbeat is not performed.
*
* SilcBuffer inbuf
* SilcBuffer outbuf
*
* SilcBuffer inbuf
* SilcBuffer outbuf
@@
-168,9
+165,12
@@
typedef enum {
* inbuf buffer and outgoing data after encryption is put to the outbuf
* buffer.
*
* inbuf buffer and outgoing data after encryption is put to the outbuf
* buffer.
*
- * SilcSocketConnectionHB hb
+ * char *hostname
+ * char *ip
+ * SilcUInt16 port
*
*
- * The heartbeat context. If NULL, heartbeat is not performed.
+ * Resolved hostname, IP address and port of the connection who owns
+ * this object.
*
***/
struct SilcSocketConnectionStruct {
*
***/
struct SilcSocketConnectionStruct {
@@
-179,21
+179,25
@@
struct SilcSocketConnectionStruct {
void *user_data;
SilcProtocol protocol;
SilcUInt32 flags;
void *user_data;
SilcProtocol protocol;
SilcUInt32 flags;
- SilcUInt8 sock_error;
int users;
int users;
- char *hostname;
- char *ip;
- SilcUInt16 port;
+ SilcSocketConnectionHB hb;
SilcBuffer inbuf;
SilcBuffer outbuf;
SilcBuffer inbuf;
SilcBuffer outbuf;
- SilcSocketConnectionHB hb;
+ char *hostname;
+ char *ip;
+ SilcUInt16 port;
+ SilcUInt8 sock_error;
+ SilcUInt8 version;
};
/* Macros */
};
/* Macros */
+/* Check for specific protocol version */
+#define SILC_PROTOCOL_VERSION(s, maj, min) (s->version == maj##min)
+
/* Amount of bytes to be read from the socket connection at once. */
#define SILC_SOCKET_READ_SIZE 16384
/* Amount of bytes to be read from the socket connection at once. */
#define SILC_SOCKET_READ_SIZE 16384