home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Applications 2002 November / SGI IRIX 6.5 Applications 2002 November.iso / dist / gateway.idb / usr / WebFace / Source / 20-NetworkServices / dhcp / dhcp-netconf.cgi.z / dhcp-netconf.cgi
Encoding:
Text File  |  2002-06-12  |  36.4 KB  |  1,107 lines

  1. #!/usr/bin/perl5
  2.  
  3. require "/usr/OnRamp/lib/OnRamp.pm";
  4. require "/usr/OnRamp/lib/java.pm";
  5. require "dhcp-netconf-js.cgi";
  6. BEGIN { require "/usr/WebFace/lib/CGI.pm"; import CGI; }
  7.  
  8. if (!$ARGV[0]) { printf("Location: %s%c%c","/admin/dhcp-config.cgi",10,10); }
  9.  
  10. $query = new CGI;
  11. $help_page = "dhcp-netconf-help.html";
  12.  
  13. ($type,$editingIP) = ($ARGV[0] =~ /([a-z]+)(.*)/);
  14.  
  15. $def_config_dir = "/var/dhcp/config";
  16. $defaultFile = "/var/dhcp/config/config.Default";
  17.  
  18. $size = 20;
  19. $wid = 450;
  20.  
  21. $title = "Client Subnet Number: $editingIP";
  22.  
  23.  
  24. &setTypes;
  25. &setHash;
  26.  
  27. if ($type eq 'add') { $fname = $defaultFile; }
  28. else { $fname = $def_config_dir . '/config.' . $editingIP; }
  29.  
  30. &read_config_file($fname);
  31.  
  32. $help = $document_root . $ENV{"SCRIPT_NAME"};
  33. $help =~ s/cgi$/hlp/;
  34. exec $help if ($query->param('help') eq "Help");
  35.  
  36. if ($query->param('save_config') eq 'Ok') { &handleRequest; }
  37.  
  38. print $query->header;
  39.  
  40. &generic;
  41.  
  42. sub
  43. error
  44. {
  45.     print $query->header;
  46.     if ($query->param('adv')) { &js_title_block($title,$js_long); }
  47.     else { &js_title_block($title,$js); }
  48.     &error_block($_[0]);
  49.     &generic;
  50.     exit 0;
  51. }
  52.  
  53. sub
  54. read_config_file
  55. {
  56.     $gname = $_[0];
  57.     $netnum = $gname;
  58.     $netnum =~ s/^.*config\.//;
  59.     open(CONFIG, "<$gname") || &error("Cannot open file $gname for reading.");
  60.  
  61.     while (<CONFIG>) {
  62.     if (/^#/) {
  63.         next;
  64.     }
  65.     chomp;
  66.     /:\s*/ || next;    # Find the first colon, skip line if no colon found
  67.     $left = $`;
  68.     $right = $';
  69.     if ($types{$left} eq "bool") {
  70.         $right =~ s/1/Yes/;
  71.         $right =~ s/0/No/;
  72.         $right =~ s/yes/Yes/;
  73.         $right =~ s/no/No/;
  74.     }
  75.     elsif ($type{$left} eq "quad") {
  76.         $right =~ s/1/Bnode/;
  77.         $right =~ s/0x1/Bnode/;
  78.         $right =~ s/2/Pnode/;
  79.         $right =~ s/0x2/Pnode/;
  80.         $right =~ s/4/Mnode/;
  81.         $right =~ s/0x4/Mnode/;
  82.         $right =~ s/8/Hnode/;
  83.         $right =~ s/0x8/Hnode/;
  84.     }
  85. #    if ($right ne "") {
  86.         $hash{$left} = $right;
  87. #    }
  88.     }
  89.     close(CONFIG);
  90.  
  91.     if ($netnum eq "Default") { $hash{'subnet'} = $editingIP; }
  92.     else { $hash{'subnet'} = $netnum; }
  93. }
  94.  
  95. sub
  96. new_config_file
  97. {
  98.     open(CONFIG, ">$fname") || &error("Cannot open file $fname for writing.");
  99.     @names = $query->param;
  100.     $i = 0;
  101.     while ($names[$i]) {
  102.     if ( ($names[$i] eq "config_file") ||
  103.          ($names[$i] eq "save_config") ||
  104.          ($names[$i] eq "subnet")) {
  105.         $i++;
  106.         next;
  107.     }
  108.     $value = $query->param($names[$i]);
  109.     if ($types{$names[$i]} eq "bool") {
  110.         if ($value eq "Yes") {
  111.         $_ = $names[$i].": 1"."\n";
  112.         }
  113.         else {
  114.         $_ = $names[$i].": 0"."\n";
  115.         }
  116.     }
  117.     elsif ($types{$names[$i]} eq "quad") {
  118.         if ($value eq "Hnode") {
  119.         $_ = $names[$i].": 0x8"."\n";
  120.         }
  121.         elsif ($value eq "Mnode") {
  122.         $_ = $names[$i].": 0x4"."\n";
  123.         }
  124.         elsif ($value eq "Pnode") {
  125.         $_ = $names[$i].": 0x2"."\n";
  126.         }
  127.         else {
  128.         $_ = $names[$i].": 0x1"."\n";
  129.         }
  130.     }
  131.     else {
  132.         $_ = $names[$i].": ".$value."\n";
  133.     }
  134.     print CONFIG $_;
  135.     $i++;
  136.     }
  137.     close(CONFIG);
  138. }
  139.  
  140. sub
  141. save_config_file
  142. {
  143.     $tmpfile = $fname.".tmp";
  144.     open(CONFIG, "<$fname") || &error("Cannot open file $fname for reading.");
  145.     open(CONFIGTMP, ">$tmpfile") || &error("Cannot open file $tmpfile for writing.");
  146.     while (<CONFIG>) {
  147.     if (/^#/) {
  148.         print CONFIGTMP $_;
  149.         next;
  150.     }
  151.     /:\s*/ || next;
  152.  
  153.     while (($key, $value) = each %save_items) {
  154.         if ($key eq "subnet") {
  155.         next;
  156.         }
  157.         if ($` eq $key) {
  158.         if ($types{$key} eq "bool") {
  159.             if ($value eq "Yes") {
  160.             $_ = $key.": 1"."\n";
  161.             }
  162.             else {
  163.             $_ = $key.": 0"."\n";
  164.             }
  165.         }
  166.         elsif ($types{$key} eq "quad") {
  167.             if ($value eq "Hnode") {
  168.             $_ = $key.": 0x8"."\n";
  169.             }
  170.             elsif ($value eq "Mnode") {
  171.             $_ = $key.": 0x4"."\n";
  172.             }
  173.             elsif ($value eq "Pnode") {
  174.             $_ = $key.": 0x2"."\n";
  175.             }
  176.             else {
  177.             $_ = $key.": 0x1"."\n";
  178.             }
  179.         }
  180.         else {
  181.             $_ = $key.": ".$value."\n";
  182.         }
  183.         }
  184.     }
  185.     print CONFIGTMP $_;
  186.     }
  187.     close(CONFIGTMP);
  188.     close(CONFIG);
  189.     rename($tmpfile, $fname);
  190. }
  191.  
  192. sub
  193. check_int
  194. {
  195.     $_[0] =~ s/\s+//g;
  196.     if ($_[0] =~ /^\d+$/) {
  197.         return 0;
  198.     }
  199.     if ($_[1]) {
  200.         &error("Illegal int value: $_[0].");
  201.     }
  202.     return 1;
  203. }
  204.  
  205. sub
  206. check_dhcp_fname
  207. {
  208.     $_[0] =~ s/^\s+//;
  209.     $_[0] =~ s/\s+$//;
  210.     if ($_[0] =~ /^\//) {
  211.     if (-r $_[0]) {
  212.         return 0;
  213.     }
  214.     }
  215.     &error("File is inaccessible: $_[0].");
  216. }
  217.  
  218. sub
  219. check_hname
  220. {
  221.     $_[0] =~ s/^\s+//;
  222.     $_[0] =~ s/\s+$//;
  223.     if ($_[0] =~ /^[a-zA-Z][\w*\-\.]*[a-zA-Z0-9]*$/) {
  224.         if ($_[0] =~ /[_\.\-]$/) {
  225.             &error("The hostname cannot end with a \. or \- or _ : $_[0].");
  226.         }
  227.         if ($_[0] =~ /\.\.|\-\-|__/) {
  228.             &error("The hostname cannot have consecutive \. or \- or _ : $_[0].");
  229.         }
  230.         return 0;
  231.     }
  232.     &error("The name is not a valid hostname: $_[0].");
  233. }
  234.  
  235. sub
  236. check_addr
  237. {
  238.     $_[0] =~ s/^\s+//;
  239.     $_[0] =~ s/\s+$//;
  240.     if ($_[0] =~ /^0x[0-9a-fA-F]+/) {
  241.     if ($_[0] =~ /[^0-9a-fA-Fx]/) {
  242.         &error("Illegal hex notation address: $_[0].");
  243.     }
  244.     return 0;
  245.     }
  246.     else {
  247.     ($a, $b, $c, $d) = split(/\./, $_[0], 4);
  248.     if ( ($a eq "") || ($b eq "") || ($c eq "") || ($d eq "") ) {
  249.         &error("Illegal dot notation address: $_[0].");
  250.         return 1;
  251.     }
  252.     if ( ($a =~ /[^0-9]/) || ($a =~ /[^0-9]/) ||
  253.          ($c =~ /[^0-9]/) || ($d =~ /[^0-9]/) ) {
  254.         &error("Illegal dot notation address: $_[0].");
  255.         return 1;
  256.     }
  257.     if ( ($a < 0) || ($a > 255) || ($b < 0) || ($b > 255) ||
  258.          ($c < 0) || ($c > 255) || ($d < 0) || ($d > 255) ) {
  259.         &error("Illegal dot notation address: $_[0].");
  260.         return 1;
  261.     }
  262.     }
  263.     return 0;
  264. }
  265.  
  266. sub
  267. error_check
  268. {
  269.     if ($types{$_[0]} eq "int") {
  270.         if (check_int($_[1], 1)) {
  271.             return 1;
  272.         }
  273.     }
  274.     elsif ($types{$_[0]} eq "int_list") {
  275.         @intlist = split(/\,/, $_[1]);
  276.         $j = 0;
  277.         while ($intlist[$j]) {
  278.             if (check_int($intlist[$j], 0)) {
  279.                 &error("Illegal int value: " .
  280.                     "$intlist[$j] in list $_[1].");
  281.                 return 1;
  282.             }
  283.             $j += 1;
  284.         }
  285.     }
  286.     elsif ($types{$_[0]} eq "filepath") {
  287.         if (check_dhcp_fname($_[1])) {
  288.             return 1;
  289.         }
  290.     }
  291.     elsif ($types{$_[0]} eq "hname") {
  292.         if (check_hname($_[1])) {
  293.             return 1;
  294.         }
  295.     }
  296.     elsif ($types{$_[0]} eq "addr_range") {
  297.         @rnglist = split(/\,/, $_[1]);
  298.         $j = 0;
  299.         while ($rnglist[$j]) {
  300.             if ($rnglist[$j] =~ /\-$/) {
  301.                 &error("Illegal range value: ".
  302.                     "$rnglist[$k] in list $_[1].");
  303.                 return 1;
  304.             }
  305.             @intlist = split(/\-/, $rnglist[$j]);
  306.             $k = 0;
  307.             while ($intlist[$k]) {
  308.                 if (check_int($intlist[$k], 0)) {
  309.                     &error("Illegal int value: ".
  310.                          "$intlist[$k] in list $_[1].");
  311.                     return 1;
  312.                 }
  313.                 $k += 1;
  314.             }
  315.             if ($k > 2) {
  316.                 &error("Illegal range value: $rnglist[$j]".
  317.                     " in list $_[1].");
  318.                 return 1;
  319.             }
  320.             if ($k == 2) {
  321.                 if ($intlist[0] > $intlist[1]) {
  322.                     &error("Illegal int value: ".
  323.                          "$rnglist[$j] in list $_[1].");
  324.                     return 1;
  325.                 }
  326.             }
  327.             $j += 1;
  328.         }
  329.     }
  330.     elsif ($types{$_[0]} eq "netmask") {
  331.         return 1 if &check_netmask($_[1]); 
  332.     }
  333.     elsif ($types{$_[0]} eq "addr_pairs") {
  334.         @intlist = split(/\,/, $_[1]);
  335.         $j = 0;
  336.         while ($intlist[$j]) {
  337.             ($adr1, $adr2) = split(/\-/, $intlist[$j], 2);
  338.             if ( ($adr1 eq "") || ($adr2 eq "") ){
  339.                 &error("$intlist[$j]" .
  340.                     " is not a valid address pair.");
  341.                 return 1;
  342.             }
  343.             if(check_addr($adr1)) {
  344.                 &error("Illegal address value: ".
  345.                     "$adr1 in address pair $intlist[$j].");
  346.                 return 1;
  347.             }
  348.             if(check_addr($adr2)) {
  349.                 &error("Illegal address value: ".
  350.                     "$adr2 in address pair $intlist[$j].");
  351.                 return 1;
  352.             }
  353.             $j += 1;
  354.         }
  355.     }
  356.     elsif ($types{$_[0]} eq "addr") {
  357.         if (check_addr($_[1])) {
  358.             return 1;
  359.         }
  360.     }
  361.     elsif ($types{$_[0]} eq "addr_list") {
  362.         @intlist = split(/\,/, $_[1]);
  363.         $j = 0;
  364.         while ($intlist[$j]) {
  365.             if (check_addr($intlist[$j])) {
  366.                 &error("Illegal address value: ".
  367.                     "$intlist[$j] in list $_[1].");
  368.                 return 1;
  369.             }
  370.             $j += 1;
  371.         }
  372.     }
  373.     elsif ($types{$_[0]} eq "string") {
  374.         return 0;
  375.     }
  376.  
  377.     return 0;
  378. }
  379.  
  380. sub setTypes {
  381.     $types{"Serve_This_Network"} = "bool";
  382.     $types{"pro_choose_name"} = "bool";
  383.     $types{"pro_IPforwarding"} = "bool";
  384.     $types{"pro_source_routing"} = "bool";
  385.     $types{"pro_allnets_local"} = "bool";
  386.     $types{"pro_domask_disc"} = "bool";
  387.     $types{"pro_resp_mask_req"} = "bool";
  388.     $types{"pro_do_router_disc"} = "bool";
  389.     $types{"pro_trailer_encaps"} = "bool";
  390.     $types{"pro_ether_encaps"} = "bool";
  391.     $types{"pro_TCP_keepalive_garbage"} = "bool";
  392.  
  393.     $types{"pro_address_counter"} = "int";
  394.     $types{"pro_host_pfx_counter"} = "int";
  395.     $types{"pro_lease"} = "int";
  396.     $types{"pro_bootfile_size"} = "int";
  397.     $types{"pro_time_offset"} = "int";
  398.     $types{"pro_max_reassy_size"} = "int";
  399.     $types{"pro_IP_ttl"} = "int";
  400.     $types{"pro_pathmtu_timeout"} = "int";
  401.     $types{"pro_mtu"} = "int";
  402.     $types{"pro_arpcache_timeout"} = "int";
  403.     $types{"pro_TCP_ttl"} = "int";
  404.     $types{"pro_TCP_keepalive_intrvl"} = "int";
  405.  
  406.     $types{"pro_pathmtu_table"} = "int_list";
  407.  
  408.     $types{"pro_meritdump_pathname"} = "filepath";
  409.     $types{"pro_root_pathname"} = "filepath";
  410.     $types{"pro_extensions_pathname"} = "filepath";
  411.     $types{"pro_bootfile_name"} = "filepath";
  412.  
  413.     $types{"pro_host_prefix"} = "hname";
  414.     $types{"pro_TFTPserver_name"} = "hname";
  415.     $types{"pro_dns_domain"} = "hname";
  416.     $types{"pro_nis_domain"} = "hname";
  417.     $types{"pro_nisplus_domain"} = "hname";
  418.  
  419.     $types{"pro_ipaddress_range"} = "addr_range";
  420.  
  421.     $types{"pro_static_routes"} = "addr_pairs";
  422.     $types{"pro_policy_filter"} = "addr_pairs";
  423.  
  424.     $types{"subnet"} = "addr";
  425.     $types{"pro_netmask"} = "netmask";
  426.     $types{"pro_propel_server"} = "addr";
  427.     $types{"pro_broadcast"} = "addr";
  428.     $types{"pro_router_solicit_addr"} = "addr";
  429.  
  430.     $types{"pro_router_addr"} = "addr_list";
  431.     $types{"pro_dnsserver_addr"} = "addr_list";
  432.     $types{"pro_timeserver_addr"} = "addr_list";
  433.     $types{"pro_logserver_addr"} = "addr_list";
  434.     $types{"pro_cookieserver_addr"} = "addr_list";
  435.     $types{"pro_LPRserver_addr"} = "addr_list";
  436.     $types{"pro_resourceserver_addr"} = "addr_list";
  437.     $types{"pro_swapserver_addr"} = "addr_list";
  438.     $types{"pro_nameserver116_addr"} = "addr_list";
  439.     $types{"pro_impressserver_addr"} = "addr_list";
  440.     $types{"pro_NTPserver_addr"} = "addr_list";
  441.     $types{"pro_X_fontserver_addr"} = "addr_list";
  442.     $types{"pro_X_displaymgr_addr"} = "addr_list";
  443.     $types{"pro_mobileIP_homeagent_addr"} = "addr_list";
  444.     $types{"pro_SMTPserver_addr"} = "addr_list";
  445.     $types{"pro_POP3server_addr"} = "addr_list";
  446.     $types{"pro_NNTPserver_addr"} = "addr_list";
  447.     $types{"pro_WWWserver_addr"} = "addr_list";
  448.     $types{"pro_fingerserver_addr"} = "addr_list";
  449.     $types{"pro_IRCserver_addr"} = "addr_list";
  450.     $types{"pro_StreetTalkserver_addr"} = "addr_list";
  451.     $types{"pro_STDAserver_addr"} = "addr_list";
  452.     $types{"pro_NetBIOS_nameserver_addr"} = "addr_list";
  453.     $types{"pro_NetBIOS_distrserver_addr"} = "addr_list";
  454.     $types{"pro_nisserver_addr"} = "addr_list";
  455.     $types{"pro_nisplusserver_addr"} = "addr_list";
  456.  
  457.     $types{"pro_NetBIOS_scope"} = "string";
  458.  
  459.     $types{"pro_NetBIOS_nodetype"} = "quad";
  460. }
  461.  
  462. sub handleRequest {
  463.     undef %array;
  464.     open(IN,"< $theFile");
  465.     while(<IN>) {
  466.     @items = split(/\s+/);
  467.     if (substr($items[0],0,1) eq "#") { next; }
  468.     chop($items[0]); chop($items[1]);
  469.     $array{$items[0]} = $items[1];
  470.     }
  471.     close(IN);
  472.  
  473.     @names = $query->param;
  474.     $fname = $query->param('config_file');
  475. #    if (-e $fname) { $file = $fname; }
  476. #    else { $file = $defaultFile; }
  477.     &read_config_file($defaultFile);
  478. foreach $arg (keys(%hash)) { print "$arg $hash{$arg}<br>"; }
  479.     %save_items = %hash;
  480.     foreach $arg (@names) {
  481.     if ( ($arg eq "config_file") ||
  482.          ($arg eq "save_config") ) {
  483.         next;
  484.     }
  485.     $old = $hash{$arg};
  486.     $new = $query->param($arg);
  487.     if ($new && $old ne $new) {
  488.         if ($types{$arg} eq "bool") {
  489.         if ( (($old eq "") || ($old eq "0") || ($old eq "no")) &&
  490.              ($new eq "No") ) {
  491.             $i += 1;
  492.             next;
  493.         }
  494.         if ( (($old eq "1") || ($old eq "yes")) &&
  495.              ($new eq "Yes") ) {
  496.             $i += 1;
  497.             next;
  498.         }
  499.         }
  500.         elsif ($types{$arg} eq "quad") {
  501.         if ( ((($old eq "") || ($old eq "1")) && ($new eq "Bnode")) ||
  502.              (($old eq "2") && ($new eq "Pnode")) ||
  503.              (($old eq "4") && ($new eq "Mnode")) ||
  504.              (($old eq "8") && ($new eq "Hnode")) ) {
  505.             $i += 1;
  506.             next;
  507.         }
  508.         }
  509.         if (error_check($arg, $new)) {
  510.         &error("Input error");
  511.         }
  512.         $save_items{$arg} = $new;
  513.     }
  514.     }
  515.  
  516.     if (1 || $query->param('save_config') eq "Ok") {
  517.     # Save the File now
  518.     if ($type eq 'add') {
  519.         $fname = $def_config_dir . '/config.' . $editingIP;
  520.         system("/sbin/cp", $defaultFile, $fname);
  521.         &save_config_file;
  522.     } elsif ( ($a1 = $save_items{"subnet"}) ne "") {
  523.         # This probably is a new file so need to write everything if so
  524.         $fname =~ s/config\..*/config.$a1/;
  525.         if (-e $fname) {
  526.         save_config_file;
  527.         }
  528.         else {
  529.         save_config_file;
  530.         }
  531.     } else {
  532.         save_config_file;
  533.     }
  534.     $message = "The configuration file $fname has been saved.";
  535.     }
  536.     elsif ($query->param('save_config') eq "Delete") {
  537.     $message = "The configuration file $fname has been deleted.";
  538.     }
  539.     $file = "dhcp-config.cgi" . "?$type";
  540.     redirect($file);
  541.     exit(0);
  542. }
  543.  
  544. sub setHash {
  545.     $hash{"Serve_This_Network"} = $query->param('Serve_This_Network') ?
  546.     $query->param('Serve_This_Network') : 'No';
  547.     $hash{"pro_choose_name"} = $query->param('pro_choose_name') ?
  548.     $query->param('pro_choose_name') : 'No';
  549.     $hash{"pro_host_prefix"} = $query->param('pro_host_prefix') ?
  550.     $query->param('pro_host_prefix') : '';
  551.     $hash{"pro_netmask"} = $query->param('pro_netmask') ?
  552.     $query->param('pro_netmask') : '';
  553.     $hash{"pro_ipaddress_range"} = $query->param('pro_ipaddress_range') ?
  554.     $query->param('pro_ipaddress_range') : '';
  555.     $hash{"pro_nis_domain"} = $query->param('pro_nis_domain') ?
  556.     $query->param('pro_nis_domain') : '';
  557.     $hash{"pro_pathmtu_timeout"} = $query->param('pro_pathmtu_timeout') ?
  558.     $query->param('pro_pathmtu_timeout') : '';
  559.  
  560.     $hash{"pro_IPforwarding"} = "No";
  561.     $hash{"pro_source_routing"} = "No";
  562.     $hash{"pro_allnets_local"} = "No";
  563.     $hash{"pro_domask_disc"} = "No";
  564.     $hash{"pro_resp_mask_req"} = "No";
  565.     $hash{"pro_do_router_disc"} = "No";
  566.     $hash{"pro_trailer_encaps"} = "No";
  567.     $hash{"pro_ether_encaps"} = "No";
  568.     $hash{"pro_TCP_keepalive_garbage"} = "No";
  569.  
  570.     $hash{"pro_NetBIOS_nodetype"} = "Bnode";
  571. }
  572.  
  573. sub generic {
  574.     if ($query->param('adv')) { &longform; }
  575.     else { &shortform; }
  576. }
  577.  
  578. sub longform {
  579.     &js_title_block($title,$js_long);
  580.     &header_block($title);
  581.  
  582.     print "<i>$message</i>";
  583.  
  584.     print $query->startform("POST", "", "", "NAME=StandardForm", "onSubmit=\"return runSubmit()\"");
  585.  
  586.     print $query->hidden(-name=>'adv', -default=>'Yes');
  587.  
  588.     print $query->hidden(-name=>'config_file', -default=>$fname);
  589.  
  590.     print "<center><strong>Enable DHCP service for this network: \n",
  591.       $query->radio_group(-name=>'Serve_This_Network',
  592.               -values=>['Yes','No'],
  593.               -default=>$hash{"Serve_This_Network"}),
  594.       "</strong></center>\n";
  595.  
  596.     print "<h3>General Options:</h3>";
  597.     print "<center><table cellpadding=5 width=$wid>\n";
  598.     print "<tr><th align=left>Allow clients to choose their own hostname:\n",
  599.       "<th align=left>",
  600.       $query->radio_group(-name=>'pro_choose_name',
  601.               -values=>['Yes','No'],
  602.               -default=>$hash{"pro_choose_name"}),
  603.       "</tr>";
  604.     print "<tr><th align=left>Starting number for new IP Address:\n",
  605.       "<th align=left>",
  606.       $query->textfield(-name=>'pro_address_counter',
  607.             -default=>$hash{"pro_address_counter"},
  608.             -size=>$size, -maxlength=>5),
  609.       "</tr>";
  610.     print "<tr><th align=left>Prefix for automatic hostname assignments:\n",
  611.       "<th align=left>",
  612.       $query->textfield(-name=>'pro_host_prefix',
  613.             -default=>$hash{"pro_host_prefix"},
  614.             -size=>$size, -maxlength=>7),
  615.       "</tr>";
  616.     print "<tr><th align=left>Starting number to append to Hostname Prefix:\n",
  617.       "<th align=left>",
  618.       $query->textfield(-name=>'pro_host_pfx_counter',
  619.             -default=>$hash{"pro_host_pfx_counter"},
  620.             -size=>$size, -maxlength=>5),
  621.       "</tr>";
  622.     print "<tr><th align=left>Subnet mask for this network:\n",
  623.       "<th align=left>",
  624.       $query->textfield(-name=>'pro_netmask',
  625.             -default=>$hash{"pro_netmask"},
  626.             -size=>$size, -maxlength=>16),
  627.       "</tr>";
  628.     print "<tr><th align=left>Maximum allowable address Lease in seconds:\n",
  629.       "<th align=left>",
  630.       $query->textfield(-name=>'pro_lease',
  631.             -default=>$hash{"pro_lease"},
  632.             -size=>$size, -maxlength=>16),
  633.       "</tr>";
  634.     print "<tr><th align=left>Generate new IP addresses from this range:\n",
  635.       "<th align=left>",
  636.       $query->textfield(-name=>'pro_ipaddress_range',
  637.             -default=>$hash{"pro_ipaddress_range"},
  638.             -size=>$size, -maxlength=>256),
  639.       "</tr>";
  640.     print "<tr><th align=left>List of IP Addresses for Routers:\n",
  641.       "<th align=left>",
  642.       $query->textfield(-name=>'pro_router_addr',
  643.             -default=>$hash{"pro_router_addr"},
  644.             -size=>$size, -maxlength=>256),
  645.       "</tr>";
  646.     print "<tr><th align=left>Bootfile Size (in 512-Octet blocks):\n",
  647.       "<th align=left>",
  648.       $query->textfield(-name=>'pro_bootfile_size',
  649.             -default=>$hash{"pro_bootfile_size"},
  650.             -size=>$size, -maxlength=>8),
  651.       "</tr>";
  652.     print "<tr><th align=left>Bootfile Name:\n",
  653.       "<th align=left>",
  654.       $query->textfield(-name=>'pro_bootfile_name',
  655.             -default=>$hash{"pro_bootfile_name"},
  656.             -size=>$size, -maxlength=>256),
  657.       "</tr>";
  658.     print "<tr><th align=left>Time Offset from UTC (in seconds):\n",
  659.       "<th align=left>",
  660.       $query->textfield(-name=>'pro_time_offset',
  661.             -default=>$hash{"pro_time_offset"},
  662.             -size=>$size, -maxlength=>16),
  663.       "</tr>";
  664.     print "<tr><th align=left>Merit Dump File Pathname:\n",
  665.       "<th align=left>",
  666.       $query->textfield(-name=>'pro_meritdump_pathname',
  667.             -default=>$hash{"pro_meritdump_pathname"},
  668.             -size=>$size, -maxlength=>256),
  669.       "</tr>";
  670.     print "<tr><th align=left>Root Disk Pathname:\n",
  671.       "<th align=left>",
  672.       $query->textfield(-name=>'pro_root_pathname',
  673.             -default=>$hash{"pro_root_pathname"},
  674.             -size=>$size, -maxlength=>256),
  675.       "</tr>";
  676.     print "<tr><th align=left>Extensions Pathname:\n",
  677.       "<th align=left>",
  678.       $query->textfield(-name=>'pro_extensions_pathname',
  679.             -default=>$hash{"pro_extensions_pathname"},
  680.             -size=>$size, -maxlength=>256),
  681.       "</tr>";
  682.     print "<tr><th align=left>TFTP Server Name:\n",
  683.       "<th align=left>",
  684.       $query->textfield(-name=>'pro_TFTPserver_name',
  685.             -default=>$hash{"pro_TFTPserver_name"},
  686.             -size=>$size, -maxlength=>256),
  687.       "</tr></table>";
  688.  
  689.     print "</center><h3>Server related options:</h3><center>";
  690.     print "<table cellpadding=5 width=$wid>\n";
  691.  
  692.     print "<tr><th align=left>NIS domain name for this network:\n",
  693.       "<th align=left>",
  694.       $query->textfield(-name=>'pro_dns_domain',
  695.             -default=>$hash{"pro_dns_domain"},
  696.             -size=>$size, -maxlength=>256),
  697.       "</tr>";
  698.     print "<tr><th align=left>List of DNS Server IP Addresses:\n",
  699.       "<th align=left>",
  700.       $query->textfield(-name=>'pro_dnsserver_addr',
  701.             -default=>$hash{"pro_dnsserver_addr"},
  702.             -size=>$size, -maxlength=>256),
  703.       "</tr>";
  704.     print "<tr><th align=left>Propel Server IP Address:\n",
  705.       "<th align=left>",
  706.       $query->textfield(-name=>'pro_propel_server',
  707.             -default=>$hash{"pro_propel_server"},
  708.             -size=>$size, -maxlength=>256),
  709.       "</tr>";
  710.     print "<tr><th align=left>List of Time Server IP Addresses:\n",
  711.       "<th align=left>",
  712.       $query->textfield(-name=>'pro_timeserver_addr',
  713.             -default=>$hash{"pro_timeserver_addr"},
  714.             -size=>$size, -maxlength=>256),
  715.       "</tr>";
  716.     print "<tr><th align=left>List of UDP Log Server IP Addresses:\n",
  717.       "<th align=left>",
  718.       $query->textfield(-name=>'pro_logserver_addr',
  719.             -default=>$hash{"pro_logserver_addr"},
  720.             -size=>$size, -maxlength=>256),
  721.       "</tr>";
  722.     print "<tr><th align=left>List of Cookie Server IP Addresses:\n",
  723.       "<th align=left>",
  724.       $query->textfield(-name=>'pro_cookieserver_addr',
  725.             -default=>$hash{"pro_cookieserver_addr"},
  726.             -size=>$size, -maxlength=>256),
  727.       "</tr>";
  728.     print "<tr><th align=left>List of LPR Server IP Addresses:\n",
  729.       "<th align=left>",
  730.       $query->textfield(-name=>'pro_LPRserver_addr',
  731.             -default=>$hash{"pro_LPRserver_addr"},
  732.             -size=>$size, -maxlength=>256),
  733.       "</tr>";
  734.     print "<tr><th align=left>List of Service Location Server IP Addresses:\n",
  735.       "<th align=left>",
  736.       $query->textfield(-name=>'pro_resourceserver_addr',
  737.             -default=>$hash{"pro_resourceserver_addr"},
  738.             -size=>$size, -maxlength=>256),
  739.       "</tr>";
  740.     print "<tr><th align=left>Swap Server IP Address:\n",
  741.       "<th align=left>",
  742.       $query->textfield(-name=>'pro_swapserver_addr',
  743.             -default=>$hash{"pro_swapserver_addr"},
  744.             -size=>$size, -maxlength=>256),
  745.       "</tr>";
  746.     print "<tr><th align=left>List of IEN 116 Name Server IP Addresses:\n",
  747.       "<th align=left>",
  748.       $query->textfield(-name=>'pro_nameserver116_addr',
  749.             -default=>$hash{"pro_nameserver116_addr"},
  750.             -size=>$size, -maxlength=>256),
  751.       "</tr>";
  752.     print "<tr><th align=left>List of Impress Server IP Addresses:\n",
  753.       "<th align=left>",
  754.       $query->textfield(-name=>'pro_impressserver_addr',
  755.             -default=>$hash{"pro_impressserver_addr"},
  756.             -size=>$size, -maxlength=>256),
  757.       "</tr>";
  758.     print "<tr><th align=left>List of NTP Server IP Addresses:\n",
  759.       "<th align=left>",
  760.       $query->textfield(-name=>'pro_NTPserver_addr',
  761.             -default=>$hash{"pro_NTPserver_addr"},
  762.             -size=>$size, -maxlength=>256),
  763.       "</tr></table>";
  764.  
  765.     print "</center><h3>Application options:</h3><center>";
  766.     print "<table cellpadding=5 width=$wid>\n";
  767.  
  768.     print "<tr><th align=left>List of X Window Font Server IP Addresses:\n",
  769.       "<th align=left>",
  770.       $query->textfield(-name=>'pro_X_fontserver_addr',
  771.             -default=>$hash{"pro_X_fontserver_addr"},
  772.             -size=>$size, -maxlength=>256),
  773.       "</tr>";
  774.     print "<tr><th align=left>List of X Window Mgr Server IP Addresses:\n",
  775.       "<th align=left>",
  776.       $query->textfield(-name=>'pro_X_displaymgr_addr',
  777.             -default=>$hash{"pro_X_displaymgr_addr"},
  778.             -size=>$size, -maxlength=>256),
  779.       "</tr>";
  780.     print "<tr><th align=left>List of Mobile Home Agent Server IP Addresses:\n",
  781.       "<th align=left>",
  782.       $query->textfield(-name=>'pro_mobileIP_homeagent_addr',
  783.             -default=>$hash{"pro_mobileIP_homeagent_addr"},
  784.             -size=>$size, -maxlength=>256),
  785.       "</tr>";
  786.     print "<tr><th align=left>List of SMTP Server IP Addresses:\n",
  787.       "<th align=left>",
  788.       $query->textfield(-name=>'pro_SMTPserver_addr',
  789.             -default=>$hash{"pro_SMTPserver_addr"},
  790.             -size=>$size, -maxlength=>256),
  791.       "</tr>";
  792.     print "<tr><th align=left>List of POP3 Server IP Addresses:\n",
  793.       "<th align=left>",
  794.       $query->textfield(-name=>'pro_POP3server_addr',
  795.             -default=>$hash{"pro_POP3server_addr"},
  796.             -size=>$size, -maxlength=>256),
  797.       "</tr>";
  798.     print "<tr><th align=left>List of NNTP Server IP Addresses:\n",
  799.       "<th align=left>",
  800.       $query->textfield(-name=>'pro_NNTPserver_addr',
  801.             -default=>$hash{"pro_NNTPserver_addr"},
  802.             -size=>$size, -maxlength=>256),
  803.       "</tr>";
  804.     print "<tr><th align=left>List of WWW Server IP Addresses:\n",
  805.       "<th align=left>",
  806.       $query->textfield(-name=>'pro_WWWserver_addr',
  807.             -default=>$hash{"pro_WWWserver_addr"},
  808.             -size=>$size, -maxlength=>256),
  809.       "</tr>";
  810.     print "<tr><th align=left>List of Finger Server IP Addresses:\n",
  811.       "<th align=left>",
  812.       $query->textfield(-name=>'pro_fingerserver_addr',
  813.             -default=>$hash{"pro_fingerserver_addr"},
  814.             -size=>$size, -maxlength=>256),
  815.       "</tr>";
  816.     print "<tr><th align=left>List of Internet Chat Server IP Addresses:\n",
  817.       "<th align=left>",
  818.       $query->textfield(-name=>'pro_IRCserver_addr',
  819.             -default=>$hash{"pro_IRCserver_addr"},
  820.             -size=>$size, -maxlength=>256),
  821.       "</tr>";
  822.     print "<tr><th align=left>List of StreetTalk Server IP Addresses:\n",
  823.       "<th align=left>",
  824.       $query->textfield(-name=>'pro_StreetTalkserver_addr',
  825.             -default=>$hash{"pro_StreetTalkserver_addr"},
  826.             -size=>$size, -maxlength=>256),
  827.       "</tr>";
  828.     print "<tr><th align=left>List of STDA (StreetTalk) Server IP Addresses:\n",
  829.       "<th align=left>",
  830.       $query->textfield(-name=>'pro_STDAserver_addr',
  831.             -default=>$hash{"pro_STDAserver_addr"},
  832.             -size=>$size, -maxlength=>256),
  833.       "</tr></table>";
  834.  
  835.     print "</center><h3>Services options:</h3><center>";
  836.     print "<table cellpadding=5 width=$wid>\n";
  837.  
  838.     print "<tr><th align=left>List of NetBIOS Name Server IP Addresses:\n",
  839.       "<th align=left>",
  840.       $query->textfield(-name=>'pro_NetBIOS_nameserver_addr',
  841.             -default=>$hash{"pro_NetBIOS_nameserver_addr"},
  842.             -size=>$size, -maxlength=>256),
  843.       "</tr>";
  844.     print "<tr><th align=left>List of NetBIOS Dist Server IP Addresses:\n",
  845.       "<th align=left>",
  846.       $query->textfield(-name=>'pro_NetBIOS_distrserver_addr',
  847.             -default=>$hash{"pro_NetBIOS_distrserver_addr"},
  848.             -size=>$size, -maxlength=>256),
  849.       "</tr>";
  850.     print "<tr><th align=left>NetBIOS over TCP/IP Scope Option:\n",
  851.       "<th align=left>",
  852.       $query->textfield(-name=>'pro_NetBIOS_scope',
  853.             -default=>$hash{"pro_NetBIOS_scope"},
  854.             -size=>$size, -maxlength=>256),
  855.       "</tr>";
  856.     print "<tr><th align=left>NIS Domain Name:\n",
  857.       "<th align=left>",
  858.       $query->textfield(-name=>'pro_nis_domain',
  859.             -default=>$hash{"pro_nis_domain"},
  860.             -size=>$size, -maxlength=>256),
  861.       "</tr>";
  862.     print "<tr><th align=left>List of NIS Server IP Addresses:\n",
  863.       "<th align=left>",
  864.       $query->textfield(-name=>'pro_nisserver_addr',
  865.             -default=>$hash{"pro_nisserver_addr"},
  866.             -size=>$size, -maxlength=>256),
  867.       "</tr>";
  868.     print "<tr><th align=left>NIS+ Domain Name:\n",
  869.       "<th align=left>",
  870.       $query->textfield(-name=>'pro_nisplus_domain',
  871.             -default=>$hash{"pro_nisplus_domain"},
  872.             -size=>$size, -maxlength=>256),
  873.       "</tr>";
  874.     print "<tr><th align=left>List of NIS+ Server IP Addresses:\n",
  875.       "<th align=left>",
  876.       $query->textfield(-name=>'pro_nisplusserver_addr',
  877.             -default=>$hash{"pro_nisplusserver_addr"},
  878.             -size=>$size, -maxlength=>256),
  879.       "</tr></table>";
  880.     print "<table cellpadding=5 width=$wid>\n";
  881.     print "<tr><th align=left>NetBIOS over TCP/IP Node Type Option:\n",
  882.       "<th align=left>",
  883.       $query->radio_group(-name=>'pro_NetBIOS_nodetype',
  884.               -values=>['Bnode','Pnode', 'Mnode', 'Hnode'],
  885.               -default=>$hash{"pro_NetBIOS_nodetype"}),
  886.       "</tr></table>";
  887.  
  888.     print "</center><h3>IP per host options:</h3><center>";
  889.     print "<table cellpadding=5 width=$wid>\n";
  890.  
  891.     print "<tr><th align=left>Perform IP Forwarding:\n",
  892.       "<th align=left>",
  893.       $query->radio_group(-name=>'pro_IPforwarding',
  894.               -values=>['Yes', 'No'],
  895.               -default=>$hash{"pro_IPforwarding"}),
  896.       "</tr>";
  897.     print "<tr><th align=left>Perform Non-Local Source Routing:",
  898.       "<th align=left>",
  899.       $query->radio_group(-name=>'pro_source_routing',
  900.               -values=>['Yes', 'No'],
  901.               -default=>$hash{"pro_source_routing"}),
  902.       "</tr>";
  903.     print "<tr><th align=left>Source Routing Policy Filters (Addr-Mask pairs):\n",
  904.       "<th align=left>",
  905.       $query->textfield(-name=>'pro_policy_filter',
  906.             -default=>$hash{"pro_policy_filter"},
  907.             -size=>$size, -maxlength=>512),
  908.       "</tr>";
  909.     print "<tr><th align=left>Maximum Datagram Reassembly Size (> 576):\n",
  910.       "<th align=left>",
  911.       $query->textfield(-name=>'pro_max_reassy_size',
  912.             -default=>$hash{"pro_max_reassy_size"},
  913.             -size=>$size, -maxlength=>6),
  914.       "</tr>";
  915.     print "<tr><th align=left>Default IP Time To Live (1-255):\n",
  916.       "<th align=left>",
  917.       $query->textfield(-name=>'pro_IP_ttl',
  918.             -default=>$hash{"pro_IP_ttl"},
  919.             -size=>$size, -maxlength=>3),
  920.       "</tr>";
  921.     print "<tr><th align=left>Path MTU Aging Timeout (Seconds):\n",
  922.       "<th align=left>",
  923.       $query->textfield(-name=>'pro_pathmtu_timeout',
  924.             -default=>$hash{"pro_pathmtu_timeout"},
  925.             -size=>$size, -maxlength=>16),
  926.       "</tr>";
  927.     print "<tr><th align=left>List of MTU's for MTU Path Discovery:\n",
  928.       "<th align=left>",
  929.       $query->textfield(-name=>'pro_pathmtu_table',
  930.             -default=>$hash{"pro_pathmtu_table"},
  931.             -size=>$size, -maxlength=>256),
  932.       "</tr></table>";
  933.  
  934.     print "</center><h3>IP per interface options:</h3><center>";
  935.     print "<table cellpadding=5 width=$wid>\n";
  936.  
  937.     print "<tr><th align=left>MTU for the Interface (> 68):\n",
  938.       "<th align=left>",
  939.       $query->textfield(-name=>'pro_mtu',
  940.             -default=>$hash{"pro_mtu"},
  941.             -size=>$size, -maxlength=>6),
  942.       "</tr>";
  943.     print "<tr><th align=left>All Subnets are Local:\n",
  944.       "<th align=left>",
  945.       $query->radio_group(-name=>'pro_allnets_local',
  946.               -values=>['Yes', 'No'],
  947.               -default=>$hash{"pro_allnets_local"}),
  948.       "</tr>";
  949.     print "<tr><th align=left>Broadcast IP Address:\n",
  950.       "<th align=left>",
  951.       $query->textfield(-name=>'pro_broadcast',
  952.             -default=>$hash{"pro_broadcast"},
  953.             -size=>$size, -maxlength=>16),
  954.       "</tr>";
  955.     print "<tr><th align=left>Perform Mask Discovery:\n",
  956.       "<th align=left>",
  957.       $query->radio_group(-name=>'pro_domask_disc',
  958.               -values=>['Yes', 'No'],
  959.               -default=>$hash{"pro_domask_disc"}),
  960.       "</tr>";
  961.     print "<tr><th align=left>Respond to Subnet Mask requests using ICMP:\n",
  962.       "<th align=left>",
  963.       $query->radio_group(-name=>'pro_resp_mask_req',
  964.               -values=>['Yes', 'No'],
  965.               -default=>$hash{"pro_resp_mask_req"}),
  966.       "</tr>";
  967.     print "<tr><th align=left>Perform Router Discovery:\n",
  968.       "<th align=left>",
  969.       $query->radio_group(-name=>'pro_do_router_disc',
  970.               -values=>['Yes', 'No'],
  971.               -default=>$hash{"pro_do_router_disc"}),
  972.       "</tr>";
  973.     print "<tr><th align=left>Router Solicitation IP Address:\n",
  974.       "<th align=left>",
  975.       $query->textfield(-name=>'pro_router_solicit_addr',
  976.             -default=>$hash{"pro_router_solicit_addr"},
  977.             -size=>$size, -maxlength=>16),
  978.       "</tr>";
  979.     print "<tr><th align=left>Static Routes (pairs of dest-router addrs):\n",
  980.       "<th align=left>",
  981.       $query->textfield(-name=>'pro_static_routes',
  982.             -default=>$hash{"pro_static_routes"},
  983.             -size=>$size, -maxlength=>512),
  984.       "</tr></table>";
  985.  
  986.     print "</center><h3>Link layer per interface options:</h3><center>";
  987.     print "<table cellpadding=5 width=$wid>\n";
  988.  
  989.     print "<tr><th align=left>Perform Trailer Encapsulation:\n",
  990.       "<th align=left>",
  991.       $query->radio_group(-name=>'pro_trailer_encaps',
  992.               -values=>['Yes', 'No'],
  993.               -default=>$hash{"pro_trailer_encaps"}),
  994.       "</tr>";
  995.     print "<tr><th align=left>Perform Ethernet Encapsulation:\n",
  996.       "<th align=left>",
  997.       $query->radio_group(-name=>'pro_ether_encaps',
  998.               -values=>['Yes', 'No'],
  999.               -default=>$hash{"pro_ether_encaps"}),
  1000.       "</tr>";
  1001.     print "<tr><th align=left>ARP Cache Timeout (Seconds):\n",
  1002.       "<th align=left>",
  1003.       $query->textfield(-name=>'pro_arpcache_timeout',
  1004.             -default=>$hash{"pro_arpcache_timeout"},
  1005.             -size=>$size, -maxlength=>16),
  1006.       "</tr></table>";
  1007.  
  1008.     print "</center><h3>TCP options:</h3><center>";
  1009.     print "<table cellpadding=5 width=$wid>\n";
  1010.  
  1011.     print "<tr><th align=left>TCP Default Time To Live (1-255):\n",
  1012.       "<th align=left>",
  1013.       $query->textfield(-name=>'pro_TCP_ttl',
  1014.             -default=>$hash{"pro_TCP_ttl"},
  1015.             -size=>$size, -maxlength=>4),
  1016.       "</tr>";
  1017.     print "<tr><th align=left>TCP KeepAlive Interval (Seconds):\n",
  1018.       "<th align=left>",
  1019.       $query->textfield(-name=>'pro_TCP_keepalive_intrvl',
  1020.             -default=>$hash{"pro_TCP_keepalive_intrvl"},
  1021.             -size=>$size, -maxlength=>16),
  1022.       "</tr>";
  1023.     print "<tr><th align=left>TCP KeepAlive Garbage Option:\n",
  1024.       "<th align=left>",
  1025.       $query->radio_group(-name=>'pro_TCP_keepalive_garbage',
  1026.               -values=>['Yes', 'No'],
  1027.               -default=>$hash{"pro_TCP_keepalive_garbage"}),
  1028.       "</tr></table><br>\n";
  1029.  
  1030.     print &js_buttons('save_config','Ok','onClick="markOK()"',
  1031.         'onClick="markOther()"',
  1032.         "onClick=\"do_help('$help_page'); return (false)\"");
  1033.  
  1034.     print $query->endform;
  1035. }
  1036.  
  1037. sub shortform {
  1038.     &js_title_block($title,$js);
  1039.     &header_block($title);
  1040.  
  1041.     print "<i>$message</i>";
  1042.  
  1043.     print "<h3>Basic Options:</h3>";
  1044.  
  1045.     print $query->startform("POST", "", "", "NAME=StandardForm", "onSubmit=\"return runSubmit(this.form)\"");
  1046.  
  1047.     print $query->hidden(-name=>'config_file', -default=>$fname);
  1048.  
  1049.     print "<center><table cellpadding=5 width=$wid>\n";
  1050.     print "<tr><th align=left>Enable DHCP service for this network:\n",
  1051.       "<th align=left>",
  1052.       $query->radio_group(-name=>'Serve_This_Network',
  1053.               -values=>['Yes','No'],
  1054.               -default=>$hash{"Serve_This_Network"}),
  1055.       "</tr>\n";
  1056.  
  1057.     print "<tr><th align=left>Allow clients to choose their own hostname:\n",
  1058.       "<th align=left>",
  1059.       $query->radio_group(-name=>'pro_choose_name',
  1060.               -values=>['Yes','No'],
  1061.               -default=>$hash{"pro_choose_name"}),
  1062.       "</tr>";
  1063.  
  1064.     print "<tr><th align=left>Prefix for automatic hostname assignments:\n",
  1065.       "<th align=left>",
  1066.       $query->textfield(-name=>'pro_host_prefix',
  1067.             -default=>$hash{"pro_host_prefix"},
  1068.             -size=>$size, -maxlength=>7),
  1069.       "</tr>";
  1070.  
  1071.     print "<tr><th align=left>Generate new IP addresses from this range:\n",
  1072.       "<th align=left>",
  1073.       $query->textfield(-name=>'pro_ipaddress_range',
  1074.             -default=>$hash{"pro_ipaddress_range"},
  1075.             -size=>$size, -maxlength=>256),
  1076.       "</tr>";
  1077.  
  1078.     print "<tr><th align=left>Subnet mask for this network:\n",
  1079.       "<th align=left>",
  1080.       $query->textfield(-name=>'pro_netmask',
  1081.             -default=>$hash{"pro_netmask"},
  1082.             -size=>$size, -maxlength=>16),
  1083.       "</tr>";
  1084.  
  1085.     print "<tr><th align=left>NIS domain name for this network:\n",
  1086.       "<th align=left>",
  1087.       $query->textfield(-name=>'pro_nis_domain',
  1088.             -default=>$hash{"pro_nis_domain"},
  1089.             -size=>$size, -maxlength=>256),
  1090.       "</tr>";
  1091.  
  1092.     print "<tr><td></td><td>\n";
  1093.     print qq|<input type=submit name="adv" value="Go to Advanced Options"
  1094.     onClick="markOther()">|;
  1095.     print "</td></tr>";
  1096.  
  1097.     print "</table></center><br>\n";
  1098.  
  1099.     print &js_buttons('save_config','Ok','onClick="markOK()"',
  1100.         'onClick="markOther()"',
  1101.         "onClick=\"do_help('$help_page'); return (false)\"");
  1102.  
  1103.     print $query->endform;
  1104. }
  1105.  
  1106.  
  1107.