How to use libusb library to connect to ethernet using microUSB

Hello Everyone ,

I am new to android i want to find a way to develop a software which can be used to connect and use internet by using Ethernet adapter and by not using wifi or mobile internet.
I got the details that libusb can be used for this but i dont know how to use it and create a android side coding to send and receive IP packet using this USB Ethernet Adapter.

Please do help me out with this .

Thank you.

get recognized by the kernel and create another Ethernet device, which
should become ready to carry your network traffic. This, of course, depends
on the specific hardware being recognized, i.e. having an existing network
driver support in the kernel---but most of them are covered.

actully there are many device liker lenova and samsung which do not recognize the ethernet adapter so i need to create a driver for it so it would be possible to connect .