From 937e75d8f1d203b637ba0ea050026f9af92485f3 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Thu, 28 Apr 2016 18:01:40 +0200 Subject: Add the Babel routing protocol (RFC 6126) This patch implements the IPv6 subset of the Babel routing protocol. Based on the patch from Toke Hoiland-Jorgensen, with some heavy modifications and bugfixes. Thanks to Toke Hoiland-Jorgensen for the original patch. --- nest/proto.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nest/proto.c') diff --git a/nest/proto.c b/nest/proto.c index 436377f1..3e97e9da 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -919,6 +919,9 @@ protos_build(void) proto_build(&proto_bfd); bfd_init_all(); #endif +#ifdef CONFIG_BABEL + proto_build(&proto_babel); +#endif proto_pool = rp_new(&root_pool, "Protocols"); proto_flush_event = ev_new(proto_pool); -- cgit v1.2.3 From 8e433d6a529a883d566dc1d5a4afe0f1e2750baf Mon Sep 17 00:00:00 2001 From: Pavel Tvrdik Date: Thu, 12 May 2016 15:49:44 +0200 Subject: Prog Doc: Complete several missing parameters --- conf/cf-lex.l | 1 + lib/Doc | 2 +- nest/neighbor.c | 2 +- nest/proto-hooks.c | 1 + nest/proto.c | 1 + nest/rt-attr.c | 2 +- nest/rt-table.c | 9 +++++++-- proto/babel/Doc | 2 +- proto/ospf/dbdes.c | 1 + proto/ospf/lsalib.c | 3 ++- proto/ospf/packet.c | 2 +- sysdep/unix/io.c | 1 + sysdep/unix/log.c | 1 + 13 files changed, 20 insertions(+), 8 deletions(-) (limited to 'nest/proto.c') diff --git a/conf/cf-lex.l b/conf/cf-lex.l index 5a2a4d6b..727dc017 100644 --- a/conf/cf-lex.l +++ b/conf/cf-lex.l @@ -575,6 +575,7 @@ cf_lex_init_kh(void) /** * cf_lex_init - initialize the lexer * @is_cli: true if we're going to parse CLI command, false for configuration + * @c: configuration structure * * cf_lex_init() initializes the lexical analyzer and prepares it for * parsing of a new input. diff --git a/lib/Doc b/lib/Doc index 8f513821..8af1c669 100644 --- a/lib/Doc +++ b/lib/Doc @@ -1,5 +1,5 @@ H Library functions -S ip.c ipv4.c ipv6.c +S ip.c S lists.c S checksum.c bitops.c patmatch.c printf.c xmalloc.c tbf.c D resource.sgml diff --git a/nest/neighbor.c b/nest/neighbor.c index 1685d67e..d974fa51 100644 --- a/nest/neighbor.c +++ b/nest/neighbor.c @@ -339,7 +339,7 @@ neigh_if_link(struct iface *i) /** * neigh_ifa_update: notify neighbor cache about interface address add or remove event - * @ifa: interface address in question + * @a: interface address in question * * Tell the neighbor cache that an address was added or removed. * diff --git a/nest/proto-hooks.c b/nest/proto-hooks.c index e80f87ea..7395b45e 100644 --- a/nest/proto-hooks.c +++ b/nest/proto-hooks.c @@ -148,6 +148,7 @@ void get_route_info(rte *e, byte *buf, ea_list *attrs) * get_attr - get attribute information * @a: an extended attribute * @buf: buffer to be filled with attribute information + * @buflen: a length of the @buf parameter * * The get_attr() hook is called by the core to obtain a user friendly * representation of an extended route attribute. It can either leave diff --git a/nest/proto.c b/nest/proto.c index 3e97e9da..1091b321 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -718,6 +718,7 @@ graceful_restart_init(void) /** * graceful_restart_done - finalize graceful restart + * @t: unused * * When there are no locks on graceful restart, the functions finalizes the * graceful restart recovery. Protocols postponing route export until the end of diff --git a/nest/rt-attr.c b/nest/rt-attr.c index 7fa05d6d..f181b452 100644 --- a/nest/rt-attr.c +++ b/nest/rt-attr.c @@ -405,7 +405,7 @@ ea_find(ea_list *e, unsigned id) * for first occurrences of attributes with ID in specified interval from @id to * (@id + @max - 1), returning pointers to found &eattr structures, storing its * walk state in @s for subsequent calls. - + * * The function ea_walk() is supposed to be called in a loop, with initially * zeroed walk state structure @s with filled the initial extended attribute * list, returning one found attribute in each call or %NULL when no other diff --git a/nest/rt-table.c b/nest/rt-table.c index 57c8b8e0..c02e6dc9 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -717,16 +717,20 @@ rt_notify_merged(struct announce_hook *ah, net *net, rte *new_changed, rte *old_ * @net: network in question * @new: the new route to be announced * @old: the previous route for the same network + * @new_best: the new best route for the same network + * @old_best: the previous best route for the same network + * @before_old: The previous route before @old for the same network. + * If @before_old is NULL @old was the first. * * This function gets a routing table update and announces it * to all protocols that acccepts given type of route announcement * and are connected to the same table by their announcement hooks. * - * Route announcement of type RA_OPTIMAL si generated when optimal + * Route announcement of type %RA_OPTIMAL si generated when optimal * route (in routing table @tab) changes. In that case @old stores the * old optimal route. * - * Route announcement of type RA_ANY si generated when any route (in + * Route announcement of type %RA_ANY si generated when any route (in * routing table @tab) changes In that case @old stores the old route * from the same protocol. * @@ -1616,6 +1620,7 @@ again: /** * rt_prune_table - prune a routing table + * @tab: a routing table for pruning * * This function scans the routing table @tab and removes routes belonging to * flushing protocols, discarded routes and also stale network entries, in a diff --git a/proto/babel/Doc b/proto/babel/Doc index 2480239e..80026f91 100644 --- a/proto/babel/Doc +++ b/proto/babel/Doc @@ -1,2 +1,2 @@ S babel.c -S packet.c +S packets.c diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c index 65bdb3ec..195b03ad 100644 --- a/proto/ospf/dbdes.c +++ b/proto/ospf/dbdes.c @@ -192,6 +192,7 @@ ospf_do_send_dbdes(struct ospf_proto *p, struct ospf_neighbor *n) /** * ospf_send_dbdes - transmit database description packet + * @p: OSPF protocol instance * @n: neighbor * * Sending of a database description packet is described in 10.8 of RFC 2328. diff --git a/proto/ospf/lsalib.c b/proto/ospf/lsalib.c index 66a3a23d..1bbd1372 100644 --- a/proto/ospf/lsalib.c +++ b/proto/ospf/lsalib.c @@ -554,12 +554,13 @@ lsa_validate_prefix(struct ospf_lsa_header *lsa, struct ospf_lsa_prefix *body) /** * lsa_validate - check whether given LSA is valid * @lsa: LSA header + * @lsa_type: one of %LSA_T_xxx + * @ospf2: %true means OSPF version 2, %false means OSPF version 3 * @body: pointer to LSA body * * Checks internal structure of given LSA body (minimal length, * consistency). Returns true if valid. */ - int lsa_validate(struct ospf_lsa_header *lsa, u32 lsa_type, int ospf2, void *body) { diff --git a/proto/ospf/packet.c b/proto/ospf/packet.c index faa33664..04f0d47c 100644 --- a/proto/ospf/packet.c +++ b/proto/ospf/packet.c @@ -207,7 +207,7 @@ drop: /** * ospf_rx_hook * @sk: socket we received the packet. - * @size: size of the packet + * @len: size of the packet * * This is the entry point for messages from neighbors. Many checks (like * authentication, checksums, size) are done before the packet is passed to diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index 82f6c69e..486319ff 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -448,6 +448,7 @@ tm_format_reltime(char *x, struct tm *tm, bird_clock_t delta) /** * tm_format_datetime - convert date and time to textual representation * @x: destination buffer of size %TM_DATETIME_BUFFER_SIZE + * @fmt_spec: specification of resulting textual representation of the time * @t: time * * This function formats the given relative time value @t to a textual diff --git a/sysdep/unix/log.c b/sysdep/unix/log.c index b90bbbd2..6665d035 100644 --- a/sysdep/unix/log.c +++ b/sysdep/unix/log.c @@ -89,6 +89,7 @@ static char *class_names[] = { /** * log_commit - commit a log message * @class: message class information (%L_DEBUG to %L_BUG, see |lib/birdlib.h|) + * @buf: message to write * * This function writes a message prepared in the log buffer to the * log file (as specified in the configuration). The log buffer is -- cgit v1.2.3