[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    Re:  [Linux-ha-dev] changes to udp.c for broadcast
From:       "Eric Z. Ayers" <eric () compgen ! com>
Date:       2000-10-11 14:23:21
[Download RAW message or body]

Lars Marowsky-Bree writes:
 > On 2000-10-09T17:30:28,
 >    "Eric Z. Ayers" <eric@compgen.com> said:
 > 
 > > I'm not sure if there would be or not. Probably not.
 > >   - If the low level device driver looks like a serial port, then use
 > >      the udp over serial emulation.
 > >   - If the low level device driver looks like a network device, then use
 > >      the udp module.
 > 
 > There would be, as you have to configure IP addresses for any networking
 > device, and as USB is p2p, this is a configuration hurdle.

It is a hurdle, but if you treat it like we treat this device like we
do ethernet devices on the host (the user is repsonsible for
configuring that outside of any ha software), it's more
manageable. I've created files in the /etc/sysconfig/network-scripts
directory for my redhat installation that allow the plusb device to
come up on boot just like ethernet and other network types.  I'll
submit the new files to redhat.  It's pretty darn simple (attached below)
 
FYI, the plusb driver is very similar to the plip driver in function.


--


#!/bin/sh
#
# /etc/sysconfig/network-scripts/ifup-plusb
#
# the plusb network driver is a USB host-host cable based on the Prolific chip.
# It works a lot like the plip driver.  
#
# To get the plusb module to load automatically at boot, you will need to add
# the following lines to /etc/conf.modules, based on what type of USB host
# controller you have on your system:
#
# alias plusb0 plusb
# below plusb usb-uhci
#   *or*
# below plusb usb-ohci
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin

cd /etc/sysconfig/network-scripts
. network-functions

CONFIG=$1
source_config

if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ]
then
	exit
fi

if [ ${BROADCAST} != ""  ]  ; then
    ifconfig ${DEVICE} ${IPADDR} pointopoint ${REMIP} netmask ${NETMASK} broadcast ${BROADCAST}
else
    ifconfig ${DEVICE} ${IPADDR} pointopoint ${REMIP} netmask ${NETMASK} 
fi

. /etc/sysconfig/network

if [ "${GATEWAY}" != "" ]; then
	if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then
		# set up default gateway
		route add default gw ${GATEWAY}
	fi
fi

/etc/sysconfig/network-scripts/ifup-post $1

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.tummy.com
http://lists.tummy.com/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic