.TH KYSDK-NET 8 "2025" "Version 1.0" "System Administration Utilities" .SH NAME kysdk-net \- KYLIN SDK Network Information Service .SH SYNOPSIS .B kysdk-net .SH DESCRIPTION .B 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. .SH FEATURES .TP .B Port Status Monitoring Provides TCP/UDP port status query functionality, including specific port status and port range status queries .TP .B Routing Information Retrieval Obtains system routing table information, particularly default gateway information .TP .B Firewall Rule Query Retrieves firewall chain and rule information through iptables .TP .B Network Process Association Obtains information about processes occupying network ports .TP .B Network Configuration Query Retrieves network configuration information such as hosts file and resolv.conf .TP .B Network Interface Detection Detects network link types (Ethernet/WiFi), link status, etc. .TP .B WiFi Information Retrieval Obtains wireless network interface information including operating mode, frequency, channel, and rate .TP .B DHCP Configuration Query Retrieves IPv4 and IPv6 DHCP configuration information .SH FUNCTIONS .TP .B kdk_net_get_port_stat(int port) Retrieves status information for the specified port number .TP .B kdk_net_get_multiple_port_stat(int start, int end, int *result) Retrieves status information for the specified port range .TP .B kdk_net_get_route() Retrieves routing table information .TP .B kdk_net_get_iptable_rules() Retrieves iptables firewall rules .TP .B kdk_net_get_proc_port() Retrieves network port to process association information .TP .B kdk_net_get_up_port() Retrieves list of ports in listening state .TP .B kdk_net_get_hosts() Retrieves hosts file content .TP .B kdk_net_get_resolv_conf() Retrieves DNS resolution configuration .TP .B kdk_net_get_link_type() Retrieves network link type .TP .B kdk_net_get_link_status(char *ip, char *port) Checks connection status with specified IP and port .TP .B kdk_net_get_wifi_*() Retrieves various WiFi-related information (mode, frequency, channel, rate, etc.) .TP .B kdk_net_get_ipv4_dhcp_config() Retrieves IPv4 DHCP configuration information .TP .B kdk_net_get_ipv6_dhcp_config() Retrieves IPv6 DHCP configuration information .SH FILES .TP .B /usr/bin/kysdk-net Executable file path .TP .B /etc/systemd/system/kysdk-net.service systemd service configuration file .SH 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`. .SH D-BUS INTERFACE The service provides the following interfaces through D-Bus: - getFirewallState: Retrieve firewall status - getProcPort: Retrieve process port information .SH AUTHOR KylinSoft Co., Ltd. .SH 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. .SH SEE ALSO .BR systemd (1), .BR dbus-daemon (1), .BR iptables (8), .BR NetworkManager (8)