|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
#include "netdev.h"#include "init/init.h"#include <hash.h>#include "libk/serial.h"#include <str.h>#include "memory/slab.h"#include <init/loader.h>Go to the source code of this file.
Data Structures | |
| struct | netdev_list |
Macros | |
| #define | NETDEV_HASHMAP_MAX_ENTRY 512 |
Functions | |
| static void | bind_nic (netdev_t *netdev, struct ioforge_nic_service *nic) |
| INIT (Netdev) | |
| int | create_netdev (char *name, netdev_type_t type) |
| netdev_t * | lookup_netdev (char *name) |
| uint16_t | get_next_ip_id (netdev_t *dev) |
Variables | |
| static struct slab_cache * | netdev_cache = 0 |
| static struct netdev_list | netdev_lists [512] |
| static struct netdev_ops * | ethernet_ops = 0 |
| #define NETDEV_HASHMAP_MAX_ENTRY 512 |
Definition at line 9 of file netdev.c.
Referenced by create_netdev(), and lookup_netdev().
|
static |
Definition at line 94 of file netdev.c.
References ioforge_nic_operation::get_mac_address, LOG2_INFO, netdev::mac, netdev::nic, and ioforge_nic_service::ops.
Referenced by INIT().
| int create_netdev | ( | char * | name, |
| netdev_type_t | type ) |
Definition at line 30 of file netdev.c.
References bucket, ethernet_ops, hash, netdev::hash, netdev::is_up, memcopy(), netdev::mtu, name, netdev::name, netdev_cache, NETDEV_HASHMAP_MAX_ENTRY, netdev_lists, NETDEV_TYPE_ETHERNET, netdev::next, netdev::ops, strlen(), netdev::type, type, and vxSlabAlloc().
Definition at line 100 of file netdev.c.
References netdev::ip_id_counter.
Referenced by ipv4_send().
| INIT | ( | Netdev | ) |
Definition at line 22 of file netdev.c.
References bind_nic(), ethernet_ops, kalloc(), netdev_cache, and vxCreateSlabCache().
| netdev_t * lookup_netdev | ( | char * | name | ) |
Definition at line 70 of file netdev.c.
References bucket, hash, LOG2_DEBUG, name, NETDEV_HASHMAP_MAX_ENTRY, and netdev_lists.
Referenced by socket_set_sockopt().
|
static |
Definition at line 18 of file netdev.c.
Referenced by create_netdev(), and INIT().
|
static |
Definition at line 11 of file netdev.c.
Referenced by create_netdev(), and INIT().
|
static |
Definition at line 16 of file netdev.c.
Referenced by create_netdev(), and lookup_netdev().