summaryrefslogtreecommitdiffstats
path: root/PICA_proto.h
diff options
context:
space:
mode:
Diffstat (limited to 'PICA_proto.h')
-rw-r--r--[-rwxr-xr-x]PICA_proto.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/PICA_proto.h b/PICA_proto.h
index cb20db5..46ca178 100755..100644
--- a/PICA_proto.h
+++ b/PICA_proto.h
@@ -5,8 +5,12 @@
#define PICA_PROTO_VER_HIGH 0
-#define PICA_PROTO_VER_LOW 4
+#define PICA_PROTO_VER_LOW 5
+#define PICA_C2CPROTO_VER_HIGH 0
+#define PICA_C2CPROTO_VER_LOW 1
+
+#define PICA_PROTO_CLIENT_VER_STRING PICA_STRINGIFY2(PICA_C2CPROTO_VER_HIGH, PICA_C2CPROTO_VER_LOW)
#define PICA_PROTO_VER_STRING PICA_STRINGIFY2(PICA_PROTO_VER_HIGH, PICA_PROTO_VER_LOW)
#define PICA_STRINGIFY2(H, L) PICA_STRINGIFY(H, L)
#define PICA_STRINGIFY(H, L) #H#L
@@ -26,6 +30,15 @@
#define PICA_PROTO_CONNID 0x20
+#define PICA_PROTO_C2CCONNREQ 0xCC
+
+#define PICA_PROTO_DIRECTC2C_ADDRLIST 0x0B
+#define PICA_PROTO_DIRECTC2C_IPV4 0xA0
+#define PICA_PROTO_DIRECTC2C_IPV6 0xA1
+#define PICA_PROTO_DIRECTC2C_DNS 0xA2
+#define PICA_PROTO_DIRECTC2C_FAILED 0x0C
+#define PICA_PROTO_DIRECTC2C_SWITCH 0x0D
+
#define PICA_PROTO_MSGUTF8 0x30
#define PICA_PROTO_MSGOK 0x40
#define PICA_PROTO_SENDFILEREQUEST 0x50
@@ -76,6 +89,12 @@
#define PICA_PROTO_CONNID_SIZE 58
+#define PICA_PROTO_C2CCONNREQ_SIZE 4
+#define PICA_PROTO_DIRECTC2C_ADDRLIST_ITEM_IPV4_SIZE 7
+#define PICA_PROTO_DIRECTC2C_ADDRLIST_ITEM_IPV6_SIZE 19
+#define PICA_PROTO_DIRECTC2C_FAILED_SIZE 4
+#define PICA_PROTO_DIRECTC2C_SWITCH_SIZE 4
+
#define PICA_PROTO_MSGOK_SIZE 4
#define PICA_PROTO_ACCEPTEDFILE_SIZE 4
@@ -109,8 +128,8 @@
struct PICA_proto_msg
{
-unsigned char head[2];
-unsigned char tail[0];
+ unsigned char head[2];
+ unsigned char tail[0];
};