]>
git.proxmox.com Git - mirror_frr.git/blob - lib/if_rmap.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* route-map for interface.
3 * Copyright (C) 1999 Kunihiro Ishiguro
6 #ifndef _ZEBRA_IF_RMAP_H
7 #define _ZEBRA_IF_RMAP_H
18 enum if_rmap_type
{ IF_RMAP_IN
, IF_RMAP_OUT
, IF_RMAP_MAX
};
21 /* Name of the interface. */
24 char *routemap
[IF_RMAP_MAX
];
29 struct hash
*ifrmaphash
;
32 void (*if_rmap_add_hook
)(struct if_rmap_ctx
*ctx
,
33 struct if_rmap
*ifrmap
);
34 void (*if_rmap_delete_hook
)(struct if_rmap_ctx
*ctx
,
35 struct if_rmap
*ifrmap
);
37 /* naming information */
41 extern struct if_rmap_ctx
*if_rmap_ctx_create(const char *name
);
42 extern void if_rmap_ctx_delete(struct if_rmap_ctx
*ctx
);
43 extern void if_rmap_init(int node
);
44 extern void if_rmap_terminate(void);
45 void if_rmap_hook_add(struct if_rmap_ctx
*ctx
,
46 void (*func
)(struct if_rmap_ctx
*ctx
,
48 void if_rmap_hook_delete(struct if_rmap_ctx
*ctx
,
49 void (*func
)(struct if_rmap_ctx
*ctx
,
51 extern struct if_rmap
*if_rmap_lookup(struct if_rmap_ctx
*ctx
,
53 extern void if_rmap_yang_modify_cb(struct if_rmap_ctx
*ctx
,
54 const struct lyd_node
*dnode
,
55 enum if_rmap_type type
, bool del
);
56 extern void if_rmap_yang_destroy_cb(struct if_rmap_ctx
*ctx
,
57 const struct lyd_node
*dnode
);
58 extern int config_write_if_rmap(struct vty
*, struct if_rmap_ctx
*ctx
);
59 void cli_show_if_route_map(struct vty
*vty
, const struct lyd_node
*dnode
,
66 #endif /* _ZEBRA_IF_RMAP_H */