Aw universe ejection next
Jump to navigation
Jump to search
Minimum requirements | ||
---|---|---|
Added in version 2.2 | ||
SDK | build 14 | |
Universe | build 22 |
int aw_universe_ejection_next (void)
Description
Looks up next blocked IP address in universe ejection database.
Callback
Notes
Only instances owned by the root account (citizen #1 - universe administrators) may use this method.
To scan the entire ejection database, set AW_EJECTION_ADDRESS to 0 and call this method repeatedly until it fails.
Arguments
None
Argument attributes
- AW_EJECTION_ADDRESS
- IP address from which to scan forwards through the database (in network byte order).
Return values
- RC_SUCCESS (1) (2)
- RC_NOT_INITIALIZED (1)
- RC_NO_INSTANCE (1)
- RC_NO_CONNECTION (1)
- The connection to the universe is down.
- RC_DATABASE_ERROR (2)
- RC_NO_SUCH_EJECTION (2)
(1) Possible return values when a callback is installed.
(2) Returned by the universe server.
Returned attributes
- AW_EJECTION_ADDRESS
- AW_EJECTION_CREATION_TIME (1)
- AW_EJECTION_EXPIRATION_TIME
- AW_EJECTION_COMMENT (1)
- (Optional)
(1) Added in version 3.0, SDK build 16 and universe server build 23.
Usage
/* list all addresses currently blocked from the universe */ aw_int_set (AW_EJECTION_ADDRESS, 0); /* start at 0.0.0.0 */ while (aw_universe_ejection_next () == RC_SUCCESS) { int address; address = aw_int (AW_EJECTION_ADDRESS); printf ("%-15s %d\n", inet_ntoa (*(struct in_addr*) &address), aw_int (AW_EJECTION_EXPIRATION_TIME)); }