Сценарий для запуска программы формирования ST пакетов
#!/bin/sh
#
# Copyright 2001 Vladislav V. Myasnyankin, Yekaterinburg Russia
# hugevlad@yahoo.com http://cybervlad.port5.com
# All rights reserved.
#
# WARNING! Be very careful, because you can occasionaly crash
# your network.
#
# SEE DISCLAMER IN MAIN PROGRAM
#
# note:
# all numbers can be like 00010203040506 or like 00:01:02:03:04:05:06
#
device=eth0 # ethernet device name (default - eth0)
dmac=01:80:C2:00:00:00 # destination MAC (default - 01:80:C2:00:00:00)
smac=00:01:38:00:b4:c7 # source MAC (default - MAC on given
# or default device)
proto_id=0000 # Protocol Identifier (hex, 2 bytes)
proto_v_id=00 # Protocol Version Identifier (hex, 1 byte)
bpdutype=00 # BPDU type (hex, 1 byte)
flags=00 # flags value (hex, 1 byte)
rootid=800000013800b4c7 # Root Identifier (hex, 8 bytes)
rootpc=00000000 # Root Path Cost (hex, 4 bytes)
brid=800000013800b4c7 # Bridge Identifier (hex, 8 bytes)
portid=8002 # Port Identifier (hex, 2 bytes)
mage=0000 # Message Age (hex, 2 bytes)
maxage=1400 # Max Age (hex, 2 bytes)
hellotime=0200 # Hello Time (hex, 2 bytes)
fdelay=0f00 # Forward Delay (hex, 2 bytes)
./stp -v -dev $device -dmac $dmac -smac $smac -protoid $proto_id\
-protovid $proto_v_id -bpdu $bpdutype -flags $flags\
-rootid $rootid -rootpc $rootpc -brid $brid -portid $portid\
-mage $mage -maxage $maxage -htime $hellotime -fdelay $fdelay