source: trunk/libtransmission/tr-dht.h @ 12918

Last change on this file since 12918 was 12204, checked in by jordan, 11 years ago

(trunk) #4138 "use stdbool.h instead of tr_bool" -- done.

  • Property svn:keywords set to Date Rev Author Id
File size: 1.9 KB
RevLine 
[8433]1/*
[11852]2 * Copyright (c) 2009-2010 by Juliusz Chroboczek
[12096]3 *
[11852]4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
[12096]10 *
[11852]11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
[12096]13 *
[11852]14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
[12096]21 *
[11852]22 * $Id: tr-dht.h 12204 2011-03-22 15:19:54Z jordan $
[12096]23 *
[11852]24 */
[8433]25
[9765]26#ifndef __TRANSMISSION__
27 #error only libtransmission should #include this header.
28#endif
[8433]29
[9765]30enum
31{
32    TR_DHT_STOPPED      = 0,
33    TR_DHT_BROKEN       = 1,
34    TR_DHT_POOR         = 2,
35    TR_DHT_FIREWALLED   = 3,
36    TR_DHT_GOOD         = 4
37};
38
[11654]39int  tr_dhtInit( tr_session * );
[8452]40void tr_dhtUninit( tr_session * );
[12204]41bool tr_dhtEnabled( const tr_session * );
[9549]42tr_port tr_dhtPort ( tr_session * );
43int tr_dhtStatus( tr_session *, int af, int * setme_nodeCount );
[8880]44const char *tr_dhtPrintableStatus(int status);
[12204]45int tr_dhtAddNode( tr_session *, const tr_address *, tr_port, bool bootstrap );
[12181]46void tr_dhtUpkeep( tr_session * );
[11657]47void tr_dhtCallback(unsigned char *buf, int buflen,
48                    struct sockaddr *from, socklen_t fromlen,
49                    void *sv);
Note: See TracBrowser for help on using the repository browser.