1/* 2 Driver for USB RNDIS network devices 3 Copyright (C) 2022 Adrien Destugues <pulkomandy@pulkomandy.tk> 4 Distributed under the terms of the MIT license. 5*/ 6#ifndef _USB_RNDIS_DRIVER_H_ 7#define _USB_RNDIS_DRIVER_H_ 8 9#include <Drivers.h> 10#include <KernelExport.h> 11#include <OS.h> 12#include <USB3.h> 13#include <drivers/usb/USB_cdc.h> 14 15#include <util/kernel_cpp.h> 16 17#define DRIVER_NAME "usb_rndis" 18#define MAX_DEVICES 8 19 20extern usb_module_info *gUSBModule; 21 22extern "C" { 23status_t usb_rndis_device_added(usb_device device, void **cookie); 24status_t usb_rndis_device_removed(void *cookie); 25 26status_t init_hardware(); 27void uninit_driver(); 28 29const char **publish_devices(); 30device_hooks *find_device(const char *name); 31} 32 33#if TRACE_RNDIS 34#define TRACE(x...) dprintf(DRIVER_NAME ": " x) 35#else 36#define TRACE(x...) 37#endif 38#define TRACE_ALWAYS(x...) dprintf(DRIVER_NAME ": " x) 39 40#endif //_USB_RNDIS_DRIVER_H_ 41