Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDU length bits vs bytes #224

Open
martinerikwerner-aac opened this issue Mar 3, 2024 · 1 comment
Open

PDU length bits vs bytes #224

martinerikwerner-aac opened this issue Mar 3, 2024 · 1 comment

Comments

@martinerikwerner-aac
Copy link

CCSDS 355.1-B-1 indicates that the length field of EP PDUs should be the length of the PDU data field in bits:

5.3.2.3.1 The Extended Procedures Data Field Length shall signal the length of the Extended Procedures PDU Data Field in bits.

This is also indicated by the declaration in:

uint16_t pdu_len : 16; // EP Data Field Length - BITS

However, the use of this field seems to treat is as the number of octets, for example:

sdls_frame.pdu.pdu_len = 1;
sdls_frame.hdr.pkt_length = sdls_frame.pdu.pdu_len + 9;
count = Crypto_Prep_Reply(ingest, 128);

CryptoLib/src/core/crypto.c

Lines 270 to 271 in ef64d8d

ingest[count++] = (sdls_frame.pdu.pdu_len & 0xFF00) >> 8;
ingest[count++] = (sdls_frame.pdu.pdu_len & 0x00FF);

@rjbrown2
Copy link
Contributor

rjbrown2 commented Mar 7, 2024

Hi martinerikwerner-aac. Thanks for bringing this to our attention. We have not yet worked on Extended procedures at this time - so the tests are currently broken. This is on our short-term roadmap, and we will leave this issue open for tracking and completion. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants