diff options
Diffstat (limited to 'modules/ctrl_tcp/tcp_netstring.h')
-rw-r--r-- | modules/ctrl_tcp/tcp_netstring.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/ctrl_tcp/tcp_netstring.h b/modules/ctrl_tcp/tcp_netstring.h new file mode 100644 index 0000000..8195217 --- /dev/null +++ b/modules/ctrl_tcp/tcp_netstring.h @@ -0,0 +1,16 @@ +/** + * @file tcp_netstring.h TCP netstring framing + * + * Copyright (C) 2018 46 Labs LLC + */ + +enum {NETSTRING_HEADER_SIZE = 10}; + +struct netstring; + +typedef bool (netstring_frame_h)(struct mbuf *mb, void *arg); + + +int netstring_insert(struct netstring **netstringp, struct tcp_conn *tc, + int layer, netstring_frame_h *frameh, void *arg); +int netstring_debug(struct re_printf *pf, const struct netstring *netstring); |