summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-04-22 15:29:02 -0400
committerGitHub <noreply@github.com>2019-04-22 15:29:02 -0400
commit8f19bc1c6922be3c466b479b59d6365b5c0924da (patch)
treed6a0af340ebb7691b08099759056927e9169e7c0 /lib/if.c
parent0b4f815088bca6d42225c034e590dfd007499964 (diff)
parent39fa2825acb99904acbf5219958748796a8f4667 (diff)
Merge pull request #3786 from mjstapp/dplane_intf
zebra: async interface address programming
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/if.c b/lib/if.c
index 2eb8a448f2..86b850c059 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -436,13 +436,13 @@ void if_set_index(struct interface *ifp, ifindex_t ifindex)
}
/* Does interface up ? */
-int if_is_up(struct interface *ifp)
+int if_is_up(const struct interface *ifp)
{
return ifp->flags & IFF_UP;
}
/* Is interface running? */
-int if_is_running(struct interface *ifp)
+int if_is_running(const struct interface *ifp)
{
return ifp->flags & IFF_RUNNING;
}
@@ -450,7 +450,7 @@ int if_is_running(struct interface *ifp)
/* Is the interface operative, eg. either UP & RUNNING
or UP & !ZEBRA_INTERFACE_LINK_DETECTION and
if ptm checking is enabled, then ptm check has passed */
-int if_is_operative(struct interface *ifp)
+int if_is_operative(const struct interface *ifp)
{
return ((ifp->flags & IFF_UP)
&& (((ifp->flags & IFF_RUNNING)
@@ -461,7 +461,7 @@ int if_is_operative(struct interface *ifp)
/* Is the interface operative, eg. either UP & RUNNING
or UP & !ZEBRA_INTERFACE_LINK_DETECTION, without PTM check */
-int if_is_no_ptm_operative(struct interface *ifp)
+int if_is_no_ptm_operative(const struct interface *ifp)
{
return ((ifp->flags & IFF_UP)
&& ((ifp->flags & IFF_RUNNING)
@@ -470,7 +470,7 @@ int if_is_no_ptm_operative(struct interface *ifp)
}
/* Is this loopback interface ? */
-int if_is_loopback(struct interface *ifp)
+int if_is_loopback(const struct interface *ifp)
{
/* XXX: Do this better, eg what if IFF_WHATEVER means X on platform M
* but Y on platform N?
@@ -479,12 +479,12 @@ int if_is_loopback(struct interface *ifp)
}
/* Check interface is VRF */
-int if_is_vrf(struct interface *ifp)
+int if_is_vrf(const struct interface *ifp)
{
return CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_VRF_LOOPBACK);
}
-bool if_is_loopback_or_vrf(struct interface *ifp)
+bool if_is_loopback_or_vrf(const struct interface *ifp)
{
if (if_is_loopback(ifp) || if_is_vrf(ifp))
return true;
@@ -493,19 +493,19 @@ bool if_is_loopback_or_vrf(struct interface *ifp)
}
/* Does this interface support broadcast ? */
-int if_is_broadcast(struct interface *ifp)
+int if_is_broadcast(const struct interface *ifp)
{
return ifp->flags & IFF_BROADCAST;
}
/* Does this interface support broadcast ? */
-int if_is_pointopoint(struct interface *ifp)
+int if_is_pointopoint(const struct interface *ifp)
{
return ifp->flags & IFF_POINTOPOINT;
}
/* Does this interface support multicast ? */
-int if_is_multicast(struct interface *ifp)
+int if_is_multicast(const struct interface *ifp)
{
return ifp->flags & IFF_MULTICAST;
}