-
-
Notifications
You must be signed in to change notification settings - Fork 181
uefi-raw: add Tcpv4 protocol type definitions #1797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
507d349 to
86a97e4
Compare
There was a problem hiding this 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.
|
The typos CI step should be fixed when you add "ANDed" to |
3a822b6 to
3641ccb
Compare
3641ccb to
95e20c4
Compare
|
|
||
| #[derive(Debug)] | ||
| #[repr(C)] | ||
| pub struct Tcpv4Protocol { |
There was a problem hiding this comment.
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
| 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.
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
match spec naming:
| pub ip4_route_table: *const Ipv4RouteTable, | |
| pub route_table: *const Ipv4RouteTable, |
This is PR 1 of 2 adding TCP functionality to uefi-rs and is a replacement for #1779. I removed the high-level
ueficrate additions and will open a separate PR for them.Checklist