File: offline.rs

package info (click to toggle)
rust-pcap 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 584 kB
  • sloc: makefile: 2
file content (10 lines) | stat: -rw-r--r-- 274 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
use crate::capture_from_test_file;

#[test]
fn test_pcap_version() {
    let capture = capture_from_test_file("packet_snaplen_65535.pcap");

    assert_eq!(capture.version(), (2, 4));
    assert_eq!(capture.major_version(), 2);
    assert_eq!(capture.minor_version(), 4);
}