Added a getter for CHILD_SA marks
This commit is contained in:
@@ -526,6 +526,16 @@ METHOD(child_sa_t, get_usestats, void,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
METHOD(child_sa_t, get_mark, mark_t,
|
||||||
|
private_child_sa_t *this, bool inbound)
|
||||||
|
{
|
||||||
|
if (inbound)
|
||||||
|
{
|
||||||
|
return this->mark_in;
|
||||||
|
}
|
||||||
|
return this->mark_out;
|
||||||
|
}
|
||||||
|
|
||||||
METHOD(child_sa_t, get_lifetime, time_t,
|
METHOD(child_sa_t, get_lifetime, time_t,
|
||||||
private_child_sa_t *this, bool hard)
|
private_child_sa_t *this, bool hard)
|
||||||
{
|
{
|
||||||
@@ -1038,6 +1048,7 @@ child_sa_t * child_sa_create(host_t *me, host_t* other,
|
|||||||
.set_proposal = _set_proposal,
|
.set_proposal = _set_proposal,
|
||||||
.get_lifetime = _get_lifetime,
|
.get_lifetime = _get_lifetime,
|
||||||
.get_usestats = _get_usestats,
|
.get_usestats = _get_usestats,
|
||||||
|
.get_mark = _get_mark,
|
||||||
.has_encap = _has_encap,
|
.has_encap = _has_encap,
|
||||||
.get_ipcomp = _get_ipcomp,
|
.get_ipcomp = _get_ipcomp,
|
||||||
.set_ipcomp = _set_ipcomp,
|
.set_ipcomp = _set_ipcomp,
|
||||||
|
|||||||
@@ -274,6 +274,14 @@ struct child_sa_t {
|
|||||||
void (*get_usestats)(child_sa_t *this, bool inbound, time_t *time,
|
void (*get_usestats)(child_sa_t *this, bool inbound, time_t *time,
|
||||||
u_int64_t *bytes);
|
u_int64_t *bytes);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the mark used with this CHILD_SA.
|
||||||
|
*
|
||||||
|
* @param inbound TRUE to get inbound mark, FALSE for outbound
|
||||||
|
* @return mark used with this CHILD_SA
|
||||||
|
*/
|
||||||
|
mark_t (*get_mark)(child_sa_t *this, bool inbound);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the traffic selectors list added for one side.
|
* Get the traffic selectors list added for one side.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user