summaryrefslogtreecommitdiff
path: root/nest/attrs.h
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2018-09-28 01:03:42 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2020-08-28 23:47:47 +0200
commit0b0a7cf59434d61d92afe96b19a91c90150c5d90 (patch)
treedec71a96cafaa88f4263944064ef361f51811751 /nest/attrs.h
parentda7bc92d3dbbe582e6c1993a3e0e4e3ef426b595 (diff)
Filter: TLV
Diffstat (limited to 'nest/attrs.h')
-rw-r--r--nest/attrs.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/nest/attrs.h b/nest/attrs.h
index 50da817b..317094e8 100644
--- a/nest/attrs.h
+++ b/nest/attrs.h
@@ -221,4 +221,29 @@ struct adata *lc_set_sort(struct linpool *pool, const struct adata *src);
void ec_set_sort_x(struct adata *set); /* Sort in place */
+/* Tunnel Encapsulation TLV types */
+#define TLV_TUNNEL_TYPE 0x00 /* Reserved. Used internally only. */
+#define TLV_ENCAPSULATION 0x01
+#define TLV_COLOR 0x04
+#define TLV_TUNNEL_ENDPOINT 0x06
+#define TLV_UDP_DEST_PORT 0x08
+
+/* Tunnel Encapsulation TLV */
+struct tlv {
+ int type;
+ union {
+ struct {
+ int type;
+ int length;
+ void *data;
+ } tunnel_encap;
+ struct {
+ u32 asn;
+ ip_addr ip;
+ } tunnel_endpoint;
+ u32 color;
+ u16 udp_dest_port;
+ } u;
+};
+
#endif