1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
|
/* automatically generated by rust-bindgen 0.66.1 */
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
#[inline]
pub const fn new() -> Self {
__IncompleteArrayField(::std::marker::PhantomData, [])
}
#[inline]
pub fn as_ptr(&self) -> *const T {
self as *const _ as *const T
}
#[inline]
pub fn as_mut_ptr(&mut self) -> *mut T {
self as *mut _ as *mut T
}
#[inline]
pub unsafe fn as_slice(&self, len: usize) -> &[T] {
::std::slice::from_raw_parts(self.as_ptr(), len)
}
#[inline]
pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
}
}
impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fmt.write_str("__IncompleteArrayField")
}
}
pub type CUchar = ::std::os::raw::c_uchar;
pub type CUShort = ::std::os::raw::c_ushort;
pub type CUInt = ::std::os::raw::c_uint;
pub type CULong = ::std::os::raw::c_ulong;
pub type CLongLong = ::std::os::raw::c_longlong;
extern "C" {
pub fn ntohl(__netlong: u32) -> u32;
}
extern "C" {
pub fn ntohs(__netshort: u16) -> u16;
}
extern "C" {
pub fn htonl(__hostlong: u32) -> u32;
}
extern "C" {
pub fn htons(__hostshort: u16) -> u16;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct maat {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct maat_hit_path {
pub nth_scan: ::std::os::raw::c_int,
pub vtable_id: ::std::os::raw::c_int,
pub item_id: ::std::os::raw::c_longlong,
pub sub_group_id: ::std::os::raw::c_longlong,
pub top_group_id: ::std::os::raw::c_longlong,
pub compile_id: ::std::os::raw::c_longlong,
}
#[test]
fn bindgen_test_layout_maat_hit_path() {
const UNINIT: ::std::mem::MaybeUninit<maat_hit_path> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<maat_hit_path>(),
40usize,
concat!("Size of: ", stringify!(maat_hit_path))
);
assert_eq!(
::std::mem::align_of::<maat_hit_path>(),
8usize,
concat!("Alignment of ", stringify!(maat_hit_path))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nth_scan) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(maat_hit_path),
"::",
stringify!(Nth_scan)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vtable_id) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(maat_hit_path),
"::",
stringify!(vtable_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).item_id) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(maat_hit_path),
"::",
stringify!(item_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sub_group_id) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(maat_hit_path),
"::",
stringify!(sub_group_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).top_group_id) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(maat_hit_path),
"::",
stringify!(top_group_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).compile_id) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(maat_hit_path),
"::",
stringify!(compile_id)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct maat_hit_group {
pub item_id: ::std::os::raw::c_longlong,
pub group_id: ::std::os::raw::c_longlong,
pub vtable_id: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_maat_hit_group() {
const UNINIT: ::std::mem::MaybeUninit<maat_hit_group> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<maat_hit_group>(),
24usize,
concat!("Size of: ", stringify!(maat_hit_group))
);
assert_eq!(
::std::mem::align_of::<maat_hit_group>(),
8usize,
concat!("Alignment of ", stringify!(maat_hit_group))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).item_id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(maat_hit_group),
"::",
stringify!(item_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).group_id) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(maat_hit_group),
"::",
stringify!(group_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vtable_id) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(maat_hit_group),
"::",
stringify!(vtable_id)
)
);
}
pub const MAAT_SCAN_ERR: MaatScanStatus = -1;
pub const MAAT_SCAN_OK: MaatScanStatus = 0;
pub const MAAT_SCAN_HALF_HIT: MaatScanStatus = 1;
pub const MAAT_SCAN_HIT: MaatScanStatus = 2;
pub type MaatScanStatus = ::std::os::raw::c_int;
pub const MAAT_UPDATE_TYPE_INVALID: MaatUpdateType = 0;
pub const MAAT_UPDATE_TYPE_FULL: MaatUpdateType = 1;
pub const MAAT_UPDATE_TYPE_INC: MaatUpdateType = 2;
pub type MaatUpdateType = ::std::os::raw::c_uint;
pub const MAAT_LIST_TYPE_FULL: MaatListType = 1;
pub const MAAT_LIST_TYPE_INC: MaatListType = 2;
pub type MaatListType = ::std::os::raw::c_uint;
pub const MAAT_EXPR_ENGINE_HS: MaatExprEngine = 0;
pub const MAAT_EXPR_ENGINE_RS: MaatExprEngine = 1;
pub type MaatExprEngine = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ip_addr {
pub ip_type: ::std::os::raw::c_int,
pub __bindgen_anon_1: ip_addr__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ip_addr__bindgen_ty_1 {
pub ipv4: ::std::os::raw::c_uint,
pub ipv6: [::std::os::raw::c_uint; 4usize],
}
#[test]
fn bindgen_test_layout_ip_addr__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<ip_addr__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ip_addr__bindgen_ty_1>(),
16usize,
concat!("Size of: ", stringify!(ip_addr__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<ip_addr__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(ip_addr__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ipv4) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ip_addr__bindgen_ty_1),
"::",
stringify!(ipv4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ipv6) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ip_addr__bindgen_ty_1),
"::",
stringify!(ipv6)
)
);
}
#[test]
fn bindgen_test_layout_ip_addr() {
const UNINIT: ::std::mem::MaybeUninit<ip_addr> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ip_addr>(),
20usize,
concat!("Size of: ", stringify!(ip_addr))
);
assert_eq!(
::std::mem::align_of::<ip_addr>(),
4usize,
concat!("Alignment of ", stringify!(ip_addr))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ip_type) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ip_addr),
"::",
stringify!(ip_type)
)
);
}
pub const LOG_LEVEL_TRACE: LogLevel = 0;
pub const LOG_LEVEL_DEBUG: LogLevel = 1;
pub const LOG_LEVEL_INFO: LogLevel = 2;
pub const LOG_LEVEL_WARN: LogLevel = 3;
pub const LOG_LEVEL_ERROR: LogLevel = 4;
pub const LOG_LEVEL_FATAL: LogLevel = 5;
pub type LogLevel = ::std::os::raw::c_uint;
pub type MaatStartCallbackT = ::std::option::Option<
unsafe extern "C" fn(update_type: ::std::os::raw::c_int, u_param: *mut ::std::os::raw::c_void),
>;
pub type MaatUpdateCallbackT = ::std::option::Option<
unsafe extern "C" fn(
table_id: ::std::os::raw::c_int,
table_line: *const ::std::os::raw::c_char,
u_para: *mut ::std::os::raw::c_void,
),
>;
pub type MaatFinishCallbackT =
::std::option::Option<unsafe extern "C" fn(u_para: *mut ::std::os::raw::c_void)>;
pub type MaatExNewFuncT = ::std::option::Option<
unsafe extern "C" fn(
table_name: *const ::std::os::raw::c_char,
table_id: ::std::os::raw::c_int,
key: *const ::std::os::raw::c_char,
table_line: *const ::std::os::raw::c_char,
ad: *mut *mut ::std::os::raw::c_void,
argl: ::std::os::raw::c_long,
argp: *mut ::std::os::raw::c_void,
),
>;
pub type MaatExFreeFuncT = ::std::option::Option<
unsafe extern "C" fn(
table_id: ::std::os::raw::c_int,
ad: *mut *mut ::std::os::raw::c_void,
argl: ::std::os::raw::c_long,
argp: *mut ::std::os::raw::c_void,
),
>;
pub type MaatExDupFuncT = ::std::option::Option<
unsafe extern "C" fn(
table_id: ::std::os::raw::c_int,
to: *mut *mut ::std::os::raw::c_void,
from: *mut *mut ::std::os::raw::c_void,
argl: ::std::os::raw::c_long,
argp: *mut ::std::os::raw::c_void,
),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct maat_options {
_unused: [u8; 0],
}
extern "C" {
pub fn maat_options_new() -> *mut maat_options;
}
extern "C" {
pub fn maat_options_free(opts: *mut maat_options);
}
extern "C" {
#[doc = " @brief set maat instance name\n\n @note The maximum length of instance_name is 15 bytes"]
pub fn maat_options_set_instance_name(
opts: *mut maat_options,
instance_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_caller_thread_number(
opts: *mut maat_options,
n_thread: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_accept_tags(
opts: *mut maat_options,
accept_tags: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_rule_effect_interval_ms(
opts: *mut maat_options,
interval_ms: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_rule_update_checking_interval_ms(
opts: *mut maat_options,
interval_ms: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_gc_timeout_ms(
opts: *mut maat_options,
interval_ms: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_deferred_load_on(opts: *mut maat_options) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_stat_on(opts: *mut maat_options) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_perf_on(opts: *mut maat_options) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_foreign_cont_dir(
opts: *mut maat_options,
dir: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_logger(
opts: *mut maat_options,
log_path: *const ::std::os::raw::c_char,
level: LogLevel,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_iris(
opts: *mut maat_options,
full_directory: *const ::std::os::raw::c_char,
increment_directory: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_json_file(
opts: *mut maat_options,
json_filename: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Indicate whether the JSON file is compressed by gzip\n flag: 1(compressed) 0(uncompressed)"]
pub fn maat_options_set_json_file_gzip_flag(
opts: *mut maat_options,
flag: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_json_file_decrypt_key(
opts: *mut maat_options,
decrypt_key: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_redis(
opts: *mut maat_options,
redis_ip: *const ::std::os::raw::c_char,
redis_port: u16,
redis_db: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_stat_file(
opts: *mut maat_options,
stat_filename: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_options_set_expr_engine(
opts: *mut maat_options,
engine: MaatExprEngine,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_new(
opts: *mut maat_options,
table_info_path: *const ::std::os::raw::c_char,
) -> *mut maat;
}
extern "C" {
pub fn maat_free(instance: *mut maat);
}
extern "C" {
pub fn maat_helper_read_column(
table_line: *const ::std::os::raw::c_char,
Nth_column: ::std::os::raw::c_int,
column_offset: *mut usize,
column_len: *mut usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " verify if regex expression is legal\n\n @param The NULL-terminated expression to parse.\n @retval 1(legal) 0(illegal)"]
pub fn maat_helper_verify_regex_expression(
expression: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_get_table_id(
instance: *mut maat,
table_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_table_callback_register(
instance: *mut maat,
table_id: ::std::os::raw::c_int,
start: MaatStartCallbackT,
update: MaatUpdateCallbackT,
finish: MaatFinishCallbackT,
u_para: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_plugin_table_ex_schema_register(
instance: *mut maat,
table_name: *const ::std::os::raw::c_char,
new_func: MaatExNewFuncT,
free_func: MaatExFreeFuncT,
dup_func: MaatExDupFuncT,
argl: ::std::os::raw::c_long,
argp: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " NOTE: only plugin table support three key type(integer, pointer, ip_addr)\n specified in table_info.conf. If use ip_addr key type, then key should be\n ip address in network order."]
pub fn maat_plugin_table_get_ex_data(
instance: *mut maat,
table_id: ::std::os::raw::c_int,
key: *const ::std::os::raw::c_char,
key_len: usize,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn maat_ip_plugin_table_get_ex_data(
instance: *mut maat,
table_id: ::std::os::raw::c_int,
ip: *const ip_addr,
ex_data_array: *mut *mut ::std::os::raw::c_void,
n_ex_data: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_fqdn_plugin_table_get_ex_data(
instance: *mut maat,
table_id: ::std::os::raw::c_int,
fqdn: *const ::std::os::raw::c_char,
ex_data_array: *mut *mut ::std::os::raw::c_void,
n_ex_data: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_bool_plugin_table_get_ex_data(
instance: *mut maat,
table_id: ::std::os::raw::c_int,
item_ids: *mut ::std::os::raw::c_ulonglong,
n_item: usize,
ex_data_array: *mut *mut ::std::os::raw::c_void,
n_ex_data: usize,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct maat_state {
_unused: [u8; 0],
}
extern "C" {
#[doc = " @param instance: maat instance created by maat_new()\n @param table_id: the id of table which to be scanned\n @param thread_id: thread index\n @param results: array to store hit compile id\n @param n_result: the array size\n @param n_hit_result: the number of hit compile id\n @param state: scan mid status\n\n @retval MAAT_SCAN_ERR\n MAAT_SCAN_OK\n MAAT_SCAN_HALF_HIT\n MAAT_SCAN_HIT"]
pub fn maat_scan_flag(
instance: *mut maat,
table_id: ::std::os::raw::c_int,
flag: ::std::os::raw::c_longlong,
results: *mut ::std::os::raw::c_longlong,
n_result: usize,
n_hit_result: *mut usize,
state: *mut maat_state,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_scan_integer(
instance: *mut maat,
table_id: ::std::os::raw::c_int,
integer: ::std::os::raw::c_longlong,
results: *mut ::std::os::raw::c_longlong,
n_result: usize,
n_hit_result: *mut usize,
state: *mut maat_state,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @param ip_addr: network ipv4 address\n @param port: network port\n @param protocol: -1(ANY protocol) 1(ICMP) 6(TCP) 17(UDP)"]
pub fn maat_scan_ipv4(
instance: *mut maat,
table_id: ::std::os::raw::c_int,
ip_addr: u32,
port: u16,
protocol: ::std::os::raw::c_int,
results: *mut ::std::os::raw::c_longlong,
n_result: usize,
n_hit_result: *mut usize,
state: *mut maat_state,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_scan_ipv6(
instance: *mut maat,
table_id: ::std::os::raw::c_int,
ip_addr: *mut u8,
port: u16,
protocol: ::std::os::raw::c_int,
results: *mut ::std::os::raw::c_longlong,
n_result: usize,
n_hit_result: *mut usize,
state: *mut maat_state,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_scan_string(
instance: *mut maat,
table_id: ::std::os::raw::c_int,
data: *const ::std::os::raw::c_char,
data_len: usize,
results: *mut ::std::os::raw::c_longlong,
n_result: usize,
n_hit_result: *mut usize,
state: *mut maat_state,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct maat_stream {
_unused: [u8; 0],
}
extern "C" {
pub fn maat_stream_new(
instance: *mut maat,
table_id: ::std::os::raw::c_int,
state: *mut maat_state,
) -> *mut maat_stream;
}
extern "C" {
pub fn maat_stream_scan(
stream: *mut maat_stream,
data: *const ::std::os::raw::c_char,
data_len: ::std::os::raw::c_int,
results: *mut ::std::os::raw::c_longlong,
n_result: usize,
n_hit_result: *mut usize,
state: *mut maat_state,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_stream_free(stream: *mut maat_stream);
}
extern "C" {
pub fn maat_state_new(instance: *mut maat, thread_id: ::std::os::raw::c_int)
-> *mut maat_state;
}
extern "C" {
pub fn maat_state_reset(state: *mut maat_state);
}
extern "C" {
pub fn maat_state_free(state: *mut maat_state);
}
extern "C" {
pub fn maat_state_set_scan_district(
state: *mut maat_state,
table_id: ::std::os::raw::c_int,
district: *const ::std::os::raw::c_char,
district_len: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_state_set_last_scan(state: *mut maat_state) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_state_set_scan_compile_table(
state: *mut maat_state,
compile_table_id: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_state_get_compile_table_ids(
state: *mut maat_state,
compile_ids: *mut ::std::os::raw::c_longlong,
n_compile_ids: usize,
compile_table_ids: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_state_get_hit_paths(
state: *mut maat_state,
paths: *mut maat_hit_path,
n_path: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief get the total number of scans after maat_state_new"]
pub fn maat_state_get_scan_count(state: *mut maat_state) -> usize;
}
extern "C" {
#[doc = " @brief get hit groups(full or incremental)\n\n @param type:\n MAAT_LIST_TYPE_FULL => get all hit groups after maat_state_new\n MAAT_LIST_TYPE_INC => get hit groups for this scan"]
pub fn maat_state_get_hit_groups(
state: *mut maat_state,
type_: MaatListType,
groups: *mut maat_hit_group,
n_group: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn maat_hit_group_compile_id(
instance: *mut maat,
group: *mut maat_hit_group,
) -> ::std::os::raw::c_int;
}
|