OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions | Variables
castopts.c File Reference
#include <stdio.h>
#include <openssl/e_os2.h>
#include <signal.h>
#include <time.h>
#include <sys/types.h>
#include <sys/times.h>
#include <openssl/cast.h>
#include "c_enc.c"

Go to the source code of this file.

Macros

#define TIMES
 
#define CAST_DEFAULT_OPTIONS
 
#define CAST_encrypt   CAST_encrypt_normal
 
#define CAST_decrypt   CAST_decrypt_normal
 
#define CAST_cbc_encrypt   CAST_cbc_encrypt_normal
 
#define CAST_PTR
 
#define CAST_encrypt   CAST_encrypt_ptr
 
#define CAST_decrypt   CAST_decrypt_ptr
 
#define CAST_cbc_encrypt   CAST_cbc_encrypt_ptr
 
#define CAST_PTR2
 
#define CAST_encrypt   CAST_encrypt_ptr2
 
#define CAST_decrypt   CAST_decrypt_ptr2
 
#define CAST_cbc_encrypt   CAST_cbc_encrypt_ptr2
 
#define HZ   100.0
 
#define BUFSIZE   ((long)1024)
 
#define START   0
 
#define STOP   1
 
#define print_name(name)   fprintf(stderr,"Doing %s %ld times\n",name,cb);
 
#define time_it(func, name, index)
 
#define print_it(name, index)
 
#define COND(d)   (count != (d))
 
#define COUNT(d)   (d)
 

Functions

double Time_F (int s)
 
int main (int argc, char **argv)
 

Variables

long run =0
 

Macro Definition Documentation

#define BUFSIZE   ((long)1024)

Definition at line 150 of file castopts.c.

#define CAST_cbc_encrypt   CAST_cbc_encrypt_normal

Definition at line 133 of file castopts.c.

#define CAST_cbc_encrypt   CAST_cbc_encrypt_ptr

Definition at line 133 of file castopts.c.

#define CAST_cbc_encrypt   CAST_cbc_encrypt_ptr2

Definition at line 133 of file castopts.c.

#define CAST_decrypt   CAST_decrypt_normal

Definition at line 132 of file castopts.c.

#define CAST_decrypt   CAST_decrypt_ptr

Definition at line 132 of file castopts.c.

#define CAST_decrypt   CAST_decrypt_ptr2

Definition at line 132 of file castopts.c.

#define CAST_DEFAULT_OPTIONS

Definition at line 104 of file castopts.c.

#define CAST_encrypt   CAST_encrypt_normal

Definition at line 131 of file castopts.c.

#define CAST_encrypt   CAST_encrypt_ptr

Definition at line 131 of file castopts.c.

#define CAST_encrypt   CAST_encrypt_ptr2

Definition at line 131 of file castopts.c.

#define CAST_PTR

Definition at line 113 of file castopts.c.

#define CAST_PTR2

Definition at line 126 of file castopts.c.

#define COND (   d)    (count != (d))
#define COUNT (   d)    (d)
#define HZ   100.0

Definition at line 141 of file castopts.c.

#define print_it (   name,
  index 
)
Value:
fprintf(stderr,"%s bytes per sec = %12.2f (%5.1fuS)\n",name, \
tm[index]*8,1.0e6/tm[index]);

Definition at line 232 of file castopts.c.

#define print_name (   name)    fprintf(stderr,"Doing %s %ld times\n",name,cb);

Definition at line 214 of file castopts.c.

#define START   0

Definition at line 172 of file castopts.c.

#define STOP   1

Definition at line 173 of file castopts.c.

#define time_it (   func,
  name,
  index 
)
Value:
print_name(name); \
Time_F(START); \
for (count=0,run=1; COND(cb); count+=4) \
{ \
unsigned long d[2]; \
func(d,&sch); \
func(d,&sch); \
func(d,&sch); \
func(d,&sch); \
} \
tm[index]=Time_F(STOP); \
fprintf(stderr,"%ld %s's in %.2f second\n",count,name,tm[index]); \
tm[index]=((double)COUNT(cb))/tm[index];

Definition at line 217 of file castopts.c.

#define TIMES

Definition at line 63 of file castopts.c.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 236 of file castopts.c.

double Time_F ( int  s)

Variable Documentation

long run =0

Definition at line 151 of file castopts.c.