PPP_HDRLEN
rptr += PPP_HDRLEN;
slen = mp->m_len - PPP_HDRLEN;
if (olen + PPP_HDRLEN + BSD_OVHD > maxolen) {
return olen + PPP_HDRLEN + BSD_OVHD;
rptr += PPP_HDRLEN;
slen = dmsg->m_len - PPP_HDRLEN;
rptr += PPP_HDRLEN;
len = cmp->m_len - PPP_HDRLEN;
space = M_TRAILINGSPACE(dmp) - PPP_HDRLEN + 1;
wptr += PPP_HDRLEN - 1;
ip = (struct ip *)(cp + PPP_HDRLEN);
if (mp->m_len <= PPP_HDRLEN) {
(sc->sc_xc_state, &mcomp, m, slen, sc->sc_if.if_mtu + PPP_HDRLEN);
if (m->m_len <= PPP_HDRLEN) {
dp = mtod(mp, u_char *) + PPP_HDRLEN;
xlen = sl_uncompress_tcp_core(cp + PPP_HDRLEN,
m->m_len - PPP_HDRLEN, ilen - PPP_HDRLEN,
if (hlen + PPP_HDRLEN > MHLEN) {
if (M_TRAILINGSPACE(mp) < hlen + PPP_HDRLEN) {
bcopy(iphdr, cp + PPP_HDRLEN, hlen);
mp->m_len = hlen + PPP_HDRLEN;
m->m_data += PPP_HDRLEN + xlen;
m->m_len -= PPP_HDRLEN + xlen;
xlen = sl_uncompress_tcp_core(cp + PPP_HDRLEN,
m->m_len - PPP_HDRLEN, ilen - PPP_HDRLEN,
m->m_pkthdr.len -= PPP_HDRLEN;
m->m_data += PPP_HDRLEN;
m->m_len -= PPP_HDRLEN;
m->m_pkthdr.len -= PPP_HDRLEN;
m->m_data += PPP_HDRLEN;
m->m_len -= PPP_HDRLEN;
sc->sc_if.if_hdrlen = PPP_HDRLEN;
M_PREPEND(m0, PPP_HDRLEN, M_DONTWAIT);
if (state->hdrlen + PPP_HDRLEN + 2 < wspace) {
wptr += PPP_HDRLEN;
state->strm.avail_out = wspace - (PPP_HDRLEN + 2);
u_char hdr[PPP_HDRLEN + DEFLATE_OVHD];
for (i = 0; i < PPP_HDRLEN + DEFLATE_OVHD; ++i) {
seq = (hdr[PPP_HDRLEN] << 8) + hdr[PPP_HDRLEN+1];
if (state->hdrlen + PPP_HDRLEN < ospace) {
rlen += PPP_HDRLEN + DEFLATE_OVHD;
state->strm.avail_out = ospace - PPP_HDRLEN;
if (olen > state->mru + PPP_HDRLEN)
state->unit, olen, state->mru + PPP_HDRLEN);
#define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN)
if (++sc->sc_ilen > sc->sc_mru + PPP_HDRLEN + PPP_FCSLEN) {
bpf_change_type(&sc->sc_if, DLT_PPP_SERIAL, PPP_HDRLEN);
if (uio->uio_resid > sc->sc_if.if_mtu + PPP_HDRLEN ||
uio->uio_resid < PPP_HDRLEN)
bcopy(mtod(m0, u_char *), dst.sa_data, PPP_HDRLEN);
m_adj(m0, PPP_HDRLEN);
for (len = sc->sc_mru + PPP_HDRLEN + PPP_FCSLEN; len > 0; ){
if (ilen < PPP_HDRLEN + PPP_FCSLEN) {