代码拉取完成,页面将自动刷新
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
*
* Description: Provide NewIP universal library.
*
* Author: Yang Yanjun <yangyanjun@huawei.com>
*
* Data: 2022-07-18
*/
#ifndef _NIP_LIB_H
#define _NIP_LIB_H
/* AF_NINET by reading/sys/module/newip/parameters/af_ninet file to get the type value */
#define AF_NINET 45
#define DEMO_INPUT_1 2 /* The DEMO program contains one parameter */
#define DEMO_INPUT_2 3
#define DEMO_INPUT_3 4
#define DEMO_INPUT_4 5
/* Change the value based on the actual interface */
#define NIC_NAME "wlan0"
#define NIC_NAME_CHECK "wlan"
#define CMD_ADD "add"
#define CMD_DEL "del"
#define BUFLEN 1024
#define LISTEN_MAX 3
#define PKTCNT 10 /* Number of sent packets */
#define PKTLEN 1024 /* Length of sent packet */
#define SLEEP_US 500000 /* Packet sending interval (ms) */
#define SELECT_TIME 600
#define TCP_SERVER_PORT 5556 /* TCP Server Port */
#define UDP_SERVER_PORT 9090 /* UDP Server Port */
#define TIMEOUT_SEC 2
#define BITS_PER_BYTE 8
#define ARRAY_LEN 255
int nip_get_ifindex(const char *ifname, int *ifindex);
int nip_get_addr(char **args, struct nip_addr *addr);
#endif /* _NIP_LIB_H */
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。