Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

if/core/nodes.h File Reference

#include "common.h"
#include "if/core/hosts.h"
#include "lib/host_addr.h"
#include "lib/vendors.h"

Go to the source code of this file.

Data Structures

struct  rnode_info
 Remote node information structure, as gathered through GTKG/23v1. More...
struct  gnet_node_status
struct  gnet_node_info
struct  gnet_node_flags

Defines

#define node_id_eq_func   ((GCompareFunc) node_id_eq)
#define RNODE_RQ_GGEP_DU   0x00000001
 Include GGEP "DU".
#define RNODE_RQ_GGEP_LOC   0x00000002
 Include GGEP "LOC".
#define RNODE_RQ_GGEP_IPV6   0x00000004
 Include GGEP "GTKG.IPV6".
#define RNODE_RQ_GGEP_UA   0x00000008
 Include GGEP "UA".
#define RNODE_RQ_BW_INFO   0x00000010
 Include bandwidth information.
#define RNODE_RQ_DROP_INFO   0x00000020
 Include TX/RX dropped packets.
#define RNODE_RQ_QHIT_INFO   0x00000040
 Include query hit statistics.
#define RNODE_RQ_CPU_INFO   0x00000080
 Include CPU statistics.
#define RNODE_RQ_GGEP_GGEP   0x00000100
 Include "GGEP" known extensions.
#define RNODE_RQ_GGEP_VMSG   0x00000200
 Include "VMSG" known vendor msgs.
#define RNODE_OF_TCP_FW   0x00000001
 Is TCP-firewalled.
#define RNODE_OF_UDP_FW   0x00000002
 Is UDP-firewalled.
#define RNODE_OF_DHT_ACTIVE   0x00000004
 Is an active member of the DHT.
#define RNODE_OF_ANCIENT   0x00000008
 Running an ancient version.
#define RNODE_OF_NTP   0x00000010
 Time synchronized via NTP.
#define RNODE_OF_HEADLESS   0x00000020
 Running headless.
#define RNODE_OF_DHT_PASIVE   0x00000040
 Is a passive member of the DHT.
#define RNODE_OF_UDP   0x00000080
 Allows UDP traffic.
#define RNODE_OF_DNS_NAME   0x00000100
 Advertises public hostname.
#define RNODE_OF_OOB   0x00000200
 Requests OOB in its queries.
#define RNODE_OF_OOB_PROXY   0x00000400
 Can act as OOB proxy for leaves.
#define RNODE_OF_OOB_REPLY   0x00000800
 Can deliver OOB replies.
#define RNODE_OF_UDP_HOLE   0x00001000
 Can punch UDP holes though f/w.
#define RNODE_OF_OFFICIAL   0x00002000
 Is an official build.
#define RNODE_BW_STRICT   0x0001
 No sharing of b/w between pools.
#define RNODE_BW_IP4_TOS   0x0002
 Uses IPv4 TOS.
#define RNODE_BW_UP2UP_BW   0x0004
 High UP to UP bandwidth usage.
#define RNODE_BW_UP2LF_BW   0x0008
 High UP to leaf bandwidth usage.
#define RNODE_BW_OUT_BW   0x0010
 Outgoing b/w saturated.
#define RNODE_O1_BROWSE   (1 << 0)
 Browse host.
#define RNODE_O1_PFSP   (1 << 1)
 Partial File Sharing protocol.
#define RNODE_O1_CHAT   (1 << 2)
 Chat.
#define RNODE_O1_FW2FW   (1 << 3)
 Firewall-to-Firewall transfers.
#define RNODE_O1_PPROXY   (1 << 4)
 Push Proxy.
#define RNODE_O1_WHATSNEW   (1 << 5)
 "What's New?" queries
#define RNODE_O1_THEX   (1 << 6)
 TTH and THEX.
#define RNODE_O1_MAGNET   (1 << 7)
 Magnet URIs.
#define RNODE_O1_UHC   (1 << 8)
 Can act as UHC server.
#define RNODE_O1_TCP_DEFL   (1 << 9)
 TCP stream compression.
#define RNODE_O1_UDP_DEFL   (1 << 10)
 UDP payload compression.
#define RNODE_O1_DYN_QUERY   (1 << 11)
 Dynamic querying.
#define RNODE_O1_ACTV_QUEUE   (1 << 12)
 Active download queuing.
#define RNODE_O1_PASV_QUEUE   (1 << 13)
 Passive download queuing.
#define RNODE_O1_GWC_BOOT   (1 << 14)
 GWC-based bootstrapping.
#define RNODE_O1_UHC_BOOT   (1 << 15)
 UHC-based bootstrapping.
#define RNODE_O1_QHIT_XML   (1 << 16)
 Emits XML meta data in hits.
#define RNODE_O1_TCP_CRAWL   (1 << 17)
 Answers to TCP-based crawling.
#define RNODE_O1_UDP_CRAWL   (1 << 18)
 Answers to UDP-based crawling.
#define RNODE_O1_UP_QRP   (1 << 19)
 Inter-UP QRP tables.
#define RNODE_O1_LARGE_QRT   (1 << 20)
 Large QRT (up to 2 MiSlots.
#define RNODE_O1_CHUNKED   (1 << 21)
 HTTP/1.1 "chunked" transfers.
#define RNODE_O1_RETRY_AFTER   (1 << 22)
 HTTP/1.1 "Retry-After" honoured.
#define RNODE_O1_QUERY_SPEED   (1 << 23)
 Modern "query speed" flags.
#define RNODE_O1_TLS   (1 << 24)
 TLS connections.
#define RNODE_O1_OOB_HITS   (1 << 25)
 OOB hit delivery.
#define RNODE_O1_OOB_PROXY   (1 << 26)
 OOB proxying for leaves.
#define RNODE_O1_BYE   (1 << 27)
 BYE with meaningful messages.
#define RNODE_O1_SWARMING   (1 << 28)
 Download from multiple hosts.
#define RNODE_O1_GGEP   (1 << 29)
 GGEP extensions.
#define RNODE_O1_DL_CE   (1 << 30)
 Content-Encoding nego.
#define RNODE_O1_UL_CE   (1 << 31)
 Content-Encoding nego.
#define RNODE_O2_GUESS   (1 << 0)
 GUESS queries.
#define RNODE_O2_DHT   (1 << 1)
 Gnutella DHT.
#define RNODE_O2_IPv6   (1 << 2)
 IPv6.
#define RNODE_O2_BW_LIMIT   (1 << 3)
 Bandwidth limiting.
#define RNODE_O2_GNET_FC   (1 << 4)
 Gnutella traffic flow-control.
#define RNODE_O2_HOPS_FC   (1 << 5)
 Uses Hops-Flow for flow-control.
#define RNODE_O2_HTTP_HEAD   (1 << 6)
 HTTP "HEAD" requests.
#define RNODE_O2_ALIVE   (1 << 7)
 Alive ping/pongs.
#define RNODE_O2_PONG_CACHE   (1 << 8)
 Pong caching (no ping broadcast).
#define RNODE_O2_DUP_TTL   (1 << 9)
 Forwards dups with higher TTL.
#define RNODE_O2_DYN_HITS   (1 << 10)
 Dynamic query hit throttling.
#define RNODE_O2_LEAF_GUIDE   (1 << 11)
 Leaf-guided querying.
#define RNODE_O2_OOQ_CHUNK   (1 << 12)
 Out-of-Queue small chunk service.
#define GTA_NORMAL_TTL   4
 Regular TTL, for hops-flow.
#define node_add_listener(signal, callback)   CAT3(node_add_,signal,_listener)(callback);
#define node_remove_listener(signal, callback)   CAT3(node_remove_,signal,_listener)(callback);

Typedefs

typedef const struct node_idnode_id_t
typedef rnode_info rnode_info_t
 Remote node information structure, as gathered through GTKG/23v1.
typedef gnet_node_status gnet_node_status_t
typedef gnet_node_info gnet_node_info_t
typedef gnet_node_flags gnet_node_flags_t
typedef void(* node_added_listener_t )(node_id_t)
typedef void(* node_removed_listener_t )(node_id_t)
typedef void(* node_info_changed_listener_t )(node_id_t)
typedef void(* node_flags_changed_listener_t )(node_id_t)

Enumerations

enum  rnode_mode { RNODE_M_AUTO = 0, RNODE_M_LEAF = 1, RNODE_M_ULTRA = 2 }
 Remote node mode, as specified for GTKG/23v1. More...
enum  node_peer_t {
  NODE_P_LEAF = 0, NODE_P_AUTO, NODE_P_ULTRA, NODE_P_NORMAL,
  NODE_P_CRAWLER, NODE_P_UDP, NODE_P_UNKNOWN
}
enum  qrt_state_t {
  QRT_S_NONE = 0, QRT_S_SENDING, QRT_S_SENT, QRT_S_RECEIVING,
  QRT_S_PATCHING, QRT_S_RECEIVED
}
enum  gnet_node_state_t {
  GTA_NODE_CONNECTING = 1, GTA_NODE_HELLO_SENT = 2, GTA_NODE_WELCOME_SENT = 3, GTA_NODE_CONNECTED = 4,
  GTA_NODE_REMOVING = 5, GTA_NODE_RECEIVING_HELLO = 6, GTA_NODE_SHUTDOWN = 7
}

Functions

node_id_t node_id_ref (const node_id_t node_id)
void node_id_unref (const node_id_t node_id)
const gchar * node_id_to_string (const node_id_t node_id)
gboolean node_id_eq (const node_id_t a, const node_id_t b)
guint node_id_hash (gconstpointer node_id)


Define Documentation

#define GTA_NORMAL_TTL   4
 

Regular TTL, for hops-flow.

#define node_add_listener signal,
callback   )     CAT3(node_add_,signal,_listener)(callback);
 

#define node_id_eq_func   ((GCompareFunc) node_id_eq)
 

#define node_remove_listener signal,
callback   )     CAT3(node_remove_,signal,_listener)(callback);
 

#define RNODE_BW_IP4_TOS   0x0002
 

Uses IPv4 TOS.

#define RNODE_BW_OUT_BW   0x0010
 

Outgoing b/w saturated.

#define RNODE_BW_STRICT   0x0001
 

No sharing of b/w between pools.

#define RNODE_BW_UP2LF_BW   0x0008
 

High UP to leaf bandwidth usage.

#define RNODE_BW_UP2UP_BW   0x0004
 

High UP to UP bandwidth usage.

#define RNODE_O1_ACTV_QUEUE   (1 << 12)
 

Active download queuing.

#define RNODE_O1_BROWSE   (1 << 0)
 

Browse host.

#define RNODE_O1_BYE   (1 << 27)
 

BYE with meaningful messages.

#define RNODE_O1_CHAT   (1 << 2)
 

Chat.

#define RNODE_O1_CHUNKED   (1 << 21)
 

HTTP/1.1 "chunked" transfers.

#define RNODE_O1_DL_CE   (1 << 30)
 

Content-Encoding nego.

for d/l

#define RNODE_O1_DYN_QUERY   (1 << 11)
 

Dynamic querying.

#define RNODE_O1_FW2FW   (1 << 3)
 

Firewall-to-Firewall transfers.

#define RNODE_O1_GGEP   (1 << 29)
 

GGEP extensions.

#define RNODE_O1_GWC_BOOT   (1 << 14)
 

GWC-based bootstrapping.

#define RNODE_O1_LARGE_QRT   (1 << 20)
 

Large QRT (up to 2 MiSlots.

#define RNODE_O1_MAGNET   (1 << 7)
 

Magnet URIs.

#define RNODE_O1_OOB_HITS   (1 << 25)
 

OOB hit delivery.

#define RNODE_O1_OOB_PROXY   (1 << 26)
 

OOB proxying for leaves.

#define RNODE_O1_PASV_QUEUE   (1 << 13)
 

Passive download queuing.

#define RNODE_O1_PFSP   (1 << 1)
 

Partial File Sharing protocol.

#define RNODE_O1_PPROXY   (1 << 4)
 

Push Proxy.

#define RNODE_O1_QHIT_XML   (1 << 16)
 

Emits XML meta data in hits.

#define RNODE_O1_QUERY_SPEED   (1 << 23)
 

Modern "query speed" flags.

#define RNODE_O1_RETRY_AFTER   (1 << 22)
 

HTTP/1.1 "Retry-After" honoured.

#define RNODE_O1_SWARMING   (1 << 28)
 

Download from multiple hosts.

#define RNODE_O1_TCP_CRAWL   (1 << 17)
 

Answers to TCP-based crawling.

#define RNODE_O1_TCP_DEFL   (1 << 9)
 

TCP stream compression.

#define RNODE_O1_THEX   (1 << 6)
 

TTH and THEX.

#define RNODE_O1_TLS   (1 << 24)
 

TLS connections.

#define RNODE_O1_UDP_CRAWL   (1 << 18)
 

Answers to UDP-based crawling.

#define RNODE_O1_UDP_DEFL   (1 << 10)
 

UDP payload compression.

#define RNODE_O1_UHC   (1 << 8)
 

Can act as UHC server.

#define RNODE_O1_UHC_BOOT   (1 << 15)
 

UHC-based bootstrapping.

#define RNODE_O1_UL_CE   (1 << 31)
 

Content-Encoding nego.

for u/l

#define RNODE_O1_UP_QRP   (1 << 19)
 

Inter-UP QRP tables.

#define RNODE_O1_WHATSNEW   (1 << 5)
 

"What's New?" queries

#define RNODE_O2_ALIVE   (1 << 7)
 

Alive ping/pongs.

#define RNODE_O2_BW_LIMIT   (1 << 3)
 

Bandwidth limiting.

#define RNODE_O2_DHT   (1 << 1)
 

Gnutella DHT.

#define RNODE_O2_DUP_TTL   (1 << 9)
 

Forwards dups with higher TTL.

#define RNODE_O2_DYN_HITS   (1 << 10)
 

Dynamic query hit throttling.

#define RNODE_O2_GNET_FC   (1 << 4)
 

Gnutella traffic flow-control.

#define RNODE_O2_GUESS   (1 << 0)
 

GUESS queries.

#define RNODE_O2_HOPS_FC   (1 << 5)
 

Uses Hops-Flow for flow-control.

#define RNODE_O2_HTTP_HEAD   (1 << 6)
 

HTTP "HEAD" requests.

#define RNODE_O2_IPv6   (1 << 2)
 

IPv6.

#define RNODE_O2_LEAF_GUIDE   (1 << 11)
 

Leaf-guided querying.

#define RNODE_O2_OOQ_CHUNK   (1 << 12)
 

Out-of-Queue small chunk service.

#define RNODE_O2_PONG_CACHE   (1 << 8)
 

Pong caching (no ping broadcast).

#define RNODE_OF_ANCIENT   0x00000008
 

Running an ancient version.

#define RNODE_OF_DHT_ACTIVE   0x00000004
 

Is an active member of the DHT.

#define RNODE_OF_DHT_PASIVE   0x00000040
 

Is a passive member of the DHT.

#define RNODE_OF_DNS_NAME   0x00000100
 

Advertises public hostname.

#define RNODE_OF_HEADLESS   0x00000020
 

Running headless.

#define RNODE_OF_NTP   0x00000010
 

Time synchronized via NTP.

#define RNODE_OF_OFFICIAL   0x00002000
 

Is an official build.

#define RNODE_OF_OOB   0x00000200
 

Requests OOB in its queries.

#define RNODE_OF_OOB_PROXY   0x00000400
 

Can act as OOB proxy for leaves.

#define RNODE_OF_OOB_REPLY   0x00000800
 

Can deliver OOB replies.

#define RNODE_OF_TCP_FW   0x00000001
 

Is TCP-firewalled.

#define RNODE_OF_UDP   0x00000080
 

Allows UDP traffic.

#define RNODE_OF_UDP_FW   0x00000002
 

Is UDP-firewalled.

#define RNODE_OF_UDP_HOLE   0x00001000
 

Can punch UDP holes though f/w.

#define RNODE_RQ_BW_INFO   0x00000010
 

Include bandwidth information.

#define RNODE_RQ_CPU_INFO   0x00000080
 

Include CPU statistics.

#define RNODE_RQ_DROP_INFO   0x00000020
 

Include TX/RX dropped packets.

#define RNODE_RQ_GGEP_DU   0x00000001
 

Include GGEP "DU".

#define RNODE_RQ_GGEP_GGEP   0x00000100
 

Include "GGEP" known extensions.

#define RNODE_RQ_GGEP_IPV6   0x00000004
 

Include GGEP "GTKG.IPV6".

#define RNODE_RQ_GGEP_LOC   0x00000002
 

Include GGEP "LOC".

#define RNODE_RQ_GGEP_UA   0x00000008
 

Include GGEP "UA".

#define RNODE_RQ_GGEP_VMSG   0x00000200
 

Include "VMSG" known vendor msgs.

#define RNODE_RQ_QHIT_INFO   0x00000040
 

Include query hit statistics.


Typedef Documentation

typedef struct gnet_node_flags gnet_node_flags_t
 

typedef struct gnet_node_info gnet_node_info_t
 

typedef struct gnet_node_status gnet_node_status_t
 

typedef void(* node_added_listener_t)(node_id_t)
 

typedef void(* node_flags_changed_listener_t)(node_id_t)
 

typedef const struct node_id* node_id_t
 

typedef void(* node_info_changed_listener_t)(node_id_t)
 

typedef void(* node_removed_listener_t)(node_id_t)
 

typedef struct rnode_info rnode_info_t
 

Remote node information structure, as gathered through GTKG/23v1.


Enumeration Type Documentation

enum gnet_node_state_t
 

Enumeration values:
GTA_NODE_CONNECTING  Making outgoing connection.
GTA_NODE_HELLO_SENT  Sent 0.4 hello.
GTA_NODE_WELCOME_SENT  Hello accepted, remote welcomed.
GTA_NODE_CONNECTED  Connected at the Gnet level.
GTA_NODE_REMOVING  Removing node.
GTA_NODE_RECEIVING_HELLO  Receiving 0.6 headers.
GTA_NODE_SHUTDOWN  Connection being shutdown.

enum node_peer_t
 

Enumeration values:
NODE_P_LEAF  Leaf node.
NODE_P_AUTO  Automatic mode.
NODE_P_ULTRA  Ultra node.
NODE_P_NORMAL  Normal legacy node.
NODE_P_CRAWLER  Crawler node.
NODE_P_UDP  UDP "fake" node.
NODE_P_UNKNOWN  Unknown mode yet.

enum qrt_state_t
 

Enumeration values:
QRT_S_NONE  Nothing.
QRT_S_SENDING  Sending QRT to ultrapeer.
QRT_S_SENT  Sent QRT to ultrapeer.
QRT_S_RECEIVING  Receiving initial QRT from leaf.
QRT_S_PATCHING  Receiving QRT patch from leaf.
QRT_S_RECEIVED  Received QRT from leaf.

enum rnode_mode
 

Remote node mode, as specified for GTKG/23v1.

Enumeration values:
RNODE_M_AUTO 
RNODE_M_LEAF 
RNODE_M_ULTRA 


Function Documentation

gboolean node_id_eq const node_id_t  a,
const node_id_t  b
 

guint node_id_hash gconstpointer  node_id  ) 
 

node_id_t node_id_ref const node_id_t  node_id  ) 
 

const gchar* node_id_to_string const node_id_t  node_id  ) 
 

void node_id_unref const node_id_t  node_id  ) 
 


Generated on Sat Jun 30 17:53:29 2007 for gtk-gnutella by  doxygen 1.3.9.1