The W_SETTUNE ioctl sets the tunable parameters of the LAPB wanmod module. This controls physical parameters such as the maximum frame length and line speed.
The following is from the file /usr/include/netx25/wan_control.h.
/* Ioctl block for WAN W_SETTUNE command
*/
struct wan_tnioc {
uint8 w_type; /* Always = WAN_TUNE */
uint8 w_spare[3]; /* (for alignment) */
uint32 w_snid; /* subnetwork id character ('*' => 'all') */
wantune_t wan_tune; /* Table of tuning values
*/
};
/* WAN tuning structure */
typedef struct wantune {
uint16 WAN_options; /* WAN options */
struct WAN_hddef WAN_hd; /* HD information. */
} wantune_t;
/*
This is the structure which contains all tuneable information
*/
struct WAN_hddef {
uint16 WAN_maxframe; /* WAN maximum frame size */
int WAN_baud; /* WAN baud rate */
uint16 WAN_interface ; /* WAN physical interface */
}
union {
uint16 WAN_cptype; /* Variant type */
struct WAN_x21 WAN_x21def;
struct WAN_v25 WAN_v25def;
} WAN_cpdef ; /* WAN call procedural definition * * for hardware interface. */
};
/*
This contains all of the national network specific timeouts.
*/
struct WAN_v25 {
uint16 WAN_cptype; /* Variant type. */
uint16 callreq; /* Abort time for call request command * * if network does not support CFI. */
};
The members of the wan_tnioc structure are:
Table 11-48 Members of the wan_tnioc structure|
Member |
Description |
|---|---|
|
w_snid |
The link id. It should be set to the same value as lli_ppa in the L_SETPPA L_SETTUNE ioctls. |
|
WAN_options |
Reserved for future use. Must be set to 0. |
|
WAN_maxframe |
The maximum frame size to be used on this interface (unit is octet). |
|
WAN_baud |
The speed of the line (unit is baud, 0 is used for external clocking). |
|
WAN_interface |
The type of interface. Should always be set to WAN_V28 |
|
WAN_cptype |
The type of interface. Set this to WAN_NONE if no calling procedures are used (the most frequent case), or to WAN_V25bis if a calling procedure and V25bis modem are used. In this instance, the WAN_v25 structure must be filled. |