Re: HELP - Solaris9 & getpeername()

From: Casper H.S. Dik (Casper.Dik_at_Sun.COM)
Date: 10/27/03

  • Next message: Oleg Yakovlev: "Re: HELP - Solaris9 & getpeername()"
    Date: 27 Oct 2003 11:51:39 GMT
    
    

    Oleg Yakovlev <yashka@optima.net.ua> writes:

    >But the netstat command shows this connection in IPV4 part. NOT in IPV6.
    >Why?

    Because it's an IPv4 connection.

    >> Why is that a problem? The peer address is likely a "IPv4 mapped" address.

    >It is no problem for program which has the source. I simply re-factored
    >its sources for "IPV4 mapping". But it does not work for any old program
    >writed without *special* parts of code for IPV6. Do I need re-write all
    >my old sources? It is very hurt :(

    Only if the old programs are all like your test programs; i.e., they
    assume that the transport used by X is a IPv4 socket (it can be several
    things: a pipe, a unix domain socket, an IPv4 socket, an IPv6 socket).

    getpeername() will return a IPv6 address only for IPv6 sockets; i.e.,
    all programs that just created the socket with socket(AF_INET, ...)
    would get IPv4 sock addresses back.

    I'm not sure whether it's possible to disable IPv6 to such an extent that
    X starts to use IPv4 addresses.

    Casper


  • Next message: Oleg Yakovlev: "Re: HELP - Solaris9 & getpeername()"
  • Quantcast