#!/bin/sh
#
# tester: Test script for BNEP and PAN Profile Test Cases
#
# Copyright (C) 2002 Sony Corporation
#
# Author: Johannes Loebbert <loebbert@sony.de>
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
#

######################################################################
# ChangeLog:
#
# 2002/04/10 update by Takashi Sasai
# 2002/03/04 full test and bug fixies by Takashi Sasai
# 2002/02/27 modified to new script language by Johannes Loebbert
# 2002/02/13 clean up and add help messages by Takashi Sasai
# 2001/04/17 initial release by Johannes Loebbert
#

######################################################################
# Configuration
######################################################################
# You might need to change this line.
ethif=eth0

######################################################################
bnepc="/sbin/pantool -i $ethif"
bnept="/sbin/pantest -i $ethif"


if [ $# -eq 0 ]; then
    echo "Usage: tester <test case> <param1> <param2> ..."
    echo "     : tester bnep3.1 <BDADDR>"
    echo "     : tester l2cap <BDADDR>"
    echo "     : tester bnep <BDADDR> [<SrcUUID> <DstUUID>]"
    echo "     : tester disconnect <BDADDR>"
    echo "     : tester resetfilter <NAP/GN's BDADDR>"
fi

######################################################################
# Commands
######################################################################
case $1 in
    l2cap)
	if test -z $2 ;then
	    echo "Usage: tester $1 <BDADDR>"
	    exit
	fi
        echo "Creating L2CAP connection to $2"
	$bnepc cc $2 -p l2cap
	;;
    bnep)
	 echo "Creating BNEP connection to $2 to 0x1116"
	 $bnepc cc $2 -p bnep -d 0x1116
	 ;;	    
    disconnect)
	if test -z $2 ;then
	    echo "Usage: tester $1 <BDADDR>"
	    exit
	fi
	echo "Disconnect to $2"
	$bnepc dc $2
	;;
    resetfilter)
	if test -z $2 ;then
	    echo "Usage: tester $1 <NAP/GN's BDADDR>"
	    exit
	fi
	echo "Reset Network/Multicast filters on $ethif to $2"
	echo " Extension"
	echo "  Reset network filter"
	echo "  Reset multicast filter"
	$bnepc setfilter $2 -t protocol
	$bnepc setfilter $2 -t multicast
	;;
esac

######################################################################
# Run a Test Case
######################################################################
TESTCASE=$1

######################################################################
# BNEP Test Cases 3.1-3.23
######################################################################
case $TESTCASE in
    bnep3.1 | bnep3.5)
	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"
	    exit	    
	fi
	echo "$TESTCASE"
	echo " Type: BNEP Control packet type 0xff on $ethif to $2"
	$bnept reset
	$bnept add -f payload -c control -v 0xff -l 0x0
	$bnept send -D $2
	$bnept reset
	;;
	
    bnep3.2 | bnep3.3 | bnep3.4)
	if test -z $2 ;then
	    echo "Usage(B): tester $TESTCASE server on"
	    echo "Usage(A): tester $TESTCASE client <B's BDADDR>"
	    echo "Usage(B): tester $TESTCASE server off"
	    exit
	fi
	case $2 in

	    client)
		#echo "$TESTCASE ($2) $3 $4 $5 $6"
		#$bnept reset
		#$bnept add -f payload -c connect -D $3 -s $4 -d $5 -p bnep 
		#$bnept send -D $3
		#$bnept reset
                $bnepc cc $3 -p bnep
		;;
	    server)
		echo "$TESTCASE ($2) $3"
		echo "Type: Ignore connect messages $3 on $4"
		$bnept ignore -m CONNECT -S $3
		;;
	esac
	;;
	
    bnep3.6)
    	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"
	    exit
	fi
        echo "$TESTCASE"
	echo " Type: Network filter message to $2 on $ethif"
	echo "  Filter: 0x86dd 0x86dd"
	$bnept reset
	$bnept add -f payload -c protocol_filter 0x86dd 0x86dd
	$bnept send -D $2
	$bnept reset
	;;
	
    bnep3.7)
    	if test -z $2 ;then
	    echo "Usage(B): tester $TESTCASE server on"
	    echo "Usage(A): tester $TESTCASE client <B's BDADDR>"
	    echo "Usage(B): tester $TESTCASE server off"
	    exit
	fi
        case $2 in
	    client)
		echo "$TESTCASE ($2) $3"
		echo " Type: Network filter message to $3 on $ethif"
		echo " Filter: 0x86dd 0x86dd"
                $bnepc setfilter $3 -t protocol 0x86dd 0x86dd
		#$bnept reset
		#$bnept add -f payload -c protocol_filter 0x86dd 0x86dd
		#$bnept send -D $3
		#$bnept reset
		;;
	    server)
		echo "$TESTCASE ($2) $3"
		echo " Type: Ignore connect messages $3 on $ethif"
		$bnept ignore -m protocol_filter -S $3
		;;
	esac
	;;
	
    bnep3.8)
	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"
	    exit
	fi
	echo "$TESTCASE"
	echo " Type: Multicast filter message  to $2 on $ethif"
	echo " Filter: 03:00:00:20:00:00 - 03:00:00:20:00:00"
	$bnepc setfilter $2 -t multicast \
	    03:00:00:20:00:00 03:00:00:20:00:00
	;;
	
    bnep3.9)
	if test -z $2 ;then
	    echo "Usage(B): tester $TESTCASE server on"
	    echo "Usage(A): tester $TESTCASE client <B's BDADDR>"
	    echo "Usage(B): tester $TESTCASE server off"
	    exit
	fi
        case $2 in	
	    client)
		echo "$TESTCASE ($2)"
		echo " Type: Multicast filter message to $3 on $ethif"
		echo " Filter: 03:00:00:20:00:00 - 03:00:00:20:00:00"
		$bnepc setfilter $3 -t multicast \
		    03:00:00:20:00:00 03:00:00:20:00:00
		;;
	    server)
		echo "$TESTCASE ($2) on $ethif"
		echo " Type: $3 ignore multicast messages"
		$bnept ignore -m multicast_filter -S $3
		;;
	esac
	;;
	
    bnep3.10)
    	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"
	    exit
	fi
	echo "$TESTCASE"
	echo " Type: Compressed ethernet to $2 on $ethif"
	echo " Extension : Multicast filter message "
	echo "             03:00:00:20:00:00 - 03:00:00:20:00:00"
	$bnept reset
	$bnept add -f extension -c multicast_filter \
	    03:00:00:20:00:00 03:00:00:20:00:00
	$bnept send -D $2 -t BNEP_COMPRESSED_ETHERNET -p 0x1234
	$bnept reset
	;;
	
    bnep3.11)
	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"
	    exit
	fi
	echo "$TESTCASE" 
	echo " Type: General ethernet to $2 on $ethif"
	echo "  Header:  0x3c  bytes"
	echo "  Pattern: 0x5a0 bytes"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D $2 -p 0x800 -t BNEP_GENERAL_ETHERNET
	$bnept reset
	;;
	
    bnep3.12)
    	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"	
	    exit
	fi    
	echo "$TESTCASE"
	echo " Type: Compressed ethernet to $2 on $ethif"
	echo "  Header:  0x3c  bytes" 
	echo "  Pattern: 0x5a0 bytes"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
 	$bnept send -D $2 -p 0x800 -t BNEP_COMPRESSED_ETHERNET
	$bnept reset
	;;
	
    bnep3.13)
    	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"
	    exit
	fi    
	echo "$TESTCASE"
	echo " Type: Compressed ethernet source only to $2 on $ethif"
	echo "  Header:  0x3c  bytes"
	echo "  Pattern: 0x5a0 bytes"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D $2 -t BNEP_COMPRESSED_ETHERNET_SOURCE_ONLY
	$bnept reset
	;;
	
    bnep3.14)
    	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"
	    exit
	fi    
	echo "$TESTCASE"
	echo " Type: Compressed ethernet destination only to $2 on $ethif"
	echo "  Header:  0x3c  bytes" 
	echo "  Pattern: 0x5a0 bytes"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D $2 -t BNEP_COMPRESSED_ETHERNET_DEST_ONLY
	$bnept reset
	;;
	
    bnep3.15)
    	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"
	    exit
	fi    
	echo "$TESTCASE"
	echo " Type: General ethernet to $2 on $ethif"
	echo "  Extension: Multicast Filter "
	echo "             03:00:00:20:00:00 - 03:00:00:20:00:00"
	echo "  Header:  0x3c  bytes"
	echo "  Pattern: 0x5a0 bytes"
	$bnept reset
	$bnept add -f extension -c multicast_filter \
	    03:00:00:20:00:00 03:00:00:20:00:00
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D $2 -t BNEP_GENERAL_ETHERNET
	$bnept reset
	;;
	
    bnep3.16)
    	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"
	    	    exit
	fi    
	echo "$TESTCASE"
	echo " Type: General ethernet to $2 on $ethif"
	echo "  Extension: Unknown Type: 0x7f Length: 0xae"
	echo "  Header: 0x3c = 60 bytes"
	echo "  Pattern: 0x5a0 bytes"
	$bnept reset
 	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept add -f extension -c unknown -l 0xae -v 0x7f
	$bnept send -D $2 -t BNEP_GENERAL_ETHERNET -p 0x800
	$bnept reset
	;;
	
    bnep3.17)
    	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"
	    exit
	fi    
	echo "$TESTCASE"
	echo " Type: General ethernet to $2 on $ethif"
	echo "  Extension: Unknown Type: 0x7f Length: 0xae"
	echo "  Extension: Multicast Filter "
	echo "             03:00:00:20:00:00 - 03:00:00:20:00:00"
	echo "   Header: 0x3c = 60 bytes"
	echo "   Packet: 0x5a0 bytes"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept add -f extension -c multicast_filter \
	    03:00:00:20:00:00 03:00:00:20:00:00
	$bnept add -f extension -c unknown -l 0xa -v 0x7f
	$bnept send -D $2 -t BNEP_GENERAL_ETHERNET
	$bnept reset
	;;
	
    bnep3.18)
    	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"	
	    exit
	fi    
	echo "$TESTCASE"
	echo " Type: General ethernet to $2 on $ethif"
	echo " Extension: Unknown Type: 0x7f Length: 0x56"
	echo " Extension: Unknown Type: 0x7f Length: 0x56"
	echo "  Header: 0x3c = 60 bytes"
	echo "  Packet: 0x5a0 bytes"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
 	$bnept add -f extension -c unknown -l 0x56 -v 0x7f
	$bnept add -f extension -c unknown -l 0x56 -v 0x7f
	$bnept send -D $2 -t BNEP_GENERAL_ETHERNET
	$bnept reset
	;;
	
    bnep3.19)
    	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"	
	    exit
	fi    
	echo "$TESTCASE"
	echo " Type: Control message  to $2 on $ethif"
	echo "  Source UUID: PANU 0x1115"
	echo "  Dst UUID:    GN 0x1116"
	echo " Extension: Network Filter 0x8600 - 0x86dd"
	echo " Extension: Multicast Filter "
	echo "            03:00:00:20:00:00 - 03:00:00:20:00:00"
	$bnept reset
	$bnept add -f payload -c connect -s 0x1115 -d 0x1116
	$bnept add -f extension -c protocol_filter 0x8600 0x086dd
	$bnept add -f extension -c multicast_filter \
	    03:00:00:20:00:00 03:00:00:20:00:00
	$bnept send -D $2
	$bnept reset
	;;
	
    bnep3.20)
    	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"	
	    exit
	fi    
	echo "$TESTCASE"
	echo " Type: General ethernet to $2 on $ethif"
	echo "  Header: 0x3c = 60 bytes"
	echo "  Packet: 0x5a0 bytes"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D $2 -t BNEP_GENERAL_ETHERNET
 	$bnept reset
	;;
	
    bnep3.21)
    	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"	
	    exit
	fi    
	echo "$TESTCASE"
	echo " Type: Compressed ethernet to $2 on $ethif"
	echo "  Header:  0x3c  bytes"
	echo "  Pattern: 0x5a0 bytes"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D $2 -t BNEP_COMPRESSED_ETHERNET
	$bnept reset
	;;
	
    bnep3.22)
    	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"	
	    exit
	fi    
	echo "$TESTCASE"    
	echo " Type: Compressed ethernet source only to $2 on $ethif"
	echo "  Header:  0x3c  bytes"
	echo "  Pattern: 0x5a0 bytes"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D $2 -t BNEP_COMPRESSED_ETHERNET_SOURCE_ONLY
	$bnept reset
	;;

    bnep3.23)
    	if test -z $2 ;then
	    echo "Usage(A): tester $TESTCASE <B's BDADDR>"
	    exit
	fi    
	echo "$TESTCASE"
	echo " Type: Compressed ethernet destination only to $2 on $ethif"
	echo "  Header:  0x3c  bytes"
	echo "  Pattern: 0x5a0 bytes"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0 
	$bnept send -D $2 -t BNEP_COMPRESSED_ETHERNET_DEST_ONLY
	$bnept reset
	;;
esac

######################################################################
# PAN Test Cases 3.1.1-3.1.12
######################################################################
case $TESTCASE in
    pan3.1.1)
	echo "$TESTCASE"
	echo " Type: Broadcast via general ethernet packet"
	echo "       and compressed dest. only"
	echo "  Header length: 0x3c"
	echo "  Data length: 0x5a0"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D ff:ff:ff:ff:ff:ff -t BNEP_GENERAL_ETHERNET -p 0x0800
	$bnept reset

	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D ff:ff:ff:ff:ff:ff -t BNEP_COMPRESSED_ETHERNET_DEST_ONLY \
	     -p 0x0800
	$bnept reset
	;;
	
    pan3.1.3)
	echo "$TESTCASE"    
	echo " Type: Unicast via general ethernet packet/dest. only"
	echo "  Header length: 0x3c"
	echo "  Data length: 0x5a0"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D 01:00:5E:FF:FF:FF -t BNEP_GENERAL_ETHERNET -p 0x0800
	$bnept reset

	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D 01:00:5E:FF:FF:FF -t BNEP_COMPRESSED_ETHERNET_DEST_ONLY \
	     -p 0x0800
	$bnept reset
	;;
	
    pan3.1.5)
	if test -z $2 ;then
	    echo "Usage(PANU1): tester $TESTCASE <NT's BDADDR>"	
	    exit
	fi    
	echo "$TESTCASE"
	echo " Type: Unicast via general ethernet packet/dest.only to $2"
	echo "  Header length: 0x3c"
	echo "  Data length: 0x5a0"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D $2 -t BNEP_GENERAL_ETHERNET -p 0x0800
	$bnept reset

	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D $2 -t BNEP_COMPRESSED_ETHERNET_DEST_ONLY -p 0x0800
	$bnept reset
	;;
	
    pan3.1.7)
    	if test -z $2 ;then
	    echo "Usage(PANU1): tester $TESTCASE <PANU2's BDADDR>"	
	    exit
	fi    
    	echo "$TESTCASE"
	echo " Type: Unicast via general ethernet packet"
	echo "  Header length: 0x3c"
	echo "  Data length: 0x2df"
	echo " Extension header:"
	echo "  Unknwon length: 0xff"
	echo "  Unknwon length: 0xff"
	$bnept reset
 	$bnept add -f payload -c data -h 0x3c -l 0x34d
	$bnept add -f extension -c control -l 0xfe -v 0x55
	$bnept add -f extension -c unknown -l 0xff -v 0x55
	$bnept add -f extension -c unknown -l 0xff -v 0x7f
	$bnept send -D $2 -t BNEP_GENERAL_ETHERNET -p 0x0800
	$bnept reset
	;;
	
    pan3.1.8)
	if test -z $2 ;then
	    echo "Usage(PANU1): tester $TESTCASE <PANU2's BDADDR>"	
	    exit
	fi        
	echo "$TESTCASE"
	echo " Type: Unicast via general ethernet packet"
	echo "  Header length: 0x3c"
	echo "  Data length: 0x5a0"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D $2 -t BNEP_GENERAL_ETHERNET -p 0x0800
	$bnept reset

	echo " Type: Unicast via dest only"
	echo "  Header length: 0x3c"
	echo "  Data length: 0x5a0"   
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D $2 -t BNEP_COMPRESSED_ETHERNET_DEST_ONLY -p 0x0800
	$bnept reset
	;;
	
    pan3.1.9)
	echo "$TESTCASE"
	echo " Type: Broadcast General ethernet"
	echo "  Header length: 0x3c"
	echo "  Data length: 0x5a0"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D ff:ff:ff:ff:ff:ff -t BNEP_GENERAL_ETHERNET -p 0x0800
	$bnept reset
    
	echo " Type: Broadcast dest. only"
	echo "  Header length: 0x3c"
	echo "  Data length: 0x5a0"
	$bnept reset
	$bnept add -f payload -c data -h 0x3c -l 0x5a0
	$bnept send -D ff:ff:ff:ff:ff:ff -t BNEP_COMPRESSED_ETHERNET_DEST_ONLY \
	    -p 0x0800
	$bnept reset
	;;
	
    pan3.1.10)
    	if test -z $2 ;then
	    echo "Usage(PANU2): tester $TESTCASE setfilter <NAP's BDADDR>"
	    echo "Usage(PANU1): tester $TESTCASE send"
	    exit
	fi
	case $2 in
	    setfilter)
	    	echo "$TESTCASE"
		echo " Type: Multicast filter message to $3"
		echo " Filter: 03:00:02:30:00:02 03:00:02:30:00:04"
		echo " Filter: 03:00:02:30:00:06 03:00:02:30:00:08"
		$bnept reset
		$bnept add -f payload -c multicast_filter \
		    03:00:02:30:00:02 03:00:02:30:00:04 \
		    03:00:02:30:00:06 03:00:02:30:00:08
		$bnept send -D $3
		$bnept reset
		;;
	    send)
		echo "$TESTCASE"
		echo " Type: Multicast via general ethernet packet"
		echo "             03:00:02:30:00:00 - 03:00:02:30:00:04"
		echo "  Header length: 0x3c"
		echo "  Data length: 0x5a0"
		for i in 0 1 2 3 4 5 6 7 8 9; do
		  $bnept reset
		  $bnept add -f payload -c data -h 0x3c -l 0x05a0
		  $bnept send -D 03:00:02:30:00:0$i -p 0x0800 \
			-t BNEP_GENERAL_ETHERNET
		  $bnept reset
		done
		;;
	esac
	;;
	
    pan3.1.11)
    	if test -z $3 ;then
	    echo "Usage(PANU2): tester $TESTCASE setfilter <NAP's BDADDR>"
	    echo "Usage(PANU1): tester $TESTCASE send <PANU2's BDADDR>"	    
	    exit
	fi
	case $2 in
	    setfilter)
	    	echo "$TESTCASE"
		echo " Type: Network filter message to $3"
		echo "  Filter: 0x0802 - 0x0804"
		echo "  Filter: 0x0806 - 0x0806"
		$bnept reset
		$bnept add -f payload -c protocol_filter \
		    0x0802 0x0804 0x0806 0x0808
		$bnept send -D $3
		$bnept reset
		;;
	    send)
		echo "$TESTCASE"
		echo " Type: Unicast via general ethernet packet Protocol "
		echo "                 0x0800 - 0x0809 to $3"
		echo "  Header length: 0x3c"
		echo "  Data length: 0x5a0" 
		for i in 0 1 2 3 4 5 6 7 8 9; do
		    $bnept reset
		    $bnept add -f payload -c data -h 0x3c -l 0x05a0
		    $bnept send -D $3 -p 0x080$i -t BNEP_GENERAL_ETHERNET
		    $bnept reset
		done
		;;
	esac
	;;
	
    pan3.1.12)
    	if test -z $3 ;then
	    echo "Usage(PANU2): tester $TESTCASE setfilter <NAP's BDADDR>"
	    echo "Usage(PANU1): tester $TESTCASE send <PANU2's BDADDR>"	    
	    exit
	fi    
	case $2 in
	    setfilter)
	    	echo "$TESTCASE"
		echo " Type: Network filter message to $3"
		echo "  Filter: 0x0802 - 0x0804"
		echo "  Filter: 0x0806 - 0x0808"
		$bnept reset
		$bnept add -f payload -c protocol_filter \
		    0x0802 0x0804 0x0806 0x0808
		$bnept send -D $3
		$bnept reset
		;;
	    send)
	    	echo "$TESTCASE"
		echo " Type: Unicast via general ethernet packet to $3"
		echo "  Protool: 0x0800 - 0x0809 [802.1p]"
		echo "  Header length: 0x38"
		echo "  Data length: 0x5a0"
		for i in 0 1 2 3 4 5 6 7 8 9; do
		    $bnept reset
		    $bnept add -f payload -c data -h 0x38 -l 0x05a0
		    $bnept send -D $3 -p 0x080$i -P -t BNEP_GENERAL_ETHERNET
		    $bnept reset
		done
		;;
	esac
	;;
esac


