blob: 92ff9f2a1bb603a981c40d0b974a1a703dcc6e51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#ifndef FOOLOS_NETDEV_H
#define FOOLOS_NETDEV_H
#include "eth.h"
struct netdev
{
unsigned char hwaddr[6]; // device hardware address
uint32_t ip; // device ip
int (*transmit)(const void *data, uint16_t p_len);
};
void net_incoming(struct netdev *netdev, struct eth_hdr *hdr);
void netdev_transmit(struct netdev *dev, struct eth_hdr *hdr, uint16_t ethertype, int len, unsigned char *dst);
#endif
|