Lines Matching refs:extendsiz

262 	size_t extendsiz;  in esp_output()  local
618 extendsiz = padbound - (plen % padbound); in esp_output()
619 if (extendsiz == 1) { in esp_output()
620 extendsiz = padbound + 1; in esp_output()
635 if (randpadmax < 0 || plen + extendsiz >= randpadmax) { in esp_output()
642 pad = (randpadmax - plen + extendsiz) / padbound; in esp_output()
659 if (extendsiz + pad <= MLEN && extendsiz + pad < 256) { in esp_output()
660 extendsiz += pad; in esp_output()
674 if (!(n->m_flags & M_EXT) && extendsiz < M_TRAILINGSPACE(n)) { in esp_output()
676 n->m_len += (int)extendsiz; in esp_output()
677 m->m_pkthdr.len += extendsiz; in esp_output()
690 VERIFY(extendsiz <= INT_MAX); in esp_output()
691 nn->m_len = (int)extendsiz; in esp_output()
695 m->m_pkthdr.len += extendsiz; in esp_output()
699 key_randomfill(extend, extendsiz); in esp_output()
702 bzero(extend, extendsiz); in esp_output()
705 for (i = 0; i < extendsiz; i++) { in esp_output()
735 VERIFY((extendsiz - 2) <= UINT8_MAX); in esp_output()
736 esptail->esp_padlen = (u_int8_t)(extendsiz - 2); in esp_output()
742 if (extendsiz < (IP_MAXPACKET - ntohs(ip->ip_len))) { in esp_output()
743 ip->ip_len = htons(ntohs(ip->ip_len) + (u_short)extendsiz); in esp_output()
777 if ((*algo->encrypt)(m, espoff, plen + extendsiz, sav, algo, ivlen)) { in esp_output()
902 VERIFY((plen + siz + extendsiz + esphlen) <= UINT16_MAX); in esp_output()
903 udp->uh_ulen = htons((u_int16_t)(plen + siz + extendsiz + esphlen)); in esp_output()
985 size_t iphlen = 0, esphlen = 0, padbound = 0, extendsiz = 0, plen = 0; in esp_kpipe_output() local
1098 extendsiz = padbound - (plen % padbound); in esp_kpipe_output()
1099 if (extendsiz == 1) { in esp_kpipe_output()
1100 extendsiz = padbound + 1; in esp_kpipe_output()
1102 VERIFY(extendsiz <= UINT8_MAX); in esp_kpipe_output()
1122 size_t total_len = iphlen + esphlen + plen + extendsiz + auth_size; in esp_kpipe_output()
1135 if (__improbable((slen + extendsiz) > slim)) { in esp_kpipe_output()
1146 add_ip_len = esphlen + extendsiz + auth_size; in esp_kpipe_output()
1198 esptail = (struct esptail *)(sbaddr + slen + extendsiz - sizeof(struct esptail)); in esp_kpipe_output()
1200 esptail->esp_padlen = (u_int8_t)(extendsiz - 2); in esp_kpipe_output()
1222 if (__improbable((err = (*e_algo->encrypt_pkt)(sav, src_payload, plen + extendsiz, in esp_kpipe_output()
1223 esp, iv, ivlen, dst_payload, plen + extendsiz)) != 0)) { in esp_kpipe_output()
1232 auth_buf = dst_payload + plen + extendsiz; in esp_kpipe_output()
1244 esphlen + plen + extendsiz, auth_buf, auth_size)) != 0)) { in esp_kpipe_output()