diff options
author | Dan Williams <dcbw@redhat.com> | 2010-02-16 09:58:47 -0800 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-02-16 09:58:47 -0800 |
commit | 6239d2e3510bc136a14fdcf7d87e6d85c344bf5a (patch) | |
tree | f12dddb5281427693d20e77e3b58bf7e5594840a /libqcdm/src/utils.h | |
parent | 626f2953bf394eff4361a6d06a608349605fb5aa (diff) |
qcdm: implement command handling and minimal infrastructure
Diffstat (limited to 'libqcdm/src/utils.h')
-rw-r--r-- | libqcdm/src/utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libqcdm/src/utils.h b/libqcdm/src/utils.h index 616c1720..15fc346b 100644 --- a/libqcdm/src/utils.h +++ b/libqcdm/src/utils.h @@ -20,6 +20,9 @@ #include <glib.h> +#define DIAG_CONTROL_CHAR 0x7E +#define DIAG_TRAILER_LEN 3 + guint16 crc16 (const char *buffer, gsize len); gsize dm_escape (const char *inbuf, @@ -33,5 +36,11 @@ gsize dm_unescape (const char *inbuf, gsize outbuf_len, gboolean *escaping); +gsize dm_prepare_buffer (char *inbuf, + gsize cmd_len, + gsize inbuf_len, + char *outbuf, + gsize outbuf_len); + #endif /* UTILS_H */ |