gateway: simplify stopping the cleanup timer
[olsrd.git] / lib / tas / data / show.lsp
1 <?lua
2
3  olsr_state = tas.olsr_get_info()
4
5 ?>
6
7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
8
9 <html>
10   <head>
11     <title>
12       OLSR State
13     </title>
14   </head>
15   <body>
16
17     <h2>Links</h2>
18
19     <table border="1">
20       <tr>
21         <td>
22           <b>Local</b>
23         </td>
24         <td>
25           <b>Remote</b>
26         </td>
27         <td>
28           <b>Main</b>
29         </td>
30         <td>
31           <b>Hysteresis</b>
32         </td>
33         <td>
34           <b>LQ</b>
35         </td>
36         <td>
37           <b>NLQ</b>
38         </td>
39         <td>
40           <b>ETX</b>
41         </td>
42       <tr>
43
44 <?lua
45
46 i = 0
47
48 while olsr_state["links"][i] do
49
50 ?>
51
52       <tr>
53         <td>
54           <?lua tas.write(olsr_state["links"][i]["local"]) ?>
55         </td>
56         <td>
57           <?lua tas.write(olsr_state["links"][i]["remote"]) ?>
58         </td>
59         <td>
60           <?lua tas.write(olsr_state["links"][i]["main"]) ?>
61         </td>
62         <td>
63           <?lua tas.write(olsr_state["links"][i]["hysteresis"]) ?>
64         </td>
65         <td>
66           <?lua tas.write(olsr_state["links"][i]["lq"]) ?>
67         </td>
68         <td>
69           <?lua tas.write(olsr_state["links"][i]["nlq"]) ?>
70         </td>
71         <td>
72           <?lua tas.write(olsr_state["links"][i]["etx"]) ?>
73         </td>
74       </tr>
75
76 <?lua
77
78 i = i + 1
79
80 end
81
82 ?>
83
84     </table>
85
86     <h2>Neighbors</h2>
87
88     <table border="1">
89       <tr>
90         <td>
91           <b>Main</b>
92         </td>
93         <td>
94           <b>Symmetric</b>
95         </td>
96         <td>
97           <b>MPR</b>
98         </td>
99         <td>
100           <b>MPRS</b>
101         </td>
102         <td>
103           <b>Willingness</b>
104         </td>
105         <td>
106           <b>2-Hop Neighbors</b>
107         </td>
108       <tr>
109
110 <?lua
111
112 i = 0
113
114 while olsr_state["neighbors"][i] do
115
116 ?>
117
118       <tr>
119         <td>
120           <?lua tas.write(olsr_state["neighbors"][i]["main"]) ?>
121         </td>
122         <td>
123           <?lua tas.write(olsr_state["neighbors"][i]["symmetric"]) ?>
124         </td>
125         <td>
126           <?lua tas.write(olsr_state["neighbors"][i]["mpr"]) ?>
127         </td>
128         <td>
129           <?lua tas.write(olsr_state["neighbors"][i]["mprs"]) ?>
130         </td>
131         <td>
132           <?lua tas.write(olsr_state["neighbors"][i]["willingness"]) ?>
133         </td>
134         <td>
135
136           <?lua
137
138            k = 0
139
140            while olsr_state["neighbors"][i]["neighbors2"][k] do
141
142             tas.write(olsr_state["neighbors"][i]["neighbors2"][k])
143
144           ?>
145
146           <br>
147
148           <?lua
149
150             k = k + 1
151
152            end
153
154           ?>
155
156         </td>
157       </tr>
158
159 <?lua
160
161 i = i + 1
162
163 end
164
165 ?>
166
167     </table>
168
169     <h2>Topology</h2>
170
171     <table border="1">
172       <tr>
173         <td>
174           <b>Main</b>
175         </td>
176         <td>
177           <b>Destination</b>
178         </td>
179         <td>
180           <b>ETX</b>
181         </td>
182       <tr>
183
184 <?lua
185
186 i = 0
187
188 while olsr_state["topology"][i] do
189
190 ?>
191
192       <tr>
193         <td>
194           <?lua tas.write(olsr_state["topology"][i]["main"]) ?>
195         </td>
196         <td>
197
198           <?lua
199
200            k = 0
201
202            while olsr_state["topology"][i]["destinations"][k] do
203
204             tas.write(olsr_state["topology"][i]["destinations"][k]["address"])
205
206           ?>
207
208           <br>
209
210           <?lua
211
212             k = k + 1
213
214            end
215
216           ?>
217
218         </td>
219         <td>
220
221           <?lua
222
223            k = 0
224
225            while olsr_state["topology"][i]["destinations"][k] do
226
227             tas.write(olsr_state["topology"][i]["destinations"][k]["etx"])
228
229           ?>
230
231           <br>
232
233           <?lua
234
235             k = k + 1
236
237            end
238
239           ?>
240
241         </td>
242       </tr>
243
244 <?lua
245
246 i = i + 1
247
248 end
249
250 ?>
251
252     </table>
253
254     <h2>Routes</h2>
255
256     <table border="1">
257       <tr>
258         <td>
259           <b>Destination</b>
260         </td>
261         <td>
262           <b>Gateway</b>
263         </td>
264         <td>
265           <b>Interface</b>
266         </td>
267         <td>
268           <b>Metric</b>
269         </td>
270       <tr>
271
272 <?lua
273
274 i = 0
275
276 while olsr_state["routes"][i] do
277
278 ?>
279
280       <tr>
281         <td>
282           <?lua tas.write(olsr_state["routes"][i]["destination"]) ?>
283         </td>
284         <td>
285           <?lua tas.write(olsr_state["routes"][i]["gateway"]) ?>
286         </td>
287         <td>
288           <?lua tas.write(olsr_state["routes"][i]["interface"]) ?>
289         </td>
290         <td>
291           <?lua tas.write(olsr_state["routes"][i]["metric"]) ?>
292         </td>
293       </tr>
294
295 <?lua
296
297 i = i + 1
298
299 end
300
301 ?>
302
303     </table>
304
305   </body>
306 </html>