![Dmitry V. Levin](/assets/img/avatar_default.png)
Include <linux/in6.h> in uapi/linux/seg6.h to fix the following
linux/seg6.h userspace compilation error:
/usr/include/linux/seg6.h:31:18: error: array type has incomplete element type 'struct in6_addr'
struct in6_addr segments[0];
Include <linux/seg6.h> in uapi/linux/seg6_iptunnel.h to fix
the following linux/seg6_iptunnel.h userspace compilation error:
/usr/include/linux/seg6_iptunnel.h:26:21: error: array type has incomplete element type 'struct ipv6_sr_hdr'
struct ipv6_sr_hdr srh[0];
Fixes: a50a05f497
("ipv6: sr: add missing Kbuild export for header files")
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
55 lines
1.1 KiB
C
55 lines
1.1 KiB
C
/*
|
|
* SR-IPv6 implementation
|
|
*
|
|
* Author:
|
|
* David Lebrun <david.lebrun@uclouvain.be>
|
|
*
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*/
|
|
|
|
#ifndef _UAPI_LINUX_SEG6_H
|
|
#define _UAPI_LINUX_SEG6_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/in6.h> /* For struct in6_addr. */
|
|
|
|
/*
|
|
* SRH
|
|
*/
|
|
struct ipv6_sr_hdr {
|
|
__u8 nexthdr;
|
|
__u8 hdrlen;
|
|
__u8 type;
|
|
__u8 segments_left;
|
|
__u8 first_segment;
|
|
__u8 flags;
|
|
__u16 reserved;
|
|
|
|
struct in6_addr segments[0];
|
|
};
|
|
|
|
#define SR6_FLAG1_PROTECTED (1 << 6)
|
|
#define SR6_FLAG1_OAM (1 << 5)
|
|
#define SR6_FLAG1_ALERT (1 << 4)
|
|
#define SR6_FLAG1_HMAC (1 << 3)
|
|
|
|
#define SR6_TLV_INGRESS 1
|
|
#define SR6_TLV_EGRESS 2
|
|
#define SR6_TLV_OPAQUE 3
|
|
#define SR6_TLV_PADDING 4
|
|
#define SR6_TLV_HMAC 5
|
|
|
|
#define sr_has_hmac(srh) ((srh)->flags & SR6_FLAG1_HMAC)
|
|
|
|
struct sr6_tlv {
|
|
__u8 type;
|
|
__u8 len;
|
|
__u8 data[0];
|
|
};
|
|
|
|
#endif
|