Lines Matching refs:idx
366 #define KEY_SETSECSPIDX(_dir, s, d, ps, pd, ulp, idx) \
368 bzero((idx), sizeof(struct secpolicyindex)); \
369 (idx)->dir = (_dir); \
370 (idx)->prefs = (ps); \
371 (idx)->prefd = (pd); \
372 (idx)->ul_proto = (ulp); \
373 bcopy((s), &(idx)->src, ((struct sockaddr *)(s))->sa_len); \
374 bcopy((d), &(idx)->dst, ((struct sockaddr *)(d))->sa_len); \
381 #define KEY_SETSECASIDX(p, m, r, s, d, idx) \
383 bzero((idx), sizeof(struct secasindex)); \
384 (idx)->proto = (p); \
385 (idx)->mode = (m); \
386 (idx)->reqid = (r); \
387 bcopy((s), &(idx)->src, ((struct sockaddr *)(s))->sa_len); \
388 bcopy((d), &(idx)->dst, ((struct sockaddr *)(d))->sa_len); \
1894 int idx;
1903 idx = items[i];
1904 if (idx < 0 || idx > SADB_EXT_MAX)
1907 if (idx == SADB_EXT_RESERVED && mhp->msg == NULL)
1909 if (idx != SADB_EXT_RESERVED &&
1910 (mhp->ext[idx] == NULL || mhp->extlen[idx] == 0))
1913 if (idx == SADB_EXT_RESERVED) {
1927 len = mhp->extlen[idx];
1934 m_copydata(m, mhp->extoff[idx], mhp->extlen[idx],
1937 n = m_copym(m, mhp->extoff[idx], mhp->extlen[idx],