NAME
cbrcustodytest - Bundle Protocol custody transfer test program
SYNOPSIS
cbrcustodytest destEid [-r] [-ttimeout_sec]
cbrcustodytest -l
DESCRIPTION
cbrcustodytest is a test program for verifying the Compressed Bundle Reporting (CBR) and Custody Transfer (CT) implementation as specified in the CCSDS Orange Book "Compressed Bundle Status Reporting and Custody Signaling" specification.
In normal mode, the program sends a test bundle with custody transfer requested to destEid, then monitors the custody transfer lifecycle to verify proper operation. It exercises the CBR/CT APIs including custody acceptance, CCS (Compressed Custody Signal) generation and processing, and custody release.
In list-only mode (-l), the program simply lists all bundles currently held in custody tracking without sending any bundles.
cbrcustodytest performs the following verification steps in normal mode:
- Attaches to the local ION node's Bundle Protocol agent.
- Creates and sends a test bundle with custody transfer requested, which causes the local node to track the bundle in custody storage.
- Verifies that the bundle appears in the local custody tracking list via cbr_listCustodyBundles().
- Polls for custody release, waiting for a CCS (Compressed Custody Signal) from the next custodian.
- Upon receiving a CCS acceptance signal, verifies that the bundle is properly released from custody tracking.
- Reports success or failure based on the custody transfer lifecycle.
OPTIONS
-
-l
List-only mode. Lists all bundles currently in custody tracking and exits. Does not send any bundles. Useful for monitoring custody state.
-
-r
Test retransmission. If custody release times out, triggers manual retransmission of all bundles in custody via cbr_retransmitAllCustody().
-
-ttimeout_sec
Sets the timeout in seconds for waiting for custody release. Default is 30 seconds. The program polls for custody status changes until either all bundles are released or the timeout expires.
EXIT STATUS
-
"0"
cbrcustodytest completed successfully. In normal mode, the custody transfer lifecycle was verified to work correctly. In list-only mode, custody bundles were successfully listed.
-
"1"
cbrcustodytest encountered an error. Check the ion.log file for diagnostic messages.
EXAMPLES
-
cbrcustodytest ipn:2.1
Sends a custody-enabled bundle to ipn:2.1 and waits up to 30 seconds for custody release.
-
cbrcustodytest ipn:2.1 -t60
Sends a custody-enabled bundle to ipn:2.1 with a 60-second timeout.
-
cbrcustodytest ipn:2.1 -r -t10
Sends a custody-enabled bundle to ipn:2.1. If custody is not released within 10 seconds, triggers manual retransmission.
-
cbrcustodytest -l
Lists all bundles currently held in custody tracking.
CONFIGURATION
For cbrcustodytest to function properly, the ION nodes must be configured with CBR/CT support enabled:
-
Enable Orange Book custody mode in each node's bprc file:
m custodymode orangebook -
Configure CBR aggregation parameters (optional, for immediate signal transmission during testing):
m cbraggr 1 1 2This sets CRS limit to 1, CCS limit to 1, and timeout to 2 seconds.
See bprc(5) for detailed configuration command documentation.
OUTPUT FORMAT
In list-only mode, each custody bundle is displayed as:
[N] destEid=<eid> seqId=<id> seqNum=<num>
custodyAccepted=<time> lastTransmit=<time> retransmitCount=<count>
Where:
-
destEid
The destination endpoint ID of the bundle.
-
seqId
The sequence identifier (0 for destination-specific counters).
-
seqNum
The sequence number assigned to this bundle.
-
custodyAccepted
Unix timestamp when custody was accepted.
-
lastTransmit
Unix timestamp of last transmission.
-
retransmitCount
Number of times the bundle has been retransmitted.
Following the bundle list, CBR/CT statistics are displayed:
CBR/CT Statistics:
CCS Accept Sent: <count>
CCS Refuse Sent: <count>
CCS Accept Received: <count>
CCS Refuse Received: <count>
Custody Originated: <count>
Custody Accepted: <count>
Custody Released: <count>
CRS Signals Sent: <count>
CRS Signals Recv: <count>
These statistics provide definitive proof that CCS signals were generated and processed:
-
CCS Accept Sent / CCS Refuse Sent
Count of CCS signals sent to prior custodians when this node received bundles with custody transfer requested.
-
CCS Accept Received / CCS Refuse Received
Count of CCS signals received from next-hop custodians for bundles this node sent with custody transfer.
-
Custody Originated
Count of bundles originated at this node with custody transfer requested. This counter is incremented when a bundle is first sent with the SourceCustodyRequired flag.
-
Custody Accepted
Count of bundles for which this node accepted custody from another node. This applies to bundles received from prior custodians.
-
Custody Released
Count of bundles for which custody was released after receiving a CCS acceptance signal from the next custodian.
-
CRS Signals Sent / CRS Signals Recv
Count of Compressed Reporting Signals sent and received for status reporting (separate from custody transfer signals).
ENVIRONMENT
No environment variables apply.
DIAGNOSTICS
Diagnostic messages produced by cbrcustodytest are written to the ION log file ion.log.
-
Can't attach to BP.
bpadmin has not yet initialized Bundle Protocol operations.
-
Can't attach to CBR.
The CBR/CT subsystem is not initialized. Ensure custody mode is configured.
-
Bundle not in custody tracking.
The bundle was sent but did not appear in the local custody tracking database. This may indicate a configuration problem with custody mode.
-
Custody release timeout.
No CCS signal was received within the timeout period. The remote custodian may not have custody transfer enabled or may be unreachable.
SEE ALSO
bpadmin(1), bprc(5), bp(3)
AUTHOR
NASA Jet Propulsion Laboratory