Add basic packet buffer definition

This commit is contained in:
Piper Pentagram 2025-05-13 13:18:22 -07:00
parent 0baae86beb
commit fb762b2aef
3 changed files with 25 additions and 2 deletions

View file

@ -1,8 +1,11 @@
#include "pupdns.h"
#include <stdio.h>
#include "packet_buffer.h"
int main()
{
printf("Hello, world!\n");
struct PacketBuffer *buf = new_packet_buffer();
printf("size: %ld\n", sizeof(buf->buf));
return 0;
}

9
src/packet_buffer.c Normal file
View file

@ -0,0 +1,9 @@
#include "packet_buffer.h"
#include <stdlib.h>
struct PacketBuffer *new_packet_buffer()
{
struct PacketBuffer *buf;
buf = malloc(sizeof(struct PacketBuffer));
return buf;
}