|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
#include "netbuff.h"#include "init/init.h"#include "ioforge/ioforge.h"#include "memory/slab.h"#include <str.h>Go to the source code of this file.
Macros | |
| #define | NETBUFF_MAX_TEMP 32 |
Functions | |
| INIT (Netbuff) | |
| struct netbuff * | create_netbuff () |
| void * | netbuff_put (struct netbuff *nb, size_t len) |
| void * | netbuff_push (struct netbuff *nb, size_t len) |
| void | free_netbuff (struct netbuff *netbuff) |
Variables | |
| static struct slab_cache * | netbuff_cache = 0 |
| static struct netbuff * | netbuff_temp [32] = {0} |
| static size_t | netbuff_temp_count = 0 |
| #define NETBUFF_MAX_TEMP 32 |
Definition at line 7 of file netbuff.c.
Referenced by free_netbuff().
| struct netbuff * create_netbuff | ( | ) |
Definition at line 19 of file netbuff.c.
References netbuff::data, netbuff::end, netbuff::head, ioforge_dma_alloc(), netbuff::length, memset(), netbuff_cache, NETBUFF_DATA_SIZE, NETBUFF_MAX_HEADROOM, netbuff_temp, netbuff_temp_count, netbuff::paddr, netbuff::tail, and vxSlabAlloc().
Referenced by arp_reply(), handle_icmp(), ipv4_send(), send_command(), and send_tcp_data().
| void free_netbuff | ( | struct netbuff * | netbuff | ) |
Definition at line 56 of file netbuff.c.
References netbuff::head, ioforge_dma_free(), netbuff_cache, NETBUFF_DATA_SIZE, NETBUFF_MAX_TEMP, netbuff_temp, netbuff_temp_count, netbuff::paddr, and slab_free().
Referenced by arp_reply(), handle_icmp(), ipv4_send(), send_command(), and send_tcp_data().
| INIT | ( | Netbuff | ) |
Definition at line 14 of file netbuff.c.
References netbuff_cache, and vxCreateSlabCache().
Definition at line 50 of file netbuff.c.
References netbuff::data, len, and netbuff::length.
Referenced by ethernet_send_frame(), ipv4_send(), send_command(), and send_tcp_data().
Definition at line 42 of file netbuff.c.
References len, netbuff::length, and netbuff::tail.
Referenced by arp_reply(), ethernet_send_frame(), handle_icmp(), ipv4_send(), and send_tcp_data().
|
static |
Definition at line 9 of file netbuff.c.
Referenced by create_netbuff(), free_netbuff(), and INIT().
|
static |
Definition at line 11 of file netbuff.c.
Referenced by create_netbuff(), and free_netbuff().
|
static |
Definition at line 12 of file netbuff.c.
Referenced by create_netbuff(), and free_netbuff().