Rev 3685 | Rev 3886 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3685 | Rev 3846 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | 32 | ||
33 | /** |
33 | /** |
34 | * @file |
34 | * @file |
35 | */ |
35 | */ |
36 | 36 | ||
37 | #ifndef __NET_IP_INTERNALS_H__ |
37 | #ifndef __NET_IP_H__ |
38 | #define __NET_IP_INTERNALS_H__ |
38 | #define __NET_IP_H__ |
39 | 39 | ||
40 | #include <ipc/ipc.h> |
40 | #include <ipc/ipc.h> |
41 | 41 | ||
42 | #include "../netif/netif_device_id_type.h" |
42 | #include "../include/sockaddr.h" |
43 | - | ||
44 | #define IP_MAX_ADDRESS_LENGTH 4 |
- | |
45 | - | ||
46 | typedef int address_t[ IP_MAX_ADDRESS_LENGTH ]; |
- | |
47 | typedef address_t * address_ref; |
43 | #include "../netif/device.h" |
48 | 44 | ||
49 | typedef struct ip_netif ip_netif_t; |
45 | typedef struct ip_netif ip_netif_t; |
50 | typedef ip_netif_t * ip_netif_ref; |
46 | typedef ip_netif_t * ip_netif_ref; |
51 | 47 | ||
- | 48 | typedef struct ip_proto ip_proto_t; |
|
- | 49 | typedef ip_proto_t * ip_proto_ref; |
|
- | 50 | ||
52 | typedef struct ip_globals ip_globals_t; |
51 | typedef struct ip_globals ip_globals_t; |
53 | 52 | ||
54 | DEVICE_MAP_DECLARE( ip_netifs, ip_netif_t ) |
53 | DEVICE_MAP_DECLARE( ip_netifs, ip_netif_t ) |
55 | 54 | ||
- | 55 | INT_MAP_DECLARE( ip_protos, ip_proto_t ) |
|
- | 56 | ||
56 | struct ip_netif{ |
57 | struct ip_netif{ |
57 | netif_device_id_t device_id; |
58 | device_id_t device_id; |
58 | int phone; |
59 | int phone; |
59 | int ipv; |
60 | int ipv; |
60 | int dhcp; |
61 | int dhcp; |
61 | address_t address; |
62 | in_addr_t address; |
62 | address_t netmask; |
63 | in_addr_t netmask; |
63 | address_t gateway; |
64 | in_addr_t gateway; |
64 | address_t broadcast; |
65 | in_addr_t broadcast; |
65 | address_t dns1; |
66 | in_addr_t dns1; |
66 | address_t dns2; |
67 | in_addr_t dns2; |
67 | // TODO modules |
68 | // TODO modules |
68 | }; |
69 | }; |
69 | 70 | ||
- | 71 | struct ip_proto{ |
|
- | 72 | int protocol; |
|
- | 73 | int phone; |
|
- | 74 | }; |
|
- | 75 | ||
70 | struct ip_globals{ |
76 | struct ip_globals{ |
71 | int networking_phone; |
77 | int networking_phone; |
72 | int tcp_phone; |
- | |
73 | ip_netifs_t netifs; |
78 | ip_netifs_t netifs; |
- | 79 | ip_protos_t protos; |
|
74 | }; |
80 | }; |
75 | 81 | ||
76 | int ip_initialize( void ); |
- | |
77 | int ip_call( ipc_callid_t callid ); |
- | |
78 | int ip_message( ipc_callid_t callid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, ipcarg_t * result1, ipcarg_t * result2, ipcarg_t * result3 ); |
- | |
79 | - | ||
80 | #endif |
82 | #endif |
81 | 83 | ||
82 | /** @} |
84 | /** @} |
83 | */ |
85 | */ |