]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove the unused relay_msg_set function
authorNick Mathewson <nickm@torproject.org>
Fri, 18 Apr 2025 01:19:34 +0000 (21:19 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 5 May 2025 17:07:37 +0000 (13:07 -0400)
src/core/or/relay_msg.c
src/core/or/relay_msg.h

index 458331f63469512cc28d0dc76f8244032c4f38b2..0684fd3166404ef73fb92b9155eee826de21c711 100644 (file)
@@ -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
index ab99e11d6955af82da29a9c0c5be97d11d6d5a29..413f876310ec1e684077114cf5309dc3298aa0e0 100644 (file)
@@ -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,