27#define NETDEVICE_DEVICE_DEBUG (1)
37#define NETDEVICE_DEVICE_MAXIMUM (5)
49#define NETDEVICE_REQUEST_FAILED (0)
50#define NETDEVICE_MODULE_NOT_FOUND (-1)
51#define NETDEVICE_ALREADY_EXISTS (-2)
52#define NETDEVICE_SUPPORT_TASK_FAILED (-3)
53#define NETDEVICE_MODULE_NOT_SUPPORTED (-4)
56#define NETDEVICE_SITE_COUNT (1)
57#define NETDEVICE_SITE_LIST (2)
66#define NETDEVICE_INITIALIZE (0)
67#define NETDEVICE_UPDATE_PASSPHRASE (1)
68#define NETDEVICE_GET_TEMPORAL_KEY (2)
85typedef enum _NetDeviceController
88 ControllerPointToPoint,
89 ControllerRealtekRtl8711
103typedef enum _NetDeviceBusType
108 BusTypeSdioBusSpiMode,
134typedef enum _NetDeviceSelectDetail
137 SelectDetailSpiUnmanaged,
138 SelectDetailSpiUnmanagedMultiplex,
139 SelectDetailSpiManaged,
140 SelectDetailSpiManagedMultiplex,
141 SelectDetailGpioUnmanaged,
143} NetDeviceSelectDetail;
161typedef void(NetDeviceProgressFn)(
int activity,
int progress,
const char *detail);
162typedef NetDeviceProgressFn *NetDeviceProgressFnPtr;
165typedef BOOL(NetDeviceSupplicantFn)(
int action,
void *buffer);
166typedef NetDeviceSupplicantFn *NetDeviceSupplicantFnPtr;
184 NetDevice(
int irq, NetDeviceController controller, NetDeviceBusType busType,
int select, NetDeviceSelectDetail selectDetails);
187 virtual ~NetDevice();
194 static int add(
int irq, NetDeviceController controller, NetDeviceBusType busType,
int select, NetDeviceSelectDetail selectDetails);
197 static NetDevice *getNetDevice(
int deviceIndex);
201 virtual BOOL setupBus(
void);
204 virtual BOOL setupIsr(DeviceIsrFnPtr isrFunction,
int irq);
207 virtual BOOL probe(
void);
210 virtual BOOL open(
void);
213 virtual BOOL close(
void);
216 virtual BOOL remove(
void);
219 virtual BOOL configure(
int request, ssize_t parameterSize,
void *parameterPtr);
220 virtual BOOL retrieveSetting(
int setting, ssize_t settingSize,
void *settingPtr);
223 virtual BOOL list(
int request, ssize_t &listSize,
void *listPtr);
226 virtual void getNetworkName(
char *name, ssize_t maximumBytes);
229 virtual BOOL surveyNetwork(
char *site);
232 virtual BOOL connect(
const char *identifier = NULL,
const char *securityKey = NULL,
int securityDetail = 0,
int mode = 0);
235 virtual BOOL disconnect(
void);
239 virtual BOOL transmitPacket(PoolPtr poolPtr);
242 virtual void resetMulticast(MACADDRESS_48 macAddress, BOOL addAddress);
246 void setInterfaceNumber(
int interfaceNumber);
247 int getInterfaceNumber(
void)
const;
250 int getNumber(
void)
const;
256 int getUnit(
void)
const;
259 NetDeviceController getController(
void)
const;
262 NetDeviceBusType getBusType(
void)
const;
265 int getSelect(
void)
const;
268 NetDeviceSelectDetail getSelectDetail(
void)
const;
271 virtual BOOL getMacAddress(MACADDRESS_48 &macAddress);
274 virtual BOOL isConnected(
void);
277 virtual void setProgressRoutine(NetDeviceProgressFnPtr routinePtr);
280 virtual void setSupplicant(NetDeviceSupplicantFnPtr routinePtr);
283 void setTicksPerSecond(
unsigned short ticksPerSecond);
284 unsigned int getTicksPerSecond(
void)
const;
287 virtual void signalInterrupt(
void);
290 BOOL isValid(
void)
const;
294 void setName(
const char *namePtr);
297 void setUnit(
int unit);
300 void setValid(BOOL valid)
const;
320 NetDeviceController __controller;
323 NetDeviceBusType __busType;
329 NetDeviceSelectDetail __selectDetail;
332 int __interfaceNumber;
335 unsigned short __ticksPerSecond;
342 static BOOL __isInitialized;
345 static OS_CRIT __criticalSection;
348 static NetDevice *__device[NETDEVICE_DEVICE_MAXIMUM];
371BOOL NetDeviceIsValid(
int irq, NetDeviceController controller, NetDeviceBusType busType);
397NetDevice *NetDeviceGetDevice(
int irq,
398 NetDeviceController controller,
399 NetDeviceBusType busType,
401 NetDeviceSelectDetail selectDetails);
404NetDevice *NetDeviceGetDeviceRtl8711SdioSpi(
int irq,
int select, NetDeviceSelectDetail selectDetails);
NetBurner Device Interrupts.
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, unsigned long timeout)
Wait for events to occur on one or more I/O resources associated with a set of file descriptors (fds)...
NetBurner IPADDR4 Class. See the IPADDR4 Class page for complete documentation.
An OS_CRIT object is used to establish critical sections of code that can only be run by one task at ...
Definition nbrtos.h:1084