| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Jul 15, 2004, at 21:24, Eric Wing wrote:
I am new to Rendezvous and am trying to whip up ademo to showservice type, andinternally in my company.
Currently, the code only prints out the name,domain and tries to print out the IP and Port. Theip and port andnowhere near the values that I registered theservice with so I canonly assume I'm doing something wrong. Can you helpme pinpoint > that?
I'm new here too, but my first instinct is you're getting bitten by endian issues. I think the Rendezvous API is returning stuff in network order, so you need to convert to hostmachine order.
Look into ntohs() and ntohl().
printf("Port: %d\n", ntohs(answer->rdata->u.srv.port));
Regards,
Justin
-- /~\ The ASCII Justin C. Walker, Curmudgeon-at-Large \ / Ribbon Campaign X Help cure HTML Email / \ _______________________________________________ rendezvous mailing list | email@hidden Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/rendezvous Do not post admin requests to the list. They will be ignored.
| References: | |
| >Re: Question about retrieving port numbers (From: Eric Wing <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.