代码拉取完成,页面将自动刷新
// SPDX-License-Identifier: GPL-3.0-only
/*
* Copyright (c) 2023 Dengfeng Liu <liudf0716@gmail.com>
*/
#ifndef XFRPC_UTILS_H_
#define XFRPC_UTILS_H_
#include <stddef.h>
/**
* Structure to hold dynamic string data for curl operations
*/
struct mycurl_string {
char *ptr; /* Pointer to string data */
size_t len; /* Length of string */
};
/**
* Sleep for specified seconds and microseconds
* @param s Seconds to sleep
* @param u Microseconds to sleep
*/
void s_sleep(unsigned int s, unsigned int u);
/**
* Validate an IP address string
* @param ip_address IP address string to validate
* @return 1 if valid, 0 if invalid
*/
int is_valid_ip_address(const char *ip_address);
/**
* Display available network interface names
* @return 0 on success, negative value on failure
*/
int show_net_ifname(void);
/**
* Get network interface name
* @param if_buf Buffer to store interface name
* @param blen Length of buffer
* @return 0 on success, negative value on failure
*/
int get_net_ifname(char *if_buf, int blen);
/**
* Get MAC address of specified network interface
* @param net_if_name Network interface name
* @param mac Buffer to store MAC address
* @param mac_len Length of MAC buffer
* @return 0 on success, negative value on failure
*/
int get_net_mac(const char *net_if_name, char *mac, int mac_len);
/**
* Unify DNS name format
* @param dname Original DNS name
* @param udname_buf Buffer to store unified DNS name
* @param udname_buf_len Length of buffer
* @return 0 on success, negative value on failure
*/
int dns_unified(const char *dname, char *udname_buf, int udname_buf_len);
#endif // XFRPC_UTILS_H_
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。