@@ -143,8 +143,8 @@ impl SocketAddrV6 {
143
143
sin6_family : c:: AF_INET6 as c:: sa_family_t ,
144
144
sin6_port : hton ( port) ,
145
145
sin6_addr : * ip. as_inner ( ) ,
146
- sin6_flowinfo : hton ( flowinfo) ,
147
- sin6_scope_id : hton ( scope_id) ,
146
+ sin6_flowinfo : flowinfo,
147
+ sin6_scope_id : scope_id,
148
148
.. unsafe { mem:: zeroed ( ) }
149
149
} ,
150
150
}
@@ -173,23 +173,23 @@ impl SocketAddrV6 {
173
173
/// Returns the flow information associated with this address,
174
174
/// corresponding to the `sin6_flowinfo` field in C.
175
175
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
176
- pub fn flowinfo ( & self ) -> u32 { ntoh ( self . inner . sin6_flowinfo ) }
176
+ pub fn flowinfo ( & self ) -> u32 { self . inner . sin6_flowinfo }
177
177
178
178
/// Change the flow information associated with this socket address.
179
179
#[ unstable( feature = "sockaddr_setters" , reason = "recent addition" , issue = "31572" ) ]
180
180
pub fn set_flowinfo ( & mut self , new_flowinfo : u32 ) {
181
- self . inner . sin6_flowinfo = hton ( new_flowinfo)
181
+ self . inner . sin6_flowinfo = new_flowinfo;
182
182
}
183
183
184
184
/// Returns the scope ID associated with this address,
185
185
/// corresponding to the `sin6_scope_id` field in C.
186
186
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
187
- pub fn scope_id ( & self ) -> u32 { ntoh ( self . inner . sin6_scope_id ) }
187
+ pub fn scope_id ( & self ) -> u32 { self . inner . sin6_scope_id }
188
188
189
189
/// Change the scope ID associated with this socket address.
190
190
#[ unstable( feature = "sockaddr_setters" , reason = "recent addition" , issue = "31572" ) ]
191
191
pub fn set_scope_id ( & mut self , new_scope_id : u32 ) {
192
- self . inner . sin6_scope_id = hton ( new_scope_id)
192
+ self . inner . sin6_scope_id = new_scope_id;
193
193
}
194
194
}
195
195
0 commit comments