OpenSS7
SS7 for the
Common Man
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.
Last modified: Tue, 08 Jul 2008 16:57:17 GMT
Home TopIndex FirstPrev Next LastMore Download Info FAQ Mail  Home -> Documentation -> Man Pages -> Manual Page
Quick Links

Download

SCTP

SIGTRAN

SS7

Hardware

STREAMS

Asterisk

Related

Package

Manual

FAQ

Man Pages

Applications

SS7 Stack

ISDN Stack

SIGTRAN Stack

VoIP Stack

MG Stack

SS7/ISDN Devices

IP Transport

Embedded Systems

OS

Documentation

FAQ

SIGTRAN

Design

Conformance

Performance

References

Man Pages

Manuals

Papers

Home

Overview

Status

Documentation

Resources

About

News

Description: Manual Page

Keywords: ss7 ss7/ip ss7 over ip ss7 mtp ss7 sccp ss7 tcap sigtran mtp sccp tcap openss7 acb56 linux telephony pstn linux telephony linux nebs linux compactpci


CDIAPI

Section: OpenSS7 CDI API Library (3)
Updated: Tue, 17 Oct 2017 21:37:55 GMT
Index Return to Main Contents

NAME

cdiapi, libcdiapi - CDI API Library

INTERFACE

CDI[1] Application Program Interface[2].
GCOM, Inc., specific and proprietary.

LIBRARY

libcdiapi(3), the CDI API Library.

SYNOPSIS

#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stropts.h>
#include <sys/cdi.h>
#include <cdiapi.h>

int cdi_allow_input_req(intfd, int*state_ptr);
int cdi_attach_req(intfd, longppa, int*state_ptr);
int cdi_close(intfd);
void cdi_decode_ctl(char*msg);
char *cdi_decode_modem_sigs(unsigned intsigs);
int cdi_detach_req(intfd, int*state_ptr);
int cdi_dial_req(intfd, unsigned intppa, unsigned intsigs, char*dial_string, intdial_length);
int cdi_disable_req(intfd, unsigned longdisposal, int*state_ptr);
int cdi_enable_req(intfd, int*state_ptr);
int cdi_get_a_msg(intfd, char*buf, intnbytes);
int cdi_get_modem_sigs(intfd, intflag);
int cdi_init(intlog_options, char*log_name);
int cdi_init_FILE(intlog_options, FILE*log_file);
int cdi_modem_sig_poll(intfd);
int cdi_modem_sig_req(intfd, unsigned intsigs);
int cdi_open(char*hostname);
int cdi_open_data(void);
int cdi_perror(char*msg);
int cdi_printf(char*fmt, ...);
void cdi_print_msg(unsignedchar*buf, unsigned intnbytes, intindent);
int cdi_put_allow_input_req(intfd);
int cdi_put_attach_req(intfd, longppa);
int cdi_put_both(intfd, char*ctrl_ptr, intctrl_length, char*data_ptr, intdata_length, intflags);
int cdi_put_data(intfd, char*data_ptr, intdata_length, longflags);
int cdi_put_detach_req(intfd);
int cdi_put_dial_req(intfd, char*dial_string, intdial_length);
int cdi_put_disable_req(intfd, unsigned longdisposal);
int cdi_put_enable_req(intfd);
int cdi_put_frame(intfd, unsigned charaddress, unsigned charcontrol, unsignedchar*buf, intnbytes);
int cdi_put_proto(intfd, intnbytes, longflags);
int cdi_rcv_msg(intfd, char*buf, intnbytes, longflags);
int cdi_read_data(intfd, char*buf, intnbytes);
int cdi_set_log_size(longnbytes);
int cdi_wait_ack(intfd, unsigned longprimitive, int*state_ptr);
int cdi_write_data(intfd, char*buf, intnbytes);
int cdi_xray_req(intfd, intupa, inton_off, inthi_wat, intlo_wat);

OVERVIEW

libcdiapi
is an OpenSS7 implementation of the GCOM CDI API Library[2] for Linux Fast-STREAMS.

DESCRIPTION

The CDI API Library is a library of CDI helper and utility functions designed for use with the Communications Device Interface (CDI)[1], cdi(7). The original library was designed by GCOM, Inc., <http://www.gcom.com/>, and first documented[2] in 1997.

The CDI API Library documented here is the OpenSS7 implementation of a library intended on being a work-alike with the GCOM library in accordance with the GCOM documentation[2].

FUNCTIONS

libcdiapi implements the following CDI API library functions:

cdi_allow_input_req(3)- send CD_ALLOW_INPUT_REQ(7) and await ack.
cdi_attach_req(3)- send CD_ATTACH_REQ(7) and await ack.
cdi_close(3)- close a CDI stream.
cdi_decode_ctl(3)- decode primitive and output to log file.
cdi_decode_modem_sigs(3)- decode modem signals to string.
cdi_detach_req(3)- send CD_DETACH_REQ(7) and await ack.
cdi_dial_req(3)- dial a modem.
cdi_disable_req(3)- send CD_DISABLE_REQ(7) and await ack.
cdi_enable_req(3)- send CD_ENABLE_REQ(7) and await ack.
cdi_get_a_msg(3)- get a message.
cdi_get_modem_sigs(3)- send CD_MODEM_SIG_POLL(7) and await ack.
cdi_init(3)- initialize CDI library.
cdi_init_FILE(3)- initialize CDI library with log file.
cdi_modem_sig_poll(3)- put at CD_MODEM_SIG_POLL primitive.
cdi_modem_sig_req(3)- put CD_MODEM_SIG_REQ(7) primitive.
cdi_open(3)- open local or remote CDI stream.
cdi_open_data(3)- open a CDI stream.
cdi_perror(3)- perror(3) to log file.
cdi_printf(3)- print message to log file.
cdi_print_msg(3)- print data with indented hexadecimal.
cdi_put_allow_input_req(3)- put CD_ALLOW_INPUT_REQ(7) primitive.
cdi_put_attach_req(3)- put CD_ATTACH_REQ(7) primitive.
cdi_put_both(3)- put control and data.
cdi_put_data(3)- put a data message.
cdi_put_detach_req(3)- put CD_DETACH_REQ(7) primitive.
cdi_put_dial_req(3)- put CD_ENABLE_REQ(7) primitive with dial string.
cdi_put_disable_req(3)- put CD_DISABLE_REQ(7) primitive.
cdi_put_enable_req(3)- put CD_ENABLE_REQ(7) primitive.
cdi_put_frame(3)- put a frame.
cdi_put_proto(3)- put a control message.
cdi_rcv_msg(3)- receive a message.
cdi_read_data(3)- read data from CDI stream.
cdi_set_log_size(3)- set log file size.
cdi_wait_ack(3)- wait for an acknowledgement.
cdi_write_data(3)- write data to CDI stream.
cdi_xray_req(3)- X-ray a CDI stream.

USAGE

To use the CDI API Library, include <sys/cdi.h> and <cdiapi.h> header files in C language programs. Add the `-lcdiapi' flag to the linker command when linking C language programs that use this library.

Preparing the Library

The following functions are used to prepare the CDI API library:

cdi_init(3)
Initializes the CDI API library, opens a log file for use by the initializing process and sets the logging options associated with the file.
cdi_init_FILE(3)
Initializes the CDI API library, uses the provided log file, and sets the loggin options associated with the file.
cdi_set_log_size(3)
Sets the maximum log size. Once this maximum log size is reached, the file will be rotated.

Opening a CDI Stream

The following functions are used to open or close a CDI stream:

cdi_open(3)
Opens a new CDI stream on the local or a remote host.
cdi_open_data(3)
Opens a new CDI stream on the local host.
cdi_close(3)
Closes a CDI stream on the local or remote host.

Manipulating the Device

The following functions are used to associate and manipulate a device:

cdi_attach_req(3)
Issues a CD_ATTACH_REQ(7) primitive to attach the CDI stream to a Physical Point of Attachment (PPA). This function awaits acknowledgement.
cdi_detach_req(3)
Issues a CD_DETACH_REQ(7) primitive to detach the CDI stream from the underlying device (PPA). This function awaits acknowledgement.
cdi_enable_req(3)
Issues a CD_ENABLE_REQ(7) primitive to enable the underlying device associated with the attached PPA for the current stream. This function awaits acknowledgement.
cdi_disable_req(3)
Issues a CD_DISABLE_REQ(7) primitive to disable the underlying device associated with the attached PPA for the current stream. This function awaits acknowledgement.
cdi_allow_input_req(3)
Issues a CD_ALLOW_INPUT_REQ(7) primitive to place the underlying device in full duplex mode for the current stream. This function awaits acknowledgement.
cdi_put_attach_req(3)
Issues a CD_ATTACH_REQ(7) primitive to attach the CDI stream to a Physical Point of Attachment (PPA). This function does not await acknowledgement.
cdi_put_detach_req(3)
Issues a CD_DETACH_REQ(7) primitive to detach the CDI stream from the underlying device (PPA). This function does not await acknowledgement.
cdi_put_enable_req(3)
Issues a CD_ENABLE_REQ(7) primitive to enable the underlying device associated with the attached PPA for the current stream. This function does not await acknowledgement.
cdi_put_disable_req(3)
Issues a CD_DISABLE_REQ(7) primitive to disable the underlying device associated with the attached PPA for the current stream. This function does not await acknowledgement.
cdi_put_allow_input_req(3)
Issues a CD_ALLOW_INPUT_REQ(7) primitive to place the underlying device in full duplex mode for the current stream. This function does not await acknowledgement.
cdi_wait_ack(3)
Await acknowledgement for a previously issued primitive.

Data Communications

The following functions are used to pass data and primitives to and from a CDI stream:

cdi_write_data(3)
Writes data to the device.
cdi_read_data(3)
Reads data from the device.
cdi_rcv_msg(3)
Receives a message on the CDI stream.
cdi_put_proto(3)
Puts a M_PROTO(9) message on the CDI Stream.
cdi_put_data(3)
Puts a M_DATA(9) message on the CDI Stream.
cdi_put_both(3)
Puts both a M_PROTO(9) and M_DATA(9) message on the CDI Stream.
cdi_put_frame(3)
Puts a frame with address and control bytes prepended to data.

Utilities

The following functions are used for general purposes:

cdi_modem_sig_req(3)
Sets modem leads by issuing aCD_MODEM_SIG_REQ(7) primitive.
cdi_printf(3)
Prints information to the CDI API Library log file.
cdi_decode_modem_sigs(3)
Decodes modem signals (leads) and provides a diagnostic character string.
cdi_decode_ctl(3)
Decodes a control message and places the decoded data in the log.
cdi_print_msg(3)
Decodes a data message and places the hexadecimal representation in the log.
cdi_perror(3)
Prints an error message to the log.

MT CONTEXT

The The OpenSS7 Project implementation of the CDI API Library is fully thread-safe. The variables documented as global are instead contained in thread-specific data. Functions that return static buffers, such as cdi_decode_modem_sigs(3), return a pointer to a thread-specific buffer.

RETURN

Most function call return zero (0) on success and minus one (-1) on error.

ERRORS

When most functions fail, they return minus one (-1) and set the global errno(3) variable to an appropriate error code.

NOTICES

The CDI API Library is GCOM-specific[2]. It may be necessary to define the `C' preprocessor symbol, _GCOM_SOURCE, before including the <sys/cdi.h> header file to expose the symbolic constants, data structures and declarations necessary for the use of these functions. It may be necessary to include the <cdiapi.h> header file to expose the symbolic constants, data structures and declarations necessary for the user of these functions.

FILES

@includedir@/OpenSS7/sys/cdi.h
the standard CDI[1] header file.
@includedir@/OpenSS7/cdiapi.h
the GCOM-specific header file.
@libdir@/libcdiapi.a
the static library version of the CDI API Library.
@libdir@/libcdiapi.so
the shared object library version of the CDI API Library.

BUGS

The CDI API Library has no known bugs.

SEE ALSO

cdi(7), cdiapi(3), dlpiapi(3), npiapi(3), STREAMS(9).

COMPATIBILITY

The OpenSS7 CDI API library is compatible with documentation of the GCOM CDI API library[2] and applications based on the CDI API, with the following compatibility considerations:

---
Application programming interfaces for devices and modules that implement the Communications Device Interface (CDI)[1], cdi(7), have not been subjected to standardization and are, therefore, inherently non-portable. Portable STREAMS applications, drivers and modules will utilize the service primitive interface directly using putmsg(2s), getmsg(2s), write(2s), read(2s) and ioctl(2s) system calls and the definitions provided in the <sys/cdi.h> header file.
---
CDI API Library functions are GCOM-specific[2], and are provided only for porting GCOM applications, drivers and modules to Linux Fast-STREAMS. They are inherently non-portable. These functions will be avoided by portable CDI application programs, drivers and modules.
---
Binary compatibility is not attempted, only source compatibility: any binary compatibility experienced is coincidental and may change on a future release.

It may be necessary to recompile all applications programs, and STREAMS drivers and modules, that share definitions with the CDI API library through the <cdiapi.h> header file, using The OpenSS7 Project supplied header files.

---
The The OpenSS7 Project implementation of the CDI API Library is designed to be fully thread-safe. When used in a POSIX threads environment, the implementation is not expected to be bug-for-bug compatible with the GCOM implementation, which does not document interactions with multi-threaded programs.

For further compatibility information, see cdi(7) and STREAMS(9).

CONFORMANCE

CDI[1], CDI API documentation[2].

HISTORY

CDI first appeared in NCR Comten around 1989.

CDI API documentation[2] was first issued by GCOM in 1997.

VERSIONS

This manual page was written for the The OpenSS7 Project version of the CDI API Library.

REFERENCES

[1]
CDI, OpenSS7 CAE Specification: Communications Device Interface (CDI) Specification, Revision 0.9.2, Draft 2, July 15, 2007, (Edmonton, Canada), B. Bidulock, OpenSS7 Corporation. Distributed with package strxns-0.9.2. <http://www.openss7.org/specs/cdi.pdf>
[2]
CDI-API, CDI --- Application Program Interface Guide, Original Edition, 1997, March 1999, (Savoy, IL), G. Gerrietts, D. Grothe, M. Matthews and D. Healy, GCOM. <http://www.gcom.com/>

TRADEMARKS

OpenSS7tm
is a trademark of OpenSS7 Corporation.
Linux®
is a registered trademark of Linus Torvalds.
UNIX®
is a registered trademark of The Open Group.
Solaris®
is a registered trademark of Sun Microsystems.

Other trademarks are the property of their respective owners.

IDENTIFICATION

The OpenSS7 Project: Package OpenSS7 version 0.9.2 released Tue, 17 Oct 2017 21:37:55 GMT.

Copyright©1997-2008OpenSS7 Corp.
All Rights Reserved.
(See roff source for permission notice.)



Index

NAME
INTERFACE
LIBRARY
SYNOPSIS
OVERVIEW
DESCRIPTION
FUNCTIONS
USAGE
Preparing the Library
Opening a CDI Stream
Manipulating the Device
Data Communications
Utilities
MT CONTEXT
RETURN
ERRORS
NOTICES
FILES
BUGS
SEE ALSO
COMPATIBILITY
CONFORMANCE
HISTORY
VERSIONS
REFERENCES
TRADEMARKS
IDENTIFICATION

This document was created by man2html, using the manual pages.
Time: 21:37:55 GMT, October 17, 2017
OpenSS7
SS7 for the
Common Man
Home TopIndex FirstPrev Next LastMore Download Info FAQ Mail  Home -> Documentation -> Man Pages -> Manual Page
Last modified: Tue, 08 Jul 2008 16:57:17 GMT
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.