tools/llvm: Do not build with symbols
[minix3.git] / minix / net / lwip / proto.h
blobce967a02f4d391cf428cb8e5a18675033afe540b
1 #ifndef __LWIP_PROTO_H__
2 #define __LWIP_PROTO_H__
4 #include <errno.h>
5 #include <minix/ipc.h>
6 #include <minix/endpoint.h>
7 #include <minix/syslib.h>
8 #include <minix/safecopies.h>
9 #include <minix/const.h>
11 #include <lwip/err.h>
12 #include <lwip/netif.h>
14 #if 0
15 #define debug_print(str, ...) printf("LWIP %s:%d : " str "\n", \
16 __func__, __LINE__, ##__VA_ARGS__)
17 #else
18 #define debug_print(...)
19 #endif
21 /* driver .c */
22 void nic_assign_driver(const char * dev_type,
23 unsigned int dev_num,
24 const char * driver_name,
25 unsigned int instance,
26 int is_default);
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 int nic_open(devminor_t minor);
32 int nic_default_ioctl(struct sock_req *req);
34 /* inet_config.c */
35 void inet_read_conf(void);
37 /* eth.c */
38 err_t ethernetif_init(struct netif *netif);
40 static inline int copy_from_user(endpoint_t proc,
41 void * dst_ptr,
42 size_t size,
43 cp_grant_id_t gid,
44 vir_bytes offset)
46 return sys_safecopyfrom(proc, gid, offset, (vir_bytes)dst_ptr, size);
49 static inline int copy_to_user(endpoint_t proc,
50 void * src_ptr,
51 size_t size,
52 cp_grant_id_t gid,
53 vir_bytes offset)
55 return sys_safecopyto(proc, gid, offset, (vir_bytes)src_ptr, size);
58 #endif /* __LWIP_PROTO_H__ */