• 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: CFSocketSignature & IPv6 addresses
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFSocketSignature & IPv6 addresses


  • Subject: Re: CFSocketSignature & IPv6 addresses
  • From: Douglas Davidson <email@hidden>
  • Date: Fri, 27 May 2005 10:28:57 -0700


On May 27, 2005, at 10:07 AM, OL&L Lists wrote:

http://developer.apple.com/documentation/CoreFoundation/Reference/ CFSocketRef/Reference/chapter_1.5_section_1.html

"A CFData object holding the contents of a struct sockaddr appropriate for the given protocol family, identifying the address of the socket."


Notice that it says "a struct sockaddr", not "a struct sockaddr_in". This is because it is intended to hold any variety of sockaddr, not merely that for IPv4.


However, you cannot put a CFSocketSignature into a CFDictionary, because it is a struct and not a CFType. You can, however, place the address CFDataRef into a CFDictionary, and it may be sufficient for your needs.

OK so in that case what is the easiest and quickest way to store all this data in a CFDictionary? I need to send *all* the socket info to my helper tool, not just the address info.



I am not sure what you think of as easy and quick, but one way would be to store the family, type, and protocol as CFNumbers in an array or dictionary; another, that I have used myself sometimes, would be to create a new CFData containing the family, type, and protocol followed by the sockaddr.


Douglas Davidson

_______________________________________________
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: CFSocketSignature & IPv6 addresses
      • From: Jeremy Wyld <email@hidden>
References: 
 >CFSocketSignature & IPv6 addresses (From: OL&L Lists <email@hidden>)
 >Re: CFSocketSignature & IPv6 addresses (From: Douglas Davidson <email@hidden>)
 >Re: CFSocketSignature & IPv6 addresses (From: OL&L Lists <email@hidden>)

  • Prev by Date: Re: Changing IP Address and Config method using the System configur ation framework.
  • Next by Date: Re: CFSocketSignature & IPv6 addresses
  • Previous by thread: Re: CFSocketSignature & IPv6 addresses
  • Next by thread: Re: CFSocketSignature & IPv6 addresses
  • Index(es):
    • Date
    • Thread