multi_vfs_ntpd example

This example demonstrates support for the Network Time Protocol (NTP) to synchronize the system time in KasperskyOS, and integration of multiple virtual file systems (hereinafter referred to as "VFS") in one solution. For more information about using multiple VFS programs, please refer to the File systems and network section.

Example directory in the SDK

The code of the example and build scripts are available at the following path:

/opt/KasperskyOS-Community-Edition-<platform>-<version>/examples/multi_vfs_ntpd

List of programs

When you build an example for the target hardware platform, platform-specific drivers are automatically included in the solution:

Initialization description

The solution initialization description file named init.yaml is generated during the solution build process based on the ./einit/src/init.yaml.in template. Macros in @INIT_*@‌ ‌format contained in the template are automatically expanded in the resulting init.yaml file. For more details, refer to init.yaml.in template.

Security policy description

The security.psl file contains a description of a security policy for a KasperskyOS-based solution and is located in the ./einit/src directory. The declarations in the PSL file are provided with comments that explain the purpose of these declarations.

Resources

The ./resources/xdl/multi_vfs_ntpd directory contains the Client.edl file, which provides the formal specification of the KasperskyOS-based solution component.

The directory ./resources/hdd/etc contains the configuration files for the VfsNet, Dhcpcd and Ntpd programs: hosts, dhcpcd.conf and ntp.conf, respectively.

The ./resources/hdd/var/db/dhcpcd directory is used by the Dhcpcd program to store network connection data.

Operating scenario

The Client program changes the current system time to the time specified in the macro. After the time is synchronized by the Ntpd program, the year in the received system time is expected to differ from the year that was previously set by the macro.

Building and running the example

See Building and running examples section.

Page top