📄 siocgifslave.c
字号:
/* SIOCGIFSLAVE.c * linqianghe@163.com * 2006-10-27 */#include "log.h"#include "SIOCGIFSLAVE.h"#include <sys/ioctl.h>#include <sys/socket.h>#include <linux/if.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <errno.h>void test_gifslave( int sock_fd ){ struct ifreq ifr; PR_NOTICE( "test SIOCGIFSLAVE...\n" ); strcpy( ifr.ifr_name, "mylo" ); if( ioctl( sock_fd, SIOCGIFSLAVE, &ifr ) < 0 ) PR_ERR( "SIOCGIFSLAVE: %s\n", strerror(errno) ); else PR_NOTICE( "SIOCGIFSLAVE success!\n" );}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -