/* * Generated configuration file, do not edit. * uiGenerator v2.52 * Copyright 2002-2004 Ubicom Inc. . All rights reserved. */ function createDataObjectFromBinaryArray (initial) { if (initial) createDataObject(); var d = data; i = 0; // global, accessed by the s*() functions d.lan_network_address=sX(); d.lan_subnet_mask=sX(); for (var i1=0; i1<64; i1++) { d.virtual_servers[i1].alg_assoc=sS(30); d.virtual_servers[i1].enabled=sU(1); d.virtual_servers[i1].entry_name=sS(15); d.virtual_servers[i1].ingress_filter_name=sS(16); d.virtual_servers[i1].ip_address=sX(); d.virtual_servers[i1].private_port=sU(2); d.virtual_servers[i1].protocol=sU(1); d.virtual_servers[i1].public_port=sU(2); d.virtual_servers[i1].sched_name=sS(16); d.virtual_servers[i1].used=sU(1); } d.alg_l2tp=sU(1); d.alg_pptp=sU(1); d.alg_wol=sU(1); for (var i1=0; i1<64; i1++) { d.ingress_rules[i1].action=sU(1); d.ingress_rules[i1].ingress_filter_name=sS(16); for (var i2=0; i2<8; i2++) { d.ingress_rules[i1].ip_range_table[i2].enabled=sU(1); d.ingress_rules[i1].ip_range_table[i2].ip_end=sX(); d.ingress_rules[i1].ip_range_table[i2].ip_start=sX(); } d.ingress_rules[i1].used=sU(1); } for (var i1=0; i1<32; i1++) { d.sched_table[i1].enabled=sU(1); d.sched_table[i1].end_time=sU(4); d.sched_table[i1].sched_name=sS(16); d.sched_table[i1].start_time=sU(4); d.sched_table[i1].used=sU(1); d.sched_table[i1].weekdays=sU(1); } } function createBinaryArrayFromDataObject() { byte_array = new Array; // global, accessed by the g*() functions var d = data; gX(d.lan_network_address); gX(d.lan_subnet_mask); for (var i1=0; i1<64; i1++) { gS(d.virtual_servers[i1].alg_assoc,30); gU(d.virtual_servers[i1].enabled,1); gS(d.virtual_servers[i1].entry_name,15); gS(d.virtual_servers[i1].ingress_filter_name,16); gX(d.virtual_servers[i1].ip_address); gU(d.virtual_servers[i1].private_port,2); gU(d.virtual_servers[i1].protocol,1); gU(d.virtual_servers[i1].public_port,2); gS(d.virtual_servers[i1].sched_name,16); gU(d.virtual_servers[i1].used,1); } gU(d.alg_l2tp,1); gU(d.alg_pptp,1); gU(d.alg_wol,1); for (var i1=0; i1<64; i1++) { gU(d.ingress_rules[i1].action,1); gS(d.ingress_rules[i1].ingress_filter_name,16); for (var i2=0; i2<8; i2++) { gU(d.ingress_rules[i1].ip_range_table[i2].enabled,1); gX(d.ingress_rules[i1].ip_range_table[i2].ip_end); gX(d.ingress_rules[i1].ip_range_table[i2].ip_start); } gU(d.ingress_rules[i1].used,1); } for (var i1=0; i1<32; i1++) { gU(d.sched_table[i1].enabled,1); gU(d.sched_table[i1].end_time,4); gS(d.sched_table[i1].sched_name,16); gU(d.sched_table[i1].start_time,4); gU(d.sched_table[i1].used,1); gU(d.sched_table[i1].weekdays,1); } return byte_array; } function naturalizeDataObject() { var d = data; for (var i1=0; i1<64; i1++) { d.virtual_servers[i1].private_port=naturalize(d.virtual_servers[i1].private_port); d.virtual_servers[i1].public_port=naturalize(d.virtual_servers[i1].public_port); d.virtual_servers[i1].used=naturalize(d.virtual_servers[i1].used); } for (var i1=0; i1<64; i1++) { for (var i2=0; i2<8; i2++) { } d.ingress_rules[i1].used=naturalize(d.ingress_rules[i1].used); } for (var i1=0; i1<32; i1++) { d.sched_table[i1].end_time=naturalize(d.sched_table[i1].end_time); d.sched_table[i1].start_time=naturalize(d.sched_table[i1].start_time); d.sched_table[i1].used=naturalize(d.sched_table[i1].used); d.sched_table[i1].weekdays=naturalize(d.sched_table[i1].weekdays); } }