Commit 24773af9 authored by Maria Matejka's avatar Maria Matejka
Browse files

Merge commit 'e42eedb9' into haugesund

parents 83d9920f e42eedb9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1747,7 +1747,7 @@ Common route attributes are:

	<tag><label id="rta-source"><m/enum/ source</tag>
	what protocol has told me about this route. Possible values:
	<cf/RTS_DUMMY/, <cf/RTS_STATIC/, <cf/RTS_INHERIT/, <cf/RTS_DEVICE/,
	<cf/RTS_STATIC/, <cf/RTS_INHERIT/, <cf/RTS_DEVICE/,
	<cf/RTS_RIP/, <cf/RTS_OSPF/, <cf/RTS_OSPF_IA/, <cf/RTS_OSPF_EXT1/,
	<cf/RTS_OSPF_EXT2/, <cf/RTS_BGP/, <cf/RTS_PIPE/, <cf/RTS_BABEL/.

+0 −1
Original line number Diff line number Diff line
@@ -398,7 +398,6 @@ bt_test_suite(t_ip_set, "Testing sets of ip address");

function t_enum()
{
	bt_assert(format(RTS_DUMMY)  = "(enum 30)0");
	bt_assert(format(RTS_STATIC) = "(enum 30)1");
	bt_assert(format(NET_IP4) = "(enum 36)1");
	bt_assert(format(NET_VPN6) = "(enum 36)4");
+1 −1
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ CF_KEYWORDS(SORTED, TRIE, MIN, MAX, SETTLE, TIME)
/* For r_args_channel */
CF_KEYWORDS(IPV4, IPV4_MC, IPV4_MPLS, IPV6, IPV6_MC, IPV6_MPLS, IPV6_SADR, VPN4, VPN4_MC, VPN4_MPLS, VPN6, VPN6_MC, VPN6_MPLS, ROA4, ROA6, FLOW4, FLOW6, MPLS, PRI, SEC)

CF_ENUM(T_ENUM_RTS, RTS_, DUMMY, STATIC, INHERIT, DEVICE, STATIC_DEVICE, REDIRECT,
CF_ENUM(T_ENUM_RTS, RTS_, STATIC, INHERIT, DEVICE, STATIC_DEVICE, REDIRECT,
	RIP, OSPF, OSPF_IA, OSPF_EXT1, OSPF_EXT2, BGP, PIPE, BABEL)
CF_ENUM(T_ENUM_SCOPE, SCOPE_, HOST, LINK, SITE, ORGANIZATION, UNIVERSE, UNDEFINED)
CF_ENUM(T_ENUM_RTD, RTD_, UNICAST, BLACKHOLE, UNREACHABLE, PROHIBIT)
+1 −0
Original line number Diff line number Diff line
@@ -241,6 +241,7 @@ struct proto {
  struct rte * (*rte_modify)(struct rte *, struct linpool *);
  void (*rte_insert)(struct network *, struct rte *);
  void (*rte_remove)(struct network *, struct rte *);
  u32 (*rte_igp_metric)(struct rte *);

  /* Hic sunt protocol-specific data */
};
+4 −32
Original line number Diff line number Diff line
@@ -263,20 +263,6 @@ typedef struct rte {
  byte pflags;				/* Protocol-specific flags */
  btime lastmod;			/* Last modified */
  union {				/* Protocol-dependent data (metrics etc.) */
#ifdef CONFIG_RIP
    struct {
      struct iface *from;		/* Incoming iface */
      u8 metric;			/* RIP metric */
      u16 tag;				/* External route tag */
    } rip;
#endif
#ifdef CONFIG_OSPF
    struct {
      u32 metric1, metric2;		/* OSPF Type 1 and Type 2 metrics */
      u32 tag;				/* External route tag */
      u32 router_id;			/* Router that originated this route */
    } ospf;
#endif
#ifdef CONFIG_BGP
    struct {
      u8 suppressed;			/* Used for deterministic MED comparison */
@@ -284,20 +270,6 @@ typedef struct rte {
      struct rtable *base_table;	/* Base table for Flowspec validation */
    } bgp;
#endif
#ifdef CONFIG_BABEL
    struct {
      u16 seqno;			/* Babel seqno */
      u16 metric;			/* Babel metric */
      u64 router_id;			/* Babel router id */
    } babel;
#endif
    struct {				/* Routes generated by krt sync (both temporary and inherited ones) */
      s8 src;				/* Alleged route source (see krt.h) */
      u8 proto;				/* Kernel source protocol ID */
      u8 seen;				/* Seen during last scan */
      u8 best;				/* Best route in network, propagated to core */
      u32 metric;			/* Kernel metric */
    } krt;
  } u;
} rte;

@@ -498,7 +470,6 @@ typedef struct rta {
  struct nexthop nh;			/* Next hop */
} rta;

#define RTS_DUMMY 0			/* Dummy route to be removed soon */
#define RTS_STATIC 1			/* Normal static route */
#define RTS_INHERIT 2			/* Route inherited from kernel */
#define RTS_DEVICE 3			/* Device route */
@@ -546,7 +517,7 @@ typedef struct eattr {
  byte flags;				/* Protocol-dependent flags */
  byte type;				/* Attribute type and several flags (EAF_...) */
  union {
    u32 data;
    uintptr_t data;
    const struct adata *ptr;		/* Attribute data elsewhere */
  } u;
} eattr;
@@ -578,6 +549,7 @@ const char *ea_custom_name(uint ea);
#define EAF_TYPE_AS_PATH 0x06		/* BGP AS path (encoding per RFC 1771:4.3) */
#define EAF_TYPE_BITFIELD 0x09		/* 32-bit embedded bitfield */
#define EAF_TYPE_INT_SET 0x0a		/* Set of u32's (e.g., a community list) */
#define EAF_TYPE_PTR 0x0d		/* Pointer to an object */
#define EAF_TYPE_EC_SET 0x0e		/* Set of pairs of u32's - ext. community list */
#define EAF_TYPE_LC_SET 0x12		/* Set of triplets of u32's - large community list */
#define EAF_TYPE_UNDEF 0x1f		/* `force undefined' entry */
@@ -632,7 +604,7 @@ struct ea_walk_state {

eattr *ea_find(ea_list *, unsigned ea);
eattr *ea_walk(struct ea_walk_state *s, uint id, uint max);
int ea_get_int(ea_list *, unsigned ea, int def);
uintptr_t ea_get_int(ea_list *, unsigned ea, uintptr_t def);
void ea_dump(ea_list *);
void ea_sort(ea_list *);		/* Sort entries in all sub-lists */
unsigned ea_scan(ea_list *);		/* How many bytes do we need for merged ea_list */
Loading