<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Unicast vs. Broadcast in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Unicast-vs-Broadcast/m-p/257818#M7594</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we bind to an IP of INADDR_ANY, is there a way to determine if the destination IP (of a UDP datagram) was a unicast or a broadcast?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current solution is to open 2 sockets, one bound to the specific IP and one bound to INADDR_ANY. I can wait on both sockets and recv() from the appropriate one. However, this doubles my memory requirement and makes it more painful to add DHCP capabilities to the product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a solution with a single socket? I don't mind tinkering or implementing a custom "get dest IP" function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also any tips on doing dhcp when binding to a specific IP and not INADDR_ANY would be welcome...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;+Joel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Aug 2013 21:54:29 GMT</pubDate>
    <dc:creator>theJoel</dc:creator>
    <dc:date>2013-08-15T21:54:29Z</dc:date>
    <item>
      <title>Unicast vs. Broadcast</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Unicast-vs-Broadcast/m-p/257818#M7594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we bind to an IP of INADDR_ANY, is there a way to determine if the destination IP (of a UDP datagram) was a unicast or a broadcast?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current solution is to open 2 sockets, one bound to the specific IP and one bound to INADDR_ANY. I can wait on both sockets and recv() from the appropriate one. However, this doubles my memory requirement and makes it more painful to add DHCP capabilities to the product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a solution with a single socket? I don't mind tinkering or implementing a custom "get dest IP" function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also any tips on doing dhcp when binding to a specific IP and not INADDR_ANY would be welcome...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;+Joel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Aug 2013 21:54:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Unicast-vs-Broadcast/m-p/257818#M7594</guid>
      <dc:creator>theJoel</dc:creator>
      <dc:date>2013-08-15T21:54:29Z</dc:date>
    </item>
  </channel>
</rss>

