mirror of
				https://gitlab.labs.nic.cz/labs/bird.git
				synced 2024-05-11 16:54:54 +00:00 
			
		
		
		
	Moved filter value union to lib
This commit is contained in:
		
							
								
								
									
										20
									
								
								lib/attrs.h
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								lib/attrs.h
									
									
									
									
									
								
							| @@ -11,7 +11,25 @@ | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "lib/unaligned.h" | ||||
| #include "lib/route.h" | ||||
|  | ||||
| typedef struct adata { | ||||
|   uint length;				/* Length of data */ | ||||
|   byte data[0]; | ||||
| } adata; | ||||
|  | ||||
| extern const adata null_adata;		/* adata of length 0 */ | ||||
|  | ||||
| static inline struct adata * | ||||
| lp_alloc_adata(struct linpool *pool, uint len) | ||||
| { | ||||
|   struct adata *ad = lp_alloc(pool, sizeof(struct adata) + len); | ||||
|   ad->length = len; | ||||
|   return ad; | ||||
| } | ||||
|  | ||||
| static inline int adata_same(const struct adata *a, const struct adata *b) | ||||
| { return (a->length == b->length && !memcmp(a->data, b->data, a->length)); } | ||||
|  | ||||
|  | ||||
|  | ||||
| /* a-path.c */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user