File: tcp_netstring.h

package info (click to toggle)
baresip 0.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,316 kB
  • sloc: ansic: 46,607; cpp: 2,195; objc: 1,038; makefile: 284; sh: 6
file content (16 lines) | stat: -rw-r--r-- 416 bytes parent folder | download | duplicates (3)
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);