// Returns number of free buffers // (BPQHOST function 7 (part)). int APIENTRY GetFreeBuffs(); // Returns count of packets waiting on stream // (BPQHOST function 7 (part)). int APIENTRY RXCount(int Stream); // Returns number of packets on TX queue for stream // (BPQHOST function 7 (part)). int APIENTRY TXCount(int Stream); // Returns number of monitor frames available // (BPQHOST function 7 (part)). int APIENTRY MONCount(int Stream); // Returns call connecten on stream (BPQHOST function 8 (part)). int APIENTRY GetCallsign(int stream, char * callsign); // Returns connection info for stream (BPQHOST function 8). int APIENTRY GetConnectionInfo(int stream, char * callsign, int * port, int * sesstype, int * paclen, int * maxframe, int * l4window); // Returns Path of BPQDirectroy UCHAR * APIENTRY GetBPQDirectory(); // Returns number of prcess attached to BPQ32 int APIENTRY GetAttachedProcesses(); // Send Session Control command (BPQHOST function 6) // Command = 0 Connect using APPL MASK IN param // Command = 1 Connect // Command = 2 Disconect // Command = 3 Return to Node int APIENTRY SessionControl(int stream, int command, int param); // Sets Application Flags and Mask for stream. (BPQHOST function 1) // Top bit of flags enables monitoring int APIENTRY SetAppl(int stream, int flags, int mask); int APIENTRY GetApplMask(int Stream); int APIENTRY GetApplFlags(int Stream); BOOL APIENTRY GetAllocationState(int Stream); // Get current Session State. Any state changed is ACK'ed // automatically. See BPQHOST functions 4 and 5. int APIENTRY SessionState(int stream, int * state, int * change); // Get current Session State. Dont Ack state change // See BPQHOST function 4. int APIENTRY SessionStateNoAck(int stream, int * state); // Send message to stream (BPQHOST Function 2) int APIENTRY SendMsg(int stream, char * msg, int len); // Send Raw (KISS mode) frame to port (BPQHOST function 10) int APIENTRY SendRaw(int port, char * msg, int len); // Get message from stream. Returns length, and count of frames // still waiting to be collected. (BPQHOST function 3) int APIENTRY GetMsg(int stream, char * msg, int * len, int * count ); // Perl Version - I couldn't get bpq32.pm to call GetMsg. Returns Lenth int APIENTRY GetMsgPerl(int stream, char * msg); // Get Raw (Trace) data (BPQHOST function 11) int APIENTRY GetRaw(int stream, char * msg, int * len, int * count ); // This is not an API function. It is a utility to decode a received // monitor frame into ascii text. int APIENTRY DecodeFrame(char * msg, char * buffer, int Stamp); // Sets the tracing options for DecodeFrame. Mask is a bit // mask of ports to monitor (ie 101 binary will monitor ports // 1 and 3). MTX enables monitoring on transmitted frames. MCOM // enables monitoring of protocol control frames (eg SABM, UA, RR), // as well as info frames. int APIENTRY SetTraceOptions(long mask, int mtxparam, int mcomparam); // Returns number of first unused BPQHOST stream. If none available, // returns 255. See API function 13. int APIENTRY FindFreeStream(); // Allocate stream. If stream is already allocated, return nonzero. // Otherwise allocate stream, and return zero int APIENTRY AllocateStream(int stream); // Release stream. int APIENTRY DeallocateStream(int stream); // Get number of ports configured int APIENTRY GetNumberofPorts(); // Get port number (ports aren't necessarily numbered 1 to n) int APIENTRY GetPortNumber(int portslot); // Enable async operation - new to Win32 version of API int APIENTRY BPQSetHandle(int Stream, HWND hWnd); char * APIENTRY GetApplCall(int Appl); char * APIENTRY GetApplAlias(int Appl); long APIENTRY GetApplQual(int Appl); BOOL APIENTRY SetApplCall(int Appl, char * NewCall); BOOL APIENTRY SetApplAlias(int Appl, char * NewCall); BOOL APIENTRY SetApplQual(int Appl, int NewQual); // Routines to support "Minimize to Tray" BOOL APIENTRY GetMinimizetoTrayFlag(); int APIENTRY AddTrayMenuItem(HWND hWnd, char * Label); int APIENTRY DeleteTrayMenuItem(HWND hWnd); // Log a message to the bpq32 console. int APIENTRY WritetoConsole(char * buff); // // Constants and equates for async operation // char BPQWinMsg[] = "BPQWindowMessage"; UINT BPQMsg; // // Values returned in lParam of Windows Message // #define BPQMonitorAvail 1 #define BPQDataAvail 2 #define BPQStateChange 4