--- a/120410-dce-umip-support.patch Wed May 30 11:24:40 2012 +0900
+++ b/120410-dce-umip-support.patch Sat Jun 02 00:29:00 2012 +0900
@@ -1,8 +1,8 @@
support umip(mip6d) with ns-3-linux for NEMO/MIP6
-diff -r ab266495f633 model/dce-fd.cc
---- a/model/dce-fd.cc Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/dce-fd.cc Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 model/dce-fd.cc
+--- a/model/dce-fd.cc Sat Jun 02 00:22:49 2012 +0900
++++ b/model/dce-fd.cc Sat Jun 02 00:27:53 2012 +0900
@@ -367,11 +367,30 @@
}
@@ -34,9 +34,9 @@
int dce_bind (int fd, const struct sockaddr *my_addr, socklen_t addrlen)
{
Thread *current = Current ();
-diff -r ab266495f633 model/dce-manager.cc
---- a/model/dce-manager.cc Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/dce-manager.cc Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 model/dce-manager.cc
+--- a/model/dce-manager.cc Sat Jun 02 00:22:49 2012 +0900
++++ b/model/dce-manager.cc Sat Jun 02 00:27:53 2012 +0900
@@ -1096,6 +1096,22 @@
libpthread_setup = (void (*)(const struct Libc *))(symbol);
libpthread_setup (libc);
@@ -60,9 +60,9 @@
// finally, call into 'main'.
h = ld->Load (filename, RTLD_GLOBAL);
-diff -r ab266495f633 model/dce-poll.cc
---- a/model/dce-poll.cc Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/dce-poll.cc Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 model/dce-poll.cc
+--- a/model/dce-poll.cc Sat Jun 02 00:22:49 2012 +0900
++++ b/model/dce-poll.cc Sat Jun 02 00:27:53 2012 +0900
@@ -180,7 +180,12 @@
}
}
@@ -77,9 +77,9 @@
{
current->err = EINVAL;
return -1;
-diff -r ab266495f633 model/dce-signal.cc
---- a/model/dce-signal.cc Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/dce-signal.cc Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 model/dce-signal.cc
+--- a/model/dce-signal.cc Sat Jun 02 00:22:49 2012 +0900
++++ b/model/dce-signal.cc Sat Jun 02 00:27:53 2012 +0900
@@ -3,6 +3,7 @@
#include "process.h"
#include "ns3/log.h"
@@ -106,9 +106,9 @@
int dce_sigprocmask(int how, const sigset_t *set, sigset_t *oldset)
{
Thread *current = Current ();
-diff -r ab266495f633 model/dce-signal.h
---- a/model/dce-signal.h Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/dce-signal.h Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 model/dce-signal.h
+--- a/model/dce-signal.h Sat Jun 02 00:22:49 2012 +0900
++++ b/model/dce-signal.h Sat Jun 02 00:27:53 2012 +0900
@@ -17,6 +17,7 @@
int dce_pthread_kill (pthread_t thread, int sig);
void dce_abort ();
@@ -117,9 +117,9 @@
#ifdef __cplusplus
}
-diff -r ab266495f633 model/dce-string.cc
---- a/model/dce-string.cc Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/dce-string.cc Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 model/dce-string.cc
+--- a/model/dce-string.cc Sat Jun 02 00:22:49 2012 +0900
++++ b/model/dce-string.cc Sat Jun 02 00:27:53 2012 +0900
@@ -26,3 +26,9 @@
/// \todo Do actual checking
strcpy (__dest, __src);
@@ -130,9 +130,9 @@
+ return strrchr (s, c);
+}
+
-diff -r ab266495f633 model/dce-string.h
---- a/model/dce-string.h Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/dce-string.h Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 model/dce-string.h
+--- a/model/dce-string.h Sat Jun 02 00:22:49 2012 +0900
++++ b/model/dce-string.h Sat Jun 02 00:27:53 2012 +0900
@@ -12,6 +12,7 @@
char *dce___strcpy_chk (char *__restrict __dest,
const char *__restrict __src,
@@ -141,9 +141,9 @@
#ifdef __cplusplus
}
-diff -r ab266495f633 model/dce-time.cc
---- a/model/dce-time.cc Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/dce-time.cc Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 model/dce-time.cc
+--- a/model/dce-time.cc Sat Jun 02 00:22:49 2012 +0900
++++ b/model/dce-time.cc Sat Jun 02 00:27:53 2012 +0900
@@ -54,3 +54,12 @@
return asctime_r (tm, Current ()->process->asctime_result);
@@ -157,9 +157,9 @@
+ *tp = UtilsTimeToTimespec (UtilsSimulationTimeToTime (Now ()));
+ return 0;
+}
-diff -r ab266495f633 model/dce-time.h
---- a/model/dce-time.h Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/dce-time.h Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 model/dce-time.h
+--- a/model/dce-time.h Sat Jun 02 00:22:49 2012 +0900
++++ b/model/dce-time.h Sat Jun 02 00:27:53 2012 +0900
@@ -3,6 +3,7 @@
#include "sys/dce-time.h"
@@ -177,9 +177,9 @@
#ifdef __cplusplus
}
-diff -r ab266495f633 model/dce.cc
---- a/model/dce.cc Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/dce.cc Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 model/dce.cc
+--- a/model/dce.cc Sat Jun 02 00:22:49 2012 +0900
++++ b/model/dce.cc Sat Jun 02 00:27:53 2012 +0900
@@ -22,6 +22,8 @@
#include <getopt.h>
#include <limits.h>
@@ -289,9 +289,9 @@
#ifdef HAVE_GETCPUFEATURES
extern "C"
{
-diff -r ab266495f633 model/elf-cache.cc
---- a/model/elf-cache.cc Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/elf-cache.cc Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 model/elf-cache.cc
+--- a/model/elf-cache.cc Sat Jun 02 00:22:49 2012 +0900
++++ b/model/elf-cache.cc Sat Jun 02 00:27:53 2012 +0900
@@ -26,6 +26,9 @@
overriden.from = "libpthread.so.0";
overriden.to = "libpthread-ns3.so";
@@ -302,64 +302,69 @@
}
std::string
-diff -r ab266495f633 model/libc-ns3.h
---- a/model/libc-ns3.h Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/libc-ns3.h Thu Apr 26 09:56:01 2012 +0900
-@@ -73,6 +73,7 @@
- NATIVE (ntohl)
- NATIVE (ntohs)
- DCE (socket)
-+DCE (socketpair)
- DCE (getsockname)
- DCE (getpeername)
- DCE (bind)
-@@ -99,7 +100,8 @@
- NATIVE (strnlen)
- // because C++ defines both const and non-const functions
+diff -r 056220694d84 model/libc-ns3.h
+--- a/model/libc-ns3.h Sat Jun 02 00:22:49 2012 +0900
++++ b/model/libc-ns3.h Sat Jun 02 00:27:53 2012 +0900
+@@ -124,7 +124,8 @@
+ NATIVE (strcspn)
+ NATIVE (strspn)
NATIVE_EXPLICIT (strchr, char* (*) (char *, int))
-NATIVE_EXPLICIT (strrchr, char * (*) (char *, int))
+NATIVE_EXPLICIT (strrchr, const char * (*) (const char *, int))
+//DCE (strrchr)
NATIVE (strcasecmp)
NATIVE (strncasecmp)
-
-@@ -214,6 +216,7 @@
- DCE (setregid)
- DCE (setresuid)
- DCE (setresgid)
+ DCE_WITH_ALIAS (strdup) // because C++ defines both const and non-const functions
+@@ -149,6 +150,7 @@
+ NATIVE (htons)
+ NATIVE (ntohl)
+ NATIVE (ntohs)
+NATIVE (lockf)
NATIVE (inet_aton)
- NATIVE (inet_ntoa)
- DCE (inet_ntop)
-@@ -223,6 +226,8 @@
- NATIVE (inet_lnaof)
+ NATIVE (inet_addr)
+ NATIVE (inet_network)
+@@ -158,9 +160,11 @@
NATIVE (inet_netof)
- NATIVE (inet_addr)
+ DCE (inet_ntop)
+ NATIVE (inet_pton)
+NATIVE (inet6_opt_find)
-+NATIVE (ether_aton)
- DCE (mmap)
- DCE (mmap64)
- DCE (munmap)
-@@ -254,6 +259,7 @@
- DCE (realloc)
- DCE (gettimeofday)
- DCE (time)
-+DCE (sysinfo)
- DCE (isatty)
- DCE (send)
- DCE (sendto)
-@@ -279,6 +285,7 @@
- NATIVE (sigaddset)
+
+ // SYS/SOCKET.H
+ DCE (socket)
++DCE (socketpair)
+ DCE (getsockname)
+ DCE (getpeername)
+ DCE (bind)
+@@ -312,7 +316,7 @@
+ NATIVE_WITH_ALIAS2 (gmtime_r, localtime_r)
+ NATIVE (mktime)
+ NATIVE (strftime)
+-NATIVE_WITH_ALIAS2 (clock_gettime, __vdso_clock_gettime) // this is wrong. clock should be changed to DCE implementation
++DCE_WITH_ALIAS2 (clock_gettime, __vdso_clock_gettime)
+
+ // SYS/TIME.H
+ DCE (gettimeofday)
+@@ -320,6 +324,8 @@
+ DCE (setitimer)
+ DCE (getitimer)
+
++DCE (sysinfo)
++
+ // SYS/MAP.H
+ DCE (mmap)
+ DCE (mmap64)
+@@ -347,6 +353,7 @@
NATIVE (sigdelset)
NATIVE (sigismember)
+ DCE (sigprocmask)
+DCE (sigwait)
- DCE_WITH_ALIAS2(strtol, __strtol_internal)
- DCET (long long int, strtoll)
- DCE (strtoul)
-@@ -343,6 +350,13 @@
- DCE (pthread_cond_wait)
- DCE (pthread_condattr_destroy)
- DCE (pthread_condattr_init)
+
+ // PTHREAD.H
+ DCE (pthread_create)
+@@ -377,6 +384,13 @@
+ DCE (pthread_cond_wait)
+ DCE (pthread_condattr_destroy)
+ DCE (pthread_condattr_init)
+NATIVE (pthread_rwlock_init)
+NATIVE (pthread_rwlock_unlock)
+NATIVE (pthread_rwlock_wrlock)
@@ -368,38 +373,35 @@
+NATIVE (pthread_setcancelstate)
+NATIVE (pthread_sigmask)
- // netdb.h
- DCE (gethostbyname)
-@@ -381,6 +395,7 @@
- DCE (timerfd_gettime)
+ // SEMAPHORE.H
+ DCE (sem_init)
+@@ -420,6 +434,7 @@
- DCE (if_nametoindex)
-+DCE (if_indextoname)
- DCE (fork)
+ // NET/IF.H
+ DCE (if_nametoindex)
++DCE (if_indextoname)
- NATIVE (qsort)
-@@ -442,8 +457,8 @@
- NATIVE (pathconf)
+ // DIRENT.H
+ DCE (opendir)
+@@ -479,6 +494,7 @@
- // this is wrong. clock should be changed to DCE implementation
--//DCE (__vdso_clock_gettime)
--NATIVE_WITH_ALIAS2 (clock_gettime, __vdso_clock_gettime)
-+DCE_WITH_ALIAS2 (clock_gettime, __vdso_clock_gettime)
-+//NATIVE_WITH_ALIAS2 (clock_gettime, __vdso_clock_gettime)
+ // NETINET/ETHER.H
+ NATIVE (ether_aton_r)
++NATIVE (ether_aton)
- // setjmp.h
- NATIVE (__sigsetjmp)
-diff -r ab266495f633 model/librt-ns3.version
+ ///////////////////// END OF INVENTAIRE //////////////////////////////////////////////////
+
+diff -r 056220694d84 model/librt-ns3.version
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/model/librt-ns3.version Thu Apr 26 09:56:01 2012 +0900
++++ b/model/librt-ns3.version Sat Jun 02 00:27:53 2012 +0900
@@ -0,0 +1,4 @@
+NS3 {
+global:
+ librt_setup;
+};
-diff -r ab266495f633 model/linux-socket-fd-factory.cc
---- a/model/linux-socket-fd-factory.cc Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/linux-socket-fd-factory.cc Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 model/linux-socket-fd-factory.cc
+--- a/model/linux-socket-fd-factory.cc Sat Jun 02 00:22:49 2012 +0900
++++ b/model/linux-socket-fd-factory.cc Sat Jun 02 00:27:53 2012 +0900
@@ -464,6 +464,7 @@
void
LinuxSocketFdFactory::SetTask (std::string path, std::string value)
@@ -416,9 +418,9 @@
while (!m_earlySysfs.empty ())
{
-diff -r ab266495f633 model/net/dce-if.h
---- a/model/net/dce-if.h Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/net/dce-if.h Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 model/net/dce-if.h
+--- a/model/net/dce-if.h Sat Jun 02 00:22:49 2012 +0900
++++ b/model/net/dce-if.h Sat Jun 02 00:27:53 2012 +0900
@@ -7,6 +7,7 @@
#endif
@@ -427,9 +429,9 @@
#ifdef __cplusplus
-diff -r ab266495f633 model/ns3-socket-fd-factory.cc
---- a/model/ns3-socket-fd-factory.cc Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/ns3-socket-fd-factory.cc Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 model/ns3-socket-fd-factory.cc
+--- a/model/ns3-socket-fd-factory.cc Sat Jun 02 00:22:49 2012 +0900
++++ b/model/ns3-socket-fd-factory.cc Sat Jun 02 00:27:53 2012 +0900
@@ -166,6 +166,7 @@
else
{
@@ -438,9 +440,9 @@
}
return socket;
-diff -r ab266495f633 model/sys/dce-socket.h
---- a/model/sys/dce-socket.h Mon Apr 23 17:29:23 2012 +0900
-+++ b/model/sys/dce-socket.h Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 model/sys/dce-socket.h
+--- a/model/sys/dce-socket.h Sat Jun 02 00:22:49 2012 +0900
++++ b/model/sys/dce-socket.h Sat Jun 02 00:27:53 2012 +0900
@@ -28,6 +28,7 @@
ssize_t dce_sendmsg(int s, const struct msghdr *msg, int flags);
int dce_getsockname(int s, struct sockaddr *name, socklen_t *namelen);
@@ -449,9 +451,9 @@
#ifdef __cplusplus
}
-diff -r ab266495f633 test/test-select.cc
---- a/test/test-select.cc Mon Apr 23 17:29:23 2012 +0900
-+++ b/test/test-select.cc Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 test/test-select.cc
+--- a/test/test-select.cc Sat Jun 02 00:22:49 2012 +0900
++++ b/test/test-select.cc Sat Jun 02 00:27:53 2012 +0900
@@ -43,9 +43,20 @@
struct timeval timeout =
{ 0, 0 };
@@ -474,9 +476,9 @@
}
static bool
-diff -r ab266495f633 wscript
---- a/wscript Mon Apr 23 17:29:23 2012 +0900
-+++ b/wscript Thu Apr 26 09:56:01 2012 +0900
+diff -r 056220694d84 wscript
+--- a/wscript Sat Jun 02 00:22:49 2012 +0900
++++ b/wscript Sat Jun 02 00:27:53 2012 +0900
@@ -71,6 +71,17 @@
conf.end_msg(libpthread, True)
conf.env['LIBPTHREAD_FILE'] = libpthread
@@ -495,7 +497,7 @@
conf.find_program('readversiondef', var='READVERSIONDEF', mandatory=True)
if Options.options.kernel_stack is not None and os.path.isdir(Options.options.kernel_stack):
-@@ -426,6 +437,11 @@
+@@ -429,6 +440,11 @@
rule='%s %s | cat ${SRC[0].abspath()} - > ${TGT}' %
(bld.env['READVERSIONDEF'], bld.env['LIBPTHREAD_FILE']))
@@ -507,7 +509,7 @@
bld.add_group('dce_use_version_files')
# The very small libc used to replace the glibc
-@@ -445,3 +461,13 @@
+@@ -448,3 +464,13 @@
linkflags=['-nostdlib', '-lc',
'-Wl,--version-script=' + os.path.join('model', 'libpthread.version'),
'-Wl,-soname=libpthread.so.0'])