开发者

gsoap client multiple ethernets

开发者 https://www.devze.com 2023-01-30 07:24 出处:网络
I have a linux system with two eth cards. eth0 and eth1. I am creating a client that sends to endpoint 1.2.3.4.

I have a linux system with two eth cards. eth0 and eth1. I am creating a client that sends to endpoint 1.2.3.4.

I send开发者_如何学运维 my webservice with soap_call_ functions. How can I select eth1 instead of eth0?

the code is like that

soap_call_ns__add(&soap, server, "", a, b, &result);

How can I set inside the &soap variable the eth0 or the eth1?

(gsoap does not have a bind for clients... like soap_bind)


You want outgoing packages from your host to take a specific route (in this case a specific NIC)? If that's the case, then you have to adjust kernels routing tables.

Shorewall has excellent documentation on that kind of setup. You'll find there info about how to direct certain traffic through a particular network interface.


for gsoap we need to manually bind(2) before connect(3) in tcp_connect

0

精彩评论

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