zte's code,first commit
Change-Id: I9a04da59e459a9bc0d67f101f700d9d7dc8d681b
diff --git a/ap/lib/libsoftap/netioctl.c b/ap/lib/libsoftap/netioctl.c
new file mode 100755
index 0000000..ac23daf
--- /dev/null
+++ b/ap/lib/libsoftap/netioctl.c
@@ -0,0 +1,44 @@
+/************************************************************************
+*¹¦ÄܽéÉÜ£ºlinuxÖÐ×ÔÑÐÌṩӦÓÃappsʹÓõÄioctl½Ó¿Ú
+*¸ºÔðÈË£º
+*±¸·ÝÈË£º
+*ÐÞ¸ÄÈÕ£º
+*ÐÞ¸ÄÄÚÈÝ£º
+*°æ±¾ºÅ£º
+************************************************************************/
+#include <stdio.h>
+#include <unistd.h>
+#include <getopt.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <linux/if.h>
+#include <arpa/inet.h>
+#include <net/if_arp.h>
+#include <linux/sockios.h>
+#include <assert.h>
+#include "message.h"
+
+
+//ͨ¹ýÀ©Õ¹ioctl£¬ÊµÏÖÓ¦ÓÃÓëÄں˵ÄÍøÂçÏà¹Ø²Ù×÷½»»¥
+int netioctl_handle(int cmd, void *val)
+{
+ int fd = -1;
+ int ret = 0;
+ fd = open("/dev/myioctl", O_RDWR);
+ if (fd < 0)
+ return -1;
+ ret = ioctl(fd, cmd, val);
+ if (ret < 0)
+ printf("ioctl can not get info,%d\n", ret);
+ //assert(0);
+ close(fd);
+ return ret;
+}
+
+