Microsoft SDK for Java

addIP

The addIP method of the NetIOPermission Class contains the following signatures:

addIP(int flags, int addr)
addIP(int flags, int addr, IntRanges ports)
addIP(int flags, byte[] addr)
addIP(int flags, byte[] addr, IntRanges ports)

addIP(int flags, int addr)

Adds a single 32-bit address to the permissions with no port rules.

Syntax

public void addIP(int flags, int addr);

Parameters

flags The access flags, which consist of two separate flags combined with a logical OR operator (|). The first flag should be BIND, CONNECT, MULTICAST, or ALL_API_FLAGS to specify the connection type. The second flag should be either ALLOW or DENY to indicate whether the address being added should use the include or exclude rules. For convenience, instead using the logical OR operator with the two flags, you can use one of the combination flags: ALLOWALL, DENYALL, ALLOWCONNECT, DENYCONNECT, ALLOWBIND, DENYBIND, ALLOWMULTICAST, or DENYMULTICAST.
addr The 32-bit address.

addIP(int flags, int addr, IntRanges ports)

Adds a single 32-bit address to the permissions with the specified port rules.

Syntax

public void addIP(int flags, int addr, IntRanges ports);

Parameters

flags The access flags, which consist of two separate flags combined with a logical OR operator (|). The first flag should be either BIND or CONNECT to specify the connection type. The second flag should be either ALLOW or DENY to indicate whether the 32-bit address being added should use the include or exclude rules. For convenience, instead of using the logical OR operator with the two flags, you can use one of the combination flags: ALLOWALL, DENYALL, ALLOWCONNECT, DENYCONNECT, ALLOWBIND, or DENYBIND.
addr The 32-bit address.
ports The ports that apply to this rule.

addIP(int flags, byte[] addr)

Adds a single address to the permissions with no port rules.

Syntax

public void addIP(int flags, byte[] addr);

Parameters

flags The access flags, which consist of two separate flags combined with a logical OR operator (|). The first flag should be BIND, CONNECT, MULTICAST, or ALL_API_FLAGS to specify the connection type. The second flag should be either ALLOW or DENY to indicate whether the address being added should use the include or exclude rules. For convenience, instead of using the logical OR operator with the two flags, you can use one of the combination flags: ALLOWALL, DENYALL, ALLOWCONNECT, DENYCONNECT, ALLOWBIND, DENYBIND, ALLOWMULTICAST, or DENYMULTICAST.
addr The address.

addIP(int flags, byte[] addr, IntRanges ports)

Adds a single address to the permissions with the specified port rules.

Syntax

public void addIP(int flags, byte[] addr, IntRanges ports);

Parameters

flags The access flags, which consist of two separate flags combined with a logical OR operator (|). The first flag should be either BIND or CONNECT to specify the connection type. The second flag should be either ALLOW or DENY to indicate whether the 32-bit address range being added should use the include or exclude rules. For convenience, instead of using the logical OR operator with the two flags, you can use one of the combination flags: ALLOWALL, DENYALL, ALLOWCONNECT, DENYCONNECT, ALLOWBIND, or DENYBIND.
addr The 32-bit address.
ports The ports that apply to this rule.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.