From 25f24c2743711e6c2baaa821c950a206a67fad95 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 9 Nov 2018 11:46:47 -0600 Subject: [PATCH] include/netinet/in.h: Add Linux IP_PKTINFO and IPV6_PKTINFO definitions, but not yet realized. --- include/netinet/in.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/netinet/in.h b/include/netinet/in.h index 4136e5ac6c..e4d578f221 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -116,6 +116,8 @@ #define IP_MULTICAST_ALL (__SO_PROTOCOL + 11) /* Modify the delivery policy * of multicast messages bound * to INADDR_ANY */ +#define IP_PKTINFO (__SO_PROTOCOL + 12) /* Get some information about + * the incoming packet */ /* SOL_IPV6 protocol-level socket options. */ @@ -130,6 +132,8 @@ #define IPV6_UNICAST_HOPS (__SO_PROTOCOL + 6) /* Unicast hop limit */ #define IPV6_V6ONLY (__SO_PROTOCOL + 7) /* Restrict AF_INET6 socket * to IPv6 communications only */ +#define IPV6_PKTINFO (__SO_PROTOCOL + 8) /* Get some information about + * the incoming packet */ /* Values used with SIOCSIFMCFILTER and SIOCGIFMCFILTER ioctl's */ @@ -251,6 +255,13 @@ struct ip_msfilter struct in_addr imsf_slist[1]; /* Array of source addresses */ }; +struct in_pktinfo +{ + int ipi_ifindex; /* Interface index */ + struct in_addr ipi_spec_dst; /* Local address */ + struct in_addr ipi_addr; /* Header Destination address */ +}; + /* IPv6 Internet address */ struct in6_addr @@ -280,6 +291,12 @@ struct ipv6_mreq unsigned int ipv6mr_interface; /* Local interface index */ }; +struct in6_pktinfo +{ + struct in6_addr ipi6_addr; /* src/dst IPv6 address */ + int ipi6_ifindex; /* send/recv interface index */ +}; + /**************************************************************************** * Public Data ****************************************************************************/