How to bind a raw socket to a specific interface using python in linux centOS? I have multiple interfaces like eth0, eth0:1, eth0:2,etc
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
You can do it by using the IP address that corresponds to the desired interface.
The first two above would bind to the interface with that IP address. The last one will bind to any interface. You can obtain the IP address for an interface using this recipe.