diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-08-29 00:04:57 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-01-12 23:34:17 +0100 |
commit | b879c02f0f7d6d33acb2f9087071f3bf711e9231 (patch) | |
tree | cf3bd1cb26f3a8aa141cdb60810a5ed5d91066fd | |
parent | 26faaa926266b9b1a20c581f8226efa71afcb86a (diff) |
TunnelEncaps: Add format callback
-rw-r--r-- | lib/tunnel_encaps.c | 8 | ||||
-rw-r--r-- | lib/tunnel_encaps.h | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/tunnel_encaps.c b/lib/tunnel_encaps.c index d65282d6..87570e0a 100644 --- a/lib/tunnel_encaps.c +++ b/lib/tunnel_encaps.c @@ -301,3 +301,11 @@ int format_tunnel_encap(const eattr *a, byte *buf, uint size) return pos - buf; } + +void register_format_tunnel_encap(int type UNUSED, format_tunnel_encap_fn cb UNUSED) +{ +} + +void unregister_format_tunnel_encap(int type UNUSED, format_tunnel_encap_fn cb UNUSED) +{ +} 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_ */ |