Skip to content

Commit dabb6d6

Browse files
tbarbettekohler
authored andcommitted
conf/ip64-nat*.click: avoid multiple ToDevice
1 parent cede0be commit dabb6d6

File tree

4 files changed

+28
-68
lines changed

4 files changed

+28
-68
lines changed

conf/ip64-nat.click

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,12 @@ pt46 :: ProtocolTranslator46();
8484
FromDevice(eth0, 1)
8585
-> c;
8686

87+
q :: Queue(1024)
88+
-> td0 :: ToDevice(eth0);
89+
8790
c[0] -> nda
8891
//-> Print(nda, 200)
89-
-> Queue(1024)
90-
-> ToDevice(eth0);
92+
-> q;
9193
c[1] -> [1]nds;
9294
c[2] //-> Print(before-Strip, 200)
9395
-> Strip(14)
@@ -98,8 +100,7 @@ c[2] //-> Print(before-Strip, 200)
98100

99101
c[3] //-> Print(arr, 200)
100102
-> arr
101-
-> Queue(1024)
102-
-> ToDevice(eth0) ;
103+
-> q;
103104

104105
c[4] //-> Print(arp-reply, 200)
105106
->[1]arp;
@@ -111,7 +112,7 @@ c[5] //-> Print(c5-normal-ip-pkt, 200)
111112
-> rt;
112113

113114
c[6] //-> Print(c6-normal-ip-pkt, 200)
114-
->Discard;
115+
-> Discard;
115116

116117
rt[0] ->Print(rt0, 200) ->Discard;
117118
rt[1] //->Print(rt1, 200)
@@ -153,16 +154,7 @@ pt46[0] -> Print(after-pt460, 200)
153154
-> [1]at;
154155

155156
arp[0] -> Print(arp0, 200)
156-
-> ToDevice(eth0);
157+
-> q;
157158

158159
nds[0] //-> Print(nds, 200)
159-
-> ToDevice(eth0);
160-
161-
162-
163-
164-
165-
166-
167-
168-
160+
-> q;

conf/ip64-nat2.click

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,12 @@ pt46 :: ProtocolTranslator46();
8787
FromDevice(eth0, 1)
8888
-> c;
8989

90+
q :: Queue(1024)
91+
-> td0 :: ToDevice(eth0);
92+
9093
c[0] -> nda
9194
//-> Print(nda, 200)
92-
-> Queue(1024)
93-
-> ToDevice(eth0);
95+
-> q;
9496

9597
c[1] -> [1]nds;
9698

@@ -100,8 +102,7 @@ c[2] -> Strip(14)
100102
-> rt6;
101103

102104
c[3] -> arr
103-
-> Queue(1024)
104-
-> ToDevice(eth0) ;
105+
-> q;
105106

106107
c[4] //-> Print(arp-reply, 200)
107108
->[1]arp;
@@ -153,16 +154,7 @@ pt46[0] //-> Print(after-pt460, 200)
153154
-> [1]at;
154155

155156
arp[0] //-> Print(arp0, 200)
156-
-> ToDevice(eth0);
157+
-> q;
157158

158159
nds[0] //-> Print(nds, 200)
159-
-> ToDevice(eth0);
160-
161-
162-
163-
164-
165-
166-
167-
168-
160+
-> q;

conf/ip64-nat3.click

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ arp::ARPQuerier(18.26.4.116, 00:a0:c9:9c:fd:9e);
2626
arr::ARPResponder(18.26.4.116 00:a0:c9:9c:fd:9e);
2727
arr2::ARPResponder(18.26.4.17 00:a0:c9:9c:fd:9e);
2828

29-
q::Queue(1024);
30-
3129
nda :: IP6NDAdvertiser(
3230
3ffe:1ce1:2:0:200::1/128 00:A0:C9:9C:FD:9E,
3331
fe80::2a0:c9ff:fe9c:fd9e/128 00:A0:C9:9C:FD:9E);
@@ -88,10 +86,11 @@ pt46 :: ProtocolTranslator46();
8886
FromDevice(eth0, 1)
8987
-> c;
9088

91-
c[0] -> nda
89+
q :: Queue(1024)
90+
-> td0 :: ToDevice(eth0);
91+
92+
c[0] -> nda;
9293
//-> Print(nda, 200)
93-
-> Queue(1024)
94-
-> ToDevice(eth0);
9594

9695
c[1] -> [1]nds;
9796

@@ -106,8 +105,6 @@ c[3] -> arr
106105
c[4] -> arr2
107106
-> q;
108107

109-
q -> ToDevice(eth0) ;
110-
111108
c[5] //-> Print(arp-reply, 200)
112109
->[1]arp;
113110

@@ -163,16 +160,7 @@ pt46[0] -> Print(after-pt46, 200)
163160
-> [1]at;
164161

165162
arp[0] //-> Print(arp0, 200)
166-
-> ToDevice(eth0);
163+
-> q;
167164

168165
nds[0] -> Print(nds, 200)
169-
-> ToDevice(eth0);
170-
171-
172-
173-
174-
175-
176-
177-
178-
166+
-> q;

conf/ip64-nat4.click

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ arp::ARPQuerier(18.26.4.116, 00:a0:c9:9c:fd:9e);
2626
arr::ARPResponder(18.26.4.116 00:a0:c9:9c:fd:9e);
2727
arr2::ARPResponder(18.26.4.17 00:a0:c9:9c:fd:9e);
2828

29-
q::Queue(1024);
30-
3129
nda :: IP6NDAdvertiser(
3230
3ffe:1ce1:2:0:200::1/128 00:A0:C9:9C:FD:9E,
3331
fe80::2a0:c9ff:fe9c:fd9e/128 00:A0:C9:9C:FD:9E);
@@ -70,7 +68,6 @@ at :: AddressTranslator(
7068
1,
7169
0,
7270
3ffe:1ce1:2::1 ::18.26.4.17,
73-
7471
0)
7572

7673
//pt :: ProtocolTranslator();
@@ -80,10 +77,12 @@ pt46 :: ProtocolTranslator46();
8077
FromDevice(eth0, 1)
8178
-> c;
8279

80+
q :: Queue(1024)
81+
-> td0 :: ToDevice(eth0);
82+
8383
c[0] -> nda
8484
//-> Print(nda, 200)
85-
-> Queue(1024)
86-
-> ToDevice(eth0);
85+
-> q;
8786

8887
c[1] -> [1]nds;
8988

@@ -92,13 +91,11 @@ c[2] -> Strip(14)
9291
-> GetIP6Address(24)
9392
-> rt6;
9493

95-
c[3] -> arr
94+
c[3] -> arr
9695
-> q;
9796

9897
c[4] -> arr2
9998
-> q;
100-
101-
q -> ToDevice(eth0) ;
10299

103100
c[5] //-> Print(arp-reply, 200)
104101
->[1]arp;
@@ -155,16 +152,7 @@ pt46[0] -> Print(after-pt46, 200)
155152
-> [1]at;
156153

157154
arp[0] //-> Print(arp0, 200)
158-
-> ToDevice(eth0);
155+
-> q;
159156

160157
nds[0] -> Print(nds, 200)
161-
-> ToDevice(eth0);
162-
163-
164-
165-
166-
167-
168-
169-
170-
158+
-> q;

0 commit comments

Comments
 (0)