69 releases (22 breaking)

new 0.95.0 Nov 15, 2024
0.93.1 Sep 24, 2024
0.17.0 Jul 23, 2024
0.16.1 Mar 28, 2024
0.2.0 Dec 31, 2018

#83 in Network programming

Download history 118/week @ 2024-07-22 71/week @ 2024-07-29 527/week @ 2024-09-09 402/week @ 2024-09-16 476/week @ 2024-09-23 138/week @ 2024-09-30 167/week @ 2024-10-07 14/week @ 2024-10-14 9/week @ 2024-10-21 164/week @ 2024-10-28 5/week @ 2024-11-04

197 downloads per month

BSD-3-Clause

435KB
10K SLoC

Continuous integration

rusp

rusp is the Rust USP toolkit, brought to you by Axiros!

Rust is a fast and safe systems programming language.

USP (or User Services Platform) is a new protocol for management of connected devices, maintained and developed by the Broadband Forum.

Axiros is a leading company for device management.

What is rusp?

rusp is a toolkit, written in Rust, providing support to work with USP records and messages which are encoded in Protobuf bytestreams.

While a Protobuf schema exists which allows generating bindings for several commonly used programming languages, those are either uncomfortable to use and/or highly unsafe. By leveraging the strong Rust type system and the strict compiler, Rust is capable of detecting many incorrect or incomplete uses of the Protobuf encoding at compile time which allows for confident use of the USP protocol.

What is included?

The toolkit is split into two parts: this is the application part, which contains:

  • A rusp binary granting access to library functionality via command line. Included functionality at the moment are:
    • Decoding of USP Msg Protobuf bytestreams from standard input
    • Decoding of USP Msg Protobuf bytestreams from file(s)
    • Decoding of USP Record Protobuf bytestreams from standard input
    • Decoding of USP Record Protobuf bytestreams from file(s)
    • Extraction of USP Msg Protobuf bytestreams from the payload of a USP Record Protobuf bytestream
    • Generation of USP Msg Protobuf bytestreams and C char arrays for selected messages and Error

How to use it?

rusp binary

rusp includes a binary with the same name demonstrating some of the uses.

At the moment this mostly allows converting Protobuf encapsulated USP Record and Msg structures into human-readable text. It also allows extracting a Msg structure from a Record for own implementations as well as to encode USP

  • Add
  • Delete
  • Error
  • Get
  • GetInstances
  • GetResp
  • GetSupportedDM
  • GetSupportedProtocol
  • Notify
  • NotifyResp
  • Operate
  • Set

messages via command line tool.

NEWSFLASH: 0.93.0 moves to owned types and removed the deprecated generator API. If you're using the binary, you won't observe any changes, if you use the library, expect a bit of update work but a much nicer interface.

In order to download, compile and install the rusp binary it is sufficient to have a stable Rust environment and run:

# cargo install rusp

After this you should be able to use the rusp binary, which has built-in help for all the commands to guide the way.

What else?

You may use this crate however you like under the BSD 3-Clause Licence.

The toolkit is still far from feature complete but already a big aid in our product development and also helped to find one or the other discrepancy in the standard.

Feel free to spread the word or drop us a note if you like it. Collaboration on this crate is highly welcome as are pull requests!

Contact us

If you are in need of software for USP management software (agent, controller or testing) or expertise please get in touch with us via our web form. We're also happy to solve all other device management and monitoring needs!

Licence

BSD 3-Clause Licence.

Dependencies

~1.9–3MB
~56K SLoC