Skip to content

Semantics of lookup of CIDR #9

@dfn-certling

Description

@dfn-certling

I just found out that you can try to look up a CIDR in the SubnetTree. But it seems to just take the network part, complete it with zeros and look up that address. Is their some (documented or undocumented) semantics attached to this? It was a bit confusing for me to discover:

import SubnetTree
tree = SubnetTree.SubnetTree()
tree['10.0.0.0/16'] = 'Test net'
print t['10.0.0.0/8']
-> Test net

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions