forked from Mirror/frr
Make route flags a 32bit field
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
This commit is contained in:
parent
d91788284e
commit
0fc452dc57
|
@ -601,7 +601,7 @@ zebra_read_ipv4 (int command, struct zclient *zclient, zebra_size_t length,
|
||||||
/* Type, flags, message. */
|
/* Type, flags, message. */
|
||||||
api.type = stream_getc (s);
|
api.type = stream_getc (s);
|
||||||
api.instance = stream_getw (s);
|
api.instance = stream_getw (s);
|
||||||
api.flags = stream_getc (s);
|
api.flags = stream_getl (s);
|
||||||
api.message = stream_getc (s);
|
api.message = stream_getc (s);
|
||||||
|
|
||||||
/* IPv4 prefix. */
|
/* IPv4 prefix. */
|
||||||
|
@ -716,7 +716,7 @@ zebra_read_ipv6 (int command, struct zclient *zclient, zebra_size_t length,
|
||||||
/* Type, flags, message. */
|
/* Type, flags, message. */
|
||||||
api.type = stream_getc (s);
|
api.type = stream_getc (s);
|
||||||
api.instance = stream_getw (s);
|
api.instance = stream_getw (s);
|
||||||
api.flags = stream_getc (s);
|
api.flags = stream_getl (s);
|
||||||
api.message = stream_getc (s);
|
api.message = stream_getc (s);
|
||||||
|
|
||||||
/* IPv6 prefix. */
|
/* IPv6 prefix. */
|
||||||
|
@ -1199,7 +1199,7 @@ void
|
||||||
bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp,
|
bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp,
|
||||||
afi_t afi, safi_t safi)
|
afi_t afi, safi_t safi)
|
||||||
{
|
{
|
||||||
int flags;
|
u_int32_t flags;
|
||||||
u_char distance;
|
u_char distance;
|
||||||
struct peer *peer;
|
struct peer *peer;
|
||||||
struct bgp_info *mpinfo;
|
struct bgp_info *mpinfo;
|
||||||
|
@ -1620,7 +1620,7 @@ bgp_zebra_announce_table (struct bgp *bgp, afi_t afi, safi_t safi)
|
||||||
void
|
void
|
||||||
bgp_zebra_withdraw (struct prefix *p, struct bgp_info *info, safi_t safi)
|
bgp_zebra_withdraw (struct prefix *p, struct bgp_info *info, safi_t safi)
|
||||||
{
|
{
|
||||||
int flags;
|
u_int32_t flags;
|
||||||
struct peer *peer;
|
struct peer *peer;
|
||||||
|
|
||||||
peer = info->peer;
|
peer = info->peer;
|
||||||
|
|
|
@ -257,7 +257,8 @@ static void
|
||||||
isis_zebra_route_add_ipv4 (struct prefix *prefix,
|
isis_zebra_route_add_ipv4 (struct prefix *prefix,
|
||||||
struct isis_route_info *route_info)
|
struct isis_route_info *route_info)
|
||||||
{
|
{
|
||||||
u_char message, flags;
|
u_char message;
|
||||||
|
u_int32_t flags;
|
||||||
int psize;
|
int psize;
|
||||||
struct stream *stream;
|
struct stream *stream;
|
||||||
struct isis_nexthop *nexthop;
|
struct isis_nexthop *nexthop;
|
||||||
|
@ -285,7 +286,7 @@ isis_zebra_route_add_ipv4 (struct prefix *prefix,
|
||||||
/* instance */
|
/* instance */
|
||||||
stream_putw (stream, 0);
|
stream_putw (stream, 0);
|
||||||
/* flags */
|
/* flags */
|
||||||
stream_putc (stream, flags);
|
stream_putl (stream, flags);
|
||||||
/* message */
|
/* message */
|
||||||
stream_putc (stream, message);
|
stream_putc (stream, message);
|
||||||
/* SAFI */
|
/* SAFI */
|
||||||
|
@ -566,7 +567,7 @@ isis_zebra_read_ipv4 (int command, struct zclient *zclient,
|
||||||
|
|
||||||
api.type = stream_getc (stream);
|
api.type = stream_getc (stream);
|
||||||
api.instance = stream_getw (stream);
|
api.instance = stream_getw (stream);
|
||||||
api.flags = stream_getc (stream);
|
api.flags = stream_getl (stream);
|
||||||
api.message = stream_getc (stream);
|
api.message = stream_getc (stream);
|
||||||
|
|
||||||
p.family = AF_INET;
|
p.family = AF_INET;
|
||||||
|
@ -623,7 +624,7 @@ isis_zebra_read_ipv6 (int command, struct zclient *zclient,
|
||||||
ifindex = 0;
|
ifindex = 0;
|
||||||
|
|
||||||
api.type = stream_getc(stream);
|
api.type = stream_getc(stream);
|
||||||
api.flags = stream_getc(stream);
|
api.flags = stream_getl(stream);
|
||||||
api.message = stream_getc(stream);
|
api.message = stream_getc(stream);
|
||||||
|
|
||||||
p.family = AF_INET6;
|
p.family = AF_INET6;
|
||||||
|
|
|
@ -733,7 +733,7 @@ zapi_ipv4_route (u_char cmd, struct zclient *zclient, struct prefix_ipv4 *p,
|
||||||
/* Put type and nexthop. */
|
/* Put type and nexthop. */
|
||||||
stream_putc (s, api->type);
|
stream_putc (s, api->type);
|
||||||
stream_putw (s, api->instance);
|
stream_putw (s, api->instance);
|
||||||
stream_putc (s, api->flags);
|
stream_putl (s, api->flags);
|
||||||
stream_putc (s, api->message);
|
stream_putc (s, api->message);
|
||||||
stream_putw (s, api->safi);
|
stream_putw (s, api->safi);
|
||||||
|
|
||||||
|
@ -801,7 +801,7 @@ zapi_ipv4_route_ipv6_nexthop (u_char cmd, struct zclient *zclient,
|
||||||
/* Put type and nexthop. */
|
/* Put type and nexthop. */
|
||||||
stream_putc (s, api->type);
|
stream_putc (s, api->type);
|
||||||
stream_putw (s, api->instance);
|
stream_putw (s, api->instance);
|
||||||
stream_putc (s, api->flags);
|
stream_putl (s, api->flags);
|
||||||
stream_putc (s, api->message);
|
stream_putc (s, api->message);
|
||||||
stream_putw (s, api->safi);
|
stream_putw (s, api->safi);
|
||||||
|
|
||||||
|
@ -867,7 +867,7 @@ zapi_ipv6_route (u_char cmd, struct zclient *zclient, struct prefix_ipv6 *p,
|
||||||
/* Put type and nexthop. */
|
/* Put type and nexthop. */
|
||||||
stream_putc (s, api->type);
|
stream_putc (s, api->type);
|
||||||
stream_putw (s, api->instance);
|
stream_putw (s, api->instance);
|
||||||
stream_putc (s, api->flags);
|
stream_putl (s, api->flags);
|
||||||
stream_putc (s, api->message);
|
stream_putc (s, api->message);
|
||||||
stream_putw (s, api->safi);
|
stream_putw (s, api->safi);
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ struct zapi_ipv4
|
||||||
u_char type;
|
u_char type;
|
||||||
u_short instance;
|
u_short instance;
|
||||||
|
|
||||||
u_char flags;
|
u_int32_t flags;
|
||||||
|
|
||||||
u_char message;
|
u_char message;
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ struct zapi_ipv6
|
||||||
u_char type;
|
u_char type;
|
||||||
u_short instance;
|
u_short instance;
|
||||||
|
|
||||||
u_char flags;
|
u_int32_t flags;
|
||||||
|
|
||||||
u_char message;
|
u_char message;
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,7 @@ ospf6_zebra_read_ipv6 (int command, struct zclient *zclient,
|
||||||
/* Type, flags, message. */
|
/* Type, flags, message. */
|
||||||
api.type = stream_getc (s);
|
api.type = stream_getc (s);
|
||||||
api.instance = stream_getw (s);
|
api.instance = stream_getw (s);
|
||||||
api.flags = stream_getc (s);
|
api.flags = stream_getl (s);
|
||||||
api.message = stream_getc (s);
|
api.message = stream_getc (s);
|
||||||
|
|
||||||
/* IPv6 prefix. */
|
/* IPv6 prefix. */
|
||||||
|
|
|
@ -355,7 +355,7 @@ ospf_zebra_add (struct prefix_ipv4 *p, struct ospf_route *or)
|
||||||
{
|
{
|
||||||
u_char message;
|
u_char message;
|
||||||
u_char distance;
|
u_char distance;
|
||||||
u_char flags;
|
u_int32_t flags;
|
||||||
int psize;
|
int psize;
|
||||||
struct stream *s;
|
struct stream *s;
|
||||||
struct ospf_path *path;
|
struct ospf_path *path;
|
||||||
|
@ -393,7 +393,7 @@ ospf_zebra_add (struct prefix_ipv4 *p, struct ospf_route *or)
|
||||||
zclient_create_header (s, ZEBRA_IPV4_ROUTE_ADD, VRF_DEFAULT);
|
zclient_create_header (s, ZEBRA_IPV4_ROUTE_ADD, VRF_DEFAULT);
|
||||||
stream_putc (s, ZEBRA_ROUTE_OSPF);
|
stream_putc (s, ZEBRA_ROUTE_OSPF);
|
||||||
stream_putw (s, ospf->instance);
|
stream_putw (s, ospf->instance);
|
||||||
stream_putc (s, flags);
|
stream_putl (s, flags);
|
||||||
stream_putc (s, message);
|
stream_putc (s, message);
|
||||||
stream_putw (s, SAFI_UNICAST);
|
stream_putw (s, SAFI_UNICAST);
|
||||||
|
|
||||||
|
@ -492,7 +492,7 @@ ospf_zebra_delete (struct prefix_ipv4 *p, struct ospf_route *or)
|
||||||
{
|
{
|
||||||
u_char message;
|
u_char message;
|
||||||
u_char distance;
|
u_char distance;
|
||||||
u_char flags;
|
u_int32_t flags;
|
||||||
int psize;
|
int psize;
|
||||||
struct stream *s;
|
struct stream *s;
|
||||||
struct ospf_path *path;
|
struct ospf_path *path;
|
||||||
|
@ -516,7 +516,7 @@ ospf_zebra_delete (struct prefix_ipv4 *p, struct ospf_route *or)
|
||||||
zclient_create_header (s, ZEBRA_IPV4_ROUTE_DELETE, VRF_DEFAULT);
|
zclient_create_header (s, ZEBRA_IPV4_ROUTE_DELETE, VRF_DEFAULT);
|
||||||
stream_putc (s, ZEBRA_ROUTE_OSPF);
|
stream_putc (s, ZEBRA_ROUTE_OSPF);
|
||||||
stream_putw (s, ospf->instance);
|
stream_putw (s, ospf->instance);
|
||||||
stream_putc (s, flags);
|
stream_putl (s, flags);
|
||||||
stream_putc (s, message);
|
stream_putc (s, message);
|
||||||
stream_putw (s, SAFI_UNICAST);
|
stream_putw (s, SAFI_UNICAST);
|
||||||
|
|
||||||
|
@ -1064,7 +1064,7 @@ ospf_zebra_read_ipv4 (int command, struct zclient *zclient,
|
||||||
/* Type, flags, message. */
|
/* Type, flags, message. */
|
||||||
api.type = stream_getc (s);
|
api.type = stream_getc (s);
|
||||||
api.instance = stream_getw (s);
|
api.instance = stream_getw (s);
|
||||||
api.flags = stream_getc (s);
|
api.flags = stream_getl (s);
|
||||||
api.message = stream_getc (s);
|
api.message = stream_getc (s);
|
||||||
|
|
||||||
/* IPv4 prefix. */
|
/* IPv4 prefix. */
|
||||||
|
|
|
@ -552,7 +552,7 @@ static int redist_read_ipv4_route(int command, struct zclient *zclient,
|
||||||
/* Type, flags, message. */
|
/* Type, flags, message. */
|
||||||
api.type = stream_getc(s);
|
api.type = stream_getc(s);
|
||||||
api.instance = stream_getw (s);
|
api.instance = stream_getw (s);
|
||||||
api.flags = stream_getc(s);
|
api.flags = stream_getl(s);
|
||||||
api.message = stream_getc(s);
|
api.message = stream_getc(s);
|
||||||
|
|
||||||
/* IPv4 prefix length. */
|
/* IPv4 prefix length. */
|
||||||
|
|
|
@ -147,7 +147,7 @@ rip_zebra_read_ipv4 (int command, struct zclient *zclient, zebra_size_t length,
|
||||||
/* Type, flags, message. */
|
/* Type, flags, message. */
|
||||||
api.type = stream_getc (s);
|
api.type = stream_getc (s);
|
||||||
api.instance = stream_getw (s);
|
api.instance = stream_getw (s);
|
||||||
api.flags = stream_getc (s);
|
api.flags = stream_getl (s);
|
||||||
api.message = stream_getc (s);
|
api.message = stream_getc (s);
|
||||||
|
|
||||||
/* IPv4 prefix. */
|
/* IPv4 prefix. */
|
||||||
|
|
|
@ -143,7 +143,7 @@ ripng_zebra_read_ipv6 (int command, struct zclient *zclient,
|
||||||
/* Type, flags, message. */
|
/* Type, flags, message. */
|
||||||
api.type = stream_getc (s);
|
api.type = stream_getc (s);
|
||||||
api.instance = stream_getw (s);
|
api.instance = stream_getw (s);
|
||||||
api.flags = stream_getc (s);
|
api.flags = stream_getl (s);
|
||||||
api.message = stream_getc (s);
|
api.message = stream_getc (s);
|
||||||
|
|
||||||
/* IPv6 prefix. */
|
/* IPv6 prefix. */
|
||||||
|
|
|
@ -79,7 +79,7 @@ struct rib
|
||||||
* This flag's definition is in lib/zebra.h ZEBRA_FLAG_* and is exposed
|
* This flag's definition is in lib/zebra.h ZEBRA_FLAG_* and is exposed
|
||||||
* to clients via Zserv
|
* to clients via Zserv
|
||||||
*/
|
*/
|
||||||
u_char flags;
|
u_int32_t flags;
|
||||||
|
|
||||||
/* RIB internal status */
|
/* RIB internal status */
|
||||||
u_char status;
|
u_char status;
|
||||||
|
|
|
@ -629,7 +629,7 @@ zsend_redistribute_route (int cmd, struct zserv *client, struct prefix *p,
|
||||||
/* Put type and nexthop. */
|
/* Put type and nexthop. */
|
||||||
stream_putc (s, rib->type);
|
stream_putc (s, rib->type);
|
||||||
stream_putw (s, rib->instance);
|
stream_putw (s, rib->instance);
|
||||||
stream_putc (s, rib->flags);
|
stream_putl (s, rib->flags);
|
||||||
|
|
||||||
/* marker for message flags field */
|
/* marker for message flags field */
|
||||||
messmark = stream_get_endp (s);
|
messmark = stream_get_endp (s);
|
||||||
|
@ -1056,7 +1056,7 @@ zread_ipv4_add (struct zserv *client, u_short length, struct zebra_vrf *zvrf)
|
||||||
/* Type, flags, message. */
|
/* Type, flags, message. */
|
||||||
rib->type = stream_getc (s);
|
rib->type = stream_getc (s);
|
||||||
rib->instance = stream_getw (s);
|
rib->instance = stream_getw (s);
|
||||||
rib->flags = stream_getc (s);
|
rib->flags = stream_getl (s);
|
||||||
message = stream_getc (s);
|
message = stream_getc (s);
|
||||||
safi = stream_getw (s);
|
safi = stream_getw (s);
|
||||||
rib->uptime = time (NULL);
|
rib->uptime = time (NULL);
|
||||||
|
@ -1160,7 +1160,7 @@ zread_ipv4_delete (struct zserv *client, u_short length, struct zebra_vrf *zvrf)
|
||||||
/* Type, flags, message. */
|
/* Type, flags, message. */
|
||||||
api.type = stream_getc (s);
|
api.type = stream_getc (s);
|
||||||
api.instance = stream_getw (s);
|
api.instance = stream_getw (s);
|
||||||
api.flags = stream_getc (s);
|
api.flags = stream_getl (s);
|
||||||
api.message = stream_getc (s);
|
api.message = stream_getc (s);
|
||||||
api.safi = stream_getw (s);
|
api.safi = stream_getw (s);
|
||||||
|
|
||||||
|
@ -1266,7 +1266,7 @@ zread_ipv4_route_ipv6_nexthop_add (struct zserv *client, u_short length, struct
|
||||||
/* Type, flags, message. */
|
/* Type, flags, message. */
|
||||||
rib->type = stream_getc (s);
|
rib->type = stream_getc (s);
|
||||||
rib->instance = stream_getw (s);
|
rib->instance = stream_getw (s);
|
||||||
rib->flags = stream_getc (s);
|
rib->flags = stream_getl (s);
|
||||||
message = stream_getc (s);
|
message = stream_getc (s);
|
||||||
safi = stream_getw (s);
|
safi = stream_getw (s);
|
||||||
rib->uptime = time (NULL);
|
rib->uptime = time (NULL);
|
||||||
|
@ -1393,7 +1393,7 @@ zread_ipv6_add (struct zserv *client, u_short length, struct zebra_vrf *zvrf)
|
||||||
/* Type, flags, message. */
|
/* Type, flags, message. */
|
||||||
rib->type = stream_getc (s);
|
rib->type = stream_getc (s);
|
||||||
rib->instance = stream_getw (s);
|
rib->instance = stream_getw (s);
|
||||||
rib->flags = stream_getc (s);
|
rib->flags = stream_getl (s);
|
||||||
message = stream_getc (s);
|
message = stream_getc (s);
|
||||||
safi = stream_getw (s);
|
safi = stream_getw (s);
|
||||||
rib->uptime = time (NULL);
|
rib->uptime = time (NULL);
|
||||||
|
@ -1507,7 +1507,7 @@ zread_ipv6_delete (struct zserv *client, u_short length, struct zebra_vrf *zvrf)
|
||||||
/* Type, flags, message. */
|
/* Type, flags, message. */
|
||||||
api.type = stream_getc (s);
|
api.type = stream_getc (s);
|
||||||
api.instance = stream_getw (s);
|
api.instance = stream_getw (s);
|
||||||
api.flags = stream_getc (s);
|
api.flags = stream_getl (s);
|
||||||
api.message = stream_getc (s);
|
api.message = stream_getc (s);
|
||||||
api.safi = stream_getw (s);
|
api.safi = stream_getw (s);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue