Networking Services

Network Services

Networking in RTEMS started with the Legacy Networking stack resident in the RTEMS Kernel repository. Over time that repository collected a range of services users came to depend on, for example telnet. This networking stack became harder and harder to maintain and the libBSD project started to replace it.

In 2021 Vijay Banerjee removed the legacy networking code from the RTEMS Kernel repository moving it to a new Legacy Networking repository. RTEMS now had three networking options:

  1. Legacy Networking
  2. libBSD
  3. lwIP

Network Services was created to hold network services so they could be used with any of the three networking stacks. This avoided coping the services code to each networking repository and avoiding the complex processing of pushing the needed interfaces down into into RTEMS or worse Newlib.

Building

To use Networking Services in an application you need to build:

  1. RTEMS Tools using the RSB
  2. RTEMS Kernel
  3. Networking stack, eg libBSD or lwIP
  4. Networking Services

Each package listed above needs to be built and installed to the build prefix in the order listed. The RTEMS Tools has header files the RTEMS kernel needs. The networking stack depends on header files in the RTEMS kernel and Network Services depends on header files from the networking stack.

To link an application you need to provide the networking library as well as the networking services library to the linker.

NOTE:
RTEMS Deployment lets you build all these packages with a single command simplifying the process.

Applications

As an example lets use EPICS as our application and NTP as a clock source. NTP is a service in Network Services. EPICS includes the NTP headers exported by Network Services when it is installed after building and the EPICS build system selects which networking option the user has built:

block-beta
columns 1
  db(("EPICS"))
  blockArrowId6<["&nbsp;&nbsp;&nbsp;"]>(down)
  block:NS
    A["Networking Services"]
  end
  space
  block:D
    columns 3
    E["Legacy Networking"] F["libBSD"]:1 G["lwIP"]:1
  end
  NS --> F
  NS --> E
  NS --> G
2 Likes