src/vfer_rcpd.c File Reference

A server program that accepts one connection from vfer_rcp and receives or sends a file. More...

#include "vfer_rcp.h"

Go to the source code of this file.

Data Structures

struct  rcpd_info
 info structure used for parsing the command line arguments and options of test_rcpd More...

Functions

int main (int argc, char **argv)
int parse_opts (int argc, char **argv, FILE **testing_out)
void print_help (char *prog, int verbose)
int rcpd_connect ()
void sig_handler (int sig)

Variables

vfer_fd connect_skt
int fd
rcpd_info info
vfer_fd listen_skt
char * optarg
int opterr
int optind
int optopt
int sig_mark = 0


Detailed Description

A server program that accepts one connection from vfer_rcp and receives or sends a file.

Author:
Ivan Beschastnikh
This program implements reliable transfer of data over the vfer protocol.

Definition in file vfer_rcpd.c.


Function Documentation

int main ( int  argc,
char **  argv 
)

main

Definition at line 219 of file vfer_rcpd.c.

int parse_opts ( int  argc,
char **  argv,
FILE **  testing_out 
)

Parses the command line arguments and options to main()

This function will print descriptive errors it finds to stdout

Parameters:
argc is the argc argument to main
argv is the argv argument to main
testing_out is a FILE** type that is either set to NULL here or to 'stdout' depending on verbosity args
Returns:
1 on success [stop service] 0 on success [start service] -1 on error -2 if help option was specified

void print_help ( char *  prog,
int  verbose 
)

Prints a verbose or a non-verbose usage page

Parameters:
prog program name to use in the help page
verbose controls whether the page is verbose(1) or not(0)

int rcpd_connect (  ) 

This function makes preliminary api calls to vfer lib to create a listening socket

Returns:
-1 on error

0 on success

Definition at line 180 of file vfer_rcpd.c.

void sig_handler ( int  sig  ) 

This function is a catcher of SIGINT signal, installed in main()

Definition at line 212 of file vfer_rcpd.c.


Variable Documentation

vfer_fd connect_skt

Definition at line 45 of file vfer_rcpd.c.

int fd

Definition at line 48 of file vfer_rcpd.c.

rcpd_info info

Definition at line 47 of file vfer_rcpd.c.

vfer_fd listen_skt

Definition at line 46 of file vfer_rcpd.c.

char* optarg

int opterr

int optind

int optopt

int sig_mark = 0

Definition at line 49 of file vfer_rcpd.c.


Generated on Tue Aug 8 16:07:22 2006 for VFER by  doxygen 1.4.7