]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/stream.h
Merge pull request #10987 from opensourcerouting/fix/bgp_conditional_advertisements_r...
[mirror_frr.git] / lib / stream.h
index 4f75f121ca25a6ad3034f51fdd800686933e256e..35733e743858a44da28a33d863d1ff15d8136810 100644 (file)
@@ -197,13 +197,12 @@ extern int stream_put_in_addr_at(struct stream *s, size_t putp,
                                 const struct in_addr *addr);
 extern int stream_put_in6_addr_at(struct stream *s, size_t putp,
                                  const struct in6_addr *addr);
-extern int stream_put_prefix_addpath(struct stream *s,
-                                    const struct prefix *p,
-                                    int addpath_encode,
+extern int stream_put_prefix_addpath(struct stream *s, const struct prefix *p,
+                                    bool addpath_capable,
                                     uint32_t addpath_tx_id);
 extern int stream_put_prefix(struct stream *s, const struct prefix *p);
 extern int stream_put_labeled_prefix(struct stream *, const struct prefix *,
-                                    mpls_label_t *, int addpath_encode,
+                                    mpls_label_t *, bool addpath_capable,
                                     uint32_t addpath_tx_id);
 extern void stream_get(void *, struct stream *, size_t);
 extern bool stream_get2(void *data, struct stream *s, size_t size);
@@ -262,6 +261,16 @@ extern int stream_empty(struct stream *); /* is the stream empty? */
 /* debugging */
 extern void stream_hexdump(const struct stream *s);
 
+/**
+ * Reorganize the buffer data so it can fit more. This function is normally
+ * called right after stream data is consumed so we can read more data
+ * (the functions that consume data start with `stream_get*()` and macros
+ * `STREAM_GET*()`).
+ *
+ * \param s stream pointer.
+ */
+extern void stream_pulldown(struct stream *s);
+
 /* deprecated */
 extern uint8_t *stream_pnt(struct stream *);