-
Notifications
You must be signed in to change notification settings - Fork 444
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
Add capactity methods to packet_buffer & sockets #313
Add capactity methods to packet_buffer & sockets #313
Conversation
@@ -851,7 +851,7 @@ impl<'b, 'c, 'e> InterfaceInner<'b, 'c, 'e> { | |||
// The packet is valid and handled by socket. | |||
Ok(()) => handled_by_raw_socket = true, | |||
// The socket buffer is full or the packet was truncated | |||
Err(Error::Exhausted) | Err(Error::Truncated) => (), | |||
Err(Error::Exhausted) | Err(Error::Truncated) => net_debug!("Raw packet dropped"), |
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 change isn't related to adding capacity methods.
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.
Apologies, I have removed it.
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.
For consistency, a similar change should be applied to TCP and UDP sockets too.
I feel like the documentation would be more clear if instead of "element" it said which specific kind of element it means (packets and bytes depending on the kind of the socket). Also, please add dots at the end of sentences. |
The current methods only describe the capacities of the payload buffers, which are all bytes. Would you like me to add capacity methods for meta buffers for the socket types that support it (udp, icmp etc) too? |
Oh, good point. For those sockets, we should not have a single |
Add packet capacity methods for appropriate socket types. Update doc comments to better reflect the buffers item type
No description provided.