/***************************************************************************
 * DBS: Distributed Benchmark System
 * Copyright (c) 1995, 1996, 1997 Yukio Murayama
 * Copyright (c) 1995, 1996, 1997 Nara Institute of Science and Technology
 * All rights reserved.
 *
 * Permission to use, copy, modify and distribute this software and its
 * documentation is hereby granted, provided only with the following
 * conditions are satisfied:
 *
 * 1. Both the copyright notice and this permission notice appear in
 *    all copies of the software, derivative works or modified versions,
 *    and any portions thereof, and that both notices appear in
 *    supporting documentation.
 * 2. All advertising materials mentioning features or use of this
 *    software must display the following acknowledgement:
 *      This product includes software developed by Nara Institute of 
 *      Science and Technology and its contributors.
 * 3. Neither the name of Nara Institute of Science and Technology nor 
 *    the names of its contributors may be used to endorse or promote 
 *    products derived from this software without specific prior written
 *    permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND NARA 
 * INSTITUTE OF SCIENCE AND TECHNOLOGY DISCLAIMS ANY LIABILITY OF 
 * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF 
 * THIS SOFTWARE. ALSO, THERE IS NO WARRANTY IMPLIED OR OTHERWISE, 
 * NOR IS SUPPORT PROVIDED.
 *
 * Feedback of the results generated from any improvements or
 * extensions made to this software would be much appreciated.
 * Any such feedback should be sent to:
 *
 *  Yukio Murayama
 *  E-mail:  <yukio-m@is.aist-nara.ac.jp>
 *  URL:     <http://shika.aist-nara.ac.jp/member/yukio-m/index.html>
 *  Address: Graduate School of Information Science, 
 *           Nara Institute of Science and Technology,
 *           Takayama 8916-5, Ikoma, Nara, Japan
 *
 * Nara Institute of Science and Technology has the rights to 
 * redistribute these changes.
 ***************************************************************************/
/*****************************************************************
 * Distributed Benchmark System
 * DBSC Header File
 * $Revision: 1.10 $
 * $Date: 1997/02/11 03:14:32 $
 * $Author: yukio-m $
 *****************************************************************/

/*
 * Define STATUS 
 *
 * scan_cmd.sender.status
 * scan_cmd.receiver.status
 */

#define S_CLOSE       1
#define S_CONNECT     2
#define S_GO          3
#define S_ERROR       4
#define S_NORMAL      5

/*
 * Data Structure For DBSC Modules
 */

/**** START of DBS Control's list ****/
struct scan_traffic {
    int    size;
    int    packet;
    double esleep;
    double isleep;
    struct scan_traffic *next;
};

struct send_recv {
    int    fd;       /* file descripter for TCP Connection */
    char   hostname_cmd[MAXHOSTNAME]; /* Optional : (same hostname) */
    char   hostname[MAXHOSTNAME];
    int    port;
    int    traffic_n;
    int    send_buff;
    int    recv_buff;
    int    mem_align;
    int    align_offset;
    int    align_pad;
    int    so_debug;
    int    tcp_trace;
    int    record_buff;
    int    trace_buff;
    int    no_delay;
    int    mss;
    struct scan_traffic *traffic;
    int    status;
};

struct scan_cmd {
    struct send_recv sender;
    struct send_recv receiver;
    char   filename[CHAR_ARRAY];
    int    serverflg;
    int    transport;
    int    total_size;
    int    total_message;
    int    send_times;
    int    connection_mode;
    struct timeval start_time;
    struct timeval end_time;
    struct scan_cmd *next;
};

/***** Time Record Structure *****/

struct record_d {
    struct timeval tv;
    int    packet_no;
    int    packet_size;
};

struct record {
    struct record_d *d;
    int    n;
};

struct record_net {
    struct record_d_net *d;
    int    n;
};

struct tcp_trace_net {
    struct tcp_trace_d_net *d;
    int     n;
};


/**** END of DBS Control list ****/

int  scan __P((struct scan_cmd **scan, FILE *fp));


syntax highlighted by Code2HTML, v. 0.9.1