src/vsl_test_ssh.c File Reference

Test client for SSH Starting Mode. More...

#include "vfer_api.h"
#include "vsl_util.h"
#include "vsl_api.h"
#include "vfer_tests.h"

Go to the source code of this file.

Defines

#define READWRITE(NR)
#define SETMARK(SOCK)
#define TESTSIZE   63*1024

Enumerations

enum  status { READ, WROTE }

Functions

int main (int argc, char **argv)


Detailed Description

Test client for SSH Starting Mode.

Author:
Nikolaus Rath
First argument has to be the path to the server.

Definition in file vsl_test_ssh.c.


Define Documentation

#define READWRITE ( NR   ) 

Value:

do { \
        /* Handle read */ \
        if ( s ## NR ## _stat == WROTE ) { \
            ASSERT( vsl_selecttest(&sock ## NR) == VSL_READABLE || \
                    vsl_selecttest(&sock ## NR) == 0); \
            if ( vsl_selecttest(&sock ## NR) == VSL_READABLE ) { \
                ASSERT( vsl_recv(&sock ## NR, buf2, buflen) == buflen ); \
                ASSERT( memcmp(buf, buf2, buflen) == 0 ); \
            } \
            s ## NR ## _stat = READ; \
            num_read++; \
        } \
        /* Handle write */  \
        else if ( s ## NR ## _stat == READ ) { \
            ASSERT( vsl_selecttest(&sock ## NR) == VSL_WRITABLE || \
                    vsl_selecttest(&sock ## NR) == 0); \
            if ( vsl_selecttest(&sock ## NR) == VSL_WRITABLE ) { \
                ASSERT( vsl_send(&sock ## NR, buf, buflen) == buflen ); \
            } \
            s ## NR ## _stat = WROTE; \
            num_written++; \
        } \
} while(0)

#define SETMARK ( SOCK   ) 

Value:

do { \
        if ( s ## SOCK ## _stat == WROTE ) \
            ASSERT( vsl_selectmark(&sock ## SOCK, VSL_READABLE | VSL_EXCEPTION) == 0 ); \
        else \
            ASSERT( vsl_selectmark(&sock ## SOCK, VSL_WRITABLE | VSL_EXCEPTION) == 0 ); \
} while(0)

#define TESTSIZE   63*1024

Definition at line 29 of file vsl_test_ssh.c.


Enumeration Type Documentation

enum status

Enumerator:
READ 
WROTE 

Definition at line 23 of file vsl_test_ssh.c.


Function Documentation

int main ( int  argc,
char **  argv 
)

main

Definition at line 34 of file vsl_test_ssh.c.


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