From e8d34d7262d240cff35f34b555188ccbfb7bc110 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 29 Aug 2020 00:04:57 +0200 Subject: TunnelEncaps: Add format callback --- lib/tunnel_encaps.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/tunnel_encaps.h') 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_ */ -- cgit v1.2.3