Changeset f51f193 in mainline for uspace/srv/net/net/net.c


Ignore:
Timestamp:
2011-07-12T03:00:14Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6817eba
Parents:
eca52a8 (diff), 026793d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/net/net.c

    reca52a8 rf51f193  
    3636 */
    3737
    38 #include "net.h"
    39 
    4038#include <async.h>
    4139#include <ctype.h>
    4240#include <ddi.h>
    43 #include <ns.h>
    4441#include <errno.h>
    4542#include <malloc.h>
     
    4744#include <str.h>
    4845#include <str_error.h>
    49 
     46#include <ns.h>
    5047#include <ipc/services.h>
    5148#include <ipc/net.h>
     
    5350#include <ipc/il.h>
    5451#include <ipc/nil.h>
    55 
    5652#include <net/modules.h>
    5753#include <net/packet.h>
    5854#include <net/device.h>
    59 
    6055#include <adt/char_map.h>
    6156#include <adt/generic_char_map.h>
    6257#include <adt/measured_strings.h>
    6358#include <adt/module_map.h>
    64 
    6559#include <netif_remote.h>
    6660#include <nil_remote.h>
    6761#include <net_interface.h>
    6862#include <ip_interface.h>
     63#include "net.h"
    6964
    7065/** Networking module name. */
     
    394389}
    395390
    396 int net_get_conf_req(int net_phone, measured_string_t **configuration,
     391static int net_get_conf_req_local(measured_string_t **configuration,
    397392    size_t count, uint8_t **data)
    398393{
     
    403398}
    404399
    405 int net_get_device_conf_req(int net_phone, device_id_t device_id,
     400static int net_get_device_conf_req_local(device_id_t device_id,
    406401    measured_string_t **configuration, size_t count, uint8_t **data)
    407402{
     
    479474        uintptr_t io = setting ? strtol((char *) setting->value, NULL, 16) : 0;
    480475       
    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);
    482477        if (rc != EOK)
    483478                return rc;
     
    492487               
    493488                int mtu = setting ? strtol((char *) setting->value, NULL, 10) : 0;
    494                
    495                 rc = nil_device_req(netif->nil->phone, netif->id, mtu,
     489                rc = nil_device_req(netif->nil->sess, netif->id, mtu,
    496490                    netif->driver->service);
    497491                if (rc != EOK)
     
    503497       
    504498        /* 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);
     499        rc = ip_device_req(netif->il->sess, netif->id, internet_service);
     500        if (rc != EOK)
     501                return rc;
     502       
     503        return netif_start_req(netif->driver->sess, netif->id);
    517504}
    518505
     
    649636                if (rc != EOK)
    650637                        return rc;
    651                 net_get_device_conf_req(0, IPC_GET_DEVICE(*call), &strings,
     638                net_get_device_conf_req_local(IPC_GET_DEVICE(*call), &strings,
    652639                    IPC_GET_COUNT(*call), NULL);
    653640               
     
    663650                if (rc != EOK)
    664651                        return rc;
    665                 net_get_conf_req(0, &strings, IPC_GET_COUNT(*call), NULL);
     652                net_get_conf_req_local(&strings, IPC_GET_COUNT(*call), NULL);
    666653               
    667654                /* Strings should not contain received data anymore */
     
    683670 * @param[in] icall The initial message call structure.
    684671 * @param[in] arg   Local argument.
     672 *
    685673 */
    686674static void net_client_connection(ipc_callid_t iid, ipc_call_t *icall,
Note: See TracChangeset for help on using the changeset viewer.