Lines Matching defs:offs
940 utun_pkt_is_ipsec_keepalive (struct utun_pcb *pcb, mbuf_t *pkt, u_int16_t nxt, u_int32_t flags, size_t offs)
957 printf("%s - invalid hdr len, len %d, offs %lu\n", __FUNCTION__, (*pkt)->m_pkthdr.len, offs);
961 if ((size_t)(*pkt)->m_pkthdr.len <= offs) {
962 printf("%s - invalid offset, len %d, offs %lu\n", __FUNCTION__, (*pkt)->m_pkthdr.len, offs);
967 printf("%s - invalid len, len %d, offs %lu\n", __FUNCTION__, (*pkt)->m_len, offs);
971 // pullup offs + 1 bytes
972 if ((size_t)(*pkt)->m_len < (offs + 1)) {
973 if ((*pkt = m_pullup(*pkt, (offs + 1))) == NULL) {
983 size_diff = (*pkt)->m_pkthdr.len - offs;
985 data += offs;
997 if ((size_t)(*pkt)->m_len >= (offs + size_diff)) {
998 ovbcopy((caddr_t)data, (data + offs), size_diff);
999 (*pkt)->m_data += offs;
1000 (*pkt)->m_len -= offs;
1001 (*pkt)->m_pkthdr.len -= offs;
1005 n = m_split(*pkt, offs, M_DONTWAIT);
1012 m_adj(n, offs);