1
2
3
/* automatically generated by rust-bindgen */

# [ repr ( C ) ] pub struct __BindgenUnionField < T > ( :: std :: marker :: PhantomData < T > ) ; impl < T > __BindgenUnionField < T > { # [ inline ] pub const fn new ( ) -> Self { __BindgenUnionField ( :: std :: marker :: PhantomData ) } # [ inline ] pub unsafe fn as_ref ( & self ) -> & T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut ( & mut self ) -> & mut T { :: std :: mem :: transmute ( self ) } } impl < T > :: std :: default :: Default for __BindgenUnionField < T > { # [ inline ] fn default ( ) -> Self { Self :: new ( ) } } impl < T > :: std :: clone :: Clone for __BindgenUnionField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } impl < T > :: std :: marker :: Copy for __BindgenUnionField < T > { } impl < T > :: std :: fmt :: Debug for __BindgenUnionField < T > { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . write_str ( "__BindgenUnionField" ) } } impl < T > :: std :: hash :: Hash for __BindgenUnionField < T > { fn hash < H : :: std :: hash :: Hasher > ( & self , _state : & mut H ) { } } impl < T > :: std :: cmp :: PartialEq for __BindgenUnionField < T > { fn eq ( & self , _other : & __BindgenUnionField < T > ) -> bool { true } } impl < T > :: std :: cmp :: Eq for __BindgenUnionField < T > { } pub const RIST_MAX_STRING_SHORT : u32 = 128 ; pub const RIST_MAX_STRING_LONG : u32 = 256 ; pub const RIST_PEER_UDPSOCKET_VERSION : u32 = 0 ; pub const RIST_PEER_CONFIG_VERSION : u32 = 0 ; pub const RIST_STATS_VERSION : u32 = 0 ; pub const RIST_DEFAULT_VIRT_SRC_PORT : u32 = 1971 ; pub const RIST_DEFAULT_VIRT_DST_PORT : u32 = 1968 ; pub const RIST_DEFAULT_RECOVERY_MAXBITRATE : u32 = 100000 ; pub const RIST_DEFAULT_RECOVERY_MAXBITRATE_RETURN : u32 = 0 ; pub const RIST_DEFAULT_RECOVERY_LENGHT_MIN : u32 = 1000 ; pub const RIST_DEFAULT_RECOVERY_LENGHT_MAX : u32 = 1000 ; pub const RIST_DEFAULT_RECOVERY_REORDER_BUFFER : u32 = 25 ; pub const RIST_DEFAULT_RECOVERY_RTT_MIN : u32 = 50 ; pub const RIST_DEFAULT_RECOVERY_RTT_MAX : u32 = 500 ; pub const RIST_DEFAULT_MIN_RETRIES : u32 = 6 ; pub const RIST_DEFAULT_MAX_RETRIES : u32 = 20 ; pub const RIST_DEFAULT_SESSION_TIMEOUT : u32 = 60000 ; pub const RIST_DEFAULT_KEEPALIVE_INTERVAL : u32 = 1000 ; pub const RIST_URL_PARAM_BUFFER_SIZE : & 'static [ u8 ; 7usize ] = b"buffer\0" ; pub const RIST_URL_PARAM_SECRET : & 'static [ u8 ; 7usize ] = b"secret\0" ; pub const RIST_URL_PARAM_AES_TYPE : & 'static [ u8 ; 9usize ] = b"aes-type\0" ; pub const RIST_URL_PARAM_BANDWIDTH : & 'static [ u8 ; 10usize ] = b"bandwidth\0" ; pub const RIST_URL_PARAM_RET_BANDWIDTH : & 'static [ u8 ; 17usize ] = b"return-bandwidth\0" ; pub const RIST_URL_PARAM_REORDER_BUFFER : & 'static [ u8 ; 15usize ] = b"reorder-buffer\0" ; pub const RIST_URL_PARAM_RTT : & 'static [ u8 ; 4usize ] = b"rtt\0" ; pub const RIST_URL_PARAM_COMPRESSION : & 'static [ u8 ; 12usize ] = b"compression\0" ; pub const RIST_URL_PARAM_CNAME : & 'static [ u8 ; 6usize ] = b"cname\0" ; pub const RIST_URL_PARAM_VIRT_DST_PORT : & 'static [ u8 ; 14usize ] = b"virt-dst-port\0" ; pub const RIST_URL_PARAM_WEIGHT : & 'static [ u8 ; 7usize ] = b"weight\0" ; pub const RIST_URL_PARAM_MIFACE : & 'static [ u8 ; 7usize ] = b"miface\0" ; pub const RIST_URL_PARAM_SESSION_TIMEOUT : & 'static [ u8 ; 16usize ] = b"session-timeout\0" ; pub const RIST_URL_PARAM_KEEPALIVE_INT : & 'static [ u8 ; 19usize ] = b"keepalive-interval\0" ; pub const RIST_URL_PARAM_BUFFER_SIZE_MIN : & 'static [ u8 ; 11usize ] = b"buffer-min\0" ; pub const RIST_URL_PARAM_BUFFER_SIZE_MAX : & 'static [ u8 ; 11usize ] = b"buffer-max\0" ; pub const RIST_URL_PARAM_RTT_MIN : & 'static [ u8 ; 8usize ] = b"rtt-min\0" ; pub const RIST_URL_PARAM_RTT_MAX : & 'static [ u8 ; 8usize ] = b"rtt-max\0" ; pub const RIST_URL_PARAM_AES_KEY_ROTATION : & 'static [ u8 ; 13usize ] = b"key-rotation\0" ; pub const RIST_URL_PARAM_CONGESTION_CONTROL : & 'static [ u8 ; 19usize ] = b"congestion-control\0" ; pub const RIST_URL_PARAM_MIN_RETRIES : & 'static [ u8 ; 12usize ] = b"min-retries\0" ; pub const RIST_URL_PARAM_MAX_RETRIES : & 'static [ u8 ; 12usize ] = b"max-retries\0" ; pub const RIST_URL_PARAM_TIMING_MODE : & 'static [ u8 ; 12usize ] = b"timing-mode\0" ; pub const RIST_URL_PARAM_VIRT_SRC_PORT : & 'static [ u8 ; 14usize ] = b"virt-src-port\0" ; pub const RIST_URL_PARAM_PROFILE : & 'static [ u8 ; 8usize ] = b"profile\0" ; pub const RIST_URL_PARAM_VERBOSE_LEVEL : & 'static [ u8 ; 14usize ] = b"verbose-level\0" ; pub const rist_nack_type_RIST_NACK_RANGE : rist_nack_type = 0 ; pub const rist_nack_type_RIST_NACK_BITMASK : rist_nack_type = 1 ; pub type rist_nack_type = u32 ; pub const rist_profile_RIST_PROFILE_SIMPLE : rist_profile = 0 ; pub const rist_profile_RIST_PROFILE_MAIN : rist_profile = 1 ; pub const rist_profile_RIST_PROFILE_ADVANCED : rist_profile = 2 ; pub type rist_profile = u32 ; pub const rist_log_level_RIST_LOG_DISABLE : rist_log_level = - 1 ; pub const rist_log_level_RIST_LOG_ERROR : rist_log_level = 3 ; pub const rist_log_level_RIST_LOG_WARN : rist_log_level = 4 ; pub const rist_log_level_RIST_LOG_NOTICE : rist_log_level = 5 ; pub const rist_log_level_RIST_LOG_INFO : rist_log_level = 6 ; pub const rist_log_level_RIST_LOG_DEBUG : rist_log_level = 7 ; pub const rist_log_level_RIST_LOG_SIMULATE : rist_log_level = 100 ; pub type rist_log_level = i32 ; pub const rist_recovery_mode_RIST_RECOVERY_MODE_UNCONFIGURED : rist_recovery_mode = 0 ; pub const rist_recovery_mode_RIST_RECOVERY_MODE_DISABLED : rist_recovery_mode = 1 ; pub const rist_recovery_mode_RIST_RECOVERY_MODE_BYTES : rist_recovery_mode = 2 ; pub const rist_recovery_mode_RIST_RECOVERY_MODE_TIME : rist_recovery_mode = 3 ; pub type rist_recovery_mode = u32 ; pub const rist_congestion_control_mode_RIST_CONGESTION_CONTROL_MODE_OFF : rist_congestion_control_mode = 0 ; pub const rist_congestion_control_mode_RIST_CONGESTION_CONTROL_MODE_NORMAL : rist_congestion_control_mode = 1 ; pub const rist_congestion_control_mode_RIST_CONGESTION_CONTROL_MODE_AGGRESSIVE : rist_congestion_control_mode = 2 ; pub type rist_congestion_control_mode = u32 ; pub const rist_timing_mode_RIST_TIMING_MODE_SOURCE : rist_timing_mode = 0 ; pub const rist_timing_mode_RIST_TIMING_MODE_ARRIVAL : rist_timing_mode = 1 ; pub const rist_timing_mode_RIST_TIMING_MODE_RTC : rist_timing_mode = 2 ; pub type rist_timing_mode = u32 ; pub const rist_data_block_sender_flags_RIST_DATA_FLAGS_USE_SEQ : rist_data_block_sender_flags = 1 ; pub const rist_data_block_sender_flags_RIST_DATA_FLAGS_NEED_FREE : rist_data_block_sender_flags = 2 ; pub type rist_data_block_sender_flags = u32 ; pub const rist_data_block_receiver_flags_RIST_DATA_FLAGS_DISCONTINUITY : rist_data_block_receiver_flags = 1 ; pub type rist_data_block_receiver_flags = u32 ; pub const rist_stats_type_RIST_STATS_SENDER_PEER : rist_stats_type = 0 ; pub const rist_stats_type_RIST_STATS_RECEIVER_FLOW : rist_stats_type = 1 ; pub type rist_stats_type = u32 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct rist_ctx { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct rist_peer { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] pub struct rist_data_block { pub payload : * const :: std :: os :: raw :: c_void , pub payload_len : size_t , pub ts_ntp : u64 , pub virt_src_port : u16 , pub virt_dst_port : u16 , pub peer : * mut rist_peer , pub flow_id : u32 , pub seq : u64 , pub flags : u32 , } # [ test ] fn bindgen_test_layout_rist_data_block ( ) { assert_eq ! ( :: std :: mem :: size_of :: < rist_data_block > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( rist_data_block ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < rist_data_block > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( rist_data_block ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_data_block > ( ) ) ) . payload as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( rist_data_block ) , "::" , stringify ! ( payload ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_data_block > ( ) ) ) . payload_len as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( rist_data_block ) , "::" , stringify ! ( payload_len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_data_block > ( ) ) ) . ts_ntp as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( rist_data_block ) , "::" , stringify ! ( ts_ntp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_data_block > ( ) ) ) . virt_src_port as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( rist_data_block ) , "::" , stringify ! ( virt_src_port ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_data_block > ( ) ) ) . virt_dst_port as * const _ as usize } , 26usize , concat ! ( "Offset of field: " , stringify ! ( rist_data_block ) , "::" , stringify ! ( virt_dst_port ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_data_block > ( ) ) ) . peer as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( rist_data_block ) , "::" , stringify ! ( peer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_data_block > ( ) ) ) . flow_id as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( rist_data_block ) , "::" , stringify ! ( flow_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_data_block > ( ) ) ) . seq as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( rist_data_block ) , "::" , stringify ! ( seq ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_data_block > ( ) ) ) . flags as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( rist_data_block ) , "::" , stringify ! ( flags ) ) ) ; } # [ repr ( C ) ] pub struct rist_oob_block { pub peer : * mut rist_peer , pub payload : * const :: std :: os :: raw :: c_void , pub payload_len : size_t , pub ts_ntp : u64 , } # [ test ] fn bindgen_test_layout_rist_oob_block ( ) { assert_eq ! ( :: std :: mem :: size_of :: < rist_oob_block > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( rist_oob_block ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < rist_oob_block > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( rist_oob_block ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_oob_block > ( ) ) ) . peer as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( rist_oob_block ) , "::" , stringify ! ( peer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_oob_block > ( ) ) ) . payload as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( rist_oob_block ) , "::" , stringify ! ( payload ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_oob_block > ( ) ) ) . payload_len as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( rist_oob_block ) , "::" , stringify ! ( payload_len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_oob_block > ( ) ) ) . ts_ntp as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( rist_oob_block ) , "::" , stringify ! ( ts_ntp ) ) ) ; } # [ repr ( C ) ] pub struct rist_peer_config { pub version : :: std :: os :: raw :: c_int , pub address_family : :: std :: os :: raw :: c_int , pub initiate_conn : :: std :: os :: raw :: c_int , pub address : [ :: std :: os :: raw :: c_char ; 256usize ] , pub miface : [ :: std :: os :: raw :: c_char ; 128usize ] , pub physical_port : u16 , pub virt_dst_port : u16 , pub recovery_mode : rist_recovery_mode , pub recovery_maxbitrate : u32 , pub recovery_maxbitrate_return : u32 , pub recovery_length_min : u32 , pub recovery_length_max : u32 , pub recovery_reorder_buffer : u32 , pub recovery_rtt_min : u32 , pub recovery_rtt_max : u32 , pub weight : u32 , pub secret : [ :: std :: os :: raw :: c_char ; 128usize ] , pub key_size : :: std :: os :: raw :: c_int , pub key_rotation : u32 , pub compression : :: std :: os :: raw :: c_int , pub cname : [ :: std :: os :: raw :: c_char ; 128usize ] , pub congestion_control_mode : rist_congestion_control_mode , pub min_retries : u32 , pub max_retries : u32 , pub session_timeout : u32 , pub keepalive_interval : u32 , pub timing_mode : u32 , } # [ test ] fn bindgen_test_layout_rist_peer_config ( ) { assert_eq ! ( :: std :: mem :: size_of :: < rist_peer_config > ( ) , 728usize , concat ! ( "Size of: " , stringify ! ( rist_peer_config ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < rist_peer_config > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( rist_peer_config ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . address_family as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( address_family ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . initiate_conn as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( initiate_conn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . address as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( address ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . miface as * const _ as usize } , 268usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( miface ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . physical_port as * const _ as usize } , 396usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( physical_port ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . virt_dst_port as * const _ as usize } , 398usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( virt_dst_port ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . recovery_mode as * const _ as usize } , 400usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( recovery_mode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . recovery_maxbitrate as * const _ as usize } , 404usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( recovery_maxbitrate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . recovery_maxbitrate_return as * const _ as usize } , 408usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( recovery_maxbitrate_return ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . recovery_length_min as * const _ as usize } , 412usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( recovery_length_min ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . recovery_length_max as * const _ as usize } , 416usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( recovery_length_max ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . recovery_reorder_buffer as * const _ as usize } , 420usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( recovery_reorder_buffer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . recovery_rtt_min as * const _ as usize } , 424usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( recovery_rtt_min ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . recovery_rtt_max as * const _ as usize } , 428usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( recovery_rtt_max ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . weight as * const _ as usize } , 432usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( weight ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . secret as * const _ as usize } , 436usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( secret ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . key_size as * const _ as usize } , 564usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( key_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . key_rotation as * const _ as usize } , 568usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( key_rotation ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . compression as * const _ as usize } , 572usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( compression ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . cname as * const _ as usize } , 576usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( cname ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . congestion_control_mode as * const _ as usize } , 704usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( congestion_control_mode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . min_retries as * const _ as usize } , 708usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( min_retries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . max_retries as * const _ as usize } , 712usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( max_retries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . session_timeout as * const _ as usize } , 716usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( session_timeout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . keepalive_interval as * const _ as usize } , 720usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( keepalive_interval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_peer_config > ( ) ) ) . timing_mode as * const _ as usize } , 724usize , concat ! ( "Offset of field: " , stringify ! ( rist_peer_config ) , "::" , stringify ! ( timing_mode ) ) ) ; } # [ repr ( C ) ] pub struct rist_stats_sender_peer { pub cname : [ :: std :: os :: raw :: c_char ; 128usize ] , pub peer_id : u32 , pub bandwidth : size_t , pub retry_bandwidth : size_t , pub sent : u64 , pub received : u64 , pub retransmitted : u64 , pub quality : f64 , pub rtt : u32 , } # [ test ] fn bindgen_test_layout_rist_stats_sender_peer ( ) { assert_eq ! ( :: std :: mem :: size_of :: < rist_stats_sender_peer > ( ) , 192usize , concat ! ( "Size of: " , stringify ! ( rist_stats_sender_peer ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < rist_stats_sender_peer > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( rist_stats_sender_peer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_sender_peer > ( ) ) ) . cname as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_sender_peer ) , "::" , stringify ! ( cname ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_sender_peer > ( ) ) ) . peer_id as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_sender_peer ) , "::" , stringify ! ( peer_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_sender_peer > ( ) ) ) . bandwidth as * const _ as usize } , 136usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_sender_peer ) , "::" , stringify ! ( bandwidth ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_sender_peer > ( ) ) ) . retry_bandwidth as * const _ as usize } , 144usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_sender_peer ) , "::" , stringify ! ( retry_bandwidth ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_sender_peer > ( ) ) ) . sent as * const _ as usize } , 152usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_sender_peer ) , "::" , stringify ! ( sent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_sender_peer > ( ) ) ) . received as * const _ as usize } , 160usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_sender_peer ) , "::" , stringify ! ( received ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_sender_peer > ( ) ) ) . retransmitted as * const _ as usize } , 168usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_sender_peer ) , "::" , stringify ! ( retransmitted ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_sender_peer > ( ) ) ) . quality as * const _ as usize } , 176usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_sender_peer ) , "::" , stringify ! ( quality ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_sender_peer > ( ) ) ) . rtt as * const _ as usize } , 184usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_sender_peer ) , "::" , stringify ! ( rtt ) ) ) ; } # [ repr ( C ) ] pub struct rist_stats_receiver_flow { pub peer_count : u32 , pub cname : [ :: std :: os :: raw :: c_char ; 256usize ] , pub flow_id : u32 , pub status : :: std :: os :: raw :: c_int , pub bandwidth : size_t , pub retry_bandwidth : size_t , pub sent : u64 , pub received : u64 , pub missing : u32 , pub reordered : u32 , pub recovered : u32 , pub recovered_one_retry : u32 , pub lost : u32 , pub quality : f64 , pub min_inter_packet_spacing : u64 , pub cur_inter_packet_spacing : u64 , pub max_inter_packet_spacing : u64 , pub rtt : u32 , } # [ test ] fn bindgen_test_layout_rist_stats_receiver_flow ( ) { assert_eq ! ( :: std :: mem :: size_of :: < rist_stats_receiver_flow > ( ) , 368usize , concat ! ( "Size of: " , stringify ! ( rist_stats_receiver_flow ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < rist_stats_receiver_flow > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( rist_stats_receiver_flow ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . peer_count as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( peer_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . cname as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( cname ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . flow_id as * const _ as usize } , 260usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( flow_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . status as * const _ as usize } , 264usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( status ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . bandwidth as * const _ as usize } , 272usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( bandwidth ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . retry_bandwidth as * const _ as usize } , 280usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( retry_bandwidth ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . sent as * const _ as usize } , 288usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( sent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . received as * const _ as usize } , 296usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( received ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . missing as * const _ as usize } , 304usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( missing ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . reordered as * const _ as usize } , 308usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( reordered ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . recovered as * const _ as usize } , 312usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( recovered ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . recovered_one_retry as * const _ as usize } , 316usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( recovered_one_retry ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . lost as * const _ as usize } , 320usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( lost ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . quality as * const _ as usize } , 328usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( quality ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . min_inter_packet_spacing as * const _ as usize } , 336usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( min_inter_packet_spacing ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . cur_inter_packet_spacing as * const _ as usize } , 344usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( cur_inter_packet_spacing ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . max_inter_packet_spacing as * const _ as usize } , 352usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( max_inter_packet_spacing ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats_receiver_flow > ( ) ) ) . rtt as * const _ as usize } , 360usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats_receiver_flow ) , "::" , stringify ! ( rtt ) ) ) ; } # [ repr ( C ) ] pub struct rist_stats { pub json_size : u32 , pub stats_json : * mut :: std :: os :: raw :: c_char , pub version : u16 , pub stats_type : rist_stats_type , pub stats : rist_stats__bindgen_ty_1 , } # [ repr ( C ) ] pub struct rist_stats__bindgen_ty_1 { pub sender_peer : __BindgenUnionField < rist_stats_sender_peer > , pub receiver_flow : __BindgenUnionField < rist_stats_receiver_flow > , pub bindgen_union_field : [ u64 ; 46usize ] , } # [ test ] fn bindgen_test_layout_rist_stats__bindgen_ty_1 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < rist_stats__bindgen_ty_1 > ( ) , 368usize , concat ! ( "Size of: " , stringify ! ( rist_stats__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < rist_stats__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( rist_stats__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats__bindgen_ty_1 > ( ) ) ) . sender_peer as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats__bindgen_ty_1 ) , "::" , stringify ! ( sender_peer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats__bindgen_ty_1 > ( ) ) ) . receiver_flow as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats__bindgen_ty_1 ) , "::" , stringify ! ( receiver_flow ) ) ) ; } # [ test ] fn bindgen_test_layout_rist_stats ( ) { assert_eq ! ( :: std :: mem :: size_of :: < rist_stats > ( ) , 392usize , concat ! ( "Size of: " , stringify ! ( rist_stats ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < rist_stats > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( rist_stats ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats > ( ) ) ) . json_size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats ) , "::" , stringify ! ( json_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats > ( ) ) ) . stats_json as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats ) , "::" , stringify ! ( stats_json ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats > ( ) ) ) . version as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats > ( ) ) ) . stats_type as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats ) , "::" , stringify ! ( stats_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_stats > ( ) ) ) . stats as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( rist_stats ) , "::" , stringify ! ( stats ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct rist_logging_settings { pub log_level : rist_log_level , pub log_cb : :: std :: option :: Option < unsafe extern "C" fn ( arg : * mut :: std :: os :: raw :: c_void , arg1 : rist_log_level , msg : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , pub log_cb_arg : * mut :: std :: os :: raw :: c_void , pub log_socket : :: std :: os :: raw :: c_int , pub log_stream : * mut FILE , } # [ test ] fn bindgen_test_layout_rist_logging_settings ( ) { assert_eq ! ( :: std :: mem :: size_of :: < rist_logging_settings > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( rist_logging_settings ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < rist_logging_settings > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( rist_logging_settings ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_logging_settings > ( ) ) ) . log_level as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( rist_logging_settings ) , "::" , stringify ! ( log_level ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_logging_settings > ( ) ) ) . log_cb as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( rist_logging_settings ) , "::" , stringify ! ( log_cb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_logging_settings > ( ) ) ) . log_cb_arg as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( rist_logging_settings ) , "::" , stringify ! ( log_cb_arg ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_logging_settings > ( ) ) ) . log_socket as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( rist_logging_settings ) , "::" , stringify ! ( log_socket ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < rist_logging_settings > ( ) ) ) . log_stream as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( rist_logging_settings ) , "::" , stringify ! ( log_stream ) ) ) ; } extern "C" { pub fn rist_log ( logging_settings : * mut rist_logging_settings , level : rist_log_level , format : * const :: std :: os :: raw :: c_char , ... ) ; } extern "C" { pub fn rist_logging_set ( logging_settings : * mut * mut rist_logging_settings , log_level : rist_log_level , log_cb : :: std :: option :: Option < unsafe extern "C" fn ( arg : * mut :: std :: os :: raw :: c_void , arg1 : rist_log_level , msg : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > , cb_arg : * mut :: std :: os :: raw :: c_void , address : * mut :: std :: os :: raw :: c_char , logfp : * mut FILE ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Create a RIST receiver instance" ] # [ doc = "" ] # [ doc = " @param[out] ctx a context representing the receiver instance" ] # [ doc = " @param profile RIST profile" ] # [ doc = " @param logging_settings Optional struct containing the logging settings." ] # [ doc = " @return 0 on success, -1 on error" ] pub fn rist_receiver_create ( ctx : * mut * mut rist_ctx , profile : rist_profile , logging_settings : * mut rist_logging_settings ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Configure nack type" ] # [ doc = "" ] # [ doc = " Choose the nack type used by the receiver." ] # [ doc = "" ] # [ doc = " @param ctx RIST receiver context" ] # [ doc = " @param nack_type 0 for range (default), 1 for bitmask" ] # [ doc = " @return 0 on success, -1 on error" ] pub fn rist_receiver_nack_type_set ( ctx : * mut rist_ctx , nacks_type : rist_nack_type ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Reads rist data" ] # [ doc = "" ] # [ doc = " Use this API to read data from an internal fifo queue instead of the callback" ] # [ doc = "" ] # [ doc = " @param ctx RIST receiver context" ] # [ doc = " @param[out] data_block a pointer to the rist_data_block structure" ] # [ doc = " @param timeout How long to wait for queue data (ms), 0 for no wait" ] # [ doc = " @return num buffers remaining on queue +1 (0 if no buffer returned), -1 on error" ] pub fn rist_receiver_data_read ( ctx : * mut rist_ctx , data_block : * mut * const rist_data_block , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Enable data callback channel" ] # [ doc = "" ] # [ doc = " Call to enable data callback channel." ] # [ doc = "" ] # [ doc = " @param ctx RIST receiver context" ] # [ doc = " @param data_callback The function that will be called when a data frame is" ] # [ doc = " received from a sender." ] # [ doc = " @param arg the extra argument passed to the `data_callback`" ] # [ doc = " @return 0 on success, -1 on error" ] pub fn rist_receiver_data_callback_set ( ctx : * mut rist_ctx , data_callback : :: std :: option :: Option < unsafe extern "C" fn ( arg : * mut :: std :: os :: raw :: c_void , data_block : * const rist_data_block ) -> :: std :: os :: raw :: c_int > , arg : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Create Sender" ] # [ doc = "" ] # [ doc = " Create a RIST sender instance" ] # [ doc = "" ] # [ doc = " @param[out] ctx a context representing the sender instance" ] # [ doc = " @param profile RIST profile" ] # [ doc = " @param flow_id Flow ID, use 0 to delegate creation of flow_id to lib" ] # [ doc = " @param logging_settings Struct containing logging settings" ] # [ doc = " @return 0 on success, -1 in case of error." ] pub fn rist_sender_create ( ctx : * mut * mut rist_ctx , profile : rist_profile , flow_id : u32 , logging_settings : * mut rist_logging_settings ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Retrieve the current flow_id value" ] # [ doc = "" ] # [ doc = " Retrieve the current flow_id value" ] # [ doc = "" ] # [ doc = " @param ctx RIST sender context" ] # [ doc = " @param flow_id pointer to your flow_id variable" ] # [ doc = " @return 0 on success, -1 on error" ] pub fn rist_sender_flow_id_get ( ctx : * mut rist_ctx , flow_id : * mut u32 ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Change the flow_id value" ] # [ doc = "" ] # [ doc = " Change the flow_id value" ] # [ doc = "" ] # [ doc = " @param ctx RIST sender context" ] # [ doc = " @param flow_id new flow_id" ] # [ doc = " @return 0 on success, -1 on error" ] pub fn rist_sender_flow_id_set ( ctx : * mut rist_ctx , flow_id : u32 ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Write data into a librist packet." ] # [ doc = "" ] # [ doc = " One sender can send write data into a librist packet." ] # [ doc = "" ] # [ doc = " @param ctx RIST sender context" ] # [ doc = " @param data_block pointer to the rist_data_block structure" ] # [ doc = " the ts_ntp will be populated by the lib if a value of 0 is passed" ] # [ doc = " @return number of written bytes on success, -1 in case of error." ] pub fn rist_sender_data_write ( ctx : * mut rist_ctx , data_block : * const rist_data_block ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Write data directly to a remote receiver peer." ] # [ doc = "" ] # [ doc = " This API is used to transmit out-of-band data to a remote receiver peer" ] # [ doc = "" ] # [ doc = " @param ctx RIST context" ] # [ doc = " @param oob_block a pointer to the struct rist_oob_block" ] # [ doc = " @return number of written bytes on success, -1 in case of error." ] pub fn rist_oob_write ( ctx : * mut rist_ctx , oob_block : * const rist_oob_block ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Reads out-of-band data" ] # [ doc = "" ] # [ doc = " Use this API to read out-of-band data from an internal fifo queue instead of the callback" ] # [ doc = "" ] # [ doc = " @param ctx RIST context" ] # [ doc = " @param[out] oob_block pointer to the rist_oob_block structure" ] # [ doc = " @return 0 on success, -1 in case of error." ] pub fn rist_oob_read ( ctx : * mut rist_ctx , oob_block : * mut * const rist_oob_block ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Enable out-of-band data channel" ] # [ doc = "" ] # [ doc = " Call after receiver initialization to enable out-of-band data." ] # [ doc = "" ] # [ doc = " @param ctx RIST context" ] # [ doc = " @param oob_callback A pointer to the function that will be called when out-of-band data" ] # [ doc = " comes in (NULL function pointer is valid)" ] # [ doc = " @param arg is an the extra argument passed to the `oob_callback`" ] # [ doc = " @return 0 on success, -1 on error" ] pub fn rist_oob_callback_set ( ctx : * mut rist_ctx , oob_callback : :: std :: option :: Option < unsafe extern "C" fn ( arg : * mut :: std :: os :: raw :: c_void , oob_block : * const rist_oob_block ) -> :: std :: os :: raw :: c_int > , arg : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Assign dynamic authentication handler" ] # [ doc = "" ] # [ doc = " Whenever a new peer is connected, @a connect_cb is called." ] # [ doc = " Whenever a new peer is disconnected, @a disconn_cb is called." ] # [ doc = "" ] # [ doc = " @param ctx RIST context" ] # [ doc = " @param connect_cb A pointer to the function that will be called when a new peer" ] # [ doc = " connects. Return 0 or -1 to authorize or decline (NULL function pointer is valid)" ] # [ doc = " @param disconn_cb A pointer to the function that will be called when a new peer" ] # [ doc = " is marked as dead (NULL function pointer is valid)" ] # [ doc = " @param arg is an the extra argument passed to the `conn_cb` and `disconn_cb`" ] pub fn rist_auth_handler_set ( ctx : * mut rist_ctx , connect_cb : :: std :: option :: Option < unsafe extern "C" fn ( arg : * mut :: std :: os :: raw :: c_void , conn_ip : * const :: std :: os :: raw :: c_char , conn_port : u16 , local_ip : * const :: std :: os :: raw :: c_char , local_port : u16 , peer : * mut rist_peer ) -> :: std :: os :: raw :: c_int > , disconn_cb : :: std :: option :: Option < unsafe extern "C" fn ( arg : * mut :: std :: os :: raw :: c_void , peer : * mut rist_peer ) -> :: std :: os :: raw :: c_int > , arg : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Add a peer connector to the existing sender." ] # [ doc = "" ] # [ doc = " One sender can send data to multiple peers." ] # [ doc = "" ] # [ doc = " @param ctx RIST context" ] # [ doc = " @param[out] peer Store the new peer pointer" ] # [ doc = " @param config a pointer to the struct rist_peer_config, which contains" ] # [ doc = "        the configuration parameters for the peer endpoint." ] # [ doc = " @return 0 on success, -1 in case of error." ] pub fn rist_peer_create ( ctx : * mut rist_ctx , peer : * mut * mut rist_peer , config : * const rist_peer_config ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Remove a peer connector to the existing sender." ] # [ doc = "" ] # [ doc = " @param ctx RIST context" ] # [ doc = " @param peer a pointer to the struct rist_peer, which" ] # [ doc = "        points to the peer endpoint." ] # [ doc = " @return 0 on success, -1 in case of error." ] pub fn rist_peer_destroy ( ctx : * mut rist_ctx , peer : * mut rist_peer ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Set RIST max jitter" ] # [ doc = "" ] # [ doc = " Set max jitter" ] # [ doc = "" ] # [ doc = " @param ctx RIST context" ] # [ doc = " @param t max jitter in ms" ] # [ doc = " @return 0 on success, -1 on error" ] pub fn rist_jitter_max_set ( ctx : * mut rist_ctx , t : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Kickstart a pre-configured sender" ] # [ doc = "" ] # [ doc = " After all the peers have been added, this function triggers" ] # [ doc = " the sender to start" ] # [ doc = "" ] # [ doc = " @param ctx RIST context" ] # [ doc = " @return 0 on success, -1 in case of error." ] pub fn rist_start ( ctx : * mut rist_ctx ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Destroy RIST sender" ] # [ doc = "" ] # [ doc = " Destroy the RIST instance" ] # [ doc = "" ] # [ doc = " @param ctx RIST context" ] # [ doc = " @return 0 on success, -1 on error" ] pub fn rist_destroy ( ctx : * mut rist_ctx ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Parses url for peer config data (encryption, compression, etc)" ] # [ doc = "" ] # [ doc = " Use this API to parse a generic URL string and turn it into a meaninful peer_config structure" ] # [ doc = "" ] # [ doc = " @param url a pointer to a url to be parsed, i.e. rist://myserver.net:1234?buffer=100&cname=hello" ] # [ doc = " @param[out] peer_config a pointer to a the rist_peer_config structure (NULL is allowed)." ] # [ doc = " When passing NULL, the library will allocate a new rist_peer_config structure with the latest" ] # [ doc = " default values and it expects the application to free it when it is done using it." ] # [ doc = " @return 0 on success or non-zero on error. The value returned is actually the number" ] # [ doc = " of parameters that are valid" ] pub fn rist_parse_address ( url : * const :: std :: os :: raw :: c_char , peer_config : * mut * const rist_peer_config ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Set callback for receiving stats structs" ] # [ doc = "" ] # [ doc = " @param ctx RIST context" ] # [ doc = " @param statsinterval interval between stats reporting" ] # [ doc = " @param stats_cb Callback function that will be called. The json char pointer must be free()'d when you are finished." ] # [ doc = " @param arg extra arguments for callback function" ] pub fn rist_stats_callback_set ( ctx : * mut rist_ctx , statsinterval : :: std :: os :: raw :: c_int , stats_cb : :: std :: option :: Option < unsafe extern "C" fn ( arg : * mut :: std :: os :: raw :: c_void , stats_container : * const rist_stats ) -> :: std :: os :: raw :: c_int > , arg : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Free the rist_stats structure memory allocations" ] # [ doc = "" ] # [ doc = " @return 0 on success or non-zero on error." ] pub fn rist_stats_free ( stats_container : * const rist_stats ) -> :: std :: os :: raw :: c_int ; }