for umip update
authorHajime Tazaki <tazaki@nict.go.jp>
Wed, 11 Apr 2012 12:41:12 +0900
changeset 19f86f5b19833f
parent 18 1811be862c59
child 20 5ca51e147e7f
for umip update
120410-dce-umip-support.patch
     1.1 --- a/120410-dce-umip-support.patch	Wed Apr 11 11:21:19 2012 +0900
     1.2 +++ b/120410-dce-umip-support.patch	Wed Apr 11 12:41:12 2012 +0900
     1.3 @@ -1,8 +1,8 @@
     1.4  support umip(mip6d) with ns-3-linux for NEMO/MIP6
     1.5  
     1.6 -diff -r e503e546d382 model/dce-fd.cc
     1.7 ---- a/model/dce-fd.cc	Mon Apr 09 10:03:33 2012 +0900
     1.8 -+++ b/model/dce-fd.cc	Wed Apr 11 09:28:15 2012 +0900
     1.9 +diff -r 61ddc5520f14 model/dce-fd.cc
    1.10 +--- a/model/dce-fd.cc	Wed Apr 11 10:56:47 2012 +0900
    1.11 ++++ b/model/dce-fd.cc	Wed Apr 11 12:38:04 2012 +0900
    1.12  @@ -367,11 +367,30 @@
    1.13       }
    1.14   
    1.15 @@ -34,9 +34,9 @@
    1.16   int dce_bind (int fd, const struct sockaddr *my_addr, socklen_t addrlen)
    1.17   {
    1.18     Thread *current = Current ();
    1.19 -diff -r e503e546d382 model/dce-manager.cc
    1.20 ---- a/model/dce-manager.cc	Mon Apr 09 10:03:33 2012 +0900
    1.21 -+++ b/model/dce-manager.cc	Wed Apr 11 09:28:15 2012 +0900
    1.22 +diff -r 61ddc5520f14 model/dce-manager.cc
    1.23 +--- a/model/dce-manager.cc	Wed Apr 11 10:56:47 2012 +0900
    1.24 ++++ b/model/dce-manager.cc	Wed Apr 11 12:38:04 2012 +0900
    1.25  @@ -1096,6 +1096,22 @@
    1.26             libpthread_setup = (void (*)(const struct Libc *))(symbol);
    1.27             libpthread_setup (libc);
    1.28 @@ -60,9 +60,9 @@
    1.29             // finally, call into 'main'.
    1.30             h = ld->Load (filename, RTLD_GLOBAL);
    1.31   
    1.32 -diff -r e503e546d382 model/dce-poll.cc
    1.33 ---- a/model/dce-poll.cc	Mon Apr 09 10:03:33 2012 +0900
    1.34 -+++ b/model/dce-poll.cc	Wed Apr 11 09:28:15 2012 +0900
    1.35 +diff -r 61ddc5520f14 model/dce-poll.cc
    1.36 +--- a/model/dce-poll.cc	Wed Apr 11 10:56:47 2012 +0900
    1.37 ++++ b/model/dce-poll.cc	Wed Apr 11 12:38:04 2012 +0900
    1.38  @@ -180,7 +180,12 @@
    1.39           }
    1.40       }
    1.41 @@ -77,9 +77,9 @@
    1.42       {
    1.43         current->err = EINVAL;
    1.44         return -1;
    1.45 -diff -r e503e546d382 model/dce-signal.cc
    1.46 ---- a/model/dce-signal.cc	Mon Apr 09 10:03:33 2012 +0900
    1.47 -+++ b/model/dce-signal.cc	Wed Apr 11 09:28:15 2012 +0900
    1.48 +diff -r 61ddc5520f14 model/dce-signal.cc
    1.49 +--- a/model/dce-signal.cc	Wed Apr 11 10:56:47 2012 +0900
    1.50 ++++ b/model/dce-signal.cc	Wed Apr 11 12:38:04 2012 +0900
    1.51  @@ -3,6 +3,7 @@
    1.52   #include "process.h"
    1.53   #include "ns3/log.h"
    1.54 @@ -88,7 +88,7 @@
    1.55   #include <vector>
    1.56   #include <errno.h>
    1.57   
    1.58 -@@ -98,6 +99,18 @@
    1.59 +@@ -98,6 +99,17 @@
    1.60   
    1.61     return 0;
    1.62   }
    1.63 @@ -96,7 +96,6 @@
    1.64  +int dce_sigwait (const sigset_t *set, int *sig)
    1.65  +{
    1.66  +  int ret = 0;
    1.67 -+  //  current->process->signalHandlers.push_back (handler);
    1.68  +
    1.69  +  Waiter waiter;
    1.70  +  waiter.SetTimeout (Seconds (0.0));
    1.71 @@ -107,9 +106,9 @@
    1.72   int dce_sigprocmask(int how, const sigset_t *set, sigset_t *oldset)
    1.73   {
    1.74     Thread *current = Current ();
    1.75 -diff -r e503e546d382 model/dce-signal.h
    1.76 ---- a/model/dce-signal.h	Mon Apr 09 10:03:33 2012 +0900
    1.77 -+++ b/model/dce-signal.h	Wed Apr 11 09:28:15 2012 +0900
    1.78 +diff -r 61ddc5520f14 model/dce-signal.h
    1.79 +--- a/model/dce-signal.h	Wed Apr 11 10:56:47 2012 +0900
    1.80 ++++ b/model/dce-signal.h	Wed Apr 11 12:38:04 2012 +0900
    1.81  @@ -17,6 +17,7 @@
    1.82   int dce_pthread_kill (pthread_t thread, int sig);
    1.83   void dce_abort ();
    1.84 @@ -118,9 +117,9 @@
    1.85   
    1.86   #ifdef __cplusplus
    1.87   }
    1.88 -diff -r e503e546d382 model/dce-time.cc
    1.89 ---- a/model/dce-time.cc	Mon Apr 09 10:03:33 2012 +0900
    1.90 -+++ b/model/dce-time.cc	Wed Apr 11 09:28:15 2012 +0900
    1.91 +diff -r 61ddc5520f14 model/dce-time.cc
    1.92 +--- a/model/dce-time.cc	Wed Apr 11 10:56:47 2012 +0900
    1.93 ++++ b/model/dce-time.cc	Wed Apr 11 12:38:04 2012 +0900
    1.94  @@ -54,3 +54,12 @@
    1.95   
    1.96     return asctime_r (tm, Current ()->process->asctime_result);
    1.97 @@ -134,9 +133,9 @@
    1.98  +  *tp = UtilsTimeToTimespec (UtilsSimulationTimeToTime (Now ()));
    1.99  +  return 0;
   1.100  +}
   1.101 -diff -r e503e546d382 model/dce-time.h
   1.102 ---- a/model/dce-time.h	Mon Apr 09 10:03:33 2012 +0900
   1.103 -+++ b/model/dce-time.h	Wed Apr 11 09:28:15 2012 +0900
   1.104 +diff -r 61ddc5520f14 model/dce-time.h
   1.105 +--- a/model/dce-time.h	Wed Apr 11 10:56:47 2012 +0900
   1.106 ++++ b/model/dce-time.h	Wed Apr 11 12:38:04 2012 +0900
   1.107  @@ -3,6 +3,7 @@
   1.108   
   1.109   #include "sys/dce-time.h"
   1.110 @@ -154,9 +153,9 @@
   1.111   	
   1.112   #ifdef __cplusplus
   1.113   }
   1.114 -diff -r e503e546d382 model/dce.cc
   1.115 ---- a/model/dce.cc	Mon Apr 09 10:03:33 2012 +0900
   1.116 -+++ b/model/dce.cc	Wed Apr 11 09:28:15 2012 +0900
   1.117 +diff -r 61ddc5520f14 model/dce.cc
   1.118 +--- a/model/dce.cc	Wed Apr 11 10:56:47 2012 +0900
   1.119 ++++ b/model/dce.cc	Wed Apr 11 12:38:04 2012 +0900
   1.120  @@ -22,6 +22,8 @@
   1.121   #include <getopt.h>
   1.122   #include <limits.h>
   1.123 @@ -266,9 +265,9 @@
   1.124   #ifdef HAVE_GETCPUFEATURES
   1.125   extern "C"
   1.126   {
   1.127 -diff -r e503e546d382 model/elf-cache.cc
   1.128 ---- a/model/elf-cache.cc	Mon Apr 09 10:03:33 2012 +0900
   1.129 -+++ b/model/elf-cache.cc	Wed Apr 11 09:28:15 2012 +0900
   1.130 +diff -r 61ddc5520f14 model/elf-cache.cc
   1.131 +--- a/model/elf-cache.cc	Wed Apr 11 10:56:47 2012 +0900
   1.132 ++++ b/model/elf-cache.cc	Wed Apr 11 12:38:04 2012 +0900
   1.133  @@ -26,6 +26,9 @@
   1.134     overriden.from = "libpthread.so.0";
   1.135     overriden.to = "libpthread-ns3.so";
   1.136 @@ -279,20 +278,9 @@
   1.137   }
   1.138   
   1.139   std::string
   1.140 -diff -r e503e546d382 model/libc-dce.cc
   1.141 ---- a/model/libc-dce.cc	Mon Apr 09 10:03:33 2012 +0900
   1.142 -+++ b/model/libc-dce.cc	Wed Apr 11 09:28:15 2012 +0900
   1.143 -@@ -52,6 +52,7 @@
   1.144 - #include <netdb.h>
   1.145 - #include <net/if.h>
   1.146 - #include <netinet/in.h>
   1.147 -+#include <netinet/ether.h>
   1.148 - #include <poll.h>
   1.149 - #include <semaphore.h>
   1.150 - #include <signal.h>
   1.151 -diff -r e503e546d382 model/libc-ns3.h
   1.152 ---- a/model/libc-ns3.h	Mon Apr 09 10:03:33 2012 +0900
   1.153 -+++ b/model/libc-ns3.h	Wed Apr 11 09:28:15 2012 +0900
   1.154 +diff -r 61ddc5520f14 model/libc-ns3.h
   1.155 +--- a/model/libc-ns3.h	Wed Apr 11 10:56:47 2012 +0900
   1.156 ++++ b/model/libc-ns3.h	Wed Apr 11 12:38:04 2012 +0900
   1.157  @@ -73,6 +73,7 @@
   1.158   NATIVE (ntohl)
   1.159   NATIVE (ntohs)
   1.160 @@ -367,17 +355,17 @@
   1.161   
   1.162   // setjmp.h
   1.163   NATIVE (__sigsetjmp)
   1.164 -diff -r e503e546d382 model/librt-ns3.version
   1.165 +diff -r 61ddc5520f14 model/librt-ns3.version
   1.166  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   1.167 -+++ b/model/librt-ns3.version	Wed Apr 11 09:28:15 2012 +0900
   1.168 ++++ b/model/librt-ns3.version	Wed Apr 11 12:38:04 2012 +0900
   1.169  @@ -0,0 +1,4 @@
   1.170  +NS3 {
   1.171  +global:
   1.172  +	librt_setup;
   1.173  +};
   1.174 -diff -r e503e546d382 model/linux-socket-fd-factory.cc
   1.175 ---- a/model/linux-socket-fd-factory.cc	Mon Apr 09 10:03:33 2012 +0900
   1.176 -+++ b/model/linux-socket-fd-factory.cc	Wed Apr 11 09:28:15 2012 +0900
   1.177 +diff -r 61ddc5520f14 model/linux-socket-fd-factory.cc
   1.178 +--- a/model/linux-socket-fd-factory.cc	Wed Apr 11 10:56:47 2012 +0900
   1.179 ++++ b/model/linux-socket-fd-factory.cc	Wed Apr 11 12:38:04 2012 +0900
   1.180  @@ -464,6 +464,7 @@
   1.181   void
   1.182   LinuxSocketFdFactory::SetTask (std::string path, std::string value)
   1.183 @@ -394,20 +382,9 @@
   1.184   
   1.185     while (!m_earlySysfs.empty ())
   1.186       {
   1.187 -diff -r e503e546d382 model/linux-socket-fd.cc
   1.188 ---- a/model/linux-socket-fd.cc	Mon Apr 09 10:03:33 2012 +0900
   1.189 -+++ b/model/linux-socket-fd.cc	Wed Apr 11 09:28:15 2012 +0900
   1.190 -@@ -177,6 +177,7 @@
   1.191 -       return 0;
   1.192 -       break;
   1.193 -     default:
   1.194 -+      return 0;
   1.195 -       //XXX commands missing
   1.196 -       NS_FATAL_ERROR ("fcntl not implemented on socket");
   1.197 -       return -1;
   1.198 -diff -r e503e546d382 model/net/dce-if.h
   1.199 ---- a/model/net/dce-if.h	Mon Apr 09 10:03:33 2012 +0900
   1.200 -+++ b/model/net/dce-if.h	Wed Apr 11 09:28:15 2012 +0900
   1.201 +diff -r 61ddc5520f14 model/net/dce-if.h
   1.202 +--- a/model/net/dce-if.h	Wed Apr 11 10:56:47 2012 +0900
   1.203 ++++ b/model/net/dce-if.h	Wed Apr 11 12:38:04 2012 +0900
   1.204  @@ -7,6 +7,7 @@
   1.205   #endif
   1.206   
   1.207 @@ -416,22 +393,20 @@
   1.208   
   1.209   
   1.210   #ifdef __cplusplus
   1.211 -diff -r e503e546d382 model/ns3-socket-fd-factory.cc
   1.212 ---- a/model/ns3-socket-fd-factory.cc	Mon Apr 09 10:03:33 2012 +0900
   1.213 -+++ b/model/ns3-socket-fd-factory.cc	Wed Apr 11 09:28:15 2012 +0900
   1.214 -@@ -142,7 +142,8 @@
   1.215 -     }
   1.216 +diff -r 61ddc5520f14 model/ns3-socket-fd-factory.cc
   1.217 +--- a/model/ns3-socket-fd-factory.cc	Wed Apr 11 10:56:47 2012 +0900
   1.218 ++++ b/model/ns3-socket-fd-factory.cc	Wed Apr 11 12:38:04 2012 +0900
   1.219 +@@ -143,6 +143,7 @@
   1.220     else
   1.221       {
   1.222 --      NS_FATAL_ERROR ("unsupported domain");
   1.223 -+      //      NS_FATAL_ERROR ("unsupported domain");
   1.224 +       NS_FATAL_ERROR ("unsupported domain");
   1.225  +      return 0;
   1.226       }
   1.227   
   1.228     return socket;
   1.229 -diff -r e503e546d382 model/sys/dce-socket.h
   1.230 ---- a/model/sys/dce-socket.h	Mon Apr 09 10:03:33 2012 +0900
   1.231 -+++ b/model/sys/dce-socket.h	Wed Apr 11 09:28:15 2012 +0900
   1.232 +diff -r 61ddc5520f14 model/sys/dce-socket.h
   1.233 +--- a/model/sys/dce-socket.h	Wed Apr 11 10:56:47 2012 +0900
   1.234 ++++ b/model/sys/dce-socket.h	Wed Apr 11 12:38:04 2012 +0900
   1.235  @@ -28,6 +28,7 @@
   1.236   ssize_t dce_sendmsg(int s, const struct msghdr *msg, int flags);
   1.237   int dce_getsockname(int s, struct sockaddr *name, socklen_t *namelen);
   1.238 @@ -440,18 +415,34 @@
   1.239   
   1.240   #ifdef __cplusplus
   1.241   }
   1.242 -diff -r e503e546d382 wscript
   1.243 ---- a/wscript	Mon Apr 09 10:03:33 2012 +0900
   1.244 -+++ b/wscript	Wed Apr 11 09:28:15 2012 +0900
   1.245 -@@ -26,7 +26,7 @@
   1.246 -     ns3waf.check_modules(conf, ['point-to-point', 'tap-bridge', 'netanim'], mandatory = False)
   1.247 -     ns3waf.check_modules(conf, ['wifi', 'point-to-point', 'csma', 'mobility'], mandatory = False)
   1.248 -     ns3waf.check_modules(conf, ['point-to-point-layout'], mandatory = False)
   1.249 --    ns3waf.check_modules(conf, ['topology-read', 'applications'], mandatory = False)
   1.250 -+    ns3waf.check_modules(conf, ['topology-read', 'applications', 'visualizer'], mandatory = False)
   1.251 -     conf.check_tool('compiler_cc')
   1.252 -     conf.check(header_name='stdint.h', define_name='HAVE_STDINT_H', mandatory=False)
   1.253 -     conf.check(header_name='inttypes.h', define_name='HAVE_INTTYPES_H', mandatory=False)
   1.254 +diff -r 61ddc5520f14 test/test-select.cc
   1.255 +--- a/test/test-select.cc	Wed Apr 11 10:56:47 2012 +0900
   1.256 ++++ b/test/test-select.cc	Wed Apr 11 12:38:04 2012 +0900
   1.257 +@@ -43,9 +43,20 @@
   1.258 +   struct timeval timeout =
   1.259 +   { 0, 0 };
   1.260 +   int nfds = select (timerfd + 1, &fds, NULL, NULL, &timeout);
   1.261 +-  close (timerfd);
   1.262 +   // no fds must be ready and select() should complete without errors
   1.263 +   TEST_ASSERT_EQUAL (nfds, 0);
   1.264 ++
   1.265 ++  timeout.tv_sec = 1;
   1.266 ++  timeout.tv_usec = 0;
   1.267 ++  // select(2): 
   1.268 ++  // Some  code  calls  select() with all three sets empty, nfds zero, and a
   1.269 ++  // non-NULL timeout as a fairly portable way to sleep with subsecond 
   1.270 ++  // precision.
   1.271 ++  nfds = select (0, &fds, NULL, NULL, &timeout);
   1.272 ++  // no fds must be ready and select() should complete without errors
   1.273 ++  TEST_ASSERT_EQUAL (nfds, 0);
   1.274 ++
   1.275 ++  close (timerfd);
   1.276 + }
   1.277 + 
   1.278 + static bool
   1.279 +diff -r 61ddc5520f14 wscript
   1.280 +--- a/wscript	Wed Apr 11 10:56:47 2012 +0900
   1.281 ++++ b/wscript	Wed Apr 11 12:38:04 2012 +0900
   1.282  @@ -71,6 +71,17 @@
   1.283           conf.end_msg(libpthread, True)
   1.284       conf.env['LIBPTHREAD_FILE'] = libpthread