#include <server.h>
Go to the source code of this file.
Defines | |
#define | TEST_MODE |
Functions | |
int | main (int argc, char *argv[]) |
char* | readcommand (int fd) |
Read command form file. More... | |
command_t | parsecommand (const char *input, command_t status) |
Parse command. More... | |
command_t | executecommand (command_t c, command_t status, int fd) |
Executes command. More... | |
void | lostconnection (int sig) |
SIGPIPE handler. More... | |
int | acquireandsendsamples (int fd, int no_of_samples, int channel, char resolution) |
Acquires and sends samples. More... | |
void | stopstream (int sig) |
SIGTERM handler. More... | |
void | cleanallchildren (int sig) |
SIGCHLD handler. More... | |
Variables | |
const char* | help |
Definition in file server.c.
|
Value: |
|
Acquires and sends samples. Acquire and send samples. TODO: This function should be replaced with a call to new program that continously stores data samples and proviedes them at request. That project layer is not yet completly implemented (Why? Ask project coordinator Zvonko Kostanjcar at zkostanj@diana.zesoi.fer.hr).
|
|
SIGCHLD handler. Cleans all child processes.
|
|
Executes command. Executes command and prints useful messages about execution.
|
|
SIGPIPE handler. Handles SIGPIPE signal (broken pipe). This signal is received when client terminates connection. Terminates child proces and cleans up everything.
|
|
Parse command. Input buffer is parsed for ADC-ZESOI protocol commands.
|
|
Read command form file. Reads an aribtrary length command form file specified by file descriptor.
|
|
SIGTERM handler. Handles SIGTERM signal for child process when child process is sending data stream.
|
|
Initial value: "ADC-ZESOI server v" VERSION ".\n" "Usage:\n" " server [options]\n" "Options are:\n" " -h --help Prints this help message.\n" " -t --test Test mode - server creates random data (default).\n" " --notest Test mode disabled. Can't be used together with -t.\n" " -p <port>, --port=<port> Sets port to <port>. If ommited default port\n" " for ADC-ZESOI protocol (port 7777) is used.\n" " -a --auth Requires authentification. Default is no\n" " authentfication required (option -n).\n" " -n --noauth Disable authentification (default). Can't be\n" " used together with -a.\n" " --nullok Allow access for passwordless accounts.\n" " --maxretries=<retries> Sets maximum number of login attempts to\n" " given number. Default value is 3 login attempts.\n" " -v --version Show version number.\n" |