/trunk_oldversion/_test/.htaccess |
---|
0,0 → 1,25 |
# https://stackoverflow.com/a/26155051/488539 |
# Redirect to HTTPS |
RewriteEngine on |
RewriteCond %{HTTPS} off |
RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} [R,L] |
# Authenticate users only when using HTTPS |
<If "%{HTTPS} == 'on'"> |
AuthType Basic |
AuthName "ViaThinkSoft" |
AuthUserFile /home/daniel-marschall/.htpasswd |
# Prevent this 'Require' directive from overriding any merged previously |
<IfVersion >= 2.4> |
AuthMerging And |
</IfVersion> |
Require valid-user |
</If> |
# --- |
RewriteEngine Off |
RewriteOptions Inherit |
Options +Indexes |
/trunk_oldversion/_test/db_test/statmon_v1_siehe_todo_eintrag |
---|
0,0 → 1,78 |
[1.3.6.1.4.1.37476.2.5.1.1.2] |
oid:.1.3.6.1.4.1.37476.2.1 [in]attribute:draft |
oid:.1.3.6.1.4.1.37476.2.1 identifier:statmon |
oid:.1.3.6.1.4.1.37476.2.1 identifier:statusmon |
oid:.1.3.6.1.4.1.37476.2.1 attribute:draft |
oid:.1.3.6.1.4.1.37476.2.1 identifier:statusmon |
oid:.1.3.6.1.4.1.37476.2.1 identifier:statusMonitor |
oid:.1.3.6.1.4.1.37476.2.1 unicodelabel:StatusMonitor |
oid:.1.3.6.1.4.1.37476.2.1 description:ViaThinkSoft Status Monitor Communication Interface |
oid:.1.3.6.1.4.1.37476.2.1 specification:http://www.viathinksoft.de/documents/specification/statusmon/ |
oid:.1.3.6.1.4.1.37476.2.1 allocated:daniel-marschall@viathinksoft.de 2011-03-22 |
# --- Version 1 |
oid:.1.3.6.1.4.1.37476.2.1.1 identifier:v1 |
#oid:.1.3.6.1.4.1.37476.2.1.1.1 [in]*invisible:1 |
oid:.1.3.6.1.4.1.37476.2.1.1.1 allocated:daniel-marschall@viathinksoft.de 2011-03-22 |
oid:.1.3.6.1.4.1.37476.2.1.1.1 description:Monitor states |
oid:.1.3.6.1.4.1.37476.2.1.1.1 description:All child OIDs are leaf OIDs. |
oid:.1.3.6.1.4.1.37476.2.1.1.1 identifier:states |
#oid:.1.3.6.1.4.1.37476.2.1.1.1 [in]attribute:canceled |
# TODO: warum wird "draft" nicht weiter durchgeschleift? |
oid:.1.3.6.1.4.1.37476.2.1.1.1 [in]attribute:draft |
oid:.1.3.6.1.4.1.37476.2.1.1.1 maxdepth:1 |
oid:.1.3.6.1.4.1.37476.2.1.1.1 todo:rename into state ? |
oid:.1.3.6.1.4.1.37476.2.1.1.1 unicodelabel:States |
oid:.1.3.6.1.4.1.37476.2.1.1.1.1 allocated:daniel-marschall@viathinksoft.de 2011-03-26 |
oid:.1.3.6.1.4.1.37476.2.1.1.1.1 attribute:LEAF |
oid:.1.3.6.1.4.1.37476.2.1.1.1.1 description:Everything is OK |
oid:.1.3.6.1.4.1.37476.2.1.1.1.1 identifier:ok |
oid:.1.3.6.1.4.1.37476.2.1.1.1.1 unicodelabel:OK |
oid:.1.3.6.1.4.1.37476.2.1.1.1.2 allocated:daniel-marschall@viathinksoft.de 2011-03-26 |
oid:.1.3.6.1.4.1.37476.2.1.1.1.2 attribute:LEAF |
oid:.1.3.6.1.4.1.37476.2.1.1.1.2 description:A warning is thrown |
oid:.1.3.6.1.4.1.37476.2.1.1.1.2 identifier:warning |
oid:.1.3.6.1.4.1.37476.2.1.1.1.2 unicodelabel:WARNING |
oid:.1.3.6.1.4.1.37476.2.1.1.1.3 allocated:daniel-marschall@viathinksoft.de 2011-03-26 |
oid:.1.3.6.1.4.1.37476.2.1.1.1.3 attribute:LEAF |
oid:.1.3.6.1.4.1.37476.2.1.1.1.3 description:Severity of the state (0 = OK, >0 = Warning) |
oid:.1.3.6.1.4.1.37476.2.1.1.1.3 identifier:severity |
oid:.1.3.6.1.4.1.37476.2.1.1.1.3 unicodelabel:SEVERITY |
oid:.1.3.6.1.4.1.37476.2.1.1.1.4 allocated:daniel-marschall@viathinksoft.de 2011-03-26 |
oid:.1.3.6.1.4.1.37476.2.1.1.1.4 attribute:LEAF |
oid:.1.3.6.1.4.1.37476.2.1.1.1.4 description:Notification when constant changes |
oid:.1.3.6.1.4.1.37476.2.1.1.1.4 identifier:constant |
oid:.1.3.6.1.4.1.37476.2.1.1.1.4 unicodelabel:CONSTANT |
oid:.1.3.6.1.4.1.37476.2.1.1.1.5 allocated:daniel-marschall@viathinksoft.de 2011-03-26 |
oid:.1.3.6.1.4.1.37476.2.1.1.1.5 attribute:LEAF |
oid:.1.3.6.1.4.1.37476.2.1.1.1.5 description:A picture which has to be monitored visually |
oid:.1.3.6.1.4.1.37476.2.1.1.1.5 identifier:picture |
oid:.1.3.6.1.4.1.37476.2.1.1.1.5 unicodelabel:PICTURE |
oid:.1.3.6.1.4.1.37476.2.1.1.1.6 allocated:daniel-marschall@viathinksoft.de 2011-03-26 |
oid:.1.3.6.1.4.1.37476.2.1.1.1.6 attribute:LEAF |
oid:.1.3.6.1.4.1.37476.2.1.1.1.6 description:Sends a message without changing the client monitor state |
oid:.1.3.6.1.4.1.37476.2.1.1.1.6 identifier:message |
oid:.1.3.6.1.4.1.37476.2.1.1.1.6 unicodelabel:MESSAGE |
oid:.1.3.6.1.4.1.37476.2.1.1.1.100 allocated:daniel-marschall@viathinksoft.de 2011-03-26 |
oid:.1.3.6.1.4.1.37476.2.1.1.1.100 attribute:LEAF |
oid:.1.3.6.1.4.1.37476.2.1.1.1.100 description:A temporary internal error prevents the Status Monitor to provide the current state of the service. This error is equivalent to a HTTP 500 response. |
oid:.1.3.6.1.4.1.37476.2.1.1.1.100 description:ERROR_INTERNAL [text (optional)] |
oid:.1.3.6.1.4.1.37476.2.1.1.1.100 identifier:error-internal |
oid:.1.3.6.1.4.1.37476.2.1.1.1.100 unicodelabel:ERROR_INTERNAL |
oid:.1.3.6.1.4.1.37476.2.1.1.1.101 allocated:daniel-marschall@viathinksoft.de 2011-03-26 |
oid:.1.3.6.1.4.1.37476.2.1.1.1.101 attribute:LEAF |
oid:.1.3.6.1.4.1.37476.2.1.1.1.101 description:ERROR_ARGUMENTS [text (optional)] |
oid:.1.3.6.1.4.1.37476.2.1.1.1.101 description:This error indicates that the client has provided illegal arguments (= GET parameters) to the Status Monitor. |
oid:.1.3.6.1.4.1.37476.2.1.1.1.101 identifier:error-arguments |
oid:.1.3.6.1.4.1.37476.2.1.1.1.101 unicodelabel:ERROR_ARGUMENTS |
/trunk_oldversion/_test/db_test/test1/test2/_hdl.db |
---|
0,0 → 1,9 |
[1.3.6.1.4.1.37476.2.5.1.1.2] |
:HDL-VTS ??-name(1):ViaThinkSoft |
:HDL-VTS ??-tel(2):(VTS TEL) |
:HDL-VTS ??-fax(3):(VTS FAX) |
:HDL-MAR ??-name(1):Daniel Marschall |
:HDL-MAR ??-tel(1):(MAR TEL) |
/trunk_oldversion/_test/db_test/test1/test2/test.db |
---|
0,0 → 1,69 |
[1.3.6.1.4.1.37476.2.5.1.1.2] |
#:TEST_MACRO identifier:__FU__ |
#oid:.2.999 [xt]identifier:TEST_MACRO |
oid:.2.999 identifier:ax |
oid:.2.999 desc:OIDAx |
oid:.2.999.3 identifier:ax |
oid:.2.999.3 identifier:bx |
oid:.2.999.3 identifier:cx |
oid:.2.999.3 desc:OIDAx |
#test |
oid:.2.999.3.4 [co]identifier:ax |
oid:.2.999.3.4 [co]read-auth(plain):8888 |
oid:.2.999.3.4 [co]desc:OIDAx |
oid:.2.999.1.2.3 identifier:a |
oid:.2.999.1.2.03 desc:OIDA |
oid:.2.999.1.2.3.4 identifier:b |
oid:.2.999.1.2.3.4 desc:OIDB |
oid:.2.999.1.2.3.4.5 identifier:c |
oid:.2.999.1.2.3.4.5 desc:OIDC |
oid:.2.999.1.2.3.4.5 index(str):hello |
oid:.2.999.1.2.3.4.6 identifier(abc,def,xxx):d |
oid:.2.999.1.2.3.4.6 desc(abc):OIDD |
oid:.2.999.1.2.3.4.6.7.8.9.10 identifier(abc,def,xxx):d |
oid:.2.999.1.2.3.4.6.7.8.9.10 desc(abc):OIDD |
oid:.2.999.1.2.3.4.6.7.8.9.10.11 identifier(abc,def,xxx):d |
oid:.2.999.1.2.3.4.6.7.8.9.10.11 desc(abc):OIDD |
oid:.2.999.1.2.3.4.6.7.8.9.10.11.12 identifier(abc,def,xxx):d |
oid:.2.999.1.2.3.4.6.7.8.9.10.11.12 desc(abc):OIDD |
.2.888.1.2.4 identifier:x |
.2.888.1.2.4 desc:OIDx |
.2.9.99 desc:zero |
.2.9.99 identifier:xxy |
.2 [xt][in]ra(123):HDL-VTS |
oid:.2.123.1 desc:extend test |
oid:.2.123.1 [xt][in]ra(45):HDL-MAR |
#oid:.2.123.1 [xt][in]raWithXTin:HDL-DMX |
#oid:.2.123.1 [xt]raWithXT:HDL-DMX |
#oid:.2.123.1 [in]raWithIN:myIn |
#oid:.2.123.1 [xt][in]raWithXTin:NOT-EXISTING |
oid:.2.123.1.2 desc:Extended |
oid:.2.123.1.2 raWithXTin:ferdina |
oid:.2.123.1.2.3 desc:Extended 3 |
oid:.2.123.1.2.3 raWithXTin:nomnomnom |
oid:.2.123.1.2.3.4 desc:Extended 4 |
oid:.2.123.1.2.3.4 raWithXTin:eraeraera |
# todo |
. ra(1)[in][xt]:C_MAR |
. (2)ra[in][xt]:C_VTS |
# . 1.ra(1)-date:2013 |
/trunk_oldversion/_test/find_common_root.php |
---|
0,0 → 1,78 |
<?php |
$roots = array(); |
#$roots[] = '.2.25.123'; |
#$roots[] = '.2.25.456'; |
$roots[] = '.1.3.6.1.4'; |
$roots[] = '.1.3.6.1.4.1.1234'; |
$roots[] = '.1.3.6.1.4.1.5678.2'; |
$hiarc = -1; |
foreach ($roots as $r) { |
$c = explode('.', $r); |
$z = count($c); |
if ($z > $hiarc) $hiarc = $z; |
} |
echo "Hiarc: $hiarc\n"; |
$cr = ''; |
for ($i=1; $i<$hiarc; $i++) { |
$eq = null; |
$diff = false; |
echo "--- $i ---\n"; |
foreach ($roots as $r) { |
$c = explode('.', $r); |
$t = $c[$i]; |
if (is_null($eq)) { |
$eq = $t; |
} else { |
if ($eq != $t) { |
echo "Chk: $eq != $t\n"; |
$diff = true; |
break; |
} |
} |
} |
if ($diff) { |
$c = explode('.', $roots[0]); |
$o = array(); |
for ($j=$i-2; $j>=0; $j--) { |
$o[] = $c[$j]; |
} |
$o = array_reverse($o); |
$cr = implode('.', $o); |
# if ($cr == '') $cr = '.'; |
echo "Common root: ".$cr."\n";; |
break; |
} |
} |
$zzz = array(); |
$zzz[$cr] = true; |
foreach ($roots as $r) { |
echo "Proc $r ($cr)\n"; |
$r = substr($r, strlen($cr)); |
# $r = substr($r, 1).'.'; |
# $r = $cr.'.'.substr($r, 0, strpos($r, '.')); |
$v = explode('.', $r); |
array_pop($v); |
print_r($v); |
$a = $cr; |
foreach ($v as $vv) { |
$a .= 'x'.$vv; |
$zzz[$a] = true; |
} |
echo "\n"; |
} |
foreach ($zzz as $z => $x) { |
echo "X = $z\n"; |
} |
?> |
/trunk_oldversion/_test/mapping_test.php |
---|
0,0 → 1,58 |
<?php |
# Algorithm as specified by .1.3.6.1.4.1.37476.3.2.3.1 |
define('BASE64_CHARS', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='); |
function identifierToNumber($identifier) { |
if ($identifier == '') return '99'; |
$out = ''; |
$identifier = utf8_encode($identifier); |
$identifier = base64_encode($identifier); |
for ($i=0; $i<strlen($identifier); $i++) { |
$p = $identifier[$i]; |
$p = strpos(BASE64_CHARS, $p); |
$p = str_pad($p, 2, '0', STR_PAD_LEFT); |
$out .= $p; |
} |
return $out; |
} |
function numberToIdentifier($number) { |
if ($number == '99') return ''; |
if (strlen($number)%2 != 0) return false; |
$out = ''; |
for ($i=0; $i<=strlen($number); $i+=2) { |
$n = substr($number, $i, 2); |
$out .= substr(BASE64_CHARS, $n, 1); |
} |
$out = base64_decode($out); |
$out = utf8_decode($out); |
return $out; |
} |
function javaPackageNameToOID($identifier) { |
$out = '2.999'; |
$ary = explode('.', $identifier); |
foreach ($ary as $a) { |
$out .= '.'.identifierToNumber($a); |
} |
return $out; |
} |
function OIDToJavaPackageName($oid) { |
$oid = preg_replace('@^2\\.999\\.@', '', $oid, -1, $c); |
if ($c == 0) return false; |
$out = array(); |
$ary = explode('.', $oid); |
foreach ($ary as $a) { |
$out[] = numberToIdentifier($a); |
} |
return implode('.', $out); |
} |
$x = javaPackageNameToOID('test.de.viathinksoft.java.example...'); |
echo OIDToJavaPackageName($x); |
?> |
/trunk_oldversion/_test/various_tests.php |
---|
0,0 → 1,72 |
<?php |
include_once __DIR__ . '/../includes/oid_plus.inc.php'; |
# ------------------------------------------ |
header('Content-Type:text/plain'); |
$db = new OIDPlus(); |
$db->addDir(__DIR__ . '/../db'); |
/* |
#echo "--------- Resolving identifiers\n"; |
#var_dump($db->resolveIdentifiers('.2.999.ax.ax.1.2.3')); |
#echo "--------- Debug \n"; |
#$db->debug(); |
#echo "--------- Roots \n"; |
#$r = $db->findRoots(); |
#print_r($r); |
#echo "--------- Find hello (str) \n"; |
#var_dump($db->findOID('hello')); |
#echo "--------- Children .2.999 \n"; |
#print_r($db->listChildren('.2.999')); |
#echo "--------- Children . \n"; |
#print_r($db->listChildren('.')); |
#echo "--------- Rec show . \n"; |
#$db->rec_show('.'); |
# echo "--------- Rec show .2.999 \n"; |
# $db->rec_show('.2.999', 1); |
echo "--------- Help \n"; |
$db->query('help'); |
echo "--------- List \n"; |
$db->query('oidplus:!list #7,8888,3'); |
echo "--------- Domain \n"; |
$db->query('oidplus:viathinksoft.de'); |
echo "--------- IP\n"; |
$db->query('oidplus:2001:1af8:4100:a061:0001::1336'); |
echo "--------- IP\n"; |
$db->query('oidplus:2001:1af8:4100:a061:0001::1337/127'); |
echo "--------- IP\n"; |
$db->query('oidplus:2001:1af8:4100:a061:0001::1337'); |
#echo "--------- Misc \n"; |
#$db->query('oidplus: hello world #0123 '); |
#$db->query('oidplus: hello world '); |
echo "--------- WELCOME\n"; |
$db->query('oidplus:!help'); |
$db->query('oidplus:!list'); |
$db->query('oidplus:!listIndexes'); |
$db->query('oidplus:.2.999.1'); |
*/ |
$db->query('oidplus:.1.3.6.1.4.1.37476.30.1.1.1.1.1812847950.1'); |
?> |
/trunk_oldversion/_test/vts-oid-mapping |
---|
0,0 → 1,39 |
ViaThinkSoft OID Mapping |
Instead of using a namebased UUID to map identifiers to the OID tree (in arc 2.25), |
this mapping mechanism allows to resolve an OID back into its original |
identifier. |
Mapping stringToNumber: .1.3.6.1.4.1.37476.3.2.3.1 |
mapping(50) |
misc(0) |
nid<base64>??? |
sub-nid<base64>??? |
...??? |
id<base64> |
urn(1) |
nid<base64> |
sub-nid<base64> |
... |
id<base64> |
doi(2) |
10 |
org1000(1000) |
id<base64> |
...??? <-- ein feld "no-full-doi" => keine url zeigen |
javapackage(3) |
nid<base64> |
... |
nid<base64> |
ipv4 |
??? |
ipv6 |
??? |
isbn |
10 |
<isbn> |
13 |
<isbn> |