multi_vfs_dns_client example
This example shows how to use an external DNS server in KasperskyOS.
The example also demonstrates the use of various virtual file systems (VFS) 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:
- The
VfsNet
program is used for working with the network. - The
VfsRamfs
andVfsSdCardFs
programs are used for working with the file system.
The Client
program uses standard libc library functions for contacting an external DNS service. These functions are converted into queries to the VfsNet
program via IPC.
The CMake system, which is included with KasperskyOS Community Edition, is used to build and run the example.
Supplied resources
The following configuration files are included in the example:
./resources/include/config.h.in
contains a description of the backend file system that will be used in the solution:sdcard
orramfs
.A separate VFS program (
VfsSdCardFs
orVfsRamfs
, respectively) is used for each backend in the solution.- The
./resources/ramfs/etc
and/resources/sdcard/etc
directories contain configuration files for the VFS program.
Example files
The code of the example and build scripts are available at the following path:
Building and running example
To run an example on QEMU, go to the directory containing the example, build the example and run the following commands:
See also Building and running examples section.