--- mstools/h/nb30.h 2018/08/09 18:20:01 1.1 +++ mstools/h/nb30.h 2018/08/09 18:23:10 1.1.1.4 @@ -1,6 +1,6 @@ //*++ // -// Copyright (c) 1991 Microsoft Corporation +// Copyright (c) 1991-1993 Microsoft Corporation // // Module Name: // @@ -20,9 +20,11 @@ //--*/ #ifndef NCB_INCLUDED - #define NCB_INCLUDED +#ifdef __cplusplus +extern "C" { +#endif /**************************************************************** * * @@ -31,7 +33,7 @@ ****************************************************************/ #define NCBNAMSZ 16 /* absolute length of a net name */ -#define MAX_LANA 12 /* lana's in range 0 to MAX_LANA */ +#define MAX_LANA 72 /* lana's in range 0 to MAX_LANA */ /* * Network Control Block @@ -48,7 +50,7 @@ typedef struct _NCB { UCHAR ncb_name[NCBNAMSZ]; /* our blank-padded netname */ UCHAR ncb_rto; /* rcv timeout/retry count */ UCHAR ncb_sto; /* send timeout/sys timeout */ - void (*ncb_post)( struct _NCB * ); /* POST routine address */ + void (CALLBACK *ncb_post)( struct _NCB * ); /* POST routine address */ UCHAR ncb_lana_num; /* lana (adapter) number */ UCHAR ncb_cmd_cplt; /* 0xff => commmand pending */ UCHAR ncb_reserve[10]; /* reserved, used by BIOS */ @@ -160,6 +162,42 @@ typedef struct _LANA_ENUM { UCHAR lana[MAX_LANA]; } LANA_ENUM, *PLANA_ENUM; +/* + * Structure returned to the NCB command NCBFINDNAME is FIND_NAME_HEADER followed + * by an array of FIND_NAME_BUFFER structures. + */ + +typedef struct _FIND_NAME_HEADER { + WORD node_count; + UCHAR reserved; + UCHAR unique_group; +} FIND_NAME_HEADER, *PFIND_NAME_HEADER; + +typedef struct _FIND_NAME_BUFFER { + UCHAR length; + UCHAR access_control; + UCHAR frame_control; + UCHAR destination_addr[6]; + UCHAR source_addr[6]; + UCHAR routing_info[18]; +} FIND_NAME_BUFFER, *PFIND_NAME_BUFFER; + +/* + * Structure provided with NCBACTION. The purpose of NCBACTION is to provide + * transport specific extensions to netbios. + */ + +typedef struct _ACTION_HEADER { + ULONG transport_id; + USHORT action_code; + USHORT reserved; +} ACTION_HEADER, *PACTION_HEADER; + +// Values for transport_id + +#define ALL_TRANSPORTS "M\0\0\0" +#define MS_NBF "MNBF" + /**************************************************************** * * @@ -194,6 +232,7 @@ typedef struct _LANA_ENUM { #define NCBSENDNA 0x71 /* NCB SEND NO ACK */ #define NCBCHAINSENDNA 0x72 /* NCB CHAIN SEND NO ACK */ #define NCBLANSTALERT 0x73 /* NCB LAN STATUS ALERT */ +#define NCBACTION 0x77 /* NCB ACTION */ #define NCBFINDNAME 0x78 /* NCB FIND NAME */ #define NCBTRACE 0x79 /* NCB TRACE */ @@ -266,6 +305,10 @@ Netbios( * Usage in a declaration: NCB_POST MyPostRoutine( PNCB pncb ); * ****************************************************************/ -#define NCB_POST +#define NCB_POST void CALLBACK + +#ifdef __cplusplus +} +#endif #endif /* NCB_INCLUDED */