Versions Compared

Key

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

X.25 Programming

Applies to: v10

v10 inc/ contains no X.25 header (directory listing checked). Whether any X.25 support remains is unverified; treat this chapter as history.

The features described in this section are available only with the X.25 Software Option for the GSBL. See page 9 for an overview of how X.25 works.

The GSBL handles low-level communications with X.25 and LAN channels differently than with modem or serial channels. While modems or serial ports must be timer-interrupt driven at the byte level, X.25 and LAN channels are handled without interrupts, at the packet level.

The btuxmt() output routine still puts data into a circular buffer. And the btuinp() routine still gets data out of another circular buffer — these aspects of the GSBL have not changed. However, the interaction between these buffers and the X.25 or LAN hardware takes place transparently during your call to btuscn().

So remember that only after your call to btuscn():

    Will received data become available for:
    btuibw(), count of input bytes waiting
    btuinp(), ASCII input
    btuict(), binary input
    btuica(), binary inputDoes transmitted data, specified by:
    btuxmt(), ASCII output
    btuxct(), binary output

    actually get formed into packets and transmitted, and will:

    btuoba(), output bytes available

    indicate room in the output bufferWill monitored output become available:
    btumon(), start monitoring a channel
    btumds(), report latest output to that channel
    (similarly with btumon2() and btumds2())Simulated keystrokes on the monitored channel (btumks() or btumks2()), however, immediately become available in the input buffer.

    Handling an Incoming Call

    When an incoming “call request” packet is received by the server on an X.25 virtual circuit:

    btusts() returns status 3

    btuinp() returns a string of the form:

    RING <caller> CALLING <callee>

    Where <caller> is the decimal network address (if available) for the source of this call, and <callee> is your network address. If you set x25udt to 1, then btuinp() will return:

    RING <caller> CALLING <callee> <user data field...>

    See page 30 for details on the limitations of this method.

    To answer an incoming call:

    btucmd("A"); (which will immediately generate a status 22, see also page 139)

    Making an Outgoing Call

    To place an outgoing call on an X.25 channel, issue any of the following command string formats using btucmd(chan,cmdstg) (page 69):

    W<caller>,<callee>/<user data field>M

    W<callee>/<user data field>M

    W<caller>,<callee>M

    W<callee>M

    The <caller> and <callee> fields are decimal addresses, up to 16 digits each. The <user data field> is specified in hexadecimal. See page 69 for more details about making an outgoing call on an X.25 virtual circuit.


    Previous: Major BBS v10: 18 LAN Programming  |  Contents  |  Next: Major BBS v10: 20 Client-Side Addendum (Worldgroup v2)