• 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: MX Record lookup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MX Record lookup


  • Subject: Re: MX Record lookup
  • From: Robert Kuilman <email@hidden>
  • Date: Sun, 21 Sep 2003 00:55:00 +0200

Tomas and Vincent!

Thank you for your reply! i got things to work (a bit), i installed a notifier, and now it gets called, however,
when in the notifier function, i call the following code:

InetMailExchange myRecordSet = *(InetMailExchange*)cookie;

the structure gets returned empty (whereas 'cookie' is the given function variable, and is supposed to be the variable containing the MX-Record structure (according to the OpenTransport docs online)

Any comments regarding this? i would gladly appreciate :-)

With kind regards,

Robert K.

web: http://halfduplex.net/
email: email@hidden
------------------------------------------------------------------------ ---------------------


On Saturday, September 20, 2003, at 10:44 PM, Tomas Zahradnicky wrote:

Hey all!

I've been struggling with this code for a while now.
I want to lookup MX-Records, thus, using the OpenTransport API descriptions, i created the following piece of code:

/*
* CARBON CODE SNIPPET
*/
OSStatus err = noErr;
InetSvcRef inetServicesRef;
OTClientContextPtr contentPtr;
OTConfigurationRef configurationRef;

err = InitOpenTransportInContext(kInitOTForApplicationMask, &contentPtr);

configurationRef = OTCreateConfiguration("udp");
if( configurationRef == NULL ) { std::cout << "invalid config_ref!\n"; }

inetServicesRef = OTOpenInternetServicesInContext(configurationRef, kO_NDELAY, &err, contentPtr);
// ....
/*
* END
*/

but, running this code results in inetServicesRef being NULL and a -3282 error, aka, bad Configuration ref. I tried replacing it with 'kUDPName' and even 'kTCPName' (which obviously is the wrong protocol for DNS, but tried anyway).

Anyone can give me any insight into my problem?

Hi Robert,

this code is definitely wrong. Here're some of my comments:

- You should not use UDP endpoint with Internet Services.
Use kDNRName rather than "udp".

- If you're using just kInitOTForApplicationMask in your app,
you can pass NULL for the context parameter in all calls.

- Use OTInetMailExchange to get MX record.


-Tomas
--
Ing. Tomas Zahradnicky, Jr.
Production Manager, 24U Software
Associate Member, Filemaker Solutions Alliance
mailto:email@hidden
http://www.24uSoftware.com
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: MX Record lookup (From: Tomas Zahradnicky <email@hidden>)

  • Prev by Date: How can I tell if DHCP is active
  • Next by Date: Re: MX Record lookup
  • Previous by thread: Re: MX Record lookup
  • Next by thread: Re: MX Record lookup
  • Index(es):
    • Date
    • Thread