Changes in uspace/srv/net/net/net.h [a64c64d:01a9ef5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/net/net.h
ra64c64d r01a9ef5 52 52 /*@{*/ 53 53 54 /** Loopback network interface module name. 55 */ 56 #define LO_NAME "lo" 57 58 /** Loopback network interface module full path filename. 59 */ 60 #define LO_FILENAME "/srv/lo" 61 62 /** DP8390 network interface module name. 63 */ 64 #define DP8390_NAME "dp8390" 65 54 66 /** DP8390 network interface module full path filename. 55 67 */ 56 68 #define DP8390_FILENAME "/srv/dp8390" 57 69 58 /** DP8390 network interfacemodule name.59 */ 60 #define DP8390_NAME "dp8390"70 /** Ethernet module name. 71 */ 72 #define ETHERNET_NAME "ethernet" 61 73 62 74 /** Ethernet module full path filename. … … 66 78 /** Ethernet module name. 67 79 */ 68 #define ETHERNET_NAME "ethernet" 80 #define NILDUMMY_NAME "nildummy" 81 82 /** Ethernet module full path filename. 83 */ 84 #define NILDUMMY_FILENAME "/srv/nildummy" 85 86 /** IP module name. 87 */ 88 #define IP_NAME "ip" 69 89 70 90 /** IP module full path filename. … … 72 92 #define IP_FILENAME "/srv/ip" 73 93 74 /** IP module name.75 */76 #define IP_NAME "ip"77 78 /** Loopback network interface module full path filename.79 */80 #define LO_FILENAME "/srv/lo"81 82 /** Loopback network interface module name.83 */84 #define LO_NAME "lo"85 86 /** Ethernet module full path filename.87 */88 #define NILDUMMY_FILENAME "/srv/nildummy"89 90 /** Ethernet module name.91 */92 #define NILDUMMY_NAME "nildummy"93 94 94 /*@}*/ 95 95 … … 98 98 /*@{*/ 99 99 100 /** Network interface name configuration label. 101 */ 102 #define CONF_NAME "NAME" 103 104 /** Network interface module name configuration label. 105 */ 106 #define CONF_NETIF "NETIF" 107 108 /** Network interface layer module name configuration label. 109 */ 110 #define CONF_NIL "NIL" 111 100 112 /** Internet protocol module name configuration label. 101 113 */ 102 114 #define CONF_IL "IL" 103 115 116 /** Interrupt number configuration label. 117 */ 118 #define CONF_IRQ "IRQ" 119 104 120 /** Device input/output address configuration label. 105 121 */ 106 122 #define CONF_IO "IO" 107 123 108 /** Interrupt number configuration label.109 */110 #define CONF_IRQ "IRQ"111 112 124 /** Maximum transmission unit configuration label. 113 125 */ 114 126 #define CONF_MTU "MTU" 115 127 116 /** Network interface name configuration label.117 */118 #define CONF_NAME "NAME"119 120 /** Network interface module name configuration label.121 */122 #define CONF_NETIF "NETIF"123 124 /** Network interface layer module name configuration label.125 */126 #define CONF_NIL "NIL"127 128 128 /*@}*/ 129 129 … … 135 135 */ 136 136 #define CONF_GENERAL_FILE "general" 137 138 /** Type definition of the network interface specific data. 139 * @see netif 140 */ 141 typedef struct netif netif_t; 142 143 /** Type definition of the network interface specific data pointer. 144 * @see netif 145 */ 146 typedef netif_t * netif_ref; 137 147 138 148 /** Type definition of the networking module global data. … … 141 151 typedef struct net_globals net_globals_t; 142 152 143 /** Type definition of the network interface specific data. 144 * @see netif 145 */ 146 typedef struct netif netif_t; 147 148 /** Type definition of the network interface specific data pointer. 149 * @see netif 150 */ 151 typedef netif_t * netif_ref; 153 /** Present network interfaces. 154 * Maps devices to the networking device specific data. 155 * @see device.h 156 */ 157 DEVICE_MAP_DECLARE( netifs, netif_t ) 152 158 153 159 /** Configuration settings. … … 155 161 * @see generic_char_map.h 156 162 */ 157 GENERIC_CHAR_MAP_DECLARE(measured_strings, measured_string_t) 158 159 /** Present network interfaces. 160 * Maps devices to the networking device specific data. 161 * @see device.h 162 */ 163 DEVICE_MAP_DECLARE(netifs, netif_t) 163 GENERIC_CHAR_MAP_DECLARE( measured_strings, measured_string_t ) 164 165 /** Present network interface device. 166 */ 167 struct netif{ 168 /** System-unique network interface identifier. 169 */ 170 device_id_t id; 171 /** Serving network interface driver module index. 172 */ 173 module_ref driver; 174 /** Serving link layer module index. 175 */ 176 module_ref nil; 177 /** Serving internet layer module index. 178 */ 179 module_ref il; 180 /** System-unique network interface name. 181 */ 182 char * name; 183 /** Configuration. 184 */ 185 measured_strings_t configuration; 186 }; 164 187 165 188 /** Networking module global variables. 166 189 */ 167 190 struct net_globals{ 191 /** Present network interfaces. 192 */ 193 netifs_t netifs; 194 /** Network interface structure indices by names. 195 */ 196 char_map_t netif_names; 197 /** Available modules. 198 */ 199 modules_t modules; 168 200 /** Global configuration. 169 201 */ 170 measured_strings_t configuration; 171 /** Available modules. 172 */ 173 modules_t modules; 174 /** Network interface structure indices by names. 175 */ 176 char_map_t netif_names; 177 /** Present network interfaces. 178 */ 179 netifs_t netifs; 180 }; 181 182 /** Present network interface device. 183 */ 184 struct netif{ 185 /** Configuration. 186 */ 187 measured_strings_t configuration; 188 /** Serving network interface driver module index. 189 */ 190 module_ref driver; 191 /** System-unique network interface identifier. 192 */ 193 device_id_t id; 194 /** Serving internet layer module index. 195 */ 196 module_ref il; 197 /** System-unique network interface name. 198 */ 199 char * name; 200 /** Serving link layer module index. 201 */ 202 module_ref nil; 202 measured_strings_t configuration; 203 203 }; 204 204 … … 210 210 * @returns ENOMEM if there is not enough memory left. 211 211 */ 212 int add_configuration(measured_strings_ref configuration, const char * name, const char * value); 212 int add_configuration( measured_strings_ref configuration, const char * name, const char * value ); 213 214 /** Processes the networking message. 215 * @param[in] callid The message identifier. 216 * @param[in] call The message parameters. 217 * @param[out] answer The message answer parameters. 218 * @param[out] answer_count The last parameter for the actual answer in the answer parameter. 219 * @returns EOK on success. 220 * @returns ENOTSUP if the message is not known. 221 * @see net_interface.h 222 * @see IS_NET_NET_MESSAGE() 223 */ 224 int net_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count ); 225 226 /** Initializes the networking module for the chosen subsystem build type. 227 * @param[in] client_connection The client connection processing function. The module skeleton propagates its own one. 228 * @returns EOK on success. 229 * @returns ENOMEM if there is not enough memory left. 230 */ 231 int net_initialize_build( async_client_conn_t client_connection ); 213 232 214 233 /** Processes the module message. … … 222 241 * @returns Other error codes as defined for each bundled module message function. 223 242 */ 224 int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count); 225 226 /** Initializes the networking module for the chosen subsystem build type. 227 * @param[in] client_connection The client connection processing function. The module skeleton propagates its own one. 228 * @returns EOK on success. 229 * @returns ENOMEM if there is not enough memory left. 230 */ 231 int net_initialize_build(async_client_conn_t client_connection); 232 233 /** Processes the networking message. 234 * @param[in] callid The message identifier. 235 * @param[in] call The message parameters. 236 * @param[out] answer The message answer parameters. 237 * @param[out] answer_count The last parameter for the actual answer in the answer parameter. 238 * @returns EOK on success. 239 * @returns ENOTSUP if the message is not known. 240 * @see net_interface.h 241 * @see IS_NET_NET_MESSAGE() 242 */ 243 int net_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count); 243 int module_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count ); 244 244 245 245 #endif
Note:
See TracChangeset
for help on using the changeset viewer.