ifconfig系統調用

先mark一下:

https://www.cnblogs.com/lifexy/p/10289491.html

https://www.cnblogs.com/tdyizhen1314/p/4896689.html

https://blog.csdn.net/dayancn/article/details/52953777

https://www.cnblogs.com/sky-heaven/archive/2019/11/27/11940638.html

ioctl內核實現的地方:

//\linux-4.1.45\linux-4.1.45\fs\ioctl.c
SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, unsigned long, arg)
{
	int error;
	struct fd f = fdget(fd);

	if (!f.file)
		return -EBADF;
	error = security_file_ioctl(f.file, cmd, arg);
	if (!error)
		error = do_vfs_ioctl(f.file, fd, cmd, arg);
	fdput(f);
	return error;
}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章