Search

US-12625942-B2 - Enabling network interfaces on mobile devices by means of userspace IP stack

US12625942B2US 12625942 B2US12625942 B2US 12625942B2US-12625942-B2

Abstract

System and method that enable a userspace compartmented IP Stack and network interfaces between a user device and communications devices associated with the user device, including mobile devices. The system and method include userspace bridging of data to/from external communications devices and applications onboard the user device. The system and method include userspace control of the network interfaces, routing between disparate IP networks, and routing of external IP network interfaces into user device interfaces. The system and method includes incorporating userspace device drivers required for external network hardware interface.

Inventors

  • Aaron Paul SIKORSKI

Assignees

  • DittoLive Incorporated

Dates

Publication Date
20260512
Application Date
20240521

Claims (20)

  1. 1 . A method for enabling a user-level interface between a communications device and a user application executing on a user device, via a userspace application including a userspace internet protocol (IP) stack, a userspace device driver, and an interprocess communication (IPC) mechanism, wherein the userspace application executes at a user level without requiring privileged operating system permissions to create a network interface and an associated routing table, the method comprising: creating, by the userspace application while executing at the user level, the network interface and the routing table for the user device without requiring the privileged operating system permissions; accessing an input/output (I/O) mechanism, wherein the I/O mechanism points to an interface associated with the userspace device driver, wherein the userspace device driver is associated with the communications device, and wherein the interface corresponds to the network interface created by the userspace application while executing at the user level; passing the I/O mechanism to the userspace device driver; connecting the userspace device driver to the userspace IP stack using the IPC mechanism; and initializing the communications device via the userspace device driver.
  2. 2 . The method as in claim 1 further comprising: requesting a first permission to access the communications device.
  3. 3 . The method as in claim 2 further comprising: using an applications programming interface to request the first permission from an operating system managing an execution of the user application.
  4. 4 . The method as in claim 2 further comprising: receiving, from a user, an approval or a denial of access to the communications device.
  5. 5 . The method as in claim 1 further comprising: receiving a notification that the communications device is attached to the user device.
  6. 6 . The method as in claim 1 further comprising: requesting a second permission to use the communications device when the user application includes a device driver for the communications device.
  7. 7 . The method as in claim 1 further comprising: starting a process or thread including the userspace device driver.
  8. 8 . The method as in claim 1 further comprising: providing connection information to the userspace IP stack, wherein the connection information includes parameters used to establish an IP link between the communications device and the user device.
  9. 9 . The method as in claim 1 wherein the I/O mechanism comprises: a file descriptor.
  10. 10 . A system for enabling a user-level network interface between a communications device and a user application executing on a user device, via a userspace application, wherein the userspace application executes at a user level without requiring privileged operating system permissions to create a network interface and an associated routing table, the system comprising: the userspace application executing on the user device, the userspace application including a userspace internet protocol (IP) stack, a userspace device driver, and an interprocess communication (IPC) mechanism, wherein the userspace application includes instructions to perform operations including: creating, by the userspace application while executing at the user level, the network interface and the routing table for the user device without requiring the privileged operating system permissions; accessing an input/output (I/O) mechanism, wherein the I/O mechanism points to an interface associated with the userspace device driver, wherein the userspace device driver is associated with the communications device, and wherein the interface corresponds to the network interface created by the userspace application while executing at the user level; passing the I/O mechanism to the userspace device driver; connecting the userspace device driver to the userspace IP stack using the IPC mechanism; and initializing the communications device via the userspace device driver.
  11. 11 . The system as in claim 10 further comprising: a router configured to intercept communications packets transmitted by a user application.
  12. 12 . The system as in claim 10 wherein the userspace application is configured to access the communications device using an applications programming interface (API) configured to enable control of the communications device.
  13. 13 . The system as in claim 10 wherein the operations further comprise: ingesting a packet into the userspace application via the IPC mechanism; moving the packet into the userspace IP stack; preparing, by the userspace IP stack, the packet for transmission by the communications device; and moving the prepared packet to the userspace device driver configured to transmit the packet over a physical link associated with the communications device, wherein the userspace application executes at a user-level without requiring non-user-level permissions.
  14. 14 . The system as in claim 10 wherein the operations further comprise: reading, by the communications device, a packet using the userspace device driver; forming a data link layer frame including data link layer encapsulation from the packet; pushing the data link layer frame onto the userspace IP stack; determining a data payload by removing the data link layer encapsulation from the packet; and transmitting the data payload to a consumer of the data payload.
  15. 15 . The system as in claim 14 wherein the operations further comprise: transmitting the data payload using the userspace IPC mechanism.
  16. 16 . A non-transitory computer-readable medium storing instructions for enabling a user-level interface between a communications device and a user application executing on a user device, via a userspace application including a userspace internet protocol (IP) stack, a userspace device driver, and an interprocess communication (IPC) mechanism, wherein the userspace application executes at a user level without requiring privileged operating system permissions to create a network interface and an associated routing table, the instructions configured to be executed by a processor, the instructions comprising: creating, by the userspace application while executing at the user level, the network interface and the routing table for the user device without requiring the privileged operating system permissions; accessing an input/output (I/O) mechanism, wherein the I/O mechanism points to an interface associated with the userspace device driver, wherein the userspace device driver is associated with the communications device, and wherein the interface corresponds to the network interface created by the userspace application while executing at the user level; passing the I/O mechanism to the userspace device driver; connecting the userspace device driver to the userspace IP stack using the IPC mechanism; and initializing the communications device via the userspace device driver.
  17. 17 . The non-transitory computer-readable medium as in claim 16 wherein the instructions comprise: ingesting a packet into the userspace application via the IPC mechanism; moving the packet into the userspace IP stack; preparing, by the userspace IP stack, the packet for transmission; and moving the prepared packet to the userspace device driver configured to transmit the packet over a physical link associated with the communications device, wherein the userspace application executes at a user-level without requiring non-user-level permissions.
  18. 18 . The non-transitory computer-readable medium as in claim 16 wherein the instructions comprise: reading, by the communications device, a packet from a physical link using the userspace device driver; forming a data link layer frame including data link layer encapsulation from the packet; pushing the data link layer frame onto the userspace IP stack; determining a data payload by removing the data link layer encapsulation from the packet; and transmitting the data payload to a consumer of the data payload.
  19. 19 . The non-transitory computer-readable medium as in claim 18 , the instructions further comprising: transmitting the data payload using the userspace IPC mechanism.
  20. 20 . The non-transitory computer-readable medium as in claim 16 wherein the userspace application is configured to access the communications device using an applications programming interface (API) configured to enable control of the communications device.

Description

CROSS REFERENCE TO RELATED APPLICATIONS This application claims the priority and benefit of U.S. Provisional Application No. 63/503,756, filed on May 23, 2023, which is hereby incorporated by reference in its entirety. FIELD OF THE INVENTION Various embodiments in accordance with the present disclosure relate to communications between a user device, (sometimes referred to herein as an end user device (EUD); such as, for example, but not limited to, a mobile computing device, a smart phone, a tablet, or the like), and wired or wireless network communication device(s). Embodiments include, but are not limited to including, an EUD which connects to a networked communications device such as, for example, but not limited to, a BLUETOOTH® device, an ultra-wideband (UWB) device, a universal serial bus (USB) device, a near field communication (NFC) device, or the like. BACKGROUND In the current state of the art, original equipment manufacturers (OEMs), such as, for example, but not limited to, manufacturers of ANDROID® user devices, and software/hardware/firmware developers for these OEMs include network communications device support in the operating system of the device. There is a plurality of network device configurations, and the OEMs can build in drivers for these communications devices to enable communication. The OEM may also make modifications to the operating system kernel, as well as modifications to a userspace interface, to manage the network devices. These things cannot, however, ordinarily be done by a user or an application developer because the OEM does not allow users and application developers to modify the operating system kernel, etc. What are needed are a system and method for enabling communications between an EUD and a communications device in userspace without requiring access to the operating system kernel. SUMMARY The system and method in accordance with embodiments of the present disclosure enable a network interface, which may include routing, by using built-in, user-accessible, operating system features, such as, for example, but not limited to, application programming interfaces (APIs), to control hardware (e.g., communications devices), without requiring OEM-level changes to operating system components. The system in accordance with embodiments of the present disclosure includes a novel, inventive, userspace application executing on an EUD that replaces operating system component modifications, specifically adding and/or modifying drivers, and enables access to operating system tools. The userspace application is granted the permissions to provide the network interface, without requiring operating system-level permissions. In an aspect, the userspace application includes a userspace IP stack, a userspace device driver, and an interprocess communications mechanism (IPC) which accepts the communications packet traffic being sent to and received from an EUD's conventional user application(s), (e.g., application downloaded from Google® Play Store or the like). In various implementations, the novel userspace application routes the communications packet traffic to the conventional user applications via the IPC, which transmits the packet traffic to a communications device(s), (e.g., a network device) connected via the userspace IP Stack. In an aspect, the IPC reflects the communications packet traffic into the userspace IP stack. In an aspect, the user application, in accordance with embodiments of the present disclosure, acts as a network router for the user application using its internal IP Stack, and acts as a network router for network devices. In an aspect, multiple communication channels and/or networks are supported via the userspace IP Stack. A method in accordance with embodiments of the present disclosure establishes, using, for example, an applications programming interface (API), a link between an EUD user application and the EUD's communications device/hardware. In an aspect, the link includes a wired connection or port or a wireless connection or port. The method includes, but is not limited to including, associating the link with a userspace device driver, which establishes communications between the user application and the EUD's communications device. The method further includes encoding and decoding, by the userspace device driver, protocol information. Thus, a plurality of proprietary protocols, for example, but not limited to, ASIX™, REALTEK®, and others, and open standards protocols, such as, for example, but not limited to, communication device class/Ethernet control module (CDC-ECM), CDC-Ethernet emulation module (EEM), CDC-network control module (NCM), remote network driver interface specification (RNDIS), and point-to-point protocol (PPP), are supported. In an aspect, the userspace device driver is contained in, accessed by, or otherwise associated with, a novel userspace application. In an aspect, a service that resides on the user device awaits communications traf