Kaspersky IoT Secure Gateway 1000 SDK

RoutingTable program

July 30, 2024

ID 246350

The RoutingTable program implements the routing table for routing data between programs. A routing table in Kaspersky IoT Secure Gateway 1000 can contain no more than 256 route entries.

The RoutingTable program API provides the following interfaces:

  • IEndpointNameProvider

    Contains the method that gets program endpoint names. This method is implemented on the client side.

  • IRouteProvider

    Contains the method that gets the existing route entries for programs.

Use of the RoutingTable program API can be viewed in the routing_table_example_package example.

Please note that endpoint names of programs in Kaspersky IoT Secure Gateway 1000 must be unique. The Kaspersky IoT Secure Gateway 1000 does not check the uniqueness of endpoint names. RoutingTable is not guaranteed to function correctly when routing data to different endpoints with the same name.

Route entry structure

A route entry is defined by the applications::routing::Route structure. One or more route entries can be merged into a RouteList vector. Each route entry contains three parameters:

  • source

    Source.

  • destination

    Destination.

  • active

    Flag indicating whether the route is active or not.

The source and destination are described by the applications::routing::ApplicationEndpointName structure, which contains the ID of the program and its endpoint. One or more applications::routing::ApplicationEndpointName structures can be merged into an ApplicationEndpointNameList vector.

Getting program IDs

The RoutingTable program API gets the ID of a program by using the following methods:

  • applications::routing::GetAppIdByTaskName()

    This method returns the program ID based on the task name input value. If the program ID is not found, the method returns the INVALID_APP_ID value.

  • applications::routing::GetAppId()

    This method returns the ID of the program that is statically linked to the RoutingTable program library. If the program ID is not found, the method returns the INVALID_APP_ID value.

A description of the methods for getting a program ID is provided in the file /opt/KasperskyOS-SDK-KISG-Platform-<version>/sysroot-*-kos/include/component/secure_platform/routing_table/route_provider_api/application_id_api.h.

application_id_api.h (fragment)

...

namespace applications::routing {

AppId GetAppIdByTaskName(const std::string& task) noexcept;

AppId GetAppId() noexcept;

}

...

In this Help section

IEndpointNameProvider interface

IRouteProvider interface

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.