#include <netinet/in.h>
-#define NETSRC_CTLNAME "com.apple.netsrc"
+#define NETSRC_CTLNAME "com.apple.netsrc"
-#define NETSRC_VERSION1 1
-#define NETSRC_VERSION2 2
-#define NETSRC_CURVERS NETSRC_VERSION2
+#define NETSRC_VERSION1 1
+#define NETSRC_VERSION2 2
+#define NETSRC_CURVERS NETSRC_VERSION2
struct netsrc_req {
unsigned int nrq_ver;
};
};
-#define nrq_sin _usa.sin
-#define nrq_sin6 _usa.sin6
+#define nrq_sin _usa.sin
+#define nrq_sin6 _usa.sin6
struct netsrc_repv1 {
union {
union sockaddr_in_4_6 nrp_src;
union sockaddr_in_4_6 _usa;
};
-#define NETSRC_IP6_FLAG_TENTATIVE 0x0001
-#define NETSRC_IP6_FLAG_TEMPORARY 0x0002
-#define NETSRC_IP6_FLAG_DEPRECATED 0x0004
-#define NETSRC_IP6_FLAG_OPTIMISTIC 0x0008
-#define NETSRC_IP6_FLAG_SECURED 0x0010
+#define NETSRC_IP6_FLAG_TENTATIVE 0x0001
+#define NETSRC_IP6_FLAG_TEMPORARY 0x0002
+#define NETSRC_IP6_FLAG_DEPRECATED 0x0004
+#define NETSRC_IP6_FLAG_OPTIMISTIC 0x0008
+#define NETSRC_IP6_FLAG_SECURED 0x0010
uint16_t nrp_flags;
uint16_t nrp_label;
uint16_t nrp_precedence;
uint16_t nrp_dstlabel;
uint16_t nrp_dstprecedence;
- uint16_t nrp_unused; // Padding
+ uint16_t nrp_unused; // Padding
};
struct netsrc_repv2 {
uint32_t nrp_connection_attempts;
uint32_t nrp_connection_successes;
// Continues from above, fixes naming
-#define NETSRC_FLAG_IP6_TENTATIVE NETSRC_IP6_FLAG_TENTATIVE
-#define NETSRC_FLAG_IP6_TEMPORARY NETSRC_IP6_FLAG_TEMPORARY
-#define NETSRC_FLAG_IP6_DEPRECATED NETSRC_IP6_FLAG_DEPRECATED
-#define NETSRC_FLAG_IP6_OPTIMISTIC NETSRC_IP6_FLAG_OPTIMISTIC
-#define NETSRC_FLAG_IP6_SECURED NETSRC_IP6_FLAG_SECURED
-#define NETSRC_FLAG_ROUTEABLE 0x00000020
-#define NETSRC_FLAG_DIRECT 0x00000040
-#define NETSRC_FLAG_AWDL 0x00000080
-#define NETSRC_FLAG_IP6_DYNAMIC 0x00000100
-#define NETSRC_FLAG_IP6_AUTOCONF 0x00000200
+#define NETSRC_FLAG_IP6_TENTATIVE NETSRC_IP6_FLAG_TENTATIVE
+#define NETSRC_FLAG_IP6_TEMPORARY NETSRC_IP6_FLAG_TEMPORARY
+#define NETSRC_FLAG_IP6_DEPRECATED NETSRC_IP6_FLAG_DEPRECATED
+#define NETSRC_FLAG_IP6_OPTIMISTIC NETSRC_IP6_FLAG_OPTIMISTIC
+#define NETSRC_FLAG_IP6_SECURED NETSRC_IP6_FLAG_SECURED
+#define NETSRC_FLAG_ROUTEABLE 0x00000020
+#define NETSRC_FLAG_DIRECT 0x00000040
+#define NETSRC_FLAG_AWDL 0x00000080
+#define NETSRC_FLAG_IP6_DYNAMIC 0x00000100
+#define NETSRC_FLAG_IP6_AUTOCONF 0x00000200
uint32_t nrp_flags;
uint16_t nrp_label;
uint16_t nrp_precedence;
#define netsrc_rep netsrc_repv2
-#define nrp_sin nrp_src.sin
-#define nrp_sin6 nrp_src.sin6
+#define nrp_sin nrp_src.sin
+#define nrp_sin6 nrp_src.sin6
#ifdef KERNEL_PRIVATE
__private_extern__ void netsrc_init(void);