Skip to content

NAME

sppclo - DTN CCSDS Space Packet Protocol convergence layer output task

SYNOPSIS

sppclo duct_name library_path apid,seq_count,packet_type,sec_header_flag

DESCRIPTION

sppclo is a background "daemon" task that transmits bundles encapsulated in CCSDS Space Packets (per CCSDS 133.0-B-2) using a dynamically loaded provider library.

The task loads the provider library specified by library_path using dynamic linking (dlopen) and uses it to send space packets containing bundles via the OCTET_STRING.request service primitive.

duct_name is the name of the outduct as configured in the BP database.

library_path is the full path to the provider shared library (e.g., /usr/local/lib/libspp_loopback_provider.so).

The configuration string specifies SPP packet header parameters:

  • apid

    Application Process ID (0-2047, 11 bits). Determines the link destination.

  • seq_count

    Initial packet sequence count (0-16383, 14 bits). Auto-increments per packet.

  • packet_type

    Packet type: 0=TM (telemetry), 1=TC (telecommand).

  • sec_header_flag

    Secondary header flag: 0=absent, 1=present.

The provider library must implement the following functions:

  • void init_space_packet_sender(void)
  • void finalize_space_packet_sender(void)
  • int packet_request(unsigned char *buffer, int apid, int seq_count, int packet_type, int sec_header_flag, size_t total_length)

    Returns total bytes sent including SPP header, or negative on error.

sppclo is spawned automatically by bpadmin in response to the 's' (START) command that starts operation of the Bundle Protocol; the text of the command that is used to spawn the task must be provided at the time the "spp" convergence layer protocol is added to the BP database. The convergence layer output task is terminated by bpadmin in response to an 'x' (STOP) command.

SPP CONSTRAINTS

Per CCSDS BPv7 Orange Book:

  • Maximum bundle size: 65,536 bytes (minus secondary header if present)
  • Each octet string shall be a single CBOR serialized bundle
  • Packet Sequence Count shall always be used instead of Packet Name

EXIT STATUS

  • "0"

    sppclo terminated normally, for reasons noted in the ion.log file.

  • "1"

    sppclo terminated abnormally, for reasons noted in the ion.log file. Investigate and solve the problem identified in the log file, then use bpadmin to restart sppclo.

FILES

No configuration files are needed. The provider library must be accessible at the specified path.

ENVIRONMENT

No environment variables apply.

DIAGNOSTICS

The following diagnostics may be issued to the ion.log log file:

  • sppclo can't attach to BP.

    bpadmin has not yet initialized Bundle Protocol operations.

  • No such spp duct.

    No SPP outduct matching duct_name has been added to the BP database.

  • Failed to load provider library.

    The specified shared library could not be loaded.

  • Failed to find required function in provider library.

    The provider library does not export all required functions.

EXAMPLES

Example bprc configuration (APID=123, seq_count=0, TM packet, no secondary header):

a protocol spp 1400 100
a outduct spp loopback 'sppclo loopback /path/to/libspp_loopback_provider.so 123,0,0,0'

BUGS

Report bugs to <https://github.com/nasa-jpl/ION-DTN/issues>

SEE ALSO

bpadmin(1), sppcli(1), bprc(5)