diff options
author | Tyler Murphy <tylerm@tylerm.dev> | 2023-04-17 22:49:49 -0400 |
---|---|---|
committer | Tyler Murphy <tylerm@tylerm.dev> | 2023-04-17 22:49:49 -0400 |
commit | 7d650d5d9bcba940ae312657d51e366e7401fd6b (patch) | |
tree | d7283c146aaa625920cf85582a2e4099df86759d /src/packet/question.h | |
download | wig-7d650d5d9bcba940ae312657d51e366e7401fd6b.tar.gz wig-7d650d5d9bcba940ae312657d51e366e7401fd6b.tar.bz2 wig-7d650d5d9bcba940ae312657d51e366e7401fd6b.zip |
Diffstat (limited to 'src/packet/question.h')
-rw-r--r-- | src/packet/question.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/packet/question.h b/src/packet/question.h new file mode 100644 index 0000000..9f5dde7 --- /dev/null +++ b/src/packet/question.h @@ -0,0 +1,16 @@ +#pragma once + +#include "buffer.h" +#include "record.h" + +typedef struct { + uint8_t* domain; + RecordType qtype; + uint16_t cls; +} Question; + +void create_question(const char* domain, RecordType qtype, Question* question); +bool read_question(PacketBuffer* buffer, Question* question); +void write_question(PacketBuffer* buffer, Question* question); +void free_question(Question* question); +void print_question(Question* question); |