|
Data Structures |
| struct | node_bad_client |
| struct | node_id |
| struct | node_add_by_name_data |
| struct | dump_header |
Defines |
| #define | CONNECT_PONGS_COUNT 10 |
| | Amoung of pongs to send.
|
| #define | CONNECT_PONGS_LOW 5 |
| | Amoung of pongs sent if saturated.
|
| #define | BYE_MAX_SIZE 4096 |
| | Maximum size for the Bye message.
|
| #define | NODE_SEND_BUFSIZE 4096 |
| | TCP send buffer size - 4K.
|
| #define | NODE_SEND_LEAF_BUFSIZE 1024 |
| | TCP send buffer size for leaves.
|
| #define | MAX_GGEP_PAYLOAD 1536 |
| | In ping, pong, push.
|
| #define | MAX_HOP_COUNT 255 |
| | Architecturally defined maximum.
|
| #define | NODE_LEGACY_DEGREE 8 |
| | Older node without X-Degree.
|
| #define | NODE_LEGACY_TTL 7 |
| | Older node without X-Max-TTL.
|
| #define | NODE_USELESS_GRACE 20 |
| | No kick if condition too recent.
|
| #define | NODE_UP_USELESS_GRACE 600 |
| | No kick if condition too recent.
|
| #define | SHUTDOWN_GRACE_DELAY 120 |
| | Grace time for shutdowning nodes.
|
| #define | BYE_GRACE_DELAY 30 |
| | Bye sent, give time to propagate.
|
| #define | MAX_WEIRD_MSG 5 |
| | End link after so much weirds.
|
| #define | MAX_TX_RX_RATIO 70 |
| | Max TX/RX ratio for shortage.
|
| #define | MIN_TX_FOR_RATIO 500 |
| | TX packets before enforcing ratio.
|
| #define | ALIVE_PERIOD 20 |
| | Seconds between each alive ping.
|
| #define | ALIVE_PERIOD_LEAF 120 |
| | Idem, for leaves <-> ultrapeers.
|
| #define | ALIVE_MAX_PENDING 6 |
| | Max unanswered pings in a row.
|
| #define | ALIVE_MAX_PENDING_LEAF 4 |
| | Max unanswered pings in a row (leaves).
|
| #define | NODE_MIN_UP_CONNECTIONS 25 |
| | Min 25 peer connections for UP.
|
| #define | NODE_MIN_UPTIME 3600 |
| | Minumum uptime to become an UP.
|
| #define | NODE_MIN_AVG_UPTIME 10800 |
| | Average uptime to become an UP.
|
| #define | NODE_AVG_LEAF_MEM 262144 |
| | Average memory used by leaf.
|
| #define | NODE_CASUAL_FD 10 |
| | # of fds we might use casually
|
| #define | NODE_UPLOAD_QUEUE_FD 5 |
| | # of fds/upload slot we can queue
|
| #define | NODE_TX_BUFSIZ 1024 |
| | Buffer size for TX deflation.
|
| #define | NODE_TX_FLUSH 16384 |
| | Flush deflator every 16K.
|
| #define | NODE_AUTO_SWITCH_MIN 1800 |
| | Don't switch too often UP - leaf.
|
| #define | NODE_AUTO_SWITCH_MAX 61200 |
| | Max between switches (17 hours).
|
| #define | NODE_UP_NO_LEAF_MAX 3600 |
| | Don't remain UP if no leaves.
|
| #define | NODE_TSYNC_WAIT_MS 5000 |
| | Wait time after connecting (5s).
|
| #define | NODE_TSYNC_PERIOD_MS 300000 |
| | Synchronize every 5 minutes.
|
| #define | NODE_TSYNC_CHECK 15 |
| | 15 secs before a timeout
|
| #define | TCP_CRAWLER_FREQ 300 |
| | once every 5 minutes
|
| #define | UDP_CRAWLER_FREQ 120 |
| | once every 2 minutes
|
| #define | NO_METADATA GUINT_TO_POINTER(1) |
| | No metadata for host.
|
| #define | OK(b) ((b) ? ok : no) |
Typedefs |
| typedef node_bad_client | node_bad_client_t |
Enumerations |
| enum | node_bad { NODE_BAD_OK = 0,
NODE_BAD_IP,
NODE_BAD_VENDOR,
NODE_BAD_NO_VENDOR
} |
| | Types of bad nodes for node_is_bad(). More...
|
| enum | dump_header_flags {
DH_F_UDP = (1 << 0),
DH_F_TCP = (1 << 1),
DH_F_IPV4 = (1 << 2),
DH_F_IPV6 = (1 << 3),
NUM_DH_F
} |
Functions |
| void | node_disable_read (struct gnutella_node *n) |
| | Disable reading callback.
|
| gboolean | node_data_ind (rxdrv_t *rx, pmsg_t *mb) |
| | RX data indication callback used to give us some new Gnet traffic in a low-level message structure (which can contain several Gnet messages).
|
| void | node_bye_sent (struct gnutella_node *n) |
| | Called when the Bye message has been successfully sent.
|
| void | call_node_process_handshake_ack (gpointer obj, header_t *header) |
| void | node_send_qrt (struct gnutella_node *n, struct routing_table *query_table) |
| | Initiate sending of the query routing table.
|
| void | node_send_patch_step (struct gnutella_node *n) |
| | Incrementally send the routing table patch to our Ultrapeer.
|
| void | node_bye_flags (guint32 mask, gint code, const gchar *message) |
| | Send a BYE message to all the nodes matching the specified flags.
|
| void | node_bye_all_but_one (struct gnutella_node *nskip, gint code, const gchar *message) |
| | Send a BYE message to all the nodes but the one supplied as argument.
|
| void | node_set_current_peermode (node_peer_t mode) |
| | Called from the node timer when the current peermode has changed.
|
| enum node_bad | node_is_bad (struct gnutella_node *n) |
| | Check whether node has been identified as having a bad IP or vendor string.
|
| gnutella_node_t * | node_udp_create (enum net_type net) |
| | Create a "fake" node that is used as a placeholder when processing Gnutella messages received from UDP.
|
| gnutella_node_t * | node_browse_create (void) |
| | Create a "fake" node that is used as a placeholder when processing Gnutella messages received via host browsing.
|
| gboolean | node_remove_useless_leaf (gboolean *is_gtkg) |
| | Try to spot a "useless" leaf node.
|
| gboolean | node_remove_useless_ultra (gboolean *is_gtkg) |
| | Try to spot a "useless" ultra node.
|
| void | node_add_node_added_listener (node_added_listener_t l) |
| void | node_remove_node_added_listener (node_added_listener_t l) |
| void | node_add_node_removed_listener (node_removed_listener_t l) |
| void | node_remove_node_removed_listener (node_removed_listener_t l) |
| void | node_add_node_info_changed_listener (node_info_changed_listener_t l) |
| void | node_remove_node_info_changed_listener (node_info_changed_listener_t l) |
| void | node_add_node_flags_changed_listener (node_flags_changed_listener_t l) |
| void | node_remove_node_flags_changed_listener (node_flags_changed_listener_t l) |
| void | node_fire_node_added (gnutella_node_t *n) |
| void | node_fire_node_removed (gnutella_node_t *n) |
| void | node_fire_node_info_changed (gnutella_node_t *n) |
| void | node_fire_node_flags_changed (gnutella_node_t *n) |
| void | free_key (gpointer key, gpointer unused_val, gpointer unused_x) |
| | Free atom string key from hash table.
|
| gboolean | free_key_true (gpointer key, gpointer unused_val, gpointer unused_x) |
| | Free atom string key from hash table and return TRUE.
|
| void | string_table_clear (GHashTable *ht) |
| | Clear hash table whose keys are atoms and values ignored.
|
| void | string_table_free (GHashTable **ht_ptr) |
| | Dispose of hash table whose keys are atoms and values ignored.
|
| void | node_send_udp_ping (struct gnutella_node *n) |
| | Sends a PING to the node over UDP (if enabled).
|
| void | node_tsync_udp (cqueue_t *unused_cq, gpointer obj) |
| | Send "Time Sync" via UDP if we know the remote IP:port, via TCP otherwise.
|
| void | node_can_tsync (gnutella_node_t *n) |
| | Invoked when we determined that the node supports Time Sync.
|
| void | node_tsync_tcp (gnutella_node_t *n) |
| | Sent "probe" time sync via TCP to the specified node to compute the RTT...
|
| gboolean | node_ht_connected_nodes_has (const host_addr_t addr, guint16 port) |
| | Check whether we already have the host.
|
| gnet_host_t * | node_ht_connected_nodes_find (const host_addr_t addr, guint16 port) |
| | Check whether we already have the host.
|
| void | node_ht_connected_nodes_add (const host_addr_t addr, guint16 port) |
| | Add host to the hash table host cache.
|
| void | node_ht_connected_nodes_remove (const host_addr_t addr, guint16 port) |
| | Remove host from the hash table host cache.
|
| void | message_dump (const struct gnutella_node *n) |
| | Dumps a gnutella message (debug).
|
| gboolean | node_is_gtkg (const struct gnutella_node *n) |
| | Check whether node is a gtk-gnutella node.
|
| void | node_extract_host (const struct gnutella_node *n, host_addr_t *ha, guint16 *port) |
| | Extract IP/port information out of the Query Hit into `ip' and `port'.
|
| gboolean | can_become_ultra (time_t now) |
| | Check the Ultrapeer requirements, returning TRUE if we can become an UP.
|
| void | node_slow_timer (time_t now) |
| | Low frequency node timer.
|
| void | node_error_cleanup (void) |
| void | node_timer (time_t now) |
| | Periodic node heartbeat timer.
|
| guint64 | node_id_value (const node_id_t node_id) |
| gboolean | node_id_self (const node_id_t node_id) |
| node_id_t | node_id_get_self (void) |
| guint | node_id_hash (gconstpointer key) |
| gboolean | node_id_eq (const node_id_t p, const node_id_t q) |
| const gchar * | node_id_to_string (const node_id_t node_id) |
| node_id_t | node_id_ref (const node_id_t node_id) |
| void | node_id_unref (const node_id_t node_id) |
| node_id_t | node_id_new (const struct gnutella_node *n) |
| void | node_init (void) |
| | Network init.
|
| void | node_set_socket_rx_size (gint rx_size) |
| | Change the socket RX buffer size for all the currently connected nodes.
|
| guint | connected_nodes (void) |
| guint | node_count (void) |
| guint | node_keep_missing (void) |
| | Amount of node connections we would like to keep.
|
| guint | node_missing (void) |
| | Amount of node connections we would like to have.
|
| guint | node_leaves_missing (void) |
| | Amount of leaves we're missing (0 if not in ultra mode).
|
| guint | node_outdegree (void) |
| void | get_protocol_version (const gchar *handshake, guint *major, guint *minor) |
| | Parse the first handshake line to determine the protocol version.
|
| void | node_type_count_dec (struct gnutella_node *n) |
| | Decrement the proper node count property, depending on the peermode.
|
| gnutella_node * | node_alloc (void) |
| void | node_real_remove (gnutella_node_t *n) |
| | Physically dispose of node.
|
| | G_GNUC_PRINTF (2, 0) |
| | The vectorized (message-wise) version of node_remove().
|
| void | node_recursive_shutdown_v (struct gnutella_node *n, const gchar *where, const gchar *reason, va_list ap) |
| | Called when node_bye() or node_shutdown() is called during the time we're in shutdown mode, processing the messages we might still read from the socket.
|
| void | node_remove_by_id (const node_id_t node_id) |
| | Removes or shuts down the given node.
|
| void | node_mark_bad_vendor (struct gnutella_node *n) |
| | Gives a specific vendor a bad mark.
|
| gboolean | node_avoid_monopoly (struct gnutella_node *n) |
| | Make sure that the vendor of the connecting node does not already use more than "unique_nodes" percent of the slots of its kind.
|
| gboolean | node_reserve_slot (struct gnutella_node *n) |
| | When we only have "reserve_gtkg_nodes" percent slots left, make sure the connecting node is a GTKG node or refuse the connection.
|
| void | node_remove (struct gnutella_node *n, const gchar *reason,...) |
| | Terminate connection with remote node, but keep structure around for a while, for displaying purposes, and also to prevent the node from being physically reclaimed within this stack frame.
|
| guint | node_remove_by_addr (const host_addr_t addr, guint16 port) |
| | Determine if the node with specified IP and port is connected.
|
| void | node_eof_v (struct gnutella_node *n, const gchar *reason, va_list args) |
| | The vectorized version of node_eof().
|
| void | node_eof (struct gnutella_node *n, const gchar *reason,...) |
| | Got an EOF condition, or a read error, whilst reading Gnet data from node.
|
| void | node_shutdown_mode (struct gnutella_node *n, guint32 delay) |
| | Enter shutdown mode: prevent further writes, drop read broadcasted messages, and make sure we flush the buffers at the fastest possible speed.
|
| void | node_shutdown_v (struct gnutella_node *n, const gchar *reason, va_list args) |
| | The vectorized version of node_shutdown().
|
| void | node_shutdown (struct gnutella_node *n, const gchar *reason,...) |
| | Stop sending data to node, but keep reading buffered data from it, until we hit a Bye packet or EOF.
|
| void | node_bye_v (struct gnutella_node *n, gint code, const gchar *reason, va_list ap) |
| | The vectorized version of node_bye().
|
| void | node_bye (gnutella_node_t *n, gint code, const gchar *reason,...) |
| | Terminate connection by sending a bye message to the remote node.
|
| void | node_bye_if_writable (struct gnutella_node *n, gint code, const gchar *reason,...) |
| | If node is writable, act as if node_bye() had been called.
|
| gboolean | node_is_connected (const host_addr_t addr, guint16 port, gboolean incoming) |
| | Is there a node connected with this IP/port?
|
| gboolean | node_host_is_connected (const host_addr_t addr, guint16 port) |
| | Are we directly connected to that host?
|
| const gchar * | formatted_connection_pongs (const gchar *field, host_type_t htype, gint num) |
| | Build CONNECT_PONGS_COUNT pongs to emit as an X-Try header.
|
| gint | node_gtkg_cmp (const void *np1, const void *np2) |
| | qsort() callback for sorting GTKG nodes at the front.
|
| gboolean | node_inflate_payload (gnutella_node_t *n) |
| | Inflate UDP payload, updating node internal data structures to reflect the new payload size..
|
| gchar * | node_crawler_headers (struct gnutella_node *n) |
| | Generate the "Peers:" and "Leaves:" headers in a static buffer.
|
| void | send_error (struct gnutella_socket *s, struct gnutella_node *n, int code, const gchar *msg, va_list ap) |
| | Send error message to remote end, a node presumably.
|
| void | send_node_error (struct gnutella_socket *s, int code, const gchar *msg,...) |
| | Send error message to remote end, a node presumably.
|
| void | node_send_error (struct gnutella_node *n, int code, const gchar *msg,...) |
| | Send error message to remote node.
|
| void | send_proxy_request (gnutella_node_t *n) |
| | Request that node becomes our push-proxy.
|
| void | node_became_firewalled (void) |
| | Called when we were not firewalled and suddenly become firewalled.
|
| void | node_became_udp_firewalled (void) |
| | Called when we were not firewalled and suddenly become UDP firewalled.
|
| void | node_add_tx_deflated (gpointer o, gint amount) |
| void | node_tx_shutdown (gpointer o, const gchar *reason,...) |
| void | node_add_tx_written (gpointer o, gint amount) |
| void | node_tx_eof_remove (gpointer o, const gchar *reason,...) |
| void | node_tx_eof_shutdown (gpointer o, const gchar *reason,...) |
| void | node_tx_unflushq (gpointer o) |
| void | node_add_rx_inflated (gpointer o, gint amount) |
| void | node_rx_inflate_error (gpointer o, const gchar *reason,...) |
| void | node_add_rx_given (gpointer o, ssize_t amount) |
| void | node_rx_read_error (gpointer o, const gchar *reason,...) |
| void | node_rx_got_eof (gpointer o) |
| void | node_is_now_connected (struct gnutella_node *n) |
| | Called when we know that we're connected to the node, at the end of the handshaking (both for incoming and outgoing connections).
|
| void | node_got_bye (struct gnutella_node *n) |
| | Received a Bye message from remote node.
|
| void | node_set_online_mode (gboolean on) |
| | Whether they want to be "online" within Gnutella or not.
|
| void | node_current_peermode_changed (node_peer_t mode) |
| | Called from the property system when current peermode is changed.
|
| guint | feed_host_cache_from_string (const gchar *s, host_type_t type, const gchar *name) |
| guint | feed_host_cache_from_headers (header_t *header, host_type_t sender, gboolean gnet, const host_addr_t peer) |
| | Extract host:port information out of a header field and add those to our pong cache.
|
| void | extract_header_pongs (header_t *header, struct gnutella_node *n) |
| | Extract the header pongs from the header (X-Try lines).
|
| host_addr_t | extract_my_addr (header_t *header) |
| | Try to determine whether headers contain an indication of our own IP.
|
| void | node_check_remote_ip_header (const host_addr_t peer, header_t *head) |
| | Checks for a Remote-IP or X-Remote-IP header and updates our IP address if the current IP address is not enforced.
|
| gboolean | analyse_status (struct gnutella_node *n, gint *code) |
| | Analyses status lines we get from incoming handshakes (final ACK) or outgoing handshakes (inital REPLY, after our HELLO).
|
| gboolean | node_can_accept_connection (struct gnutella_node *n, gboolean handshaking) |
| | Can node accept connection?
|
| gboolean | node_can_accept_protocol (struct gnutella_node *n, header_t *head) |
| | Check whether we can accept a servent supporting a foreign protocol.
|
| void | node_process_handshake_ack (struct gnutella_node *n, header_t *head) |
| | This routine is called to process the whole 0.6+ final handshake header acknowledgement we get back after welcoming an incoming node.
|
| const gchar * | node_query_routing_header (struct gnutella_node *n) |
| void | node_process_handshake_header (struct gnutella_node *n, header_t *head) |
| | This routine is called to process a 0.6+ handshake header.
|
| gnutella_node * | cast_to_node (gpointer p) |
| void | err_line_too_long (gpointer obj) |
| void | err_header_error_tell (gpointer obj, gint error) |
| void | err_header_error (gpointer obj, gint error) |
| void | err_input_exception (gpointer obj) |
| void | err_input_buffer_full (gpointer obj) |
| void | err_header_read_error (gpointer obj, gint error) |
| void | err_header_read_eof (gpointer obj) |
| void | err_header_extra_data (gpointer obj) |
| void | call_node_process_handshake_header (gpointer obj, header_t *header) |
| gnutella_node_t * | node_browse_prepare (gnet_host_t *host, const gchar *vendor, gnutella_header_t *header, gchar *data, guint32 size) |
| | Let the "browse host" node hold the supplied Gnutella message as if coming from the host and from a servent with the supplied vendor string.
|
| void | node_browse_cleanup (gnutella_node_t *n) |
| | Cleanup the "browse host" node.
|
| void | node_udp_enable_by_net (enum net_type net) |
| | Enable UDP transmission via pseudo node.
|
| void | node_udp_disable_by_net (enum net_type net) |
| | Disable UDP transmission via pseudo node.
|
| void | node_udp_enable (void) |
| void | node_udp_disable (void) |
| gnutella_node_t * | node_udp_get (struct gnutella_socket *s) |
| | Get "fake" node after reception of a datagram and return its address.
|
| mqueue_t * | node_udp_get_outq (enum net_type net) |
| | Get the message queue attached to the UDP node.
|
| gnutella_node_t * | node_udp_get_addr_port (const host_addr_t addr, guint16 port) |
| | Get "fake" node for UDP transmission.
|
| void | node_add (const host_addr_t addr, guint16 port, guint32 flags) |
| | Add new node.
|
| void | node_add_by_name_helper (const host_addr_t *addrs, size_t n, gpointer user_data) |
| | Called when we got a reply from the ADNS process.
|
| void | node_add_by_name (const gchar *host, guint16 port, guint32 flags) |
| | Add new node by hostname.
|
| void | node_add_socket (struct gnutella_socket *s, const host_addr_t addr, guint16 port, guint32 flags) |
| | Add new node, to which we possibly have an existing connection if the socket is not NULL (incoming connection).
|
| gboolean | node_check_ggep (struct gnutella_node *n, gint maxsize, gint regsize) |
| | Check that current message has an extra payload made of GGEP only, and whose total size is not exceeding `maxsize'.
|
| void | dump_header_set (struct dump_header *dh, const struct gnutella_node *node) |
| void | node_dump_disable (void) |
| void | node_dump_init (void) |
| void | node_dump_append (const void *data, size_t size) |
| void | node_dump_packet (const struct gnutella_node *node) |
| void | node_parse (struct gnutella_node *node) |
| | Processing of messages.
|
| void | node_drain_hello (gpointer data, gint source, inputevt_cond_t cond) |
| void | node_udp_process (struct gnutella_socket *s) |
| | Process incoming Gnutella datagram.
|
| void | node_init_outgoing (struct gnutella_node *n) |
| | Called when asynchronous connection to an outgoing node is established.
|
| void | node_flushq (struct gnutella_node *n) |
| | Called by queue when it's not empty and it went through the service routine and yet has more data enqueued.
|
| void | node_unflushq (struct gnutella_node *n) |
| | Called by queue to disable the flush mode.
|
| void | node_tx_service (struct gnutella_node *n, gboolean unused_on) |
| | Called when the queue service routine is switched ON/OFF.
|
| void | node_tx_enter_warnzone (struct gnutella_node *n) |
| | Called by message queue when the node enters the warn zone.
|
| void | node_tx_leave_warnzone (struct gnutella_node *n) |
| | Called by message queue when the node leaves the warn zone.
|
| void | node_tx_enter_flowc (struct gnutella_node *n) |
| | Called by message queue when the node enters TX flow control.
|
| void | node_tx_leave_flowc (struct gnutella_node *n) |
| | Called by message queue when the node leaves TX flow control.
|
| void | node_tx_swift_changed (struct gnutella_node *n) |
| | Called by message queue when swift mode changes.
|
| gboolean | node_read (struct gnutella_node *n, pmsg_t *mb) |
| | Read data from the message buffer we just received.
|
| void | node_sent_ttl0 (struct gnutella_node *n) |
| | Called when a node sends a message with TTL=0.
|
| void | node_bye_all (void) |
| | Send a BYE message to all the nodes.
|
| gboolean | node_bye_pending (void) |
| gboolean | node_remove_worst (gboolean non_local) |
| | Removes the node with the worst stats, considering the number of weird, bad and duplicate packets.
|
| void | node_qrt_discard (struct gnutella_node *n) |
| | Invoked when remote sends us a RESET message, making the existing routing table obsolete.
|
| void | node_qrt_install (struct gnutella_node *n, struct routing_table *query_table) |
| | Invoked for ultra nodes to install new Query Routing Table.
|
| void | node_qrt_patched (struct gnutella_node *n, struct routing_table *query_table) |
| | Invoked for ultra nodes when the Query Routing Table of remote node was fully patched (i.e.
|
| void | node_qrt_changed (struct routing_table *query_table) |
| | Invoked for nodes when our Query Routing Table changed.
|
| void | node_close (void) |
| | Final cleanup when application terminates.
|
| void | node_add_sent (gnutella_node_t *n, gint x) |
| void | node_add_txdrop (gnutella_node_t *n, gint x) |
| void | node_add_rxdrop (gnutella_node_t *n, gint x) |
| gnutella_node * | node_by_guid (const gchar *guid) |
| gboolean | node_set_guid (struct gnutella_node *n, const gchar *guid) |
| | Set the GUID of a connected node.
|
| void | node_set_vendor (gnutella_node_t *n, const gchar *vendor) |
| | Record vendor name (user-agent string).
|
| void | node_set_hops_flow (gnutella_node_t *n, guint8 hops) |
| | Called when a vendor-specific "hops-flow" message was received to tell us to update the hops-flow counter for the connection: no query whose hop count is greater or equal to the specified `hops' should be sent to that node.
|
| gnet_node_info_t * | node_get_info (const node_id_t node_id) |
| | Fetches information about a given node.
|
| void | node_clear_info (gnet_node_info_t *info) |
| | Clear dynamically allocated information from the info structure.
|
| void | node_free_info (gnet_node_info_t *info) |
| | Frees the gnet_node_info_t data returned by node_get_info.
|
| gboolean | node_fill_info (const node_id_t node_id, gnet_node_info_t *info) |
| | Fill in supplied info structure.
|
| gboolean | node_fill_flags (const node_id_t node_id, gnet_node_flags_t *flags) |
| | Fill in supplied flags structure.
|
| gboolean | node_get_status (const node_id_t node_id, gnet_node_status_t *status) |
| | Fetch node status for the GUI display.
|
| void | node_remove_nodes_by_id (const GSList *node_list) |
| | Disconnect from the given list of node handles.
|
| const gchar * | node_addr (const gnutella_node_t *n) |
| const gchar * | node_addr2 (const gnutella_node_t *n) |
| const gchar * | node_gnet_addr (const gnutella_node_t *n) |
| void | node_connect_back (const gnutella_node_t *n, guint16 port) |
| | Connect back to node on specified port and emit a "\n\n" sequence.
|
| void | node_connected_back (struct gnutella_socket *s) |
| | Callback invoked from the socket layer when we are finally connected.
|
| void | node_proxying_remove (gnutella_node_t *n) |
| | Remove push proxy indication for the node, i.e.
|
| gboolean | node_proxying_add (gnutella_node_t *n, const gchar *guid) |
| | Record that node wants us to be his push proxy.
|
| void | node_proxy_add (gnutella_node_t *n, const host_addr_t addr, guint16 port) |
| | Add node to our list of push-proxies.
|
| void | node_proxy_cancel_all (void) |
| | Cancel all our known push-proxies.
|
| size_t | node_http_proxies_add (gchar *buf, size_t size, gpointer unused_arg, guint32 unused_flags) |
| | HTTP status callback.
|
| const GSList * | node_push_proxies (void) |
| const GSList * | node_all_nodes (void) |
| const GSList * | node_all_but_broken_gtkg (void) |
| gnutella_node_t * | node_by_id (const node_id_t node_id) |
| gnutella_node_t * | node_active_by_id (const node_id_t node_id) |
| void | node_set_leaf_guidance (const node_id_t id, gboolean supported) |
| | Set leaf-guidance support indication from give node ID.
|
| gint | node_ua_cmp (const void *np1, const void *np2) |
| | qsort() callback for sorting nodes by user-agent.
|
| void | node_crawl_append_vendor (GString *ua, const gchar *vendor) |
| | Append user-agent string to the string holding them, each value being separated from the previous with NODE_CR_SEPARATOR.
|
| gint | node_crawl_fill (pmsg_t *mb, gnutella_node_t **ary, gint start, gint len, gint want, guint8 features, time_t now, GString *ua, gboolean gtkg) |
| | Fill message with the selected crawling information.
|
| void | node_crawl (gnutella_node_t *n, gint ucnt, gint lcnt, guint8 features) |
| | Received an UDP crawler ping, requesting information about `ucnt' ultra nodes and `lcnt' leaves.
|
| void | node_update_udp_socket (void) |
| | This has to be called once the UDP socket (e.g., due to a changed port number) was changed because some internal references have to be updated.
|
| const gchar * | node_flags_to_string (const gnet_node_flags_t *flags) |
| | Display a summary of the node flags.
|
| void | node_kill_hostiles (void) |
| | Disconnects all connected nodes which are considered hostile.
|
| const gchar * | node_peermode_to_string (node_peer_t m) |
| void | node_post_init (void) |
| | Post GUI initialization.
|
Variables |
| const gchar * | start_rfc822_date |
| | RFC822 format of start_time.
|
| GSList * | sl_nodes |
| GSList * | sl_nodes_without_broken_gtkg |
| GHashTable * | nodes_by_id |
| GHashTable * | nodes_by_guid |
| gnutella_node_t * | udp_node |
| gnutella_node_t * | udp6_node |
| gnutella_node_t * | browse_node |
| gchar * | payload_inflate_buffer |
| gint | payload_inflate_buffer_len |
| GHashTable * | ht_connected_nodes = NULL |
| guint32 | connected_node_count = 0 |
| GHashTable * | unstable_servent = NULL |
| GSList * | unstable_servents = NULL |
| aging * | tcp_crawls |
| aging * | udp_crawls |
| int | node_error_threshold = 6 |
| | This requires an average uptime of 1 hour for an ultrapeer.
|
| time_t | node_error_cleanup_timer = 6 * 3600 |
| | 6 hours
|
| GSList * | sl_proxies |
| guint32 | shutdown_nodes |
| gboolean | allow_gnet_connections = FALSE |
| GHookList | node_added_hook_list |
| gnutella_node * | node_added |
| | For use by node_added_hook_list hooks, since we can't add a parameter at list invoke time.
|
| struct { |
| gboolean changed |
| node_peer_t new |
| } | peermode |
| | Structure used for asynchronous reaction to peer mode changes.
|
| guint | connected_node_cnt = 0 |
| guint | compressed_node_cnt = 0 |
| guint | compressed_leaf_cnt = 0 |
| gint | pending_byes = 0 |
| gboolean | in_shutdown = FALSE |
| guint32 | leaf_to_up_switch = NODE_AUTO_SWITCH_MIN |
| time_t | no_leaves_connected = 0 |
| const gchar | no_reason [] = "<no reason>" |
| query_hashvec_t * | query_hashvec |
| listeners_t | node_added_listeners = NULL |
| listeners_t | node_removed_listeners = NULL |
| listeners_t | node_info_changed_listeners = NULL |
| listeners_t | node_flags_changed_listeners = NULL |
| tx_deflate_cb | node_tx_deflate_cb |
| tx_link_cb | node_tx_link_cb |
| tx_dgram_cb | node_tx_dgram_cb |
| rx_inflate_cb | node_rx_inflate_cb |
| rx_link_cb | node_rx_link_cb |
| io_error | node_io_error |
| struct { |
| const char *const filename |
| slist_t * slist |
| size_t fill |
| int fd |
| int initialized |
| } | dump |