资源简介
找了良久才找到这个开源代码,并成功交叉编译通过,用于实际项目中。
可依据实际需要修改Makefile中的"CC=gcc","AR=ar"这两个, 以便cross compile;
其余makefile不需要修改;用 make clean;make all即可编译。
生成的libiw.so.29与其他工具一起。
可依据实际需要修改Makefile中的"CC=gcc","AR=ar"这两个, 以便cross compile;
其余makefile不需要修改;用 make clean;make all即可编译。
生成的libiw.so.29与其他工具一起。
代码片段和文件信息
/*
* Wireless Tools
*
* Jean II - HPL 04 -> 07
*
* Main code for “ifrename“. This is tool allows to rename network
* interfaces based on various criteria (not only wireless).
* You need to link this code against “iwlib.c“ and “-lm“.
*
* This file is released under the GPL license.
* Copyright (c) 2007 Jean Tourrilhes
*/
/*
* The changelog for ifrename is in the file CHANGELOG.h ;-)
*
* This work is a nearly complete rewrite of ‘nameif.c‘.
* Original CopyRight of version of ‘nameif‘ I used is :
* -------------------------------------------------------
* Name Interfaces based on MAC address.
* Writen 2000 by Andi Kleen.
* Subject to the Gnu Public License version 2.
* TODO: make it support token ring etc.
* $Id: nameif.cv 1.3 2003/03/06 23:26:52 ecki Exp $
* -------------------------------------------------------
*
* It started with a series of patches to nameif which never made
* into the regular version and had some architecural ‘issues‘ with
* those patches which is the reason of this rewrite.
* Difference with standard ‘nameif‘ :
* o ‘nameif‘ has only a single selector the interface MAC address.
* o Modular selector architecture easily add new selectors.
* o Wide range of selector including sysfs and sysfs symlinks...
* o hotplug invocation support.
* o module loading support.
* o MAC address wildcard.
* o Interface name wildcard (‘eth*‘ or ‘wlan*‘).
* o Non-Ethernet MAC addresses (any size not just 48 bits)
*/
/***************************** INCLUDES *****************************/
/* This is needed to enable GNU extensions such as getline & FNM_CASEFOLD */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include /* getopt_long() */
#include /* SIOCSIFNAME */
#include /* fnmatch() */
//#include
#include “iwlib.h“ /* Wireless Tools library */
// This would be cool unfortunately...
//#include /* Ethtool stuff -> struct ethtool_drvinfo */
/************************ CONSTANTS & MACROS ************************/
/* Our default configuration file */
const char DEFAULT_CONF[] = “/etc/iftab“;
/* Debian stuff */
const char DEBIAN_CONFIG_FILE[] = “/etc/network/interfaces“;
/* Backward compatibility */
#ifndef ifr_newname
#define ifr_newname ifr_ifru.ifru_slave
#endif
/* Types of selector we support. Must match selector_list */
const int SELECT_MAC = 0; /* Select by MAC address */
const int SELECT_ETHADDR = 1; /* Select by MAC address */
const int SELECT_ARP = 2; /* Select by ARP type */
const int SELECT_linkTYPE = 3; /* Select by ARP type */
const int SELECT_DRIVER = 4; /* Select by Driver name */
const int SELECT_BUSINFO = 5; /* Select by Bus-Info */
const int SELECT_FIRMWARE = 6; /* Select by Firmware revision */
const int SELECT_baseADDR = 7; /* Select by HW base Address */
const int SELECT_IRQ = 8; /* Select by HW Irq line */
const int SELECT_INTERRUPT = 9; /* Select by HW Irq line */
const in
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6218 2006-04-14 04:40 wireless_tools_29\INSTALL
文件 6247 2008-10-17 07:50 wireless_tools_29\Makefile
文件 5588 2007-03-23 06:43 wireless_tools_29\README
文件 29041 2007-02-17 09:17 wireless_tools_29\iwpriv.c
文件 18406 2007-04-20 03:58 wireless_tools_29\iwconfig.8
文件 47096 2007-07-19 05:18 wireless_tools_29\iwconfig.c
文件 6414 2004-08-30 18:16 wireless_tools_29\README.fr
文件 10212 2005-05-27 05:14 wireless_tools_29\iwspy.c
文件 3060 2006-05-17 05:52 wireless_tools_29\iwpriv.8
文件 61253 2007-06-30 09:11 wireless_tools_29\iwlist.c
文件 2911 2006-05-17 05:48 wireless_tools_29\iwspy.8
文件 13598 2007-07-10 04:18 wireless_tools_29\iwgetid.c
文件 5684 2006-03-10 06:55 wireless_tools_29\sample_pm.c
文件 17992 2001-05-05 09:46 wireless_tools_29\COPYING
文件 5486 2005-01-14 10:00 wireless_tools_29\PCMCIA.txt
文件 3877 2006-05-17 05:47 wireless_tools_29\iwlist.8
文件 16582 2001-05-05 09:46 wireless_tools_29\wireless.10.h
文件 16857 2007-06-23 02:01 wireless_tools_29\iwlib.h
文件 88631 2007-06-30 07:43 wireless_tools_29\iwlib.c
文件 35042 2007-07-19 05:21 wireless_tools_29\CHANGELOG.h
文件 1078 2005-05-27 04:54 wireless_tools_29\macaddr.c
文件 17989 2001-05-05 09:46 wireless_tools_29\wireless.11.h
文件 20402 2006-02-14 08:08 wireless_tools_29\iwevent.c
文件 2724 2005-01-15 02:52 wireless_tools_29\iwgetid.8
文件 20619 2001-11-14 02:39 wireless_tools_29\wireless.12.h
文件 21619 2002-01-25 03:19 wireless_tools_29\wireless.13.h
文件 24464 2002-01-26 08:10 wireless_tools_29\wireless.14.h
文件 3087 2006-03-31 07:04 wireless_tools_29\iwevent.8
文件 26033 2002-08-17 05:57 wireless_tools_29\wireless.15.h
文件 14453 2004-10-14 05:39 wireless_tools_29\DISTRIBUTIONS.txt
............此处省略45个文件信息
- 上一篇:傅立叶变换和傅立叶反变换.rar
- 下一篇:高校学生信息管理系统
评论
共有 条评论