Changeset ee2fa30a in mainline
- Timestamp:
- 2011-06-22T23:28:56Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b366a6f4
- Parents:
- ef09a7a
- Location:
- uspace
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/il/ip_remote.c
ref09a7a ree2fa30a 123 123 * 124 124 */ 125 int ip_device_req_remote(async_sess_t *sess, device_id_t device_id) 126 { 127 return generic_device_req_remote(sess, NET_IP_DEVICE, device_id, 0, 0); 125 int ip_device_req_remote(async_sess_t *sess, device_id_t device_id, 126 services_t service) 127 { 128 return generic_device_req_remote(sess, NET_IP_DEVICE, device_id, 0, 129 service); 128 130 } 129 131 -
uspace/lib/net/include/ip_remote.h
ref09a7a ree2fa30a 48 48 extern int ip_received_error_msg_remote(async_sess_t *, device_id_t, packet_t *, 49 49 services_t, services_t); 50 extern int ip_device_req_remote(async_sess_t *, device_id_t );50 extern int ip_device_req_remote(async_sess_t *, device_id_t, services_t); 51 51 extern int ip_add_route_req_remote(async_sess_t *, device_id_t, in_addr_t, 52 52 in_addr_t, in_addr_t); -
uspace/lib/net/include/netif_skel.h
ref09a7a ree2fa30a 205 205 extern packet_t *netif_packet_get_1(size_t); 206 206 207 extern int netif_module_start( sysarg_t);207 extern int netif_module_start(void); 208 208 209 209 #endif -
uspace/lib/net/include/nil_remote.h
ref09a7a ree2fa30a 58 58 packet_get_id(packet), sender, 0) 59 59 60 #define nil_device_req(sess, device_id, mtu) \ 61 generic_device_req_remote(sess, NET_NIL_DEVICE, device_id, mtu, 0)\ 60 #define nil_device_req(sess, device_id, mtu, netif_service) \ 61 generic_device_req_remote(sess, NET_NIL_DEVICE, device_id, mtu, \ 62 netif_service) 62 63 63 64 extern int nil_device_state_msg(async_sess_t *, device_id_t, sysarg_t); -
uspace/lib/net/netif/netif_skel.c
ref09a7a ree2fa30a 228 228 } 229 229 230 /** Register the device notification receiver, 231 * 232 * Register a network interface layer module as the device 233 * notification receiver. 234 * 235 * @param[in] sess Session to the network interface layer module. 236 * 237 * @return EOK on success. 238 * @return ELIMIT if there is another module registered. 239 * 240 */ 241 static int register_message(async_sess_t *sess) 242 { 243 fibril_rwlock_write_lock(&netif_globals.lock); 244 if (netif_globals.nil_sess != NULL) { 245 fibril_rwlock_write_unlock(&netif_globals.lock); 246 return ELIMIT; 247 } 248 249 netif_globals.nil_sess = sess; 250 251 fibril_rwlock_write_unlock(&netif_globals.lock); 252 return EOK; 253 } 254 230 255 /** Process the netif module messages. 231 256 * … … 257 282 return EOK; 258 283 284 async_sess_t *callback = 285 async_callback_receive_start(EXCHANGE_SERIALIZE, call); 286 if (callback) 287 return register_message(callback); 288 259 289 switch (IPC_GET_IMETHOD(*call)) { 260 290 case NET_NETIF_PROBE: … … 358 388 * messages in an infinite loop. 359 389 * 360 * @param[in] nil_service Network interface layer service.361 *362 390 * @return EOK on success. 363 391 * @return Other error codes as defined for each specific module … … 365 393 * 366 394 */ 367 int netif_module_start( sysarg_t nil_service)395 int netif_module_start(void) 368 396 { 369 397 async_set_client_connection(netif_client_connection); 370 398 371 399 netif_globals.sess = connect_to_service(SERVICE_NETWORKING); 372 netif_globals.nil_sess = connect_to_service(nil_service);400 netif_globals.nil_sess = NULL; 373 401 netif_device_map_initialize(&netif_globals.device_map); 374 402 -
uspace/srv/hw/netif/ne2000/ne2000.c
ref09a7a ree2fa30a 404 404 { 405 405 /* Start the module */ 406 return netif_module_start( SERVICE_ETHERNET);406 return netif_module_start(); 407 407 } 408 408 -
uspace/srv/net/net/net.c
ref09a7a ree2fa30a 479 479 480 480 /* Network interface layer startup */ 481 services_t internet_service; 481 482 if (netif->nil) { 482 483 setting = measured_strings_find(&netif->configuration, (uint8_t *) CONF_MTU, 0); … … 486 487 487 488 int mtu = setting ? strtol((char *) setting->value, NULL, 10) : 0; 488 489 rc = nil_device_req(netif->nil->sess, netif->id, mtu);489 rc = nil_device_req(netif->nil->sess, netif->id, mtu, 490 netif->driver->service); 490 491 if (rc != EOK) 491 492 return rc; 492 } 493 494 internet_service = netif->nil->service; 495 } else 496 internet_service = netif->driver->service; 493 497 494 498 /* Inter-network layer startup */ 495 rc = ip_device_req(netif->il->sess, netif->id );499 rc = ip_device_req(netif->il->sess, netif->id, internet_service); 496 500 if (rc != EOK) 497 501 return rc; -
uspace/srv/net/netif/lo/lo.c
ref09a7a ree2fa30a 225 225 { 226 226 /* Start the module */ 227 return netif_module_start( SERVICE_NILDUMMY);227 return netif_module_start(); 228 228 } 229 229
Note:
See TracChangeset
for help on using the changeset viewer.