Changeset 950c08
- Timestamp:
- 06/12/09 07:44:34 (3 years ago)
- Branches:
- master
- Children:
- c92ed9
- Parents:
- 3eef14
- git-author:
- Erik Ekman <yarrick@…> (06/12/09 07:44:34)
- git-committer:
- Erik Ekman <erik@…> (02/04/12 20:34:02)
- Files:
-
- 3 edited
-
doc/proto_00000501.txt (modified) (1 diff)
-
src/iodine.c (modified) (2 diffs)
-
src/iodined.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
doc/proto_00000501.txt
r27fc03 r950c08 55 55 5 bits coded as Base32 char, with value 5 or 6, representing number of raw 56 56 bits per encoded byte 57 CMC 57 58 Server sends: 58 59 Name of codec if accepted. After this all upstream data packets must 59 60 be encoded with the new codec. 60 61 BADCODEC if not accepted. Client must then revert to Base32 62 BADLEN if length of query is too short 61 63 62 64 Probe downstream fragment size: -
src/iodine.c
r3eef14 r950c08 477 477 send_ip_request(int fd, int userid) 478 478 { 479 char buf[512] = "I_ .";479 char buf[512] = "I____."; 480 480 buf[1] = b32_5to8(userid); 481 481 482 buf[2] = b32_5to8((rand_seed >> 10) & 0x1f); 483 buf[3] = b32_5to8((rand_seed >> 5) & 0x1f); 484 buf[4] = b32_5to8((rand_seed ) & 0x1f); 485 rand_seed++; 486 482 487 strncat(buf, topdomain, 512 - strlen(buf)); 483 488 send_query(fd, buf); … … 499 504 send_codec_switch(int fd, int userid, int bits) 500 505 { 501 char buf[512] = "S__ .";506 char buf[512] = "S_____."; 502 507 buf[1] = b32_5to8(userid); 503 508 buf[2] = b32_5to8(bits); 504 509 510 buf[3] = b32_5to8((rand_seed >> 10) & 0x1f); 511 buf[4] = b32_5to8((rand_seed >> 5) & 0x1f); 512 buf[5] = b32_5to8((rand_seed ) & 0x1f); 513 rand_seed++; 514 505 515 strncat(buf, topdomain, 512 - strlen(buf)); 506 516 send_query(fd, buf); -
src/iodined.c
r27fc03 r950c08 426 426 int codec; 427 427 struct encoder *enc; 428 if (domain_len != 4) { /* len = 4, example: "S15." */428 if (domain_len < 3) { /* len at least 3, example: "S15" */ 429 429 write_dns(dns_fd, q, "BADLEN", 6); 430 430 return;
Note: See TracChangeset
for help on using the changeset viewer.
