Example use of the kl.rump.Dhcpcd
program.
The Dhcpcd
program is an implementation of a DHCP client, which gets network interface parameters from an external DHCP server in the background and passes them to a virtual file system (hereinafter referred to as a VFS).
The example also demonstrates the use of different VFSes in a single solution. The example uses different VFS to access the functions for working with the file system and functions for working with the network:
VfsNet
program is used for working with the network.VfsSdCardFs
program is used to work with the file system.The Client
program uses standard libc
library functions for getting information on network interfaces (ioctl
). These functions are converted into queries to the VFS program via IPC.
The CMake system, which is included with KasperskyOS Community Edition, is used to build and run the example.
Supplied resources
The ./resources/hdd/etc
directory contains configuration files for the VFS and Dhcpcd
programs. The standard syntax of dhcpcd.conf
is used for the Dhcpcd
program configuration.
The CMakeLists.txt
root file defines the values of variables that determine the selected configuration file:
DHCPCD_FALLBACK
Dynamically receive the parameters of network interfaces from an external DHCP server but statically define the parameters if the DHCP server is not available. This value is used by default.
DHCPCD_DYNAMIC
Dynamically receive the parameters of network interfaces from an external DHCP server.
DHCPCD_STATIC
Statically define the parameters of network interfaces.
Example files
The code of the example and build scripts are available at the following path:
/opt/KasperskyOS-Community-Edition-<version>/examples/multi_vfs_dhcpcd
Building and running example
See Building and running examples section.
Page top