[Olsr-cvs] olsrd-current/src/bsd net.c,1.36,1.37
Bernd Petrovitsch
(spam-protected)
Fri Sep 7 10:53:38 CEST 2007
Update of /cvsroot/olsrd/olsrd-current/src/bsd
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6043/src/bsd
Modified Files:
net.c
Log Message:
* update for FreeBSD neew WLAN API - patch by John Hay
Index: net.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/bsd/net.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** net.c 2 May 2007 07:41:20 -0000 1.36
--- net.c 7 Sep 2007 08:53:36 -0000 1.37
***************
*** 72,77 ****
#include <net80211/ieee80211.h>
#include <net80211/ieee80211_ioctl.h>
- #include <dev/wi/if_wavelan_ieee.h>
- #include <dev/wi/if_wireg.h>
#endif
#endif
--- 72,75 ----
***************
*** 558,562 ****
if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr))
continue;
! strncpy(ifr6.ifr_name, ifname, sizeof(ifname));
if ((s6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
{
--- 556,560 ----
if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr))
continue;
! strncpy(ifr6.ifr_name, ifname, sizeof(ifr6.ifr_name));
if ((s6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
{
***************
*** 827,843 ****
{
#if defined __FreeBSD__ && !defined FBSD_NO_80211
! struct wi_req wreq;
! struct ifreq ifr;
!
! memset((char *)&wreq, 0, sizeof(wreq));
! memset((char *)&ifr, 0, sizeof(ifr));
!
! wreq.wi_len = WI_MAX_DATALEN;
! wreq.wi_type = WI_RID_IFACE_STATS;
!
! strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
! ifr.ifr_data = (caddr_t)&wreq;
! return (ioctl(olsr_cnf->ioctl_s, SIOCGWAVELAN, &ifr) >= 0) ? 1 : 0;
#else
return 0;
--- 825,838 ----
{
#if defined __FreeBSD__ && !defined FBSD_NO_80211
! /* From FreeBSD ifconfig/ifieee80211.c ieee80211_status() */
! struct ieee80211req ireq;
! u_int8_t data[32];
! memset(&ireq, 0, sizeof(ireq));
! strlcpy(ireq.i_name, ifname, sizeof(ireq.i_name));
! ireq.i_data = &data;
! ireq.i_type = IEEE80211_IOC_SSID;
! ireq.i_val = -1;
! return (ioctl(olsr_cnf->ioctl_s, SIOCG80211, &ireq) >= 0) ? 1 : 0;
#else
return 0;
More information about the Olsr-cvs
mailing list