81 "Cleaning up publish context (done!)\n");
128 _ (
"Publishing failed: %s"),
230 "Releasing reserve done!\n");
265 if ((pc->
dsh != NULL) && (pc->
rid != 0))
323 "Error uploading KSK blocks: %s\n",
337 "KSK blocks published, moving on to next file\n");
387 if (UINT64_MAX == offset)
426 "Finished with tree encoder\n");
435 "Error during tree walk: %s\n",
438 _ (
"Publishing failed: %s"),
497 "Waiting for datastore connection\n");
510 "Indexing block `%s' for offset %llu with index size %u\n",
512 (
unsigned long long) offset,
515 odb.
file_id = p->data.file.file_id;
524 p->bo.content_priority,
525 p->bo.anonymity_level,
526 p->bo.replication_level,
527 p->bo.expiration_time,
533 "Publishing block `%s' for offset %llu with size %u\n",
535 (
unsigned long long) offset,
536 (
unsigned int) block_size);
545 p->bo.content_priority,
546 p->bo.anonymity_level,
547 p->bo.replication_level,
548 p->bo.expiration_time,
567 const void *pt_block,
586 while (NULL != (par = p->
dir))
590 p->data.dir.contents_completed += pt_size;
592 pi.
value.
publish.specifics.progress_directory.completed =
593 p->data.dir.contents_completed;
595 p->data.dir.contents_size;
599 ->data.dir.contents_completed,
601 ->data.dir.contents_size);
633 while (NULL != dirpos)
650 dirpos->
data.
file.file_size, raw_data,
664 dirpos = dirpos->
next;
676 "Creating tree encoder\n");
683 "Processing next block from tree\n");
699 size_t msize = ntohs (msg->
size) -
sizeof(*msg);
700 const char *
emsg = (
const char *) &msg[1];
724 const char *
emsg = (
const char *) &msg[1];
731 _ (
"Can not index file `%s': %s.\n"),
788 _ (
"Can not index file `%s': %s. Will try to insert instead.\n"),
790 _ (
"error on index-start request to `fs' service"));
834 "Can not index file `%s': %s. Will try to insert instead.\n"),
836 _ (
"failed to compute hash"));
849 slen = strlen (fn) + 1;
855 (
"Can not index file `%s': %s. Will try to insert instead.\n"),
856 fn,
_ (
"filename too long"));
864 "Hash of indexed file `%s' is `%s'\n",
886 "Can not index file `%s': %s. Will try to insert instead.\n"),
888 _ (
"could not connect to `fs' service"));
914 _ (
"Failed to get file identifiers for `%s'\n"),
1003 _ (
"Can not create LOC URI. Will continue with CHK instead.\n"));
1040 "Can not create LOC URI. Will continue with CHK instead.\n"));
1074 "Publishing complete, now publishing SKS and KSK blocks.\n");
1084 (NULL == p->
emsg) &&
1092 if (NULL != p->
emsg)
1095 "Error uploading: %s\n",
1099 while (NULL != p->
dir)
1107 _ (
"Recursive upload failed at `%s': %s"),
1115 _ (
"Recursive upload failed: %s"),
1131 "File upload complete, now publishing KSK blocks.\n");
1154 "Can not index file `%s': %s. Will try to insert instead.\n"),
1156 _ (
"needs to be an actual file"));
1213 "Starting publish operation\n");
1283 "Suspending publish operation\n");
1290 if (NULL != pc->
qre)
1295 if (NULL != pc->
dsh)
1342 *client_info = NULL;
1391 "Reservation complete (%d)!\n",
1393 if ((msg != NULL) || (success <= 0))
1396 _ (
"Datastore failure: %s"),
1483 if (NULL != ret->
dsh)
1488 "Reserving space for %u entries and %llu bytes for publication\n"),
1529 int *do_index,
void **client_info)
1553 off = (fi->
chk_uri == NULL) ? 0 : length;
1556 *client_info = NULL;
1576 "Publish stop called\n");
1613 if (NULL != pc->
qre)
struct GNUNET_TIME_Absolute expiration_time
At what time should the block expire? Data blocks (DBLOCKS and IBLOCKS) may still be used even if the...
unsigned int depth
Depth of the given block in the tree; 0 would be the lowest level (DBLOCKs).
static struct GNUNET_TIME_Absolute min_expiration
Minimum time that content should have to not be discarded instantly (time stamp of any content that w...
char * nid
ID of the content in the namespace, NULL if we have no namespace.
int GNUNET_FS_directory_builder_finish(struct GNUNET_FS_DirectoryBuilder *bld, size_t *rsize, void **rdata)
Finish building the directory.
static void publish_kblocks_cont(void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
We've finished publishing a KBlock as part of a larger upload.
struct GNUNET_SCHEDULER_Task * upload_task
ID of the task performing the upload.
struct ContentHashKey chk
Query and key of the top GNUNET_EC_IBlock.
void GNUNET_FS_publish_stop(struct GNUNET_FS_PublishContext *pc)
Stop an upload.
struct GNUNET_MessageHeader * msg
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_ntoh(struct GNUNET_TIME_AbsoluteNBO a)
Convert absolute time from network byte order.
int rid
Space reservation ID with datastore service for this upload.
#define GNUNET_TIME_UNIT_ZERO_ABS
Absolute time zero.
void GNUNET_FS_file_information_sync_(struct GNUNET_FS_FileInformation *fi)
Create a temporary file on disk to store the current state of fi in.
struct FileIdentifier chk
Information needed to retrieve a file (content-hash-key plus file size).
Notification that we are making progress sharing a file structure.
struct GNUNET_FS_PublishContext * GNUNET_FS_publish_start(struct GNUNET_FS_Handle *h, struct GNUNET_FS_FileInformation *fi, const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns, const char *nid, const char *nuid, enum GNUNET_FS_PublishOptions options)
Publish a file or directory.
enum GNUNET_GenericReturnValue GNUNET_DISK_file_get_identifiers(const char *filename, uint64_t *dev, uint64_t *ino)
Obtain some unique identifiers for the given file that can be used to identify it in the local system...
struct GNUNET_GETOPT_CommandLineOption options[]
struct GNUNET_MQ_Handle * GNUNET_CLIENT_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *service_name, const struct GNUNET_MQ_MessageHandler *handlers, GNUNET_MQ_ErrorHandler error_handler, void *error_handler_cls)
Create a message queue to connect to a GNUnet service.
static void finish_release_reserve(void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
Datastore returns from reservation cancel request.
GNUNET_BLOCK_Type
Blocks in the datastore and the datacache must have a unique type.
uint32_t purpose
Requested signature purpose.
GNUNET_MQ_Error
Error codes for the queue.
static void publish_content(struct GNUNET_FS_PublishContext *pc)
We are uploading a file or directory; load (if necessary) the next block into memory, encrypt it and send it to the FS service.
static void signal_publish_completion(struct GNUNET_FS_FileInformation *p, struct GNUNET_FS_PublishContext *pc)
Generate the callback that signals clients that a file (or directory) has been completely published...
Master context for most FS operations.
#define GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED
Response to a request for start indexing that refuses.
static void ds_put_cont(void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
Function called by the datastore API with the result from the PUT request.
struct GNUNET_DATASTORE_QueueEntry * GNUNET_DATASTORE_put(struct GNUNET_DATASTORE_Handle *h, uint32_t rid, const struct GNUNET_HashCode *key, size_t size, const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, uint32_t anonymity, uint32_t replication, struct GNUNET_TIME_Absolute expiration, unsigned int queue_priority, unsigned int max_queue_size, GNUNET_DATASTORE_ContinuationWithStatus cont, void *cont_cls)
Store an item in the datastore.
void GNUNET_FS_publish_ksk_cancel(struct GNUNET_FS_PublishKskContext *pkc)
Abort the KSK publishing operation.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
struct GNUNET_FS_PublishSksContext * GNUNET_FS_publish_sks(struct GNUNET_FS_Handle *h, const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns, const char *identifier, const char *update, const struct GNUNET_CONTAINER_MetaData *meta, const struct GNUNET_FS_Uri *uri, const struct GNUNET_FS_BlockOptions *bo, enum GNUNET_FS_PublishOptions options, GNUNET_FS_PublishContinuation cont, void *cont_cls)
Publish an SBlock on GNUnet.
struct GNUNET_DATASTORE_QueueEntry * GNUNET_DATASTORE_reserve(struct GNUNET_DATASTORE_Handle *h, uint64_t amount, uint32_t entries, GNUNET_DATASTORE_ContinuationWithStatus cont, void *cont_cls)
Reserve space in the datastore.
uint64_t reserve_space
Storage space to reserve for the operation.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
#define GNUNET_MQ_hd_fixed_size(name, code, str, ctx)
void GNUNET_FS_tree_encoder_next(struct GNUNET_FS_TreeEncoder *te)
Encrypt the next block of the file (and call proc and progress accordingly; or of course "cont" if we...
static void handle_index_start_ok(void *cls, const struct GNUNET_MessageHeader *msg)
Process the response from the "fs" service to our 'start index' request.
static int ret
Return value of the commandline.
#define GNUNET_MQ_msg(mvar, type)
Allocate a GNUNET_MQ_Envelope.
uint64_t file_length
Size of the shared file (to be signed).
Internal state of a directory builder.
enum GNUNET_FS_PublishOptions options
Options for publishing.
struct GNUNET_CRYPTO_FileHashContext * fhc
Non-null if we are currently hashing a file.
struct GNUNET_DATASTORE_Handle * dsh
Connection to the datastore service.
struct GNUNET_FS_Handle * h
Handle to the global fs context.
const char * GNUNET_h2s(const struct GNUNET_HashCode *hc)
Convert a hash value to a string (for printing debug messages).
#define GNUNET_new(type)
Allocate a struct or union of the given type.
char * serialization
Filename used for serializing information about this operation (should be determined using 'mktemp')...
Private ECC key encoded for transmission.
struct GNUNET_PeerIdentity peer
Identity of the peer sharing the file.
uint64_t offset
At what offset in the file is "data"?
size_t GNUNET_FS_data_reader_file_(void *cls, uint64_t offset, size_t max, void *buf, char **emsg)
Function that provides data by reading from a file.
struct GNUNET_DATASTORE_QueueEntry * GNUNET_DATASTORE_release_reserve(struct GNUNET_DATASTORE_Handle *h, uint32_t rid, unsigned int queue_priority, unsigned int max_queue_size, GNUNET_DATASTORE_ContinuationWithStatus cont, void *cont_cls)
Signal that all of the data for which a reservation was made has been stored and that whatever excess...
Run as background job (higher than idle, lower than default).
struct GNUNET_CRYPTO_FileHashContext * GNUNET_CRYPTO_hash_file(enum GNUNET_SCHEDULER_Priority priority, const char *filename, size_t blocksize, GNUNET_CRYPTO_HashCompletedCallback callback, void *callback_cls)
Compute the hash of an entire file.
static struct GNUNET_PEERINFO_Handle * pi
Handle to peerinfo service.
#define GNUNET_MESSAGE_TYPE_FS_REQUEST_LOC_SIGNATURE
Reply sent by fs service with LOC signature.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
struct GNUNET_FS_Uri * GNUNET_FS_tree_encoder_get_uri(struct GNUNET_FS_TreeEncoder *te)
Get the resulting URI from the encoding.
Message sent from a GNUnet (fs) publishing activity to the gnunet-fs-service to initiate indexing of ...
static void hash_for_index_cb(void *cls, const struct GNUNET_HashCode *res)
Function called once the hash computation over an indexed file has completed.
static void signal_publish_error(struct GNUNET_FS_FileInformation *p, struct GNUNET_FS_PublishContext *pc, const char *emsg)
Generate the callback that signals clients that a file (or directory) has encountered a problem durin...
const struct GNUNET_FS_FileInformation * fi
Information about the file that is being published.
struct GNUNET_FS_Uri * GNUNET_FS_uri_dup(const struct GNUNET_FS_Uri *uri)
Duplicate URI.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
Type of a block representing a block to be encoded on demand from disk.
static uint64_t compute_contents_size(struct GNUNET_FS_FileInformation *fi)
Calculate the total size of all of the files in the directory structure.
static void handle_signature_response(void *cls, const struct ResponseLocSignatureMessage *sig)
Process the response from the "fs" service to our LOC sign request.
static struct GNUNET_ARM_Handle * h
Connection with ARM.
static void finish_reserve(void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
We have gotten a reply for our space reservation request.
#define GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK
Affirmative response to a request for start indexing.
void GNUNET_FS_publish_main_(void *cls)
Main function that performs the upload.
Notification that we have stopped the process of uploading a file structure; no further events will b...
int GNUNET_FS_uri_test_loc(const struct GNUNET_FS_Uri *uri)
Is this a location URI?
#define MAX_INLINE_SIZE
Maximum size for a file to be considered for inlining in a directory.
static void publish_kblocks(struct GNUNET_FS_PublishContext *pc)
We've computed the CHK/LOC URI, now publish the KSKs (if applicable).
static struct GNUNET_FS_Uri * uri
Value of URI provided on command-line (when not publishing a file but just creating UBlocks to refer ...
static int fip_signal_stop(void *cls, struct GNUNET_FS_FileInformation *fi, uint64_t length, struct GNUNET_CONTAINER_MetaData *meta, struct GNUNET_FS_Uri **uri, struct GNUNET_FS_BlockOptions *bo, int *do_index, void **client_info)
Signal the FS's progress function that we are stopping an upload.
uint32_t anonymity_level
At which anonymity level should the block be shared? (0: no anonymity, 1: normal GAP, >1: with cover traffic).
struct GNUNET_FS_PublishKskContext * GNUNET_FS_publish_ksk(struct GNUNET_FS_Handle *h, const struct GNUNET_FS_Uri *ksk_uri, const struct GNUNET_CONTAINER_MetaData *meta, const struct GNUNET_FS_Uri *uri, const struct GNUNET_FS_BlockOptions *bo, enum GNUNET_FS_PublishOptions options, GNUNET_FS_PublishContinuation cont, void *cont_cls)
Publish a CHK under various keywords on GNUnet.
unsigned int GNUNET_FS_compute_depth(uint64_t flen)
Compute the depth of the CHK tree.
static void publish_sblock(struct GNUNET_FS_PublishContext *pc)
We are almost done publishing the structure, add SBlocks (if needed).
Notification that we have started to publish a file structure.
#define GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT
Signature by which a peer affirms that it is providing a certain bit of content (used in LOCation URI...
#define GNUNET_MQ_msg_extra(mvar, esize, type)
Allocate an envelope, with extra space allocated after the space needed by the message struct...
void GNUNET_FS_directory_builder_add(struct GNUNET_FS_DirectoryBuilder *bld, const struct GNUNET_FS_Uri *uri, const struct GNUNET_CONTAINER_MetaData *md, const void *data)
Add an entry to a directory.
union GNUNET_FS_ProgressInfo::@25 value
Values that depend on the event type.
static void create_loc_uri(struct GNUNET_FS_PublishContext *pc)
We're publishing without anonymity.
void GNUNET_FS_publish_sync_(struct GNUNET_FS_PublishContext *pc)
Synchronize this publishing struct with its mirror on disk.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_with_priority(enum GNUNET_SCHEDULER_Priority prio, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified priority.
static struct GNUNET_OS_Process * p
Helper process we started.
static void progress_proc(void *cls, uint64_t offset, const void *pt_block, size_t pt_size, unsigned int depth)
Function called with information about our progress in computing the tree encoding.
Notification that we are making progress sharing a directory.
#define GNUNET_MQ_hd_var_size(name, code, str, ctx)
static char * fn
Filename of the unique file.
struct GNUNET_FS_UnindexContext * GNUNET_FS_unindex_start(struct GNUNET_FS_Handle *h, const char *filename, void *cctx)
Unindex a file.
void GNUNET_FS_end_top(struct GNUNET_FS_Handle *h, struct TopLevelActivity *top)
Destroy a top-level activity entry.
uint64_t device
ID of device containing the file, as seen by the client.
char * nuid
ID for future updates, NULL if we have no namespace or no updates.
enum GNUNET_FS_Status status
Specific status code (determines the event type).
struct GNUNET_HashCode query
Hash of the encrypted content, used for querying.
void GNUNET_FS_publish_sks_cancel(struct GNUNET_FS_PublishSksContext *psc)
Abort the SKS publishing operation.
static struct GNUNET_NAMESTORE_Handle * ns
Handle to the namestore.
struct GNUNET_TIME_AbsoluteNBO expiration_time
Expiration time that was actually used (rounded!).
static void handle_index_start_failed(void *cls, const struct GNUNET_MessageHeader *msg)
Process the response from the "fs" service to our 'start index' request.
#define GNUNET_TIME_UNIT_FOREVER_REL
Constant used to specify "forever".
struct GNUNET_FS_FileInformation * fi_pos
Current position in the file-tree for the upload.
GNUNET_FS_PublishOptions
Options for publishing.
static int check_index_start_failed(void *cls, const struct GNUNET_MessageHeader *msg)
Check the response from the "fs" service to our 'start index' request.
struct GNUNET_FS_TreeEncoder * GNUNET_FS_tree_encoder_create(struct GNUNET_FS_Handle *h, uint64_t size, void *cls, GNUNET_FS_DataReader reader, GNUNET_FS_TreeBlockProcessor proc, GNUNET_FS_TreeProgressCallback progress, GNUNET_SCHEDULER_TaskCallback cont)
Initialize a tree encoder.
void GNUNET_CRYPTO_hash_file_cancel(struct GNUNET_CRYPTO_FileHashContext *fhc)
Cancel a file hashing operation.
static void publish_cleanup(struct GNUNET_FS_PublishContext *pc)
Cleanup the publish context, we're done with it.
struct GNUNET_FS_PublishKskContext * ksk_pc
Context for KSK publishing operation that is part of this publishing operation (NULL if not active)...
Handle for controlling a publication process.
Message handler for a specific message type.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
struct GNUNET_FS_ProgressInfo::@25::GNUNET_FS_PublishStatusEvent publish
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define DBLOCK_SIZE
Size of the individual blocks used for file-sharing.
static size_t block_reader(void *cls, uint64_t offset, size_t max, void *buf, char **emsg)
Function called by the tree encoder to obtain a block of plaintext data (for the lowest level of the ...
uint64_t GNUNET_htonll(uint64_t n)
Convert unsigned 64-bit integer to network byte order.
static void suspend_operation(struct GNUNET_FS_FileInformation *fi, struct GNUNET_FS_PublishContext *pc)
Actually signal the FS's progress function that we are suspending an upload.
#define GNUNET_MESSAGE_TYPE_FS_INDEX_START
Message sent by fs client to start indexing.
uint32_t reserve_entries
Overall number of entries to reserve for the publish operation.
#define GNUNET_FS_SYNC_PATH_FILE_INFO
Name of the directory with files that are being published.
struct GNUNET_DATASTORE_QueueEntry * qre
Queue entry for reservation/unreservation.
static unsigned int size
Size of the "table".
struct GNUNET_PeerIdentity peer
Identity of the peer sharing the file.
struct GNUNET_HashCode file_id
Hash of the file that we would like to index.
int all_done
Set to GNUNET_YES if all processing has completed.
char * GNUNET_STRINGS_filename_expand(const char *fil)
Complete filename (a la shell) from abbrevition.
Settings for publishing a block (which may of course also apply to an entire directory or file)...
struct GNUNET_MQ_Envelope * env
struct GNUNET_HashCode file_id
Hash code of the entire content of the file that was indexed (used to uniquely identify the plaintext...
Notification that we completed sharing a file structure.
struct GNUNET_FS_PublishSksContext * sks_pc
Context for SKS publishing operation that is part of this publishing operation (NULL if not active)...
struct GNUNET_TIME_Absolute expirationTime
Time when this location URI expires.
enum GNUNET_FS_UriType type
Type of the URI.
int GNUNET_FS_meta_data_test_for_directory(const struct GNUNET_CONTAINER_MetaData *md)
Does the meta-data claim that this is a directory? Checks if the mime-type is that of a GNUnet direct...
struct GNUNET_MQ_Handle * mq
Our own message queue for the FS service; only briefly used when we start to index a file...
void * GNUNET_FS_publish_make_status_(struct GNUNET_FS_ProgressInfo *pi, struct GNUNET_FS_PublishContext *pc, const struct GNUNET_FS_FileInformation *p, uint64_t offset)
Fill in all of the generic fields for a publish event and call the callback.
#define GNUNET_TIME_UNIT_ZERO
Relative time zero.
#define GNUNET_MAX_MESSAGE_SIZE
Largest supported message (to be precise, one byte more than the largest possible message...
struct ContentHashKey chk
Information about the shared file (to be signed).
union GNUNET_FS_Uri::@13 data
static int fip_signal_start(void *cls, struct GNUNET_FS_FileInformation *fi, uint64_t length, struct GNUNET_CONTAINER_MetaData *meta, struct GNUNET_FS_Uri **uri, struct GNUNET_FS_BlockOptions *bo, int *do_index, void **client_info)
Signal the FS's progress function that we are starting an upload.
struct GNUNET_FS_Handle * fsh
File-sharing handle that generated the event.
struct TopLevelActivity * GNUNET_FS_make_top(struct GNUNET_FS_Handle *h, SuspendSignalFunction ssf, void *ssf_cls)
Create a top-level activity entry.
Message sent from the service with the signed LOC URI.
uint64_t inode
Inode of the file on the given device, as seen by the client ("st_ino" field from "struct stat")...
struct TopLevelActivity * top
Our top-level activity entry (if we are top-level, otherwise NULL).
void GNUNET_DATASTORE_cancel(struct GNUNET_DATASTORE_QueueEntry *qe)
Cancel a datastore operation.
static struct GNUNET_FS_PublishContext * pc
Handle to FS-publishing operation.
struct GNUNET_FS_FileInformation * fi
File-structure that is being shared.
Notification that an error was encountered sharing a file structure.
GNUNET_FS_ProgressCallback upcb
Function to call with updates on our progress.
Notification that we have suspended sharing a file structure.
Message sent from a GNUnet (fs) publishing activity to sign a LOC URI.
static struct GNUNET_FS_DirectoryBuilder * db
#define HASHING_BLOCKSIZE
Blocksize to use when hashing files for indexing (blocksize for IO, not for the DBlocks).
uint64_t GNUNET_FS_uri_chk_get_file_size(const struct GNUNET_FS_Uri *uri)
What is the size of the file that this URI refers to?
shared definitions for the FS library
void GNUNET_DATASTORE_disconnect(struct GNUNET_DATASTORE_Handle *h, int drop)
Disconnect from the datastore service (and free associated resources).
struct GNUNET_CRYPTO_EcdsaPrivateKey * ns
Namespace that we are publishing in, NULL if we have no namespace.
void GNUNET_FS_file_information_inspect(struct GNUNET_FS_FileInformation *dir, GNUNET_FS_FileInformationProcessor proc, void *proc_cls)
Inspect a file or directory in a publish-structure.
A Universal Resource Identifier (URI), opaque.
struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_duration(struct GNUNET_TIME_Absolute whence)
Get the duration of an operation as the difference of the current time and the given start time "henc...
Handle to the datastore service.
uint64_t file_length
Total size of the file in bytes.
static struct GNUNET_CONTAINER_MetaData * meta
Meta-data provided via command-line option.
static struct GNUNET_DATASTORE_Handle * dsh
Datastore handle.
struct GNUNET_CRYPTO_EddsaSignature signature
The requested signature.
void * upcb_cls
Closure for upcb.
struct GNUNET_CRYPTO_EddsaSignature contentSignature
Signature over the GNUNET_EC_FileIdentifier, peer identity and expiration time.
#define GNUNET_log(kind,...)
void GNUNET_FS_publish_signal_suspend_(void *cls)
Create SUSPEND event for the given publish operation and then clean up our state (without stop signal...
uint64_t offset
At which offset should we be able to find this on-demand encoded block? (in NBO)
void GNUNET_FS_file_information_destroy(struct GNUNET_FS_FileInformation *fi, GNUNET_FS_FileInformationProcessor cleaner, void *cleaner_cls)
Destroy publish-structure.
static void loc_mq_error_handler(void *cls, enum GNUNET_MQ_Error error)
Generic error handler, called with the appropriate error code and the same closure specified at the c...
#define GNUNET_MESSAGE_TYPE_FS_REQUEST_LOC_SIGN
Message sent by fs client to request LOC signature.
Data block (leaf) in the CHK tree.
unsigned int GNUNET_FS_uri_ksk_get_keyword_count(const struct GNUNET_FS_Uri *uri)
How many keywords are ANDed in this keyword URI?
#define GNUNET_FS_SYNC_PATH_MASTER_PUBLISH
Name of the directory with publishing operations.
Location (chk with identity of hosting peer).
struct GNUNET_TIME_AbsoluteNBO expiration_time
Requested expiration time.
struct GNUNET_TIME_Relative GNUNET_TIME_calculate_eta(struct GNUNET_TIME_Absolute start, uint64_t finished, uint64_t total)
Calculate the estimate time of arrival/completion for an operation.
struct Location loc
Information needed to retrieve a file including signed location (identity of a peer) of the content...
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
void GNUNET_FS_tree_encoder_finish(struct GNUNET_FS_TreeEncoder *te, char **emsg)
Clean up a tree encoder and return information about possible errors.
Time for absolute times used by GNUnet, in microseconds.
void GNUNET_MQ_destroy(struct GNUNET_MQ_Handle *mq)
Destroy the message queue.
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
static void block_proc(void *cls, const struct ContentHashKey *chk, uint64_t offset, unsigned int depth, enum GNUNET_BLOCK_Type type, const void *block, uint16_t block_size)
Function called asking for the current (encoded) block to be processed.
struct GNUNET_DATASTORE_Handle * GNUNET_DATASTORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the datastore service.
struct GNUNET_FS_DirectoryBuilder * GNUNET_FS_directory_builder_create(const struct GNUNET_CONTAINER_MetaData *mdir)
Create a directory builder.
static int fip_signal_suspend(void *cls, struct GNUNET_FS_FileInformation *fi, uint64_t length, struct GNUNET_CONTAINER_MetaData *meta, struct GNUNET_FS_Uri **uri, struct GNUNET_FS_BlockOptions *bo, int *do_index, void **client_info)
Signal the FS's progress function that we are suspending an upload.
struct GNUNET_TIME_AbsoluteNBO GNUNET_TIME_absolute_hton(struct GNUNET_TIME_Absolute a)
Convert absolute time to network byte order.
int any_done
Set to GNUNET_YES if we were able to publish any block.
int skip_next_fi_callback
Flag set to GNUNET_YES if the next callback from GNUNET_FS_file_information_inspect should be skipped...
static void encode_cont(void *cls)
The tree encoder has finished processing a file.
static void publish_sblocks_cont(void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
We've finished publishing the SBlock as part of a larger upload.
#define GNUNET_MQ_handler_end()
End-marker for the handlers array.
#define GNUNET_malloc(size)
Wrapper around malloc.
void GNUNET_FS_remove_sync_file_(struct GNUNET_FS_Handle *h, const char *ext, const char *ent)
Remove serialization/deserialization file from disk.
uint64_t GNUNET_ntohll(uint64_t n)
Convert unsigned 64-bit integer to host byte order.
index block (indexing a DBlock that can be obtained directly from reading the plaintext file) ...
static void index_mq_error_handler(void *cls, enum GNUNET_MQ_Error error)
Generic error handler, called with the appropriate error code and the same closure specified at the c...
static struct GNUNET_FS_BlockOptions bo
Options we set for published blocks.
#define GNUNET_free(ptr)
Wrapper around free.
Argument given to the progress callback with information about what is going on.
Merkle-tree-ish-CHK file encoding for GNUnet.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration to use.