Home
last modified time | relevance | path

Searched refs:length (Results 1 – 17 of 17) sorted by relevance

/smoltcp-0.9.1/examples/
Dbenchmark.rs37 let length = cmp::min(buffer.len(), AMOUNT - processed); in client() localVariable
39 Client::Reader => stream.read(&mut buffer[..length]), in client()
40 Client::Writer => stream.write(&buffer[..length]), in client()
123 let length = socket in main() localVariable
125 let length = cmp::min(buffer.len(), AMOUNT - processed); in main() localVariable
126 (length, length) in main()
129 processed += length; in main()
141 let length = socket in main() localVariable
143 let length = cmp::min(buffer.len(), AMOUNT - processed); in main() localVariable
144 (length, length) in main()
[all …]
Dsixlowpan_benchmark.rs101 let length = cmp::min(buffer.len(), AMOUNT - processed); in client() localVariable
103 Client::Reader => stream.read(&mut buffer[..length]), in client()
104 Client::Writer => stream.write(&buffer[..length]), in client()
194 let length = socket in main() localVariable
196 let length = cmp::min(buffer.len(), AMOUNT - processed); in main() localVariable
197 (length, length) in main()
200 processed += length; in main()
210 let length = socket in main() localVariable
212 let length = cmp::min(buffer.len(), AMOUNT - processed); in main() localVariable
213 (length, length) in main()
[all …]
/smoltcp-0.9.1/src/wire/
Dipv6option.rs84 pub const fn DATA(length: u8) -> Field { in DATA()
85 2..length as usize + 2 in DATA()
225 length: u8,
241 length: opt.data_len(), in parse()
251 Repr::PadN(length) => field::DATA(length).end, in buffer_len()
252 Repr::Unknown { length, .. } => field::DATA(length).end, in buffer_len()
270 length, in emit()
274 opt.set_data_len(length); in emit()
275 opt.data_mut().copy_from_slice(&data[..length as usize]); in emit()
286 length: usize, field
[all …]
Dipv6routing.rs406 length: u8,
416 length: u8,
440 length: header.header_len(), in parse()
446 length: header.header_len(), in parse()
462 &Repr::Rpl { length, .. } | &Repr::Type2 { length, .. } => field::DATA(length).end, in buffer_len()
471 length, in emit()
476 header.set_header_len(length); in emit()
484 length, in emit()
492 header.set_header_len(length); in emit()
510 length, in fmt()
[all …]
Dipv6hopbyhop.rs166 pub length: u8, field
179 length: header.header_len(), in parse()
187 field::OPTIONS(self.length).end in buffer_len()
193 header.set_header_len(self.length); in emit()
208 self.next_header, self.length in fmt()
321 length: 0, in test_repr_parse_valid()
332 length: 1, in test_repr_parse_valid()
342 length: 0, in test_repr_emit()
352 length: 1, in test_repr_emit()
Dtcp.rs90 pub const fn OPTIONS(length: u8) -> Field { in OPTIONS()
91 URGENT.end..(length as usize) in OPTIONS()
289 let mut length = data.len() - self.header_len() as usize; in segment_len() localVariable
291 length += 1 in segment_len()
294 length += 1 in segment_len()
296 length in segment_len()
608 let (length, option); in parse()
611 length = 1; in parse()
615 length = 1; in parse()
619 length = *buffer.get(1).ok_or(Error)? as usize; in parse()
[all …]
Dndiscoption.rs78 pub const fn DATA(length: u8) -> Field { in DATA()
79 2..length as usize * 8 in DATA()
423 length: u8,
491 length: opt.data_len(), in parse()
514 &Repr::Unknown { length, .. } => field::DATA(length).end, in buffer_len()
570 length, in emit()
574 opt.set_data_len(length); in emit()
603 type_: id, length, .. in fmt()
Dudp.rs26 pub const fn PAYLOAD(length: u16) -> Field { in PAYLOAD()
27 CHECKSUM.end..(length as usize) in PAYLOAD()
138 let length = self.len(); in payload() localVariable
140 &data[field::PAYLOAD(length)] in payload()
197 let length = self.len(); in payload_mut() localVariable
199 &mut data[field::PAYLOAD(length)] in payload_mut()
Dip.rs649 pub fn set_payload_len(&mut self, length: usize) { in set_payload_len()
652 Repr::Ipv4(Ipv4Repr { payload_len, .. }) => *payload_len = length, in set_payload_len()
654 Repr::Ipv6(Ipv6Repr { payload_len, .. }) => *payload_len = length, in set_payload_len()
757 length: u32, in pseudo_header()
764 NetworkEndian::write_u16(&mut proto_len[2..4], length as u16); in pseudo_header()
777 NetworkEndian::write_u32(&mut proto_len[0..4], length); in pseudo_header()
Dsixlowpan.rs1655 fn set_length(&mut self, length: u8) { in set_length()
1659 data[start] = length; in set_length()
1669 length: u8, field
1685 length: packet.payload().len() as u8, in parse()
1707 packet.set_length(self.length); in emit()
2072 length: 6, in ext_header_emit()
Dieee802154.rs524 let length = if let Some(len) = self.key_identifier_length() { in key_identifier() localVariable
529 &b[5..][..length] in key_identifier()
/smoltcp-0.9.1/src/storage/
Dring_buffer.rs30 length: usize, field
44 length: 0, in new()
51 self.length = 0; in clear()
72 self.length in len()
83 cmp::min(self.window(), self.capacity() - self.get_idx(self.length)) in contiguous_window()
127 let index = self.get_idx_unchecked(self.length); in enqueue_one_with()
130 self.length += 1; in enqueue_one_with()
157 self.length -= 1; in dequeue_one_with()
185 if self.length == 0 { in enqueue_many_with()
191 let write_at = self.get_idx(self.length); in enqueue_many_with()
[all …]
/smoltcp-0.9.1/src/phy/
Dpcap_writer.rs75 fn packet_header(&mut self, timestamp: Instant, length: usize) { in packet_header()
76 assert!(length <= 65535); in packet_header()
80 self.write_u32(length as u32); // captured length in packet_header()
81 self.write_u32(length as u32); // original length in packet_header()
/smoltcp-0.9.1/src/socket/
Dudp.rs335 let length = min(data.len(), buffer.len()); in recv_slice() localVariable
336 data[..length].copy_from_slice(&buffer[..length]); in recv_slice()
337 Ok((length, endpoint)) in recv_slice()
368 let length = min(data.len(), buffer.len()); in peek_slice() localVariable
369 data[..length].copy_from_slice(&buffer[..length]); in peek_slice()
370 Ok((length, endpoint)) in peek_slice()
Draw.rs245 let length = min(data.len(), buffer.len()); in recv_slice() localVariable
246 data[..length].copy_from_slice(&buffer[..length]); in recv_slice()
247 Ok(length) in recv_slice()
275 let length = min(data.len(), buffer.len()); in peek_slice() localVariable
276 data[..length].copy_from_slice(&buffer[..length]); in peek_slice()
277 Ok(length) in peek_slice()
Dicmp.rs365 let length = cmp::min(data.len(), buffer.len()); in recv_slice() localVariable
366 data[..length].copy_from_slice(&buffer[..length]); in recv_slice()
367 Ok((length, endpoint)) in recv_slice()
/smoltcp-0.9.1/
DREADME.md276 Maximum length of DNS names that can be queried. Default: 255.