David Lebrun | bf355b8 | 2016-11-08 14:57:42 +0100 | [diff] [blame] | 1 | #ifndef _UAPI_LINUX_SEG6_HMAC_H |
| 2 | #define _UAPI_LINUX_SEG6_HMAC_H |
| 3 | |
David Lebrun | a50a05f | 2017-01-15 15:26:16 +0100 | [diff] [blame] | 4 | #include <linux/types.h> |
David Lebrun | bf355b8 | 2016-11-08 14:57:42 +0100 | [diff] [blame] | 5 | #include <linux/seg6.h> |
| 6 | |
| 7 | #define SEG6_HMAC_SECRET_LEN 64 |
| 8 | #define SEG6_HMAC_FIELD_LEN 32 |
| 9 | |
| 10 | struct sr6_tlv_hmac { |
| 11 | struct sr6_tlv tlvhdr; |
| 12 | __u16 reserved; |
| 13 | __be32 hmackeyid; |
| 14 | __u8 hmac[SEG6_HMAC_FIELD_LEN]; |
| 15 | }; |
| 16 | |
| 17 | enum { |
| 18 | SEG6_HMAC_ALGO_SHA1 = 1, |
| 19 | SEG6_HMAC_ALGO_SHA256 = 2, |
| 20 | }; |
| 21 | |
| 22 | #endif |