1545 void *argpbak = argp;
1553 nbytes =
sizeof(
int);
1556 nbytes =
sizeof(
struct rtentry);
1562 case SIOCSIPV6DPCTD:
1563 case SIOCGIPV6DPCTD:
1567 case SIOCGIFNETMASK:
1568 case SIOCSIFNETMASK:
1579 case SIOCGIFBRDADDR:
1580 nbytes =
sizeof(
struct ifreq);
1585 if (argp != NULL && nbytes > 0) {
1598 ret = lwip_ioctl(sockfd, cmd, argp);
1599 if (ret == 0 && argp != argpbak) {
1606 if (argp != argpbak) {
STATIC INLINE BOOL LOS_IsUserAddress(VADDR_T vaddr)
虚拟地址是否在用户空间
void * malloc(size_t size)
动态分配内存块大小
void free(void *ptr)
释放ptr所指向的内存空间
static int do_ioctl_SIOCGIFCONF(int sockfd, long cmd, void *argp)
size_t LOS_ArchCopyToUser(void *dst, const void *src, size_t len)
从内核空间拷贝到用户空间
size_t LOS_ArchCopyFromUser(void *dst, const void *src, size_t len)