mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 05:11:15 +08:00
ifconfig/wlan, expat, lib80211: Port to RTEMS.
This commit is contained in:
@@ -28,6 +28,15 @@
|
||||
static const char rcsid[] = "$FreeBSD$";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifdef __rtems__
|
||||
/* We need some functions from kernel name space */
|
||||
#define sbuf_bcat _bsd_sbuf_bcat
|
||||
#define sbuf_finish _bsd_sbuf_finish
|
||||
#define sbuf_data _bsd_sbuf_data
|
||||
#define sbuf_len _bsd_sbuf_len
|
||||
#define sbuf_delete _bsd_sbuf_delete
|
||||
#define sbuf_new _bsd_sbuf_new
|
||||
#endif /* __rtems__ */
|
||||
#include <sys/types.h>
|
||||
#include <rtems/bsd/sys/errno.h>
|
||||
#include <rtems/bsd/sys/param.h>
|
||||
|
@@ -382,6 +382,7 @@ mainwrapper(int argc, char *argv[])
|
||||
gre_ctor();
|
||||
group_ctor();
|
||||
ifmedia_ctor();
|
||||
ieee80211_ctor();
|
||||
inet6_ctor();
|
||||
inet_ctor();
|
||||
lagg_ctor();
|
||||
|
@@ -1,5 +1,9 @@
|
||||
#include <machine/rtems-bsd-user-space.h>
|
||||
|
||||
#ifdef __rtems__
|
||||
#include "rtems-bsd-ifconfig-namespace.h"
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/*
|
||||
* Copyright 2001 The Aerospace Corporation. All rights reserved.
|
||||
*
|
||||
@@ -59,6 +63,9 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef __rtems__
|
||||
#include <machine/rtems-bsd-program.h>
|
||||
#endif /* __rtems__ */
|
||||
#include <rtems/bsd/sys/param.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
@@ -95,6 +102,9 @@
|
||||
|
||||
#include <lib80211/lib80211_regdomain.h>
|
||||
#include <lib80211/lib80211_ioctl.h>
|
||||
#ifdef __rtems__
|
||||
#include "rtems-bsd-ifconfig-ifieee80211-data.h"
|
||||
#endif /* __rtems__ */
|
||||
|
||||
#ifndef IEEE80211_FIXED_RATE_NONE
|
||||
#define IEEE80211_FIXED_RATE_NONE 0xff
|
||||
@@ -3448,7 +3458,11 @@ printmimo(const struct ieee80211_mimo_info *mi)
|
||||
static void
|
||||
list_scan(int s)
|
||||
{
|
||||
#ifndef __rtems__
|
||||
uint8_t buf[24*1024];
|
||||
#else /* __rtems__ */
|
||||
static uint8_t buf[24*1024];
|
||||
#endif /* __rtems__ */
|
||||
char ssid[IEEE80211_NWID_LEN+1];
|
||||
const uint8_t *cp;
|
||||
int len, ssidmax, idlen;
|
||||
@@ -5693,7 +5707,11 @@ static struct afswtch af_ieee80211 = {
|
||||
.af_other_status = ieee80211_status,
|
||||
};
|
||||
|
||||
#ifndef __rtems__
|
||||
static __constructor void
|
||||
#else /* __rtems__ */
|
||||
void
|
||||
#endif /* __rtems__ */
|
||||
ieee80211_ctor(void)
|
||||
{
|
||||
int i;
|
||||
|
@@ -7,11 +7,11 @@
|
||||
/* ifbridge.c */
|
||||
/* ifclone.c */
|
||||
/* ifconfig.c */
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, extern int setaddr);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, extern struct ifreq ifr);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, extern char name[16]);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, extern char *descr);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, extern size_t descrlen);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, extern int setaddr);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, extern int setmask);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, extern int doalias);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, extern int clearaddr);
|
||||
@@ -28,6 +28,7 @@ RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, extern char *f_addr);
|
||||
/* ifgif.c */
|
||||
/* ifgre.c */
|
||||
/* ifgroup.c */
|
||||
/* ifieee80211.c */
|
||||
/* iflagg.c */
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, extern char lacpbuf[120]);
|
||||
/* ifmac.c */
|
||||
|
24
freebsd/sbin/ifconfig/rtems-bsd-ifconfig-ifieee80211-data.h
Normal file
24
freebsd/sbin/ifconfig/rtems-bsd-ifconfig-ifieee80211-data.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* generated by userspace-header-gen.py */
|
||||
#include <rtems/linkersets.h>
|
||||
#include "rtems-bsd-ifconfig-data.h"
|
||||
/* ifieee80211.c */
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static int col);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static char spacer);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static char const *modename[14]);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static struct ieee80211req_chaninfo *chaninfo);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static struct ieee80211_regdomain regdomain);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static int gotregdomain);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static struct ieee80211_roamparams_req roamparams);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static int gotroam);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static struct ieee80211_txparams_req txparams);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static int gottxparams);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static struct ieee80211_channel curchan);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static int gotcurchan);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static struct ifmediareq *ifmr);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static int htconf);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static int gothtconf);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static struct ieee80211_clone_params params);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static struct cmd ieee80211_cmds[177]);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static struct afswtch af_ieee80211);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static int vhtconf);
|
||||
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_ifconfig, static int gotvhtconf);
|
@@ -15,11 +15,11 @@
|
||||
#define clone_ctor _bsd_ifconfig_clone_ctor
|
||||
#define clone_setdefcallback _bsd_ifconfig_clone_setdefcallback
|
||||
/* ifconfig.c */
|
||||
#define setaddr _bsd_ifconfig_setaddr
|
||||
#define ifr _bsd_ifconfig_ifr
|
||||
#define name _bsd_ifconfig_name
|
||||
#define descr _bsd_ifconfig_descr
|
||||
#define descrlen _bsd_ifconfig_descrlen
|
||||
#define setaddr _bsd_ifconfig_setaddr
|
||||
#define setmask _bsd_ifconfig_setmask
|
||||
#define doalias _bsd_ifconfig_doalias
|
||||
#define clearaddr _bsd_ifconfig_clearaddr
|
||||
@@ -49,6 +49,8 @@
|
||||
#define gre_ctor _bsd_ifconfig_gre_ctor
|
||||
/* ifgroup.c */
|
||||
#define group_ctor _bsd_ifconfig_group_ctor
|
||||
/* ifieee80211.c */
|
||||
#define ieee80211_ctor _bsd_ifconfig_ieee80211_ctor
|
||||
/* iflagg.c */
|
||||
#define lacpbuf _bsd_ifconfig_lacpbuf
|
||||
#define lagg_ctor _bsd_ifconfig_lagg_ctor
|
||||
|
Reference in New Issue
Block a user