K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-03-07T18:29:12.606319Z K 7 svn:log V 1044 Simplify key(s) + state setup, mostly making code easier to read and understand. Passing four ** pointers which actually represent only one (or a couple) of keys, isn't easy to read, IMHO. - pf_state_key_setup() now takes only source data for a key, allocates a single key, fills it in and returns pointer to it. - New pf_state_key_clone() creates a clone of key, which has all key data filled in, but isn't linked anywhere. - pf_get_translation() now has two parameters less, decision on who is wire who is stack is taken later. pf_get_translation() allocates one key via pf_state_key_setup(), and clones other via pf_state_key_clone(). - pf_create_state() now takes two parameters less, decision on who is wire who is stack is taken later. If nr (nat rule pointer) is non-NULL, then keys had already been setup by pf_get_translation(). Otherwise a single key is set up via pf_state_key_setup() and both pointers point to it. - Right in call to pf_state_insert() we decide which key is wire side, and which is stack side. END