Solstice X.25 9.2 Developer's Guide

12.7.2.17 Called/Calling AEF

There are three types of address extensions: OSI NSAP (AEF_NSAP), Partial OSI (AEF_PARTIAL_NSAP), and Non-OSI (AEF_NON_OSI). The Calling AEF may only be present in the Call Request packet.

Solstice X.25 9.2 Administration Guide describes how Solstice X.25 may be set up to automatically supply the Calling AEF (referred to as address extension) in a Call Request packet.

The Called AEF is set as follows:

typedef struct aef_s {
    u_char   aef_type;
 #define AEF_NONE      0
 #define AEF_NSAP      1
 #define AEF_PARTIAL_NSAP   2
 #define AEF_NON_OSI      3
    u_char   aef_len;
 #define MAX_AEF   40
    u_char   aef[(MAX_AEF+1)/2];
 } AEF;

 AEF   aef;
 aef.aef_type = AEF_NON_OSI;
 aef.aef_len = 7;        /* length in nibbles */
 aef.aef[0] = 0x12;
 aef.aef[1] = 0x34;
 aef.aef[2] = 0x56;
 aef.aef[3] = 0x70;      /* Note, unused nibble is zero */
 f.type = T_CALLED_AEF;
 f_called_aef = aef;
 error = ioctl(s, X25_SET_FACILITY, &f); 

The Called AEF is read as follows:

f.type = T_CALLED_AEF;
 error = ioctl(s, X25_GET_FACILITY, &f);
 aef = f_called_aef;

The Calling AEF is set and read similarly (using T_CALLING_AEF in place of T_CALLED_AEF and f_calling_aef in place of f_called_aef).