////////////////////////////////////////////////////////////////////////////////
// ihvintfc.h : interface of the CCfgDoc class
////////////////////////////////////////////////////////////////////////////////
//
// IBM Confidential
//
// OCO Source Materials
//
// The source code for this program is not published or otherwise
//     divested of its trade secrets, irrespective of what has
//     been deposited with the U.S. Copyright Office.
//
//
// CHANGE-ACTIVITY:
//
// FLAG REASON   RELEASE DATE	 ORIGIN          FLAG DESCRIPTORS
// ---- -------- ------- ------  ------          ----------------------------
// $R1  00000    CSTN60  980101  rnpatel:        Seperate IHV interface file from pcgdoc.h
//
////////////////////////////////////////////////////////////////////////////////

#ifndef __IHVINTFC_H__
#define __IHVINTFC_H__

#include <afxtempl.h> 
#include <winnof.h>   

////////////////////////////////////////////////////////////////////////////////
//Following structures must not be changed, IHV's are depending on for their config
//DLL and any time if required to be changed, please change in either PS_PORT_OEM_EXTENDED_DATA
//or PS_LINK_OEM_EXTENDED_DATA structure in pcgdoc.h and inform each IHV soon as possible.
//Make sure to update SDK includes in DRIVERS directory
////////////////////////////////////////////////////////////////////////////////
                                        

////////////////////////////////////////////////////////////////////////////////
//Shallow Interface Port Structure
////////////////////////////////////////////////////////////////////////////////

enum ConnectionType { eswitched, eleased, eboth};
enum XmitRcvCap { efull_duplex, ehalf_duplex, ehalf_full_duplex};

struct PS_PORT_SHALLOW_DATA {		  //port data - entire structure
   // basic parms
   unsigned long ConfigRevisionId;//
   CString port_name;			 // HV generates, also appears on IBM "basic" panel, Max. 8 chrs. 
   CString dlc_type;			 // loaded from registry : SDLC_DLC_IBM, X25_DLC_IBM
   BOOL    adapterType;		  // IHV sets, asynchronous vs synchronous :	

   enum ConnectionType  connection_type;  // IHV sets, leased, switched or both  
   enum XmitRcvCap      capability_type;  // IHV sets, halfduplex, fullduplex or both  
   BOOL    constant_RTS;		 // IHV sets, default - 
   BOOL    encoding;			 // IHV sets, default - NRZI
   BOOL    dumb_card_support;	 // IHV sets  default 0;
   BYTE    reserved[27];		 // future, added to avoid changes to OEM DLL @Q1C
   int     portSpecLength;		 // IHV supplies, max 256 bytes
   BYTE    portSpecData[256];  // IHV supplies
};

////////////////////////////////////////////////////////////////////////////////
//Deep Interface Port Structure
////////////////////////////////////////////////////////////////////////////////


struct PS_PORT_OEM_DATA {		  //port data - entire structure
   // basic parms
   unsigned long ConfigRevisionId;//
   CString dlc_name;			 // loaded from registry
   CString dlc_type;			 // loaded from registry
   int     port_num;			 // generated by IBM
   int     deact_time;			 // IBM panel
   BOOL    cpcpSes;				 // IBM panel
   int     ltd_res;				 // IBM panel
   BOOL    hpr_supported;		 // IBM panel

   CString port_name;			 // IHV generates, but appears on IBM "basic" panel
   int     port_type;			 // IHV supplies
   int     max_btu;				 // IHV supplies
   int     inbActLim;			 // IHV supplies
   int     outbActLim;			 // IHV supplies
   int     totActLim;			 // IHV supplies
   int     ls_role;				 // IHV supplies
   int     ls_xmit_rcv_cap;		 // IHV supplies
   int     max_ifrm_rcvd;		 // IHV supplies
   int     portSpecLength;		 // IHV supplies
   int     linkSpecLength;		 // IHV supplies
   BYTE    reserved[27];		 // future, added to avoid changes to OEM DLL @Q1C
   BYTE    portSpecData[SIZEOF_PORT_SPEC_DATA];	 // IHV supplies
   BYTE    linkSpecData[SIZEOF_LINK_SPEC_DATA];	 // IHV supplies
};

////////////////////////////////////////////////////////////////////////////////
//Deep Interface Link Structure
////////////////////////////////////////////////////////////////////////////////

struct PS_LINK_OEM_DATA {	  //connection data - entire structure
   // basic parms
   unsigned long ConfigRevisionId;//
   CString link_name;			  // field contains already defined link name, otherwise empty	
   CString default_link_name;	  //field contains new link name, otherwise empty 	
   CString port_name;			  // selected port name from basic page
   CString lnode_id;

   // advanced parms
   BOOL    sscp_sess;
   CString pu_name;
   BOOL    cp_cp_sess;
   BOOL    NN_server;
   BOOL    hpr_supported;
   BOOL    auto_act;
   BOOL    startup;						   
   int     ltd_res;
   int     deact_time;
   CString adjcp_name;
   int     adjcp_type;
   CString adjnode_id;
   int     tg_num;
   int     max_ifrm;

   BOOL    disable_remote_act;

   int     dspu_services;
   CString dspu_name;
   CString dlus_name;
   CString bkup_dlus_name;

   // IHV parms
   int     ls_role;
   int     max_btu;

   int     dest_addr_length;
   BYTE    dest_addr[MAX_LINK_ADDR_LEN];
   BOOL    encryption;		
   BOOL    compression;		
   BOOL    use_pu_name_on_xid;
   BYTE    reserved[23];	   // future, added to avoid changes to OEM DLL @Q2C
   int     linkSpecLength;
   BYTE    linkSpecData[SIZEOF_LINK_SPEC_DATA];
};

#endif // __IHVINTFC_H__

