Changeset a64c64d in mainline for uspace/srv/net/net/net.h
- Timestamp:
- 2010-03-09T22:24:31Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 74520daf
- Parents:
- 9f2ea28
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/net/net.h
r9f2ea28 ra64c64d 52 52 /*@{*/ 53 53 54 /** DP8390 network interface module full path filename. 55 */ 56 #define DP8390_FILENAME "/srv/dp8390" 57 58 /** DP8390 network interface module name. 59 */ 60 #define DP8390_NAME "dp8390" 61 62 /** Ethernet module full path filename. 63 */ 64 #define ETHERNET_FILENAME "/srv/eth" 65 66 /** Ethernet module name. 67 */ 68 #define ETHERNET_NAME "ethernet" 69 70 /** IP module full path filename. 71 */ 72 #define IP_FILENAME "/srv/ip" 73 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 54 82 /** Loopback network interface module name. 55 83 */ 56 84 #define LO_NAME "lo" 57 85 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 66 /** DP8390 network interface module full path filename. 67 */ 68 #define DP8390_FILENAME "/srv/dp8390" 86 /** Ethernet module full path filename. 87 */ 88 #define NILDUMMY_FILENAME "/srv/nildummy" 69 89 70 90 /** Ethernet module name. 71 91 */ 72 #define ETHERNET_NAME "ethernet"73 74 /** Ethernet module full path filename.75 */76 #define ETHERNET_FILENAME "/srv/eth"77 78 /** Ethernet module name.79 */80 92 #define NILDUMMY_NAME "nildummy" 81 93 82 /** Ethernet module full path filename.83 */84 #define NILDUMMY_FILENAME "/srv/nildummy"85 86 /** IP module name.87 */88 #define IP_NAME "ip"89 90 /** IP module full path filename.91 */92 #define IP_FILENAME "/srv/ip"93 94 94 /*@}*/ 95 95 … … 98 98 /*@{*/ 99 99 100 /** Internet protocol module name configuration label. 101 */ 102 #define CONF_IL "IL" 103 104 /** Device input/output address configuration label. 105 */ 106 #define CONF_IO "IO" 107 108 /** Interrupt number configuration label. 109 */ 110 #define CONF_IRQ "IRQ" 111 112 /** Maximum transmission unit configuration label. 113 */ 114 #define CONF_MTU "MTU" 115 100 116 /** Network interface name configuration label. 101 117 */ … … 110 126 #define CONF_NIL "NIL" 111 127 112 /** Internet protocol module name configuration label.113 */114 #define CONF_IL "IL"115 116 /** Interrupt number configuration label.117 */118 #define CONF_IRQ "IRQ"119 120 /** Device input/output address configuration label.121 */122 #define CONF_IO "IO"123 124 /** Maximum transmission unit configuration label.125 */126 #define CONF_MTU "MTU"127 128 128 /*@}*/ 129 129 … … 135 135 */ 136 136 #define CONF_GENERAL_FILE "general" 137 138 /** Type definition of the networking module global data. 139 * @see net_globals 140 */ 141 typedef struct net_globals net_globals_t; 137 142 138 143 /** Type definition of the network interface specific data. … … 146 151 typedef netif_t * netif_ref; 147 152 148 /** Type definition of the networking module global data. 149 * @see net_globals 150 */ 151 typedef struct net_globals net_globals_t; 153 /** Configuration settings. 154 * Maps setting names to the values. 155 * @see generic_char_map.h 156 */ 157 GENERIC_CHAR_MAP_DECLARE(measured_strings, measured_string_t) 152 158 153 159 /** Present network interfaces. … … 157 163 DEVICE_MAP_DECLARE(netifs, netif_t) 158 164 159 /** Configuration settings. 160 * Maps setting names to the values. 161 * @see generic_char_map.h 162 */ 163 GENERIC_CHAR_MAP_DECLARE(measured_strings, measured_string_t) 165 /** Networking module global variables. 166 */ 167 struct net_globals{ 168 /** Global configuration. 169 */ 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 }; 164 181 165 182 /** Present network interface device. 166 183 */ 167 184 struct netif{ 185 /** Configuration. 186 */ 187 measured_strings_t configuration; 188 /** Serving network interface driver module index. 189 */ 190 module_ref driver; 168 191 /** System-unique network interface identifier. 169 192 */ 170 193 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 194 /** Serving internet layer module index. 178 195 */ … … 181 198 */ 182 199 char * name; 183 /** Configuration. 184 */ 185 measured_strings_t configuration; 186 }; 187 188 /** Networking module global variables. 189 */ 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; 200 /** Global configuration. 201 */ 202 measured_strings_t configuration; 200 /** Serving link layer module index. 201 */ 202 module_ref nil; 203 203 }; 204 204 … … 211 211 */ 212 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.h222 * @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);232 213 233 214 /** Processes the module message. … … 243 224 int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count); 244 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); 244 245 245 #endif 246 246
Note:
See TracChangeset
for help on using the changeset viewer.