lib/netdev-bsd.c
/* Discards all packets waiting to be received from 'rxq'. */
Discards all packets waiting to be received from 'rxq'.
Discards all packets waiting to be received from ' rxq ' .
static int
netdev_bsd_rxq_drain(struct netdev_rxq *rxq_)
{
    struct ifreq ifr;
    struct netdev_rxq_bsd *rxq = netdev_rxq_bsd_cast(rxq_);
    strcpy(ifr.ifr_name, netdev_get_kernel_name(netdev_rxq_get_netdev(rxq_)));
    if (ioctl(rxq->fd, BIOCFLUSH, &ifr) == -1) {
        VLOG_DBG_RL(&rl, "%s: ioctl(BIOCFLUSH) failed: %s",
                    netdev_rxq_get_name(rxq_), ovs_strerror(errno));
        return errno;
    }
    return 0;
}
static int netdev_bsd_rxq_drain ( struct netdev_rxq * rxq_ ) { struct ifreq ifr ; struct netdev_rxq_bsd * rxq = netdev_rxq_bsd_cast ( rxq_ ) ; strcpy ( ifr . ifr_name , netdev_get_kernel_name ( netdev_rxq_get_netdev ( rxq_ ) ) ) ; if ( ioctl ( rxq -> fd , BIOCFLUSH , & ifr ) == -1 ) { VLOG_DBG_RL ( & rl , " " , netdev_rxq_get_name ( rxq_ ) , ovs_strerror ( errno ) ) ; return errno ; } return 0 ; }
Discards all packets waiting to be received from 'rxq'.
Discards all packets waiting to be received from ' rxq ' .