child-rekey: Don't change state to INSTALLED if it was already REKEYING
[strongswan.git] / src / libstrongswan / ipsec / ipsec_types.h
index fa122af..c93d955 100644 (file)
@@ -123,26 +123,35 @@ struct ipsec_sa_cfg_t {
        /** mode of SA (tunnel, transport) */
        ipsec_mode_t mode;
        /** unique ID */
-       u_int32_t reqid;
+       uint32_t reqid;
        /** number of policies of the same kind (in/out/fwd) attached to SA */
-       u_int32_t policy_count;
+       uint32_t policy_count;
        /** details about ESP/AH */
        struct {
                /** TRUE if this protocol is used */
                bool use;
                /** SPI for ESP/AH */
-               u_int32_t spi;
+               uint32_t spi;
        } esp, ah;
        /** details about IPComp */
        struct {
                /** the IPComp transform used */
-               u_int16_t transform;
+               uint16_t transform;
                /** CPI for IPComp */
-               u_int16_t cpi;
+               uint16_t cpi;
        } ipcomp;
 };
 
 /**
+ * Compare two ipsec_sa_cfg_t objects for equality.
+ *
+ * @param a                    first object
+ * @param b                    second object
+ * @return                     TRUE if both objects are equal
+ */
+bool ipsec_sa_cfg_equals(ipsec_sa_cfg_t *a, ipsec_sa_cfg_t *b);
+
+/**
  * A lifetime_cfg_t defines the lifetime limits of an SA.
  *
  * Set any of these values to 0 to ignore.
@@ -150,11 +159,11 @@ struct ipsec_sa_cfg_t {
 struct lifetime_cfg_t {
        struct {
                /** Limit before the SA gets invalid. */
-               u_int64_t       life;
+               uint64_t        life;
                /** Limit before the SA gets rekeyed. */
-               u_int64_t       rekey;
+               uint64_t        rekey;
                /** The range of a random value subtracted from rekey. */
-               u_int64_t       jitter;
+               uint64_t        jitter;
        } time, bytes, packets;
 };
 
@@ -163,9 +172,9 @@ struct lifetime_cfg_t {
  */
 struct mark_t {
        /** Mark value */
-       u_int32_t value;
+       uint32_t value;
        /** Mark mask */
-       u_int32_t mask;
+       uint32_t mask;
 };
 
 /**