]>
git.proxmox.com Git - mirror_frr.git/blob - ripngd/ripng_nexthop.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* RIPng nexthop support
3 * Copyright (C) 6WIND Vincent Jardin <vincent.jardin@6wind.com>
6 #ifndef _ZEBRA_RIPNG_RIPNG_NEXTHOP_H
7 #define _ZEBRA_RIPNG_RIPNG_NEXTHOP_H
11 #include "ripngd/ripng_route.h"
12 #include "ripngd/ripngd.h"
14 extern struct list
*ripng_rte_new(void);
15 extern void ripng_rte_free(struct list
*ripng_rte_list
);
16 extern void ripng_rte_add(struct list
*ripng_rte_list
, struct prefix_ipv6
*p
,
17 struct ripng_info
*rinfo
,
18 struct ripng_aggregate
*aggregate
);
19 extern void ripng_rte_send(struct list
*ripng_rte_list
, struct interface
*ifp
,
20 struct sockaddr_in6
*to
);
27 static inline int addr6_cmp(struct in6_addr
*A
, struct in6_addr
*B
)
29 #define a(i) A->s6_addr32[i]
30 #define b(i) B->s6_addr32[i]
34 else if ((a(3) == b(3)) && (a(2) > b(2)))
36 else if ((a(3) == b(3)) && (a(2) == b(2)) && (a(1) > b(1)))
38 else if ((a(3) == b(3)) && (a(2) == b(2)) && (a(1) == b(1))
42 if ((a(3) == b(3)) && (a(2) == b(2)) && (a(1) == b(1))
49 #endif /* _ZEBRA_RIPNG_RIPNG_NEXTHOP_H */