GNUnet 0.22.2
IndexStartMessage Struct Reference

Message sent from a GNUnet (fs) publishing activity to the gnunet-fs-service to initiate indexing of a file. More...

#include </home/buildbot/bb-worker/worker/gnunet_firefly/build/src/service/fs/fs.h>

Collaboration diagram for IndexStartMessage:
[legend]

Data Fields

struct GNUNET_MessageHeader header
 Message type will be GNUNET_MESSAGE_TYPE_FS_INDEX_START. More...
 
uint32_t reserved
 For alignment. More...
 
uint64_t device
 ID of device containing the file, as seen by the client. More...
 
uint64_t inode
 Inode of the file on the given device, as seen by the client ("st_ino" field from "struct stat"). More...
 
struct GNUNET_HashCode file_id
 Hash of the file that we would like to index. More...
 

Detailed Description

Message sent from a GNUnet (fs) publishing activity to the gnunet-fs-service to initiate indexing of a file.

The service is supposed to check if the specified file is available and has the same cryptographic hash. It should then respond with either a confirmation or a denial.

On OSes where this works, it is considered acceptable if the service only checks that the path, device and inode match (it can then be assumed that the hash will also match without actually computing it; this is an optimization that should be safe given that the client is not our adversary).

Definition at line 152 of file fs.h.

Field Documentation

◆ header

struct GNUNET_MessageHeader IndexStartMessage::header

Message type will be GNUNET_MESSAGE_TYPE_FS_INDEX_START.

Definition at line 157 of file fs.h.

◆ reserved

uint32_t IndexStartMessage::reserved

For alignment.

Definition at line 162 of file fs.h.

Referenced by check_client_index_start().

◆ device

uint64_t IndexStartMessage::device

ID of device containing the file, as seen by the client.

This device ID is obtained using a call like "statvfs" (and converting the "f_fsid" field to a 32-bit big-endian number). Use 0 if the OS does not support this, in which case the service must do a full hash recomputation.

Definition at line 171 of file fs.h.

Referenced by handle_client_index_start(), and hash_for_index_cb().

◆ inode

uint64_t IndexStartMessage::inode

Inode of the file on the given device, as seen by the client ("st_ino" field from "struct stat").

Use 0 if the OS does not support this, in which case the service must do a full hash recomputation.

Definition at line 179 of file fs.h.

Referenced by handle_client_index_start(), and hash_for_index_cb().

◆ file_id

struct GNUNET_HashCode IndexStartMessage::file_id

Hash of the file that we would like to index.

Definition at line 184 of file fs.h.

Referenced by handle_client_index_start(), and hash_for_index_cb().


The documentation for this struct was generated from the following file: