:orphan: .. index:: pair: group; Unix Kernel Logger .. _doxid-group__te__tools__te__kernel__log: Unix Kernel Logger ================== .. toctree:: :hidden: Overview ~~~~~~~~ Unix Kernel Logger header file Copyright (C) 2004-2022 OKTET Labs Ltd. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // global functions int :ref:`map_name_to_level`(const char* name); int :ref:`te_get_host_addrs`(const char* host_name, struct sockaddr_in* host_ipv4, bool* ipv4_found, struct sockaddr_in6* host_ipv6, bool* ipv6_found); int :ref:`log_serial`(void* ready, int argc, char* argv[]); void :ref:`te_kernel_log_set_system_func`(void* p); int :ref:`te_open_conserver`(const char* conserver); .. _details-group__te__tools__te__kernel__log: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Unix Kernel Logger header file Copyright (C) 2004-2022 OKTET Labs Ltd. All rights reserved. Global Functions ---------------- .. index:: pair: function; map_name_to_level .. _doxid-group__te__tools__te__kernel__log_1gae07068666f177e359b4c1db1459eb262: .. ref-code-block:: cpp :class: doxyrest-title-code-block int map_name_to_level(const char* name) Map Logger level name to the value .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - name - Name of the level .. rubric:: Returns: Level number .. index:: pair: function; te_get_host_addrs .. _doxid-group__te__tools__te__kernel__log_1ga84fb49c99c90183e8554b132aeb91604: .. ref-code-block:: cpp :class: doxyrest-title-code-block int te_get_host_addrs(const char* host_name, struct sockaddr_in* host_ipv4, bool* ipv4_found, struct sockaddr_in6* host_ipv6, bool* ipv6_found) Get addresses by host name. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - host_name - Host name * - host_ipv4 - Here IPv4 address will be saved if not NULL * - ipv4_found - Will be set to ``true`` if IPv4 address found * - host_ipv6 - Here IPv6 address will be saved if not NULL * - ipv6_found - Will be set to ``true`` if IPv6 address found .. rubric:: Returns: -1 on failue, 0 on success .. index:: pair: function; log_serial .. _doxid-group__te__tools__te__kernel__log_1gac4c1a83a4811e07cba3e529f6b644324: .. ref-code-block:: cpp :class: doxyrest-title-code-block int log_serial(void* ready, int argc, char* argv[]) Log kernel output via Logger component .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ready - Parameter release semaphore * - argc - Number of string arguments * - argv - String arguments: * log user * log level * message interval * tty name (if it does not start with "/", it is interpreted as a conserver connection designator) * sharing mode (opt) .. index:: pair: function; te_kernel_log_set_system_func .. _doxid-group__te__tools__te__kernel__log_1ga46afd38b074b2a4514806a854213b509: .. ref-code-block:: cpp :class: doxyrest-title-code-block void te_kernel_log_set_system_func(void* p) Set function to be used as system(), .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - p - Function pointer .. index:: pair: function; te_open_conserver .. _doxid-group__te__tools__te__kernel__log_1ga875d67330a1e0a446b535e8b7c0d6cf7: .. ref-code-block:: cpp :class: doxyrest-title-code-block int te_open_conserver(const char* conserver) Connect to conserver listening on a given port at localhost and authenticate to it. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - conserver - A colon-separated string of the form: [(IP address or host name):]port:user:console (parenthesises are necessary only for IPv6 address) .. rubric:: Returns: Connected socket (or -1 if failed)