[XFRM] STATE: Search by address using source address list.
[linux-2.6.git] / include / linux / xfrm.h
index b54a129..66343d3 100644 (file)
@@ -118,6 +118,12 @@ enum
        XFRM_SHARE_UNIQUE       /* Use once */
 };
 
+#define XFRM_MODE_TRANSPORT 0
+#define XFRM_MODE_TUNNEL 1
+#define XFRM_MODE_ROUTEOPTIMIZATION 2
+#define XFRM_MODE_IN_TRIGGER 3
+#define XFRM_MODE_MAX 4
+
 /* Netlink configuration messages.  */
 enum {
        XFRM_MSG_BASE = 0x10,
@@ -228,6 +234,7 @@ enum xfrm_attr_type_t {
        XFRMA_REPLAY_VAL,
        XFRMA_REPLAY_THRESH,
        XFRMA_ETIMER_THRESH,
+       XFRMA_SRCADDR,          /* xfrm_address_t */
        __XFRMA_MAX
 
 #define XFRMA_MAX (__XFRMA_MAX - 1)
@@ -243,7 +250,7 @@ struct xfrm_usersa_info {
        __u32                           seq;
        __u32                           reqid;
        __u16                           family;
-       __u8                            mode; /* 0=transport,1=tunnel */
+       __u8                            mode;           /* XFRM_MODE_xxx */
        __u8                            replay_window;
        __u8                            flags;
 #define XFRM_STATE_NOECN       1
@@ -259,8 +266,8 @@ struct xfrm_usersa_id {
 };
 
 struct xfrm_aevent_id {
-       __u32                           flags;
        struct xfrm_usersa_id           sa_id;
+       __u32                           flags;
 };
 
 struct xfrm_userspi_info {