Struct smoltcp::phy::PcapWriter [] [src]

pub struct PcapWriter<D: Device, S: PcapSink + Clone> { /* fields omitted */ }

A packet capture writer device.

Every packet transmitted or received through this device is timestamped and written (in the libpcap format) using the provided sink. Note that writes are fine-grained, and buffering is recommended.

The packet sink should be cheaply cloneable, as it is cloned on every transmitted packet. For example, &'a mut Vec<u8> is cheaply cloneable but &std::io::File

Methods

impl<D: Device, S: PcapSink + Clone> PcapWriter<D, S>
[src]

[src]

Creates a packet capture writer.

Trait Implementations

impl<D: Debug + Device, S: Debug + PcapSink + Clone> Debug for PcapWriter<D, S>
[src]

[src]

Formats the value using the given formatter.

impl<D: Device, S: PcapSink + Clone> Device for PcapWriter<D, S>
[src]

[src]

Get a description of device limitations.

[src]

Receive a frame. Read more

[src]

Transmit a frame. Read more