18#ifndef __VSF_NETDRV_H__
19#define __VSF_NETDRV_H__
25#if VSF_USE_TCPIP == ENABLED
29#if defined(__VSF_NETDRV_CLASS_IMPLEMENT)
30# define __VSF_CLASS_IMPLEMENT__
31#elif defined(__VSF_NETDRV_CLASS_INHERIT_NETLINK__) || defined(__VSF_NETDRV_CLASS_INHERIT_NETIF__)
32# define __VSF_CLASS_INHERIT__
54#if defined(__VSF_NETDRV_CLASS_IMPLEMENT) || defined(__VSF_NETDRV_CLASS_INHERIT_NETLINK__)
69#if defined(__VSF_NETDRV_CLASS_IMPLEMENT) || defined(__VSF_NETDRV_CLASS_INHERIT_NETIF__)
75 void (*on_disconnect)(
void *netif);
76 void (*on_netbuf_outputted)(
void *netif,
void *netbuf);
77 void (*on_netlink_outputted)(
void *netif,
vsf_err_t err);
81 void (*free_buf)(
void *netbuf);
82 void * (*read_buf)(
void *netbuf,
vsf_mem_t *mem);
86 void * (*thread)(void (*entry)(
void *param),
void *param);
152#if defined(__VSF_NETDRV_CLASS_IMPLEMENT) || defined(__VSF_NETDRV_CLASS_INHERIT_NETLINK__)
165#if defined(__VSF_NETDRV_CLASS_IMPLEMENT) || defined(__VSF_NETDRV_CLASS_INHERIT_NETIF__)
181#if VSF_NETDRV_USE_WPCAP == ENABLED
185#undef __VSF_NETDRV_CLASS_IMPLEMENT
186#undef __VSF_NETDRV_CLASS_INHERIT_NETLINK__
187#undef __VSF_NETDRV_CLASS_INHERIT_NETIF__
vsf_err_t
Definition __type.h:42
Definition vsf_netdrv.h:68
Definition vsf_netdrv.h:99
Definition vsf_netdrv.h:53
unsigned short uint16_t
Definition lvgl.h:41
unsigned int uint32_t
Definition lvgl.h:43
signed int int32_t
Definition lvgl.h:44
unsigned char uint8_t
Definition lvgl.h:40
#define vsf_dcl_class
Definition ooc_class.h:46
#define vsf_class(__name)
Definition ooc_class.h:48
unsigned int uint_fast32_t
Definition stdint.h:27
int int_fast32_t
Definition stdint.h:26
unsigned long long uint64_t
Definition stdint.h:11
Definition vsf_netdrv.h:90
uint8_t addr_buf[16]
Definition vsf_netdrv.h:95
uint32_t size
Definition vsf_netdrv.h:91
uint32_t addr32
Definition vsf_netdrv.h:93
uint64_t addr64
Definition vsf_netdrv.h:94
Definition vsf_list.h:883
Definition vsf_utilities.h:51
uint32_t size
Definition vsf_memfs.h:50
vsf_err_t vk_netdrv_fini(vk_netdrv_t *netdrv)
Definition vsf_netdrv.c:119
uint8_t * vk_netdrv_header(vk_netdrv_t *netdrv, void *netbuf, int32_t len)
Definition vsf_netdrv.c:130
void * vk_netdrv_thread(vk_netdrv_t *netdrv, void(*entry)(void *), void *param)
Definition vsf_netdrv.c:107
void vk_netdrv_on_inputted(vk_netdrv_t *netdrv, void *netbuf, int_fast32_t size)
Definition vsf_netdrv.c:81
void vk_netdrv_on_netbuf_outputted(vk_netdrv_t *netdrv, void *netbuf)
Definition vsf_netdrv.c:55
void * vk_netdrv_alloc_buf(vk_netdrv_t *netdrv)
Definition vsf_netdrv.c:92
vsf_err_t vk_netdrv_init(vk_netdrv_t *netdrv)
Definition vsf_netdrv.c:113
void vk_netdrv_on_netlink_outputted(vk_netdrv_t *netdrv, vsf_err_t err)
Definition vsf_netdrv.c:67
vsf_err_t vk_netdrv_output(vk_netdrv_t *netdrv, void *slot, void *netbuf)
Definition vsf_netdrv.c:195
#define __VSF_NETDRV_CLASS_IMPLEMENT
Definition vsf_netdrv.c:24
void * vk_netdrv_can_output(vk_netdrv_t *netdrv)
Definition vsf_netdrv.c:190
bool vk_netdrv_is_connected(vk_netdrv_t *netdrv)
Definition vsf_netdrv.c:184
void vk_netdrv_on_outputted(vk_netdrv_t *netdrv, void *netbuf, vsf_err_t err)
Definition vsf_netdrv.c:74
void * vk_netdrv_read_buf(vk_netdrv_t *netdrv, void *netbuf, vsf_mem_t *mem)
Definition vsf_netdrv.c:136
vk_netdrv_feature_t
Definition vsf_netdrv.h:49
@ VSF_NETDRV_FEATURE_THREAD
Definition vsf_netdrv.h:50
void vsf_pnp_on_netdrv_disconnect(vk_netdrv_t *netdrv)
Definition vsf_netdrv.c:53
void vsf_pnp_on_netdrv_new(vk_netdrv_t *netdrv)
Definition vsf_netdrv.c:41
void * vk_netdrv_get_netif(vk_netdrv_t *netdrv)
Definition vsf_netdrv.c:125
vsf_err_t vk_netdrv_connect(vk_netdrv_t *netdrv)
Definition vsf_netdrv.c:149
void vk_netdrv_prepare(vk_netdrv_t *netdrv)
Definition vsf_netdrv.c:142
void vk_netdrv_set_netlink_op(vk_netdrv_t *netdrv, const vk_netlink_op_t *netlink_op, void *param)
Definition vsf_netdrv.c:178
void vk_netdrv_disconnect(vk_netdrv_t *netdrv)
Definition vsf_netdrv.c:166
vk_netdrv_feature_t vk_netdrv_feature(vk_netdrv_t *netdrv)
Definition vsf_netdrv.c:101
void vsf_pnp_on_netdrv_connected(vk_netdrv_t *netdrv)
Definition vsf_netdrv.c:50
void vsf_pnp_on_netdrv_del(vk_netdrv_t *netdrv)
Definition vsf_netdrv.c:44
void vsf_pnp_on_netdrv_prepare(vk_netdrv_t *netdrv)
Definition vsf_netdrv.c:47
#define __VSF_NETDRV_CLASS_INHERIT_NETLINK__
Definition vsf_netdrv_wpcap.c:24