Distributed Hash Table File System for Linux








mount.magma.c File Reference

#include <pthread.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <dirent.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include <stddef.h>
#include <netinet/in.h>
#include <utime.h>
#include <fuse.h>
#include <compat/fuse_opt.h>
#include "magma.h"

Defines

#define USE_SINGLE_SERVER_SOCKET
#define SOCKET_POOL   20
#define START_HEARTBEAT_THREAD   1
#define HEARTBEAT_INTERVAL   30
#define DEFAULT_SERVER_IP_ADDRESS   "127.0.0.1"
#define RECONNECT_TRIALS   8
#define FUSE_USE_VERSION   22
#define _REENTRANT
#define _POSIX_PTHREAD_SEMANTICS
#define _FILE_OFFSET_BITS   64
#define GET_CONTEXT
#define MAGMA_OPT(t, p, v)   { t, offsetof(struct magma, p), v }

Enumerations

enum  { KEY_HELP, KEY_VERSION }

Functions

void init_syslog ()
int open_server_connection (char *ipaddr)
int init_server_connection ()
void close_server_connection ()
void * heartbeat_cycle (void *v)
void usage (char *progname)
int main (int argc, char *argv[])

Variables

uint16_t debug = 0
int log_enabled = 0
char * ipaddr
int port
int server_socket = 0
pthread_mutex_t server_mutex
pthread_mutexattr_t server_mutex_attr
int usage_already_printed = 0

Define Documentation

#define _FILE_OFFSET_BITS   64

#define _POSIX_PTHREAD_SEMANTICS

#define _REENTRANT

#define DEFAULT_SERVER_IP_ADDRESS   "127.0.0.1"

#define FUSE_USE_VERSION   22

#define GET_CONTEXT

Value:

uid_t uid = 0;\
        gid_t gid = 0;\
        struct fuse_context *ctx = fuse_get_context();\
        if (ctx != NULL) { uid = ctx->uid; gid = ctx->gid; }

#define HEARTBEAT_INTERVAL   30

#define MAGMA_OPT ( t,
p,
 )     { t, offsetof(struct magma, p), v }

#define RECONNECT_TRIALS   8

#define SOCKET_POOL   20

#define START_HEARTBEAT_THREAD   1

#define USE_SINGLE_SERVER_SOCKET


Enumeration Type Documentation

anonymous enum

Enumerator:
KEY_HELP 
KEY_VERSION 


Function Documentation

void close_server_connection (  ) 

void* heartbeat_cycle ( void *  v  ) 

int init_server_connection (  ) 

void init_syslog (  ) 

int main ( int  argc,
char *  argv[] 
)

int open_server_connection ( char *  ipaddr  ) 

void usage ( char *  progname  ) 


Variable Documentation

uint16_t debug = 0

char* ipaddr

int log_enabled = 0

int port

pthread_mutex_t server_mutex

pthread_mutexattr_t server_mutex_attr

int server_socket = 0

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