00001
00002
00003
00004
00005
00006
00007
00008 #include <stdlib.h>
00009 #include <l4/log/l4log.h>
00010 #include "local.h"
00011
00012
00013 l4ore_handle_t ore_do_open(int handle,
00014 const char *dev,
00015 unsigned char mac[6],
00016 l4ore_config *conf)
00017 {
00018 DICE_DECLARE_ENV(_dice_corba_env);
00019 l4ore_handle_t ret;
00020 l4ore_config _conf;
00021
00022 _dice_corba_env.malloc = (dice_malloc_func)malloc;
00023 _dice_corba_env.free = (dice_free_func)free;
00024 LOG_Enter();
00025
00026
00027 if (mac == NULL)
00028 {
00029 LOG("No memory allocated for MAC address return value.");
00030 return L4_INVALID_ID;
00031 }
00032
00033
00034 if (conf == NULL)
00035 {
00036 LOG("No memory allocated for connection configuration.");
00037 _conf = L4ORE_DEFAULT_CONFIG;
00038 }
00039 else
00040 _conf = *conf;
00041
00042
00043 ret = ore_manager_open_call(&descriptor_table[handle].remote_manager_thread,
00044 dev, mac, &_conf, &_dice_corba_env);
00045
00046 LOG("opened. worker = "l4util_idfmt, l4util_idstr(ret));
00047
00048 if (conf)
00049 *conf = _conf;
00050
00051 return ret;
00052 }