Added missing header

This commit is contained in:
Tristan B. Velloza Kildaire 2021-12-29 15:05:08 +02:00
parent d29bc74cec
commit 0e8d983023
2 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,7 @@
#include<stdio.h>
#include<stdlib.h>
#include "types.h"
#include "libtun.h"
/**
* *Prototyopes
@ -30,6 +31,9 @@ int main()
* Spawns a new TUN device wrapped
* in an Adapter struct, on failure
* NULL is returned
*
* TODO: Add ifType argument,
* `TAP` or `TUN`?
*/
Adapter* createDevice(char* name)
{
@ -43,6 +47,8 @@ Adapter* createDevice(char* name)
/* TODO: Fetch final name */
adapter->interfaceName = "poes";
}
else
{

4
libtun.h Normal file
View File

@ -0,0 +1,4 @@
int createTun(char* interfaceName, int iffFlags);
int destroyTun(int fd);
int tunWrite(int fd, char* data, int length);
int tunRead(int fd, char* data, int amount);