Return to BSD News archive
Xref: sserve comp.os.386bsd.misc:3011 comp.os.linux.misc:21023 Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!europa.eng.gtefsd.com!newsxfer.itd.umich.edu!newsrelay.iastate.edu!news.iastate.edu!ponderous.cc.iastate.edu!michaelv From: michaelv@iastate.edu (Michael L. VanLoon) Newsgroups: comp.os.386bsd.misc,comp.os.linux.misc Subject: Re: source of TCP/IP (was I hope this wont ignite a major flame ...) Date: 4 Aug 94 01:42:41 GMT Organization: Iowa State University, Ames, Iowa Lines: 37 Message-ID: <michaelv.775964561@ponderous.cc.iastate.edu> References: <31od8d$15l@fw.novatel.ca> <31pc9l$ctp@oscar.agcs.com> NNTP-Posting-Host: ponderous.cc.iastate.edu In <31pc9l$ctp@oscar.agcs.com> robertsw@agcs.com (Wallace Roberts) writes: >hpeyerl@sidney.novatel.ca (Herb Peyerl) writes: > [ ...snip happens... ] >>I've tried reading Linux networking code. At least some of the device >>drivers and each of the ones I looked at gave me a brain hemorrage... >> >>This is an example of some of the Linux device-drivers I've seen: >> >> short error = rx_status & 0x3C00; >> outw(inw(ioaddr + 0x0A) | 0x00C0, ioaddr + 0x0A); >> >>As far as I can tell; Linux Ethernet device-drivers were written in >>Write-Only-C. There are no comments in the surrounding code that in any >>way indicates exactly what "0x3c00", "0x0a", "0x00c0" actually mean. To >>people without docs (usually these are the people who are trying to fix >>the code) the above is completely meaningless. >if you're writing (or fixing) a device driver, you are expected to have >the h/w manuals handy. comments are unnecessary if you have the device >manual & understand the h/w. this is the expected level of competence >for a programmer writing or fixing a device driver. In other words: real hackers don't need comments, because they can figure it out from the magic numbers. Yup, that's a real strong argument. Sheesh! Even Microsoft writes their code better than that... (Yes, I do know.) -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Michael L. VanLoon Iowa State University Computation Center michaelv@iastate.edu Project Vincent Systems Staff Free your mind and your machine -- NetBSD free Un*x for PC/Mac/Amiga/etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -