56 #define SLIP_FEND 0xC0
60 #define SLIP_FESC 0xDB
64 #define SLIP_TFEND 0xDC
68 #define SLIP_TFESC 0xDD
77 int32_t
slip_unpack(uint8_t *sbuf, uint16_t ssize, uint8_t *rbuf, uint16_t rsize);
78 int32_t
slip_decode(uint8_t *sbuf, uint16_t ssize, uint8_t *rbuf, uint16_t rsize);
79 int32_t
slip_pack(uint8_t *rbuf, uint16_t rsize, uint8_t *sbuf, uint16_t ssize);
80 int32_t
slip_encode(uint8_t *rbuf, uint16_t rsize, uint8_t *sbuf, uint16_t ssize);
81 int32_t
slip_unpack(vector<uint8_t> &sbuf, vector<uint8_t> &rbuf);
82 int32_t
slip_decode(vector<uint8_t> &sbuf, vector<uint8_t> &rbuf);
83 int32_t
slip_pack(vector<uint8_t> &rbuf, vector<uint8_t> &sbuf);
84 int32_t
slip_encode(vector<uint8_t> &rbuf, vector<uint8_t> &sbuf);
85 int32_t slip_extract(FILE *fp, vector<uint8_t> &buf);
Headers and definitions common to all COSMOS Kernel.
int32_t slip_unpack(uint8_t *sbuf, uint16_t ssize, uint8_t *rbuf, uint16_t rsize)
Unpack SLIP packet.
Definition: sliplib.cpp:50
int32_t slip_decode(uint8_t *sbuf, uint16_t ssize, uint8_t *rbuf, uint16_t rsize)
Decode SLIP packet.
Definition: sliplib.cpp:70
int32_t slip_encode(uint8_t *rbuf, uint16_t rsize, uint8_t *sbuf, uint16_t ssize)
Encode data in to SLIP packet.
Definition: sliplib.cpp:173
int32_t slip_pack(uint8_t *rbuf, uint16_t rsize, uint8_t *sbuf, uint16_t ssize)
Pack data in to SLIP packet.
Definition: sliplib.cpp:247
uint16_t slip_calc_crc(uint8_t *buf, uint16_t size)
Calculate CRC-16-CCITT.
Definition: sliplib.cpp:334