Re: raw socket, IP_HDRINCL byteorder
[email protected] Tue, 24 Sep 2002 13:23:16 +0900
| Newsgroups | gmane.os.bsd.api.general |
|---|---|
| Message-ID | <[email protected]> |
>> raw socket with IP_HDRINCL uses different network byteorder for some >> of the IP header fields (ip_off and ip_len). i think the behavior >> is confusing, and the culprit is 4.[34]BSD. (4.[34]BSD should have >> cleaned it up before supplying this API to users) > >It was actually well-defined when it was introduced; it just wasn't what >people expected from it. It's now confusing because Linux and others >decided to "fix" it. how did Linux fixed it? (i don't have any Linux systems around) >I'd like to see a well-defined, portable raw socket interface (don't forget >raw input, where the IP header is always included so you can't tell the >desired behavior from IP_OHDRINCL / IP_HDRINCL). I think that the right >thing to do is introduce a new socket option that sets raw sockets to behave >in the new way, and not try to overload IP_HDRINCL, whose behavior is >too OS-specific. IP_RAW_PKTS_HAVE_NETWORK_BYTE_ORDER, except that's too >long =) IP_NHDRINCL or IP_HDRINCL2, maybe? itojun --------------------------------------------------------------------- The BSD APIs Discussion Mailing List To unsubscribe: send "unsubscribe bsd-api-discuss" to majordomo-DZEk9q7Sfju/3pe1ocb+swC/[email protected]