From: claudio Date: Wed, 22 Jun 2022 15:24:58 +0000 (+0000) Subject: Move struct kroute and kroute6 to kroute.c and out of bgpd.h X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=450cf1be9091f19f60806b550edab2f33255214c;p=openbsd Move struct kroute and kroute6 to kroute.c and out of bgpd.h OK tb@ --- diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h index e1a4dd46e6b..68f90464687 100644 --- a/usr.sbin/bgpd/bgpd.h +++ b/usr.sbin/bgpd/bgpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.h,v 1.434 2022/06/22 14:56:12 claudio Exp $ */ +/* $OpenBSD: bgpd.h,v 1.435 2022/06/22 15:24:58 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -690,28 +690,6 @@ struct kroute_full { uint8_t priority; }; -struct kroute { - struct in_addr prefix; - struct in_addr nexthop; - uint32_t mplslabel; - uint16_t flags; - uint16_t labelid; - u_short ifindex; - uint8_t prefixlen; - uint8_t priority; -}; - -struct kroute6 { - struct in6_addr prefix; - struct in6_addr nexthop; - uint32_t mplslabel; - uint16_t flags; - uint16_t labelid; - u_short ifindex; - uint8_t prefixlen; - uint8_t priority; -}; - struct kroute_nexthop { struct bgpd_addr nexthop; struct bgpd_addr gateway; diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c index 8f9a710195e..9ca4cfd99bf 100644 --- a/usr.sbin/bgpd/kroute.c +++ b/usr.sbin/bgpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.263 2022/06/22 14:56:12 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.264 2022/06/22 15:24:58 claudio Exp $ */ /* * Copyright (c) 2022 Claudio Jeker @@ -54,6 +54,28 @@ struct { uint8_t fib_prio; } kr_state; +struct kroute { + struct in_addr prefix; + struct in_addr nexthop; + uint32_t mplslabel; + uint16_t flags; + uint16_t labelid; + u_short ifindex; + uint8_t prefixlen; + uint8_t priority; +}; + +struct kroute6 { + struct in6_addr prefix; + struct in6_addr nexthop; + uint32_t mplslabel; + uint16_t flags; + uint16_t labelid; + u_short ifindex; + uint8_t prefixlen; + uint8_t priority; +}; + struct kroute_node { RB_ENTRY(kroute_node) entry; struct kroute r;