Lines Matching refs:offset
84 * which contains an SCTP packet starting at offset.
89 sctp_calculate_cksum(struct mbuf *m, uint32_t offset)
93 while (offset > 0) {
94 KASSERT(m != NULL, ("sctp_calculate_cksum, offset > length of mbuf chain"));
95 if (offset < (uint32_t)m->m_len) {
98 offset -= m->m_len;
101 if (offset > 0) {
103 (unsigned char *)(m->m_data + offset),
104 (unsigned int)(m->m_len - offset));
120 * mbuf chain m which contains an SCTP packet starting at offset.
123 sctp_delayed_cksum(struct mbuf *m, uint32_t offset)
127 checksum = sctp_calculate_cksum(m, offset);
130 offset += offsetof(struct sctphdr, checksum);
132 if (offset + sizeof(uint32_t) > (uint32_t)(m->m_len)) {
134 panic("sctp_delayed_cksum(): m->m_len: %d, offset: %u.",
135 m->m_len, offset);
137 SCTP_PRINTF("sctp_delayed_cksum(): m->m_len: %d, offset: %u.\n",
138 m->m_len, offset);
142 *(uint32_t *)(m->m_data + offset) = checksum;