KYSDK-NET(8)

NAME
kysdk-net - KYLIN SDK Network Information Service

SYNOPSIS
kysdk-net

DESCRIPTION
kysdk-net is a network information service daemon in the KYLIN SDK system. This service provides comprehensive network information query functionality, including collection and management of network-related data such as port status, routing information, firewall rules, network connections, and DNS configuration. The service provides its functionality through a D-Bus interface with the service name `com.kylin.kysdk.Net`, allowing other applications to obtain system network information through D-Bus calls.

FEATURES

Port Status Monitoring
    Provides TCP/UDP port status query functionality, including specific port status and port range status queries

Routing Information Retrieval
    Obtains system routing table information, particularly default gateway information

Firewall Rule Query
    Retrieves firewall chain and rule information through iptables

Network Process Association
    Obtains information about processes occupying network ports

Network Configuration Query
    Retrieves network configuration information such as hosts file and resolv.conf

Network Interface Detection
    Detects network link types (Ethernet/WiFi), link status, etc.

WiFi Information Retrieval
    Obtains wireless network interface information including operating mode, frequency, channel, and rate

DHCP Configuration Query
    Retrieves IPv4 and IPv6 DHCP configuration information

FUNCTIONS

kdk_net_get_port_stat(int port)
    Retrieves status information for the specified port number

kdk_net_get_multiple_port_stat(int start, int end, int *result)
    Retrieves status information for the specified port range

kdk_net_get_route()
    Retrieves routing table information

kdk_net_get_iptable_rules()
    Retrieves iptables firewall rules

kdk_net_get_proc_port()
    Retrieves network port to process association information

kdk_net_get_up_port()
    Retrieves list of ports in listening state

kdk_net_get_hosts()
    Retrieves hosts file content

kdk_net_get_resolv_conf()
    Retrieves DNS resolution configuration

kdk_net_get_link_type()
    Retrieves network link type

kdk_net_get_link_status(char *ip, char *port)
    Checks connection status with specified IP and port

kdk_net_get_wifi_*()
    Retrieves various WiFi-related information (mode, frequency, channel, rate, etc.)

kdk_net_get_ipv4_dhcp_config()
    Retrieves IPv4 DHCP configuration information

kdk_net_get_ipv6_dhcp_config()
    Retrieves IPv6 DHCP configuration information

FILES

/usr/bin/kysdk-net
    Executable file path

/etc/systemd/system/kysdk-net.service
    systemd service configuration file

SERVICE
This tool runs as a systemd service with the service file kysdk-net.service, communicating through D-Bus interface with service name `com.kylin.kysdk.Net`.

D-BUS INTERFACE
The service provides the following interfaces through D-Bus: - getFirewallState: Retrieve firewall status - getProcPort: Retrieve process port information

AUTHOR
KylinSoft Co., Ltd.

COPYRIGHT
Copyright (C) 2023-2025, KylinSoft Co., Ltd. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

SEE ALSO
systemd(1), dbus-daemon(1), iptables(8), NetworkManager(8)