Struct:ttSadbRecord

Jump to: navigation, search
 
#include trsecapi.h
 
typedef struct tsSadbRecord
{
    struct tsSadbRecord TM_FAR *    sadbNextSameHashPtr ;
    struct tsSadbRecord TM_FAR *    sadbNextSamePolicyPtr;
    struct tsSadbRecord TM_FAR *    sadbTwinSaPtr;
    struct tsPolicyEntry TM_FAR *   sadbPolicyPtr;
    struct tsPolicyContent TM_FAR * sadbPlcyContentPtr;
    ttUser8BitPtr                   sadbReplayWindowMapPtr ;
    struct tsIpsecSelector TM_FAR * sadbSelectorPtr;
    ttUserVoidPtr                   sadbSoftTimerPtr;
    ttUserVoidPtr                   sadbHardTimerPtr;
    ttUserVoidPtr                   sadbSessionPtr;
    ttUser32Bit                     sadbRemainBytes;
    struct sockaddr_storage         sadbSrcIpAddress;
    struct sockaddr_storage         sadbDstIpAddress;
    struct tsGenericKey             sadbAuthKey;
    struct tsGenericKey             sadbEncryptKey;
    struct ttAhAlgorithm TM_FAR *   sadbAuthAlgPtr;
    struct ttEspAlgorithm TM_FAR *  sadbEncryptAlgPtr;
    struct tsCryptoEngine TM_FAR *  sadbCryptoEnginePtr;
    sadb_sa TM_FAR *                sadbSAPtr;
    ttUser32Bit                     sadbSequenceNumber;
    ttUser32Bit                     sadbReplayWindowBegin ;
    ttUser16Bit                     sadbFlags;
    ttUser16Bit                     sadbCheckOut;
    ttUser8Bit                      sadbDirection;
    ttUser8Bit                      sadbSaProtocol;
    ttUser8Bit                      sadbIpsecMode;
    ttUser8Bit                      sadbPadding;
} ttSadbRecord;
 
typedef ttSadbRecord * ttSadbRecordPtr;
 

Structure Description

ttSadbRecord is the structure for Treck IPsec SA’s. Generally, it is an internal structure. However, the user is able to locate a SA and modify it (see Policy Database Management APIs).


Members

  • sadbNextSameHashPtr
    All SA’s are stored in a hash table. The pointer points to the next SA which has the same hash value
  • sadbNextSamePolicyPtr
    All SA’s spawned by the same policy (and in the same direction) are linked together. This pointer points to the next SA of this list.
  • sadbTwinSaPtr
    If this SA is an inbound (or outbound)SA, sadbTwinSaPtr points to the corresponding outbound(or inbound) SA.
  • sadbPolicyPtr
    Points to the policy which spawns this SA
  • sadbPlcyContentPtr
    Points to the policy content which spawns this SA. (A policy may have several bundled contents, each content will result in a separate SA.
  • sadbReplayWindowMapPtr
    Replay window size usage map. We use 8Bit array to store the map.
  • sadbSelectorPtr
    Points to the selector used to match this SA.
  • sadbSoftTimerPtr
    Soft lifetime pointer. It is time to re-keying , the time event will trigger a re-keying session
  • sadbHardTimerPtr
    Hard lifetime pointer. Delete this SA when hard time reaches. Time event will trigger a delete action.
  • sadbSessionPtr
    Session pointer, may be used for hardware accelerator.
  • sadbRemainBytes
    Indicates how many bytes this SA can be used to protect. Used only if volume type lifetime is used.
  • sadbSrcIpAddress
    Source IP address. SA can be either inbound SA or outbound SA, i.e. uni-directional, source and destination won’t cause confusion (policy may apply to both directions, thus we use local and remote.)
  • sadbDstIpAddress
    Destination IP address
  • sadbAuthKey
    Authentication key
  • sadbEncryptKey
    Encryption Key. (or decryption key)
  • sadbAuthAlgPtr
    Authentication algorithm pointer
  • sadbEncryptAlgPtr
    Encryption algorithm pointer
  • sadbCryptoEnginePtr
    Pointer to the crypto engine, currently, may be software engine, or HIFN 7951
  • sadbSAPtr
    Pointer to a sadb_sa structure.
  • sadbSequenceNumber
    Sequence number of this SA at current time. When a 32Bit sequence number is used up, re-keying action should be taken
  • sadbReplayWindowBegin
    Indicates the beginning sequence of the current replay window
  • sadbFlags
    Flags of this SA may be:
    TM_IPSEC_SADBFLAG_NOREKEYING: Means not to re-key this SA. When lifetime expires, delete this SA.
    TM_IPSEC_SADBFLAG_BEENUSED: Means that this SA has been used. If an SA is not used at all, we won’t re-key it.
    TM_IPSEC_SADBFLAG_NOEXPIRING: Means that this SA won’t expire. Once the current lifetime expires, it will automatically renew the timer.
  • sadbCheckOut
    Indicates how many sockets checked out this SA. (For TCP sockets, once a SA is located, they will queue this SA for later use.)
  • sadbDirection
    Indicates the direction of this SA, can be either TM_IPSEC_INBOUND or TM_IPSEC_OUTBOUND
  • sadbSaProtocol
    Indicates the IPsec protocol. Can be either TM_IP_AH or TM_IP_ESP
  • sadbIpsecMode
    Indicates the IPsec protocol operation mode, can be either SADB_MODE_TRANSPORT or SADB_MODE_TUNNEL
  • sadbPadding
    For alignment padding. Not used.