payload_first
noncep = payload_first(msg, ISAKMP_PAYLOAD_NONCE);
if ((*pc > 0 && !payload_first(msg, *pc)) ||
!payload_first(msg, ISAKMP_PAYLOAD_HASH) &&
!payload_first(msg, ISAKMP_PAYLOAD_SIG)) ||
((!payload_first(msg, ISAKMP_PAYLOAD_NOTIFY) &&
!payload_first(msg, ISAKMP_PAYLOAD_DELETE)) ||
(payload_first(msg, ISAKMP_PAYLOAD_DELETE) &&
!payload_first(msg, ISAKMP_PAYLOAD_HASH))))) {
payload = payload_first(msg, ISAKMP_PAYLOAD_HASH);
p = payload_first(msg, ISAKMP_PAYLOAD_CERT);
p = payload_first(msg, ISAKMP_PAYLOAD_SIG);
payload_first(msg, ISAKMP_PAYLOAD_SA)->p + ISAKMP_GEN_SZ,
payload_first(msg, ISAKMP_PAYLOAD_PROPOSAL)->p, proposal_len);
struct payload *sa_p = payload_first(msg, ISAKMP_PAYLOAD_SA);
struct payload *prop = payload_first(msg, ISAKMP_PAYLOAD_PROPOSAL);
struct payload *xf = payload_first(msg, ISAKMP_PAYLOAD_TRANSFORM);
struct payload *sa_p = payload_first(msg, ISAKMP_PAYLOAD_SA);
struct payload *prop = payload_first(msg, ISAKMP_PAYLOAD_PROPOSAL);
payload = payload_first(msg, ISAKMP_PAYLOAD_ID);
struct payload *sa_p = payload_first(msg, ISAKMP_PAYLOAD_SA);
struct payload *hashp = payload_first(msg, ISAKMP_PAYLOAD_HASH);
struct payload *kep = payload_first(msg, ISAKMP_PAYLOAD_KEY_EXCH);
idp = payload_first(msg, ISAKMP_PAYLOAD_ID);
hashp = payload_first(msg, ISAKMP_PAYLOAD_HASH);
kep = payload_first(msg, ISAKMP_PAYLOAD_KEY_EXCH);
idp = payload_first(msg, ISAKMP_PAYLOAD_ID);
hashp = payload_first(msg, ISAKMP_PAYLOAD_HASH);
if (payload_first(msg, ISAKMP_PAYLOAD_SA)) {
kep = payload_first(msg, ISAKMP_PAYLOAD_KEY_EXCH);
payload = payload_first(msg, ISAKMP_PAYLOAD_HASH);
struct payload *attrp = payload_first(msg, ISAKMP_PAYLOAD_ATTRIBUTE);
struct payload *attrp = payload_first(msg, ISAKMP_PAYLOAD_ATTRIBUTE);
struct payload *hashp = payload_first(msg, ISAKMP_PAYLOAD_HASH);
for (p = payload_first(msg, ISAKMP_PAYLOAD_NOTIFY); p;
for (p = payload_first(msg, ISAKMP_PAYLOAD_DELETE); p;
if (payload_first(msg, ISAKMP_PAYLOAD_SA)) {
for (tp = payload_first(msg, ISAKMP_PAYLOAD_TRANSFORM); tp;
struct payload *hashp = payload_first(msg, ISAKMP_PAYLOAD_HASH);
struct payload *payload_first(struct message *, u_int8_t);
if ((p = payload_first(msg, ISAKMP_PAYLOAD_NAT_D_DRAFT)) == NULL &&
(p = payload_first(msg, ISAKMP_PAYLOAD_NAT_D)) == NULL)