Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Global Variables

To use any of the following variables in a program, you should declare them in the variable declaration section of your C-language program in the manner shown under DECLARATION. The declaration must appear before any use of the variable. The header file BRKTHU.H includes all of these declarations.

btudtr

####### VARIABLE NAME

btudtr — DTR level after channel reset

...

To vary your handling of individual ports, you could set btudtr just before every call to bturst().

btuhrt

Applies to: WG3.x

Header check: btuhrt is 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 Worldgroupthe Major BBS:

unsigned long
hrtval(void)
{
     unsigned long hrtsmp;

     dsairp();
     hrtsmp=btuhrt;
     enairp();
     return(hrtsmp);
}

btulan

####### VARIABLE NAME

btulan — LAN capability and status flags

...

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().

btusrs

####### VARIABLE NAME

btusrs — number of users licensed

...

This variable is the number of users licensed for your copy of the GSBL.

In Worldgroupthe Major BBS, this variable is used to display the version code suffix (e.g. -32) in the SERVER UP audit trail message.

Channels defined beyond this number will always be non-hardware channels (bturst() will always return -10, see page 124). Non-hardware channels may be useful in simulating a user channel. See about the monitor feature on page 114 (and page 115).

btuver

####### VARIABLE NAME

btuver — GSBL version code

...

if (strcmp(btuver,"J") == 0) {
     jspecific();
}
else if (strcmp(btuver,"K") == 0) {
     kspecific();
}
else {
     allelse();
}

btux25

####### VARIABLE NAME

btux25 — whether or not GSBL supports X.25

...

The value of btux25 is not defined until after you call btuitz().

ictact

####### VARIABLE NAME

ictact — actual number of bytes read by btuict()

...

When you use btuict() (page 96) to retrieve data bytes from the input buffer, as many as are available are copied, up to the trigger count (the trigger count is set by btutrg(), page 149). When less than the trigger count of bytes are available, the bytes are transferred anyway, but they are not taken out of the input buffer. This is when btuict() returns -2 (indicating insufficient bytes are available). In this situation, the global variable ictact is the way you have of determining how many bytes were copied into your buffer.

lanrev

####### VARIABLE NAME

lanrev — LAN SPX revision

...

This array is only available after btuitz() has been called and only if SPX is available.

lansca

####### VARIABLE NAME

lansca — LAN SPX connections available

...

This value is only available after btuitz() has been called.

lansop

####### VARIABLE NAME

lansop — LAN socket opened by btusdf()

...

lansop is only defined for hardware channels (i.e. bturst() returns non-negative), and only after calling btusdf().

ticker

####### VARIABLE NAME

ticker — second timer

...

This variable increments at a rate very close to 1 Hz (once a second), but don’t set your watch by it.

x25ign

####### VARIABLE NAME

x25ign — count of ignored incoming packets

...

the packet is not a DATA, CALL REQUEST, CALL CONFIRM, or CLEAR packet.an incoming data packet has a logical channel number (virtual circuit number) that does not agree with that of any channel defined (by btusdf()) for the GSBL.You can set x25ign to 0 also. It will be incremented every time a packet is ignored.

x25udt

####### VARIABLE NAME

x25udt — user data reporting flag

...