ndcfg(1M)


ndcfg -- network driver configuration command interpreter

Synopsis

ndcfg [-a] [-b] [-d X] [-e] [-f filename]
    [-h] [-j] [-l filename] [-m] [-n]
    [-q] [-t] [-v]
    [-D dec_number] [-W num_secs]

ndcfg

Description

ndcfg is a general-purpose tool for installing, configuring, modifying, and removing network drivers from the system. It checks the network adapter driver's bcfg(4dsp) file, ignoring any that contain errors or are not applicable to the system, and waits for user input. ndcfg is run automatically by netcfg(1M) but can also be run by users, either directly or as part of a pipe(2). Driver writers can also use ndcfg to check for syntax errors in their bcfg file.

ndcfg creates a log in the /usr/lib/netcfg/tmp/ndcfg.log file when network adapter drivers are configured with either the Network Configuration Manager or the -l option to the netcfg(1M) command. This log shows exactly what happened as the driver was configured, including all ndcfg actions.

Command line options

ndcfg accepts the following command line options in both interactive and batch modes:

-a
use tab as delimiter in output

-b
idinstall(1M) should run idbuild(1M).

-d X
set resput delimiter to char X. Default is space.

-e
Treat first error condition as fatal.

-j
Display command output as well as logging output to a file when running with -l option.

-l filename
Log all input and output to filename.

-t
TCL mode. This sets and unsets many flags.

-D dec_number
Set debugging level to the number bitmask.

-W num_secs
Set RMopen timeout to num_secs. Default is 60 seconds.

The following command line options are valid only for interactive mode:

-f filename
Check the bcfg file specified by filename for syntax errors. filename must give the absolute path.

-h
Show heading in output.

-m
Enable more mode. This mode can also be set with the more command while running ndcfg.

-n
Do not show the ndcfg> prompt.

-q
Do not load default bcfg files.

-v
Verbose mode.

Interacting with ndcfg

ndcfg can be run as either a batch or interactive command with a large set of commands for examining the configuration of a network adapter card and its associated driver(s).

Input lines to ndcfg take the form:

   command [arguments] 
command is one of the ndcfg commands described below; arguments are qualifying data for the command.

In the command descriptions:

bcfgindex
is a number that corresponds to a bcfg file.

element
corresponds to the netcfg chain that describes the device.

The commands available within ndcfg are grouped as follows:

General commands

more on|off
Turn more(1) mode on or off

debug decimal_number
Set permanent debugging level to decimal_number for this bcfg file only.

tcl 0|1
Turn TCL mode off or on.

help [arg]
Display help for commands

quiet
Do not display information about bcfg file errors

verbose
Display all information about bcfg file errors. This is equivalent to the -v command line option. The default behavior is to suppress all notices and errors.

! command
Run specified UNIX command from the shell. Piping works to string together a series of commands.

quit | bye | exit
Quit the ndcfg program.

auths
Display work and maximum kernel privilege sets.

clear
Clear the screen.

nlist symbol [newvalue]
Read symbol from /dev/kmem and display its value. If newvalue is specified, then the contents of the symbol are changed to newvalue.

promiscuous
Show installed adapters that support promiscuous mode. See the mdiioctl(7) manual page for more information about promiscuous mode support.

showrejects
List the bcfg files that were rejected by ndcfg and the reason(s) why they were rejected.

Specify bcfg files to use

loaddir pathname_hierarchy
Load all bcfg files contained in the pathname_hierarchy tree, usually either the /etc/inst/nics/drivers or /etc/inst/nd/mdi tree. pathname_hierarchy must give the absolute pathname.

loadfile pathname_file
Load the specified bcfg file. pathname_file must give the absolute pathname.

count
Show the number of bcfg files loaded.

location
Show full path name for each bcfg file that is currently loaded.

bcfgpathtoindex pathname
Show the current bcfg index for the specified absolute pathname.

elementtoindex element
Display the bcfgindex for the specified element.

General bcfg inquiry and manipulation commands

bcfghasverify
Determine whether the ISA driver corresponding to this bcfg file has the CFG_VERIFY subroutine to the config(D2) entry point or, for DDI versions prior to version 8, a _verify(D2) entry point routine.

ISAautodetect get bcfgindex
Retrieve current parameters from firmware.

ISAautodetect set element
Set parameters on firmware. The following parameters can be set: IOADDR, DMA, MEMADDR, IRQ, a CUSTOM parameter. See bcfg(4dsp) for more information about these parameters.

idinstall bcfgindex actual_topology failover_device lanwan args
Install driver represented by bcfgindex into the kernel. actual_topology is one of the following: ETHER, TOKEN, ISDN, FDDI, ATM, X25, FRAMERELAY, OTHER. failover_device is in the form device_name(netX) for the primary device or 0 for devices that do not support failover capabilities. lanwan is set to 1 for LAN devices and 2 for WAN devices.

args is the list of arguments defined for this driver. KEY= is always required, as are any CUSTOM parameters that are defined in the driver's bcfg(4dsp) file. ISA bus drivers define additional parameters such as IRQ, IOADDR, MEMADDR and DMA.

idmodify element variable=value
Modify the value of variable in the resource manager.

idremove element failover
Remove driver represented by element from the kernel. failover is set to 1 if the device supports failover capabilities; 0 if the device does not support failover.

unloadall
Unload all bcfg files from memory

Display information from bcfg file

showindex drivername
Display the index(es) for each DRIVER_NAME variable value in the bcfg file.

showdriver indexnumber
Display the DRIVER_NAME values for the specified indexnumber in the bcfg file.

showbus indexnumber
Display the BUS= values for the specified indexnumber in the bcfg file.

showname indexnumber
Display the NAME= values for the specified indexnumber in the bcfg file.

showfailover
Show all index(es) for drivers that support failover in the bcfg file. This requires that FAILOVER=true, that a valid TOPOLOGY= value is specified, and that a valid BUS= is specified for the configuration on the current machine.

showrejects
Show bcfg files that are invalid and give the reason.

showserialttys
Show all serial device names available for use in the /dev/term directory.

showvariable bcfgindex variable
Show the specified variable and value from the bcfg file.

showalltopologies LAN|WAN
Display all possible LAN or WAN topologies that can be used on this machine based on currently-loaded bcfg files. Use the output of this command as input to the showtopo command and for the showserialttys command if SERIAL appears in the list.

showtopo topo_arg
Display all cards to install on machines that have the topology specified by topo_arg.

showcustomnum bcfgindex
Display the value of CUSTOM_NUM in the specified bcfg file.

showcustom bcfgindex custom_number
Display the contents of the specified CUSTOM[x] array in the specified bcfg file.

showhelpfile bcfgindex
Display the value of HELPFILE in the specified bcfg file.

Display information from incore resource manager database

resmgr [key]
Dump contents of incore resource manager database (or the entry associated with the resource manager key) similar to resmgr(1M).

resdump [key]
Display all parameters from incore resource manager database (or the entry associated with the resource manager key) with values interpreted as:
   number number_range string 

resshowunclaimed
Walk through resource manager searching for unclaimed BOARD_IDS that match all locaded bcfg(4dsp) BOARD_IDS and BUS. Returns bcfgindex entries for unclaimed BOARD_IDS or, if all BOARD_IDS are claimed, returns ERROR.

resget key parameter[,type]
Display the value of the specified parameter from the incore resource manager database. If the parameter is unknown to the resource manager library, you must supply type from the following:

n
numeric

r
numeric range

s
string

resput key parameter[,type]=value
Assign the specified value to parameter in the incore resource manager database. If the parameter is unknown to the resource manager library, you must supply type from the following:

n
numeric

r
numeric range

s
string

resshowkey variable
Show which resource manager key contains the specified variable.

showISAcurrent NETCFG_ELEMENT
Display the attributes in the resource manager database that are associated with NETCFG_ELEMENT.

showCUSTOMcurrent NETCFG_ELEMENT
Display the CUSTOM parameters and values that are currently associated with NETCFG_ELEMENT in the incore resource manager database.

cmd arg

Display bus configuration information

pcishort [reskey]
Display PCI information in short format. An optional resource manager key can be supplied.

pcilong [reskey]
Display PCI information in long format. An optional resource manager key can be supplied.

pcivendor vendorid
Display the identified PCI vendor. vendorid can be decimal, hex, or octal; hex numbers start with 0x, octal number start with 0, and any other number is assumed to be decimal.

eisashort [reskey]
Display EISA information in short format. An optional resource manager key can be supplied.

eisalong [reskey]
Display EISA information in long format. An optional resource manager key can be supplied.

mcashort [reskey]
Display MCA information in short format. An optional resource manager key can be supplied.

mcalong [reskey]
Display MCA information in long format. An optional resource manager key can be supplied.

i2olong [reskey]
Display I2O information in long format. An optional resource manager key can be supplied.

i2oshort [reskey]
Display I2O information in short format. An optional resource manager key can be supplied.

Display ELF information

version
Display version string from the Driver.o file associated with this bcfg file. The version string corresponds to the following symbol defined in the Driver.o file:

static char _ndversion[]="my sample driver version 1.0";

netcfg displays this string when it displays card information.

getstamp filename
Retrieve the version stamp from the ELF header for filename.

stamp filename text
Embed version information in text into the ELF header for filename. This creates a new ELF section.

Hot-plug related commands

hpsldump
Dump all hot-plug structures.

hpslsuspend element
Suspend the network adapter associated with element by calling the DDI 8 driver driver with CFG_SUSPEND.

hpslresume element
Resume a previously suspended DDI 8 driver driver associated with element.

hpslgetstate element
Get current Hot Plug Services Library (HPSL) statistics for the loaded driver represented by element.

hpslcanhotplug element
Determine if the driver represented by element is both DDI 8 and hot-plug capable.

Files

/etc/inst/nd/mdi directories

/etc/inst/nics/drivers directories

/usr/lib/netcfg/tmp/ndcfg.log
ndcfg log for the driver configuration, created automatically by the Network Configuration Manager or the -l option to the netcfg(1M) command.

References

bcfg(4dsp), netcfg(1M), dlpid(1M), ndstat(1M), netinfo(1Mbnu), Section 3hpsl manual pages

``Testing and debugging MDI drivers''


30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.