Algorithm-ToNumberMunger
view release on metacpan or search on metacpan
lib/Algorithm/ToNumberMunger.pm view on Meta::CPAN
field.) Numeric inputs are not passed through.
=head2 aws_event_type_enum
{ munger => 'aws_event_type_enum', default => -1 }
Named-map enum (lookup rules as L</dns_rcode_enum>) for the CloudTrail
C<eventType>: C<AwsApiCall> 0, C<AwsServiceEvent> 1, C<AwsConsoleAction> 2,
C<AwsConsoleSignIn> 3, C<AwsCloudTrailInsight> 4. C<AwsConsoleSignIn> is the
one worth flagging. Numeric inputs are not passed through.
=head2 conditional_access_result_enum
{ munger => 'conditional_access_result_enum', default => -1 }
Named-map enum (lookup rules as L</dns_rcode_enum>) for the Azure AD sign-in
C<conditionalAccessStatus>: C<success> 0, C<notApplied> 1, C<notEnabled> 2,
C<reportOnly> 3, C<failure> 4. Numeric inputs are not passed through.
=cut
# Named-map enums: baked-in value->number maps for well-known registries,
# registered as "<name>_enum". Keys are stored lowercase; lookup lowercases
# the input, giving the case-insensitive matching the POD promises. 'numeric'
# says whether a numeric input is passed through as-is -- set only where the
# numbers are the protocol's own encoding (a qtype 28 IS AAAA on the wire);
# where they are ordinals of our own invention (tls_version, the method
# enums), passthrough would mix scales, so a number croaks like any other
# unmapped value.
# SASL mechanism names, ordered weakest-to-strongest, for sasl_mech_enum. The
# same set is numbered alphabetically for sasl_mech_iana_enum, so the two
# mungers can never end up covering different mechanisms. Includes the IANA
# registry plus the ubiquitous non-registered login/xoauth2/apop.
my @SASL_MECHS_BY_STRENGTH = qw(
anonymous plain login
apop cram-md5 digest-md5 ntlm skey otp securid rpa kerberos_v4
srp scram-sha-1 scram-sha-1-plus scram-sha-256 scram-sha-256-plus
xoauth2 oauthbearer openid20 saml20
gssapi gs2-krb5 gss-spnego external
);
my %NAMED_ENUM = (
dns_rcode => {
numeric => 1,
map => {
noerror => 0,
formerr => 1,
servfail => 2,
nxdomain => 3,
notimp => 4,
notimpl => 4,
refused => 5,
yxdomain => 6,
yxrrset => 7,
nxrrset => 8,
notauth => 9,
notzone => 10,
dsotypeni => 11,
badvers => 16,
badsig => 16,
badkey => 17,
badtime => 18,
badmode => 19,
badname => 20,
badalg => 21,
badtrunc => 22,
badcookie => 23,
},
},
dns_qtype => {
numeric => 1,
map => {
a => 1,
ns => 2,
cname => 5,
soa => 6,
mb => 7,
mg => 8,
mr => 9,
'null' => 10,
wks => 11,
ptr => 12,
hinfo => 13,
minfo => 14,
mx => 15,
txt => 16,
rp => 17,
afsdb => 18,
sig => 24,
key => 25,
aaaa => 28,
loc => 29,
srv => 33,
naptr => 35,
kx => 36,
cert => 37,
dname => 39,
opt => 41,
ds => 43,
sshfp => 44,
ipseckey => 45,
rrsig => 46,
nsec => 47,
dnskey => 48,
dhcid => 49,
nsec3 => 50,
nsec3param => 51,
tlsa => 52,
smimea => 53,
hip => 55,
cds => 59,
cdnskey => 60,
openpgpkey => 61,
csync => 62,
zonemd => 63,
svcb => 64,
https => 65,
eui48 => 108,
eui64 => 109,
tkey => 249,
( run in 2.181 seconds using v1.01-cache-2.11-cpan-6de40a662fe )