From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: "Valery V. Inozemtsev" Organization: ALT Linux Team To: ALT Devel discussion list Subject: Re: [devel] Re: =?koi8-r?b?3sXSxdvOxdfZxQ==?= =?koi8-r?b?IM3Z08zJ?= Date: Mon, 11 Jul 2005 23:05:40 +0400 User-Agent: KMail/1.8.1 References: <20050711094902.GW13222@osdn.org.ua> <20050711095635.GX13222@osdn.org.ua> <20050711162031.629effbf.pilot@altlinux.ru> In-Reply-To: <20050711162031.629effbf.pilot@altlinux.ru> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1371523.zgEEqo7DxF"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200507112305.47473.shrek@freesource.info> X-BeenThere: devel@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2005 19:05:49 -0000 Archived-At: List-Archive: List-Post: --nextPart1371523.zgEEqo7DxF Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =F7 =D3=CF=CF=C2=DD=C5=CE=C9=C9 =CF=D4 11 =E9=C0=CC=D8 2005 16:20 Denis Ovs= ienko =CE=C1=D0=C9=D3=C1=CC(a): > > =F3=CF=C2=D3=CE=CF "=D0=D2=CF=C2=CC=C5=CD=C1" =D3=CB=CF=D2=C5=C5 =DC=D3= =D4=C5=D4=C9=DE=C5=D3=CB=C1=D1 -- =CE=C1=C6=C9=C7=C1 =CD=CE=C5 libwireless > > =C9 ifrename, =C5=D3=CC=C9 WiFi =CE=C5=D4 =C9 =D0=C5=D2=C5=C9=CD=C5=CE= =CF=D7=D9=D7=C1=D4=D8 =C9=CE=D4=C5=D2=C6=C5=CA=D3=D9 =D4=CF=D6=C5 =CE=C5 > > =CE=C1=C4=CF? :) > > =E5=D3=CC=C9 =D7=D3=D0=CF=CD=CE=C9=D4=D8, =DE=D4=CF =D5 =D4=C5=C2=D1 =CE= =C1 =CE=CF=D5=D4=C2=D5=CB=C5 =C4=D7=C1 =D3=CC=CF=D4=C1 =D3 =D3=C5=D4=C5=D7= =D9=CD=C9 =CB=C1=D2=D4=C1=CD=C9, =D4=CF =CB=C1=CB > =D2=C1=DA =CE=D5=D6=CE=CF. libwireless =D7=CF=D3=D4=D2=C5=C2=CF=D7=C1=CE = ifrename, =CF=C2=CF=D3=CE=CF=D7=C1=CE=CE=CF=D3=D4=D8 =CE=C5 =D0=D2=CF=D7=C5= =D2=D1=CC. $ gcc -o ifrename ifrename.c /tmp/.private/shrek/ccZ9DBYt.o(.text+0x424): In function `mapping_addmac': ifrename.c: undefined reference to `iw_ether_aton' /tmp/.private/shrek/ccZ9DBYt.o(.text+0x594): In function `mapping_getmac': ifrename.c: undefined reference to `iw_get_mac_addr' /tmp/.private/shrek/ccZ9DBYt.o(.text+0x602):ifrename.c: undefined reference= to=20 `iw_ether_ntop' /tmp/.private/shrek/ccZ9DBYt.o(.text+0x1c02): In function `probe_mappings': ifrename.c: undefined reference to `iw_get_mac_addr' /tmp/.private/shrek/ccZ9DBYt.o(.text+0x1d34): In function `probe_debian': ifrename.c: undefined reference to `iw_get_mac_addr' /tmp/.private/shrek/ccZ9DBYt.o(.text+0x2131): In function `main': ifrename.c: undefined reference to `iw_sockets_open' /tmp/.private/shrek/ccZ9DBYt.o(.text+0x2233): In function `process_iflist': ifrename.c: undefined reference to `iw_enum_devices' /tmp/.private/shrek/ccZ9DBYt.o(.text+0x225b):ifrename.c: undefined referenc= e=20 to `iw_enum_devices' collect2: ld returned 1 exit status $ gcc -o ifrename ifrename.c -liw -L/lib =D7=D3=C5 =CF=CB.=20 $ grep iw ifrename.c * You need to link this code against "iwlib.c" and "-lm". #include "iwlib.h" /* Wireless Tools library */ char iwproto[IFNAMSIZ + 1]; /* Wireless/protocol name */ mapping_addiwproto(struct if_mapping * ifnode, mapping_cmpiwproto(struct if_mapping * ifnode, mapping_getiwproto(int skfd, /* Wireless Protocol from iwconfig */ { "iwproto", &mapping_addiwproto, &mapping_cmpiwproto,=20 &mapping_getiwproto }, if(iw_ether_aton(ifnode->mac_filter, &ifnode->mac) !=3D 1) ret =3D iw_get_mac_addr(skfd, ifname, &target->mac, &target->hw_type); iw_ether_ntop(&target->mac, target->mac_filter); mapping_addiwproto(struct if_mapping * ifnode, if(len >=3D sizeof(ifnode->iwproto)) memcpy(ifnode->iwproto, string, len + 1); ifnode->iwproto, linenum); mapping_cmpiwproto(struct if_mapping * ifnode, return(fnmatch(ifnode->iwproto, target->iwproto, FNM_CASEFOLD)); mapping_getiwproto(int skfd, struct iwreq wrq; if(iw_get_ext(skfd, ifname, SIOCGIWNAME, &wrq) < 0) strncpy(target->iwproto, wrq.u.name, IFNAMSIZ); target->iwproto[IFNAMSIZ] =3D '\0'; ifname, target->iwproto); iw_get_mac_addr(skfd, ifnode->ifname, &mac, &hw_type); iw_get_mac_addr(skfd, p, &mac, &hw_type); iw_enum_devices(skfd, &process_ifname, args, count); * iw_enum_devices() may get out of sync with the real interfaces, iw_enum_devices(skfd, &process_ifname, args, count); if((skfd =3D iw_sockets_open()) < 0) iw_sockets_close(skfd); =CF=C2=CF=D3=CE=CF=D7=C1=CE=CE=CF=D3=D4=D8 =CE=C1 =CC=C9=C3=CF =2D-=20 Valery V. Inozemtsev --nextPart1371523.zgEEqo7DxF Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.9.17 (GNU/Linux) iD8DBQBC0sMLsICip9pMw6cRApc3AKCDzxEHaxhLG0oQa4x/9c4MX4LV3QCfY3Pc buV8KwEF66endd7mZdoSThc= =8XRu -----END PGP SIGNATURE----- --nextPart1371523.zgEEqo7DxF--