SyncMacros.h

Go to the documentation of this file.
00001 /**
00002  * @file sync/SyncMacros.h
00003  *  
00004  * Part of CCNx Sync.
00005  *
00006  * Copyright (C) 2011 Palo Alto Research Center, Inc.
00007  *
00008  * This library is free software; you can redistribute it and/or modify it
00009  * under the terms of the GNU Lesser General Public License version 2.1
00010  * as published by the Free Software Foundation.
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00014  * Lesser General Public License for more details. You should have received
00015  * a copy of the GNU Lesser General Public License along with this library;
00016  * if not, write to the Free Software Foundation, Inc., 51 Franklin Street,
00017  * Fifth Floor, Boston, MA 02110-1301 USA.
00018  */
00019 
00020 
00021 #ifndef CCN_SyncMacros
00022 #define CCN_SyncMacros
00023 
00024 #define SYNC_VERSION 20110614
00025 #define SLICE_VERSION 20110614
00026 
00027 #define DEFAULT_HASH_BYTES 32
00028 #define MAX_HASH_BYTES (DEFAULT_HASH_BYTES + sizeof(uintmax_t))
00029 #define MAX_NAME_BYTES (24*1024*1024 - 1)
00030 #define MAX_NREFS 256
00031 
00032 #define NEW_ANY(N, T) ((T *) calloc(N, sizeof(T)))
00033 #define NEW_STRUCT(N, S) ((struct S *) calloc(N, sizeof(struct S)))
00034 
00035 #define SET_SYNC_ERR(base, code) SetSyncErrInner(base, code, __FILE__ , __LINE__)
00036 
00037 #endif

Generated on Thu Feb 16 00:44:01 2012 for Content-Centric Networking in C by  doxygen 1.5.6