/smoltcp-0.9.1/src/ |
D | lib.rs | 135 pub const ASSEMBLER_MAX_SEGMENT_COUNT: usize = 4; 136 pub const DNS_MAX_NAME_SIZE: usize = 255; 137 pub const DNS_MAX_RESULT_COUNT: usize = 1; 138 pub const DNS_MAX_SERVER_COUNT: usize = 1; 139 pub const FRAGMENTATION_BUFFER_SIZE: usize = 1500; 140 pub const IFACE_MAX_ADDR_COUNT: usize = 8; 141 pub const IFACE_MAX_MULTICAST_GROUP_COUNT: usize = 4; 142 pub const IFACE_MAX_ROUTE_COUNT: usize = 4; 143 pub const IFACE_MAX_SIXLOWPAN_ADDRESS_CONTEXT_COUNT: usize = 4; 144 pub const IFACE_NEIGHBOR_CACHE_COUNT: usize = 3; [all …]
|
/smoltcp-0.9.1/src/storage/ |
D | assembler.rs | 12 hole_size: usize, 13 data_size: usize, 39 fn hole_and_data(hole_size: usize, data_size: usize) -> Contig { in hole_and_data() argument 54 fn total_size(&self) -> usize { in total_size() argument 58 fn shrink_hole_by(&mut self, size: usize) { in shrink_hole_by() argument 62 fn shrink_hole_to(&mut self, size: usize) { in shrink_hole_to() argument 116 pub fn peek_front(&self) -> usize { in peek_front() argument 135 fn remove_contig_at(&mut self, at: usize) { in remove_contig_at() argument 150 fn add_contig_at(&mut self, at: usize) -> Result<&mut Contig, TooManyHolesError> { in add_contig_at() 165 pub fn add(&mut self, mut offset: usize, size: usize) -> Result<(), TooManyHolesError> { in add() argument [all …]
|
D | ring_buffer.rs | 29 read_at: usize, 30 length: usize, 55 pub fn capacity(&self) -> usize { in capacity() argument 71 pub fn len(&self) -> usize { in len() argument 76 pub fn window(&self) -> usize { in window() argument 82 pub fn contiguous_window(&self) -> usize { in contiguous_window() argument 98 fn get_idx(&self, idx: usize) -> usize { in get_idx() argument 109 fn get_idx_unchecked(&self, idx: usize) -> usize { in get_idx_unchecked() argument 181 pub fn enqueue_many_with<'b, R, F>(&'b mut self, f: F) -> (usize, R) in enqueue_many_with() argument 183 F: FnOnce(&'b mut [T]) -> (usize, R), in enqueue_many_with() argument [all …]
|
D | packet_buffer.rs | 11 size: usize, 22 fn padding(size: usize) -> PacketMetadata<H> { in padding() 29 fn packet(size: usize, header: H) -> PacketMetadata<H> { in packet() argument 80 pub fn enqueue(&mut self, size: usize, header: H) -> Result<&mut [u8], Full> { in enqueue() argument 124 max_size: usize, in enqueue_with_infallible() argument 127 ) -> Result<usize, Full> in enqueue_with_infallible() argument 129 F: FnOnce(&'b mut [u8]) -> usize, in enqueue_with_infallible() argument 233 pub fn packet_capacity(&self) -> usize { in packet_capacity() argument 238 pub fn payload_capacity(&self) -> usize { in payload_capacity() argument
|
/smoltcp-0.9.1/src/phy/sys/ |
D | bpf.rs | 22 const SIZEOF_BPF_HDR: usize = 18; 25 const SIZEOF_BPF_HDR: usize = 24; 30 const BPF_HDRLEN: usize = (((SIZEOF_BPF_HDR + ETHERNET_HEADER_LEN) + mem::align_of::<u32>() - 1) 105 pub fn interface_mtu(&mut self) -> io::Result<usize> { in interface_mtu() argument 110 Ok(bufsize as usize) in interface_mtu() 113 pub fn recv(&mut self, buffer: &mut [u8]) -> io::Result<usize> { in recv() argument 125 let len = len as usize; in recv() 137 pub fn send(&mut self, buffer: &[u8]) -> io::Result<usize> { in send() argument 149 Ok(len as usize) in send()
|
D | raw_socket.rs | 49 pub fn interface_mtu(&mut self) -> io::Result<usize> { in interface_mtu() argument 50 ifreq_ioctl(self.lower, &mut self.ifreq, imp::SIOCGIFMTU).map(|mtu| mtu as usize) in interface_mtu() 78 pub fn recv(&mut self, buffer: &mut [u8]) -> io::Result<usize> { in recv() argument 89 Ok(len as usize) in recv() 93 pub fn send(&mut self, buffer: &[u8]) -> io::Result<usize> { in send() argument 104 Ok(len as usize) in send()
|
D | tuntap_interface.rs | 52 pub fn interface_mtu(&mut self) -> io::Result<usize> { in interface_mtu() argument 61 let ip_mtu = ifreq_ioctl(lower, &mut self.ifreq, imp::SIOCGIFMTU).map(|mtu| mtu as usize); in interface_mtu() 84 pub fn recv(&mut self, buffer: &mut [u8]) -> io::Result<usize> { in recv() argument 94 Ok(len as usize) in recv() 98 pub fn send(&mut self, buffer: &[u8]) -> io::Result<usize> { in send() argument 108 Ok(len as usize) in send()
|
/smoltcp-0.9.1/src/wire/ |
D | sixlowpan.rs | 11 const ADDRESS_CONTEXT_LENGTH: usize = 8; 24 WithContext((usize, AddressMode<'a>)), 68 let copy_context = |index: usize, bytes: &mut [u8]| -> Result<()> { in resolve() 254 pub const FIRST_FRAGMENT_HEADER_SIZE: usize = 4; 255 pub const NEXT_FRAGMENT_HEADER_SIZE: usize = 5; 260 pub const DISPATCH: usize = 0; 263 pub const DATAGRAM_OFFSET: usize = 4; 432 pub const fn buffer_len(&self) -> usize { in buffer_len() argument 574 if offset as usize > buffer.len() { in check_len() 596 let start = (self.ip_fields_start() + self.traffic_class_size()) as usize; in next_header() [all …]
|
D | tcp.rs | 23 impl ops::Add<usize> for SeqNumber { 26 fn add(self, rhs: usize) -> SeqNumber { in add() 27 if rhs > i32::MAX as usize { in add() 34 impl ops::Sub<usize> for SeqNumber { 37 fn sub(self, rhs: usize) -> SeqNumber { in sub() 38 if rhs > i32::MAX as usize { in sub() 45 impl ops::AddAssign<usize> for SeqNumber { 46 fn add_assign(&mut self, rhs: usize) { in add_assign() argument 52 type Output = usize; 54 fn sub(self, rhs: SeqNumber) -> usize { in sub() argument [all …]
|
D | ipv4.rs | 22 pub const MIN_MTU: usize = 576; 27 pub const ADDR_SIZE: usize = 4; 165 ["Prefix length should be <= 32"][(prefix_len > 32) as usize]; in new() 291 pub const VER_IHL: usize = 0; 292 pub const DSCP_ECN: usize = 1; 296 pub const TTL: usize = 8; 297 pub const PROTOCOL: usize = 9; 303 pub const HEADER_LEN: usize = field::DST_ADDR.end; 336 } else if len < self.header_len() as usize { in check_len() 340 } else if len < self.total_len() as usize { in check_len() [all …]
|
D | ipv6.rs | 16 pub const MIN_MTU: usize = 1280; 21 pub const ADDR_SIZE: usize = 16; 26 pub const IPV4_MAPPED_PREFIX_SIZE: usize = ADDR_SIZE - 4; // 4 == ipv4::ADDR_SIZE , cannot DRY here… 201 let idx = (mask as usize) / 8; 202 let modulus = (mask as usize) % 8; 429 pub const NXT_HDR: usize = 6; 432 pub const HOP_LIMIT: usize = 7; 440 pub const HEADER_LEN: usize = field::DST_ADDR.end; 484 pub const fn header_len(&self) -> usize { in header_len() argument 520 pub fn total_len(&self) -> usize { in total_len() argument [all …]
|
D | udp.rs | 27 CHECKSUM.end..(length as usize) in PAYLOAD() 31 pub const HEADER_LEN: usize = field::CHECKSUM.end; 63 let field_len = self.len() as usize; in check_len() 129 checksum::data(&data[..self.len() as usize]), in verify_checksum() 184 checksum::data(&data[..self.len() as usize]), in fill_checksum() 249 pub const fn header_len(&self) -> usize { in header_len() argument 258 pub(crate) fn emit_header<T: ?Sized>(&self, packet: &mut Packet<&mut T>, payload_len: usize) in emit_header() 274 payload_len: usize, in emit() argument
|
D | ipv6routing.rs | 79 pub const MIN_HEADER_SIZE: usize = 4; 82 pub const NXT_HDR: usize = 0; 85 pub const LENGTH: usize = 1; 87 pub const TYPE: usize = 2; 89 pub const SEG_LEFT: usize = 3; 95 let bytes = length_field as usize * 8 + 8; in DATA() 133 pub const CMPR: usize = 4; 135 pub const PAD: usize = 5; 460 pub const fn buffer_len(&self) -> usize { in buffer_len() argument
|
D | mod.rs | 74 pub type Field = ::core::ops::Range<usize>; 75 pub type Rest = ::core::ops::RangeFrom<usize>; 362 pub const MAX_HARDWARE_ADDRESS_LEN: usize = 6; 364 pub const MAX_HARDWARE_ADDRESS_LEN: usize = 8; 390 &self.data[..self.len as usize] in as_bytes() 393 pub const fn len(&self) -> usize { in len() argument 394 self.len as usize in len()
|
D | ipv6option.rs | 80 pub const TYPE: usize = 0; 82 pub const LENGTH: usize = 1; 85 2..length as usize + 2 in DATA() 248 pub const fn buffer_len(&self) -> usize { in buffer_len() argument 275 opt.data_mut().copy_from_slice(&data[..length as usize]); in emit() 285 pos: usize, 286 length: usize, 299 pub fn new(data: &'a [u8], length: usize) -> Ipv6OptionsIterator<'a> { in new()
|
D | arp.rs | 37 pub const HLEN: usize = 4; 38 pub const PLEN: usize = 5; 44 start..(start + hardware_len as usize) in SHA() 50 start..(start + protocol_len as usize) in SPA() 56 start..(start + hardware_len as usize) in THA() 62 start..(start + protocol_len as usize) in TPA() 292 pub const fn buffer_len(&self) -> usize { in buffer_len() argument
|
D | icmpv6.rs | 197 pub const TYPE: usize = 0; 198 pub const CODE: usize = 1; 207 pub const HEADER_END: usize = 8; 211 pub const CUR_HOP_LIMIT: usize = 4; 212 pub const ROUTER_FLAGS: usize = 5; 221 pub const NEIGH_FLAGS: usize = 4; 233 pub const SQRV: usize = 24; 234 pub const QQIC: usize = 25; 242 pub const RECORD_TYPE: usize = 0; 243 pub const AUX_DATA_LEN: usize = 1; [all …]
|
D | dns.rs | 72 pub const HEADER_END: usize = 12; 174 let len = (x & 0x3F) as usize; in parse_name() 187 let ptr = ((x & 0x3F) as usize) << 8 | (y as usize); in parse_name() 263 ) -> Result<(&'a [u8], Option<usize>)> { in parse_name_part() argument 270 let len = (x & 0x3F) as usize; in parse_name_part() 279 let ptr = ((x & 0x3F) as usize) << 8 | (y as usize); in parse_name_part() 314 pub const fn buffer_len(&self) -> usize { in buffer_len() argument 380 let len = NetworkEndian::read_u16(&rest[8..10]) as usize; in parse() 415 pub const fn buffer_len(&self) -> usize { in buffer_len() argument
|
/smoltcp-0.9.1/ |
D | build.rs | 6 static CONFIGS: &[(&str, usize)] = &[ 25 value: usize, 58 let Ok(value) = value.parse::<usize>() else { in main() 71 let Ok(value) = value.parse::<usize>() else { in main()
|
/smoltcp-0.9.1/fuzz/fuzz_targets/ |
D | tcp_headers.rs | 31 .fetch_add(duration.total_millis() as usize, Ordering::SeqCst); in advance() 40 struct TcpHeaderFuzzer([u8; 56], usize); 72 Ipv4Packet::new_unchecked(eth_frame.payload()).header_len() as usize in fuzz_packet() 75 Ipv6Packet::new_unchecked(eth_frame.payload()).header_len() as usize in fuzz_packet() 96 (tcp_packet[12] as usize >> 4) * 4 in fuzz_packet()
|
/smoltcp-0.9.1/src/phy/ |
D | fault_injector.rs | 16 const MTU: usize = 1536; 23 max_size: usize, 46 let index = (xorshift32(&mut self.rng_seed) as usize) % buffer.len(); in corrupt() 133 pub fn max_packet_size(&self) -> usize { in max_packet_size() argument 175 pub fn set_max_packet_size(&mut self, size: usize) { in set_max_packet_size() argument 289 fn consume<R, F>(mut self, len: usize, f: F) -> R in consume() argument
|
D | mod.rs | 223 pub max_transmission_unit: usize, 232 pub max_burst_size: Option<usize>, 242 pub fn ip_mtu(&self) -> usize { in ip_mtu() argument 352 fn consume<R, F>(self, len: usize, f: F) -> R in consume() argument
|
/smoltcp-0.9.1/src/socket/ |
D | udp.rs | 203 pub fn packet_recv_capacity(&self) -> usize { in packet_recv_capacity() argument 209 pub fn packet_send_capacity(&self) -> usize { in packet_send_capacity() argument 215 pub fn payload_recv_capacity(&self) -> usize { in payload_recv_capacity() argument 221 pub fn payload_send_capacity(&self) -> usize { in payload_send_capacity() argument 234 size: usize, in send() argument 268 max_size: usize, in send_with() argument 271 ) -> Result<usize, SendError> in send_with() argument 273 F: FnOnce(&mut [u8]) -> usize, in send_with() argument 333 pub fn recv_slice(&mut self, data: &mut [u8]) -> Result<(usize, IpEndpoint), RecvError> { in recv_slice() argument 366 pub fn peek_slice(&mut self, data: &mut [u8]) -> Result<(usize, &IpEndpoint), RecvError> { in peek_slice() argument [all …]
|
D | raw.rs | 143 pub fn packet_recv_capacity(&self) -> usize { in packet_recv_capacity() argument 149 pub fn packet_send_capacity(&self) -> usize { in packet_send_capacity() argument 155 pub fn payload_recv_capacity(&self) -> usize { in payload_recv_capacity() argument 161 pub fn payload_send_capacity(&self) -> usize { in payload_send_capacity() argument 176 pub fn send(&mut self, size: usize) -> Result<&mut [u8], SendError> { in send() 195 pub fn send_with<F>(&mut self, max_size: usize, f: F) -> Result<usize, SendError> in send_with() argument 197 F: FnOnce(&mut [u8]) -> usize, in send_with() argument 243 pub fn recv_slice(&mut self, data: &mut [u8]) -> Result<usize, RecvError> { in recv_slice() argument 273 pub fn peek_slice(&mut self, data: &mut [u8]) -> Result<usize, RecvError> { in peek_slice() argument 421 fn buffer(packets: usize) -> PacketBuffer<'static> { in buffer()
|
/smoltcp-0.9.1/src/iface/ |
D | fragmentation.rs | 37 total_size: Option<usize>, 66 pub(crate) fn set_total_size(&mut self, size: usize) -> Result<(), AssemblerError> { in set_total_size() 94 offset: usize, in add_with() argument 95 f: impl Fn(&mut [u8]) -> Result<usize, AssemblerError>, in add_with() argument 120 pub(crate) fn add(&mut self, data: &[u8], offset: usize) -> Result<(), AssemblerError> { in add() 226 id: usize,
|