ipam/common.php
2025-05-27 18:06:36 +02:00

47 lines
1.6 KiB
PHP

<?php
$namePtn = "[a-zA-Z_][\w-]*";
$ipPtn = "\d+\.\d+\.\d+\.\d+";
$macPtn = "[\da-f]{2}(?:[:-][\da-f]{2}){5}";
$domainPtn = "[\w-]+(\.[\w-]+)*";
$ifacePtn = "[\w,]+";
$modesPtn = "static|proxy|ra-only|slaac|ra-names|ra-stateless|ra-advrouter|off-link";
$timePtn = "\d+[mhds]";
$commentPtn = "[ \t]*(?:# ?(?<comment>.*))?";
$long_mask = [
0b00000000000000000000000000000000,
0b10000000000000000000000000000000,
0b11000000000000000000000000000000,
0b11100000000000000000000000000000,
0b11110000000000000000000000000000,
0b11111000000000000000000000000000,
0b11111100000000000000000000000000,
0b11111110000000000000000000000000,
0b11111111000000000000000000000000,
0b11111111100000000000000000000000,
0b11111111110000000000000000000000,
0b11111111111000000000000000000000,
0b11111111111100000000000000000000,
0b11111111111110000000000000000000,
0b11111111111111000000000000000000,
0b11111111111111100000000000000000,
0b11111111111111110000000000000000,
0b11111111111111111000000000000000,
0b11111111111111111100000000000000,
0b11111111111111111110000000000000,
0b11111111111111111111000000000000,
0b11111111111111111111100000000000,
0b11111111111111111111110000000000,
0b11111111111111111111111000000000,
0b11111111111111111111111100000000,
0b11111111111111111111111110000000,
0b11111111111111111111111111000000,
0b11111111111111111111111111100000,
0b11111111111111111111111111110000,
0b11111111111111111111111111111000,
0b11111111111111111111111111111100,
0b11111111111111111111111111111110,
0b11111111111111111111111111111111,
];