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

pproxy.h File Reference


Detailed Description

Push proxy HTTP management.

Author:
Raphael Manfredi
Date:
2002-2003

#include <glib.h>
#include "if/core/pproxy.h"

Go to the source code of this file.

Data Structures

struct  pproxy
 A push proxy request we received. More...


Defines

#define pproxy_vendor_str(p)   ((p)->user_agent ? (p)->user_agent : "")

Functions

void pproxy_add (struct gnutella_socket *s)
 Create new push-proxy request and begin reading HTTP headers.

void pproxy_remove (struct pproxy *pp, const gchar *reason,...) G_GNUC_PRINTF(2
void pproxy_timer (time_t now)
 Push proxy timer.

void pproxy_close (void)
 Called a shutdown time.

cproxycproxy_create (struct download *d, const host_addr_t addr, guint16 port, gchar *guid, guint32 file_idx)
 Create client proxy.

void cproxy_free (struct cproxy *cp)
 Free the structure and all its dependencies.

void cproxy_reparent (struct download *d, struct download *cd)
 Updates the proxy structures to point to the right download when a download was cloned.

const gchar * build_push (size_t *size_ptr, guint8 ttl, guint8 hops, const gchar *guid, host_addr_t addr, guint16 port, guint32 file_idx)
 Builds a push request to send.


Define Documentation

#define pproxy_vendor_str  )     ((p)->user_agent ? (p)->user_agent : "")
 


Function Documentation

const gchar* build_push size_t *  size_ptr,
guint8  ttl,
guint8  hops,
const gchar *  guid,
host_addr_t  addr,
guint16  port,
guint32  file_idx
 

Builds a push request to send.

We set TTL=max_ttl-1 and hops=1 since it does not come from our node really. The file ID may be set to 0, but it should be ignored when the GIV is received anyway.

Parameters:
size_ptr no document
ttl the TTL to use for the packet header.
hops the hops value to use for the packet header.
guid the hops value to use for the packet header.
addr the host address the receiving peer should connect to.
port the port number the receiving peer should connect to.
file_idx the file index this push is for.
Returns:
A pointer to a static buffer holding the created Gnutella PUSH packet on success, NULL on failure.

struct cproxy* cproxy_create struct download d,
const host_addr_t  addr,
guint16  port,
gchar *  guid,
guint32  file_idx
 

Create client proxy.

Returns:
NULL if problem during connection.

void cproxy_free struct cproxy cp  ) 
 

Free the structure and all its dependencies.

void cproxy_reparent struct download d,
struct download cd
 

Updates the proxy structures to point to the right download when a download was cloned.

void pproxy_add struct gnutella_socket s  ) 
 

Create new push-proxy request and begin reading HTTP headers.

void pproxy_close void   ) 
 

Called a shutdown time.

void pproxy_remove struct pproxy pp,
const gchar *  reason,
... 
 

void pproxy_timer time_t  now  ) 
 

Push proxy timer.


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