[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/LWIP PATCH 3/3] netinet/in.h: Add several missing IPV6 & IP defines and structures


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Vlad-Andrei BĂDOIU <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Date: Tue, 31 Mar 2020 17:39:47 +0300
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stud.acs.upb.ro; dmarc=pass action=none header.from=stud.acs.upb.ro; dkim=pass header.d=stud.acs.upb.ro; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Kf03DOUm6EFu7/s7gmOndIMJPYBCB6CxVjXEs5L+leY=; b=oFqdGCZjoqqIqIvSLIpAdajTTJIHoU1zHcOZM8wNy6dRR1FY6i2GMX6+7J7lqVew5HJamrX2018bvf8klmhrh+Qzw4laeOCLw7Kum0mXBFbqULzQR+htActNlbXxJTt6FiaYqvX1w1AbgmbXbO4onswDsArUxBSldbm0atIyjGjYy8D8pvkGtyVxPBdRcUaDayFum155bz5R7/tQoZDCLeluyzV8csDmJJJZmiwVJeUOWEZX9UjxSyFtdLjvxVT0qLZAPJQ5n7rDojz9rvdk1iG07flCroVGGuMOB/rrRUOyv2mL/kB3VjUSjH9Na8phdsXo0V0/5gchGqxCrk0b2A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F6APnQ3T0J17GELxrjvRTj5fJinZm5pnP6XqA8zzxvJXeGbH/cODDYWo61mR2S58fjMoyz543RQqQQ7PvIRYkC68+856MgGoGMsBJKhiy3KFjR18fWimwdO3KkKJHJ36eDXTvUppxGLhlG7jyPpjBqxP56jSKa6uwNQmc945BDmkS2NsGM7ntWWQP3vhJ+bpzHa57rrmZprC0Jv7WAUWxD891AUp0Pg0XXmGll5EVTkc6CHMi0aOb1JobWfBpzurG3AJvgOWF1aUofw2qjHBw9XrZK7UgJcBbvz9lgDxj3aVihzvCvUXcjcivfKtvmFpwn0nxUDEnDR7HYVWCzrcbQ==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vlad_andrei.badoiu@xxxxxxxxxxxxxxx;
  • Cc: felipe.huici@xxxxxxxxx, Vlad-Andrei BĂDOIU <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 31 Mar 2020 14:40:13 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

Our in.h header is missing several defines and structures. We
import their definition from musl.

Signed-off-by: Vlad-Andrei BĂDOIU <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
---
 include/netinet/in.h | 112 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 111 insertions(+), 1 deletion(-)

diff --git a/include/netinet/in.h b/include/netinet/in.h
index 18ee075..00d7fd4 100644
--- a/include/netinet/in.h
+++ b/include/netinet/in.h
@@ -2,7 +2,6 @@
 #define _NETINET_IN_H_
 
 #include <uk/config.h>
-
 #ifdef CONFIG_LWIP_SOCKET
 #include <lwip/sockets.h>
 /* Taken from musl's netinet/in.h */
@@ -17,6 +16,104 @@
 #include_next <netinet/in.h>
 #endif
 
+#define IP_ADD_SOURCE_MEMBERSHIP  39 
+#define IP_DROP_SOURCE_MEMBERSHIP 40
+
+#define MCAST_JOIN_GROUP   42
+#define MCAST_BLOCK_SOURCE 43
+#define MCAST_UNBLOCK_SOURCE      44
+#define MCAST_LEAVE_GROUP  45
+#define MCAST_JOIN_SOURCE_GROUP   46
+#define MCAST_LEAVE_SOURCE_GROUP  47
+#define MCAST_MSFILTER     48
+
+struct ip_mreq_source {
+       struct in_addr imr_multiaddr;
+       struct in_addr imr_interface;
+       struct in_addr imr_sourceaddr;
+};
+
+struct group_source_req {
+       uint32_t gsr_interface;
+       struct sockaddr_storage gsr_group;
+       struct sockaddr_storage gsr_source;
+};
+
+
+#ifdef CONFIG_LWIP_IPV6
+#define IPV6_ADDRFORM           1
+#define IPV6_2292PKTINFO        2
+#define IPV6_2292HOPOPTS        3
+#define IPV6_2292DSTOPTS        4
+#define IPV6_2292RTHDR          5
+#define IPV6_2292PKTOPTIONS     6
+#define IPV6_CHECKSUM           7
+#define IPV6_2292HOPLIMIT       8
+#define IPV6_NEXTHOP            9
+#define IPV6_AUTHHDR            10
+#define IPV6_UNICAST_HOPS       16
+#define IPV6_MULTICAST_IF       17
+#define IPV6_MULTICAST_HOPS     18
+#define IPV6_MULTICAST_LOOP     19
+#define IPV6_ROUTER_ALERT       22
+#define IPV6_MTU_DISCOVER       23
+#define IPV6_MTU                24
+#define IPV6_RECVERR            25
+#define IPV6_JOIN_ANYCAST       27
+#define IPV6_LEAVE_ANYCAST      28
+#define IPV6_MULTICAST_ALL      29
+#define IPV6_ROUTER_ALERT_ISOLATE 30
+#define IPV6_IPSEC_POLICY       34
+#define IPV6_XFRM_POLICY        35
+#define IPV6_HDRINCL            36
+
+#define IPV6_RECVPKTINFO        49
+#define IPV6_PKTINFO            50
+#define IPV6_RECVHOPLIMIT       51
+#define IPV6_HOPLIMIT           52
+#define IPV6_RECVHOPOPTS        53
+#define IPV6_HOPOPTS            54
+#define IPV6_RTHDRDSTOPTS       55
+#define IPV6_RECVRTHDR          56
+#define IPV6_RTHDR              57
+#define IPV6_RECVDSTOPTS        58
+#define IPV6_DSTOPTS            59
+#define IPV6_RECVPATHMTU        60
+#define IPV6_PATHMTU            61
+#define IPV6_DONTFRAG           62
+#define IPV6_RECVTCLASS         66
+#define IPV6_TCLASS             67
+#define IPV6_AUTOFLOWLABEL      70
+#define IPV6_ADDR_PREFERENCES   72
+#define IPV6_MINHOPCOUNT        73
+#define IPV6_ORIGDSTADDR        74
+#define IPV6_RECVORIGDSTADDR    IPV6_ORIGDSTADDR
+#define IPV6_TRANSPARENT        75
+#define IPV6_UNICAST_IF         76
+#define IPV6_RECVFRAGSIZE       77
+#define IPV6_FREEBIND           78
+
+#define IPV6_PMTUDISC_DONT      0
+#define IPV6_PMTUDISC_WANT      1
+#define IPV6_PMTUDISC_DO        2
+#define IPV6_PMTUDISC_PROBE     3
+#define IPV6_PMTUDISC_INTERFACE 4
+#define IPV6_PMTUDISC_OMIT      5
+
+#define IPV6_PREFER_SRC_TMP            0x0001
+#define IPV6_PREFER_SRC_PUBLIC         0x0002
+#define IPV6_PREFER_SRC_PUBTMP_DEFAULT 0x0100
+#define IPV6_PREFER_SRC_COA            0x0004
+#define IPV6_PREFER_SRC_HOME           0x0400
+#define IPV6_PREFER_SRC_CGA            0x0008
+#define IPV6_PREFER_SRC_NONCGA         0x0800
+
+#define IPV6_RTHDR_LOOSE        0
+#define IPV6_RTHDR_STRICT       1
+
+#define IPV6_RTHDR_TYPE_0       0
+#endif
+
 #define IN6_IS_ADDR_UNSPECIFIED(a) \
         (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && \
          ((uint32_t *) (a))[2] == 0 && ((uint32_t *) (a))[3] == 0)
@@ -68,4 +165,17 @@ struct ip_mreqn {
 };
 #endif /* defined(_GNU_SOURCE) || defined(_BSD_SOURCE) */
 
+
+#ifdef CONFIG_LWIP_IPV6
+struct in6_pktinfo {
+       struct in6_addr ipi6_addr;
+       unsigned ipi6_ifindex;
+};
+
+struct ip6_mtuinfo {
+       struct sockaddr_in6 ip6m_addr;
+       uint32_t ip6m_mtu;
+};
+#endif
+
 #endif /* _NETINET_IN_H_ */
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.