sorry I typed it to quickly.
[computer bonjour name].[_device-info._tcp].[domain]

but I get error -72004 when i try it. :(
witch is an invalid parameter.

I've searched the internet for _device-info.
and apparently i'm not the only one asking about this feature, but no one seems to be getting an answer :|

Oh well... Discovery time :)

Sandro Noel.

On 16-Jan-09, at 2:21 AM, Sandro Noel wrote:

Guy's I think I found it.

Using a packet analyzer on my laptop, and using my iphone with DataCase (AFP server for iphone) when the service is resolved, finder sends a special bonjour query. called device-info.
Packet: 5, Packetlength: 252 bytes, Packet follows:

00030 00 05 00 00 00 00 16 53 61 6e 64 72 6f 20 4e 6f .......Sandro No 00040 65 6c e2 80 99 73 20 69 50 68 6f 6e 65 0b 5f 61 el...s iPhone._a 00050 66 70 6f 76 65 72 74 63 70 04 5f 74 63 70 05 6c fpovertcp._tcp.l 00060 6f 63 61 6c 00 00 21 80 01 00 00 00 78 00 11 00 ocal..!.....x... 00070 00 00 00 15 38 08 69 50 68 6f 6e 65 2d 37 c0 34 .... 8.iPhone-7.4 00080 c0 0c 00 10 80 01 00 00 11 94 00 01 00 09 5f 73 .............._s 00090 65 72 76 69 63 65 73 07 5f 64 6e 73 2d 73 64 04 ervices._dns-sd. 000a0 5f 75 64 70 c0 34 00 0c 00 01 00 00 11 94 00 02 _udp. 4.......... 000b0 c0 23 c0 23 00 0c 00 01 00 00 11 94 00 02 c0 0c .#.#............ 000c0 16 53 61 6e 64 72 6f 20 4e 6f 65 6c e2 80 99 73 .Sandro Noel...s 000d0 20 69 50 68 6f 6e 65 0c 5f 64 65 76 69 63 65 2d iPhone._device- 000e0 69 6e 66 6f c0 2f 00 10 00 01 00 00 11 94 00 0c info./.......... 000f0 0b 6d 6f 64 65 6c 3d 4d 36 38 41 50 .model=M68AP

can you see the model=M68AP ?

the service reference here :http://www.dns-sd.org/ServiceTypes.html says
device-info
Device Info Stuart Cheshire , Marc Krochmal Not a service type. Special name reserved for DNS-SD device info.

So the query would be .

[computer bonjour name].[service-info.tcp].[domain]
resolve that, and you get your model info.

This is just speculation for now but i'll try it tomorrow and let you guy's know ! :)

I. Savant thank you for being curious as I am :)


Sandro Noel.

On 13-Jan-09, at 2:51 PM, Sandro Noel wrote:

Well it's not that bad of a place to put it...
there is not way to know beforehand if the servers are going to be present So it makes sense to ask the server what it is. when Bonjour declares it's presence.
or when the SMB server broadcasts.

The icons for every possible mac model are local to the computer, if you have a Mac.
/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/

I suspect that the icon in the reply from the FPGetSrvrInfo is useful for other platforms. because with the model number, there is pretty much no more information needed to
associate an icon from the local resource.

The only problem I find it VERY complicated for such a simple feature. to have to implement sockets UDP or TCP "have not gotten a reply yet".
Just to get an image to show up on screen :) is quite an overhead :)

Perhaps it would of been nice to add the model number of the machine to a NSNetService(Bonjour) TXT record.
Instead of having to uery the host directly. IMHO

I might be wrong, what do I know :)

Sandro Noel.

On 13-Jan-09, at 12:09 PM, I. Savant wrote:

On Tue, Jan 13, 2009 at 11:32 AM, Sandro Noel <sandro.n...@mac.com> wrote:

The AFP client sends the FPGetSrvrInfo command to obtain server information. The FPGetSrvrInfo command returns server information including the following server parameters: server name, machine type, AFP version strings, UAM strings, volume icon and mask, a bitmap of flags, and optionally, a list of available Open Directory names. For descriptions of server parameters, see
FPGetSrvrInfo in the Reference section.


Neat! That seems an odd place to put that functionality, but
hopefully it'll be better-placed when all that stuff is eventually
cocoa-ized. Thanks for the follow-up. Very informative.

--
I.S.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/sandro.noel %40mac.com

This email sent to sandro.n...@mac.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to