ISDN_PSPDN(3X) — NEWS-OS Programmer’s Manual
NAME
isdn_pspdn_call, isdn_pspdn_disc, isdn_pspdn_stat, isdn_pspdn_noinfo − support IP connection via X.25 packet switched network
SYNOPSIS
#include <newsisdn/isdn_iotype.h>
intisdn_pspdn_stat(ch, info)
intch;
structc_status ∗info;
intisdn_pspdn_noinfo(ch, noinfo)
intch;
structn_info∗noinfo;
intisdn_pspdn_call(addr, flag, ud, wait_time)
char∗addr;
intflag;
char∗ud;
intwait_time;
intisdn_pspdn_disc(ch, wait_time)
intch;
intwait_time;
DESCRIPTION
isdn_pspdn_stat copies the X.25 connection status of channel ch into the info structure
isdn_pspdn_noinfo copies the peer X.25 address of channel ch into the noinfo structure. However, this information is only valid when isdn_pspdn_stat() returns status of CALL_SETUP, CALL_ALERT or CALL_EST.
isdn_pspdn_call makes an IP connection to the specified peer addr. This function waits in max wait_time seconds for the connection to establish. It returns immediately if wait_time is set to 0. Currently, flag and ud are reserved (not supported yet); flag should be 0 and ud should be (char ∗)0. On success, isdn_pspdn_call returns an positive value ch to be used as channel identification.
isdn_pspdn_disc closes the IP connection on ch channel. The function waits in max wait_time seconds for disconnection. It returns immediately if wait_time is set to 0.
RETURN VALUE
Above functions except isdn_pspdn_call return 0 on success. In case of execution error, a −1 is returned with an error code stored in errno. On timeout a −2 is returned. In case of failure to establish or deestablish a call, a −3 is returned; the cause value can be interrogated with isdn_pspdn_stat.
FILES
/usr/sony/lib/libisdn.a, /sys/newsisdn/isdn_iotype.h
SEE ALSO
x25call(8), x25disc(8), isdnd(8)
BUGS
The returned value ch does not mean X.25 logical channel.
NEWS-OSRelease 4.1C