Changeset 950c08


Ignore:
Timestamp:
06/12/09 07:44:34 (3 years ago)
Author:
Erik Ekman <yarrick@…>
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)
Message:

Added CMC to I and S packet types

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • doc/proto_00000501.txt

    r27fc03 r950c08  
    5555        5 bits coded as Base32 char, with value 5 or 6, representing number of raw 
    5656        bits per encoded byte 
     57        CMC 
    5758Server sends: 
    5859        Name of codec if accepted. After this all upstream data packets must  
    5960        be encoded with the new codec. 
    6061        BADCODEC if not accepted. Client must then revert to Base32 
     62        BADLEN if length of query is too short 
    6163 
    6264Probe downstream fragment size: 
  • src/iodine.c

    r3eef14 r950c08  
    477477send_ip_request(int fd, int userid) 
    478478{ 
    479         char buf[512] = "I_."; 
     479        char buf[512] = "I____."; 
    480480        buf[1] = b32_5to8(userid); 
    481481         
     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 
    482487        strncat(buf, topdomain, 512 - strlen(buf)); 
    483488        send_query(fd, buf); 
     
    499504send_codec_switch(int fd, int userid, int bits) 
    500505{ 
    501         char buf[512] = "S__."; 
     506        char buf[512] = "S_____."; 
    502507        buf[1] = b32_5to8(userid); 
    503508        buf[2] = b32_5to8(bits); 
    504509         
     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 
    505515        strncat(buf, topdomain, 512 - strlen(buf)); 
    506516        send_query(fd, buf); 
  • src/iodined.c

    r27fc03 r950c08  
    426426                int codec; 
    427427                struct encoder *enc; 
    428                 if (domain_len != 4) { /* len = 4, example: "S15." */ 
     428                if (domain_len < 3) { /* len at least 3, example: "S15" */ 
    429429                        write_dns(dns_fd, q, "BADLEN", 6); 
    430430                        return; 
Note: See TracChangeset for help on using the changeset viewer.