2022-01-20 18:27:56 +00:00
|
|
|
// This file Copyright © 2009-2010 Juliusz Chroboczek.
|
|
|
|
// It may be used under the MIT (SPDX: MIT) license.
|
|
|
|
// License text can be found in the licenses/ folder.
|
2009-05-19 18:38:26 +00:00
|
|
|
|
2017-11-14 20:21:28 +00:00
|
|
|
#pragma once
|
|
|
|
|
2009-12-15 00:51:39 +00:00
|
|
|
#ifndef __TRANSMISSION__
|
2017-04-19 12:04:45 +00:00
|
|
|
#error only libtransmission should #include this header.
|
2009-12-15 00:51:39 +00:00
|
|
|
#endif
|
|
|
|
|
2022-10-02 18:18:23 +00:00
|
|
|
#include <string_view>
|
2022-09-29 14:12:33 +00:00
|
|
|
|
2022-04-25 01:49:52 +00:00
|
|
|
#include "transmission.h"
|
|
|
|
|
2022-07-09 23:44:20 +00:00
|
|
|
#include "net.h" // tr_port
|
2022-04-25 01:49:52 +00:00
|
|
|
|
2022-10-02 18:18:23 +00:00
|
|
|
int tr_dhtInit(tr_session*, tr_socket_t udp4_socket, tr_socket_t udp6_socket);
|
|
|
|
void tr_dhtUninit();
|
|
|
|
|
|
|
|
bool tr_dhtEnabled();
|
|
|
|
|
|
|
|
bool tr_dhtAddNode(tr_address, tr_port, bool bootstrap);
|
|
|
|
void tr_dhtUpkeep();
|
|
|
|
void tr_dhtCallback(unsigned char* buf, int buflen, struct sockaddr* from, socklen_t fromlen);
|