From 8e7316bae43e666a9fa3b99448561af90cbc21b8 Mon Sep 17 00:00:00 2001 From: Taylor Yu Date: Mon, 8 Apr 2019 11:34:12 -0500 Subject: Split reply formatting out of control_fmt.c Split the core reply formatting code out of control_fmt.c into control_proto.c. The remaining code in control_format.c deals with specific subsystems and will eventually move to join those subsystems. --- src/feature/control/control_proto.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/feature/control/control_proto.h (limited to 'src/feature/control/control_proto.h') diff --git a/src/feature/control/control_proto.h b/src/feature/control/control_proto.h new file mode 100644 index 0000000000..5720b22601 --- /dev/null +++ b/src/feature/control/control_proto.h @@ -0,0 +1,24 @@ +/* Copyright (c) 2001 Matej Pfajfar. + * Copyright (c) 2001-2004, Roger Dingledine. + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2019, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +/** + * \file control_proto.h + * \brief Header file for control_proto.c. + **/ + +#ifndef TOR_CONTROL_PROTO_H +#define TOR_CONTROL_PROTO_H + +void connection_write_str_to_buf(const char *s, control_connection_t *conn); +void connection_printf_to_buf(control_connection_t *conn, + const char *format, ...) + CHECK_PRINTF(2,3); + +size_t write_escaped_data(const char *data, size_t len, char **out); +size_t read_escaped_data(const char *data, size_t len, char **out); +void send_control_done(control_connection_t *conn); + +#endif /* !defined(TOR_CONTROL_PROTO_H) */ -- cgit v1.2.3-54-g00ecf