Eiconcard Connections for Linux Contents Previous Next

X.25 Development Tools Constants and Structures

This section provides Information on X.25 Development Tools constants and structures. Constant definitions are used across the Tools API.

Modes of Operation
Description Constant Value

Non-wait mode connection

X25NOWAIT

0

Wait mode connection

X25WAIT

1

The following definitions may be used to aid in cross-platform development using X.25 Development Tools:

Define Descriptions
Description Definition Name Definition Value

Small data pointer

OSSDTPTR

*

Data pointer

OSDTPTR

*

Function pointer

OSFNPTR

*

Function definition

OSFNDEF

Short definition

OSSHORT

short

Integer definition

OSINT

int

Null Post Routine
Description Constant Value

NULL function pointer

X25NULLFN

(void (OSFNPTR)( ))0

Flow Control Flags
Description Constant Value

Flow control disable

X25FLOWCTLOFF

0

Flow control enable

X25FLOWCTLON

1

X-Bit Info Field Values
Description Constant Value

Interrupt received

XI_INTR

0x01

Virtual circuit reset

XI_VCRESET

0x02

M-bit

XI_MBIT

0x10

End-to-end confirm

XI_ENDEND

0x20

D-bit

XI_DBIT

0x40

Q-bit

XI_QBIT

0x80

x25done Parameter Constants
Description Constant Value

All connections

XD_ALLCONN

-1

Return immediately even if no request is completed

XD_TONOW

0

No timeout, wait indefinitely until a request completes

XD_NOTO

-1

X25hangup Constants
Description Constant Value

Clear call after data acknowledge

XH_NOTIMM

0x00

Clear call immediately

XH_IMM

0xFF

Call And Listen Constants
Description Constant Value

Maximum X.25 addr length in bytes

X25_ADDRLEN

15

Maximum X.25 addr extension length in bytes

X25_ADDREXT

40

User data buffer size

XD_DATALEN

128

Maximum user data size for fast select

XD_FDATALEN

XD_DATALEN

Maximum user data size

XD_UDATALEN

16

Network user id length

XP_NUIDLEN

8

Network user id password length

XP_NUIPWLEN

6

Maximum gateway name length

XG_GATEWLEN

16

X.25 Facilities Constants
Description Constant Value

Maximum facility length

XF_FACLEN

109

X.25 facility class bits

XF_CLASS

0xC0

Class A

XF_A

0x00

Class B

XF_B

0x40

Class C

XF_C

0x80

Class D

XF_D

0xC0

Extended facility

XF_EXTEND

0xFF

National Facility Marker, 1st octet

XF_NFM

0x00

Local net or non X.25 marker, 2nd octet

XF_LOC_MARKER

0x00

Extended address marker, 2nd octet

XF_DTE_MARKER

0x0F

Non X.25 called DTE marker, 2nd octet

XF_NXC_MARKER

0xFF

Local net or non X.25 marker, 2nd octet

XF_LOC_MARKER

0x00

Reverse charging

XF_REVCHRG

0x01

Throughput class negotiation

XF_TCN

0x02

Closed user group selection, basic format

XF_CUGBF

0x03

Charging information: requesting service

XF_CIRS

0x04

Called line address modified notification

XF_CLAMN

0x08

Closed user group with outgoing access selection, basic format

XF_CUGOABF

0x09

Bilateral closed user group selection

XF_BCUG

0x41

Packet size

XF_PKTSIZE

0x42

Window size

XF_WINSIZE

0x43

RPOA selection basic format

XF_RPOABF

0x44

Closed user group, extended format

XF_CUGXF

0x47

Closed user group with outgoing access selection, extended format

XF_CUGOAXF

0x48

Transmit delay selection and indication

XF_TDSI

0x49

Charging information: receiving information, call duration

XF_CIRICD

0xC1

Charging information: receiving information, segment count

XF_CIRISC

0xC2

Call redirection notification

XF_CRN

0xC3

RPOA selection extended format

XF_RPOAXF

0xC4

Charging information: receiving information, monetary unit

XF_CIRIMU

0xC5

Network user id

XF_NUID

0xC6

Extended remote address

XF_CALLED_EXT

0xC9

Extended local address

XF_CALLING_EXT

0xCB

x25gatew Structure

struct x25gatew

{

OSINT

xg_len;

/* Length of xg_gatewname */

char

xg_gatewname[XG_GATEWLEN];

/* Gateway name address */

};

x25data Structure

struct x25data

{

OSINT

xd_len;

/* Length in bytes of xd_data */

char

xd_data[XD_DATALEN];

/* Data buffer address */

};

x25parm Structure

struct x25parm

{

struct x25data

_xp_data;

/* User data */

OSINT

xp_revcharge;

/* Reverse charge flag */

char

xp_nuid[XP_NUIDLEN];

/* Network user identification */

char

xp_nuidpw[XP_NUIPWLEN];

/* NUI password */

}

 
X.25 Status Constants and Structures

X.25 Connection Status Constants
Description Constant Value

Module/application name length

XS_NAMELEN

16

Reserved field length

XS_RESSIZE

2

LCN field length

XS_LCNSIZE

2

xs_status Constants
Description Constant Value

Session connected

XS_SESSION

3

Call cleared

XS_CLEARED

6

x25stat Structure

struct x25stat

{

unsigned char

xs_reserved[XS_RESSIZE];

/* Reserved */

unsigned char

xs_lcn[XS_LCNSIZE];

/* lcn[0]=LGN; lcn[1]=Logical channel number */

unsigned char

xs_session;

/* Session number */

unsigned char

xs_status;

/* Session status */

char

xs_aname[XS_NAMELEN];

/* Application name */

char

xs_mname[XS_NAMELEN];

/* Module name */

unsigned char

xs_recvp;

/* # of receive requests pending */

unsigned char

xs_sendp;

/* # of send requests pending */

char

xs_dteaddr[X25_ADDRLEN+1];

/* DTE addresses in semi-octets */

unsigned long

xs_pkttxmt;

/* # of packets for transmit */

unsigned long

xs_pktack;

/* # of packets to be acknowledged */

unsigned long

xs_chrtxmt;

/* # of characters for transmit */

unsigned long

xs_chrack;

/* # of chars to be acknowledged */

unsigned long

xs_pktrecv;

/* # of packets received from network */

unsigned long

xs_pktread;

/* # of packets to be read */

unsigned long

xs_chrrecv;

/* # of chars received from network */

unsigned long

xs_chrread;

/* # of characters to be read */

unsigned long

xs_lreset;

/* # of resets by local DTE */

unsigned long

xs_rreset;

/* # of resets by remote DTE/DCE */

}

 
X.25 Statistics Constants and Structures

X.25 Statistics Constants
Description Constant Value

Reset statistics option

XST_RESET

1

Do not reset statistics option

XST_CONT

0

Get statistics for all cid

XST_ALLCID

0x80

Line State Constants
Description Constant Value

Closed

XS_LCLOSED

1

Closing

XS_LCLOSING

2

Opening

XS_LOPENING

3

Answer

XS_LANSWER

4

Answer delaying

XS_LANSWERDELAY

5

Opened

XS_LOPENED

6

Protocol State Constants
Description Constant Value

Closed

XS_PCLOSED

1

Closing

XS_PCLOSING

2

Opening

XS_POPENING

3

Opened

XS_POPENED

4

Resetting

XS_PRESETTING

5

Wait for reset

XS_PWAITRESET

6

Wait for open

XS_PWAITOPEN

7

Xid send

XS_PXIDSEND

8

Xid receive

XS_PXIDRECV

9

Link Level Statistics Structure

struct x25lnkstats

{

unsigned OSSHORT

lnk_nline;

/* # of lines */

unsigned OSSHORT

lnk_inuse;

/* # of lines in use */

unsigned char

lnk_line_status;

/* Line state */

unsigned char

lnk_protocol_status;

/* Protocol state */

unsigned char

lnk_vs;

/* V(S) */

unsigned char

lnk_vr;

/* V(R) */

unsigned char

lnk_lnr;

/* LN(R) */

unsigned char

lnk_lbusy;

/* Local busy */

unsigned char

lnk_rbusy;

/* Remote busy */

unsigned char

lnk_window;

/* Window size */

unsigned OSSHORT

lnk_frame_size;

/* Frame size */

unsigned char

lnk_reserved[XS_RESSIZE];

/* reserved */

unsigned long

lnk_t1_expired;

/* # of times T1 has expired */

unsigned long

lnk_tx_retry;

/* # of retransmissions */

unsigned long

lnk_tx_badcrc;

/* # of bad FCSs transmitted */

unsigned long

lnk_rx_badcrc;

/* # of bad FCSs received */

unsigned long

lnk_tx_abort;

/* # of aborts transmitted */

unsigned long

lnk_rx_abort;

/* # of aborts received */

unsigned long

lnk_tx_underrun;

/* # of underruns transmitted */

unsigned long

lnk_rx_overrun;

/* # of overruns received */

unsigned long

lnk_tx_badtype;

/* # of unknowns transmitted */

unsigned long

lnk_rx_badtype;

/* # of unknowns transmitted */

unsigned long

lnk_tx_sabm;

/* # of SABMs transmitted */

unsigned long

lnk_rx_sabm;

/* # of SABMs received */

unsigned long

lnk_tx_disc;

/* # of DISCs transmitted */

unsigned long

lnk_rx_disc;

/* # of DISCs received */

unsigned long

lnk_tx_ua;

/* # of UAs transmitted */

unsigned long

lnk_rx_ua;

/* # of UAs received */

unsigned long

lnk_tx_dm;

/* # of DMs transmitted */

unsigned long

lnk_rx_dm;

/* # of DMs received */

unsigned long

lnk_tx_frmr;

/* # of FRMRs transmitted */

unsigned long

lnk_rx_frmr;

/* # of FRMRs received */

unsigned long

lnk_tx_xid;

/* # of XIDs transmitted */

unsigned long

lnk_rx_xid;

/* # of XIDs received */

unsigned long

lnk_tx_ifr;

/* # of INFOs transmitted */

unsigned long

lnk_rx_ifr;

/* # of INFOs received */

unsigned long

lnk_tx_rr;

/* # of RRs transmitted */

unsigned long

lnk_rx_rr;

/* # of RRs received */

unsigned long

lnk_tx_rnr;

/* # of RNR transmitted */

unsigned long

lnk_rx_rnr;

/* # of RNR received */

unsigned long

lnk_tx_rej;

/* # of REJs transmitted */

unsigned long

lnk_rx_rej;

/* # of REJs received */

};

Packet Level Statistics Structure

struct x25pktstats

{

unsigned OSSHORT

pkt_nlcn;

/* # of VCs configured */

unsigned OSSHORT

pkt_vcs_inuse;

/* # of VCs in used */

unsigned char

pkt_reserved[XS_RESSIZE];

/* Reserved */

unsigned char

pkt_vc[XS_LCNSIZE];

/* vc[0]=LGN, vc[1]=LCN */

unsigned char

pkt_cstate;

/* Circuit state */

unsigned char

pkt_ustate;

/* Reserved */

unsigned char

pkt_txwmax;

/* Transmit window size */

unsigned char

pkt_rxwmax;

/* Receive window size */

unsigned OSSHORT

pkt_psize;

/* Transmit packet size */

unsigned char

pkt_ps;

/* P(S) */

unsigned char

pkt_pr;

/* P(R) */

unsigned char

pkt_lpr;

/* LP(R) */

unsigned char

pkt_filler[1];

/* Reserved */

unsigned char

pkt_lbusy;

/* Local busy */

unsigned char

pkt_rbusy;

/* Remote busy */

unsigned char

pkt_remote[X25_ADDRLEN+1];

/* Remote DTE address- ASCII*/

unsigned char

pkt_local[X25_ADDRLEN+1];

/* Local DTE address-ASCII */

unsigned long

pkt_tx_rstrtreq;

/* # of restart requests transmitted */

unsigned long

pkt_rx_rstrtreq;

/* # of restart requests received */

unsigned long

pkt_tx_rstrtcnf;

/* # of restart confirm transmitted */

unsigned long

pkt_rx_rstrtcnf;

/* # of restart confirm received */

unsigned long

pkt_tx_regreq;

/* # of registration requests transmitted */

unsigned long

pkt_rx_regreq;

/* # of registration requests received */

unsigned long

pkt_tx_regcnf;

/* # of registration confirm transmitted */

unsigned long

pkt_rx_regcnf;

/* # of registration confirm received */

unsigned long

pkt_tx_diag;

/* # of diagnostics transmitted */

unsigned long

pkt_rx_diag;

/* # of diagnostics received */

unsigned long

pkt_tx_other;

/* # of unknowns packet transmitted */

unsigned long

pkt_rx_other;

/* # of unknowns packet received */

unsigned long

pkt_tx_callreq;

/* # of call requests transmitted */

unsigned long

pkt_rx_callreq;

/* # of call requests received */

unsigned long

pkt_tx_callcon;

/* # of call accepts transmitted */

unsigned long

pkt_rx_callcon;

/* # of call accepts received */

unsigned long

pkt_tx_clrreq;

/* # of clear requests transmitted */

unsigned long

pkt_rx_clrreq;

/* # of clear requests received */

unsigned long

pkt_tx_clrcnf;

/* # of clear confirm transmitted */

unsigned long

pkt_rx_clrcnf;

/* # of clear confirm received */

unsigned long

pkt_tx_rstreq;

/* # of reset requests transmitted */

unsigned long

pkt_rx_rstreq;

/* # of reset requests received */

unsigned long

pkt_tx_rstcnf;

/* # of reset confirm transmitted */

unsigned long

pkt_rx_rstcnf;

/* # of reset confirm received */

unsigned long

pkt_tx_intreq;

/* # of intr requests transmitted */

unsigned long

pkt_rx_intreq;

/* # of intr requests received */

unsigned long

pkt_tx_intcnf;

/* # of intr confirm transmitted */

unsigned long

pkt_rx_intcnf;

/* # of intr confirm received */

unsigned long

pkt_tx_rr;

/* # of RRs packets transmitted */

unsigned long

pkt_rx_rr;

/* # of RRs packets received */

unsigned long

pkt_tx_rnr;

/* # of RNRs packets transmitted */

unsigned long

pkt_rx_rnr;

/* # of RNRs packets received */

unsigned long

pkt_tx_rej;

/* # of REJs packets transmitted */

unsigned long

pkt_rx_rej;

/* # of REJs packets received */

unsigned long

pkt_tx_datapkt;

/* # of DATA packets transmitted */

unsigned long

pkt_rx_datapkt;

/* # of DATA packets received */

unsigned long

pkt_tx_dataseg;

/* # of DATA segments transmitted */

unsigned long

pkt_rx_dataseg;

/* # of DATA segments received */

unsigned long

pkt_tx_datachar;

/* # of DATA characters transmitted */

unsigned long

pkt_rx_datachar;

/* # of DATA characters received */

};

 
Command Completed Constants and Structures

xi_cmd Constants
Constant Value Associated Functions

XC_CALL

0

x25call( ), x25gatewcall( ), x25xcall( ), x25pvccall( )

XC_LISTEN

1

x25listen( ), x25gatewlisten( ), x25xlisten( )

XC_CALLACCEPT

2

x25accept( )

XC_SEND

3

x25send( )

XC_SENDCONF

4

x25sendconfirm( )

XC_SENDEXP

5

x25sendexp( )

XC_SENDEXPCONF

6

x25sendexpconfirm( )

XC_RECEIVE

7

x25recv( )

XC_HANGUP

8

x25hangup( ), x25xhangup( )

XC_HANGUPCONF

9

x25hangupconfirm( ), x25xhangupconfirm( )

XC_RESET

10

x25reset( )

XC_RESETCONF

11

x25resetconfirm( )

XC_FLOWCTL

12

x25flowctl( )

XC_STATUS

13

x25status( )

XC_STATSLNK

14

x25linkstats( )

XC_STATSPKT

15

x25packetstats( )

xi_info Constants
Constant Value Description

XC_DATA

0x00

Normal data received

XC_EXP

0x01

Expedited data received

XC_ACKEXP

0x41

Expedited data received; confirm expected

XC_RRESETIND

0x02

Remote reset indication data

XC_RRESETCONF

0x22

remote reset confirm data

XC_ACKRRESETIND

0x42

remote reset indication data; confirm expected

XC_LRESETIND

0x82

local reset indication data

XC_RCLRIND

0x03

Remote clear indication data

XC_RCLRCONF

0x23

Remote clear confirm data

XC_ACKRCLRIND

0x43

remote clear indication data; confirm expected

XC_LCLRIND

0x83

local clear indication data

x25doneinfo Structure

struct x25doneinfo

{

OSINT

xi_len;

/* xi_buf length in bytes */

char

OSSDTPTR xi_buf;

/* Buffer address */

OSINT

xi_cid;

/* Connection id */

OSINT

xi_cmd;

/* Command code */

OSINT

xi_info;

/* X-bit field */

OSINT

xi_retcode;

/* Return code */

}

 

Eiconcard Connections for Linux Contents Previous Next

Copyright (c) 2001 Eicon Networks