David Stainton
David Stainton
Yes... I'm here to help out with code contributions. This ticket is now tied to #90 because I'm writing a set of helper functions for TCP encoding... I should be...
Furthermore we should do like gopacket does and abstract away the details of computing the pseudo-header; in fact we don't even need to create a pseudo-header... nor do we want...
here in my dev branch i've created a function to compute the ipv4 pseudo header... and a generic rfc1071 checksum function.... i also added the trait HasPseudoheader... so that both...
ok I got my dev branch to build... clearly the next step is to implement the modular TCP checksum function which uses the HasPseudoheader trait to compute the first part...
my latest work is in this dev branch https://github.com/david415/libpnet/tree/90.add-tcp-packet.1 here's the modular code sharing and ipv4 versus ipv6 agnostic tcp checksum function: ``` /// Calculates the checksum of a TCP...
currently this ticket is blocked on fixing the unit test for ipv4 + tcp checksum; i get these kind of errors indicating my length method must be wrong: ``` ----...
my latest dev branch: https://github.com/david415/libpnet/tree/90.add-tcp-packet.1 currently the test fails like this: ``` ---- packet::tcp::tests::tcp_header_ipv4_test stdout ---- thread 'packet::tcp::tests::tcp_header_ipv4_test' panicked at 'assertion failed: current_offset ::set_options::h235200d9f17f35819Vf at /home/user/projects/libpnet/:3 6: 0x7f3bec638590 - packet::tcp::tests::generate_simple_tcp_header::h9ac21d6225d453b4LNg...
@little-dude has fixed some of the bugs in the modular checksum approach in his branch: https://github.com/libpnet/libpnet/pull/146 here's my work in progress https://github.com/libpnet/libpnet/pull/150
here's my latest dev branch based off of a recent commit on upstream master: https://github.com/david415/libpnet/tree/91.add-modular-checksum.3 i might have missed some bits of code from out previous dev branches... not sure...
ok i got rid of the slice syntax and made a few more commits. it now builds but has these compiler warnings: ``` # make bash build.sh Compiling pnet v0.9.0...