model/dlm-loader-factory.cc
author Hajime Tazaki <tazaki@sfc.wide.ad.jp>
Mon, 01 Jun 2015 14:24:27 +0900
changeset 669 cb779a3844be
parent 578 71461e470024
child 678 8c9aece65bf9
permissions -rw-r--r--
Bug 2101 - When loading binary not compiled with the correct options, dce crashes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     1
#include "dlm-loader-factory.h"
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
#include "ns3/log.h"
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
#include "ns3/fatal-error.h"
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     4
#include <list>
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     5
#include <dlfcn.h>
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     6
164
6522058328b4 check style ...
frederic.urbani@inria.fr
parents: 31
diff changeset
     7
NS_LOG_COMPONENT_DEFINE ("DlmLoaderFactory");
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     8
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     9
extern "C" {
164
6522058328b4 check style ...
frederic.urbani@inria.fr
parents: 31
diff changeset
    10
// The function and structure declarations below are not exactly equal to the
6522058328b4 check style ...
frederic.urbani@inria.fr
parents: 31
diff changeset
    11
// corresponding declarations in the elf loader, mostly for simplicity to
6522058328b4 check style ...
frederic.urbani@inria.fr
parents: 31
diff changeset
    12
// avoid dragging in too many dependent declarations.
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
164
6522058328b4 check style ...
frederic.urbani@inria.fr
parents: 31
diff changeset
    14
typedef Lmid_t (*DlLmidNew)(int, char **, char **);
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    15
typedef void (*DlLmidDelete)(Lmid_t);
164
6522058328b4 check style ...
frederic.urbani@inria.fr
parents: 31
diff changeset
    16
typedef int (*DlLmidAddLibRemap)(Lmid_t lmid, const char *src, const char *dst);
6522058328b4 check style ...
frederic.urbani@inria.fr
parents: 31
diff changeset
    17
typedef void (*Ns3ReportTestError)(const char *);
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
}
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    21
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    22
namespace ns3 {
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    23
164
6522058328b4 check style ...
frederic.urbani@inria.fr
parents: 31
diff changeset
    24
NS_OBJECT_ENSURE_REGISTERED (DlmLoaderFactory);
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    25
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
class DlmLoader : public Loader
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
{
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
public:
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    29
  DlmLoader (int argc, char **argv, char **envp);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    30
  virtual ~DlmLoader ();
367
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 164
diff changeset
    31
  virtual Loader * Clone (void)
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 164
diff changeset
    32
  {
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 164
diff changeset
    33
    return 0;                             /* XXX */
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 164
diff changeset
    34
  }
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    35
  virtual void UnloadAll (void);
367
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 164
diff changeset
    36
  virtual void * Load (std::string filename, int flag);
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    37
  virtual void Unload (void *module);
367
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 164
diff changeset
    38
  virtual void * Lookup (void *module, std::string symbol);
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    39
private:
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    40
  Lmid_t m_lmid;
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    41
  std::list<void *> m_loaded;
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    42
};
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    43
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    44
DlmLoader::DlmLoader (int argc, char **argv, char **envp)
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    45
{
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    46
  NS_LOG_FUNCTION (this << argc);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    47
  void *libvdl = dlopen ("libvdl.so", RTLD_LAZY | RTLD_LOCAL);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    48
  DlLmidNew dlLmidNew = (DlLmidNew) dlsym (libvdl, "dl_lmid_new");
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    49
  dlclose (libvdl);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    50
  if (dlLmidNew == 0)
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    51
    {
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    52
      NS_FATAL_ERROR ("Could not find our fancy elf loader");
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    53
      // Note: we do not link explicitely against our fancy elf loader
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    54
      // because it appears to break our stupid build system
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    55
      // so, we have to lookup the necessary magic functions at runtime.
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    56
    }
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    57
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    58
  // create a new context
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    59
  m_lmid = dlLmidNew (argc, argv, envp);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    60
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    61
}
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    62
DlmLoader::~DlmLoader ()
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    63
{
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    64
  NS_LOG_FUNCTION (this);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    65
  m_loaded.clear ();
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    66
  void *libvdl = dlopen ("libvdl.so", RTLD_LAZY | RTLD_LOCAL);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    67
  DlLmidDelete dlLmidDelete = (DlLmidDelete) dlsym (libvdl, "dl_lmid_delete");
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    68
  dlclose (libvdl);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    69
  if (dlLmidDelete == 0)
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    70
    {
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    71
      NS_FATAL_ERROR ("Could not find our fancy elf loader for lmid deletion");
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    72
      // Note: we do not link explicitely against our fancy elf loader
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    73
      // because it appears to break our stupid build system
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    74
      // so, we have to lookup the necessary magic functions at runtime.
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    75
      return;
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    76
    }
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    77
  dlLmidDelete (m_lmid);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    78
}
367
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 164
diff changeset
    79
void
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    80
DlmLoader::UnloadAll (void)
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    81
{
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    82
  NS_LOG_FUNCTION (this);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    83
  for (std::list<void *>::const_iterator i = m_loaded.begin ();
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    84
       i != m_loaded.end (); ++i)
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    85
    {
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    86
      ::dlclose (*i);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    87
    }
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    88
}
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    89
void *
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    90
DlmLoader::Load (std::string filename, int flag)
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    91
{
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    92
  NS_LOG_FUNCTION (this << filename << flag);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    93
  void *module = dlmopen (m_lmid, filename.c_str (), flag);
669
cb779a3844be Bug 2101 - When loading binary not compiled with the correct options, dce crashes
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 578
diff changeset
    94
  if (!module)
cb779a3844be Bug 2101 - When loading binary not compiled with the correct options, dce crashes
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 578
diff changeset
    95
    {
cb779a3844be Bug 2101 - When loading binary not compiled with the correct options, dce crashes
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 578
diff changeset
    96
      NS_LOG_UNCOND ("*** unable to open non-shared object file=" << filename << " ***");
cb779a3844be Bug 2101 - When loading binary not compiled with the correct options, dce crashes
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 578
diff changeset
    97
      NS_LOG_UNCOND ("dlerror() = " << dlerror ());
cb779a3844be Bug 2101 - When loading binary not compiled with the correct options, dce crashes
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 578
diff changeset
    98
      NS_ASSERT_MSG (false, "make it sure that DCE binrary file " << filename 
cb779a3844be Bug 2101 - When loading binary not compiled with the correct options, dce crashes
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 578
diff changeset
    99
                     << " was built with correct options: (CFLAGS=-fPIC, LDFLAGS=-pie -rdynamic)");
cb779a3844be Bug 2101 - When loading binary not compiled with the correct options, dce crashes
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 578
diff changeset
   100
    }
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   101
  m_loaded.push_back (module);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   102
  return module;
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   103
}
367
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 164
diff changeset
   104
void
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   105
DlmLoader::Unload (void *module)
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   106
{
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   107
  NS_LOG_FUNCTION (this << module);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   108
  ::dlclose (module);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   109
  m_loaded.remove (module);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   110
}
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   111
void *
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   112
DlmLoader::Lookup (void *module, std::string symbol)
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   113
{
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   114
  NS_LOG_FUNCTION (this << module << symbol);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   115
  void *p = dlsym (module, symbol.c_str ());
578
71461e470024 (temporal) Bug 1773 - DCE doesn't run on Fedora 19, Ubuntu 13.10 (64bits)
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 367
diff changeset
   116
  if (!p)
71461e470024 (temporal) Bug 1773 - DCE doesn't run on Fedora 19, Ubuntu 13.10 (64bits)
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 367
diff changeset
   117
    {
71461e470024 (temporal) Bug 1773 - DCE doesn't run on Fedora 19, Ubuntu 13.10 (64bits)
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 367
diff changeset
   118
      NS_LOG_WARN (dlerror());
71461e470024 (temporal) Bug 1773 - DCE doesn't run on Fedora 19, Ubuntu 13.10 (64bits)
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 367
diff changeset
   119
    }
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   120
  return p;
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   121
}
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   122
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   123
367
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 164
diff changeset
   124
TypeId
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   125
DlmLoaderFactory::GetTypeId (void)
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   126
{
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   127
  static TypeId tid = TypeId ("ns3::DlmLoaderFactory")
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   128
    .SetParent<LoaderFactory> ()
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   129
    .AddConstructor<DlmLoaderFactory> ()
164
6522058328b4 check style ...
frederic.urbani@inria.fr
parents: 31
diff changeset
   130
  ;
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   131
  return tid;
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   132
}
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   133
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   134
DlmLoaderFactory::DlmLoaderFactory ()
367
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 164
diff changeset
   135
{
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 164
diff changeset
   136
}
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   137
DlmLoaderFactory::~DlmLoaderFactory ()
367
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 164
diff changeset
   138
{
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 164
diff changeset
   139
}
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   140
Loader *
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   141
DlmLoaderFactory::Create (int argc, char **argv, char **envp)
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   142
{
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   143
  DlmLoader *loader = new DlmLoader (argc, argv, envp);
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   144
  return loader;
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   145
}
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   146
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   147
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   148
} // namespace ns3