Struct:ttPolicyEntry

Jump to: navigation, search
 
#include trsecapi.h
 
typedef struct tsPolicyEntry{
    struct tsPolicyEntry TM_FAR *   plcyNextPtr;
#ifdef TM_USE_MULTIPLE_PROPOSALS
/* plcyContentPtr is the transform list, this is the tail */
    struct tsPolicyContent TM_FAR * plcyLastContentPtr;
#endif /* TM_USE_MULTIPLE_PROPOSALS */
/* link all SA of the same policy*/
    ttSadbRecordPtr                 plcyInboundSadbPtr; 
    ttSadbRecordPtr                 plcyOutboundSadbPtr;
    ttIpsecSelector                 plcySelector;
    ttPolicyContentPtr              plcyContentPtr;
    ttUser32Bit                     plcySerialNumber;
/* How many entities own this policy entry */
    ttUser16Bit                     plcyOwnerCount;
/* How many entities own this policy content entry */
    ttUser16Bit                     plcyIndex; 
/* ipsec overhead header size*/
    ttUser16Bit                     plcyHdrLen; 
/* ipsec overhead trailer */
    ttUser16Bit                     plcyTrailerLen; 
#ifdef TM_USE_MULTIPLE_PROPOSALS
    ttUserPacketPtr                 plcyQueuePtr;
    ttUserPacketPtr                 plcyLastQueuePtr;
    ttUser16Bit                     plcyQueueBytes;
    ttUser8Bit                      plcyProposalCount;
    ttUser8Bit                      plcyEnabled;
#endif /* TM_USE_MULTIPLE_PROPOSALS */
/* 1 for in,2 for out, 3 for both */
    ttUser8Bit                      plcyDirection; 
    ttUser8Bit                      plcyAction;
#ifdef TM_USE_IKE_POLICIES          
    ttUser16Bit                     plcyIkePolicy;
#endif /* TM_USE_IKE_POLICIES */
#ifdef TM_USE_PRIORITIES
    ttUser16Bit                     plcyPriority;
#endif /* TM_USE_PRIORITIES */
#ifdef TM_IPSEC_POLICY_USER_DATA
    ttUserVoidPtr                   plcyUserDataPtr;
    ttUser32Bit                     plcyUserDataLen;
#endif /* TM_IPSEC_POLICY_USER_DATA */
#ifdef TM_USE_SEC_STAT
    ttUser16Bit                     plcySaInboundCount;
    ttUser16Bit                     plcySaOutboundCount;
#endif /* TM_USE_SEC_STAT */
#ifdef TM_USE_MULTIPLE_PROPOSALS
/* Manual Policy indication */
    ttUser8Bit                      plcyFlags;
#endif /* TM_MULTIPLE_PROPOSALS */
}ttPolicyEntry;
typedef ttPolicyEntry TM_FAR *    ttPolicyEntryPtr;
typedef ttPolicyEntryPtr TM_FAR * ttPolicyEntryPtrPtr;
 

Structure Description

ttPolicyEntry is the structure for Treck IPsec policies. Generally, it is an internal structure, however, the user is able to locate a policy and modify it (see Policy Database Management APIs).


Members

  • plcyNextPtr
    All policies are linked together. This pointer points to the next policy entry.
  • plcyLastContentPtr
    plcyContentPtr is the transform list, this is the tail of the list
  • plcyInboundSadbPtrr
    All inbound SA's spawned by this policy are linked together. This pointer points to the head of inbound SA list spawned by this policy.
  • plcyOutboundSadbPtrr
    All outbound SA's spawned by this policy are linked together. This pointer points to the head of outbound SA list spawned by this policy.
  • plcySelector
    The matching criteria for this policy, i.e. the selector.
  • plcyContentPtr
    All bundled policy contents are linked together. This pointer points to the innermost policy content.
  • plcySerialNumber
    Policy serial number.
  • plcyOwnerCount
    The owner count of the policy. This count is used to guarantee re-entrancy.
  • plcyIndex
    The index of this policy. Starting from zero. The higher the index is, the more preferred the policy is. (i.e., we try to match the policy with highest index first.)
  • plcyHdrLen
    Indicates how many header bytes required to implement this policy content. For example, an AH transport policy content requires 24 octets as the head.
  • plcyTrailerLen
    Indicates how many trailer bytes required to implement this policy content. For example, an ESP transport policy content with NULL authentication algorithm requires 8 octets as the trailer, considering the ESP tail and minimum padding.
  • plcyQueuePtr
    Queue of packets to be processed.
  • plcyLastQueuePtr
    End of the queued packet list.
  • plcyQueueBytes
    Number of bytes queued.
  • plcyProposalCount
    The number of proposals for this policy.
  • plcyEnabled
    A flag specifying if the policy is enabled.
  • plcyDirection
    Indicates the policy is an TM_IPSC_INBOUND policy or TM_IPSEC_OUTBOUND policy, or both direction TM_IPSEC_BOTH_DIRECTION.
  • plcyAction
    Indicates what IPsec action we need to take. Valid values are:
    TM_IPSEC_POLICY_IPSEC 2
    TM_IPSEC_POLICY_BYPASS 3
    TM_IPSEC_POLICY_DISCARD 4
    The above action number may or may not come with TM_IPSEC_POLICY_LOG_BASE 100
    For example, if plcyAction = 104, then we must discard the packet and log the corresponding information.
  • plcyIkePolicy
    A pointer to the associated IKE policy.
  • plcyPriority
    The policy's priority.
  • plcyUserDataPtr
    This is a pointer to user-allocated data that is carried with the IPsec Policy. This is a conditional member and only present when TM_IPSEC_POLICY_USER_DATA is defined at compile time.
  • plcyUserDataLen
    This is the length of userDataPtr. This is a conditional member and only present when TM_IPSEC_POLICY_USER_DATA is defined at compile time.
  • plcySaInboundCount
    A count of the number of inbound IPsec SAs created with this policy.
  • plcySaOutboundCount
    A count of the number of outbound IPsec SAs created with this policy.
  • plcyFlags
    A flags field specifying whether the policy is automatic or manual.