00001 //--------------------------------------------------------------------------
00002 // Copyright (C) 2015-2017 Cisco and/or its affiliates. All rights reserved.
00003 //
00004 // This program is free software; you can redistribute it and/or modify it
00005 // under the terms of the GNU General Public License Version 2 as published
00006 // by the Free Software Foundation. You may not use, modify or distribute
00007 // this program under any other version of the GNU General Public License.
00008 //
00009 // This program is distributed in the hope that it will be useful, but
00010 // WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00012 // General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License along
00015 // with this program; if not, write to the Free Software Foundation, Inc.,
00016 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017 //--------------------------------------------------------------------------
00018
00019 // tcp_state_machine.h author davis mcpherson <davmcphe@@cisco.com>
00020 // Created on: Jul 29, 2015
00021
00022 #ifndef TCP_STATE_MACHINE_H
00023 #define TCP_STATE_MACHINE_H
00024
00025 #include "stream/libtcp/tcp_state_handler.h"
00026 #include "stream/libtcp/tcp_stream_tracker.h"
00027 #include "stream/libtcp/tcp_segment_descriptor.h"
00028
00029 class TcpStateMachine
00030 {
00031 public:
00032 virtual ~TcpStateMachine();
00033
00034 virtual void register_state_handler(TcpStreamTracker::TcpState, TcpStateHandler&);
00035 virtual bool eval(TcpSegmentDescriptor&, TcpStreamTracker&, TcpStreamTracker&);
00036
00037 protected:
00038 TcpStateMachine();
00039
00040 TcpStateHandler* tcp_state_handlers[ TcpStreamTracker::TCP_MAX_STATES ];
00041 };
00042
00043 #endif
00044
END OF CODE