Giter Club home page Giter Club logo

Comments (6)

rshk avatar rshk commented on July 17, 2024

Yup.. that was my intention as well.
Probably the best thing would be testing the library against a collection of:

  • hand-crafted capure files, following the spec
  • output capture files from different capture conditions (eg. capture from different interfaces / resumes from machines with different endianness / ...)
  • ouput capture files from different implementations of the "writer" library, especially in case we should find any possible inconsistency amongst implementations, etc..

My idea was to create a separate repository with those test files (to avoid cluttering the main repo) and then pull the files in the testing environment (eg. using an env variable to reference the path of the local copy).

Contributions are very welcome ;)

from python-pcapng.

kartoch avatar kartoch commented on July 17, 2024

An issue is that the files I've added for testing cannot be open by wireshark, does anyone can check that ?

from python-pcapng.

rshk avatar rshk commented on July 17, 2024

Strange, but I'm not that surprised: it looks there might be some problems with determining endianness (that's one thing I don't like in the standard, btw.. they should have just used "network standard" endianness, i.e. big endian, instead of allowing mixing..):

The capture file appears to be damaged or corrupt.
(pcapng_read_block: total block lengths (first 139 and second 4077998952) don't match)

and maybe even incomplete support for the various "packet" (binary packed data, not actually packets) types.

For what I see, most libraries / tools tend to have their own implementation quirks, that's one reason why I started writing a library from scratch, instead of just wrapping a C library..

from python-pcapng.

rshk avatar rshk commented on July 17, 2024

While writing tests I found out that test006 incorrectly reports block size to be 1 byte shorter (and not aligned on a 32bit boundary). I'm not sure whether a library is expected to fail in that case, or try fixing the size (thus returning block payload aligned correctly, but possibly with extra data..)

from python-pcapng.

rshk avatar rshk commented on July 17, 2024

@kartoch do you have any follow-up on this? did you find any other interesting pcapng file to test against?

otherwise, I'm going to close this

from python-pcapng.

kartoch avatar kartoch commented on July 17, 2024

@rshk you can close it, no news on my side.

from python-pcapng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.