pub trait IpPacketBuilder<I: IpExt>: PacketBuilder + Clone + Debug {
    // Required methods
    fn new(src_ip: I::Addr, dst_ip: I::Addr, ttl: u8, proto: I::Proto) -> Self;
    fn src_ip(&self) -> I::Addr;
    fn dst_ip(&self) -> I::Addr;
    fn proto(&self) -> I::Proto;
}
Expand description

A builder for IP packets.

Required Methods§

source

fn new(src_ip: I::Addr, dst_ip: I::Addr, ttl: u8, proto: I::Proto) -> Self

Returns a new packet builder for an associated IP version with the given given source and destination IP addresses, TTL (IPv4)/Hop Limit (IPv4) and Protocol Number.

source

fn src_ip(&self) -> I::Addr

Returns the source IP address for the builder.

source

fn dst_ip(&self) -> I::Addr

Returns the destination IP address for the builder.

source

fn proto(&self) -> I::Proto

Returns the IP protocol number for the builder.

Object Safety§

This trait is not object safe.

Implementors§