protocol.h File Reference
#include "magma_setup.h"#include "protocol_pkt.h"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));
- Parameters:
-
socket resulting network socket remoteip remote server IP address remoteport remote server port
an alias to get_flare_client_socket()
| #define get_node_client_socket | ( | socket, | |||
| remoteip, | |||||
| remoteport | ) |
Value:
socket = get_client_socket(remoteip,remoteport);\ xsend(socket, &PEER_TYPE_NODE, sizeof(peertype_t));
- 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
| const optype_t MAGMA_OP_TYPE_CHMOD |
Operation type CHMOD
| const optype_t MAGMA_OP_TYPE_CHOWN |
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
| const optype_t MAGMA_OP_TYPE_FLUSH |
Operation type FLUSH optional
| const optype_t MAGMA_OP_TYPE_FSYNC |
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
| const optype_t MAGMA_OP_TYPE_GETDIR |
Operaiton type GETDIR. deprecated, see readdir
Operation type HEARTBEAT (see if server is still available)
| const optype_t MAGMA_OP_TYPE_INIT |
Operation type INIT optional
| const optype_t MAGMA_OP_TYPE_JOIN |
Opearation type JOIN (existing network)
| const optype_t MAGMA_OP_TYPE_LINK |
Operation type LINK
| const optype_t MAGMA_OP_TYPE_MKDIR |
Operation type MKDIR
| const optype_t MAGMA_OP_TYPE_MKNOD |
Operation type MKNOD
| const optype_t MAGMA_OP_TYPE_OPEN |
Operation type OPEN
Operation type OPENDIR optional
Opearation type PUT_KEY (take a key of my keyspace)
| const optype_t MAGMA_OP_TYPE_READ |
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
| const optype_t MAGMA_OP_TYPE_RENAME |
Operation type RENAME
| const optype_t MAGMA_OP_TYPE_RMDIR |
Operation type RMDIR
| const optype_t MAGMA_OP_TYPE_STATFS |
Operation type STATFS
Operation type SYMLINK
Opearation type TRANSMIT_NODE (tell me about another node)
Operation type TRUNCATE
| const optype_t MAGMA_OP_TYPE_UNLINK |
Operation type UNLINK
| const optype_t MAGMA_OP_TYPE_UTIME |
Operation type UTIME
| const optype_t MAGMA_OP_TYPE_WRITE |
Operation type WRITE
| const peertype_t PEER_TYPE_CLIENT |
| const peertype_t PEER_TYPE_FUSE |
an alias for flare system client
| const peertype_t PEER_TYPE_MOUNT |
an alias for flare system client
| const peertype_t PEER_TYPE_NODE |
identify a magma server exchanging data