/freebsd/sys/netipsec/ |
H A D | xform_esp.c | 110 esp_hdrsiz(struct secasvar *sav) in esp_hdrsiz() argument 114 if (sav != NULL) { in esp_hdrsiz() 116 IPSEC_ASSERT(sav->tdb_encalgxform != NULL, in esp_hdrsiz() 118 if (sav->flags & SADB_X_EXT_OLD) in esp_hdrsiz() 122 size += sav->tdb_encalgxform->blocksize + 9; in esp_hdrsiz() 124 if (sav->tdb_authalgxform != NULL && sav->replay) in esp_hdrsiz() 125 size += ah_hdrsiz(sav); in esp_hdrsiz() 144 esp_init(struct secasvar *sav, struct xformsw *xsp) in esp_init() argument 151 txform = enc_algorithm_lookup(sav->alg_enc); in esp_init() 154 __func__, sav->alg_enc)); in esp_init() [all …]
|
H A D | xform_ah.c | 82 #define HDRSIZE(sav) \ argument 83 (((sav)->flags & SADB_X_EXT_OLD) ? \ 89 #define AUTHSIZE(sav) ((sav->flags & SADB_X_EXT_OLD) ? 16 : \ argument 90 xform_ah_authsize((sav)->tdb_authalgxform)) 147 ah_hdrsiz(struct secasvar *sav) in ah_hdrsiz() argument 151 if (sav != NULL) { in ah_hdrsiz() 154 IPSEC_ASSERT(sav->tdb_authalgxform != NULL, ("null xform")); in ah_hdrsiz() 160 if (sav->sah->saidx.dst.sa.sa_family == AF_INET6) { in ah_hdrsiz() 164 rplen = HDRSIZE(sav); in ah_hdrsiz() 165 authsize = AUTHSIZE(sav); in ah_hdrsiz() [all …]
|
H A D | ipsec_offload.c | 76 struct secasvar *sav; member 84 struct secasvar *sav; member 90 struct secasvar *sav; member 144 static void ipsec_accel_sa_newkey_impl(struct secasvar *sav); 145 static int ipsec_accel_handle_sav(struct secasvar *sav, struct ifnet *ifp, 147 static void ipsec_accel_forget_sav_clear(struct secasvar *sav); 148 static struct ifp_handle_sav *ipsec_accel_is_accel_sav_ptr(struct secasvar *sav, 150 static int ipsec_accel_sa_lifetime_op_impl(struct secasvar *sav, 153 static void ipsec_accel_sa_recordxfer(struct secasvar *sav, struct mbuf *m); 155 static bool ipsec_accel_is_accel_sav_impl(struct secasvar *sav); [all …]
|
H A D | xform_ipcomp.c | 112 struct secasvar *sav; in ipcomp_encapcheck() local 114 sav = key_allocsa_tunnel(src, dst, IPPROTO_IPCOMP); in ipcomp_encapcheck() 115 if (sav == NULL) in ipcomp_encapcheck() 117 key_freesav(&sav); in ipcomp_encapcheck() 159 ipcomp_init(struct secasvar *sav, struct xformsw *xsp) in ipcomp_init() argument 165 tcomp = comp_algorithm_lookup(sav->alg_enc); in ipcomp_init() 168 sav->alg_comp)); in ipcomp_init() 171 sav->alg_comp = sav->alg_enc; /* set for doing histogram */ in ipcomp_init() 172 sav->tdb_xform = xsp; in ipcomp_init() 173 sav->tdb_compalgxform = tcomp; in ipcomp_init() [all …]
|
H A D | ipsec_offload.h | 52 extern void (*ipsec_accel_sa_newkey_p)(struct secasvar *sav); 53 extern void (*ipsec_accel_sa_install_input_p)(struct secasvar *sav, 55 extern void (*ipsec_accel_forget_sav_p)(struct secasvar *sav); 58 extern int (*ipsec_accel_sa_lifetime_op_p)(struct secasvar *sav, 62 extern bool (*ipsec_accel_is_accel_sav_p)(struct secasvar *sav); 63 extern struct mbuf *(*ipsec_accel_key_setaccelif_p)(struct secasvar *sav); 65 extern void (*ipsec_accel_drv_sa_lifetime_update_p)(struct secasvar *sav, 67 extern int (*ipsec_accel_drv_sa_lifetime_fetch_p)(struct secasvar *sav, 76 ipsec_accel_sa_newkey(struct secasvar *sav) in ipsec_accel_sa_newkey() argument 78 void (*p)(struct secasvar *sav); in ipsec_accel_sa_newkey() [all …]
|
H A D | key.c | 102 void (*ipsec_accel_sa_newkey_p)(struct secasvar *sav); 103 void (*ipsec_accel_forget_sav_p)(struct secasvar *sav); 106 int (*ipsec_accel_sa_lifetime_op_p)(struct secasvar *sav, 110 bool (*ipsec_accel_is_accel_sav_p)(struct secasvar *sav); 111 struct mbuf *(*ipsec_accel_key_setaccelif_p)(struct secasvar *sav); 113 void (*ipsec_accel_drv_sa_lifetime_update_p)(struct secasvar *sav, if_t ifp, 115 int (*ipsec_accel_drv_sa_lifetime_fetch_p)(struct secasvar *sav, if_t ifp, 1025 struct secasvar *sav; in key_allocsa_tcpmd5() local 1045 sav = TAILQ_LAST(&sah->savtree_alive, secasvar_queue); in key_allocsa_tcpmd5() 1047 sav = TAILQ_FIRST(&sah->savtree_alive); in key_allocsa_tcpmd5() [all …]
|
H A D | ipsec_input.c | 124 struct secasvar *sav; in ipsec_common_input() 203 sav = key_allocsa(&dst_address, sproto, spi); in ipsec_common_input() 204 if (sav == NULL) { in ipsec_common_input() 213 if (sav->tdb_xform == NULL) { in ipsec_common_input() 218 key_freesav(&sav); in ipsec_common_input() 227 error = (*sav->tdb_xform->xf_input)(m, sav, skip, protoff); in ipsec_common_input() 298 struct secasvar *sav; in ipsec4_ctlinput() 314 sav = key_allocsa((union sockaddr_union *)&icmpsrc, proto, spi); in ipsec4_ctlinput() 315 if (sav in ipsec4_ctlinput() 123 struct secasvar *sav; ipsec_common_input() local 292 struct secasvar *sav; ipsec4_ctlinput() local 335 ipsec4_common_input_cb(struct mbuf * m,struct secasvar * sav,int skip,int protoff) ipsec4_common_input_cb() argument 581 ipsec6_common_input_cb(struct mbuf * m,struct secasvar * sav,int skip,int protoff) ipsec6_common_input_cb() argument [all...] |
H A D | ipsec_output.c | 110 static size_t ipsec_get_pmtu(struct secasvar *sav); 120 struct secasvar *sav; in ipsec4_allocsa() 165 sav = key_allocsa_policy(sp, saidx, error); in ipsec4_allocsa() 166 if (sav == NULL) { in ipsec4_allocsa() 183 IPSEC_ASSERT(sav->tdb_xform != NULL, ("SA with NULL tdb_xform")); in ipsec4_allocsa() 184 return (sav); 196 struct secasvar *sav; in ipsec4_perform_request() 212 sav = ipsec4_allocsa(ifp, m, sp, &idx, &error); in ipsec4_perform_request() 213 if (sav == NULL) { in ipsec4_perform_request() 225 IPSEC_INIT_CTX(&ctx, &m, inp, sav, AF_INE in ipsec4_perform_request() 118 struct secasvar *sav; ipsec4_allocsa() local 194 struct secasvar *sav; ipsec4_perform_request() local 301 struct secasvar *sav; ipsec4_check_pmtu() local 499 struct secasvar *sav; ipsec6_allocsa() local 587 struct secasvar *sav; ipsec6_perform_request() local 687 struct secasvar *sav; ipsec6_check_pmtu() local 847 ipsec_process_done(struct mbuf * m,struct secpolicy * sp,struct secasvar * sav,u_int idx) ipsec_process_done() argument 1026 ipsec_get_pmtu(struct secasvar * sav) ipsec_get_pmtu() argument [all...] |
H A D | xform_tcp.c | 184 struct secasvar *sav, u_char *buf) in tcp_signature_compute() argument 192 switch (sav->sah->saidx.dst.sa.sa_family) { in tcp_signature_compute() 225 MD5Update(&ctx, sav->key_auth->key_data, _KEYLEN(sav->key_auth)); in tcp_signature_compute() 227 key_sa_recordxfer(sav, m); in tcp_signature_compute() 271 struct secasvar *sav; in tcp_ipsec_input() local 277 sav = key_allocsa_tcpmd5(&saidx); in tcp_ipsec_input() 278 if (sav == NULL) { in tcp_ipsec_input() 283 key_freesav(&sav); in tcp_ipsec_input() 292 tcp_signature_compute(m, th, sav, tmpdigest); in tcp_ipsec_input() 294 key_freesav(&sav); in tcp_ipsec_input() [all …]
|
H A D | udpencap.c | 121 struct secasvar *sav; in udp_ipsec_input() local 178 sav = key_allocsa(&dst, IPPROTO_ESP, spi); in udp_ipsec_input() 179 if (sav == NULL) { in udp_ipsec_input() 185 if (sav->natt == NULL || in udp_ipsec_input() 186 sav->natt->sport != udp->uh_sport || in udp_ipsec_input() 187 sav->natt->dport != udp->uh_dport) { in udp_ipsec_input() 190 key_freesav(&sav); in udp_ipsec_input() 238 (*sav->tdb_xform->xf_input)(m, sav, hlen, off); in udp_ipsec_input() 243 udp_ipsec_output(struct mbuf *m, struct secasvar *sav) in udp_ipsec_output() argument 249 IPSEC_ASSERT(sav->natt != NULL, ("UDP encapsulation isn't required.")); in udp_ipsec_output() [all …]
|
H A D | key_debug.c | 853 kdebug_secasv(struct secasvar *sav) in kdebug_secasv() 857 IPSEC_ASSERT(sav != NULL, ("null sav")); in kdebug_secasv() 860 sav->refcnt, ntohl(sav->spi), sav->seq, (uint32_t)sav->pid, in kdebug_secasv() 861 sav->flags, kdebug_secasv_state(sav->state)); in kdebug_secasv() 862 kdebug_secash(sav in kdebug_secasv() 848 kdebug_secasv(struct secasvar * sav) kdebug_secasv() argument 971 ipsec_sa2str(struct secasvar * sav,char * buf,size_t size) ipsec_sa2str() argument [all...] |
H A D | ipsec.c | 1264 ipsec_chkreplay(uint32_t seq, uint32_t *seqhigh, struct secasvar *sav) in ipsec_chkreplay() argument 1272 IPSEC_ASSERT(sav != NULL, ("Null SA")); in ipsec_chkreplay() 1273 IPSEC_ASSERT(sav->replay != NULL, ("Null replay state")); in ipsec_chkreplay() 1275 replay = sav->replay; in ipsec_chkreplay() 1321 if (tl == 0xffffffff && !(sav->flags & SADB_X_SAFLAGS_ESN)) { in ipsec_chkreplay() 1325 if ((sav->flags & SADB_X_EXT_CYCSEQ) == 0) { in ipsec_chkreplay() 1326 if (sav->sah->saidx.proto == IPPROTO_ESP) in ipsec_chkreplay() 1328 else if (sav->sah->saidx.proto == IPPROTO_AH) in ipsec_chkreplay() 1336 ipsec_sa2str(sav, buf, sizeof(buf)))); in ipsec_chkreplay() 1370 if ((sav->flags & SADB_X_EXT_CYCSEQ) == 0) { in ipsec_chkreplay() [all …]
|
H A D | xform.h | 72 struct secasvar *sav; /* related SA */ member 117 extern size_t esp_hdrsiz(struct secasvar *sav);
|
H A D | subr_ipsec.c | 206 * Initialize transform support in an sav. 209 xform_init(struct secasvar *sav, u_short xftype) in xform_init() argument 214 IPSEC_ASSERT(sav->tdb_xform == NULL, in xform_init() 224 ret = (*entry->xf_init)(sav, entry); in xform_init()
|
/freebsd/usr.sbin/sa/tests/ |
H A D | legacy_test.sh | 37 sa -i v1-$ARCH-acct.in | check 3 $DIR/v1-$ARCH-sav.out 41 sa -P $DIR/v1-$ARCH-sav.in -U $DIR/v1-$ARCH-usr.in /dev/null | 42 check 5 $DIR/v1-$ARCH-sav.out 43 sa -m -P $DIR/v1-$ARCH-sav.in -U $DIR/v1-$ARCH-usr.in /dev/null | 47 install -c -m 644 $DIR/v1-$ARCH-sav.in v2c-$ARCH-sav.in 49 sa -s -P v2c-$ARCH-sav.in -U v2c-$ARCH-usr.in /dev/null >/dev/null 50 sa -P v2c-$ARCH-sav.in -U v2c-$ARCH-usr.in /dev/null | 51 check 7 $DIR/v1-$ARCH-sav.out 52 sa -m -P v2c-$ARCH-sav.in -U v2c-$ARCH-usr.in /dev/null | 56 sa -P $DIR/v2-$ARCH-sav.in -U $DIR/v2-$ARCH-usr.in /dev/null | [all …]
|
H A D | Makefile | 6 ${PACKAGE}FILES+= v1-amd64-sav.in 7 ${PACKAGE}FILES+= v1-amd64-sav.out 11 ${PACKAGE}FILES+= v1-i386-sav.in 12 ${PACKAGE}FILES+= v1-i386-sav.out 16 ${PACKAGE}FILES+= v2-amd64-sav.in 19 ${PACKAGE}FILES+= v2-i386-sav.in
|
H A D | prime.sh | 28 $SANEW -i $LCDIR/v1-$ARCH-acct.in >v1-$ARCH-sav.out 31 rm -f v1-$ARCH-sav.in v1-$ARCH-usr.in 32 $SAOLD -s -P v1-$ARCH-sav.in -U v1-$ARCH-usr.in acct.in >/dev/null 34 rm -f v2-$ARCH-sav.in v2-$ARCH-usr.in 35 $SANEW -s -P v2-$ARCH-sav.in -U v2-$ARCH-usr.in acct.in >/dev/null
|
/freebsd/sys/dev/bwn/ |
H A D | if_bwn_phy_g.c | 2186 bwn_lo_save(struct bwn_mac *mac, struct bwn_lo_g_value *sav) in bwn_lo_save() argument 2196 sav->phy_lomask = BWN_PHY_READ(mac, BWN_PHY_LO_MASK); in bwn_lo_save() 2197 sav->phy_extg = BWN_PHY_READ(mac, BWN_PHY_EXTG(0x01)); in bwn_lo_save() 2198 sav->phy_dacctl_hwpctl = BWN_PHY_READ(mac, BWN_PHY_DACCTL); in bwn_lo_save() 2199 sav->phy_cck4 = BWN_PHY_READ(mac, BWN_PHY_CCK(0x14)); in bwn_lo_save() 2200 sav->phy_hpwr_tssictl = BWN_PHY_READ(mac, BWN_PHY_HPWR_TSSICTL); in bwn_lo_save() 2213 sav->phy_analogover = BWN_PHY_READ(mac, BWN_PHY_ANALOGOVER); in bwn_lo_save() 2214 sav->phy_analogoverval = in bwn_lo_save() 2216 sav->phy_rfover = BWN_PHY_READ(mac, BWN_PHY_RFOVER); in bwn_lo_save() 2217 sav->phy_rfoverval = BWN_PHY_READ(mac, BWN_PHY_RFOVERVAL); in bwn_lo_save() [all …]
|
/freebsd/contrib/tcsh/ |
H A D | sh.exec.c | 148 Char *dp, **pv, **opv, **av, *sav; in doexec() local 255 sav = Strspl(STRslash, *av);/* / command name for postpending */ in doexec() 257 cleanup_push(sav, xfree); in doexec() 259 Vsav = sav; in doexec() 290 dp = Strspl(*pv, sav); in doexec() 321 cleanup_until(sav); in doexec() 324 xfree(sav); in doexec() 814 Char *sav; in iscommand() local 824 sav = Strspl(STRslash, name); /* / command name for postpending */ in iscommand() 844 xfree(sav); in iscommand() [all …]
|
/freebsd/sys/net/ |
H A D | if_enc.c | 204 enc_bpftap(struct ifnet *ifp, struct mbuf *m, const struct secasvar *sav, in enc_bpftap() argument 218 hdr.spi = sav->spi; in enc_bpftap() 220 if (sav->alg_enc != SADB_EALG_NONE) in enc_bpftap() 222 if (sav->alg_auth != SADB_AALG_NONE) in enc_bpftap() 255 enc_bpftap(ifp, *ctx->mp, ctx->sav, hhook_type, ctx->enc, ctx->af); in enc_hhook() 312 enc_bpftap(ifp, *ctx->mp, ctx->sav, hhook_type, in enc_hhook()
|
H A D | if_ipsec.c | 451 ipsec_if_input(struct mbuf *m, struct secasvar *sav, uint32_t af) in ipsec_if_input() argument 458 if (sav->state != SADB_SASTATE_MATURE && in ipsec_if_input() 459 sav->state != SADB_SASTATE_DYING) { in ipsec_if_input() 464 if (sav->sah->saidx.mode != IPSEC_MODE_TUNNEL || in ipsec_if_input() 465 sav->sah->saidx.proto != IPPROTO_ESP) in ipsec_if_input() 469 CK_LIST_FOREACH(sc, ipsec_idhash(sav->sah->saidx.reqid), idhash) { in ipsec_if_input() 473 sav->sah->saidx.src.sa.sa_family); in ipsec_if_input() 476 sav->sah->saidx.reqid != saidx->reqid) in ipsec_if_input() 479 if (key_sockaddrcmp(&sav->sah->saidx.dst.sa, in ipsec_if_input() 482 if (key_sockaddrcmp(&sav in ipsec_if_input() [all...] |
H A D | if_enc.h | 35 struct secasvar *sav; member
|
/freebsd/sys/dev/mlx5/mlx5_accel/ |
H A D | mlx5_ipsec.c | 327 mlx5e_if_sa_newkey_onedir(struct ifnet *ifp, void *sav, int dir, u_int drv_spi, in mlx5e_if_sa_newkey_onedir() argument 350 err = mlx5e_xfrm_validate_state(mdev, sav); in mlx5e_if_sa_newkey_onedir() 362 sa_entry->savp = sav; in mlx5e_if_sa_newkey_onedir() 371 err = mlx5e_xfrm_validate_state(mdev, sav); in mlx5e_if_sa_newkey_onedir() 431 mlx5e_if_sa_newkey(struct ifnet *ifpo, void *sav, u_int dev_spi, void **privp) in mlx5e_if_sa_newkey() argument 443 ifp, sav, IPSEC_DIR_INBOUND, dev_spi, &pb->priv_in, pb, ifpo); in mlx5e_if_sa_newkey() 449 ifp, sav, IPSEC_DIR_OUTBOUND, dev_spi, &pb->priv_out, pb, ifpo); in mlx5e_if_sa_newkey() 718 mlx5e_if_ipsec_hwassist(if_t ifneto, void *sav __unused, in mlx5e_if_ipsec_hwassist()
|
/freebsd/sbin/ipf/ipmon/ |
H A D | ipmon_y.y | 680 ipmon_saver_int_t *sav, **imsip; in unload_config() local 693 for (imsip = &saverlist; (sav = *imsip) != NULL; ) { in unload_config() 694 if (sav->imsi_handle == NULL) in unload_config() 695 imsip = &sav->imsi_next; in unload_config() 697 dlclose(sav->imsi_handle); in unload_config() 699 *imsip = sav->imsi_next; in unload_config() 700 is = sav->imsi_stor; in unload_config() 701 free(sav); in unload_config()
|
/freebsd/sys/contrib/openzfs/module/zfs/ |
H A D | spa.c | 2342 spa_aux_vdev_t *sav = &spa->spa_l2cache; in spa_load_l2cache() local 2359 oldvdevs = sav->sav_vdevs; in spa_load_l2cache() 2360 oldnvdevs = sav->sav_count; in spa_load_l2cache() 2361 sav->sav_vdevs = NULL; in spa_load_l2cache() 2362 sav->sav_count = 0; in spa_load_l2cache() 2364 if (sav->sav_config == NULL) { in spa_load_l2cache() 2370 VERIFY0(nvlist_lookup_nvlist_array(sav->sav_config, in spa_load_l2cache() 2409 vd->vdev_aux = sav; in spa_load_l2cache() 2432 sav->sav_vdevs = newvdevs; in spa_load_l2cache() 2433 sav->sav_count = (int)nl2cache; in spa_load_l2cache() [all …]
|