blob: be1cf7291d6cf65a7196bd43a6f81b703647d90f [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#ifndef _LINUX_ERRQUEUE_H
3#define _LINUX_ERRQUEUE_H 1
4
Linus Torvalds1da177e2005-04-16 15:20:36 -07005
Linus Torvalds1da177e2005-04-16 15:20:36 -07006#include <net/ip.h>
Eric Dumazetdfd56b82011-12-10 09:48:31 +00007#if IS_ENABLED(CONFIG_IPV6)
Linus Torvalds1da177e2005-04-16 15:20:36 -07008#include <linux/ipv6.h>
9#endif
David Howells607ca462012-10-13 10:46:48 +010010#include <uapi/linux/errqueue.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
12#define SKB_EXT_ERR(skb) ((struct sock_exterr_skb *) ((skb)->cb))
13
Eric Dumazetd94d9fe2009-11-04 09:50:58 -080014struct sock_exterr_skb {
Linus Torvalds1da177e2005-04-16 15:20:36 -070015 union {
16 struct inet_skb_parm h4;
Eric Dumazetdfd56b82011-12-10 09:48:31 +000017#if IS_ENABLED(CONFIG_IPV6)
Linus Torvalds1da177e2005-04-16 15:20:36 -070018 struct inet6_skb_parm h6;
19#endif
20 } header;
21 struct sock_extended_err ee;
22 u16 addr_offset;
Al Virob4063132006-09-27 18:34:02 -070023 __be16 port;
Soheil Hassas Yeganeh4ef1b282017-03-18 17:03:00 -040024 u8 opt_stats:1,
25 unused:7;
Linus Torvalds1da177e2005-04-16 15:20:36 -070026};
27
28#endif