Distributed Hash Table File System for Linux








parseargs.h File Reference

#include "magma_setup.h"

Defines

#define HOST_NAME_MAX   255
#define SHA_DIGEST_LENGTH   20
#define MAGMA_VERSION   PACKAGE_VERSION
#define MAGMA_PORT   12000
#define DEFAULT_BUFFER   1024
#define DEFAULT_HASHPATH   "/tmp/magma/"
#define DEFAULT_BANDWIDTH   56
#define DEFAULT_STORAGE   1
#define DEFAULT_NICKNAME   "magmanode"
#define DEFAULT_SERVERNAME   "localhost"
#define DEFAULT_IPADDR   "127.0.0.1"
#define READCHUNK   1024

Functions

void usage (char *msg)
void parse_args (int argc, char **argv)

Variables

char * progname
uint16_t debug
int port
char * nickname
char * servername
char * ipaddr
char * hashpath
int bandwidth
int storage
int bootstrap
char * bootserver
int bootport
char * secretkey
int single_thread

Define Documentation

#define DEFAULT_BANDWIDTH   56

#define DEFAULT_BUFFER   1024

#define DEFAULT_HASHPATH   "/tmp/magma/"

#define DEFAULT_IPADDR   "127.0.0.1"

#define DEFAULT_NICKNAME   "magmanode"

#define DEFAULT_SERVERNAME   "localhost"

#define DEFAULT_STORAGE   1

#define HOST_NAME_MAX   255

#define MAGMA_PORT   12000

#define MAGMA_VERSION   PACKAGE_VERSION

#define READCHUNK   1024

#define SHA_DIGEST_LENGTH   20


Function Documentation

void parse_args ( int  argc,
char **  argv 
)

magmad command line parsing code

Parameters:
argc number of command line arguments
argv vector of command line arguments

void usage ( char *  msg  ) 

print an usage message, describing magmad command line options

Parameters:
msg pointer to a string to be added at the end of usage() output


Variable Documentation

int bandwidth

Declared bandwidth

int bootport

Remote boot server port used if bootstrap is false

char* bootserver

Remote boot server address used if bootstrap is false

int bootstrap

If true, this node should bootstrap a new network, if false this node should join an existing one

uint16_t debug

debug mask

char* hashpath

Local storage directory

char* ipaddr

String rappresentation of internet address of this node

char* nickname

Node short name

int port

Internet port passed on command line

char* progname

the name magmad was invoked with

char* secretkey

Secret key used to join a network

char* servername

Fully Qualified Domain Name of this node

if true operate without spawning threads (not respected everywhere

int storage

Declared storage

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