mirror_frr/lib
Renato Westphal bb1b9c47ca lib: updates to zapi_route
This patch introduces the following changes to the zapi_route structure
and associated code:
* Use a fixed-size array to store the nexthops instead of a pointer. This
  makes the zapi_route() function much easier to use when we have multiple
  nexthops to send. It's also much more efficient to put everything on
  the stack rather than allocating an array in the heap every time we
  need to send a route to zebra;

* Use the new 'zapi_nexthop' structure. This will allow the client daemons
  to send labeled routes without having to allocate memory for the labels
  (the 'nexthop' structure was designed to be memory efficient and doesn't
  have room for MPLS labels, only a pointer). Also, 'zapi_nexthop' is more
  compact and more clean from an API perspective;

* Embed the route prefix inside the zapi_route structure. Since the
  route's prefix is sent along with its nexthops and attributes, it makes
  sense to pack everything inside the same structure.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-08-23 17:45:17 -03:00
..
.gitignore build: convert lib/ to non-recursive build 2017-07-31 23:03:27 +02:00
agentx.c *: reindent 2017-07-17 14:04:07 +02:00
bfd.c *: reindent 2017-07-17 14:04:07 +02:00
bfd.h *: reindent 2017-07-17 14:04:07 +02:00
bitfield.h *: reindent 2017-07-17 14:04:07 +02:00
buffer.c *: reindent 2017-07-17 14:04:07 +02:00
buffer.h *: reindent 2017-07-17 14:04:07 +02:00
checksum.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
checksum.h *: reindent 2017-07-17 14:04:07 +02:00
clippy.c *: reindent 2017-07-17 14:04:07 +02:00
clippy.h lib: clippy the assistant 2017-06-14 19:29:23 +02:00
command_graph.c lib: add CLI token for 48-bit mac addresses 2017-08-11 12:42:01 -04:00
command_graph.h lib: add CLI token for 48-bit mac addresses 2017-08-11 12:42:01 -04:00
command_lex.l lib: add CLI token for 48-bit mac addresses 2017-08-11 12:42:01 -04:00
command_match.c lib: add CLI token for 48-bit mac addresses 2017-08-11 12:42:01 -04:00
command_match.h *: reindent 2017-07-17 14:04:07 +02:00
command_parse.y lib: add CLI token for 48-bit mac addresses 2017-08-11 12:42:01 -04:00
command_py.c lib, python: add M:A:C support for clippy 2017-08-14 11:30:08 -04:00
command.c lib: Fix multi instance ospf 2017-08-10 14:59:07 -07:00
command.h Merge branch 'frr/pull/822' ("EVPN fixes") 2017-08-09 21:34:10 +02:00
csv.c *: reindent 2017-07-17 14:04:07 +02:00
csv.h *: reindent 2017-07-17 14:04:07 +02:00
defun_lex.l build: convert lib/ to non-recursive build 2017-07-31 23:03:27 +02:00
distribute.c *: reindent 2017-07-17 14:04:07 +02:00
distribute.h *: reindent 2017-07-17 14:04:07 +02:00
event_counter.c *: reindent 2017-07-17 14:04:07 +02:00
event_counter.h *: reindent 2017-07-17 14:04:07 +02:00
fifo.h *: reindent 2017-07-17 14:04:07 +02:00
filter.c lib: some final MAC access-list fixes 2017-08-09 20:30:34 +02:00
filter.h *: reindent 2017-07-17 14:04:07 +02:00
freebsd-queue.h lib: cleanup the work queue implementation 2017-08-17 17:47:07 +02:00
frr_pthread.c *: reindent 2017-07-17 14:04:07 +02:00
frr_pthread.h *: reindent 2017-07-17 14:04:07 +02:00
frratomic.h *: reindent 2017-07-17 14:04:07 +02:00
getopt1.c *: reindent 2017-07-17 14:04:07 +02:00
getopt.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
getopt.h *: reindent 2017-07-17 14:04:07 +02:00
gitversion.pl build: make gitversion more useful 2017-08-02 02:59:51 +02:00
grammar_sandbox_main.c lib: vty_stdio signal handling 2017-08-02 02:59:51 +02:00
grammar_sandbox.c lib: add CLI token for 48-bit mac addresses 2017-08-11 12:42:01 -04:00
graph.c *: reindent 2017-07-17 14:04:07 +02:00
graph.h *: reindent 2017-07-17 14:04:07 +02:00
hash.c lib: move hashstats under debug, show per-daemon 2017-08-21 14:41:02 +02:00
hash.h lib: use load factor as hash expansion trigger 2017-08-09 13:53:11 -04:00
hook.c lib: hooks: support priority ordering & reversing 2017-08-15 13:25:41 +02:00
hook.h lib: hooks: support priority ordering & reversing 2017-08-15 13:25:41 +02:00
if_rmap.c *: reindent 2017-07-17 14:04:07 +02:00
if_rmap.h *: reindent 2017-07-17 14:04:07 +02:00
if.c lib: replace if_add_hook with hook_* logic 2017-08-15 13:25:44 +02:00
if.h lib: replace if_add_hook with hook_* logic 2017-08-15 13:25:44 +02:00
imsg-buffer.c lib: standardize use of queue.h 2017-08-17 17:47:05 +02:00
imsg.c lib: standardize use of queue.h 2017-08-17 17:47:05 +02:00
imsg.h lib: revert reindent of files imported from OpenBSD 2017-07-24 18:40:24 -03:00
ipaddr.h *: reindent 2017-07-17 14:04:07 +02:00
jhash.c *: reindent 2017-07-17 14:04:07 +02:00
jhash.h *: reindent 2017-07-17 14:04:07 +02:00
json.c *: reindent 2017-07-17 14:04:07 +02:00
json.h *: reindent 2017-07-17 14:04:07 +02:00
keychain.c *: reindent 2017-07-17 14:04:07 +02:00
keychain.h *: reindent 2017-07-17 14:04:07 +02:00
libfrr.c *: centralize some exit cleanup into libfrr 2017-08-15 13:25:44 +02:00
libfrr.h *: centralize some exit cleanup into libfrr 2017-08-15 13:25:44 +02:00
libospf.h ospf: Fix segfault if compiled with DEBUG 2017-08-09 12:07:58 +02:00
linklist.c *: reindent 2017-07-17 14:04:07 +02:00
linklist.h *: reindent 2017-07-17 14:04:07 +02:00
log_int.h *: reindent 2017-07-17 14:04:07 +02:00
log.c lib: remove redundant zebra messages 2017-08-23 17:45:17 -03:00
log.h lib: plug logging hole during startup 2017-08-02 23:36:42 +02:00
Makefile build: convert lib/ to non-recursive build 2017-07-31 23:03:27 +02:00
md5.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
md5.h *: reindent 2017-07-17 14:04:07 +02:00
memory_vty.c *: reindent 2017-07-17 14:04:07 +02:00
memory_vty.h *: reindent 2017-07-17 14:04:07 +02:00
memory.c *: reindent 2017-07-17 14:04:07 +02:00
memory.h *: reindent 2017-07-17 14:04:07 +02:00
module.c *: reindent 2017-07-17 14:04:07 +02:00
module.h *: reindent 2017-07-17 14:04:07 +02:00
monotime.h *: Define the number of seconds in a Day, Week and year 2017-08-08 09:06:22 -04:00
mpls.h Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
network.c *: reindent 2017-07-17 14:04:07 +02:00
network.h *: reindent 2017-07-17 14:04:07 +02:00
nexthop.c lib: copy_nexthops() only copies the first nexthop 2017-07-20 17:11:43 +00:00
nexthop.h *: reindent 2017-07-17 14:04:07 +02:00
ns.c *: reindent 2017-07-17 14:04:07 +02:00
ns.h *: reindent 2017-07-17 14:04:07 +02:00
openbsd-queue.h *: reindent 2017-07-17 14:04:07 +02:00
openbsd-tree.c lib: fix corrupted RB trees 2017-07-24 18:50:45 -03:00
openbsd-tree.h lib: revert reindent of files imported from OpenBSD 2017-07-24 18:40:24 -03:00
pid_output.c *: reindent 2017-07-17 14:04:07 +02:00
plist_int.h *: reindent 2017-07-17 14:04:07 +02:00
plist.c lib: fix prefix list trie corruption 2017-08-11 19:02:22 +02:00
plist.h *: reindent 2017-07-17 14:04:07 +02:00
pqueue.c *: reindent 2017-07-17 14:04:07 +02:00
pqueue.h *: reindent 2017-07-17 14:04:07 +02:00
prefix.c lib: optimize IPV4_ADDR_[SAME|COPY]() 2017-08-17 17:58:35 +02:00
prefix.h lib: optimize IPV4_ADDR_[SAME|COPY]() 2017-08-17 17:58:35 +02:00
privs.c lib: terminate capabilities only if initialized 2017-08-21 21:53:46 +02:00
privs.h lib: privs: make uid/gid accessible before setuid 2017-08-02 23:36:39 +02:00
ptm_lib.c *: reindent 2017-07-17 14:04:07 +02:00
ptm_lib.h *: reindent 2017-07-17 14:04:07 +02:00
pw.h ldpd: integrate with the pseudowire manager in zebra 2017-08-09 12:35:16 +02:00
qobj.c *: reindent 2017-07-17 14:04:07 +02:00
qobj.h *: reindent 2017-07-17 14:04:07 +02:00
queue.h lib: standardize use of queue.h 2017-08-17 17:47:05 +02:00
route_types.pl *: remove VTYNL, part 6 of 6 2017-07-14 10:20:03 +02:00
route_types.txt Merge remote-tracking branch 'frr/master' into pull-624 2017-06-13 09:18:14 +02:00
routemap.c lib, bgpd: fix set ip next-hop peer-address 2017-08-10 12:31:47 -04:00
routemap.h *: reindent 2017-07-17 14:04:07 +02:00
sbuf.c lib: add sbuf 2017-08-03 11:34:01 +02:00
sbuf.h lib: add sbuf 2017-08-03 11:34:01 +02:00
sha256.c *: reindent 2017-07-17 14:04:07 +02:00
sha256.h *: reindent 2017-07-17 14:04:07 +02:00
sigevent.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
sigevent.h *: reindent 2017-07-17 14:04:07 +02:00
skiplist.c *: reindent 2017-07-17 14:04:07 +02:00
skiplist.h *: reindent 2017-07-17 14:04:07 +02:00
smux.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
smux.h *: reindent 2017-07-17 14:04:07 +02:00
snmp.c *: reindent 2017-07-17 14:04:07 +02:00
sockopt.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
sockopt.h *: reindent 2017-07-17 14:04:07 +02:00
sockunion.c lib: Remove sockopt_cork functionality 2017-08-01 20:36:33 -04:00
sockunion.h *: reindent 2017-07-17 14:04:07 +02:00
spf_backoff.c *: reindent 2017-07-17 14:04:07 +02:00
spf_backoff.h *: reindent 2017-07-17 14:04:07 +02:00
srcdest_table.c *: reindent 2017-07-17 14:04:07 +02:00
srcdest_table.h *: reindent 2017-07-17 14:04:07 +02:00
stream.c *: reindent 2017-07-17 14:04:07 +02:00
stream.h *: reindent 2017-07-17 14:04:07 +02:00
strlcat.c *: reindent 2017-07-17 14:04:07 +02:00
strlcpy.c *: reindent 2017-07-17 14:04:07 +02:00
subdir.am lib: standardize use of queue.h 2017-08-17 17:47:05 +02:00
systemd.c *: reindent 2017-07-17 14:04:07 +02:00
systemd.h *: reindent 2017-07-17 14:04:07 +02:00
table.c lib: inline route_node_lock()/route_node_unlock() 2017-08-17 17:46:22 +02:00
table.h lib: fix const-check in route_node 2017-08-22 15:27:08 +02:00
termtable.c *: reindent 2017-07-17 14:04:07 +02:00
termtable.h *: reindent 2017-07-17 14:04:07 +02:00
thread.c lib: fix still reachable linked list in thread.c 2017-08-08 12:54:28 -04:00
thread.h lib: flush ready queue before poll() again 2017-08-02 14:29:04 -04:00
vector.c *: reindent 2017-07-17 14:04:07 +02:00
vector.h *: reindent 2017-07-17 14:04:07 +02:00
version.h.in Rename: FreeRangeRouting FRRouting 2017-03-30 14:22:35 -04:00
vlan.h lib: VLAN definition 2017-05-25 10:20:03 -07:00
vrf_int.h *: reindent 2017-07-17 14:04:07 +02:00
vrf.c *: reindent 2017-07-17 14:04:07 +02:00
vrf.h *: reindent 2017-07-17 14:04:07 +02:00
vty.c Merge pull request #892 from opensourcerouting/watchfrr-simplify 2017-08-09 14:32:44 -04:00
vty.h Merge pull request #892 from opensourcerouting/watchfrr-simplify 2017-08-09 14:32:44 -04:00
vxlan.h lib: VxLAN Network Identifier definition 2017-05-25 10:20:03 -07:00
wheel.c *: reindent 2017-07-17 14:04:07 +02:00
wheel.h *: reindent 2017-07-17 14:04:07 +02:00
workqueue.c lib: cleanup the work queue implementation 2017-08-17 17:47:07 +02:00
workqueue.h lib: cleanup the work queue implementation 2017-08-17 17:47:07 +02:00
zassert.h Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
zclient.c lib: updates to zapi_route 2017-08-23 17:45:17 -03:00
zclient.h lib: updates to zapi_route 2017-08-23 17:45:17 -03:00
zebra.h Merge pull request #891 from Jafaral/portability 2017-08-04 08:52:07 +02:00