-- IDL module extracted from ITU-T T.180 (06/1998)
module x
{
/* --------------------------------------------------------------------------------------------------------*/
/* Asynchronous events returned by x_look() */
/* --------------------------------------------------------------------------------------------------------*/
const short NOEVENT = 0x0000; /* no event present at the endpoint */
const short ERROR = 0x0001; /* error condition detected by the */
/* service provider */
const short CONIND = 0x0002; /* connection indication received */
const short CONCONF = 0x0004; /* connect confirmation received */
const short DATA = 0x0008; /* normal data received */
const short EXDATA = 0x0010; /* expedited data received */
const short SP = 0x0020; /* service primitive received */
const short DISCONNECT = 0x0040; /* disconnect received */
const short RELIND = 0x0080; /* orderly release indication received */
const short RELCONF = 0x0100; /* orderly release confirmation received */
const short GODATA = 0x0200; /* normal data may be sent again */
const short GOEXDATA = 0x0400; /* expedited data may be sent again */
const short END = 0x0800; /* end indication received */
const short EVENTS = 0x0FFF; /* event mask */
/* --------------------------------------------------------------------------------------------------------*/
/* Bit-Flag Definitions */
/* The bit-masks are used in the flags field of call_struct, conind_struct, */
/* optmgmt_struct, release_struct and in the flags argument of x_snddata(), */
/* x_rcvdata(), x_snddis(), x_rcvdis, x_sndsp(), x_rcvsp() */
/* --------------------------------------------------------------------------------------------------------*/
const unsigned long NOFLAG = 0x0000; /* no flag is set */
const unsigned long MORE = 0x0001; /* more data */
/* used in struct x_call, x_conind, */
/* x_snddata(), x_rcvdata() */
const unsigned long EXPEDITED = 0x0002; /* expedited data */
/* used in x_snddata(), x_rcvdata() */
const unsigned long NEGATIVE = 0x0004; /* negative confirmation/response */
/* used in struct x_call */
/* --------------------------------------------------------------------------------------------------------*/
/* Option Management Bit-Flag Definitions */
/* The bit-masks are used in the flags field of optmgmt_struct. */
/* Input bits are marked with (i) and output bits with (o). */
/* --------------------------------------------------------------------------------------------------------*/
const unsigned long NEGOTIATE = 0x00000100; /* (i) negotiate (set) options */
const unsigned long CHECK = 0x00000200; /* (i) check options */
const unsigned long DEFAULT = 0x00000400; /* (i) get default values of */
/* options */
const unsigned long CURRENT = 0x00000800; /* (i) get current values of */
/* options */
const unsigned long SUCCESS = 0x00001000; /* (o) successful option */
/* negotiation */
const unsigned long PARTSUCCESS = 0x00002000; /* (o) partially successful */
/* option negotiation */
const unsigned long READONLY = 0x00004000; /* (o) option is readonly */
const unsigned long NOTSUPPORT = 0x00008000; /* (o) option is not supported */
const unsigned long FAILURE = 0x00010000; /* (o) failure in option */
/* negotiation */
/* --------------------------------------------------------------------------------------------------------*/
/* Execution modes */
/* Used in x_open() and x_chexmod() calls */
/* --------------------------------------------------------------------------------------------------------*/
const short SYNCHRON = 1; /* synchronous execution mode */
const short ASYNCHRON = 2; /* asynchronous execution mode */
/* --------------------------------------------------------------------------------------------------------*/
/* Protocol Module Identifiers */
/* --------------------------------------------------------------------------------------------------------*/
const unsigned long NO_MODULE = 0x7FFFFFFF; /* no protocol module present */
const unsigned long XAPI_LEVEL = 20; /* denotes the XAPI library; */
/* to access XAPI-level */
/* options with x_optmgmt() */
const unsigned long TOP_LEVEL = 2; /* Topmost protocol module */
/* the special value is defined */
/* in the provider info */
/* --------------------------------------------------------------------------------------------------------*/
/* General purpose service parameter values */
/* --------------------------------------------------------------------------------------------------------*/
const unsigned long PV_TRUE = 1; /* parameter value boolean true */
const unsigned long PV_FALSE = 0; /* parameter value boolean false */
/* --------------------------------------------------------------------------------------------------------*/
/* Names of address components */
/* --------------------------------------------------------------------------------------------------------*/
const unsigned long A_OUTBAND_ADR = 1; /* outband address */
const unsigned long A_INBAND_ADR = 3; /* inband address */
const unsigned long A_INB_SUBADR = 4; /* inband subaddress */
const unsigned long A_SERVICE = 5; /* service indicator */
const unsigned long A_P_SELECTOR = 1000; /* presentation selector */
const unsigned long A_S_SELECTOR = 1001; /* session selector */
const unsigned long A_T_SELECTOR = 1002; /* transport selector */
/* --------------------------------------------------------------------------------------------------------*/
/* Constants defining the maximum length for address components */
/* --------------------------------------------------------------------------------------------------------*/
const unsigned long C_MAX_IBADR = 32; /* max. length of inband address */
const unsigned long C_MAX_IBSADR = 32; /* max. length of inband subaddress */
const unsigned long C_MAX_OBADR = 32; /* max. length of outband address */
const unsigned long C_MAX_SERVICE = 6; /* max. length of service indicator */
const unsigned long C_MAX_PSEL = 32; /* max. length of presentation selector */
const unsigned long C_MAX_SSEL = 16; /* max. length of session selector */
const unsigned long C_MAX_TSEL = 32; /* max. length of transport selector */
/* --------------------------------------------------------------------------------------------------------*/
/* Constants defining the maximum length for session components */
/* --------------------------------------------------------------------------------------------------------*/
const unsigned long C_MAX_REF = 64; /* max. length of service user reference */
/* and common reference */
const unsigned long C_MAX_ARI = 4; /* max. length of additional information */
/* --------------------------------------------------------------------------------------------------------*/
/* XAPI-level Options */
/* --------------------------------------------------------------------------------------------------------*/
const unsigned long O_TRACE = 1; /* XAPI trace option */
/* --------------------------------------------------------------------------------------------------------*/
/* Defined values for option O_TRACE */
/* --------------------------------------------------------------------------------------------------------*/
const unsigned long OV_NOTRACE = 0x00; /* switches all traces off (default) */
const unsigned long OV_BUFFTRACE = 0x01; /* enables buffer trace for */
/* received and sent PDUs; */
/* all trace messages are disabled */
const unsigned long OV_ERR = 0x10; /* enables error trace messages */
/* and disables buffer traces */
const unsigned long OV_ERR_BUF = 0x11; /* enables error trace messages */
/* plus buffer traces */
const unsigned long OV_WRN = 0x30; /* enables error and warning */
/* trace messages; */
/* buffer traces are disabled */
const unsigned long OV_WRN_BUF = 0x31; /* enables error and warning trace */
/* messages plus buffer traces */
const unsigned long OV_INF = 0x70; /* enables error, warning, and */
/* info trace messages; */
/* buffer traces are disabled */
const unsigned long OV_INF_BUF = 0x71; /* enables error, warning, and */
/* info trace messages plus */
/* buffer traces */
/* --------------------------------------------------------------------------------------------------------*/
/* General Definitions */
/* --------------------------------------------------------------------------------------------------------*/
const unsigned long INFINITE = ~0; /*0xFFFFFFFF; */
/* BBB: value needs to be checked in */
/* language mappings infinite size */
/* suitable for unsigned long */
const unsigned long UNSPECIFIED = ~1; /* 0xFFFFFFFE; */
/* BBB: value needs to be checked in
/* language mappings unspecified size */
/* suitable for unsigned long */
/* --------------------------------------------------------------------------------------------------------*/
/* Service Provider Capabilities */
/* --------------------------------------------------------------------------------------------------------*/
const unsigned long SPC_COS = 0x00000001; /* connection-mode service */
const unsigned long SPC_CLS = 0x00000002; /* connectionless service */
const unsigned long SPC_ORD_REL = 0x00000004; /* orderly release */
const unsigned long SPC_0DATA = 0x00000008; /* zero-length data units */
const unsigned long SPC_DATA = 0x00000010; /* (normal) data */
const unsigned long SPC_EXPDATA = 0x00000020; /* expedited data */
const unsigned long SPC_NEGCONRSP = 0x00000040; /* negative connect response */
const unsigned long SPC_NEGCONCNF = 0x00000080; /* negative connect confirm. */
const unsigned long SPC_MORECONRQ = 0x00000100; /* MORE in x_conreq() */
const unsigned long SPC_MORECONCF = 0x00000200; /* MORE in x_conconf() */
const unsigned long SPC_MORECONIN = 0x00000400; /* MORE in x_conind() */
const unsigned long SPC_MORECONRP = 0x00000800; /* MORE in x_conrsp() */
const unsigned long SPC_MORERELRQ = 0x00001000; /* MORE in x_relreq() */
const unsigned long SPC_MORERELCF = 0x00002000; /* MORE in x_relconf() */
const unsigned long SPC_MORERELIN = 0x00004000; /* MORE in x_relind() */
const unsigned long SPC_MORERELRP = 0x00008000; /* MORE in x_relrsp() */
const unsigned long SPC_SP = 0x00010000; /* send service primitive */
const unsigned long SPC_MORESNDSP = 0x00020000; /* MORE in x_sndsp() */
const unsigned long SPC_MORERCVSP = 0x00030000; /* MORE in x_rcvsp() */
const unsigned long SPC_MORESNDDIS = 0x00040000; /* MORE in x_snddis() */
const unsigned long SPC_MORERCVDIS = 0x00050000; /* MORE in x_rcvdis() */
const unsigned long SPC_MASK = 0x000FFFFF; /* all defined capabilities */
/* --------------------------------------------------------------------------------------------------------*/
/* Disconnect Origination */
/* --------------------------------------------------------------------------------------------------------*/
const unsigned long PROVIDER_ABORT = 0x00000001; /* disconnect generated */
/* by the service provider */
const unsigned long ABORT = 0x00000002; /* disconnect generated */
/* by the user */
/* --------------------------------------------------------------------------------------------------------*/
/* Services indicated in error_struct */
/* --------------------------------------------------------------------------------------------------------*/
const unsigned long CONNECT_REQ = 0x01; /* connect request; x_conreq() */
const unsigned long CONNECT_RES = 0x02; /* connect response; x_conrsp() */
const unsigned long DATA_REQ = 0x03; /* data request; x_snddata() */
const unsigned long EXPDATA_REQ = 0x04; /* expedited data request; */
/* x_snddata() */
const unsigned long DISC_REQ = 0x05; /* disconnect request; x_snddis() */
const unsigned long RELEASE_REQ = 0x06; /* release request; x_relreq() */
const unsigned long RELEASE_RES = 0x07; /* release response; x_relrsp() */
const unsigned long SND_SP = 0x08; /* send service primitive; */
/* x_sndsp() */
/* --------------------------------------------------------------------------------------------------------*/
/* Cause Codes indicated in error_struct */
/* --------------------------------------------------------------------------------------------------------*/
const unsigned long CC_BADEVENT = 0x01; /* requested service unknown */
/* to the service provider */
const unsigned long CC_UNEXPECT = 0x02; /* requested service not allowed */
/* in current state of */
/* service provider */
const unsigned long CC_NOTSUPPORT = 0x03; /* requested service not */
/* supported by the service */
/* provider */
const unsigned long CC_BADVALUE = 0x04; /* illegal value specified for a */
/* a service parameter */
const unsigned long CC_MANDMISS = 0x05; /* mandatory service parameter */
/* missing */
const unsigned long CC_OTHER = 0x06; /* any other error */
const unsigned long CC_NOSPACE = 0x07; /* no space */
const unsigned long CC_SPNAME = 0x08; /* SP_name incorrect */
const unsigned long CC_ADDCOMP = 0x09; /* additional component */
/* incorrect */
const unsigned long CC_BADLENGTH = 0x0A; /* string or value too long */
const unsigned long CC_SEQ = 0x0B; /* SEQ incorrect */
/* --------------------------------------------------------------------------------------------------------*/
/* Service parameters for x_rcvend() */
/* --------------------------------------------------------------------------------------------------------*/
const unsigned long P_CONN_TIME = 0x01; /* Connection time */
const unsigned long P_DISC_TIME = 0x02; /* Disconnection time */
const unsigned long P_CHARGE = 0x03; /* Charging units */
const unsigned long P_DISC_REASON = 0x04; /* Disconnect reason */
/* --------------------------------------------------------------------------------------------------------*/
/* Possible states of a service endpoint */
/* --------------------------------------------------------------------------------------------------------*/
const short UNINIT = 0; /* uninitialized */
const short UNBND = 1; /* unbound */
const short IDLE = 2; /* idle */
const short OUTCON = 3; /* outgoing connection pending */
const short INCON = 4; /* incoming connection pending */
const short CONNECT = 5; /* connected / data transfer */
const short OUTREL = 6; /* outgoing release pending */
const short INREL = 7; /* incoming release pending */
const short WAITEND = 8; /* waiting for end indication */
typedef sequence < octet > octet_sequence;
/* --------------------------------------------------------------------------------------------------------*/
/* provinfo_struct */
/* Service provider information structure; returned by x_open(), */
/* x_bind() and x_getinfo(). */
/* --------------------------------------------------------------------------------------------------------*/
typedef unsigned long ten_unsigned_longs[10];
struct provinfo_struct
{
/* Protocol module identifiers of the modules in the service
* provider's protocol stack. If no protocol module is present on
* a certain layer in the protocol stack, the corresponding ln_pmid
* field(s) is(are) set to NO_MODULE
*/
ten_unsigned_longs l7_pmid; /* layer 7 protocol module IDs */
unsigned long l6_pmid; /* layer 6 protocol module ID */
unsigned long l5_pmid; /* layer 5 protocol module ID */
unsigned long l4_pmid; /* layer 4 protocol module ID */
unsigned long l3_pmid; /* layer 3 protocol module ID */
unsigned long l2_pmid; /* layer 2 protocol module ID */
unsigned long l1_pmid; /* layer 1 protocol module ID */
unsigned long Monitor_pmid; /* Monitor protocol module ID */
unsigned long max_qlen; /* max. supported value for qlen */
/* Buffer sizes recommended for the service provider. Output buffers
* with these sizes will be sufficent in all cases.
*/
unsigned long addr_buff_size; /* address buffer size */
unsigned long optn_buff_size; /* option buffer size */
unsigned long parm_buff_size; /* SP parameter buffer size */
unsigned long data_frgmt_size; /* maximum data fragment size */
unsigned long end_buff_size; /* end indication buffer size */
/* Maximum data unit sizes supported by the service provider.
*/
unsigned long max_sdu_size; /* max. size of a (normal) */
/* service data unit */
unsigned long max_esdu_size; /* max. size of an expedited */
/* service data unit */
unsigned long max_conn_user_data; /* max. user data size for */
/* connection primitives */
unsigned long max_disc_user_data; /* max. user data size for */
/* disconnect primitives */
unsigned long max_rels_user_data; /* max. user data size for */
/* release primitives */
/* The capabilities of the service provider are represented as
* bit-field. A capability is supported by the application system,
* if the corresponding bit is set in prov_capabilities; it is not
* supported, if the bit is cleared.
*/
unsigned long prov_capabilities; /* service provider capabilities */
};
/* --------------------------------------------------------------------------------------------------------*/
/* bind_struct */
/* argument structure for x_bind() */
/* --------------------------------------------------------------------------------------------------------*/
struct bind_struct
{
octet_sequence own_address; /* own NSAP address */
unsigned long qlen; /* number of incoming calls */
/* to be queued for the endpoint */
};
/* --------------------------------------------------------------------------------------------------------*/
/* call_struct */
/* argument structure for connection establishment */
/* --------------------------------------------------------------------------------------------------------*/
struct call_struct
{
octet_sequence address; /* address buffer */
octet_sequence parameter; /* SP parameter buffer */
octet_sequence user_data; /* user data buffer */
unsigned long sequence_nr; /* sequence number */
unsigned long flags; /* flags; MORE / NEGATIVE */
};
/* --------------------------------------------------------------------------------------------------------*/
/* conind_struct */
/* argument structure for connect indication */
/* --------------------------------------------------------------------------------------------------------*/
struct conind_struct
{
octet_sequence called_addr; /* address buffer called address */
octet_sequence calling_addr; /* address buffer calling address */
octet_sequence parameter; /* SP parameter buffer */
octet_sequence user_data; /* user data buffer */
unsigned long sequence_nr; /* sequence number */
unsigned long flags; /* flags; MORE */
};
/* --------------------------------------------------------------------------------------------------------*/
/* data_struct */
/* argument structure for x_snddata() and x_rcvdata() */
/* --------------------------------------------------------------------------------------------------------*/
struct data_struct
{
octet_sequence parameter; /* SP parameter buffer */
octet_sequence data; /* data buffer */
};
/* --------------------------------------------------------------------------------------------------------*/
/* discon_struct */
/* argument structure for x_snddis() and x_rcvdis() */
/* --------------------------------------------------------------------------------------------------------*/
struct discon_struct
{
octet_sequence user_data; /* user data buffer */
octet_sequence parameter; /* SP parameter buffer */
unsigned long origination; /* origination of disconnect; */
/* used on output only */
unsigned long sequence_nr; /* sequence number; used only */
/* when an incoming call is rejected */
};
/* --------------------------------------------------------------------------------------------------------*/
/* error_struct */
/* argument structure for x_rcverrors() */
/* --------------------------------------------------------------------------------------------------------*/
struct error_struct
{
unsigned long level; /* protocol module ID of the originator module */
unsigned long service; /* requested service that caused the error */
unsigned long cause; /* cause code specifying the reason of failure */
unsigned long diagnostic; /* additional protocol-specific diagnostic information */
};
/* --------------------------------------------------------------------------------------------------------*/
/* end_struct */
/* argument structure for x_rcvend() */
/* --------------------------------------------------------------------------------------------------------*/
struct end_struct
{
octet_sequence parameter; /* SP parameter buffer */
};
/* --------------------------------------------------------------------------------------------------------*/
/* optmgmt_struct */
/* argument structure for x_optmgmt() */
/* --------------------------------------------------------------------------------------------------------*/
struct optmgmt_struct
{
octet_sequence options; /* option definitions */
unsigned long flags; /* what to do with options */
};
/* --------------------------------------------------------------------------------------------------------*/
/* release_struct */
/* argument structure for orderly release */
/* --------------------------------------------------------------------------------------------------------*/
struct release_struct
{
octet_sequence parameter; /* SP parameter buffer */
octet_sequence user_data; /* user data buffer */
unsigned long flags; /* flags; MORE */
};
/* --------------------------------------------------------------------------------------------------------*/
/* sp_struct */
/* argument structure for x_sndsp() and x_rcvsp() */
/* --------------------------------------------------------------------------------------------------------*/
struct sp_struct
{
octet_sequence parameter; /* SP parameter buffer */
octet_sequence data; /* data buffer */
};
exception XERROR
{
short error_code;
};
interface ep
{
short bind( in short fd,
in string trans_name,
in bind_struct req,
out bind_struct ret,
out provinfo_struct info)
raises ( XERROR );
short chexmod( in short fd,
in short mode)
raises ( XERROR );
short close( in short fd
)
raises ( XERROR );
short conconf( in short fd,
out call_struct call)
raises ( XERROR );
short conind( in short fd,
out conind_struct call)
raises ( XERROR );
short conreq( in short fd,
in call_struct sndcall)
raises ( XERROR );
short conrsp( in short fd,
in short resfd,
in call_struct call)
raises ( XERROR );
short getinfo( in short fd,
out provinfo_struct info)
raises ( XERROR );
short look( in short fd
)
raises ( XERROR );
short optmgmt( in short fd,
in unsigned long level,
in optmgmt_struct req,
out optmgmt_struct ret)
raises ( XERROR );
short rcvdata( in short fd,
out data_struct data,
out unsigned long flags)
raises ( XERROR );
short rcvdis( in short fd,
out discon_struct disc,
out unsigned long flags)
raises ( XERROR );
short rcvend( in short fd,
out end_struct end)
raises ( XERROR );
short rcverror( in short fd,
out error_struct err)
raises ( XERROR );
short rcvinfo( in short fd,
out unsigned long level,
out unsigned long info,
out sp_struct par,
out unsigned long flags)
raises ( XERROR );
short rcvsp( in short fd,
out unsigned long level,
out unsigned long spname,
out sp_struct sp,
out unsigned long flags)
raises ( XERROR );
short relconf( in short fd,
out release_struct rel)
raises ( XERROR );
short relind( in short fd,
out release_struct rel)
raises ( XERROR );
short relreq( in short fd,
in release_struct rel)
raises ( XERROR );
short relrsp( in short fd,
in release_struct rel)
raises ( XERROR );
short snddata( in short fd,
in data_struct data,
in unsigned long flags)
raises ( XERROR );
short snddis( in short fd,
in discon_struct disc,
in unsigned long flags)
raises ( XERROR );
short sndinfo( in short fd,
in unsigned long level,
in unsigned long info,
in sp_struct par,
in unsigned long flags)
raises ( XERROR );
short sndsp( in short fd,
in unsigned long level,
in unsigned long spname,
in sp_struct sp,
in unsigned long flags)
raises ( XERROR );
short sync( in short fd
)
raises ( XERROR );
short unbind( in short fd
)
raises ( XERROR );
};
interface api
{
string b2c ( in octet_sequence nb,
inout unsigned long index,
out unsigned long len,
out unsigned long name,
out unsigned long status)
raises ( XERROR );
long b2l( in octet_sequence nb,
inout unsigned long index,
out unsigned long len,
out unsigned long name,
out unsigned long status)
raises ( XERROR );
short c2b( in octet_sequence nb,
inout unsigned long index,
in unsigned long len,
in unsigned long name,
in string value)
raises ( XERROR );
short error( in string errmsg,
in short xerror);
short l2b( in octet_sequence nb,
inout unsigned long index,
in unsigned long len,
in unsigned long name,
in long value)
raises ( XERROR );
short open( in string prov_name,
in short mode,
out provinfo_struct info)
raises ( XERROR );
string strerror( in short errnum);
};
};