Lines Matching defs:gs

5453 	struct pf_state *gs;
5468 gs = pptps->grev1_state;
5470 if (gs)
5471 gs->expire = pf_time_second();
5485 if (!gs) {
5486 gs = pool_get(&pf_state_pl, PR_WAITOK);
5487 if (!gs)
5490 memcpy(gs, s, sizeof (*gs));
5492 memset(&gs->entry_id, 0, sizeof (gs->entry_id));
5493 memset(&gs->entry_list, 0, sizeof (gs->entry_list));
5495 TAILQ_INIT(&gs->unlink_hooks);
5496 gs->rt_kif = NULL;
5497 gs->creation = 0;
5498 gs->pfsync_time = 0;
5499 gs->packets[0] = gs->packets[1] = 0;
5500 gs->bytes[0] = gs->bytes[1] = 0;
5501 gs->timeout = PFTM_UNLINKED;
5502 gs->id = gs->creatorid = 0;
5503 gs->src.state = gs->dst.state = PFGRE1S_NO_TRAFFIC;
5504 gs->src.scrub = gs->dst.scrub = 0;
5508 pool_put(&pf_state_pl, gs);
5512 gsk = pf_alloc_state_key(gs, NULL);
5515 pool_put(&pf_state_pl, gs);
5532 STATE_INC_COUNTERS(gs);
5533 pptps->grev1_state = gs;
5534 (void) hook_establish(&gs->unlink_hooks, 0,
5535 (hook_fn_t) pf_grev1_unlink, gs);
5537 gsk = gs->state_key;
5543 pns_state = &gs->dst.state;
5545 pac_state = &gs->src.state;
5550 pns_state = &gs->src.state;
5552 pac_state = &gs->dst.state;
5581 if (gs->timeout == PFTM_UNLINKED) {
5610 if (gs->timeout == PFTM_UNLINKED)
5694 STATE_DEC_COUNTERS(gs);
5695 pool_put(&pf_state_pl, gs);
5703 gs->timeout = PFTM_PURGE;
5704 gs->src.state = gs->dst.state = PFGRE1S_NO_TRAFFIC;
5708 gs->id = gs->creatorid = 0;
5712 gs->creation = pf_time_second();
5713 gs->expire = pf_time_second();
5714 gs->timeout = PFTM_TCP_ESTABLISHED;
5715 if (gs->src_node != NULL) {
5716 ++gs->src_node->states;
5717 VERIFY(gs->src_node->states != 0);
5719 if (gs->nat_src_node != NULL) {
5720 ++gs->nat_src_node->states;
5721 VERIFY(gs->nat_src_node->states != 0);
5723 pf_set_rt_ifp(gs, &sk->lan.addr);
5724 if (pf_insert_state(BOUND_IFACE(s->rule.ptr, kif), gs)) {
5739 pf_src_tree_remove_state(gs);
5740 STATE_DEC_COUNTERS(gs);
5741 pool_put(&pf_state_pl, gs);