Hi all.

I have asked about how to binding to a particular IP addr.

Michael replied it with some advice as follows.

"If you are on a *nix-style machine using the BSD sockets API, the system
call you want is "bind". Normally you don't bind() a client socket, since
you want the OS to figure it out for you. But if you want to tell the OS
precisely which IP address to use, the bind call can associate the socket
with the address."


Currently I am modifying xmllint.c to create my own program and took a look
at "nanohttp.c" to see a routine for binding client socket, but I could not
find it.

It seems that the OS figure it out like Michael said.

Actually I want to generate multiple IPs through IP aliasing. and running
the hundreds of programs with a different IP

at the same time in order to test scalability of the proxy system that I
have recently built.

Therefore, it is inevitable for me to understand how to bind a particular
IP.

1. Which file or function can I add "binding routine" without corrupting
others?

2. In a socket programming, when a client send a data, it has to know client
IP address. Then, when the OS figure out the IP binding,
    does it pass that information to the program? How? I am just wondering
how the OS and libxml library communicate with each other for that?

Thanks.
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to