/darwin-on-arm/xnu/bsd/netinet6/ |
H A D | ah_output.c | 138 /*%%%%% this needs to change - no sav in ipsecrequest any more */ 139 if (isr->sav == NULL) 141 if (isr->sav->state != SADB_SASTATE_MATURE 142 && isr->sav->state != SADB_SASTATE_DYING) 146 algo = ah_algorithm_lookup(isr->sav->alg_auth); 157 hdrsiz = (((*algo->sumsiz)(isr->sav) + 3) & ~(4 - 1)); 158 if (isr->sav->flags & SADB_X_EXT_OLD) 187 ah4_output(m, sav) 189 struct secasvar *sav; 204 if ((sav [all...] |
H A D | esp_input.c | 172 struct secasvar *sav = NULL; local 222 if ((sav = key_allocsa(AF_INET, 232 printf("DP esp4_input called to allocate SA:%p\n", sav)); 233 if (sav->state != SADB_SASTATE_MATURE 234 && sav->state != SADB_SASTATE_DYING) { 241 algo = esp_algorithm_lookup(sav->alg_enc); 251 ivlen = sav->ivlen; 254 ipsec4_logpacketstr(ip, spi), ipsec_logsastr(sav))); 260 if (!((sav->flags & SADB_X_EXT_OLD) == 0 && sav 732 struct secasvar *sav = NULL; local 1195 struct secasvar *sav; local [all...] |
H A D | esp_output.c | 119 int, struct secasvar *sav); 142 struct secasvar *sav; 150 /*%%%% this needs to change - no sav in ipsecrequest any more */ 151 sav = isr->sav; 156 if (sav == NULL) 158 if (sav->state != SADB_SASTATE_MATURE 159 && sav->state != SADB_SASTATE_DYING) 163 algo = esp_algorithm_lookup(sav->alg_enc); 166 ivlen = sav [all...] |
H A D | esp_core.c | 213 esp_schedule(algo, sav) 215 struct secasvar *sav; 220 if (_KEYBITS(sav->key_enc) < algo->keymin || 221 _KEYBITS(sav->key_enc) > algo->keymax) { 224 "needs %d to %d bits\n", algo->name, _KEYBITS(sav->key_enc), 231 if (sav->sched && sav->schedlen != 0) { 241 sav->schedlen = (*algo->schedlen)(algo); 242 if ((signed) sav->schedlen < 0) { 248 sav 269 esp_null_mature( __unused struct secasvar *sav) argument 278 esp_null_decrypt( __unused struct mbuf *m, __unused size_t off, __unused struct secasvar *sav, __unused const struct esp_algorithm *algo, __unused int ivlen) argument 290 esp_null_encrypt( __unused struct mbuf *m, __unused size_t off, __unused size_t plen, __unused struct secasvar *sav, __unused const struct esp_algorithm *algo, __unused int ivlen) argument 345 esp_descbc_ivlen( __unused const struct esp_algorithm *algo, struct secasvar *sav) argument 367 esp_des_schedule( __unused const struct esp_algorithm *algo, struct secasvar *sav) argument 381 esp_des_blockdecrypt( __unused const struct esp_algorithm *algo, struct secasvar *sav, u_int8_t *s, u_int8_t *d) argument 395 esp_des_blockencrypt( __unused const struct esp_algorithm *algo, struct secasvar *sav, u_int8_t *s, u_int8_t *d) argument 480 esp_3des_schedule( __unused const struct esp_algorithm *algo, struct secasvar *sav) argument 494 esp_3des_blockdecrypt( __unused const struct esp_algorithm *algo, struct secasvar *sav, u_int8_t *s, u_int8_t *d) argument 508 esp_3des_blockencrypt( __unused const struct esp_algorithm *algo, struct secasvar *sav, u_int8_t *s, u_int8_t *d) argument 522 esp_common_ivlen( const struct esp_algorithm *algo, __unused struct secasvar *sav) argument 759 esp_cbc_encrypt( struct mbuf *m, size_t off, __unused size_t plen, struct secasvar *sav, const struct esp_algorithm *algo, int ivlen) argument [all...] |
H A D | ah_core.c | 231 ah_sumsiz_1216(sav) 232 struct secasvar *sav; 234 if (!sav) 236 if (sav->flags & SADB_X_EXT_OLD) 243 ah_sumsiz_zero(sav) 244 struct secasvar *sav; 246 if (!sav) 252 ah_none_mature(sav) 253 struct secasvar *sav; 255 if (sav 264 ah_none_init( struct ah_algorithm_state *state, __unused struct secasvar *sav) argument 289 ah_keyed_md5_mature( __unused struct secasvar *sav) argument [all...] |
H A D | ipcomp_input.c | 98 struct secasvar *sav = NULL; local 131 sav = key_allocsa(AF_INET, (caddr_t)&ip->ip_src, 133 if (sav != NULL 134 && (sav->state == SADB_SASTATE_MATURE 135 || sav->state == SADB_SASTATE_DYING)) { 136 cpi = sav->alg_enc; /*XXX*/ 206 if (sav) { 207 key_sa_recordxfer(sav, m); 212 key_freesav(sav, KEY_SADB_UNLOCKED); 213 sav 258 struct secasvar *sav = NULL; local [all...] |
H A D | ah_input.c | 139 struct secasvar *sav = NULL; local 184 if ((sav = key_allocsa(AF_INET, 194 printf("DP ah4_input called to allocate SA:%p\n", sav)); 195 if (sav->state != SADB_SASTATE_MATURE 196 && sav->state != SADB_SASTATE_DYING) { 204 algo = ah_algorithm_lookup(sav->alg_auth); 213 siz = (*algo->sumsiz)(sav); 222 sizoff = (sav->flags & SADB_X_EXT_OLD) ? 0 : 4; 290 if ((sav->flags & SADB_X_EXT_OLD) == 0 && sav 633 struct secasvar *sav = NULL; local 1032 struct secasvar *sav; local [all...] |
H A D | ipcomp_output.c | 83 int, struct secasvar *sav); 104 ipcomp_output(m, nexthdrp, md, af, sav) 109 struct secasvar *sav; 143 algo = ipcomp_algorithm_lookup(sav->alg_enc); 144 if ((ntohl(sav->spi) & ~0xffff) != 0 || !algo) { 149 if ((sav->flags & SADB_X_EXT_RAWCPI) == 0) 150 cpi = sav->alg_enc; 152 cpi = ntohl(sav->spi) & 0xffff; 216 IPSEC_STAT_INCREMENT(stat->out_comphist[sav->alg_enc]); 333 key_sa_recordxfer(sav, mcop [all...] |
H A D | esp_rijndael.c | 100 struct secasvar *sav) 104 aes_ctx *ctx = (aes_ctx*)sav->sched; 106 aes_decrypt_key((const unsigned char *) _KEYBUF(sav->key_enc), _KEYLEN(sav->key_enc), &ctx->decrypt); 107 aes_encrypt_key((const unsigned char *) _KEYBUF(sav->key_enc), _KEYLEN(sav->key_enc), &ctx->encrypt); 142 esp_cbc_decrypt_aes(m, off, sav, algo, ivlen) 145 struct secasvar *sav; 168 if (sav->flags & SADB_X_EXT_OLD) { 285 (aes_decrypt_ctx*)(&(((aes_ctx*)sav 98 esp_aes_schedule( __unused const struct esp_algorithm *algo, struct secasvar *sav) argument 321 esp_cbc_encrypt_aes( struct mbuf *m, size_t off, __unused size_t plen, struct secasvar *sav, const struct esp_algorithm *algo, int ivlen) argument [all...] |
H A D | ipsec.c | 267 int ipsec_send_natt_keepalive(struct secasvar *sav); 1883 /* this won't work with multiple input threads - isr->sav would change 1889 * isr->sav has been removed. 1893 if (isr->sav != NULL 1894 && isr->sav->flags == SADB_X_EXT_NONE 1895 && isr->sav->alg_auth != SADB_AALG_NONE) 2210 ipsec4_encapsulate(m, sav) 2212 struct secasvar *sav; 2220 if (((struct sockaddr *)&sav->sah->saidx.src)->sa_family 2221 != ((struct sockaddr *)&sav 3000 struct secasvar *sav = NULL; local 3289 struct secasvar *sav = NULL; local 3463 struct secasvar *sav = NULL; local 4401 ipsec_send_natt_keepalive( struct secasvar *sav) argument [all...] |
H A D | ah.h | 62 struct secasvar *sav; member in struct:ah_algorithm_state
|
/darwin-on-arm/xnu/bsd/netkey/ |
H A D | key.c | 344 #define KEY_CHKSASTATE(head, sav, name) \ 346 if ((head) != (sav)) { \ 348 (name), (head), (sav))); \ 551 static int key_setsaval2(struct secasvar *sav, 570 int ipsec_send_natt_keepalive(struct secasvar *sav); 797 struct secasvar **sav) 805 *sav = NULL; 829 if (*sav == NULL) 830 *sav = key_allocsa_policy(saidx); 833 if (*sav ! 794 key_checkrequest( struct ipsecrequest *isr, struct secasindex *saidx, struct secasvar **sav) argument 868 struct secasvar *sav; local 934 struct secasvar *sav, *nextsav, *candidate, *natt_candidate, *no_natt_candidate, *d; local 1117 struct secasvar *sav, *match; local 1516 key_freesav( struct secasvar *sav, int locked) argument 3105 struct secasvar *sav, *nextsav; local 3375 key_delsav( struct secasvar *sav) argument 3488 struct secasvar *sav; local 3517 key_setspi( struct secasvar *sav, u_int32_t spi) argument 3540 struct secasvar *sav, *match; local 3573 key_setsaval( struct secasvar *sav, struct mbuf *m, const struct sadb_msghdr *mhp) argument 3896 key_setsaval2(struct secasvar *sav, u_int8_t satype, u_int8_t alg_auth, u_int8_t alg_enc, u_int32_t flags, u_int8_t replay, struct sadb_key *key_auth, u_int16_t key_auth_len, struct sadb_key *key_enc, u_int16_t key_enc_len, u_int16_t natt_port, u_int32_t seq, u_int32_t spi, u_int32_t pid, struct sadb_lifetime *lifetime_hard, struct sadb_lifetime *lifetime_soft) argument 4111 key_mature( struct secasvar *sav) argument 4290 key_setdumpsa( struct secasvar *sav, u_int8_t type, u_int8_t satype, u_int32_t seq, u_int32_t pid) argument 4488 key_setsadbsa( struct secasvar *sav) argument 5251 struct secasvar *sav, *nextsav; local 6073 struct secasvar *sav; local 6246 struct secasvar *sav; local 6568 struct secasvar *sav = NULL; local 6681 struct secasvar *sav, *nextsav; local 6771 struct secasvar *sav = NULL; local 6862 struct secasvar *sav = NULL; local 7850 key_expire( struct secasvar *sav) argument 7984 struct secasvar *sav, *nextsav; local 8061 struct secasvar *sav; member in struct:sav_dump_elem 8072 struct secasvar *sav; local 8736 key_checktunnelsanity( struct secasvar *sav, __unused u_int family, __unused caddr_t src, __unused caddr_t dst) argument 8754 key_sa_recordxfer( struct secasvar *sav, struct mbuf *m) argument 8828 key_sa_chgstate( struct secasvar *sav, u_int8_t state) argument 8850 key_sa_stir_iv( struct secasvar *sav) argument [all...] |
H A D | key_debug.c | 596 kdebug_secasv(sav) 597 struct secasvar *sav; 600 if (sav == NULL) 604 kdebug_secasindex(&sav->sah->saidx); 607 sav->refcnt, sav->state, sav->alg_auth, sav->alg_enc); 609 (u_int32_t)ntohl(sav->spi), sav [all...] |
H A D | key.h | 61 struct secasvar **sav); 108 extern void key_delsav(struct secasvar *sav);
|
/darwin-on-arm/xnu/bsd/net/ |
H A D | if_utun_crypto_ipsec.c | 213 struct secasvar *sav; local 219 for (sav = LIST_FIRST(&(*sah)->savtree[state]); 220 sav != NULL; 221 sav = nextsav) { 222 nextsav = LIST_NEXT(sav, chain); 223 if (sav->state == SADB_SASTATE_LARVAL || 224 sav->state == SADB_SASTATE_DEAD) { 228 if (sav->utun_pcb) { 229 sav->utun_pcb = NULL; 230 sav 295 utun_ipsec_alloc_sav(struct secashead *sah, struct secasvar **sav, struct utun_pcb *pcb, u_int8_t satype, u_int8_t alg_auth, u_int8_t alg_enc, u_int32_t flags, u_int8_t replay, u_int8_t *key_auth, u_int16_t key_auth_len, u_int8_t *key_enc, u_int16_t key_enc_len, u_int16_t natt_port, u_int32_t seq, u_int32_t spi, u_int32_t pid, u_int64_t lifetime_hard, u_int64_t lifetime_soft) argument 367 utun_ipsec_free_sav(struct secasvar **sav) argument 386 struct secasvar *sav; local 700 struct secasvar *sav; local [all...] |
H A D | if_utun_crypto_ipsec.h | 39 #define IF_UTUN_GET_CRYPTO_KEYS_IPSEC_SAV(keys) keys->state.u.ipsec.sav
|
H A D | if_utun_crypto.h | 237 struct secasvar *sav; member in struct:utun_crypto_keys_ipsec_state
|
/darwin-on-arm/xnu/bsd/netinet/ |
H A D | ip_input.c | 2605 struct secasvar *sav; local 2627 sav = key_allocsa_policy(&saidx); 2628 if (sav != NULL) { 2630 if (sav->sah != NULL) { 2631 ro = &sav->sah->sa_route; 2641 key_freesav(sav, KEY_SADB_LOCKED);
|