read the packets into packet structs
This commit is contained in:
parent
f1e00117d9
commit
68400a25b7
5 changed files with 53 additions and 4 deletions
|
|
@ -1,13 +1,16 @@
|
|||
#pragma once
|
||||
#include <stddef.h>
|
||||
|
||||
#define PACKET_BUFFER_SIZE 512
|
||||
#define PB_SIZE 512
|
||||
#define PB_OUT_OF_BOUNDS 9999;
|
||||
|
||||
struct DNSPacketBuffer {
|
||||
char buf[PACKET_BUFFER_SIZE];
|
||||
char buf[PB_SIZE];
|
||||
size_t pos;
|
||||
};
|
||||
|
||||
struct DNSPacketBuffer *new_dns_packet_buffer();
|
||||
|
||||
struct DNSPacketHeader *dns_header(struct DNSPacketBuffer);
|
||||
|
||||
char pb_read_byte(struct DNSPacketBuffer *);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue