Ignore some warnings
This commit is contained in:
parent
a2b6a77d82
commit
61caeef321
@ -42,6 +42,7 @@ where
|
|||||||
T: From<Vec<u8>>,
|
T: From<Vec<u8>>,
|
||||||
{
|
{
|
||||||
/// Construct a new ICMPv6 packet from raw bytes
|
/// Construct a new ICMPv6 packet from raw bytes
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn new_from_bytes(
|
pub fn new_from_bytes(
|
||||||
bytes: &[u8],
|
bytes: &[u8],
|
||||||
source_address: Ipv6Addr,
|
source_address: Ipv6Addr,
|
||||||
|
@ -58,6 +58,7 @@ impl<T> TcpPacket<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set a new source
|
// Set a new source
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn set_source(&mut self, source: SocketAddr) -> Result<(), PacketError> {
|
pub fn set_source(&mut self, source: SocketAddr) -> Result<(), PacketError> {
|
||||||
// Ensure the source and destination addresses are the same type
|
// Ensure the source and destination addresses are the same type
|
||||||
if source.is_ipv4() != self.destination.is_ipv4() {
|
if source.is_ipv4() != self.destination.is_ipv4() {
|
||||||
@ -74,6 +75,7 @@ impl<T> TcpPacket<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set a new destination
|
// Set a new destination
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn set_destination(&mut self, destination: SocketAddr) -> Result<(), PacketError> {
|
pub fn set_destination(&mut self, destination: SocketAddr) -> Result<(), PacketError> {
|
||||||
// Ensure the source and destination addresses are the same type
|
// Ensure the source and destination addresses are the same type
|
||||||
if self.source.is_ipv4() != destination.is_ipv4() {
|
if self.source.is_ipv4() != destination.is_ipv4() {
|
||||||
@ -113,6 +115,7 @@ where
|
|||||||
T: From<Vec<u8>>,
|
T: From<Vec<u8>>,
|
||||||
{
|
{
|
||||||
/// Construct a new TCP packet from bytes
|
/// Construct a new TCP packet from bytes
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn new_from_bytes(
|
pub fn new_from_bytes(
|
||||||
bytes: &[u8],
|
bytes: &[u8],
|
||||||
source_address: IpAddr,
|
source_address: IpAddr,
|
||||||
|
@ -37,6 +37,7 @@ impl<T> UdpPacket<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set a new source
|
// Set a new source
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn set_source(&mut self, source: SocketAddr) -> Result<(), PacketError> {
|
pub fn set_source(&mut self, source: SocketAddr) -> Result<(), PacketError> {
|
||||||
// Ensure the source and destination addresses are the same type
|
// Ensure the source and destination addresses are the same type
|
||||||
if source.is_ipv4() != self.destination.is_ipv4() {
|
if source.is_ipv4() != self.destination.is_ipv4() {
|
||||||
@ -53,6 +54,7 @@ impl<T> UdpPacket<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set a new destination
|
// Set a new destination
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn set_destination(&mut self, destination: SocketAddr) -> Result<(), PacketError> {
|
pub fn set_destination(&mut self, destination: SocketAddr) -> Result<(), PacketError> {
|
||||||
// Ensure the source and destination addresses are the same type
|
// Ensure the source and destination addresses are the same type
|
||||||
if self.source.is_ipv4() != destination.is_ipv4() {
|
if self.source.is_ipv4() != destination.is_ipv4() {
|
||||||
@ -84,6 +86,7 @@ where
|
|||||||
T: From<Vec<u8>>,
|
T: From<Vec<u8>>,
|
||||||
{
|
{
|
||||||
/// Construct a new UDP packet from bytes
|
/// Construct a new UDP packet from bytes
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn new_from_bytes(
|
pub fn new_from_bytes(
|
||||||
bytes: &[u8],
|
bytes: &[u8],
|
||||||
source_address: IpAddr,
|
source_address: IpAddr,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user