Skip to content

Conversation

@JayKickliter
Copy link

@JayKickliter JayKickliter commented Oct 21, 2025

This is PR 1 of 2 adding TCP functionality to uefi-rs and is a replacement for #1779. I removed the high-level uefi crate additions and will open a separate PR for them.

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

@JayKickliter JayKickliter force-pushed the jsk/uefi-raw/add-tcpv4 branch from 507d349 to 86a97e4 Compare October 21, 2025 23:10
Copy link
Member

@phip1611 phip1611 left a comment

Choose a reason for hiding this comment

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

Generally looks very good, thanks for working on this! I left some minor remarks.

@phip1611
Copy link
Member

The typos CI step should be fixed when you add "ANDed" to extend-ignore-identifiers-re in .typos.toml

@JayKickliter JayKickliter force-pushed the jsk/uefi-raw/add-tcpv4 branch from 3a822b6 to 3641ccb Compare October 22, 2025 17:19
@JayKickliter JayKickliter force-pushed the jsk/uefi-raw/add-tcpv4 branch from 3641ccb to 95e20c4 Compare October 22, 2025 17:21

#[derive(Debug)]
#[repr(C)]
pub struct Tcpv4Protocol {
Copy link
Member

Choose a reason for hiding this comment

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

nit: match the spec name for this protocol

Suggested change
pub struct Tcpv4Protocol {
pub struct Tcp4Protocol {

Same for all the other types like Tcpv4ConnectionState; it should match the name in the spec except for converting to PascalCase.

Copy link
Author

Choose a reason for hiding this comment

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

good catch

/// will return to [`Tcpv4ConnectionState::CLOSED`].
pub connect: unsafe extern "efiapi" fn(
this: *mut Self,
connection_token: *mut Tcpv4CompletionToken,
Copy link
Member

Choose a reason for hiding this comment

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

This should be a ConnectionToken rather than a CompletionToken (even though they are essentially the same type)


#[derive(Debug)]
#[repr(C)]
pub struct Ipv4ModeData {
Copy link
Member

Choose a reason for hiding this comment

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

I think this type (and some of the following ones) belong in uefi-raw/src/protocol/network/ip4.rs.

/// Number of entries in the routing table.
pub route_count: u32,
/// Routing table entries.
pub ip4_route_table: *const Ipv4RouteTable,
Copy link
Member

Choose a reason for hiding this comment

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

match spec naming:

Suggested change
pub ip4_route_table: *const Ipv4RouteTable,
pub route_table: *const Ipv4RouteTable,

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