Home
non-continguous netmasks in netbsd, 2010-09-13 17:56:21 #

a discussion about non-contiguous netmasks and their various insanity.

I won't pretend to be able to give good examples of how/why to use these things, but it's an interesting read nonetheless.

tags: netbsd



ipf, pf, and NPF, 2010-09-13 08:50:09 #

NetBSD has added a new packet filter to sit along side/improve upon/whatever its already available pf and ipf options. NPF.

It was committed a little while ago, but now it's apparently getting serious.

Also, that message seems to imply that this was another example of sponsored development. Very interesting!

tags: netbsd



neat shell tips from netbsd-current, 2010-09-12 14:00:24 #
Output alignment in build.sh
The above thread has some interesting shell tips using some built-in pattern matching. Here are some examples:
Get the length of a script in a variable with ${#VAR}
        $ echo ${#PATH}
        132
But then we get into some fun with case:
        msg="${1}"
        case "${msg}" in
        ????????????????*)      ;;
        ??????????*)            msg="${msg}      ";;
        ?????*)                 msg="${msg}           ";;
        *)                      msg="${msg}                ";;
        esac
        case "${msg}" in
        ?????????????????????*) ;;
        ????????????????????)   msg="${msg} ";;
        ???????????????????)    msg="${msg}  ";;
        ??????????????????)     msg="${msg}   ";;
        ?????????????????)      msg="${msg}    ";;
        ????????????????)       msg="${msg}     ";;
        esac
        echo "${msg}|"
So now we can do something like:
        for x in 123456789 1234567 123456 12345 1234 123 12 1 123456789012345 12345678901234
        do
          ./spacer.sh $x
        done
and you get:
        123456789            |$
        1234567              |$
        123456               |$
        12345                |$
        1234                 |$
        123                  |$
        12                   |$
        1                    |$
        123456789012345      |$
        12345678901234       |$
Each ? matches a single character and the correct amount of spacing is added to the end of each message for correct alignment.

tags: netbsd



added a feed, 2010-09-10 21:25:18 #
I've just added a feed to this blog.

tags:



first post on django, 2010-09-08 14:19:12 #
This is the first post using the django.

tags:



0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25