* Copyright (c) 2022 Huawei Device Co., Ltd.
*
* Description: Definitions for the structure
* associated with NewIP.
*
* Author: Yang Yanjun <yangyanjun@huawei.com>
*
* Data: 2022-09-06
*/
#ifndef _NIP_UAPI_H
#define _NIP_UAPI_H
#include "nip.h"
* If the definition is smaller than V4, the read process will have memory overruns
* v4: include\linux\socket.h --> sockaddr (16Byte)
*/
#define POD_SOCKADDR_SIZE 3
struct sockaddr_nin {
unsigned short sin_family;
unsigned short sin_port;
struct nip_addr sin_addr;
unsigned char sin_zero[POD_SOCKADDR_SIZE];
};
struct nip_ifreq {
struct nip_addr ifrn_addr;
int ifrn_ifindex;
};
struct thread_args {
int cfd;
struct sockaddr_nin si_server;
};
#endif