Subject: Linux-Development Digest #715
From: Digestifier <Linux-Development-Request@senator-bedfellow.MIT.EDU>
To: Linux-Development@senator-bedfellow.MIT.EDU
Reply-To: Linux-Development@senator-bedfellow.MIT.EDU
Date:     Fri, 13 May 94 02:13:05 EDT

Linux-Development Digest #715, Volume #1         Fri, 13 May 94 02:13:05 EDT

Contents:
  Re: SLIP bitch (Whistler)
  arp broken with 1.1.12 ?? (Oliver Wurm)
  X-Windows Problems... (Don Lowery)
  Re: COMMODORE CALLS IT QUITS (Grant Edwards)
  Re: Patch????? (Paolo Zeppegno)
  Anyone working on a Matrox MGA Xfree86 server ? (Anders Nattestad)
  DIP Alternative (Whistler)
  Re: WINE gotta have it (please!!!) (Byron A Jeff)

----------------------------------------------------------------------------

From: slouken@cs.ucdavis.edu (Whistler)
Subject: Re: SLIP bitch
Date: Tue, 10 May 1994 18:38:50 GMT

Denis Solaro (drzob@vectrex.login.qc.ca) wrote:
: Jim Wygralak (darus@MCS.COM) wrote:
: : As I was getting the configuration info from him, I asked for the IP address
: : of the host side of the link and he wanted to know why I needed to know.
: : I explained that I was running linux, and that the slip software needed to
: : know. His response was that slip shouldnt need to know the IP of the other
: : end, and that I should register a bitch with the developers.

: Unless I read all TCP/IP docs upside-down, how do you go without IP addresses?
: (even unregistered...)

        Well, I've followed this thread a bit, and tried out the
recommendations of another poster...

Here is an expect script that provides dialup slip from my system
to the SLIP server... -WITHOUT needing to know the server's IP 
address.  Check out the ifconfig and route statements.
I'm using this with Linux 1.0.9 as a replacement for DIP, and it 
works like a charm. :) 

(Note:  If you want to use this script, you'll have to tweak it
 for your setup. )

Enjoy!

        -Sam

=================================================================
#!/usr/bin/expect --
#
# An expect script designed to initialize a slip connection.

##########################################################
# Configuration
#
# If you have a static IP address, put it here:
set local_ip    {}
#
# The phone number to dial for slip service:
set dialup 752-7925
#
# Your account name:
set Account YourLogin
#
# Your account's password:
set Password YourPasswd
#
# The modem device:
set modem /dev/modem
#
# The modem baudrate:
set baudrate 19200
#
# The modem initialization string:
set modem_init "ATZ S7=45 S0=0 L0 V1 X4 &c1 E1 Q0\r"
#
# The modem needs certain tty settings to function properly.
# You can get these settings by running 'stty -g </dev/modem'
# after quitting from any good modem program (like minicom)
set modem_stty "5:0:800004be:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:0"
#
# The Maximum Transfer Unit for the SLIP software:
# (This can be set by the server)
set MTU 1024
#
# The interface to bind to this line (a kludge)
set interface sl0
#
# A safe path for root, holding all of the necessary
# utilities (stty, ifconfig, route, etc..)
set env(PATH) /sbin:/usr/sbin:/bin:/usr/bin:/etc
#
# The full pathname of a SLIP networking startup script.
# (The interface and routing is automatically set up)
set sliprc /etc/rc.d/rc.slip
#
# The file that holds the process id of slattach:
set pidfile /etc/slip.pid
#
##########################################################

# Only root is allowed to run this script.
set whoami [exec whoami]
if { $whoami != "root" } {
        send_user "You must be root to set up slip!  -Aborting.\n"
        exit 1
}

# See if we are simply to shut down an existing connection.
if { $argv == "-k" } {
        set fd [open $pidfile "r"]
        if { $fd >= 0 } {
                gets $fd pid
                catch {exec kill $pid}
        }
        exit 0
}

proc timedout {} {
   send_user "SLIP connection timed out.\n";
        quit
}
proc quit {} {
        global modem baudrate

        # Hang up the modem
        set timeout 8
        send "+"
        send "+"
        send "+"
   expect {
                "OK\r" 
                        { send_user "Hanging up..."; send "ATH\r" }
                "NO CARRIER\r"
                        { send_user "\n" }
                timeout
                        { send_user "\r" }
                eof     {}
        }
        # Drop DTR, sleep a bit, then re-raise DTR to signal a hangup.
        system sh -c "stty ospeed 0 ispeed 0 <$modem >/dev/null"
        sleep 1
        system sh -c "stty ospeed $baudrate ispeed $baudrate <$modem >/dev/null"

        send_user "Exiting.\n"
        exit 1
}
trap quit {INT TERM}

# Allow a drop into interactive mode with press of <space> bar.
expect_after -i $user_spawn_id \
        \040 { send_user "Interactive!  (Type ^C to resume script)\n";
               interact ~q quit  \03 { send_user "** Resuming Script **\n"; 
          exp_continue }
             }

# Open and initialize the modem.
spawn -noecho -open [open $modem "r+"]
system "stty $modem_stty </dev/modem"
if { [catch {send $modem_init} error] } {
        # The error message is put into $error.  We assume I/O error.
        send_user "SLIP already connected!  -Aborting.\n";
        exit 1;
}
set timeout 5
expect {
        timeout timedout
        eof
                { send_user "EOF from modem!!\n"; quit }
        "OK\r"
                { }
        "ERROR\r"
                { send_user "Aborting. Try again.\n" }
        "NO CARRIER\r"
                { send_user "Is the modem plugged in?  Aborting.\n" }
}

# Dial the modem
send "ATDT $dialup\r"
set timeout 45
expect {
        timeout timedout
        "NO CARRIER"
                { send_user "NO CARRIER - Aborting.\n"; quit }
        -re "CONNECT (\[0-9]*)\r" 
                { send_user "Connected to SLIP server at $expect_out(1,string) baud.\n"
                  sleep 1; send "\r"
                  sleep 1; send "\r"
                  sleep 1; send "\r"
                  sleep 1; #send "\r"
                }
        eof { send_user "Modem hung up.  Aborting.\n"; quit }
}

# Wait for it to prompt for our slip account, then give it.
set timeout 15
expect {
        timeout timedout
        "Username: " 
                { send "$Account\r" }
}

# Wait for password prompt, then give our password.
expect {
        timeout timedout
        "assword: " 
                { send "$Password\r" }
}

# Wait for the service prompt, then specify slip service.
set timeout 45
expect {
        timeout timedout
        "denied\r\n" 
                { send_user "Access Denied! -Aborting.\n"; quit }
        "No response *\r\n" 
                { send_user "Authentication server not responding.\n"; quit }
        "Request>" 
                { send "slip\r" }
}

# Verify that we have entered slip and grab a bunch of parameters:
expect {
        timeout timedout
        "SLIP"  { }
}
# If we need our IP address, grab it here.
if { $local_ip == {} } {
        expect {
                timeout timedout
                -re {IP address is ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\.}
                        { set local_ip $expect_out(1,string) }
        }
}
set timeout 1
expect {
        -re "MTU is (\[0-9]+) bytes\r\n"
                { set MTU $expect_out(1,string) }
}

# Set up the tty interface for SLIP, and we're outta here!
set pid [fork]
if { $pid == 0 } {
        # Ahh, but first put our PID in a file so we can be killed.
        set fd [open $pidfile "w"]
        if { $fd >= 0 } {
                puts $fd [pid]
                close $fd
        }
        disconnect; overlay slattach -s $baudrate -p slip $modem
        send_error "Overlay of slattach failed!\n"
        exit 255
}
if { $pid < 0 } { send_user "Fork() failed!\n"; quit }

# Slurp up any remote output that is left.
set timeout 2; expect

# Get the SLIP parameters for this session and set it up!
system ifconfig $interface $local_ip pointopoint 0.0.0.0 \
                mtu $MTU netmask 255.255.255.0
system route add default dev $interface

# Run the SLIP startup script, if any.
if { [file exists $sliprc] } {
        system $sliprc >/dev/null
}
send_user "SLIP connection established.\n"
exit 0

------------------------------

From: owurm@k.mup.de (Oliver Wurm)
Subject: arp broken with 1.1.12 ??
Date: 10 May 1994 20:28:49 GMT


Hi everybody,

after I've found the missing update of the Makefile in .../inet I got
the Kernel Release 1.1.12 to work. But if I do an 'arp -a', I'm getting
a silly result: IP-Adresses, that are not in my Network. Actually I've
tried this at home and my MS-DOOF - Mashine wasn't running, so the Linux
Box was the only one on the net.

I've got the file 'arp.c' out of the kernel/net-src/... - directory, but
it gave me the same result.

Machine:        486dx2/66, 8MB RAM, 245 TEAC and 540 MB WD Drives (IDE)
                3Com 503
                ET4000 VESA

                Linux 1.1.12, gcc 2.5.8, some new net-stuff and
                the rest of the old SLS 1.03

I have no device /dev/arp and with the previous releases I've got a 
ln -s /proc/net/arp /dev/arp and everything workd fine.

Please tell me:

- how to make the correct /dev/arp
- what else should I do to get arp working ??

Thanks in advance

--
Oliver Wurm                   \\\//
EMail: owurm@k.mup.de         (o o)   #include <std/disclaimer>
===========================ooO=(_)=Ooo=========================
,   ,                        ,     ,   ,---,      ,
|\./|      ___   ___   _   _~|~   -+-  |---'_   _~|~  _   _   _
|   | |_| | | | | | | |_~ |  |_    '   |   |_| |  |_ | | |_~ |
____________________Unternehmensberatung GmbH__________________
Neue Weyerstrasse 6      Tel: +49 (221) 92404 227
D-50676 Koeln            Fax: +49 (221) 92404 199 (-33 from US)

------------------------------

From: lowery@biosci.arizona.edu (Don Lowery)
Subject: X-Windows Problems...
Date: Thu, 12 May 1994 15:04:34

does anyone have any hints on configuring X-Windows with a CTX monitor,
a Diamond Speedstar Pro (Cirrus '28) and a 486SLC66 board under Slackware 1.2
When run I keep getting errors like "1024x768" or "640x400" not in mode.
*shrug* yeah, I'm a newbie to Linux...so please help...
Don Lowery
lowery@biosci.arizona.edu

------------------------------

Crossposted-To: comp.os.linux.misc
From: grante@reddwarf.rosemount.com (Grant Edwards)
Subject: Re: COMMODORE CALLS IT QUITS
Date: Thu, 12 May 1994 19:25:14 GMT

Brandon S. Allbery (bsa@kf8nh.wariat.org) wrote:
: grante@reddwarf.rosemount.com (Grant Edwards) says:
: +---------------
: | Nope, there was a dual-mode 8/32 bit wide 6502 compatible cpu (I don't
: | remember the number, but 68C832 doesn't sound quite right).  
: +------------->8

: 65C816, but that was an 8/16 bit microprocessor.  (The Apple IIGS
: used it; I don't think any other "major manufacturer" machines did.)
: I don't think there was a 32-bit version.

Yep, that's the one -- I mis-remembered the bus width.  Did the IIGS
even run the thing in 16 bit mode?

--
Grant Edwards                                 |Yow!  I need to discuss
Rosemount Inc.                                |BUY-BACK PROVISIONS with at
                                              |least six studio
grante@rosemount.com                          |SLEAZEBALLS!!

------------------------------

From: paolo@to.sem.it (Paolo Zeppegno)
Subject: Re: Patch?????
Date: 10 May 1994 09:43:26 +0200

antonyc@linuxftp.caltech.edu (antony) writes:

>u8123025@cc.nctu.edu.tw ( Monkey) writes:


>>      I want to know how to generate a patch file...

>have you tried:
>diff --recursive --unified <dir1> <dir2>

close, but not enough:

diff --recursive --unified --new-file <dir1> <dir2>
                           ^^^^^^^^^^

otherwise new files won't be created.

To apply the patch I always do:

        patch -p1 -s -E < file.patch

to delete emptied files.

        bye...

------------------------------

From: an@odont.ku.dk (Anders Nattestad)
Subject: Anyone working on a Matrox MGA Xfree86 server ?
Date: Mon, 9 May 1994 07:30:52 GMT

Hello all,

I know, that Matrox is not on the sunny side of the Linux street, but when one 
has paid 1.500 $ for a professional graphics controller, and would like to 
run it with Linux, what to do ???

So does anyone have *ANY* working driver for the MGA series - even for 640*480 
or 800*600.

Please mail me directly.

TIA

Anders Nattestad


===================================================================
Anders Nattestad, DDS, Ph.D, Dep. of Oral and Maxillofacial Surgery
Dental School,  Faculty of Health Science, University of Copenhagen
Norre Alle 20, Copenhagen, Denmark, Ph.+4535326618, Fax +4535326625

------------------------------

From: slouken@cs.ucdavis.edu (Whistler)
Subject: DIP Alternative
Date: Tue, 10 May 1994 19:04:34 GMT



        I've just finished an expect script that has the full
functionality of dialing up a host for SLIP access.  It has the
advantage over dip in that it uses expect, and hence a more
robust command language.  It also can be more easily modified
to use new routing semantics or added redial functionality, etc.

My script is an example of how you can completely configure a
dialup SLIP interface from the dialing to the routing using
dynamically allocated IP addresses, using expect and a few
standard system tools, such as 'stty'.
I use this script with Linux 1.0.9 and expect 5.7.0.

Expect is pretty cool. :)  You need tk-tcl to compile it (I 
suggest the tk/tcl package from Slackware - it has shared
libraries), and can be retrieved from ftp.cme.nist.gov in the
/pub/expect directory.

If you try to use this script, you will probably have to modify
it fairly extensively.  It is included only as an example and is 
highly tuned to my SLIP server's output. 

BTW, I learned the basics of 'expect' while writing this script
last night, so please don't ask me how to write expect scripts.
One thing that helps alot though, is call 'expect -d script' for
debug output.  It really shows what exactly is going on in the
"chat" dialogue.

Enjoy!

        -Sam.


slip.exp -----------------------------------------------------
#!/usr/bin/expect --
#
# An expect script designed to initialize a slip connection.

##########################################################
# Configuration
#
# The IP address of your slip server:
set server 120.128.250.100
#
# If you have a static IP address, put it here:
set local_ip    {}
#
# The phone number to dial for slip service:
set dialup 752-7925
#
# Your account name:
set Account YourLogin
#
# Your account's password:
set Password YourPasswd
#
# The modem device:
set modem /dev/modem
#
# The modem baudrate:
set baudrate 19200
#
# The modem initialization string:
set modem_init "ATZ S7=45 S0=0 L0 V1 X4 &c1 E1 Q0\r"
#
# The modem needs certain tty settings to function properly.
# You can get these settings by running 'stty -g </dev/modem'
# after quitting from any good modem program (like minicom)
set modem_stty "5:0:800004be:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:0"
#
# The Maximum Transfer Unit for the SLIP software:
# (This can be set by the server)
set MTU 1024
#
# The interface to bind to this line (a kludge)
set interface sl0
#
# A safe path for root, holding all of the necessary
# utilities (stty, ifconfig, route, etc..)
set env(PATH) /sbin:/usr/sbin:/bin:/usr/bin:/etc
#
# The full pathname of a SLIP networking startup script.
# (The interface and routing is automatically set up)
set sliprc /etc/rc.d/rc.slip
#
# The file that holds the process id of slattach:
set pidfile /etc/slip.pid
#
##########################################################

# Only root is allowed to run this script.
set whoami [exec whoami]
if { $whoami != "root" } {
        send_user "You must be root to set up slip!  -Aborting.\n"
        exit 1
}

# See if we are simply to shut down an existing connection.
if { $argv == "-k" } {
        set fd [open $pidfile "r"]
        if { $fd >= 0 } {
                gets $fd pid
                catch {exec kill $pid}
        }
        exit 0
}

proc timedout {} {
   send_user "SLIP connection timed out.\n";
        quit
}
proc quit {} {
        global modem baudrate

        # Hang up the modem
        set timeout 8
        send "+"
        send "+"
        send "+"
   expect {
                "OK\r" 
                        { send_user "Hanging up..."; send "ATH\r" }
                "NO CARRIER\r"
                        { send_user "\n" }
                timeout
                        { send_user "\r" }
                eof     {}
        }
        # Drop DTR, sleep a bit, then re-raise DTR to signal a hangup.
        system sh -c "stty ospeed 0 ispeed 0 <$modem >/dev/null"
        sleep 1
        system sh -c "stty ospeed $baudrate ispeed $baudrate <$modem >/dev/null"

        send_user "Exiting.\n"
        exit 1
}
trap quit {INT TERM}

# Allow a drop into interactive mode with press of <space> bar.
expect_after -i $user_spawn_id \
        \040 { send_user "Interactive!  (Type ^C to resume script)\n";
               interact ~q quit  \03 { send_user "** Resuming Script **\n"; 
          exp_continue }
             }

# Open and initialize the modem.
spawn -noecho -open [open $modem "r+"]
system "stty $modem_stty </dev/modem"
if { [catch {send $modem_init} error] } {
        # The error message is put into $error.  We assume I/O error.
        send_user "SLIP already connected!  -Aborting.\n";
        exit 1;
}
set timeout 5
expect {
        timeout timedout
        eof
                { send_user "EOF from modem!!\n"; quit }
        "OK\r"
                { }
        "ERROR\r"
                { send_user "Aborting. Try again.\n" }
        "NO CARRIER\r"
                { send_user "Is the modem plugged in?  Aborting.\n" }
}

# Dial the modem
send "ATDT $dialup\r"
set timeout 45
expect {
        timeout timedout
        "NO CARRIER"
                { send_user "NO CARRIER - Aborting.\n"; quit }
        -re "CONNECT (\[0-9]*)\r" 
                { send_user "Connected to SLIP server at $expect_out(1,string) baud.\n"
                  sleep 1; send "\r"
                  sleep 1; send "\r"
                  sleep 1; send "\r"
                  sleep 1; #send "\r"
                }
        eof { send_user "Modem hung up.  Aborting.\n"; quit }
}

# Wait for it to prompt for our slip account, then give it.
set timeout 15
expect {
        timeout timedout
        "Username: " 
                { send "$Account\r" }
}

# Wait for password prompt, then give our password.
expect {
        timeout timedout
        "assword: " 
                { send "$Password\r" }
}

# Wait for the service prompt, then specify slip service.
set timeout 45
expect {
        timeout timedout
        "denied\r\n" 
                { send_user "Access Denied! -Aborting.\n"; quit }
        "No response *\r\n" 
                { send_user "Authentication server not responding.\n"; quit }
        "Request>" 
                { send "slip\r" }
}

# Verify that we have entered slip and grab a bunch of parameters:
expect {
        timeout timedout
        "SLIP"  { }
}
# If we need our IP address, grab it here.
if { $local_ip == {} } {
        expect {
                timeout timedout
                -re {IP address is ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\.}
                        { set local_ip $expect_out(1,string) }
        }
}
set timeout 1
expect {
        -re "MTU is (\[0-9]+) bytes\r\n"
                { set MTU $expect_out(1,string) }
}

# Set up the tty interface for SLIP, and we're outta here!
set pid [fork]
if { $pid == 0 } {
        # Ahh, but first put our PID in a file so we can be killed.
        set fd [open $pidfile "w"]
        if { $fd >= 0 } {
                puts $fd [pid]
                close $fd
        }
        disconnect; overlay slattach -s $baudrate -p slip $modem
        send_error "Overlay of slattach failed!\n"
        exit 255
}
if { $pid < 0 } { send_user "Fork() failed!\n"; quit }

# Slurp up any remote output that is left.
set timeout 2; expect

# Get the SLIP parameters for this session and set it up!
#regsub (\[0-9]+.\[0-9]+.\[0-9]+).\[0-9]+ $server {\1.0} network
regsub (\[0-9]+.\[0-9]+.\[0-9]+).\[0-9]+ $server {\1.255} bcast
system ifconfig $interface $local_ip pointopoint $server \
                mtu $MTU netmask 255.255.255.0 broadcast $bcast
system route add $server
system route add -net default gw $server metric 1

# Run the SLIP startup script, if any.
if { [file exists $sliprc] } {
        system $sliprc >/dev/null
}
send_user "SLIP connection established with $server.\n"
exit 0


------------------------------

From: byron@cc.gatech.edu (Byron A Jeff)
Subject: Re: WINE gotta have it (please!!!)
Date: Tue, 10 May 1994 19:22:00 GMT

In article <1994May10.162337.24663@ucl.ac.uk>,
Mr Ivan Alastair Beveridge <zceed04@ucl.ac.uk> wrote:
>In article <2qluo5$2jn@eagle.lerc.nasa.gov> mshann@hyperthink.lerc.nasa.gov (Ray Hann) writes:
>>They will release no WINE, before its time ...  :-)
>>
>>How many times has that joke been posted.  Does WINE really exists? Or
>>is it like the Rock & Roll Hall of Fame that's supposed to be built here
>>in Cleveland.
>
>I can sort-of see why the developers do not want to release WINE before it is
>ready. Saying that, tho' many people would like to try out WINE to see what all
>the fuss is about (and I can't blame them ... WINE is a damn good project), and
>probably do not care at what stage it is at - just for curiosity. I cannot see
>that, if something goes wrong with the system, they will start flaming people.

Since it's not ready for public consumption, folks who pull it down and try it
will have problems. We have the tendency that when we have problems, we post
and E-mail questions. This takes up the developer's time. Since there are so
few developers for WINE available, their time is valuable.

>
>I would like to see it put somewhere in an ALPHA directory ... just to see
>what it does and can do so far. I have a copy of the one at Novell, but have
>not had time to try it yet. I am *definitely not* going to flame anyone if
>I have to reinstall all of my system, tho!

It's not ALPHA code yet. So it should stay exactly the way it is. When it
gets to an ALPHA state, the developers will release a copy.

An observation: if anyone is really interested in WINE and has either time,
programming skills, or machine resources, then volunteer to help. WINE will
get done faster and you'll have access to the code. But it requires a serious
committment.

Later, (waiting patiently for it...)

BAJ
---
Another random extraction from the mental bit stream of...
Byron A. Jeff - PhD student operating in parallel!
Georgia Tech, Atlanta GA 30332   Internet: byron@cc.gatech.edu

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: Linux-Development-Request@NEWS-DIGESTS.MIT.EDU

You can send mail to the entire list (and comp.os.linux.development) via:

    Internet: Linux-Development@NEWS-DIGESTS.MIT.EDU

Linux may be obtained via one of these FTP sites:
    nic.funet.fi				pub/OS/Linux
    tsx-11.mit.edu				pub/linux
    sunsite.unc.edu				pub/Linux

End of Linux-Development Digest
******************************
