-
Notifications
You must be signed in to change notification settings - Fork 20
[ACP] adding todevice call to std::net #432
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
Comments
regarding the PR already sent pub fn todevice(&self) -> io::Result<&CStr>;
pub fn set_todevice(&self, ifrname: &CStr) -> io::Result<()>;
|
seconding the concerns about naming.
|
Ok for the naming changes. The setter already returned CString since first feedbacks but will change the rest. Thanks |
Since binding has to happen on an unconnected/unbound socket we first need a way to do this in std, which is a bigger story (possibly requiring an RFC) since it means adopting a chunk of the socket2 crate. So this ACP has to be postponed until that prerequisite is fulfilled. |
Proposal
Problem statement
Giving the possibility, for a socket, to be bound to a particular network interface.
Motivating examples or use cases
It can serve for filtering purpose, e.g. external incoming requests for eth1 then separate private requests for eth0 ... or based on particular type of services e.g. http only.
Tracking issue and the PR.
The text was updated successfully, but these errors were encountered: