summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_notification.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_notification.c')
-rw-r--r--bgpd/bgp_notification.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/bgpd/bgp_notification.c b/bgpd/bgp_notification.c
index 50fe35a9..691622e8 100644
--- a/bgpd/bgp_notification.c
+++ b/bgpd/bgp_notification.c
@@ -79,6 +79,23 @@ bgp_notify_new(bgp_nom_code_t code, bgp_nom_subcode_t subcode,
} ;
/*------------------------------------------------------------------------------
+ * Allocate and initialise new notification, complete with data
+ *
+ * Can specify an expected amount of data.
+ */
+extern bgp_notify
+bgp_notify_new_with_data(bgp_nom_code_t code, bgp_nom_subcode_t subcode,
+ const void* data, bgp_size_t len)
+{
+ bgp_notify notification ;
+
+ notification = bgp_notify_new(code, subcode, len) ;
+ bgp_notify_append_data(notification, data, len) ;
+
+ return notification ;
+} ;
+
+/*------------------------------------------------------------------------------
* Free notification structure
*
* Does nothing if there is no structure.