1 #ifndef __LWIP_PROTO_H__
2 #define __LWIP_PROTO_H__
6 #include <minix/endpoint.h>
7 #include <minix/syslib.h>
8 #include <minix/safecopies.h>
9 #include <minix/const.h>
12 #include <lwip/netif.h>
15 #define debug_print(str, ...) printf("LWIP %s:%d : " str "\n", \
16 __func__, __LINE__, ##__VA_ARGS__)
18 #define debug_print(...)
22 void nic_assign_driver(const char * dev_type
,
24 const char * driver_name
,
27 void nic_init_all(void);
28 void driver_request(message
* m
);
29 void driver_up(const char * label
, endpoint_t ep
);
30 /* opens a raw NIC socket */
31 void nic_open(message
*m
);
32 void nic_default_ioctl(message
*m
);
35 void inet_read_conf(void);
38 err_t
ethernetif_init(struct netif
*netif
);
40 static inline int copy_from_user(endpoint_t proc
,
46 return sys_safecopyfrom(proc
, gid
, offset
, (vir_bytes
)dst_ptr
, size
);
49 static inline int copy_to_user(endpoint_t proc
,
55 return sys_safecopyto(proc
, gid
, offset
, (vir_bytes
)src_ptr
, size
);
58 #endif /* __LWIP_PROTO_H__ */