Skip to content
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 possibility to binding on the interface #755

Merged
merged 9 commits into from
Feb 27, 2024

Conversation

sashacmc
Copy link
Member

@sashacmc sashacmc commented Feb 23, 2024

Add possibility to listen/connect for TCP/UDP connections on interface in place of (or together with) IP address.
Interface name provided via connection parameter iface.
Also can be used for restrict connection for specific interface.

Samples:

  • tcp/0.0.0.0:7447#iface=wlan0: Listen for tcp connection on any IP at the wlan0 interface, connections from other interfaces will be rejected.
  • udp/192.168.0.1:7447#iface=eth0: Listen for udp connection on specific IP at and eth0 interface, if eth0 interface will be configured to other IP, connections will be rejected.
  • udp/192.168.0.1:7447#iface=eth0: Connect by udp with specific IP at and eth0 interface, if eth0 interface will be configured to other IP, connections will be rejected.

Closes #742

@eclipse-zenoh-bot
Copy link
Contributor

@sashacmc If this pull request contains a bugfix or a new feature, then please consider using Closes #ISSUE-NUMBER syntax to link it to an issue.

@eclipse-zenoh-bot
Copy link
Contributor

@sashacmc If this pull request contains a bugfix or a new feature, then please consider using Closes #ISSUE-NUMBER syntax to link it to an issue.

@sashacmc sashacmc changed the title Interface binding Add possibility to binding on the interface Feb 23, 2024
@eclipse-zenoh-bot
Copy link
Contributor

@sashacmc If this pull request contains a bugfix or a new feature, then please consider using Closes #ISSUE-NUMBER syntax to link it to an issue.

@eclipse-zenoh-bot
Copy link
Contributor

@sashacmc If this pull request contains a bugfix or a new feature, then please consider using Closes #ISSUE-NUMBER syntax to link it to an issue.

1 similar comment
@eclipse-zenoh-bot
Copy link
Contributor

@sashacmc If this pull request contains a bugfix or a new feature, then please consider using Closes #ISSUE-NUMBER syntax to link it to an issue.

@sashacmc sashacmc marked this pull request as ready for review February 23, 2024 20:43
Copy link
Member

@Mallets Mallets left a comment

Choose a reason for hiding this comment

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

Overall it LGTM. I've just left few minor comments that would lead to fewer memory allocations.

@sashacmc sashacmc requested a review from Mallets February 27, 2024 09:08
@Mallets Mallets merged commit 90617ff into eclipse-zenoh:main Feb 27, 2024
8 checks passed
jerry73204 pushed a commit to NEWSLabNTU/zenoh that referenced this pull request Mar 6, 2024
* Add test binding

* Add binding to the interface

* Add UDP support, fix windows/macos build

* Add tests, fix windows build

* Fix windows/macos builds

* Move platfrom-related code to the zenoh-util

* Remove unused dependencies

* Add interface binding on connection

* String usage refactoring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add possibility to restrict a data to the interface
3 participants