FMLiveSwitchIPNetwork Class Reference

An IP network. More...

Instance Methods

(NSString *) - address
 Gets the address. More...
 
(NSString *) - description
 Returns a string that represents this instance. More...
 
(NSString *) - mask
 Gets the mask. More...
 
(bool) - matchesWithAddress:
 Checks if an address exists in this network. More...
 
(int) - prefixLength
 Gets the prefix length. More...
 

Class Methods

(FMLiveSwitchIPNetwork *) + parseWithCidr:
 Parses a CIDR. More...
 
(bool) + tryParseWithCidr:network:
 Tries to parse a CIDR. More...
 

Detailed Description

An IP network.

Method Documentation

◆ address

- (NSString*) address

Gets the address.

◆ description

- (NSString*) description

Returns a string that represents this instance.

Returns
A string that represents this instance.

◆ mask

- (NSString*) mask

Gets the mask.

◆ matchesWithAddress:

- (bool) matchesWithAddress: (NSString *)  address

Checks if an address exists in this network.

Parameters
addressThe address.
Returns
true if the address exists in this network; otherwise, false.

◆ parseWithCidr:

+ (FMLiveSwitchIPNetwork*) parseWithCidr: (NSString *)  cidr

Parses a CIDR.

Parameters
cidrThe CIDR.
Returns
The IP network.

◆ prefixLength

- (int) prefixLength

Gets the prefix length.

◆ tryParseWithCidr:network:

+ (bool) tryParseWithCidr: (NSString *)  cidr
network: (FMLiveSwitchIPNetwork **)  network 

Tries to parse a CIDR.

Parameters
cidrThe CIDR.
networkThe IP network.
Returns
true if successful; otherwise, false.