DLPI uses data link service access point (DLSAP) addresses. These are used when connecting to a given address by the DL_CONNECT_REQ, DL_CONNECT_CON and DL_CONNECT_IND primitives. Addressing is handled differently for LLC2 and LAPB.
The LLC2 DLSAP is contained in the following structure:
struct llc_dladdr {
u_char dl_mac[6]; /* MAC address */
u_char dl_sap; /* LLC SAP */
};
The file /usr/include/netdlc/llc2.h contains the structure definition.
The members of the llc_dladdr structure are:
Table 11-6 Members of llc_dladdr structure|
Members |
Description |
|---|---|
|
dl_mac |
The MAC address |
|
dl_sap |
The LLC SAP (service access point). |
The address field is only required when LAPB is being used over a Public Switched Telephone Network (PSTN). In this case, the dl_address fields contain the PSTN address, in the format defined by the pstnformat structure:
struct pstnformat {
uint8 pstn_len; /* Address length in octets */
uint8 pstn_add[20]; /* LAPB Address in hexadecimal */
};
The members of the pstnformat structure are:
Table 11-7 Members of pstnformat structure|
Members |
Description |
|---|---|
|
pstn_len |
The length of the address as bytes. |
|
pstn_add |
The LSAP in hexadecimal format. This can be up to 20 digits long. |
The file /usr/include/netx25/sdlpi.h contains the structure definition.