#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "repsheet.h"
#include "cidr.h"
|
int | _string_to_cidr (CIDR *cidr, char *block) |
|
int | block_to_range (char *block, range *range) |
|
int | cidr_contains (char *block, int ip) |
|
int | address_in_range (range *r, int ip) |
|
int | ip_address_to_integer (const char *address) |
|
- Author
- Aaron Bedra
- Date
- 10/09/2014
int cidr_contains |
( |
char * |
block, |
|
|
int |
ip |
|
) |
| |
Test an IP to see if it is contained in the CIDR block
- Parameters
-
block | the CIDR block string |
address | the IP address string |
- Returns
- 1 if in the block, 0 if not