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)
Adds a single 32-bit address to the permissions with no port rules.
public void addIP(int flags, int addr);
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. |
Adds a single 32-bit address to the permissions with the specified port rules.
public void addIP(int flags, int addr, IntRanges ports);
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. |
Adds a single address to the permissions with no port rules.
public void addIP(int flags, byte[] addr);
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. |
Adds a single address to the permissions with the specified port rules.
public void addIP(int flags, byte[] addr, IntRanges ports);
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. |