pnet_macros_support-0.35.0/.cargo_vcs_info.json0000644000000001610000000000100152250ustar { "git": { "sha1": "97ece70e2f87744f2ab47b4177c3888289f89a8f" }, "path_in_vcs": "pnet_macros_support" }pnet_macros_support-0.35.0/Cargo.toml0000644000000016660000000000100132360ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2021" name = "pnet_macros_support" version = "0.35.0" authors = ["Robert Clipsham "] description = "Support library for libpnet_macros" homepage = "https://github.com/libpnet/libpnet" readme = "README.md" keywords = [ "networking", "bitfields", "packet", "protocol", ] license = "MIT OR Apache-2.0" repository = "https://github.com/libpnet/libpnet" [dependencies.pnet_base] version = "0.35.0" default-features = false pnet_macros_support-0.35.0/Cargo.toml.orig000064400000000000000000000007621046102023000167130ustar 00000000000000[package] name = "pnet_macros_support" version = "0.35.0" authors = ["Robert Clipsham "] license = "MIT OR Apache-2.0" homepage = "https://github.com/libpnet/libpnet" repository = "https://github.com/libpnet/libpnet" description = "Support library for libpnet_macros" readme = "../README.md" keywords = ["networking", "bitfields", "packet", "protocol"] edition = "2021" [dependencies] pnet_base = { path = "../pnet_base", version = "0.35.0", default-features = false } pnet_macros_support-0.35.0/LICENSE-APACHE000064400000000000000000000251371046102023000157530ustar 00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. pnet_macros_support-0.35.0/LICENSE-MIT000064400000000000000000000020501046102023000154500ustar 00000000000000Copyright (c) 2014-2016 Robert Clipsham Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. pnet_macros_support-0.35.0/README.md000064400000000000000000000101641046102023000153000ustar 00000000000000# libpnet [![Crates.io](https://img.shields.io/crates/v/pnet.svg)](https://crates.io/crates/pnet) ![License](https://img.shields.io/crates/l/pnet.svg) [![Documentation](https://docs.rs/pnet/badge.svg)](https://docs.rs/pnet/) Build Status: [![Build Status](https://github.com/libpnet/libpnet/actions/workflows/ci.yml/badge.svg)](https://github.com/libpnet/libpnet/actions/workflows/ci.yml) Discussion and support: * Live chat on IRC - [#libpnet on irc.libera.chat](https://kiwiirc.com/nextclient/irc.libera.chat/libpnet?nick=pnet-user42) * [GitHub Discussions](https://github.com/libpnet/libpnet/discussions) `libpnet` provides a cross-platform API for low level networking using Rust. There are four key components: * The `packet` module, allowing safe construction and manipulation of packets; * The `pnet_macros` crate, providing infrastructure for the packet module; * The `transport` module, which allows implementation of transport protocols; * The `datalink` module, which allows sending and receiving data link packets directly. ## Why? There are lots of reasons to use low level networking, and many more to do it using Rust. A few are outlined here: ### Developing Transport Protocols There are usually two ways to go about developing a new transport layer protocol: * Write it in a scripting language such as Python; * Write it using C. The former is great for trying out new ideas and rapid prototyping, however not so great as a real-world implementation. While you can usually get reasonable performance out of these implementations, they're generally significantly slower than an implementation in C, and not suitable for any "heavy lifting". The next option is to write it in C - this will give you great performance, but comes with a number of other issues: * Lack of memory safety - this is a huge source of security vulnerabilities and other bugs in C-based network stacks. It is far too easy to forget a bounds check or use a pointer after it is freed. * Lack of thread safety - you have to be very careful to make sure the correct locks are used, and used correctly. * Lack of high level abstractions - part of the appeal of scripting languages such as Python is the higher level of abstraction which enables simpler APIs and ease of programming. Using `libpnet` and Rust, you get the best of both worlds. The higher level abstractions, memory and thread safety, alongside the performance of C. ### Network Utilities Many networking utilities such as ping and traceroute rely on being able to manipulate network and transport headers, which isn't possible with standard networking stacks such as those provided by `std::io::net`. ### Data Link Layer It can be useful to work directly at the data link layer, to see packets as they are "on the wire". There are lots of uses for this, including network diagnostics, packet capture and traffic shaping. ## Documentation API documentation for the latest build can be found here: https://docs.rs/pnet/ ## Usage To use `libpnet` in your project, add the following to your Cargo.toml: ``` [dependencies.pnet] version = "0.35.0" ``` `libpnet` should work with the latest stable version of Rust. When running the test suite, there are a number of networking tests which will likely fail - the easiest way to workaround this is to run `cargo test` as a root or administrative user. This can often be avoided, however it is more involved. ### Windows There are three requirements for building on Windows: * You must use a version of Rust which uses the MSVC toolchain * You must have [WinPcap](https://www.winpcap.org/) or [npcap](https://nmap.org/npcap/) installed (tested with version WinPcap 4.1.3) (If using npcap, make sure to install with the "Install Npcap in WinPcap API-compatible Mode") * You must place `Packet.lib` from the [WinPcap Developers pack](https://www.winpcap.org/devel.htm) in a directory named `lib`, in the root of this repository. Alternatively, you can use any of the locations listed in the `%LIB%`/`$Env:LIB` environment variables. For the 64 bit toolchain it is in `WpdPack/Lib/x64/Packet.lib`, for the 32 bit toolchain, it is in `WpdPack/Lib/Packet.lib`. pnet_macros_support-0.35.0/src/lib.rs000064400000000000000000000011631046102023000157230ustar 00000000000000// Copyright (c) 2015 Robert Clipsham // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. //! Support library for `libpnet_macros`. //! //! This exists to remove the need for the plugin_as_library feature, and allow for static linking. #![deny(missing_docs)] #![deny(warnings)] #![no_std] extern crate pnet_base; pub mod packet; pub mod types; pnet_macros_support-0.35.0/src/packet.rs000064400000000000000000000156461046102023000164370ustar 00000000000000// Copyright (c) 2014, 2015, 2017 Robert Clipsham // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. //! Packet helpers for `pnet_macros`. extern crate alloc; use alloc::vec; use core::ops::{Deref, DerefMut, Index, IndexMut, Range, RangeFrom, RangeFull, RangeTo}; use pnet_base; /// Represents a generic network packet. pub trait Packet { /// Retrieve the underlying buffer for the packet. fn packet(&self) -> &[u8]; /// Retrieve the payload for the packet. fn payload(&self) -> &[u8]; } /// Blanket impl for Boxed objects impl Packet for alloc::boxed::Box { /// Retrieve the underlying buffer for the packet. fn packet(&self) -> &[u8] { self.deref().packet() } /// Retrieve the payload for the packet. fn payload(&self) -> &[u8] { self.deref().payload() } } impl Packet for &T { /// Retrieve the underlying buffer for the packet. fn packet(&self) -> &[u8] { (*self).packet() } /// Retrieve the payload for the packet. fn payload(&self) -> &[u8] { (*self).payload() } } /// Represents a generic, mutable, network packet. pub trait MutablePacket: Packet { /// Retrieve the underlying, mutable, buffer for the packet. fn packet_mut(&mut self) -> &mut [u8]; /// Retrieve the mutable payload for the packet. fn payload_mut(&mut self) -> &mut [u8]; /// Initialize this packet by cloning another. fn clone_from(&mut self, other: &T) { use core::ptr; assert!(self.packet().len() >= other.packet().len()); unsafe { ptr::copy_nonoverlapping( other.packet().as_ptr(), self.packet_mut().as_mut_ptr(), other.packet().len(), ); } } } /// Used to convert on-the-wire packets to their #\[packet\] equivalent. pub trait FromPacket: Packet { /// The type of the packet to convert from. type T; /// Converts a wire-format packet to #\[packet\] struct format. fn from_packet(&self) -> Self::T; } /// Used to find the calculated size of the packet. This is used for occasions where the underlying /// buffer is not the same length as the packet itself. pub trait PacketSize: Packet { /// Get the calculated size of the packet. fn packet_size(&self) -> usize; } macro_rules! impl_index { ($t:ident, $index_t:ty, $output_t:ty) => { impl<'p> Index<$index_t> for $t<'p> { type Output = $output_t; #[inline] fn index(&self, index: $index_t) -> &$output_t { &self.as_slice().index(index) } } }; } macro_rules! impl_index_mut { ($t:ident, $index_t:ty, $output_t:ty) => { impl<'p> IndexMut<$index_t> for $t<'p> { #[inline] fn index_mut(&mut self, index: $index_t) -> &mut $output_t { self.as_mut_slice().index_mut(index) } } }; } /// Packet data. #[derive(PartialEq)] pub enum PacketData<'p> { /// A packet owns its contents. Owned(vec::Vec), /// A packet borrows its contents. Borrowed(&'p [u8]), } impl<'p> PacketData<'p> { /// Get a slice of the packet data. #[inline] pub fn as_slice(&self) -> &[u8] { match self { &PacketData::Owned(ref data) => data.deref(), &PacketData::Borrowed(ref data) => data, } } /// No-op - returns `self`. #[inline] pub fn to_immutable(self) -> PacketData<'p> { self } /// A length of the packet data. #[inline] pub fn len(&self) -> usize { self.as_slice().len() } } impl_index!(PacketData, usize, u8); impl_index!(PacketData, Range, [u8]); impl_index!(PacketData, RangeTo, [u8]); impl_index!(PacketData, RangeFrom, [u8]); impl_index!(PacketData, RangeFull, [u8]); /// Mutable packet data. #[derive(PartialEq)] pub enum MutPacketData<'p> { /// Owned mutable packet data. Owned(vec::Vec), /// Borrowed mutable packet data. Borrowed(&'p mut [u8]), } impl<'p> MutPacketData<'p> { /// Get packet data as a slice. #[inline] pub fn as_slice(&self) -> &[u8] { match self { &MutPacketData::Owned(ref data) => data.deref(), &MutPacketData::Borrowed(ref data) => data, } } /// Get packet data as a mutable slice. #[inline] pub fn as_mut_slice(&mut self) -> &mut [u8] { match self { &mut MutPacketData::Owned(ref mut data) => data.deref_mut(), &mut MutPacketData::Borrowed(ref mut data) => data, } } /// Get an immutable version of packet data. #[inline] pub fn to_immutable(self) -> PacketData<'p> { match self { MutPacketData::Owned(data) => PacketData::Owned(data), MutPacketData::Borrowed(data) => PacketData::Borrowed(data), } } /// Get a length of data in the packet. #[inline] pub fn len(&self) -> usize { self.as_slice().len() } } impl_index!(MutPacketData, usize, u8); impl_index!(MutPacketData, Range, [u8]); impl_index!(MutPacketData, RangeTo, [u8]); impl_index!(MutPacketData, RangeFrom, [u8]); impl_index!(MutPacketData, RangeFull, [u8]); impl_index_mut!(MutPacketData, usize, u8); impl_index_mut!(MutPacketData, Range, [u8]); impl_index_mut!(MutPacketData, RangeTo, [u8]); impl_index_mut!(MutPacketData, RangeFrom, [u8]); impl_index_mut!(MutPacketData, RangeFull, [u8]); /// Used to convert a type to primitive values representing it. pub trait PrimitiveValues { /// A tuple of types, to represent the current value. type T; /// Convert a value to primitive types representing it. fn to_primitive_values(&self) -> Self::T; } impl PrimitiveValues for pnet_base::MacAddr { type T = (u8, u8, u8, u8, u8, u8); #[inline] fn to_primitive_values(&self) -> (u8, u8, u8, u8, u8, u8) { (self.0, self.1, self.2, self.3, self.4, self.5) } } impl PrimitiveValues for ::pnet_base::core_net::Ipv4Addr { type T = (u8, u8, u8, u8); #[inline] fn to_primitive_values(&self) -> (u8, u8, u8, u8) { let octets = self.octets(); (octets[0], octets[1], octets[2], octets[3]) } } impl PrimitiveValues for ::pnet_base::core_net::Ipv6Addr { type T = (u16, u16, u16, u16, u16, u16, u16, u16); #[inline] fn to_primitive_values(&self) -> (u16, u16, u16, u16, u16, u16, u16, u16) { let segments = self.segments(); ( segments[0], segments[1], segments[2], segments[3], segments[4], segments[5], segments[6], segments[7], ) } } pnet_macros_support-0.35.0/src/types.rs000064400000000000000000000743701046102023000163330ustar 00000000000000// Copyright (c) 2015 Robert Clipsham // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. //! Provides type aliases for various primitive integer types //! //! These types are aliased to the next largest of \[`u8`, `u16`, `u32`, `u64`\], and purely serve as //! hints for the `#[packet]` macro to enable the generation of the correct bit manipulations to //! get the value out of a packet. //! //! They should NOT be used outside of data types marked as `#[packet]`. //! //! All aliases for types larger than `u8` contain a `be` or `le` suffix. These specify whether the //! value is big or little endian, respectively. When using `set_*()` and `get_*()` methods, host //! endianness should be used - the methods will convert as appropriate. #![allow(non_camel_case_types)] // TODO signed equivalents? /// Represents an unsigned, 1-bit integer. pub type u1 = u8; /// Represents an unsigned, 2-bit integer. pub type u2 = u8; /// Represents an unsigned, 3-bit integer. pub type u3 = u8; /// Represents an unsigned, 4-bit integer. pub type u4 = u8; /// Represents an unsigned, 5-bit integer. pub type u5 = u8; /// Represents an unsigned, 6-bit integer. pub type u6 = u8; /// Represents an unsigned, 7-bit integer. pub type u7 = u8; /// Represents an unsigned 9-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u9be = u16; /// Represents an unsigned 10-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u10be = u16; /// Represents an unsigned 11-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u11be = u16; /// Represents an unsigned 12-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u12be = u16; /// Represents an unsigned 13-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u13be = u16; /// Represents an unsigned 14-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u14be = u16; /// Represents an unsigned 15-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u15be = u16; /// Represents an unsigned 16-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u16be = u16; /// Represents an unsigned 17-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u17be = u32; /// Represents an unsigned 18-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u18be = u32; /// Represents an unsigned 19-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u19be = u32; /// Represents an unsigned 20-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u20be = u32; /// Represents an unsigned 21-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u21be = u32; /// Represents an unsigned 22-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u22be = u32; /// Represents an unsigned 23-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u23be = u32; /// Represents an unsigned 24-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u24be = u32; /// Represents an unsigned 25-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u25be = u32; /// Represents an unsigned 26-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u26be = u32; /// Represents an unsigned 27-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u27be = u32; /// Represents an unsigned 28-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u28be = u32; /// Represents an unsigned 29-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u29be = u32; /// Represents an unsigned 30-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u30be = u32; /// Represents an unsigned 31-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u31be = u32; /// Represents an unsigned 32-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u32be = u32; /// Represents an unsigned 33-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u33be = u64; /// Represents an unsigned 34-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u34be = u64; /// Represents an unsigned 35-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u35be = u64; /// Represents an unsigned 36-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u36be = u64; /// Represents an unsigned 37-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u37be = u64; /// Represents an unsigned 38-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u38be = u64; /// Represents an unsigned 39-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u39be = u64; /// Represents an unsigned 40-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u40be = u64; /// Represents an unsigned 41-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u41be = u64; /// Represents an unsigned 42-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u42be = u64; /// Represents an unsigned 43-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u43be = u64; /// Represents an unsigned 44-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u44be = u64; /// Represents an unsigned 45-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u45be = u64; /// Represents an unsigned 46-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u46be = u64; /// Represents an unsigned 47-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u47be = u64; /// Represents an unsigned 48-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u48be = u64; /// Represents an unsigned 49-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u49be = u64; /// Represents an unsigned 50-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u50be = u64; /// Represents an unsigned 51-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u51be = u64; /// Represents an unsigned 52-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u52be = u64; /// Represents an unsigned 53-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u53be = u64; /// Represents an unsigned 54-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u54be = u64; /// Represents an unsigned 55-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u55be = u64; /// Represents an unsigned 56-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u56be = u64; /// Represents an unsigned 57-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u57be = u64; /// Represents an unsigned 58-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u58be = u64; /// Represents an unsigned 59-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u59be = u64; /// Represents an unsigned 60-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u60be = u64; /// Represents an unsigned 61-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u61be = u64; /// Represents an unsigned 62-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u62be = u64; /// Represents an unsigned 63-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u63be = u64; /// Represents an unsigned 64-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as big-endian, but accessors/mutators will return/take host-order values. pub type u64be = u64; /// Represents an unsigned 9-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u9le = u16; /// Represents an unsigned 10-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u10le = u16; /// Represents an unsigned 11-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u11le = u16; /// Represents an unsigned 12-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u12le = u16; /// Represents an unsigned 13-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u13le = u16; /// Represents an unsigned 14-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u14le = u16; /// Represents an unsigned 15-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u15le = u16; /// Represents an unsigned 16-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u16le = u16; /// Represents an unsigned 17-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u17le = u32; /// Represents an unsigned 18-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u18le = u32; /// Represents an unsigned 19-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u19le = u32; /// Represents an unsigned 20-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u20le = u32; /// Represents an unsigned 21-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u21le = u32; /// Represents an unsigned 22-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u22le = u32; /// Represents an unsigned 23-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u23le = u32; /// Represents an unsigned 24-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u24le = u32; /// Represents an unsigned 25-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u25le = u32; /// Represents an unsigned 26-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u26le = u32; /// Represents an unsigned 27-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u27le = u32; /// Represents an unsigned 28-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u28le = u32; /// Represents an unsigned 29-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u29le = u32; /// Represents an unsigned 30-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u30le = u32; /// Represents an unsigned 31-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u31le = u32; /// Represents an unsigned 32-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u32le = u32; /// Represents an unsigned 33-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u33le = u64; /// Represents an unsigned 34-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u34le = u64; /// Represents an unsigned 35-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u35le = u64; /// Represents an unsigned 36-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u36le = u64; /// Represents an unsigned 37-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u37le = u64; /// Represents an unsigned 38-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u38le = u64; /// Represents an unsigned 39-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u39le = u64; /// Represents an unsigned 40-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u40le = u64; /// Represents an unsigned 41-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u41le = u64; /// Represents an unsigned 42-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u42le = u64; /// Represents an unsigned 43-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u43le = u64; /// Represents an unsigned 44-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u44le = u64; /// Represents an unsigned 45-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u45le = u64; /// Represents an unsigned 46-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u46le = u64; /// Represents an unsigned 47-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u47le = u64; /// Represents an unsigned 48-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u48le = u64; /// Represents an unsigned 49-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u49le = u64; /// Represents an unsigned 50-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u50le = u64; /// Represents an unsigned 51-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u51le = u64; /// Represents an unsigned 52-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u52le = u64; /// Represents an unsigned 53-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u53le = u64; /// Represents an unsigned 54-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u54le = u64; /// Represents an unsigned 55-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u55le = u64; /// Represents an unsigned 56-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u56le = u64; /// Represents an unsigned 57-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u57le = u64; /// Represents an unsigned 58-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u58le = u64; /// Represents an unsigned 59-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u59le = u64; /// Represents an unsigned 60-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u60le = u64; /// Represents an unsigned 61-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u61le = u64; /// Represents an unsigned 62-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u62le = u64; /// Represents an unsigned 63-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u63le = u64; /// Represents an unsigned 64-bit integer. libpnet #\[packet\]-derived structs using this type will /// hold it in memory as little-endian, but accessors/mutators will return/take host-order values. pub type u64le = u64; /// Represents an unsigned 9-bit integer in host endianness. pub type u9he = u16; /// Represents an unsigned 10-bit integer in host endianness. pub type u10he = u16; /// Represents an unsigned 11-bit integer in host endianness. pub type u11he = u16; /// Represents an unsigned 12-bit integer in host endianness. pub type u12he = u16; /// Represents an unsigned 13-bit integer in host endianness. pub type u13he = u16; /// Represents an unsigned 14-bit integer in host endianness. pub type u14he = u16; /// Represents an unsigned 15-bit integer in host endianness. pub type u15he = u16; /// Represents an unsigned 16-bit integer in host endianness. pub type u16he = u16; /// Represents an unsigned 17-bit integer in host endianness. pub type u17he = u32; /// Represents an unsigned 18-bit integer in host endianness. pub type u18he = u32; /// Represents an unsigned 19-bit integer in host endianness. pub type u19he = u32; /// Represents an unsigned 20-bit integer in host endianness. pub type u20he = u32; /// Represents an unsigned 21-bit integer in host endianness. pub type u21he = u32; /// Represents an unsigned 22-bit integer in host endianness. pub type u22he = u32; /// Represents an unsigned 23-bit integer in host endianness. pub type u23he = u32; /// Represents an unsigned 24-bit integer in host endianness. pub type u24he = u32; /// Represents an unsigned 25-bit integer in host endianness. pub type u25he = u32; /// Represents an unsigned 26-bit integer in host endianness. pub type u26he = u32; /// Represents an unsigned 27-bit integer in host endianness. pub type u27he = u32; /// Represents an unsigned 28-bit integer in host endianness. pub type u28he = u32; /// Represents an unsigned 29-bit integer in host endianness. pub type u29he = u32; /// Represents an unsigned 30-bit integer in host endianness. pub type u30he = u32; /// Represents an unsigned 31-bit integer in host endianness. pub type u31he = u32; /// Represents an unsigned 32-bit integer in host endianness. pub type u32he = u32; /// Represents an unsigned 33-bit integer in host endianness. pub type u33he = u64; /// Represents an unsigned 34-bit integer in host endianness. pub type u34he = u64; /// Represents an unsigned 35-bit integer in host endianness. pub type u35he = u64; /// Represents an unsigned 36-bit integer in host endianness. pub type u36he = u64; /// Represents an unsigned 37-bit integer in host endianness. pub type u37he = u64; /// Represents an unsigned 38-bit integer in host endianness. pub type u38he = u64; /// Represents an unsigned 39-bit integer in host endianness. pub type u39he = u64; /// Represents an unsigned 40-bit integer in host endianness. pub type u40he = u64; /// Represents an unsigned 41-bit integer in host endianness. pub type u41he = u64; /// Represents an unsigned 42-bit integer in host endianness. pub type u42he = u64; /// Represents an unsigned 43-bit integer in host endianness. pub type u43he = u64; /// Represents an unsigned 44-bit integer in host endianness. pub type u44he = u64; /// Represents an unsigned 45-bit integer in host endianness. pub type u45he = u64; /// Represents an unsigned 46-bit integer in host endianness. pub type u46he = u64; /// Represents an unsigned 47-bit integer in host endianness. pub type u47he = u64; /// Represents an unsigned 48-bit integer in host endianness. pub type u48he = u64; /// Represents an unsigned 49-bit integer in host endianness. pub type u49he = u64; /// Represents an unsigned 50-bit integer in host endianness. pub type u50he = u64; /// Represents an unsigned 51-bit integer in host endianness. pub type u51he = u64; /// Represents an unsigned 52-bit integer in host endianness. pub type u52he = u64; /// Represents an unsigned 53-bit integer in host endianness. pub type u53he = u64; /// Represents an unsigned 54-bit integer in host endianness. pub type u54he = u64; /// Represents an unsigned 55-bit integer in host endianness. pub type u55he = u64; /// Represents an unsigned 56-bit integer in host endianness. pub type u56he = u64; /// Represents an unsigned 57-bit integer in host endianness. pub type u57he = u64; /// Represents an unsigned 58-bit integer in host endianness. pub type u58he = u64; /// Represents an unsigned 59-bit integer in host endianness. pub type u59he = u64; /// Represents an unsigned 60-bit integer in host endianness. pub type u60he = u64; /// Represents an unsigned 61-bit integer in host endianness. pub type u61he = u64; /// Represents an unsigned 62-bit integer in host endianness. pub type u62he = u64; /// Represents an unsigned 63-bit integer in host endianness. pub type u63he = u64; /// Represents an unsigned 64-bit integer in host endianness. pub type u64he = u64;