--- libaitsync/inc/defs.h 2011/05/09 14:35:55 1.1.1.1.2.1 +++ libaitsync/inc/defs.h 2012/11/13 10:00:30 1.3.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: defs.h,v 1.1.1.1.2.1 2011/05/09 14:35:55 misho Exp $ +* $Id: defs.h,v 1.3.2.1 2012/11/13 10:00:30 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 +Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47,7 +47,14 @@ SUCH DAMAGE. #define __DEFS_H +#ifndef STRSIZ #define STRSIZ 256 +#endif + +#define CHUNK_MAX 2048 +#define DLTSYNC_MAGIC 0xD34DC0D3 +#define SIGSYNC_MAGIC 0xDEADBEEF + #define TABLESIZ (1 << 16) #define NULL_TAG (-1) @@ -55,6 +62,25 @@ SUCH DAMAGE. #define GETTAG(sum) GETTAG2((sum) & 0xFFFF, (sum) >> 16) #define SETERR syncSetErr(errno, strerror(errno)); + + +typedef struct tagSyncChunk { + u_int sc_magic; + u_long sc_id; + off_t sc_off; + size_t sc_len; + u_int sc_roll; + u_char sc_cksum[MD5_DIGEST_LENGTH]; +} sync_chunk_t; + + +struct tagDirName { + u_char ch; + u_short tag; + u_int hash; + char name[MAXPATHLEN]; + char extra[STRSIZ]; +}; typedef struct tagSyncTag {