Lines Matching refs:len
75 let len = data.len(); in check_len() localVariable
77 if len < field::MIN_HEADER_SIZE { in check_len()
83 if len < of.end { in check_len()
142 let len = data[field::LENGTH]; in options_mut() localVariable
143 &mut data[field::OPTIONS(len)] in options_mut()
274 Header::new_unchecked(&bytes).options().len(), in test_overlong()
275 REPR_PACKET_PAD4[2..].len() in test_overlong()
278 Header::new_unchecked(&mut bytes).options_mut().len(), in test_overlong()
279 REPR_PACKET_PAD4[2..].len() in test_overlong()
287 Header::new_unchecked(&bytes).options().len(), in test_overlong()
288 REPR_PACKET_PAD12[2..].len() in test_overlong()
291 Header::new_unchecked(&mut bytes).options_mut().len(), in test_overlong()
292 REPR_PACKET_PAD12[2..].len() in test_overlong()
300 let len = bytes.len() as u8; in test_header_len_overflow() localVariable
301 Header::new_unchecked(&mut bytes).set_header_len(len + 1); in test_header_len_overflow()
307 let len = bytes.len() as u8; in test_header_len_overflow() localVariable
308 Header::new_unchecked(&mut bytes).set_header_len(len + 1); in test_header_len_overflow()
365 assert_eq!(repr.buffer_len(), REPR_PACKET_PAD4.len()); in test_buffer_len()
369 assert_eq!(repr.buffer_len(), REPR_PACKET_PAD12.len()); in test_buffer_len()