diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/Kbuild | 1 | ||||
| -rw-r--r-- | include/linux/if_alg.h | 40 | ||||
| -rw-r--r-- | include/linux/socket.h | 5 |
3 files changed, 45 insertions, 1 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index d1580c17cab3..2296d8b1931f 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -158,6 +158,7 @@ header-y += icmpv6.h | |||
| 158 | header-y += if.h | 158 | header-y += if.h |
| 159 | header-y += if_addr.h | 159 | header-y += if_addr.h |
| 160 | header-y += if_addrlabel.h | 160 | header-y += if_addrlabel.h |
| 161 | header-y += if_alg.h | ||
| 161 | header-y += if_arcnet.h | 162 | header-y += if_arcnet.h |
| 162 | header-y += if_arp.h | 163 | header-y += if_arp.h |
| 163 | header-y += if_bonding.h | 164 | header-y += if_bonding.h |
diff --git a/include/linux/if_alg.h b/include/linux/if_alg.h new file mode 100644 index 000000000000..0f9acce5b1ff --- /dev/null +++ b/include/linux/if_alg.h | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | /* | ||
| 2 | * if_alg: User-space algorithm interface | ||
| 3 | * | ||
| 4 | * Copyright (c) 2010 Herbert Xu <herbert@gondor.apana.org.au> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify it | ||
| 7 | * under the terms of the GNU General Public License as published by the Free | ||
| 8 | * Software Foundation; either version 2 of the License, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef _LINUX_IF_ALG_H | ||
| 14 | #define _LINUX_IF_ALG_H | ||
| 15 | |||
| 16 | #include <linux/types.h> | ||
| 17 | |||
| 18 | struct sockaddr_alg { | ||
| 19 | __u16 salg_family; | ||
| 20 | __u8 salg_type[14]; | ||
| 21 | __u32 salg_feat; | ||
| 22 | __u32 salg_mask; | ||
| 23 | __u8 salg_name[64]; | ||
| 24 | }; | ||
| 25 | |||
| 26 | struct af_alg_iv { | ||
| 27 | __u32 ivlen; | ||
| 28 | __u8 iv[0]; | ||
| 29 | }; | ||
| 30 | |||
| 31 | /* Socket options */ | ||
| 32 | #define ALG_SET_KEY 1 | ||
| 33 | #define ALG_SET_IV 2 | ||
| 34 | #define ALG_SET_OP 3 | ||
| 35 | |||
| 36 | /* Operations */ | ||
| 37 | #define ALG_OP_DECRYPT 0 | ||
| 38 | #define ALG_OP_ENCRYPT 1 | ||
| 39 | |||
| 40 | #endif /* _LINUX_IF_ALG_H */ | ||
diff --git a/include/linux/socket.h b/include/linux/socket.h index 5f65f14c4f44..edbb1d07ddf4 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -191,7 +191,8 @@ struct ucred { | |||
| 191 | #define AF_PHONET 35 /* Phonet sockets */ | 191 | #define AF_PHONET 35 /* Phonet sockets */ |
| 192 | #define AF_IEEE802154 36 /* IEEE802154 sockets */ | 192 | #define AF_IEEE802154 36 /* IEEE802154 sockets */ |
| 193 | #define AF_CAIF 37 /* CAIF sockets */ | 193 | #define AF_CAIF 37 /* CAIF sockets */ |
| 194 | #define AF_MAX 38 /* For now.. */ | 194 | #define AF_ALG 38 /* Algorithm sockets */ |
| 195 | #define AF_MAX 39 /* For now.. */ | ||
| 195 | 196 | ||
| 196 | /* Protocol families, same as address families. */ | 197 | /* Protocol families, same as address families. */ |
| 197 | #define PF_UNSPEC AF_UNSPEC | 198 | #define PF_UNSPEC AF_UNSPEC |
| @@ -232,6 +233,7 @@ struct ucred { | |||
| 232 | #define PF_PHONET AF_PHONET | 233 | #define PF_PHONET AF_PHONET |
| 233 | #define PF_IEEE802154 AF_IEEE802154 | 234 | #define PF_IEEE802154 AF_IEEE802154 |
| 234 | #define PF_CAIF AF_CAIF | 235 | #define PF_CAIF AF_CAIF |
| 236 | #define PF_ALG AF_ALG | ||
| 235 | #define PF_MAX AF_MAX | 237 | #define PF_MAX AF_MAX |
| 236 | 238 | ||
| 237 | /* Maximum queue length specifiable by listen. */ | 239 | /* Maximum queue length specifiable by listen. */ |
| @@ -305,6 +307,7 @@ struct ucred { | |||
| 305 | #define SOL_RDS 276 | 307 | #define SOL_RDS 276 |
| 306 | #define SOL_IUCV 277 | 308 | #define SOL_IUCV 277 |
| 307 | #define SOL_CAIF 278 | 309 | #define SOL_CAIF 278 |
| 310 | #define SOL_ALG 279 | ||
| 308 | 311 | ||
| 309 | /* IPX options */ | 312 | /* IPX options */ |
| 310 | #define IPX_TYPE 1 | 313 | #define IPX_TYPE 1 |
