From: "Russ Cox" <rsc@swtch.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] OUdphdr
Date: Sun, 6 May 2007 13:09:16 -0400 [thread overview]
Message-ID: <20070506170915.5D4601E8C26@holo.morphisms.net> (raw)
In-Reply-To: <32d9c6dcc0efeabd807ee1f77c328898@coraid.com>
> the comment in this diff confuses me. is OUdphdr now used
> for ip6 as opposed to Udphdr? i guess i don't quite understand
> the emphasis on v6 since plan 9 represents all ip addresses as v6.
>
> also, why are there two udp packet formats defined?
>
> - erik
>
> enum
> /n/sources/plan9//sys/include/ip.h:74,87 - ip.h:74,87
> typedef struct OUdphdr OUdphdr;
> struct OUdphdr
> {
> - uchar raddr[IPaddrlen]; /* V6 remote address */
> - uchar laddr[IPaddrlen]; /* V6 local address */
> - uchar rport[2]; /* remote port */
> - uchar lport[2]; /* local port */
> + uchar raddr[IPaddrlen]; /* remote address and port */
> + uchar laddr[IPaddrlen]; /* local address and port */
> + uchar rport[2];
> + uchar lport[2];
> };
Don't worry about the comment.
It's just a clarification (since obviously
raddr doesn't have a port in it).
Nothing has actually changed in the format.
As the name suggests, OUdphdr is old and
obsolete. The new Udphdr added the interface
where the packet came in, which is needed for
things like dhcpd.
There are two formats because the user space
programs and kernels couldn't be updated all
in one go. Now that the kernels with the new
headers have propagated, the programs
that still use the old header format should really be
changed to use the new format. Those programs
appear to be just ip/dhcpclient, ip/ipconfig,
ip/rip, and ip/udpecho. But like a lot of Plan 9
maintenance, it just never happened.
Russ
prev parent reply other threads:[~2007-05-06 17:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-06 14:58 erik quanstrom
2007-05-06 17:09 ` Russ Cox [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070506170915.5D4601E8C26@holo.morphisms.net \
--to=rsc@swtch.com \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).