patch #8333
[mldonkey.git] / tools / pandora / tcpprintcomponent.h
blobe55cdfadb9a348908a841eaa6a2c259a19e9a969
1 /* ---*-C++-*---------------------------------------------------------------
2 Copyright (C) 1999, 2000, 2001, 2002, 2003 Simon Patarin, INRIA
4 This file is part of Pandora, the Flexible Monitoring Platform.
6 Pandora is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 Pandora is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Pandora; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
22 #ifndef TCPPRINT_COMPONENT_H
23 #define TCPPRINT_COMPONENT_H
25 #include <libpandora/global.h>
27 #include <libpandora/outputcomponent.h>
29 class Packet;
31 class TCPPrintComponent : public OutputComponent {
32 private:
33 static int id;
34 int cnx;
36 public:
37 component_init(TCPPrintComponent, 1);
38 TCPPrintComponent(void) :cnx(0) { }
39 virtual ~TCPPrintComponent(void) { }
41 virtual bool add(Packet *p);
42 virtual void setup(void) { cnx = ++id; }
43 virtual void cleanup(void) { cnx = -1; }
46 #endif /* TCPPRINT_COMPONENT_H */