8000 GitHub - zebra-rs/ospf-packet
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

zebra-rs/ospf-packet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OSPFv2 and OSPFv3 Parser and Emitter

License: MIT Apache License 2.0

A parser and an emitter for OSPFv2 and OSPFv3. This library is inspired by ospf-parser, which provides a pure Rust parser for OSPF using the nom parser combinator. Building upon ospf-parser, this library adds an emitter to encode OSPFv2 and OSPFv3 packets into a byte stream.

Example

Please make it sure to include library in Cargo.toml.

[dependencies]
ospf-packet = "0.5"

Then, you can try to parse the byte stream.

use ospf-packet;

fn test() {
    match ospf-packet::parse(input) {
       Ok(packet) => {
           println!("Packet: {}", packet);
       }
       Err(err) => {
           println!("Error: {}", err);
       }
    }
}

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0