blob: d58451331dbde8a0d9b4231a61bd4957f62cdeec [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _NET_ESP_H
2#define _NET_ESP_H
3
Herbert Xu38320c72008-01-28 19:35:05 -08004#include <linux/skbuff.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07005
Herbert Xu38320c72008-01-28 19:35:05 -08006struct crypto_aead;
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
Herbert Xu38320c72008-01-28 19:35:05 -08008struct esp_data {
9 /* 0..255 */
10 int padlen;
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
Herbert Xu38320c72008-01-28 19:35:05 -080012 /* Confidentiality & Integrity */
13 struct crypto_aead *aead;
Linus Torvalds1da177e2005-04-16 15:20:36 -070014};
15
Linus Torvalds1da177e2005-04-16 15:20:36 -070016extern void *pskb_put(struct sk_buff *skb, struct sk_buff *tail, int len);
17
Herbert Xu87bdc482007-10-10 15:45:25 -070018struct ip_esp_hdr;
19
20static inline struct ip_esp_hdr *ip_esp_hdr(const struct sk_buff *skb)
21{
22 return (struct ip_esp_hdr *)skb_transport_header(skb);
23}
24
Linus Torvalds1da177e2005-04-16 15:20:36 -070025#endif