diff options
| author | Anton <anton@picapica> | 2017-12-01 21:55:53 +0400 |
|---|---|---|
| committer | Anton <anton@picapica> | 2017-12-01 21:55:53 +0400 |
| commit | ac041927bc0c82e33acaa9e15fd46ecca0b77172 (patch) | |
| tree | 742f1bf43917e79dae43c78684a2a3d055214e76 /PICA_proto.h | |
| parent | 32e742ed040c5a70edb4cbfb947581f1e192d5a6 (diff) | |
| parent | 9c0a5bf2bbd94539427ece7eb1cb8ea82c6c3dec (diff) | |
| download | pica-pica-ac041927bc0c82e33acaa9e15fd46ecca0b77172.tar.gz pica-pica-ac041927bc0c82e33acaa9e15fd46ecca0b77172.zip | |
Merge branch 'direct_c2c_connections'
Diffstat (limited to 'PICA_proto.h')
| -rw-r--r--[-rwxr-xr-x] | PICA_proto.h | 25 |
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]; }; |
