Queries information about an ejection world ejection database.
AW_CALLBACK_WORLD_EJECTION
Only instances owned by the world caretaker may use aw_world_ejection_lookup.
The attributes AW_EJECTION_TYPE and AW_EJECTION_ADDRESS specify the ejection to be queried. See aw_world_ejection_add for a complete description of these attributes and how to use them. If the ejection is in the world ejection database, the following attributes are returned:
| AW_EJECTION_TYPE | The ejection type |
| AW_EJECTION_ADDRESS | The blocked address |
| AW_EJECTION_CREATION_TIME | When the ejection was first created |
| AW_EJECTION_EXPIRATION_TIME | When the ejection expires |
| AW_EJECTION_COMMENT | Additional text information (optional) |
void lookup_ejection (char* address)
{
aw_int_set (AW_EJECTION_TYPE, AW_EJECT_BY_ADDRESS);
aw_int_set (AW_EJECTION_ADDRESS, inet_addr (address));
if (aw_world_ejection_lookup ())
printf ("IP address %s is not blocked.\n", address);
else {
if (!aw_int (AW_EJECTION_EXPIRATION_TIME))
printf ("%s is blocked indefinitely.\n", address);
else
printf ("%s will remain blocked for %d more seconds.\n",
address, aw_int (AW_EJECTION_EXPIRATION_TIME) - time (NULL));
}
}
aw_world_ejection_add
aw_world_ejection_delete
aw_world_ejection_next
aw_world_ejection_previous