forked from extern/shorewall_code
Add 'encode' and 'decode' commands
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9940 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
8d450e673c
commit
e076cf00f9
@ -212,6 +212,25 @@ None.
|
|||||||
The above defines 32 classes with MARK values 100-131. Each
|
The above defines 32 classes with MARK values 100-131. Each
|
||||||
class has a guaranteed rate of 1kbit/second.
|
class has a guaranteed rate of 1kbit/second.
|
||||||
|
|
||||||
|
As part of this change, the generation of class ids from mark
|
||||||
|
values has been changed. The class number is now
|
||||||
|
|
||||||
|
( <devnum> << 10 ) | <mask>
|
||||||
|
|
||||||
|
/sbin/shorewall has an 'encode' and 'decode' command to translate a
|
||||||
|
device number, mark pair to/from a classid:
|
||||||
|
|
||||||
|
encode <devnum> <mark>
|
||||||
|
decode <classnum>
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
$ shorewall decode 3172
|
||||||
|
Device = 3 Mark = 100
|
||||||
|
$ shorewall encode 3 100
|
||||||
|
Class number = 3172
|
||||||
|
$
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
N E W F E A T U R E S IN 4 . 3
|
N E W F E A T U R E S IN 4 . 3
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
|
@ -1444,9 +1444,11 @@ usage() # $1 = exit status
|
|||||||
echo " check [ -e ] [ <directory> ]"
|
echo " check [ -e ] [ <directory> ]"
|
||||||
echo " clear [ -f ]"
|
echo " clear [ -f ]"
|
||||||
echo " compile [ -e ] [ -d ] [ <directory name> ] [ <path name> ]"
|
echo " compile [ -e ] [ -d ] [ <directory name> ] [ <path name> ]"
|
||||||
|
echo " decode <classnum>"
|
||||||
echo " delete <interface>[:<host-list>] ... <zone>"
|
echo " delete <interface>[:<host-list>] ... <zone>"
|
||||||
echo " drop <address> ..."
|
echo " drop <address> ..."
|
||||||
echo " dump [ -x ]"
|
echo " dump [ -x ]"
|
||||||
|
echo " encode <devnum> <mark>"
|
||||||
echo " export [ <directory1> ] [<user>@]<system>[:<directory2>]"
|
echo " export [ <directory1> ] [<user>@]<system>[:<directory2>]"
|
||||||
echo " forget [ <file name> ]"
|
echo " forget [ <file name> ]"
|
||||||
echo " help"
|
echo " help"
|
||||||
@ -1992,6 +1994,14 @@ case "$COMMAND" in
|
|||||||
shift
|
shift
|
||||||
restore_command $@
|
restore_command $@
|
||||||
;;
|
;;
|
||||||
|
decode)
|
||||||
|
[ $# -eq 2 ] || usage 1
|
||||||
|
echo "Device = $(($2 >> 10)) Mark = $(($2 & 0x3ff))"
|
||||||
|
;;
|
||||||
|
encode)
|
||||||
|
[ $# -eq 3 ] || usage 1
|
||||||
|
echo "Class Number = $((($2 << 10) | $3))"
|
||||||
|
;;
|
||||||
call)
|
call)
|
||||||
get_config
|
get_config
|
||||||
[ -n "$debugging" ] && set -x
|
[ -n "$debugging" ] && set -x
|
||||||
|
Loading…
Reference in New Issue
Block a user