/* * Paglo Crawler * Copyright (C) 2006-2008 Paglo Labs Inc. All rights reserved. * www.paglo.com * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ROGUESCANNER //--------------------------------------------------------------------------- #ifndef ParseSFlowH #define ParseSFlowH //--------------------------------------------------------------------------- #include "Packet.h" //--------------------------------------------------------------------------- typedef struct { u_int32_t HeaderProtocol; u_int32_t FrameLength; u_int32_t Stripped; u_int32_t HeaderLength; } TSFSampledHeader; typedef struct { u_int32_t Version; u_int32_t AddressType; /* IPv4 == 0x01 */ struct in_addr AgentAddress; u_int32_t SubAgentId; u_int32_t SequenceNumber; u_int32_t Uptime; u_int32_t NumSamples; } TSFIPv4DatagramHeader; typedef struct { u_int32_t SequenceNumber; u_int32_t SourceId; u_int32_t SamplingRate; u_int32_t SamplePool; u_int32_t Drops; u_int32_t InputIfIndex; u_int32_t OutputIfIndex; u_int32_t NRecords; } TSFFlowSample; typedef struct { u_int32_t Format; u_int32_t Length; } TSFSampleHeader; typedef TSFSampleHeader TSFFlowRecordHeader; //--------------------------------------------------------------------------- void ParseSFlow(TPacket *Pkt); //--------------------------------------------------------------------------- #endif #endif // !ROGUESCANNER