The Journal of AUUG Inc. Volume 25 ¯ Number 3 September 2004

Features:

mychart Charting System for Recreational Boats 8 Lions Commentary, part 1 17 Managing Debian 24 SEQUENT: Asynchronous Distributed Data Exchange 51 Framework

News:

Minutes to AUUG board meeting of 5 May 2004 13 Liberal license for ancient sources 16 First Australian UNIX Developer’s Symposium: CFP 60 First Digital Pest Symposium 61

Regulars:

Editorial 1 President’s Column 3 About AUUGN 4 My Home Network 5 AUUG Corporate Members 23 A Hacker’s Diary 29 Letters to AUUG 58 Chapter Meetings and Contact Details 62 AUUG Membership AppLication Form 63

ISSN 1035-7521 Print post approved by Australia Post - PP2391500002 AUUGN

The journal of AUUG Inc.

Volume 25, Number 3 September 2004

Editor ial

Gr eg Lehey

After last quarter’s spectacularly late delivery of For those newcomers don’t recall the “Lions AUUGN, things aregradually getting back to nor- Book”, this is the “Commentary on the Sixth Edi- mal. I had hoped to have this on your desk by tion UNIX ” that John Lions the end of September,but it wasn’t to be. Given wr ote for classes at UNSW back in 1977. Suppos- that that was only a couple of weeks after the “Ju- edly they werethe most-photocopied of all UNIX- ly” edition, this doesn’t seem to be such a prob- related documents. Ihad mislaid my photocopy, lem. I’m fully expecting to get the December is- poor as it was (weren’t they all?) some time earli- sue out in time to keep you from boredom over er,soIwas delighted to have an easy to read ver- the Christmas break. sion. First the good news: last quarter I asked for vol- As Eric Raymond says, the thing that withheld the unteers for an editorial team. I’m pleased to an- publication of the notes at the time was the trade nounce that Frank Crawford has risen to the chal- secr et status of the UNIX kernel. That changed lenge and is now part of the team. As a result, with Caldera’s release of “Ancient UNIX” on 20 I’m pleased to say that I’ll be staying on the team January 2002, and Peter Salus, who has full rights too. to reprint, has agreed to let us reprint them. As a result, we can now print the notes (and convert Only one problem with Frank: he’s the most reli- them back into John Lions’ beloved tr off;see able person I know in AUUG. When things go page 20). Due to the size, we’ll be spreading it wr ong, you can rely on Frank to help out. Ther e over the next few issues. should be morelike him: but therearen’t. And that’s my worry. We can do with morepeople on The posting on USENET didn’t include the source the team; just because thereare now two of us code which was an integral part of the notes. I doesn’t mean that we can’t do with more. don’t intend to print them hereeither; nowadays it’s a lot easier to have that sort of thing online. What feedback we’ve had about the change of I’ll be including them in the next AUUG CD-. subject matter has generally been well received. In this issue, I’m continuing the idea of reprinting About CD-Rs: as I stated last month, due to a AUUG’s own content. It hasn’t yet been possible comedy (for want of a moreappr opriate word) of to include any of the papers from this year’s con- err ors, we ended up including one moreCD-R fer ence in this issue, but we’reconfident to get than intended in the last issue of AUUGN. To some of the better ones in the December issue. make up for that, this issue doesn’t contain any. In the meantime, I’ve dug up some “oldies but We’ll resume the usual CD-R per quarter next goodies” for this issue. quarter,and after that therewill be only the CD-R: this is the second-last AUUGN on paper.From Alittle over ten years ago, when people still read next year,the content will be on CD-R instead. If USENET news, I came into my office (in Ger- this is your first issue, and you’d like a CD-R, many) one day to find two cryptic messages sent please contact Liz Carroll, our Executive Director to alt.folklore.computers.They were (see page 2), and she will get you one. uuencodedand borethe subject line “Leo’s notes”. Even while I was uudecoding the mes- sages, I thought “Let it be the Lions book!”. And it was, somewhat incongruously refor matted in TEX. AUUGN Volume 25 Number 3 2September 2004

AUUG Membership and General Correspondence

The AUUG Secretar iat Andrew Freder ickCowie Operational Dynamics AUUG Inc GPO Box 4339 PO Box 7071 Sydney, NSW,2001 Baulkham Hills BC NSW 2153 Telephone: +61-2-9977-6866 Telephone: 02 8824 9511 [email protected] or 1800 625 655 (Toll-Fr ee) Facsimile: 02 8824 9522 Enno Davids Email: [email protected] Michael Still Phone: +61 414 382 568 [email protected] AUUG ExecutiveDirector Immediate past president: Elizabeth Carroll AUUG Inc Greg Lehey PO Box 7071 PO Box 460 Baulkham Hills BC NSW 2153 Echunga, SA, 5153 [email protected] Bus. Tel (08) 8388 8286, Mobile 0418 838 708, Fax (08) 8388 8725 AUUG BoardofDirector s [email protected] Email: [email protected] President Retur ning officer: David Purdue Jason Ozolins Sun Microsystems Level 6, 476 St Kilda Road Assistant Returning officer: Melbour ne, VIC 3004 Phone: +61 3 9869 6412, David Baldwin Fax: +61 3 9869 6288 [email protected] AUUG Incorporated gratefully acknowledges the Vice-president support of its corporate sponsor: Ste veLander s Digital Smarties PO Box 717 Willetton WA6155 Business phone: +61 8 9313 6868 Business fax: +61 8 9313 6077 [email protected] Secretar y Jonathon Coombes Cybersite Consulting Pty Ltd 34 Newcastle Road, Wallsend NSW 2287 Business Telephone: +61 2 4965 6989 [email protected] Tr easurer Gordon Hubbard Custom Technology Australia Pty Ltd 3Spring Street, Bus Tel: 02 9659 9590, Bus Fax: 02 9659 9510 [email protected] Ordinar y boardmember s Grant Allen Adr ian Close Cybersource Pty.Ltd. 4, 10 Queen Street Melbourne VIC 3000 Business Telephone: +61 3 9621 2377 Business Fax: +61 3 9621 2377 Mobile: +61 417 346 094 [email protected] September 2004 3AUUGN Volume 25 Number 3

the activities we areproposing areaimed at fos- President’sColumn tering community. For example, we arecontinu- ing to expand the series of one-day symposia that David Purdue we have been running for several years. To stay “The repor ts of mydeath aregreatlyexa ggerat- up to date with these developments, make sure ” you aresubscribed to auug-announce (go to http://www.auug.or g.au/mailman/listinfo/auug- The text of a cablesent byMarkTwain from announce to subscribe or check your subscrip- London to the press in the United States after tion options). his obituaryhad been mistakenlypublished. So now is a good time to pipe up about what you —The New Dictionary of Cultural Literacy, think AUUG is and whereitshould go. AUUG is Thir d Edition avolunteer organisation—I encourage you all to Youmay have read recently some direpredictions participate, even if it is just turning up to your lo- regarding the futureofAUUG. However,follow- cal chapter meetings. If you have ideas, com- ing the success of our recent conference, AU- ments, criticisms or a wish to get involved and UG’2004, I can safely say that those predictions just do something, please contact the AUUG wer e misguided at best, misleading at worst. board at Inter est in AUUG is high—we have over 800 peo- Finally, it is my great pleasuretoannounce that ple subscribed to auug-announce, and therehas AUUG has promoted Liz Carroll to the position of been a lot of press coverage for the conference, Executive Director.Inpractical terms, this means especially the presentations of the four main par- that we have given Liz the means to delegate ties on their approaches to open computing in away much of the clerical grunt work she used to gover nment—the culmination of a process AUUG do, so she can focus on promoting AUUG. kicked offtwo years ago. The conference was successful in every respect. Using the three main criteria we use for measur- ing success—attendance, revenue and profit—it was our most successful conference for about 5 years. AUUG has also received a lot of very posi- tive feedback on the quality of the conference— fr om attendees, speakers and sponsors. This in- cludes a couple of attendees who have given pr esents to Liz for making the conference experi- ence easier—of course, Liz did not tell me about this until after she had gone home, so she didn’t have to sharethe chocolates! This is not to say that AUUG does not face some challenges. But we have a board in place that is actively addressing these challenges and coming up with workable solutions. We are focussing on what AUUG is. Who areour members and what can AUUG, as a volunteer or- ganisation, deliver to support our members in their professional activities? By the time this AU- UGN appears, the board will have voted on a new tag line and statement of purpose, and that should be on the front page of the web site (http://www.auug.or g.au/). This statement will be the launching point for ideas for the development and expansion of AUUG, and a way of assessing whether new ideas areworth pursuing. AUUG’s main value is as a forum for professionals inter ested in standards based computing to ex- change ideas—to help each other out. Many of AUUGN Volume 25 Number 3 4September 2004

About AUUGN Disclaimer Opinions expressed by the authors and reviewers ar e not necessarily those of AUUG Inc., its Jour- AUUGN Editorial Committee nal, or its editorial committee. The AUUGN Editorial Committee consists of: Cop yright Infor mation • Frank Crawford Copyright © 2004 by AUUG Inc. , All rights reserved. Portions © by their respective and authors, and released under specified licences. • Gr eg Lehey . AUUGN is the journal of AUUG Inc., the organisa- tion of UNIX™ and Open Source Professionals. Youcan always reach the current committee at Its interests include promoting knowledge and [email protected]. understanding of Open Systems, including, but Send physical mail to the following address: not restricted to, the UNIX operating system, user inter faces, graphics, networking, programming AUUG Inc and development environments and related stan- PO Box 7071 dards. Baulkham Hills BC NSW 2153 Copying without fee is permitted, provided that Contr ibutors: copies aremade without modification, and are Thanks to the following people for contributions not made or distributed for commercial advan- to this issue: Frank Crawford ,GregLehey ,Owen Mace ,Martin Contr ibution Deadlines Michlmayr and Devraj Mukherjee . Vol26, No 1 (March 2005) 15 Febr uary2005 Public Relations and Marketing: Elizabeth Carroll Vol26, No 2 (June 2005) 15 May2005 Vol26, No 3 (September 2005) 15 August 2005

AUUGN Submission Guidelines Note that from Januar y 2005, Submission guidelines for AUUGN contributions AUUGN will appear in elec- can be obtained from the AUUG Web site at tronic for m only. http://www.auug.or g.au/publications/auugn/ subguide.. AUUGN BackIssues Anumber of back issues of AUUGN arestill avail- able. For price and availability please contact the AUUG Secretariat. Conference Proceedings Alimited number of copies of the Conference Pr oceedings fr om pr evious AUUG Conferences ar e still available. Contact the AUUG Secretariat for details. Mailing Lists Dir ect enquiries regarding the purchase of the AUUGN mailing list to the AUUG Secretariat. September 2004 5AUUGN Volume 25 Number 3

it is planned to extend this to 52-bits, however, My Home Network this is only an implementation limitation, not a physical issue.), 64-bit general-purpose integer Fr ank Crawford registers and 128-bit XMM registers. All this is Well, AUUG2004 has now come and gone, and a while keeping compatibility with current x86 pro- good time was had by all (or at least me). Along grams. (You might be interested to know that In- with the conference came the latest issue of AU- tel arenow planning to release their own 64-bit UGN, and if you read it, you will realise some extensions, called ‘EM64T’, which they claim to changes arecoming up. However,one thing that have been working on for some time. However, won’t change is this column (as long as I can nothing was mentioned about it, until after AMD keep coming up with new ideas :-)). And so, released the Opteron.) now to this month’s column. However,while the 64-bit architectur e is impor- As a present to my self (and a birthday present tant, it has been available in a number of other ar- fr om my family) I picked up a new toy, an AMD chitectur es for years (e.g. Sun’s Sparc, SGI’s MIPS Athlon 64 processor,and associated hardware. In and IBM’s PowerPC), it isn’t the only issue. One fact, what I’ve picked up is a new Gigabyte moth- of the other big items is a revamp of the internal erboard (a GA-K8VNXP), an Athlon 64 3200+, and CPU bus to move to an open standard called Hy- 1GB RAM consisting of 2 x DDR400 512MB perTransport. Rather than being a tradition bus DIMMS. Tothis I added a Matrox G550 graphics structur e HyperTransport is a very high-speed card (with 4xAGP support), a 40GB IDE disk, a point-to-point link for connecting integrated cir- floppy drive and a DVD ROM, from the old sys- cuits on the motherboard. It simplifies the con- tem, and voila, I had a new high-end system. nection of multiprocessor systems, as well as oth- er devices, such as memory and other external For those interested in what the model 3200+ devices. means, it indicates that its perfor mance is equiva- lent to an Intel Pentium 4 running at 3.2GHz. Far moreinfor mation can be found about this at This does not mean that it runs at 3.2GHz, in fact AMD’s website, http://www.amd.com. it runs at 2.2GHz, and hence is cooler than the So, what to do with this new hardware? Well, equivalent Pentium. An interesting fact is that firstly, since it was an “upgrade” to an existing even Intel aremoving away from the idea of system, I just let it boot up. As with all my other specifying perfor mance via clock speeds, and is installations, it was running Fedora Core2, looking at a new naming scheme. optimised for an Intel Pentium 4. After putting all In line with previous motherboards, this one in- the hardwaretogether and powering on, as usual, cludes moreand morebuilt-in facilities. For ex- the Linux kernel booted. In fact, after running ample, aside from the standard ports (i.e. serial, ‘kudzu’, the “stupid” utility (at least I’ve called it parallel, mouse and keyboard), the GA-K8VNXP that a few times) to detect and configurehard- has an 800MHz FSB (Front-Side Bus), allowing war e changes, the system was up and running very high internal data rates, 8 USB ports, 3 fine with almost all of the new hardwarecorr ectly IEEE1394 ports (.f. Fir ewir e), 2RJ45 LAN ports identified. (1 GigE the other Fast Ethernet), ALC658 CODEC But, one of my aims with purchasing an Athlon and audio support, 4 IDE and 2 SATA ports. In 64 was to experiment with the features of the addition, 2 of the IDE and both the SATA ports new CPU, in particular the 64bit code. Asec- can be configured in a hardwareRAID (0 - striped ondary issue was to look at how good the com- or 1 - mirroring). Given all these features, it is patibility mode for i386 32bit code is. So, the first amazing to find almost all of them aresupported issue was to get native 64bit code onto the sys- within the current Linux kernel (but moreonthat tem. Fedora Cor e 2(FC2) comes with two ver- later). sions, i386 and x86_64 distributions, so my first For those who areunawar e of AMD’s Athlon 64, thought was that an upgrade should perfor m the it is the desktop version of their Opteron, which conversion. As this was an existing working in- has put Intel in a bit of a spin. It is a 64-bit ex- stallation, I wanted to keep everything working. tension to the standard Intel x86 architectur e, Unfortunately, this was a no-go. among other things allowing access to larger vir- tual address space (16EB (Exabyte) vs 4GB, al- Booting from the FC2 DVD and requesting an up- though, don’t expect to see that much RAM in a grade installed only a few packages, but didn’t system for a while) (okay, at present you can only even install the x86_64 kernel! Thinking mor e ra- access 40-bits of physical memory, and ultimately, tionally about this, it’s not surprising it didn’t AUUGN Volume 25 Number 3 6September 2004 work. While ther e is a compatibility mode, as far for e Sun started distributing Linux RPMs, and is as the installation is concerned, the i386 and still a good location for Java for unusual systems. x86_64 aretwo totally differ ent architectur es and Over and above this, other plugins areabit hard- unr elated. er to find, and this reflects a general problem with Okay, so a simple upgrade wouldn’t work, so x86_64 packages at present. While it isn’t too next idea, lets individually upgrade the various hard to make these packages, many developers packages. Todothis I first obtained a list of all ar e not doing so yet. Even worse, sometime the packages currently installed with: ther e ar e word size issues, etc, which need to be addr essed, and haven’t been yet, or don’t appear rpm -qa --qf '%{name}-%{version}-%{release}. \ %{arch}.rpm\n' 2>&1 | sort > rpmpkgs until execution. At the present time, thereare only a few reposito- This is pretty much straight from the script ries that support FC2 x86_64 packages, and the ‘/etc/cr on.daily/rpm’, and includes details of the two major ones I use areDAG (http:// architectur e as well as the name, release, etc. Fol- dag.wieers.com/home-made/apt/packages.php), lowing this I just grepped the i386 packages from Fr eshRPMs (http://fr eshrpms.net)(of which DAG this list and located the equivalent packages in is a part), Livna (http://rpm.livna.or g)and Fedo- the FC2 DVD and updates. Now, while this ra.us (http://www.fedora.us), although Fedora.us scheme looked like one that would succeed, a really has very few x86_64 packages. quick test kicked up a lot of issues with the ver- sions of RPM. In particular,the installation, be- Rather than trying to find the appropriate pack- cause of a new featurecalled “multiarchitectur e ages, and the dependencies for some of these support”, both the old i386 and the new x86_64 packages does start to get complicated, I decided rpms wereboth installed and therewer e anum- to look at yum,the Yellowdog Updater,Modifier ber of ensuing conflicts. fr om Duke University (http://www.linux.duke.edu/pr ojects/yum). yum Oh, well, after this, therewer en’t really too many is an automatic update and package install/re- other options. Icould restor e fr om the backup mover for rpm system, automatically computing I’d taken, or do a fresh installation from the dependencies and ordering for correct installation. x86_64 FC2 DVD. Since my aim for this system is While you can download this package from the to learnabout the x86_64 architectur e, per forming Yumsite, I picked it up from DAG’s site. afresh install was not a big issue. Now I won’t go through the entireprocedur e for the installa- With yum you need to set up the configuration tion, but I will mention that prior to everything file with the locations of suitable repositories else, I saved anything I wanted to keep on (some parts of which can be system variables, e.g. /home, and then ensured that I did not refor mat $releaseversion and $basearch)and then the /home partition. Anyway, suffice to say that request packages which match certain patterns, the fresh installation went fine and after about an e.g. yum search videolan*.The configura- hour I had a new x86_64 installation. tion file, /etc/yum.conf,Ihave is: However,while having a base system was fine, --- and in terms of FC2 thereare a lot of included [main] cachedir=/var/cache/yum featur es, ther e wer e afew things that aren’t there. debuglevel=2 In fact, the two biggest areas needing other pack- logfile=/var/log/yum.log ages areMozilla plugins and movie players. Since pkgpolicy=newest distroverpkg=redhat-release Mozilla is a 64bit application, most plugins arenot tolerant=1 compatible, or at least need to be recompiled be- exactarch=1 for e installation. The one exception to this is that retries=20 gpgcheck=1 mozplugger,which comes with FC2. In this case, ‘mozplugger’ acts as the Mozilla plugin, but then [base] execs the appropriate program. name=Fedora Core $releasever - $basearc h-Base The first “plugin” I needed to find was Java. baseurl=http://download.fedora.redhat.c om/pub/fedora/linux/core/$releasever/$b While normally this can be downloaded from asearch/os/ http://java.sun.com,atpresent Sun doesn’t sup- port x86_64 versions. So offto [updates-released] name=Fedora Core $releasever - $basearc http://www.blackdown.or g/java-linux.html,which h-Released Updates is based on Sun’s 1.4.2_03 code. In fact, this is baseurl=file:///home/mirror/Fedora/upda the original site for obtaining Java for Linux, be- tes/$releasever/$basearch/ September 2004 7AUUGN Volume 25 Number 3

[updates-released-i386] with RPM’s multiarchitectur e support. In this case name=Fedora Core $releasever - i386 - R eleased Updates the x86_64 installation also support i386 rpms, baseurl=file:///home/mirror/Fedora/upda and in many cases, the same product can be in- tes/$releasever/i386/ stalled from two differ ent architectur es on the [updates-testing] same system. Pr obably the only concession to name=Fedora Core $releasever - $basearc this is that thereare a number of 64bit specific di- h-Unreleased Updates rectories, i.e. /lib vs /lib64 and /usr/lib vs baseurl=http://planetmirror.com/pub/fed ora/linux/core/updates/testing/$release /usr/lib64.This does cause some issues for cer- ver/$basearch/ tain simple-minded installations, in particular sys- tems that include dynamically loaded libraries [Fedora.us] name=Fedora.us - $basearch - Extras (e.g. vlc, the videolan-client). They may be com- baseurl=http://fedora.linux.duke.edu/fe piled in 64bit, but look in /usr/lib rather than dorax86_64/fedora.us/$releasever/$basea /usr/lib64 for additional packages. rch/RPMS.stable Getting back to the original discussion, the new [dag] name=Dag RPM Repository for Fedora Core Athlon 64 system, and how is it going. Well at baseurl=http://apt.sw.be/fedora/$releas pr esent I’ve managed to install mplayer and vlc as ever/en/$basearch/dag well as some other smaller products, however, [freshrpms] while mplayer works and vlc partially works, name=FreshRPMs ther e is still a fair bit of work to have all the same baseurl=http://ayo.freshrpms.net/fedora pr oducts available as I could find on a pure-i386 /linux/$releasever/$basearch/freshrpms/ http://ftp.us2.freshrpms.net/li system. Even mor e importantly, this system is not nux/freshrpms/ayo/fedora/linux/$release really intended as a simple desktop, but as a per- ver/$basearch/freshrpms/ for mance workstation, and hopefully soon I’ll get [livna-stable] some chances to try it out as such. name=Livna.org Fedora Compatible Packag es (stable) With all these new power machines coming out, baseurl= http://rpm.livna.org/fedora/$r what areyou doing with your machine? An im- eleasever/$basearch/RPMS.stable portant issue these days is that it isn’t just CPU [livna-unstable] speed that is changing, but rather thereare im- name=Livna.org Fedora Compatible Packag pr ovements thr ough the entiresystem, including es (unstable) changes in some basic structures, in this case baseurl=http://rpm.livna.org/fedora/$re leasever/$basearch/RPMS.unstable 32bit to 64bit architectur es. These changes open up a number new possibilities, which would be [livna-testing] inter esting to hear about. So, why not write name=Livna.org Fedora Compatible Packag es (testing) something up for everyone to hear about? baseurl=http://rpm.livna.org/fedora/$re leasever/$basearch/RPMS.testing

Youwill see from this that I search various levels of the sites I mentioned earlier.Ifyou go to the home page for each of these sites you will find the yum configurations for each site, as well as the GPG keys, which each of these packages is signed with. While yum seems to be the update manager that has received the most support from the Fedora community, it isn’t the only one, and they all seem to sharerepositories and information. The two other most common ones are apt,which has come from the Debian community, and up2date, which was originally developed by Red Hat. Pr obably the biggest interchange of ideas comes with up2date, which in the Fedora incantation us- es the yum header information to determine up- dates. One other important issue, which I haven’t really addr essed is that all the update managers work AUUGN Volume 25 Number 3 8September 2004

mychart is a charting and navigation system for mychart Char ting System recr eational boats. forRecreational Boats The pictureonthe left is of my boat, called “Limelight”. She is a Duncanson 35 which means Owen Mace she is 35 feet long, about ten and a half metres, and some six tonnes of fibreglass and lead. Lime- First, dear reader,let me introduce myself. I light is capable of cruising the world. Maybe wr ote my first computer program as an engineer- someday ... ing student in 1966. The program predicted wher e to look in the sky for satellites. My profes- sional life has been approximately equal parts academia and IT industry and during that time I Over view have never written morethan a few hundred lines of code, perhaps a thousand at most, at one time My decision to build mychart fr om “open” com- for my work. ponents has a number of implications: Ihave enjoyed writing code and have, from time • Iuse Open Source (OSS) throughout, to time, written code outside my professional life. for example the Linux operating system. Iin- This project is my first attempt with a graphical tend to team mychart with other OSS soft- user interface. I am therefor e an ultra-newbie in war e such as OpenOffice and an open source the company of giants. multimedia player for the ship’s entertainment system, Iamalso a keen cruising yachtsman and I wanted acharting system to show the location of my boat • Open Interfaces, that is, published, freely when at sea. It’s important to know when you available and normally at no cost softwareand ar e about to run out of sea, because absence of hardwar e inter faces ar e specified throughout, sea almost always means expensive things for for example, NMEA 01831 (National Marine boats. I’m sur e you understand. Electr onics Association specification 0183 is the most widely used specification for commu- nicating data on recr eational vessels. Chances ar e that your GPS communicate with each oth- er using NMEA 0183, version 2.2 or 3. It’s an ASCII-based 4,800 baud protocol of data sen- tences.), serial and USB. Also, I use the Unix practice of text data files throughout so that users can view and modify data, if necessary, • Open Data which is freely available coastline data from the US National Geophysical Data Center (http://www.ngdc.noaa.gov/mgg/ shor elines/shor elines.html). Now this is where it becomes contentious. The World Vector Shor eline (WVS) is not very accurate and is not maintained. Ther efor e, mychart cannot be used as the primary means of navigation and must be used in conjunction with proper- ly maintained paper or electronic charts. (Which cost an arm, a leg and three fingers to buy for a large area. I have plans for reducing the cost of maintained and accurate data, see the Futureplans section.) , and • Marinised PC hardware. I use mychart on the laptop that I bring on board each weekend but I have in mind another option, see future plans, later in this article, Because of these fac- tors, the cost is as low as possible. If fact, So I decided to build a chart plotter,which I call anyone could build a navigation system and mychart,fromnon-pr oprietary, open compo- modify it, provided they have the appropriate nents—softwar e, hardwar e, data and standards. skills. September 2004 9AUUGN Volume 25 Number 3

Iwill repeat the caveat. mychart cannot be used ar ea, too. mychart needs a 1280 x 1024 pixel as the primary means of navigation. The princi- display and does not scale to smaller displays. ples of good seamanship will guide you in the This resolution is needed to get the most from the use of mychart. chart display. Her e is what the main screen looks like now. Youshould recognise the Gulfs of St Vincent and SoftwareOverview Spencer,and Kangaroo Island. When I started on mychart,Iknew that I wanted adepiction of the sea and land in a format that mimics conventional marine charts. Ihad a cou- ple of books on X Windows with sample pro- grammes that introduced readers to the delights of X11 and worked them through so that I had some minor proficiency in the subject. That seemed to be OK for me, as I still remember ed a little of the few lines of C that I had written while still in academe nearly 20 years ago. So offIwent, working through the examples in the various chapters of the book I selected, get- ting all the example programs to work, under- tanding them and learning a little of the joys of make. I even built an early version of mychart that displayed the coastlines credibly but I felt that handling mouse events would be a little too First of all I built a simple chart that I could zoom tedious, if not demanding, for my nascent knowl- and pan, then I added options controlled by user edge of X11 programming. buttons. (My, Iwas getting sophisticated!) The pan and zoom buttons areobvious in the left What I did learn, however,isthat an understand- hand panel of the window. ing of some of the principles of X11 helped me enor mously as I climb the ladder up of abstrac- Next, I wanted to deal with the external events of tion and found myself on the Glade rung. But characters arriving at the serial port from the GPS I’m ahead of myself. receiver.Parsing the NMEA messages from my Gar min eTrexGPS receiver was a doddle for me Along the way, I found that therewas a real prob- because I had done it many times before. (Don’t lem with the coastline data and I will describe my ask.) So now I could plot GPS positions on the wr estling match with it in the Data Overview sec- chart—at least I knew whereIwas. tion. I also decided that I needed to lay down some rules for myself on the interfaces and I will The next step was really two. Iwanted to display talk about that subject in the Interface Overview the critical GPS information and show boat speed. section. Of course, I couldn’t do both at once, so I decid- ed to display the GPS data in big, bold type. Ispoke to some of the other open sourcers (or,as Well, the gdk refer ence on selecting fonts intimi- Iprefer to call them, open sorcer ers, for the mag- dated me for reasons I cannot explain now, so I ic they weave in their systems) in my workplace decided to use the good old seven segment dis- and received, of course, generous and conflicting play scheme that you can see on the screen shot advice. qt is definitely the way to go. No, Glade below. I rationalised this as being a good scheme is much better for the Mandrake/KDE that I am for night time when yachtsmen adapt their eyes to running. Nah, stick to X11. Atoss of a coin and the dark so that they arealert for dim lights on Glade won. Not really, but I must offer prolific the horizon. (I must have been dim, too, because thanks to all who helped, advised, cajoled and Ididn’t think about the bright light of the chart laughed quietly out of earshot. So with help, I display. Oh, never mind for now, we’ll find a loaded Glade, Gtk and the other bits and pieces way out of that one later.Perhaps, I’ll reduce the necessary to make a Glade application work. overall brightness of the display at night.) Plus, a sample “hello world” program, some Gtk tutorials, a gdk refer ence and I was away. Anyway, you can see how the GPS display turned Thanks Gary. out. From top to bottom, I show GMT time, lon- gitude, latitude and the number of satellites visi- Ihave also disregarded their advice in another ble to the receiver. AUUGN Volume 25 Number 3 10 September 2004

The next step was the graphical display of boat speed. Thereare a couple of considerations here. Firstly, small changes in the settings of ropes can make quite substantial differ ences to boat speed. Ihave seen a rope tensioned by just 150 mm and our boat began to steadily pull ahead of the boat beside us. However,ther e ar e large variations in boat speed from moment to moment as it rides over waves and adjusts to wind shift, so it is nec- essary to filter the speed quite heavily, as you can see from the image below which is actually from ajour ney in a car.

Finally, thereisanareafor error messages. Icalculate boat speed from changes in the posi- mychart is a graphics application built with the tion reported by the GPS receiver and these following OSS tools: changes can have quite large errors in them, as much as 5 metres, so again, heavy filtering is ad- • Glade2tool to built the window widgets, vised. • Gtk+, version 2.4 for manipulating events and The next question is what speed should I show? widgets, The speed of the boat through the water? Over • gdk for primative drawing functions, and land? Towards the next waypoint? All three? Pr obably. But for now, it’s the speed shown by • gcc is the compiler. the GPS receiver. • Naturally, X11 is the underlying windowing Now I wanted to get really clever and show the system. latitude and longitude of the cursor and the dis- tance and heading from the boat. Youcan see the result in the partial screen shot below. Interface Over view

Ihave adopted many of the conventions used in paper charts, such as expressing all latitudes and longitudes as degrees, minutes and fractions of a minute. Internally, I convert to struct Pos { dou- ble Lat, double Long} with the international con- ventions for positive and negative. Other nautical conventions areobserved, such as distances which aredisplayed and input in nautical miles and speeds in knots, as you would expect. Input devices aresomething to consider,too. Imagine a vessel in a large sea with a keyboard and mouse slipping around the chart table. It doesn’t work for me and so mychart works from just a trackball that can be firmly attached to the chart table. September 2004 11 AUUGN Volume 25 Number 3

HardwareOverview

Astandard PC architectur e is all that is requir ed to FutureDirections run mychart.However,the corrosive sea atmos- Some of the developments that I want to do are pher e will make very short work of the electron- described below. ics if a PC weretobeper manently mounted in a vessel. The obvious solution is to exclude the sea Wa ypoints air from the PC and that’s easy enough to do but the CPU has to be cooled by the same corrosive One of the very useful tools is a means of guiding atmospher e that we aretrying to exclude. You avessel to a destination or waypoint. Staying on can forget about using seawater as that’s another track or within a lane gives the vessel the best hole in the hull—no thanks. speed and in some circumstances can be a safety matter,too, if thereare obstacles near the track. However,myplan is to mount a motherboard and Ther e ar e many ways of indicating a vessel’s track hard drive in a metal box. Ther e will be an alu- and reminding the skipper to move right or left to minium block that thermally connects the CPU to retur n to the track. Aflight director on an aircraft the outside and a good heatsink. The power sup- has a lane that rotates (to show that the aircraft is ply should have no fans and will probably be in a heading in the wrong direction) and a marker to separate box. All connections aremade via short show how far offthe lane it is. GPS receivers de- lengths of cable from the side of the box to the pict a lane in the sea with the vessel placed on it electr onics inside so that they can be cheaply re- to show its heading. I’ve experimented with both placed when they corrode. A DVD/CD drive and and I think I prefer the lane—somehow it’s more any other peripherals will be USB connected. intuitive. Hereisawindow that I have been ex- The box will be sealed with high temperaturesili- perimenting with. My next task is to modify my- con. The display is a low power LCD model with chart so that I can set a waypoint with a right all holes sealed. Heat will be dissipated from the click and then a lane window will appear. display. I am told this will work. The next page shows a screen shot from my de- My old 733 MHz 256 Mbyte PC is fine for the task. velopment. The vessel is to the left of the correct It computes and displays the 25,000 WVS points track (indicated by the red colour for port) but on the screen apparently instantaneously. still within 100 metres of the track, and point off the correct direction by 24°. Data Over view Better ChartData The World Vector Shoreline data that I use for the WVS coastlines arevery limited. Not only are coastlines is readily downloaded but the data can- they relatively inaccurate, but also small features not be used as downloaded. Long shorelines are may not appear as even a small rock, a meter or br oken into sections and it cannot be guaranteed two in size, can make a big dent in a yacht. Nor that contiguous segments areadjacent in the data is thereany indication of depth or dangerous file or even that they join correctly. That is, the ar ea, such as reefs, such as those shown on the last point in one segment joins to either the first charts that mariners use. Commercial chart plot- or last point of the segment to which it joins. ters use proprietary data that is derived from, for It took me some time to realise this and then to example, the Australian Hydrographic Office join contiguous segments correctly. Now, the (www.aho.gov.au). The markup on price can be WVS data file (in ASCII text) is first sorted and astounding. AHO, it appears, will supply chart then written for mychart to read in. Ialso use an data in electronic form. Certainly raster is avail- ini file for settings and features, such as wrecks, able, and possibly vector formaswell, and can be markers, etc. Ithink that I should separate the purchased for a reasonable amount. So one of file into two—one for settings and another for the enhancements I want to do is to use AHO featur es as I expect that the features file will grow raster data. with time. All data files aretext so that they can be read and manipulated with a simple . AUUGN Volume 25 Number 3 12 September 2004

• The gadget part—how many gadgets you feel have to be added. This depends on a lot of factors, such as how much of a gadget person you are, your income, how many kids you have at school, etc, and • Maintenance which is what you pay when the boat runs out of water.This is proportional to the cost of the boat, which in turnispropor- tional to the fourth power of the length. (Go figur e!). Maintenance is also proportional to the speed the boat is going when it runs out of water,raised to some power.Ifthe speed is low, its probably planned maintenance but if its large, then we’ve probably encountered a rock and that’s expensive. mychart helps to reduce the maintenance by re- ducing the chances of running out of water at high speed. Mar inised PC I’ve described how I think a marinised PC can be built from a commercial motherboard. Since the infrastructur e is Linux, a second hand machine running at under 1 GHz is fine. Another possibili- ty is to under clock a new machine to lower its power requir ements and heat generation. USB instruments plus their interface Traditionally, marine instruments for speed (called alog), depth and wind speed have been self con- tained, use proprietary and, sometimes, NMEA in- ter faces. Iwould like to build some USB sensors and use the PC for the smarts. Somebody else has probably though of that already. Sourcefor ge Sourceforge has been a bit disappointing. I’ve been through the registration procedur e twice, the first time the application was refused and I re- ceived no reply on the second attempt.

Conclusion

Ther e is an old chestnut that posits that a boat is just a hole in the water into which you pour mon- ey. This is demonstrably unscientific and certain- ly not the case for a sailing vessel. The cost of running a sailing vessel is made up of three parts: • The fixed part—insurance, repayments, berthing fees, registration, etc. This part de- pends on the value of the vessel, whereyou park it and your bank, September 2004 13 AUUGN Volume 25 Number 3

nominations for next year’s board: only a sin- Minutes of AUUG board gle nomination from somebody who is not al- meeting, 5 May2004 ready on the board. Anumber of this year’s board members, myself included, have not nominated for reelection, so therewill be no Location Sun Micr osystems, North Sydney. election, and next year’s board is two mem- bers short. Attendees: Other instances of inactivity abound: it ap- Elizabeth Carroll EC pears that we have effectively been sidelined Adrian Close AC in our relationship with the Government, not Jonathon Coombes JC because of our position, but because of our Andr ew Cowie AfC inactivity. Instead, gr oups like Linux Australia Gordon Hubbard GH and even ACS aretaking our place. It seems Steve Landers SL that nobody on the board or in the Open Gr eg Lehey GL Computing for Government committee cares David Purdue DP enough to make a contribution that would Apologies: doubtless be valuable. Stephen Rothwell SFR Even in our area of strength, things arenot Michael Still MS happening. I have already mentioned the AOSS 6, but at least thereissome evidence of something happening there. The intention to Meeting started at 10:00 am hold a systems administration symposium seems not to have got offthe ground, and 1. Apologies pr eparations for AUUG 2004 arebehind 2. President’s report. schedule. The editor of AUUGN has an- nounced his intention to resign, and I can’t In the past quarter,weheld a security sympo- even begin to think of who might replace him. sium in Canberra. It was quite successful, and it is another indication that our most success- When I became president of AUUG two years ful activities areevents. ago, I put a large amount of personal effort in- to trying to turnAUUG around. I was helped AUUG is now also a member of the IT Council by a number of other people who also put in of South Australia. At the April board meeting far moreeffort than one could reasonably ask. Ipresented AUUG to the IT Council. The pre- Unfortunately, therewer e too few people in- sentation was well received, and I believe that volved, and none of us weresuccessful in get- institutions like the IT Council can play an im- ting others to join in to any significant extent. portant role in AUUG’s future. Ithink this is the reason for the inactivity of In the coming quarter we hope to present a the current board: those who wereenergetic road show with John Terpstra, a one-day sem- ar e bur nt out, and nothing is happening. De- inar in three capital cities on the topic of Sam- spite attempts at the beginning of the financial ba migration. We had also hoped to hold the year,nothing at all has happened in the rela- sixth Australian Open Source Symposium in tionship with the chapters, which appear to be Perth, but as of this report I have heard no in continual decline. confir mation that any significant planning is The one possibility that I saw for getting out under way. of this problem was a merger with Linux Aus- Since the meeting, plans for AOSS have been tralia, which contains a number of enthusiastic finalized. See page 61 for moredetails. and energetic people. Unfortunately, it seems This brings me to my concerns: for the last that cultural differ ences have predominated, thr ee reports, I have documented the lack of and the idea didn’t really get offthe ground. activity which seems to be the order of the So whither AUUG? It appears that our mem- year.AsIwrite this report, at the end of bership continues to decline. Ibelieve that April, the first quarter issue of AUUGN has not next year’s board must address this issue and made it to the membership. It will contain find a solution for it, or we will soon have to nomination forms for the AUUG board elec- shut down. tions, to be submitted by 14 April. This alone would not explain the minimal number of AUUGN Volume 25 Number 3 14 September 2004

In view of the fact that we no longer have an fees. AUUGN editor,Iwould suggest that we: Motion to accept: SFR • Stop publishing AUUGN as a paper docu- Seconded: DP ment, and do an online newsletter instead. Vote: accepted. Instead of including the articles, add just a 5. Business Manager’s report: link. • AUUG 2004 • Make membership free to to qualified indi- viduals, those actively occupied in IT or re- We are close to the final date for the Call lated industries. for Papers. Will then have a better idea of what papers have been received, and how • Make membership free to people who at- many moreincluding topics we will need tend a conference (possibly any confer- to chase. Potential sponsors arebeing ence, or maybe only the annual technical looked at including papers they can confer ence). pr esent. Obviously there’s a lot to discuss here, includ- • Security Symposium ing how we manage to pay for our business manager.Ifear,however,that we have no al- Aprofit of $1,493 was made from this ter native. event. Actual monies banked werehigher, as this takes into account a cost for the (end of report) Business Manager’s time. GL asked AfC for his take on GL’s assertion • Samba Roadshow that the AUUG board is tired and that LA seems moreactive. Registrations arecurr ently being received, although than originally anticipated. • GL suggests we need to do something. at Ther e is interest from Darwin which is cur- some point AUUG will be unable to pay rently under consideration. EC’s salary. Without EC, the organization would be changed beyond recognition. • AOSS • GH suggests GL is being “a little negative” Steve Landers has made a presentation in Perth to the various groups, looking at Ju- • AfC commends GL for his “heads up”. ly. Steve to provide moredetail at the Motion to accept: AfC meeting. Seconded: GH • Memberships Vote: accepted. June renewals will go out in mid May. Still 3. Secretary’s report: receiving December renewals. Not available at time of meeting. • AUUGN 4. Treasur er’s report: Con has resigned as Editor.March edition Acopy of the Treasur er’s report was submitted was late and will be received next week. in a format that can’t easily be printed in AU- • Other UGN. • GH mentioned that AUUG made a loss in These arethe key areas that I have been financial year 2002/3, slightly greater than addr essing recently, in addition to general 2001/2. Expendituredecr eased over that issues, most of which will be discussed un- time. Main reason for the drop in income der the other topics at the meeting. was a decrease in membership. EC states that we need to run moreevents (for • GH states that the last conference per- publicity et al)—smaller events can contribute for med extr emely well financially. significantly. • GH suggests that our cash position is OK 6. GH af firms that two or three events like the for now, but without action, we will have a Security Symposium could turnaround the fi- pr oblem in 12 months. nancial situation. • GL speculates about the financial impact of dr opping AUUG or reducing membership September 2004 15 AUUGN Volume 25 Number 3

7. EC mentions that corporate memberships are Moved: DP dr opping of f—probably perception that it Seconded: AC doesn’t repr esent value for money. Vote: Accepted. 8. AfC expr esses concer n about the John Terpstra • AOSS: roadshow situation - did we establish that • SL talking to SLPWA. ther e was a market beforeproceeding? • Venue probably “Technology Park”. Motion to accept: DP Seconded: AfC • SL has asked SLPWAtobeinvolved in Vote: accepted ter ms of endorsement and publicity, as well as programme committee. • Minutes of previous meeting • Possible timeframe July. Motion to accept: DP Seconded: JC • Elections: Vote: accepted GL noted AfC non-nomination and enquired • Action items: as to the reasons. • see Wiki • Chapters and Chapter Activities: • EC recommends we organise to accept • NSW,VIC, SA active Amex/Diners • TAS, QLD, WA, NT apparently dead. • AUUG2004: • AUUGN: • pr ogramme stuf f • Discussion about dropping paper format • EC talking to sponsors and going purely electronic. • GH • Samba roadshow: • AC mentioned AutoSpeed publication • EC talked about how the event was publi- model cised • need a new editor. • GL related a chat with John Terpstra, • discussion of CDs et al wher e John suggested our mistake was to advertise it the way he suggested. Also that we needed to market it to Windows • Webpages - online services: users. • GL asked for a show of hands on whether • AOSA: we should continue the road show format. • Michael Paddon is the bunny. Publishing General assent. stuf f RSN. • GH suggests the possiblity of doing a secu- rity symposium/roadshow. • Other business: • AfC talked about his concerns related to • GL: relationship with government. roadshows and comparing them with “in- stallfests” (which areappar ently now out of favour with LUGs). Not convinced that • motion to accept financial report from B.E. the market exists for roadshows. Clarke and Associates for year ended June 2003 to be an accurate statement of • JC comments that the only big open source AUUG’s financial per formance in that events (e.g. opportunities for the open financial year.Moved: DP Sec- source community to get together) areLCA ond: JC Vote: accepted. (start of year) and AUUG (end of year), with nothing much in between. • liablity insurance... AfC suggests the pro- Motion to formasubcommittee to investigate posed cover looks good. minor events, to come up with a recommen- dation, reporting by end of June, comprising • Sub-Committee EOL: All sub-committees DP,SLand EC: to be automatically disolved on 30th AUUGN Volume 25 Number 3 16 September 2004

June of each year.DP: Moved, AfC: sec- other people who should be acknowledged. I regret I do not have onded, Vote: accepted time or wisdom to make a list of them all, but maybe someone does, or has. Meeting closed 17:45 (or thereabouts). Anyway, here it is. Feel free to write to us if you want to understand more about how/why has released this code, or you have any other comments that we Liberal license for ancient should hear. UNIX sources Sincerely, Dion L. Johnson II - [email protected] We’ve talked about the following mail message, but Product Manager and one of many open this is the first time most people have seen it in source enthusiasts in Caldera Intl. print. It has been refor matted for AUUGN, but the text is (of course) the original, including a couple Paul Hatch - [email protected] Public Relations Manager at Caldera of typos. You’ll note a number of other AUUG International members mentioned in the list of recipients. And yes, it did contain a typo for Warr en Toomey’s mail address (should be wkt,not wht). Amongst other things, this license allows us (final- ly!) to print the John Lions commentary that starts on page 17.

Date: Wed, 23 Jan 2002 15:03:37 -0800 From: Dion Johnson To: [email protected] Cc: [email protected], [email protected], [email protected], John Terpstra , [email protected], [email protected], [email protected], [email protected], [email protected] Subject: Liberal license for ancient UNIX sources Dear Warren, and friends, I'm happy to let you know that Caldera International has placed the ancient UNIX releases (V1-7 and 32V) under a "BSD-style" license. I've attached a PDF of the license letter hereto. Feel free to propogate it as you see fit. Iapologize that this has taken so long. We do not have a well regulated archive of these ancient releases, so we must depend upon you UNIX enthusiasts, historians, and original authors to help the community of interested parties figure out exactly what is available, where, and how. Many thanks to Warren Toomey, of PUPS, and to Caldera's Bill Broderick, director of licensing services here. Both of these gentlemen were instrumental in making this happen. And thanks to our CEO, Ransom Love, whose vision for Caldera International prescribes cooperation and mutual respect for the open source communities. Of course, there are thousands of September 2004 17 AUUGN Volume 25 Number 3 AUUGN Volume 25 Number 3 18 September 2004

Very soon in our experience with UNIX, it sug- Acommentar y on the Sixth gested itself as an interesting candidate for formal Edition UNIX Operating Sys- study by students, for the following reasons: • it runs on a system which is already available tem, part1 to us; John Lions • it is compact and accessible; • it provides an extensive set of very usable fa- This article is the first in a series of reprints of the infamous “Lions Book”, written by John Lions cilities; ar ound 1977. See the editorial for moredetails. • it is intrinsically interesting, and in fact breaks The copyright notice below is the original. It is new ground in a number of areas. now of historical importance only. The current version is repr oduced with the kind permission of Not least amongst the charms and virtues of the Peter Salus, who has full rights to repr oduce the UNIX Time-sharing System is the compactness of documents. its . The source code for the perma- Since the release of “Ancient UNIX” by Caldera in nently resident “nucleus” of the system when only 2002 (see page 17), the source code in question is asmall number of peripheral devices is repr esent- available under a BSD-style license. The source ed, is comfortably less than 9,000 lines of code. code is not included here, but is available at http://www.tuhs.or g.Itwill be included in an AU- It has often been suggested that 1,000 lines of UGN CD in the near future. code repr esents the practical limit in size for a pr ogram which is to be understood and main- tained by a single individual. Most operating sys- Introduction tems either exceed this limit by one or even two orders of magnitude, or else offer the user a very This booklet has been produced for students at limited set of facilities, i.e. either the details of the University of New South Wales taking courses the system areinaccessible to all but the most de- 6.602B and 6.657G. It is intended as a compan- ter mined, dedicated and long-suffering student, or ion to, and commentary on, the booklet UNIX Op- else the system is rather specialised and of little erating System Source Code, Level Six. intrinsic interest. The UNIX SoftwareSystem was written by K. Ther e seem to be three main approaches to Thompson and D. Ritchie of Bell Laboratories, teaching Operating Systems. First thereisthe Murray Hill, NJ. It has been made available under “general principles”appr oach, wher ein fundamen- alicense from the Wester n Company. tal principles areexpounded, and illustrated by refer ences to various existing systems, (most of This document may contain information covered which happen to be outside the students’ immedi- by one or morelicenses, copyrights and non-dis- ate experience). This is the approach advocated closur e agr eements. Circulation of this document by the COSINE Committee, but in our view, many is restricted to holders of a license for the UNIX students arenot matureorexperienced enough to Softwar e System from Wester n Electric. All other pr ofit fr om it. circulation or repr oduction is prohibited. The second approach is the “building block”ap- ©Copyright 1977 J. Lions pr oach, wher ein the students areenabled to syn- thesize a small scale or “toy” operating system for themselves. While undoubtedly this can be a valu- Preface able exercise, if properly organised, it cannot but fail to encompass the complexity and sophistica- This book is an attempt to explain in detail the tion of real operating systems, and is usually bi- nucleus of one of the most interesting computer ased towards one aspect of operating system de- operating systems to appear in recent years. sign, such as process synchronisation. It is the UNIX Time-sharing System, which runs The third approach is the “case study”appr oach. on the larger models of Digital Equipment Corpo- This is the one originally recommended for the ration’s PDP11 computer system, and was devel- Systems Programming course in “Curriculum ’68”, oped by Ken Thompson and Dennis Ritchie at the report of the ACM Curriculum Committee on Bell Laboratories. It was first announced to the Computer Science, published in the March, 1968 world in the July, 1974 issue of the “Communica- issue of the “Communications of the ACM”. tions of the ACM”. September 2004 19 AUUGN Volume 25 Number 3

Tenyears ago, this approach, which advocates The actual UNIX operating system source code is devoting “most of the course to the study of a sin- recorded in a separate companion volume enti- gle system” was unrealistic because the cost of tled “UNIX Operating System Source Code”, pr oviding adequate student access to a suitable which was first printed in July, 1976. This is a system was simply too high. specially edited selection of code from the Level Six version of UNIX, as received by us in Decem- Tenyears later,the economic picturehas changed ber,1975. significantly, and the costs arenolonger a deci- sive disadvantage if a minicomputer system can During 1976, an initial version of the present be the subject of study. The considerable advan- notes was distributed in roneoed form, and only tages of the approach which undertakes a de- in the latter part of the year werethe facilities of tailed analysis of an existing system arenow at- the “nrof f” text formatting program exploited. The tainable. opportunity has recently been taken to revise and “nr off” the earlier material, to make some revi- In our opinion, it is highly beneficial for students sions and corrections, and to integrate them into to have the opportunity to study a working oper- their present form. ating system in all its aspects. Adecision had to be made quite early regarding Mor eover it is undoubtedly good for students ma- the order of presentation of the source code. The joring in Computer Science, to be confronted at intention was to provide a reasonably logical se- least once in their careers, with the task of read- quence for the student who wanted to learnthe ing and understanding a program of major dimen- whole system. With the benefit of hindsight, a sions. gr eat many improvements in detail arestill possi- In 1976 we adopted UNIX as the subject for case ble, and it is intended that these changes will be study in our courses in Operating Systems at the made in some futureedition. University of New South Wales. These notes were It is our hope that this book will be of interest pr epar ed originally for the assistance of students and value to many students of the UNIX Time- in those courses (6.602B and 6.657G). sharing System. Although not prepar ed primarily The courses run for one semester each. Befor e for use as a refer ence work, some will wish to entering either Course, students arepresumed to use it as such. The indices provided at the end have studied the PDP11 architectur e and assembly should go some of the way towards satisfying the language, and to have had an opportunity to use requir ement for refer ence material at this level. the UNIX operating system during exercises for Since these notes refer to proprietary material ad- earlier courses. minister ed by the Wester n Electric Company, they In general, students seem to find the new courses can only be made available to licensees of the mor e oner ous, but much moresatisfying than the UNIX Time-sharing System and hence areunable pr evious courses based on the “general princi- to be published through moreusual channels. ples” approach of the COSINE Committee. Corr ections, criticism and suggestions for im- Some mention needs to be made regarding the pr ovement of these notes will be very welcome. documentation provided by the authors of the UNIX system. As repr oduced for use on our cam- pus, this comprises two volumes of A4 size paper, Acknowledgements with a total thickness of 3 cm, and a weight of 1250 grams. The preparation of these notes has been encour- Afirst observation is that the whole documenta- aged and supported by many of my colleagues tion is not unreasonably transportable in a stu- and students including David Carrington, Doug dent’s brief case. However it must not be as- Cr ompton, Ian Hayes, David Horsfall, Peter sumed that this amount of documentation, which Ivanov, Ian Johnstone, Chris Maltby, Dave Mil- is written in a fresh, terse, whimsical style, is nec- way, John O’Brien and Greg Rose. essarily inadequate. Pat Mackie and Mary Powter did much of the ini- In fact the second observation (which is only tial typing, and Adele Green has assisted greatly made after considerable experience) is that for in the transfer of the notes to “nrof f” for mat. refer ence purposes, the documentation is remark- David Millis and the Publications Section of the ably comprehensive. However thereisplenty of University of New South Wales have assisted scope for additional tutorial material, one part of gr eatly with the mechanics of publication, and Ian which, it is hoped, is satisfied by these notes. Johnstone and the Australian Graduate School of AUUGN Volume 25 Number 3 20 September 2004

Management provided facilities for the prepara- 1.1 The UNIX Operating System tion of the final draft. The purpose of this document, and its compan- Thr oughout this project, my wife Marianne has ion, the “UNIX Operating System Source Code”, is given me unfailing moral support and much prac- to present in detail that part of the UNIX time- tical support with proof-r eading. sharing system which we choose to call the “UNIX Operating System”, namely the code which Finally Ken Thompson and Dennis Ritchie started is permanently resident in the main memory dur- it all. ing the operation of UNIX. This code has the fol- To all the above, I wish to express my sincere lowing major functions: thanks. • initialisation; The co-operation of the “nrof f” pr ogram must also • pr ocess management; be mentioned. Without it, these notes could never have been produced in this form. However it has • system calls; yielded some of its moreenigmatic secrets so re- • interrupt handling; luctantly, that the author’s gratitude is indeed mixed. Certainly “nr off” itself must provide a fer- • input/output operations; tile field for futurepractitioners of the program • file management. documenter’s art. John Lions 1.2 Utilities Kensington, NSW May, 1977 The remaining part of UNIX (which is much larg- er!) is composed of a set of suitably tailored pro- grams which run as “user programs”, and which, 1Introduction for want of a better term, may be termed “utili- ties”. “UNIX” is the name of a time-sharing system for Under this heading come a number of programs PDP11 computers, written by Ken Thompson and with a very strong symbiotic relationship with the Dennis Ritchie at Bell Laboratories. It was de- operating system such as scribed by them in the July, 1974 issue of the “Communications of the ACM”. • the “shell” (the command language inter- pr eter) UNIX has proved to be effective, efficient and re- liable in operation and was in use at morethan • “/etc/init” (the terminal configuration con- 150 installations by the end of 1976. tr oller) The amount of effort to write UNIX, while not in- and a number of file system management pro- considerable in itself (˜+10 man years up to the grams such as: release of the Level Six system) is insignificant when compared to other systems. (For instance, check du rmdir by 1968, OS/360 was reputed to have consumed chmod mkdir sync mor e then five man millennia and TSS/360, anoth- clri mkfs umount er IBM operating system, morethan one man mil- df mount update lennium.) It should be pointed out that many of the func- Of course thereare systems which areeasier to tions carried out by the above-named programs understand than UNIX but, it may be asserted, ar e regarded as operating system functions in oth- these areinvariably much simpler and moremod- er computer systems, and that this certainly does est in what they attempt to achieve. As far as the contribute significantly to the bulk of these other list of features offer ed to users is concerned, systems as compared with the UNIX Operating UNIX is in the “big league”. In fact it offers many System (in the way we have defined it). featur es which arenotable by their absence from Descriptions of the function and use of the above some of the well-known major systems. pr ograms may be found in the “UNIX Program- mer’s Manual” (UPM), either in Section I (for the commonly used programs) or in Section VIII (for the programs used only by the System Manager). September 2004 21 AUUGN Volume 25 Number 3

1.3 Other Documentation but they arenot particularly relevant to the operating system; These notes make frequent refer ence to the “UNIX Programmer’s Manual” (UPM), occasional Section VIII describes “system maintenance” (soft- refer ence to the “UNIX Documents” booklet, and war e, not hardware!). Thereislots of constant refer ence to the “UNIX Operating System useful information here, especially if you Source Code”. ar e inter ested in how a UNIX installation is managed. All these arerelevant to a complete understanding of the system. In addition, a full study of the as- 1.5 UNIX Documents sembly language routines requir es refer ence to the “PDP11 Processor Handbook”, published by This is a somewhat miscellaneous collection of es- Digital Equipment Corporation. says of varying degrees of relevance: 1.4 UNIX Programmer’sManual • Setting up UNIX really belongs in Section VIII of the UPM (it’s relevant); The UPM is divided into eight major sections, pre- • The UNIX Time-sharing System is an updated ceded by a table of contents and a KWIC (Key version of the original “Communications of the Word In Context) index. The latter is mostly very ACM” paper.Itshould be re-r ead at least useful but is occasionally annoying, as some in- once per month; dexed material does not exist, and some existing material is not indexed. • UNIX for Beginners is useful if your UNIX ex- perience is limited; Within each section of the manual, the material is arranged alphabetically by subject name. The sec- • The tutorials on “C” and the editor,and the tion number is conventionally appended to the refer ence manuals for “C” and the assembler subject name, since some subjects appear in more ar e highly useful unless you arecompletely than one section, e.g. “CHDIR(I)” and expert; “CHDIR(II)”. • The UNIX I/O System pr ovides agood over- Section I contains commands which either are view of many features of the operating system; recognised by the “shell” command in- • UNIX Summary pr ovides acheck list which terpr eter,orare the names of standard will be useful in answering the question what user utility programs; does an operating system do? Section II contains “system calls” which areoper- ating system routines which may be in- voked from a user program to obtain 1.6 UNIX Operating System Source operating system service. A study of the Code operating system will render most of This is an edited version of the operating system these quite familiar; as supplied by Bell Laboratories. Section III contains “subroutines” which areli- The code selection presumes a “model” system brary routines which may be called from consisting of: auser program. Tothe ordinary pro- grammer,the distinctions between Sec- • PDP11/40 processor; tions II and III often appear somewhat • RK05 disk drives; arbitrary. Most of Section III is irrelevant to the operating system; • LP11 line printer; Section IV describes “special files”, which is an- • PC11 paper tape reader/punch; other name for peripheral devices. Some • KL11 terminal interface. of these arerelevant, and some merely inter esting. It depends whereyou are; The principal editorial changes to the source code ar e as follows: Section V describes “File Formats and Conven- tions”. A lot of highly relevant informa- • the order of presentation of files has been tion is tucked away in this section; changed; Sections and VII describe “User Maintained” • the order of material within several files has pr ograms and subroutines. No been changed; UNIXophile will ignorethese sections, AUUGN Volume 25 Number 3 22 September 2004

• to a very limited extent, code has been trans- Section Four deals with files and file systems: their ferr ed between files (with hindsight a lot more cr eation, maintenance, manipulation and of this would have been desirable); destruction; • about 5% of the lines have been shortened in Section Five deals with “character special files”, various ways to less than 66 characters (by which is the UNIX termfor slow speed elimination of blanks, rearrangement of com- peripheral devices which operate out of ments, splitting into two lines, etc.); acommon, character oriented, buffer pool. • anumber of comments consisting of a line of The contents of each section is outlined in more underscor e characters have been introduced, detail in Chapter Four. particularly at the end of procedur es; • the size of each file has been adjusted to an 1.8 Source Code Files exact multiple of 50 lines by padding with Each of the five sections just described consists of blank lines; several source code files. The name of each file The source code has been printed in double col- includes a suffix which identifies its type: umn format with fifty lines per column, giving “.s” denotes a file of assembly language one hundred lines per sheet (or page). Thus there statements; is a convenient relationship between line num- bers and sheet numbers. “.c” denotes a file of executable “C” language statements; Anumber of summaries have been included at the beginning of the Source Code volume: “.h” denotes a file of “C” language statements which is not for separate compilation, • A Table of Contents showing files in order of but for inclusion in other “.c” files when appearance, together with the Procedur es they they arecompiled i.e. the “.h” files con- contain; tain global declarations. • An alphabetical list of procedur es with line numbers; 1.9 Use of these notes • A list of Defined Symbols with their values; These notes, which areintended to supplement the comments already present in the source code, • A Cr oss Refer ence Listing giving the line num- ar e not essential for understanding the UNIX op- bers whereeach symbol is used. (Reserved erating system. It is perfectly possible to proceed words in “C” and a number of commonly used without them, and you should attempt to do so as symbols such as “p” and “u” have been omit- long as you can. ted.) The notes areacrutch, to aid you when the going 1.7 Source Code Selections becomes difficult. If you attempt to read each file or procedur e on your own first, your initial The source code has been divided into five sec- pr ogress is likely to be slower,but your ultimate tions, each devoted primarily to a single major as- pr ogress much faster.Reading other people’s pro- pect of the system. grams is an art which should be learnt and prac- tised because it is useful! The intention, which has been largely achieved, has been to make each section sufficiently self- contained so that it may be studied as a unit and 1.10 A Note on Programming Stan- befor e its successors have been mastered: dards Section One deals with system initialisation, and Youwill find that most of the code in UNIX is of pr ocess management. It also contains all avery high standard. Many sections which initial- the assembly language routines; ly seem complex and obscure, appear in the light of further investigation and reflection, to be per- Section Two deals with interrupts, traps, system fectly obvious and “the only way to fly”. calls and signals (softwareinterrupts); For this reason, the occasional comments in the Section Three deals primarily with disk operations notes on programming style, almost invariably re- for program swapping and basic, block fer to apparent lapses from the usual standard of oriented input/output. It also deals with near perfection. the manipulation of the pool of large buf fers; September 2004 23 AUUGN Volume 25 Number 3

What caused these? Sometimes it appears that the • University of New South Wales original code has been patched expediently. More • University of Sydney than once apparent lapses have proved not to be • University of Technology, Sydney such: the “bad” code has been found in fact to in- • Workcover Queensland corporate some subtle featurewhich was not at all apparent initially. And some allowance is cer- tainly needed for occasional human weakness. But on the whole you will find that the authors of UNIX, Ken Thompson and Dennis Ritchie, have cr eated aprogram of great strength, integrity and ef fectiveness, which you should admireand seek to emulate.

AUUG Corporate Members As of 1 June 2004 • Apple Computer Australia Pty Ltd • Australian Bureau of Statistics • Australian Taxation Office • BAE Systems • Cape Grim B.A.P.S • Corinthian Industries (Holdings) Pty Ltd • Cray Australia • CSIRO Manufacturing Science and Technology • Curtin University of Technology • Cybersource • Deakin University • Department of Land & Water Conservation • Department of Lands • Everything Linux & Linux Help • EWA-Australia Pty Ltd • IBM • IBM Linux Technology Centre • IP Australia • KAZ Technology Services • LPINSW • Macquarie University • Multibase WebAustralis Pty Limited • NSW Department of Commerce • Peter Harding & Associates Pty. Ltd. • Powerhouse Museum • Squiz Pty Ltd • Sydney Water Corporation • Tellurian Pty. Ltd. • The University of Wester n Australia • Thiess Pty Ltd • TMD Computing • University of NSW department of Computer Science & Engineering • UNiTAB Limited • University of New England AUUGN Volume 25 Number 3 24 September 2004

Mana ging Debian

Mar tin Michlmayr Debian is one of the most unique pr ojects in existence today. Not only is it one of the largest and most successful projects, it is also unique in its stance towards the philosophy of Fr ee Softwar e. The project has defined the De- bian Free SoftwareGuidelines1 which have later been adopted as the foundation of the Open Source Definition.2 Further more, Debian has a So- 3 cial Contract in which the project lists its priori- Debian GNU/Linux is the most comprehensive ties and its promises explicitly. The document Linux distribution available to date. It has over consists of five points: 10,000 packages and is available for 11 architec- 4 1. Debian Will Remain 100% Free Software: the tur es. Debian is created by a large number of pr oject pr omises that the Debian GNU/Linux volunteers who aredistributed all over the world distribution will always be free according to (see above, or in moredetail the Debian Free SoftwareGuidelines. http://www.debian.or g/devel/developers.map.jpeg). In total, thereare over 800 official Debian devel- 2. We Will Give Back to the Free SoftwareCom- opers and morethan 200 other contributors. An munity: softwar e written for Debian will be inter esting question is how Debian actually fr ee and made available to the whole commu- works. How can so many volunteers, distributed nity. Furthermor e, bug fixes and enhance- all over the world, work together effectively and ments for existing softwarewill be given back pr oduce adistribution with such a high degree of to the author of that software. complexity? One important factor which helps to 3. We Won’t Hide Problems: the project maintains keep Debian together and work smoothly is cer- an open Bug Tracking System (BTS) in which tainly the project’s organizational structureand its infor mation about all known bugs can be infrastructur e. Debian has existed for almost 10 found. years and, over the time, the project has estab- lished a solid infrastructurewhich works very 4. Our Priorities areOur Users and Free Software: well. In the following, the organizational struc- we will be guided by the needs of our users tur e and infrastructurewhich makes Debian work and the Free Softwarecommunity. will be introduced. It will also be investigated 5. Pr ograms That Don’t Meet Our Free-Softwar e who carries out coordination and management Standar ds: softwar e which is not free accord- tasks in the project and how this is done. ing to the Debian Free SoftwareGuidelines might still be needed by our users. While such softwarecannot become a part of the The Officer s Debian distribution, thereare contrib and non-free ar eas on our FTP servers for soft- In general, Debian has a very flat hierarchy. With war e which is free but depends on non-free some exceptions, all official Debian developers softwar e and for non-free softwareitself, re- have the same rights. This is one of the reasons spectively. why Debian has a very thorough application pr ocess. Once an application is accepted, they can upload packages to the main archive of De- bian. Those packages areinstalled on an individ- ual’s computer as root and therefor e packages can maliciously or accidently cause great damage. Hence, the New Maintainer process,5 which ad- mits new Debian developers, checks the identity, philosophy (with regards to Free Softwareand the

1. http://www.debian.org/social_contract##guidelines 4. Debian GNU/Linux 3.0 (woody) has been released for alpha, arm, hppa, i386, ia64, m68k, mips, mipsel, powerpc, s390 and 2. http://www.opensource.org/docs/definition.php sparc. Other ports are in development. 3. http://www.debian.org/social_contract 5. http://nm.debian.org/ September 2004 25 AUUGN Volume 25 Number 3

Social Contract) and technical skills of an appli- • Make any decision which requir es urgent ac- cant. The gr eat exception to the flat hierarchy are tion Debian’s officers who have a special status as de- • Make any decision for whom nobody else has fined in Debian’s constitution.1 As the Debian responsibility. pr oject gr ew, it became apparent that thereneed- ed to be a set of semi-formal rules to help in con- • Together with SPI, make decisions affecting flict resolution, and as a result the constitution pr operty held in trust for purposes related to was written. The Debian constitution describes Debian: the Project Leader may make deci- the organizational structurefor formal decision sions about how money owned by Debian is making in the Project. The constitution delineates to be used. who makes decisions, and what powers areat- The current Project Leader is Martin Michlmayr. tached to each such decision making individual or body. The of ficers listed in the constitution con- The Project Secretar y sist of the Debian Project Leader (DPL), the Pr oject Secr etary and the Technical Committee. Unlike other delegates, who areappointed by the Pr oject Leader,the next Project Secretary is ap- The Project Leader pointed by the Project Leader and the current Pr oject Secr etary. In case the current secretary The Debian Project Leader (DPL) is the official and the project leader disagree, they must ask the repr esentative of the Debian Project. He or she board of Softwareinthe Public Interest (SPI)2 to has two main functions, one internal and one ex- appoint a Secretary. ter nal. In the external function, he repr esents the Debian Project to others. This involves giving • Conducting votes: The most visible task per- talks and presentations about Debian and attend- for med by the secretary is conducting votes ing trade shows, as well as building good rela- for the project -- notably the Project Leader tionships with other organizations and companies. elections, but also any other votes that arerun Inter nally, the Project Leader manages the project (General Resolutions, for example). Running and defines its vision. He should talk to other avote also entails determining the number Debian developers, especially to the delegates, to and identity of the people eligible to vote, for see how he can assist their work. Amain task of the purpose of calculating quorum. the Project Leader therefor e involves coordination • Standing in for other Officers: The Project Sec- and communication. The Project Leader is cho- retary can stand in for the Leader,together sen in an election in which all Debian Developers with the Chairman of the Technical Commit- ar e eligible to vote. The Project Leader’s termof tee. In this situation, they may jointly make of fice is one year.Nine weeks beforethe leader- decisions if they consider it imperative to do ship post becomes vacant, the Project Secretary so -- but only when absolutely necessary and initiates a new election. During the first three only when consistent with the consensus of weeks, any Debian Developer can become a can- the Developers. If thereisnoProject Secre- didate for this post by nominating themselves. tary or the current Secretary is unavailable and The next three weeks areused for campaigning. has not delegated authority for a decision then Each candidate posts their platforms and every- the decision may be made or delegated by the one can direct questions to one or all candidates. Chair man of the Technical Committee, as Act- The last three weeks consist of the polling period ing Secretary. during which developers may cast their votes. Her e ar e some examples of specific DPL tasks: • Interpr eting the Constitution: The secretary is also responsible for adjudicating any disputes • Appoint Delegates or delegate decisions to the about interpretation of the constitution. Technical Committee: the Project Leader may The current Project Secretary is Manoj Srivastava. define a specific area of responsibility and del- egate it to a Debian developer. The Technical Committee • Lend authority to other Developers: the Project The Technical Committee is the body which Leader may make statements support of sup- makes the final decision on technical disputes in port for points of view or for other members the Debian project. It can consist of up to eight of the project. members and usually has at least four members. The Technical Committee may:

1. http://www.debian.org/devel/constitution 2. SPI is Debian’sleg alorg anization. AUUGN Volume 25 Number 3 26 September 2004

• Decide on any matter of technical policy: This maintainers and buggy packages. If a maintainer includes the contents of the technical policy is found who does not maintain their packages manuals, developers’ refer ence materials, ex- anymor e, the packages aretaken away so other ample packages and the behavior of non-ex- maintainers can take them and take careofthem perimental package building tools. pr operly. Although no one gave the Quality As- surance group the explicit power for this, they • Decide any technical matter whereDevelop- have established authority by doing it. ers’ jurisdictions overlap: In cases whereDe- velopers need to implement compatible tech- FTP Master nical policies or stances (for example, if they disagr ee about the priorities of conflicting The FTP masters areresponsible for Debian’s soft- packages, or about ownership of a command war e archive. They maintain the softwarewhich name, or about which package is responsible drives the archive and perfor m the day-to-day for a bug that both maintainers agree is a bug, work which is needed. This involves processing or about who should be the maintainer for a new packages and removing packages on the re- package) the technical committee may decide quest of the maintainer of the QA group. the matter. Listmaster s • Make a decision when asked to do so: Any person or body may delegate a decision of Debian offers about 150 mailing lists to facilitate their own to the Technical Committee, or seek the communication between developers and advice from it. users. The listmasters make surethat the mailing lists areworking properly and that as few spam • Overrule a Developer (requir es a3:1 majority): as possible reached the mailing lists. They also The Technical Committee may ask a Develop- deal with user questions and requests regarding er to take a particular technical course of ac- the mailing lists. tion even if the Developer does not wish to; this requir es a3:1 majority. Debian Admin The current Chairman of the Technical Committee is Ian Jackson. Debian Admin is responsible for the debian.org machines and hence much of Debian’s infrastruc- tur e. Debian offers a wide variety of ports to Teams many architectur es and has many differ ent ma- chines on which architectur e specific bugs and In addition to the officers whose roles and pow- packaging issues can be tested. Further more, De- ers areexplicitly described in the constitution, bian Admin is responsible for the main infrastruc- several teams have formed naturally. These teams tur e, such as machines running the web, FTP and have clear areas of responsibility, and arealmost mailing list services. exclusively technical in nature. Since very few Debian developers arepaid for their work on De- WebTeam and Translations bian, they tend to do what they most enjoy. The The web team maintains Debian’s extensive web teams (and thereare a number of them) form pages. They ar e inter nally maintained in CVS and simply; when morethan one Debian developer written in WML from which HTML is generated. wishes to work on a given task, and when that’s Ther e is a large number of volunteers who trans- technically feasible, they do. Having demonstrated late the web pages to other languages. both the skill to perfor m agiven task, and the willingness to do so, the teams aretypically well- Secur ity Team staf fed with knowledgeable and enthusiastic par- ticipants. The end result is that it’s rarethat any The Security Team tracks security issues in re- single Debian developer is overburdened, and a leased Debian packages and issues advisories and level of peer review and technical excellence that updated packages. Ther e ar e full members and is widely held with respect. secr etaries. The security secretaries cannot pub- lish advisories on their own, but primarily track Quality Assurance security issues and provide patches and updated packages to full members, who can then issue an The Quality Assurance (QA) team tries to make advisory. sur e that high quality standards areheld up. It maintains packages which temporarily do not have a maintainer.Also, it searches for inactive September 2004 27 AUUGN Volume 25 Number 3

Release Management the archives on the web. Also, all bugs found in Debian packages or featurerequests aresubmit- Release management is a very important task in ted through the Bug Tracking System. In accor- every Free Softwareproject because someone has dance with the 3rd point of the Social Contract, to do the coordination effort needed in order to We Won’t Hide Problems,the BTS is open to any- get new releases out of the door.Inthe past, De- one. If abug is not documented there, we proba- bian had one Release Manager working on this. bly don’t know about it. This infrastructureises- Since recently, he is helped by Release Assistants sential for the way Debian works. The develop- who help making sureDebian is ready to release. ers aredistributed all over the world and hence The decisions about the release aremade solely ef fective means of communication had to be cre- by the Release Manager,however. ated. The mailing lists, the IRC channels, the Bug NewMaintainer Tracking System and recently also the Package Tracking System (PTS) facilitate communication New Maintainer (NM) is the process which admits and coordination. In fact, they do not only allow new Debian developers. The Debian Account communication between developers, but also be- Manager (DAM) is a delegated position who has tween developers and users. Users can follow the the authority to create new accounts. The NM mailing lists and describe their problems with the Fr ont Desk coordinates the overall process and curr ent system, their requir ements and wishes. makes surethat everything works smoothly. Debian’s development model is truly open -- any- They coordinate with the DAM, the applicants one can get involved and make a change, be it by and also with the Application Managers (AM) who reporting bugs, providing good comments or lead applications through this process. patches to known problems. This is also benefi- cial for companies which use Debian. They see Policy exactly in which direction Debian is moving and can also get involved to drive a release forwards. Debian has 10,000 packages created by almost 1000 differ ent people. In order to ensurethat De- The Mailing Lists bian is an integrated system, a set of guidelines has been created which describe to which stan- Ther e ar e about 150 mailing lists, each with a spe- dards a package has to conform. This document, cific topic. Ther e ar e mailing lists whereusers Debian Policy, is maintained by a group of expe- can ask questions, such as debian-user,as rienced developers. Ther e ar e also detailed well as user mailing lists in specific languages. guidelines how the Policy document may be Most mailing lists, however,are mainly aimed for changed. Debian developers or other interested parties to discuss specific technical aspects of Debian. The Legal list debian-devel is the big development dis- cussion list, but thereare many smaller lists dedi- Ther e ar e always important legal issues to discuss cated to a specific topic, such as various porting when distributing softwarecreated by others. mailing lists. Additionally, thereisdebian-dev- The legal team is responsible for making a coher- el-announce which is requir ed for all Debian ent decision about legal questions. For example, developers since important announcements re- they arethe first contact when the question arises garding the development of Debian aremade if a particular license can be regarded as Free ther e. The lists debian-announce and de- Softwar e. bian-security-announce ar e for general and security announcements, respectively, and area must for every user of Debian. Also, debian- Infrastr ucture news is a good way to stay up-to-date what is happened around Debian. Acomplete index of One of the most important factors which holds mailing lists can be found on the web1—everyone Debian together is the project’s solid infrastruc- who is interested in Debian or specific aspects of tur e. Most coordination and communication is Debian’s development can subscribe to the lists of carried out through public mailing lists, IRC chan- their choice. nels and the Bug Tracking System (BTS). One as- pect of Debian’s development model is that it is open for anyone. All mailing lists (with the ex- ception of debian-private wher e sensitive or confidential issues aresometimes discussed) are open and everyone can subscribe to them or read 1. http://lists.debian.org/ AUUGN Volume 25 Number 3 28 September 2004

IRC tional structureisgenerated implicitly over time when someone starts working on a job by them- IRC (Internet Relay Chat) is a real-time chat sys- selves. Since all Debian developers arevolun- tem with differ ent channels dedicated to specific teers to Debian, nobody is paid for a specific task. topics. Thereare various Debian related channels Instead, everyone does what they like to do. on ir c.debian.org,the biggest being channel Once someone has perfor med aspecific job for and there are other channels more some time and do a good job, other developers specifically aimed for developers. will recognize this and acknowledge their authori- Bug Tracking System ty. The best advice for people who areinter ested in helping with Debian’s development is therefor e The Bug Tracking System1 is an important founda- to simply get involved, and perfor m good work tion in Debian’s development. Using tools like which is needed. Do not wait until someone as- reportbug,users can easily submit bug reports signs you a specific task, but find an area which and featurerequests. The maintainer of the pack- needs help and get involved. age automatically receives all bug reports and can then follow-up and ask for moreinfor mation or immediately fix the bugs. When a developer up- loads a new package to the unstable archive of Debian, they can automatically close bugs with the upload -- that way, users areinfor med that their bugs have been solved in that specific up- load. PackageTracking System The Package Tracking System (PTS)2 is a great way to see all kinds of information about a specif- ic package at one spot. Dif ferent information is collected by the PTS and displayed on one sum- mary page. Further more, the PTS allows users or developers of a piece of softwarepackaged for Debian to subscribe to all bug reports filed against a specific package. This is a great way to stay informed of what is going on with a package and to help out -- when you know a solution for abug, you can simply respond to the mail and it will be sent to the bug submitter,the maintainer of the package and get archived on the web so everyone has access to the useful information.

Summar y

Ther e ar e many means of coordination in Debian. The infrastructure, consisting of the mailing lists, the IRC channels and the Bug Tracking System among others, areavery solid foundation which enable efficient communication. Further more, ther e ar e various members of the project who are involved with coordination tasks. The constitu- tion defines the roles and power of the Project Leader,the Project Secretary and the Technical Committee. However,ther e ar e many additional teams which have formed to fullfill a specific role. It is very often the case in Debian that organiza-

1. http://bugs.debian.org/ 2. http://packages.qa.debian.org/ September 2004 29 AUUGN Volume 25 Number 3

the management software. There, finally, I found AHacker’sDiar y asetting "DUPLEX ON/OFF", set to OFF.Set that, and it worked. While I was there, discovered at Greg Lehey the same time all the protocols that the printer can handle. Quite a usable little program; it’s re- This article contains the moretechnically interest- ally frustrating that the vendors have to supply it ing parts of my online diary, which you can find at http://www.lemis.com/gr og/diary.html.Ther e is only for one operating system. no reason to believe that it has any specific rela- Things still aren’t complete: for some reason, tionship to the views of other AUUG members. PostScript laser printers have a surprisingly long Anumber of URLs aregiven as relative to the di- timeout on the last data, especially considering rectory in which the diary is kept. Ihaven’t that PostScript tells you when it’s done. On the changed them, because it makes a mess of the for mat to have long, unbreakable URLs in two- final occasion, it took the printer something like 5 column formats. They’reall relative to the URL minutes to give up on the data and print the final http://www.lemis.com/gr og/. page. I’ve found a couple of timeout parameters in the Microsoft-based program, but the help is Tuesday, 6 Apr il 2004 non-existent (“no help found for this item”). It’ll need some moreplaying around. Today my new Brother HL-2700CN colour laser Anumber of people hate opinion surveys, but I printer finally arrived, after a wait of nearly two like them. Ifeel that anybody who’s as opinion- weeks. It had interested me because it came with ated as I am should jump at the opportunity if an optional duplex unit (costing nearly as much somebody is actually interested in hearing these as the printer itself, unfortunately). Installation opinions. As aresult, I’ve signed up on an opin- took its time, particularly because of the terrible ion survey web site, Lightspeed documentation, but the printer itself worked out (http://au.lightspeedpanel.com/). Today I discov- of the box. Isuppose it’s typical of modern er ed amail message asking me to participate in a equipment: it had a network connection, and it survey on food, something that greatly interests suf ficed for me to plug it into the network for it to me. go out and find a DHCP server and configureit- self: When I tried to follow the link, though, I got:

Apr 6 10:56:22 echunga dhcpd: DHCPDISCOVER Checking for scripting capability, and from 00:80:77:48:10:9c via xl0 browser/operating system...... If you are Apr 6 10:56:23 echunga dhcpd: DHCPOFFER on not diverted in the next 10 seconds then 192.109.197.98 to 00:80:77:48:10:9c your browser is not able to support this (BRN_48109C) via xl0 survey - this may be because you have Apr 6 10:56:24 echunga dhcpd: if IN A scripting disabled on your browser, your BRN_48109C.lemis.com rrset doesn't exist add browser is very old, you are not using a 43200 IN A BRN_48109C.lemis.com Windows operating system, or your browser is 192.109.197.98: timed out. not Netscape or Microsoft Internet Explorer.

The last appears to be a dynamic DNS request. In other words, this survey is only open to users of Microsoft systems. To besur e, Ichecked the Setting up the printcap entry was correspondingly page I had received (shown refor matted for legi- easy: bility): lp|Brother HL-2700CN networked printer:\ :rm=lp:sd=/var/spool/output/lp:\ n=navigator; lf=/var/log/lpd-errs:mx#0: u=n.userAgent; if((u.indexOf('Win')!=-1 ||u.indexOf('Windows')!=-1) All it needed was a DNS entry for the printer and && parseInt(n.appVersion)>3 &&(n.appName=='Netscape' aqueue directory to make things work. ||((n.appName=='Microsoft Internet Explorer') &&u.indexOf('Opera')==-1))) Installing the duplex unit was a differ ent matter. { Apart from pretty terrible instructions, I was able window.location.href= '../scripts/mrwebpl.dll?start&' + to attach it without too much trouble. After instal- 'panelID=a543&surveyID=18& lation, though, it still printed on one side only. batchNo=4&project=B3qmw' + '&id=a543'; } The documentation said nothing about having to do anything special, and therewas nothing on the No question: this survey is only available to Mi- web site’s FAQ about the problem. Just befor e cr osoft users. How can an operator claim objec- calling technical support, I booted up one of my tivity under those circumstances? I wonder if this laptops with the Microsoft softwarethat Dell doesn’t offend against the Trade Practices Act. forced me to buy with the laptop, and installed AUUGN Volume 25 Number 3 30 September 2004

--defsym _mknod=mknod --defsym _open=open \ Wednesday, 7 Apr il 2004 --defsym _readlink=readlink --defsym \ _rename=rename --defsym _rmdir=rmdir \ Mor e investigation of my profiling code. It’s inter- --defsym _stat=stat --defsym _statfs=statfs \ esting to note that I wrote the code in one day, --defsym _symlink=symlink --defsym \ _sync=sync --defsym _unlink=unlink --defsym \ and minor issues arekeeping me busy. It seems __sys_close=close --defsym __sys_dup=dup \ that the C library has two symbols for each system --defsym __sys_dup2=dup2 --defsym \ __sys_fchdir=fchdir --defsym \ call, for example open and __sys_open.It’s __sys_fchflags=fchflags --defsym \ not clear why, since they’reboth the same ad- __sys_fchmod=fchmod --defsym \ __sys_fchown=fchown --defsym \ dr ess, but it makes things very difficult. Found __sys_fcntl=fcntl --defsym __sys_flock=flock \ out that the loader has a facility for wrapping sys- --defsym __sys_fstat=fstat --defsym \ __sys_fstatfs=fstatfs --defsym \ tem calls: __sys_pipe=pipe --defsym __sys_pread=pread \ --defsym __sys_pwrite=pwrite --defsym \ `--wrap SYMBOL' __sys_read=read --defsym __sys_readv=readv \ Use a wrapper function for SYMBOL. Any --defsym __sys_write=write --defsym \ undefined reference to SYMBOL will be __sys_writev=writev --defsym \ resolved to `__wrap_SYMBOL'. Any undefined __sys_access=access --defsym \ reference to `__real_SYMBOL' will be __sys_chdir=chdir --defsym \ resolved to SYMBOL. This can be used to __sys_chflags=chflags --defsym \ provide a wrapper for a system function. __sys_chmod=chmod --defsym __sys_chown=chown \ The wrapper function should be called --defsym __sys_eaccess=eaccess --defsym \ `__wrap_SYMBOL'. If it wishes to call the __sys_getfsstat=getfsstat --defsym \ system function, it should call __sys_lchflags=lchflags --defsym \ `__real_SYMBOL'. __sys_lchmod=lchmod --defsym \ __sys_lchown=lchown --defsym __sys_link=link \ --defsym __sys_lstat=lstat --defsym \ That looks like being a possibility, but it’ll have to __sys_mkdir=mkdir --defsym __sys_mknod=mknod \ --defsym __sys_open=open --defsym \ wait until tomorrow. __sys_readlink=readlink --defsym \ __sys_rename=rename --defsym \ My printer is now happily printing double-sided __sys_rmdir=rmdir --defsym __sys_stat=stat \ --defsym __sys_statfs=statfs --defsym \ documents—even if they’reparts of differ ent jobs __sys_symlink=symlink --defsym \ fr om dif ferent systems. They don’t seem to have __sys_sync=sync --defsym __sys_unlink=unlink \ thought that one through, and I certainly can’t ar sru libprofile.a libprofile.o find anything in the documentation. Ishould file aproblem report. Ther e should be an easier way, but with this final- ly working, found out some interesting facts. This Thur sday, 8 Apr il 2004 pr ogram handles a plethora of files, but the profil- ing code only treats individual file descriptors, Spent most of the day working on the profiling which get reused all the time. It looks as if I code, and ended up choosing a differ ent way to should track individual files. handle things. Discover ed in passing that the sys- tem defines not two, but thr ee dif ferent symbols Saturday, 10Apr il 2004 for each system call, for example open, _open and __sys_open.Reading the loader documen- Somehow all the TV web sites have conspired to tation pointed to a differ ent option, --defsym, pr oduce no useful TV information today. Ihave a which creates additional symbolic names. Ended cr on job that downloads information from up creating a library by loading a relocatable ob- eBr oadcast (http://www.ebr oadcast.com.au/TV/), ject and then archiving it: for merly Sofcom, but today the page was empty. The front page announced: gcc -O2 -g -Wall -D_FILE_OFFSET_BITS=64 \ “The Australian TV Guide is currently offline dur- -D_LARGEFILE_SOURCE -DDEBUG -I \ /lib_rocksoft_c/ -Wall -c -o profile.o \ ing maintenance. Please check back soon. In the profile.c ld profile.o -o libprofile.o -r \ meantime, take a browse around eBroadcast Aus- --defsym _close=close --defsym _dup=dup \ tralia.” --defsym _dup2=dup2 --defsym _fchdir=fchdir \ --defsym _fchflags=fchflags --defsym \ _fchmod=fchmod --defsym _fchown=fchown \ “Maintenance” sounds to me like “crash”. Ihad --defsym _fcntl=fcntl --defsym _flock=flock \ alr eady found that ABC --defsym _fstat=fstat --defsym \ _fstatfs=fstatfs --defsym _pipe=pipe \ (http://abc.net.au/tv/guide/), who used to have --defsym _pread=pread --defsym \ quite a detailed list, have succumbed to the web _pwrite=pwrite --defsym _read=read --defsym \ _readv=readv --defsym _write=write --defsym \ designer syndrome and have hidden all their in- _writev=writev --defsym _access=access \ for mation behind a maze of twisty little web --defsym _chdir=chdir --defsym \ _chflags=chflags --defsym _chmod=chmod \ pages, all broken. Is this a sign of the times, pos- --defsym _chown=chown --defsym \ sibly derived from the Microsoft GUI paradigm, _eaccess=eaccess --defsym \ _getfsstat=getfsstat --defsym \ wher e showing too much information too easily is _lchflags=lchflags --defsym _lchmod=lchmod \ appar ently fr owned upon? Or do they just want to --defsym _lchown=lchown --defsym _link=link \ --defsym _lstat=lstat --defsym _mkdir=mkdir \ make it difficult for people (possibly including eBr oadcast) to download the information easily? September 2004 31 AUUGN Volume 25 Number 3

That would seem stupid, but then, the commercial • With some further investigation, discovered channels all do the same: badly laid out pages that the configuration file /usr/lo- with minimal information, often combined with cal/etc/cups/cupsd .conf (r eferr ed to in the JavaScript to make it impossible to follow links, man pages as /etc/cups/cupsd.conf )refuses and which open tiny little non-resizeable win- even the local network, so it needed to be dows without scroll bars, so small you can’t read changed first. Not a big deal, except that the bottom. Only SBS has a normal text pro- ther e’s nothing in the documentation to point gramme, albeit with the rather strange option of to it. sending you an SMS just beforethe programme • Finally I was able to configurethe printers begins. with a very ordinary web interface. It didn’t The breakage is unbelievable. Spent some time do anything (apart from overwrite my investigating what it looked like under Microsoft. /etc/printcap)that lpd configuration couldn’t The answer: not as bad, though it was possible to do. completely lose the banner ads in the Seven Java • Trying to print proved that the support pro- popups, even with “Internet Explorer”. But in grams, such as lpr,hadn’t been installed. It’s general, the breakage under Microsoft isn’t as not clear why, but after installing them (in bad, and I’m left wondering which of the /usr/local/bin/ and /usr/local/sbin/,they still br owsers is broken. Based on prior experience, it didn’t work properly. They also left the origi- should be Microsoft, but I haven’t found anything nal lpd spooler files of the same name in obvious that points in either way. /usr/bin/: While on the subject of broken software, dis- # wh lpr cussed on IRC the issues I still have with my ... Dec 18 2002 /usr/bin/lpr Br other HL2700-CN colour laser printer: ... Apr 10 15:02 /usr/local/bin/lpr • The last page takes forever to print. Depending on the sequence of pathnames in • The duplex unit doesn’t understand the con- the PATH variable, this means that you’d get cept of jobs. It’s possible to print two one one or the other. page jobs from differ ent systems and have Round about this time I gave up. Ther e’s no rea- them both on one side of the same sheet of son to believe that CUPS can help me with the is- paper. sues I have, and it’s just too painful. The real dis- Somebody suggested that I should install CUPS. I appointment is that it doesn’t seem to do anything had understood that it would be able to configure much that lpd doesn’t already do. the printer,but this proved to be incorrect. In- As if that wasn’t enough, my Digitrex stalling CUPS is a good way, however,tolose (digitr ex.html)DVD player hung itself up again. faith in the Ports Collection. Ifound: That’s six times in 22 days. I’m still wondering • The port didn’t install the documentation. what the cause is, but one way or the other it’s completely unacceptable. Something will have to • After installing the documentation, which in- happen soon. volved rewriting the Makefile,ittur ns out that ther e is no man page for cups(1) or cups(8) Sunday, 11Apr il 2004 anyway. The closest is cupsd(8),the daemon, all of 35 lines long. Ther e’s nothing in the Daniel O’Connor along today to bring some beer port installation process that tells you whereto and play around with DVDs. Spent some time look. trying to do useful things: in particular,Iwas in- ter ested to find out whether the DVD burner in • After installing the HTML documentation, dis- his Inspiron 8600 could burnone of my DVD+Rs, cover ed that the index.html file refer ence non- since all attempts in the Digitrex had failed. existent files. It seems that it’s intended to be Spent quite some time trying to read in a pre- accessed with a web browser via the daemon recorded DVD, during which Daniel discovered (http://localhost:631/). that his DVD reader had great difficulties with • Moder n web browsers don’t like the syntax one of my pre-r ecorded DVD+RWs, though the http://localhost:631/:they want a ful- Digitr ex did not. Somehow the reliability of opti- ly-qualified name. So I put in the name of the cal media is marginal at best. system, and got an EPERM (per mission de- In the meantime, installed mplayer on a number nied) error. of machines, finally finding one on which it AUUGN Volume 25 Number 3 32 September 2004

would work: it refused point blank on a system • CUPS should be able to turnduplex on or off. without audio hardware. Also discover ed that This seems like a possibility, but since I can’t you can mount a DVD as a normal file system. find anything about it in the documentation, Her e’s aDVD+RWthat I recorded it’s only theoretical.

# mount /cdrom • Debian GNU/Linux should be able to do it bet- # l-R/cdrom/ ter. This too sounds potentially possible, and total 1 ... 2048 Mar 22 08:05 video_rm I’ll try it. But the writer goes on to say Install ... 2048 Mar 22 08:05 video_ts instructions areonthe site,which suggests a /cdrom/video_rm: total 1 similar problem exists there. ... 116736 Mar 22 08:05 video_rm.bup ... 8192 Mar 22 08:05 video_rm.dat • It’s not a bug, it’s a feature. Thereare noman ... 116736 Mar 22 08:05 video_rm.ifo /cdrom/video_ts: pages because there’s HTML documentation. total 8775 This one seems to be based on incomplete ... 14336 Mar 22 08:05 video_ts.bup ... 14336 Mar 22 08:05 video_ts.ifo reading of my rant: first, there ar e man pages, ... 65536 Mar 22 08:05 video_ts.vob and secondly you can’t access the man pages ... 102400 Mar 22 08:05 vts_01_0.bup ... 102400 Mar 22 08:05 vts_01_0.ifo until you have read them. ... 1073676288 Mar 22 08:05 vts_01_1.vob ... 1073676288 Mar 22 08:05 vts_01_2.vob I’m still left with the feeling that CUPS documen- ... 1073676288 Mar 22 08:05 vts_01_3.vob tation is inadequate. ... 1073676288 Mar 22 08:05 vts_01_4.vob ... 305528832 Mar 22 08:05 vts_01_5.vob ... 100352 Mar 22 08:05 vts_02_0.bup Wednesday, 14Apr il 2004 ... 100352 Mar 22 08:05 vts_02_0.ifo ... 1073676288 Mar 22 08:05 vts_02_1.vob ... 1073676288 Mar 22 08:05 vts_02_2.vob Spent a little time this morning following up the ... 1073676288 Mar 22 08:05 vts_02_3.vob claim that Debian installs CUPS better than Free- ... 1073676288 Mar 22 08:05 vts_02_4.vob ... 305528832 Mar 22 08:05 vts_02_5.vob BSD. I was really expecting some improvement, but I didn’t see it. Ifound exactly the same prob- Even stranger is that you can play back the .vob lems that I had had with FreeBSD. It did show files with mplayer,though I haven’t yet under- that my accusations to the FreeBSD port were stood the real implications. Imust spend some partially unjustified, though. time looking at the structures on disk. On the During the ensuing discussion on IRC, discovered one hand the data is thereand can be played, on some other interesting facts. The most important the other hand I’m told it’s encrypted, and the is- is probably that the printer has a complete web sues of region code arewell known. But what’s server installed in it, and that this web server ap- to stop somebody copying these files? I was able pears to supply all the functionality of the mainte- to copy them to disk with no problems. nance program I talked about earlier,somewhat marr ed by the fact that some settings don’t seem Monday, 12Apr il 2004 to show up correctly: although I was able to set a Spent some time catching up on yesterday’s default Internet gateway, I couldn’t get it to dis- events–the Digitrex (digitr ex.html)hung itself up play correctly. Refreshing the display brought the again–and considered alternatives. The fact that home page, and retur ning to the TCP/IP config mplayer works relatively well made me consider page showed a null gateway. Still, it’s a far cry downloading stufffromthe TiVo(http://www.tivo fr om the frustration of setting up serial printers 25 .com/), and found a version of mplayer which years ago. works with the TiVo, but didn’t have the energy In mail, some people on the UNIX heritage soci- to try to work out wherethey had hidden the ety (http://www.tuhs.or g/)wer e talking about John documentation. I think I’m building up to a big Lions’ “Commentary on the Sixth Edition UNIX rant on how bad “Open Source” documentation Operating System”, which had been leaked to the is. alt.folklor e.computers newsgr oup just under ten years ago. Surprisingly, it wasn’t on the net any- Tuesday, 13Apr il 2004 wher e, so dragged out the copy I made at the Got a couple of mail messages from people who time and put it up on this web site thought I was being unfair to CUPS. Maybe (Documentation/Lions/). I must actually get they’r e corr ect, but both seem to have missed the round to reading it some time. point that it’s the documentation that’s the trou- See the first instalment of the commentary in this ble, not the software. Specific issues were: issue of AUUGN, starting on page 17. —Ed. Also did some real work and managed a low- hanging 7% perfor mance impr ovement. September 2004 33 AUUGN Volume 25 Number 3

Thur sday, 15Apr il 2004 Afterwards talking about “Open Source” to Peter Grif fith, chair man of the SA Chapter of ACS. I Heard from a number of people who have had told him that I couldn’t stand Microsoft “Windows pr oblems with their Digitrex DVD recorder.I’m XP“, because it was so difficult to find my way wondering if the things being sold on eBay are ar ound aGUI. He agr eed: he uses Microsoft NT defective or rejects. Had achat with the ACCC 2000 “Server”. After thinking about it, it occurs to about the subject, and they took down a “com- me that that’s exactly the problem: GUIs aresuf fi- plaint”, but it will only make sense if morepeople ciently non-intuitive that you have to learnthem, complain. and once you’ve learnt one, even a small differ- Saturday, 17Apr il 2004 ence is difficult. Mor e mail on the subject of CUPS today. Al- Wednesday, 21Apr il 2004 though the correspondent didn’t agree with my At work, we still haven’t got through our discus- opinion of the CUPS documentation, he did point sions on code structureand documentation. Ex- me to Eric Raymond, who does agree and has changed a grand total of 35 detailed mail mes- written his own account. His reasoning is very sages on the subject, without coming to a com- close to mine. Afew days ago, I wrote: Installing plete agreement. The big issue at stake is: where CUPS is a good way, however,tolose faith in the and how do you document externally visible Ports Collection.Eric writes: It has proved a text- functions? My view is that thereshould be exter- book lesson in why nontechnical people run nal documentation (typified by user guides and scr eaming fr om Unix.Eric had morestamina man pages, though man pages aren’t necessarily than I, and his document is well worth reading. the best example of such documentation), and Sunday, 18Apr il 2004 that the commentary in the source code should be gear ed to the needs of the maintainer.Asare- Spent the morning reading moreofEric Ray- sult, the obvious place to describe how a function mond’s article on CUPS (http://www.catb.or g/ works is directly in front of the definition. For ex- ˜esr/writings/cups-horr or.html). Thereare some ample, from Vinum (http://www.vinumvm.or g/): inter esting parallels: he has written it only recent- /* ly, and one of the printers he was trying to con- *Build up a request structure for writes. nect was a LaserJet 6MP.Onthe other hand, *Return 0 if all subdisks involved in the *request are up, 1 if some subdisks are not ther e ar e dif ferences. Eric also used the web in- *up, and -1 if the request is at least ter face. To judge by the lack of commentary on *partially outside the bounds of the *subdisks. the subject, it appears to have worked out of the */ box. But how? How did he solve the chicken and enum requeststatus build_write_request egg question at the beginning? In general the arti- (struct request *rq) cle goes into moredetail than I would have liked, but he does come up with some good suggestions The others consider that the purpose of this docu- about how to document software. mentation an externally visible function should be documented for the user,and that it should thus Monday, 19Apr il 2004 be in the header files, since that’s the only part of the source that the user should be allowed to see. Another day spent with code analysis and docu- Fr om my viewpoint, this is inconvenient because: mentation. There’s an interesting tradeoffbe- tween basic functions and morecomfortable ones 1. The user shouldn’t be reading the header files built on top: the former aremor e dif ficult to use just because he has them. He should be read- and (assuming a good implementation of the lat- ing the documentation. ter) moreprone to error,but the latter aredif ficult 2. This makes two differ ent rules for whereto to remember because of their sheer quantity. As document a function, depending on whether functionality becomes increasingly complex, hav- they’r e exter nally visible or not. ing such a large number of similar functions be- comes moreofaliability than an advantage. 3. The maintainer doesn’t normally need to read header files unless he’s changing the function Tuesday, 20Apr il 2004 itself, in which case he needs to get it in sync. Up early and into town to a board meeting of the 4. Most pr ogramming tools, such as and IT Council of South Australia, the first one I man- etags,bring you morenaturally to the function aged to attend: last month I arrived 12 hours late. definition rather than to the declaration. Pr esented AUUG, which evoked a certain interest. AUUGN Volume 25 Number 3 34 September 2004

5. Having to look for things in two differ ent son, the kernel didn’t like the DVD drive from places is just plain inconvenient. which it had been loaded, and I had to replace it with a CD-ROM drive. After that, the installation None of this is a show-stopper,ofcourse, but it’s pr oceeded easily enough, considering thereisn’t surprising how difficult it is to come to an agree- any installation program. It does start a live sys- ment about it. Spent some time investigating al- tem from the CD, though, along with an ssh dae- ter natives to etags,and came up with GNU Global mon. ssh wants all kinds of security things, of (http://www.gnu.or g/software/global/global.html), course, and inside my firewalled local network I which looks something like etags on steroids. It thought that I could risk telnet.Not so the drag- installed nicely and works pretty much like etags. onflies, it seems: thereappears to be no telnet in I’ll need to work out which of the additional func- the distribution. tionality it provides is really of use; converting source files into hyperlinked web pages doesn’t Tried adding a normal user,somewhat difficult to seem very useful to me, for example. One thing do with a read-only file system. Ended up giving it doesn’t do is to provide any easy way to get to myself the /tmp/gr og,and with a the function declaration. bit of help from dhcp Iwas able to ssh into the system and do everything from my normal envi- Saturday, 24Apr il 2004 ronment. Installation pr oceeded well enough, I thought, but at the end it didn’t want to boot. Spent some time investigating computer-based TV Mor e to look at tomorrow. systems. It seems that issue 8/2004 of c’t (http://www.heise.de/ct/), which I haven’t received Tuesday, 27Apr il 2004 yet, has a number of articles on the subject, in- cluding a project based on Linux and the Haup- Back to work today, and wanted to get right into pauge WinTV PVR 350 which seems to be the doing some perfor mance testing. Despite arela- curr ent favourite card. Spent some time looking tively minor change, which I expected to cause for sources in Australia, which proved to be very almost no improvement, perfor mance went to hell expensive; in Singaporethey’r e only half the in a handbasket, and eventually panicked the ma- price, so it may well make sense to have one sent chine repeatedly; it looked like something to do her e. It seems that thereare still no FreeBSD with coredumping in a KSE environment. Spent drivers for the card, so therewould be a bit of some time looking at that and decided to install work involved. 4.10 Beta on one machine (zaphod,called dae- mon when it’s running release 4), and to upgrade Also considering film scanners; I have thousands beeble to the latest -CURRENT. of slides and negatives, though I wasn’t able to find the ones that I was really looking for.Most Both took far longer than they should do. I’ve better quality scanners now seem to have facilities done this hundreds of times before; why should it for negative scanning, so it’s really a matter of de- be so difficult every time? People discussing ciding which to buy. Sent out a message to a things like total cost of ownership should be number of mailing lists. Iwonder how they’ll do looking at these issues (not that it seems that with the colour negatives of the 60s, which are commercial vendors aredoing any better,but much moreorange than nowadays. why should we measurethings by them?). By the evening was able to reboot both machines, but it Sunday, 25Apr il 2004 looks like I need Yet Another mer gemaster run. sigh Tidyed up the HiFi cupboard, which was in need of it. In the process managed to crash sat-gw,my I’ve been advertising SPF (http://spf.pobox.com/) downlink box, not once but twice: first I acciden- records in my DNS for some time now, but yester- tally plugged a vacuum cleaner into the UPS, day Yvonne got a reject based on it: which promptly gave up the ghost, and the sec- : host ond time I managed to dislodge a power cable. ipev-mail.saar.de[192.109.53.24] said: 550 That must be what happened to Yvonne when I 5.7.1 ... Please see http://spf.pobox.com/why.html?sender=yvonne was in Singaporelast month. %40lemis.com&ip=192.109.197.80& receiver=ip-comserv.saar.de (in reply to Monday, 26Apr il 2004 MAIL FROM command) In the afternoon, thought it was about time to try Ihad set up my SPF TXT record using the “wiz- out DragonFlyBSD, and downloaded an ISO ard” at http://spf.pobox.com/wizar d.html,which snapshot of the current development version. In- told me: stallation was less than edifying: for whatever rea- September 2004 35 AUUGN Volume 25 Number 3

Thur sday, 29Apr il 2004 Mor e work on upgrading systems today, and fi- nally got things up to date. It seems that the net- working problems weredue to a change in the startup procedur es that didn’t configurethe fire- wall code correctly, so it ended up with only the one rule:

65535 0 0 deny ip from any to any

Ishouldn’t have had firewall code on that box anyway, of course, but it seems that configuration file changes that make such a differ ence should be avoidable. Tried doing an “upgrade” install on daemon to bring it back to 4.9, so that I could restart the real upgrade, but after a successful upgrade it still SIGSEGVed on login,soended up doing a cold On the other hand, the web error page said: install. This is really unacceptable.

Why did SPF reject my mail? Feb 6 2004 Fr iday, 30Apr il 2004 SPF is a standard extension to Internet email which protects people from email Of f to buy some hardware, including a Canon forgery. ip-comserv.saar.de rejected a message claiming to be from 9900F Scanner (http://www.canon.com.au/ [email protected]. ip-comserv.saar.de saw a /pr oducts/home_office/scanners/scanners_low message coming from the IP address 192.109.197.80 which is _medium_volume/canoscan9900f.html), with blackwater.lemis.com; the sender claimed to which I intend to scan in all my old photos. be [email protected]. However, lemis.com has announced using SPF that it does not send After that to visit Peter Cassidy, who has a SPARC- mail out through 192.109.197.80. That is why the mail was rejected. station 5 which he can’t boot. Pr oved to be an invalid ID PROM contents. We wer e able to boot After a lot of investigation, discovered that the fr om the disk, but of course we didn’t know the SPF wizard is at fault. It didn’t catch a non-obvi- root password. What a pain that even single-user ous error that I made: when setting address mode requir es apassword. Noted also that soft- ranges, you should put them in the “IP networks” war e as recent as Solaris 2.5, on the disk, still field (ip4:), not the a: field, which is reserved starts a login with the erase character set to for server names.The wizard didn’t notice that DEL.Considering that the main keyboard doesn’t pr oblem. The correct string should have been generate that character,this is really unbelievable. "v=spf1 mx ptr a:ozlabs.org Took the machine with me; I’ll play around with ip4:192.109.197.0/24".Another indication it for a while, though with only 32 MB of memory that you should not put your trust in “wizards”. it might be better to cannibalize it and make one faster machine with flame.lemis.com,also a Wednesday, 28Apr il 2004 SPARCstation 5 Spent the day trying to get my system upgrades Saturday, 1 May 2004 completed, without success. Once upon a time it was as simple as make world,but nowadays ev- Planned to spend today with my new toy, the ery upgrade is a minefield. The FreeBSD project Canon 9900F Scanner,and so I did. It wasn’t really needs to attend to this issue. It wasn’t quite the way I had intended, though. Ihave helped by a power failureinthe middle of every- gradually given up on programs like SANE thing: I need to get some new UPSes. (which, I contend, contains a typo in the expan- sion: it should read Scanner Access Not Easy). On daemon lo- Gave up on ,which kept SIGSEGVing the one hand, it severely limits the choice of gin zaphod ,and went back to running it as while hardwar e, and on the other hand scanners already beeble Itried to coax back to life: it had decided come bundled with lots of software. Yes, it’s in to retur n EPERM on any network packet. Got Micr osoft eye candy format, but it should be easy some work done, but not as much as I would to use. have liked. AUUGN Volume 25 Number 3 36 September 2004

The truth is a little differ ent. Just installing the softwar e must have taken 100 clicks, including re- Sunday, 2 May 2004 quiring me to accept eight end user license agree- Mor e work scanning slides. The softwareisJust ments, presumably all differ ent. Isuppose they Plain Broken. It has great difficulty recognizing do illegal things like disclaim all notion of “fitness boundaries, and even the online manual is wrong: for purpose”. But I could only see a little of it’s in HTML, and the main file has the intuitive them, and the parts that I saw seemed innocuous name canoscan.htm (sic). In it is stufflike: enough. larger,and a detail that was obviously too techni- cal for the superficial manual to mention) and HTML tidy finds 53 errors in this document, in- start a new program (“scanner driver”, I suppose), cluding proprietary extensions. The real problem, which blocks the previous program until it’s fin- though, is that thereisnodir ectory CanoScan;it’s ished. This driver decides for itself wherethe called canoscan,sonothing worked until I put in boundaries of the images are—with about 70% asymlink. I’m continually appalled by the poor accuracy, meaning that in any one set of 8 slides quality of softwarenowadays. about 2 areincorr ectly framed. I can’t see any The manual did tell me how to get around incor- way in this toy interface to influence this action. rectly recognized negatives, though: turnoff Ihad been warned about the scan speed, but thumbnails, which gives the entirearea. Unfortu- without accurate estimates. Ihaven’t tried timing nately, contrary to the documentation, and proba- it, but my best bet is that each slide takes about 3 bly due to a bug, it also turns offretouching, minutes to scan, about 25 minutes total for 8 which left some very dirty negatives. What a slides (this is at 1600 bpi, which gives resolutions pain. Despite everything, managed to scan in two roughly equivalent to my other photos 36 exposureslide films, which, at an average scan (photos.html). When they’ve finally finished scan- time of 5 minutes per slide, took all day. The first ning, you have to save them—one at a time, with film was taken on the Bay of Bengal multiple mouse clicks for each photo. By default (Photos-19670421.html)onthe trip from Penang it tries to save them in some proprietary format, to Madras, and the second one from Madras to and you have to select JPEG (“JPG”) format every Agra (Photos-19670504.html). time you start the program. It also forgets its numbering scheme when you stop it, so if you Tuesday, 4 May 2004 run the program multiple times, you will end up To anAUUG board meeting in North Sydney, having to storethe files in differ ent dir ectories or wher e we discussed—yet again—the futureof rename each individual image for the subsequent AUUG, taking all day. Lunch at a Thai place scans. At least it remembers resolution parame- which would have been excellent had it not been ters, and I was able to set up Samba to storethe for their emphasis on creamy sauces. At least images directly on a real computer. they had nice presentation, including chilis cut in Got so frustrated that I checked if I could use the shape of a flower (Photos-20040504.html SANE with the device. Fr eeBSD recognized the #Chili-flower-1). Fir ewir e connection, but of course SANE doesn’t In the evening was the AUUG NSW chapter meet- support it. ing, with John Terpstra, who is doing a road show The whole thing reminds me yet again of how over the next couple of weeks. Started offwith bad softwarehas become of late. The “Microsoft an interesting viewpoint on softwaremarketing Mentality” seems to accept softwarethat has bugs economics, using such fashionable terms as “mer- of this nature, as long as it’s “intuitive” (i.e. fol- cantilism” and “feudal”, but I had to leave for the lows the eye-candy conventions). The lack of airport beforehewas done. published standards means that I can’t just go and build a driver that will work properly. This pr ob- Wednesday, 5 May 2004 lem is probably moreimportant than all the issues Today spent some time thinking about storage hi- that people aretrying to legislate about “Open erarchies, and came up with a use for Monkey,a Source”: free softwarecan’t be much good if you B-tr ee storage system I wrote in the early 90s, also have to reverse engineer everything you do. coincidentally the last program of any importance September 2004 37 AUUGN Volume 25 Number 3

that I wrote in C++. I’m still wondering why I ID 6, I couldn’t read from it. Fortunately I had an stopped using C++, but the fact that the language identical one myself, and it worked. After over 20 kept changing certainly has something to do with minutes booting from the CD-ROM, I got the mes- it, as does the fact that it wants you to do things sage: such as memory allocation and exception han- 64Mb of memory is required for Solaris dling its way. 32 Mb was found. Exiting Today was a good example: I could no longer compile code that worked fine 8 years ago. It Took the box apart and confirmed that the memo- seems that the syntax of the friend declaration ry chips looked identical to the SDRAMS of a few has changed, and I spent a lot of time trying to years back, of which by coincidence I had a 128 work out why it was complaining about con- MB chip over. structs like On trying to insert the 128 MB chip, discovered struct sigaction newdisp = {&caught, 0, 0}; ... that the index grooves areoffset by approximate- utility-lib.cc:42: warning: aggregate has a ly a millimetre, presumably for a good reason. partly bracketed initializer Put the box together again and tried to boot NetBSD, somewhat hampered by lack of docu- It looked as if the caught was the culprit, since mentation, in particular the name of the file to struct sigaction is defined as: boot. Tried again with OpenBSD, and was able struct sigaction { to mount the root file system of the existing in- union { stallation (Solaris 2.5, which apparently is able to void (*__sa_handler)(int); void (*__sa_sigaction) get by with less memory. Fixed the /etc/passwd (int, struct __siginfo *, void *); and /etc/shadow files, and was then able to boot }__sigaction_u; /* signal handler */ int sa_flags; /* see signal options below */ and log in to the machine. sigset_t sa_mask; /* signal mask to apply */ }; That didn’t help much: there’s no compiler or anything on the box, and so I couldn’t do very So I changed it to the following, and got the fol- much. I suppose I could try installing the compil- lowing error messages: ers from Solaris 8, but who knows what problems I’d have there. Time for a bigger box, preferably struct sigaction newdisp = {{&caught}, 0, 0}; with multiple processors. . utility-lib.cc:42: warning: aggregate has a partly bracketed initializer Still fighting this brain-dead Canon 9900F Scanner. utility-lib.cc:42: warning: aggregate has a It still only recognizes about 70% of the slides I partly bracketed initializer put into it, and puts ridiculous frames around the ones it doesn’t recognize. This is a real pain to In other words, it was happy with that one, and it use. was complaining about something else. Itried a number of differ ent for ms, but didn’t find out Thur sday, 6 May 2004 what the problem was. Less activity than yesterday, but still got some use- Istill don’t know. If you, gentle reader,know the answer,please let me know. ful work done. Finally worked my way through the C++ code and got it to work, not without run- While doing that, also looked at some of the ning into another problem: pr oblems Iwas having on Monday. Upgraded zaphod—yet again—to the latest FreeBSD-CUR- cc -o fconv fconv.o -g -L. -lmonkey -lm fconv.o:/home/monkey/monkeyfs/fconv.cc:190:\ RENT,and also revived beeble (dual processor undefined reference to\ Celer on machine) as brynhild,a Debian box that `__gxx_personality_v0' ./libmonkey.a(utility-lib.o):/home/monkey/ \ Iset up last July and upgraded the kernel to Lin- monkeyfs/utility-lib.cc:42: undefined \ ux 2.6.5 in the hope that we can get some useful reference to `__gxx_personality_v0' (many repeats) infor mation about the effectiveness of threading *** Error code 1 under Linux. Since that wasn’t keeping me busy either,also This proved to be due to the rather unobvious took a look at the SPARCstation 5 that Peter Cas- fact that I was using the cc driver for the compiler sidy gave me on Friday, and tried to install Solaris instead of the g++ driver.This is a real pain: all 8onit. It pr oved that the CD-ROM drive he gave this code used to work. After changing the link me had the wrong SCSI ID (7, which looks dan- driver,itdid work, but now I need to adapt it to ger ous), but even after setting it to the regulation wher e it needs to go. AUUGN Volume 25 Number 3 38 September 2004

Fr iday, 7 May 2004 Saturday, 8 May 2004 Mor e work on Monkey today, and I’m now at the point whereIcan start modifying code. The big Came into the office this morning to discover that change is from C++ to C, which proved to be less wantadilla had paniced. Inolonger had the dif ficult than I thought, mainly because I got used original kernel tree for this system—it dated back to the idea of not using many C++ extensions fair- to October 2002—so gave it up as a bad idea and ly early on. It’s a pity, though: C++ has a number upgraded to a modern -CURRENT,which worked of features, notably the implicit use of a class in- better than I expected. stance, that would work equally well in C. Apart from that, spent most of the day scanning in Finally got fed up with the Canon 9900F Scanner, old photos and documenting them. Inter estingly, which has a driver that can’t identify wherethe though it takes about 4 minutes to scan a single slides areinthe frame. You’d think that it would photo, I wasn’t idle. Setting up this scanner to be able to do at least that, since it’s apparently recognize the slides is an iterative process: I have written exactly for this scanner.After establishing never yet had it recognize the frames of all 8 that I did, indeed, have the latest version of the slides correctly, though in some cases it just adds driver,called up their support line. Iwould much ablack frame along one or two sides. In other rather have sent an email, but they didn’t give me cases, it gets things completely broken, as the in- that choice. Spoke to Ejaz, who initially had diffi- corr ect frame in the following image shows: culty understanding what the problem was, but Follow the link to get something visible. The fi- who asked me to “uninstall” the driver and re- nal screen shot is in original size, but that’s only boot. OK, this is Microsoft XP,soIdid that, and 1024x768, and the images aremade much smaller was astounded by the fact that the driver wasn’t than that, so it’s very difficult to recognize them. gone after all. Iwish I knew what these Microsoft This image, of the uninterpreted slides, shows ter ms really mean; I’ve given up hoping that they clearly that the softwarehas placed the frame in- might use terms at their face value. corr ectly. The corresponding interpreted Of course, the problem didn’t go away, and so (“thumbnail”) view follows this frame, making it Ejaz first suggested that I retur n the scanner,be- impossible to use. cause it was obviously defective (because the Also spent some time playing around with the driver can’t identify the edges of the slides!). Makefile for building my photo pages, and it now When I suggested that he was misunderstanding cr eates thumbnail images and updates the index the situation, he suggested that I should install file (photos.html). Still, it’s very frustrating to use Adobe PhotoElements, a stripped down version of this scanner. PhotoShop which also came with the scanner, and which I hadn’t installed because it asked for a Sunday, 9 May 2004 serial number.Finally found that and installed it, but of course it didn’t make any differ ence, since Another day spent seemingly only scanning in it called the same driver.The only thing I did get photos, though I spent a couple of hours working to notice is that PhotoElements requir e even more out a Problem Report (Canon-br eakage.html)for mouse-pushing: for every single image Ihave to the Canon 9900F Scanner,inthe process discover- tell it to save in JPEG format and not in its own ing a few moreissues about the natureofthe pr oprietary for mat. Ther e ar e pr efer ences, but pr oblem: it has a box for selecting the kind of such an idea as specifying a preferr ed dir ectory film, but only in raw display mode. Unfortunate- and save format doesn’t seem to be one of them. ly, it ignores the box, and tends to reset it. What acrock. I wonder if anybody else has had prob- Then Ejaz suggested that I should try connecting lems of this nature; Ejaz says no, but that’s to be the scanner to another machine and see if it expected. worked there. I got completely fed up and asked whether,ifthat also didn’t work, he would then Monday, 10May 2004 ask me to try running it in a differ ent state to see if that made any differ ence. It seems that second- Spent most of the day converting my Monkey level support won’t even look at it unless people subset from C++ to C. It’s painful business, and it go through this ridiculous rigmarole. Finally shows that C++ really does have a number of ad- agr eed with him that I’ll document the whole is- vantages over C. If only therewer e away to use sue (amongst other things, hereonthis web site) the clever object semantics without the environ- and send him an email, which he can then for- mental bloat, something like a C+. In particular, ward to their second-level technical support. it’s a real nuisance that there’s no way to incorpo- September 2004 39 AUUGN Volume 25 Number 3

rate a structureinto another structurewithout if (! (M->K.flags & OPENFLAG)) leaving its wrapper behind. In C++, I can write return errno = MONKEY_NOTOPEN; something like this: startreq (M); Monkey_FlushBuffers (M); struct fcb Monkey_cache_dealloc (M); { M->K.flags &= ˜ (OPENFLAG | CORRUPT | DIRTY); /* magic name of function friendly to monkeys */ if (M->K.flags & FCB_CHANGED) friend int Tarzan (Monkey *, int, void *); Monkey_flush_fcb (M, 1); int32 flags; . struct Ks_info: public fcb In C++, the code looked a lot simpler: { . if (! (flags & OPENFLAG)) class Monkey: public Ks_info return errno = MONKEY_NOTOPEN; { startreq (); . FlushBuffers (); cache_dealloc (); flags &= ˜ (OPENFLAG | CORRUPT | DIRTY); After that, within a Monkey class function, I can if (flags & FCB_CHANGED) refer to the fcb flags simply as flags.Bycon- flush_fcb (1); trast, in C I have to write: The examples above and immediately below have had the comments stripped. It’s too painful to try struct fcb { to fit them into the columns of AUUGN. They’r e /* C has no friends */ included in the original web page. int32 flags; . The big changes hereare the implicit pointers struct Ks_info { and the naming of the functions. The question is, . is this a good idea? It’s very likely that the code struct fcb fcb; }; generated by both these fragments would be struct Monkey identical, but the C++ hides a lot of the detail. I { . can’t make up my mind whether it’s better hidden struct Ks_info ksinfo; or not. And yes, I’ve deliberately shortened the pointers and coalesced a structure; for example, To refer to the fields at all, I need an explicit ad- originally I had written Monkey->ksin- ditional argument this to the functions, and I fo.fcb.flags instead of flags,but that need to refer to the same flags field as seemed too much, so now it’s M->K.flags. this->ksinfo.fcb.flags.Ther e’s pr obably no differ ence in what the compiler generates, so In fact, the original was much larger.I’m strip- it’s not a question of efficiency, simply legibility. ping out lots of functionality. Monkey does all sorts of nice things that we don’t need in the cur- In the evening spent some time updating my rent application, including multiple alternate keys, Canon 9900F problem report (Canon-break- compr ession, field descriptions, auditing and user- age.html). Discovered that there is away of defined collation sequences. In fact, the original telling the driver what kind of films areinthe C++ code looks like this: scanner.The problem is, it doesn’t just ignorethe infor mation, it changes it. if (! (flags & OPENFLAG)) return errno = MONKEY_NOTOPEN; startreq (); This is obviously an interesting matter: I’ve been FlushBuffers (); getting a lot of web site hits on the subject. I cache_dealloc (); if (flags & (ICOMPR | DCOMPR)) wonder how many other people have similar ex- free (compbuf); periences but have been fobbed offbythe sup- flags &= ˜ (OPENFLAG | CORRUPT | DIRTY); if (! (flags & ISALTFILE)) port people. { if (altkeys) { Tuesday, 11May 2004 altkeyeof = altfile->eof; altkeysindexlevel = altfile->indexlevels; Mor e work on converting Monkey to C today. It’s } getting faster,but it still takes forever.Bythe if (flags & FCB_CHANGED) flush_fcb (1); evening I had only one source file to go. close (fcbfile); if (fdsize) Ihaven’t made up my mind on how bad it looks free ((char *) fd); if (altkeys) in C. Iend up with lots of things like this: { altfile->Close (); free ((char *) ak); } if (flags & (MY_COLLATION | ASCII_COLLATION)) free ((char *) collation); AUUGN Volume 25 Number 3 40 September 2004

That has nothing to do with C++, of course, but Fr iday, 14May 2004 it’s interesting to strip down a program for once. How many things I have to do! Getting this Mon- Usually you incrementally add things, and you key pr ototype working looks so simple now, don’t see how much bigger it gets all at once. though inevitably it will take longer than it seems. Youdowhen you remove the things again. Unfortunately, didn’t get very far down that road. Playing around with Microsoft, trying to print Follow-ups to yesterday’s meeting took up a sur- fr om “Word”. I had forgotten that Microsoft needs prising amount of time. Still, spent some time go- a“driver” (apparently a definition file) for print- ing through the remaining Monkey code and re- ers, and I had mislaid the CD-ROM that came viewing it. The original Monkey used three files: with the printer,sohad to print to files instead and get FreeBSD to print. • The main file, which had a Microsoft-like con- vention of ending in the characters .KSF,for Setting up networked printers under Microsoft is example Monkey.KSF. really strange, though: a popup told me: “Toset up a printer that is not attached to a print server, • Aseparate file for the alternate key file, struc- use the "Local printer" option”. Ialso found an- turally identical to the main file, but with the other amusing pop-up that asked me: “Always ending replaced by .AKF,for example Mon- trust content from Microsoft Corporation?”. key.AKF. Wednesday, 12May 2004 • An FCB file with basic information about the other two files, including block and record Spent moretime than I would like working on lengths, and key information. It had the base administrative stufftoday. One of the things name of the other files stripped of the end- about my new job is that I’m coming morein ings, i.e. Monkey. contact with the Microsoft world, and I keep get- In particular the FCB file seems to have outlived ting documents in Microsoft “Word” format. For its usefulness. Ideveloped Monkey initially under some reason, possibly related to the last update of Micr osoft MS-DOS, and it’s a hangover from those wantadilla,OpenOf fice decided to crash on me times. The alter nate key file still does have a jus- with a SIGSEGVs, so had to upgrade that. tification, since it contains differ ent records from Jonathon Coombes tells me that it’s possible to the main file, and the block sizes can be differ ent. get it to do things in command-line mode, but I Ithink it’s too hard to storedif ferent block sizes haven’t seen much evidence yet. In any case, in a Monkey file, but if the block size is the same, was obviously too stupid to set up printing on ther e should be no reason why we can’t store OpenOf fice as well, so ran that through my Free- mor e than one tree in a single file. BSD file system as well. Thur sday, 13May 2004 Sunday, 16May 2004 Tried to install the GIMP today. It failed with too In the morning, spent some time thinking about old a version of X, not the first port to do so; it data structures, and came to a breakthr ough in seems that something has changed in the X ren- understanding how Monkey could be the solution dering libraries. Somehow the Ports Collection is to just about every problem. Then continued in trouble; all sorts of dependencies failed to working on the Monkey conversion, and finally compile, and I ended up recompiling the entireX got it to compile. Even had time to spend a bit of distribution several times, without getting past the time rearranging things to better fit the environ- pr oblems. ment in which it will be living. In the afternoon into town for a meeting. We Monday, 17May 2004 spent three hours talking about a number of Continued with the rebuild of my ports; therehas things, including of course the use of Monkey. to be an easier way. Several of them didn’t build, That topic proved to be less successful: without a and I ended up installing the GIMP from a pack- white board, it was difficult to explain the con- age. Spent the entireday running portupgrade, cepts. I think it would have been difficult even unfortunately in interactive mode, and ended up with the white board, and I left with the action having to answer questions about ports I had nev- item to write up Monkey,which I’m going to de- er heard of. When it finally came to upgrade gcc, fer until I have something to show for myself. I IhitˆC and broke things completely: did come up with a couple of interesting sugges- tions, though. September 2004 41 AUUGN Volume 25 Number 3

/usr/local/sbin/portupgrade:35:in `require': \ Hoar e’s Law of Large Problems: No such file to load -- pkgtools (LoadError) from /usr/local/sbin/portupgrade:35 Inside every large problem is a small problem struggling to get out. Iwonder how to recover from that one. Still a number of global changes happening, in Tuesday, 18May 2004 particular to the cache layer,which will probably requir e further attention. It proves to be interest- Finally got round to starting on my userland test ing to put the entiresource for Monkey (5 files) tool. Made relatively good progr ess in setting up into a single file for editing. When it’s moreor aframework, incorporating a command language less in the shape I want, and I actually get round parser that I had originally used in Vinum,and to testing it, I can take it apart again. which I had used in other programs too. The pr oblem was that the keywords appear in differ- Thur sday, 20May 2004 ent places in differ ent guises, and getting them in One of the first things I do every morning is to sync was a pain. Solved that with a little shell check my beer stocks, and when brewing also the script which generates the necessary bits and temperatur e and fermentation rates of the beer. pieces, and by evening I had the framework set For that I use br ewmaster.lemis.com,anancient up and compiling and “running” cleanly. All I Dell laptop prototype that I keep in the kitchen need now is for it to do something. and connect to the network via wireless. It runs Sent another message to Ejaz about the Canon OpenBSD, mainly because that was the first sys- scanner problems (Canon-br eakage.html), and tem that would understand its PCMCIA bus. The asking for immediate action. This did bring some files areall stored on wantadilla and accessed via reaction: a reply from Ejaz, stating that he had re- NFS. Today, the network hung, and I couldn’t get ceived my message, but not addressing the other the interface back up again. Checked with fir efly, issues (isn’t that so often the way when people Yana (/yana/)’s machine, which was connected to answer the wrong way round?), and a call from the same access point, and that worked fine. Re- Mitchell in Sydney, who told me that he had been booting br ewmaster didn’t help, nor did changing able to repr oduce the problem, that he had esca- the wireless card. Finally I rebooted the access lated it to Japan, and that he hoped for a re- point, and things came back to life. It seems that sponse within a week. Inter estingly, he drew a the AP only failed partially. lot of attention to the fact that he had tried it on The AP runs Linux (diary-sep2003.html#8), as do two differ ent computers with two differ ent mother two other machines in its immediate physical boards (both presumably Microsoft-based) and al- pr oximity: tivo.lemis.com,aTiVo,and sat-gw,a so on an Apple. Maybe they do have a lingering Red Hat box which runs my satellite downlink. I suspicion that it could be a problem with the don’t know what it is about them, but they’re computer hardware. thr ee of the biggest problem machines I have. Also managed to get my ports sorted out, sort of. Had intended to continue with my new program Whatever breakage I did with portupgrade yester- today, but realized that the cache abstraction was day seems to be unrecoverable, and I ended up still far too closely coupled with Monkey data building packages on adelaide and installing structur es, and spent the day tidying that up as them on wantadilla.Ther e must be an easier well. It looks a lot cleaner now, but I’m still left way: one would seem to be to start from scratch with the conviction that it’s too primitive. On the with the ports when installing a new system, and other hand, the kernel already provides buffer only installing the top-level ports (i.e. the ones cache, so we’renot looking for absolute perfor- you explicitly install in the first place), as opposed mance here; as long as the cache search times to all the myriad support ports. Ther e should be don’t distort the relationships, thereshould be no away to note which arewhich; I’ll do some pr oblem. thinking. Wednesday, 19May 2004 Fr iday, 21May 2004 Continued working on my program today, spend- Continued with the coding today, and made fair ing most of the time looking at how to modernize pr ogress. The original Monkey has now shrunk to Monkey.Itwas based on a 30 year old product. about 10% of its initial size, reminding me of the It was good, but looking at things from a modern quotation: standpoint makes it look a little old-fashioned in some areas. Spent all day redesigning and reim- plementing the data and index block structures. AUUGN Volume 25 Number 3 42 September 2004

Monday, 24May 2004 Fr iday, 28May 2004 On with the work on my program today, and Mor e work on the functions I had created yester- spent moretime tweaking the cache implementa- day, and got them working quite nicely—I tion. I must resist fixing things that don’t make thought. Then decided that it would be a good much differ ence; the important thing is to get the test of the system to have detailed list functionali- thing running (or at least stumbling) at all. Made ty. It tur ned out I was correct: it was a good test, reasonable progr ess nevertheless, and got as far and the program failed. Spent the rest of the day as starting to test the initial functionality. It cur- investigating the block structure, which I suspect I rently looks like I overwrite something malloced br oke during the code changes of the last couple almost beforeIstart. Maybe it’s time to investi- of weeks. In the process worked out a number gate Valgrind (http://valgrind.kde.or g/). of useful gdb macr os, so I can now do things like this: Tuesday, 25May 2004 (gdb) pcache Continued work on my initialization code today $22 = { blockcount = 1024, and found that my malloc corruption was non-ex- blocksize = 65536, istent: I had forgotten to initialize a member of alloccount = 19, first = 1021, the superblock, so called malloc() with a 0 Block = 0x8055000, length—and it retur ned apointer 0x800. stats = { reads = 0, Strange, and non-intuitive, but it seems that the writes = 0, standard allows it. updates = 0, flushes = 1, hits = 79, Apart from that, a typical day of debugging, and misses = 18, by the end of the evening had some data struc- blockin = 0, blockout = 0 tur es on disk to show for it. Also created some } gdb macr os to look at the data structures. Pro- } Slot RBN block flags gramming in gdb macr o language used to be like 1021 3 807c000 dirty data block, 5 records pulling teeth. Now it’s a lot better: it’s just annoy- 1019 5 809d000 dirty data block, 5 records 1020 4 808d000 index block, level 1, 1 records ing. 1022 2 806c000 index block, level 1, 1 records (etc) (gdb) block1019 Wednesday, 26May 2004 $15 = (struct Block *) 0x809d000 $16 = { Further work on my project today, and made h={ faster progr ess than intended: I hadn’t planned rbn = 5, nrecs = 5, what to do next, and spent some time doing that. ilevel = 0 ' ' Nothing much else of interest. }, sl = { nextrbn = 4294967295, Thur sday, 27May 2004 prevrbn = 4294967295 }, data = " 04" On with my project today. Ran into what appears } to be a day 1 bug in Monkey:ifarecord exists Block at RBN 0x5, level 0, 5 records: block: 809d000, bptr: 80acffe, offset: 16 with a key shorter than the total key length (i.e. Rec 0, offset 10, length 72, absaddr 0x809d010 the record is short and the key at the end is only Contents: ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ@ÄÄÄÄÄÄÄÄÄÄÄÄ $17 = { partial), it was not possible to insert a record with inode_num = 4, the same initial key but of differ ent length. This mode = 493, nlink = 1, means that if the file contains a record with the uid = 1004, key foo,itwas not possible to create entries fo or gid = 1000, atime = 1085720266, foox.Idon’t understand why I didn’t fix it: there atimensec = 0, was a XXX as a comment at the comparison, and mtime = 0, mtimensec = 0, it was easy enough to fix (if the keys arethe ctime = 1085720266, same for their common length, comparetheir ctimensec = 0, flags = 0, lengths instead). birthtime = 0, birthtimensec = 0, Also ran into some problems I had caused when eof = 0, mutilating Monkey into shape, so didn’t get as far tlib = 0, indexlevels = 0 as I had expected. Mañana. } Rec 1, offset 58, length 72, absaddr 0x809d058 (etc) September 2004 43 AUUGN Volume 25 Number 3

That shows a nice, clean inode; unfortunately, Monday, 31May 2004 what the list function gets to see is complete junk. What a waste of a day! After getting through my Monday. mail and documentation in the morning, got a Saturday, 29May 2004 phone call from Yvonne on a land line, because she couldn’t get through to me on the mobile. In the afternoon turned my attention to a temper- Ther e was a good reason for that: I couldn’t find atur e logger kit that I had bought from Ozitronics it, and in fact I couldn’t recall seeing it after re- kits (http://ozitr onics.com/), and which I had seen tur ning fr om yesterday’s ride. Searched the at Linux.conf.au in January. In the process, real- house, but couldn’t find it, so started preparing ized that I had forgotten a lot of common knowl- for a new SIM card. That’s always moredif ficult edge about electronics components, and that the than expected, of course: the phone is still regis- kit instructions didn’t help. Which is the positive ter ed in the name of Linuxcare, who do not exist pole of an electrolytic capacitor? Which way any moreinAustralia. I’ve tried to transfer it into round does a diode go? Spent some time confirm- my name, but for that I requir e the agreement of ing that my suspicions werecorr ect (the capaci- Linuxcar e: catch 22. Spent some time on the tors I have have a marking next to the negative phone trying to negotiate things, but in the end I lead, which is also shorter; diodes have a bar at was left with the recommendation just to forget the cathode end, the one that is shown as a bar in the account and get a new number.Ican’t termi- the circuit symbol). Didn’t take long to put the nate the account, of course, so that would leave kit together,but connecting up the temperature Telstra out of pocket. What a ridiculous setup. sensors, which look like small transistors, is terri- In the afternoon, offtotown for a meeting of the ble. Therejust don’t seem to be any components IT Council Open Source Committee. We came to that you can use for this sort of thing. Ineed to the conclusion that the best thing we could do find a better solution to this issue, but for the time would be to recommend that people consider being just kludged it by soldering things together, Open Source when shopping for software, but along with some lengths of (German) telephone that our real issue should be Open Standards. wir e, which has the most confusing colour coding With any luck we’ll get a new policy on Open I’ve ever seen: all conductors red, most with var- Standards in the not too distant future. ied-spacing blue stripes. The spacing is such that you can’t tell them apart without stripping at least Tuesday, 1 June 2004 10 cm of the outside insulation, so I ended up us- ing a continuity meter to find the ends. The re- Back to work on my program testing today, and sult works, but looks terrible. noted how difficult it is to get back into the swing of things after a few day’s away. Fixed the prob- Mor e investigation is requir ed befor e Ican really lems I had had on Friday, so now the commands use these things, but at least I’m getting an output ar e functional. That rather caught me by surprise, like this: so now I have to think through what to do next. $ cu -s 2400 -l /dev/cuaa0 Connected. In the evening playing around morewith my tem- RV1.0 2002-01-06 20:37:37 C peratur e contr ol equipment, and got it mainly to 10024.25 30023.50 work. Using parallel ports under FreeBSD is less 40024.68 than obvious: /dev/lpt0 is really only for parallel 10024.25 connected line printers, and other equipment, in- cluding my relay board, should use /dev/ppi0. The first number on each line is the sensor num- The interface is less than obvious: all I/O is per- ber (note from the photo that 2 isn’t connected), for med by ioctl calls. Still, it was relatively triv- and the second is the temperaturein°C. ial to get it to work, and now things seem to be mor e or less complete. Once I sort out the me- Sunday, 30May 2004 chanical issues, I should be ready to control tem- Spent most of the afternoon writing a program to peratur es. contr ol fer mentation temperatur es. ending up with over 1600 lines of code which could actually Wednesday, 2 June 2004 do something, though of course not control tem- Up earlier than intended this morning at 5:45 am: peratur es (yet). Still, things arelooking a lot we had a long-lasting power failure. The impor- mor e obvious now. tant systems have UPSs which can handle short power failures, which arenever morethan 30 sec- onds, but if the power fails for longer than 30 sec- AUUGN Volume 25 Number 3 44 September 2004 onds, it’s likely to be out for 2 hours while ETSA (http://www.etsautilities.com.au/)send out some- Fr iday, 4 June 2004 body to look for the problem and fix it. This fail- In the evening, found the energy to do some ur e carried on for a minute, so I had to find my work on the fermentation temperaturecontr oller, way out in the dark (proving the value of putting and mounted things in the housing of an old torches in well-defined places) and fired up the computer I have, a 486 DX/2, 66 MHz, 16 MB generator.Even so, lost battunga,which was on RAM, running an equally old version of FreeBSD, aUPS. I wonder what happened there. I don’t one of my test kernels at the very beginning of re- think it can be the duration of the outage. lease 5 of FreeBSD: The systems in the Mike Smith Memorial Room $ uname -a [my laboratory; see the web site for an explana- FreeBSD brewer.lemis.com 5.0-CURRENT FreeBSD \ tion] wer e adif ferent matter: the battery of the an- 5.0-CURRENT #1: Tue Dec 12 18:45:30 CST 2000 \ [email protected]:/src/FreeBSD/ \ cient APC UPS I had in therehad failed long ago, 5.0-CURRENT/src/sys/compile/MONORCHID i386 and it doesn’t like the dirty generator power any- way, so I lost all machines. Time for a new UPS. In mid-morning, Dan Shearer showed up with a satellite dish mount that he had brought back fr om Canberra for me after the Security Sympo- sium (diary-feb2004.html#19). While he was ther e, he took a look at filth,the Microsoft-based laptop that I am using for scanning, to find out why it didn’t automatically mount Samba shares, and got that to work. He also managed to navi- gate the minefield of Microsoft printer setup and configur e the colour laser printer as a remote printer.Quite impressive. For some reason, he thought I wouldn’t like it to be known that I have used Microsoft, and promised not to tell anybody about it. Mor e work on my project, but I hadn’t had enough sleep, and I was really too tired to think my way through things. As a result also missed a reception associated with the IT Council of South Australia What a nuisance. Thur sday, 3 June 2004 Continuing work on my program today, and dis- cover ed anumber of omissions and bugs that kept me going all day. They’r e all moreindica- tive of haste than conceptual problems; maybe I It’s connected to the rest of the world by wireless, should slow down a bit. Certainly the pace I’ve which I’m beginning to appreciate moreand been keeping has tired me significantly. mor e for this kind of connection. It’s now cheap- er to install a wireless card than to run cabling. In the evening, morework on the fermentation contr ol, and came to the blindingly obvious solu- The results aremor e functional than pretty. The tion to my connector problems: what I needed first one shows the temperatureprobe assembly. wer e the kind of connectors that areused on just Ther e ar e no mounting holes on the probe board, about every PC to connect the front panel to the so I had to mount it by its 9 pin serial connector. motherboard. Ihad already connected to probe cables to a 25 pin connector.Iwanted it inside the case, so I Ihad plenty of them, so spent some time putting had to connect the flat cable to the serial port on things together.The rest worked nicely with a se- the outside of the case (the grey cable going out rial cable with 25 pin connectors at each end, thr ough another cutout just below the probe which I was able to connect relatively cleanly. board). I need to find some kind of plate that I It’s sad that I have to resort to this sort of solution can use to mount it inside the case. rather than to get standard solutions. September 2004 45 AUUGN Volume 25 Number 3

The image above shows the 12V connection to the relay board. Imounted it from the top of the cabinet, and the 12V input is from the computer power supply. The following one shows the other side of the re- lay board with the mains power connections:

• At the top arethe relay power outputs (white) and the computer power cable (black). The power supply is in at an angle because it was originally designed for a smaller case, and the inter nal cables aretoo short to allow normal mounting. Some time I must buy a proper power supply.

Saturday, 5 June 2004 Somehow today was all spent with temperature The next photo shows a view of the back of the contr ol. Started by installing my new computer- computer.This shows a number of things: contr olled fer mentation temperatur e contr oller in • The lower cable goes from the parallel port the laundry (next photo). Note the position of back inside to the relays. It would be nice to the temperaturesensors: have internal cabling, but I don’t know of any • The external (“room”) sensor is on the side of parallel ports that connect to a header on the the fridge, not an ideal place, especially when board. They’reall connected directly to an Ireplace the power supply, when it’ll be in exter nal connector. the exhaust area. Toberelocated. • Above that is the temperatureprobe cable, as • The internal (“ambient”) temperaturesensor is shown before. bar ely visible in front of the 25 pin connector. • Higher and to the right, the flat band cable It’s fastened to one of the bars of the grille. mentioned previously. • The wort temperaturesensor is taped to the outside of the fermenter.It’s covered with some bubble foil to minimize the effects of the ambient air. AUUGN Volume 25 Number 3 46 September 2004

It looks as if I’ll be able to get better than 0.2° ac- curacy either way. Monday, 7 June 2004 Back to work again today, and made some pr ogress on my program, though not as much as I want. Writing programs is something like making ice cream by hand: when you start stirring, it’s easy, and you make good progr ess, but as things pr ogress, it gets stiffer and stiffer,and it becomes really difficult to stir.I’m at about that stage now: • The fourth sensor is intended for a second fer- every detail I need to change seems to requir e menter.It’s hanging down in front of the going back and changing lots of details. Still, I’ve light. br oken the back of it, I hope, and things might get better from now on. Tuesday, 8 June 2004 My fermentation temperaturecontr ol stuf f has been working really nicely, and it has also gener- ated a fair amount of interest, to judge by the web site hits. Istill have some problems with over- shoot, but I also have some ideas about how to fix it. Thur sday, 10June 2004 Spent most of today investigating the indexing status quo that we had been talking about on Tuesday, and made some progr ess, though after Spent a lot of time fine-tuning the software, which some months still don’t really understand the is- still isn’t ready. I’ll make it available on the web sues. Based on what I find today, though, it when it is, but at the moment it’s not in any good looks as if I’m not the only one. condition to publish. Still, it works well. By the evening I was working on graph plotting soft- My responses to Computerworld (http://www. war e—how Ihate gnuplot—and, with the excep- .computerworld.com.au/index.php/id;51084128;fp;16 tion of the ugly plotting, came up with a most ;fpid;0)have generated some interest. Almost im- gratifying graph: mediately I heard from Detlef Borchers of C’t (http: //www.heise.de/ct/), and today I got men- tioned on a Slashdot article (http://slashdot.or g/ /articles/04/06/09/1046206.shtml?tid=102 &tid=187&tid=88). That always has an effect on the web site hits, and today my SCO pages expe- rienced a hundredfold increase in hits. People September 2004 47 AUUGN Volume 25 Number 3 seemed particularly amused by my suggestion of Monday, 21June 2004 sending 20 tonnes of paper to SCO. Back to work on my program today. for some Monday, 14June 2004 reason, I end up with a SIGSEGV in memmove,a likely enough place—except that the parameters Today looked at the proposed amendments to the passed to it look fine. Spent some time investi- constitution of the IT council of South Australia. gating that one; it could be hiding a very interest- most of which was taken up trying to use Mi- ing and obscurebug. cr osoft “Outlook Express” to read the messages and Microsoft “Word” to print them out. What a Tuesday, 22June 2004 pain this softwareis! It’s not so much that it’s bad On with my work today, and made further as that it’s built on broken concepts, that people pr ogress. My obscur e bug turned out to be diffi- ar e too stupid to learntothink. cult to find but easy to fix: the Monkey record off- Spent a lot of time looking at the beer tempera- sets are16bits, and in the past there’s been no tur e contr ol, though, and made many improve- pr oblem. Now I have increased the block size to ments, some of which seem to have made things 64 kB, and the offsets can grow into the sign bit, worse. On the other hand, I was testing on a causing some interesting data corruption as the very vigorous fermentation, and that won’t have data lands 64 kB from whereitshould be. made things easier.Still didn’t find time to get Changing everything to unsigned solved that gnuplot to interpret times correctly, so what we’re pr oblem. The issue was that the problem showed left with is: up in memmove,which has no stack frame, and so my macros wereshowing the wrong values. Ended up having to dump the top of stack direct- ly on the call instruction, and that showed a nega- tive count being passed. Wednesday, 23June 2004 In the evening to town to an information evening by Solution City (http://www.solutioncity.com.au/ SolutionCity/), including the SA Minster for IT and the Mayor of Adelaide. Heard an interesting talk about the Adelaide delegation (the only delega- tion from all of Australia) at the World Conference on IT in Athens, mainly the same photos as on the web link. It’s interesting to see what the oth- Fr om about 60% into the time, the temperature ers aredoing, but it’s rather a long way from my contr ol gets pretty ragged. Admittedly, it’s not as particular areas of activity. simple as it seems: the first temperaturespike was when I poured in 3 litres (1/8 of the total volume) Thur sday, 24June 2004 of water at about 24°, and the second was when I On with my program today, and made some taped the temperaturesensor to the fermenter pr ogress, at the same time noting that gdb is real- mor e car efully. Imay need to look morecar eful- ly bad at some things. Ihaven’t looked at the ly at how I measurethe surface temperature. new version 6, though I probably should do, but the previous versions have such obvious prob- Tuesday, 15June 2004 lems as being unable to directly specify a line in Into Adelaide for an extraordinary meeting of the file (you need to find a function in the file first IT council of South Australia to discuss the pro- and list that, making that the default file; then you posed changes to the constitution. Looks like can specify a line number). One of the things we’r e going to split into an executive board and a that I found particularly annoying was the lack of less active council with many moremembers. In a“canonical” raw memory dump function such as many ways, the meeting was like the AUUG the kind that hexdump -C does: meetings on similar topics, and after two hours This output is wrapped to fit the format. The we werestill far from agreed. Still, hopefully Gra- original consists of three lines. See the web site ham has enough to go on to bring out a draft for for moredetails. vote in 3 weeks time. AUUGN Volume 25 Number 3 48 September 2004

00000000 2f 2a 20 24 49 64 3a 20 ˜˜˜˜˜˜˜˜´˜˜(˜˜˜˜ 73 75 67 61 72 2e 63 2c |/* $Id: sugar.c,| 00000010 76 20 31 2e 32 20 32 30 Somehow I find programming in gdb macr o lan- 30 33 2f 31 31 2f 31 37 |v 1.2 2003/11/17| guage particularly frustrating, perhaps because the 00000020 20 30 30 3a 34 38 3a 34 language is (gratuitously) differ ent enough from C 73 75 67 61 72 2e 63 2c |/* $Id: sugar.c,| to not be obvious, and thereappears to be no documentation. There’s also some kind of implic- Set to writing one, and was surprisingly success- it typing in the parameters, with the result that I ful: could make changes, test them and confirmthat they work, but after restarting gdb I’d get mes- #Dump memory in "canonical" form. sages like: #dmoffset length #This version starts lines at addr & ˜0xf define dm Rec 0, offset 10, length 14, absaddr set $offset = (int) $arg0 0x81bf010 set $len = (int) $arg1 081bf010: 00 00 00 00 00 00 00 00 while $len > 0 0e 00 00 00 59 06 #Print a line Invalid type combination in ordering printf "%08x: ", $offset comparison. #byte address of start of line (gdb) dm 0x81bf010 14 set $byte = (char *) ($offset & ˜0xf) 081bf010: 00 00 00 00 00 00 00 00 #first byte number to display 0e 00 00 00 59 06 set $sbyte = $offset & 0xf ˜˜˜˜˜˜˜˜˜˜˜˜Y˜ set $ebyte = $sbyte + $len if $ebyte > 16 set $ebyte = 16 Mor e work to be done. I’m pretty close to being end able to read files, though. #And number of bytes to print on this line set $pos = 0 while $pos < 16 Fr iday, 25June 2004 if $pos < $sbyte || $pos >= $ebyte #just leave space Finally bought a new UPS for my laboratory ma- printf " " else chines. The number of power failures recently printf " %02x", *((char *) $byte) & 0xff has been completely unacceptable; we must have end if $pos == 7 had 5 or 6 this month. printf " " end set $pos = $pos + 1 Saturday, 26June 2004 set $byte = $byte + 1 end Rather to confirmthe correctness of my purchase printf " " #Now start again with the character of another UPS, we had a further power failure #representation this morning, which at least gave me a chance to #Start byte number on line set $pos = 0 install the new UPS. Idon’t like taking machines #byte address of start of line down when they’ve been up for a long time, but set $byte = (char *) ($offset & ˜0xf) while $pos < 16 after a power failureIdon’t mind. Still, we’rea if $pos < $sbyte || $pos >= $ebyte long way from the uptimes I had at the beginning #just leave space printf " " of the year; the longest uptime is flame,with only else 180 days. if ((*$byte & 0x7f) < 0x20) printf "˜" Con Zymaris has resigned as editor of AUUGN else printf "%c", *$byte (http://www.auug.or g.au/auugn/), and we haven’t end found a replacement for him. Why do I always set $byte = $byte + 1 end end up holding the baby? In any case, given the set $pos = $pos + 1 work that it caused Con (admittedly using end printf "\n" OpenOf fice), Ihad been putting it off, at least set $len = $len - 16 + ($offset & 0xf) partially with the excuse that people due to hand set $offset = ($offset + 16) & ˜0xf end in their copy hadn’t done so yet. Today I finally end had to admit that the end of June is approaching, and got down to work, converting the whole This enabled me to write other macros that call thing to gr off—not necessarily a recipe for getting the macrofor a raw dump: things done quickly. To mysurprise, by the end of the day I had about 30 relatively well formatted Rec 0, offset 10, length 32, absaddr 0x822f010 pages. There’s still a lot to do, but most of it in- 0822f010: 4d f6 dd b7 eb b3 76 c9 volves getting morecopy from people. Makes me 45 6e 57 d8 55 d8 8c f9 MöÝ·ë³vÉEnWØUؘù wonder what the fuss was with OpenOffice. 0822f020: 00 00 0e 00 00 00 00 00 b4 00 15 28 01 00 00 00 September 2004 49 AUUGN Volume 25 Number 3

Monday, 28June 2004 /etc/fstab,but I hadn’t thought of it in /etc/dump- dates. Somehow hardwarewas the flavour of the day. In the afternoon, received in the mail 9 36 GB SC- Next, tried to fsck /src.The system froze during SI disks donated by Ade Lovett. They’r e ex his phase 2 and wouldn’t even let me into the debug- servers, and they’ve given him some minor prob- ger.Rebooted, repeated, froze again during lems in the past, but they’realmost certainly good phase 2. And a third time, after which I decided enough for things like perfor mance measur ement. to try doing it on a differ ent machine. beeble is Then discovered I had received an almost new (2 about all that’s left, and that turned out to have month old) Dell Inspiron 9100 laptop—that was file system corruption on the FreeBSD 4.10 side. the good news—and that the display had failed. Tried again with FreeBSD 5.2, and had to boot Spent some time on the phone with Dell, who several times beforethe disk was recognized. wer e remarkably efficient, and on IRC discovered When I did, decided that it was flaky enough to that the display failureisappar ently aknown try a partial backup of those directories I knew pr oblem with this model. that I had changed since the last backup (on Sat- urday); the second time round, that worked. To round things off, in the evening echunga died Then set to doing an fsck,which, surprisingly, al- again. I’d alr eady had a problem of this natureat so worked. Iwas also able to read the entire the end of February (diary-feb2004.html#28), but disk: this time it happened while I was there: the scr eens went dead, and the audio CD in the CD- # dd if=/dev/ad6c of=/dev/null bs=128k ROM drive stopped dead, something that almost never happens (once you start it playing, it carries That took almost exactly 40 minutes, or 33 MB/s, on without further activity on the part of the and reported no errors, so I felt relatively safe. CPU). Spent some time trying to revive it, with- out success, and ended up putting the disks into Still, I didn’t trust the disk, and spent some time zaphod.Had the machine up and running in looking at the SCSI disks that I had received yes- about 70 minutes, but then took some time longer terday. The results werediscouraging: I couldn’t to configureX(echunga is the new machine with get any of them to come ready. They’reIBM thr ee displays described in my hardwareconfigu- DDYS (36.7 “GB”) and IC35L036 (36 “GB”) LVD ration page (har dware.html)). Looks like another drives. They wer e all jumpered for auto spin, and dead motherboard, and this one was only nine the host adaptor (a Symbios 875 LVD adaptor) months old. recognized them without any trouble. It just couldn’t “spin them up”. Tried also with an old Tuesday, 29June 2004 DPT host adaptor and an Adaptec 2740 UW,and also tried forcing SE (another jumper on the Up this morning to find that echunga had spent drives), all without success. At least the Adaptec hours doing level 2 dump. At first I thought it reported the problem better.Symbios said “Can- was because of the slower processors (bzip really not verify disk”. Adaptec reported: takes a lot of processor power), but then I noted: CDB: 03 00 00 00 0E 00 70 00 02 00 dump -2uf - / | bzip2 > \ Status: 0 - no host adaptor /dumpa/echunga/2/root.bz2 Target status: 2: Check condition DUMP: Date of this level 2 dump: Mon Jun 28 \ Sense key: 2 - not ready 21:00:00 2004 Sense code: 0 DUMP: Date of last level 0 dump: the epoch Qualifier: 0 (2 disks), 85 (another 2 disks)

Fortunately (in this case), I hadn’t fsckdmymain This shows that the CDB (command descriptor source disk, /sr c,which would have dumped 80 block) was a request sense command (first byte GB and completely overflowed the dump disk. 3), and that it was expecting up to 14 bytes back Looking at /etc/dumpdates,Isaw: (0E,rather less than the drives can probably re- tur n). It seems strange that this should happen /dev/ad0s1a 0 Tue Jun 121:00:02 2004 acr oss the board, but I can’t see anything I’m do- /dev/ad0e 0 Tue Jun 122:37:14 2004 /dev/ad0s1a 2 Sun Jun 27 21:00:00 2004 ing wrong. /dev/ad0e 2 Sun Jun 27 21:04:24 2004 Wednesday, 30June 2004 Ther e was the problem: dump goes by file sys- tems, not by mount points. The ASUS BP6 moth- And another day spent in hardwarehell. During erboard that zaphod used has four IDE con- the morning it became clear that my /sr c disk tr ollers, and the names of the disks had changed drive was seriously sick, and sent Yvonne into to /dev/ad4s1a etc. I had accounted for that in town to pick up some new hardware. In the AUUGN Volume 25 Number 3 50 September 2004

meantime tried to improve my system upgrade pr ocedure, with only moderate success; did man- age to install FreeBSD 5.2.1 on a disk destined to be the new wantadilla,and built a -CURRENT world on it. Yvonne back with a new computer case and a MSI K7N2 Delta motherboard, the same kind as in wantadilla.Ihad bought it because I knew it worked in wantadilla.First, though, I connected up the old motherboard to the new power sup- ply. I couldn’t even power on. By contrast, the power supply in the old case would run even without the motherboard, so it looks as if the motherboard is well and truly dead. Hopefully it hasn’t taken the processor and memory with it. I can’t test the latter,since the new motherboards also take new memory. Ididn’t want to test the for mer,since it’s such a pain to replace processors nowadays. Installing the new motherboard wasn’t as simple as I thought. It proved to be slightly differ ent fr om the other motherboard I had; in particular, the BIOS allowed setting the process FSB speed corr ectly: Ihad had some trouble with that when installing the last one. Decided that it would make moresense to build the kernel on the new box (2500XP+ with 1 GB memory) than on za- phod (in this incarnation dual 466 MHz Celerons with 128 MB memory). Only: I couldn’t boot. It got as far as trying to start init and then hung. After some messing around discovered that the pr oblem didn’t exist with Linux, but it existed with all versions of FreeBSD I tried (mainly -CUR- RENT,5.2.1-RELEASE and 4.10-RELEASE). The first one (really the system disk from beeble, which currently doesn’t have a system to run in) had a kernel debugger,and it showed that the pr ocesses wer e ready to run, but that the USB subsystem was interrupting at about 200,000 times asecond. Reset, disabled USB, and was able to boot. Then Ihad trouble with the network inter- faces, both a 3Com 3C905C and a Realtek 8139. In each case, they, too, interrupted continuously, depending on the system between 78,000 and 80,000 times a second. Disabling the APIC solved that problem. In the meantime spent some time trying to recov- er the /sr c file system onto the new disk I had bought, which involved a number of hangs. This old disk is well and truly past it. Ionly bought them less than two years ago (diary- jul2002.html#23). September 2004 51 AUUGN Volume 25 Number 3

would make perfect sense, to allow the desktop SEQUENT:Asynchronous softwar e, which would manage the information Distr ibuted Data Exchange downloaded from the handheld to participate in an open network, whereusers could exchange Fr amework data based on credentials defined for the other users on the same network. Devraj Mukherjee (Code-named: SEQUENT) which would allow any two applications exchanging data of the same This paper was originally presented at the AUUG 2003 Conference “Open Standards, Open Source, kind, regardless of the device, platformand pro- Open Computing” and is reprinted with the per- gramming language to communicate and ex- mission of the author.See the end of the article change data in a simple and securefashion. It is for important copyright information. also defined that, the data be exchanged via a middle body (a server), which can authenticate users as well as allow asynchronous data ex- The SEQUENT idea change to facilitate differ ent users who fulfill queries at their own convenience. The project code named SEQUENT intends to As the idea matured, it became obvious that the pr oduce asoftwar e framework that would enable framework could provide a connectivity platform applications exchanging data of a similar type, to for many other applications and was thus consid- query and exchange data based on a trust list per er ed for conception as a framework, rather than a user over a computer network asynchronously, featur e in the original application. regardless of the device, platform, and/or pro- gramming language. The idea expressed The framework intends to use an XML based pro- SEQUENT is not about objects or just about ex- tocol for the data exchange and integrate it with changing data between two applications connect- popular authentication mechanisms that arecom- ed to a network. The framework aims to provide monly used in the industry. astructur ed manner for querying data, over dis- tributed data stores across differ ent platfor ms and The framework in this document is hereby re- dif ferent data formats as long as the interest of the ferr ed to by its code name as SEQUENT. applications aresimilar. Or igin of the idea For example, if Company A manufactures a calen- daring product (Let’s call it Product A) on a UNIX While designing a look alike of the Palm Desktop based platformand chooses to use the Berkeley envir onment, which is available for Windows and styled DB format to storethe information. Compa- Macintosh from PalmSource Inc. for Linux, it was ny B however wishes to manufactureacalendar- identified that the only two practical ways, two ing product (Let’s call it Product B) for the Win- handheld users could exchange data was either dows platformand chooses to use a proprietary by participating on an enterprise network (such as data format for storing data. These two products Micr osoft Exchange server,orPalm Enterprise still deal with the same concept: calendaring. SE- Server) or be physically present to transfer the da- QUENT would then act as the bridge between the ta using a physical, infrared, or bluetooth technol- two applications whereusing the client API, it ogy. would allow Product A to encode the query and Unfortunately all of us don’t have the resources to allow Product B to interpret the query. Thus en- participate on an enterprise network, especially abling communication between the two products fr om our personal workstations. Most of us also with the same aim but totally differ ent develop- compr ehend the need of not having to meet ment philosophies. physically to exchange the data. Toexplor e the idea further at most instances, we would like the data exchange to be automatic and not even The need for a common and open bother us; this given that we areable to verify standard that the person is who he says he is. Collaboration is an important featureinmoder n softwar e applications and it is important to be In today’s technically savvy world, desktop com- able to collaborate regardless of platform, and the puters areprobably the best connected, consider- manufactur er of the softwareproduct. It is the ing the cost per time for connectivity. Therefor e it AUUGN Volume 25 Number 3 52 September 2004

kind of application (or the service provided by have support for XML parsing. XML is definitely a the application) that should tie the applications power ful solution to expressing data, because the together. data expressed using XML has rules and every ap- plication irrespective of the programming lan- The reason for success of products like Yahoo guage they arewritten in or the platformthey run Messenger would be, its capability to communi- on can validate the information. cate over computer networks, regardless of the platfor m and the implementation. One can Backgr ound reading of various technologies choose to use the official client if they wereon and/or implementations suggests that many at- the Windows or the Macintosh platformora tempts towards such implementations have been pr oduct like Gaim (Gnome AOL instant messen- made and that the technologies requir ed to make ger). such a data exchange network already exist. If an open source standard is established and im- Protocol design considerations plemented as a part of this project, it will enable applications attempting to exchange similar kind of information to perfor m this operation over a Descr ibed in XML computer network, without any modification to The protocol used by SEQUENT has been de- the design of the product itself. scribed in XML. XML is a widely accepted stan- dard and most programming languages can inter- Conventions used in the document pr et the syntax with great ease. The acceptability Implementation specific details of the framework of XML and the availability of parsing APIs should ar e out of the scope of this article. This article encourage developers to make implementations mer ely outlines in detail the idea of the distrib- for of SEQUENT servers and client in differ ent uted query and data exchange framework. Proto- languages. typing of this framework is likely to be done us- Apart from being a W3C standard, XML has many ing the Java programming language. technical advantages. XML data can be verified for 1.4.1 Requesting application - refers to an applica- integrity, which is an important factor if you are tion that uses the SEQUENT client side API and transferring data across from one information base places requests to query or exchange data. to the other.Asthe data is well described it is eas- ier to translate and encode both on the client and 1.4.2 Data exchange service - refers to a SE- server end. XML data is described using plain text QUENT relay server,which acts as a central point allowing messages in multiple natural languages and keeps track of the the access control lists and to be encoded between tags and MIME allows en- pr ovides services like authentication and asyn- crypting data such as binary files, images to be- chr onous exchange of queries and data. come a part of the XML message.

Application centric Background research The “Application” is the most important design is- sue of SEQUENT.The protocol exchanges data based on the kind of application that is requesting Existence of similar solutions infor mation, or morespecifically the kind of data The problem obviously is not new; thereare ap- that needs to be exchanged. The platform, lan- plications that do similar things in various capaci- guage, device or transport layer should be trans- ties. The most obvious examples would be collab- par ent to the application attempting to exchange orative tools such as Yahoo Messenger,ICQ and data. the likes. These applications enable users to leave of fline messages making it obvious that they have MIME encoding and XML an asynchronous data exchange network in place. MIME allows encoding of information in Internet Access control lists, referr ed to as “Buddy Lists” messages. Many XML protocols use MIME to en- ar e also saved on the server that allow the users code binary data in the messages, this method is to use any computer around the world and still very well researched and documented and used have their prefer ence of access stored. fairly widely as a standard way of transporting in- XML has received enormous attention and is now for mation over the Internet. called the “ASCII of the web” as it allows such The security (encryption) issues areaddr essed in transpar ent exchange of structured data over the the security section whereitisdescribed how SE- web infrastructure. Most programming languages September 2004 53 AUUGN Volume 25 Number 3

QUENT uses a digital certificate based model to server,itenables securely transferring the secret secur e the communication channel. key over to the server. Once the secret key is obtained, the client and the server can securely communicate by encrypting Fr amework design messages using a symmetric encryption algorithm. The server chooses to expirethe secret key gen- The design of the framework is divided into two erated by a client using a time limit. major parts, the server or the data exchange ser- vice and the client side API (application program- The protocol can thus be summarized with the mers interface). following sequence of pseudo messages. Sce- nario 1: The server does not posses the secret key The data exchange service is responsible for hold- for a client: ing access control lists; verify the authenticity of a user and make the exchange of data or the re- Client -> Server: Hello, I am Client A quest. Server -> Client: Hi, I don't have your The client side API provides a transparent frame- secret key. Here is my {public key}, why work that allows applications to easily integrate don't you send me your featur es pr ovided by the SEQUENT network. secret key Client -> Server: Here it is {secret-key} The theoryofdata exchange Server -> Client: Thanks, I got it. Bye. SEQUENT exchanges information using a distrib- Scenario 2: The server posses the secret key for a uted network, by encoding the data using a XML client data protocol. The data exchange framework ad- dr esses all possible exchange issues; including se- Client -> Server: Hello, I am Client A Server -> Client: Hi Client A, I already curity, authentication, id stamping and the data have a secret key for exchange process itself. you and you can use that to communicate Esta blishing a securecommunication channel with me. Bye. The primary step of communication between two This mechanism only manages to securethe com- computers is establishing a securecommunication munication channel between the server and the channel between the two parties. Servers usually client, issues related to authentication and user wait for the client to initiate the connection. SE- trust lists is addressed later in this document. QUENT requir es the client to establish a secure communication channel with the server beforeit Authentication starts sending information over the port. This is to ensur e that the data encrypted using XML is se- The framework looks forward to integrating with cur ely transported over this channel, as most of industry standard networking authentication mod- the information is very sensitive, at least to the els, such as Kerberos, NT challenge response, person who is releasing the information. LDAP based authentication models. SEQUENT chooses to use a digital envelope mod- For moresimplistic models the framework is built el (RSA Data securities, 2003) for securing a trans- in with a simple username and password based port channel between the server and the client. authentication model. The user access list is main- When a client initially contacts the server to com- tained by the SEQUENT server and is basically a municate, the server checks to see if it posses a list of encrypted usernames and passwords. secr et key for the client. Ther e is a fair chance that SEQUENT network If the server does not posses a secret key for the users on a particular server might not necessarily requesting client, the server makes it’s public key be users of the server system or be a part of any available to the client. The client then generates a other authentication list that the server is linked secr et key using a previously agreed (agreed by to. the developers of the framework) encryption al- The client chooses to request an authentication gorithm for its session with the server.Itthen en- mode and the server responds to it if it has the crypts a message containing the generated secret capability to. If an authentication module is not key and information about the client itself with implemented on the server then the client may the server’s public key using an asymmetric en- choose to try another method of authentication cryption algorithm and sends it back to the server. method. If all else fails the default Username and As this message can only be decrypted by the AUUGN Volume 25 Number 3 54 September 2004

Password based authentication will always be WriteWithDiscretion FullAccessWithDiscretion available for user verification. Asample authentication request using a username If “User A” does not have permissions to access and password would look like an XML based re- “User B’s” database at all then the query initiated quest such as by “User A” is never forwarded to “User B”, sav- ing network traffic and time on “User B’s” work- All permissions that requir e discr etion of the re- Administrator TheMagicWord sponding party will wait for the user to authorize the response if the information base residing on that workstation or device can fulfill the query. These permissions arevery useful if the users User trust lists want to provide access to delete or write data in For all examples quoted in this section we will their information bases, especially when dealing consider “User A” to be the requesting party and with data such as “Address Books”. “User B” and “User C” to be the receiving parties of the query. ID stamping queries on the server In a SEQUENT enabled network, every user main- Each workstation trusts the server blindly. Infor- tains a trust list. A trust list for “User A” can be de- mation received from the server is accepted to be fined as a list of access permissions for other valid. By doing so the client becomes indepen- users on the a SEQUENT server to the information dent of many tasks, thus making the client side base (data on “User A’s” local computer/device) implementation simpler.The client also does not maintained by “User A”. receive any request that the client would reject on receipt due to permissions defined in the access ASEQUENT server uses these trust lists to evalu- contr ol list. Tothe client unless it really wanted to ate if a request sent by a user should be forward- know which user initiated the request, the request ed to the other users. If the user initiating the re- was initiated by the server and the response is to quest does not have sufficient credentials to query be sent back to the server.Itisthen to the server another users information base, then the server to figureout who initially initiated the request and dr ops the requests thereitself. to sent it back to the initiator. Asample trust list expressed in pseudo language When a request is initiated, the server knows who would look something like this: initiated the request because the user is logged in. Trust list for User A: The server accepts the requests and makes a note as to who initiated the request, stamps the request User B: Application A: Full Access with a Request ID so that it can refer back to the User C: Application A: Query, Write User B: Application B: Query, original information if and when it receives any WriteWithDiscretion response to the query. It then recr eates the query with the vital information requir ed by all the re- SEQUENT identifies that applications really need cipients inclusive of the generated Request ID and to do three things, Query information, Submit in- forwards it to the valid recipients. for mation for addition or request deletion of an The recipients of the request download the entry and thus defines three kinds of permissions queries and if possible respond to it. The re- Query, Write, Full Access (allow Query, Write, sponse to every query quotes the Request ID so and Delete). It is to be kept in mind that all appli- that when the server receives the response it cations referr ed deal with similar kind of data. knows whom it has to be sent back to. The origi- Per missions can be classified into two types, one nal requests to contain the username of the user aper mission that does not requir e any discretion who initiated the request incase the recipient of fr om the user owning the information base that the query wishes to gather moreinfor mation satisfies the request and the other whereuser dis- about the user. cr etion is requir ed for the action to be taken. We can thus summarize permission to the following

Query Write Full Access QueryWithDiscretion September 2004 55 AUUGN Volume 25 Number 3

Initial querysent byauser Mukherjee

RequestFrom="AddressBook" RequestTo="AddressBook" Initiator="samar"> Sending outgoing requests or responses Once authenticated with a SEQUENT server the client can send out the pending requests that ap- First Name Last Name plications have made while the workstation or de- vice was not connected or morespecifically from the last log-on. 02-69258392 Responses to previously received requests areal- Devraj this process. If a particular information base does not have the response to a request it may choose to ignorethe request thus saving network traffic. Sample Request Sent byaclient The request as seen bythe recipients after ID stamping on the server RequestTo="AddressBook" RequestID="001"> samar First Name QueryWithDiscretion Last Name First Name Last Name Match="Exact">02-69258392 Devraj Match="Exact">02-69258392 Devraj Sample Response sent byaclient ResponseTo="AddressBook" Devraj RequestID="001"> Mukherjee Devraj Mukherjee Receiving incoming responses or requests During every communication session with the server,responses to previously sent requests The response from the servertothe initiator along with the new requests initiated by other users on the network arealso downloaded. Once new requests arepassed on to the differ ent exten- sions (discussed in detail later in the document, Client Side API) made using the SEQUENT API, Devraj which fulfills the queries initiated by the request. AUUGN Volume 25 Number 3 56 September 2004

Requests forwarded bythe server loaded by the client and ignored or an action can then be taken based on the error response. application can choose to address the query to samar another application and receive information for QueryWithDiscretion it’s own use. A classic example could be a calen- daring application requesting information from an First Name addr ess book application to link it to an event. Last Name Cr oss application communication defiantly re- quir ed the two applications to be awareofthe 02-69258392 acr oss to make a query complete. Devraj The servereng ine

The server engine, is primarily running two kinds Responses forwarded bythe server of services, a data exchange service that allows the exchange of data requests and responses be- lows user accounts to be verified and mainte- nance of a user access list enabling the verifica- Devraj tion of the right queries being forwarded to the Mukherjee right user. These two services areamust on every SEQUENT server as it creates the heart of every SEQUENT server. Application Type recognition and Cross application queries The client side API As mentioned beforethe kind of application deal- ing with the data is what is important. Application SEQUENT will rely heavily on a standard well-de- Types must be defined in order to be able to fined client side framework that can integrate eas- identify which query gets forwarded to which ap- ily with existing applications. The client API will plication on the client end. Servers need not be implement the SEQUENT protocol in full to en- awar e of the client application types, as it will de- able the implementing applications to communi- pend from client to client. Servers merely act as cate with the server without worrying about the infor mation routers irrespective what the query is data exchange process. and what the response is going to be. The client API will requir e the implementing ap- The client side API (as discussed further in the plication start a thread already defined by the API, document) will provide the infrastructuretode- which will attempt to communicate with the serv- fine extensions of the SEQUENT framework that er after a fixed interval of time if a connection can will act as interaction points for the custom appli- be established to perfor m the data and query ex- cations. These extensions will run as child threads change. to the parent SEQUENT client thread, to reply to queries received by a workstation. Every application that is then written, using the SEQUENT framework must implement some pre- If an Application Type is not recognized by a defined functions, which will act as the bridge be- workstation then the application sends a response tween the main thread to resolve the inbound to the request informing that the kind of applica- queries and the implementing application for gen- tion sending the request is not available on the erating queries. responding client. The server can then choose to ignor e telling the requesting client or choose to The SEQUENT client side API will also implement generate an error message that can then be down- functions that will allow change of prefer ences September 2004 57 AUUGN Volume 25 Number 3

such as password, access control lists and permis- ory space and some may choose not to be part of sions that arestor ed on the server.Itwill also fea- the SEQUENT model, due to natureofthe infor- tur e adefault implementation of a GUI based mation they publish, while others do. contr ol center,allowing the end user to change the information. The application programmer however may choose to write his or her own con- Future tr ol center application that might be moresuited to their application style. Inter servercommunication The communication thread The first obvious extension such as a framework would be being able to communicate across servers. The client side of the first design of the The client side API requir es the application to framework allows keeping track of a list of server start the main thread so that it takes careofthe that one user is allowed to access. It also requir es communication and data exchange while the ap- users to define which query should be floated on plication perfor ms the it’s usual tasks in fore- which network. gr ound. With the growth of such an idea the next obvious This thread handles issues such as authentication integration is inter server communication, where once a connection is established, formulating by a user is able to define permissions across queries based on the information collected from servers. Usernames would then look much like implementing applications and also redistribution email addresses such as devraj4@eternitytechnolo- of the queries using the application specific ex- gies.com and [email protected] tensions once they have been received on the client end. DNS is already in place all across the TCP/IP net- works including the Internet. The server would The main communication thread is invisible to the the have to be featured with a capability of asyn- end user and all the developers using the SE- chr onously exchanging information with each QUENT framework need to know is that they other to formthis worldwide network of distrib- need to start the thread when their application uted data exchange. starts. Application development frame- Application specific extensions work Most applications usually perfor m the same sort The client API defines a set of rules for custom of tasks. The client side extension would then in- applications to allow themselves to blend in with volve production of a client application develop- the SEQUENT framework. Applications that are ment framework that allows development of ap- SEQUENT enabled exists on their own, this is to plications to become simpler. enable existing application to become SEQUENT The framework will address issues like workspace enabled very easily. management, layout management, and connec- The API allows extension (if talked in terms of tions to the database as well as the network. The object oriented programming then super classes) distributed data exchange framework can also be of the SEQUENT system by implementing some extended to produce a thin client application-au- mandatory methods that allows each application thoring framework, which allows defining layouts to integrate into the main client communication of user interfaces using an XML styled language thr ead. These over ridden methods define how an that can send messages using the framework for application responds to a query when a request execution of functionality on a differ ent worksta- or response needs to be formulated. tion. Each custom extension that is a part of the cus- The details of such an implementation is out of tom application but an extension of the frame- the scope of this paper and would totally be de- work runs as a child thread to the main communi- pendent on the existence and strength of a parent cation thread (section 3.4.1) completing the client framework like SEQUENT. side implementation of the framework. Many applications or one application divided into many sub applications can live in the same mem- AUUGN Volume 25 Number 3 58 September 2004

which also cost money to produce and distribute. References In fact, I’d think a new formofAUUGN, perhaps built around a blog, might be a good thing. Then 1. How SSL works? from Netscape— we could just subscribe to the RSS feed and be http://developer.netscape.com/tech/security/ kept up to date. basics/index.html Idolike the inclusion of conference papers in the 2. Key Agr eement fr om RSA data securities— curr ent issue and would hope that might contin- http://www.rsasecurity.com/rsalabs/faq/ ue. 2-2-3.html Cheers, Greg 3. RSA data security on Digital Envelopes— http://www.rsasecurity.com/rsalabs/faq/ 2-2-4.html Fr om: Greg ’grogg y’ Lehe y Date: Wed, 8 Sep 2004 16:38:54 +0930 On Wednesday, 8 September 2004 at 16:56:14 Tr ademarks and Copyr ights +1000, Greg Black wrote: >Well, I’ve read Greg Lehey’s editorial "The All documents that the author makes refer ences to >new face of AUUGN" in the current issue and it have been credited for.All trademarks and copy- >seems worthy of comment. Imust say I’m rights areowned by the respective copyright and >disappointed the decision has been made "to trademark holders. >stop production of the paper version of AUUGN >bythe end of the year." All software, ideas, and concepts manufactured by Devraj Mukherjee and Eternity Technologies is >However,ifthe cost of printing is so high Copyright of Eternity Technologies and may not >and if we really could see a significant be reused without prior written permission of the >reduction in membership fees in retur n for corporation. All softwarepublished as a part of >this move, I’m happy to accept the decision. this project will be published under an Eternity This caused a surprising amount of discussion at Technologies Open Softwarelicense, please refer the AGM. In general, the sentiment expressed to the softwarelicense for further details on distri- was like yours: "pity, but understandable". Ias- bution and usage of the framework. sume that this sentiment is not the only one: a significant number of members didn’t read it, so they had no cause to complain about the deci- Letter s to AUUG sion. But I’d like to remind you about the option of having it printed. If people areinter ested (but This column contains selected messages from the only then), we can do some enquiries about the AUUG-talk mailing lists. To sign up for this cost of such printing. It’s possible that it would mailing list, visit the mailman pages at be comparable to the costs of producing AUUGN. http://www.auug.or g.au/mailman/listinfo/talk. >Idohope that AUUGN will continue -- >preferably on the web rather than in the form Fr om: Greg Black >ofCDs, which also cost money to produce and Date: Wed Sep 816:26:22 2004 >distribute. Subject: [AUUG-Talk]: The futureofAUUGN We’r e curr ently thinking of both. Well, I’ve read Greg Lehey’s editorial "The new >Idolike the inclusion of conference papers face of AUUGN" in the current issue and it seems >inthe current issue and would hope that might worthy of comment. Imust say I’m disappointed >continue. the decision has been made "to stop production of the paper version of AUUGN by the end of the Thanks. That’s an easy source of material for us, year." so if it meets with approval, then we can easily keep it up. That doesn’t stop people from con- However,ifthe cost of printing is so high and if tributing, though. we really could see a significant reduction in membership fees in retur n for this move, I’m hap- py to accept the decision. Idohope that AUUGN will continue — prefer- ably on the web rather than in the formofCDs, September 2004 59 AUUGN Volume 25 Number 3

Date: Wed, 8 Sep 2004 17:22:19 +1000 >> I do like the inclusion of conference papers Fr om: Greg Black >> in the current issue and would hope that >> might continue. On 2004-09-08, Greg ’groggy’ Lehey wrote: > >OnWednesday, 8 September 2004 at 16:56:14 >Thanks. That’s an easy source of material for >+1000, Greg Black wrote: >us, so if it meets with approval, then we can >> Well, I’ve read Greg Lehey’s editorial "The >easily keep it up. That doesn’t stop people >> new face of AUUGN" in the current issue and >fromcontributing, though. >> it seems worthy of comment. Imust say I’m >> disappointed the decision has been made "to Indeed, but having the conference papers on >> stop production of the paper version of hand does provide for some meat in the maga- >> AUUGN by the end of the year." zine and it does get the papers out to a wider au- >> dience. >> However,ifthe cost of printing is so high Cheers, Greg >> and if we really could see a significant >> reduction in membership fees in retur n for >> this move, I’m happy to accept the decision. Date: Wed, 22 Sep 2004 10:01:21 +1000 > Fr om: Russell Standish >This caused a surprising amount of discussion To:GregBlack >atthe AGM. In general, the sentiment >expr essed was like yours: "pity, but Iwould definitely be interested in having AUUGN >understandable". I assume that this sentiment distributed and archived via the web. There >isnot the only one: a significant number of should also be a table of contents distributed via >members didn’t read it, so they had no cause email. I already read web versions of the IT sec- >tocomplain about the decision. tions of major newspapers, and I also read elec- tr onic manuscripts of scientific papers - these I I’ve always read it, from cover to cover,and usu- download into my laptop, and I read them as I ally within a couple of days of receiving it. It’s have time. Interestying papers arefiled in a subdi- not always what I want, but I don’t complain be- rectory of my "read" directory, otherwise I delete cause I’m not prepar ed to provide the extra stuff them as I read them. myself and I know just how hard it is to produce aregular magazine. Paper journals tend to just end up hogging space on my bookshelves. CDs just get lost! >But I’d like to remind you about the option of >having it printed. If people areinter ested Cheers >(but only then), we can do some enquiries >about the cost of such printing. It’s >possible that it would be comparable to the >costs of producing AUUGN. Iwould not be interested in a printed version if we turned it around into a web-based publication —solong as that version really was produced and accessible. (I note that there’s a section of the AUUG web site entitled "AUUGN On the Web" that claims to include the text of AUUGN starting from December 2000, with issues added six months after publication — the last one listed is July 2002, so this is not promising.) >> I do hope that AUUGN will continue -- >> preferably on the web rather than in the >> formofCDs, which also cost money to >> produce and distribute. > >We’r e curr ently thinking of both. Ar e ther e plans to engage the membership in the decision making process, or would that be too dif ficult to manage? AUUGN Volume 25 Number 3 60 September 2004

• Shells and scripting languages FirstAustralian • Editors UNIX Develop- • Pr ogramming languages er’sSymposium • Build tools (e.g. make) Call for partici- • Version control A U U G • Debugging programs Inc pation • Writing graphical programs • Integrated development environments AUUG is proud to announce the 2005 UNIX De- Ker nel pr ogramming and debugging velopers’ Conference, to be held in Adelaide on 8 • and 9 April, 2005. Attendees will be accom- • Network programming plished programmers who wish to develop soft- This is an opportunity for you to help foster and war e for UNIX-like systems using open source str engthen the open source developers communi- tools. Weare planning two concurrent streams. ty in Australia. One stream will be aimed at programmers who have little or no experience with UNIX, and wish Tutorials can be 90 or 180 minutes long, and pa- to learnthe UNIX philosophy, environment and pers should be 45 minutes, including time for tools; the other will be aimed at developers who questions. Wewould prefer a written paper or alr eady have significant experience programming tutorial notes, for inclusion in the conference pro- for UNIX, and wish to learnnew or advanced ceedings, for all presentations. tools and techniques. The tutorial programme for the Newcomers str eam will comprise four 90 minute presenta- Submission Guidelines’ tions, which will give attendees a solid under- standing of the mechanics of developing for Those proposing to submit papers should submit UNIX: an abstract and a brief biography, and indicate whether their paper is intended for the Newcom- • Intr oduction to the UNIX environment ers or the Advanced stream. Those submitting tu- • Shells and scripting torial proposals should submit an outline of the tutorial and a brief biography, should indicate • Make and gcc whether their paper is intended for the Newcom- • Debugging with GDB ers or the Advanced stream, and should clearly in- dicate the duration of their presentation. The Programme Committee invites proposals for tutorials and papers. In order to ensurecomplete Pr oposals should be sent in electronic formtothe coverage, the programme for the "newcomers" Pr ogramme Committee at develop- str eam is a little morerigid. Our intention is to [email protected]. have four 1½ hour tutorials roughly covering the following topics: Impor tant Dates • Intr oduction to the unix environment • Shells and scripting Abstracts/Pr oposals Due 18 December 2004 • Make and gcc Authors notified 14 January 2005 • Debugging with GDB Final copy due 26 March 2005 Confer ence 8and 9 April 2005 We invite proposals that don’t disrupt this frame- work. For the advanced tutorials and the papers, Please refer to the AUUG website for further in- the following list of topics is intended to illustrate for mation and up-to-date details. the direction of the conference, but papers on other related topics will be considered: • Intr oduction to the UNIX environment September 2004 61 AUUGN Volume 25 Number 3

FirstDig ital Pest Symposium Call For Par ticipation Please send abstracts (around 100 words) or ex- pr essions of interest by close of business on Fri- Melbour ne, 8 day, 17 December 2004. Afor mal paper is desir- A U U G Febr uary2005 able, but consideration will be given to presenta- Inc tions without a paper if of sufficient quality or in- ter est. Likewise, shorter presentations than 45 minutes will also be considered. The inaugural Digital Pest Symposium (DPS1) will be held in Melbourne on Tuesday, 8 February 2004. Reg istration The Digital Pest Symposium is a one-day event, focussing on the twin global scourges of “spam” Registration costs areasfollows: email and malicious software(including, but not • $99 for full AUUG members, limited to, viruses, worms, trojans and spyware). Just about anyone who uses a computer these • $125 for associate members, and days (and that’s most of us) has to deal with these • $150 for non-members. in some way, so all arewelcome and encouraged to attend, and indeed participate. Please contact AUUG to register.

Goals

• to promote the sharing of information and ex- perience relating to digital pest countermea- sur es, • to raise awareness of the role of good soft- war e and systems design in controlling digital pests, • to raise the awareness of open-source counter- measur es within the broader ICT community.

Format

The event is made up of 45 minute talks, compris- ing mostly speaking time and an allowance for questions. Weencourage both technical and non- technical presentations, on topics including: • anti-virus and anti-spam solutions • anti-virus and anti-spam softwareinter nals • methodology—vulnerabilities exploited by spammers and virus authors • user education • legalities (e.g. fighting spam in the courts) • ISP strategies • the role of government All speakers receive free registration AUUGN Volume 25 Number 3 62 September 2004

AUUG Chapter Meetings and Contact Details

City Location Other Adelaide Marcellinas Pizza Bar Meetings areheld at 7 pm on the second Wednes- 273 Hindley Street day of each month. Adelaide

Br isbane Inn on the Park For further information, contact the QAUUG Execu- 507 Coronation Drive tive Committee via email (qauug-exec@au- Toowong ug.org.au). The technologically deprived can contact Rick Stevenson on (07) 5578-8933.

Canber ra Australian National University For updated information, see http://www.canb.auug.or g.au/cauug/

Hobar t University of Tasmania Chapter appears to be dormant. The last known URL for updated information was http://www.tas.auug.or g.au/

Melbour ne Various. For updated information The meetings alternate between technical presenta- see http://www.vic.auug.or g.au/ tions in the even numbered months and purely so- cial occasions in the odd numbered months. Some attempt is made to fit other AUUG activities into the schedule with minimum disruption.

Perth The Victoria League For updated information, see http://www.au- 276 Onslow Road ug.or g.au/wauug/waug.html. Shenton Park

Sydne y Sun Microsystems The NSW Chapter of AUUG holds meetings once a Gr ound Floor,33Berry Street (cnr quarter in North Sydney in rooms generously pro- Pacific Hwy) vided by Sun Microsystems. Moreinfor mation at North Sydney. http://www.auug.or g.au/nswauug/.

For up-to-date details on chapters and meetings, including those in all other Australian cities, please check the AUUG website at http://www.auug.or g.au/ or call the AUUG office on 1-800-625655.