summaryrefslogtreecommitdiff
path: root/modules/ctrl_tcp/tcp_netstring.h
blob: 8195217c13f85f4f49bb70733a0da157c05d4481 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);