summaryrefslogtreecommitdiffstats
path: root/src/dle.h
blob: 31d511bb13c211fc9639af73ec35d655a2596c14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef foodlehfoo
#define foodlehfoo

#include <sys/types.h>
#include <inttypes.h>

/* Those nifty DLE-sequences */
#define DLE 0x10
#define ETX 0x03
#define DC4 0x14

size_t dle_decode(const uint8_t* s, size_t ls, uint8_t* d, size_t *ld, int (*dle_func) (uint8_t c, void *user), void *user, int *dle_flag);
size_t dle_encode(const uint8_t* s, size_t ls, uint8_t* d, size_t *ld);

#endif