?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE Interactive Facility : Get String Identifying Network' ??
MODULE ifm$get_network_identifier;

{
{ PURPOSE:
{   This module contains an interface that returns an identifier for the
{   interactive network to which the requesting job is connected.
{

?? NEWTITLE := 'Global Declarations', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc ift$network_identifier
*copyc ost$status
?? POP ??
*copyc iiv$interactive_terminated
*copyc jmp$get_job_attributes
?? TITLE := 'ifp$get_network_identifier', EJECT ??
*copyc ifh$get_network_identifier

  PROCEDURE [XDCL, #GATE] ifp$get_network_identifier
    (VAR network_identifier: ift$network_identifier;
     VAR status: ost$status);

    VAR
      job_attributes: array [1 .. 2] of jmt$job_attribute_result;


    status.normal := TRUE;

    job_attributes [1].key := jmc$job_mode;
    job_attributes [2].key := jmc$c170_os_type;

    jmp$get_job_attributes (^job_attributes, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF job_attributes [1].job_mode <> jmc$interactive_connected THEN
      network_identifier := ifc$ni_none;
    ELSEIF iiv$network_identifier = iic$cdcnet_network THEN
      network_identifier := ifc$ni_nam_ve_cdcnet;
    ELSEIF job_attributes [2].c170_os_type = osc$ot7_dual_state_nos_be THEN
      network_identifier := ifc$ni_intercom;
    ELSEIF iiv$cdcnet_connection THEN
      network_identifier := ifc$ni_nam_cdcnet;
    ELSE
      network_identifier := ifc$ni_nam_ccp;
    IFEND;

  PROCEND ifp$get_network_identifier;

MODEND ifm$get_network_identifier;
