* 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
#define AF_NINET 45
#define DEMO_INPUT_1 2
#define DEMO_INPUT_2 3
#define DEMO_INPUT_3 4
#define DEMO_INPUT_4 5
#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
#define PKTLEN 1024
#define SLEEP_US 500000
#define SELECT_TIME 600
#define TCP_SERVER_PORT 5556
#define UDP_SERVER_PORT 9090
#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