mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-08 12:18:42 +00:00
Minor fixme - MIFs
This commit is contained in:
parent
1711023df2
commit
33d7612d23
22
nest/iface.c
22
nest/iface.c
@ -765,6 +765,26 @@ mif_get(struct mif_group *grp, struct iface *iface)
|
||||
return mif;
|
||||
}
|
||||
|
||||
struct mif *
|
||||
mif_find(struct mif_group *grp, struct iface *iface)
|
||||
{
|
||||
WALK_ARRAY(grp->mifs, MIFS_MAX, mif)
|
||||
if (mif && (mif->iface == iface))
|
||||
return mif;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct mif *
|
||||
mif_find_by_index(struct mif_group *grp, uint index)
|
||||
{
|
||||
WALK_ARRAY(grp->mifs, MIFS_MAX, mif)
|
||||
if (mif && (mif->iface->index == index))
|
||||
return mif;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
mif_free(struct mif_group *grp, struct mif *mif)
|
||||
{
|
||||
@ -801,7 +821,7 @@ mif_listen_igmp(struct mif_group *grp, struct mif *mif, sock *s)
|
||||
* modify it to preserve it for others.
|
||||
*/
|
||||
static void
|
||||
mif_do_forward(sock *src, sock *dst, int len)
|
||||
mif_do_forward(sock *src, sock *dst, uint len)
|
||||
{
|
||||
if (!dst->rx_hook)
|
||||
return;
|
||||
|
@ -132,6 +132,8 @@ struct iface *if_get_by_name(char *);
|
||||
void if_recalc_all_preferred_addresses(void);
|
||||
|
||||
struct mif *mif_get(struct mif_group *grp, struct iface *iface);
|
||||
struct mif *mif_find(struct mif_group *grp, struct iface *iface);
|
||||
struct mif *mif_find_by_index(struct mif_group *grp, uint index);
|
||||
void mif_free(struct mif_group *grp, struct mif *mif);
|
||||
|
||||
#define MIFS_SET(mif,m) ((m) |= (1 << (mif)->index))
|
||||
|
Loading…
Reference in New Issue
Block a user