Solstice X.25 9.2 Developer's Guide

8.21 x25_read_config_parameters_file--Reads a Configuration File Into a Data Structure

Synopsis
#include <netx25/x25_proto.h>
 #include <netx25/xnetdb.h>
 #include <netx25/config_functions.h>

    int X25_read_config_parameters_file (
                         char filename
                         struct config_ident     *ipt,
                         struct LINK_config_data *lpt,
                         struct X25_config_data  *xpt,
                         struct MLP_config_data  *mpt,
                         struct LAPB_config_data *lbp,
                         struct LLC2_config_data *l2p,
                         struct WAN_config_data  *wpt,
                         int *flag
     );
Use

x25_read_config_parameters reads the specified configuration file into a data structure.

Description

The parameters are:

Table 8-22 x25_read_config_parameters_file parameters

Parameter 

Description 

filename

The name of the file concerned. 

ipt

A pointer to the config_ident structure containing the link identifier. Setting this variable is mandatory.

lpt

A pointer to the link_item structure containing link information. Setting this variable is mandatory.

xpt

A pointer to the wlcfg structure containing the layer 3 (X.25) parameters. If you set this variable to NULL, information on these parameters is omitted.

mpt

A pointer to the mlp_item structure containing the MLP parameters. If you set this variable to NULL, information on these parameters is omitted. As the number of devices required by an MLP link is unknown, this routine allocates memory as required using calloc().

lbp

A pointer to the lliun_t structure containing the layer 2 LAPB parameters. If you set this variable to NULL, information on these parameters is omitted.

l2p

A pointer to the lliun_t structure containing the LLC2 parameters. If you set this variable to NULL, information on these parameters is omitted.

wpt

A pointer to the wan_tnioc structure containing the layer 1 (physical) parameters. If you set this variable to NULL, information on these parameters is omitted.

flag

Indicates whether data is being read for LLC2, LAPB or MLP. 

Return Value

A return value of 0 indicates success.