unitmsgparse.c File Reference

Calls msg parse unit tests. More...

#include "config.h"
#include "util/log.h"
#include "testcode/unitmain.h"
#include "util/data/msgparse.h"
#include "util/data/msgreply.h"
#include "util/data/msgencode.h"
#include "util/alloc.h"
#include "util/regional.h"
#include "util/net_help.h"
#include "testcode/readhex.h"

Functions

static int match_list (ldns_rr_list *q, ldns_rr_list *p)
 match two rr lists
static int match_edns (ldns_pkt *q, ldns_pkt *p)
 match edns sections
static int cmp_bool (int x, int y)
 compare two booleans
static int match_all (ldns_pkt *q, ldns_pkt *p)
 match all of the packet
static int test_buffers (ldns_buffer *pkt, ldns_buffer *out)
 see if buffers contain the same packet
static void checkformerr (ldns_buffer *pkt)
 check if unbound formerr equals ldns formerr
static void perf_encode (struct query_info *qi, struct reply_info *rep, uint16_t id, uint16_t flags, ldns_buffer *out, uint32_t timenow, struct edns_data *edns)
 performance test message encoding
static void perftestpkt (ldns_buffer *pkt, struct alloc_cache *alloc, ldns_buffer *out, const char *hex)
 perf test a packet
static void testpkt (ldns_buffer *pkt, struct alloc_cache *alloc, ldns_buffer *out, const char *hex)
 test a packet
static void simpletest (ldns_buffer *pkt, struct alloc_cache *alloc, ldns_buffer *out)
 simple test of parsing
static void testfromfile (ldns_buffer *pkt, struct alloc_cache *alloc, ldns_buffer *out, const char *fname)
 simple test of parsing, pcat file
static void testfromdrillfile (ldns_buffer *pkt, struct alloc_cache *alloc, ldns_buffer *out, const char *fname)
 simple test of parsing, drill file
void msgparse_test ()
 unit test for msgreply and msgparse

Variables

static int vbmp = 0
 verbose message parse unit test
static int matches_nolocation = 0
 if matching within a section should disregard the order of RRs.

Detailed Description

Calls msg parse unit tests.

Exits with code 1 on a failure.


Variable Documentation

int matches_nolocation = 0 [static]

if matching within a section should disregard the order of RRs.

Referenced by match_list(), and msgparse_test().

Generated on Thu Apr 22 00:30:18 2010 for unbound by  doxygen 1.6.3