summaryrefslogtreecommitdiff
path: root/ospfd/ospf_api.h
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2022-10-16 15:19:37 +0000
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2022-10-29 14:38:46 +0000
commit3e95e20a6acb39c543261a36921de4fca23fdec9 (patch)
treee6b7034228089fea1d19cdc34866c29fc35749b6 /ospfd/ospf_api.h
parentd6eda57ab057d3c44373428a3e23c5c53e4bc105 (diff)
ospfd/ospfclient: add option to flush/withdrawal with zero length
default behavior is unchanged, i.e., to not zero Signed-off-by: Lou Berger <lberger@labn.net> (cherry picked from commit 2f30cb25747dc9657046c59ca1f378203192de26)
Diffstat (limited to 'ospfd/ospf_api.h')
-rw-r--r--ospfd/ospf_api.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/ospfd/ospf_api.h b/ospfd/ospf_api.h
index 589e650bbd..6f569e962d 100644
--- a/ospfd/ospf_api.h
+++ b/ospfd/ospf_api.h
@@ -185,11 +185,19 @@ struct msg_originate_request {
struct lsa_header data;
};
+
+/* OSPF API MSG Delete Flag. */
+#define OSPF_API_DEL_ZERO_LEN_LSA 0x01 /* send withdrawal with no LSA data */
+
+#define IS_DEL_ZERO_LEN_LSA(x) ((x)->flags & OSPF_API_DEL_ZERO_LEN_LSA)
+
struct msg_delete_request {
- struct in_addr addr; /* intf IP for link local, area for type 10, "0.0.0.0" for AS-external */
+ struct in_addr addr; /* intf IP for link local, area for type 10,
+ "0.0.0.0" for AS-external */
uint8_t lsa_type;
uint8_t opaque_type;
- uint8_t pad[2]; /* padding */
+ uint8_t pad; /* padding */
+ uint8_t flags; /* delete flags */
uint32_t opaque_id;
};
@@ -313,7 +321,7 @@ extern struct msg *new_msg_originate_request(uint32_t seqnum,
struct lsa_header *data);
extern struct msg *new_msg_delete_request(uint32_t seqnum, struct in_addr addr,
uint8_t lsa_type, uint8_t opaque_type,
- uint32_t opaque_id);
+ uint32_t opaque_id, uint8_t flags);
/* Messages sent by OSPF daemon */
extern struct msg *new_msg_reply(uint32_t seqnum, uint8_t rc);