Interface nsINetAddrType

nsINetAddr

This interface represents a native NetAddr struct in a readonly interface.

Hierarchy

Properties

address: string

Returns

Either the IP address (FAMILY_INET, FAMILY_INET6) or the path (FAMILY_LOCAL) in string form. IP addresses are in the format produced by mozilla::net::NetAddr::ToStringBuffer.

Note: Paths for FAMILY_LOCAL may have length limitations which are implementation dependent and not documented as part of this interface.

family: number

Returns

the address family of the network address, which corresponds to one of the FAMILY_ constants.

flow: number

Returns

the flow label for a FAMILY_INET6 address.

See

http://www.ietf.org/rfc/rfc3697.txt

Throws

NS_ERROR_NOT_AVAILABLE if the address family is not FAMILY_INET6

isV4Mapped: boolean

Returns

whether a FAMILY_INET6 address is mapped from FAMILY_INET.

Throws

NS_ERROR_NOT_AVAILABLE if the address family is not FAMILY_INET6

port: number

Returns

the port number for a FAMILY_INET or FAMILY_INET6 address.

Throws

NS_ERROR_NOT_AVAILABLE if the address family is not FAMILY_INET or FAMILY_INET6.

scope: number

Returns

the address scope of a FAMILY_INET6 address.

See

http://tools.ietf.org/html/rfc4007

Throws

NS_ERROR_NOT_AVAILABLE if the address family is not FAMILY_INET6

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Returns

    the underlying NetAddr struct.

    Returns NetAddr

Generated using TypeDoc