I read raw socket tutorial in order to implement my own bridge (i capture package from one side and send them to the other interface by raw socket). I am coming from Java world, so low level programming is strange to me, so forgive me for my ignorance.
I implement a bridge, so I need to send traffic from A to interface B and vice versa.
I created a single raw socket and I used it to send data to both servers by 2 different interfaces.is there any reason to why not use the same socket in order to send from interface A or B? I am asking if it’s a good practice? problems and etc
It will be great if you can clarify to me how socket is not binded to a physical interface in the underline. this is the reason that it seems strange to me that the same raw socket use to send data for different interfaces.
There is no problem to use the same raw socket for two different interfaces. the use in the specific interface is done when you call to send.