Changeset 13926
- Timestamp:
- 02/17/10 14:38:46 (3 years ago)
- Location:
- src/router
- Files:
-
- 8 edited
-
httpd/visuals/chaps.c (modified) (1 diff)
-
httpd/visuals/pptp.c (modified) (1 diff)
-
kromo/dd-wrt/Status_Lan.asp (modified) (6 diffs)
-
kromo/dd-wrt/Status_Lan.live.asp (modified) (1 diff)
-
kromo/dd-wrt/lang_pack/english.js (modified) (1 diff)
-
kromo/dd-wrt/lang_pack/german.js (modified) (1 diff)
-
services/services/pppoeserver.c (modified) (2 diffs)
-
services/services/pptp.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/router/httpd/visuals/chaps.c
r12223 r13926 6 6 #include <broadcom.h> 7 7 #include <cy_conf.h> 8 9 10 void ej_dumppppoe(webs_t wp, int argc, char_t ** argv) 11 { 12 FILE *in = fopen("/tmp/pppoe_connected","rb"); 13 if (!in) 14 return; 15 char ifname[32]; 16 char local[32]; 17 char remote[32]; 18 char peer[64]; 19 int count=0; 20 while(fscanf(in,"%s %s %s %s %s %s",ifname,local,remote,peer)==6) 21 { 22 websWrite(wp,"%c\"%s\","%s\",\"%s\",\"%s\"", 23 count ? ',' : ' ',ifname,peer,local,remote); 24 count++; 25 if (feof(in)) 26 break; 27 } 28 29 fclose(in); 30 return; 31 } 8 32 9 33 /* -
src/router/httpd/visuals/pptp.c
r13919 r13926 20 20 return; 21 21 char ifname[32]; 22 char dev[32];23 char speed[32];24 char server[32];25 22 char local[32]; 26 23 char remote[32]; 24 char peer[64]; 27 25 int count=0; 28 while(fscanf(in,"%s %s %s %s %s %s",ifname, dev,speed,server,local,remote)==6)26 while(fscanf(in,"%s %s %s %s %s %s",ifname,local,remote,peer)==6) 29 27 { 30 websWrite(wp,"%c\"%s\", \"%s\",\"%s\"",31 count ? ',' : ' ',ifname, local,remote);28 websWrite(wp,"%c\"%s\","%s\",\"%s\",\"%s\"", 29 count ? ',' : ' ',ifname,peer,local,remote); 32 30 count++; 33 31 if (feof(in)) -
src/router/kromo/dd-wrt/Status_Lan.asp
r13922 r13926 24 24 if(!val.length) { 25 25 var cell = table.insertRow(-1).insertCell(-1); 26 cell.colSpan = 4;26 cell.colSpan = 5; 27 27 cell.align = "center"; 28 28 cell.innerHTML = "- " + share.none + " -"; … … 36 36 row.insertCell(-1).innerHTML = val[i]; // interface 37 37 38 row.insertCell(-1).innerHTML = val[i+1]; // local ip 39 40 row.insertCell(-1).innerHTML = val[i+2]; // remote ip 38 row.insertCell(-1).innerHTML = val[i+1]; // peer name 39 40 row.insertCell(-1).innerHTML = val[i+2]; // local ip 41 42 row.insertCell(-1).innerHTML = val[i+3]; // remote ip 41 43 42 44 var cell = row.insertCell(-1); 43 45 cell.className = "bin"; 44 46 cell.title = errmsg.err581; 45 eval("addEvent(cell, 'click', function() { deletepptp('" + val[i + 1] + "') })"); 47 eval("addEvent(cell, 'click', function() { deletepptp('" + val[i + 2] + "') })"); 48 } 49 } 50 51 function setPPPOETable() { 52 var val = arguments; 53 var table = document.getElementById("pppoe_table"); 54 cleanTable(table); 55 if(!val.length) { 56 var cell = table.insertRow(-1).insertCell(-1); 57 cell.colSpan = 5; 58 cell.align = "center"; 59 cell.innerHTML = "- " + share.none + " -"; 60 return; 61 } 62 for(var i = 0; i < val.length; i = i + 4) { 63 64 var row = table.insertRow(-1); 65 row.style.height = "15px"; 66 67 row.insertCell(-1).innerHTML = val[i]; // interface 68 69 row.insertCell(-1).innerHTML = val[i+1]; // peer name 70 71 row.insertCell(-1).innerHTML = val[i+2]; // local ip 72 73 row.insertCell(-1).innerHTML = val[i+3]; // remote ip 74 75 var cell = row.insertCell(-1); 76 cell.className = "bin"; 77 cell.title = errmsg.err581; 78 eval("addEvent(cell, 'click', function() { deletepptp('" + val[i + 2] + "') })"); 46 79 } 47 80 } … … 123 156 setDHCPTable(<% dumpleases(0); %>); 124 157 <% ifndef("PPTPD", "<!--"); %> 125 set PPTPTable(<% dumppptp(); %>);158 setTable(<% dumppptp(); %>); 126 159 setElementVisible("pptp", "<% nvram_get("pptpd_enable"); %>" == "1"); 127 160 <% ifndef("PPTPD", "-->"); %> 161 <% ifndef("PPPOESERVER", "<!--"); %> 162 setTable(<% dumppppoe(); %>); 163 setElementVisible("pppoe", "<% nvram_get("pppoeserver_enabled"); %>" == "1"); 164 <% ifndef("PPPPOESERVER", "-->"); %> 128 165 setARPTable(<% dumparptable(0); %>); 129 166 setElementVisible("dhcp_1", "<% nvram_get("lan_proto"); %>" == "dhcp"); … … 147 184 }); 148 185 <% ifndef("PPTPD", "-->"); %> 186 <% ifndef("PPPOESERVER", "<!--"); %> 187 update.onUpdate("pppoe_leases", function(u) { 188 eval('setPPPOETable(' + u.pppoe_leases + ')'); 189 }); 190 <% ifndef("PPPOESERVER", "-->"); %> 149 191 update.onUpdate("arp_table", function(u) { 150 192 eval('setARPTable(' + u.arp_table + ')'); … … 284 326 <table class="table center" cellspacing="6" id="pptp_table" summary="pptp table"> 285 327 <tr> 286 <th width="20%"><% tran("share.intrface"); %></th> 287 <th width="40%"><% tran("share.localip"); %></th> 288 <th width="40%"><% tran("share.remoteip"); %></th> 328 <th width="15%"><% tran("share.intrface"); %></th> 329 <th width="45%"><% tran("share.username"); %></th> 330 <th width="20%"><% tran("share.localip"); %></th> 331 <th width="20%"><% tran("share.remoteip"); %></th> 289 332 <th><% tran("share.del"); %></th> 290 333 </tr> … … 298 341 </div> 299 342 <% ifndef("PPTPD", "-->"); %> 343 <% ifndef("PPPOESERVER", "<!--"); %> 344 <div id="pppoe" style="display:none"> 345 <fieldset> 346 <legend><% tran("status_lan.legend6"); %></legend> 347 <table class="table center" cellspacing="6" id="pppoe_table" summary="pppoe table"> 348 <tr> 349 <th width="15%"><% tran("share.intrface"); %></th> 350 <th width="45%"><% tran("share.username"); %></th> 351 <th width="20%"><% tran("share.localip"); %></th> 352 <th width="20%"><% tran("share.remoteip"); %></th> 353 <th><% tran("share.del"); %></th> 354 </tr> 355 </table> 356 <script type="text/javascript"> 357 //<![CDATA[ 358 var t = new SortableTable(document.getElementById('pppoe_table'), 1000); 359 //]]> 360 </script> 361 </fieldset><br /> 362 </div> 363 <% ifndef("PPPOESERVER", "-->"); %> 300 364 301 365 <div class="submitFooter"> -
src/router/kromo/dd-wrt/Status_Lan.live.asp
r13914 r13926 12 12 {dhcp_leases::<% dumpleases(0); %>} 13 13 {pptp_leases::<% dumppptp(); %>} 14 {pppoe_leases::<% dumppppoe(); %>} 14 15 {arp_table::<% dumparptable(0); %>} 15 16 {uptime::<% get_uptime(); %>} -
src/router/kromo/dd-wrt/lang_pack/english.js
r13920 r13926 1438 1438 status_lan.legend3="DHCP Clients"; 1439 1439 status_lan.legend4="Active Clients"; 1440 status_lan.legend5="PPTP Clients"; 1440 status_lan.legend5="Connected PPTP Clients"; 1441 status_lan.legend6="Connected PPPOE Clients"; 1441 1442 status_lan.concount="Conn. Count"; 1442 1443 status_lan.conratio="Ratio"; -
src/router/kromo/dd-wrt/lang_pack/german.js
r13920 r13926 1298 1298 status_lan.legend3="DHCP-Clients"; 1299 1299 status_lan.legend4="Active Clients"; 1300 status_lan.legend5="Verbundene PPTP Clients"; 1301 status_lan.legend6="Verbundene PPPOE Clients"; 1300 1302 1301 1303 //help container -
src/router/services/services/pppoeserver.c
r12235 r13926 71 71 72 72 fprintf(fp, "#!/bin/sh\n" "startservice set_routes\n" // reinitialize 73 // routing, 74 // just 75 // in 76 // case 77 // that 78 // a 79 // target 80 // route 81 // exists 73 "echo $1 $5 $6 $PEERNAME >> /tmp/pppoe_connected\n" 82 74 "iptables -I FORWARD -i $1 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu\n" 83 75 "iptables -I INPUT -i $1 -j ACCEPT\n" … … 86 78 fp = fopen("/tmp/pppoeserver/ip-down", "w"); 87 79 fprintf(fp, "#!/bin/sh\n" 80 "grep -v $1 /tmp/pppoe_connected > /tmp/pppoe_connected.new\n" 81 "mv /tmp/pppoe_connected.new /tmp/pppoe_connected\n" 88 82 "iptables -D FORWARD -i $1 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu\n" 89 83 "iptables -D INPUT -i $1 -j ACCEPT\n" -
src/router/services/services/pptp.c
r13922 r13926 204 204 fp = fopen("/tmp/pptpd/ip-up", "w"); 205 205 fprintf(fp, "#!/bin/sh\n" "startservice set_routes\n" // reinitialize 206 "echo $1 $ 2 $3 $4 $5 $6>> /tmp/pptp_connected\n"206 "echo $1 $5 $6 $PEERNAME >> /tmp/pptp_connected\n" 207 207 "iptables -I FORWARD -i $1 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu\n" 208 208 "iptables -I INPUT -i $1 -j ACCEPT\n" "iptables -I FORWARD -i $1 -j ACCEPT\n"
Note: See TracChangeset
for help on using the changeset viewer.
