diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index cf4a8cb73..ff6a7d0b7 100644 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -212,6 +212,25 @@ None. The above defines 32 classes with MARK values 100-131. Each 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 + + ( << 10 ) | + + /sbin/shorewall has an 'encode' and 'decode' command to translate a + device number, mark pair to/from a classid: + + encode + decode + + 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 ---------------------------------------------------------------------------- diff --git a/Shorewall/shorewall b/Shorewall/shorewall index f02fdf17d..d3231e86f 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -1444,9 +1444,11 @@ usage() # $1 = exit status echo " check [ -e ] [ ]" echo " clear [ -f ]" echo " compile [ -e ] [ -d ] [ ] [ ]" + echo " decode " echo " delete [:] ... " echo " drop
..." echo " dump [ -x ]" + echo " encode " echo " export [ ] [@][:]" echo " forget [ ]" echo " help" @@ -1992,6 +1994,14 @@ case "$COMMAND" in shift 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) get_config [ -n "$debugging" ] && set -x