mirror of https://github.com/OISF/suricata
suricata: expose the SuricataContext with a function
Expose the "SuricataContext" required by Rust as a function. During normal startup we register this context with the Rust code, but plugins written in Rust will need to get the same registration done, but to do this in a plugin, the plugin code must call and set the context within its address space.pull/5356/head
parent
87a91e6aa8
commit
335e4e728f
@ -0,0 +1,26 @@
|
||||
/* Copyright (C) 2020 Open Information Security Foundation
|
||||
*
|
||||
* You can copy, redistribute or modify this Program under the terms of
|
||||
* the GNU General Public License version 2 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
|
||||
* version 2 along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "suricata-common.h"
|
||||
#include "rust-context.h"
|
||||
|
||||
SuricataContext suricata_context;
|
||||
|
||||
SuricataContext *SCGetContext(void)
|
||||
{
|
||||
return &suricata_context;
|
||||
}
|
||||
Loading…
Reference in New Issue