IPv4

An IPv4 address

Constructors

this
this(uint netOrder)
this(ubyte[4] bytes)
this(in_addr ia)
this(string dottedString)

Construct an IPv4 address

Members

Functions

isInSubnet
bool isInSubnet(IPv4 host, IPv4 mask)

Returns whether our IP and host are in the same network

isMask
bool isMask()

Return whether current address is a valid mask address

maskBits
ubyte maskBits()

Return how many bits in the current mask

opAssign
typeof(this) opAssign(uint netOrder)
typeof(this) opAssign(ubyte[4] bytes)
typeof(this) opAssign(in_addr ia)
typeof(this) opAssign(string dottedString)

Assignment

opBinary
IPv4 opBinary(IPv4 rhs)

Return the intersection of the two addresses

toString
string toString()

Return a GC allocated string for the address (dot notation)

Properties

hostOrder
uint hostOrder [@property getter]

Return the address in host order

isValid
bool isValid [@property getter]

Is the address a valid one

netOrder
uint netOrder [@property getter]

Return the address in network order

Static functions

mask
IPv4 mask(ubyte bits)

Return a mask corresponding to a network of 2^^bits addresses

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

any
enum IPv4 any;

"Any" address (for local binding)

broadcast
enum IPv4 broadcast;

Broadcast address

loopback
enum IPv4 loopback;

Lookpack address

none
enum IPv4 none;

No address

Meta