alananax.blogg.se

Maxmind support
Maxmind support





maxmind support

The merge strategy can be changed on a per-insert basis by using the merge_strategy argument when inserting a network as discussed above.

Maxmind support plus#

For instance, the 1.2.3.255/32 network will end up with its data plus the data provided for the 1.2.3.0/24 network, while 1.2.3.0 - 1.2.3.254 will have the expected data. When merge_strategy is not none, then records will be merged based on the particular strategy. In this scenario, if you want to make sure that no data is overwritten then you need to sort your input by network prefix length. On the other hand, if you insert 1.2.3.255/32 last, then the tree will be split so that the 1.2.3.0 - 1.2.3.254 range has different data than 1.2.3.255. When merge_strategy is none, the last insert "wins". This make the merge strategy for the insert add-only-if-parent-exists. This make the merge strategy for the insert none. When set, the tree's default merge strategy will be overridden for the insertion with this merge strategy. $additional_args is a hash reference containing additional arguments that change the behavior of the insert. It can also handle unsigned 64-bit and 128-bit integers if they are passed as Math::UInt128 objects. The short overview is that anything that can be encoded in JSON can be stored in an MMDB file. The $data payload is encoded according to the MaxMind DB database format spec. The second can be any Perl data structure (except a coderef, glob, or filehandle). $tree->insert_network( $network, $data, $additional_args ) Reserved networks that are globally routable to an individual device, such as Teredo, may still be added. Inserting a network containing them does not throw an exception, but no information will be stored for the reserved sections. If this is true, reserved networks may not be inserted.Īttempts to insert these networks or any inside them will be silently ignored. Only merges into the original IPv4 location, ::/96, will be followed. To insert an IPv4 address, insert it using IPv4 notation or insert directly into ::/96.Īliased nodes are not followed when merging nodes. Inserting a network containing them does not throw an exception, but no information will be stored for the aliased locations. When aliasing is enabled, insertions into the aliased locations will throw an exception. Note that lookups for Teredo ranges will find the Teredo server's IPv4 address, not the client's IPv4. If this is true then the final database will map some IPv6 ranges to the IPv4 range. If merge_record_collisions is true, this defaults to toplevel otherwise, it defaults to none. In all merge strategies attempting to merge two differing data structures causes an exception. This option is intended to be used when inserting data that supplements existing data but that is not independently useful. My $tree = MaxMind::DB::Writer::Tree->new(ĭescription => is inserted, only child_a, not child_b, will appear in the merged record. Version 0.300003 SYNOPSIS use MaxMind::DB::Writer::Tree MaxMind::DB::Writer::Tree - Tree representing a MaxMind DB database in memory - then write it to a file VERSION MaxMind::DB::Writer::Tree->new_from_frozen_tree().$tree->insert_range( $first_ip, $last_ip, $data, $additional_args ).$tree->insert_network( $network, $data, $additional_args ).







Maxmind support