Distributed Hash Table File System for Linux








protocol.h File Reference

#include "magma_setup.h"
#include "protocol_pkt.h"

Defines

#define MAX_IP_LENGTH   16
#define get_flare_client_socket(socket, remoteip, remoteport)
#define get_fuse_client_socket(s, ip, port)   get_flare_client_socket(s,ip,port)
#define get_node_client_socket(socket, remoteip, remoteport)

Typedefs

typedef uint8_t peertype_t
typedef uint8_t optype_t

Variables

const peertype_t PEER_TYPE_NODE
const peertype_t PEER_TYPE_MOUNT
const peertype_t PEER_TYPE_FUSE
const peertype_t PEER_TYPE_CLIENT
const optype_t MAGMA_OP_TYPE_GETATTR
const optype_t MAGMA_OP_TYPE_READLINK
const optype_t MAGMA_OP_TYPE_GETDIR
const optype_t MAGMA_OP_TYPE_MKNOD
const optype_t MAGMA_OP_TYPE_MKDIR
const optype_t MAGMA_OP_TYPE_UNLINK
const optype_t MAGMA_OP_TYPE_RMDIR
const optype_t MAGMA_OP_TYPE_SYMLINK
const optype_t MAGMA_OP_TYPE_RENAME
const optype_t MAGMA_OP_TYPE_LINK
const optype_t MAGMA_OP_TYPE_CHMOD
const optype_t MAGMA_OP_TYPE_CHOWN
const optype_t MAGMA_OP_TYPE_TRUNCATE
const optype_t MAGMA_OP_TYPE_UTIME
const optype_t MAGMA_OP_TYPE_OPEN
const optype_t MAGMA_OP_TYPE_READ
const optype_t MAGMA_OP_TYPE_WRITE
const optype_t MAGMA_OP_TYPE_STATFS
const optype_t MAGMA_OP_TYPE_FLUSH
const optype_t MAGMA_OP_TYPE_RELEASE
const optype_t MAGMA_OP_TYPE_FSYNC
const optype_t MAGMA_OP_TYPE_OPENDIR
const optype_t MAGMA_OP_TYPE_READDIR
const optype_t MAGMA_OP_TYPE_RELEASEDIR
const optype_t MAGMA_OP_TYPE_FSYNCDIR
const optype_t MAGMA_OP_TYPE_INIT
const optype_t MAGMA_OP_TYPE_DESTROY
const optype_t MAGMA_OP_TYPE_ADD_FLARE_TO_PARENT
const optype_t MAGMA_OP_TYPE_REMOVE_FLARE_FROM_PARENT
const optype_t MAGMA_OP_TYPE_F_OPENDIR
const optype_t MAGMA_OP_TYPE_F_CLOSEDIR
const optype_t MAGMA_OP_TYPE_F_TELLDIR
const optype_t MAGMA_OP_TYPE_F_SEEKDIR
const optype_t MAGMA_OP_TYPE_F_READDIR
const optype_t MAGMA_OP_TYPE_JOIN
const optype_t MAGMA_OP_TYPE_TRANSMIT_NODE
const optype_t MAGMA_OP_TYPE_GET_KEY
const optype_t MAGMA_OP_TYPE_PUT_KEY
const optype_t MAGMA_OP_TYPE_DROP_KEY
const optype_t MAGMA_OP_TYPE_GET_KEY_CONTENT
const optype_t MAGMA_OP_TYPE_CLOSECONNECTION
const optype_t MAGMA_OP_TYPE_HEARTBEAT

Define Documentation

#define get_flare_client_socket ( socket,
remoteip,
remoteport   ) 

Value:

socket = get_client_socket(remoteip,remoteport);\
        xsend(socket, &PEER_TYPE_FUSE, sizeof(peertype_t));
set socket to be a network socket initialized to talk flare protocol to server reached at IP address remoteip and IP port remoteport

Parameters:
socket resulting network socket
remoteip remote server IP address
remoteport remote server port

#define get_fuse_client_socket ( s,
ip,
port   )     get_flare_client_socket(s,ip,port)

#define get_node_client_socket ( socket,
remoteip,
remoteport   ) 

Value:

socket = get_client_socket(remoteip,remoteport);\
        xsend(socket, &PEER_TYPE_NODE, sizeof(peertype_t));
set socket to be a network socket initialized to talk node protocol to server reached at IP address remoteip and IP port remoteport

Parameters:
socket resulting network socket
remoteip remote server IP address
remoteport remote server port

#define MAX_IP_LENGTH   16


Typedef Documentation

typedef uint8_t optype_t

define the next operation requested to a server

typedef uint8_t peertype_t

define the type of a connection if sent as first information


Variable Documentation

Operation type ADD_FLARE_TO_PARENT implemented

Operation type CHMOD

Operation type CHOWN

Operation type CLOSECONNECTION (close connection to MAGMA server)

Operation type DESTROY optional

Opearation type DROP_KEY (I've received this key, forget it)

Operation type F_CLOSEDIR implemented

Operation type F_OPENDIR implemented

Operation type F_READDIR implemented

Operation type F_SEEKDIR implemented

Operation type F_TELLDIR implemented

Operation type FLUSH optional

Operation type FSYNC optional HAVE_SETXATTR

Operation type FSYNCDIR optional

Opearation type GET_KEY (give me a key of your keyspace)

Opearation type GET_KEY_CONTENT (Send me flare contents of this key)

Operation type GETATTR. Need -D_FILE_OFFSET_BITS=64 to compile cleanly

Operaiton type GETDIR. deprecated, see readdir

Operation type HEARTBEAT (see if server is still available)

Operation type INIT optional

Opearation type JOIN (existing network)

Operation type LINK

Operation type MKDIR

Operation type MKNOD

Operation type OPEN

Operation type OPENDIR optional

Opearation type PUT_KEY (take a key of my keyspace)

Operation type READ

Operation type READDIR implemented

Operation type READLINK

Operation type RELEASE optional

Operation type RELEASEDIR optional

Operation type REMOVE_FLARE_FROM_PARENT implemented

Operation type RENAME

Operation type RMDIR

Operation type STATFS

Operation type SYMLINK

Opearation type TRANSMIT_NODE (tell me about another node)

Operation type TRUNCATE

Operation type UNLINK

Operation type UTIME

Operation type WRITE

an alias for flare system client

an alias for flare system client

identify a magma server exchanging data

This file last modified Wednesday, 09-Jan-2008 20:02:26 CET