[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: iphlpapi: Implement GetUnicastIpAddressTable (try 2)
From:       Bruno Jesus <00cpxxx () gmail ! com>
Date:       2017-03-27 14:18:33
Message-ID: CALF_nURRUh9tQtjsKaURaKVg8hRQS=LXCmOxty3k18a0wJTcZQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Monday, March 27, 2017, Hans Leidekker <hans@codeweavers.com> wrote:

> > +DWORD WINAPI GetUnicastIpAddressTable(ADDRESS_FAMILY family,
> MIB_UNICASTIPADDRESS_TABLE **table)
> > +{
> > +    IP_ADAPTER_ADDRESSES *aa, *ptr;
> > +    MIB_UNICASTIPADDRESS_TABLE *data;
> > +    DWORD ret, count = 0;
> > +    ULONG size;
> > +
> > +    TRACE("%u, %p\n", family, table);
> > +
> > +    if (!table || (family != WS_AF_INET && family != WS_AF_INET6 &&
> family != WS_AF_UNSPEC))
> > +        return ERROR_INVALID_PARAMETER;
> > +
> > +    ret = GetAdaptersAddresses(family, 0, NULL, NULL, &size);
>
> You should pass GAA_FLAG_SKIP_* flags here to exclude any data that will
> not be used.


Thanks for the review, I'll leave that to André ;-)

[Attachment #5 (text/html)]

On Monday, March 27, 2017, Hans Leidekker &lt;<a \
href="mailto:hans@codeweavers.com">hans@codeweavers.com</a>&gt; wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">&gt; +DWORD WINAPI \
GetUnicastIpAddressTable(<wbr>ADDRESS_FAMILY family, MIB_UNICASTIPADDRESS_TABLE \
**table)<br> &gt; +{<br>
&gt; +      IP_ADAPTER_ADDRESSES *aa, *ptr;<br>
&gt; +      MIB_UNICASTIPADDRESS_TABLE *data;<br>
&gt; +      DWORD ret, count = 0;<br>
&gt; +      ULONG size;<br>
&gt; +<br>
&gt; +      TRACE(&quot;%u, %p\n&quot;, family, table);<br>
&gt; +<br>
&gt; +      if (!table || (family != WS_AF_INET &amp;&amp; family != WS_AF_INET6 \
&amp;&amp; family != WS_AF_UNSPEC))<br> &gt; +            return \
ERROR_INVALID_PARAMETER;<br> &gt; +<br>
&gt; +      ret = GetAdaptersAddresses(family, 0, NULL, NULL, &amp;size);<br>
<br>
You should pass GAA_FLAG_SKIP_* flags here to exclude any data that will not be \
used.</blockquote><div><br></div><div>Thanks for the review, I&#39;ll leave that to \
André ;-)</div>


[Attachment #6 (text/plain)]




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic