...
Applies to: WG3.x
Header check:
btuhrtis not declared in the WG3.2 headers; see the note in chapter 11 (ticker,btuTicker(),BRKTHU.H:214-217).
...
When reading this variable, you should temporarily disable interrupts to avoid skew between the 16-bit halves of the value. For example, we use this code in the Major BBS:
| Code Block |
|---|
unsigned long hrtval(void) { unsigned long hrtsmp; dsairp(); hrtsmp=btuhrt; enairp(); return(hrtsmp); } |
btulan
####### VARIABLE NAME
btulan — LAN capability and status flags
####### DECLARATION
| Code Block |
|---|
extern int btulan; #define BTLIPXD 0x0001 /* bit 0: IPX Direct circuits supported */ #define BTLIPXV 0x0002 /* bit 1: IPX Virtual circuits supported */ #define BTLSPX 0x0004 /* bit 2: SPX circuits supported */ #define BTLI7A 0x0100 /* bit 8: IPX driver is loaded */ #define BTLSPXL 0x0200 /* bit 9: SPX is loaded */ |
####### DESCRIPTION
Your C program could use btulan to make a report on these conditions:
| Code Block |
|---|
printf("Your GSBL supports:\n"); if (btulan&BTLIPXD) { printf(" IPX Direct Circuit channels\n"); } if (btulan&BTLIPXV) { printf(" IPX Virtual Circuit channels\n"); } if (btulan&BTLSPX) { printf(" SPX channels\n"); } if ((btulan&(BTLIPXD+BTLIPXV+BTLSPX)) == 0) { printf(" no LAN access at all\n"); } printf("The IPX driver %s been loaded at interrupt vector hex 7A\n", btulan&BTLI7A ? "has" : "has not"); printf("SPX %s installed on this node\n", btulan&BTLSPXL ? "is" : "is not"); |
####### CAUTIONS
Note that the first three bits are always available when your program is running. The last two are available only after calling btuitz() and before calling btuend(). The above program must include the header file BRKTHU.H, and be run between calls to btuitz() and btuend().
...
You could use it to display the version somewhere:
| Code Block |
|---|
printf("Based on GSBL-%s for %d users",btuver,btusrs); |
Or, you could use this variable to do different things based on the version code of the GSBL, for example:
| Code Block |
|---|
if (strcmp(btuver,"J") == 0) { jspecific(); } else if (strcmp(btuver,"K") == 0) { kspecific(); } else { allelse(); } |
btux25
####### VARIABLE NAME
...
This array contains the SPX version numbers, minor version first:
| Code Block |
|---|
printf("SPX version %d.%d\n",lanrev[1],lanrev[0]); |
####### CAUTIONS
This array is only available after btuitz() has been called and only if SPX is available.
...
This is the number of SPX sessions that your program can support. To increase this number, you might be able to increase the SPX CONNECTIONS parameter in your Netware SHELL.CFG or NET.CFG file:
| Code Block |
|---|
SPX CONNECTIONS = 100 |
Refer to your Novell documentation for proper placement of this line.
...
ticker — second timer
####### DECLARATION
| Code Block |
|---|
extern unsigned ticker; /* 0 to 65535 and back again*/ |
####### DESCRIPTION
Every second, the contents in this variable increments. After it reaches 65535, it goes back to 0 and starts over again. According to the properties of 16-bit unsigned arithmetic, you can sample the value of ticker at two different times, and the difference between the values will reflect the time between the samplings, as long as that time is less than 65535 seconds (about 18 hours).
...
If you set this flag to a 1, then the User Data field of an incoming call request packet is tacked onto the end of the RING xxx CALLING xxx string as a fifth word, as in:
| Code Block |
|---|
RING 81020551 CALLING 30448512 IGNEOUS-7 |
####### CAUTIONS
The User Data field should be ASCII and have no imbedded control characters. The input buffer for the channel must be large enough (as specified by btusiz(), btulsz(), or btubsz()) to hold the entire string.
...
Previous: Major BBS v10: 14 Architecture | Contents | Next: Major BBS v10: 16 Library Routines