• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OISF / suricata / 22731000775

05 Mar 2026 06:16PM UTC coverage: 79.035% (-0.2%) from 79.283%
22731000775

Pull #14956

github

web-flow
Merge 0d6798ed1 into 7e97dfd52
Pull Request #14956: Draft: windows-pe keyword

1312 of 1773 new or added lines in 11 files covered. (74.0%)

684 existing lines in 56 files now uncovered.

266003 of 336563 relevant lines covered (79.04%)

3075360.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

6.06
/rust/sys/src/sys.rs
1
// This file is automatically generated. Do not edit.
2

3
pub const SC_PACKAGE_VERSION: &[u8; 10] = b"9.0.0-dev\0";
4
pub type __intmax_t = ::std::os::raw::c_long;
5
pub type intmax_t = __intmax_t;
6
#[repr(u32)]
7
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
8
pub enum AppProtoEnum {
9
    ALPROTO_UNKNOWN = 0,
10
    ALPROTO_FAILED = 1,
11
    ALPROTO_HTTP1 = 2,
12
    ALPROTO_FTP = 3,
13
    ALPROTO_SMTP = 4,
14
    ALPROTO_TLS = 5,
15
    ALPROTO_SSH = 6,
16
    ALPROTO_IMAP = 7,
17
    ALPROTO_JABBER = 8,
18
    ALPROTO_SMB = 9,
19
    ALPROTO_DCERPC = 10,
20
    ALPROTO_IRC = 11,
21
    ALPROTO_DNS = 12,
22
    ALPROTO_MODBUS = 13,
23
    ALPROTO_ENIP = 14,
24
    ALPROTO_DNP3 = 15,
25
    ALPROTO_NFS = 16,
26
    ALPROTO_NTP = 17,
27
    ALPROTO_FTPDATA = 18,
28
    ALPROTO_TFTP = 19,
29
    ALPROTO_IKE = 20,
30
    ALPROTO_KRB5 = 21,
31
    ALPROTO_QUIC = 22,
32
    ALPROTO_DHCP = 23,
33
    ALPROTO_SIP = 24,
34
    ALPROTO_RFB = 25,
35
    ALPROTO_MQTT = 26,
36
    ALPROTO_PGSQL = 27,
37
    ALPROTO_TELNET = 28,
38
    ALPROTO_WEBSOCKET = 29,
39
    ALPROTO_LDAP = 30,
40
    ALPROTO_DOH2 = 31,
41
    ALPROTO_TEMPLATE = 32,
42
    ALPROTO_RDP = 33,
43
    ALPROTO_HTTP2 = 34,
44
    ALPROTO_BITTORRENT_DHT = 35,
45
    ALPROTO_POP3 = 36,
46
    ALPROTO_MDNS = 37,
47
    ALPROTO_HTTP = 38,
48
    ALPROTO_MAX_STATIC = 39,
49
}
50
pub type AppProto = u16;
51
extern "C" {
52
    #[doc = " \\brief Maps the ALPROTO_*, to its string equivalent.\n\n \\param alproto App layer protocol id.\n\n \\retval String equivalent for the alproto."]
53
    pub fn AppProtoToString(alproto: AppProto) -> *const ::std::os::raw::c_char;
54
}
55
extern "C" {
56
    pub fn AppProtoNewProtoFromString(proto_name: *const ::std::os::raw::c_char) -> AppProto;
57
}
58
extern "C" {
59
    pub fn AppProtoRegisterProtoString(
60
        alproto: AppProto, proto_name: *const ::std::os::raw::c_char,
61
    );
62
}
63
pub const SC_API_VERSION: u64 = 2304;
64
#[doc = " Structure to define a Suricata plugin."]
65
#[repr(C)]
66
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
67
pub struct SCPlugin_ {
68
    pub version: u64,
69
    pub suricata_version: *const ::std::os::raw::c_char,
70
    pub name: *const ::std::os::raw::c_char,
71
    pub plugin_version: *const ::std::os::raw::c_char,
72
    pub license: *const ::std::os::raw::c_char,
73
    pub author: *const ::std::os::raw::c_char,
74
    pub Init: ::std::option::Option<unsafe extern "C" fn()>,
75
}
76
impl Default for SCPlugin_ {
77
    fn default() -> Self {
×
78
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
79
        unsafe {
×
80
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
81
            s.assume_init()
×
82
        }
×
83
    }
×
84
}
85
#[doc = " Structure to define a Suricata plugin."]
86
pub type SCPlugin = SCPlugin_;
87
pub type SCPluginRegisterFunc = ::std::option::Option<unsafe extern "C" fn() -> *mut SCPlugin>;
88
#[repr(C)]
89
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
90
pub struct SCCapturePlugin_ {
91
    pub name: *mut ::std::os::raw::c_char,
92
    pub Init: ::std::option::Option<
93
        unsafe extern "C" fn(
94
            args: *const ::std::os::raw::c_char,
95
            plugin_slot: ::std::os::raw::c_int,
96
            receive_slot: ::std::os::raw::c_int,
97
            decode_slot: ::std::os::raw::c_int,
98
        ),
99
    >,
100
    pub ThreadInit: ::std::option::Option<
101
        unsafe extern "C" fn(
102
            ctx: *mut ::std::os::raw::c_void,
103
            thread_id: ::std::os::raw::c_int,
104
            thread_ctx: *mut *mut ::std::os::raw::c_void,
105
        ) -> ::std::os::raw::c_int,
106
    >,
107
    pub ThreadDeinit: ::std::option::Option<
108
        unsafe extern "C" fn(
109
            ctx: *mut ::std::os::raw::c_void,
110
            thread_ctx: *mut ::std::os::raw::c_void,
111
        ) -> ::std::os::raw::c_int,
112
    >,
113
    pub GetDefaultMode:
114
        ::std::option::Option<unsafe extern "C" fn() -> *const ::std::os::raw::c_char>,
115
    pub entries: SCCapturePlugin___bindgen_ty_1,
116
}
117
#[repr(C)]
118
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
119
pub struct SCCapturePlugin___bindgen_ty_1 {
120
    pub tqe_next: *mut SCCapturePlugin_,
121
    pub tqe_prev: *mut *mut SCCapturePlugin_,
122
}
123
impl Default for SCCapturePlugin___bindgen_ty_1 {
124
    fn default() -> Self {
×
125
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
126
        unsafe {
×
127
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
128
            s.assume_init()
×
129
        }
×
130
    }
×
131
}
132
impl Default for SCCapturePlugin_ {
133
    fn default() -> Self {
×
134
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
135
        unsafe {
×
136
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
137
            s.assume_init()
×
138
        }
×
139
    }
×
140
}
141
pub type SCCapturePlugin = SCCapturePlugin_;
142
extern "C" {
143
    pub fn SCPluginRegisterCapture(arg1: *mut SCCapturePlugin) -> ::std::os::raw::c_int;
144
}
145
#[repr(C)]
146
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
147
pub struct SCAppLayerPlugin_ {
148
    pub name: *const ::std::os::raw::c_char,
149
    pub Register: ::std::option::Option<unsafe extern "C" fn()>,
150
    pub KeywordsRegister: ::std::option::Option<unsafe extern "C" fn()>,
151
    pub logname: *const ::std::os::raw::c_char,
152
    pub confname: *const ::std::os::raw::c_char,
153
    pub dir: u8,
154
    pub Logger: ::std::option::Option<
155
        unsafe extern "C" fn(
156
            tx: *const ::std::os::raw::c_void,
157
            jb: *mut ::std::os::raw::c_void,
158
        ) -> bool,
159
    >,
160
}
161
impl Default for SCAppLayerPlugin_ {
162
    fn default() -> Self {
×
163
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
164
        unsafe {
×
165
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
166
            s.assume_init()
×
167
        }
×
168
    }
×
169
}
170
pub type SCAppLayerPlugin = SCAppLayerPlugin_;
171
extern "C" {
172
    pub fn SCPluginRegisterAppLayer(arg1: *mut SCAppLayerPlugin) -> ::std::os::raw::c_int;
173
}
174
#[doc = " Structure of a configuration parameter."]
175
#[repr(C)]
176
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
177
pub struct SCConfNode_ {
178
    pub name: *mut ::std::os::raw::c_char,
179
    pub val: *mut ::std::os::raw::c_char,
180
    pub is_seq: ::std::os::raw::c_int,
181
    pub final_: ::std::os::raw::c_int,
182
    pub parent: *mut SCConfNode_,
183
    pub head: SCConfNode___bindgen_ty_1,
184
    pub next: SCConfNode___bindgen_ty_2,
185
}
186
#[repr(C)]
187
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
188
pub struct SCConfNode___bindgen_ty_1 {
189
    pub tqh_first: *mut SCConfNode_,
190
    pub tqh_last: *mut *mut SCConfNode_,
191
}
192
impl Default for SCConfNode___bindgen_ty_1 {
193
    fn default() -> Self {
×
194
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
195
        unsafe {
×
196
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
197
            s.assume_init()
×
198
        }
×
199
    }
×
200
}
201
#[repr(C)]
202
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
203
pub struct SCConfNode___bindgen_ty_2 {
204
    pub tqe_next: *mut SCConfNode_,
205
    pub tqe_prev: *mut *mut SCConfNode_,
206
}
207
impl Default for SCConfNode___bindgen_ty_2 {
208
    fn default() -> Self {
×
209
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
210
        unsafe {
×
211
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
212
            s.assume_init()
×
213
        }
×
214
    }
×
215
}
216
impl Default for SCConfNode_ {
217
    fn default() -> Self {
×
218
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
219
        unsafe {
×
220
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
221
            s.assume_init()
×
222
        }
×
223
    }
×
224
}
225
#[doc = " Structure of a configuration parameter."]
226
pub type SCConfNode = [u64; 8usize];
227
extern "C" {
228
    pub fn SCConfInit();
229
}
230
extern "C" {
231
    pub fn SCConfDeInit();
232
}
233
extern "C" {
234
    pub fn SCConfGetRootNode() -> *mut SCConfNode;
235
}
236
extern "C" {
237
    pub fn SCConfGet(
238
        name: *const ::std::os::raw::c_char, vptr: *mut *const ::std::os::raw::c_char,
239
    ) -> ::std::os::raw::c_int;
240
}
241
extern "C" {
242
    pub fn SCConfGetInt(
243
        name: *const ::std::os::raw::c_char, val: *mut intmax_t,
244
    ) -> ::std::os::raw::c_int;
245
}
246
extern "C" {
247
    pub fn SCConfGetBool(
248
        name: *const ::std::os::raw::c_char, val: *mut ::std::os::raw::c_int,
249
    ) -> ::std::os::raw::c_int;
250
}
251
extern "C" {
252
    pub fn SCConfGetDouble(
253
        name: *const ::std::os::raw::c_char, val: *mut f64,
254
    ) -> ::std::os::raw::c_int;
255
}
256
extern "C" {
257
    pub fn SCConfGetFloat(
258
        name: *const ::std::os::raw::c_char, val: *mut f32,
259
    ) -> ::std::os::raw::c_int;
260
}
261
extern "C" {
262
    pub fn SCConfGetTime(
263
        name: *const ::std::os::raw::c_char, val: *mut u64,
264
    ) -> ::std::os::raw::c_int;
265
}
266
extern "C" {
267
    pub fn SCConfSet(
268
        name: *const ::std::os::raw::c_char, val: *const ::std::os::raw::c_char,
269
    ) -> ::std::os::raw::c_int;
270
}
271
extern "C" {
272
    pub fn SCConfSetFromString(
273
        input: *const ::std::os::raw::c_char, final_: ::std::os::raw::c_int,
274
    ) -> ::std::os::raw::c_int;
275
}
276
extern "C" {
277
    pub fn SCConfSetFinal(
278
        name: *const ::std::os::raw::c_char, val: *const ::std::os::raw::c_char,
279
    ) -> ::std::os::raw::c_int;
280
}
281
extern "C" {
282
    pub fn SCConfDump();
283
}
284
extern "C" {
285
    pub fn SCConfNodeDump(node: *const SCConfNode, prefix: *const ::std::os::raw::c_char);
286
}
287
extern "C" {
288
    pub fn SCConfNodeNew() -> *mut SCConfNode;
289
}
290
extern "C" {
291
    pub fn SCConfNodeFree(arg1: *mut SCConfNode);
292
}
293
extern "C" {
294
    pub fn SCConfGetNode(key: *const ::std::os::raw::c_char) -> *mut SCConfNode;
295
}
296
extern "C" {
297
    pub fn SCConfCreateContextBackup();
298
}
299
extern "C" {
300
    pub fn SCConfRestoreContextBackup();
301
}
302
extern "C" {
303
    pub fn SCConfNodeLookupChild(
304
        node: *const SCConfNode, key: *const ::std::os::raw::c_char,
305
    ) -> *mut SCConfNode;
306
}
307
extern "C" {
308
    pub fn SCConfNodeLookupChildValue(
309
        node: *const SCConfNode, key: *const ::std::os::raw::c_char,
310
    ) -> *const ::std::os::raw::c_char;
311
}
312
extern "C" {
313
    pub fn SCConfNodeRemove(arg1: *mut SCConfNode);
314
}
315
extern "C" {
316
    pub fn SCConfRegisterTests();
317
}
318
extern "C" {
319
    pub fn SCConfNodeChildValueIsTrue(
320
        node: *const SCConfNode, key: *const ::std::os::raw::c_char,
321
    ) -> ::std::os::raw::c_int;
322
}
323
extern "C" {
324
    pub fn SCConfNodeChildValueIsFalse(
325
        node: *const SCConfNode, key: *const ::std::os::raw::c_char,
326
    ) -> ::std::os::raw::c_int;
327
}
328
extern "C" {
329
    pub fn SCConfValIsTrue(val: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
330
}
331
extern "C" {
332
    pub fn SCConfValIsFalse(val: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
333
}
334
extern "C" {
335
    pub fn SCConfNodePrune(node: *mut SCConfNode);
336
}
337
extern "C" {
338
    pub fn SCConfRemove(name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
339
}
340
extern "C" {
341
    pub fn SCConfNodeHasChildren(node: *const SCConfNode) -> bool;
342
}
343
extern "C" {
344
    pub fn SCConfGetChildWithDefault(
345
        base: *const SCConfNode, dflt: *const SCConfNode, name: *const ::std::os::raw::c_char,
346
    ) -> *mut SCConfNode;
347
}
348
extern "C" {
349
    pub fn SCConfNodeLookupKeyValue(
350
        base: *const SCConfNode, key: *const ::std::os::raw::c_char,
351
        value: *const ::std::os::raw::c_char,
352
    ) -> *mut SCConfNode;
353
}
354
extern "C" {
355
    pub fn SCConfGetChildValue(
356
        base: *const SCConfNode, name: *const ::std::os::raw::c_char,
357
        vptr: *mut *const ::std::os::raw::c_char,
358
    ) -> ::std::os::raw::c_int;
359
}
360
extern "C" {
361
    pub fn SCConfGetChildValueInt(
362
        base: *const SCConfNode, name: *const ::std::os::raw::c_char, val: *mut intmax_t,
363
    ) -> ::std::os::raw::c_int;
364
}
365
extern "C" {
366
    pub fn SCConfGetChildValueBool(
367
        base: *const SCConfNode, name: *const ::std::os::raw::c_char,
368
        val: *mut ::std::os::raw::c_int,
369
    ) -> ::std::os::raw::c_int;
370
}
371
extern "C" {
372
    pub fn SCConfGetChildValueWithDefault(
373
        base: *const SCConfNode, dflt: *const SCConfNode, name: *const ::std::os::raw::c_char,
374
        vptr: *mut *const ::std::os::raw::c_char,
375
    ) -> ::std::os::raw::c_int;
376
}
377
extern "C" {
378
    pub fn SCConfGetChildValueIntWithDefault(
379
        base: *const SCConfNode, dflt: *const SCConfNode, name: *const ::std::os::raw::c_char,
380
        val: *mut intmax_t,
381
    ) -> ::std::os::raw::c_int;
382
}
383
extern "C" {
384
    pub fn SCConfGetChildValueBoolWithDefault(
385
        base: *const SCConfNode, dflt: *const SCConfNode, name: *const ::std::os::raw::c_char,
386
        val: *mut ::std::os::raw::c_int,
387
    ) -> ::std::os::raw::c_int;
388
}
389
extern "C" {
390
    pub fn SCConfNodeIsSequence(node: *const SCConfNode) -> ::std::os::raw::c_int;
391
}
392
extern "C" {
393
    pub fn SCConfSetIfaceNode(
394
        ifaces_node_name: *const ::std::os::raw::c_char, iface: *const ::std::os::raw::c_char,
395
    ) -> *mut SCConfNode;
396
}
397
extern "C" {
398
    pub fn SCConfSetRootAndDefaultNodes(
399
        ifaces_node_name: *const ::std::os::raw::c_char, iface: *const ::std::os::raw::c_char,
400
        if_root: *mut *mut SCConfNode, if_default: *mut *mut SCConfNode,
401
    ) -> ::std::os::raw::c_int;
402
}
403
extern "C" {
404
    pub fn SCConfNodeGetNodeOrCreate(
405
        parent: *mut SCConfNode, name: *const ::std::os::raw::c_char, final_: ::std::os::raw::c_int,
406
    ) -> *mut SCConfNode;
407
}
408
extern "C" {
409
    pub fn SCConfGetFirstNode(parent: *const SCConfNode) -> *mut SCConfNode;
410
}
411
extern "C" {
412
    pub fn SCConfGetNextNode(node: *const SCConfNode) -> *mut SCConfNode;
413
}
414
extern "C" {
415
    pub fn SCConfGetValueNode(node: *const SCConfNode) -> *const ::std::os::raw::c_char;
416
}
417
#[repr(C)]
418
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
419
pub struct ThreadVars_ {
420
    _unused: [u8; 0],
421
}
422
pub type ThreadVars = u8;
423
#[repr(C)]
424
#[derive(Debug, Copy, Clone)]
425
pub struct Flow_ {
426
    _unused: [u8; 0],
427
}
428
pub type Flow = Flow_;
429
#[repr(C)]
430
#[derive(Debug, Copy, Clone)]
431
pub struct SCJsonBuilder {
432
    _unused: [u8; 0],
433
}
434
#[repr(C)]
435
#[derive(Debug, Copy, Clone)]
436
pub struct Packet_ {
437
    _unused: [u8; 0],
438
}
439
pub type Packet = Packet_;
440
pub type ThreadId = u32;
441
#[repr(u32)]
442
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
443
pub enum SCOutputJsonLogDirection {
444
    LOG_DIR_PACKET = 0,
445
    LOG_DIR_FLOW = 1,
446
    LOG_DIR_FLOW_TOCLIENT = 2,
447
    LOG_DIR_FLOW_TOSERVER = 3,
448
}
449
pub type EveJsonSimpleTxLogFunc = ::std::option::Option<
450
    unsafe extern "C" fn(
451
        arg1: *const ::std::os::raw::c_void,
452
        arg2: *mut ::std::os::raw::c_void,
453
    ) -> bool,
454
>;
455
#[repr(C)]
456
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
457
pub struct EveJsonSimpleAppLayerLogger {
458
    pub LogTx: EveJsonSimpleTxLogFunc,
459
    pub name: *const ::std::os::raw::c_char,
460
}
461
impl Default for EveJsonSimpleAppLayerLogger {
462
    fn default() -> Self {
×
463
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
464
        unsafe {
×
465
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
466
            s.assume_init()
×
467
        }
×
468
    }
×
469
}
470
extern "C" {
471
    pub fn SCEveJsonSimpleGetLogger(alproto: AppProto) -> *mut EveJsonSimpleAppLayerLogger;
472
}
473
#[repr(C)]
474
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
475
pub struct EveJsonTxLoggerRegistrationData {
476
    pub confname: *const ::std::os::raw::c_char,
477
    pub logname: *const ::std::os::raw::c_char,
478
    pub alproto: AppProto,
479
    pub dir: u8,
480
    pub LogTx: EveJsonSimpleTxLogFunc,
481
}
482
impl Default for EveJsonTxLoggerRegistrationData {
483
    fn default() -> Self {
×
484
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
485
        unsafe {
×
486
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
487
            s.assume_init()
×
488
        }
×
489
    }
×
490
}
491
extern "C" {
492
    pub fn SCOutputEvePreRegisterLogger(
493
        reg_data: EveJsonTxLoggerRegistrationData,
494
    ) -> ::std::os::raw::c_int;
495
}
496
#[doc = " \\brief Function type for EVE file-type initialization."]
497
pub type SCEveFileTypeInitFunc = ::std::option::Option<
498
    unsafe extern "C" fn(
499
        conf: *const SCConfNode,
500
        threaded: bool,
501
        init_data: *mut *mut ::std::os::raw::c_void,
502
    ) -> ::std::os::raw::c_int,
503
>;
504
#[doc = " \\brief Function type for EVE file-type thread initialization."]
505
pub type SCEveFileTypeThreadInitFunc = ::std::option::Option<
506
    unsafe extern "C" fn(
507
        init_data: *const ::std::os::raw::c_void,
508
        thread_id: ThreadId,
509
        thread_data: *mut *mut ::std::os::raw::c_void,
510
    ) -> ::std::os::raw::c_int,
511
>;
512
#[doc = " \\brief Function type for EVE file-type writes."]
513
pub type SCEveFileTypeWriteFunc = ::std::option::Option<
514
    unsafe extern "C" fn(
515
        buffer: *const ::std::os::raw::c_char,
516
        buffer_len: ::std::os::raw::c_int,
517
        init_data: *const ::std::os::raw::c_void,
518
        thread_data: *mut ::std::os::raw::c_void,
519
    ) -> ::std::os::raw::c_int,
520
>;
521
#[doc = " \\brief Function type for EVE file-type thread deinitialization."]
522
pub type SCEveFileTypeThreadDeinitFunc = ::std::option::Option<
523
    unsafe extern "C" fn(
524
        init_data: *const ::std::os::raw::c_void,
525
        thread_data: *mut ::std::os::raw::c_void,
526
    ),
527
>;
528
#[doc = " \\brief Function type for EVE file-type deinitialization."]
529
pub type SCEveFileTypeDeinitFunc =
530
    ::std::option::Option<unsafe extern "C" fn(init_data: *mut ::std::os::raw::c_void)>;
531
#[doc = " \\brief Structure used to define an EVE output file type.\n\n EVE filetypes implement an object with a file-like interface and\n are used to output EVE log records to files, syslog, or\n database. They can be built-in such as the syslog (see\n SyslogInitialize()) and nullsink (see NullLogInitialize()) outputs,\n registered by a library user or dynamically loaded as a plugin.\n\n The life cycle of an EVE filetype is:\n   - Init: called once for each EVE instance using this filetype\n   - ThreadInit: called once for each output thread\n   - Write: called for each log record\n   - ThreadDeinit: called once for each output thread on exit\n   - Deinit: called once for each EVE instance using this filetype on exit\n\n Examples:\n - built-in syslog: \\ref src/output-eve-syslog.c\n - built-in nullsink: \\ref src/output-eve-null.c\n - example plugin: \\ref examples/plugins/c-json-filetype/filetype.c\n\n ### Multi-Threaded Note:\n\n The EVE logging system can be configured by the Suricata user to\n run in threaded or non-threaded modes. In the default non-threaded\n mode, ThreadInit will only be called once and the filetype does not\n need to be concerned with threads.\n\n However, in **threaded** mode, ThreadInit will be called multiple\n times and the filetype needs to be thread aware and thread-safe. If\n utilizing a unique resource such as a file for each thread then you\n may be naturally thread safe. However, if sharing a single file\n handle across all threads then your filetype will have to take care\n of locking, etc."]
532
#[repr(C)]
533
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
534
pub struct SCEveFileType_ {
535
    #[doc = " \\brief The name of the output, used in the configuration.\n\n This name is used by the configuration file to specify the EVE\n filetype used.\n\n For example:\n\n \\code{.yaml}\n outputs:\n   - eve-log:\n       filetype: my-output-name\n \\endcode"]
536
    pub name: *const ::std::os::raw::c_char,
537
    #[doc = " \\brief Function to initialize this filetype.\n\n \\param conf The ConfNode of the `eve-log` configuration\n     section this filetype is being initialized for\n\n \\param threaded Flag to specify if the EVE sub-systems is in\n     threaded mode or not\n\n \\param init_data An output pointer for filetype specific data\n\n \\retval 0 on success, -1 on failure"]
538
    pub Init: SCEveFileTypeInitFunc,
539
    #[doc = " \\brief Initialize thread specific data.\n\n Initialize any thread specific data. For example, if\n implementing a file output you might open the files here, so\n you have one output file per thread.\n\n \\param init_data Data setup during Init\n\n \\param thread_id A unique ID to differentiate this thread from\n     others. If EVE is not in threaded mode this will be called\n     once with a ThreadId of 0. In threaded mode the ThreadId of\n     0 correlates to the main Suricata thread.\n\n \\param thread_data Output pointer for any data required by this\n     thread.\n\n \\retval 0 on success, -1 on failure"]
540
    pub ThreadInit: SCEveFileTypeThreadInitFunc,
541
    #[doc = " \\brief Called for each EVE log record.\n\n The Write function is called for each log EVE log record. The\n provided buffer contains a fully formatted EVE record in JSON\n format.\n\n \\param buffer The fully formatted JSON EVE log record\n\n \\param buffer_len The length of the buffer\n\n \\param init_data The data setup in the call to Init\n\n \\param thread_data The data setup in the call to ThreadInit\n\n \\retval 0 on success, -1 on failure"]
542
    pub Write: SCEveFileTypeWriteFunc,
543
    #[doc = " \\brief Called to deinitialize each thread.\n\n This function will be called for each thread. It is where any\n resources allocated in ThreadInit should be released.\n\n \\param init_data The data setup in Init\n\n \\param thread_data The data setup in ThreadInit"]
544
    pub ThreadDeinit: SCEveFileTypeThreadDeinitFunc,
545
    #[doc = " \\brief Final call to deinitialize this filetype.\n\n Called, usually on exit to deinitialize and free any resources\n allocated during Init.\n\n \\param init_data Data setup in the call to Init."]
546
    pub Deinit: SCEveFileTypeDeinitFunc,
547
    pub entries: SCEveFileType___bindgen_ty_1,
548
}
549
#[repr(C)]
550
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
551
pub struct SCEveFileType___bindgen_ty_1 {
552
    pub tqe_next: *mut SCEveFileType_,
553
    pub tqe_prev: *mut *mut SCEveFileType_,
554
}
555
impl Default for SCEveFileType___bindgen_ty_1 {
556
    fn default() -> Self {
×
557
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
558
        unsafe {
×
559
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
560
            s.assume_init()
×
561
        }
×
562
    }
×
563
}
564
impl Default for SCEveFileType_ {
565
    fn default() -> Self {
×
566
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
567
        unsafe {
×
568
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
569
            s.assume_init()
×
570
        }
×
571
    }
×
572
}
573
#[doc = " \\brief Structure used to define an EVE output file type.\n\n EVE filetypes implement an object with a file-like interface and\n are used to output EVE log records to files, syslog, or\n database. They can be built-in such as the syslog (see\n SyslogInitialize()) and nullsink (see NullLogInitialize()) outputs,\n registered by a library user or dynamically loaded as a plugin.\n\n The life cycle of an EVE filetype is:\n   - Init: called once for each EVE instance using this filetype\n   - ThreadInit: called once for each output thread\n   - Write: called for each log record\n   - ThreadDeinit: called once for each output thread on exit\n   - Deinit: called once for each EVE instance using this filetype on exit\n\n Examples:\n - built-in syslog: \\ref src/output-eve-syslog.c\n - built-in nullsink: \\ref src/output-eve-null.c\n - example plugin: \\ref examples/plugins/c-json-filetype/filetype.c\n\n ### Multi-Threaded Note:\n\n The EVE logging system can be configured by the Suricata user to\n run in threaded or non-threaded modes. In the default non-threaded\n mode, ThreadInit will only be called once and the filetype does not\n need to be concerned with threads.\n\n However, in **threaded** mode, ThreadInit will be called multiple\n times and the filetype needs to be thread aware and thread-safe. If\n utilizing a unique resource such as a file for each thread then you\n may be naturally thread safe. However, if sharing a single file\n handle across all threads then your filetype will have to take care\n of locking, etc."]
574
pub type SCEveFileType = SCEveFileType_;
575
extern "C" {
576
    pub fn SCRegisterEveFileType(arg1: *mut SCEveFileType) -> bool;
577
}
578
extern "C" {
579
    pub fn SCEveFindFileType(name: *const ::std::os::raw::c_char) -> *mut SCEveFileType;
580
}
581
#[doc = " \\brief Function type for EVE callbacks.\n\n The function type for callbacks registered with\n SCEveRegisterCallback. This function will be called with the\n SCJsonBuilder just prior to the top-level object being closed. New\n fields may be added, however, there is no way to alter existing\n objects already added to the SCJsonBuilder.\n\n \\param tv The ThreadVars for the thread performing the logging.\n \\param p Packet if available.\n \\param f Flow if available.\n \\param user User data provided during callback registration."]
582
pub type SCEveUserCallbackFn = ::std::option::Option<
583
    unsafe extern "C" fn(
584
        tv: *mut ThreadVars,
585
        p: *const Packet,
586
        f: *mut Flow,
587
        jb: *mut SCJsonBuilder,
588
        user: *mut ::std::os::raw::c_void,
589
    ),
590
>;
591
extern "C" {
592
    #[doc = " \\brief Register a callback for adding extra information to EVE logs.\n\n Allow users to register a callback for each EVE log. The callback\n is called just before the root object on the SCJsonBuilder is to be\n closed.\n\n New objects and fields can be appended, but existing entries cannot be modified.\n\n Packet and Flow will be provided if available, but will otherwise be\n NULL.\n\n Limitations: At this time the callbacks will only be called for EVE\n loggers that use SCJsonBuilder, notably this means it won't be called\n for stats records at this time.\n\n \\returns true if callback is registered, false is not due to memory\n     allocation error."]
593
    pub fn SCEveRegisterCallback(
594
        fn_: SCEveUserCallbackFn, user: *mut ::std::os::raw::c_void,
595
    ) -> bool;
596
}
597
extern "C" {
598
    #[doc = " \\internal\n\n Run EVE callbacks."]
599
    pub fn SCEveRunCallbacks(
600
        tv: *mut ThreadVars, p: *const Packet, f: *mut Flow, jb: *mut SCJsonBuilder,
601
    );
602
}
603
extern "C" {
604
    pub fn SCSigTablePreRegister(
605
        KeywordsRegister: ::std::option::Option<unsafe extern "C" fn()>,
606
    ) -> ::std::os::raw::c_int;
607
}
608
extern "C" {
609
    pub fn SCSigTableHasKeyword(keyword: *const ::std::os::raw::c_char) -> bool;
610
}
611
extern "C" {
612
    pub fn SCDetectHelperKeywordSetCleanCString(id: u16);
613
}
614
#[repr(C)]
615
#[derive(Debug, Copy, Clone)]
616
pub struct DetectEngineCtx_ {
617
    _unused: [u8; 0],
618
}
619
pub type DetectEngineCtx = DetectEngineCtx_;
620
#[repr(C)]
621
#[derive(Debug, Copy, Clone)]
622
pub struct Signature_ {
623
    _unused: [u8; 0],
624
}
625
pub type Signature = Signature_;
626
#[repr(C)]
627
#[derive(Debug, Copy, Clone)]
628
pub struct SigMatch_ {
629
    _unused: [u8; 0],
630
}
631
pub type SigMatch = SigMatch_;
632
extern "C" {
633
    pub fn SCDetectBufferSetActiveList(
634
        de_ctx: *mut DetectEngineCtx, s: *mut Signature, list: ::std::os::raw::c_int,
635
    ) -> ::std::os::raw::c_int;
636
}
637
extern "C" {
638
    pub fn SCDetectSignatureAddTransform(
639
        s: *mut Signature, transform: ::std::os::raw::c_int, options: *mut ::std::os::raw::c_void,
640
    ) -> ::std::os::raw::c_int;
641
}
642
#[repr(C)]
643
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
644
pub struct InspectionBuffer {
645
    #[doc = "< active pointer, points either to ::buf or ::orig"]
646
    pub inspect: *const u8,
647
    pub inspect_offset: u64,
648
    #[doc = "< size of active data. See to ::len or ::orig_len"]
649
    pub inspect_len: u32,
650
    #[doc = "< is initialized. ::inspect might be NULL if transform lead to 0 size"]
651
    pub initialized: bool,
652
    #[doc = "< DETECT_CI_FLAGS_* for use with DetectEngineContentInspection"]
653
    pub flags: u8,
654
    #[doc = "< how much is in use"]
655
    pub len: u32,
656
    pub buf: *mut u8,
657
    #[doc = "< size of the memory allocation"]
658
    pub size: u32,
659
    pub orig_len: u32,
660
    pub orig: *const u8,
661
}
662
impl Default for InspectionBuffer {
663
    fn default() -> Self {
×
664
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
665
        unsafe {
×
666
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
667
            s.assume_init()
×
668
        }
×
669
    }
×
670
}
671
#[repr(C)]
672
#[derive(Debug, Copy, Clone)]
673
pub struct DetectEngineThreadCtx_ {
674
    _unused: [u8; 0],
675
}
676
pub type DetectEngineThreadCtx = DetectEngineThreadCtx_;
677
extern "C" {
678
    pub fn SCInspectionBufferCheckAndExpand(
679
        buffer: *mut InspectionBuffer, min_size: u32,
680
    ) -> *mut u8;
681
}
682
extern "C" {
683
    pub fn SCInspectionBufferTruncate(buffer: *mut InspectionBuffer, buf_len: u32);
684
}
685
#[repr(C)]
686
#[derive(Debug, Copy, Clone)]
687
pub struct SigMatchCtx_ {
688
    _unused: [u8; 0],
689
}
690
pub type SigMatchCtx = SigMatchCtx_;
691
pub type InspectionMultiBufferGetDataPtr = ::std::option::Option<
692
    unsafe extern "C" fn(
693
        det_ctx: *mut DetectEngineThreadCtx_,
694
        txv: *const ::std::os::raw::c_void,
695
        flow_flags: u8,
696
        local_id: u32,
697
        buf: *mut *const u8,
698
        buf_len: *mut u32,
699
    ) -> bool,
700
>;
701
pub type InspectionSingleBufferGetDataPtr = ::std::option::Option<
702
    unsafe extern "C" fn(
703
        txv: *const ::std::os::raw::c_void,
704
        flow_flags: u8,
705
        buf: *mut *const u8,
706
        buf_len: *mut u32,
707
    ) -> bool,
708
>;
709
#[doc = " App-layer light version of SigTableElmt"]
710
#[repr(C)]
711
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
712
pub struct SCSigTableAppLiteElmt {
713
    #[doc = " keyword name"]
714
    pub name: *const ::std::os::raw::c_char,
715
    #[doc = " keyword description"]
716
    pub desc: *const ::std::os::raw::c_char,
717
    #[doc = " keyword documentation url"]
718
    pub url: *const ::std::os::raw::c_char,
719
    #[doc = " flags SIGMATCH_*"]
720
    pub flags: u32,
721
    #[doc = " function callback to parse and setup keyword in rule"]
722
    pub Setup: ::std::option::Option<
723
        unsafe extern "C" fn(
724
            arg1: *mut DetectEngineCtx,
725
            arg2: *mut Signature,
726
            arg3: *const ::std::os::raw::c_char,
727
        ) -> ::std::os::raw::c_int,
728
    >,
729
    #[doc = " function callback to free structure allocated by setup if any"]
730
    pub Free: ::std::option::Option<
731
        unsafe extern "C" fn(arg1: *mut DetectEngineCtx, arg2: *mut ::std::os::raw::c_void),
732
    >,
733
    #[doc = " function callback to match on an app-layer transaction"]
734
    pub AppLayerTxMatch: ::std::option::Option<
735
        unsafe extern "C" fn(
736
            arg1: *mut DetectEngineThreadCtx,
737
            arg2: *mut Flow,
738
            flags: u8,
739
            alstate: *mut ::std::os::raw::c_void,
740
            txv: *mut ::std::os::raw::c_void,
741
            arg3: *const Signature,
742
            arg4: *const SigMatchCtx,
743
        ) -> ::std::os::raw::c_int,
744
    >,
745
}
746
impl Default for SCSigTableAppLiteElmt {
747
    fn default() -> Self {
×
748
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
749
        unsafe {
×
750
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
751
            s.assume_init()
×
752
        }
×
753
    }
×
754
}
755
#[repr(C)]
756
#[derive(Debug, Copy, Clone)]
757
pub struct SCSigTableFileLiteElmt {
758
    pub name: *const ::std::os::raw::c_char,
759
    pub desc: *const ::std::os::raw::c_char,
760
    pub url: *const ::std::os::raw::c_char,
761
    pub flags: u32,
762
    pub FileMatch: ::std::option::Option<
763
        unsafe extern "C" fn(
764
            arg1: *mut DetectEngineThreadCtx,
765
            arg2: *mut Flow,
766
            flags: u8,
767
            file: *mut File,
768
            arg3: *const Signature,
769
            arg4: *const SigMatchCtx,
770
        ) -> ::std::os::raw::c_int,
771
    >,
772
    pub Setup: ::std::option::Option<
773
        unsafe extern "C" fn(
774
            arg1: *mut DetectEngineCtx,
775
            arg2: *mut Signature,
776
            arg3: *const ::std::os::raw::c_char,
777
        ) -> ::std::os::raw::c_int,
778
    >,
779
    pub Free: ::std::option::Option<
780
        unsafe extern "C" fn(arg1: *mut DetectEngineCtx, arg2: *mut ::std::os::raw::c_void),
781
    >,
782
}
783
impl Default for SCSigTableFileLiteElmt {
NEW
784
    fn default() -> Self {
×
NEW
785
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
NEW
786
        unsafe {
×
NEW
787
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
NEW
788
            s.assume_init()
×
NEW
789
        }
×
NEW
790
    }
×
791
}
792

793
pub const SIGMATCH_OPTIONAL_OPT: u32 = 1 << 4;
794
pub const FILE_SIG_NEED_FILE: u16 = 0x01;
795
pub const FILE_SIG_NEED_FILECONTENT: u16 = 0x08;
796
pub const SC_FILE_PE_META_F_PARSED: u16 = 1 << 0;
797
pub const SC_FILE_PE_META_F_VALID: u16 = 1 << 1;
798

799
#[repr(C)]
800
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
801
pub struct SCFilePeMeta {
802
    pub flags: u16,
803
    pub architecture: u16,
804
    pub num_sections: u16,
805
    pub subsystem: u16,
806
    pub characteristics: u16,
807
    pub dll_characteristics: u16,
808
    pub size_of_image: u32,
809
    pub entry_point_rva: u32,
810
    pub pe_offset: u32,
811
}
812

813
#[repr(C)]
814
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
815
pub struct SCTransformTableElmt {
816
    pub name: *const ::std::os::raw::c_char,
817
    pub desc: *const ::std::os::raw::c_char,
818
    pub url: *const ::std::os::raw::c_char,
819
    pub flags: u32,
820
    pub Setup: ::std::option::Option<
821
        unsafe extern "C" fn(
822
            arg1: *mut DetectEngineCtx,
823
            arg2: *mut Signature,
824
            arg3: *const ::std::os::raw::c_char,
825
        ) -> ::std::os::raw::c_int,
826
    >,
827
    pub Free: ::std::option::Option<
828
        unsafe extern "C" fn(arg1: *mut DetectEngineCtx, arg2: *mut ::std::os::raw::c_void),
829
    >,
830
    pub Transform: ::std::option::Option<
831
        unsafe extern "C" fn(
832
            arg1: *mut DetectEngineThreadCtx,
833
            arg2: *mut InspectionBuffer,
834
            context: *mut ::std::os::raw::c_void,
835
        ),
836
    >,
837
    pub TransformValidate: ::std::option::Option<
838
        unsafe extern "C" fn(
839
            content: *const u8,
840
            content_len: u16,
841
            context: *mut ::std::os::raw::c_void,
842
        ) -> bool,
843
    >,
844
    pub TransformId: ::std::option::Option<
845
        unsafe extern "C" fn(
846
            id_data: *mut *const u8,
847
            id_length: *mut u32,
848
            context: *mut ::std::os::raw::c_void,
849
        ),
850
    >,
851
}
852
impl Default for SCTransformTableElmt {
853
    fn default() -> Self {
×
854
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
855
        unsafe {
×
856
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
857
            s.assume_init()
×
858
        }
×
859
    }
×
860
}
861
extern "C" {
862
    pub fn SCDetectHelperNewKeywordId() -> ::std::os::raw::c_int;
863
}
864
extern "C" {
865
    pub fn SCDetectHelperKeywordRegister(kw: *const SCSigTableAppLiteElmt) -> u16;
866
}
867
extern "C" {
868
    pub fn SCDetectHelperKeywordAliasRegister(kwid: u16, alias: *const ::std::os::raw::c_char);
869
}
870
extern "C" {
871
    pub fn SCDetectHelperFileKeywordRegister(kw: *const SCSigTableFileLiteElmt) -> u16;
872
}
873
extern "C" {
874
    pub fn SCDetectHelperGetFilesBufferId() -> ::std::os::raw::c_int;
875
}
876
extern "C" {
877
    pub fn SCFileGetData(
878
        file: *const File, data_len_out: *mut u32, offset_out: *mut u64,
879
    ) -> *const u8;
880
}
881
extern "C" {
882
    pub fn FilePeMetaGet(file: *const File, meta: *mut SCFilePeMeta) -> bool;
883
}
884
extern "C" {
885
    pub fn FilePeMetaSet(file: *mut File, meta: *const SCFilePeMeta);
886
}
887
extern "C" {
888
    pub fn FilePeImportsGet(file: *const File) -> *const std::os::raw::c_void;
889
}
890
extern "C" {
891
    pub fn FilePeImportsSet(file: *mut File, imports: *mut std::os::raw::c_void);
892
}
893
extern "C" {
894
    pub fn SCDetectSignatureSetFileInspect(s: *mut Signature);
895
}
896
extern "C" {
897
    pub fn SCDetectHelperBufferRegister(
898
        name: *const ::std::os::raw::c_char, alproto: AppProto, direction: u8,
899
    ) -> ::std::os::raw::c_int;
900
}
901
extern "C" {
902
    pub fn SCDetectHelperBufferMpmRegister(
903
        name: *const ::std::os::raw::c_char, desc: *const ::std::os::raw::c_char,
904
        alproto: AppProto, direction: u8, GetData: InspectionSingleBufferGetDataPtr,
905
    ) -> ::std::os::raw::c_int;
906
}
907
extern "C" {
908
    pub fn SCDetectHelperBufferProgressMpmRegister(
909
        name: *const ::std::os::raw::c_char, desc: *const ::std::os::raw::c_char,
910
        alproto: AppProto, direction: u8, GetData: InspectionSingleBufferGetDataPtr,
911
        progress: ::std::os::raw::c_int,
912
    ) -> ::std::os::raw::c_int;
913
}
914
extern "C" {
915
    pub fn SCDetectHelperMultiBufferMpmRegister(
916
        name: *const ::std::os::raw::c_char, desc: *const ::std::os::raw::c_char,
917
        alproto: AppProto, direction: u8, GetData: InspectionMultiBufferGetDataPtr,
918
    ) -> ::std::os::raw::c_int;
919
}
920
extern "C" {
921
    pub fn SCDetectHelperMultiBufferProgressMpmRegister(
922
        name: *const ::std::os::raw::c_char, desc: *const ::std::os::raw::c_char,
923
        alproto: AppProto, direction: u8, GetData: InspectionMultiBufferGetDataPtr,
924
        progress: ::std::os::raw::c_int,
925
    ) -> ::std::os::raw::c_int;
926
}
927
extern "C" {
928
    pub fn SCDetectHelperTransformRegister(
929
        kw: *const SCTransformTableElmt,
930
    ) -> ::std::os::raw::c_int;
931
}
932
extern "C" {
933
    pub fn SCDetectRegisterBufferLowerMd5Callbacks(name: *const ::std::os::raw::c_char);
934
}
935
#[repr(C)]
936
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
937
pub struct DeStateStoreItem_ {
938
    pub flags: u32,
939
    pub sid: u32,
940
}
941
pub type DeStateStoreItem = DeStateStoreItem_;
942
#[repr(C)]
943
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
944
pub struct DeStateStore_ {
945
    pub store: [DeStateStoreItem; 15usize],
946
    pub next: *mut DeStateStore_,
947
}
948
impl Default for DeStateStore_ {
949
    fn default() -> Self {
×
950
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
951
        unsafe {
×
952
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
953
            s.assume_init()
×
954
        }
×
955
    }
×
956
}
957
pub type DeStateStore = DeStateStore_;
958
#[repr(C)]
959
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
960
pub struct DetectEngineStateDirection_ {
961
    #[doc = "< head of the list"]
962
    pub head: *mut DeStateStore,
963
    #[doc = "< current active store"]
964
    pub cur: *mut DeStateStore,
965
    #[doc = "< tail of the list"]
966
    pub tail: *mut DeStateStore,
967
    pub cnt: u32,
968
    pub filestore_cnt: u16,
969
    pub flags: u8,
970
}
971
impl Default for DetectEngineStateDirection_ {
972
    fn default() -> Self {
×
973
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
974
        unsafe {
×
975
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
976
            s.assume_init()
×
977
        }
×
978
    }
×
979
}
980
pub type DetectEngineStateDirection = DetectEngineStateDirection_;
981
#[repr(C)]
982
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
983
pub struct DetectEngineState_ {
984
    pub dir_state: [DetectEngineStateDirection; 2usize],
985
}
986
impl Default for DetectEngineState_ {
987
    fn default() -> Self {
×
988
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
989
        unsafe {
×
990
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
991
            s.assume_init()
×
992
        }
×
993
    }
×
994
}
995
pub type DetectEngineState = DetectEngineState_;
996
extern "C" {
997
    #[doc = " \\brief Frees a DetectEngineState object.\n\n \\param state DetectEngineState instance to free."]
998
    pub fn SCDetectEngineStateFree(state: *mut DetectEngineState);
999
}
1000
extern "C" {
1001
    pub fn SCSigMatchAppendSMToList(
1002
        arg1: *mut DetectEngineCtx, arg2: *mut Signature, arg3: u16, arg4: *mut SigMatchCtx,
1003
        arg5: ::std::os::raw::c_int,
1004
    ) -> *mut SigMatch;
1005
}
1006
extern "C" {
1007
    pub fn SCSigMatchSilentErrorEnabled(de_ctx: *const DetectEngineCtx, id: u16) -> bool;
1008
}
1009
extern "C" {
1010
    pub fn SCDetectGetLastSMFromLists(s: *const Signature, ...) -> *mut SigMatch;
1011
}
1012
extern "C" {
1013
    pub fn SCDetectSignatureSetAppProto(
1014
        s: *mut Signature, alproto: AppProto,
1015
    ) -> ::std::os::raw::c_int;
1016
}
1017
#[repr(u32)]
1018
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1019
pub enum SCError {
1020
    SC_OK = 0,
1021
    SC_ENOMEM = 1,
1022
    SC_EINVAL = 2,
1023
    SC_ELIMIT = 3,
1024
    SC_EEXIST = 4,
1025
    SC_ENOENT = 5,
1026
    SC_ERR_MAX = 6,
1027
}
1028
#[repr(C)]
1029
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
1030
pub struct SCEnumCharMap_ {
1031
    pub enum_name: *const ::std::os::raw::c_char,
1032
    pub enum_value: ::std::os::raw::c_int,
1033
}
1034
impl Default for SCEnumCharMap_ {
1035
    fn default() -> Self {
×
1036
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
1037
        unsafe {
×
1038
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
1039
            s.assume_init()
×
1040
        }
×
1041
    }
×
1042
}
1043
pub type SCEnumCharMap = SCEnumCharMap_;
1044
extern "C" {
1045
    pub fn SCMapEnumNameToValue(
1046
        arg1: *const ::std::os::raw::c_char, arg2: *mut SCEnumCharMap,
1047
    ) -> ::std::os::raw::c_int;
1048
}
1049
extern "C" {
1050
    pub fn SCMapEnumValueToName(
1051
        arg1: ::std::os::raw::c_int, arg2: *mut SCEnumCharMap,
1052
    ) -> *const ::std::os::raw::c_char;
1053
}
1054
#[repr(i32)]
1055
#[doc = " \\brief The various log levels\n NOTE: when adding new level, don't forget to update SCLogMapLogLevelToSyslogLevel()\n      or it may result in logging to syslog with LOG_EMERG priority."]
1056
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1057
pub enum SCLogLevel {
1058
    SC_LOG_NOTSET = -1,
1059
    SC_LOG_NONE = 0,
1060
    SC_LOG_ERROR = 1,
1061
    SC_LOG_WARNING = 2,
1062
    SC_LOG_NOTICE = 3,
1063
    SC_LOG_INFO = 4,
1064
    SC_LOG_PERF = 5,
1065
    SC_LOG_CONFIG = 6,
1066
    SC_LOG_DEBUG = 7,
1067
    SC_LOG_LEVEL_MAX = 8,
1068
}
1069
extern "C" {
1070
    pub fn SCLogLevel2Name(lvl: SCLogLevel) -> *const ::std::os::raw::c_char;
1071
}
1072
extern "C" {
1073
    pub fn SCLogMessage(
1074
        arg1: SCLogLevel, arg2: *const ::std::os::raw::c_char, arg3: ::std::os::raw::c_uint,
1075
        arg4: *const ::std::os::raw::c_char, arg5: *const ::std::os::raw::c_char,
1076
        message: *const ::std::os::raw::c_char,
1077
    ) -> SCError;
1078
}
1079
extern "C" {
1080
    pub fn SCFatalErrorOnInitStatic(arg1: *const ::std::os::raw::c_char);
1081
}
1082
extern "C" {
1083
    pub fn SCLogGetLogLevel() -> SCLogLevel;
1084
}
1085
pub type ProbingParserFPtr = ::std::option::Option<
1086
    unsafe extern "C" fn(
1087
        f: *const Flow,
1088
        flags: u8,
1089
        input: *const u8,
1090
        input_len: u32,
1091
        rdir: *mut u8,
1092
    ) -> AppProto,
1093
>;
1094
extern "C" {
1095
    #[doc = " PP registration"]
1096
    pub fn SCAppLayerProtoDetectPPRegister(
1097
        ipproto: u8, portstr: *const ::std::os::raw::c_char, alproto: AppProto, min_depth: u16,
1098
        max_depth: u16, direction: u8, ProbingParser1: ProbingParserFPtr,
1099
        ProbingParser2: ProbingParserFPtr,
1100
    );
1101
}
1102
extern "C" {
1103
    #[doc = "  \\retval bool 0 if no config was found, 1 if config was found"]
1104
    pub fn SCAppLayerProtoDetectPPParseConfPorts(
1105
        ipproto_name: *const ::std::os::raw::c_char, ipproto: u8,
1106
        alproto_name: *const ::std::os::raw::c_char, alproto: AppProto, min_depth: u16,
1107
        max_depth: u16, ProbingParserTs: ProbingParserFPtr, ProbingParserTc: ProbingParserFPtr,
1108
    ) -> ::std::os::raw::c_int;
1109
}
1110
extern "C" {
1111
    #[doc = " \\brief Registers a case-sensitive pattern for protocol detection."]
1112
    pub fn SCAppLayerProtoDetectPMRegisterPatternCS(
1113
        ipproto: u8, alproto: AppProto, pattern: *const ::std::os::raw::c_char, depth: u16,
1114
        offset: u16, direction: u8,
1115
    ) -> ::std::os::raw::c_int;
1116
}
1117
extern "C" {
1118
    pub fn SCAppLayerProtoDetectPMRegisterPatternCSwPP(
1119
        ipproto: u8, alproto: AppProto, pattern: *const ::std::os::raw::c_char, depth: u16,
1120
        offset: u16, direction: u8, PPFunc: ProbingParserFPtr, pp_min_depth: u16,
1121
        pp_max_depth: u16,
1122
    ) -> ::std::os::raw::c_int;
1123
}
1124
extern "C" {
1125
    #[doc = " \\brief Registers a case-insensitive pattern for protocol detection."]
1126
    pub fn SCAppLayerProtoDetectPMRegisterPatternCI(
1127
        ipproto: u8, alproto: AppProto, pattern: *const ::std::os::raw::c_char, depth: u16,
1128
        offset: u16, direction: u8,
1129
    ) -> ::std::os::raw::c_int;
1130
}
1131
extern "C" {
1132
    pub fn SCAppLayerProtoDetectPMRegisterPatternCIwPP(
1133
        ipproto: u8, alproto: AppProto, pattern: *const ::std::os::raw::c_char, depth: u16,
1134
        offset: u16, direction: u8, PPFunc: ProbingParserFPtr, pp_min_depth: u16,
1135
        pp_max_depth: u16,
1136
    ) -> ::std::os::raw::c_int;
1137
}
1138
extern "C" {
1139
    pub fn SCAppLayerRequestProtocolTLSUpgrade(f: *mut Flow) -> bool;
1140
}
1141
extern "C" {
1142
    pub fn SCAppLayerForceProtocolChange(f: *mut Flow, new_proto: AppProto);
1143
}
1144
extern "C" {
1145
    #[doc = " \\brief Given a protocol name, checks if proto detection is enabled in\n        the conf file.\n\n \\param alproto Name of the app layer protocol.\n\n \\retval 1 If enabled.\n \\retval 0 If disabled."]
1146
    pub fn SCAppLayerProtoDetectConfProtoDetectionEnabled(
1147
        ipproto: *const ::std::os::raw::c_char, alproto: *const ::std::os::raw::c_char,
1148
    ) -> ::std::os::raw::c_int;
1149
}
1150
extern "C" {
1151
    #[doc = " \\brief Given a protocol name, checks if proto detection is enabled in\n        the conf file.\n\n \\param alproto Name of the app layer protocol.\n \\param default_enabled enable by default if not in the configuration file\n\n \\retval 1 If enabled.\n \\retval 0 If disabled."]
1152
    pub fn SCAppLayerProtoDetectConfProtoDetectionEnabledDefault(
1153
        ipproto: *const ::std::os::raw::c_char, alproto: *const ::std::os::raw::c_char,
1154
        default_enabled: bool,
1155
    ) -> ::std::os::raw::c_int;
1156
}
1157
extern "C" {
1158
    pub fn AppProtoDetectListNames();
1159
}
1160
#[doc = " \\brief Data structure to store app layer decoder events."]
1161
#[repr(C)]
1162
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
1163
pub struct AppLayerDecoderEvents_ {
1164
    pub events: *mut u8,
1165
    pub cnt: u8,
1166
    pub events_buffer_size: u8,
1167
    pub event_last_logged: u8,
1168
}
1169
impl Default for AppLayerDecoderEvents_ {
1170
    fn default() -> Self {
×
1171
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
1172
        unsafe {
×
1173
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
1174
            s.assume_init()
×
1175
        }
×
1176
    }
×
1177
}
1178
#[doc = " \\brief Data structure to store app layer decoder events."]
1179
pub type AppLayerDecoderEvents = AppLayerDecoderEvents_;
1180
#[repr(u32)]
1181
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1182
pub enum AppLayerEventType {
1183
    APP_LAYER_EVENT_TYPE_TRANSACTION = 1,
1184
    APP_LAYER_EVENT_TYPE_PACKET = 2,
1185
}
1186
extern "C" {
1187
    pub fn SCAppLayerDecoderEventsSetEventRaw(sevents: *mut *mut AppLayerDecoderEvents, event: u8);
1188
}
1189
extern "C" {
1190
    pub fn SCAppLayerDecoderEventsFreeEvents(events: *mut *mut AppLayerDecoderEvents);
1191
}
1192
extern "C" {
1193
    pub fn SCAppLayerGetEventIdByName(
1194
        event_name: *const ::std::os::raw::c_char, table: *mut SCEnumCharMap, event_id: *mut u8,
1195
    ) -> ::std::os::raw::c_int;
1196
}
1197
#[repr(C)]
1198
#[derive(Debug, Copy, Clone)]
1199
pub struct AppLayerParserState_ {
1200
    _unused: [u8; 0],
1201
}
1202
pub type AppLayerParserState = AppLayerParserState_;
1203
#[repr(C)]
1204
#[derive(Debug, Copy, Clone)]
1205
pub struct File_ {
1206
    _unused: [u8; 0],
1207
}
1208
pub type File = File_;
1209
extern "C" {
1210
    #[doc = " \\brief Given a protocol name, checks if the parser is enabled in\n        the conf file.\n\n \\param alproto_name Name of the app layer protocol.\n\n \\retval 1 If enabled.\n \\retval 0 If disabled."]
1211
    pub fn SCAppLayerParserConfParserEnabled(
1212
        ipproto: *const ::std::os::raw::c_char, alproto_name: *const ::std::os::raw::c_char,
1213
    ) -> ::std::os::raw::c_int;
1214
}
1215
#[repr(C)]
1216
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
1217
pub struct AppLayerResult {
1218
    pub status: i32,
1219
    pub consumed: u32,
1220
    pub needed: u32,
1221
}
1222
#[repr(C)]
1223
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
1224
pub struct StreamSlice {
1225
    pub input: *const u8,
1226
    pub input_len: u32,
1227
    #[doc = " STREAM_* flags"]
1228
    pub flags: u8,
1229
    pub offset: u64,
1230
}
1231
impl Default for StreamSlice {
1232
    fn default() -> Self {
×
1233
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
1234
        unsafe {
×
1235
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
1236
            s.assume_init()
×
1237
        }
×
1238
    }
×
1239
}
1240
#[doc = " \\brief Prototype for parsing functions"]
1241
pub type AppLayerParserFPtr = ::std::option::Option<
1242
    unsafe extern "C" fn(
1243
        f: *mut Flow,
1244
        protocol_state: *mut ::std::os::raw::c_void,
1245
        pstate: *mut AppLayerParserState,
1246
        stream_slice: StreamSlice,
1247
        local_storage: *mut ::std::os::raw::c_void,
1248
    ) -> AppLayerResult,
1249
>;
1250
#[repr(C)]
1251
#[derive(Copy, Clone)]
1252
pub struct AppLayerGetTxIterState {
1253
    pub un: AppLayerGetTxIterState__bindgen_ty_1,
1254
}
1255
#[repr(C)]
1256
#[derive(Copy, Clone)]
1257
pub union AppLayerGetTxIterState__bindgen_ty_1 {
1258
    pub ptr: *mut ::std::os::raw::c_void,
1259
    pub u64_: u64,
1260
}
1261
impl Default for AppLayerGetTxIterState__bindgen_ty_1 {
1262
    fn default() -> Self {
×
1263
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
1264
        unsafe {
×
1265
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
1266
            s.assume_init()
×
1267
        }
×
1268
    }
×
1269
}
1270
impl Default for AppLayerGetTxIterState {
1271
    fn default() -> Self {
×
1272
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
1273
        unsafe {
×
1274
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
1275
            s.assume_init()
×
1276
        }
×
1277
    }
×
1278
}
1279
#[repr(C)]
1280
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
1281
pub struct AppLayerStateData {
1282
    pub file_flags: u16,
1283
}
1284
#[repr(C)]
1285
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
1286
pub struct AppLayerGetTxIterTuple {
1287
    pub tx_ptr: *mut ::std::os::raw::c_void,
1288
    pub tx_id: u64,
1289
    pub has_next: bool,
1290
}
1291
impl Default for AppLayerGetTxIterTuple {
1292
    fn default() -> Self {
×
1293
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
1294
        unsafe {
×
1295
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
1296
            s.assume_init()
×
1297
        }
×
1298
    }
×
1299
}
1300
#[repr(C)]
1301
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
1302
pub struct AppLayerTxConfig {
1303
    #[doc = " config: log flags"]
1304
    pub log_flags: u8,
1305
}
1306
pub type GenericVar = GenericVar_;
1307
#[repr(C)]
1308
#[derive(Debug, PartialEq, Eq)]
1309
pub struct AppLayerTxData {
1310
    #[doc = " config: log flags"]
1311
    pub config: AppLayerTxConfig,
1312
    #[doc = " The tx has been updated and needs to be processed : detection, logging, cleaning\n It can then be skipped until new data arrives.\n There is a boolean for both directions : to server and to client"]
1313
    pub updated_tc: bool,
1314
    pub updated_ts: bool,
1315
    pub flags: u8,
1316
    #[doc = " logger flags for tx logging api"]
1317
    pub logged: u32,
1318
    #[doc = " track file open/logs so we can know how long to keep the tx"]
1319
    pub files_opened: u32,
1320
    pub files_logged: u32,
1321
    pub files_stored: u32,
1322
    pub file_flags: u16,
1323
    #[doc = " Indicated if a file tracking tx, and if so in which direction:\n  0: not a file tx\n STREAM_TOSERVER: file tx, files only in toserver dir\n STREAM_TOCLIENT: file tx , files only in toclient dir\n STREAM_TOSERVER|STREAM_TOCLIENT: files possible in both dirs"]
1324
    pub file_tx: u8,
1325
    #[doc = " Number of times this tx data has already been logged for signatures\n not using application layer keywords"]
1326
    pub guessed_applayer_logged: u8,
1327
    #[doc = " detection engine progress tracking for use by detection engine\n Reflects the \"progress\" of prefilter engines into this TX, where\n the value is offset by 1. So if for progress state 0 the engines\n are done, the value here will be 1. So a value of 0 means, no\n progress tracked yet.\n"]
1328
    pub detect_progress_ts: u8,
1329
    pub detect_progress_tc: u8,
1330
    pub de_state: *mut DetectEngineState,
1331
    pub events: *mut AppLayerDecoderEvents,
1332
    pub txbits: *mut GenericVar,
1333
}
1334
impl Default for AppLayerTxData {
1335
    fn default() -> Self {
296,315✔
1336
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
296,315✔
1337
        unsafe {
296,315✔
1338
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
296,315✔
1339
            s.assume_init()
296,315✔
1340
        }
296,315✔
1341
    }
296,315✔
1342
}
1343
extern "C" {
1344
    pub fn SCAppLayerTxDataCleanup(txd: *mut AppLayerTxData);
1345
}
1346
#[doc = "  \\param name progress name to get the id for\n  \\param direction STREAM_TOSERVER/STREAM_TOCLIENT"]
1347
pub type AppLayerParserGetStateIdByNameFn = ::std::option::Option<
1348
    unsafe extern "C" fn(
1349
        name: *const ::std::os::raw::c_char,
1350
        direction: u8,
1351
    ) -> ::std::os::raw::c_int,
1352
>;
1353
#[doc = "  \\param id progress value id to get the name for\n  \\param direction STREAM_TOSERVER/STREAM_TOCLIENT"]
1354
pub type AppLayerParserGetStateNameByIdFn = ::std::option::Option<
1355
    unsafe extern "C" fn(id: ::std::os::raw::c_int, direction: u8) -> *const ::std::os::raw::c_char,
1356
>;
1357
pub type AppLayerParserGetFrameIdByNameFn = ::std::option::Option<
1358
    unsafe extern "C" fn(frame_name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int,
1359
>;
1360
pub type AppLayerParserGetFrameNameByIdFn =
1361
    ::std::option::Option<unsafe extern "C" fn(id: u8) -> *const ::std::os::raw::c_char>;
1362
extern "C" {
1363
    pub fn SCAppLayerParserReallocCtx(alproto: AppProto) -> ::std::os::raw::c_int;
1364
}
1365
extern "C" {
1366
    pub fn SCAppLayerParserRegisterParserAcceptableDataDirection(
1367
        ipproto: u8, alproto: AppProto, direction: u8,
1368
    );
1369
}
1370
extern "C" {
1371
    pub fn SCAppLayerParserRegisterLogger(ipproto: u8, alproto: AppProto);
1372
}
1373
extern "C" {
1374
    pub fn SCAppLayerParserTriggerRawStreamInspection(
1375
        f: *mut Flow, direction: ::std::os::raw::c_int,
1376
    );
1377
}
1378
extern "C" {
1379
    pub fn SCAppLayerParserSetStreamDepth(ipproto: u8, alproto: AppProto, stream_depth: u32);
1380
}
1381
extern "C" {
1382
    pub fn SCAppLayerParserStateSetFlag(pstate: *mut AppLayerParserState, flag: u16);
1383
}
1384
extern "C" {
1385
    pub fn SCAppLayerParserStateIssetFlag(pstate: *mut AppLayerParserState, flag: u16) -> u16;
1386
}
1387
extern "C" {
1388
    pub fn FileApplyTxFlags(txd: *const AppLayerTxData, direction: u8, file: *mut File);
1389
}
1390
#[repr(C)]
1391
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
1392
pub struct AppLayerParser {
1393
    pub name: *const ::std::os::raw::c_char,
1394
    pub default_port: *const ::std::os::raw::c_char,
1395
    pub ip_proto: u8,
1396
    pub ProbeTS: ProbingParserFPtr,
1397
    pub ProbeTC: ProbingParserFPtr,
1398
    pub min_depth: u16,
1399
    pub max_depth: u16,
1400
    pub StateAlloc: ::std::option::Option<
1401
        unsafe extern "C" fn(
1402
            arg1: *mut ::std::os::raw::c_void,
1403
            arg2: AppProto,
1404
        ) -> *mut ::std::os::raw::c_void,
1405
    >,
1406
    pub StateFree: ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>,
1407
    pub ParseTS: AppLayerParserFPtr,
1408
    pub ParseTC: AppLayerParserFPtr,
1409
    pub StateGetTxCnt:
1410
        ::std::option::Option<unsafe extern "C" fn(alstate: *mut ::std::os::raw::c_void) -> u64>,
1411
    pub StateGetTx: ::std::option::Option<
1412
        unsafe extern "C" fn(
1413
            alstate: *mut ::std::os::raw::c_void,
1414
            tx_id: u64,
1415
        ) -> *mut ::std::os::raw::c_void,
1416
    >,
1417
    pub StateTransactionFree:
1418
        ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, arg2: u64)>,
1419
    pub complete_ts: ::std::os::raw::c_int,
1420
    pub complete_tc: ::std::os::raw::c_int,
1421
    pub StateGetProgress: ::std::option::Option<
1422
        unsafe extern "C" fn(
1423
            alstate: *mut ::std::os::raw::c_void,
1424
            direction: u8,
1425
        ) -> ::std::os::raw::c_int,
1426
    >,
1427
    pub StateGetEventInfo: ::std::option::Option<
1428
        unsafe extern "C" fn(
1429
            event_name: *const ::std::os::raw::c_char,
1430
            event_id: *mut u8,
1431
            event_type: *mut AppLayerEventType,
1432
        ) -> ::std::os::raw::c_int,
1433
    >,
1434
    pub StateGetEventInfoById: ::std::option::Option<
1435
        unsafe extern "C" fn(
1436
            event_id: u8,
1437
            event_name: *mut *const ::std::os::raw::c_char,
1438
            event_type: *mut AppLayerEventType,
1439
        ) -> ::std::os::raw::c_int,
1440
    >,
1441
    pub LocalStorageAlloc:
1442
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
1443
    pub LocalStorageFree:
1444
        ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>,
1445
    pub GetTxFiles: ::std::option::Option<
1446
        unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, arg2: u8) -> AppLayerGetFileState,
1447
    >,
1448
    pub GetTxIterator: ::std::option::Option<
1449
        unsafe extern "C" fn(
1450
            ipproto: u8,
1451
            alproto: AppProto,
1452
            alstate: *mut ::std::os::raw::c_void,
1453
            min_tx_id: u64,
1454
            max_tx_id: u64,
1455
            istate: *mut AppLayerGetTxIterState,
1456
        ) -> AppLayerGetTxIterTuple,
1457
    >,
1458
    pub GetStateData: ::std::option::Option<
1459
        unsafe extern "C" fn(state: *mut ::std::os::raw::c_void) -> *mut AppLayerStateData,
1460
    >,
1461
    pub GetTxData: ::std::option::Option<
1462
        unsafe extern "C" fn(tx: *mut ::std::os::raw::c_void) -> *mut AppLayerTxData,
1463
    >,
1464
    pub ApplyTxConfig: ::std::option::Option<
1465
        unsafe extern "C" fn(
1466
            state: *mut ::std::os::raw::c_void,
1467
            tx: *mut ::std::os::raw::c_void,
1468
            mode: ::std::os::raw::c_int,
1469
            arg1: AppLayerTxConfig,
1470
        ),
1471
    >,
1472
    pub flags: u32,
1473
    pub GetFrameIdByName: AppLayerParserGetFrameIdByNameFn,
1474
    pub GetFrameNameById: AppLayerParserGetFrameNameByIdFn,
1475
    pub GetStateIdByName: AppLayerParserGetStateIdByNameFn,
1476
    pub GetStateNameById: AppLayerParserGetStateNameByIdFn,
1477
}
1478
impl Default for AppLayerParser {
1479
    fn default() -> Self {
×
1480
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
1481
        unsafe {
×
1482
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
1483
            s.assume_init()
×
1484
        }
×
1485
    }
×
1486
}
1487
#[doc = " First part of AppLayerParser, needed only for protocol detection"]
1488
#[repr(C)]
1489
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
1490
pub struct AppLayerProtocolDetect {
1491
    #[doc = " name of the app-layer"]
1492
    pub name: *const ::std::os::raw::c_char,
1493
    #[doc = " default port(s)"]
1494
    pub default_port: *const ::std::os::raw::c_char,
1495
    #[doc = " ip protocol : TCP or UDP"]
1496
    pub ip_proto: u8,
1497
    #[doc = " probing parser to server"]
1498
    pub ProbeTS: ProbingParserFPtr,
1499
    #[doc = " probing parser to client"]
1500
    pub ProbeTC: ProbingParserFPtr,
1501
    pub min_depth: u16,
1502
    pub max_depth: u16,
1503
}
1504
impl Default for AppLayerProtocolDetect {
1505
    fn default() -> Self {
×
1506
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
1507
        unsafe {
×
1508
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
1509
            s.assume_init()
×
1510
        }
×
1511
    }
×
1512
}
1513
extern "C" {
1514
    #[doc = " \\brief App layer protocol detection function.\n\n \\param parser The parser declaration structure.\n \\param enable_default A boolean to indicate if default port configuration should be used if none given\n\n \\retval The AppProto constant if successful. On error, this function never returns."]
1515
    pub fn SCAppLayerRegisterProtocolDetection(
1516
        parser: *const AppLayerProtocolDetect, enable_default: ::std::os::raw::c_int,
1517
    ) -> AppProto;
1518
}
1519
extern "C" {
1520
    #[doc = " \\brief App layer protocol registration function.\n\n \\param parser The parser declaration structure.\n \\param alproto The application layer protocol identifier.\n\n \\retval 0 if successful. On error, this function never returns."]
1521
    pub fn SCAppLayerRegisterParser(
1522
        p: *const AppLayerParser, alproto: AppProto,
1523
    ) -> ::std::os::raw::c_int;
1524
}
1525
extern "C" {
1526
    pub fn SCAppLayerRegisterParserAlias(
1527
        proto_name: *const ::std::os::raw::c_char, proto_alias: *const ::std::os::raw::c_char,
1528
    ) -> ::std::os::raw::c_int;
1529
}
1530
extern "C" {
1531
    pub fn SCHTTP2MimicHttp1Request(
1532
        arg1: *mut ::std::os::raw::c_void, arg2: *mut ::std::os::raw::c_void,
1533
    );
1534
}
1535
extern "C" {
1536
    pub fn SCFileFlowFlagsToFlags(flow_file_flags: u16, direction: u8) -> u16;
1537
}
1538
#[repr(C)]
1539
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
1540
pub struct StreamingBufferConfig_ {
1541
    pub buf_size: u32,
1542
    #[doc = "< max concurrent memory regions. 0 means no limit."]
1543
    pub max_regions: u16,
1544
    #[doc = "< max gap size before a new region will be created."]
1545
    pub region_gap: u32,
1546
    pub Calloc: ::std::option::Option<
1547
        unsafe extern "C" fn(n: usize, size: usize) -> *mut ::std::os::raw::c_void,
1548
    >,
1549
    pub Realloc: ::std::option::Option<
1550
        unsafe extern "C" fn(
1551
            ptr: *mut ::std::os::raw::c_void,
1552
            orig_size: usize,
1553
            size: usize,
1554
        ) -> *mut ::std::os::raw::c_void,
1555
    >,
1556
    pub Free:
1557
        ::std::option::Option<unsafe extern "C" fn(ptr: *mut ::std::os::raw::c_void, size: usize)>,
1558
}
1559
pub type StreamingBufferConfig = StreamingBufferConfig_;
1560
#[repr(C)]
1561
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
1562
pub struct FileContainer_ {
1563
    pub head: *mut File,
1564
    pub tail: *mut File,
1565
}
1566
impl Default for FileContainer_ {
1567
    fn default() -> Self {
41,102✔
1568
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
41,102✔
1569
        unsafe {
41,102✔
1570
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
41,102✔
1571
            s.assume_init()
41,102✔
1572
        }
41,102✔
1573
    }
41,102✔
1574
}
1575
pub type FileContainer = FileContainer_;
1576
#[doc = " helper for the GetTxFilesFn. Not meant to be embedded as the config\n pointer is passed around in the API."]
1577
#[repr(C)]
1578
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
1579
pub struct AppLayerGetFileState {
1580
    pub fc: *mut FileContainer,
1581
    pub cfg: *const StreamingBufferConfig,
1582
}
1583
impl Default for AppLayerGetFileState {
1584
    fn default() -> Self {
×
1585
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
1586
        unsafe {
×
1587
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
1588
            s.assume_init()
×
1589
        }
×
1590
    }
×
1591
}
1592
extern "C" {
1593
    #[doc = "  \\brief Store a chunk of file data in the flow. The open \"flowfile\"\n         will be used.\n\n  \\param ffc the container\n  \\param data data chunk\n  \\param data_len data chunk len\n\n  \\retval 0 ok\n  \\retval -1 error"]
1594
    pub fn FileAppendData(
1595
        arg1: *mut FileContainer, sbcfg: *const StreamingBufferConfig, data: *const u8,
1596
        data_len: u32,
1597
    ) -> ::std::os::raw::c_int;
1598
}
1599
extern "C" {
1600
    #[doc = "  \\brief Open a new File\n\n  \\param ffc flow container\n  \\param sbcfg buffer config\n  \\param name filename character array\n  \\param name_len filename len\n  \\param data initial data\n  \\param data_len initial data len\n  \\param flags open flags\n\n  \\retval ff flowfile object\n\n  \\note filename is not a string, so it's not nul terminated.\n\n  If flags contains the FILE_USE_DETECT bit, the pruning code will\n  consider not just the content_stored tracker, but also content_inspected.\n  It's the responsibility of the API user to make sure this tracker is\n  properly updated."]
1601
    pub fn FileOpenFileWithId(
1602
        arg1: *mut FileContainer, arg2: *const StreamingBufferConfig, track_id: u32,
1603
        name: *const u8, name_len: u16, data: *const u8, data_len: u32, flags: u16,
1604
    ) -> ::std::os::raw::c_int;
1605
}
1606
extern "C" {
1607
    pub fn FileAppendDataById(
1608
        arg1: *mut FileContainer, sbcfg: *const StreamingBufferConfig, track_id: u32,
1609
        data: *const u8, data_len: u32,
1610
    ) -> ::std::os::raw::c_int;
1611
}
1612
extern "C" {
1613
    pub fn FileAppendGAPById(
1614
        ffc: *mut FileContainer, sbcfg: *const StreamingBufferConfig, track_id: u32,
1615
        data: *const u8, data_len: u32,
1616
    ) -> ::std::os::raw::c_int;
1617
}
1618
extern "C" {
1619
    pub fn FileCloseFileById(
1620
        arg1: *mut FileContainer, sbcfg: *const StreamingBufferConfig, track_id: u32,
1621
        data: *const u8, data_len: u32, flags: u16,
1622
    ) -> ::std::os::raw::c_int;
1623
}
1624
extern "C" {
1625
    pub fn FileContainerRecycle(arg1: *mut FileContainer, cfg: *const StreamingBufferConfig);
1626
}
1627
#[repr(C)]
1628
#[derive(Debug, Copy, Clone)]
1629
pub struct HttpRangeContainerBuffer {
1630
    _unused: [u8; 0],
1631
}
1632
#[repr(C)]
1633
#[derive(Debug, Copy, Clone)]
1634
pub struct HttpRangeContainerFile {
1635
    _unused: [u8; 0],
1636
}
1637
#[repr(C)]
1638
#[derive(Debug, Copy, Clone)]
1639
pub struct HTTPContentRange {
1640
    _unused: [u8; 0],
1641
}
1642
#[doc = " A structure representing a single range request :\n either skipping, buffering, or appending\n As this belongs to a flow, appending data to it is ensured to be thread-safe\n Only one block per file has the pointer to the container"]
1643
#[repr(C)]
1644
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
1645
pub struct HttpRangeContainerBlock {
1646
    #[doc = " state where we skip content"]
1647
    pub toskip: u64,
1648
    #[doc = " current out of order range to write into"]
1649
    pub current: *mut HttpRangeContainerBuffer,
1650
    #[doc = " pointer to the main file container, where to directly append data"]
1651
    pub container: *mut HttpRangeContainerFile,
1652
    #[doc = " file container we are owning for now"]
1653
    pub files: *mut FileContainer,
1654
}
1655
impl Default for HttpRangeContainerBlock {
1656
    fn default() -> Self {
×
1657
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
1658
        unsafe {
×
1659
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
1660
            s.assume_init()
×
1661
        }
×
1662
    }
×
1663
}
1664
extern "C" {
1665
    pub fn SCHttpRangeFreeBlock(b: *mut HttpRangeContainerBlock);
1666
}
1667
extern "C" {
1668
    pub fn SCHttpRangeContainerOpenFile(
1669
        key: *const ::std::os::raw::c_uchar, keylen: u32, f: *const Flow,
1670
        cr: *const HTTPContentRange, sbcfg: *const StreamingBufferConfig,
1671
        name: *const ::std::os::raw::c_uchar, name_len: u16, flags: u16,
1672
        data: *const ::std::os::raw::c_uchar, data_len: u32,
1673
    ) -> *mut HttpRangeContainerBlock;
1674
}
1675
extern "C" {
1676
    pub fn SCHttpRangeAppendData(
1677
        sbcfg: *const StreamingBufferConfig, c: *mut HttpRangeContainerBlock, data: *const u8,
1678
        len: u32,
1679
    ) -> ::std::os::raw::c_int;
1680
}
1681
extern "C" {
1682
    pub fn SCHTPFileCloseHandleRange(
1683
        sbcfg: *const StreamingBufferConfig, arg1: *mut FileContainer, arg2: u16,
1684
        arg3: *mut HttpRangeContainerBlock, arg4: *const u8, arg5: u32,
1685
    ) -> bool;
1686
}
1687
pub type FrameId = i64;
1688
#[repr(C)]
1689
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
1690
pub struct Frame {
1691
    #[doc = "< protocol specific field type. E.g. NBSS.HDR or SMB.DATA"]
1692
    pub type_: u8,
1693
    #[doc = "< frame flags: FRAME_FLAG_*"]
1694
    pub flags: u8,
1695
    pub event_cnt: u8,
1696
    #[doc = "< per frame store for events"]
1697
    pub events: [u8; 4usize],
1698
    #[doc = "< offset from the start of the stream"]
1699
    pub offset: u64,
1700
    pub len: i64,
1701
    pub id: i64,
1702
    #[doc = "< tx_id to match this frame. UINT64T_MAX if not used."]
1703
    pub tx_id: u64,
1704
    #[doc = "< inspection tracker relative to the start of the frame"]
1705
    pub inspect_progress: u64,
1706
}
1707
extern "C" {
1708
    pub fn SCAppLayerFrameNewByRelativeOffset(
1709
        f: *mut Flow, stream_slice: *const ::std::os::raw::c_void, frame_start_rel: u32, len: i64,
1710
        dir: ::std::os::raw::c_int, frame_type: u8,
1711
    ) -> *mut Frame;
1712
}
1713
extern "C" {
1714
    pub fn SCAppLayerFrameAddEventById(
1715
        f: *const Flow, dir: ::std::os::raw::c_int, id: FrameId, e: u8,
1716
    );
1717
}
1718
extern "C" {
1719
    pub fn SCAppLayerFrameSetLengthById(
1720
        f: *const Flow, dir: ::std::os::raw::c_int, id: FrameId, len: i64,
1721
    );
1722
}
1723
extern "C" {
1724
    pub fn SCAppLayerFrameSetTxIdById(
1725
        f: *const Flow, dir: ::std::os::raw::c_int, id: FrameId, tx_id: u64,
1726
    );
1727
}
1728
#[repr(C)]
1729
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
1730
pub struct MpmPattern_ {
1731
    pub len: u16,
1732
    pub flags: u8,
1733
    pub offset: u16,
1734
    pub depth: u16,
1735
    pub original_pat: *mut u8,
1736
    pub cs: *mut u8,
1737
    pub ci: *mut u8,
1738
    pub id: u32,
1739
    pub sids_size: u32,
1740
    pub sids: *mut u32,
1741
    pub next: *mut MpmPattern_,
1742
}
1743
impl Default for MpmPattern_ {
1744
    fn default() -> Self {
×
1745
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
1746
        unsafe {
×
1747
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
1748
            s.assume_init()
×
1749
        }
×
1750
    }
×
1751
}
1752
pub type MpmPattern = MpmPattern_;
1753
#[repr(C)]
1754
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
1755
pub struct MpmCtx_ {
1756
    pub ctx: *mut ::std::os::raw::c_void,
1757
    pub mpm_type: u8,
1758
    pub flags: u8,
1759
    pub maxdepth: u16,
1760
    pub pattern_cnt: u32,
1761
    pub minlen: u16,
1762
    pub maxlen: u16,
1763
    pub memory_cnt: u32,
1764
    pub memory_size: u32,
1765
    pub max_pat_id: u32,
1766
    pub init_hash: *mut *mut MpmPattern,
1767
}
1768
impl Default for MpmCtx_ {
1769
    fn default() -> Self {
×
1770
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
1771
        unsafe {
×
1772
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
1773
            s.assume_init()
×
1774
        }
×
1775
    }
×
1776
}
1777
pub type MpmCtx = MpmCtx_;
1778
extern "C" {
1779
    pub fn SCMpmAddPatternCI(
1780
        mpm_ctx: *mut MpmCtx, pat: *const u8, patlen: u16, offset: u16, depth: u16, pid: u32,
1781
        sid: u32, flags: u8,
1782
    ) -> ::std::os::raw::c_int;
1783
}
1784
#[repr(C)]
1785
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
1786
pub struct GenericVar_ {
1787
    #[doc = "< variable type, uses detection sm_type"]
1788
    pub type_: u16,
1789
    pub pad: [u8; 2usize],
1790
    pub idx: u32,
1791
    pub next: *mut GenericVar_,
1792
}
1793
impl Default for GenericVar_ {
1794
    fn default() -> Self {
×
1795
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
×
1796
        unsafe {
×
1797
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
×
1798
            s.assume_init()
×
1799
        }
×
1800
    }
×
1801
}
1802
extern "C" {
1803
    pub fn SCGenericVarFree(arg1: *mut GenericVar);
1804
}
1805
extern "C" {
1806
    pub fn SCBasicSearchNocaseIndex(arg1: *const u8, arg2: u32, arg3: *const u8, arg4: u16) -> u32;
1807
}
1808
extern "C" {
1809
    pub fn SCFlowGetLastTimeAsParts(flow: *const Flow, secs: *mut u64, usecs: *mut u64);
1810
}
1811
extern "C" {
1812
    pub fn SCFlowGetFlags(flow: *const Flow) -> u64;
1813
}
1814
extern "C" {
1815
    pub fn SCFlowGetSourcePort(flow: *const Flow) -> u16;
1816
}
1817
extern "C" {
1818
    pub fn SCFlowGetDestinationPort(flow: *const Flow) -> u16;
1819
}
1820
extern "C" {
1821
    pub fn SCSRepCatGetByShortname(shortname: *const ::std::os::raw::c_char) -> u8;
1822
}
1823
extern "C" {
1824
    pub fn SCRequiresFeature(arg1: *const ::std::os::raw::c_char) -> bool;
1825
}
1826
pub type DataRepType = u16;
1827
#[repr(C)]
1828
#[derive(Debug, Copy, Clone)]
1829
pub struct Dataset {
1830
    _unused: [u8; 0],
1831
}
1832
extern "C" {
1833
    pub fn SCDatasetAdd(set: *mut Dataset, data: *const u8, data_len: u32)
1834
        -> ::std::os::raw::c_int;
1835
}
1836
extern "C" {
1837
    pub fn SCDatasetAddwRep(
1838
        set: *mut Dataset, data: *const u8, data_len: u32, rep: *const DataRepType,
1839
    ) -> ::std::os::raw::c_int;
1840
}
1841
#[doc = " A \"mark\" or saved state for a JsonBuilder object.\n\n The name is full, and the types are u64 as this object is used\n directly in C as well."]
1842
#[repr(C)]
1843
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
1844
pub struct SCJsonBuilderMark {
1845
    pub position: u64,
1846
    pub state_index: u64,
1847
    pub state: u64,
1848
}
1849
extern "C" {
1850
    pub fn SCJbNewObject() -> *mut SCJsonBuilder;
1851
}
1852
extern "C" {
1853
    pub fn SCJbNewArray() -> *mut SCJsonBuilder;
1854
}
1855
extern "C" {
1856
    pub fn SCJbClone(js: *mut SCJsonBuilder) -> *mut SCJsonBuilder;
1857
}
1858
extern "C" {
1859
    pub fn SCJbFree(js: *mut SCJsonBuilder);
1860
}
1861
extern "C" {
1862
    pub fn SCJbCapacity(jb: *mut SCJsonBuilder) -> usize;
1863
}
1864
extern "C" {
1865
    pub fn SCJbReset(jb: *mut SCJsonBuilder);
1866
}
1867
extern "C" {
1868
    pub fn SCJbOpenObject(js: *mut SCJsonBuilder, key: *const ::std::os::raw::c_char) -> bool;
1869
}
1870
extern "C" {
1871
    pub fn SCJbStartObject(js: *mut SCJsonBuilder) -> bool;
1872
}
1873
extern "C" {
1874
    pub fn SCJbOpenArray(js: *mut SCJsonBuilder, key: *const ::std::os::raw::c_char) -> bool;
1875
}
1876
extern "C" {
1877
    pub fn SCJbSetString(
1878
        js: *mut SCJsonBuilder, key: *const ::std::os::raw::c_char,
1879
        val: *const ::std::os::raw::c_char,
1880
    ) -> bool;
1881
}
1882
extern "C" {
1883
    pub fn SCJbSetStringFromBytes(
1884
        js: *mut SCJsonBuilder, key: *const ::std::os::raw::c_char, bytes: *const u8, len: u32,
1885
    ) -> bool;
1886
}
1887
extern "C" {
1888
    pub fn SCJbSetPrintAsciiString(
1889
        js: *mut SCJsonBuilder, key: *const ::std::os::raw::c_char, bytes: *const u8, len: u32,
1890
    ) -> bool;
1891
}
1892
extern "C" {
1893
    pub fn SCJbSetBase64(
1894
        js: *mut SCJsonBuilder, key: *const ::std::os::raw::c_char, bytes: *const u8, len: u32,
1895
    ) -> bool;
1896
}
1897
extern "C" {
1898
    pub fn SCJbSetHex(
1899
        js: *mut SCJsonBuilder, key: *const ::std::os::raw::c_char, bytes: *const u8, len: u32,
1900
    ) -> bool;
1901
}
1902
extern "C" {
1903
    pub fn SCJbSetFormatted(
1904
        js: *mut SCJsonBuilder, formatted: *const ::std::os::raw::c_char,
1905
    ) -> bool;
1906
}
1907
extern "C" {
1908
    pub fn SCJbAppendObject(jb: *mut SCJsonBuilder, obj: *const SCJsonBuilder) -> bool;
1909
}
1910
extern "C" {
1911
    pub fn SCJbSetObject(
1912
        js: *mut SCJsonBuilder, key: *const ::std::os::raw::c_char, val: *mut SCJsonBuilder,
1913
    ) -> bool;
1914
}
1915
extern "C" {
1916
    pub fn SCJbAppendString(js: *mut SCJsonBuilder, val: *const ::std::os::raw::c_char) -> bool;
1917
}
1918
extern "C" {
1919
    pub fn SCJbAppendStringFromBytes(js: *mut SCJsonBuilder, bytes: *const u8, len: u32) -> bool;
1920
}
1921
extern "C" {
1922
    pub fn SCJbAppendBase64(js: *mut SCJsonBuilder, bytes: *const u8, len: u32) -> bool;
1923
}
1924
extern "C" {
1925
    pub fn SCJbAppendUint(js: *mut SCJsonBuilder, val: u64) -> bool;
1926
}
1927
extern "C" {
1928
    pub fn SCJbAppendFloat(js: *mut SCJsonBuilder, val: f64) -> bool;
1929
}
1930
extern "C" {
1931
    pub fn SCJbSetUint(
1932
        js: *mut SCJsonBuilder, key: *const ::std::os::raw::c_char, val: u64,
1933
    ) -> bool;
1934
}
1935
extern "C" {
1936
    pub fn SCJbSetInt(js: *mut SCJsonBuilder, key: *const ::std::os::raw::c_char, val: i64)
1937
        -> bool;
1938
}
1939
extern "C" {
1940
    pub fn SCJbSetFloat(
1941
        js: *mut SCJsonBuilder, key: *const ::std::os::raw::c_char, val: f64,
1942
    ) -> bool;
1943
}
1944
extern "C" {
1945
    pub fn SCJbSetBool(
1946
        js: *mut SCJsonBuilder, key: *const ::std::os::raw::c_char, val: bool,
1947
    ) -> bool;
1948
}
1949
extern "C" {
1950
    pub fn SCJbClose(js: *mut SCJsonBuilder) -> bool;
1951
}
1952
extern "C" {
1953
    pub fn SCJbLen(js: *const SCJsonBuilder) -> usize;
1954
}
1955
extern "C" {
1956
    pub fn SCJbPtr(js: *mut SCJsonBuilder) -> *const u8;
1957
}
1958
extern "C" {
1959
    pub fn SCJbGetMark(js: *mut SCJsonBuilder, mark: *mut SCJsonBuilderMark);
1960
}
1961
extern "C" {
1962
    pub fn SCJbRestoreMark(js: *mut SCJsonBuilder, mark: *mut SCJsonBuilderMark) -> bool;
1963
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc