Skip to content

Commit 93ae34b

Browse files
fatpeltpatrick felt
andauthored
- add ipv4 ssm structs (#829)
Signed-off-by: patrick felt <patrick.felt@sling.com> Co-authored-by: patrick felt <patrick.felt@sling.com>
1 parent b9a9db4 commit 93ae34b

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/shared/ws2ipdef.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ STRUCT!{struct IP_MREQ {
6363
imr_interface: IN_ADDR,
6464
}}
6565
pub type PIP_MREQ = *mut IP_MREQ;
66+
STRUCT!{struct IP_MREQ_SOURCE {
67+
imr_multiaddr: IN_ADDR,
68+
imr_sourceaddr: IN_ADDR,
69+
imr_interface: IN_ADDR,
70+
}}
71+
pub type PIP_MREQ_SOURCE = *mut IP_MREQ_SOURCE;
6672
pub const IPV6_HOPOPTS: c_int = 1;
6773
pub const IPV6_HDRINCL: c_int = 2;
6874
pub const IPV6_UNICAST_HOPS: c_int = 4;

tests/structs_x86.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2138,6 +2138,8 @@ fn shared_ws2ipdef() {
21382138
assert_eq!(align_of::<SOCKADDR_INET>(), 4);
21392139
assert_eq!(size_of::<IP_MREQ>(), 8);
21402140
assert_eq!(align_of::<IP_MREQ>(), 4);
2141+
assert_eq!(size_of::<IP_MREQ_SOURCE>(), 12);
2142+
assert_eq!(align_of::<IP_MREQ_SOURCE>(), 4);
21412143
assert_eq!(size_of::<IPV6_MREQ>(), 20);
21422144
assert_eq!(align_of::<IPV6_MREQ>(), 4);
21432145
assert_eq!(size_of::<IN_PKTINFO>(), 8);

tests/structs_x86_64.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,6 +2155,8 @@ fn shared_ws2ipdef() {
21552155
assert_eq!(align_of::<SOCKADDR_INET>(), 4);
21562156
assert_eq!(size_of::<IP_MREQ>(), 8);
21572157
assert_eq!(align_of::<IP_MREQ>(), 4);
2158+
assert_eq!(size_of::<IP_MREQ_SOURCE>(), 12);
2159+
assert_eq!(align_of::<IP_MREQ_SOURCE>(), 4);
21582160
assert_eq!(size_of::<IPV6_MREQ>(), 20);
21592161
assert_eq!(align_of::<IPV6_MREQ>(), 4);
21602162
assert_eq!(size_of::<IN_PKTINFO>(), 8);

0 commit comments

Comments
 (0)