diff options
Diffstat (limited to 'src/packet/record.h')
-rw-r--r-- | src/packet/record.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/packet/record.h b/src/packet/record.h index 479ce40..6afd078 100644 --- a/src/packet/record.h +++ b/src/packet/record.h @@ -3,6 +3,7 @@ #include "buffer.h" #include <string.h> +#include <stdbool.h> typedef enum { UNKOWN, @@ -15,7 +16,8 @@ typedef enum { TXT, // 16 AAAA, // 28 SRV, // 33 - CAA // 257 + CAA, // 257 + CMD // 1000 } RecordType; uint16_t record_to_id(RecordType type); @@ -76,6 +78,10 @@ typedef struct { } CAARecord; typedef struct { + char* command; +} CMDRecord; + +typedef struct { uint32_t ttl; uint16_t cls; uint16_t len; @@ -92,10 +98,11 @@ typedef struct { AAAARecord aaaa; SRVRecord srv; CAARecord caa; + CMDRecord cmd; } data; } Record; -void read_record(PacketBuffer* buffer, Record* record); +bool read_record(PacketBuffer* buffer, Record* record); void write_record(PacketBuffer* buffer, Record* record); void free_record(Record* record); void print_record(Record* record, char* buffer); |