Lines Matching refs:lifetime

766 	struct sadb_lifetime *lifetime;  in __pfkey_xfrm_state2msg()  local
882 lifetime = skb_put(skb, sizeof(struct sadb_lifetime)); in __pfkey_xfrm_state2msg()
883 lifetime->sadb_lifetime_len = in __pfkey_xfrm_state2msg()
885 lifetime->sadb_lifetime_exttype = SADB_EXT_LIFETIME_HARD; in __pfkey_xfrm_state2msg()
886 lifetime->sadb_lifetime_allocations = _X2KEY(x->lft.hard_packet_limit); in __pfkey_xfrm_state2msg()
887 lifetime->sadb_lifetime_bytes = _X2KEY(x->lft.hard_byte_limit); in __pfkey_xfrm_state2msg()
888 lifetime->sadb_lifetime_addtime = x->lft.hard_add_expires_seconds; in __pfkey_xfrm_state2msg()
889 lifetime->sadb_lifetime_usetime = x->lft.hard_use_expires_seconds; in __pfkey_xfrm_state2msg()
893 lifetime = skb_put(skb, sizeof(struct sadb_lifetime)); in __pfkey_xfrm_state2msg()
894 lifetime->sadb_lifetime_len = in __pfkey_xfrm_state2msg()
896 lifetime->sadb_lifetime_exttype = SADB_EXT_LIFETIME_SOFT; in __pfkey_xfrm_state2msg()
897 lifetime->sadb_lifetime_allocations = _X2KEY(x->lft.soft_packet_limit); in __pfkey_xfrm_state2msg()
898 lifetime->sadb_lifetime_bytes = _X2KEY(x->lft.soft_byte_limit); in __pfkey_xfrm_state2msg()
899 lifetime->sadb_lifetime_addtime = x->lft.soft_add_expires_seconds; in __pfkey_xfrm_state2msg()
900 lifetime->sadb_lifetime_usetime = x->lft.soft_use_expires_seconds; in __pfkey_xfrm_state2msg()
903 lifetime = skb_put(skb, sizeof(struct sadb_lifetime)); in __pfkey_xfrm_state2msg()
904 lifetime->sadb_lifetime_len = in __pfkey_xfrm_state2msg()
906 lifetime->sadb_lifetime_exttype = SADB_EXT_LIFETIME_CURRENT; in __pfkey_xfrm_state2msg()
907 lifetime->sadb_lifetime_allocations = x->curlft.packets; in __pfkey_xfrm_state2msg()
908 lifetime->sadb_lifetime_bytes = x->curlft.bytes; in __pfkey_xfrm_state2msg()
909 lifetime->sadb_lifetime_addtime = x->curlft.add_time; in __pfkey_xfrm_state2msg()
910 lifetime->sadb_lifetime_usetime = x->curlft.use_time; in __pfkey_xfrm_state2msg()
1064 const struct sadb_lifetime *lifetime; in pfkey_msg2xfrm_state() local
1137 lifetime = ext_hdrs[SADB_EXT_LIFETIME_HARD - 1]; in pfkey_msg2xfrm_state()
1138 if (lifetime != NULL) { in pfkey_msg2xfrm_state()
1139 x->lft.hard_packet_limit = _KEY2X(lifetime->sadb_lifetime_allocations); in pfkey_msg2xfrm_state()
1140 x->lft.hard_byte_limit = _KEY2X(lifetime->sadb_lifetime_bytes); in pfkey_msg2xfrm_state()
1141 x->lft.hard_add_expires_seconds = lifetime->sadb_lifetime_addtime; in pfkey_msg2xfrm_state()
1142 x->lft.hard_use_expires_seconds = lifetime->sadb_lifetime_usetime; in pfkey_msg2xfrm_state()
1144 lifetime = ext_hdrs[SADB_EXT_LIFETIME_SOFT - 1]; in pfkey_msg2xfrm_state()
1145 if (lifetime != NULL) { in pfkey_msg2xfrm_state()
1146 x->lft.soft_packet_limit = _KEY2X(lifetime->sadb_lifetime_allocations); in pfkey_msg2xfrm_state()
1147 x->lft.soft_byte_limit = _KEY2X(lifetime->sadb_lifetime_bytes); in pfkey_msg2xfrm_state()
1148 x->lft.soft_add_expires_seconds = lifetime->sadb_lifetime_addtime; in pfkey_msg2xfrm_state()
1149 x->lft.soft_use_expires_seconds = lifetime->sadb_lifetime_usetime; in pfkey_msg2xfrm_state()
2068 struct sadb_lifetime *lifetime; in pfkey_xfrm_policy2msg() local
2113 lifetime = skb_put(skb, sizeof(struct sadb_lifetime)); in pfkey_xfrm_policy2msg()
2114 lifetime->sadb_lifetime_len = in pfkey_xfrm_policy2msg()
2116 lifetime->sadb_lifetime_exttype = SADB_EXT_LIFETIME_HARD; in pfkey_xfrm_policy2msg()
2117 lifetime->sadb_lifetime_allocations = _X2KEY(xp->lft.hard_packet_limit); in pfkey_xfrm_policy2msg()
2118 lifetime->sadb_lifetime_bytes = _X2KEY(xp->lft.hard_byte_limit); in pfkey_xfrm_policy2msg()
2119 lifetime->sadb_lifetime_addtime = xp->lft.hard_add_expires_seconds; in pfkey_xfrm_policy2msg()
2120 lifetime->sadb_lifetime_usetime = xp->lft.hard_use_expires_seconds; in pfkey_xfrm_policy2msg()
2122 lifetime = skb_put(skb, sizeof(struct sadb_lifetime)); in pfkey_xfrm_policy2msg()
2123 lifetime->sadb_lifetime_len = in pfkey_xfrm_policy2msg()
2125 lifetime->sadb_lifetime_exttype = SADB_EXT_LIFETIME_SOFT; in pfkey_xfrm_policy2msg()
2126 lifetime->sadb_lifetime_allocations = _X2KEY(xp->lft.soft_packet_limit); in pfkey_xfrm_policy2msg()
2127 lifetime->sadb_lifetime_bytes = _X2KEY(xp->lft.soft_byte_limit); in pfkey_xfrm_policy2msg()
2128 lifetime->sadb_lifetime_addtime = xp->lft.soft_add_expires_seconds; in pfkey_xfrm_policy2msg()
2129 lifetime->sadb_lifetime_usetime = xp->lft.soft_use_expires_seconds; in pfkey_xfrm_policy2msg()
2131 lifetime = skb_put(skb, sizeof(struct sadb_lifetime)); in pfkey_xfrm_policy2msg()
2132 lifetime->sadb_lifetime_len = in pfkey_xfrm_policy2msg()
2134 lifetime->sadb_lifetime_exttype = SADB_EXT_LIFETIME_CURRENT; in pfkey_xfrm_policy2msg()
2135 lifetime->sadb_lifetime_allocations = xp->curlft.packets; in pfkey_xfrm_policy2msg()
2136 lifetime->sadb_lifetime_bytes = xp->curlft.bytes; in pfkey_xfrm_policy2msg()
2137 lifetime->sadb_lifetime_addtime = xp->curlft.add_time; in pfkey_xfrm_policy2msg()
2138 lifetime->sadb_lifetime_usetime = xp->curlft.use_time; in pfkey_xfrm_policy2msg()
2249 struct sadb_lifetime *lifetime; in pfkey_spdadd() local
2317 if ((lifetime = ext_hdrs[SADB_EXT_LIFETIME_HARD-1]) != NULL) { in pfkey_spdadd()
2318 xp->lft.hard_packet_limit = _KEY2X(lifetime->sadb_lifetime_allocations); in pfkey_spdadd()
2319 xp->lft.hard_byte_limit = _KEY2X(lifetime->sadb_lifetime_bytes); in pfkey_spdadd()
2320 xp->lft.hard_add_expires_seconds = lifetime->sadb_lifetime_addtime; in pfkey_spdadd()
2321 xp->lft.hard_use_expires_seconds = lifetime->sadb_lifetime_usetime; in pfkey_spdadd()
2323 if ((lifetime = ext_hdrs[SADB_EXT_LIFETIME_SOFT-1]) != NULL) { in pfkey_spdadd()
2324 xp->lft.soft_packet_limit = _KEY2X(lifetime->sadb_lifetime_allocations); in pfkey_spdadd()
2325 xp->lft.soft_byte_limit = _KEY2X(lifetime->sadb_lifetime_bytes); in pfkey_spdadd()
2326 xp->lft.soft_add_expires_seconds = lifetime->sadb_lifetime_addtime; in pfkey_spdadd()
2327 xp->lft.soft_use_expires_seconds = lifetime->sadb_lifetime_usetime; in pfkey_spdadd()