Often, the receiver of an Incoming Call needs to know the address of the caller in order to validate the call. By default, the calling address in the Call Request is set to the address (including the subaddress, if any) specified in the configuration file of the link over which the Call Request is sent. There are several parameters in the link configuration file, all described in the preceding subsection, that determine how Solstice X.25 preprocesses the calling address to satisfy the requirements of the interface.
You may specify a different address using the X25_WR_LOCAL_ADR ioctl. The address is specified in a CONN_ADR structure.
typedef struct conn_adr_s { u_char hostlen; /* length of BCDs */ u_char host[(MAXHOSTADR+1)/2]; } CONN_ADR;
Here, as in the CONN_DB structure, hostlen is the length of the address in BCD digits, and host contains the address in packed BCD format. The X25_WR_LOCAL_ADR ioctl call is issued as follows:
CONN_ADR addr; int s, error; error = ioctl(s, X25_WR_LOCAL_ADR, &addr);
The setting of the source address--and whether the X25_WR_LOCAL_ADR ioctl has effect--is controlled by the setting of the Source Address Control parameter in the Link Mode Parameters window in x25tool. See Solstice X.25 9.2 Administration Guide for instructions on setting this parameter.