📄 dlcapi.h
字号:
UCHAR uchT1; // response timer
UCHAR uchT2; // aknowledgment timer
UCHAR uchTi; // inactivity timer
UCHAR uchMaxOut; // max tramists without ack
UCHAR uchMaxIn; // max receives without ack
UCHAR uchMaxOutIncr; // dynamic window increment value
UCHAR uchMaxRetryCnt; // N2 value (retries)
UCHAR uchMaxMembers; // maximum members for group SAP
USHORT usMaxI_Field; // maximum length of the Info field
UCHAR uchSapValue; // SAP value to be assigned
UCHAR uchOptionsPriority; // SAP options and access priority
UCHAR uchcStationCount; // maximum number of link stations in sap
UCHAR uchReserved2[2]; //
UCHAR cGroupCount; // number of group SAPs of this SAP
PUCHAR pGroupList; // offset to the group list
ULONG DlcStatusFlags; // User notify flag for DLC status changes
UCHAR uchReserved3[8]; // reserved
UCHAR cLinkStationsAvail; // total number of available link stations
} LLC_DLC_OPEN_SAP_PARMS, *PLLC_DLC_OPEN_SAP_PARMS;
typedef struct {
USHORT usSapStationId; // SAP station id
USHORT usLinkStationId; // Link station id
UCHAR uchT1; // response timer
UCHAR uchT2; // aknowledgment timer
UCHAR uchTi; // inactivity timer
UCHAR uchMaxOut; // max tramists without ack
UCHAR uchMaxIn; // max receives without ack
UCHAR uchMaxOutIncr; // dynamic window increment value
UCHAR uchMaxRetryCnt; // N2 value (retries)
UCHAR uchRemoteSap; // remote SAP of the link
USHORT usMaxI_Field; // max I field length
UCHAR uchAccessPriority; // token ring access priority
PVOID pRemoteNodeAddress; // pointer to the destination address
} LLC_DLC_OPEN_STATION_PARMS, *PLLC_DLC_OPEN_STATION_PARMS;
#define LLC_INCREASE_LINK_STATIONS 0
#define LLC_DECREASE_LINK_STATIONS 0x80
typedef struct {
USHORT usStationId; // ID of affected SAP
UCHAR uchOption; // increase of decrease indicator
UCHAR uchStationCount;
UCHAR uchStationsAvailOnAdapter;
UCHAR uchStationsAvailOnSap;
UCHAR uchTotalStationsOnAdapter;
UCHAR uchTotalStationsOnSap;
} LLC_DLC_REALLOCATE_PARMS, *PLLC_DLC_REALLOCATE_PARMS;
typedef struct {
USHORT usStationId; // SAP station ID
USHORT cBufferThreshold; // SAP buffer pool Threshold number
PVOID AlertEvent; // alerting event
} LLC_DLC_SET_THRESHOLD_PARMS, *PLLC_DLC_SET_THRESHOLD_PARMS;
typedef struct {
PVOID TraceBuffer; // trace buffer
ULONG TraceBufferSize; // trace buffer size
ULONG TraceFlags; // various trace flags
} LLC_TRACE_INITIALIZE_PARMS, *PLLC_TRACE_INITIALIZE_PARMS;
#define LLC_DLC_RESET_STATISTICS 0x80
#define LLC_DLC_READ_STATISTICS 0
typedef struct {
ULONG cTransmittedFrames;
ULONG cReceivedFrames;
ULONG cDiscardedFrames;
ULONG cDataLost;
USHORT cBuffersAvailable;
} DLC_SAP_LOG, *PDLC_SAP_LOG;
typedef struct {
USHORT cI_FramesTransmitted;
USHORT cI_FramesReceived;
UCHAR cI_FrameReceiveErrors;
UCHAR cI_FrameTransmissionErrors;
USHORT cT1_ExpirationCount; // Note: not OUT data xfer mode
UCHAR uchLastCmdRespReceived;
UCHAR uchLastCmdRespTransmitted;
UCHAR uchPrimaryState;
UCHAR uchSecondaryState;
UCHAR uchSendStateVariable;
UCHAR uchReceiveStateVariable;
UCHAR uchLastNr; // last received NR
UCHAR cbLanHeader;
UCHAR auchLanHeader[32];
} DLC_LINK_LOG, *PDLC_LINK_LOG;
typedef union {
DLC_SAP_LOG Sap;
DLC_LINK_LOG Link;
} LLC_DLC_LOG_BUFFER, *PLLC_DLC_LOG_BUFFER;
typedef struct {
USHORT usStationId; // ID of a SAP or a link station
USHORT cbLogBufSize; //
PLLC_DLC_LOG_BUFFER pLogBuf; // offset to the log buffer
USHORT usActLogLength; // length of returned log
UCHAR uchOptions; // command options (bit7 resets log params)
} LLC_DLC_STATISTICS_PARMS, *PLLC_DLC_STATISTICS_PARMS;
typedef struct {
USHORT usBringUps; // Token Ring adapter bring up error code
UCHAR Reserved[30]; // everything else specific to DOS or OS/2
} LLC_DIR_INITIALIZE_PARMS, *PLLC_DIR_INITIALIZE_PARMS;
typedef struct {
USHORT usOpenErrorCode; // open adapter errors detected
USHORT usOpenOptions; // various options
UCHAR auchNodeAddress[6]; // adapters LAN address
UCHAR auchGroupAddress[4]; // multicast address added in the open
UCHAR auchFunctionalAddress[4]; // added token ring functional address
USHORT usReserved1;
USHORT usReserved2;
USHORT usMaxFrameSize; // maximum frame size defined in NDIS
USHORT usReserved3[4];
USHORT usBringUps; // Bring up errors, TR only
USHORT InitWarnings;
USHORT usReserved4[3];
} LLC_ADAPTER_OPEN_PARMS, *PLLC_ADAPTER_OPEN_PARMS;
typedef struct {
UCHAR uchDlcMaxSaps;
UCHAR uchDlcMaxStations;
UCHAR uchDlcMaxGroupSaps;
UCHAR uchDlcMaxGroupMembers;
UCHAR uchT1_TickOne; // Short timer interval (for 1 - 5)
UCHAR uchT2_TickOne;
UCHAR uchTi_TickOne;
UCHAR uchT1_TickTwo; // Long timer interval (for 6 - 10)
UCHAR uchT2_TickTwo;
UCHAR uchTi_TickTwo;
} LLC_DLC_PARMS, *PLLC_DLC_PARMS;
//
// The ethernet mode selects the LAN header format of ethernet. SNA
// applications should use the default parameter, that has been defined in the
// registry. The applications using connectionless DLC services should select
// the ethernet LLC LAN header format they are using (usually 802.3)
//
typedef enum {
LLC_ETHERNET_TYPE_DEFAULT, // use the parameter value set in registry
LLC_ETHERNET_TYPE_AUTO, // automatic header type selction for links
LLC_ETHERNET_TYPE_802_3, // use always 802.3 lan headers
LLC_ETHERNET_TYPE_DIX // use always LLC on DIX SNA type.
} LLC_ETHERNET_TYPE, *PLLC_ETHERNET_TYPE;
typedef struct {
PVOID hBufferPool;
PVOID pSecurityDescriptor;
LLC_ETHERNET_TYPE LlcEthernetType;
} LLC_EXTENDED_ADAPTER_PARMS, *PLLC_EXTENDED_ADAPTER_PARMS;
typedef struct {
PLLC_ADAPTER_OPEN_PARMS pAdapterParms; // ADAPTER_PARMS
PLLC_EXTENDED_ADAPTER_PARMS pExtendedParms; // DIRECT_PARMS
PLLC_DLC_PARMS pDlcParms; // DLC_PARMS
PVOID pReserved1; // NCB_PARMS
} LLC_DIR_OPEN_ADAPTER_PARMS, *PLLC_DIR_OPEN_ADAPTER_PARMS;
typedef struct {
UCHAR auchMulticastAddress[6]; // 48 bit multicast address
} LLC_DIR_MULTICAST_ADDRESS, *PLLC_DIR_MULTICAST_ADDRESS;
#define LLC_DIRECT_OPTIONS_ALL_MACS 0x1880
typedef struct {
USHORT Reserved[4];
USHORT usOpenOptions;
USHORT usEthernetType;
ULONG ulProtocolTypeMask;
ULONG ulProtocolTypeMatch;
USHORT usProtocolTypeOffset;
} LLC_DIR_OPEN_DIRECT_PARMS, *PLLC_DIR_OPEN_DIRECT_PARMS;
typedef struct {
UCHAR cLineError;
UCHAR cInternalError;
UCHAR cBurstError;
UCHAR cAC_Error;
UCHAR cAbortDelimiter;
UCHAR uchReserved1;
UCHAR cLostFrame;
UCHAR cReceiveCongestion;
UCHAR cFrameCopiedError;
UCHAR cFrequencyError;
UCHAR cTokenError;
UCHAR uchReserved2;
UCHAR uchReserved3;
UCHAR uchReserved4;
} LLC_ADAPTER_LOG_TR, *PLLC_ADAPTER_LOG_TR;
typedef struct {
UCHAR cCRC_Error;
UCHAR uchReserved1;
UCHAR cAlignmentError;
UCHAR uchReserved2;
UCHAR cTransmitError;
UCHAR uchReserved3;
UCHAR cCollisionError;
UCHAR cReceiveCongestion;
UCHAR uchReserved[6];
} LLC_ADAPTER_LOG_ETH, *PLLC_ADAPTER_LOG_ETH;
typedef union {
LLC_ADAPTER_LOG_TR Tr;
LLC_ADAPTER_LOG_ETH Eth;
} LLC_ADAPTER_LOG, *PLLC_ADAPTER_LOG;
typedef struct {
ULONG cTransmittedFrames;
ULONG cReceivedFrames;
ULONG cDiscardedFrames;
ULONG cDataLost;
USHORT cBuffersAvailable;
} LLC_DIRECT_LOG, *PLLC_DIRECT_LOG;
typedef union {
LLC_ADAPTER_LOG Adapter;
LLC_DIRECT_LOG Dir;
struct {
LLC_ADAPTER_LOG Adapter;
LLC_DIRECT_LOG Dir;
} both;
} LLC_DIR_READ_LOG_BUFFER, *PLLC_DIR_READ_LOG_BUFFER;
#define LLC_DIR_READ_LOG_ADAPTER 0
#define LLC_DIR_READ_LOG_DIRECT 1
#define LLC_DIR_READ_LOG_BOTH 2
typedef struct {
USHORT usTypeId; // 0=adapter, 1=direct, 2=both logs
USHORT cbLogBuffer; // size of log buffer
PLLC_DIR_READ_LOG_BUFFER pLogBuffer;// pointer to log buffer
USHORT cbActualLength; // returned size of log buffer
} LLC_DIR_READ_LOG_PARMS, *PLLC_DIR_READ_LOG_PARMS;
typedef struct {
ULONG ulAdapterCheckFlag;
ULONG ulNetworkStatusFlag;
ULONG ulPcErrorFlag;
ULONG ulSystemActionFlag;
} LLC_DIR_SET_EFLAG_PARMS, *PLLC_DIR_SET_EFLAG_PARMS;
#define LLC_ADAPTER_ETHERNET 0x0010
#define LLC_ADAPTER_TOKEN_RING 0x0040
typedef struct {
UCHAR auchPermanentAddress[6]; // permanent encoded address
UCHAR auchNodeAddress[6]; // adapter's network address
UCHAR auchGroupAddress[4]; // adapter's group address
UCHAR auchFunctAddr[4]; // adapter's functional address
UCHAR uchMaxSap; // maximum allowable SAP
UCHAR uchOpenSaps; // number of currently open saps
UCHAR uchMaxStations; // max number of stations (always 253)
UCHAR uchOpenStation; // number of open stations (only up to 253)
UCHAR uchAvailStations; // number of available stations (always 253)
UCHAR uchAdapterConfig; // adapter configuration flags
UCHAR auchReserved1[10]; // microcode level
ULONG ulReserved1;
ULONG ulReserved2;
ULONG ulMaxFrameLength; // maximum frame length (only in Windows/Nt)
USHORT usLastNetworkStatus;
USHORT usAdapterType; // THIS BYTE IS NOT USED IN DOS DLC !!!
} LLC_DIR_STATUS_PARMS, *PLLC_DIR_STATUS_PARMS;
#define LLC_OPTION_READ_STATION 0
#define LLC_OPTION_READ_SAP 1
#define LLC_OPTION_READ_ALL 2
#define LLC_EVENT_SYSTEM_ACTION 0x0040
#define LLC_EVENT_NETWORK_STATUS 0x0020
#define LLC_EVENT_CRITICAL_EXCEPTION 0x0010
#define LLC_EVENT_STATUS_CHANGE 0x0008
#define LLC_EVENT_RECEIVE_DATA 0x0004
#define LLC_EVENT_TRANSMIT_COMPLETION 0x0002
#define LLC_EVENT_COMMAND_COMPLETION 0x0001
#define LLC_READ_ALL_EVENTS 0x007F
//
// LLC_STATUS_CHANGE indications
// The returned status value may be an inclusive-OR of several flags
//
#define LLC_INDICATE_LINK_LOST 0x8000
#define LLC_INDICATE_DM_DISC_RECEIVED 0x4000
#define LLC_INDICATE_FRMR_RECEIVED 0x2000
#define LLC_INDICATE_FRMR_SENT 0x1000
#define LLC_INDICATE_RESET 0x0800
#define LLC_INDICATE_CONNECT_REQUEST 0x0400
#define LLC_INDICATE_REMOTE_BUSY 0x0200
#define LLC_INDICATE_REMOTE_READY 0x0100
#define LLC_INDICATE_TI_TIMER_EXPIRED 0x0080
#define LLC_INDICATE_DLC_COUNTER_OVERFLOW 0x0040
#define LLC_INDICATE_ACCESS_PRTY_LOWERED 0x0020
#define LLC_INDICATE_LOCAL_STATION_BUSY 0x0001
typedef struct {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -