Mercurial > hg > anonet-resdb
comparison contrib/marc/marc.c @ 1186:98707534e274 draft
added a chan domain. changed some marc stuff. anocheck script for watching for ASN downages.
author | epoch <epoch@hacking.allowed.ano> |
---|---|
date | Wed, 01 Jun 2016 22:24:29 +0000 |
parents | 97ed67f3a20d |
children |
comparison
equal
deleted
inserted
replaced
1185:97ed67f3a20d | 1186:98707534e274 |
---|---|
58 break; | 58 break; |
59 case M_TYPE_LIST: | 59 case M_TYPE_LIST: |
60 printf("list:\n"); | 60 printf("list:\n"); |
61 indent++; | 61 indent++; |
62 while(from_index < length) { | 62 while(from_index < length) { |
63 | |
64 // old code. testing 16 bit lengths. | |
63 cur_len=data[from_index+3]+(data[from_index+2]<<1)+(data[from_index+1]<<2)+(data[from_index+0]<<3); | 65 cur_len=data[from_index+3]+(data[from_index+2]<<1)+(data[from_index+1]<<2)+(data[from_index+0]<<3); |
64 from_index+=4; | 66 from_index+=4; |
67 | |
68 // cur_len=data[from_index+1]+(data[from_index+0]<<1); | |
69 // from_index+=2; | |
70 | |
65 marc_decode(data,from_index,cur_len); | 71 marc_decode(data,from_index,cur_len); |
66 from_index+=cur_len; | 72 from_index+=cur_len; |
67 } | 73 } |
68 indent--; | 74 indent--; |
69 break; | 75 break; |
151 printf("num of extensions: %d\n",num_extensions); | 157 printf("num of extensions: %d\n",num_extensions); |
152 from_index++; | 158 from_index++; |
153 for(i=0;i<num_extensions;i++) { | 159 for(i=0;i<num_extensions;i++) { |
154 ext_type=data[from_index]; | 160 ext_type=data[from_index]; |
155 from_index++; | 161 from_index++; |
162 // is this right? | |
163 // ext_data_len=(data[from_index+1]) + (data[from_index+0]<<8); | |
156 ext_data_len=(data[from_index]<<8) + (data[from_index+1]); | 164 ext_data_len=(data[from_index]<<8) + (data[from_index+1]); |
157 from_index+=2; | 165 from_index+=2; |
158 from_index+=ext_data_len;//skip this for now... fuck it. | 166 from_index+=ext_data_len;//skip this for now... fuck it. |
159 printf(" ext %d type: %d len: %d\n",i,ext_type,ext_data_len); | 167 printf(" ext %d type: %d len: %d\n",i,ext_type,ext_data_len); |
160 if(ext_type != 1 && ext_type != 4 && ext_type != 5) {//let's pretend 5 is transfer chain? | 168 if(ext_type != 1 && ext_type != 4 && ext_type != 5) {//let's pretend 5 is transfer chain? |