diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-07-27 22:15:01 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-07-27 22:15:01 +0000 |
commit | 7996a3d79d55b7f879dfd62e202bbfe2963718d3 (patch) | |
tree | 8d9f6759fec4099b9be503c11c7ed174f7204980 /libdde-linux26/libdde_linux26/contrib/include/net/ah.h | |
parent | 4fbe7358c7747a9165f776eb19addbb9baf7def2 (diff) |
really properly move files
Diffstat (limited to 'libdde-linux26/libdde_linux26/contrib/include/net/ah.h')
-rw-r--r-- | libdde-linux26/libdde_linux26/contrib/include/net/ah.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/libdde-linux26/libdde_linux26/contrib/include/net/ah.h b/libdde-linux26/libdde_linux26/contrib/include/net/ah.h deleted file mode 100644 index ae1c322f..00000000 --- a/libdde-linux26/libdde_linux26/contrib/include/net/ah.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef _NET_AH_H -#define _NET_AH_H - -#include <linux/crypto.h> -#include <net/xfrm.h> - -/* This is the maximum truncated ICV length that we know of. */ -#define MAX_AH_AUTH_LEN 12 - -struct ah_data -{ - u8 *work_icv; - int icv_full_len; - int icv_trunc_len; - - struct crypto_hash *tfm; -}; - -static inline int ah_mac_digest(struct ah_data *ahp, struct sk_buff *skb, - u8 *auth_data) -{ - struct hash_desc desc; - int err; - - desc.tfm = ahp->tfm; - desc.flags = 0; - - memset(auth_data, 0, ahp->icv_trunc_len); - err = crypto_hash_init(&desc); - if (unlikely(err)) - goto out; - err = skb_icv_walk(skb, &desc, 0, skb->len, crypto_hash_update); - if (unlikely(err)) - goto out; - err = crypto_hash_final(&desc, ahp->work_icv); - -out: - return err; -} - -struct ip_auth_hdr; - -static inline struct ip_auth_hdr *ip_auth_hdr(const struct sk_buff *skb) -{ - return (struct ip_auth_hdr *)skb_transport_header(skb); -} - -#endif |