DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

ndcfg(ADM)


ndcfg -- network driver configuration command interpreter

Synopsis

ndcfg [-a] [-b] [-d X] [-e] [-f filename] [-h] [-j] [-l filename] [-m] [-n] [-q] [-S] [-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(DSP) file, ignoring any that contain errors or are not applicable to the system, and waits for user input. ndcfg is run automatically by netcfg(ADM) but can also be run by users, either directly or as part of a pipe(S). 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(ADM) 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(ADM) should run idbuild(ADM).

-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.

-S
Generate missing netcfg scripts. ndcfg will generate any scripts missing from the /usr/lib/netcfg/query directory.

-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 (for example, en0).

The commands available within ndcfg are grouped according to function:

General commands


! command [arg(s)]
Run specified UNIX command from the shell. Piping works to string together a series of commands.

auths
Display work and maximum kernel privilege sets.

bye | exit | quit
Quit the ndcfg program.

clear
Clear the screen.

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

help [arg]
Display help for commands.

more on|off
Turn more(C) mode on or off.

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 MACIOC_PROMISC(MDI) manual page for more information about promiscuous mode support.

quiet
Do not display information about bcfg file errors.

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

tcl 0|1
Turn TCL mode off or on.

test element
Send out a test frame on the specified interface to which other data link providers on the local network should respond.


NOTE: Some network drivers may also respond on behalf of the sending interface. In such cases, a response of ``success'' may only indicate that the driver saw the packet, and not that the interface is active.


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.

Specify bcfg files to use


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

count
Show the number of bcfg files loaded.

elementtoindex element
Display the bcfg index for the specified element.

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

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

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

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.

driver
Show the DRIVER_NAME and bcfg index for all loaded bcfg files.

idinstall bcfgindex actual_topology 0 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. 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(DSP) 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 0
Remove driver represented by element from the kernel.

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(DSP) for more information about these parameters.

unloadall
Unload all bcfg files from memory.

Display information from 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.

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

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

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

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

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

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

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

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.

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

Display information from incore resource manager database


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

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

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

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.

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

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

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

Display bus configuration information


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

eisashort [reskey]
Display EISA information in short 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.

mcalong [reskey]
Display MCA 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.

pccardlong [reskey]
Display PC Card information in long format. An optional resource manager key can be supplied.

pccardshort [reskey]
Display PC Card 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.

pcishort [reskey]
Display PCI information in short 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.

Display ELF 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.

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.

Hot-plug related commands


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

hpsldump
Dump all hot-plug structures.

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

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

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

Failover related commands


resetfailover backup_netX_device
Reconfigure the specified netX device (backup_netX_device) as a primary device instead of a backup device.

setfailover backup_netM_device primary_netN_device
Make the netX device specified as the first argument (backup_netM_device) into the backup device for the primary device specified as the second argument (primary_netN_device).

Files


/etc/inst/nd/mdi/*
MDI driver 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(ADM) command.

References

bcfg(DSP), netcfg(ADM), dlpid(ADM), nd(ADM), ndstat(ADM), netinfo(C)

``Testing and debugging MDI drivers'' in Developing MDI network adapter drivers


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