<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Matt,<br>
The steps suggested are similarly to the deprecated function so simply  I used the same code in static function, But i need support for IPV6 as well in the same function <br>
<br>
The function needs to have compatibility to support for both ipv6 and ipv4, do we have any new function to support both<br>
<br>
<br>
thanks,
<div>Shivakumar.</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Matt Caswell <matt@openssl.org><br>
<b>Sent:</b> Monday, September 27, 2021 3:05 PM<br>
<b>To:</b> Shivakumar Poojari <Shivakumar.Poojari@rbbn.com>; openssl-users@openssl.org <openssl-users@openssl.org><br>
<b>Cc:</b> Paramashivaiah, Sunil <Sunil.Paramashivaiah@rbbn.com><br>
<b>Subject:</b> [EXTERNAL] Re: Replacement for BIO_get_port(), BIO_get_host_ip()</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"><br>
<br>
On 24/09/2021 07:05, Shivakumar Poojari wrote:<br>
> Hi<br>
> BIO_get_port(), BIO_get_host_ip(),  were deprecated in OpenSSL 1.1.0. <br>
> Trying for replacement for OpenSSl 3.0<br>
> <br>
> Gone through the below man page, but not found alternative function.<br>
> <br>
> <a href="https://clicktime.symantec.com/3Xv8ZiB6xAtjRGsCNHevANW6H2?u=https%3A%2F%2Fwww.openssl.org%2Fdocs%2Fmanmaster%2Fman3%2FBIO_connect.html">
https://clicktime.symantec.com/3Xv8ZiB6xAtjRGsCNHevANW6H2?u=https%3A%2F%2Fwww.openssl.org%2Fdocs%2Fmanmaster%2Fman3%2FBIO_connect.html</a>
<br>
> <<a href="https://clicktime.symantec.com/3Xv8ZiB6xAtjRGsCNHevANW6H2?u=https%3A%2F%2Fwww.openssl.org%2Fdocs%2Fmanmaster%2Fman3%2FBIO_connect.html">https://clicktime.symantec.com/3Xv8ZiB6xAtjRGsCNHevANW6H2?u=https%3A%2F%2Fwww.openssl.org%2Fdocs%2Fmanmaster%2Fman3%2FBIO_connect.html</a>><br>
> <br>
> please suggest,<br>
<br>
These functions are deprecated because they only support IPv4.<br>
<br>
Instead you can use BIO_lookup() (or possibly BIO_lookup_ex()) to lookup <br>
the given host/service (first and second parameters to BIO_lookup() <br>
respectively). Equivalent 3rd/4th/5th parameters to BIO_lookup() might <br>
be BIO_LOOKUP_CLIENT, AF_INET (for IPv4) and SOCK_STREAM (for TCP).<br>
<br>
This will return you an initialised BIO_ADDRINFO() object (which you <br>
will have to later free using BIO_ADDRINFO_free()).<br>
<br>
 From the BIO_ADDRINFO object you can get a pointer to an underlying <br>
BIO_ADDR using BIO_ADDRINFO_address(addrinfo). Finally you can use <br>
BIO_ADDR_rawaddress() to get address info, or BIO_ADDR_rawport() to get <br>
port info:<br>
<br>
See:<br>
<a href="https://clicktime.symantec.com/3EBngctzbwbGZ7EtRw3Ks6N6H2?u=https%3A%2F%2Fwww.openssl.org%2Fdocs%2Fman3.0%2Fman3%2FBIO_lookup.html">https://clicktime.symantec.com/3EBngctzbwbGZ7EtRw3Ks6N6H2?u=https%3A%2F%2Fwww.openssl.org%2Fdocs%2Fman3.0%2Fman3%2FBIO_lookup.html</a><br>
<a href="https://clicktime.symantec.com/33SMrAMvMeCpangnxBCzSv96H2?u=https%3A%2F%2Fwww.openssl.org%2Fdocs%2Fman3.0%2Fman3%2FBIO_ADDR_rawaddress.html">https://clicktime.symantec.com/33SMrAMvMeCpangnxBCzSv96H2?u=https%3A%2F%2Fwww.openssl.org%2Fdocs%2Fman3.0%2Fman3%2FBIO_ADDR_rawaddress.html</a><br>
<br>
Matt<br>
</div>
</span></font></div>
<br clear="both">
Notice: This e-mail together with any attachments may contain information of Ribbon Communications Inc. and its Affiliates that is confidential and/or proprietary for the sole use of the intended recipient. Any review, disclosure, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and then delete all copies, including any attachments.<BR>
</body>
</html>