Lines Matching refs:optlen
135 uint32_t optlen; in tsol_get_option_v4() local
164 optlen = 1; in tsol_get_option_v4()
169 optlen = opt[IPOPT_OLEN]; in tsol_get_option_v4()
170 if (optlen < 2) in tsol_get_option_v4()
173 if (optlen > totallen) in tsol_get_option_v4()
181 if (TSOL_CIPSO_TAG_OFFSET < optlen && in tsol_get_option_v4()
189 totallen -= optlen; in tsol_get_option_v4()
190 opt += optlen; in tsol_get_option_v4()
215 size_t optlen; in tsol_get_option_v6() local
227 optlen = (ip6hbh[1] + 1) << 3; in tsol_get_option_v6()
228 if (ip6hbh + optlen > mp->b_wptr) in tsol_get_option_v6()
230 if (!tsol_find_secopt_v6(ip6hbh, optlen, in tsol_get_option_v6()
241 if ((optlen = opt_ptr[1]) < 8) in tsol_get_option_v6()
257 opt_ptr[5] <= optlen - 4 && in tsol_get_option_v6()
258 opt_ptr[7] <= optlen - 6 && in tsol_get_option_v6()
1097 uint_t optlen; in tsol_find_secopt_v6() local
1105 optlen = hbhlen - 2; in tsol_find_secopt_v6()
1107 while (optlen != 0) { in tsol_find_secopt_v6()
1111 optlen--; in tsol_find_secopt_v6()
1114 if (optlen == 1) in tsol_find_secopt_v6()
1117 if (optused > optlen) in tsol_find_secopt_v6()
1146 optlen -= optused; in tsol_find_secopt_v6()
1272 uint_t optlen; /* rawlen rounded to an 8 byte multiple */ in tsol_prepend_option_v6() local
1291 delta = optlen = (rawlen + 7) & ~7; in tsol_prepend_option_v6()
1292 pad_len = optlen - rawlen; in tsol_prepend_option_v6()
1294 ovbcopy(ip6hbh + 2, ip6hbh + 2 + optlen, in tsol_prepend_option_v6()
1300 optlen >>= 3; in tsol_prepend_option_v6()
1301 if (ip6hbh[1] + optlen > 255) in tsol_prepend_option_v6()
1303 ip6hbh[1] += optlen; in tsol_prepend_option_v6()