2 * -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
5 * Copyright (c) 1998-2001 R. Carbone <rocco@tecsiel.it> - Finsiel S.p.A.
6 * -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 extern unsigned long z3950_apduno;
34 extern struct timeval first_apdu;
35 extern struct timeval last_apdu;
39 * The structure containing information about all the apdus
43 int tag; /* unique apdu tag identifier */
44 char * name; /* user printable name of the apdu */
45 int minlen; /* min length of bytes off wire (all optional fields absent) */
46 const struct timeval * t; /* the time the apdu was captured */
47 char * calling; /* source ip address */
48 int srcport; /* source port */
49 char * called; /* destination ip address */
50 int dstport; /* source port */
54 z3950apdu * parseable (unsigned char * apdu, int len);
56 char * srchost (void);
58 char * dsthost (void);
63 * time stamp presentation formats
65 #define DELTA_FMT 1 /* the time since receiving the previous apdu */
66 #define ABS_FMT 2 /* the current time */
67 #define RELATIVE_FMT 3 /* the time relative to the first apdu received */
70 char * timestamp (const struct timeval * t, int fmt);