summaryrefslogtreecommitdiff
path: root/lib/tunnel_encaps.h
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2020-08-29 00:04:57 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2020-09-13 18:05:34 +0200
commite8d34d7262d240cff35f34b555188ccbfb7bc110 (patch)
treec7f782d5dae2dff0cca59168d7613634269a84ae /lib/tunnel_encaps.h
parenta84bd2c2c75f2e28bb62e4beeecc4e5fe483b52b (diff)
TunnelEncaps: Add format callback
Diffstat (limited to 'lib/tunnel_encaps.h')
-rw-r--r--lib/tunnel_encaps.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/tunnel_encaps.h b/lib/tunnel_encaps.h
index 1fc69806..12a905db 100644
--- a/lib/tunnel_encaps.h
+++ b/lib/tunnel_encaps.h
@@ -33,8 +33,13 @@ struct tunnel_encap {
u16 flags;
};
+typedef int (*format_tunnel_encap_fn)(const struct tunnel_encap *, byte *buf, uint size);
+
int decode_tunnel_encap(const eattr *e, struct tunnel_encap *encap, struct pool *pool);
int format_tunnel_encap(const eattr *a, byte *buf, uint size);
+void register_format_tunnel_encap(int type, format_tunnel_encap_fn cb);
+void unregister_format_tunnel_encap(int type, format_tunnel_encap_fn cb);
+
#endif /* _BIRD_TUNNEL_ENCAPS_ */