Lines Matching refs:spds
137 #define ss1dbg(spds, a) if (spds->spds_debug != 0) printf a
138 #define ss2dbg(spds, a) if (spds->spds_debug > 1) printf a
139 #define ss3dbg(spds, a) if (spds->spds_debug > 2) printf a
215 spd_stack_t *spds = ss->spdsock_spds;
217 mutex_enter(&spds->spds_param_lock);
219 mutex_exit(&spds->spds_param_lock);
238 spd_stack_t *spds = ss->spdsock_spds;
244 mutex_enter(&spds->spds_param_lock);
251 mutex_exit(&spds->spds_param_lock);
257 mutex_exit(&spds->spds_param_lock);
314 spd_stack_t *spds;
317 spds = (spd_stack_t *)kmem_zalloc(sizeof (*spds), KM_SLEEP);
318 spds->spds_netstack = ns;
320 ASSERT(spds->spds_g_nd == NULL);
323 spds->spds_params = ssp;
326 (void) spdsock_param_register(&spds->spds_g_nd, ssp,
329 mutex_init(&spds->spds_param_lock, NULL, MUTEX_DEFAULT, NULL);
330 mutex_init(&spds->spds_alg_lock, NULL, MUTEX_DEFAULT, NULL);
332 return (spds);
350 spd_stack_t *spds = (spd_stack_t *)arg;
352 if (spds->spds_mp_algs != NULL) {
353 freemsg(spds->spds_mp_algs);
354 spds->spds_mp_algs = NULL;
362 spd_stack_t *spds = (spd_stack_t *)arg;
364 ASSERT(spds->spds_mp_algs == NULL);
365 mutex_destroy(&spds->spds_param_lock);
366 mutex_destroy(&spds->spds_alg_lock);
367 nd_free(&spds->spds_g_nd);
368 kmem_free(spds->spds_params, sizeof (lcl_param_arr));
369 spds->spds_params = NULL;
371 kmem_free(spds, sizeof (*spds));
778 spd_stack_t *spds)
799 return (ipsec_check_action(act, diag, spds->spds_netstack));
807 int *diag, spd_stack_t *spds)
869 diag, spds))
984 tmprule_t **rp, uint64_t *index, spd_stack_t *spds)
992 index, spds->spds_netstack);
1010 tmprule_t **rp, uint64_t *index, spd_stack_t *spds)
1016 index, spds);
1022 index, spds);
1043 spd_stack_t *spds = ss->spdsock_spds;
1056 spds->spds_netstack, ITP_NAME(itp), active,
1121 if (!spdsock_ext_to_actvec(extv, &actp, &nact, &diag, spds)) {
1136 IPSEC_TYPE_OUTBOUND, afs, &rulep, index, spds);
1143 IPSEC_TYPE_INBOUND, afs, &rulep, index, spds);
1150 spds->spds_netstack);
1165 audit_pf_policy(SPD_ADDRULE, cr, spds->spds_netstack,
1189 audit_pf_policy(SPD_ADDRULE, cr, spds->spds_netstack,
2546 spdsock_do_updatealg(spd_ext_t *extv[], spd_stack_t *spds)
2557 ASSERT(MUTEX_HELD(&spds->spds_alg_lock));
2570 bzero(spds->spds_algs, IPSEC_NALGTYPES * IPSEC_MAX_ALGS *
2596 spds->spds_algs[alg_type][alg->alg_id]);
2597 spds->spds_algs[alg_type][alg->alg_id] =
2605 ss1dbg(spds, ("spdsock_do_updatealg: "
2646 ss1dbg(spds, ("spdsock_do_updatealg: "
2682 ss1dbg(spds, ("spdsock_do_updatealg: "
2709 ss1dbg(spds, ("spdsock_do_updatealg: "
2726 ss1dbg(spds, ("spdsock_do_updatealg: "
2755 spds->spds_algs_exec_mode[alg_type] = i;
2769 spdsock_merge_algs(spds);
2775 if (spds->spds_algs[alg_type][algid] != NULL)
2776 ipsec_alg_free(spds->spds_algs[alg_type][algid]);
2790 spd_stack_t *spds = ss->spdsock_spds;
2791 ipsec_stack_t *ipss = spds->spds_netstack->netstack_ipsec;
2806 mutex_enter(&spds->spds_alg_lock);
2807 bcopy(extv, spds->spds_extv_algs,
2809 if (spds->spds_mp_algs != NULL)
2810 freemsg(spds->spds_mp_algs);
2811 spds->spds_mp_algs = mp;
2812 mutex_exit(&spds->spds_alg_lock);
2819 spds->spds_netstack, NULL, B_TRUE, EAGAIN,
2829 mutex_enter(&spds->spds_alg_lock);
2830 diag = spdsock_do_updatealg(extv, spds);
2834 spds->spds_netstack);
2835 mutex_exit(&spds->spds_alg_lock);
2843 spds->spds_netstack, NULL, B_TRUE, 0,
2847 mutex_exit(&spds->spds_alg_lock);
2855 spds->spds_netstack, NULL, B_TRUE, diag,
2981 spd_stack_t *spds = ss->spdsock_spds;
2982 netstack_t *ns = spds->spds_netstack;
3001 ss2dbg(spds,
3014 ss3dbg(spds, ("spdsock_parse: pullupmsg() failed.\n"));
3024 ss1dbg(spds, ("Got duplicate extension of type %d.\n",
3030 ss1dbg(spds, ("Got unknown extension of type %d.\n",
3036 ss1dbg(spds, ("Length %d on extension type %d overrun or 0.\n",
3042 ss1dbg(spds, ("Reality check failed on extension type %d.\n",
3166 spd_stack_t *spds = ns->netstack_spdsock;
3168 mutex_enter(&spds->spds_alg_lock);
3169 if (spds->spds_mp_algs != NULL) {
3170 (void) spdsock_do_updatealg(spds->spds_extv_algs, spds);
3171 freemsg(spds->spds_mp_algs);
3172 spds->spds_mp_algs = NULL;
3174 mutex_exit(&spds->spds_alg_lock);
3320 spd_stack_t *spds = ss->spdsock_spds;
3326 if (*i1 > spds->spds_max_buf)
3331 if (*i1 > spds->spds_max_buf)
3352 spd_stack_t *spds = ss->spdsock_spds;
3359 ss3dbg(spds, (
3413 if (nd_getset(q, spds->spds_g_nd, mp)) {
3445 spd_stack_t *spds = ss->spdsock_spds;
3462 ss2dbg(spds, ("raw M_DATA in spdsock.\n"));
3471 ss2dbg(spds,
3478 ss2dbg(spds, ("T_DATA_REQ\n"));
3484 ss3dbg(spds, ("In default wput case (%d %d).\n",
3506 spd_stack_t *spds;
3519 spds = ns->netstack_spdsock;
3520 ASSERT(spds != NULL);
3522 ss2dbg(spds, ("Made it into PF_POLICY socket open.\n"));
3526 netstack_rele(spds->spds_netstack);
3532 netstack_rele(spds->spds_netstack);
3540 ss->spdsock_spds = spds;
3545 q->q_hiwat = spds->spds_recv_hiwat;
3547 oq->q_hiwat = spds->spds_xmit_hiwat;
3548 oq->q_lowat = spds->spds_xmit_lowat;
3551 (void) proto_set_rx_hiwat(q, NULL, spds->spds_recv_hiwat);
3609 spd_stack_t *spds = ss->spdsock_spds;
3619 ss3dbg(spds, ("Driver close, PF_POLICY socket is going away.\n"));
3632 spdsock_merge_algs(spd_stack_t *spds)
3639 netstack_t *ns = spds->spds_netstack;
3642 ASSERT(MUTEX_HELD(&spds->spds_alg_lock));
3658 alg = spds->spds_algs[algtype][algid];
3700 if (spds->spds_algs[algtype][algid] == NULL)
3714 alg = spds->spds_algs[algtype][algid];
3734 spds->spds_algs[algtype][algid] = NULL;
3740 spds->spds_algs_exec_mode[algtype];