netinit(1M) TCP/IP 5.4R3.00 netinit(1M)
NAME
netinit - build a network protocol stack
SYNOPSIS
netinit input_directives_file
or
netinit
where:
input_directives_file contains a sequence of directives.
DESCRIPTION
Use the netinit command to build the TCP/IP protocol stack.
Building the protocol stack involves opening new Streams to the
drivers that TCP/IP uses, pushing appropriate protocol modules, and
linking together the appropriate drivers. When you use netinit, you
start a non-active controller. You must build the TCP/IP protocol
stack before you use an interface to transmit and receive packets.
Run netinit as a server (daemon) that builds and configures an
arbitrary Streams stack. The server is driven by an
input_directives_file composed of many individual netinit directives.
The file may be delivered to netinit in a file through the command
line or it may be read from standard input. All netinit output is
directed to standard error. The netinit command uses standard
Streams linkages throughout.
netinit Directives
A netinit directive is a sequence of ASCII words delimited by spaces,
the first of which is the keyword. You separate directives with
newlines. Directives emulate function calls. Each directive is
interpreted and executed as soon as it is read from the standard
input. The result of executing a directive is returned as an ASCII
status string through standard error. The string "OK" is returned
when no errors occur during execution of the directive. Appropriate
negative acknowledgements are returned under error conditions.
The Directive Vocabulary
The directive primitives are closely involved with Streams operations
such as the I_LINK ioctl. This section focuses on the nature of the
input_directives_file. It is beyond the scope of this manual page to
explain Streams functionality.
The netinit command recognizes the following keywords: AS, OPEN,
CLOSE, PUSH, POP, LINK, UNLINK, ATTACH, RENAME and RUN. When using
these keywords, case is not important.
Use the OPEN keyword as follows
OPEN device
or
OPEN device AS name
Licensed material--property of copyright holder(s) 1
netinit(1M) TCP/IP 5.4R3.00 netinit(1M)
This opens the Streams driver with pathname device. The netinit
program retains the file descriptor for use in processing subsequent
directives that refer to the given device. If the optional AS clause
is supplied, subsequent netinit directives may refer to the opened
device using the supplied name rather than the device pathname.
Use the CLOSE keyword as follows:
CLOSE device
If the program has an open Stream to the named device, it is closed.
Use the PUSH keyword as follows:
PUSH device module
This pushes the specified Streams module onto the open Stream to the
named device. An error occurs if the module or the device does not
exist, or if there is not an open Stream to the device.
Use the POP keyword as follows:
POP device
This pops the module associated with the named device that is nearest
the Stream head from the Stream. An error occurs if there is no open
Stream to the named device, or if no modules are in the Stream.
Use the LINK keyword as follows:
LINK mux_device lower_device
The open Stream to lower_device is linked beneath the mux_device. An
error occurs if there are not open Streams to both the mux_device and
the lower_device, or if the mux_device is not a Streams multiplexing
driver.
Use the UNLINK keyword as follows:
UNLINK mux_device lower_device
Unlink the lower_device from under the mux_device. An error occurs
if lower_device does not specify a device linked under a Streams
multiplexing driver specified by mux_device.
Use the RUN keyword as follows:
RUN program_name [arglist] [< input_device] [> output_device]
[&]
You must specify a pathname to an executable file as the
program_name. The optional arglist is passed to the program_name;
the input and output device specifications, if specified, must refer
to open Streams.
Licensed material--property of copyright holder(s) 2
netinit(1M) TCP/IP 5.4R3.00 netinit(1M)
Use the RENAME keyword as follows:
RENAME mux_device lower_device AS label
This verifies that the lower_device has been linked under a
mux_device, and that the multiplexor device has not been linked. It
then causes the mux_device to assign the string label to the lower
stream identified by lower_device.
Use the ATTACH keyword as follows
ATTACH mux_device lower_device
This is a special directive to the multiplexing device mux_device to
associate a device linked under the multiplexer with the upper stream
that made the request.
EXAMPLES
The following example shows a typical input_directives_file that
builds a TCP/IP stack containing a loopback and an inen network
device.
open /dev/ip as ip
open /dev/loop0 as loop0
link ip loop0
rename ip loop0 as loop0
run ifconfig loop0 localhost
open /dev/inen0 as inen0
link ip inen0
rename ip inen0 as inen0
run ifconfig inen0 mav33 broadcast 128.222.8.255 netmask 0xFFFFFF00
FILES
Files that may be created automatically:
/etc/netinit.script
/etc/vitr_netinit.script
/etc/ixe_netinit.script
SEE ALSO
ifconfig(1M), cien(7), dgen(7), hken(7), inen(7), pefn(7), vitr(7),
STREAMS Programmer's Guide for the DG/UX System.
Licensed material--property of copyright holder(s) 3