summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/ldp.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2017-03-04 00:06:11 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2017-03-04 00:06:11 +0000
commit512924baf176079550a3e543d949bc8ab73cf778 (patch)
tree99ae0fe570c15063f701ef6a06b3d4c5ac7c4f3b /usr.sbin/ldpd/ldp.h
parentf0cbdab642f0c88a7edb19fb0e8cf2a44ee3acee (diff)
Implement RFC 5561 (LDP Capabilities).
This patch per-se doesn't introduce any useful functionality, but prepares the ground for new enhancements to ldpd (i.e. implementation of new RFCs that make use of LDP capabilities).
Diffstat (limited to 'usr.sbin/ldpd/ldp.h')
-rw-r--r--usr.sbin/ldpd/ldp.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/usr.sbin/ldpd/ldp.h b/usr.sbin/ldpd/ldp.h
index e8c007a9c08..dd00af9eb76 100644
--- a/usr.sbin/ldpd/ldp.h
+++ b/usr.sbin/ldpd/ldp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldp.h,v 1.37 2017/03/03 23:56:54 renato Exp $ */
+/* $OpenBSD: ldp.h,v 1.38 2017/03/04 00:06:10 renato Exp $ */
/*
* Copyright (c) 2013, 2016 Renato Westphal <renato@openbsd.org>
@@ -65,6 +65,7 @@
#define MSG_TYPE_HELLO 0x0100
#define MSG_TYPE_INIT 0x0200
#define MSG_TYPE_KEEPALIVE 0x0201
+#define MSG_TYPE_CAPABILITY 0x0202 /* RFC 5561 */
#define MSG_TYPE_ADDR 0x0300
#define MSG_TYPE_ADDRWITHDRAW 0x0301
#define MSG_TYPE_LABELMAPPING 0x0400
@@ -97,6 +98,9 @@
#define TLV_TYPE_PW_STATUS 0x896A
#define TLV_TYPE_PW_IF_PARAM 0x096B
#define TLV_TYPE_PW_GROUP_ID 0x096C
+/* RFC 5561 */
+#define TLV_TYPE_RETURNED_TLVS 0x8304
+#define TLV_TYPE_DYNAMIC_CAP 0x8506
/* RFC 7552 */
#define TLV_TYPE_DUALSTACK 0x8701
@@ -198,6 +202,8 @@ struct hello_prms_opt16_tlv {
#define S_UNASSIGN_TAI 0x00000029
#define S_MISCONF_ERR 0x0000002A
#define S_WITHDRAW_MTHD 0x0000002B
+/* RFC 5561 */
+#define S_UNSSUPORTDCAP 0x0000002E
/* RFC 7552 */
#define S_TRANS_MISMTCH 0x80000032
#define S_DS_NONCMPLNCE 0x80000033
@@ -229,6 +235,18 @@ struct status_tlv {
#define STATUS_TLV_LEN 10
#define STATUS_FATAL 0x80000000
+struct capability_tlv {
+ uint16_t type;
+ uint16_t length;
+ uint8_t reserved;
+};
+#define STATE_BIT 0x80
+
+#define F_CAP_TLV_RCVD_DYNAMIC 0x01
+
+#define CAP_TLV_DYNAMIC_SIZE 5
+#define CAP_TLV_DYNAMIC_LEN 1
+
#define AF_IPV4 0x1
#define AF_IPV6 0x2