chiark
/
gitweb
/
~ianmdlvl
/
secnet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
udp: Insist on only one successful default socket setup
[secnet.git]
/
ipaddr.h
diff --git
a/ipaddr.h
b/ipaddr.h
index 8c262bfb3a899cb092cdf422761052e5b543f57e..de41b7db61eccf09a4ee097b0ee42b2087b08d8f 100644
(file)
--- a/
ipaddr.h
+++ b/
ipaddr.h
@@
-6,12
+6,12
@@
struct subnet {
uint32_t prefix;
uint32_t mask;
struct subnet {
uint32_t prefix;
uint32_t mask;
-
uint32_
t len;
+
in
t len;
};
struct subnet_list {
};
struct subnet_list {
-
u
int32_t entries;
-
u
int32_t alloc;
+ int32_t entries;
+ int32_t alloc;
struct subnet *list;
};
struct subnet *list;
};
@@
-20,15
+20,14
@@
struct iprange {
};
struct ipset {
};
struct ipset {
-
u
int32_t l; /* Number of entries in list */
-
u
int32_t a; /* Allocated space in list */
+ int32_t l; /* Number of entries in list */
+ int32_t a; /* Allocated space in list */
struct iprange *d;
};
extern struct subnet_list *subnet_list_new(void);
extern void subnet_list_free(struct subnet_list *a);
struct iprange *d;
};
extern struct subnet_list *subnet_list_new(void);
extern void subnet_list_free(struct subnet_list *a);
-extern void subnet_list_append(struct subnet_list *a, uint32_t prefix,
- uint32_t len);
+extern void subnet_list_append(struct subnet_list *a, uint32_t prefix, int len);
static inline bool_t subnet_match(struct subnet s, uint32_t address)
{
static inline bool_t subnet_match(struct subnet s, uint32_t address)
{
@@
-52,8
+51,8
@@
extern string_t ipaddr_to_string(uint32_t addr);
extern string_t subnet_to_string(struct subnet sn);
extern struct ipset *string_list_to_ipset(list_t *l,struct cloc loc,
extern string_t subnet_to_string(struct subnet sn);
extern struct ipset *string_list_to_ipset(list_t *l,struct cloc loc,
-
string_t module,
string_t param);
+
cstring_t module, c
string_t param);
-extern uint32_t string_item_to_ipaddr(
item_t *i,
string_t desc);
+extern uint32_t string_item_to_ipaddr(
const item_t *i, c
string_t desc);
#endif /* ipaddr_h */
#endif /* ipaddr_h */