Changeset 6b82009 in mainline for uspace/srv/net/net/net.c
- Timestamp:
- 2011-06-22T20:41:41Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ef09a7a
- Parents:
- 55091847
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/net/net.c
r55091847 r6b82009 36 36 */ 37 37 38 #include "net.h"39 40 38 #include <async.h> 41 39 #include <ctype.h> 42 40 #include <ddi.h> 43 #include <ns.h>44 41 #include <errno.h> 45 42 #include <malloc.h> … … 47 44 #include <str.h> 48 45 #include <str_error.h> 49 46 #include <ns.h> 50 47 #include <ipc/services.h> 51 48 #include <ipc/net.h> … … 53 50 #include <ipc/il.h> 54 51 #include <ipc/nil.h> 55 56 52 #include <net/modules.h> 57 53 #include <net/packet.h> 58 54 #include <net/device.h> 59 60 55 #include <adt/char_map.h> 61 56 #include <adt/generic_char_map.h> 62 57 #include <adt/measured_strings.h> 63 58 #include <adt/module_map.h> 64 65 59 #include <netif_remote.h> 66 60 #include <nil_remote.h> 67 61 #include <net_interface.h> 68 62 #include <ip_interface.h> 63 #include "net.h" 69 64 70 65 /** Networking module name. */ … … 394 389 } 395 390 396 int net_get_conf_req(int net_phone,measured_string_t **configuration,391 static int net_get_conf_req_local(measured_string_t **configuration, 397 392 size_t count, uint8_t **data) 398 393 { … … 403 398 } 404 399 405 int net_get_device_conf_req(int net_phone,device_id_t device_id,400 static int net_get_device_conf_req_local(device_id_t device_id, 406 401 measured_string_t **configuration, size_t count, uint8_t **data) 407 402 { … … 479 474 uintptr_t io = setting ? strtol((char *) setting->value, NULL, 16) : 0; 480 475 481 rc = netif_probe_req(netif->driver-> phone, netif->id, irq, (void *) io);476 rc = netif_probe_req(netif->driver->sess, netif->id, irq, (void *) io); 482 477 if (rc != EOK) 483 478 return rc; 484 479 485 480 /* Network interface layer startup */ 486 services_t internet_service;487 481 if (netif->nil) { 488 482 setting = measured_strings_find(&netif->configuration, (uint8_t *) CONF_MTU, 0); … … 493 487 int mtu = setting ? strtol((char *) setting->value, NULL, 10) : 0; 494 488 495 rc = nil_device_req(netif->nil->phone, netif->id, mtu, 496 netif->driver->service); 489 rc = nil_device_req(netif->nil->sess, netif->id, mtu); 497 490 if (rc != EOK) 498 491 return rc; 499 500 internet_service = netif->nil->service; 501 } else 502 internet_service = netif->driver->service; 492 } 503 493 504 494 /* Inter-network layer startup */ 505 switch (netif->il->service) { 506 case SERVICE_IP: 507 rc = ip_device_req(netif->il->phone, netif->id, 508 internet_service); 509 if (rc != EOK) 510 return rc; 511 break; 512 default: 513 return ENOENT; 514 } 515 516 return netif_start_req(netif->driver->phone, netif->id); 495 rc = ip_device_req(netif->il->sess, netif->id); 496 if (rc != EOK) 497 return rc; 498 499 return netif_start_req(netif->driver->sess, netif->id); 517 500 } 518 501 … … 649 632 if (rc != EOK) 650 633 return rc; 651 net_get_device_conf_req (0,IPC_GET_DEVICE(*call), &strings,634 net_get_device_conf_req_local(IPC_GET_DEVICE(*call), &strings, 652 635 IPC_GET_COUNT(*call), NULL); 653 636 … … 663 646 if (rc != EOK) 664 647 return rc; 665 net_get_conf_req (0,&strings, IPC_GET_COUNT(*call), NULL);648 net_get_conf_req_local(&strings, IPC_GET_COUNT(*call), NULL); 666 649 667 650 /* Strings should not contain received data anymore */ … … 683 666 * @param[in] icall The initial message call structure. 684 667 * @param[in] arg Local argument. 668 * 685 669 */ 686 670 static void net_client_connection(ipc_callid_t iid, ipc_call_t *icall,
Note:
See TracChangeset
for help on using the changeset viewer.