/*
* Copyright (C) 2001-2003 by Darren Reed
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Simple ISAKMP transparent proxy for in-kernel use. For use with the NAT
* code.
*
* $Id: ip_ipsec_pxy.c,v 2.20.2.7 2005/07/15 21:56:50 darrenr Exp $
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#define IPF_IPSEC_PROXY
typedef struct ifs_ipsecpxy {
int ipsec_proxy_init;
int ipsec_proxy_ttl;
/*
* IPSec application proxy initialization.
*/
void **private;
{
return -1;
return -1;
}
return -1;
}
return 0;
}
void **private;
{
}
}
ifsipsec->ipsec_proxy_init = 0;
}
}
/*
* Setup for a new IPSEC proxy.
*/
void *private;
{
char *ptr;
mb_t *m;
if (dlen < 16)
return -1;
return -1;
return -1;
/*
* created. This is required because the current NAT rule does not
* describe ESP but UDP instead.
*/
sizeof(ipn->in_ifnames[0]));
ptr += sizeof(ipsec_cookie_t);
/*
* The responder cookie should only be non-zero if the initiator
* cookie is non-zero. Therefore, it is safe to assume(!) that the
* cookies are both set after copying if the responder is non-zero.
*/
SI_WILDP);
}
return 0;
}
/*
* For outgoing IKE packets. refresh timeouts for NAT & state entries, if
* we can. If they have disappeared, recreate them.
*/
void *private;
{
int p;
return 0;
return 0;
}
/*
*/
else {
}
}
/*
*/
} else {
&ipsec->ipsc_state,
SI_WILDP);
}
}
return 0;
}
/*
* This extends the NAT matching to be based on the cookies associated with
* a session and found at the front of IKE packets. The cookies are always
* in the same order (not reversed depending on packet flow direction as with
*/
/*ARGSUSED*/
void *private;
{
mb_t *m;
int off;
return -1;
return -1;
if (ipsec->ipsc_rckset == 0) {
return 0;
}
return 0;
}
return -1;
return 0;
}
/*
* clean up after ourselves.
*/
/*ARGSUSED*/
void *private;
{
/*
* Don't bother changing any of the NAT structure details,
* *_del() is on a callback from aps_free(), from nat_delete()
*/
}
}
}