Remove a bunch of methods that are superseded by if_inc_counter().
Sponsored by: Netflix Sponsored by: Nginx, Inc.
This commit is contained in:
parent
df3601781d
commit
d2a707cdfa
127
sys/net/if.c
127
sys/net/if.c
@ -3773,139 +3773,12 @@ if_getvtag(struct mbuf *m)
|
||||
return (m->m_pkthdr.ether_vtag);
|
||||
}
|
||||
|
||||
/* Statistics */
|
||||
int
|
||||
if_incipackets(if_t ifp, int pkts)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_ipackets += pkts;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
if_incopackets(if_t ifp, int pkts)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_opackets += pkts;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
if_incierrors(if_t ifp, int ierrors)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_ierrors += ierrors;
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
if_setierrors(if_t ifp, int ierrors)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_ierrors = ierrors;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
if_setoerrors(if_t ifp, int oerrors)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_oerrors = oerrors;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int if_incoerrors(if_t ifp, int oerrors)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_oerrors += oerrors;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int if_inciqdrops(if_t ifp, int val)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_iqdrops += val;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
if_setcollisions(if_t ifp, int collisions)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_collisions = collisions;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
if_inccollisions(if_t ifp, int collisions)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_collisions += collisions;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
if_setipackets(if_t ifp, int pkts)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_ipackets = pkts;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
if_setopackets(if_t ifp, int pkts)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_opackets = pkts;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
if_incobytes(if_t ifp, int bytes)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_obytes += bytes;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
if_setibytes(if_t ifp, int bytes)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_ibytes = bytes;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
if_setobytes(if_t ifp, int bytes)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_obytes = bytes;
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
if_sendq_empty(if_t ifp)
|
||||
{
|
||||
return IFQ_DRV_IS_EMPTY(&((struct ifnet *)ifp)->if_snd);
|
||||
}
|
||||
|
||||
int if_getiqdrops(if_t ifp)
|
||||
{
|
||||
return ((struct ifnet *)ifp)->if_iqdrops;
|
||||
}
|
||||
|
||||
int
|
||||
if_incimcasts(if_t ifp, int mcast)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_imcasts += mcast;
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
if_incomcasts(if_t ifp, int mcast)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_omcasts += mcast;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
if_setimcasts(if_t ifp, int mcast)
|
||||
{
|
||||
((struct ifnet *)ifp)->if_imcasts = mcast;
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
struct ifaddr *
|
||||
if_getifaddr(if_t ifp)
|
||||
{
|
||||
|
@ -582,27 +582,6 @@ int if_multiaddr_count(if_t ifp, int max);
|
||||
int if_getamcount(if_t ifp);
|
||||
struct ifaddr * if_getifaddr(if_t ifp);
|
||||
|
||||
/* Statistics */
|
||||
|
||||
int if_incipackets(if_t ifp, int pkt);
|
||||
int if_incopackets(if_t ifp, int pkts);
|
||||
int if_incierrors(if_t ifp, int ierrors);
|
||||
int if_incoerrors(if_t ifp, int oerrors);
|
||||
int if_inciqdrops(if_t ifp, int val);
|
||||
int if_setierrors(if_t ifp, int ierrors);
|
||||
int if_setoerrors(if_t ifp, int oerrors);
|
||||
int if_setcollisions(if_t ifp, int collisions);
|
||||
int if_inccollisions(if_t ifp, int collisions);
|
||||
int if_incobytes(if_t ifp, int bytes);
|
||||
int if_getiqdrops(if_t ifp);
|
||||
int if_incimcasts(if_t ifp, int imcasts);
|
||||
int if_incomcasts(if_t ifp, int imcasts);
|
||||
int if_setipackets(if_t ifp, int pkts);
|
||||
int if_setopackets(if_t ifp, int pkts);
|
||||
int if_setibytes(if_t ifp, int bytes);
|
||||
int if_setobytes(if_t ifp, int bytes);
|
||||
int if_setimcasts(if_t ifp, int pkts);
|
||||
|
||||
/* Functions */
|
||||
void if_setinitfn(if_t ifp, void (*)(void *));
|
||||
void if_setioctlfn(if_t ifp, int (*)(if_t, u_long, caddr_t));
|
||||
|
Loading…
Reference in New Issue
Block a user