[Previous] [Contents] [Next]

Net.fd

File-descriptor-based network driver (QNX)

Syntax:

Net.fd [-a phys_addr] [-c] [-d dev_rate] [-f tty] [-h]
       [-i timeout] [-k comp_type] [-l log_net_id]
       [-m min_com_length] [-n tx_num_retries]
       [-r media_rate] [-t tx_retry_ticks] [-v] tty &

Options:

-a phys_addr
Use this 48-bit hex Ethernet-style physical address. Usually, Net.fd gets this from Net's netmap table.
-c
Don't append and check for CRC.
-d dev_rate
Use this device media rate for timeout calculations. By default the driver uses the baud rate of the device.
-f tty
Use this device for network input and output. Specify - for standard input.
-h
Ignore SIGHUP. By default the driver terminates on SIGHUP. This signal is sent when, for example, the carrier is lost from a modem.
-i timeout
Use this interbyte timeout (in tenths of seconds). The default is 10, i.e. 1 second.
-k comp_type
Use compression, specifying type 1 or 2. Type 1 compresses the entire packet, including header. Type 2 compresses only the data, leaving the header uncompressed. This leaves the source and destination addresses in the header intact so that the process serving Net.fd can decide where to route the packet. Default is no compression.
-l log_net_id
("el") Connect to this logical network (default is 1).
-m min_com_length
Compress packets that are this length or longer (default is 12).
-n tx_num_retries
After failing to transmit to a remote node, retry transmission no more than this number of times (default is 3).
-rmedia_rate
Advertise this bit-transmission rate. By default, the driver automatically calculates this value. The Network Manager (Net) uses this information when multiple drivers are running.
-t tx_retry_ticks
Wait this many 50-millisecond intervals between transmit retries. By default, the driver automatically calculates this value, based on the length of the transmission and on the media rate.
-v
Be verbose: print out configuration info on the console when starting up.
tty
Use this device for network input and output (default is /dev/ser1).

Description:

The Net.fd network driver uses file-descriptor based I/O (i.e. open(), read(), write(), and so on) to receive and transmit packets. It provides the Network Manager (Net) with reliable data transfer over any media supported by a file-descriptor-based server process.

For example, you could use Net.fd to connect two machines with a null-modem RS-232 serial cable. By using file descriptor I/O to the serial devices, Net.fd would implicitly use Dev's serial driver (Dev.ser) and set up a logical network link.


Note: You should read the technote contained in the /etc/readme/technotes/Net.fd file.

If you start more than one network driver on the same machine, you must specify a unique network ID (-l option) to every driver.


Examples:

Use the first serial port (/dev/ser1) as logical network 1:

    Net.fd &

Use the second serial port as logical network 1:

    Net.fd /dev/ser2 &

Use the first serial port as logical network 2:

    Net.fd -l 2 &

Support two logical networks: use the first serial port as logical network 1 and use the second serial port as logical network 2:

    Net.fd &
    Net.fd -l 2 /dev/ser2 &

Files:

Net.fd closes its standard input, standard output and standard error immediately after initialization.

Error messages are displayed via the qnx_display_*() functions, not through standard error.

Net.fd opens and uses the tty named on the command line for both reading and writing.

Signals:

The Net.fd driver ignores SIGPWR, but will terminate in SIGHUP unless the -h option is specified.

Exit status:

Net.fd terminates only upon encountering errors during initialization or upon getting a signal (i.e. being killed).

0
Net.fd has shut down successfully and cleanly deregistered from Net.
>0
An error occurred during initialization.

See also:

Dev, Net, Net.*, netinfo

Installation & Configuration


[Previous] [Contents] [Next]