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

verify.c File Reference


Detailed Description

Hash verification.

Author:
Raphael Manfredi
Date:
2002-2003

#include "common.h"
#include "downloads.h"
#include "verify.h"
#include "if/gnet_property.h"
#include "if/gnet_property_priv.h"
#include "lib/bg.h"
#include "lib/sha1.h"
#include "lib/file.h"
#include "lib/tm.h"
#include "lib/walloc.h"
#include "lib/override.h"

Data Structures

struct  verifyd
 Verification daemon context. More...


Defines

#define HASH_BLOCK_SHIFT   12 /**< Power of two of hash unit credit */
 Power of two of hash unit credit.

#define HASH_BUF_SIZE   65536 /**< Size of the reading buffer */
 Size of the reading buffer.

#define VERIFYD_MAGIC   0x000e31f8

Functions

 RCSID ("$Id:verify.c, v 1.6 2005/08/31 21:37:28 rmanfredi Exp $")
void d_free (gpointer ctx)
 Freeing of computation context.

void d_notify (gpointer unused_h, gboolean on)
 Daemon's notification of start/stop.

void d_start (gpointer unused_h, gpointer ctx, gpointer item)
 Daemon's notification: starting to work on item.

void d_end (gpointer unused_h, gpointer ctx, gpointer item)
 Daemon's notification: finished working on item.

bgret_t d_step_compute (gpointer h, gpointer u, gint ticks)
 Compute SHA1 of current file.

void verify_queue (struct download *d)
 Enqueue completed download file for verification.

void verify_init (void)
 Initializes the background verification task.

void verify_close (void)
 Called at shutdown time.


Variables

gpointer verify_daemon = NULL


Define Documentation

#define HASH_BLOCK_SHIFT   12 /**< Power of two of hash unit credit */
 

Power of two of hash unit credit.

#define HASH_BUF_SIZE   65536 /**< Size of the reading buffer */
 

Size of the reading buffer.

#define VERIFYD_MAGIC   0x000e31f8
 


Function Documentation

void d_end gpointer  unused_h,
gpointer  ctx,
gpointer  item
[static]
 

Daemon's notification: finished working on item.

void d_free gpointer  ctx  )  [static]
 

Freeing of computation context.

void d_notify gpointer  unused_h,
gboolean  on
[static]
 

Daemon's notification of start/stop.

void d_start gpointer  unused_h,
gpointer  ctx,
gpointer  item
[static]
 

Daemon's notification: starting to work on item.

bgret_t d_step_compute gpointer  h,
gpointer  u,
gint  ticks
[static]
 

Compute SHA1 of current file.

RCSID "$Id:verify.  c,
v 1.6 2005/08/31 21:37:28 rmanfredi Exp $" 
 

void verify_close void   ) 
 

Called at shutdown time.

void verify_init void   ) 
 

Initializes the background verification task.

void verify_queue struct download d  ) 
 

Enqueue completed download file for verification.


Variable Documentation

gpointer verify_daemon = NULL [static]
 


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