protected function getMask(/*# int */ $length = 32)/*# : int */
    {
        $bin = substr(str_repeat('1', $length) . str_repeat('0', 32), 0, 32);
        return ip2long(long2ip(bindec($bin)));
    }