Solstice X.25 9.2 Developer's Guide

12.3.9 Explicit Link Selection--Called Side

The called side may restrict the calls it wishes to examine for a possible match to a particular link by means of the X25_SET_LINK ioctl.

int s, linkid, error;
 CONN_DB addr;      /* address and protocol identifier */

 linkid = 2;        /* restrict calls to link 2 */
 error = ioctl(s, X25_SET_LINK, &linkid);

 /* check error here */

 error = bind(s, &addr, sizeof(addr)); 

The ANY_SUBADDRESS and ANY_LINK bits can still be used in the same way as explained in the section"12.3.4 Address Binding " of this chapter. The ANY_LINK bit, in this context, serves as an abbreviation for the link address, and you do not have to specify the link address explicitly. A zero-length address also works in the same way as described in the "12.3.4 Address Binding " section. Otherwise, you must specify the address in exactly the form it will be received. That is, it must exactly match the called address field of the received Incoming Call packet.