Revision 4847a894 proto/bgp/bgp.h

View differences:

proto/bgp/bgp.h
25 25
  int compare_path_lengths;		/* Use path lengths when selecting best route */
26 26
  u32 default_local_pref;		/* Default value for LOCAL_PREF attribute */
27 27
  u32 default_med;			/* Default value for MULTI_EXIT_DISC attribute */
28
  u32 rr_cluster_id;			/* Route reflector cluster ID, if different from local ID */
29
  int rr_client;			/* Whether neighbor is RR client of me */
28 30
  unsigned connect_retry_time;
29 31
  unsigned hold_time, initial_hold_time;
30 32
  unsigned keepalive_time;
......
60 62
  int as4_support;			/* Peer supports 4B AS numbers [RFC4893] */
61 63
  u32 local_id;				/* BGP identifier of this router */
62 64
  u32 remote_id;			/* BGP identifier of the neighbor */
65
  u32 rr_cluster_id;			/* Route reflector cluster ID */
66
  int rr_client;			/* Whether neighbor is RR client of me */
63 67
  struct bgp_conn *conn;		/* Connection we have established */
64 68
  struct bgp_conn outgoing_conn;	/* Outgoing connection we're working with */
65 69
  struct bgp_conn incoming_conn;	/* Incoming connection we have neither accepted nor rejected yet */
......
121 125

  
122 126
/* attrs.c */
123 127

  
124
byte *bgp_attach_attr(struct ea_list **to, struct linpool *, unsigned attr, unsigned val);
128
void bgp_attach_attr(struct ea_list **to, struct linpool *pool, unsigned attr, uintptr_t val);
129
byte *bgp_attach_attr_wa(struct ea_list **to, struct linpool *pool, unsigned attr, unsigned len);
125 130
struct rta *bgp_decode_attrs(struct bgp_conn *conn, byte *a, unsigned int len, struct linpool *pool, int mandatory);
126 131
int bgp_get_attr(struct eattr *e, byte *buf);
127 132
int bgp_rte_better(struct rte *, struct rte *);
......
132 137
void bgp_free_bucket(struct bgp_proto *p, struct bgp_bucket *buck);
133 138
void bgp_get_route_info(struct rte *, byte *buf, struct ea_list *attrs);
134 139

  
140
inline static void bgp_attach_attr_ip(struct ea_list **to, struct linpool *pool, unsigned attr, ip_addr a)
141
{ *(ip_addr *) bgp_attach_attr_wa(to, pool, attr, sizeof(ip_addr)) = a; }
142

  
135 143
/* packets.c */
136 144

  
137 145
void bgp_schedule_packet(struct bgp_conn *conn, int type);

Also available in: Unified diff