12
|
1 |
diff -r 4ab96eb6171d model/linux-socket-fd.cc
|
|
2 |
--- a/model/linux-socket-fd.cc Thu Mar 29 13:58:26 2012 +0900
|
|
3 |
+++ b/model/linux-socket-fd.cc Fri Apr 06 15:16:09 2012 +0900
|
|
4 |
@@ -215,4 +215,10 @@
|
|
5 |
return m_factory->Poll (m_socket, ptable);
|
|
6 |
}
|
|
7 |
|
|
8 |
+int
|
|
9 |
+LinuxSocketFd::Ftruncate (off_t length)
|
|
10 |
+{
|
|
11 |
+ return -1;
|
|
12 |
+}
|
|
13 |
+
|
|
14 |
} // namespace ns3
|
|
15 |
diff -r 4ab96eb6171d model/linux-socket-fd.h
|
|
16 |
--- a/model/linux-socket-fd.h Thu Mar 29 13:58:26 2012 +0900
|
|
17 |
+++ b/model/linux-socket-fd.h Fri Apr 06 15:16:09 2012 +0900
|
|
18 |
@@ -49,6 +49,7 @@
|
|
19 |
virtual int Gettime (struct itimerspec *cur_value) const;
|
|
20 |
|
|
21 |
virtual bool HangupReceived (void) const;
|
|
22 |
+ virtual int Ftruncate(off_t);
|
|
23 |
|
|
24 |
virtual int Poll (PollTable* ptable);
|
|
25 |
|
|
26 |
diff -r 4ab96eb6171d model/ns3-socket-fd-factory.cc
|
|
27 |
--- a/model/ns3-socket-fd-factory.cc Thu Mar 29 13:58:26 2012 +0900
|
|
28 |
+++ b/model/ns3-socket-fd-factory.cc Fri Apr 06 15:16:09 2012 +0900
|
|
29 |
@@ -140,6 +140,20 @@
|
|
30 |
break;
|
|
31 |
}
|
|
32 |
}
|
|
33 |
+ else if (domain == PF_INET6)
|
|
34 |
+ {
|
|
35 |
+ switch (type) {
|
|
36 |
+ case SOCK_RAW: {
|
|
37 |
+ TypeId tid = TypeId::LookupByName ("ns3::Ipv6RawSocketFactory");
|
|
38 |
+ Ptr<SocketFactory> factory = GetObject<SocketFactory> (tid);
|
|
39 |
+ sock = factory->CreateSocket ();
|
|
40 |
+ sock->SetAttribute ("Protocol", UintegerValue (protocol));
|
|
41 |
+ socket = new UnixDatagramSocketFd (sock);
|
|
42 |
+ } break;
|
|
43 |
+ default:
|
|
44 |
+ break;
|
|
45 |
+ }
|
|
46 |
+ }
|
|
47 |
else
|
|
48 |
{
|
|
49 |
// NS_FATAL_ERROR ("unsupported domain");
|
|
50 |
diff -r 4ab96eb6171d model/unix-socket-fd.cc
|
|
51 |
--- a/model/unix-socket-fd.cc Thu Mar 29 13:58:26 2012 +0900
|
|
52 |
+++ b/model/unix-socket-fd.cc Fri Apr 06 15:16:09 2012 +0900
|
|
53 |
@@ -33,6 +33,7 @@
|
|
54 |
#include "ns3/boolean.h"
|
|
55 |
#include "ns3/simulator.h"
|
|
56 |
#include "ns3/netlink-socket-address.h"
|
|
57 |
+#include <linux/netlink.h>
|
|
58 |
#include <fcntl.h>
|
|
59 |
#include <errno.h>
|
|
60 |
#include <linux/icmp.h> // need ICMP_FILTER
|
|
61 |
diff -r 4ab96eb6171d wscript
|
|
62 |
--- a/wscript Thu Mar 29 13:58:26 2012 +0900
|
|
63 |
+++ b/wscript Fri Apr 06 15:16:09 2012 +0900
|
|
64 |
@@ -240,17 +240,10 @@
|
|
65 |
target='bin/dce-iperf',
|
|
66 |
source=['example/dce-iperf.cc', 'example/ccnx/misc-tools.cc'])
|
|
67 |
|
|
68 |
- module.add_example(needed = ['core', 'internet', 'dce', 'point-to-point', 'point-to-point-layout'],
|
|
69 |
- target='bin/dce-zebra-simple',
|
|
70 |
- source=['example/dce-zebra-simple.cc'])
|
|
71 |
-
|
|
72 |
module.add_example(needed = ['core', 'internet', 'dce' ],
|
|
73 |
target='bin/dce-bash-simple',
|
|
74 |
source=['example/bash/dce-bash-simple.cc'])
|
|
75 |
|
|
76 |
- module.add_example(needed = ['core', 'internet', 'dce', 'point-to-point', 'applications', 'topology-read', 'visualizer'],
|
|
77 |
- target='bin/dce-quagga-ospfd-rocketfuel',
|
|
78 |
- source=['example/dce-quagga-ospfd-rocketfuel.cc'])
|
|
79 |
|
|
80 |
def build_dce_kernel_examples(module):
|
|
81 |
module.add_example(needed = ['core', 'network', 'dce'],
|
|
82 |
@@ -261,33 +254,6 @@
|
|
83 |
target='bin/dce-linux',
|
|
84 |
source=['example/dce-linux.cc'])
|
|
85 |
|
|
86 |
- module.add_example(needed = ['core', 'internet', 'dce', 'point-to-point'],
|
|
87 |
- target='bin/dce-quagga-ospfd',
|
|
88 |
- source=['example/dce-quagga-ospfd.cc'])
|
|
89 |
-
|
|
90 |
- module.add_example(needed = ['core', 'internet', 'dce', 'point-to-point', 'visualizer', 'topology-read'],
|
|
91 |
- target='bin/dce-quagga-bgpd-caida',
|
|
92 |
- source=['example/dce-quagga-bgpd-caida.cc'])
|
|
93 |
-
|
|
94 |
- module.add_example(needed = ['core', 'internet', 'dce', 'point-to-point'],
|
|
95 |
- target='bin/dce-quagga-bgpd',
|
|
96 |
- source=['example/dce-quagga-bgpd.cc'])
|
|
97 |
-
|
|
98 |
- module.add_example(needed = ['core', 'internet', 'dce', 'csma', 'mobility', 'wifi', 'visualizer'],
|
|
99 |
- target='bin/dce-mip6d',
|
|
100 |
- source=['example/dce-mip6d.cc'])
|
|
101 |
-
|
|
102 |
- module.add_example(needed = ['core', 'internet', 'dce', 'csma', 'mobility', 'wifi', 'visualizer'],
|
|
103 |
- target='bin/dce-dsmip6d',
|
|
104 |
- source=['example/dce-dsmip6d.cc'])
|
|
105 |
-
|
|
106 |
- module.add_example(needed = ['core', 'internet', 'dce', 'csma', 'mobility', 'wifi', 'visualizer', 'topology-read'],
|
|
107 |
- target='bin/dce-fga',
|
|
108 |
- source=['example/dce-fga.cc'])
|
|
109 |
-
|
|
110 |
- module.add_example(needed = ['core', 'internet', 'dce', 'csma', 'mobility', 'wifi', 'visualizer', 'topology-read'],
|
|
111 |
- target='bin/dce-fga-crawdad',
|
|
112 |
- source=['example/dce-fga-crawdad.cc'])
|
|
113 |
|
|
114 |
def build(bld):
|
|
115 |
build_netlink(bld)
|
|
116 |
@@ -374,8 +340,6 @@
|
|
117 |
'helper/ipv4-dce-routing-helper.cc',
|
|
118 |
'helper/dce-manager-helper.cc',
|
|
119 |
'helper/dce-application-helper.cc',
|
|
120 |
- 'helper/quagga-helper.cc',
|
|
121 |
- 'helper/mip6d-helper.cc',
|
|
122 |
]
|
|
123 |
module_headers = [
|
|
124 |
'model/dce-manager.h',
|
|
125 |
@@ -385,10 +349,9 @@
|
|
126 |
'model/loader-factory.h',
|
|
127 |
'model/dce-application.h',
|
|
128 |
'model/ipv4-dce-routing.h',
|
|
129 |
+ 'helper/ipv4-dce-routing-helper.h',
|
|
130 |
'helper/dce-manager-helper.h',
|
|
131 |
'helper/dce-application-helper.h',
|
|
132 |
- 'helper/quagga-helper.h',
|
|
133 |
- 'helper/mip6d-helper.h',
|
|
134 |
]
|
|
135 |
module_source = module_source + kernel_source
|
|
136 |
module_headers = module_headers + kernel_headers
|