~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to include/linux/xfrm.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
/* Structure to encapsulate addresses. I do not want to use
11
11
 * "standard" structure. My apologies.
12
12
 */
13
 
typedef union
14
 
{
 
13
typedef union {
15
14
        __be32          a4;
16
15
        __be32          a6[4];
17
16
} xfrm_address_t;
20
19
 * the state by (spi,daddr,ah/esp) or to store information about
21
20
 * spi, protocol and tunnel address on output.
22
21
 */
23
 
struct xfrm_id
24
 
{
 
22
struct xfrm_id {
25
23
        xfrm_address_t  daddr;
26
24
        __be32          spi;
27
25
        __u8            proto;
45
43
 
46
44
/* Selector, used as selector both on policy rules (SPD) and SAs. */
47
45
 
48
 
struct xfrm_selector
49
 
{
 
46
struct xfrm_selector {
50
47
        xfrm_address_t  daddr;
51
48
        xfrm_address_t  saddr;
52
49
        __be16  dport;
63
60
 
64
61
#define XFRM_INF (~(__u64)0)
65
62
 
66
 
struct xfrm_lifetime_cfg
67
 
{
 
63
struct xfrm_lifetime_cfg {
68
64
        __u64   soft_byte_limit;
69
65
        __u64   hard_byte_limit;
70
66
        __u64   soft_packet_limit;
75
71
        __u64   hard_use_expires_seconds;
76
72
};
77
73
 
78
 
struct xfrm_lifetime_cur
79
 
{
 
74
struct xfrm_lifetime_cur {
80
75
        __u64   bytes;
81
76
        __u64   packets;
82
77
        __u64   add_time;
83
78
        __u64   use_time;
84
79
};
85
80
 
86
 
struct xfrm_replay_state
87
 
{
 
81
struct xfrm_replay_state {
88
82
        __u32   oseq;
89
83
        __u32   seq;
90
84
        __u32   bitmap;
96
90
        char            alg_key[0];
97
91
};
98
92
 
 
93
struct xfrm_algo_auth {
 
94
        char            alg_name[64];
 
95
        unsigned int    alg_key_len;    /* in bits */
 
96
        unsigned int    alg_trunc_len;  /* in bits */
 
97
        char            alg_key[0];
 
98
};
 
99
 
99
100
struct xfrm_algo_aead {
100
101
        char            alg_name[64];
101
102
        unsigned int    alg_key_len;    /* in bits */
109
110
        __u32   integrity_failed;
110
111
};
111
112
 
112
 
enum
113
 
{
 
113
enum {
114
114
        XFRM_POLICY_TYPE_MAIN   = 0,
115
115
        XFRM_POLICY_TYPE_SUB    = 1,
116
116
        XFRM_POLICY_TYPE_MAX    = 2,
117
117
        XFRM_POLICY_TYPE_ANY    = 255
118
118
};
119
119
 
120
 
enum
121
 
{
 
120
enum {
122
121
        XFRM_POLICY_IN  = 0,
123
122
        XFRM_POLICY_OUT = 1,
124
123
        XFRM_POLICY_FWD = 2,
126
125
        XFRM_POLICY_MAX = 3
127
126
};
128
127
 
129
 
enum
130
 
{
 
128
enum {
131
129
        XFRM_SHARE_ANY,         /* No limitations */
132
130
        XFRM_SHARE_SESSION,     /* For this session only */
133
131
        XFRM_SHARE_USER,        /* For this user only */
269
267
        XFRMA_ALG_COMP,         /* struct xfrm_algo */
270
268
        XFRMA_ENCAP,            /* struct xfrm_algo + struct xfrm_encap_tmpl */
271
269
        XFRMA_TMPL,             /* 1 or more struct xfrm_user_tmpl */
272
 
        XFRMA_SA,
273
 
        XFRMA_POLICY,
 
270
        XFRMA_SA,               /* struct xfrm_usersa_info  */
 
271
        XFRMA_POLICY,           /*struct xfrm_userpolicy_info */
274
272
        XFRMA_SEC_CTX,          /* struct xfrm_sec_ctx */
275
273
        XFRMA_LTIME_VAL,
276
274
        XFRMA_REPLAY_VAL,
278
276
        XFRMA_ETIMER_THRESH,
279
277
        XFRMA_SRCADDR,          /* xfrm_address_t */
280
278
        XFRMA_COADDR,           /* xfrm_address_t */
281
 
        XFRMA_LASTUSED,
 
279
        XFRMA_LASTUSED,         /* unsigned long  */
282
280
        XFRMA_POLICY_TYPE,      /* struct xfrm_userpolicy_type */
283
281
        XFRMA_MIGRATE,
284
282
        XFRMA_ALG_AEAD,         /* struct xfrm_algo_aead */
285
283
        XFRMA_KMADDRESS,        /* struct xfrm_user_kmaddress */
 
284
        XFRMA_ALG_AUTH_TRUNC,   /* struct xfrm_algo_auth */
 
285
        XFRMA_MARK,             /* struct xfrm_mark */
 
286
        XFRMA_TFCPAD,           /* __u32 */
286
287
        __XFRMA_MAX
287
288
 
288
289
#define XFRMA_MAX (__XFRMA_MAX - 1)
289
290
};
290
291
 
 
292
struct xfrm_mark {
 
293
        __u32           v; /* value */
 
294
        __u32           m; /* mask */
 
295
};
 
296
 
291
297
enum xfrm_sadattr_type_t {
292
298
        XFRMA_SAD_UNSPEC,
293
299
        XFRMA_SAD_CNT,