Main Page   Namespace List   Alphabetical List   Compound List   File List   Compound Members   File Members  

pdu.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                                  pdu.h
00003                              -------------------
00004     begin                : Fri Feb 1 2002
00005     copyright            : (C) 2002 by Constantinos A. Kotsokalis
00006     email                : ckotso@grnet.gr
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef PDU_H
00019 #define PDU_H
00020 
00025 class PDU;
00026 
00027 #include "common.h"
00028 #include "flow.h"
00029 #include "timeslot.h"
00030 
00031 #include <map>
00032 
00033 // The datapacket's header (any version)
00034 union FlowHeader {
00035     V1Header v1;
00036     V5Header v5;
00037     V8Header v8;
00038 };
00039 
00040 class PDU {
00041 private:
00042     FlowHeader flowheader;
00043     // An array of flows, as provided by the datagram sent to us by the router
00044     Flow flows[MAX_FLOWS];
00045     uint16_t version;
00046     uint16_t numflows;
00047     uint32_t usec, umsec, sysuptime;
00048     // The datagram body
00049     uint8_t flowbody[MAX_FLOW_BODY];
00050 
00051 public:
00052     // Constructor
00053     PDU();
00054     // Destructor
00055     virtual ~PDU();
00056     // Method that sets the datapacket data from the raw datagram passed as an argument
00057     virtual void dpSet(uint16_t&, uint16_t&, uint32_t&, uint32_t&, uint32_t&, uint8_t *, uint8_t aggtype=0);
00058     // Method that adds all flows to a timeslot
00059     virtual void addFlows(TimeSlot *);
00060 };
00061 
00062 #endif

Generated on Thu Jun 26 00:23:12 2003 for Panoptis by doxygen1.2.18