|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
29 #include "pprzlink/pprzlink_transport.h"
30 #include "pprzlink/pprz_transport.h"
44 #define KEY_EXCHANGE_MSG_ID_UAV 239
45 #define KEY_EXCHANGE_MSG_ID_GCS 159
46 #define WHITELIST_LEN 20
103 uint8_t *buf,
bool *msg_available);
Whitelist for sending and receiving unencrypted messages (mostly for KEY_EXCHANGE messages)
uint8_t tx_msg[TRANSPORT_PAYLOAD_LEN]
void gec_process_msg1(uint8_t *buf)
NOTE: for RESPONDER party only Process incoming message (expected MSG1) if the right (KEY_EXCHANGE) m...
struct transport_rx trans_rx
struct gec_whitelist whitelist
bool gec_encrypt_message(uint8_t *buf, uint8_t *payload_len)
Attempts message encryption Adds crypto_byte, counter and tag Returns encrypted pprzlink message (cry...
void gec_dl_event(void)
Datalink Event.
void gec_add_to_whitelist(struct gec_whitelist *whitelist, uint8_t id)
Auxilliary message buffer for storing precomputed key exchange messages.
void gec_dl_init(void)
Init function.
uint8_t msg[TRANSPORT_PAYLOAD_LEN]
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
static const struct usb_device_descriptor dev
uint8_t whitelist[WHITELIST_LEN]
bool gec_process_msg3(uint8_t *buf)
Process incoming message (expected MSG3) if the right (KEY_EXCHANGE) message received with the right ...
struct pprz_transport pprz_tp
void gec_process_sts_msg(struct link_device *dev, struct gec_transport *trans, uint8_t *buf)
void respond_sts(struct link_device *dev, struct gec_transport *trans, uint8_t *buf)
void gec_transport_init(struct gec_transport *t)
void finish_sts(struct link_device *dev, struct gec_transport *trans, uint8_t *buf)
bool gec_is_in_the_whitelist(struct gec_whitelist *whitelist, uint8_t id)
struct gec_transport gec_tp
PPRZ transport structure.
bool gec_decrypt_message(uint8_t *buf, volatile uint8_t *payload_len)
Attemp message decryption If a message is unencrypted, pass it through only if the MSG_ID is in the w...
struct transport_tx trans_tx
void gec_check_and_parse(struct link_device *dev, struct gec_transport *trans, uint8_t *buf, bool *msg_available)
Parsing a frame data and copy the payload to the datalink buffer.