pub struct PcapWriter {
output: BufWriter<Box<dyn Write>>,
layers: CaptureLayers,
encapsulation: PcapEncapsulation,
packet_id: u16,
}Fields§
§output: BufWriter<Box<dyn Write>>§layers: CaptureLayers§encapsulation: PcapEncapsulation§packet_id: u16Implementations§
Source§impl PcapWriter
impl PcapWriter
pub fn create( path: &Path, layers: CaptureLayers, encapsulation: PcapEncapsulation, ) -> Result<Self>
Sourcepub fn to_writer(
sink: Box<dyn Write>,
layers: CaptureLayers,
encapsulation: PcapEncapsulation,
) -> Result<Self>
pub fn to_writer( sink: Box<dyn Write>, layers: CaptureLayers, encapsulation: PcapEncapsulation, ) -> Result<Self>
Write the capture into an arbitrary sink.
The extcap interface hands us the FIFO Wireshark is reading, which is opened for writing rather than created.
pub fn write_radio(&mut self, frame: &[u8]) -> Result<()>
Sourcepub fn write_radio_with_info(
&mut self,
rf: &RfParams,
info: &RxInfo,
frame: &[u8],
) -> Result<()>
pub fn write_radio_with_info( &mut self, rf: &RfParams, info: &RxInfo, frame: &[u8], ) -> Result<()>
Record a radio frame along with how the receiver heard it.
Only LoRaTap has somewhere to put the metadata; the other encapsulations quietly ignore it and record the frame alone.
pub fn write_ulcp( &mut self, direction: PcapDirection, frame: &[u8], ) -> Result<()>
fn write_udp( &mut self, direction: PcapDirection, src_port: u16, dst_port: u16, payload: &[u8], ) -> Result<()>
fn write_record(&mut self, packet: &[u8]) -> Result<()>
Auto Trait Implementations§
impl Freeze for PcapWriter
impl !RefUnwindSafe for PcapWriter
impl !Send for PcapWriter
impl !Sync for PcapWriter
impl Unpin for PcapWriter
impl !UnwindSafe for PcapWriter
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more