Revision 54e55169 proto/bgp/attrs.c

View differences:

proto/bgp/attrs.c
170 170
  return bgp_set_attr(a->attrs, pool, attr, val);
171 171
}
172 172

  
173
/**
174
 * bgp_encode_attrs - encode BGP attributes
175
 * @w: buffer
176
 * @attrs: a list of extended attributes
177
 * @remains: remaining space in the buffer
178
 *
179
 * The bgp_encode_attrs() function takes a list of extended attributes
180
 * and converts it to its BGP representation (a part of an Update message).
181
 *
182
 * Result: Length of the attribute block generated.
183
 */
173 184
unsigned int
174 185
bgp_encode_attrs(byte *w, ea_list *attrs, int remains)
175 186
{
......
715 726
  return 0;
716 727
}
717 728

  
729
/**
730
 * bgp_decode_attrs - check and decode BGP attributes
731
 * @conn: connection
732
 * @attr: start of attribute block
733
 * @len: length of attribute block
734
 * @pool: linear pool to make all the allocations in
735
 * @mandatory: 1 iff presence of mandatory attributes has to be checked
736
 *
737
 * This function takes a BGP attribute block (a part of an Update message), checks
738
 * its consistency and converts it to a list of BIRD route attributes represented
739
 * by a &rta.
740
 */
718 741
struct rta *
719 742
bgp_decode_attrs(struct bgp_conn *conn, byte *attr, unsigned int len, struct linpool *pool, int mandatory)
720 743
{

Also available in: Unified diff