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

udp.c File Reference


Detailed Description

Handling UDP datagrams.

Author:
Raphael Manfredi
Date:
2004

#include "common.h"
#include "udp.h"
#include "gmsg.h"
#include "inet.h"
#include "nodes.h"
#include "sockets.h"
#include "bsched.h"
#include "gnet_stats.h"
#include "gnutella.h"
#include "mq_udp.h"
#include "routing.h"
#include "pcache.h"
#include "ntp.h"
#include "bogons.h"
#include "if/gnet_property_priv.h"
#include "lib/endian.h"
#include "lib/misc.h"
#include "lib/override.h"

Functions

 RCSID ("$Id:udp.c, v 1.28 2005/11/07 09:02:30 cbiere Exp $")
gboolean udp_is_valid_gnet (struct gnutella_socket *s, gboolean truncated)
 Look whether the datagram we received is a valid Gnutella packet.

void udp_received (struct gnutella_socket *s, gboolean truncated)
 Notification from the socket layer that we got a new datagram.

void udp_send_msg (gnutella_node_t *n, gpointer buf, gint len)
 Send a datagram to the specified node, made of `len' bytes from `buf', forming a valid Gnutella message.

void udp_connect_back (const host_addr_t addr, guint16 port, const gchar *muid)
 Send a Gnutella ping to the specified host via UDP, using the specified MUID.

void udp_send_ping (const host_addr_t addr, guint16 port)
 Send a Gnutella ping to the specified host.


Function Documentation

RCSID "$Id:udp.  c,
v 1.28 2005/11/07 09:02:30 cbiere Exp $" 
 

void udp_connect_back const host_addr_t  addr,
guint16  port,
const gchar *  muid
 

Send a Gnutella ping to the specified host via UDP, using the specified MUID.

gboolean udp_is_valid_gnet struct gnutella_socket s,
gboolean  truncated
[static]
 

Look whether the datagram we received is a valid Gnutella packet.

< Payload size, from the Gnutella message

void udp_received struct gnutella_socket s,
gboolean  truncated
 

Notification from the socket layer that we got a new datagram.

If `truncated' is true, then the message was too large for the socket buffer.

void udp_send_msg gnutella_node_t n,
gpointer  buf,
gint  len
 

Send a datagram to the specified node, made of `len' bytes from `buf', forming a valid Gnutella message.

void udp_send_ping const host_addr_t  addr,
guint16  port
 

Send a Gnutella ping to the specified host.


Generated on Sun Feb 12 10:50:08 2006 for Gtk-Gnutella by doxygen 1.3.6