Changes in uspace/srv/net/il/ip/ip.h [e8199d77:e526f08] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/il/ip/ip.h
re8199d77 re526f08 28 28 29 29 /** @addtogroup ip 30 * @{30 * @{ 31 31 */ 32 32 33 33 /** @file 34 * IP module.35 */ 36 37 #ifndef NET_IP_H_38 #define NET_IP_H_34 * IP module. 35 */ 36 37 #ifndef __NET_IP_H__ 38 #define __NET_IP_H__ 39 39 40 40 #include <fibril_synch.h> … … 50 50 51 51 /** Type definition of the IP global data. 52 * @see ip_globals53 */ 54 typedef struct ip_globals 52 * @see ip_globals 53 */ 54 typedef struct ip_globals ip_globals_t; 55 55 56 56 /** Type definition of the IP network interface specific data. 57 * @see ip_netif58 */ 59 typedef struct ip_netif 57 * @see ip_netif 58 */ 59 typedef struct ip_netif ip_netif_t; 60 60 61 61 /** Type definition of the IP network interface specific data pointer. 62 * @see ip_netif63 */ 64 typedef ip_netif_t * ip_netif_ref;62 * @see ip_netif 63 */ 64 typedef ip_netif_t * ip_netif_ref; 65 65 66 66 /** Type definition of the IP protocol specific data. 67 * @see ip_proto68 */ 69 typedef struct ip_proto 67 * @see ip_proto 68 */ 69 typedef struct ip_proto ip_proto_t; 70 70 71 71 /** Type definition of the IP protocol specific data pointer. 72 * @see ip_proto73 */ 74 typedef ip_proto_t * ip_proto_ref;72 * @see ip_proto 73 */ 74 typedef ip_proto_t * ip_proto_ref; 75 75 76 76 /** Type definition of the IP route specific data. … … 82 82 * @see ip_route 83 83 */ 84 typedef ip_route_t * ip_route_ref;84 typedef ip_route_t * ip_route_ref; 85 85 86 86 /** IP network interfaces. 87 * Maps devices to the IP network interface specific data.88 * @see device.h89 */ 90 DEVICE_MAP_DECLARE(ip_netifs, ip_netif_t) ;87 * Maps devices to the IP network interface specific data. 88 * @see device.h 89 */ 90 DEVICE_MAP_DECLARE(ip_netifs, ip_netif_t) 91 91 92 92 /** IP registered protocols. 93 * Maps protocols to the IP protocol specific data.94 * @see int_map.h95 */ 96 INT_MAP_DECLARE(ip_protos, ip_proto_t) ;93 * Maps protocols to the IP protocol specific data. 94 * @see int_map.h 95 */ 96 INT_MAP_DECLARE(ip_protos, ip_proto_t) 97 97 98 98 /** IP routing table. 99 * @see generic_field.h 100 */ 101 GENERIC_FIELD_DECLARE(ip_routes, ip_route_t); 102 103 /** IP network interface specific data. */ 104 struct ip_netif { 105 /** ARP module. Assigned if using ARP. */ 99 * @see generic_field.h 100 */ 101 GENERIC_FIELD_DECLARE(ip_routes, ip_route_t) 102 103 /** IP network interface specific data. 104 */ 105 struct ip_netif{ 106 /** ARP module. 107 * Assigned if using ARP. 108 */ 106 109 module_ref arp; 107 /** Broadcast address. */ 110 /** Broadcast address. 111 */ 108 112 in_addr_t broadcast; 109 /** Device identifier. */ 113 /** Device identifier. 114 */ 110 115 device_id_t device_id; 111 /** Indicates whether using DHCP. */ 116 /** Indicates whether using DHCP. 117 */ 112 118 int dhcp; 113 /** IP version. */ 119 /** IP version. 120 */ 114 121 int ipv; 115 /** Packet dimension. */ 122 /** Packet dimension. 123 */ 116 124 packet_dimension_t packet_dimension; 117 /** Netif module phone. */ 125 /** Netif module phone. 126 */ 118 127 int phone; 119 /** Routing table. */ 128 /** Routing table. 129 */ 120 130 ip_routes_t routes; 121 /** Indicates whether IP routing is enabled. */ 131 /** Indicates whether IP routing is enabled. 132 */ 122 133 int routing; 123 /** Netif module service. */ 134 /** Netif module service. 135 */ 124 136 services_t service; 125 /** Device state. */ 137 /** Device state. 138 */ 126 139 device_state_t state; 127 140 }; 128 141 129 /** IP protocol specific data. */ 130 struct ip_proto { 131 /** Protocol module phone. */ 142 /** IP protocol specific data. 143 */ 144 struct ip_proto{ 145 /** Protocol module phone. 146 */ 132 147 int phone; 133 /** Protocol number. */ 148 /** Protocol number. 149 */ 134 150 int protocol; 135 /** Protocol packet receiving function. */ 151 /** Protocol packet receiving function. 152 */ 136 153 tl_received_msg_t received_msg; 137 /** Protocol module service. */ 154 /** Protocol module service. 155 */ 138 156 services_t service; 139 157 }; 140 158 141 /** IP route specific data. */ 142 struct ip_route { 143 /** Target address. */ 159 /** IP route specific data. 160 */ 161 struct ip_route{ 162 /** Target address. 163 */ 144 164 in_addr_t address; 145 /** Gateway. */ 165 /** Gateway. 166 */ 146 167 in_addr_t gateway; 147 /** Parent netif. */ 168 /** Parent netif. 169 */ 148 170 ip_netif_ref netif; 149 /** Target network mask. */ 171 /** Target network mask. 172 */ 150 173 in_addr_t netmask; 151 174 }; 152 175 153 /** IP global data. */ 154 struct ip_globals { 155 /** Default client connection function for support modules. */ 176 /** IP global data. 177 */ 178 struct ip_globals{ 179 /** Default client connection function for support modules. 180 */ 156 181 async_client_conn_t client_connection; 157 /** Default gateway. */ 182 /** Default gateway. 183 */ 158 184 ip_route_t gateway; 159 /** Safety lock. */ 185 /** Safety lock. 186 */ 160 187 fibril_rwlock_t lock; 161 /** Known support modules. */ 188 /** Known support modules. 189 */ 162 190 modules_t modules; 163 /** Networking module phone. */ 191 /** Networking module phone. 192 */ 164 193 int net_phone; 165 /** Registered network interfaces. */ 194 /** Registered network interfaces. 195 */ 166 196 ip_netifs_t netifs; 167 /** Netifs safeyt lock. */ 197 /** Netifs safeyt lock. 198 */ 168 199 fibril_rwlock_t netifs_lock; 169 /** Packet counter. */ 200 /** Packet counter. 201 */ 170 202 uint16_t packet_counter; 171 /** Registered protocols. */ 203 /** Registered protocols. 204 */ 172 205 ip_protos_t protos; 173 /** Protocols safety lock. */ 206 /** Protocols safety lock. 207 */ 174 208 fibril_rwlock_t protos_lock; 175 209 };
Note:
See TracChangeset
for help on using the changeset viewer.