RNDIS full name Remote NDIS is a USB Ethernet card model defined by Microsoft. When it comes to RNDIS, it has to say something else, NDIS.
NDIS (Network Driver Interface Specification) is the abbreviation of Network Driver Interface Specification. It spans the transport layer, network layer and data link layer, defines the communication interface specification between the network card or network card driver and the upper protocol driver, shields the difference of the underlying physical hardware, and enables the upper protocol driver to communicate with any type of network card at the bottom. NDIS creates a complete development environment for network drivers. It only needs to call NDIS functions, without considering the kernel of the operating system and the interface with other drivers, so that network drivers can be separated from the complex communication with the operating system, which greatly facilitates the programming of network drivers. In addition, the encapsulation feature of NDIS can focus on one-layer driver design, which reduces the complexity of design and is easy to extend driver stack.
RNDIS is a specific implementation of NDIS, which is based on USB. RNDIS can automatically load drivers on Windows 7 or later (reasonably Vista is also possible), without the need for third-party drivers. For Linux and MacOS, RNDIS needs to install third-party drivers. Some Linux distributions have built-in RNDIS drivers (many people use Windows). As for how to use RNDIS under Linux Mac, I won't explain much to you here, because I provide another solution - --- CDC-ECM.
CDC-ECM (Ethernet Networking Control Model) is the standard USB Ethernet controller model defined by the USB Alliance (unfortunately, there is no driver under Windows). Most Linux distributions and MacOS support the driver of this USB device. The vast majority of what I'm talking about here includes a variety of pis. Of course, if you manually remove this driver from your own compiled linux, you won't be able to.