toxcore/other/bootstrap_node_packets.h
iphydf 5fbcbb6c83
cleanup: Remove uses of strcpy and sprintf.
Use of `strcpy` in these particular cases was safe, but it's hard to
tell and also useless. `strcpy` would effectively need to do another
`strlen` which we already did.

Also removed sprintf, which was also safe in this case but it's easier to
be "obviously safe", especially for static analysers.
2022-01-17 18:25:40 +00:00

21 lines
667 B
C

/* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright © 2016-2018 The TokTok team.
* Copyright © 2015 Tox project.
*/
/*
* Special bootstrap node only packets.
*
* Include it in your bootstrap node and use: bootstrap_set_callbacks() to enable.
*/
#ifndef C_TOXCORE_OTHER_BOOTSTRAP_NODE_PACKETS_H
#define C_TOXCORE_OTHER_BOOTSTRAP_NODE_PACKETS_H
#include "../toxcore/network.h"
#define MAX_MOTD_LENGTH 256 /* I recommend you use a maximum of 96 bytes. The hard maximum is this though. */
int bootstrap_set_callbacks(Networking_Core *net, uint32_t version, const uint8_t *motd, uint16_t motd_length);
#endif // C_TOXCORE_OTHER_BOOTSTRAP_NODE_PACKETS_H