MCPcopy Create free account
hub / github.com/F-Stack/f-stack / m_contiguous_subsegment

Function m_contiguous_subsegment

freebsd/opencrypto/criov.c:702–719  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

700}
701
702static inline void *
703m_contiguous_subsegment(struct mbuf *m, size_t skip, size_t len)
704{
705 int rel_off;
706
707 MPASS(skip <= INT_MAX);
708
709 m = m_getptr(m, (int)skip, &rel_off);
710 if (m == NULL)
711 return (NULL);
712
713 MPASS(rel_off >= 0);
714 skip = rel_off;
715 if (skip + len > m->m_len)
716 return (NULL);
717
718 return (mtod(m, char*) + skip);
719}
720
721static inline void *
722cuio_contiguous_segment(struct uio *uio, size_t skip, size_t len)

Callers 1

Calls 1

m_getptrFunction · 0.85

Tested by

no test coverage detected