Merge tag 'xtensa-20180225' of git://github.com/jcmvbkbc/linux-xtensa
[cris-mirror.git] / include / uapi / linux / if_alg.h
blobbc2bcdec377b4b75738166b0b047a9c50d6a676d
1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2 /*
3 * if_alg: User-space algorithm interface
5 * Copyright (c) 2010 Herbert Xu <herbert@gondor.apana.org.au>
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the Free
9 * Software Foundation; either version 2 of the License, or (at your option)
10 * any later version.
14 #ifndef _LINUX_IF_ALG_H
15 #define _LINUX_IF_ALG_H
17 #include <linux/types.h>
19 struct sockaddr_alg {
20 __u16 salg_family;
21 __u8 salg_type[14];
22 __u32 salg_feat;
23 __u32 salg_mask;
24 __u8 salg_name[64];
27 struct af_alg_iv {
28 __u32 ivlen;
29 __u8 iv[0];
32 /* Socket options */
33 #define ALG_SET_KEY 1
34 #define ALG_SET_IV 2
35 #define ALG_SET_OP 3
36 #define ALG_SET_AEAD_ASSOCLEN 4
37 #define ALG_SET_AEAD_AUTHSIZE 5
39 /* Operations */
40 #define ALG_OP_DECRYPT 0
41 #define ALG_OP_ENCRYPT 1
43 #endif /* _LINUX_IF_ALG_H */