Ai
4 Star 5 Fork 67

OpenHarmony/kernel_linux_common_modules
Closed

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
nip_uapi.h 1005 Bytes
Copy Edit Raw Blame History
liangbotong authored 2023-05-23 11:12 +08:00 . NewIP code rectification
/* 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 */
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openharmony/kernel_linux_common_modules.git
git@gitee.com:openharmony/kernel_linux_common_modules.git
openharmony
kernel_linux_common_modules
kernel_linux_common_modules
master

Search