Lines Matching defs:gs

5506 	struct pf_state *gs;
5521 gs = pptps->grev1_state;
5523 if (gs)
5524 gs->expire = pf_time_second();
5538 if (!gs) {
5539 gs = pool_get(&pf_state_pl, PR_WAITOK);
5540 if (!gs)
5543 memcpy(gs, s, sizeof (*gs));
5545 memset(&gs->entry_id, 0, sizeof (gs->entry_id));
5546 memset(&gs->entry_list, 0, sizeof (gs->entry_list));
5548 TAILQ_INIT(&gs->unlink_hooks);
5549 gs->rt_kif = NULL;
5550 gs->creation = 0;
5551 gs->pfsync_time = 0;
5552 gs->packets[0] = gs->packets[1] = 0;
5553 gs->bytes[0] = gs->bytes[1] = 0;
5554 gs->timeout = PFTM_UNLINKED;
5555 gs->id = gs->creatorid = 0;
5556 gs->src.state = gs->dst.state = PFGRE1S_NO_TRAFFIC;
5557 gs->src.scrub = gs->dst.scrub = 0;
5561 pool_put(&pf_state_pl, gs);
5565 gsk = pf_alloc_state_key(gs, NULL);
5568 pool_put(&pf_state_pl, gs);
5586 STATE_INC_COUNTERS(gs);
5587 pptps->grev1_state = gs;
5588 (void) hook_establish(&gs->unlink_hooks, 0,
5589 (hook_fn_t) pf_grev1_unlink, gs);
5591 gsk = gs->state_key;
5597 pns_state = &gs->dst.state;
5599 pac_state = &gs->src.state;
5604 pns_state = &gs->src.state;
5606 pac_state = &gs->dst.state;
5635 if (gs->timeout == PFTM_UNLINKED) {
5664 if (gs->timeout == PFTM_UNLINKED)
5748 STATE_DEC_COUNTERS(gs);
5749 pool_put(&pf_state_pl, gs);
5757 gs->timeout = PFTM_PURGE;
5758 gs->src.state = gs->dst.state = PFGRE1S_NO_TRAFFIC;
5762 gs->id = gs->creatorid = 0;
5766 gs->creation = pf_time_second();
5767 gs->expire = pf_time_second();
5768 gs->timeout = PFTM_TCP_ESTABLISHED;
5769 if (gs->src_node != NULL) {
5770 ++gs->src_node->states;
5771 VERIFY(gs->src_node->states != 0);
5773 if (gs->nat_src_node != NULL) {
5774 ++gs->nat_src_node->states;
5775 VERIFY(gs->nat_src_node->states != 0);
5777 pf_set_rt_ifp(gs, &sk->lan.addr);
5778 if (pf_insert_state(BOUND_IFACE(s->rule.ptr, kif), gs)) {
5793 pf_src_tree_remove_state(gs);
5794 STATE_DEC_COUNTERS(gs);
5795 pool_put(&pf_state_pl, gs);