DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

incf(ADMP)


incf -- Internet Configuration Facility

Syntax

Programmer's interface:
#include <sys/types.h>
#include <netinet/in_cfg.h>
#include <fcntl.h>

fd = open(_PATH_INCONFIG, flags);

Description

The INCF driver provides user-level access to kernel configuration variables used by the Internet drivers.

Access to the INCF driver is via two ioctls: INCFG_RETRIEVE and INCFG_MODIFY. These ioctls are issued as I_STR ioctls (see streamio(M).

Each ioctl operates on an in_config_t structure, which has the following definition:

   #define	MAX_SYM	256
   

typedef struct in_config { char *ic_kname; /* symbol name in kernel */ char ic_name[MAX_SYM]; /* symbol name */ caddr_t ic_addr; /* kernel address */ u_long ic_current; /* current/default val */ u_long ic_minimum; /* minimum value */ u_long ic_maximum; /* maximum value */ } in_config_t;

To retrieve current information about a kernel variable, copy the name of the desired variable into the ic_name field, and then issue an INCFG_RETRIEVE ioctl. The ic_current, ic_minimum, and ic_maximum fields will be filled in by the kernel.

To modify the value of a variable, copy the name of the desired variable into the ic_name field, assign the desired value to the ic_current field, and issue an INCFG_MODIFY ioctl. The kernel performs upper and lower bounds checking on the specified value. If the value is acceptable, the kernel configuration will be updated.

Diagnostics

An ioctl operation may fail with the errno set to one of the following:

[EACCES]
when a non-root user attempts to modify a variable

[ENOENT]
when the specified variable cannot be found in the kernel

[EINVAL]
when the ioc_count of the argument is not the size of an in_config_t structure

[EDOM]
when the specified value is below the minimum allowed by the kernel

[ERANGE]
when the specified value is greater than the maximum allowed by the kernel

[ENXIO]
when another process has the configuration driver open

Limitations

This mechanism can currently only be used to manipulate 32-bit quantities.

Files

/dev/inet/cfg

See also

inconfig(ADMN), inet(SFF), streamio(M)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003