Logo Search packages:      
Sourcecode: maradns version File versions

cst.c

/* Placed in the public domain 2002 by Sam Trenholme */

/* This file attempts to compress a DNS packet which the compressor
   has a problem with; the offending packet in question is one that
   comes from news.com.com
 */

#include "../libs/MaraHash.h"
#include "../MaraDns.h"
#include "../dns/functions_dns.h"
#include "../parse/functions_parse.h"

main() {
    js_string *to_compress;
    js_string *compressed;

    to_compress = js_create(1024,1); 
    compressed  = js_create(1024,1);

    js_str2js(to_compress,
    "\321\366\200\000\000\001\000\002\000\000\000\000\004news\003com\003com\000\000\001\000\001\004news\003com\003com\000\000\005\000\001\000\000\001,\000\015\003www\003com\003com\000\003www\003com\003com\000\000\001\000\001\000\000\001,\000\004@|\355\207"
    ,94,1);

    printf("Compression result: %d\n",compress_data(to_compress,compressed));
    }


Generated by  Doxygen 1.6.0   Back to index