]>
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
13 enum if_rmap_type
{ IF_RMAP_IN
, IF_RMAP_OUT
, IF_RMAP_MAX
};
16 /* Name of the interface. */
19 char *routemap
[IF_RMAP_MAX
];
24 struct hash
*ifrmaphash
;
27 void (*if_rmap_add_hook
)(struct if_rmap_ctx
*ctx
,
28 struct if_rmap
*ifrmap
);
29 void (*if_rmap_delete_hook
)(struct if_rmap_ctx
*ctx
,
30 struct if_rmap
*ifrmap
);
32 /* naming information */
36 extern struct if_rmap_ctx
*if_rmap_ctx_create(const char *name
);
37 extern void if_rmap_ctx_delete(struct if_rmap_ctx
*ctx
);
38 extern void if_rmap_init(int node
);
39 extern void if_rmap_terminate(void);
40 void if_rmap_hook_add(struct if_rmap_ctx
*ctx
,
41 void (*func
)(struct if_rmap_ctx
*ctx
,
43 void if_rmap_hook_delete(struct if_rmap_ctx
*ctx
,
44 void (*func
)(struct if_rmap_ctx
*ctx
,
46 extern struct if_rmap
*if_rmap_lookup(struct if_rmap_ctx
*ctx
,
48 extern int config_write_if_rmap(struct vty
*, struct if_rmap_ctx
*ctx
);
54 #endif /* _ZEBRA_IF_RMAP_H */