tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit e699121b9f6cda01dc2941d40e0dd3c06fc942f7
parent 120305c7f3a9a5103e103fa557221bff2a8082b8
Author: Nick Mathewson <nickm@torproject.org>
Date:   Thu, 17 Apr 2025 21:19:34 -0400

Remove the unused relay_msg_set function

Diffstat:
Msrc/core/or/relay_msg.c | 19-------------------
Msrc/core/or/relay_msg.h | 3---
2 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/src/core/or/relay_msg.c b/src/core/or/relay_msg.c @@ -75,25 +75,6 @@ relay_msg_copy(const relay_msg_t *msg) return new_msg; } -/** Set a relay message data into the given message. Useful for stack allocated - * messages. - * - * Note that the resulting relay_msg will have a reference to - * 'payload', which must not be changed while this message is in use. - **/ -void -relay_msg_set(const uint8_t relay_cell_proto, const uint8_t cmd, - const streamid_t stream_id, const uint8_t *payload, - const uint16_t payload_len, relay_msg_t *msg) -{ - (void) relay_cell_proto; - msg->command = cmd; - msg->stream_id = stream_id; - - msg->length = payload_len; - msg->body = payload; -} - /* Add random bytes to the unused portion of the payload, to foil attacks * where the other side can predict all of the bytes in the payload and thus * compute the authenticated SENDME cells without seeing the traffic. See diff --git a/src/core/or/relay_msg.h b/src/core/or/relay_msg.h @@ -17,9 +17,6 @@ void relay_msg_free_(relay_msg_t *msg); void relay_msg_clear(relay_msg_t *msg); relay_msg_t *relay_msg_copy(const relay_msg_t *msg); -void relay_msg_set(const uint8_t relay_cell_proto, const uint8_t cmd, - const streamid_t streamd_id, const uint8_t *payload, - const uint16_t payload_len, relay_msg_t *msg); int relay_msg_encode_cell(relay_cell_fmt_t format, const relay_msg_t *msg,