1 //--------------------------------------------------------------------------
2 // Copyright (C) 2015-2021 Cisco and/or its affiliates. All rights reserved.
3 //
4 // This program is free software; you can redistribute it and/or modify it
5 // under the terms of the GNU General Public License Version 2 as published
6 // by the Free Software Foundation.  You may not use, modify or distribute
7 // this program under any other version of the GNU General Public License.
8 //
9 // This program is distributed in the hope that it will be useful, but
10 // WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 // General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License along
15 // with this program; if not, write to the Free Software Foundation, Inc.,
16 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17 //--------------------------------------------------------------------------
18 
19 // tcp_state_closed.h author davis mcpherson <davmcphe@cisco.com>
20 // Created on: Jul 30, 2015
21 
22 #ifndef TCP_STATE_CLOSED_H
23 #define TCP_STATE_CLOSED_H
24 
25 #include "tcp_state_handler.h"
26 
27 class TcpStateClosed : public TcpStateHandler
28 {
29 public:
30     TcpStateClosed(TcpStateMachine&);
31 
32     bool syn_sent(TcpSegmentDescriptor&, TcpStreamTracker&) override;
33     bool syn_recv(TcpSegmentDescriptor&, TcpStreamTracker&) override;
34     bool ack_sent(TcpSegmentDescriptor&, TcpStreamTracker&) override;
35     bool ack_recv(TcpSegmentDescriptor&, TcpStreamTracker&) override;
36     bool data_seg_sent(TcpSegmentDescriptor&, TcpStreamTracker&) override;
37     bool data_seg_recv(TcpSegmentDescriptor&, TcpStreamTracker&) override;
38     bool fin_sent(TcpSegmentDescriptor&, TcpStreamTracker&) override;
39     bool fin_recv(TcpSegmentDescriptor&, TcpStreamTracker&) override;
40     bool rst_recv(TcpSegmentDescriptor&, TcpStreamTracker&) override;
41 
42     bool do_pre_sm_packet_actions(TcpSegmentDescriptor&, TcpStreamTracker&) override;
43     bool do_post_sm_packet_actions(TcpSegmentDescriptor&, TcpStreamTracker&) override;
44 };
45 
46 #endif
47 
48