wireparse 0.1.0

Library for reading and writing ethernet and other related protocals.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use netpack::EthernetFrame;

fn main() {
    let arp_packet = [
        255, 255, 255, 255, 255, 255, 200, 200, 200, 200, 200, 200, 8, 6, 0, 1, 8, 0, 6, 4, 0, 1,
        234, 0, 80, 227, 124, 225, 192, 168, 1, 230, 0, 0, 0, 0, 0, 0, 192, 168, 1, 1,
    ];

    let eth = EthernetFrame::from_slice(&arp_packet).unwrap();
    println!("{:?}", eth);
}