#include "common.h"
Go to the source code of this file.
Enumerations | |
| enum | iprange_err_t { IPR_ERR_OK = 0, IPR_ERR_BAD_PREFIX, IPR_ERR_RANGE_CLASH, IPR_ERR_RANGE_DUP, IPR_ERR_RANGE_SUBNET, IPR_ERR_RANGE_OVERLAP, IPR_ERROR_COUNT } |
| Error codes. More... | |
Functions | |
| const gchar * | iprange_strerror (iprange_err_t errnum) |
| iprange_db * | iprange_new (void) |
| Create a new IP range database. | |
| iprange_err_t | iprange_add_cidr (struct iprange_db *db, guint32 net, guint bits, void *value) |
| Add CIDR network to the database. | |
| void * | iprange_get (const struct iprange_db *db, guint32 ip) |
| Retrieve value associated with an IPv4 address, i.e. | |
| void | iprange_sync (struct iprange_db *idb) |
| This function must be called after iprange_add_cidr() to make the changes effective. | |
| void | iprange_free (struct iprange_db **idb_ptr) |
| Destroy the database. | |
| guint | iprange_get_item_count (const struct iprange_db *idb) |
| Get the number of ranges in the database. | |
| guint | iprange_get_host_count (const struct iprange_db *idb) |
| Calculate the number of hosts covered by the ranges in the database. | |
|
|
||||||||||||||||||||
|
Add CIDR network to the database.
|
|
|
Destroy the database.
|
|
||||||||||||
|
Retrieve value associated with an IPv4 address, i.e. that of the range containing it.
|
|
|
Calculate the number of hosts covered by the ranges in the database.
|
|
|
Get the number of ranges in the database.
|
|
|
Create a new IP range database.
|
|
|
|
|
|
This function must be called after iprange_add_cidr() to make the changes effective. As this function is costly, it should not be called each time but rather after the complete list of addresses has been added to the database.
|
1.3.9.1