otupy.types.data.ipv4_addr.IPv4Addr
- class IPv4Addr(ipaddr=None)
Bases:
objectOpenC2 IPv4 Address”
This class implements an IPv4 Address as described in Sec. 3.4.2.8.
The usage of the ipaddress module is compliant to what required in the language specification for IPv4 addresses, especially the following points:
The IPv4 address should be available both in string and binary form
The network representation is an array according to RFC 4632 Sec. 3.1 (host/prefix, host/mask, host/hostmask, etc.)
Methods
- __init__(ipaddr=None)
Initialize IPv4 Address
An IPv4 address is built from a string that uses the common dotted notation. If no IPv4 address is provided, the null address is used (“0.0.0.0”).
- Parameters:
ipaddr – Quad-dotted representation of the IPv4 address.