Provide a software-only solution using the CCSDS Space Data Link Security Protocol - Extended Procedures (SDLS-EP) to secure communications between a spacecraft running the core Flight System (cFS) and a ground station.
If you don’t have access to the KMC repo it’s the output produced by the following GCC pre-processing line that CFFI can’t parse.
gcc -E -Ikmc_sdls/public_inc -I/usr/local/include -I../../../CryptoLib/include ../../public_inc/kmc_sdls.h
The root cause turned out to be with these 2 lines in crypto_structs.h
When standard C libraries are included in the gcc -E (preprocessing) step, it includes the standard library contents in the pre processed output which the Python CFFI parsing code can’t handle.
else // Assume build outside of NOS3/cFS infrastructure
include
include
include
endif
TO:
ifdef NOS3 // NOS3/cFS build is ready
include "common_types.h"
else // Assume build outside of NOS3/cFS infrastructure
#include <stdint.h>
#ifndef CFFI_EXCLUDE // Exclude libraries that CFFI parser can’t process
#include <stdio.h>
#include <stdlib.h>
#endif
endif
With the above update we can then run the GCC command with -D CFFI_EXCLUDE to exclude the standard libraries
gcc -E -D CFFI_EXCLUDE -Ikmc_sdls/public_inc -I/usr/local/include -I../../../CryptoLib/include ../../public_inc/kmc_sdls.h
Email from Hayk, capturing here to test results: