version 1.18, 1995/06/13 05:59:37 |
version 1.19, 1995/12/13 23:47:40 |
Line 360 tuncioctl(dev, cmd, data, flag, p) |
|
Line 360 tuncioctl(dev, cmd, data, flag, p) |
|
case FIONREAD: |
case FIONREAD: |
s = splimp(); |
s = splimp(); |
if (tp->tun_if.if_snd.ifq_head) |
if (tp->tun_if.if_snd.ifq_head) |
*(int *)data = tp->tun_if.if_snd.ifq_head->m_len; |
*(int *)data = tp->tun_if.if_snd.ifq_head->m_pkthdr.len; |
else |
else |
*(int *)data = 0; |
*(int *)data = 0; |
splx(s); |
splx(s); |
Line 428 tunread(dev, uio) |
|
Line 428 tunread(dev, uio) |
|
TUNDEBUG("Dropping mbuf\n"); |
TUNDEBUG("Dropping mbuf\n"); |
m_freem(m0); |
m_freem(m0); |
} |
} |
|
if (error) |
|
ifp->if_ierrors++; |
return error; |
return error; |
} |
} |
|
|
Line 478 tunwrite(dev, uio) |
|
Line 480 tunwrite(dev, uio) |
|
if (error) { |
if (error) { |
if (top) |
if (top) |
m_freem (top); |
m_freem (top); |
|
ifp->if_ierrors++; |
return error; |
return error; |
} |
} |
|
|