File: TestRecord.h

package info (click to toggle)
pchar 1.5-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 1,020 kB
  • sloc: cpp: 12,972; sh: 2,510; makefile: 765
file content (62 lines) | stat: -rw-r--r-- 1,705 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// -*- c++ -*-
//
// $Id: TestRecord.h 1082 2005-02-12 19:40:04Z bmah $
//
// TestRecord.h
// Bruce A. Mah <bmah@acm.org>
//
// This work was first produced by an employee of Sandia National
// Laboratories under a contract with the U.S. Department of Energy.
// Sandia National Laboratories dedicates whatever right, title or
// interest it may have in this software to the public. Although no
// license from Sandia is needed to copy and use this software,
// copying and using the software might infringe the rights of
// others. This software is provided as-is. SANDIA DISCLAIMS ANY
// WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
//
// Encapsulation of test data structure
//

#ifndef TESTRECORD_H
#define TESTRECORD_H

#include <stdio.h>

#if STDC_HEADERS
#include <stdlib.h>
#include <string.h>
#endif /* STDC_HEADERS */

#if HAVE_UNISTD_H
#include <sys/types.h>
#endif /* HAVE_UNISTD_H */

#include <sys/time.h>

#include "pc.h"
#include "Pctest.h"

class TestRecord {

  public:

    bool used;			// has this TestRecord been used yet?
    TestRecord *next;		// for supporting a SLL of these things

    unsigned int size;		// bytes in the packet in this test
    unsigned int hops;		// TTL used for this packet
    unsigned int burst;		// burst size for multi-packet tests
    struct timeval tvstart;	// starting timestamp
    struct timeval tv;		// RTT recorded
    void *icmpSourceAddress;		// source address of ICMP packet
    int icmpSourceAddressLength;	// length of source address
    PctestActionType result;	// test result
    unsigned int replsize;	// bytes in the response packet

    char *htoa(Pctest *pct);
    static TestRecord *atoh(char *, Pctest *);

};

#endif /* TESTRECORD_H */