[][src]Crate cjdns_sniff

Library for sniffing and injecting cjdns traffic.

NOTE: This requires cjdns v18 or higher.

API

Example

async {
    let cjdns = cjdns_admin::connect(None).await?;
    let mut sniffer = Sniffer::sniff_traffic(cjdns, ContentType::Cjdht).await?;
    let msg = sniffer.receive().await?;
    println!("{:?}", msg);
    sniffer.disconnect().await?;
}

Message structure

Structs

Connection

Admin connection to the CJDNS node.

CtrlMessage

Serialized control message

Message

Message that is being sent or received by cjdns router.

Sniffer

Wraps connection to cjdns admin interface and allows to send and receive messages of a certain type.

Enums

ConnectError

Connection or disconnection error.

Content

Message content enum.

ContentType

Header content types.

ReceiveError

Error while receiving message.

SendError

Error while sending message.