Fetch the repository succeeded.
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
* 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"
/* The following structure must be larger than V4. System calls use V4.
* 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; /* [2Byte] AF_NINET */
unsigned short sin_port; /* [2Byte] Transport layer port, big-endian */
struct nip_addr sin_addr; /* [9Byte] NIP address */
unsigned char sin_zero[POD_SOCKADDR_SIZE]; /* [3Byte] Byte alignment */
};
struct nip_ifreq {
struct nip_addr ifrn_addr;
int ifrn_ifindex;
};
struct thread_args {
int cfd;
struct sockaddr_nin si_server;
};
#endif /* _NIP_UAPI_H */
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。