?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE NETWORK ACCESS: TCP/IP Routing Utility' ??
MODULE nam$install_tcpip_static_routes;

*copyc nae$tcpip_mgmt_condition_codes
*copyc nlt$tm_static_route_definition
*copyc nlt$tm_static_route_definitions
*copyc pmt$established_handler
*copyc clp$end_utility
*copyc clp$change_variable
*copyc clp$evaluate_parameters
*copyc clp$begin_utility
*copyc clp$include_file
*copyc clp$close_display
*copyc clp$end_include
*copyc clp$get_utility_attributes
*copyc clp$get_set_count
*copyc clp$get_value
*copyc clp$put_display
*copyc clp$put_partial_display
*copyc clp$open_display_reference
*copyc clp$scan_parameter_list
*copyc clp$test_parameter
*copyc clp$write_variable
*copyc nlp$tm_get_device_by_name
*copyc nlp$tm_get_static_routes
*copyc nlp$tm_install_static_routes
*copyc osp$append_status_parameter
*copyc osp$set_status_abnormal
*copyc oss$job_paged_literal

  CONST
    internal_workspace_length = 16500;

  VAR
    display_control: clt$display_control,
    prompt_string: ost$status_identifier,
    static_routes: ^nlt$tm_static_route_definition := NIL,
    utility_name: clt$utility_name := 'nap$install_tcpip_static_routes';

?? NEWTITLE := 'nap$install_tcpip_static_routes', EJECT ??

  PROGRAM [XDCL] nap$install_tcpip_static_routes
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{   PROCEDURE  install_tcpip_static_routes, install_tcpip_static_route, instsr(
{     input, i: FILE = $system.network.tcpip_static_routes;
{     status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 3] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        default_value: string (35),
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 10, 25, 11, 11, 33, 285],
    clc$command, 3, 2, 0, 0, 0, 0, 2, ''], [
    ['I                              ',clc$abbreviation_entry, 1],
    ['INPUT                          ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_default_parameter, 0, 35],
{ PARAMETER 2
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$file_type],
    '$system.network.tcpip_static_routes'],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$input = 1,
      p$status = 2;

    VAR
      pvt: array [1 .. 2] of clt$parameter_value;

{ table name=install_static_routes type=command scope=local
{ command (define_tcpip_static_route, deftsr) p=define_tcpip_static_route cm=local
{ command (display_tcpip_static_routes, display_tcpip_static_route,   ..
{   distsr)      p=display_tcpip_static_routes cm=local
{ command (quit, qui) p=quit_command cm=local
{ tablend

?? PUSH (LISTEXT := ON) ??

    VAR
      install_static_routes: [STATIC, READ] ^clt$command_table := ^install_static_routes_entries,

      install_static_routes_entries: [STATIC, READ] array [1 .. 7] of clt$command_table_entry := [
            {} ['DEFINE_TCPIP_STATIC_ROUTE      ', clc$nominal_entry, clc$normal_usage_entry, 1,
            clc$automatically_log, clc$linked_call, ^define_tcpip_static_route],
            {} ['DEFTSR                         ', clc$abbreviation_entry, clc$normal_usage_entry, 1,
            clc$automatically_log, clc$linked_call, ^define_tcpip_static_route],
            {} ['DISPLAY_TCPIP_STATIC_ROUTE     ', clc$alias_entry, clc$normal_usage_entry, 2,
            clc$automatically_log, clc$linked_call, ^display_tcpip_static_routes],
            {} ['DISPLAY_TCPIP_STATIC_ROUTES    ', clc$nominal_entry, clc$normal_usage_entry, 2,
            clc$automatically_log, clc$linked_call, ^display_tcpip_static_routes],
            {} ['DISTSR                         ', clc$abbreviation_entry, clc$normal_usage_entry, 2,
            clc$automatically_log, clc$linked_call, ^display_tcpip_static_routes],
            {} ['QUI                            ', clc$abbreviation_entry, clc$normal_usage_entry, 3,
            clc$automatically_log, clc$linked_call, ^quit_command],
            {} ['QUIT                           ', clc$nominal_entry, clc$normal_usage_entry, 3,
            clc$automatically_log, clc$linked_call, ^quit_command]];

?? POP ??

    VAR
      i: integer,
      local_status: ost$status,
      utility_attributes: array [1 .. 2] of clt$utility_attribute,
      utility_conditions: [STATIC, READ] pmt$condition := [pmc$condition_combination,
            [pmc$system_conditions, mmc$segment_access_condition, ifc$interactive_condition,
            pmc$user_defined_condition]],
      utility_descriptor: ^pmt$established_handler,
      utility_prompt: clt$utility_prompt,
      value: clt$data_value;

{   Evaluate parameter list and get the parameters specified on the call.

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{     Add the utility subcommands to the command list.

    prompt_string := 'itr';
    utility_prompt.size := 3;
    utility_prompt.value := 'itr';
    utility_attributes [1].key := clc$utility_command_table;
    utility_attributes [1].command_table := install_static_routes;
    utility_attributes [2].key := clc$utility_prompt;
    utility_attributes [2].prompt := utility_prompt;

    clp$begin_utility (utility_name, utility_attributes, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{ Scan command line for subcommands and execute subcommands.

    clp$include_file (pvt [p$input].value^.file_value^, '', utility_name, status);

    local_status.normal := TRUE;

    clp$end_utility (utility_name, local_status);
    IF status.normal AND NOT local_status.normal THEN
      status := local_status;
    IFEND;

  PROCEND nap$install_tcpip_static_routes;
?? OLDTITLE ??
?? NEWTITLE := 'define_tcpip_static_route', EJECT ??

  PROCEDURE define_tcpip_static_route
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE define_tcpip_static_route, deftsr (
{   local_device, ld: name = $required
{   destination_address, da: list 1 .. 4 of integer 0 .. 255 = $required;
{   destination_address_mask, dam: any of key address_mask, network_mask, keyend,
{         list 1 .. 4 of integer 0 .. 255, anyend = address_mask;
{   strict_route, sr: boolean = TRUE;
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 9] of clt$pdt_parameter_name,
      parameters: array [1 .. 5] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 2] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$integer_type_qualifier,
          recend,
        recend,
        default_value: string (12),
      recend,
      type4: record
        header: clt$type_specification_header,
        default_value: string (4),
      recend,
      type5: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 10, 25, 11, 9, 18, 371],
    clc$command, 9, 5, 2, 0, 0, 0, 5, ''], [
    ['DA                             ',clc$abbreviation_entry, 2],
    ['DAM                            ',clc$abbreviation_entry, 3],
    ['DESTINATION_ADDRESS            ',clc$nominal_entry, 2],
    ['DESTINATION_ADDRESS_MASK       ',clc$nominal_entry, 3],
    ['LD                             ',clc$abbreviation_entry, 1],
    ['LOCAL_DEVICE                   ',clc$nominal_entry, 1],
    ['SR                             ',clc$abbreviation_entry, 4],
    ['STATUS                         ',clc$nominal_entry, 5],
    ['STRICT_ROUTE                   ',clc$nominal_entry, 4]],
    [
{ PARAMETER 1
    [6, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 5, clc$required_parameter, 0, 0],
{ PARAMETER 2
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 36, clc$required_parameter, 0, 0],
{ PARAMETER 3
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 137, clc$optional_default_parameter, 0, 12],
{ PARAMETER 4
    [9, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_default_parameter, 0, 4],
{ PARAMETER 5
    [8, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 2
    [[1, 0, clc$list_type], [20, 1, 4, FALSE],
      [[1, 0, clc$integer_type], [0, 255, 10]]
    ],
{ PARAMETER 3
    [[1, 0, clc$union_type], [[clc$keyword_type,
    clc$list_type],
    FALSE, 2],
    81, [[1, 0, clc$keyword_type], [2], [
      ['ADDRESS_MASK                   ', clc$nominal_entry,
  clc$normal_usage_entry, 1],
      ['NETWORK_MASK                   ', clc$nominal_entry,
  clc$normal_usage_entry, 2]]
      ],
    36, [[1, 0, clc$list_type], [20, 1, 4, FALSE],
        [[1, 0, clc$integer_type], [0, 255, 10]]
      ]
    ,
    'address_mask'],
{ PARAMETER 4
    [[1, 0, clc$boolean_type],
    'TRUE'],
{ PARAMETER 5
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$local_device = 1,
      p$destination_address = 2,
      p$destination_address_mask = 3,
      p$strict_route = 4,
      p$status = 5;

    VAR
      pvt: array [1 .. 5] of clt$parameter_value;

    VAR
      device_id: nlt$device_identifier,
      error_length: integer,
      error_string: string (20),
      link: ^^nlt$tm_static_route_definition,
      static_route: ^nlt$tm_static_route_definition;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nlp$tm_get_device_by_name (pvt [p$local_device].value^.name_value, device_id, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    ALLOCATE static_route;

    static_route^.destination_address := pvt [p$destination_address].value^.element_value^.integer_value.
          value * 1000000(16);
    IF pvt [p$destination_address].value^.link <> NIL THEN
      static_route^.destination_address := static_route^.destination_address +
            pvt [p$destination_address].value^.link^.element_value^.integer_value.value * 10000(16);
      IF pvt [p$destination_address].value^.link^.link <> NIL THEN
        static_route^.destination_address := static_route^.destination_address +
              pvt [p$destination_address].value^.link^.link^.element_value^.integer_value.value * 100(16);
        IF pvt [p$destination_address].value^.link^.link^.link <> NIL THEN
          static_route^.destination_address := static_route^.destination_address +
                pvt [p$destination_address].value^.link^.link^.link^.element_value^.integer_value.value;
        IFEND;
      IFEND;
    IFEND;

    IF pvt [p$destination_address_mask].value^.kind = clc$keyword THEN
      IF pvt [p$destination_address_mask].value^.keyword_value = 'ADDRESS_MASK' THEN
        static_route^.destination_address_mask := 0ffffffff(16);
      ELSE { IF pvt [p$destination_address_mask].value^.keyword_value = 'NETWORK_MASK' THEN
        IF (static_route^.destination_address DIV 40000000(16) = 0) OR
              (static_route^.destination_address DIV 40000000(16) = 1) THEN { Class A network.
          static_route^.destination_address_mask := 0ff000000(16);
        ELSEIF static_route^.destination_address DIV 40000000(16) = 2 THEN { Class B network.
          static_route^.destination_address_mask := 0ffff0000(16);
        ELSE { Class C network.
          static_route^.destination_address_mask := 0ffffff00(16);
        IFEND;
      IFEND;
    ELSE
      static_route^.destination_address_mask := pvt [p$destination_address_mask].value^.element_value^.
            integer_value.value * 1000000(16);
      IF pvt [p$destination_address_mask].value^.link <> NIL THEN
        static_route^.destination_address_mask := static_route^.destination_address_mask +
              pvt [p$destination_address_mask].value^.link^.element_value^.integer_value.value * 10000(16);
        IF pvt [p$destination_address_mask].value^.link^.link <> NIL THEN
          static_route^.destination_address_mask := static_route^.destination_address_mask +
                pvt [p$destination_address_mask].value^.link^.link^.element_value^.integer_value.value *
                100(16);
          IF pvt [p$destination_address_mask].value^.link^.link^.link <> NIL THEN
            static_route^.destination_address_mask := static_route^.destination_address_mask +
                  pvt [p$destination_address_mask].value^.link^.link^.link^.element_value^.integer_value.
                  value;
          IFEND;
        IFEND;
      IFEND;
    IFEND;
    static_route^.nextt := NIL;

    static_route^.local_device_id := device_id;
    static_route^.local_device_name := pvt [p$local_device].value^.name_value;
    static_route^.strict_route := pvt [p$strict_route].value^.boolean_value.value;
    link := ^static_routes;
    WHILE (link^ <> NIL) AND ((link^^.destination_address > static_route^.destination_address) OR
          ((link^^.destination_address = static_route^.destination_address) AND
          (link^^.destination_address_mask > static_route^.destination_address_mask))) DO
      link := ^link^^.nextt;
    WHILEND;

  /duplicate_search/
    WHILE (link^ <> NIL) AND ((link^^.destination_address = static_route^.destination_address) AND
          (link^^.destination_address_mask = static_route^.destination_address_mask)) DO
      IF link^^.local_device_id <> static_route^.local_device_id THEN
        IF NOT link^^.strict_route THEN
          link := ^link^^.nextt;
        ELSE { IF link^^.strict_route THEN
          STRINGREP (error_string, error_length, static_route^.destination_address DIV 1000000(16), '.',
                ((static_route^.destination_address MOD 1000000(16)) DIV 10000(16)), '.',
                ((static_route^.destination_address MOD 10000(16)) DIV 100(16)), '.',
                (static_route^.destination_address MOD 100(16)));
          osp$set_status_abnormal (nac$status_id, nae$tm_equivalent_strict_route,
                error_string (1, error_length), status);
          STRINGREP (error_string, error_length, static_route^.destination_address_mask DIV 1000000(16), '.',
                ((static_route^.destination_address_mask MOD 1000000(16)) DIV 10000(16)), '.',
                ((static_route^.destination_address_mask MOD 10000(16)) DIV 100(16)), '.',
                (static_route^.destination_address_mask MOD 100(16)));
          osp$append_status_parameter (osc$status_parameter_delimiter, error_string (1, error_length),
                status);
          EXIT /duplicate_search/;
        IFEND;
      ELSE { IF link^^.local_device_id = static_route^.local_device_id THEN
        osp$set_status_abnormal (nac$status_id, nae$tm_duplicate_route, pvt [p$local_device].value^.
              name_value, status);
        STRINGREP (error_string, error_length, static_route^.destination_address DIV 1000000(16), '.',
              ((static_route^.destination_address MOD 1000000(16)) DIV 10000(16)), '.',
              ((static_route^.destination_address MOD 10000(16)) DIV 100(16)), '.',
              (static_route^.destination_address MOD 100(16)));
        osp$append_status_parameter (osc$status_parameter_delimiter, error_string (1, error_length), status);
        STRINGREP (error_string, error_length, static_route^.destination_address_mask DIV 1000000(16), '.',
              ((static_route^.destination_address_mask MOD 1000000(16)) DIV 10000(16)), '.',
              ((static_route^.destination_address_mask MOD 10000(16)) DIV 100(16)), '.',
              (static_route^.destination_address_mask MOD 100(16)));
        osp$append_status_parameter (osc$status_parameter_delimiter, error_string (1, error_length), status);
        EXIT /duplicate_search/;
      IFEND;
    WHILEND /duplicate_search/;
    IF status.normal THEN
      static_route^.nextt := link^;
      link^ := static_route;
    ELSE
      FREE static_route;
    IFEND;
  PROCEND define_tcpip_static_route;
?? OLDTITLE ??
?? NEWTITLE := 'display_tcpip_static_routes', EJECT ??

  PROCEDURE display_tcpip_static_routes
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE  display_tcpip_static_routes, distsr (
{    output,o: FILE = $OUTPUT
{    status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 3] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        default_value: string (7),
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 10, 25, 12, 29, 8, 717],
    clc$command, 3, 2, 0, 0, 0, 0, 2, ''], [
    ['O                              ',clc$abbreviation_entry, 1],
    ['OUTPUT                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_default_parameter, 0, 7],
{ PARAMETER 2
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$file_type],
    '$OUTPUT'],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$output = 1,
      p$status = 2;

    VAR
      pvt: array [1 .. 2] of clt$parameter_value;

    VAR
      data_string: string (512),
      display_control: clt$display_control,
      length: integer,
      ring_attributes: amt$ring_attributes,
      static_route: ^nlt$tm_static_route_definition;

    ring_attributes.r1 := #RING (^ring_attributes);
    ring_attributes.r2 := #RING (^ring_attributes);
    ring_attributes.r3 := #RING (^ring_attributes);

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$open_display_reference (pvt [p$output].value^.file_value^, NIL, fsc$list, ring_attributes,
          display_control, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$put_display (display_control, 'Uninstalled Static Route Definitions:', clc$trim, status);
    static_route := static_routes;
    WHILE static_route <> NIL DO
      clp$put_display (display_control, '', clc$trim, status);
      clp$put_display (display_control, '  DEFINE_TCPIP_STATIC_ROUTE ..', clc$trim, status);
      STRINGREP (data_string, length, '    LOCAL_DEVICE=', static_route^.local_device_name, ' ..');
      clp$put_display (display_control, data_string (1, length), clc$trim, status);
      STRINGREP (data_string, length, '    DESTINATION_ADDRESS=(',
            static_route^.destination_address DIV 1000000(16), ',',
            ((static_route^.destination_address MOD 1000000(16)) DIV 10000(16)), ',',
            ((static_route^.destination_address MOD 10000(16)) DIV 100(16)), ',',
            (static_route^.destination_address MOD 100(16)), ') ..');
      clp$put_display (display_control, data_string (1, length), clc$trim, status);
      STRINGREP (data_string, length, '    DESTINATION_ADDRESS_MASK=(',
            static_route^.destination_address_mask DIV 1000000(16), ',',
            ((static_route^.destination_address_mask MOD 1000000(16)) DIV 10000(16)), ',',
            ((static_route^.destination_address_mask MOD 10000(16)) DIV 100(16)), ',',
            (static_route^.destination_address_mask MOD 100(16)), ') .. ');
      clp$put_display (display_control, data_string (1, length), clc$trim, status);
      IF static_route^.strict_route THEN
        clp$put_display (display_control, '    STRICT_ROUTE=TRUE', clc$trim, status);
      ELSE
        clp$put_display (display_control, '    STRICT_ROUTE=FALSE', clc$trim, status);
      IFEND;
      static_route := static_route^.nextt;
    WHILEND;
    clp$close_display (display_control, status);
  PROCEND display_tcpip_static_routes;
?? OLDTITLE ??
?? NEWTITLE := 'quit_command', EJECT ??

  PROCEDURE quit_command
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE quit_command, quit, qui(
{   install_static_routes, install_static_route, isr: boolean = TRUE;
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 4] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        default_value: string (4),
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 10, 25, 12, 27, 19, 230],
    clc$command, 4, 2, 0, 0, 0, 0, 2, ''], [
    ['INSTALL_STATIC_ROUTE           ',clc$alias_entry, 1],
    ['INSTALL_STATIC_ROUTES          ',clc$nominal_entry, 1],
    ['ISR                            ',clc$abbreviation_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_default_parameter, 0, 4],
{ PARAMETER 2
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$boolean_type],
    'TRUE'],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$install_static_routes = 1,
      p$status = 2;

    VAR
      pvt: array [1 .. 2] of clt$parameter_value;

    VAR
      static_route: ^nlt$tm_static_route_definition;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF pvt [p$install_static_routes].value^.boolean_value.value THEN
      nlp$tm_install_static_routes (static_routes, status);
    IFEND;
    IF status.normal THEN
      static_route := static_routes;
      WHILE static_route <> NIL DO
        static_routes := static_route^.nextt;
        FREE static_route;
        static_route := static_routes
      WHILEND;
      clp$end_include (utility_name, status);
    IFEND;

  PROCEND quit_command;
?? OLDTITLE ??
MODEND nam$install_tcpip_static_routes;
