"Fossies" - the Fresh Open Source Software Archive

Member "snort-2.9.17/src/preprocessors/Stream6/snort_stream_udp.h" (16 Oct 2020, 2749 Bytes) of package /linux/misc/snort-2.9.17.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "snort_stream_udp.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.9.16.1_vs_2.9.17.

    1 /****************************************************************************
    2  *
    3  * Copyright (C) 2014-2020 Cisco and/or its affiliates. All rights reserved.
    4  * Copyright (C) 2004-2013 Sourcefire, Inc.
    5  *
    6  * This program is free software; you can redistribute it and/or modify
    7  * it under the terms of the GNU General Public License Version 2 as
    8  * published by the Free Software Foundation.  You may not use, modify or
    9  * distribute this program under any other version of the GNU General
   10  * Public License.
   11  *
   12  * This program is distributed in the hope that it will be useful,
   13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15  * GNU General Public License for more details.
   16  *
   17  * You should have received a copy of the GNU General Public License
   18  * along with this program; if not, write to the Free Software
   19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
   20  *
   21  ****************************************************************************/
   22 
   23 #ifndef STREAM_UDP_H_
   24 #define STREAM_UDP_H_
   25 
   26 #include "ipv6_port.h"
   27 #include "session_api.h"
   28 #include "stream_common.h"
   29 #include "sfPolicy.h"
   30 
   31 void StreamCleanUdp(void);
   32 void StreamResetUdp(void);
   33 void StreamInitUdp(void);
   34 void StreamUdpPolicyInit(StreamUdpConfig *, char *);
   35 int StreamVerifyUdpConfig(struct _SnortConfig *, StreamUdpConfig *, tSfPolicyId);
   36 int StreamProcessUdp(Packet *, SessionControlBlock *, StreamUdpPolicy *, SessionKey *);
   37 void UdpUpdateDirection(SessionControlBlock *ssn, char dir,
   38                         sfaddr_t* ip, uint16_t port);
   39 SessionControlBlock *GetLWUdpSession(const SessionKey *key);
   40 void s5UdpSetPortFilterStatus(
   41         struct _SnortConfig *sc,
   42         unsigned short port,
   43         uint16_t status,
   44         tSfPolicyId policyId,
   45         int parsing
   46         );
   47 void s5UdpUnsetPortFilterStatus(
   48         struct _SnortConfig *sc,
   49         unsigned short port,
   50         uint16_t status,
   51         tSfPolicyId policyId,
   52         int parsing
   53         );
   54 int s5UdpGetPortFilterStatus(
   55         struct _SnortConfig *sc,
   56         unsigned short port,
   57         tSfPolicyId policyId,
   58         int parsing
   59         );
   60 int s5UdpGetIPSPortFilterStatus(
   61         struct _SnortConfig *sc, 
   62         unsigned short sport, 
   63         unsigned short dport, 
   64         tSfPolicyId policyId);
   65 void InspectPortFilterUdp (Packet *p);
   66 void StreamUdpConfigFree(StreamUdpConfig *);
   67 
   68 uint32_t StreamGetUdpPrunes(void);
   69 void StreamResetUdpPrunes(void);
   70 void UdpSessionCleanup(void *scb);
   71 
   72 void SessionUDPReload(uint32_t max_sessions, uint16_t pruningTimeout, uint16_t nominalTimeout);
   73 unsigned SessionUDPReloadAdjust(unsigned maxWork);
   74 
   75 size_t get_udp_used_mempool();
   76 
   77 #endif /* STREAM_UDP_H_ */