@@ -358,7 +358,7 @@ impl SctpSocket {
358
358
359
359
/// Send data in Sctp style, to the provided address (may be `None` if the socket is connected), on the stream `stream`, with the TTL `ttl`.
360
360
/// On success, returns the quantity on bytes sent
361
- pub fn sendmsg < A : ToSocketAddrs > ( & self , msg : & [ u8 ] , address : Option < A > , ppid : u64 , stream : u16 , ttl : libc:: c_ulong ) -> Result < usize > {
361
+ pub fn sendmsg < A : ToSocketAddrs > ( & self , msg : & [ u8 ] , address : Option < A > , ppid : u32 , stream : u16 , ttl : libc:: c_ulong ) -> Result < usize > {
362
362
let len = msg. len ( ) as libc:: size_t ;
363
363
let ( raw_addr, addr_len) = match address {
364
364
Some ( a) => {
@@ -367,8 +367,9 @@ impl SctpSocket {
367
367
} ,
368
368
None => ( std:: ptr:: null_mut ( ) , 0 )
369
369
} ;
370
+ let ppid = ppid. to_be ( ) ;
370
371
unsafe {
371
- return match sctp_sys:: sctp_sendmsg ( self . 0 , msg. as_ptr ( ) as * const libc:: c_void , len, raw_addr, addr_len, ppid, 0 , stream, ttl, 0 ) {
372
+ return match sctp_sys:: sctp_sendmsg ( self . 0 , msg. as_ptr ( ) as * const libc:: c_void , len, raw_addr, addr_len, ppid as libc :: c_ulong , 0 , stream, ttl, 0 ) {
372
373
res if res > 0 => Ok ( res as usize ) ,
373
374
_ => Err ( Error :: last_os_error ( ) )
374
375
} ;
0 commit comments