6 Software
User Manual 46/374
6.4 Network handling
For network handling use the network daemon that handles network interfaces automatically.
Precondition:
The network daemon must be started. The network daemon is not started during the boot up automatically.
How to activate the network daemon see network daemon (see "Network daemon" on page 100).
Library
ynetworkd_get_connected_interface
(see
"ynetworkd_get_connected_interface"
on page 236)
The TAF library function returns the connection status.
ynetwortkd_start_connection (see
"ynetworkd_start_connection" on
page 237)
The TAF library function turns the network daemon into connectivity
mode.
ynetworkd_stop_connection (see
"ynetworkd_stop_connection" on
page 238)
The TAF library function disconnects the current network connection.
High Level Hardware Access
/etc/init.d/scripts/network
Interfaces file
/etc/network/interfaces includes
the following network options:
dhcp .. get IP via DHCP
lan_static .. static IP
from etc/init.d/rc.conf
lan_static_networkd ..
static IP used only by
the ynetworkd
wlan_static .. static IP
from etc/init.d/rc.conf
This shell script creates the
temporary file /tmp/interfaces and
initializes the ethernet (eth0) and
the CAN (can0/1) depending on the
network options from
/etc/init.d/rc.conf. It is also started
by the boot up sequence.
p1:
< start > / < restart >
creates the interface file
and initializes eth0 and
can0/1 depending on
/etc/init.d/rc.conf