开发者

Linux Kernel TCP Socket modification

Is there is any easy way to modify tcp socket parameters? For example: Server_pro开发者_高级运维gram is using eth0 with 10.0.0.1, it can't be restarted and I need to recreate socket on the eth1 with 192.168.0.1. I know there is some other not trival problems but all I'm looking now is possibility to modify socket "on-the-fly" inside the kernel. Thank you for any advices.


Open the new socket, do whatever steps are needed to get it connected and into the same state, and then use dup2() to turn the old file descriptor into a clone of the new one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜