Lines Matching refs:cur
987 uint8_t *cur = start;
990 sadb_address_t *addrext = (sadb_address_t *)cur;
992 if (cur == NULL)
995 cur += sizeof (*addrext);
996 if (cur > end)
1006 sin = (struct sockaddr_in *)cur;
1008 cur += sin_len;
1009 if (cur > end)
1018 sin6 = (struct sockaddr_in6 *)cur;
1020 cur += sin_len;
1021 if (cur > end)
1031 addrext_len = roundup(cur - start, sizeof (uint64_t));
1034 cur = start + addrext_len;
1035 if (cur > end)
1036 cur = NULL;
1038 return (cur);
1046 sadb_make_kmc_ext(uint8_t *cur, uint8_t *end, uint32_t kmp, uint32_t kmc)
1048 sadb_x_kmc_t *kmcext = (sadb_x_kmc_t *)cur;
1050 if (cur == NULL)
1053 cur += sizeof (*kmcext);
1055 if (cur > end)
1064 return (cur);
1094 uint8_t *cur, *end;
1308 cur = (uint8_t *)(lt + 1);
1311 cur = sadb_make_addr_ext(cur, end, SADB_EXT_ADDRESS_SRC, fam,
1314 if (cur == NULL) {
1320 cur = sadb_make_addr_ext(cur, end, SADB_EXT_ADDRESS_DST, fam,
1323 if (cur == NULL) {
1330 cur = sadb_make_addr_ext(cur, end, SADB_X_EXT_ADDRESS_NATT_LOC,
1333 if (cur == NULL) {
1341 cur = sadb_make_addr_ext(cur, end, SADB_X_EXT_ADDRESS_NATT_REM,
1344 if (cur == NULL) {
1353 cur = sadb_make_addr_ext(cur, end, SADB_X_EXT_ADDRESS_INNER_SRC,
1356 if (cur == NULL) {
1364 cur = sadb_make_addr_ext(cur, end, SADB_X_EXT_ADDRESS_INNER_DST,
1367 if (cur == NULL) {
1375 cur = sadb_make_kmc_ext(cur, end,
1377 if (cur == NULL) {
1384 walker = (sadb_ext_t *)cur;
5269 uint8_t *cur = start;
5271 sadb_x_algdesc_t *algdesc = (sadb_x_algdesc_t *)cur;
5273 cur += sizeof (*algdesc);
5274 if (cur >= limit)
5304 return (cur);
5317 uint8_t *cur = start;
5318 sadb_x_ecomb_t *ecomb = (sadb_x_ecomb_t *)cur;
5322 cur += sizeof (*ecomb);
5323 if (cur >= limit)
5353 cur = sadb_new_algdesc(cur, limit, ecomb,
5356 if (cur == NULL)
5363 cur = sadb_new_algdesc(cur, limit, ecomb,
5368 if (cur == NULL)
5372 cur = sadb_new_algdesc(cur, limit, ecomb,
5377 if (cur == NULL)
5384 return (cur);
5496 uint8_t *start, *cur, *end;
5531 cur = start;
5533 samsg = (sadb_msg_t *)cur;
5534 cur += sizeof (*samsg);
5581 cur = sadb_make_addr_ext(cur, end, SADB_X_EXT_ADDRESS_INNER_SRC,
5583 if (cur == NULL) {
5599 cur = sadb_make_addr_ext(cur, end, SADB_X_EXT_ADDRESS_INNER_DST,
5601 if (cur == NULL) {
5641 cur = sadb_make_addr_ext(cur, end, SADB_EXT_ADDRESS_SRC, af,
5644 if (cur == NULL) {
5649 cur = sadb_make_addr_ext(cur, end, SADB_EXT_ADDRESS_DST, af,
5652 if (cur == NULL) {
5658 uint8_t *sensext = cur;
5661 cur += senslen;
5662 if (cur > end) {
5673 eprop = (sadb_prop_t *)cur;
5674 cur += sizeof (*eprop);
5675 if (cur > end) {
5706 cur = sadb_action_to_ecomb(cur, end, ap, ns);
5707 if (cur == NULL) { /* no space */
5727 cur = sadb_make_kmc_ext(cur, end, kmp, kmc);
5728 if (cur == NULL) {
5734 eprop->sadb_prop_len = SADB_8TO64(cur - (uint8_t *)eprop);
5735 samsg->sadb_msg_len = SADB_8TO64(cur - start);
5736 mp->b_wptr = cur;
5755 uint8_t *cur, *end;
5797 cur = msgmp->b_rptr;
5798 end = cur + allocsize;
5799 samsg = (sadb_msg_t *)cur;
5800 cur += sizeof (sadb_msg_t);
5836 cur = sadb_make_addr_ext(cur, end, SADB_EXT_ADDRESS_SRC, af,
5839 cur = sadb_make_addr_ext(cur, end, SADB_EXT_ADDRESS_DST, af,
5845 cur = sadb_make_addr_ext(cur, end, SADB_X_EXT_ADDRESS_INNER_SRC,
5849 cur = sadb_make_addr_ext(cur, end, SADB_X_EXT_ADDRESS_INNER_DST,
5859 if (cur != NULL)
5860 samsg->sadb_msg_len = SADB_8TO64(cur - msgmp->b_rptr);