}
}
+void buf_append_be16(struct oc_text_buf *buf, uint16_t val)
+{
+ unsigned char b[2];
+
+ store_be16(b, val);
+
+ buf_append_bytes(buf, b, 2);
+}
+
+void buf_append_be32(struct oc_text_buf *buf, uint32_t val)
+{
+ unsigned char b[4];
+
+ store_be32(b, val);
+
+ buf_append_bytes(buf, b, 4);
+}
+
+void buf_append_le16(struct oc_text_buf *buf, uint16_t val)
+{
+ unsigned char b[2];
+
+ store_le16(b, val);
+
+ buf_append_bytes(buf, b, 2);
+}
+
void buf_append_hex(struct oc_text_buf *buf, const void *str, unsigned len)
{
const unsigned char *data = str;
return 0;
}
-static void buf_append_be16(struct oc_text_buf *buf, uint16_t val)
-{
- unsigned char b[2];
-
- store_be16(b, val);
-
- buf_append_bytes(buf, b, 2);
-}
-
-static void buf_append_le16(struct oc_text_buf *buf, uint16_t val)
-{
- unsigned char b[2];
-
- store_le16(b, val);
-
- buf_append_bytes(buf, b, 2);
-}
-
static void buf_append_tlv(struct oc_text_buf *buf, uint16_t val, uint32_t len, void *data)
{
unsigned char b[6];
void __attribute__ ((format (printf, 2, 3)))
buf_append(struct oc_text_buf *buf, const char *fmt, ...);
void buf_append_bytes(struct oc_text_buf *buf, const void *bytes, int len);
+void buf_append_be16(struct oc_text_buf *buf, uint16_t val);
+void buf_append_be32(struct oc_text_buf *buf, uint32_t val);
+void buf_append_le16(struct oc_text_buf *buf, uint16_t val);
void buf_append_hex(struct oc_text_buf *buf, const void *str, unsigned len);
int buf_append_utf16le(struct oc_text_buf *buf, const char *utf8);
int get_utf8char(const char **utf8);
#define TTLS_MOREFRAGS (1<<6)
#define TTLS_START (1<<5)
-static void buf_append_be16(struct oc_text_buf *buf, uint16_t val)
-{
- unsigned char b[2];
-
- store_be16(b, val);
-
- buf_append_bytes(buf, b, 2);
-}
-
-static void buf_append_be32(struct oc_text_buf *buf, uint32_t val)
-{
- unsigned char b[4];
-
- store_be32(b, val);
-
- buf_append_bytes(buf, b, 4);
-}
-
static void buf_append_ift_hdr(struct oc_text_buf *buf, uint32_t vendor, uint32_t type)
{
uint32_t b[4];