Skip to content

Refactor packet types#132

Open
hulthe wants to merge 21 commits intomainfrom
refactor-packet-types
Open

Refactor packet types#132
hulthe wants to merge 21 commits intomainfrom
refactor-packet-types

Conversation

@hulthe
Copy link
Copy Markdown
Contributor

@hulthe hulthe commented May 5, 2026

This change is Reviewable

Comment thread gotatun/src/packet/ipv4/mod.rs Outdated
Comment thread gotatun/src/packet/ipv4/mod.rs Outdated
Comment thread gotatun/src/packet/decode.rs Outdated
Comment thread gotatun/src/packet/decode.rs Outdated
Comment thread gotatun/src/packet/tcp.rs Outdated
Copy link
Copy Markdown
Contributor

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarkusPettersson98 made 1 comment.
Reviewable status: 0 of 14 files reviewed, 6 unresolved discussions (waiting on dlon and hulthe).


gotatun/Cargo.toml line 4 at r5 (raw file):

name = "gotatun"
description = "an implementation of the WireGuard® protocol designed for portability and speed"
version = "0.7.0"

Don't forget to write about this change in the changelog!

Code quote:

version = "0.7.0"

@hulthe hulthe force-pushed the refactor-packet-types branch 9 times, most recently from e1ca1fe to 8f4e525 Compare May 8, 2026 09:43
Copy link
Copy Markdown
Contributor Author

@hulthe hulthe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hulthe reviewed 17 files and all commit messages, made 5 comments, resolved 5 discussions, and dismissed @dlon from 4 discussions.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on dlon and hulthe).


gotatun/Cargo.toml line 4 at r5 (raw file):

Previously, MarkusPettersson98 (Markus Pettersson) wrote…

Don't forget to write about this change in the changelog!

Done


gotatun/src/packet/udp.rs line 76 at r2 (raw file):

pub struct UdpDecoder {
    pub length: bool,
    pub checksum: bool, // TODO: should this be here?

todo

Comment thread gotatun/src/packet/decode.rs Outdated
Comment thread gotatun/src/packet/decode.rs Outdated
Comment thread gotatun/src/packet/tcp.rs Outdated
@hulthe hulthe force-pushed the refactor-packet-types branch from 8f4e525 to c28a574 Compare May 8, 2026 09:57
@hulthe hulthe force-pushed the refactor-packet-types branch from c28a574 to 43699c7 Compare May 8, 2026 09:58
@hulthe hulthe requested review from MarkusPettersson98 and dlon May 8, 2026 09:58
@hulthe hulthe marked this pull request as ready for review May 8, 2026 12:29
Copy link
Copy Markdown
Contributor Author

@hulthe hulthe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hulthe reviewed 2 files and all commit messages, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on dlon and MarkusPettersson98).

Copy link
Copy Markdown
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dlon reviewed 15 files and all commit messages, made 2 comments, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on hulthe and MarkusPettersson98).


gotatun/src/packet/mod.rs line 492 at r9 (raw file):

}

fn validate_tcp(next_protocol: IpNextProtocol, payload: &[u8]) -> eyre::Result<()> {

Could be replaced with a TcpDecoder, I guess?


gotatun/src/packet/tcp.rs line 288 at r9 (raw file):

    use zerocopy::TryFromBytes;

    const EXAMPLE_IPV4_TCP: &[u8] = &[

Should we add checksum tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants