func: int main(int argc, char **argv) HEADER * hp ; u_char * msg , * cp , * eom ; int msglen ; msg = ( u_char * ) malloc ( 10000 * sizeof ( u_char ) ); msglen = create_msg ( msg , 10000 ); int create_msg(u_char *msg, int len) FILE * f ; int i = 0 ; int c ; if ( ( f = fopen ( "iquery-file" , "r" ) ) == NULL )  return - 1 ; while ( ( ( c = fgetc ( f ) ) != EOF ) && ( i < len ) )  i ++; return i ; hp = ( HEADER * ) msg; cp = msg + sizeof ( HEADER ); eom = msg + msglen; switch ( hp -> opcode )  req_iquery ( hp , & cp , eom , & msglen , msg ); static enum req_iquery(HEADER *hp, u_char **cpp, u_char *eom, int *buflenp, u_char *msg) char anbuf [ 2 ] , * data , * fname ; if ( ( n = dn_skipname ( * cpp , eom ) ) < 0 )  * cpp += n; * cpp += INT32SZ; * cpp += dlen; if ( * cpp != eom )  switch ( type )  if ( something == 0 )  fname = ( char * ) msg + HFIXEDSZ; alen = ( char * ) * cpp - fname; if ( ( size_t ) alen > sizeof anbuf )  memcpy ( anbuf , fname , alen ); data = anbuf + alen - dlen; 