Searched refs:ext_hdrs (Results 1 - 1 of 1) sorted by relevance

/linux-4.4.14/net/key/
H A Daf_key.c480 static int parse_exthdrs(struct sk_buff *skb, const struct sadb_msg *hdr, void **ext_hdrs) parse_exthdrs() argument
504 if (ext_hdrs[ext_type-1] != NULL) parse_exthdrs()
517 ext_hdrs[ext_type-1] = (void *) p; parse_exthdrs()
613 static struct xfrm_state *pfkey_xfrm_state_lookup(struct net *net, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_xfrm_state_lookup() argument
621 sa = ext_hdrs[SADB_EXT_SA - 1]; pfkey_xfrm_state_lookup()
630 addr = ext_hdrs[SADB_EXT_ADDRESS_DST - 1]; pfkey_xfrm_state_lookup()
1031 void * const *ext_hdrs) pfkey_msg2xfrm_state()
1042 sa = ext_hdrs[SADB_EXT_SA - 1]; pfkey_msg2xfrm_state()
1044 !present_and_same_family(ext_hdrs[SADB_EXT_ADDRESS_SRC-1], pfkey_msg2xfrm_state()
1045 ext_hdrs[SADB_EXT_ADDRESS_DST-1])) pfkey_msg2xfrm_state()
1048 !ext_hdrs[SADB_EXT_KEY_ENCRYPT-1]) pfkey_msg2xfrm_state()
1051 !ext_hdrs[SADB_EXT_KEY_AUTH-1]) pfkey_msg2xfrm_state()
1053 if (!!ext_hdrs[SADB_EXT_LIFETIME_HARD-1] != pfkey_msg2xfrm_state()
1054 !!ext_hdrs[SADB_EXT_LIFETIME_SOFT-1]) pfkey_msg2xfrm_state()
1081 key = ext_hdrs[SADB_EXT_KEY_AUTH - 1]; pfkey_msg2xfrm_state()
1087 key = ext_hdrs[SADB_EXT_KEY_ENCRYPT-1]; pfkey_msg2xfrm_state()
1109 lifetime = ext_hdrs[SADB_EXT_LIFETIME_HARD - 1]; pfkey_msg2xfrm_state()
1116 lifetime = ext_hdrs[SADB_EXT_LIFETIME_SOFT - 1]; pfkey_msg2xfrm_state()
1124 sec_ctx = ext_hdrs[SADB_X_EXT_SEC_CTX - 1]; pfkey_msg2xfrm_state()
1138 key = ext_hdrs[SADB_EXT_KEY_AUTH - 1]; pfkey_msg2xfrm_state()
1180 key = (struct sadb_key*) ext_hdrs[SADB_EXT_KEY_ENCRYPT-1]; pfkey_msg2xfrm_state()
1198 x->props.family = pfkey_sadb_addr2xfrm_addr((struct sadb_address *) ext_hdrs[SADB_EXT_ADDRESS_SRC-1], pfkey_msg2xfrm_state()
1200 pfkey_sadb_addr2xfrm_addr((struct sadb_address *) ext_hdrs[SADB_EXT_ADDRESS_DST-1], pfkey_msg2xfrm_state()
1203 if (ext_hdrs[SADB_X_EXT_SA2-1]) { pfkey_msg2xfrm_state()
1204 const struct sadb_x_sa2 *sa2 = ext_hdrs[SADB_X_EXT_SA2-1]; pfkey_msg2xfrm_state()
1214 if (ext_hdrs[SADB_EXT_ADDRESS_PROXY-1]) { pfkey_msg2xfrm_state()
1215 const struct sadb_address *addr = ext_hdrs[SADB_EXT_ADDRESS_PROXY-1]; pfkey_msg2xfrm_state()
1225 if (ext_hdrs[SADB_X_EXT_NAT_T_TYPE-1]) { pfkey_msg2xfrm_state()
1234 n_type = ext_hdrs[SADB_X_EXT_NAT_T_TYPE-1]; pfkey_msg2xfrm_state()
1237 if (ext_hdrs[SADB_X_EXT_NAT_T_SPORT-1]) { pfkey_msg2xfrm_state()
1239 ext_hdrs[SADB_X_EXT_NAT_T_SPORT-1]; pfkey_msg2xfrm_state()
1242 if (ext_hdrs[SADB_X_EXT_NAT_T_DPORT-1]) { pfkey_msg2xfrm_state()
1244 ext_hdrs[SADB_X_EXT_NAT_T_DPORT-1]; pfkey_msg2xfrm_state()
1263 static int pfkey_reserved(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_reserved() argument
1268 static int pfkey_getspi(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_getspi() argument
1285 if (!present_and_same_family(ext_hdrs[SADB_EXT_ADDRESS_SRC-1], pfkey_getspi()
1286 ext_hdrs[SADB_EXT_ADDRESS_DST-1])) pfkey_getspi()
1293 if ((sa2 = ext_hdrs[SADB_X_EXT_SA2-1]) != NULL) { pfkey_getspi()
1303 saddr = ext_hdrs[SADB_EXT_ADDRESS_SRC-1]; pfkey_getspi()
1304 daddr = ext_hdrs[SADB_EXT_ADDRESS_DST-1]; pfkey_getspi()
1337 range = ext_hdrs[SADB_EXT_SPIRANGE-1]; pfkey_getspi()
1373 static int pfkey_acquire(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_acquire() argument
1460 static int pfkey_add(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_add() argument
1467 x = pfkey_msg2xfrm_state(net, hdr, ext_hdrs); pfkey_add()
1497 static int pfkey_delete(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_delete() argument
1504 if (!ext_hdrs[SADB_EXT_SA-1] || pfkey_delete()
1505 !present_and_same_family(ext_hdrs[SADB_EXT_ADDRESS_SRC-1], pfkey_delete()
1506 ext_hdrs[SADB_EXT_ADDRESS_DST-1])) pfkey_delete()
1509 x = pfkey_xfrm_state_lookup(net, hdr, ext_hdrs); pfkey_delete()
1537 static int pfkey_get(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_get() argument
1545 if (!ext_hdrs[SADB_EXT_SA-1] || pfkey_get()
1546 !present_and_same_family(ext_hdrs[SADB_EXT_ADDRESS_SRC-1], pfkey_get()
1547 ext_hdrs[SADB_EXT_ADDRESS_DST-1])) pfkey_get()
1550 x = pfkey_xfrm_state_lookup(net, hdr, ext_hdrs); pfkey_get()
1649 static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_register() argument
1718 static int pfkey_flush(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_flush() argument
1790 static int pfkey_dump(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_dump() argument
1803 if (ext_hdrs[SADB_X_EXT_FILTER - 1]) { pfkey_dump()
1804 struct sadb_x_filter *xfilter = ext_hdrs[SADB_X_EXT_FILTER - 1]; pfkey_dump()
1828 static int pfkey_promisc(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_promisc() argument
2189 static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_spdadd() argument
2200 if (!present_and_same_family(ext_hdrs[SADB_EXT_ADDRESS_SRC-1], pfkey_spdadd()
2201 ext_hdrs[SADB_EXT_ADDRESS_DST-1]) || pfkey_spdadd()
2202 !ext_hdrs[SADB_X_EXT_POLICY-1]) pfkey_spdadd()
2205 pol = ext_hdrs[SADB_X_EXT_POLICY-1]; pfkey_spdadd()
2219 sa = ext_hdrs[SADB_EXT_ADDRESS_SRC-1]; pfkey_spdadd()
2228 sa = ext_hdrs[SADB_EXT_ADDRESS_DST-1]; pfkey_spdadd()
2241 sec_ctx = ext_hdrs[SADB_X_EXT_SEC_CTX - 1]; pfkey_spdadd()
2261 if ((lifetime = ext_hdrs[SADB_EXT_LIFETIME_HARD-1]) != NULL) { pfkey_spdadd()
2267 if ((lifetime = ext_hdrs[SADB_EXT_LIFETIME_SOFT-1]) != NULL) { pfkey_spdadd()
2304 static int pfkey_spddelete(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_spddelete() argument
2316 if (!present_and_same_family(ext_hdrs[SADB_EXT_ADDRESS_SRC-1], pfkey_spddelete()
2317 ext_hdrs[SADB_EXT_ADDRESS_DST-1]) || pfkey_spddelete()
2318 !ext_hdrs[SADB_X_EXT_POLICY-1]) pfkey_spddelete()
2321 pol = ext_hdrs[SADB_X_EXT_POLICY-1]; pfkey_spddelete()
2327 sa = ext_hdrs[SADB_EXT_ADDRESS_SRC-1]; pfkey_spddelete()
2335 sa = ext_hdrs[SADB_EXT_ADDRESS_DST-1]; pfkey_spddelete()
2343 sec_ctx = ext_hdrs[SADB_X_EXT_SEC_CTX - 1]; pfkey_spddelete()
2489 const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_migrate()
2502 if (!present_and_same_family(ext_hdrs[SADB_EXT_ADDRESS_SRC - 1], pfkey_migrate()
2503 ext_hdrs[SADB_EXT_ADDRESS_DST - 1]) || pfkey_migrate()
2504 !ext_hdrs[SADB_X_EXT_POLICY - 1]) { pfkey_migrate()
2509 kma = ext_hdrs[SADB_X_EXT_KMADDRESS - 1]; pfkey_migrate()
2510 pol = ext_hdrs[SADB_X_EXT_POLICY - 1]; pfkey_migrate()
2533 sa = ext_hdrs[SADB_EXT_ADDRESS_SRC - 1]; pfkey_migrate()
2542 sa = ext_hdrs[SADB_EXT_ADDRESS_DST - 1]; pfkey_migrate()
2581 const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_migrate()
2588 static int pfkey_spdget(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_spdget() argument
2597 if ((pol = ext_hdrs[SADB_X_EXT_POLICY-1]) == NULL) pfkey_spdget()
2678 static int pfkey_spddump(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_spddump() argument
2716 static int pfkey_spdflush(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_spdflush() argument
2741 const struct sadb_msg *hdr, void * const *ext_hdrs);
2770 void *ext_hdrs[SADB_EXT_MAX]; pfkey_process() local
2776 memset(ext_hdrs, 0, sizeof(ext_hdrs)); pfkey_process()
2777 err = parse_exthdrs(skb, hdr, ext_hdrs); pfkey_process()
2781 err = pfkey_funcs[hdr->sadb_msg_type](sk, skb, hdr, ext_hdrs); pfkey_process()
1029 pfkey_msg2xfrm_state(struct net *net, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_msg2xfrm_state() argument
2488 pfkey_migrate(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_migrate() argument
2580 pfkey_migrate(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) pfkey_migrate() argument

Completed in 193 milliseconds