Skip to content

Commit ad959c3

Browse files
committed
Add IPPROTO IPV6 and MPTCP
1 parent 2c67f24 commit ad959c3

3 files changed

Lines changed: 36 additions & 0 deletions

File tree

rules/ip/ir_unsafe.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,25 @@
2828
"return_type": {
2929
"type": "i32"
3030
}
31+
},
32+
"f4": {
33+
"body": [
34+
{
35+
"text": "libc::IPPROTO_IPV6"
36+
}
37+
],
38+
"return_type": {
39+
"type": "i32"
40+
}
41+
},
42+
"f5": {
43+
"body": [
44+
{
45+
"text": "libc::IPPROTO_MPTCP"
46+
}
47+
],
48+
"return_type": {
49+
"type": "i32"
50+
}
3151
}
3252
}

rules/ip/src.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@ int f2() {
1111
int f3() {
1212
return IPPROTO_IP;
1313
}
14+
15+
int f4() {
16+
return IPPROTO_IPV6;
17+
}
18+
19+
int f5() {
20+
return IPPROTO_MPTCP;
21+
}

rules/ip/tgt_unsafe.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ unsafe fn f2() -> i32 {
99
unsafe fn f3() -> i32 {
1010
libc::IPPROTO_IP
1111
}
12+
13+
unsafe fn f4() -> i32 {
14+
libc::IPPROTO_IPV6
15+
}
16+
17+
unsafe fn f5() -> i32 {
18+
libc::IPPROTO_MPTCP
19+
}

0 commit comments

Comments
 (0)