merge with HEAD of ns-3-dce
authorHajime Tazaki <tazaki@nict.go.jp>
Sat, 02 Jun 2012 00:29:00 +0900
changeset 22ed0d8cc18421
parent 21 c9fa67dd732a
child 23 7f0e375f8523
merge with HEAD of ns-3-dce
120406-dce-quagga-support.patch
120410-dce-umip-support.patch
     1.1 --- a/120406-dce-quagga-support.patch	Wed May 30 11:24:40 2012 +0900
     1.2 +++ b/120406-dce-quagga-support.patch	Sat Jun 02 00:29:00 2012 +0900
     1.3 @@ -1,8 +1,7 @@
     1.4 -* * *
     1.5 -quagga ospfd with ns-3-linux support
     1.6 +support ns-3-dce-quagga
     1.7  
     1.8 -diff -r 28c0c7f781c1 example/dce-zebra-simple.cc
     1.9 ---- a/example/dce-zebra-simple.cc	Thu Mar 29 17:00:46 2012 +0200
    1.10 +diff -r 071d721c2713 example/dce-zebra-simple.cc
    1.11 +--- a/example/dce-zebra-simple.cc	Wed May 30 10:21:32 2012 +0200
    1.12  +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    1.13  @@ -1,114 +0,0 @@
    1.14  -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
    1.15 @@ -119,8 +118,8 @@
    1.16  -
    1.17  -  return 0;
    1.18  -}
    1.19 -diff -r 28c0c7f781c1 helper/quagga-helper.cc
    1.20 ---- a/helper/quagga-helper.cc	Thu Mar 29 17:00:46 2012 +0200
    1.21 +diff -r 071d721c2713 helper/quagga-helper.cc
    1.22 +--- a/helper/quagga-helper.cc	Wed May 30 10:21:32 2012 +0200
    1.23  +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    1.24  @@ -1,596 +0,0 @@
    1.25  -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
    1.26 @@ -719,8 +718,8 @@
    1.27  -}
    1.28  -
    1.29  -} // namespace ns3
    1.30 -diff -r 28c0c7f781c1 helper/quagga-helper.h
    1.31 ---- a/helper/quagga-helper.h	Thu Mar 29 17:00:46 2012 +0200
    1.32 +diff -r 071d721c2713 helper/quagga-helper.h
    1.33 +--- a/helper/quagga-helper.h	Wed May 30 10:21:32 2012 +0200
    1.34  +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    1.35  @@ -1,100 +0,0 @@
    1.36  -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
    1.37 @@ -823,9 +822,9 @@
    1.38  -} // namespace ns3
    1.39  -
    1.40  -#endif /* QUAGGA_HELPER_H */
    1.41 -diff -r 28c0c7f781c1 model/dce-fd.cc
    1.42 ---- a/model/dce-fd.cc	Thu Mar 29 17:00:46 2012 +0200
    1.43 -+++ b/model/dce-fd.cc	Mon Apr 23 17:29:23 2012 +0900
    1.44 +diff -r 071d721c2713 model/dce-fd.cc
    1.45 +--- a/model/dce-fd.cc	Wed May 30 10:21:32 2012 +0200
    1.46 ++++ b/model/dce-fd.cc	Sat Jun 02 00:22:49 2012 +0900
    1.47  @@ -345,12 +345,6 @@
    1.48   
    1.49     Ptr<SocketFdFactory>  factory = 0;
    1.50 @@ -839,30 +838,21 @@
    1.51     if (domain != AF_UNIX)
    1.52       {
    1.53         factory = manager->GetObject<SocketFdFactory> ();
    1.54 -diff -r 28c0c7f781c1 model/libc-ns3.h
    1.55 ---- a/model/libc-ns3.h	Thu Mar 29 17:00:46 2012 +0200
    1.56 -+++ b/model/libc-ns3.h	Mon Apr 23 17:29:23 2012 +0900
    1.57 -@@ -412,7 +412,7 @@
    1.58 - DCE    (ftruncate)
    1.59 +diff -r 071d721c2713 model/libc-ns3.h
    1.60 +--- a/model/libc-ns3.h	Wed May 30 10:21:32 2012 +0200
    1.61 ++++ b/model/libc-ns3.h	Sat Jun 02 00:22:49 2012 +0900
    1.62 +@@ -469,7 +469,7 @@
    1.63 + NATIVE (gettext)
    1.64   
    1.65 - // pwd.h
    1.66 --//NATIVE (getpwnam)
    1.67 + // PWD.H
    1.68 +-DCE (getpwnam)
    1.69  +NATIVE (getpwnam)
    1.70 - // grp.h
    1.71 - NATIVE (getgrnam)
    1.72 - 
    1.73 -@@ -461,7 +461,7 @@
    1.74 - NATIVE (__ctype_get_mb_cur_max)
    1.75 - 
    1.76 - // pwd.h
    1.77 --DCE (getpwnam)
    1.78 -+//DCE (getpwnam)
    1.79   DCE (getpwuid)
    1.80   DCE (endpwent)
    1.81   
    1.82 -diff -r 28c0c7f781c1 model/linux-socket-fd-factory.cc
    1.83 ---- a/model/linux-socket-fd-factory.cc	Thu Mar 29 17:00:46 2012 +0200
    1.84 -+++ b/model/linux-socket-fd-factory.cc	Mon Apr 23 17:29:23 2012 +0900
    1.85 +diff -r 071d721c2713 model/linux-socket-fd-factory.cc
    1.86 +--- a/model/linux-socket-fd-factory.cc	Wed May 30 10:21:32 2012 +0200
    1.87 ++++ b/model/linux-socket-fd-factory.cc	Sat Jun 02 00:22:49 2012 +0900
    1.88  @@ -254,6 +254,10 @@
    1.89   {
    1.90     LinuxSocketFdFactory *self = (LinuxSocketFdFactory *)kernel;
    1.91 @@ -885,9 +875,9 @@
    1.92     struct SimDevice *dev = m_exported->dev_create (PeekPointer (device), (enum SimDevFlags)flags);
    1.93   
    1.94     Ptr<LinuxDeviceStateListener> listener = Create <LinuxDeviceStateListener> (device, this);
    1.95 -diff -r 28c0c7f781c1 model/ns3-socket-fd-factory.cc
    1.96 ---- a/model/ns3-socket-fd-factory.cc	Thu Mar 29 17:00:46 2012 +0200
    1.97 -+++ b/model/ns3-socket-fd-factory.cc	Mon Apr 23 17:29:23 2012 +0900
    1.98 +diff -r 071d721c2713 model/ns3-socket-fd-factory.cc
    1.99 +--- a/model/ns3-socket-fd-factory.cc	Wed May 30 10:21:32 2012 +0200
   1.100 ++++ b/model/ns3-socket-fd-factory.cc	Sat Jun 02 00:22:49 2012 +0900
   1.101  @@ -98,6 +98,29 @@
   1.102           break;
   1.103           }
   1.104 @@ -918,9 +908,9 @@
   1.105     else if (domain == PF_NETLINK)
   1.106       {
   1.107         switch (type) {
   1.108 -diff -r 28c0c7f781c1 model/unix-socket-fd.cc
   1.109 ---- a/model/unix-socket-fd.cc	Thu Mar 29 17:00:46 2012 +0200
   1.110 -+++ b/model/unix-socket-fd.cc	Mon Apr 23 17:29:23 2012 +0900
   1.111 +diff -r 071d721c2713 model/unix-socket-fd.cc
   1.112 +--- a/model/unix-socket-fd.cc	Wed May 30 10:21:32 2012 +0200
   1.113 ++++ b/model/unix-socket-fd.cc	Sat Jun 02 00:22:49 2012 +0900
   1.114  @@ -33,6 +33,7 @@
   1.115   #include "ns3/boolean.h"
   1.116   #include "ns3/simulator.h"
   1.117 @@ -945,7 +935,7 @@
   1.118     else if (my_addr->sa_family == AF_NETLINK)
   1.119       {
   1.120         const struct sockaddr_nl *addr = (const struct sockaddr_nl *)my_addr;
   1.121 -@@ -670,6 +680,19 @@
   1.122 +@@ -671,6 +681,19 @@
   1.123         inet_addr->sin_addr.s_addr = htonl (ns_inetaddr.GetIpv4 ().Get ());
   1.124         *addrlen = sizeof(struct sockaddr_in);
   1.125       }
   1.126 @@ -965,9 +955,9 @@
   1.127     else if (NetlinkSocketAddress::IsMatchingType(nsaddr))
   1.128       {
   1.129         NetlinkSocketAddress ns_nladdr = NetlinkSocketAddress::ConvertFrom (nsaddr);
   1.130 -diff -r 28c0c7f781c1 model/utils.cc
   1.131 ---- a/model/utils.cc	Thu Mar 29 17:00:46 2012 +0200
   1.132 -+++ b/model/utils.cc	Mon Apr 23 17:29:23 2012 +0900
   1.133 +diff -r 071d721c2713 model/utils.cc
   1.134 +--- a/model/utils.cc	Wed May 30 10:21:32 2012 +0200
   1.135 ++++ b/model/utils.cc	Sat Jun 02 00:22:49 2012 +0900
   1.136  @@ -191,6 +191,11 @@
   1.137   void UtilsDoSignal (void)
   1.138   {
   1.139 @@ -980,9 +970,9 @@
   1.140     // we try to check if we 
   1.141     // have pending signals and we deliver them if we have any.
   1.142     for (std::vector<SignalHandler>::iterator i = current->process->signalHandlers.begin (); 
   1.143 -diff -r 28c0c7f781c1 test/dce-manager-test.cc
   1.144 ---- a/test/dce-manager-test.cc	Thu Mar 29 17:00:46 2012 +0200
   1.145 -+++ b/test/dce-manager-test.cc	Mon Apr 23 17:29:23 2012 +0900
   1.146 +diff -r 071d721c2713 test/dce-manager-test.cc
   1.147 +--- a/test/dce-manager-test.cc	Wed May 30 10:21:32 2012 +0200
   1.148 ++++ b/test/dce-manager-test.cc	Sat Jun 02 00:22:49 2012 +0900
   1.149  @@ -161,13 +161,15 @@
   1.150         {  "test-random", 0, "", false },
   1.151         {  "test-local-socket", 0, "", false },
   1.152 @@ -1000,9 +990,9 @@
   1.153     };
   1.154   
   1.155     // Prepare directories and files for test-stdio
   1.156 -diff -r 28c0c7f781c1 test/test-bug-multi-select.cc
   1.157 +diff -r 071d721c2713 test/test-bug-multi-select.cc
   1.158  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   1.159 -+++ b/test/test-bug-multi-select.cc	Mon Apr 23 17:29:23 2012 +0900
   1.160 ++++ b/test/test-bug-multi-select.cc	Sat Jun 02 00:22:49 2012 +0900
   1.161  @@ -0,0 +1,199 @@
   1.162  +#include <stdio.h>
   1.163  +#include <sys/select.h>
   1.164 @@ -1203,9 +1193,9 @@
   1.165  +
   1.166  +  return 0;
   1.167  +}
   1.168 -diff -r 28c0c7f781c1 test/test-socket.cc
   1.169 +diff -r 071d721c2713 test/test-socket.cc
   1.170  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   1.171 -+++ b/test/test-socket.cc	Mon Apr 23 17:29:23 2012 +0900
   1.172 ++++ b/test/test-socket.cc	Sat Jun 02 00:22:49 2012 +0900
   1.173  @@ -0,0 +1,395 @@
   1.174  +#define _GNU_SOURCE 1
   1.175  +#include <sys/types.h>
   1.176 @@ -1602,9 +1592,9 @@
   1.177  +  test_netlink ();
   1.178  +  return 0;
   1.179  +}
   1.180 -diff -r 28c0c7f781c1 test/wscript
   1.181 ---- a/test/wscript	Thu Mar 29 17:00:46 2012 +0200
   1.182 -+++ b/test/wscript	Mon Apr 23 17:29:23 2012 +0900
   1.183 +diff -r 071d721c2713 test/wscript
   1.184 +--- a/test/wscript	Wed May 30 10:21:32 2012 +0200
   1.185 ++++ b/test/wscript	Sat Jun 02 00:22:49 2012 +0900
   1.186  @@ -31,6 +31,8 @@
   1.187       new_test(bld, 'test-netdb', '')
   1.188       new_test(bld, 'test-env', '')
   1.189 @@ -1614,9 +1604,9 @@
   1.190       new_test(bld, 'test-timer-fd', '')
   1.191       new_test(bld, 'test-stdlib', '')
   1.192       new_test(bld, 'test-select', 'PTHREAD')
   1.193 -diff -r 28c0c7f781c1 utils/setenv.sh
   1.194 ---- a/utils/setenv.sh	Thu Mar 29 17:00:46 2012 +0200
   1.195 -+++ b/utils/setenv.sh	Mon Apr 23 17:29:23 2012 +0900
   1.196 +diff -r 071d721c2713 utils/setenv.sh
   1.197 +--- a/utils/setenv.sh	Wed May 30 10:21:32 2012 +0200
   1.198 ++++ b/utils/setenv.sh	Sat Jun 02 00:22:49 2012 +0900
   1.199  @@ -1,6 +1,6 @@
   1.200   #!/bin/bash
   1.201   # Set environnement for ns3 dce
   1.202 @@ -1625,9 +1615,9 @@
   1.203   BASEDCE=$PWD
   1.204   cd ..
   1.205   BASE=$PWD
   1.206 -diff -r 28c0c7f781c1 wscript
   1.207 ---- a/wscript	Thu Mar 29 17:00:46 2012 +0200
   1.208 -+++ b/wscript	Mon Apr 23 17:29:23 2012 +0900
   1.209 +diff -r 071d721c2713 wscript
   1.210 +--- a/wscript	Wed May 30 10:21:32 2012 +0200
   1.211 ++++ b/wscript	Sat Jun 02 00:22:49 2012 +0900
   1.212  @@ -26,6 +26,7 @@
   1.213       ns3waf.check_modules(conf, ['point-to-point', 'tap-bridge', 'netanim'], mandatory = False)
   1.214       ns3waf.check_modules(conf, ['wifi', 'point-to-point', 'csma', 'mobility'], mandatory = False)
   1.215 @@ -1658,20 +1648,22 @@
   1.216       module.add_example(needed = ['core', 'internet', 'dce' ], 
   1.217                          target='bin/dce-bash-simple',
   1.218                          source=['example/bash/dce-bash-simple.cc'])
   1.219 -@@ -380,7 +379,6 @@
   1.220 +@@ -381,7 +380,6 @@
   1.221           'helper/ipv4-dce-routing-helper.cc',
   1.222           'helper/dce-manager-helper.cc',
   1.223           'helper/dce-application-helper.cc',
   1.224  -        'helper/quagga-helper.cc',
   1.225 -         'helper/ccn-client-helper.cc'
   1.226 +         'helper/ccn-client-helper.cc',
   1.227 +         'helper/ipv4-linux-address-helper.cc'
   1.228           ]
   1.229 -     module_headers = [
   1.230 -@@ -393,8 +391,8 @@
   1.231 +@@ -395,9 +393,9 @@
   1.232           'model/ipv4-dce-routing.h',
   1.233           'helper/dce-manager-helper.h',
   1.234           'helper/dce-application-helper.h',
   1.235  -        'helper/quagga-helper.h',
   1.236           'helper/ccn-client-helper.h',
   1.237 +-        'helper/ipv4-linux-address-helper.h'
   1.238 ++        'helper/ipv4-linux-address-helper.h',
   1.239  +        'helper/ipv4-dce-routing-helper.h',
   1.240           ]
   1.241       module_source = module_source + kernel_source
     2.1 --- a/120410-dce-umip-support.patch	Wed May 30 11:24:40 2012 +0900
     2.2 +++ b/120410-dce-umip-support.patch	Sat Jun 02 00:29:00 2012 +0900
     2.3 @@ -1,8 +1,8 @@
     2.4  support umip(mip6d) with ns-3-linux for NEMO/MIP6
     2.5  
     2.6 -diff -r ab266495f633 model/dce-fd.cc
     2.7 ---- a/model/dce-fd.cc	Mon Apr 23 17:29:23 2012 +0900
     2.8 -+++ b/model/dce-fd.cc	Thu Apr 26 09:56:01 2012 +0900
     2.9 +diff -r 056220694d84 model/dce-fd.cc
    2.10 +--- a/model/dce-fd.cc	Sat Jun 02 00:22:49 2012 +0900
    2.11 ++++ b/model/dce-fd.cc	Sat Jun 02 00:27:53 2012 +0900
    2.12  @@ -367,11 +367,30 @@
    2.13       }
    2.14   
    2.15 @@ -34,9 +34,9 @@
    2.16   int dce_bind (int fd, const struct sockaddr *my_addr, socklen_t addrlen)
    2.17   {
    2.18     Thread *current = Current ();
    2.19 -diff -r ab266495f633 model/dce-manager.cc
    2.20 ---- a/model/dce-manager.cc	Mon Apr 23 17:29:23 2012 +0900
    2.21 -+++ b/model/dce-manager.cc	Thu Apr 26 09:56:01 2012 +0900
    2.22 +diff -r 056220694d84 model/dce-manager.cc
    2.23 +--- a/model/dce-manager.cc	Sat Jun 02 00:22:49 2012 +0900
    2.24 ++++ b/model/dce-manager.cc	Sat Jun 02 00:27:53 2012 +0900
    2.25  @@ -1096,6 +1096,22 @@
    2.26             libpthread_setup = (void (*)(const struct Libc *))(symbol);
    2.27             libpthread_setup (libc);
    2.28 @@ -60,9 +60,9 @@
    2.29             // finally, call into 'main'.
    2.30             h = ld->Load (filename, RTLD_GLOBAL);
    2.31   
    2.32 -diff -r ab266495f633 model/dce-poll.cc
    2.33 ---- a/model/dce-poll.cc	Mon Apr 23 17:29:23 2012 +0900
    2.34 -+++ b/model/dce-poll.cc	Thu Apr 26 09:56:01 2012 +0900
    2.35 +diff -r 056220694d84 model/dce-poll.cc
    2.36 +--- a/model/dce-poll.cc	Sat Jun 02 00:22:49 2012 +0900
    2.37 ++++ b/model/dce-poll.cc	Sat Jun 02 00:27:53 2012 +0900
    2.38  @@ -180,7 +180,12 @@
    2.39           }
    2.40       }
    2.41 @@ -77,9 +77,9 @@
    2.42       {
    2.43         current->err = EINVAL;
    2.44         return -1;
    2.45 -diff -r ab266495f633 model/dce-signal.cc
    2.46 ---- a/model/dce-signal.cc	Mon Apr 23 17:29:23 2012 +0900
    2.47 -+++ b/model/dce-signal.cc	Thu Apr 26 09:56:01 2012 +0900
    2.48 +diff -r 056220694d84 model/dce-signal.cc
    2.49 +--- a/model/dce-signal.cc	Sat Jun 02 00:22:49 2012 +0900
    2.50 ++++ b/model/dce-signal.cc	Sat Jun 02 00:27:53 2012 +0900
    2.51  @@ -3,6 +3,7 @@
    2.52   #include "process.h"
    2.53   #include "ns3/log.h"
    2.54 @@ -106,9 +106,9 @@
    2.55   int dce_sigprocmask(int how, const sigset_t *set, sigset_t *oldset)
    2.56   {
    2.57     Thread *current = Current ();
    2.58 -diff -r ab266495f633 model/dce-signal.h
    2.59 ---- a/model/dce-signal.h	Mon Apr 23 17:29:23 2012 +0900
    2.60 -+++ b/model/dce-signal.h	Thu Apr 26 09:56:01 2012 +0900
    2.61 +diff -r 056220694d84 model/dce-signal.h
    2.62 +--- a/model/dce-signal.h	Sat Jun 02 00:22:49 2012 +0900
    2.63 ++++ b/model/dce-signal.h	Sat Jun 02 00:27:53 2012 +0900
    2.64  @@ -17,6 +17,7 @@
    2.65   int dce_pthread_kill (pthread_t thread, int sig);
    2.66   void dce_abort ();
    2.67 @@ -117,9 +117,9 @@
    2.68   
    2.69   #ifdef __cplusplus
    2.70   }
    2.71 -diff -r ab266495f633 model/dce-string.cc
    2.72 ---- a/model/dce-string.cc	Mon Apr 23 17:29:23 2012 +0900
    2.73 -+++ b/model/dce-string.cc	Thu Apr 26 09:56:01 2012 +0900
    2.74 +diff -r 056220694d84 model/dce-string.cc
    2.75 +--- a/model/dce-string.cc	Sat Jun 02 00:22:49 2012 +0900
    2.76 ++++ b/model/dce-string.cc	Sat Jun 02 00:27:53 2012 +0900
    2.77  @@ -26,3 +26,9 @@
    2.78     /// \todo Do actual checking
    2.79     strcpy (__dest, __src); 
    2.80 @@ -130,9 +130,9 @@
    2.81  +  return strrchr (s, c);
    2.82  +}
    2.83  +
    2.84 -diff -r ab266495f633 model/dce-string.h
    2.85 ---- a/model/dce-string.h	Mon Apr 23 17:29:23 2012 +0900
    2.86 -+++ b/model/dce-string.h	Thu Apr 26 09:56:01 2012 +0900
    2.87 +diff -r 056220694d84 model/dce-string.h
    2.88 +--- a/model/dce-string.h	Sat Jun 02 00:22:49 2012 +0900
    2.89 ++++ b/model/dce-string.h	Sat Jun 02 00:27:53 2012 +0900
    2.90  @@ -12,6 +12,7 @@
    2.91   char *dce___strcpy_chk (char *__restrict __dest,
    2.92   						const char *__restrict __src,
    2.93 @@ -141,9 +141,9 @@
    2.94   
    2.95   #ifdef __cplusplus
    2.96   }
    2.97 -diff -r ab266495f633 model/dce-time.cc
    2.98 ---- a/model/dce-time.cc	Mon Apr 23 17:29:23 2012 +0900
    2.99 -+++ b/model/dce-time.cc	Thu Apr 26 09:56:01 2012 +0900
   2.100 +diff -r 056220694d84 model/dce-time.cc
   2.101 +--- a/model/dce-time.cc	Sat Jun 02 00:22:49 2012 +0900
   2.102 ++++ b/model/dce-time.cc	Sat Jun 02 00:27:53 2012 +0900
   2.103  @@ -54,3 +54,12 @@
   2.104   
   2.105     return asctime_r (tm, Current ()->process->asctime_result);
   2.106 @@ -157,9 +157,9 @@
   2.107  +  *tp = UtilsTimeToTimespec (UtilsSimulationTimeToTime (Now ()));
   2.108  +  return 0;
   2.109  +}
   2.110 -diff -r ab266495f633 model/dce-time.h
   2.111 ---- a/model/dce-time.h	Mon Apr 23 17:29:23 2012 +0900
   2.112 -+++ b/model/dce-time.h	Thu Apr 26 09:56:01 2012 +0900
   2.113 +diff -r 056220694d84 model/dce-time.h
   2.114 +--- a/model/dce-time.h	Sat Jun 02 00:22:49 2012 +0900
   2.115 ++++ b/model/dce-time.h	Sat Jun 02 00:27:53 2012 +0900
   2.116  @@ -3,6 +3,7 @@
   2.117   
   2.118   #include "sys/dce-time.h"
   2.119 @@ -177,9 +177,9 @@
   2.120   	
   2.121   #ifdef __cplusplus
   2.122   }
   2.123 -diff -r ab266495f633 model/dce.cc
   2.124 ---- a/model/dce.cc	Mon Apr 23 17:29:23 2012 +0900
   2.125 -+++ b/model/dce.cc	Thu Apr 26 09:56:01 2012 +0900
   2.126 +diff -r 056220694d84 model/dce.cc
   2.127 +--- a/model/dce.cc	Sat Jun 02 00:22:49 2012 +0900
   2.128 ++++ b/model/dce.cc	Sat Jun 02 00:27:53 2012 +0900
   2.129  @@ -22,6 +22,8 @@
   2.130   #include <getopt.h>
   2.131   #include <limits.h>
   2.132 @@ -289,9 +289,9 @@
   2.133   #ifdef HAVE_GETCPUFEATURES
   2.134   extern "C"
   2.135   {
   2.136 -diff -r ab266495f633 model/elf-cache.cc
   2.137 ---- a/model/elf-cache.cc	Mon Apr 23 17:29:23 2012 +0900
   2.138 -+++ b/model/elf-cache.cc	Thu Apr 26 09:56:01 2012 +0900
   2.139 +diff -r 056220694d84 model/elf-cache.cc
   2.140 +--- a/model/elf-cache.cc	Sat Jun 02 00:22:49 2012 +0900
   2.141 ++++ b/model/elf-cache.cc	Sat Jun 02 00:27:53 2012 +0900
   2.142  @@ -26,6 +26,9 @@
   2.143     overriden.from = "libpthread.so.0";
   2.144     overriden.to = "libpthread-ns3.so";
   2.145 @@ -302,64 +302,69 @@
   2.146   }
   2.147   
   2.148   std::string
   2.149 -diff -r ab266495f633 model/libc-ns3.h
   2.150 ---- a/model/libc-ns3.h	Mon Apr 23 17:29:23 2012 +0900
   2.151 -+++ b/model/libc-ns3.h	Thu Apr 26 09:56:01 2012 +0900
   2.152 -@@ -73,6 +73,7 @@
   2.153 - NATIVE (ntohl)
   2.154 - NATIVE (ntohs)
   2.155 - DCE    (socket)
   2.156 -+DCE    (socketpair)
   2.157 - DCE    (getsockname)
   2.158 - DCE    (getpeername)
   2.159 - DCE    (bind)
   2.160 -@@ -99,7 +100,8 @@
   2.161 - NATIVE (strnlen)
   2.162 - // because C++ defines both const and non-const functions
   2.163 +diff -r 056220694d84 model/libc-ns3.h
   2.164 +--- a/model/libc-ns3.h	Sat Jun 02 00:22:49 2012 +0900
   2.165 ++++ b/model/libc-ns3.h	Sat Jun 02 00:27:53 2012 +0900
   2.166 +@@ -124,7 +124,8 @@
   2.167 + NATIVE (strcspn)
   2.168 + NATIVE (strspn)
   2.169   NATIVE_EXPLICIT (strchr, char* (*) (char *, int))
   2.170  -NATIVE_EXPLICIT (strrchr, char * (*) (char *, int))
   2.171  +NATIVE_EXPLICIT (strrchr, const char * (*) (const char *, int))
   2.172  +//DCE (strrchr)
   2.173   NATIVE (strcasecmp)
   2.174   NATIVE (strncasecmp)
   2.175 - 
   2.176 -@@ -214,6 +216,7 @@
   2.177 - DCE    (setregid)
   2.178 - DCE    (setresuid)
   2.179 - DCE    (setresgid)
   2.180 + DCE_WITH_ALIAS (strdup) // because C++ defines both const and non-const functions
   2.181 +@@ -149,6 +150,7 @@
   2.182 + NATIVE (htons)
   2.183 + NATIVE (ntohl)
   2.184 + NATIVE (ntohs)
   2.185  +NATIVE (lockf)
   2.186   NATIVE (inet_aton)
   2.187 - NATIVE (inet_ntoa)
   2.188 - DCE    (inet_ntop)
   2.189 -@@ -223,6 +226,8 @@
   2.190 - NATIVE (inet_lnaof)
   2.191 + NATIVE (inet_addr)
   2.192 + NATIVE (inet_network)
   2.193 +@@ -158,9 +160,11 @@
   2.194   NATIVE (inet_netof)
   2.195 - NATIVE (inet_addr)
   2.196 + DCE (inet_ntop)
   2.197 + NATIVE (inet_pton)
   2.198  +NATIVE (inet6_opt_find)
   2.199 -+NATIVE (ether_aton)
   2.200 - DCE    (mmap)
   2.201 - DCE    (mmap64)
   2.202 - DCE    (munmap)
   2.203 -@@ -254,6 +259,7 @@
   2.204 - DCE    (realloc)
   2.205 - DCE    (gettimeofday)
   2.206 - DCE    (time)
   2.207 -+DCE    (sysinfo)
   2.208 - DCE    (isatty)
   2.209 - DCE    (send)
   2.210 - DCE    (sendto)
   2.211 -@@ -279,6 +285,7 @@
   2.212 - NATIVE (sigaddset)
   2.213 + 
   2.214 + // SYS/SOCKET.H
   2.215 + DCE (socket)
   2.216 ++DCE (socketpair)
   2.217 + DCE (getsockname)
   2.218 + DCE (getpeername)
   2.219 + DCE (bind)
   2.220 +@@ -312,7 +316,7 @@
   2.221 + NATIVE_WITH_ALIAS2 (gmtime_r, localtime_r)
   2.222 + NATIVE (mktime)
   2.223 + NATIVE (strftime)
   2.224 +-NATIVE_WITH_ALIAS2 (clock_gettime, __vdso_clock_gettime) // this is wrong. clock should be changed to DCE implementation
   2.225 ++DCE_WITH_ALIAS2 (clock_gettime, __vdso_clock_gettime)
   2.226 + 
   2.227 + // SYS/TIME.H
   2.228 + DCE (gettimeofday)
   2.229 +@@ -320,6 +324,8 @@
   2.230 + DCE (setitimer)
   2.231 + DCE (getitimer)
   2.232 + 
   2.233 ++DCE (sysinfo)
   2.234 ++
   2.235 + // SYS/MAP.H
   2.236 + DCE (mmap)
   2.237 + DCE (mmap64)
   2.238 +@@ -347,6 +353,7 @@
   2.239   NATIVE (sigdelset)
   2.240   NATIVE (sigismember)
   2.241 + DCE (sigprocmask)
   2.242  +DCE    (sigwait)
   2.243 - DCE_WITH_ALIAS2(strtol, __strtol_internal)
   2.244 - DCET    (long long int, strtoll)
   2.245 - DCE    (strtoul)
   2.246 -@@ -343,6 +350,13 @@
   2.247 - DCE    (pthread_cond_wait)
   2.248 - DCE    (pthread_condattr_destroy)
   2.249 - DCE    (pthread_condattr_init)
   2.250 + 
   2.251 + // PTHREAD.H
   2.252 + DCE (pthread_create)
   2.253 +@@ -377,6 +384,13 @@
   2.254 + DCE (pthread_cond_wait)
   2.255 + DCE (pthread_condattr_destroy)
   2.256 + DCE (pthread_condattr_init)
   2.257  +NATIVE (pthread_rwlock_init)
   2.258  +NATIVE (pthread_rwlock_unlock)
   2.259  +NATIVE (pthread_rwlock_wrlock)
   2.260 @@ -368,38 +373,35 @@
   2.261  +NATIVE (pthread_setcancelstate)
   2.262  +NATIVE (pthread_sigmask)
   2.263   
   2.264 - // netdb.h
   2.265 - DCE    (gethostbyname)
   2.266 -@@ -381,6 +395,7 @@
   2.267 - DCE    (timerfd_gettime)
   2.268 + // SEMAPHORE.H
   2.269 + DCE (sem_init)
   2.270 +@@ -420,6 +434,7 @@
   2.271   
   2.272 - DCE    (if_nametoindex)
   2.273 -+DCE    (if_indextoname)
   2.274 - DCE    (fork)
   2.275 + // NET/IF.H
   2.276 + DCE (if_nametoindex)
   2.277 ++DCE (if_indextoname)
   2.278   
   2.279 - NATIVE (qsort)
   2.280 -@@ -442,8 +457,8 @@
   2.281 - NATIVE (pathconf)
   2.282 + // DIRENT.H
   2.283 + DCE (opendir)
   2.284 +@@ -479,6 +494,7 @@
   2.285   
   2.286 - // this is wrong. clock should be changed to DCE implementation
   2.287 --//DCE    (__vdso_clock_gettime)
   2.288 --NATIVE_WITH_ALIAS2 (clock_gettime, __vdso_clock_gettime)
   2.289 -+DCE_WITH_ALIAS2 (clock_gettime, __vdso_clock_gettime)
   2.290 -+//NATIVE_WITH_ALIAS2 (clock_gettime, __vdso_clock_gettime)
   2.291 + // NETINET/ETHER.H
   2.292 + NATIVE (ether_aton_r)
   2.293 ++NATIVE (ether_aton)
   2.294   
   2.295 - // setjmp.h
   2.296 - NATIVE (__sigsetjmp)
   2.297 -diff -r ab266495f633 model/librt-ns3.version
   2.298 + ///////////////////// END OF INVENTAIRE //////////////////////////////////////////////////
   2.299 + 
   2.300 +diff -r 056220694d84 model/librt-ns3.version
   2.301  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   2.302 -+++ b/model/librt-ns3.version	Thu Apr 26 09:56:01 2012 +0900
   2.303 ++++ b/model/librt-ns3.version	Sat Jun 02 00:27:53 2012 +0900
   2.304  @@ -0,0 +1,4 @@
   2.305  +NS3 {
   2.306  +global:
   2.307  +	librt_setup;
   2.308  +};
   2.309 -diff -r ab266495f633 model/linux-socket-fd-factory.cc
   2.310 ---- a/model/linux-socket-fd-factory.cc	Mon Apr 23 17:29:23 2012 +0900
   2.311 -+++ b/model/linux-socket-fd-factory.cc	Thu Apr 26 09:56:01 2012 +0900
   2.312 +diff -r 056220694d84 model/linux-socket-fd-factory.cc
   2.313 +--- a/model/linux-socket-fd-factory.cc	Sat Jun 02 00:22:49 2012 +0900
   2.314 ++++ b/model/linux-socket-fd-factory.cc	Sat Jun 02 00:27:53 2012 +0900
   2.315  @@ -464,6 +464,7 @@
   2.316   void
   2.317   LinuxSocketFdFactory::SetTask (std::string path, std::string value)
   2.318 @@ -416,9 +418,9 @@
   2.319   
   2.320     while (!m_earlySysfs.empty ())
   2.321       {
   2.322 -diff -r ab266495f633 model/net/dce-if.h
   2.323 ---- a/model/net/dce-if.h	Mon Apr 23 17:29:23 2012 +0900
   2.324 -+++ b/model/net/dce-if.h	Thu Apr 26 09:56:01 2012 +0900
   2.325 +diff -r 056220694d84 model/net/dce-if.h
   2.326 +--- a/model/net/dce-if.h	Sat Jun 02 00:22:49 2012 +0900
   2.327 ++++ b/model/net/dce-if.h	Sat Jun 02 00:27:53 2012 +0900
   2.328  @@ -7,6 +7,7 @@
   2.329   #endif
   2.330   
   2.331 @@ -427,9 +429,9 @@
   2.332   
   2.333   
   2.334   #ifdef __cplusplus
   2.335 -diff -r ab266495f633 model/ns3-socket-fd-factory.cc
   2.336 ---- a/model/ns3-socket-fd-factory.cc	Mon Apr 23 17:29:23 2012 +0900
   2.337 -+++ b/model/ns3-socket-fd-factory.cc	Thu Apr 26 09:56:01 2012 +0900
   2.338 +diff -r 056220694d84 model/ns3-socket-fd-factory.cc
   2.339 +--- a/model/ns3-socket-fd-factory.cc	Sat Jun 02 00:22:49 2012 +0900
   2.340 ++++ b/model/ns3-socket-fd-factory.cc	Sat Jun 02 00:27:53 2012 +0900
   2.341  @@ -166,6 +166,7 @@
   2.342     else
   2.343       {
   2.344 @@ -438,9 +440,9 @@
   2.345       }
   2.346   
   2.347     return socket;
   2.348 -diff -r ab266495f633 model/sys/dce-socket.h
   2.349 ---- a/model/sys/dce-socket.h	Mon Apr 23 17:29:23 2012 +0900
   2.350 -+++ b/model/sys/dce-socket.h	Thu Apr 26 09:56:01 2012 +0900
   2.351 +diff -r 056220694d84 model/sys/dce-socket.h
   2.352 +--- a/model/sys/dce-socket.h	Sat Jun 02 00:22:49 2012 +0900
   2.353 ++++ b/model/sys/dce-socket.h	Sat Jun 02 00:27:53 2012 +0900
   2.354  @@ -28,6 +28,7 @@
   2.355   ssize_t dce_sendmsg(int s, const struct msghdr *msg, int flags);
   2.356   int dce_getsockname(int s, struct sockaddr *name, socklen_t *namelen);
   2.357 @@ -449,9 +451,9 @@
   2.358   
   2.359   #ifdef __cplusplus
   2.360   }
   2.361 -diff -r ab266495f633 test/test-select.cc
   2.362 ---- a/test/test-select.cc	Mon Apr 23 17:29:23 2012 +0900
   2.363 -+++ b/test/test-select.cc	Thu Apr 26 09:56:01 2012 +0900
   2.364 +diff -r 056220694d84 test/test-select.cc
   2.365 +--- a/test/test-select.cc	Sat Jun 02 00:22:49 2012 +0900
   2.366 ++++ b/test/test-select.cc	Sat Jun 02 00:27:53 2012 +0900
   2.367  @@ -43,9 +43,20 @@
   2.368     struct timeval timeout =
   2.369     { 0, 0 };
   2.370 @@ -474,9 +476,9 @@
   2.371   }
   2.372   
   2.373   static bool
   2.374 -diff -r ab266495f633 wscript
   2.375 ---- a/wscript	Mon Apr 23 17:29:23 2012 +0900
   2.376 -+++ b/wscript	Thu Apr 26 09:56:01 2012 +0900
   2.377 +diff -r 056220694d84 wscript
   2.378 +--- a/wscript	Sat Jun 02 00:22:49 2012 +0900
   2.379 ++++ b/wscript	Sat Jun 02 00:27:53 2012 +0900
   2.380  @@ -71,6 +71,17 @@
   2.381           conf.end_msg(libpthread, True)
   2.382       conf.env['LIBPTHREAD_FILE'] = libpthread
   2.383 @@ -495,7 +497,7 @@
   2.384       conf.find_program('readversiondef', var='READVERSIONDEF', mandatory=True)
   2.385   
   2.386       if Options.options.kernel_stack is not None and os.path.isdir(Options.options.kernel_stack):
   2.387 -@@ -426,6 +437,11 @@
   2.388 +@@ -429,6 +440,11 @@
   2.389           rule='%s %s | cat ${SRC[0].abspath()} - > ${TGT}' %
   2.390           (bld.env['READVERSIONDEF'], bld.env['LIBPTHREAD_FILE']))
   2.391   
   2.392 @@ -507,7 +509,7 @@
   2.393       bld.add_group('dce_use_version_files')
   2.394   
   2.395       # The very small libc used to replace the glibc
   2.396 -@@ -445,3 +461,13 @@
   2.397 +@@ -448,3 +464,13 @@
   2.398                 linkflags=['-nostdlib', '-lc',
   2.399                            '-Wl,--version-script=' + os.path.join('model', 'libpthread.version'),
   2.400                            '-Wl,-soname=libpthread.so.0'])