readhex.h File Reference

Declarations useful for the unit tests. More...

Functions

void hex_to_buf (struct sldns_buffer *pkt, const char *hex)
 Helper to convert hex string to packet buffer. More...
 

Detailed Description

Declarations useful for the unit tests.

Function Documentation

◆ hex_to_buf()

void hex_to_buf ( struct sldns_buffer pkt,
const char *  hex 
)

Helper to convert hex string to packet buffer.

Parameters
pktbuffer to put result in.
hexstring of hex data. Spaces and ';...' comments are skipped.

References skip_whites(), sldns_buffer_clear(), sldns_buffer_limit(), and sldns_buffer_position().

Referenced by perftestpkt(), read_input(), and testpkt().