Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qnetworkinterface_uikit_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QNETWORKINTERFACE_UIKIT_P_H
6#define QNETWORKINTERFACE_UIKIT_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19// Platform SDK for iOS, tvOS and watchOS is missing those headers:
20// net/if_media.h, netinet/in_var.h, netinet6/in6_var.h This header is
21// a workaround, it provides missing macros and structs.
22
23// <net/if_media.h>:
24
25/*
26 * Ethernet
27 */
28#define IFM_ETHER 0x00000020
29/*
30 * FDDI
31 */
32#define IFM_FDDI 0x00000060
33/*
34 * IEEE 802.11 Wireless
35 */
36#define IFM_IEEE80211 0x00000080
37/*
38 * Masks
39 */
40#define IFM_NMASK 0x000000e0 /* Network type */
41/*
42 * Macros to extract various bits of information from the media word.
43 */
44#define IFM_TYPE(x) ((x) & IFM_NMASK)
45
46// <netinet6/in6_var.h>:
47
49 time_t ia6t_expire; /* valid lifetime expiration time */
50 time_t ia6t_preferred; /* preferred lifetime expiration time */
51 u_int32_t ia6t_vltime; /* valid lifetime */
52 u_int32_t ia6t_pltime; /* prefix lifetime */
53};
54
55/*
56 * IPv6 interface statistics, as defined in RFC2465 Ipv6IfStatsEntry (p12).
57 */
58struct in6_ifstat {
59 u_quad_t ifs6_in_receive; /* # of total input datagram */
60 u_quad_t ifs6_in_hdrerr; /* # of datagrams with invalid hdr */
61 u_quad_t ifs6_in_toobig; /* # of datagrams exceeded MTU */
62 u_quad_t ifs6_in_noroute; /* # of datagrams with no route */
63 u_quad_t ifs6_in_addrerr; /* # of datagrams with invalid dst */
64 u_quad_t ifs6_in_protounknown; /* # of datagrams with unknown proto */
65 /* NOTE: increment on final dst if */
66 u_quad_t ifs6_in_truncated; /* # of truncated datagrams */
67 u_quad_t ifs6_in_discard; /* # of discarded datagrams */
68 /* NOTE: fragment timeout is not here */
69 u_quad_t ifs6_in_deliver; /* # of datagrams delivered to ULP */
70 /* NOTE: increment on final dst if */
71 u_quad_t ifs6_out_forward; /* # of datagrams forwarded */
72 /* NOTE: increment on outgoing if */
73 u_quad_t ifs6_out_request; /* # of outgoing datagrams from ULP */
74 /* NOTE: does not include forwrads */
75 u_quad_t ifs6_out_discard; /* # of discarded datagrams */
76 u_quad_t ifs6_out_fragok; /* # of datagrams fragmented */
77 u_quad_t ifs6_out_fragfail; /* # of datagrams failed on fragment */
78 u_quad_t ifs6_out_fragcreat; /* # of fragment datagrams */
79 /* NOTE: this is # after fragment */
80 u_quad_t ifs6_reass_reqd; /* # of incoming fragmented packets */
81 /* NOTE: increment on final dst if */
82 u_quad_t ifs6_reass_ok; /* # of reassembled packets */
83 /* NOTE: this is # after reass */
84 /* NOTE: increment on final dst if */
85 u_quad_t ifs6_atmfrag_rcvd; /* # of atomic fragments received */
86 u_quad_t ifs6_reass_fail; /* # of reass failures */
87 /* NOTE: may not be packet count */
88 /* NOTE: increment on final dst if */
89 u_quad_t ifs6_in_mcast; /* # of inbound multicast datagrams */
90 u_quad_t ifs6_out_mcast; /* # of outbound multicast datagrams */
91
92 u_quad_t ifs6_cantfoward_icmp6; /* # of ICMPv6 packets received for unreachable dest */
93 u_quad_t ifs6_addr_expiry_cnt; /* # of address expiry events (excluding privacy addresses) */
94 u_quad_t ifs6_pfx_expiry_cnt; /* # of prefix expiry events */
95 u_quad_t ifs6_defrtr_expiry_cnt; /* # of default router expiry events */
96};
97
98/*
99 * ICMPv6 interface statistics, as defined in RFC2466 Ipv6IfIcmpEntry.
100 * XXX: I'm not sure if this file is the right place for this structure...
101 */
103 /*
104 * Input statistics
105 */
106 /* ipv6IfIcmpInMsgs, total # of input messages */
108 /* ipv6IfIcmpInErrors, # of input error messages */
110 /* ipv6IfIcmpInDestUnreachs, # of input dest unreach errors */
112 /* ipv6IfIcmpInAdminProhibs, # of input admin. prohibited errs */
114 /* ipv6IfIcmpInTimeExcds, # of input time exceeded errors */
116 /* ipv6IfIcmpInParmProblems, # of input parameter problem errors */
118 /* ipv6IfIcmpInPktTooBigs, # of input packet too big errors */
120 /* ipv6IfIcmpInEchos, # of input echo requests */
122 /* ipv6IfIcmpInEchoReplies, # of input echo replies */
124 /* ipv6IfIcmpInRouterSolicits, # of input router solicitations */
126 /* ipv6IfIcmpInRouterAdvertisements, # of input router advertisements */
128 /* ipv6IfIcmpInNeighborSolicits, # of input neighbor solicitations */
130 /* ipv6IfIcmpInNeighborAdvertisements, # of input neighbor advs. */
132 /* ipv6IfIcmpInRedirects, # of input redirects */
134 /* ipv6IfIcmpInGroupMembQueries, # of input MLD queries */
136 /* ipv6IfIcmpInGroupMembResponses, # of input MLD reports */
138 /* ipv6IfIcmpInGroupMembReductions, # of input MLD done */
140
141 /*
142 * Output statistics. We should solve unresolved routing problem...
143 */
144 /* ipv6IfIcmpOutMsgs, total # of output messages */
146 /* ipv6IfIcmpOutErrors, # of output error messages */
148 /* ipv6IfIcmpOutDestUnreachs, # of output dest unreach errors */
150 /* ipv6IfIcmpOutAdminProhibs, # of output admin. prohibited errs */
152 /* ipv6IfIcmpOutTimeExcds, # of output time exceeded errors */
154 /* ipv6IfIcmpOutParmProblems, # of output parameter problem errors */
156 /* ipv6IfIcmpOutPktTooBigs, # of output packet too big errors */
158 /* ipv6IfIcmpOutEchos, # of output echo requests */
160 /* ipv6IfIcmpOutEchoReplies, # of output echo replies */
162 /* ipv6IfIcmpOutRouterSolicits, # of output router solicitations */
164 /* ipv6IfIcmpOutRouterAdvertisements, # of output router advs. */
166 /* ipv6IfIcmpOutNeighborSolicits, # of output neighbor solicitations */
168 /* ipv6IfIcmpOutNeighborAdvertisements, # of output neighbor advs. */
170 /* ipv6IfIcmpOutRedirects, # of output redirects */
172 /* ipv6IfIcmpOutGroupMembQueries, # of output MLD queries */
174 /* ipv6IfIcmpOutGroupMembResponses, # of output MLD reports */
176 /* ipv6IfIcmpOutGroupMembReductions, # of output MLD done */
178};
179
180#define SCOPE6_ID_MAX 16
181
198
199#define IN6_IFF_TEMPORARY 0x0080 /* temporary (anonymous) address. */
200#define IN6_IFF_DEPRECATED 0x0010 /* deprecated address */
201
202#define SIOCGIFAFLAG_IN6 _IOWR('i', 73, struct in6_ifreq)
203#define SIOCGIFALIFETIME_IN6 _IOWR('i', 81, struct in6_ifreq)
204
205#endif // QNETWORKINTERFACE_UIKIT_P_H
#define SCOPE6_ID_MAX
#define IFM_NMASK
struct sockaddr_in6 ifru_addr
u_int32_t ifru_scope_id[SCOPE6_ID_MAX]
struct icmp6_ifstat ifru_icmp6stat
struct in6_ifstat ifru_stat
char ifr_name[IFNAMSIZ]
struct in6_addrlifetime ifru_lifetime
struct sockaddr_in6 ifru_dstaddr