zmap-freebsd/lib/constraint.h

18 lines
607 B
C
Raw Normal View History

2013-08-26 18:30:02 +00:00
#ifndef CONSTRAINT_H
#define CONSTRAINT_H
2013-08-16 15:12:47 +00:00
#include <stdint.h>
2013-08-16 15:12:47 +00:00
typedef struct _constraint constraint_t;
2013-10-01 21:05:47 +00:00
typedef unsigned int value_t;
2013-08-16 15:12:47 +00:00
constraint_t* constraint_init(value_t value);
void constraint_free(constraint_t *con);
void constraint_set(constraint_t *con, uint32_t prefix, int len, value_t value);
2013-10-01 21:05:47 +00:00
value_t constraint_lookup_ip(constraint_t *con, uint32_t address);
2013-08-16 15:12:47 +00:00
uint64_t constraint_count_ips(constraint_t *con, value_t value);
2013-10-01 21:05:47 +00:00
uint32_t constraint_lookup_index(constraint_t *con, uint64_t index, value_t value);
void constraint_paint_value(constraint_t *con, value_t value);
2013-08-16 15:12:47 +00:00
#endif //_CONSTRAINT_H