1 /* $Id: dktrace.h,v 1.3 2005/06/27 18:47:57 ted46045 Exp $ */ 2 3 #ifndef _DK_TRACE_H 4 #define _DK_TRACE_H 5 6 typedef struct { 7 int ccounts_h[256]; 8 int ccounts_H[256]; 9 int ccounts_b[256]; 10 int ccounts_B[256]; 11 } DK_TRACE; 12 13 typedef enum { DKT_RAW_HEADER='h', DKT_CANON_HEADER='H', 14 DKT_RAW_BODY='b', DKT_CANON_BODY='B' } DK_TRACE_TYPE; 15 16 #define dkt_init(s) memset(s,0,sizeof(DK_TRACE)) 17 18 //extern void dkt_init(DK_TRACE *dkp); 19 extern void dkt_add(DK_TRACE *dkp, DK_TRACE_TYPE type, const unsigned char *data, int dataLength); 20 extern int dkt_diff(DK_TRACE *dka, DK_TRACE *dkb, DK_TRACE_TYPE type, DK_TRACE *table); 21 extern void dkt_quickadd(DK_TRACE *dkp, DK_TRACE_TYPE type, int index, int count); 22 extern int dkt_getcount(DK_TRACE *dkp, DK_TRACE_TYPE type, int index, int count); 23 extern int dkt_generate(DK_TRACE *dkp, DK_TRACE_TYPE type, char *buffer, int maxBufferSize); 24 extern int dkt_hdrtotrace(char *ptr, DK_TRACE *store); 25 26 #endif 27