Revision 11cb6202 nest/attrs.h

View differences:

nest/attrs.h
14 14
#define AS_PATH_SET		1	/* Types of path segments */
15 15
#define AS_PATH_SEQUENCE	2
16 16

  
17
struct adata *as_path_prepend(struct linpool *pool, struct adata *olda, int as);
17
#define AS_PATH_MAXLEN		10000
18

  
19
#define AS_TRANS		23456
20
/* AS_TRANS is used when we need to store 32bit ASN larger than 0xFFFF
21
 * to 16bit slot (like in 16bit AS_PATH). See RFC 4893 for details
22
 */
23

  
24
struct adata *as_path_prepend(struct linpool *pool, struct adata *olda, u32 as);
25
int as_path_convert_to_old(struct adata *path, byte *dst, int *new_used);
26
int as_path_convert_to_new(struct adata *path, byte *dst, int req_as);
18 27
void as_path_format(struct adata *path, byte *buf, unsigned int size);
19 28
int as_path_getlen(struct adata *path);
20
int as_path_get_first(struct adata *path);
29
int as_path_get_first(struct adata *path, u32 *orig_as);
30
int as_path_is_member(struct adata *path, u32 as);
31

  
21 32

  
22 33
struct f_path_mask {
23 34
  struct f_path_mask *next;
24
  int val;
35
  u32 val;
36
  int any;
25 37
};
26
#define PM_ANY -1
38

  
39
// #define PM_ANY -1
27 40

  
28 41
int as_path_match(struct adata *path, struct f_path_mask *mask);
29 42

  

Also available in: Unified diff