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
use std::vec::Vec;
#[derive(Debug, PartialEq)]
pub enum Archive {
Policy,
NewChain,
Append,
}
#[derive(Debug)]
pub struct RIPTInterface {
pub negate: bool,
pub value: String,
}
#[derive(Debug)]
pub struct Extension {
m: &'static str,
}
#[derive(Debug)]
pub struct RIPTRule {
pub origin: String,
pub archive: Archive,
pub table: String,
pub chain: String,
pub input: Option<RIPTInterface>,
pub output: Option<RIPTInterface>,
pub protocol: String,
pub sport: String,
pub dport: String,
pub jump: String,
pub extensions: Vec<Extension>,
}