diff options
author | Dan Williams <dcbw@redhat.com> | 2011-11-11 12:20:51 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2011-11-11 12:21:41 -0600 |
commit | ae3f1cd578e59245a6bff5cfd19f64f0c47f5de9 (patch) | |
tree | 5db2e66c1688643a58567bc97a58048b798b9c20 /libwmc/src/utils.h | |
parent | 83c905837693f095d9e7c1bf9ac56d8290510f45 (diff) |
libwmc: add testcases that talk to the device
Diffstat (limited to 'libwmc/src/utils.h')
-rw-r--r-- | libwmc/src/utils.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/libwmc/src/utils.h b/libwmc/src/utils.h index 4a7ab302..2163784e 100644 --- a/libwmc/src/utils.h +++ b/libwmc/src/utils.h @@ -23,6 +23,8 @@ #define DIAG_CONTROL_CHAR 0x7E #define DIAG_TRAILER_LEN 3 +/* Utility and testcase functions */ + guint16 crc16 (const char *buffer, gsize len, guint16 seed); gsize hdlc_escape (const char *inbuf, @@ -46,12 +48,6 @@ gsize hdlc_encapsulate_buffer (char *inbuf, char *outbuf, gsize outbuf_len); -gsize uml290_wmc_encapsulate (char *inbuf, - gsize cmd_len, - gsize inbuf_len, - char *outbuf, - gsize outbuf_len); - gboolean hdlc_decapsulate_buffer (const char *inbuf, gsize inbuf_len, gboolean check_known_crc, @@ -62,5 +58,23 @@ gboolean hdlc_decapsulate_buffer (const char *inbuf, gsize *out_used, gboolean *out_need_more); +/* Functions for actual communication */ + +gsize wmc_encapsulate (char *inbuf, + gsize cmd_len, + gsize inbuf_len, + char *outbuf, + gsize outbuf_len, + gboolean uml290); + +gboolean wmc_decapsulate (const char *inbuf, + gsize inbuf_len, + char *outbuf, + gsize outbuf_len, + gsize *out_decap_len, + gsize *out_used, + gboolean *out_need_more, + gboolean uml290); + #endif /* UTILS_H */ |