summaryrefslogtreecommitdiff
path: root/contrib/marc/marc.c
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.ano>2016-06-01 22:24:29 +0000
committerepoch <epoch@hacking.allowed.ano>2016-06-01 22:24:30 +0000
commit2cce5212e49f7da676670446db8aa4fc176d7f1d (patch)
tree2fb9456f33b8135ac815bedf43e4fbb812b13366 /contrib/marc/marc.c
parent8bfb68ae91b7004d7788e51d16583e3f71053da9 (diff)
downloadresdb-2cce5212e49f7da676670446db8aa4fc176d7f1d.tar.gz
resdb-2cce5212e49f7da676670446db8aa4fc176d7f1d.zip
added a chan domain. changed some marc stuff. anocheck script for watching for ASN downages.
Diffstat (limited to 'contrib/marc/marc.c')
-rw-r--r--contrib/marc/marc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/marc/marc.c b/contrib/marc/marc.c
index a83eb9b..d46b576 100644
--- a/contrib/marc/marc.c
+++ b/contrib/marc/marc.c
@@ -60,8 +60,14 @@ int marc_decode(unsigned char *data,int from_index,int length) {
printf("list:\n");
indent++;
while(from_index < length) {
+
+// old code. testing 16 bit lengths.
cur_len=data[from_index+3]+(data[from_index+2]<<1)+(data[from_index+1]<<2)+(data[from_index+0]<<3);
from_index+=4;
+
+// cur_len=data[from_index+1]+(data[from_index+0]<<1);
+// from_index+=2;
+
marc_decode(data,from_index,cur_len);
from_index+=cur_len;
}
@@ -153,6 +159,8 @@ void update_message_decode(unsigned char *data,int from_index,int length) {
for(i=0;i<num_extensions;i++) {
ext_type=data[from_index];
from_index++;
+// is this right?
+// ext_data_len=(data[from_index+1]) + (data[from_index+0]<<8);
ext_data_len=(data[from_index]<<8) + (data[from_index+1]);
from_index+=2;
from_index+=ext_data_len;//skip this for now... fuck it.