[lug] A Big Red Switch...

socket at peakpeak.com socket at peakpeak.com
Thu Oct 28 20:00:20 MDT 1999


Perhaps someone here could help me with a minor issue, something in
the realm of hardware and switches and device drivers and such.  A 486
in the corner houses a 56k modem, masqueraded to our other computers
over 10Mbit ethernet.  The problem is about deciding how to connect or
disconnect to my ISP without needing to inform the (possibly sleeping,
possibly surfing) roommate of the change.

On the one hand, we could continue doing what we're doing (telnet into
the router and issue 'pon' or 'poff' commands, a debian thing) or put
some work into automoting the task somewhat (by doing some sort of
diald or new-pppd thing that I haven't really been able to get
working)...

...or we could do the *really* geeky thing and make a Big Red Switch
that we can put in a lego case and mount it to the wall.  The switch
would be connected directly to the router, probably through the serial
port, and I would make a device driver to watch activity on the switch
and bring up or down the connection appropriately.  This is what we've
decided to do. (despite the obvious complexity of the plan)

Here's the problem: I've taken the Computers as Components class at
CU, which taught me a good deal about serial I/O, polling, interrupts,
handlers, etc. but completely failed to do it in a context of useful
computing.  I could solve this task under DOS with Borland 3, but I
don't even know where to begin to learn about hardware interaction in
the Linux kernel source to make a device driver, or (assuming the
existing serial kernel code is sufficient, which it likely is) how I'd
go about writing a program that calls on available resources to do
this.

Basically, what I'm asking is this: Can somebody refer me to
documentation for people familiar with C and the *concepts* of
hardware I/O handling, so I could learn about creating a Linux
handler (module, daemon, whatever) for a Big Red Switch?

Also, any hints on the proper mechanism of the switch or associated
software would be very welcome.  We're really in the design stage at
the moment.

Thanks muchly!

-- 
Chris Riddoch                  socket at peakpeak.com
Will provide pseudo-insightful commentary for food
                   http://www.peakpeak.com/~socket




More information about the LUG mailing list