From a2ea1bac601ca79946e2a215dac9427c526cedab Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Thu, 11 Feb 2010 21:19:20 +0100 Subject: Moves errno.h include. --- lib/socket.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/socket.h b/lib/socket.h index d3fd745..82b5de0 100644 --- a/lib/socket.h +++ b/lib/socket.h @@ -9,6 +9,8 @@ #ifndef _BIRD_SOCKET_H_ #define _BIRD_SOCKET_H_ +#include + #include "lib/resource.h" typedef struct birdsock { -- cgit v1.2.3 From e81b440f6878605edd19ed62441648ac71260881 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Sun, 21 Feb 2010 14:34:53 +0100 Subject: Fix configure to enable warnings and fix most of them. --- lib/event.c | 3 ++- lib/ip.h | 2 +- lib/ipv4.h | 2 +- lib/socket.h | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/event.c b/lib/event.c index d556cd0..ce5e81c 100644 --- a/lib/event.c +++ b/lib/event.c @@ -49,7 +49,8 @@ static struct resclass ev_class = { "Event", sizeof(event), (void (*)(resource *)) ev_postpone, - ev_dump + ev_dump, + NULL }; /** diff --git a/lib/ip.h b/lib/ip.h index 1cc74e8..5dc9191 100644 --- a/lib/ip.h +++ b/lib/ip.h @@ -46,7 +46,7 @@ char *ip_scope_text(unsigned); struct prefix { ip_addr addr; - int len; + unsigned int len; }; #define ip_is_prefix(a,l) (!ipa_nonzero(ipa_and(a, ipa_not(ipa_mkmask(l))))) diff --git a/lib/ipv4.h b/lib/ipv4.h index 52bed16..74f1e88 100644 --- a/lib/ipv4.h +++ b/lib/ipv4.h @@ -72,7 +72,7 @@ int ipv4_classify(u32); u32 ipv4_class_mask(u32); byte *ipv4_skip_header(byte *, int *); -static inline int ipv4_has_link_scope(u32 a) +static inline int ipv4_has_link_scope(u32 a UNUSED) { return 0; } diff --git a/lib/socket.h b/lib/socket.h index 82b5de0..a285799 100644 --- a/lib/socket.h +++ b/lib/socket.h @@ -66,6 +66,8 @@ int sk_leave_group(sock *s, ip_addr maddr); int sk_set_ipv6_checksum(sock *s, int offset); #endif +int sk_set_broadcast(sock *s, int enable); + static inline int sk_send_buffer_empty(sock *sk) { -- cgit v1.2.3 From ff2857b03db854f99902766ad842aaa5fa29ec3c Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Fri, 26 Feb 2010 10:55:58 +0100 Subject: Many changes in (mainly) kernel syncers. - BSD kernel syncer is now self-conscious and can learn alien routes - important bugfix in BSD kernel syncer (crash after protocol restart) - many minor changes and bugfixes in kernel syncers and neighbor cache - direct protocol does not generate host and link local routes - min_scope check is removed, all routes have SCOPE_UNIVERSE by default - also fixes some remaining compiler warnings --- lib/ip.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/ip.h b/lib/ip.h index 5dc9191..e9923e2 100644 --- a/lib/ip.h +++ b/lib/ip.h @@ -50,6 +50,10 @@ struct prefix { }; #define ip_is_prefix(a,l) (!ipa_nonzero(ipa_and(a, ipa_not(ipa_mkmask(l))))) +#define ipa_zero(x) (!ipa_nonzero(x)) + +static inline int ipa_classify_net(ip_addr a) +{ return ipa_zero(a) ? (IADDR_HOST | SCOPE_UNIVERSE) : ipa_classify(a); } /* * Conversions between internal and string representation -- cgit v1.2.3