#ifndef _NETINET_IN_H_
#define _NETINET_IN_H_
+
+#ifndef DRIVERKIT
#include <sys/appleapiopts.h>
-#include <sys/_types.h>
#include <stdint.h> /* uint(8|16|32)_t */
#ifndef KERNEL
#include <Availability.h>
#endif
-#include <sys/_types/_in_addr_t.h>
+#else
+#include <sys/_types.h>
+#include <sys/_types/_sa_family_t.h>
+#endif /* DRIVERKIT */
+#include <sys/_types/_in_addr_t.h>
#include <sys/_types/_in_port_t.h>
+#ifndef DRIVERKIT
/*
* POSIX 1003.1-2003
* "Inclusion of the <netinet/in.h> header may also make visible all
* symbols from <inttypes.h> and <sys/socket.h>".
*/
#include <sys/socket.h>
+#endif /* DRIVERKIT */
/*
* The following two #includes insure htonl and family are defined
#define IPPROTO_ENCAP 98 /* encapsulation header */
#define IPPROTO_APES 99 /* any private encr. scheme */
#define IPPROTO_GMTP 100 /* GMTP*/
-/* 101-254: Partly Unassigned */
+/* 101-252: Partly Unassigned */
#define IPPROTO_PIM 103 /* Protocol Independent Mcast */
#define IPPROTO_IPCOMP 108 /* payload compression (IPComp) */
#define IPPROTO_PGM 113 /* PGM */
#define IPPROTO_SCTP 132 /* SCTP */
-/* 255: Reserved */
+/* 253-254: Experimentation and testing; 255: Reserved (RFC3692) */
/* BSD Private, local use, namespace incursion */
+#ifdef PRIVATE
+#define IPPROTO_QUIC 253 /* QUIC protocol (Over UDP) */
+#endif /* PRIVATE */
#define IPPROTO_DIVERT 254 /* divert pseudo-protocol */
#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
#define IPPROTO_RAW 255 /* raw IP packet */
#define IP_PKTINFO 26 /* get pktinfo on recv socket, set src on sent dgram */
#define IP_RECVPKTINFO IP_PKTINFO /* receive pktinfo w/dgram */
#define IP_RECVTOS 27 /* bool; receive IP TOS w/dgram */
+#define IP_DONTFRAG 28 /* don't fragment packet */
#define IP_FW_ADD 40 /* add a firewall rule to chain */
#define IP_FW_DEL 41 /* delete a firewall rule from chain */
#define MCAST_UNBLOCK_SOURCE 85 /* unblock a source */
#ifdef PRIVATE
-#define IP_FORCE_OUT_IFP 69 /* not implemented; use IP_BOUND_IF instead */
#define IP_NO_IFT_CELLULAR 6969 /* for internal use only */
#define IP_NO_IFT_PDP IP_NO_IFT_CELLULAR /* deprecated */
#define IP_OUT_IF 9696 /* for internal use only */
#define IP_MAX_SOCK_SRC_FILTER 128 /* sources per socket/group */
#define IP_MAX_SOCK_MUTE_FILTER 128 /* XXX no longer used */
+#ifndef PLATFORM_DriverKit
/*
* Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
*/
int getsourcefilter(int, uint32_t, struct sockaddr *, socklen_t,
uint32_t *, uint32_t *, struct sockaddr_storage *) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
#endif
+#endif /* PLATFORM_DriverKit */
/*
* Filter modes; also used to represent per-socket filter mode internally.
struct sockaddr_in sin;
struct sockaddr_in6 sin6;
};
-
#define CLAT46_HDR_EXPANSION_OVERHD (sizeof(struct ip6_hdr) - sizeof(struct ip))
/*
#endif /* PRIVATE */
+#ifndef PLATFORM_DriverKit
#ifdef KERNEL
#ifdef BSD_KERNEL_PRIVATE
#include <mach/boolean.h>
#define satosin(sa) SIN(sa)
#define sintosa(sin) ((struct sockaddr *)(void *)(sin))
#define SINIFSCOPE(s) ((struct sockaddr_inifscope *)(void *)(s))
+
+#define IPTOS_UNSPEC (-1) /* TOS byte not set */
+#define IPTOS_MASK 0xFF /* TOS byte mask */
#endif /* BSD_KERNEL_PRIVATE */
#ifdef KERNEL_PRIVATE
__END_DECLS
#endif
#endif /* !KERNEL */
+#endif /* PLATFORM_DriverKit */
#endif /* _NETINET_IN_H_ */