incf(ADMP)


incf -- Internet Configuration Facility

Synopsis

Programmer's interface:
#include <sys/types.h>
#include <netinet/in_cfg.h>
#include <fcntl.h>
#include <paths.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(HW)).

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.

Files


/dev/cfg

/dev/inet/cfg
defined as _PATH_INCF in <paths.h>

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

References

inconfig(ADMN), inet(ADMP), streamio(HW)

Notices

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


© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005