Date: Fri, 28 Jun 2002 12:57:44 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Robert Drehmel <robert@ferrari-electronic.de> Cc: Poul-Henning Kamp <phk@critter.freebsd.dk>, Mike Barcroft <mike@FreeBSD.ORG>, current@FreeBSD.ORG, robert@FreeBSD.ORG Subject: Re: changing 'struct utmp' Message-ID: <3D1CBFB8.F632B5DD@mindspring.com> References: <20020628113454.B34516@espresso.q9media.com> <4381.1025278687@critter.freebsd.dk> <20020628203526.A8390@alpha.develop.ferrari.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Robert Drehmel wrote: > On Fri, Jun 28, 2002 at 05:38:07PM +0200, Poul-Henning Kamp wrote: > > really guys, we need to do this right. > > > > The entire "line-number from /etc/ttys is index into file" concept > > sucks. > > > > Fixed sized records suck badly. > > If people want a more sophisticated solution, I could also > create a database format using the 'struct uxtmp' like Garrance > and Mike suggested, but with dynamicly sized members, and the > possibility to include only specific members in the structure. > To access members in such a structure functions like > void *utmpx_get_member(struct utmpx *, int which); > could be provided. Poul's right that it needs to be done right. I'm not sure if fixed sized records are really the problem, though. All of the tools (w, finger, ps, who, etc.) assume columnar output, so the display records are fixed size. Also, the ability to know your entry offset is entry# * sizeof(struct) avoids the locking and offset computation that would otherwise become necessary (locks are implicit, if there are no conflicts for allocation/deallocation). It's pretty obvious that there is a requirement for *at least* textual representation of an IPv6 address in the old utmp code. I think it's equally obvious though, that most work going forward is uxtmp, and it might not be right to store full fields even under uxtmp, due to insignificance of the characters after a certain point. I'm personally not certain what "bug" was "fixed" by the patch that was posted to the list (the description of the symptoms that supposedly required the patch were never posted, from what I saw). At the point it became an issue, the IP address as a text string should have been stored instead of the host name, anyway, for the updated field, and 18 is insufficient for a full IPv6 address -- if that's even what the issue was. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D1CBFB8.F632B5DD>