Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ICMP packet size in host byte order on Intel Macs



This is normal with for Raw IP Sockets, all the fields of the IP header are in network byte order except for the fields ip_len and ip_off that are in host byte order. This is documented in the man page ip(4).

See

Vincent

On Feb 28, 2006, at 8:20 PM, David Litwin wrote:

I am seeing a problem with ICMP socket packets having their size field
in host order on the Intel Macs.

A packet coming to a ppc mac will have a received size (from recvfrom())
of 32 and a header starting with:
45 00 00 0c ...


whereas the Intel Mac will get a packet of received size (from
recvfrom()) of 56 and a header starting with:
45 00 24 00 ...

subtracting 20 bytes from each received size to account for the packet
header, one would expect the Intel packet to be:
45 00 00 24 ...

Oddly, ping on the Intel Macs works fine, and I would have presumed this
to cause it the same trouble it is causing me. Is it possible Apple
fixed the Intel version of Ping around this, is ping doing something
different, or am I missing some information that explains all of this in
some other way?


David Litwin
BigFix
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden


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.