• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UDP Broadcast uses random source ports
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UDP Broadcast uses random source ports


  • Subject: Re: UDP Broadcast uses random source ports
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 31 Aug 2011 00:18:10 -0700


On Aug 31, 2011, at 12:05 AM, email@hidden wrote:

The source port of my outgoing UDP replys seem to change on each
broadcast message.

I don’t have an answer to your exact question (been too long since I used UDP), but I can tell you that it’s a bad idea to use broadcast. It will create work for the network interface and IP stack of every single device on the LAN, because every device has to listen to all broadcast packets. This is a bad idea on busy networks.

What you should be using instead is link-local multicast. It has the same basic behavior, except that only network interfaces that are explicitly listening on your multicast address will handle the packet; others can just ignore it. This is how Bonjour works, for example. (And it was Stuart “Bonjour” Cheshire who first explained to me the difference, ten years ago.)

My guess about your port issue is that your code is specifying what port it wants to send *to* on the destination, but it hasn’t specified which port it’s sending *from*.

—Jens

PS: Please don’t BCC the mailing list in your posts. It breaks people’s auto-filtering mail rules, and makes it awkward to reply back to the list.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: UDP Broadcast uses random source ports
      • From: Gordon Apple <email@hidden>
    • Re: UDP Broadcast uses random source ports
      • From: Dreamcat4 <email@hidden>
References: 
 >UDP Broadcast uses random source ports (From: email@hidden)

  • Prev by Date: UDP Broadcast uses random source ports
  • Next by Date: Re: UDP Broadcast uses random source ports
  • Previous by thread: UDP Broadcast uses random source ports
  • Next by thread: Re: UDP Broadcast uses random source ports
  • Index(es):
    • Date
    • Thread