| 1 |
// Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_illumos_amd64.go -pkgname in', DO NOT EDIT. |
| 2 |
|
| 3 |
package in |
| 4 |
|
| 5 |
import ( |
| 6 |
"math" |
| 7 |
"reflect" |
| 8 |
"sync/atomic" |
| 9 |
"unsafe" |
| 10 |
) |
| 11 |
|
| 12 |
var _ = math.Pi |
| 13 |
var _ reflect.Kind |
| 14 |
var _ atomic.Value |
| 15 |
var _ unsafe.Pointer |
| 16 |
|
| 17 |
const ( |
| 18 |
CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1: |
| 19 |
CLOCK_HIGHRES = 4 // time_impl.h:126:1: |
| 20 |
CLOCK_MONOTONIC = 4 // time_impl.h:124:1: |
| 21 |
CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1: |
| 22 |
CLOCK_PROF = 2 // time_impl.h:127:1: |
| 23 |
CLOCK_REALTIME = 3 // time_impl.h:123:1: |
| 24 |
CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1: |
| 25 |
CLOCK_VIRTUAL = 1 // time_impl.h:121:1: |
| 26 |
DST_AUST = 2 // time.h:115:1: |
| 27 |
DST_AUSTALT = 10 // time.h:123:1: |
| 28 |
DST_CAN = 6 // time.h:119:1: |
| 29 |
DST_EET = 5 // time.h:118:1: |
| 30 |
DST_GB = 7 // time.h:120:1: |
| 31 |
DST_MET = 4 // time.h:117:1: |
| 32 |
DST_NONE = 0 // time.h:113:1: |
| 33 |
DST_RUM = 8 // time.h:121:1: |
| 34 |
DST_TUR = 9 // time.h:122:1: |
| 35 |
DST_USA = 1 // time.h:114:1: |
| 36 |
DST_WET = 3 // time.h:116:1: |
| 37 |
FD_SETSIZE = 65536 // select.h:88:1: |
| 38 |
IMPLINK_HIGHEXPER = 158 // in.h:284:1: |
| 39 |
IMPLINK_IP = 155 // in.h:282:1: |
| 40 |
IMPLINK_LOWEXPER = 156 // in.h:283:1: |
| 41 |
INADDR_6TO4RRANYCAST = 0xc0586301 // in.h:392:1: |
| 42 |
INADDR_ALLHOSTS_GROUP = 0xe0000001 // in.h:372:1: |
| 43 |
INADDR_ALLRPTS_GROUP = 0xe0000016 // in.h:374:1: |
| 44 |
INADDR_ALLRTRS_GROUP = 0xe0000002 // in.h:373:1: |
| 45 |
INADDR_ANY = 0x00000000 // in.h:366:1: |
| 46 |
INADDR_BROADCAST = 0xffffffff // in.h:368:1: |
| 47 |
INADDR_LOOPBACK = 0x7F000001 // in.h:367:1: |
| 48 |
INADDR_MAX_LOCAL_GROUP = 0xe00000ff // in.h:375:1: |
| 49 |
INADDR_NONE = 0xffffffff // in.h:369:1: |
| 50 |
INADDR_UNSPEC_GROUP = 0xe0000000 // in.h:371:1: |
| 51 |
INET6_ADDRSTRLEN = 46 // in.h:1212:1: |
| 52 |
INET_ADDRSTRLEN = 16 // in.h:1210:1: |
| 53 |
IN_AUTOCONF_MASK = 0xffff0000 // in.h:379:1: |
| 54 |
IN_AUTOCONF_NET = 0xa9fe0000 // in.h:378:1: |
| 55 |
IN_CLASSA_HOST = 0x00ffffff // in.h:332:1: |
| 56 |
IN_CLASSA_MAX = 128 // in.h:333:1: |
| 57 |
IN_CLASSA_NET = 0xff000000 // in.h:330:1: |
| 58 |
IN_CLASSA_NSHIFT = 24 // in.h:331:1: |
| 59 |
IN_CLASSB_HOST = 0x0000ffff // in.h:338:1: |
| 60 |
IN_CLASSB_MAX = 65536 // in.h:339:1: |
| 61 |
IN_CLASSB_NET = 0xffff0000 // in.h:336:1: |
| 62 |
IN_CLASSB_NSHIFT = 16 // in.h:337:1: |
| 63 |
IN_CLASSC_HOST = 0x000000ff // in.h:344:1: |
| 64 |
IN_CLASSC_NET = 0xffffff00 // in.h:342:1: |
| 65 |
IN_CLASSC_NSHIFT = 8 // in.h:343:1: |
| 66 |
IN_CLASSD_HOST = 0x0fffffff // in.h:349:1: |
| 67 |
IN_CLASSD_NET = 0xf0000000 // in.h:347:1: |
| 68 |
IN_CLASSD_NSHIFT = 28 // in.h:348:1: |
| 69 |
IN_CLASSE_NET = 0xffffffff // in.h:352:1: |
| 70 |
IN_LOOPBACKNET = 127 // in.h:395:1: |
| 71 |
IN_PRIVATE12_MASK = 0xfff00000 // in.h:383:1: |
| 72 |
IN_PRIVATE12_NET = 0xac100000 // in.h:382:1: |
| 73 |
IN_PRIVATE16_MASK = 0xffff0000 // in.h:385:1: |
| 74 |
IN_PRIVATE16_NET = 0xc0a80000 // in.h:384:1: |
| 75 |
IN_PRIVATE8_MASK = 0xff000000 // in.h:381:1: |
| 76 |
IN_PRIVATE8_NET = 0x0a000000 // in.h:380:1: |
| 77 |
IPPORT_BIFFUDP = 512 // in.h:250:1: |
| 78 |
IPPORT_BOOTPC = 68 // in.h:214:1: |
| 79 |
IPPORT_BOOTPS = 67 // in.h:213:1: |
| 80 |
IPPORT_CHARGEN = 19 // in.h:199:1: |
| 81 |
IPPORT_CMDSERVER = 514 // in.h:243:1: |
| 82 |
IPPORT_DAYTIME = 13 // in.h:197:1: |
| 83 |
IPPORT_DHCPV6C = 546 // in.h:260:1: |
| 84 |
IPPORT_DHCPV6S = 547 // in.h:261:1: |
| 85 |
IPPORT_DISCARD = 9 // in.h:195:1: |
| 86 |
IPPORT_DOMAIN = 53 // in.h:206:1: |
| 87 |
IPPORT_ECHO = 7 // in.h:194:1: |
| 88 |
IPPORT_EFSSERVER = 520 // in.h:245:1: |
| 89 |
IPPORT_EXECSERVER = 512 // in.h:241:1: |
| 90 |
IPPORT_FINGER = 79 // in.h:217:1: |
| 91 |
IPPORT_FTP = 21 // in.h:200:1: |
| 92 |
IPPORT_HTTP = 80 // in.h:218:1: |
| 93 |
IPPORT_HTTP_ALT = 8080 // in.h:219:1: |
| 94 |
IPPORT_IKE = 500 // in.h:235:1: |
| 95 |
IPPORT_IKE_NATT = 4500 // in.h:236:1: |
| 96 |
IPPORT_LDAP = 389 // in.h:226:1: |
| 97 |
IPPORT_LOGINSERVER = 513 // in.h:242:1: |
| 98 |
IPPORT_MDNS = 5353 // in.h:207:1: |
| 99 |
IPPORT_MIP = 434 // in.h:228:1: |
| 100 |
IPPORT_MTP = 57 // in.h:208:1: |
| 101 |
IPPORT_NAMESERVER = 42 // in.h:204:1: |
| 102 |
IPPORT_NETBIOS_DGM = 138 // in.h:224:1: |
| 103 |
IPPORT_NETBIOS_NS = 137 // in.h:223:1: |
| 104 |
IPPORT_NETBIOS_SSN = 139 // in.h:225:1: |
| 105 |
IPPORT_NETSTAT = 15 // in.h:198:1: |
| 106 |
IPPORT_NTP = 123 // in.h:222:1: |
| 107 |
IPPORT_PRINTER = 515 // in.h:244:1: |
| 108 |
IPPORT_RESERVED = 1024 // in.h:271:1: |
| 109 |
IPPORT_RIPNG = 521 // in.h:255:1: |
| 110 |
IPPORT_RJE = 77 // in.h:216:1: |
| 111 |
IPPORT_ROUTESERVER = 520 // in.h:254:1: |
| 112 |
IPPORT_SLP = 427 // in.h:227:1: |
| 113 |
IPPORT_SMB = 445 // in.h:229:1: |
| 114 |
IPPORT_SMTP = 25 // in.h:202:1: |
| 115 |
IPPORT_SOCKS = 1080 // in.h:263:1: |
| 116 |
IPPORT_SUPDUP = 95 // in.h:221:1: |
| 117 |
IPPORT_SYSLOG = 514 // in.h:252:1: |
| 118 |
IPPORT_SYSTAT = 11 // in.h:196:1: |
| 119 |
IPPORT_TALK = 517 // in.h:253:1: |
| 120 |
IPPORT_TELNET = 23 // in.h:201:1: |
| 121 |
IPPORT_TFTP = 69 // in.h:215:1: |
| 122 |
IPPORT_TIMESERVER = 37 // in.h:203:1: |
| 123 |
IPPORT_TTYLINK = 87 // in.h:220:1: |
| 124 |
IPPORT_USERRESERVED = 5000 // in.h:272:1: |
| 125 |
IPPORT_VXLAN = 4789 // in.h:230:1: |
| 126 |
IPPORT_WHOIS = 43 // in.h:205:1: |
| 127 |
IPPORT_WHOSERVER = 513 // in.h:251:1: |
| 128 |
IPPROTO_AH = 51 // in.h:169:1: |
| 129 |
IPPROTO_DSTOPTS = 60 // in.h:172:1: |
| 130 |
IPPROTO_EGP = 8 // in.h:160:1: |
| 131 |
IPPROTO_ENCAP = 4 // in.h:158:1: |
| 132 |
IPPROTO_EON = 80 // in.h:175:1: |
| 133 |
IPPROTO_ESP = 50 // in.h:168:1: |
| 134 |
IPPROTO_FRAGMENT = 44 // in.h:166:1: |
| 135 |
IPPROTO_GGP = 3 // in.h:157:1: |
| 136 |
IPPROTO_HELLO = 63 // in.h:173:1: |
| 137 |
IPPROTO_HOPOPTS = 0 // in.h:154:1: |
| 138 |
IPPROTO_ICMP = 1 // in.h:155:1: |
| 139 |
IPPROTO_ICMPV6 = 58 // in.h:170:1: |
| 140 |
IPPROTO_IDP = 22 // in.h:163:1: |
| 141 |
IPPROTO_IGMP = 2 // in.h:156:1: |
| 142 |
IPPROTO_IP = 0 // in.h:153:1: |
| 143 |
IPPROTO_IPV6 = 41 // in.h:164:1: |
| 144 |
IPPROTO_MAX = 256 // in.h:182:1: |
| 145 |
IPPROTO_ND = 77 // in.h:174:1: |
| 146 |
IPPROTO_NONE = 59 // in.h:171:1: |
| 147 |
IPPROTO_OSPF = 89 // in.h:176:1: |
| 148 |
IPPROTO_PIM = 103 // in.h:177:1: |
| 149 |
IPPROTO_PUP = 12 // in.h:161:1: |
| 150 |
IPPROTO_RAW = 255 // in.h:181:1: |
| 151 |
IPPROTO_ROUTING = 43 // in.h:165:1: |
| 152 |
IPPROTO_RSVP = 46 // in.h:167:1: |
| 153 |
IPPROTO_SCTP = 132 // in.h:178:1: |
| 154 |
IPPROTO_TCP = 6 // in.h:159:1: |
| 155 |
IPPROTO_UDP = 17 // in.h:162:1: |
| 156 |
IPSEC_PREF_NEVER = 0x01 // in.h:941:1: |
| 157 |
IPSEC_PREF_REQUIRED = 0x02 // in.h:942:1: |
| 158 |
IPSEC_PREF_UNIQUE = 0x04 // in.h:943:1: |
| 159 |
IPV6_ADD_MEMBERSHIP = 0x9 // in.h:1224:1: |
| 160 |
IPV6_BOUND_IF = 0x41 // in.h:1307:1: |
| 161 |
IPV6_CHECKSUM = 0x18 // in.h:1257:1: |
| 162 |
IPV6_DONTFRAG = 0x21 // in.h:1260:1: |
| 163 |
IPV6_DROP_MEMBERSHIP = 0xa // in.h:1226:1: |
| 164 |
IPV6_DSTOPTS = 0xf // in.h:1234:1: |
| 165 |
IPV6_FLOWINFO_FLOWLABEL = 0xffff0f00 // in.h:447:1: |
| 166 |
IPV6_FLOWINFO_TCLASS = 0x0000f00f // in.h:448:1: |
| 167 |
IPV6_HOPLIMIT = 0xc // in.h:1231:1: |
| 168 |
IPV6_HOPOPTS = 0xe // in.h:1233:1: |
| 169 |
IPV6_JOIN_GROUP = 0x9 // in.h:1202:1: |
| 170 |
IPV6_LEAVE_GROUP = 0xa // in.h:1204:1: |
| 171 |
IPV6_MULTICAST_HOPS = 0x7 // in.h:1196:1: |
| 172 |
IPV6_MULTICAST_IF = 0x6 // in.h:1193:1: |
| 173 |
IPV6_MULTICAST_LOOP = 0x8 // in.h:1199:1: |
| 174 |
IPV6_NEXTHOP = 0xd // in.h:1232:1: |
| 175 |
IPV6_PAD1_OPT = 0 // in.h:1314:1: |
| 176 |
IPV6_PATHMTU = 0x25 // in.h:1264:1: |
| 177 |
IPV6_PKTINFO = 0xb // in.h:1229:1: |
| 178 |
IPV6_PREFER_SRC_CGA = 0x00000020 // in.h:1289:1: |
| 179 |
IPV6_PREFER_SRC_CGADEFAULT = 16 // in.h:1296:1: |
| 180 |
IPV6_PREFER_SRC_CGAMASK = 48 // in.h:1295:1: |
| 181 |
IPV6_PREFER_SRC_COA = 0x00000002 // in.h:1285:1: |
| 182 |
IPV6_PREFER_SRC_DEFAULT = 21 // in.h:1301:1: |
| 183 |
IPV6_PREFER_SRC_HOME = 0x00000001 // in.h:1284:1: |
| 184 |
IPV6_PREFER_SRC_MASK = 63 // in.h:1298:1: |
| 185 |
IPV6_PREFER_SRC_MIPDEFAULT = 1 // in.h:1292:1: |
| 186 |
IPV6_PREFER_SRC_MIPMASK = 3 // in.h:1291:1: |
| 187 |
IPV6_PREFER_SRC_NONCGA = 0x00000010 // in.h:1288:1: |
| 188 |
IPV6_PREFER_SRC_PUBLIC = 0x00000004 // in.h:1286:1: |
| 189 |
IPV6_PREFER_SRC_TMP = 0x00000008 // in.h:1287:1: |
| 190 |
IPV6_PREFER_SRC_TMPDEFAULT = 4 // in.h:1294:1: |
| 191 |
IPV6_PREFER_SRC_TMPMASK = 12 // in.h:1293:1: |
| 192 |
IPV6_RECVDSTOPTS = 0x28 // in.h:1271:1: |
| 193 |
IPV6_RECVHOPLIMIT = 0x13 // in.h:1240:1: |
| 194 |
IPV6_RECVHOPOPTS = 0x14 // in.h:1241:1: |
| 195 |
IPV6_RECVPATHMTU = 0x24 // in.h:1263:1: |
| 196 |
IPV6_RECVPKTINFO = 0x12 // in.h:1239:1: |
| 197 |
IPV6_RECVRTHDR = 0x16 // in.h:1249:1: |
| 198 |
IPV6_RECVRTHDRDSTOPTS = 0x17 // in.h:1255:1: |
| 199 |
IPV6_RECVTCLASS = 0x19 // in.h:1258:1: |
| 200 |
IPV6_RTHDR = 0x10 // in.h:1236:1: |
| 201 |
IPV6_RTHDRDSTOPTS = 0x11 // in.h:1237:1: |
| 202 |
IPV6_RTHDR_TYPE_0 = 0 // in.h:1152:1: |
| 203 |
IPV6_SEC_OPT = 0x22 // in.h:1261:1: |
| 204 |
IPV6_SRC_PREFERENCES = 0x23 // in.h:1262:1: |
| 205 |
IPV6_TCLASS = 0x26 // in.h:1265:1: |
| 206 |
IPV6_UNICAST_HOPS = 0x5 // in.h:1190:1: |
| 207 |
IPV6_UNSPEC_SRC = 0x42 // in.h:1308:1: |
| 208 |
IPV6_USE_MIN_MTU = 0x20 // in.h:1259:1: |
| 209 |
IPV6_V6ONLY = 0x27 // in.h:1266:1: |
| 210 |
IP_ADD_MEMBERSHIP = 0x13 // in.h:921:1: |
| 211 |
IP_ADD_SOURCE_MEMBERSHIP = 0x17 // in.h:925:1: |
| 212 |
IP_BLOCK_SOURCE = 0x15 // in.h:923:1: |
| 213 |
IP_BOUND_IF = 0x41 // in.h:976:1: |
| 214 |
IP_BROADCAST = 0x106 // in.h:994:1: |
| 215 |
IP_BROADCAST_TTL = 0x43 // in.h:978:1: |
| 216 |
IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:1009:1: |
| 217 |
IP_DEFAULT_MULTICAST_TTL = 1 // in.h:1008:1: |
| 218 |
IP_DHCPINIT_IF = 0x45 // in.h:980:1: |
| 219 |
IP_DONTFRAG = 0x1b // in.h:934:1: |
| 220 |
IP_DONTROUTE = 0x105 // in.h:990:1: |
| 221 |
IP_DROP_MEMBERSHIP = 0x14 // in.h:922:1: |
| 222 |
IP_DROP_SOURCE_MEMBERSHIP = 0x18 // in.h:926:1: |
| 223 |
IP_HDRINCL = 2 // in.h:899:1: |
| 224 |
IP_MULTICAST_IF = 0x10 // in.h:918:1: |
| 225 |
IP_MULTICAST_LOOP = 0x12 // in.h:920:1: |
| 226 |
IP_MULTICAST_TTL = 0x11 // in.h:919:1: |
| 227 |
IP_NEXTHOP = 0x19 // in.h:927:1: |
| 228 |
IP_OPTIONS = 1 // in.h:896:1: |
| 229 |
IP_PKTINFO = 0x1a // in.h:932:1: |
| 230 |
IP_RECVDSTADDR = 0x7 // in.h:911:1: |
| 231 |
IP_RECVIF = 0x9 // in.h:913:1: |
| 232 |
IP_RECVOPTS = 0x5 // in.h:909:1: |
| 233 |
IP_RECVPKTINFO = 0x1a // in.h:933:1: |
| 234 |
IP_RECVRETOPTS = 0x6 // in.h:910:1: |
| 235 |
IP_RECVSLLA = 0xa // in.h:914:1: |
| 236 |
IP_RECVTOS = 0xc // in.h:916:1: |
| 237 |
IP_RECVTTL = 0xb // in.h:915:1: |
| 238 |
IP_RETOPTS = 0x8 // in.h:912:1: |
| 239 |
IP_REUSEADDR = 0x104 // in.h:986:1: |
| 240 |
IP_SEC_OPT = 0x22 // in.h:940:1: |
| 241 |
IP_TOS = 3 // in.h:902:1: |
| 242 |
IP_TTL = 4 // in.h:906:1: |
| 243 |
IP_UNBLOCK_SOURCE = 0x16 // in.h:924:1: |
| 244 |
IP_UNSPEC_SRC = 0x42 // in.h:977:1: |
| 245 |
ITIMER_PROF = 2 // time.h:201:1: |
| 246 |
ITIMER_REAL = 0 // time.h:199:1: |
| 247 |
ITIMER_REALPROF = 3 // time.h:204:1: |
| 248 |
ITIMER_VIRTUAL = 1 // time.h:200:1: |
| 249 |
LINUX_SLL_BROADCAST = 1 // socket_impl.h:122:1: |
| 250 |
LINUX_SLL_HOST = 0 // socket_impl.h:121:1: |
| 251 |
LINUX_SLL_MULTICAST = 2 // socket_impl.h:123:1: |
| 252 |
LINUX_SLL_OTHERHOST = 3 // socket_impl.h:124:1: |
| 253 |
LINUX_SLL_OUTGOING = 4 // socket_impl.h:125:1: |
| 254 |
MCAST_BLOCK_SOURCE = 0x2b // in.h:1278:1: |
| 255 |
MCAST_EXCLUDE = 2 // in.h:1122:1: |
| 256 |
MCAST_INCLUDE = 1 // in.h:1121:1: |
| 257 |
MCAST_JOIN_GROUP = 0x29 // in.h:1276:1: |
| 258 |
MCAST_JOIN_SOURCE_GROUP = 0x2d // in.h:1280:1: |
| 259 |
MCAST_LEAVE_GROUP = 0x2a // in.h:1277:1: |
| 260 |
MCAST_LEAVE_SOURCE_GROUP = 0x2e // in.h:1281:1: |
| 261 |
MCAST_UNBLOCK_SOURCE = 0x2c // in.h:1279:1: |
| 262 |
MICROSEC = 1000000 // time.h:246:1: |
| 263 |
MILLISEC = 1000 // time.h:245:1: |
| 264 |
NANOSEC = 1000000000 // time.h:247:1: |
| 265 |
NBBY = 8 // select.h:103:1: |
| 266 |
PROTO_SDP = 257 // in.h:185:1: |
| 267 |
P_MYID = -1 // types.h:632:1: |
| 268 |
REG_LABEL_BP = 2 // machtypes.h:44:1: |
| 269 |
REG_LABEL_MAX = 8 // machtypes.h:51:1: |
| 270 |
REG_LABEL_PC = 0 // machtypes.h:42:1: |
| 271 |
REG_LABEL_R12 = 4 // machtypes.h:47:1: |
| 272 |
REG_LABEL_R13 = 5 // machtypes.h:48:1: |
| 273 |
REG_LABEL_R14 = 6 // machtypes.h:49:1: |
| 274 |
REG_LABEL_R15 = 7 // machtypes.h:50:1: |
| 275 |
REG_LABEL_RBX = 3 // machtypes.h:46:1: |
| 276 |
REG_LABEL_SP = 1 // machtypes.h:43:1: |
| 277 |
SEC = 1 // time.h:244:1: |
| 278 |
TIMER_ABSTIME = 0x1 // time_impl.h:134:1: |
| 279 |
TIMER_RELTIME = 0x0 // time_impl.h:133:1: |
| 280 |
TIME_UTC = 0x1 // time.h:306:1: |
| 281 |
X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1: |
| 282 |
X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1: |
| 283 |
X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1: |
| 284 |
X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1: |
| 285 |
X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1: |
| 286 |
X_CLOCKID_T = 0 // types.h:568:1: |
| 287 |
X_CLOCK_T = 0 // types.h:563:1: |
| 288 |
X_COND_MAGIC = 0x4356 // types.h:426:1: |
| 289 |
X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1: |
| 290 |
X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1: |
| 291 |
X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1: |
| 292 |
X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1: |
| 293 |
X_DTRACE_VERSION = 1 // feature_tests.h:490:1: |
| 294 |
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: |
| 295 |
X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1: |
| 296 |
X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1: |
| 297 |
X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1: |
| 298 |
X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1: |
| 299 |
X_IEEE_754 = 0 // isa_defs.h:246:1: |
| 300 |
X_INT64_TYPE = 0 // int_types.h:82:1: |
| 301 |
X_INT_ALIGNMENT = 4 // isa_defs.h:251:1: |
| 302 |
X_IN_ADDR_T = 0 // byteorder.h:78:1: |
| 303 |
X_IN_PORT_T = 0 // byteorder.h:73:1: |
| 304 |
X_IPADDR_T = 0 // in.h:98:1: |
| 305 |
X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1: |
| 306 |
X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1: |
| 307 |
X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1: |
| 308 |
X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1: |
| 309 |
X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1: |
| 310 |
X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1: |
| 311 |
X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1: |
| 312 |
X_LOCALE_T = 0 // time.h:291:1: |
| 313 |
X_LONGLONG_TYPE = 0 // feature_tests.h:412:1: |
| 314 |
X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1: |
| 315 |
X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1: |
| 316 |
X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1: |
| 317 |
X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1: |
| 318 |
X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1: |
| 319 |
X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1: |
| 320 |
X_LP64 = 1 // <predefined>:286:1: |
| 321 |
X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1: |
| 322 |
X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1: |
| 323 |
X_MUTEX_MAGIC = 0x4d58 // types.h:424:1: |
| 324 |
X_NBBY = 8 // select.h:100:1: |
| 325 |
X_NETINET_IN_H = 0 // in.h:33:1: |
| 326 |
X_NET_IF_DL_H = 0 // if_dl.h:39:1: |
| 327 |
X_NORETURN_KYWD = 0 // feature_tests.h:448:1: |
| 328 |
X_OFF_T = 0 // types.h:142:1: |
| 329 |
X_OLD_IPV6_RECVDSTOPTS = 0x15 // in.h:1247:1: |
| 330 |
X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1: |
| 331 |
X_PSM_MODULES = 0 // isa_defs.h:284:1: |
| 332 |
X_PTRDIFF_T = 0 // types.h:112:1: |
| 333 |
X_RESTRICT_KYWD = 0 // feature_tests.h:435:1: |
| 334 |
X_RTC_CONFIG = 0 // isa_defs.h:285:1: |
| 335 |
X_RWL_MAGIC = 0x5257 // types.h:427:1: |
| 336 |
X_SA_FAMILY_T = 0 // socket_impl.h:42:1: |
| 337 |
X_SEMA_MAGIC = 0x534d // types.h:425:1: |
| 338 |
X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1: |
| 339 |
X_SIGEVENT = 0 // time.h:132:1: |
| 340 |
X_SIGSET_T = 0 // select.h:73:1: |
| 341 |
X_SIGVAL = 0 // time.h:124:1: |
| 342 |
X_SIZE_T = 0 // types.h:540:1: |
| 343 |
X_SOCKLEN_T = 0 // in.h:48:1: |
| 344 |
X_SOFT_HOSTID = 0 // isa_defs.h:286:1: |
| 345 |
X_SSIZE_T = 0 // types.h:549:1: |
| 346 |
X_SS_MAXSIZE = 256 // socket_impl.h:70:1: |
| 347 |
X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1: |
| 348 |
X_STDC_C11 = 0 // feature_tests.h:165:1: |
| 349 |
X_STDC_C99 = 0 // feature_tests.h:169:1: |
| 350 |
X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1: |
| 351 |
X_SUSECONDS_T = 0 // types.h:343:1: |
| 352 |
X_SYS_BYTEORDER_H = 0 // byteorder.h:41:1: |
| 353 |
X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1: |
| 354 |
X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1: |
| 355 |
X_SYS_INT_TYPES_H = 0 // int_types.h:30:1: |
| 356 |
X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1: |
| 357 |
X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1: |
| 358 |
X_SYS_NULL_H = 0 // null.h:17:1: |
| 359 |
X_SYS_SELECT_H = 0 // select.h:45:1: |
| 360 |
X_SYS_SOCKET_IMPL_H = 0 // socket_impl.h:35:1: |
| 361 |
X_SYS_TIME_H = 0 // time.h:27:1: |
| 362 |
X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1: |
| 363 |
X_SYS_TYPES_H = 0 // types.h:35:1: |
| 364 |
X_SYS_UN_H = 0 // un.h:39:1: |
| 365 |
X_TIMER_T = 0 // types.h:573:1: |
| 366 |
X_TIME_H = 0 // time.h:37:1: |
| 367 |
X_TIME_T = 0 // types.h:558:1: |
| 368 |
X_UID_T = 0 // types.h:400:1: |
| 369 |
X_XOPEN_VERSION = 3 // feature_tests.h:392:1: |
| 370 |
Sun = 1 // <predefined>:172:1: |
| 371 |
Unix = 1 // <predefined>:175:1: |
| 372 |
) |
| 373 |
|
| 374 |
// used for block sizes |
| 375 |
|
| 376 |
// The boolean_t type has had a varied amount of exposure over the years in |
| 377 |
// terms of how its enumeration constants have been exposed. In particular, it |
| 378 |
// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the |
| 379 |
// B_TRUE and B_FALSE with an underscore. This check never included the |
| 380 |
// question of if we were in a strict ANSI C environment or whether extensions |
| 381 |
// were defined. |
| 382 |
// |
| 383 |
// Compilers such as clang started defaulting to always including an |
| 384 |
// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__. |
| 385 |
// This would lead most software that had used the non-underscore versions to |
| 386 |
// need it. As such, we have adjusted the non-strict XOPEN environment to retain |
| 387 |
// its old behavior so as to minimize namespace pollution; however, we instead |
| 388 |
// include both variants of the definitions in the generally visible version |
| 389 |
// allowing software written in either world to hopefully end up in a good |
| 390 |
// place. |
| 391 |
// |
| 392 |
// This isn't perfect, but should hopefully minimize the pain for folks actually |
| 393 |
// trying to build software. |
| 394 |
const ( /* types.h:215:1: */ |
| 395 |
B_FALSE = 0 |
| 396 |
B_TRUE = 1 |
| 397 |
X_B_FALSE = 0 |
| 398 |
X_B_TRUE = 1 |
| 399 |
) |
| 400 |
|
| 401 |
type Ptrdiff_t = int64 /* <builtin>:3:26 */ |
| 402 |
|
| 403 |
type Size_t = uint64 /* <builtin>:9:23 */ |
| 404 |
|
| 405 |
type Wchar_t = int32 /* <builtin>:15:24 */ |
| 406 |
|
| 407 |
type X__int128_t = struct { |
| 408 |
Flo int64 |
| 409 |
Fhi int64 |
| 410 |
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 |
| 411 |
type X__uint128_t = struct { |
| 412 |
Flo uint64 |
| 413 |
Fhi uint64 |
| 414 |
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 |
| 415 |
|
| 416 |
type X__builtin_va_list = uintptr /* <builtin>:46:14 */ |
| 417 |
type X__float128 = float64 /* <builtin>:47:21 */ |
| 418 |
|
| 419 |
// Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
| 420 |
// Use is subject to license terms. |
| 421 |
// |
| 422 |
// Copyright 2011 Nexenta Systems, Inc. All rights reserved. |
| 423 |
// Copyright 2015, Joyent, Inc. |
| 424 |
// Copyright 2020 OmniOS Community Edition (OmniOSce) Association. |
| 425 |
// Copyright (c) 1982, 1986 Regents of the University of California. |
| 426 |
// All rights reserved. |
| 427 |
// |
| 428 |
// Redistribution and use in source and binary forms are permitted |
| 429 |
// provided that this notice is preserved and that due credit is given |
| 430 |
// to the University of California at Berkeley. The name of the University |
| 431 |
// may not be used to endorse or promote products derived from this |
| 432 |
// software without specific prior written permission. This software |
| 433 |
// is provided ``as is'' without express or implied warranty. |
| 434 |
|
| 435 |
// Constants and structures defined by the internet system, |
| 436 |
// according to following documents |
| 437 |
// |
| 438 |
// Internet ASSIGNED NUMBERS (RFC1700) and its successors: |
| 439 |
// http://www.iana.org/assignments/protocol-numbers |
| 440 |
// http://www.iana.org/assignments/port-numbers |
| 441 |
// Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors) |
| 442 |
// |
| 443 |
|
| 444 |
// DO NOT EDIT THIS FILE. |
| 445 |
// |
| 446 |
// It has been auto-edited by fixincludes from: |
| 447 |
// |
| 448 |
// "/usr/include/sys/feature_tests.h" |
| 449 |
// |
| 450 |
// This had to be done to correct non-standard usages in the |
| 451 |
// original, manufacturer supplied header file. |
| 452 |
|
| 453 |
// CDDL HEADER START |
| 454 |
// |
| 455 |
// The contents of this file are subject to the terms of the |
| 456 |
// Common Development and Distribution License (the "License"). |
| 457 |
// You may not use this file except in compliance with the License. |
| 458 |
// |
| 459 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 460 |
// or http://www.opensolaris.org/os/licensing. |
| 461 |
// See the License for the specific language governing permissions |
| 462 |
// and limitations under the License. |
| 463 |
// |
| 464 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 465 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 466 |
// If applicable, add the following below this CDDL HEADER, with the |
| 467 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 468 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 469 |
// |
| 470 |
// CDDL HEADER END |
| 471 |
|
| 472 |
// Copyright 2013 Garrett D'Amore <[email protected]> |
| 473 |
// Copyright 2016 Joyent, Inc. |
| 474 |
// Copyright 2022 Oxide Computer Company |
| 475 |
// |
| 476 |
// Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
| 477 |
// Use is subject to license terms. |
| 478 |
|
| 479 |
// CDDL HEADER START |
| 480 |
// |
| 481 |
// The contents of this file are subject to the terms of the |
| 482 |
// Common Development and Distribution License, Version 1.0 only |
| 483 |
// (the "License"). You may not use this file except in compliance |
| 484 |
// with the License. |
| 485 |
// |
| 486 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 487 |
// or http://www.opensolaris.org/os/licensing. |
| 488 |
// See the License for the specific language governing permissions |
| 489 |
// and limitations under the License. |
| 490 |
// |
| 491 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 492 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 493 |
// If applicable, add the following below this CDDL HEADER, with the |
| 494 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 495 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 496 |
// |
| 497 |
// CDDL HEADER END |
| 498 |
// Copyright 2004 Sun Microsystems, Inc. All rights reserved. |
| 499 |
// Use is subject to license terms. |
| 500 |
// Copyright 2015 EveryCity Ltd. All rights reserved. |
| 501 |
// Copyright 2019 Joyent, Inc. |
| 502 |
|
| 503 |
// This file contains definitions designed to enable different compilers |
| 504 |
// to be used harmoniously on Solaris systems. |
| 505 |
|
| 506 |
// Allow for version tests for compiler bugs and features. |
| 507 |
|
| 508 |
// analogous to lint's PRINTFLIKEn |
| 509 |
|
| 510 |
// Handle the kernel printf routines that can take '%b' too |
| 511 |
|
| 512 |
// This one's pretty obvious -- the function never returns |
| 513 |
|
| 514 |
// The function is 'extern inline' and expects GNU C89 behaviour, not C99 |
| 515 |
// behaviour. |
| 516 |
// |
| 517 |
// Should only be used on 'extern inline' definitions for GCC. |
| 518 |
|
| 519 |
// The function has control flow such that it may return multiple times (in |
| 520 |
// the manner of setjmp or vfork) |
| 521 |
|
| 522 |
// This is an appropriate label for functions that do not |
| 523 |
// modify their arguments, e.g. strlen() |
| 524 |
|
| 525 |
// This is a stronger form of __pure__. Can be used for functions |
| 526 |
// that do not modify their arguments and don't depend on global |
| 527 |
// memory. |
| 528 |
|
| 529 |
// This attribute, attached to a variable, means that the variable is meant to |
| 530 |
// be possibly unused. GCC will not produce a warning for this variable. |
| 531 |
|
| 532 |
// Shorthand versions for readability |
| 533 |
|
| 534 |
// In release build, disable warnings about variables |
| 535 |
// which are used only for debugging. |
| 536 |
|
| 537 |
// CDDL HEADER START |
| 538 |
// |
| 539 |
// The contents of this file are subject to the terms of the |
| 540 |
// Common Development and Distribution License (the "License"). |
| 541 |
// You may not use this file except in compliance with the License. |
| 542 |
// |
| 543 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 544 |
// or http://www.opensolaris.org/os/licensing. |
| 545 |
// See the License for the specific language governing permissions |
| 546 |
// and limitations under the License. |
| 547 |
// |
| 548 |
// |
| 549 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 550 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 551 |
// If applicable, add the following below this CDDL HEADER, with the |
| 552 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 553 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 554 |
// |
| 555 |
// CDDL HEADER END |
| 556 |
|
| 557 |
// Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
| 558 |
// Use is subject to license terms. |
| 559 |
// Copyright 2016 Joyent, Inc. |
| 560 |
|
| 561 |
// This header file serves to group a set of well known defines and to |
| 562 |
// set these for each instruction set architecture. These defines may |
| 563 |
// be divided into two groups; characteristics of the processor and |
| 564 |
// implementation choices for Solaris on a processor. |
| 565 |
// |
| 566 |
// Processor Characteristics: |
| 567 |
// |
| 568 |
// _LITTLE_ENDIAN / _BIG_ENDIAN: |
| 569 |
// The natural byte order of the processor. A pointer to an int points |
| 570 |
// to the least/most significant byte of that int. |
| 571 |
// |
| 572 |
// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD: |
| 573 |
// The processor specific direction of stack growth. A push onto the |
| 574 |
// stack increases/decreases the stack pointer, so it stores data at |
| 575 |
// successively higher/lower addresses. (Stackless machines ignored |
| 576 |
// without regrets). |
| 577 |
// |
| 578 |
// _LONG_LONG_HTOL / _LONG_LONG_LTOH: |
| 579 |
// A pointer to a long long points to the most/least significant long |
| 580 |
// within that long long. |
| 581 |
// |
| 582 |
// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH: |
| 583 |
// The C compiler assigns bit fields from the high/low to the low/high end |
| 584 |
// of an int (most to least significant vs. least to most significant). |
| 585 |
// |
| 586 |
// _IEEE_754: |
| 587 |
// The processor (or supported implementations of the processor) |
| 588 |
// supports the ieee-754 floating point standard. No other floating |
| 589 |
// point standards are supported (or significant). Any other supported |
| 590 |
// floating point formats are expected to be cased on the ISA processor |
| 591 |
// symbol. |
| 592 |
// |
| 593 |
// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED: |
| 594 |
// The C Compiler implements objects of type `char' as `unsigned' or |
| 595 |
// `signed' respectively. This is really an implementation choice of |
| 596 |
// the compiler writer, but it is specified in the ABI and tends to |
| 597 |
// be uniform across compilers for an instruction set architecture. |
| 598 |
// Hence, it has the properties of a processor characteristic. |
| 599 |
// |
| 600 |
// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT / |
| 601 |
// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT / |
| 602 |
// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT: |
| 603 |
// The ABI defines alignment requirements of each of the primitive |
| 604 |
// object types. Some, if not all, may be hardware requirements as |
| 605 |
// well. The values are expressed in "byte-alignment" units. |
| 606 |
// |
| 607 |
// _MAX_ALIGNMENT: |
| 608 |
// The most stringent alignment requirement as specified by the ABI. |
| 609 |
// Equal to the maximum of all the above _XXX_ALIGNMENT values. |
| 610 |
// |
| 611 |
// _MAX_ALIGNMENT_TYPE: |
| 612 |
// The name of the C type that has the value descried in _MAX_ALIGNMENT. |
| 613 |
// |
| 614 |
// _ALIGNMENT_REQUIRED: |
| 615 |
// True or false (1 or 0) whether or not the hardware requires the ABI |
| 616 |
// alignment. |
| 617 |
// |
| 618 |
// _LONG_LONG_ALIGNMENT_32 |
| 619 |
// The 32-bit ABI supported by a 64-bit kernel may have different |
| 620 |
// alignment requirements for primitive object types. The value of this |
| 621 |
// identifier is expressed in "byte-alignment" units. |
| 622 |
// |
| 623 |
// _HAVE_CPUID_INSN |
| 624 |
// This indicates that the architecture supports the 'cpuid' |
| 625 |
// instruction as defined by Intel. (Intel allows other vendors |
| 626 |
// to extend the instruction for their own purposes.) |
| 627 |
// |
| 628 |
// |
| 629 |
// Implementation Choices: |
| 630 |
// |
| 631 |
// _ILP32 / _LP64: |
| 632 |
// This specifies the compiler data type implementation as specified in |
| 633 |
// the relevant ABI. The choice between these is strongly influenced |
| 634 |
// by the underlying hardware, but is not absolutely tied to it. |
| 635 |
// Currently only two data type models are supported: |
| 636 |
// |
| 637 |
// _ILP32: |
| 638 |
// Int/Long/Pointer are 32 bits. This is the historical UNIX |
| 639 |
// and Solaris implementation. Due to its historical standing, |
| 640 |
// this is the default case. |
| 641 |
// |
| 642 |
// _LP64: |
| 643 |
// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen |
| 644 |
// implementation for 64-bit ABIs such as SPARC V9. |
| 645 |
// |
| 646 |
// _I32LPx: |
| 647 |
// A compilation environment where 'int' is 32-bit, and |
| 648 |
// longs and pointers are simply the same size. |
| 649 |
// |
| 650 |
// In all cases, Char is 8 bits and Short is 16 bits. |
| 651 |
// |
| 652 |
// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16: |
| 653 |
// This specifies the form of the disk VTOC (or label): |
| 654 |
// |
| 655 |
// _SUNOS_VTOC_8: |
| 656 |
// This is a VTOC form which is upwardly compatible with the |
| 657 |
// SunOS 4.x disk label and allows 8 partitions per disk. |
| 658 |
// |
| 659 |
// _SUNOS_VTOC_16: |
| 660 |
// In this format the incore vtoc image matches the ondisk |
| 661 |
// version. It allows 16 slices per disk, and is not |
| 662 |
// compatible with the SunOS 4.x disk label. |
| 663 |
// |
| 664 |
// Note that these are not the only two VTOC forms possible and |
| 665 |
// additional forms may be added. One possible form would be the |
| 666 |
// SVr4 VTOC form. The symbol for that is reserved now, although |
| 667 |
// it is not implemented. |
| 668 |
// |
| 669 |
// _SVR4_VTOC_16: |
| 670 |
// This VTOC form is compatible with the System V Release 4 |
| 671 |
// VTOC (as implemented on the SVr4 Intel and 3b ports) with |
| 672 |
// 16 partitions per disk. |
| 673 |
// |
| 674 |
// |
| 675 |
// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR |
| 676 |
// This describes the type of addresses used by system DMA: |
| 677 |
// |
| 678 |
// _DMA_USES_PHYSADDR: |
| 679 |
// This type of DMA, used in the x86 implementation, |
| 680 |
// requires physical addresses for DMA buffers. The 24-bit |
| 681 |
// addresses used by some legacy boards is the source of the |
| 682 |
// "low-memory" (<16MB) requirement for some devices using DMA. |
| 683 |
// |
| 684 |
// _DMA_USES_VIRTADDR: |
| 685 |
// This method of DMA allows the use of virtual addresses for |
| 686 |
// DMA transfers. |
| 687 |
// |
| 688 |
// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT |
| 689 |
// This indicates the presence/absence of an fdisk table. |
| 690 |
// |
| 691 |
// _FIRMWARE_NEEDS_FDISK |
| 692 |
// The fdisk table is required by system firmware. If present, |
| 693 |
// it allows a disk to be subdivided into multiple fdisk |
| 694 |
// partitions, each of which is equivalent to a separate, |
| 695 |
// virtual disk. This enables the co-existence of multiple |
| 696 |
// operating systems on a shared hard disk. |
| 697 |
// |
| 698 |
// _NO_FDISK_PRESENT |
| 699 |
// If the fdisk table is absent, it is assumed that the entire |
| 700 |
// media is allocated for a single operating system. |
| 701 |
// |
| 702 |
// _HAVE_TEM_FIRMWARE |
| 703 |
// Defined if this architecture has the (fallback) option of |
| 704 |
// using prom_* calls for doing I/O if a suitable kernel driver |
| 705 |
// is not available to do it. |
| 706 |
// |
| 707 |
// _DONT_USE_1275_GENERIC_NAMES |
| 708 |
// Controls whether or not device tree node names should |
| 709 |
// comply with the IEEE 1275 "Generic Names" Recommended |
| 710 |
// Practice. With _DONT_USE_GENERIC_NAMES, device-specific |
| 711 |
// names identifying the particular device will be used. |
| 712 |
// |
| 713 |
// __i386_COMPAT |
| 714 |
// This indicates whether the i386 ABI is supported as a *non-native* |
| 715 |
// mode for the platform. When this symbol is defined: |
| 716 |
// - 32-bit xstat-style system calls are enabled |
| 717 |
// - 32-bit xmknod-style system calls are enabled |
| 718 |
// - 32-bit system calls use i386 sizes -and- alignments |
| 719 |
// |
| 720 |
// Note that this is NOT defined for the i386 native environment! |
| 721 |
// |
| 722 |
// __x86 |
| 723 |
// This is ONLY a synonym for defined(__i386) || defined(__amd64) |
| 724 |
// which is useful only insofar as these two architectures share |
| 725 |
// common attributes. Analogous to __sparc. |
| 726 |
// |
| 727 |
// _PSM_MODULES |
| 728 |
// This indicates whether or not the implementation uses PSM |
| 729 |
// modules for processor support, reading /etc/mach from inside |
| 730 |
// the kernel to extract a list. |
| 731 |
// |
| 732 |
// _RTC_CONFIG |
| 733 |
// This indicates whether or not the implementation uses /etc/rtc_config |
| 734 |
// to configure the real-time clock in the kernel. |
| 735 |
// |
| 736 |
// _UNIX_KRTLD |
| 737 |
// This indicates that the implementation uses a dynamically |
| 738 |
// linked unix + krtld to form the core kernel image at boot |
| 739 |
// time, or (in the absence of this symbol) a prelinked kernel image. |
| 740 |
// |
| 741 |
// _OBP |
| 742 |
// This indicates the firmware interface is OBP. |
| 743 |
// |
| 744 |
// _SOFT_HOSTID |
| 745 |
// This indicates that the implementation obtains the hostid |
| 746 |
// from the file /etc/hostid, rather than from hardware. |
| 747 |
|
| 748 |
// The following set of definitions characterize Solaris on AMD's |
| 749 |
// 64-bit systems. |
| 750 |
|
| 751 |
// Define the appropriate "processor characteristics" |
| 752 |
|
| 753 |
// Different alignment constraints for the i386 ABI in compatibility mode |
| 754 |
|
| 755 |
// Define the appropriate "implementation choices". |
| 756 |
|
| 757 |
// The feature test macro __i386 is generic for all processors implementing |
| 758 |
// the Intel 386 instruction set or a superset of it. Specifically, this |
| 759 |
// includes all members of the 386, 486, and Pentium family of processors. |
| 760 |
|
| 761 |
// Values of _POSIX_C_SOURCE |
| 762 |
// |
| 763 |
// undefined not a POSIX compilation |
| 764 |
// 1 POSIX.1-1990 compilation |
| 765 |
// 2 POSIX.2-1992 compilation |
| 766 |
// 199309L POSIX.1b-1993 compilation (Real Time) |
| 767 |
// 199506L POSIX.1c-1995 compilation (POSIX Threads) |
| 768 |
// 200112L POSIX.1-2001 compilation (Austin Group Revision) |
| 769 |
// 200809L POSIX.1-2008 compilation |
| 770 |
|
| 771 |
// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS, |
| 772 |
// and _STDC_C99 are Sun implementation specific macros created in order to |
| 773 |
// compress common standards specified feature test macros for easier reading. |
| 774 |
// These macros should not be used by the application developer as |
| 775 |
// unexpected results may occur. Instead, the user should reference |
| 776 |
// standards(7) for correct usage of the standards feature test macros. |
| 777 |
// |
| 778 |
// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both |
| 779 |
// X/Open or POSIX or in the negative, when neither |
| 780 |
// X/Open or POSIX defines a symbol. |
| 781 |
// |
| 782 |
// _STRICT_STDC __STDC__ is specified by the C Standards and defined |
| 783 |
// by the compiler. For Sun compilers the value of |
| 784 |
// __STDC__ is either 1, 0, or not defined based on the |
| 785 |
// compilation mode (see cc(1)). When the value of |
| 786 |
// __STDC__ is 1 and in the absence of any other feature |
| 787 |
// test macros, the namespace available to the application |
| 788 |
// is limited to only those symbols defined by the C |
| 789 |
// Standard. _STRICT_STDC provides a more readable means |
| 790 |
// of identifying symbols defined by the standard, or in |
| 791 |
// the negative, symbols that are extensions to the C |
| 792 |
// Standard. See additional comments for GNU C differences. |
| 793 |
// |
| 794 |
// _STDC_C99 __STDC_VERSION__ is specified by the C standards and |
| 795 |
// defined by the compiler and indicates the version of |
| 796 |
// the C standard. A value of 199901L indicates a |
| 797 |
// compiler that complies with ISO/IEC 9899:1999, other- |
| 798 |
// wise known as the C99 standard. |
| 799 |
// |
| 800 |
// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__ |
| 801 |
// is 201112L indicating a compiler that compiles with |
| 802 |
// ISO/IEC 9899:2011, otherwise known as the C11 standard. |
| 803 |
// |
| 804 |
// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted |
| 805 |
// by the standards, and the user has not explicitly |
| 806 |
// relaxed the strictness via __EXTENSIONS__. |
| 807 |
|
| 808 |
// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC |
| 809 |
// 99899:2011 specify the following predefined macro name: |
| 810 |
// |
| 811 |
// __STDC__ The integer constant 1, intended to indicate a conforming |
| 812 |
// implementation. |
| 813 |
// |
| 814 |
// Furthermore, a strictly conforming program shall use only those features |
| 815 |
// of the language and library specified in these standards. A conforming |
| 816 |
// implementation shall accept any strictly conforming program. |
| 817 |
// |
| 818 |
// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for |
| 819 |
// strictly conforming environments and __STDC__ to 0 for environments that |
| 820 |
// use ANSI C semantics but allow extensions to the C standard. For non-ANSI |
| 821 |
// C semantics, Sun's C compiler does not define __STDC__. |
| 822 |
// |
| 823 |
// The GNU C project interpretation is that __STDC__ should always be defined |
| 824 |
// to 1 for compilation modes that accept ANSI C syntax regardless of whether |
| 825 |
// or not extensions to the C standard are used. Violations of conforming |
| 826 |
// behavior are conditionally flagged as warnings via the use of the |
| 827 |
// -pedantic option. In addition to defining __STDC__ to 1, the GNU C |
| 828 |
// compiler also defines __STRICT_ANSI__ as a means of specifying strictly |
| 829 |
// conforming environments using the -ansi or -std=<standard> options. |
| 830 |
// |
| 831 |
// In the absence of any other compiler options, Sun and GNU set the value |
| 832 |
// of __STDC__ as follows when using the following options: |
| 833 |
// |
| 834 |
// Value of __STDC__ __STRICT_ANSI__ |
| 835 |
// |
| 836 |
// cc -Xa (default) 0 undefined |
| 837 |
// cc -Xt (transitional) 0 undefined |
| 838 |
// cc -Xc (strictly conforming) 1 undefined |
| 839 |
// cc -Xs (K&R C) undefined undefined |
| 840 |
// |
| 841 |
// gcc (default) 1 undefined |
| 842 |
// gcc -ansi, -std={c89, c99,...) 1 defined |
| 843 |
// gcc -traditional (K&R) undefined undefined |
| 844 |
// |
| 845 |
// The default compilation modes for Sun C compilers versus GNU C compilers |
| 846 |
// results in a differing value for __STDC__ which results in a more |
| 847 |
// restricted namespace when using Sun compilers. To allow both GNU and Sun |
| 848 |
// interpretations to peacefully co-exist, we use the following Sun |
| 849 |
// implementation _STRICT_STDC_ macro: |
| 850 |
|
| 851 |
// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011 |
| 852 |
|
| 853 |
// Use strict symbol visibility. |
| 854 |
|
| 855 |
// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are |
| 856 |
// governed by POSIX, but have not been governed by ISO C. One can go two ways |
| 857 |
// on what should happen if an application actively includes (not transitively) |
| 858 |
// a header that isn't part of the ISO C spec, we opt to say that if someone has |
| 859 |
// gone out of there way then they're doing it for a reason and that is an act |
| 860 |
// of non-compliance and therefore it's not up to us to hide away every symbol. |
| 861 |
// |
| 862 |
// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for |
| 863 |
// cases where in the past we have only used a POSIX related check and we don't |
| 864 |
// wish to make something stricter. Often applications are relying on the |
| 865 |
// ability to, or more realistically unwittingly, have _STRICT_STDC declared and |
| 866 |
// still use these interfaces. |
| 867 |
|
| 868 |
// Large file interfaces: |
| 869 |
// |
| 870 |
// _LARGEFILE_SOURCE |
| 871 |
// 1 large file-related additions to POSIX |
| 872 |
// interfaces requested (fseeko, etc.) |
| 873 |
// _LARGEFILE64_SOURCE |
| 874 |
// 1 transitional large-file-related interfaces |
| 875 |
// requested (seek64, stat64, etc.) |
| 876 |
// |
| 877 |
// The corresponding announcement macros are respectively: |
| 878 |
// _LFS_LARGEFILE |
| 879 |
// _LFS64_LARGEFILE |
| 880 |
// (These are set in <unistd.h>.) |
| 881 |
// |
| 882 |
// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as |
| 883 |
// well. |
| 884 |
// |
| 885 |
// The large file interfaces are made visible regardless of the initial values |
| 886 |
// of the feature test macros under certain circumstances: |
| 887 |
// - If no explicit standards-conforming environment is requested (neither |
| 888 |
// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of |
| 889 |
// __STDC__ does not imply standards conformance). |
| 890 |
// - Extended system interfaces are explicitly requested (__EXTENSIONS__ |
| 891 |
// is defined). |
| 892 |
// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is |
| 893 |
// defined). (Note that this dependency is an artifact of the current |
| 894 |
// kernel implementation and may change in future releases.) |
| 895 |
|
| 896 |
// Large file compilation environment control: |
| 897 |
// |
| 898 |
// The setting of _FILE_OFFSET_BITS controls the size of various file-related |
| 899 |
// types and governs the mapping between file-related source function symbol |
| 900 |
// names and the corresponding binary entry points. |
| 901 |
// |
| 902 |
// In the 32-bit environment, the default value is 32; if not set, set it to |
| 903 |
// the default here, to simplify tests in other headers. |
| 904 |
// |
| 905 |
// In the 64-bit compilation environment, the only value allowed is 64. |
| 906 |
|
| 907 |
// Use of _XOPEN_SOURCE |
| 908 |
// |
| 909 |
// The following X/Open specifications are supported: |
| 910 |
// |
| 911 |
// X/Open Portability Guide, Issue 3 (XPG3) |
| 912 |
// X/Open CAE Specification, Issue 4 (XPG4) |
| 913 |
// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2) |
| 914 |
// X/Open CAE Specification, Issue 5 (XPG5) |
| 915 |
// Open Group Technical Standard, Issue 6 (XPG6), also referred to as |
| 916 |
// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002. |
| 917 |
// Open Group Technical Standard, Issue 7 (XPG7), also referred to as |
| 918 |
// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009. |
| 919 |
// |
| 920 |
// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1). |
| 921 |
// XPG5 is also referred to as UNIX 98 or the Single Unix Specification, |
| 922 |
// Version 2 (SUSv2) |
| 923 |
// XPG6 is the result of a merge of the X/Open and POSIX specifications |
| 924 |
// and as such is also referred to as IEEE Std. 1003.1-2001 in |
| 925 |
// addition to UNIX 03 and SUSv3. |
| 926 |
// XPG7 is also referred to as UNIX 08 and SUSv4. |
| 927 |
// |
| 928 |
// When writing a conforming X/Open application, as per the specification |
| 929 |
// requirements, the appropriate feature test macros must be defined at |
| 930 |
// compile time. These are as follows. For more info, see standards(7). |
| 931 |
// |
| 932 |
// Feature Test Macro Specification |
| 933 |
// ------------------------------------------------ ------------- |
| 934 |
// _XOPEN_SOURCE XPG3 |
| 935 |
// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 |
| 936 |
// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 |
| 937 |
// _XOPEN_SOURCE = 500 XPG5 |
| 938 |
// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6 |
| 939 |
// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7 |
| 940 |
// |
| 941 |
// In order to simplify the guards within the headers, the following |
| 942 |
// implementation private test macros have been created. Applications |
| 943 |
// must NOT use these private test macros as unexpected results will |
| 944 |
// occur. |
| 945 |
// |
| 946 |
// Note that in general, the use of these private macros is cumulative. |
| 947 |
// For example, the use of _XPG3 with no other restrictions on the X/Open |
| 948 |
// namespace will make the symbols visible for XPG3 through XPG6 |
| 949 |
// compilation environments. The use of _XPG4_2 with no other X/Open |
| 950 |
// namespace restrictions indicates that the symbols were introduced in |
| 951 |
// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation |
| 952 |
// environments, but not for XPG3 or XPG4 compilation environments. |
| 953 |
// |
| 954 |
// _XPG3 X/Open Portability Guide, Issue 3 (XPG3) |
| 955 |
// _XPG4 X/Open CAE Specification, Issue 4 (XPG4) |
| 956 |
// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS) |
| 957 |
// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2) |
| 958 |
// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3) |
| 959 |
// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4) |
| 960 |
|
| 961 |
// X/Open Portability Guide, Issue 3 |
| 962 |
|
| 963 |
// _XOPEN_VERSION is defined by the X/Open specifications and is not |
| 964 |
// normally defined by the application, except in the case of an XPG4 |
| 965 |
// application. On the implementation side, _XOPEN_VERSION defined with |
| 966 |
// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined |
| 967 |
// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application. |
| 968 |
// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98) |
| 969 |
// application and with a value of 600 indicates an XPG6 (UNIX 03) |
| 970 |
// application and with a value of 700 indicates an XPG7 (UNIX 08). |
| 971 |
// The appropriate version is determined by the use of the |
| 972 |
// feature test macros described earlier. The value of _XOPEN_VERSION |
| 973 |
// defaults to 3 otherwise indicating support for XPG3 applications. |
| 974 |
|
| 975 |
// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly |
| 976 |
// conforming environments. ISO 9899:1999 says it does. |
| 977 |
// |
| 978 |
// The presence of _LONGLONG_TYPE says "long long exists" which is therefore |
| 979 |
// defined in all but strictly conforming environments that disallow it. |
| 980 |
|
| 981 |
// The following macro defines a value for the ISO C99 restrict |
| 982 |
// keyword so that _RESTRICT_KYWD resolves to "restrict" if |
| 983 |
// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string) |
| 984 |
// if any other compiler is used. This allows for the use of single |
| 985 |
// prototype declarations regardless of compiler version. |
| 986 |
|
| 987 |
// The following macro defines a value for the ISO C11 _Noreturn |
| 988 |
// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if |
| 989 |
// an ISO C11 compiler is used and "" (null string) if any other |
| 990 |
// compiler is used. This allows for the use of single prototype |
| 991 |
// declarations regardless of compiler version. |
| 992 |
|
| 993 |
// ISO/IEC 9899:2011 Annex K |
| 994 |
|
| 995 |
// The following macro indicates header support for the ANSI C++ |
| 996 |
// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882. |
| 997 |
|
| 998 |
// The following macro indicates header support for the C99 standard, |
| 999 |
// ISO/IEC 9899:1999, Programming Languages - C. |
| 1000 |
|
| 1001 |
// The following macro indicates header support for the C11 standard, |
| 1002 |
// ISO/IEC 9899:2011, Programming Languages - C. |
| 1003 |
|
| 1004 |
// The following macro indicates header support for the C11 standard, |
| 1005 |
// ISO/IEC 9899:2011 Annex K, Programming Languages - C. |
| 1006 |
|
| 1007 |
// The following macro indicates header support for DTrace. The value is an |
| 1008 |
// integer that corresponds to the major version number for DTrace. |
| 1009 |
|
| 1010 |
// CDDL HEADER START |
| 1011 |
// |
| 1012 |
// The contents of this file are subject to the terms of the |
| 1013 |
// Common Development and Distribution License (the "License"). |
| 1014 |
// You may not use this file except in compliance with the License. |
| 1015 |
// |
| 1016 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 1017 |
// or http://www.opensolaris.org/os/licensing. |
| 1018 |
// See the License for the specific language governing permissions |
| 1019 |
// and limitations under the License. |
| 1020 |
// |
| 1021 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 1022 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 1023 |
// If applicable, add the following below this CDDL HEADER, with the |
| 1024 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 1025 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 1026 |
// |
| 1027 |
// CDDL HEADER END |
| 1028 |
// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T |
| 1029 |
// All Rights Reserved |
| 1030 |
|
| 1031 |
// Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
| 1032 |
// Use is subject to license terms. |
| 1033 |
// |
| 1034 |
// Copyright 2013 Nexenta Systems, Inc. All rights reserved. |
| 1035 |
// Copyright 2016 Joyent, Inc. |
| 1036 |
// Copyright 2021 Oxide Computer Company |
| 1037 |
|
| 1038 |
// DO NOT EDIT THIS FILE. |
| 1039 |
// |
| 1040 |
// It has been auto-edited by fixincludes from: |
| 1041 |
// |
| 1042 |
// "/usr/include/sys/feature_tests.h" |
| 1043 |
// |
| 1044 |
// This had to be done to correct non-standard usages in the |
| 1045 |
// original, manufacturer supplied header file. |
| 1046 |
|
| 1047 |
// CDDL HEADER START |
| 1048 |
// |
| 1049 |
// The contents of this file are subject to the terms of the |
| 1050 |
// Common Development and Distribution License (the "License"). |
| 1051 |
// You may not use this file except in compliance with the License. |
| 1052 |
// |
| 1053 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 1054 |
// or http://www.opensolaris.org/os/licensing. |
| 1055 |
// See the License for the specific language governing permissions |
| 1056 |
// and limitations under the License. |
| 1057 |
// |
| 1058 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 1059 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 1060 |
// If applicable, add the following below this CDDL HEADER, with the |
| 1061 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 1062 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 1063 |
// |
| 1064 |
// CDDL HEADER END |
| 1065 |
|
| 1066 |
// Copyright 2013 Garrett D'Amore <[email protected]> |
| 1067 |
// Copyright 2016 Joyent, Inc. |
| 1068 |
// Copyright 2022 Oxide Computer Company |
| 1069 |
// |
| 1070 |
// Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
| 1071 |
// Use is subject to license terms. |
| 1072 |
|
| 1073 |
// CDDL HEADER START |
| 1074 |
// |
| 1075 |
// The contents of this file are subject to the terms of the |
| 1076 |
// Common Development and Distribution License (the "License"). |
| 1077 |
// You may not use this file except in compliance with the License. |
| 1078 |
// |
| 1079 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 1080 |
// or http://www.opensolaris.org/os/licensing. |
| 1081 |
// See the License for the specific language governing permissions |
| 1082 |
// and limitations under the License. |
| 1083 |
// |
| 1084 |
// |
| 1085 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 1086 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 1087 |
// If applicable, add the following below this CDDL HEADER, with the |
| 1088 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 1089 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 1090 |
// |
| 1091 |
// CDDL HEADER END |
| 1092 |
|
| 1093 |
// Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
| 1094 |
// Use is subject to license terms. |
| 1095 |
// Copyright 2016 Joyent, Inc. |
| 1096 |
|
| 1097 |
// Machine dependent definitions moved to <sys/machtypes.h>. |
| 1098 |
// CDDL HEADER START |
| 1099 |
// |
| 1100 |
// The contents of this file are subject to the terms of the |
| 1101 |
// Common Development and Distribution License (the "License"). |
| 1102 |
// You may not use this file except in compliance with the License. |
| 1103 |
// |
| 1104 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 1105 |
// or http://www.opensolaris.org/os/licensing. |
| 1106 |
// See the License for the specific language governing permissions |
| 1107 |
// and limitations under the License. |
| 1108 |
// |
| 1109 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 1110 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 1111 |
// If applicable, add the following below this CDDL HEADER, with the |
| 1112 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 1113 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 1114 |
// |
| 1115 |
// CDDL HEADER END |
| 1116 |
// Copyright 2007 Sun Microsystems, Inc. All rights reserved. |
| 1117 |
// Use is subject to license terms. |
| 1118 |
|
| 1119 |
// Machine dependent types: |
| 1120 |
// |
| 1121 |
// intel ia32 Version |
| 1122 |
|
| 1123 |
type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */ |
| 1124 |
|
| 1125 |
// Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
| 1126 |
// Use is subject to license terms. |
| 1127 |
// |
| 1128 |
// Copyright 2011 Nexenta Systems, Inc. All rights reserved. |
| 1129 |
// Copyright 2015, Joyent, Inc. |
| 1130 |
// Copyright 2020 OmniOS Community Edition (OmniOSce) Association. |
| 1131 |
// Copyright (c) 1982, 1986 Regents of the University of California. |
| 1132 |
// All rights reserved. |
| 1133 |
// |
| 1134 |
// Redistribution and use in source and binary forms are permitted |
| 1135 |
// provided that this notice is preserved and that due credit is given |
| 1136 |
// to the University of California at Berkeley. The name of the University |
| 1137 |
// may not be used to endorse or promote products derived from this |
| 1138 |
// software without specific prior written permission. This software |
| 1139 |
// is provided ``as is'' without express or implied warranty. |
| 1140 |
|
| 1141 |
// Constants and structures defined by the internet system, |
| 1142 |
// according to following documents |
| 1143 |
// |
| 1144 |
// Internet ASSIGNED NUMBERS (RFC1700) and its successors: |
| 1145 |
// http://www.iana.org/assignments/protocol-numbers |
| 1146 |
// http://www.iana.org/assignments/port-numbers |
| 1147 |
// Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors) |
| 1148 |
// |
| 1149 |
|
| 1150 |
// DO NOT EDIT THIS FILE. |
| 1151 |
// |
| 1152 |
// It has been auto-edited by fixincludes from: |
| 1153 |
// |
| 1154 |
// "/usr/include/sys/feature_tests.h" |
| 1155 |
// |
| 1156 |
// This had to be done to correct non-standard usages in the |
| 1157 |
// original, manufacturer supplied header file. |
| 1158 |
|
| 1159 |
// CDDL HEADER START |
| 1160 |
// |
| 1161 |
// The contents of this file are subject to the terms of the |
| 1162 |
// Common Development and Distribution License (the "License"). |
| 1163 |
// You may not use this file except in compliance with the License. |
| 1164 |
// |
| 1165 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 1166 |
// or http://www.opensolaris.org/os/licensing. |
| 1167 |
// See the License for the specific language governing permissions |
| 1168 |
// and limitations under the License. |
| 1169 |
// |
| 1170 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 1171 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 1172 |
// If applicable, add the following below this CDDL HEADER, with the |
| 1173 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 1174 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 1175 |
// |
| 1176 |
// CDDL HEADER END |
| 1177 |
|
| 1178 |
// Copyright 2013 Garrett D'Amore <[email protected]> |
| 1179 |
// Copyright 2016 Joyent, Inc. |
| 1180 |
// Copyright 2022 Oxide Computer Company |
| 1181 |
// |
| 1182 |
// Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
| 1183 |
// Use is subject to license terms. |
| 1184 |
|
| 1185 |
// CDDL HEADER START |
| 1186 |
// |
| 1187 |
// The contents of this file are subject to the terms of the |
| 1188 |
// Common Development and Distribution License, Version 1.0 only |
| 1189 |
// (the "License"). You may not use this file except in compliance |
| 1190 |
// with the License. |
| 1191 |
// |
| 1192 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 1193 |
// or http://www.opensolaris.org/os/licensing. |
| 1194 |
// See the License for the specific language governing permissions |
| 1195 |
// and limitations under the License. |
| 1196 |
// |
| 1197 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 1198 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 1199 |
// If applicable, add the following below this CDDL HEADER, with the |
| 1200 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 1201 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 1202 |
// |
| 1203 |
// CDDL HEADER END |
| 1204 |
// Copyright 2004 Sun Microsystems, Inc. All rights reserved. |
| 1205 |
// Use is subject to license terms. |
| 1206 |
// Copyright 2015 EveryCity Ltd. All rights reserved. |
| 1207 |
// Copyright 2019 Joyent, Inc. |
| 1208 |
|
| 1209 |
// This file contains definitions designed to enable different compilers |
| 1210 |
// to be used harmoniously on Solaris systems. |
| 1211 |
|
| 1212 |
// Allow for version tests for compiler bugs and features. |
| 1213 |
|
| 1214 |
// analogous to lint's PRINTFLIKEn |
| 1215 |
|
| 1216 |
// Handle the kernel printf routines that can take '%b' too |
| 1217 |
|
| 1218 |
// This one's pretty obvious -- the function never returns |
| 1219 |
|
| 1220 |
// The function is 'extern inline' and expects GNU C89 behaviour, not C99 |
| 1221 |
// behaviour. |
| 1222 |
// |
| 1223 |
// Should only be used on 'extern inline' definitions for GCC. |
| 1224 |
|
| 1225 |
// The function has control flow such that it may return multiple times (in |
| 1226 |
// the manner of setjmp or vfork) |
| 1227 |
|
| 1228 |
// This is an appropriate label for functions that do not |
| 1229 |
// modify their arguments, e.g. strlen() |
| 1230 |
|
| 1231 |
// This is a stronger form of __pure__. Can be used for functions |
| 1232 |
// that do not modify their arguments and don't depend on global |
| 1233 |
// memory. |
| 1234 |
|
| 1235 |
// This attribute, attached to a variable, means that the variable is meant to |
| 1236 |
// be possibly unused. GCC will not produce a warning for this variable. |
| 1237 |
|
| 1238 |
// Shorthand versions for readability |
| 1239 |
|
| 1240 |
// In release build, disable warnings about variables |
| 1241 |
// which are used only for debugging. |
| 1242 |
|
| 1243 |
// CDDL HEADER START |
| 1244 |
// |
| 1245 |
// The contents of this file are subject to the terms of the |
| 1246 |
// Common Development and Distribution License (the "License"). |
| 1247 |
// You may not use this file except in compliance with the License. |
| 1248 |
// |
| 1249 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 1250 |
// or http://www.opensolaris.org/os/licensing. |
| 1251 |
// See the License for the specific language governing permissions |
| 1252 |
// and limitations under the License. |
| 1253 |
// |
| 1254 |
// |
| 1255 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 1256 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 1257 |
// If applicable, add the following below this CDDL HEADER, with the |
| 1258 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 1259 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 1260 |
// |
| 1261 |
// CDDL HEADER END |
| 1262 |
|
| 1263 |
// Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
| 1264 |
// Use is subject to license terms. |
| 1265 |
// Copyright 2016 Joyent, Inc. |
| 1266 |
|
| 1267 |
// This header file serves to group a set of well known defines and to |
| 1268 |
// set these for each instruction set architecture. These defines may |
| 1269 |
// be divided into two groups; characteristics of the processor and |
| 1270 |
// implementation choices for Solaris on a processor. |
| 1271 |
// |
| 1272 |
// Processor Characteristics: |
| 1273 |
// |
| 1274 |
// _LITTLE_ENDIAN / _BIG_ENDIAN: |
| 1275 |
// The natural byte order of the processor. A pointer to an int points |
| 1276 |
// to the least/most significant byte of that int. |
| 1277 |
// |
| 1278 |
// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD: |
| 1279 |
// The processor specific direction of stack growth. A push onto the |
| 1280 |
// stack increases/decreases the stack pointer, so it stores data at |
| 1281 |
// successively higher/lower addresses. (Stackless machines ignored |
| 1282 |
// without regrets). |
| 1283 |
// |
| 1284 |
// _LONG_LONG_HTOL / _LONG_LONG_LTOH: |
| 1285 |
// A pointer to a long long points to the most/least significant long |
| 1286 |
// within that long long. |
| 1287 |
// |
| 1288 |
// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH: |
| 1289 |
// The C compiler assigns bit fields from the high/low to the low/high end |
| 1290 |
// of an int (most to least significant vs. least to most significant). |
| 1291 |
// |
| 1292 |
// _IEEE_754: |
| 1293 |
// The processor (or supported implementations of the processor) |
| 1294 |
// supports the ieee-754 floating point standard. No other floating |
| 1295 |
// point standards are supported (or significant). Any other supported |
| 1296 |
// floating point formats are expected to be cased on the ISA processor |
| 1297 |
// symbol. |
| 1298 |
// |
| 1299 |
// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED: |
| 1300 |
// The C Compiler implements objects of type `char' as `unsigned' or |
| 1301 |
// `signed' respectively. This is really an implementation choice of |
| 1302 |
// the compiler writer, but it is specified in the ABI and tends to |
| 1303 |
// be uniform across compilers for an instruction set architecture. |
| 1304 |
// Hence, it has the properties of a processor characteristic. |
| 1305 |
// |
| 1306 |
// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT / |
| 1307 |
// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT / |
| 1308 |
// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT: |
| 1309 |
// The ABI defines alignment requirements of each of the primitive |
| 1310 |
// object types. Some, if not all, may be hardware requirements as |
| 1311 |
// well. The values are expressed in "byte-alignment" units. |
| 1312 |
// |
| 1313 |
// _MAX_ALIGNMENT: |
| 1314 |
// The most stringent alignment requirement as specified by the ABI. |
| 1315 |
// Equal to the maximum of all the above _XXX_ALIGNMENT values. |
| 1316 |
// |
| 1317 |
// _MAX_ALIGNMENT_TYPE: |
| 1318 |
// The name of the C type that has the value descried in _MAX_ALIGNMENT. |
| 1319 |
// |
| 1320 |
// _ALIGNMENT_REQUIRED: |
| 1321 |
// True or false (1 or 0) whether or not the hardware requires the ABI |
| 1322 |
// alignment. |
| 1323 |
// |
| 1324 |
// _LONG_LONG_ALIGNMENT_32 |
| 1325 |
// The 32-bit ABI supported by a 64-bit kernel may have different |
| 1326 |
// alignment requirements for primitive object types. The value of this |
| 1327 |
// identifier is expressed in "byte-alignment" units. |
| 1328 |
// |
| 1329 |
// _HAVE_CPUID_INSN |
| 1330 |
// This indicates that the architecture supports the 'cpuid' |
| 1331 |
// instruction as defined by Intel. (Intel allows other vendors |
| 1332 |
// to extend the instruction for their own purposes.) |
| 1333 |
// |
| 1334 |
// |
| 1335 |
// Implementation Choices: |
| 1336 |
// |
| 1337 |
// _ILP32 / _LP64: |
| 1338 |
// This specifies the compiler data type implementation as specified in |
| 1339 |
// the relevant ABI. The choice between these is strongly influenced |
| 1340 |
// by the underlying hardware, but is not absolutely tied to it. |
| 1341 |
// Currently only two data type models are supported: |
| 1342 |
// |
| 1343 |
// _ILP32: |
| 1344 |
// Int/Long/Pointer are 32 bits. This is the historical UNIX |
| 1345 |
// and Solaris implementation. Due to its historical standing, |
| 1346 |
// this is the default case. |
| 1347 |
// |
| 1348 |
// _LP64: |
| 1349 |
// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen |
| 1350 |
// implementation for 64-bit ABIs such as SPARC V9. |
| 1351 |
// |
| 1352 |
// _I32LPx: |
| 1353 |
// A compilation environment where 'int' is 32-bit, and |
| 1354 |
// longs and pointers are simply the same size. |
| 1355 |
// |
| 1356 |
// In all cases, Char is 8 bits and Short is 16 bits. |
| 1357 |
// |
| 1358 |
// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16: |
| 1359 |
// This specifies the form of the disk VTOC (or label): |
| 1360 |
// |
| 1361 |
// _SUNOS_VTOC_8: |
| 1362 |
// This is a VTOC form which is upwardly compatible with the |
| 1363 |
// SunOS 4.x disk label and allows 8 partitions per disk. |
| 1364 |
// |
| 1365 |
// _SUNOS_VTOC_16: |
| 1366 |
// In this format the incore vtoc image matches the ondisk |
| 1367 |
// version. It allows 16 slices per disk, and is not |
| 1368 |
// compatible with the SunOS 4.x disk label. |
| 1369 |
// |
| 1370 |
// Note that these are not the only two VTOC forms possible and |
| 1371 |
// additional forms may be added. One possible form would be the |
| 1372 |
// SVr4 VTOC form. The symbol for that is reserved now, although |
| 1373 |
// it is not implemented. |
| 1374 |
// |
| 1375 |
// _SVR4_VTOC_16: |
| 1376 |
// This VTOC form is compatible with the System V Release 4 |
| 1377 |
// VTOC (as implemented on the SVr4 Intel and 3b ports) with |
| 1378 |
// 16 partitions per disk. |
| 1379 |
// |
| 1380 |
// |
| 1381 |
// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR |
| 1382 |
// This describes the type of addresses used by system DMA: |
| 1383 |
// |
| 1384 |
// _DMA_USES_PHYSADDR: |
| 1385 |
// This type of DMA, used in the x86 implementation, |
| 1386 |
// requires physical addresses for DMA buffers. The 24-bit |
| 1387 |
// addresses used by some legacy boards is the source of the |
| 1388 |
// "low-memory" (<16MB) requirement for some devices using DMA. |
| 1389 |
// |
| 1390 |
// _DMA_USES_VIRTADDR: |
| 1391 |
// This method of DMA allows the use of virtual addresses for |
| 1392 |
// DMA transfers. |
| 1393 |
// |
| 1394 |
// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT |
| 1395 |
// This indicates the presence/absence of an fdisk table. |
| 1396 |
// |
| 1397 |
// _FIRMWARE_NEEDS_FDISK |
| 1398 |
// The fdisk table is required by system firmware. If present, |
| 1399 |
// it allows a disk to be subdivided into multiple fdisk |
| 1400 |
// partitions, each of which is equivalent to a separate, |
| 1401 |
// virtual disk. This enables the co-existence of multiple |
| 1402 |
// operating systems on a shared hard disk. |
| 1403 |
// |
| 1404 |
// _NO_FDISK_PRESENT |
| 1405 |
// If the fdisk table is absent, it is assumed that the entire |
| 1406 |
// media is allocated for a single operating system. |
| 1407 |
// |
| 1408 |
// _HAVE_TEM_FIRMWARE |
| 1409 |
// Defined if this architecture has the (fallback) option of |
| 1410 |
// using prom_* calls for doing I/O if a suitable kernel driver |
| 1411 |
// is not available to do it. |
| 1412 |
// |
| 1413 |
// _DONT_USE_1275_GENERIC_NAMES |
| 1414 |
// Controls whether or not device tree node names should |
| 1415 |
// comply with the IEEE 1275 "Generic Names" Recommended |
| 1416 |
// Practice. With _DONT_USE_GENERIC_NAMES, device-specific |
| 1417 |
// names identifying the particular device will be used. |
| 1418 |
// |
| 1419 |
// __i386_COMPAT |
| 1420 |
// This indicates whether the i386 ABI is supported as a *non-native* |
| 1421 |
// mode for the platform. When this symbol is defined: |
| 1422 |
// - 32-bit xstat-style system calls are enabled |
| 1423 |
// - 32-bit xmknod-style system calls are enabled |
| 1424 |
// - 32-bit system calls use i386 sizes -and- alignments |
| 1425 |
// |
| 1426 |
// Note that this is NOT defined for the i386 native environment! |
| 1427 |
// |
| 1428 |
// __x86 |
| 1429 |
// This is ONLY a synonym for defined(__i386) || defined(__amd64) |
| 1430 |
// which is useful only insofar as these two architectures share |
| 1431 |
// common attributes. Analogous to __sparc. |
| 1432 |
// |
| 1433 |
// _PSM_MODULES |
| 1434 |
// This indicates whether or not the implementation uses PSM |
| 1435 |
// modules for processor support, reading /etc/mach from inside |
| 1436 |
// the kernel to extract a list. |
| 1437 |
// |
| 1438 |
// _RTC_CONFIG |
| 1439 |
// This indicates whether or not the implementation uses /etc/rtc_config |
| 1440 |
// to configure the real-time clock in the kernel. |
| 1441 |
// |
| 1442 |
// _UNIX_KRTLD |
| 1443 |
// This indicates that the implementation uses a dynamically |
| 1444 |
// linked unix + krtld to form the core kernel image at boot |
| 1445 |
// time, or (in the absence of this symbol) a prelinked kernel image. |
| 1446 |
// |
| 1447 |
// _OBP |
| 1448 |
// This indicates the firmware interface is OBP. |
| 1449 |
// |
| 1450 |
// _SOFT_HOSTID |
| 1451 |
// This indicates that the implementation obtains the hostid |
| 1452 |
// from the file /etc/hostid, rather than from hardware. |
| 1453 |
|
| 1454 |
// The following set of definitions characterize Solaris on AMD's |
| 1455 |
// 64-bit systems. |
| 1456 |
|
| 1457 |
// Define the appropriate "processor characteristics" |
| 1458 |
|
| 1459 |
// Different alignment constraints for the i386 ABI in compatibility mode |
| 1460 |
|
| 1461 |
// Define the appropriate "implementation choices". |
| 1462 |
|
| 1463 |
// The feature test macro __i386 is generic for all processors implementing |
| 1464 |
// the Intel 386 instruction set or a superset of it. Specifically, this |
| 1465 |
// includes all members of the 386, 486, and Pentium family of processors. |
| 1466 |
|
| 1467 |
// Values of _POSIX_C_SOURCE |
| 1468 |
// |
| 1469 |
// undefined not a POSIX compilation |
| 1470 |
// 1 POSIX.1-1990 compilation |
| 1471 |
// 2 POSIX.2-1992 compilation |
| 1472 |
// 199309L POSIX.1b-1993 compilation (Real Time) |
| 1473 |
// 199506L POSIX.1c-1995 compilation (POSIX Threads) |
| 1474 |
// 200112L POSIX.1-2001 compilation (Austin Group Revision) |
| 1475 |
// 200809L POSIX.1-2008 compilation |
| 1476 |
|
| 1477 |
// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS, |
| 1478 |
// and _STDC_C99 are Sun implementation specific macros created in order to |
| 1479 |
// compress common standards specified feature test macros for easier reading. |
| 1480 |
// These macros should not be used by the application developer as |
| 1481 |
// unexpected results may occur. Instead, the user should reference |
| 1482 |
// standards(7) for correct usage of the standards feature test macros. |
| 1483 |
// |
| 1484 |
// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both |
| 1485 |
// X/Open or POSIX or in the negative, when neither |
| 1486 |
// X/Open or POSIX defines a symbol. |
| 1487 |
// |
| 1488 |
// _STRICT_STDC __STDC__ is specified by the C Standards and defined |
| 1489 |
// by the compiler. For Sun compilers the value of |
| 1490 |
// __STDC__ is either 1, 0, or not defined based on the |
| 1491 |
// compilation mode (see cc(1)). When the value of |
| 1492 |
// __STDC__ is 1 and in the absence of any other feature |
| 1493 |
// test macros, the namespace available to the application |
| 1494 |
// is limited to only those symbols defined by the C |
| 1495 |
// Standard. _STRICT_STDC provides a more readable means |
| 1496 |
// of identifying symbols defined by the standard, or in |
| 1497 |
// the negative, symbols that are extensions to the C |
| 1498 |
// Standard. See additional comments for GNU C differences. |
| 1499 |
// |
| 1500 |
// _STDC_C99 __STDC_VERSION__ is specified by the C standards and |
| 1501 |
// defined by the compiler and indicates the version of |
| 1502 |
// the C standard. A value of 199901L indicates a |
| 1503 |
// compiler that complies with ISO/IEC 9899:1999, other- |
| 1504 |
// wise known as the C99 standard. |
| 1505 |
// |
| 1506 |
// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__ |
| 1507 |
// is 201112L indicating a compiler that compiles with |
| 1508 |
// ISO/IEC 9899:2011, otherwise known as the C11 standard. |
| 1509 |
// |
| 1510 |
// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted |
| 1511 |
// by the standards, and the user has not explicitly |
| 1512 |
// relaxed the strictness via __EXTENSIONS__. |
| 1513 |
|
| 1514 |
// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC |
| 1515 |
// 99899:2011 specify the following predefined macro name: |
| 1516 |
// |
| 1517 |
// __STDC__ The integer constant 1, intended to indicate a conforming |
| 1518 |
// implementation. |
| 1519 |
// |
| 1520 |
// Furthermore, a strictly conforming program shall use only those features |
| 1521 |
// of the language and library specified in these standards. A conforming |
| 1522 |
// implementation shall accept any strictly conforming program. |
| 1523 |
// |
| 1524 |
// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for |
| 1525 |
// strictly conforming environments and __STDC__ to 0 for environments that |
| 1526 |
// use ANSI C semantics but allow extensions to the C standard. For non-ANSI |
| 1527 |
// C semantics, Sun's C compiler does not define __STDC__. |
| 1528 |
// |
| 1529 |
// The GNU C project interpretation is that __STDC__ should always be defined |
| 1530 |
// to 1 for compilation modes that accept ANSI C syntax regardless of whether |
| 1531 |
// or not extensions to the C standard are used. Violations of conforming |
| 1532 |
// behavior are conditionally flagged as warnings via the use of the |
| 1533 |
// -pedantic option. In addition to defining __STDC__ to 1, the GNU C |
| 1534 |
// compiler also defines __STRICT_ANSI__ as a means of specifying strictly |
| 1535 |
// conforming environments using the -ansi or -std=<standard> options. |
| 1536 |
// |
| 1537 |
// In the absence of any other compiler options, Sun and GNU set the value |
| 1538 |
// of __STDC__ as follows when using the following options: |
| 1539 |
// |
| 1540 |
// Value of __STDC__ __STRICT_ANSI__ |
| 1541 |
// |
| 1542 |
// cc -Xa (default) 0 undefined |
| 1543 |
// cc -Xt (transitional) 0 undefined |
| 1544 |
// cc -Xc (strictly conforming) 1 undefined |
| 1545 |
// cc -Xs (K&R C) undefined undefined |
| 1546 |
// |
| 1547 |
// gcc (default) 1 undefined |
| 1548 |
// gcc -ansi, -std={c89, c99,...) 1 defined |
| 1549 |
// gcc -traditional (K&R) undefined undefined |
| 1550 |
// |
| 1551 |
// The default compilation modes for Sun C compilers versus GNU C compilers |
| 1552 |
// results in a differing value for __STDC__ which results in a more |
| 1553 |
// restricted namespace when using Sun compilers. To allow both GNU and Sun |
| 1554 |
// interpretations to peacefully co-exist, we use the following Sun |
| 1555 |
// implementation _STRICT_STDC_ macro: |
| 1556 |
|
| 1557 |
// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011 |
| 1558 |
|
| 1559 |
// Use strict symbol visibility. |
| 1560 |
|
| 1561 |
// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are |
| 1562 |
// governed by POSIX, but have not been governed by ISO C. One can go two ways |
| 1563 |
// on what should happen if an application actively includes (not transitively) |
| 1564 |
// a header that isn't part of the ISO C spec, we opt to say that if someone has |
| 1565 |
// gone out of there way then they're doing it for a reason and that is an act |
| 1566 |
// of non-compliance and therefore it's not up to us to hide away every symbol. |
| 1567 |
// |
| 1568 |
// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for |
| 1569 |
// cases where in the past we have only used a POSIX related check and we don't |
| 1570 |
// wish to make something stricter. Often applications are relying on the |
| 1571 |
// ability to, or more realistically unwittingly, have _STRICT_STDC declared and |
| 1572 |
// still use these interfaces. |
| 1573 |
|
| 1574 |
// Large file interfaces: |
| 1575 |
// |
| 1576 |
// _LARGEFILE_SOURCE |
| 1577 |
// 1 large file-related additions to POSIX |
| 1578 |
// interfaces requested (fseeko, etc.) |
| 1579 |
// _LARGEFILE64_SOURCE |
| 1580 |
// 1 transitional large-file-related interfaces |
| 1581 |
// requested (seek64, stat64, etc.) |
| 1582 |
// |
| 1583 |
// The corresponding announcement macros are respectively: |
| 1584 |
// _LFS_LARGEFILE |
| 1585 |
// _LFS64_LARGEFILE |
| 1586 |
// (These are set in <unistd.h>.) |
| 1587 |
// |
| 1588 |
// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as |
| 1589 |
// well. |
| 1590 |
// |
| 1591 |
// The large file interfaces are made visible regardless of the initial values |
| 1592 |
// of the feature test macros under certain circumstances: |
| 1593 |
// - If no explicit standards-conforming environment is requested (neither |
| 1594 |
// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of |
| 1595 |
// __STDC__ does not imply standards conformance). |
| 1596 |
// - Extended system interfaces are explicitly requested (__EXTENSIONS__ |
| 1597 |
// is defined). |
| 1598 |
// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is |
| 1599 |
// defined). (Note that this dependency is an artifact of the current |
| 1600 |
// kernel implementation and may change in future releases.) |
| 1601 |
|
| 1602 |
// Large file compilation environment control: |
| 1603 |
// |
| 1604 |
// The setting of _FILE_OFFSET_BITS controls the size of various file-related |
| 1605 |
// types and governs the mapping between file-related source function symbol |
| 1606 |
// names and the corresponding binary entry points. |
| 1607 |
// |
| 1608 |
// In the 32-bit environment, the default value is 32; if not set, set it to |
| 1609 |
// the default here, to simplify tests in other headers. |
| 1610 |
// |
| 1611 |
// In the 64-bit compilation environment, the only value allowed is 64. |
| 1612 |
|
| 1613 |
// Use of _XOPEN_SOURCE |
| 1614 |
// |
| 1615 |
// The following X/Open specifications are supported: |
| 1616 |
// |
| 1617 |
// X/Open Portability Guide, Issue 3 (XPG3) |
| 1618 |
// X/Open CAE Specification, Issue 4 (XPG4) |
| 1619 |
// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2) |
| 1620 |
// X/Open CAE Specification, Issue 5 (XPG5) |
| 1621 |
// Open Group Technical Standard, Issue 6 (XPG6), also referred to as |
| 1622 |
// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002. |
| 1623 |
// Open Group Technical Standard, Issue 7 (XPG7), also referred to as |
| 1624 |
// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009. |
| 1625 |
// |
| 1626 |
// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1). |
| 1627 |
// XPG5 is also referred to as UNIX 98 or the Single Unix Specification, |
| 1628 |
// Version 2 (SUSv2) |
| 1629 |
// XPG6 is the result of a merge of the X/Open and POSIX specifications |
| 1630 |
// and as such is also referred to as IEEE Std. 1003.1-2001 in |
| 1631 |
// addition to UNIX 03 and SUSv3. |
| 1632 |
// XPG7 is also referred to as UNIX 08 and SUSv4. |
| 1633 |
// |
| 1634 |
// When writing a conforming X/Open application, as per the specification |
| 1635 |
// requirements, the appropriate feature test macros must be defined at |
| 1636 |
// compile time. These are as follows. For more info, see standards(7). |
| 1637 |
// |
| 1638 |
// Feature Test Macro Specification |
| 1639 |
// ------------------------------------------------ ------------- |
| 1640 |
// _XOPEN_SOURCE XPG3 |
| 1641 |
// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 |
| 1642 |
// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 |
| 1643 |
// _XOPEN_SOURCE = 500 XPG5 |
| 1644 |
// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6 |
| 1645 |
// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7 |
| 1646 |
// |
| 1647 |
// In order to simplify the guards within the headers, the following |
| 1648 |
// implementation private test macros have been created. Applications |
| 1649 |
// must NOT use these private test macros as unexpected results will |
| 1650 |
// occur. |
| 1651 |
// |
| 1652 |
// Note that in general, the use of these private macros is cumulative. |
| 1653 |
// For example, the use of _XPG3 with no other restrictions on the X/Open |
| 1654 |
// namespace will make the symbols visible for XPG3 through XPG6 |
| 1655 |
// compilation environments. The use of _XPG4_2 with no other X/Open |
| 1656 |
// namespace restrictions indicates that the symbols were introduced in |
| 1657 |
// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation |
| 1658 |
// environments, but not for XPG3 or XPG4 compilation environments. |
| 1659 |
// |
| 1660 |
// _XPG3 X/Open Portability Guide, Issue 3 (XPG3) |
| 1661 |
// _XPG4 X/Open CAE Specification, Issue 4 (XPG4) |
| 1662 |
// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS) |
| 1663 |
// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2) |
| 1664 |
// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3) |
| 1665 |
// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4) |
| 1666 |
|
| 1667 |
// X/Open Portability Guide, Issue 3 |
| 1668 |
|
| 1669 |
// _XOPEN_VERSION is defined by the X/Open specifications and is not |
| 1670 |
// normally defined by the application, except in the case of an XPG4 |
| 1671 |
// application. On the implementation side, _XOPEN_VERSION defined with |
| 1672 |
// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined |
| 1673 |
// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application. |
| 1674 |
// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98) |
| 1675 |
// application and with a value of 600 indicates an XPG6 (UNIX 03) |
| 1676 |
// application and with a value of 700 indicates an XPG7 (UNIX 08). |
| 1677 |
// The appropriate version is determined by the use of the |
| 1678 |
// feature test macros described earlier. The value of _XOPEN_VERSION |
| 1679 |
// defaults to 3 otherwise indicating support for XPG3 applications. |
| 1680 |
|
| 1681 |
// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly |
| 1682 |
// conforming environments. ISO 9899:1999 says it does. |
| 1683 |
// |
| 1684 |
// The presence of _LONGLONG_TYPE says "long long exists" which is therefore |
| 1685 |
// defined in all but strictly conforming environments that disallow it. |
| 1686 |
|
| 1687 |
// The following macro defines a value for the ISO C99 restrict |
| 1688 |
// keyword so that _RESTRICT_KYWD resolves to "restrict" if |
| 1689 |
// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string) |
| 1690 |
// if any other compiler is used. This allows for the use of single |
| 1691 |
// prototype declarations regardless of compiler version. |
| 1692 |
|
| 1693 |
// The following macro defines a value for the ISO C11 _Noreturn |
| 1694 |
// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if |
| 1695 |
// an ISO C11 compiler is used and "" (null string) if any other |
| 1696 |
// compiler is used. This allows for the use of single prototype |
| 1697 |
// declarations regardless of compiler version. |
| 1698 |
|
| 1699 |
// ISO/IEC 9899:2011 Annex K |
| 1700 |
|
| 1701 |
// The following macro indicates header support for the ANSI C++ |
| 1702 |
// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882. |
| 1703 |
|
| 1704 |
// The following macro indicates header support for the C99 standard, |
| 1705 |
// ISO/IEC 9899:1999, Programming Languages - C. |
| 1706 |
|
| 1707 |
// The following macro indicates header support for the C11 standard, |
| 1708 |
// ISO/IEC 9899:2011, Programming Languages - C. |
| 1709 |
|
| 1710 |
// The following macro indicates header support for the C11 standard, |
| 1711 |
// ISO/IEC 9899:2011 Annex K, Programming Languages - C. |
| 1712 |
|
| 1713 |
// The following macro indicates header support for DTrace. The value is an |
| 1714 |
// integer that corresponds to the major version number for DTrace. |
| 1715 |
|
| 1716 |
// CDDL HEADER START |
| 1717 |
// |
| 1718 |
// The contents of this file are subject to the terms of the |
| 1719 |
// Common Development and Distribution License (the "License"). |
| 1720 |
// You may not use this file except in compliance with the License. |
| 1721 |
// |
| 1722 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 1723 |
// or http://www.opensolaris.org/os/licensing. |
| 1724 |
// See the License for the specific language governing permissions |
| 1725 |
// and limitations under the License. |
| 1726 |
// |
| 1727 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 1728 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 1729 |
// If applicable, add the following below this CDDL HEADER, with the |
| 1730 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 1731 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 1732 |
// |
| 1733 |
// CDDL HEADER END |
| 1734 |
// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T |
| 1735 |
// All Rights Reserved |
| 1736 |
|
| 1737 |
// Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
| 1738 |
// Use is subject to license terms. |
| 1739 |
// |
| 1740 |
// Copyright 2013 Nexenta Systems, Inc. All rights reserved. |
| 1741 |
// Copyright 2016 Joyent, Inc. |
| 1742 |
// Copyright 2021 Oxide Computer Company |
| 1743 |
|
| 1744 |
// DO NOT EDIT THIS FILE. |
| 1745 |
// |
| 1746 |
// It has been auto-edited by fixincludes from: |
| 1747 |
// |
| 1748 |
// "/usr/include/sys/feature_tests.h" |
| 1749 |
// |
| 1750 |
// This had to be done to correct non-standard usages in the |
| 1751 |
// original, manufacturer supplied header file. |
| 1752 |
|
| 1753 |
// CDDL HEADER START |
| 1754 |
// |
| 1755 |
// The contents of this file are subject to the terms of the |
| 1756 |
// Common Development and Distribution License (the "License"). |
| 1757 |
// You may not use this file except in compliance with the License. |
| 1758 |
// |
| 1759 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 1760 |
// or http://www.opensolaris.org/os/licensing. |
| 1761 |
// See the License for the specific language governing permissions |
| 1762 |
// and limitations under the License. |
| 1763 |
// |
| 1764 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 1765 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 1766 |
// If applicable, add the following below this CDDL HEADER, with the |
| 1767 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 1768 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 1769 |
// |
| 1770 |
// CDDL HEADER END |
| 1771 |
|
| 1772 |
// Copyright 2013 Garrett D'Amore <[email protected]> |
| 1773 |
// Copyright 2016 Joyent, Inc. |
| 1774 |
// Copyright 2022 Oxide Computer Company |
| 1775 |
// |
| 1776 |
// Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
| 1777 |
// Use is subject to license terms. |
| 1778 |
|
| 1779 |
// CDDL HEADER START |
| 1780 |
// |
| 1781 |
// The contents of this file are subject to the terms of the |
| 1782 |
// Common Development and Distribution License (the "License"). |
| 1783 |
// You may not use this file except in compliance with the License. |
| 1784 |
// |
| 1785 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 1786 |
// or http://www.opensolaris.org/os/licensing. |
| 1787 |
// See the License for the specific language governing permissions |
| 1788 |
// and limitations under the License. |
| 1789 |
// |
| 1790 |
// |
| 1791 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 1792 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 1793 |
// If applicable, add the following below this CDDL HEADER, with the |
| 1794 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 1795 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 1796 |
// |
| 1797 |
// CDDL HEADER END |
| 1798 |
|
| 1799 |
// Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
| 1800 |
// Use is subject to license terms. |
| 1801 |
// Copyright 2016 Joyent, Inc. |
| 1802 |
|
| 1803 |
// Machine dependent definitions moved to <sys/machtypes.h>. |
| 1804 |
// CDDL HEADER START |
| 1805 |
// |
| 1806 |
// The contents of this file are subject to the terms of the |
| 1807 |
// Common Development and Distribution License (the "License"). |
| 1808 |
// You may not use this file except in compliance with the License. |
| 1809 |
// |
| 1810 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 1811 |
// or http://www.opensolaris.org/os/licensing. |
| 1812 |
// See the License for the specific language governing permissions |
| 1813 |
// and limitations under the License. |
| 1814 |
// |
| 1815 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 1816 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 1817 |
// If applicable, add the following below this CDDL HEADER, with the |
| 1818 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 1819 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 1820 |
// |
| 1821 |
// CDDL HEADER END |
| 1822 |
// Copyright 2007 Sun Microsystems, Inc. All rights reserved. |
| 1823 |
// Use is subject to license terms. |
| 1824 |
|
| 1825 |
// Machine dependent types: |
| 1826 |
// |
| 1827 |
// intel ia32 Version |
| 1828 |
|
| 1829 |
type Label_t = X_label_t /* machtypes.h:59:54 */ |
| 1830 |
|
| 1831 |
type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait |
| 1832 |
|
| 1833 |
// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C |
| 1834 |
// committee's working draft for the revision of the current ISO C standard, |
| 1835 |
// ISO/IEC 9899:1990 Programming language - C. These are not currently |
| 1836 |
// required by any standard but constitute a useful, general purpose set |
| 1837 |
// of type definitions which is namespace clean with respect to all standards. |
| 1838 |
// CDDL HEADER START |
| 1839 |
// |
| 1840 |
// The contents of this file are subject to the terms of the |
| 1841 |
// Common Development and Distribution License, Version 1.0 only |
| 1842 |
// (the "License"). You may not use this file except in compliance |
| 1843 |
// with the License. |
| 1844 |
// |
| 1845 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 1846 |
// or http://www.opensolaris.org/os/licensing. |
| 1847 |
// See the License for the specific language governing permissions |
| 1848 |
// and limitations under the License. |
| 1849 |
// |
| 1850 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 1851 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 1852 |
// If applicable, add the following below this CDDL HEADER, with the |
| 1853 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 1854 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 1855 |
// |
| 1856 |
// CDDL HEADER END |
| 1857 |
// Copyright 2014 Garrett D'Amore <[email protected]> |
| 1858 |
// |
| 1859 |
// Copyright 2004 Sun Microsystems, Inc. All rights reserved. |
| 1860 |
// Use is subject to license terms. |
| 1861 |
|
| 1862 |
// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation |
| 1863 |
// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999 |
| 1864 |
// Programming language - C. |
| 1865 |
// |
| 1866 |
// Programs/Modules should not directly include this file. Access to the |
| 1867 |
// types defined in this file should be through the inclusion of one of the |
| 1868 |
// following files: |
| 1869 |
// |
| 1870 |
// <sys/types.h> Provides only the "_t" types defined in this |
| 1871 |
// file which is a subset of the contents of |
| 1872 |
// <inttypes.h>. (This can be appropriate for |
| 1873 |
// all programs/modules except those claiming |
| 1874 |
// ANSI-C conformance.) |
| 1875 |
// |
| 1876 |
// <sys/inttypes.h> Provides the Kernel and Driver appropriate |
| 1877 |
// components of <inttypes.h>. |
| 1878 |
// |
| 1879 |
// <inttypes.h> For use by applications. |
| 1880 |
// |
| 1881 |
// See these files for more details. |
| 1882 |
|
| 1883 |
// DO NOT EDIT THIS FILE. |
| 1884 |
// |
| 1885 |
// It has been auto-edited by fixincludes from: |
| 1886 |
// |
| 1887 |
// "/usr/include/sys/feature_tests.h" |
| 1888 |
// |
| 1889 |
// This had to be done to correct non-standard usages in the |
| 1890 |
// original, manufacturer supplied header file. |
| 1891 |
|
| 1892 |
// CDDL HEADER START |
| 1893 |
// |
| 1894 |
// The contents of this file are subject to the terms of the |
| 1895 |
// Common Development and Distribution License (the "License"). |
| 1896 |
// You may not use this file except in compliance with the License. |
| 1897 |
// |
| 1898 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 1899 |
// or http://www.opensolaris.org/os/licensing. |
| 1900 |
// See the License for the specific language governing permissions |
| 1901 |
// and limitations under the License. |
| 1902 |
// |
| 1903 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 1904 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 1905 |
// If applicable, add the following below this CDDL HEADER, with the |
| 1906 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 1907 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 1908 |
// |
| 1909 |
// CDDL HEADER END |
| 1910 |
|
| 1911 |
// Copyright 2013 Garrett D'Amore <[email protected]> |
| 1912 |
// Copyright 2016 Joyent, Inc. |
| 1913 |
// Copyright 2022 Oxide Computer Company |
| 1914 |
// |
| 1915 |
// Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
| 1916 |
// Use is subject to license terms. |
| 1917 |
|
| 1918 |
// Basic / Extended integer types |
| 1919 |
// |
| 1920 |
// The following defines the basic fixed-size integer types. |
| 1921 |
// |
| 1922 |
// Implementations are free to typedef them to Standard C integer types or |
| 1923 |
// extensions that they support. If an implementation does not support one |
| 1924 |
// of the particular integer data types below, then it should not define the |
| 1925 |
// typedefs and macros corresponding to that data type. Note that int8_t |
| 1926 |
// is not defined in -Xs mode on ISAs for which the ABI specifies "char" |
| 1927 |
// as an unsigned entity because there is no way to define an eight bit |
| 1928 |
// signed integral. |
| 1929 |
type Int8_t = int8 /* int_types.h:75:16 */ |
| 1930 |
type Int16_t = int16 /* int_types.h:79:17 */ |
| 1931 |
type Int32_t = int32 /* int_types.h:80:15 */ |
| 1932 |
type Int64_t = int64 /* int_types.h:83:16 */ |
| 1933 |
|
| 1934 |
type Uint8_t = uint8 /* int_types.h:91:24 */ |
| 1935 |
type Uint16_t = uint16 /* int_types.h:92:25 */ |
| 1936 |
type Uint32_t = uint32 /* int_types.h:93:23 */ |
| 1937 |
type Uint64_t = uint64 /* int_types.h:95:24 */ |
| 1938 |
|
| 1939 |
// intmax_t and uintmax_t are to be the longest (in number of bits) signed |
| 1940 |
// and unsigned integer types supported by the implementation. |
| 1941 |
type Intmax_t = int64 /* int_types.h:107:19 */ |
| 1942 |
type Uintmax_t = uint64 /* int_types.h:108:19 */ |
| 1943 |
|
| 1944 |
// intptr_t and uintptr_t are signed and unsigned integer types large enough |
| 1945 |
// to hold any data pointer; that is, data pointers can be assigned into or |
| 1946 |
// from these integer types without losing precision. |
| 1947 |
type Intptr_t = int64 /* int_types.h:120:16 */ |
| 1948 |
type Uintptr_t = uint64 /* int_types.h:121:24 */ |
| 1949 |
|
| 1950 |
// The following define the fastest integer types that can hold the |
| 1951 |
// specified number of bits. |
| 1952 |
type Int_fast8_t = int8 /* int_types.h:132:16 */ |
| 1953 |
type Int_fast16_t = int32 /* int_types.h:136:15 */ |
| 1954 |
type Int_fast32_t = int32 /* int_types.h:137:15 */ |
| 1955 |
type Int_fast64_t = int64 /* int_types.h:139:16 */ |
| 1956 |
|
| 1957 |
type Uint_fast8_t = uint8 /* int_types.h:146:24 */ |
| 1958 |
type Uint_fast16_t = uint32 /* int_types.h:147:23 */ |
| 1959 |
type Uint_fast32_t = uint32 /* int_types.h:148:23 */ |
| 1960 |
type Uint_fast64_t = uint64 /* int_types.h:150:24 */ |
| 1961 |
|
| 1962 |
// The following define the smallest integer types that can hold the |
| 1963 |
// specified number of bits. |
| 1964 |
type Int_least8_t = int8 /* int_types.h:162:16 */ |
| 1965 |
type Int_least16_t = int16 /* int_types.h:166:17 */ |
| 1966 |
type Int_least32_t = int32 /* int_types.h:167:15 */ |
| 1967 |
type Int_least64_t = int64 /* int_types.h:169:16 */ |
| 1968 |
|
| 1969 |
// If these are changed, please update char16_t and char32_t in head/uchar.h. |
| 1970 |
type Uint_least8_t = uint8 /* int_types.h:179:24 */ |
| 1971 |
type Uint_least16_t = uint16 /* int_types.h:180:25 */ |
| 1972 |
type Uint_least32_t = uint32 /* int_types.h:181:23 */ |
| 1973 |
type Uint_least64_t = uint64 /* int_types.h:183:24 */ |
| 1974 |
|
| 1975 |
// Strictly conforming ANSI C environments prior to the 1999 |
| 1976 |
// revision of the C Standard (ISO/IEC 9899:1999) do not have |
| 1977 |
// the long long data type. |
| 1978 |
type Longlong_t = int64 /* types.h:72:20 */ |
| 1979 |
type U_longlong_t = uint64 /* types.h:73:28 */ |
| 1980 |
|
| 1981 |
// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had |
| 1982 |
// to use them instead of int32_t and uint32_t because DEC had |
| 1983 |
// shipped 64-bit wide. |
| 1984 |
type T_scalar_t = int32 /* types.h:92:18 */ |
| 1985 |
type T_uscalar_t = uint32 /* types.h:93:18 */ |
| 1986 |
|
| 1987 |
// POSIX Extensions |
| 1988 |
type Uchar_t = uint8 /* types.h:102:23 */ |
| 1989 |
type Ushort_t = uint16 /* types.h:103:24 */ |
| 1990 |
type Uint_t = uint32 /* types.h:104:22 */ |
| 1991 |
type Ulong_t = uint64 /* types.h:105:23 */ |
| 1992 |
|
| 1993 |
type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type |
| 1994 |
type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type |
| 1995 |
type Cnt_t = int16 /* types.h:109:16 */ // pointer difference |
| 1996 |
|
| 1997 |
// VM-related types |
| 1998 |
type Pfn_t = uint64 /* types.h:123:18 */ // page frame number |
| 1999 |
type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages |
| 2000 |
type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages |
| 2001 |
|
| 2002 |
type Use_t = uint8 /* types.h:127:18 */ // use count for swap. |
| 2003 |
type Sysid_t = int16 /* types.h:128:16 */ |
| 2004 |
type Index_t = int16 /* types.h:129:16 */ |
| 2005 |
type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F) |
| 2006 |
type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F) |
| 2007 |
|
| 2008 |
// The size of off_t and related types depends on the setting of |
| 2009 |
// _FILE_OFFSET_BITS. (Note that other system headers define other types |
| 2010 |
// related to those defined here.) |
| 2011 |
// |
| 2012 |
// If _LARGEFILE64_SOURCE is defined, variants of these types that are |
| 2013 |
// explicitly 64 bits wide become available. |
| 2014 |
|
| 2015 |
type Off_t = int64 /* types.h:145:15 */ // offsets within files |
| 2016 |
|
| 2017 |
type Off64_t = int64 /* types.h:152:16 */ // offsets within files |
| 2018 |
|
| 2019 |
type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type |
| 2020 |
type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks |
| 2021 |
type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks |
| 2022 |
type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files |
| 2023 |
|
| 2024 |
type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type |
| 2025 |
type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks |
| 2026 |
type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks |
| 2027 |
type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files |
| 2028 |
|
| 2029 |
type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes |
| 2030 |
|
| 2031 |
// The boolean_t type has had a varied amount of exposure over the years in |
| 2032 |
// terms of how its enumeration constants have been exposed. In particular, it |
| 2033 |
// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the |
| 2034 |
// B_TRUE and B_FALSE with an underscore. This check never included the |
| 2035 |
// question of if we were in a strict ANSI C environment or whether extensions |
| 2036 |
// were defined. |
| 2037 |
// |
| 2038 |
// Compilers such as clang started defaulting to always including an |
| 2039 |
// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__. |
| 2040 |
// This would lead most software that had used the non-underscore versions to |
| 2041 |
// need it. As such, we have adjusted the non-strict XOPEN environment to retain |
| 2042 |
// its old behavior so as to minimize namespace pollution; however, we instead |
| 2043 |
// include both variants of the definitions in the generally visible version |
| 2044 |
// allowing software written in either world to hopefully end up in a good |
| 2045 |
// place. |
| 2046 |
// |
| 2047 |
// This isn't perfect, but should hopefully minimize the pain for folks actually |
| 2048 |
// trying to build software. |
| 2049 |
type Boolean_t = uint32 /* types.h:215:69 */ |
| 2050 |
|
| 2051 |
// The {u,}pad64_t types can be used in structures such that those structures |
| 2052 |
// may be accessed by code produced by compilation environments which don't |
| 2053 |
// support a 64 bit integral datatype. The intention is not to allow |
| 2054 |
// use of these fields in such environments, but to maintain the alignment |
| 2055 |
// and offsets of the structure. |
| 2056 |
// |
| 2057 |
// Similar comments for {u,}pad128_t. |
| 2058 |
// |
| 2059 |
// Note that these types do NOT generate any stronger alignment constraints |
| 2060 |
// than those available in the underlying ABI. See <sys/isa_defs.h> |
| 2061 |
type Pad64_t = int64 /* types.h:240:18 */ |
| 2062 |
type Upad64_t = uint64 /* types.h:241:18 */ |
| 2063 |
|
| 2064 |
type Pad128_t = struct { |
| 2065 |
F_q float64 |
| 2066 |
F__ccgo_pad1 [8]byte |
| 2067 |
} /* types.h:257:3 */ |
| 2068 |
|
| 2069 |
type Upad128_t = struct { |
| 2070 |
F_q float64 |
| 2071 |
F__ccgo_pad1 [8]byte |
| 2072 |
} /* types.h:262:3 */ |
| 2073 |
|
| 2074 |
type Offset_t = int64 /* types.h:264:20 */ |
| 2075 |
type U_offset_t = uint64 /* types.h:265:22 */ |
| 2076 |
type Len_t = uint64 /* types.h:266:22 */ |
| 2077 |
type Diskaddr_t = uint64 /* types.h:267:22 */ |
| 2078 |
|
| 2079 |
// Definitions remaining from previous partial support for 64-bit file |
| 2080 |
// offsets. This partial support for devices greater than 2gb requires |
| 2081 |
// compiler support for long long. |
| 2082 |
type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */ |
| 2083 |
|
| 2084 |
type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */ |
| 2085 |
|
| 2086 |
type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type |
| 2087 |
|
| 2088 |
// The following type is for various kinds of identifiers. The |
| 2089 |
// actual type must be the same for all since some system calls |
| 2090 |
// (such as sigsend) take arguments that may be any of these |
| 2091 |
// types. The enumeration type idtype_t defined in sys/procset.h |
| 2092 |
// is used to indicate what type of id is being specified -- |
| 2093 |
// a process id, process group id, session id, scheduling class id, |
| 2094 |
// user id, group id, project id, task id or zone id. |
| 2095 |
type Id_t = int32 /* types.h:329:14 */ |
| 2096 |
|
| 2097 |
type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID |
| 2098 |
|
| 2099 |
// Type useconds_t is an unsigned integral type capable of storing |
| 2100 |
// values at least in the range of zero to 1,000,000. |
| 2101 |
type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds |
| 2102 |
|
| 2103 |
type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds |
| 2104 |
|
| 2105 |
// Typedefs for dev_t components. |
| 2106 |
type Major_t = uint32 /* types.h:351:16 */ // major part of device number |
| 2107 |
type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number |
| 2108 |
|
| 2109 |
// The data type of a thread priority. |
| 2110 |
type Pri_t = int16 /* types.h:361:15 */ |
| 2111 |
|
| 2112 |
// The data type for a CPU flags field. (Can be extended to larger unsigned |
| 2113 |
// types, if needed, limited by ability to update atomically.) |
| 2114 |
type Cpu_flag_t = uint16 /* types.h:367:18 */ |
| 2115 |
|
| 2116 |
// For compatibility reasons the following typedefs (prefixed o_) |
| 2117 |
// can't grow regardless of the EFT definition. Although, |
| 2118 |
// applications should not explicitly use these typedefs |
| 2119 |
// they may be included via a system header definition. |
| 2120 |
// WARNING: These typedefs may be removed in a future |
| 2121 |
// release. |
| 2122 |
// |
| 2123 |
// ex. the definitions in s5inode.h (now obsoleted) |
| 2124 |
// remained small to preserve compatibility |
| 2125 |
// in the S5 file system type. |
| 2126 |
type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type |
| 2127 |
type O_dev_t = int16 /* types.h:381:15 */ // old device type |
| 2128 |
type O_uid_t = uint16 /* types.h:382:18 */ // old UID type |
| 2129 |
type O_gid_t = uint16 /* types.h:383:17 */ // old GID type |
| 2130 |
type O_nlink_t = int16 /* types.h:384:15 */ // old file link type |
| 2131 |
type O_pid_t = int16 /* types.h:385:15 */ // old process id type |
| 2132 |
type O_ino_t = uint16 /* types.h:386:18 */ // old inode type |
| 2133 |
|
| 2134 |
// POSIX and XOPEN Declarations |
| 2135 |
type Key_t = int32 /* types.h:392:13 */ // IPC key type |
| 2136 |
type Mode_t = uint32 /* types.h:394:16 */ // file attribute type |
| 2137 |
|
| 2138 |
type Uid_t = uint32 /* types.h:401:22 */ // UID type |
| 2139 |
|
| 2140 |
type Gid_t = uint32 /* types.h:404:15 */ // GID type |
| 2141 |
|
| 2142 |
type Datalink_id_t = uint32 /* types.h:406:18 */ |
| 2143 |
type Vrid_t = uint32 /* types.h:407:18 */ |
| 2144 |
|
| 2145 |
type Taskid_t = int32 /* types.h:409:17 */ |
| 2146 |
type Projid_t = int32 /* types.h:410:17 */ |
| 2147 |
type Poolid_t = int32 /* types.h:411:14 */ |
| 2148 |
type Zoneid_t = int32 /* types.h:412:14 */ |
| 2149 |
type Ctid_t = int32 /* types.h:413:14 */ |
| 2150 |
|
| 2151 |
// POSIX definitions are same as defined in thread.h and synch.h. |
| 2152 |
// Any changes made to here should be reflected in corresponding |
| 2153 |
// files as described in comments. |
| 2154 |
type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h |
| 2155 |
type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h |
| 2156 |
|
| 2157 |
// "Magic numbers" tagging synchronization object types |
| 2158 |
|
| 2159 |
type X_pthread_mutex = struct { |
| 2160 |
F__pthread_mutex_flags struct { |
| 2161 |
F__pthread_mutex_flag1 uint16 |
| 2162 |
F__pthread_mutex_flag2 uint8 |
| 2163 |
F__pthread_mutex_ceiling uint8 |
| 2164 |
F__pthread_mutex_type uint16 |
| 2165 |
F__pthread_mutex_magic uint16 |
| 2166 |
} |
| 2167 |
F__pthread_mutex_lock struct { |
| 2168 |
F__ccgo_pad1 [0]uint64 |
| 2169 |
F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 } |
| 2170 |
} |
| 2171 |
F__pthread_mutex_data uint64 |
| 2172 |
} /* types.h:429:9 */ |
| 2173 |
|
| 2174 |
// = thread_key_t in thread.h |
| 2175 |
|
| 2176 |
// "Magic numbers" tagging synchronization object types |
| 2177 |
|
| 2178 |
type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */ |
| 2179 |
|
| 2180 |
type X_pthread_cond = struct { |
| 2181 |
F__pthread_cond_flags struct { |
| 2182 |
F__pthread_cond_flag [4]uint8 |
| 2183 |
F__pthread_cond_type uint16 |
| 2184 |
F__pthread_cond_magic uint16 |
| 2185 |
} |
| 2186 |
F__pthread_cond_data uint64 |
| 2187 |
} /* types.h:450:9 */ |
| 2188 |
|
| 2189 |
type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */ |
| 2190 |
|
| 2191 |
// UNIX 98 Extension |
| 2192 |
type X_pthread_rwlock = struct { |
| 2193 |
F__pthread_rwlock_readers int32 |
| 2194 |
F__pthread_rwlock_type uint16 |
| 2195 |
F__pthread_rwlock_magic uint16 |
| 2196 |
F__pthread_rwlock_mutex Pthread_mutex_t |
| 2197 |
F__pthread_rwlock_readercv Pthread_cond_t |
| 2198 |
F__pthread_rwlock_writercv Pthread_cond_t |
| 2199 |
} /* types.h:462:9 */ |
| 2200 |
|
| 2201 |
// UNIX 98 Extension |
| 2202 |
type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */ |
| 2203 |
|
| 2204 |
// SUSV3 |
| 2205 |
type Pthread_barrier_t = struct { |
| 2206 |
F__pthread_barrier_count uint32 |
| 2207 |
F__pthread_barrier_current uint32 |
| 2208 |
F__pthread_barrier_cycle uint64 |
| 2209 |
F__pthread_barrier_reserved uint64 |
| 2210 |
F__pthread_barrier_lock Pthread_mutex_t |
| 2211 |
F__pthread_barrier_cond Pthread_cond_t |
| 2212 |
} /* types.h:481:3 */ |
| 2213 |
|
| 2214 |
type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */ |
| 2215 |
|
| 2216 |
// attributes for threads, dynamically allocated by library |
| 2217 |
type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */ |
| 2218 |
|
| 2219 |
// attributes for threads, dynamically allocated by library |
| 2220 |
type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */ |
| 2221 |
|
| 2222 |
// attributes for mutex, dynamically allocated by library |
| 2223 |
type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */ |
| 2224 |
|
| 2225 |
// attributes for mutex, dynamically allocated by library |
| 2226 |
type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */ |
| 2227 |
|
| 2228 |
// attributes for cond, dynamically allocated by library |
| 2229 |
type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */ |
| 2230 |
|
| 2231 |
// attributes for cond, dynamically allocated by library |
| 2232 |
type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */ |
| 2233 |
|
| 2234 |
// pthread_once |
| 2235 |
type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */ |
| 2236 |
|
| 2237 |
// pthread_once |
| 2238 |
type Pthread_once_t = X_once /* types.h:511:3 */ |
| 2239 |
|
| 2240 |
// UNIX 98 Extensions |
| 2241 |
// attributes for rwlock, dynamically allocated by library |
| 2242 |
type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */ |
| 2243 |
|
| 2244 |
// UNIX 98 Extensions |
| 2245 |
// attributes for rwlock, dynamically allocated by library |
| 2246 |
type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */ |
| 2247 |
|
| 2248 |
// SUSV3 |
| 2249 |
// attributes for pthread_barrier_t, dynamically allocated by library |
| 2250 |
type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */ |
| 2251 |
|
| 2252 |
type Dev_t = uint64 /* types.h:529:17 */ // expanded device type |
| 2253 |
|
| 2254 |
type Nlink_t = uint32 /* types.h:532:16 */ // file link type |
| 2255 |
type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes |
| 2256 |
|
| 2257 |
type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1 |
| 2258 |
|
| 2259 |
type Time_t = int64 /* types.h:559:15 */ // time of day in seconds |
| 2260 |
|
| 2261 |
type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution |
| 2262 |
|
| 2263 |
type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type |
| 2264 |
|
| 2265 |
type Timer_t = int32 /* types.h:574:13 */ // timer identifier type |
| 2266 |
|
| 2267 |
// BEGIN CSTYLED |
| 2268 |
type Unchar = uint8 /* types.h:580:23 */ |
| 2269 |
type Ushort = uint16 /* types.h:581:24 */ |
| 2270 |
type Uint = uint32 /* types.h:582:22 */ |
| 2271 |
type Ulong = uint64 /* types.h:583:23 */ |
| 2272 |
// END CSTYLED |
| 2273 |
|
| 2274 |
// The following is the value of type id_t to use to indicate the |
| 2275 |
// caller's current id. See procset.h for the type idtype_t |
| 2276 |
// which defines which kind of id is being specified. |
| 2277 |
|
| 2278 |
// The following value of type pfn_t is used to indicate |
| 2279 |
// invalid page frame number. |
| 2280 |
|
| 2281 |
// BEGIN CSTYLED |
| 2282 |
type U_char = uint8 /* types.h:650:23 */ |
| 2283 |
type U_short = uint16 /* types.h:651:24 */ |
| 2284 |
type U_int = uint32 /* types.h:652:22 */ |
| 2285 |
type U_long = uint64 /* types.h:653:23 */ |
| 2286 |
type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */ |
| 2287 |
|
| 2288 |
type Quad_t = X_quad /* types.h:654:38 */ // used by UFS |
| 2289 |
type Quad = Quad_t /* types.h:655:17 */ // used by UFS |
| 2290 |
// END CSTYLED |
| 2291 |
|
| 2292 |
// Nested include for BSD/sockets source compatibility. |
| 2293 |
// (The select macros used to be defined here). |
| 2294 |
// CDDL HEADER START |
| 2295 |
// |
| 2296 |
// The contents of this file are subject to the terms of the |
| 2297 |
// Common Development and Distribution License (the "License"). |
| 2298 |
// You may not use this file except in compliance with the License. |
| 2299 |
// |
| 2300 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2301 |
// or http://www.opensolaris.org/os/licensing. |
| 2302 |
// See the License for the specific language governing permissions |
| 2303 |
// and limitations under the License. |
| 2304 |
// |
| 2305 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2306 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2307 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2308 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2309 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2310 |
// |
| 2311 |
// CDDL HEADER END |
| 2312 |
|
| 2313 |
// Copyright 2014 Garrett D'Amore <[email protected]> |
| 2314 |
// |
| 2315 |
// Copyright 2013 Nexenta Systems, Inc. All rights reserved. |
| 2316 |
// |
| 2317 |
// Copyright 2010 Sun Microsystems, Inc. All rights reserved. |
| 2318 |
// Use is subject to license terms. |
| 2319 |
|
| 2320 |
// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T |
| 2321 |
// All Rights Reserved |
| 2322 |
|
| 2323 |
// University Copyright- Copyright (c) 1982, 1986, 1988 |
| 2324 |
// The Regents of the University of California |
| 2325 |
// All Rights Reserved |
| 2326 |
// |
| 2327 |
// University Acknowledgment- Portions of this document are derived from |
| 2328 |
// software developed by the University of California, Berkeley, and its |
| 2329 |
// contributors. |
| 2330 |
|
| 2331 |
// DO NOT EDIT THIS FILE. |
| 2332 |
// |
| 2333 |
// It has been auto-edited by fixincludes from: |
| 2334 |
// |
| 2335 |
// "/usr/include/sys/feature_tests.h" |
| 2336 |
// |
| 2337 |
// This had to be done to correct non-standard usages in the |
| 2338 |
// original, manufacturer supplied header file. |
| 2339 |
|
| 2340 |
// CDDL HEADER START |
| 2341 |
// |
| 2342 |
// The contents of this file are subject to the terms of the |
| 2343 |
// Common Development and Distribution License (the "License"). |
| 2344 |
// You may not use this file except in compliance with the License. |
| 2345 |
// |
| 2346 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2347 |
// or http://www.opensolaris.org/os/licensing. |
| 2348 |
// See the License for the specific language governing permissions |
| 2349 |
// and limitations under the License. |
| 2350 |
// |
| 2351 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2352 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2353 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2354 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2355 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2356 |
// |
| 2357 |
// CDDL HEADER END |
| 2358 |
|
| 2359 |
// Copyright 2013 Garrett D'Amore <[email protected]> |
| 2360 |
// Copyright 2016 Joyent, Inc. |
| 2361 |
// Copyright 2022 Oxide Computer Company |
| 2362 |
// |
| 2363 |
// Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
| 2364 |
// Use is subject to license terms. |
| 2365 |
|
| 2366 |
// CDDL HEADER START |
| 2367 |
// |
| 2368 |
// The contents of this file are subject to the terms of the |
| 2369 |
// Common Development and Distribution License, Version 1.0 only |
| 2370 |
// (the "License"). You may not use this file except in compliance |
| 2371 |
// with the License. |
| 2372 |
// |
| 2373 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2374 |
// or http://www.opensolaris.org/os/licensing. |
| 2375 |
// See the License for the specific language governing permissions |
| 2376 |
// and limitations under the License. |
| 2377 |
// |
| 2378 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2379 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2380 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2381 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2382 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2383 |
// |
| 2384 |
// CDDL HEADER END |
| 2385 |
// Copyright 2005 Sun Microsystems, Inc. All rights reserved. |
| 2386 |
// Use is subject to license terms. |
| 2387 |
|
| 2388 |
// Implementation-private. This header should not be included |
| 2389 |
// directly by an application. The application should instead |
| 2390 |
// include <time.h> which includes this header conditionally |
| 2391 |
// depending on which feature test macros are defined. By default, |
| 2392 |
// this header is included by <time.h>. X/Open and POSIX |
| 2393 |
// standards requirements result in this header being included |
| 2394 |
// by <time.h> only under a restricted set of conditions. |
| 2395 |
|
| 2396 |
// DO NOT EDIT THIS FILE. |
| 2397 |
// |
| 2398 |
// It has been auto-edited by fixincludes from: |
| 2399 |
// |
| 2400 |
// "/usr/include/sys/feature_tests.h" |
| 2401 |
// |
| 2402 |
// This had to be done to correct non-standard usages in the |
| 2403 |
// original, manufacturer supplied header file. |
| 2404 |
|
| 2405 |
// CDDL HEADER START |
| 2406 |
// |
| 2407 |
// The contents of this file are subject to the terms of the |
| 2408 |
// Common Development and Distribution License (the "License"). |
| 2409 |
// You may not use this file except in compliance with the License. |
| 2410 |
// |
| 2411 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2412 |
// or http://www.opensolaris.org/os/licensing. |
| 2413 |
// See the License for the specific language governing permissions |
| 2414 |
// and limitations under the License. |
| 2415 |
// |
| 2416 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2417 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2418 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2419 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2420 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2421 |
// |
| 2422 |
// CDDL HEADER END |
| 2423 |
|
| 2424 |
// Copyright 2013 Garrett D'Amore <[email protected]> |
| 2425 |
// Copyright 2016 Joyent, Inc. |
| 2426 |
// Copyright 2022 Oxide Computer Company |
| 2427 |
// |
| 2428 |
// Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
| 2429 |
// Use is subject to license terms. |
| 2430 |
|
| 2431 |
// Time expressed in seconds and nanoseconds |
| 2432 |
|
| 2433 |
type Timespec = struct { |
| 2434 |
Ftv_sec int64 |
| 2435 |
Ftv_nsec int64 |
| 2436 |
} /* time_impl.h:57:9 */ |
| 2437 |
|
| 2438 |
// used by UFS |
| 2439 |
// END CSTYLED |
| 2440 |
|
| 2441 |
// Nested include for BSD/sockets source compatibility. |
| 2442 |
// (The select macros used to be defined here). |
| 2443 |
// CDDL HEADER START |
| 2444 |
// |
| 2445 |
// The contents of this file are subject to the terms of the |
| 2446 |
// Common Development and Distribution License (the "License"). |
| 2447 |
// You may not use this file except in compliance with the License. |
| 2448 |
// |
| 2449 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2450 |
// or http://www.opensolaris.org/os/licensing. |
| 2451 |
// See the License for the specific language governing permissions |
| 2452 |
// and limitations under the License. |
| 2453 |
// |
| 2454 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2455 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2456 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2457 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2458 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2459 |
// |
| 2460 |
// CDDL HEADER END |
| 2461 |
|
| 2462 |
// Copyright 2014 Garrett D'Amore <[email protected]> |
| 2463 |
// |
| 2464 |
// Copyright 2013 Nexenta Systems, Inc. All rights reserved. |
| 2465 |
// |
| 2466 |
// Copyright 2010 Sun Microsystems, Inc. All rights reserved. |
| 2467 |
// Use is subject to license terms. |
| 2468 |
|
| 2469 |
// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T |
| 2470 |
// All Rights Reserved |
| 2471 |
|
| 2472 |
// University Copyright- Copyright (c) 1982, 1986, 1988 |
| 2473 |
// The Regents of the University of California |
| 2474 |
// All Rights Reserved |
| 2475 |
// |
| 2476 |
// University Acknowledgment- Portions of this document are derived from |
| 2477 |
// software developed by the University of California, Berkeley, and its |
| 2478 |
// contributors. |
| 2479 |
|
| 2480 |
// DO NOT EDIT THIS FILE. |
| 2481 |
// |
| 2482 |
// It has been auto-edited by fixincludes from: |
| 2483 |
// |
| 2484 |
// "/usr/include/sys/feature_tests.h" |
| 2485 |
// |
| 2486 |
// This had to be done to correct non-standard usages in the |
| 2487 |
// original, manufacturer supplied header file. |
| 2488 |
|
| 2489 |
// CDDL HEADER START |
| 2490 |
// |
| 2491 |
// The contents of this file are subject to the terms of the |
| 2492 |
// Common Development and Distribution License (the "License"). |
| 2493 |
// You may not use this file except in compliance with the License. |
| 2494 |
// |
| 2495 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2496 |
// or http://www.opensolaris.org/os/licensing. |
| 2497 |
// See the License for the specific language governing permissions |
| 2498 |
// and limitations under the License. |
| 2499 |
// |
| 2500 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2501 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2502 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2503 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2504 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2505 |
// |
| 2506 |
// CDDL HEADER END |
| 2507 |
|
| 2508 |
// Copyright 2013 Garrett D'Amore <[email protected]> |
| 2509 |
// Copyright 2016 Joyent, Inc. |
| 2510 |
// Copyright 2022 Oxide Computer Company |
| 2511 |
// |
| 2512 |
// Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
| 2513 |
// Use is subject to license terms. |
| 2514 |
|
| 2515 |
// CDDL HEADER START |
| 2516 |
// |
| 2517 |
// The contents of this file are subject to the terms of the |
| 2518 |
// Common Development and Distribution License, Version 1.0 only |
| 2519 |
// (the "License"). You may not use this file except in compliance |
| 2520 |
// with the License. |
| 2521 |
// |
| 2522 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2523 |
// or http://www.opensolaris.org/os/licensing. |
| 2524 |
// See the License for the specific language governing permissions |
| 2525 |
// and limitations under the License. |
| 2526 |
// |
| 2527 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2528 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2529 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2530 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2531 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2532 |
// |
| 2533 |
// CDDL HEADER END |
| 2534 |
// Copyright 2005 Sun Microsystems, Inc. All rights reserved. |
| 2535 |
// Use is subject to license terms. |
| 2536 |
|
| 2537 |
// Implementation-private. This header should not be included |
| 2538 |
// directly by an application. The application should instead |
| 2539 |
// include <time.h> which includes this header conditionally |
| 2540 |
// depending on which feature test macros are defined. By default, |
| 2541 |
// this header is included by <time.h>. X/Open and POSIX |
| 2542 |
// standards requirements result in this header being included |
| 2543 |
// by <time.h> only under a restricted set of conditions. |
| 2544 |
|
| 2545 |
// DO NOT EDIT THIS FILE. |
| 2546 |
// |
| 2547 |
// It has been auto-edited by fixincludes from: |
| 2548 |
// |
| 2549 |
// "/usr/include/sys/feature_tests.h" |
| 2550 |
// |
| 2551 |
// This had to be done to correct non-standard usages in the |
| 2552 |
// original, manufacturer supplied header file. |
| 2553 |
|
| 2554 |
// CDDL HEADER START |
| 2555 |
// |
| 2556 |
// The contents of this file are subject to the terms of the |
| 2557 |
// Common Development and Distribution License (the "License"). |
| 2558 |
// You may not use this file except in compliance with the License. |
| 2559 |
// |
| 2560 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2561 |
// or http://www.opensolaris.org/os/licensing. |
| 2562 |
// See the License for the specific language governing permissions |
| 2563 |
// and limitations under the License. |
| 2564 |
// |
| 2565 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2566 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2567 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2568 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2569 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2570 |
// |
| 2571 |
// CDDL HEADER END |
| 2572 |
|
| 2573 |
// Copyright 2013 Garrett D'Amore <[email protected]> |
| 2574 |
// Copyright 2016 Joyent, Inc. |
| 2575 |
// Copyright 2022 Oxide Computer Company |
| 2576 |
// |
| 2577 |
// Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
| 2578 |
// Use is subject to license terms. |
| 2579 |
|
| 2580 |
// Time expressed in seconds and nanoseconds |
| 2581 |
|
| 2582 |
type Timespec_t = Timespec /* time_impl.h:60:3 */ |
| 2583 |
|
| 2584 |
type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4 |
| 2585 |
|
| 2586 |
// The following has been left in for backward compatibility. Portable |
| 2587 |
// applications should not use the structure name timestruc. |
| 2588 |
|
| 2589 |
// Timer specification |
| 2590 |
type Itimerspec = struct { |
| 2591 |
Fit_interval struct { |
| 2592 |
Ftv_sec int64 |
| 2593 |
Ftv_nsec int64 |
| 2594 |
} |
| 2595 |
Fit_value struct { |
| 2596 |
Ftv_sec int64 |
| 2597 |
Ftv_nsec int64 |
| 2598 |
} |
| 2599 |
} /* time_impl.h:95:9 */ |
| 2600 |
|
| 2601 |
// definition per SVr4 |
| 2602 |
|
| 2603 |
// The following has been left in for backward compatibility. Portable |
| 2604 |
// applications should not use the structure name timestruc. |
| 2605 |
|
| 2606 |
// Timer specification |
| 2607 |
type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */ |
| 2608 |
|
| 2609 |
// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T |
| 2610 |
// All Rights Reserved |
| 2611 |
|
| 2612 |
// Copyright (c) 1982, 1986, 1993 Regents of the University of California. |
| 2613 |
// All rights reserved. The Berkeley software License Agreement |
| 2614 |
// specifies the terms and conditions for redistribution. |
| 2615 |
|
| 2616 |
// Copyright 2014 Garrett D'Amore <[email protected]> |
| 2617 |
// |
| 2618 |
// Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
| 2619 |
// Use is subject to license terms. |
| 2620 |
// |
| 2621 |
// Copyright 2013 Nexenta Systems, Inc. All rights reserved. |
| 2622 |
// Copyright 2016 Joyent, Inc. |
| 2623 |
// Copyright 2020 OmniOS Community Edition (OmniOSce) Association. |
| 2624 |
|
| 2625 |
// Copyright (c) 2013, 2016 by Delphix. All rights reserved. |
| 2626 |
|
| 2627 |
// DO NOT EDIT THIS FILE. |
| 2628 |
// |
| 2629 |
// It has been auto-edited by fixincludes from: |
| 2630 |
// |
| 2631 |
// "/usr/include/sys/feature_tests.h" |
| 2632 |
// |
| 2633 |
// This had to be done to correct non-standard usages in the |
| 2634 |
// original, manufacturer supplied header file. |
| 2635 |
|
| 2636 |
// CDDL HEADER START |
| 2637 |
// |
| 2638 |
// The contents of this file are subject to the terms of the |
| 2639 |
// Common Development and Distribution License (the "License"). |
| 2640 |
// You may not use this file except in compliance with the License. |
| 2641 |
// |
| 2642 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2643 |
// or http://www.opensolaris.org/os/licensing. |
| 2644 |
// See the License for the specific language governing permissions |
| 2645 |
// and limitations under the License. |
| 2646 |
// |
| 2647 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2648 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2649 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2650 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2651 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2652 |
// |
| 2653 |
// CDDL HEADER END |
| 2654 |
|
| 2655 |
// Copyright 2013 Garrett D'Amore <[email protected]> |
| 2656 |
// Copyright 2016 Joyent, Inc. |
| 2657 |
// Copyright 2022 Oxide Computer Company |
| 2658 |
// |
| 2659 |
// Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
| 2660 |
// Use is subject to license terms. |
| 2661 |
|
| 2662 |
// Structure returned by gettimeofday(2) system call, |
| 2663 |
// and used in other calls. |
| 2664 |
|
| 2665 |
type Timeval = struct { |
| 2666 |
Ftv_sec int64 |
| 2667 |
Ftv_usec int64 |
| 2668 |
} /* time.h:54:1 */ |
| 2669 |
|
| 2670 |
type Timezone = struct { |
| 2671 |
Ftz_minuteswest int32 |
| 2672 |
Ftz_dsttime int32 |
| 2673 |
} /* time.h:86:1 */ |
| 2674 |
|
| 2675 |
// Needed for longlong_t type. Placement of this due to <sys/types.h> |
| 2676 |
// including <sys/select.h> which relies on the presense of the itimerval |
| 2677 |
// structure. |
| 2678 |
// CDDL HEADER START |
| 2679 |
// |
| 2680 |
// The contents of this file are subject to the terms of the |
| 2681 |
// Common Development and Distribution License (the "License"). |
| 2682 |
// You may not use this file except in compliance with the License. |
| 2683 |
// |
| 2684 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2685 |
// or http://www.opensolaris.org/os/licensing. |
| 2686 |
// See the License for the specific language governing permissions |
| 2687 |
// and limitations under the License. |
| 2688 |
// |
| 2689 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2690 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2691 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2692 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2693 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2694 |
// |
| 2695 |
// CDDL HEADER END |
| 2696 |
// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T |
| 2697 |
// All Rights Reserved |
| 2698 |
|
| 2699 |
// Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
| 2700 |
// Use is subject to license terms. |
| 2701 |
// |
| 2702 |
// Copyright 2013 Nexenta Systems, Inc. All rights reserved. |
| 2703 |
// Copyright 2016 Joyent, Inc. |
| 2704 |
// Copyright 2021 Oxide Computer Company |
| 2705 |
|
| 2706 |
// Operations on timevals. |
| 2707 |
|
| 2708 |
// Names of the interval timers, and structure |
| 2709 |
// defining a timer setting. |
| 2710 |
// time and when system is running on |
| 2711 |
// behalf of the process. |
| 2712 |
// time profiling of multithreaded |
| 2713 |
// programs. |
| 2714 |
|
| 2715 |
type Itimerval = struct { |
| 2716 |
Fit_interval struct { |
| 2717 |
Ftv_sec int64 |
| 2718 |
Ftv_usec int64 |
| 2719 |
} |
| 2720 |
Fit_value struct { |
| 2721 |
Ftv_sec int64 |
| 2722 |
Ftv_usec int64 |
| 2723 |
} |
| 2724 |
} /* time.h:209:1 */ |
| 2725 |
|
| 2726 |
// Definitions for commonly used resolutions. |
| 2727 |
|
| 2728 |
// Time expressed as a 64-bit nanosecond counter. |
| 2729 |
type Hrtime_t = int64 /* time.h:265:20 */ |
| 2730 |
|
| 2731 |
// The inclusion of <time.h> is historical and was added for |
| 2732 |
// backward compatibility in delta 1.2 when a number of definitions |
| 2733 |
// were moved out of <sys/time.h>. More recently, the timespec and |
| 2734 |
// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, |
| 2735 |
// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>, |
| 2736 |
// which is now included by <time.h>. This change was due to POSIX |
| 2737 |
// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and |
| 2738 |
// non-X/Open applications, including this header will still make |
| 2739 |
// visible these definitions. |
| 2740 |
// CDDL HEADER START |
| 2741 |
// |
| 2742 |
// The contents of this file are subject to the terms of the |
| 2743 |
// Common Development and Distribution License (the "License"). |
| 2744 |
// You may not use this file except in compliance with the License. |
| 2745 |
// |
| 2746 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2747 |
// or http://www.opensolaris.org/os/licensing. |
| 2748 |
// See the License for the specific language governing permissions |
| 2749 |
// and limitations under the License. |
| 2750 |
// |
| 2751 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2752 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2753 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2754 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2755 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2756 |
// |
| 2757 |
// CDDL HEADER END |
| 2758 |
// Copyright (c) 1988 AT&T |
| 2759 |
// All Rights Reserved |
| 2760 |
|
| 2761 |
// Copyright 2014 Garrett D'Amore <[email protected]> |
| 2762 |
// |
| 2763 |
// Copyright 2007 Sun Microsystems, Inc. All rights reserved. |
| 2764 |
// Use is subject to license terms. |
| 2765 |
// Copyright 2010 Nexenta Systems, Inc. Al rights reserved. |
| 2766 |
// Copyright 2016 Joyent, Inc. |
| 2767 |
|
| 2768 |
// DO NOT EDIT THIS FILE. |
| 2769 |
// |
| 2770 |
// It has been auto-edited by fixincludes from: |
| 2771 |
// |
| 2772 |
// "/usr/include/sys/feature_tests.h" |
| 2773 |
// |
| 2774 |
// This had to be done to correct non-standard usages in the |
| 2775 |
// original, manufacturer supplied header file. |
| 2776 |
|
| 2777 |
// CDDL HEADER START |
| 2778 |
// |
| 2779 |
// The contents of this file are subject to the terms of the |
| 2780 |
// Common Development and Distribution License (the "License"). |
| 2781 |
// You may not use this file except in compliance with the License. |
| 2782 |
// |
| 2783 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2784 |
// or http://www.opensolaris.org/os/licensing. |
| 2785 |
// See the License for the specific language governing permissions |
| 2786 |
// and limitations under the License. |
| 2787 |
// |
| 2788 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2789 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2790 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2791 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2792 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2793 |
// |
| 2794 |
// CDDL HEADER END |
| 2795 |
|
| 2796 |
// Copyright 2013 Garrett D'Amore <[email protected]> |
| 2797 |
// Copyright 2016 Joyent, Inc. |
| 2798 |
// Copyright 2022 Oxide Computer Company |
| 2799 |
// |
| 2800 |
// Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
| 2801 |
// Use is subject to license terms. |
| 2802 |
|
| 2803 |
// CDDL HEADER START |
| 2804 |
// |
| 2805 |
// The contents of this file are subject to the terms of the |
| 2806 |
// Common Development and Distribution License, Version 1.0 only |
| 2807 |
// (the "License"). You may not use this file except in compliance |
| 2808 |
// with the License. |
| 2809 |
// |
| 2810 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2811 |
// or http://www.opensolaris.org/os/licensing. |
| 2812 |
// See the License for the specific language governing permissions |
| 2813 |
// and limitations under the License. |
| 2814 |
// |
| 2815 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2816 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2817 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2818 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2819 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2820 |
// |
| 2821 |
// CDDL HEADER END |
| 2822 |
// Copyright (c) 1988 AT&T |
| 2823 |
// All Rights Reserved |
| 2824 |
|
| 2825 |
// Copyright 2014 Garrett D'Amore <[email protected]> |
| 2826 |
// Copyright 2014 PALO, Richard. |
| 2827 |
// |
| 2828 |
// Copyright 2004 Sun Microsystems, Inc. All rights reserved. |
| 2829 |
// Use is subject to license terms. |
| 2830 |
|
| 2831 |
// An application should not include this header directly. Instead it |
| 2832 |
// should be included only through the inclusion of other Sun headers. |
| 2833 |
// |
| 2834 |
// The contents of this header is limited to identifiers specified in the |
| 2835 |
// C Standard. Any new identifiers specified in future amendments to the |
| 2836 |
// C Standard must be placed in this header. If these new identifiers |
| 2837 |
// are required to also be in the C++ Standard "std" namespace, then for |
| 2838 |
// anything other than macro definitions, corresponding "using" directives |
| 2839 |
// must also be added to <time.h.h>. |
| 2840 |
|
| 2841 |
// DO NOT EDIT THIS FILE. |
| 2842 |
// |
| 2843 |
// It has been auto-edited by fixincludes from: |
| 2844 |
// |
| 2845 |
// "/usr/include/sys/feature_tests.h" |
| 2846 |
// |
| 2847 |
// This had to be done to correct non-standard usages in the |
| 2848 |
// original, manufacturer supplied header file. |
| 2849 |
|
| 2850 |
// CDDL HEADER START |
| 2851 |
// |
| 2852 |
// The contents of this file are subject to the terms of the |
| 2853 |
// Common Development and Distribution License (the "License"). |
| 2854 |
// You may not use this file except in compliance with the License. |
| 2855 |
// |
| 2856 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2857 |
// or http://www.opensolaris.org/os/licensing. |
| 2858 |
// See the License for the specific language governing permissions |
| 2859 |
// and limitations under the License. |
| 2860 |
// |
| 2861 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2862 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2863 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2864 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2865 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2866 |
// |
| 2867 |
// CDDL HEADER END |
| 2868 |
|
| 2869 |
// Copyright 2013 Garrett D'Amore <[email protected]> |
| 2870 |
// Copyright 2016 Joyent, Inc. |
| 2871 |
// Copyright 2022 Oxide Computer Company |
| 2872 |
// |
| 2873 |
// Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
| 2874 |
// Use is subject to license terms. |
| 2875 |
|
| 2876 |
// This file and its contents are supplied under the terms of the |
| 2877 |
// Common Development and Distribution License ("CDDL"), version 1.0. |
| 2878 |
// You may only use this file in accordance with the terms of version |
| 2879 |
// 1.0 of the CDDL. |
| 2880 |
// |
| 2881 |
// A full copy of the text of the CDDL should have accompanied this |
| 2882 |
// source. A copy of the CDDL is also available via the Internet at |
| 2883 |
// http://www.illumos.org/license/CDDL. |
| 2884 |
|
| 2885 |
// Copyright 2014-2016 PALO, Richard. |
| 2886 |
|
| 2887 |
// DO NOT EDIT THIS FILE. |
| 2888 |
// |
| 2889 |
// It has been auto-edited by fixincludes from: |
| 2890 |
// |
| 2891 |
// "/usr/include/sys/feature_tests.h" |
| 2892 |
// |
| 2893 |
// This had to be done to correct non-standard usages in the |
| 2894 |
// original, manufacturer supplied header file. |
| 2895 |
|
| 2896 |
// CDDL HEADER START |
| 2897 |
// |
| 2898 |
// The contents of this file are subject to the terms of the |
| 2899 |
// Common Development and Distribution License (the "License"). |
| 2900 |
// You may not use this file except in compliance with the License. |
| 2901 |
// |
| 2902 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2903 |
// or http://www.opensolaris.org/os/licensing. |
| 2904 |
// See the License for the specific language governing permissions |
| 2905 |
// and limitations under the License. |
| 2906 |
// |
| 2907 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2908 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2909 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2910 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2911 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2912 |
// |
| 2913 |
// CDDL HEADER END |
| 2914 |
|
| 2915 |
// Copyright 2013 Garrett D'Amore <[email protected]> |
| 2916 |
// Copyright 2016 Joyent, Inc. |
| 2917 |
// Copyright 2022 Oxide Computer Company |
| 2918 |
// |
| 2919 |
// Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
| 2920 |
// Use is subject to license terms. |
| 2921 |
|
| 2922 |
// POSIX.1-2008 requires that the NULL macro be cast to type void *. |
| 2923 |
|
| 2924 |
type Tm = struct { |
| 2925 |
Ftm_sec int32 |
| 2926 |
Ftm_min int32 |
| 2927 |
Ftm_hour int32 |
| 2928 |
Ftm_mday int32 |
| 2929 |
Ftm_mon int32 |
| 2930 |
Ftm_year int32 |
| 2931 |
Ftm_wday int32 |
| 2932 |
Ftm_yday int32 |
| 2933 |
Ftm_isdst int32 |
| 2934 |
} /* time_iso.h:80:1 */ |
| 2935 |
|
| 2936 |
// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the |
| 2937 |
// definition of the sigevent structure. Both require the inclusion |
| 2938 |
// of <signal.h> and <time.h> when using the timer_create() function. |
| 2939 |
// However, X/Open also specifies that the sigevent structure be defined |
| 2940 |
// in <time.h> as described in the header <signal.h>. This prevents |
| 2941 |
// compiler warnings for applications that only include <time.h> and not |
| 2942 |
// also <signal.h>. The sigval union and the sigevent structure is |
| 2943 |
// therefore defined both here and in <sys/siginfo.h> which gets included |
| 2944 |
// via inclusion of <signal.h>. |
| 2945 |
type Sigval = struct { |
| 2946 |
F__ccgo_pad1 [0]uint64 |
| 2947 |
Fsival_int int32 |
| 2948 |
F__ccgo_pad2 [4]byte |
| 2949 |
} /* time.h:125:1 */ |
| 2950 |
|
| 2951 |
type Sigevent = struct { |
| 2952 |
Fsigev_notify int32 |
| 2953 |
Fsigev_signo int32 |
| 2954 |
Fsigev_value struct { |
| 2955 |
F__ccgo_pad1 [0]uint64 |
| 2956 |
Fsival_int int32 |
| 2957 |
F__ccgo_pad2 [4]byte |
| 2958 |
} |
| 2959 |
Fsigev_notify_function uintptr |
| 2960 |
Fsigev_notify_attributes uintptr |
| 2961 |
F__sigev_pad2 int32 |
| 2962 |
F__ccgo_pad1 [4]byte |
| 2963 |
} /* time.h:133:1 */ |
| 2964 |
|
| 2965 |
type Locale_t = uintptr /* time.h:292:24 */ |
| 2966 |
|
| 2967 |
// The inclusion of <sys/select.h> is needed for the FD_CLR, |
| 2968 |
// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the |
| 2969 |
// select() prototype defined in the XOpen specifications |
| 2970 |
// beginning with XSH4v2. Placement required after definition |
| 2971 |
// for itimerval. |
| 2972 |
// CDDL HEADER START |
| 2973 |
// |
| 2974 |
// The contents of this file are subject to the terms of the |
| 2975 |
// Common Development and Distribution License (the "License"). |
| 2976 |
// You may not use this file except in compliance with the License. |
| 2977 |
// |
| 2978 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 2979 |
// or http://www.opensolaris.org/os/licensing. |
| 2980 |
// See the License for the specific language governing permissions |
| 2981 |
// and limitations under the License. |
| 2982 |
// |
| 2983 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 2984 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 2985 |
// If applicable, add the following below this CDDL HEADER, with the |
| 2986 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 2987 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 2988 |
// |
| 2989 |
// CDDL HEADER END |
| 2990 |
|
| 2991 |
// Copyright 2014 Garrett D'Amore <[email protected]> |
| 2992 |
// |
| 2993 |
// Copyright 2013 Nexenta Systems, Inc. All rights reserved. |
| 2994 |
// |
| 2995 |
// Copyright 2010 Sun Microsystems, Inc. All rights reserved. |
| 2996 |
// Use is subject to license terms. |
| 2997 |
|
| 2998 |
// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T |
| 2999 |
// All Rights Reserved |
| 3000 |
|
| 3001 |
// University Copyright- Copyright (c) 1982, 1986, 1988 |
| 3002 |
// The Regents of the University of California |
| 3003 |
// All Rights Reserved |
| 3004 |
// |
| 3005 |
// University Acknowledgment- Portions of this document are derived from |
| 3006 |
// software developed by the University of California, Berkeley, and its |
| 3007 |
// contributors. |
| 3008 |
|
| 3009 |
// The sigset_t type is defined in <sys/signal.h> and duplicated |
| 3010 |
// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6 |
| 3011 |
// now allows the visibility of signal.h in this header, however |
| 3012 |
// an order of inclusion problem occurs as a result of inclusion |
| 3013 |
// of <sys/select.h> in <signal.h> under certain conditions. |
| 3014 |
// Rather than include <sys/signal.h> here, we've duplicated |
| 3015 |
// the sigset_t type instead. This type is required for the XPG6 |
| 3016 |
// introduced pselect() function also declared in this header. |
| 3017 |
type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */ |
| 3018 |
|
| 3019 |
// Select uses bit masks of file descriptors in longs. |
| 3020 |
// These macros manipulate such bit fields. |
| 3021 |
// FD_SETSIZE may be defined by the user, but the default here |
| 3022 |
// should be >= RLIM_FD_MAX. |
| 3023 |
|
| 3024 |
type Fd_mask = int64 /* select.h:92:14 */ |
| 3025 |
type Fds_mask = int64 /* select.h:94:14 */ |
| 3026 |
|
| 3027 |
// The value of _NBBY needs to be consistant with the value |
| 3028 |
// of NBBY in <sys/param.h>. |
| 3029 |
|
| 3030 |
type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */ |
| 3031 |
|
| 3032 |
// The value of _NBBY needs to be consistant with the value |
| 3033 |
// of NBBY in <sys/param.h>. |
| 3034 |
|
| 3035 |
type Fd_set = Fd_set1 /* select.h:125:3 */ |
| 3036 |
|
| 3037 |
// _VOID was defined to be either void or char but this is not |
| 3038 |
// required because previous SunOS compilers have accepted the void |
| 3039 |
// type. However, because many system header and source files use the |
| 3040 |
// void keyword, the volatile keyword, and ANSI C function prototypes, |
| 3041 |
// non-ANSI compilers cannot compile the system anyway. The _VOID macro |
| 3042 |
// should therefore not be used and remains for source compatibility |
| 3043 |
// only. |
| 3044 |
// CSTYLED |
| 3045 |
|
| 3046 |
// CDDL HEADER START |
| 3047 |
// |
| 3048 |
// The contents of this file are subject to the terms of the |
| 3049 |
// Common Development and Distribution License (the "License"). |
| 3050 |
// You may not use this file except in compliance with the License. |
| 3051 |
// |
| 3052 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 3053 |
// or http://www.opensolaris.org/os/licensing. |
| 3054 |
// See the License for the specific language governing permissions |
| 3055 |
// and limitations under the License. |
| 3056 |
// |
| 3057 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 3058 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 3059 |
// If applicable, add the following below this CDDL HEADER, with the |
| 3060 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 3061 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 3062 |
// |
| 3063 |
// CDDL HEADER END |
| 3064 |
// Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
| 3065 |
// Use is subject to license terms. |
| 3066 |
|
| 3067 |
// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T |
| 3068 |
// All Rights Reserved |
| 3069 |
|
| 3070 |
// Portions of this source code were derived from Berkeley 4.3 BSD |
| 3071 |
// under license from the Regents of the University of California. |
| 3072 |
|
| 3073 |
type Sa_family_t = uint16 /* socket_impl.h:43:18 */ |
| 3074 |
|
| 3075 |
// Structure used by kernel to store most |
| 3076 |
// addresses. |
| 3077 |
type Sockaddr = struct { |
| 3078 |
Fsa_family uint16 |
| 3079 |
Fsa_data [14]int8 |
| 3080 |
} /* socket_impl.h:50:1 */ |
| 3081 |
|
| 3082 |
// CDDL HEADER START |
| 3083 |
// |
| 3084 |
// The contents of this file are subject to the terms of the |
| 3085 |
// Common Development and Distribution License (the "License"). |
| 3086 |
// You may not use this file except in compliance with the License. |
| 3087 |
// |
| 3088 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 3089 |
// or http://www.opensolaris.org/os/licensing. |
| 3090 |
// See the License for the specific language governing permissions |
| 3091 |
// and limitations under the License. |
| 3092 |
// |
| 3093 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 3094 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 3095 |
// If applicable, add the following below this CDDL HEADER, with the |
| 3096 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 3097 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 3098 |
// |
| 3099 |
// CDDL HEADER END |
| 3100 |
// Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. |
| 3101 |
|
| 3102 |
// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T |
| 3103 |
// All Rights Reserved |
| 3104 |
|
| 3105 |
// University Copyright- Copyright (c) 1982, 1986, 1988 |
| 3106 |
// The Regents of the University of California |
| 3107 |
// All Rights Reserved |
| 3108 |
// |
| 3109 |
// University Acknowledgment- Portions of this document are derived from |
| 3110 |
// software developed by the University of California, Berkeley, and its |
| 3111 |
// contributors. |
| 3112 |
|
| 3113 |
// Definitions for UNIX IPC domain. |
| 3114 |
type Sockaddr_un = struct { |
| 3115 |
Fsun_family uint16 |
| 3116 |
Fsun_path [108]int8 |
| 3117 |
} /* un.h:53:1 */ |
| 3118 |
|
| 3119 |
// Copyright 1993-2003 Sun Microsystems, Inc. All rights reserved. |
| 3120 |
// Use is subject to license terms. |
| 3121 |
// Copyright (c) 1990, 1993 |
| 3122 |
// The Regents of the University of California. All rights reserved. |
| 3123 |
// |
| 3124 |
// Redistribution and use in source and binary forms, with or without |
| 3125 |
// modification, are permitted provided that the following conditions |
| 3126 |
// are met: |
| 3127 |
// 1. Redistributions of source code must retain the above copyright |
| 3128 |
// notice, this list of conditions and the following disclaimer. |
| 3129 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 3130 |
// notice, this list of conditions and the following disclaimer in the |
| 3131 |
// documentation and/or other materials provided with the distribution. |
| 3132 |
// 3. All advertising materials mentioning features or use of this software |
| 3133 |
// must display the following acknowledgement: |
| 3134 |
// This product includes software developed by the University of |
| 3135 |
// California, Berkeley and its contributors. |
| 3136 |
// 4. Neither the name of the University nor the names of its contributors |
| 3137 |
// may be used to endorse or promote products derived from this software |
| 3138 |
// without specific prior written permission. |
| 3139 |
// |
| 3140 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 3141 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 3142 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 3143 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 3144 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 3145 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 3146 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 3147 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 3148 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 3149 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 3150 |
// SUCH DAMAGE. |
| 3151 |
|
| 3152 |
// from UCB 8.1 (Berkeley) 6/10/93 |
| 3153 |
|
| 3154 |
// A Link-Level Sockaddr may specify the interface in one of two |
| 3155 |
// ways: either by means of a system-provided index number (computed |
| 3156 |
// anew and possibly differently on every reboot), or by a human-readable |
| 3157 |
// string such as "il0" (for managerial convenience). |
| 3158 |
// |
| 3159 |
// Census taking actions, such as something akin to SIOCGCONF would return |
| 3160 |
// both the index and the human name. |
| 3161 |
// |
| 3162 |
// High volume transactions (such as giving a link-level ``from'' address |
| 3163 |
// in a recvfrom or recvmsg call) may be likely only to provide the indexed |
| 3164 |
// form, (which requires fewer copy operations and less space). |
| 3165 |
// |
| 3166 |
// The form and interpretation of the link-level address is purely a matter |
| 3167 |
// of convention between the device driver and its consumers; however, it is |
| 3168 |
// expected that all drivers for an interface of a given if_type will agree. |
| 3169 |
|
| 3170 |
// Structure of a Link-Level sockaddr: |
| 3171 |
type Sockaddr_dl = struct { |
| 3172 |
Fsdl_family uint16 |
| 3173 |
Fsdl_index uint16 |
| 3174 |
Fsdl_type uint8 |
| 3175 |
Fsdl_nlen uint8 |
| 3176 |
Fsdl_alen uint8 |
| 3177 |
Fsdl_slen uint8 |
| 3178 |
Fsdl_data [244]int8 |
| 3179 |
} /* if_dl.h:68:1 */ |
| 3180 |
|
| 3181 |
// sockaddr_storage: |
| 3182 |
// Common superset of at least AF_INET, AF_INET6 and AF_LINK sockaddr |
| 3183 |
// structures. Has sufficient size and alignment for those sockaddrs. |
| 3184 |
|
| 3185 |
// Desired maximum size, alignment size and related types. |
| 3186 |
|
| 3187 |
// To represent desired sockaddr max alignment for platform, a |
| 3188 |
// type is chosen which may depend on implementation platform architecture. |
| 3189 |
// Type chosen based on alignment size restrictions from <sys/isa_defs.h>. |
| 3190 |
// We desire to force up to (but no more than) 64-bit (8 byte) alignment, |
| 3191 |
// on platforms where it is possible to do so. (e.g not possible on ia32). |
| 3192 |
// For all currently supported platforms by our implementation |
| 3193 |
// in <sys/isa_defs.h>, (i.e. sparc, sparcv9, ia32, ia64) |
| 3194 |
// type "double" is suitable for that intent. |
| 3195 |
// |
| 3196 |
// Note: Type "double" is chosen over the more obvious integer type int64_t. |
| 3197 |
// |
| 3198 |
// int64_t is not a valid type for strict ANSI/ISO C compilation on ILP32. |
| 3199 |
type Sockaddr_maxalign_t = float64 /* socket_impl.h:85:17 */ |
| 3200 |
|
| 3201 |
// Definitions used for sockaddr_storage structure paddings design. |
| 3202 |
|
| 3203 |
type Sockaddr_storage = struct { |
| 3204 |
Fss_family uint16 |
| 3205 |
F_ss_pad1 [6]int8 |
| 3206 |
F_ss_align float64 |
| 3207 |
F_ss_pad2 [240]int8 |
| 3208 |
} /* socket_impl.h:96:1 */ |
| 3209 |
|
| 3210 |
// To be compatible with the Linux interfaces used, this structure is |
| 3211 |
// placed in socket_impl.h so that an include for <sys/socket.h> will |
| 3212 |
// pickup this structure. This structure is for use with PF_PACKET |
| 3213 |
// sockets. |
| 3214 |
type Sockaddr_ll = struct { |
| 3215 |
Fsll_family uint16 |
| 3216 |
Fsll_protocol uint16 |
| 3217 |
Fsll_ifindex int32 |
| 3218 |
Fsll_hatype uint16 |
| 3219 |
Fsll_pkttype uint8 |
| 3220 |
Fsll_halen uint8 |
| 3221 |
Fsll_addr [8]uint8 |
| 3222 |
} /* socket_impl.h:111:1 */ |
| 3223 |
|
| 3224 |
// The socklen definitions are reproduced here from sys/socket.h so as to |
| 3225 |
// not introduce that namespace into existing users of netinet/in.h. |
| 3226 |
type Socklen_t = uint32 /* in.h:57:18 */ |
| 3227 |
|
| 3228 |
type Psocklen_t = uintptr /* in.h:63:15 */ |
| 3229 |
|
| 3230 |
// Symbols such as htonl() are required to be exposed through this file, |
| 3231 |
// per XNS Issue 5. This is achieved by inclusion of <sys/byteorder.h> |
| 3232 |
// CDDL HEADER START |
| 3233 |
// |
| 3234 |
// The contents of this file are subject to the terms of the |
| 3235 |
// Common Development and Distribution License (the "License"). |
| 3236 |
// You may not use this file except in compliance with the License. |
| 3237 |
// |
| 3238 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 3239 |
// or http://www.opensolaris.org/os/licensing. |
| 3240 |
// See the License for the specific language governing permissions |
| 3241 |
// and limitations under the License. |
| 3242 |
// |
| 3243 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 3244 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 3245 |
// If applicable, add the following below this CDDL HEADER, with the |
| 3246 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 3247 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 3248 |
// |
| 3249 |
// CDDL HEADER END |
| 3250 |
|
| 3251 |
// Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
| 3252 |
// Use is subject to license terms. |
| 3253 |
|
| 3254 |
// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T |
| 3255 |
// All Rights Reserved |
| 3256 |
|
| 3257 |
// University Copyright- Copyright (c) 1982, 1986, 1988 |
| 3258 |
// The Regents of the University of California |
| 3259 |
// All Rights Reserved |
| 3260 |
// |
| 3261 |
// University Acknowledgment- Portions of this document are derived from |
| 3262 |
// software developed by the University of California, Berkeley, and its |
| 3263 |
// contributors. |
| 3264 |
|
| 3265 |
// CDDL HEADER START |
| 3266 |
// |
| 3267 |
// The contents of this file are subject to the terms of the |
| 3268 |
// Common Development and Distribution License (the "License"). |
| 3269 |
// You may not use this file except in compliance with the License. |
| 3270 |
// |
| 3271 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 3272 |
// or http://www.opensolaris.org/os/licensing. |
| 3273 |
// See the License for the specific language governing permissions |
| 3274 |
// and limitations under the License. |
| 3275 |
// |
| 3276 |
// |
| 3277 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 3278 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 3279 |
// If applicable, add the following below this CDDL HEADER, with the |
| 3280 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 3281 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 3282 |
// |
| 3283 |
// CDDL HEADER END |
| 3284 |
|
| 3285 |
// Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
| 3286 |
// Use is subject to license terms. |
| 3287 |
// Copyright 2016 Joyent, Inc. |
| 3288 |
|
| 3289 |
// CDDL HEADER START |
| 3290 |
// |
| 3291 |
// The contents of this file are subject to the terms of the |
| 3292 |
// Common Development and Distribution License, Version 1.0 only |
| 3293 |
// (the "License"). You may not use this file except in compliance |
| 3294 |
// with the License. |
| 3295 |
// |
| 3296 |
// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
| 3297 |
// or http://www.opensolaris.org/os/licensing. |
| 3298 |
// See the License for the specific language governing permissions |
| 3299 |
// and limitations under the License. |
| 3300 |
// |
| 3301 |
// When distributing Covered Code, include this CDDL HEADER in each |
| 3302 |
// file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
| 3303 |
// If applicable, add the following below this CDDL HEADER, with the |
| 3304 |
// fields enclosed by brackets "[]" replaced with your own identifying |
| 3305 |
// information: Portions Copyright [yyyy] [name of copyright owner] |
| 3306 |
// |
| 3307 |
// CDDL HEADER END |
| 3308 |
// Copyright 2014 Garrett D'Amore <[email protected]> |
| 3309 |
// |
| 3310 |
// Copyright 2004 Sun Microsystems, Inc. All rights reserved. |
| 3311 |
// Use is subject to license terms. |
| 3312 |
|
| 3313 |
// macros for conversion between host and (internet) network byte order |
| 3314 |
|
| 3315 |
type In_port_t = uint16 /* byteorder.h:74:18 */ |
| 3316 |
|
| 3317 |
type In_addr_t = uint32 /* byteorder.h:79:18 */ |
| 3318 |
|
| 3319 |
// Macros to reverse byte order |
| 3320 |
|
| 3321 |
// Macros to convert from a specific byte order to/from native byte order |
| 3322 |
|
| 3323 |
// Macros to read unaligned values from a specific byte order to |
| 3324 |
// native byte order |
| 3325 |
|
| 3326 |
// Macros to write unaligned values from native byte order to a specific byte |
| 3327 |
// order. |
| 3328 |
|
| 3329 |
// Note: IPv4 address data structures usage conventions. |
| 3330 |
// The "in_addr_t" type below (required by Unix standards) |
| 3331 |
// is NOT a typedef of "struct in_addr" and violates the usual |
| 3332 |
// conventions where "struct <name>" and <name>_t are corresponding |
| 3333 |
// typedefs. |
| 3334 |
// To minimize confusion, kernel data structures/usage prefers use |
| 3335 |
// of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t" |
| 3336 |
// The user level APIs continue to follow the historic popular |
| 3337 |
// practice of using "struct in_addr". |
| 3338 |
|
| 3339 |
type Ipaddr_t = uint32 /* in.h:99:18 */ |
| 3340 |
|
| 3341 |
type In6_addr = struct { |
| 3342 |
F_S6_un struct { |
| 3343 |
F__ccgo_pad1 [0]uint32 |
| 3344 |
F_S6_u8 [16]uint8 |
| 3345 |
} |
| 3346 |
} /* in.h:104:1 */ |
| 3347 |
|
| 3348 |
type In6_addr_t = In6_addr /* in.h:137:25 */ |
| 3349 |
|
| 3350 |
// Protocols |
| 3351 |
// |
| 3352 |
// Some of these constant names are copied for the DTrace IP provider in |
| 3353 |
// usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept |
| 3354 |
// in sync. |
| 3355 |
// Transmission Protocol |
| 3356 |
|
| 3357 |
// Port/socket numbers: network standard functions |
| 3358 |
// |
| 3359 |
// Entries should exist here for each port number compiled into an ON |
| 3360 |
// component, such as snoop. |
| 3361 |
|
| 3362 |
// Port/socket numbers: host specific functions |
| 3363 |
|
| 3364 |
// Internet Key Exchange (IKE) ports |
| 3365 |
|
| 3366 |
// UNIX TCP sockets |
| 3367 |
|
| 3368 |
// UNIX UDP sockets |
| 3369 |
|
| 3370 |
// DHCPv6 UDP ports |
| 3371 |
|
| 3372 |
// Ports < IPPORT_RESERVED are reserved for |
| 3373 |
// privileged processes (e.g. root). |
| 3374 |
// Ports > IPPORT_USERRESERVED are reserved |
| 3375 |
// for servers, not necessarily privileged. |
| 3376 |
|
| 3377 |
// Link numbers |
| 3378 |
|
| 3379 |
// IPv4 Internet address |
| 3380 |
// This definition contains obsolete fields for compatibility |
| 3381 |
// with SunOS 3.x and 4.2bsd. The presence of subnets renders |
| 3382 |
// divisions into fixed fields misleading at best. New code |
| 3383 |
// should use only the s_addr field. |
| 3384 |
|
| 3385 |
type In_addr = struct { |
| 3386 |
FS_un struct { |
| 3387 |
F__ccgo_pad1 [0]uint32 |
| 3388 |
FS_un_b struct { |
| 3389 |
Fs_b1 uint8 |
| 3390 |
Fs_b2 uint8 |
| 3391 |
Fs_b3 uint8 |
| 3392 |
Fs_b4 uint8 |
| 3393 |
} |
| 3394 |
} |
| 3395 |
} /* in.h:301:1 */ |
| 3396 |
|
| 3397 |
// Definitions of bits in internet address integers. |
| 3398 |
// On subnets, the decomposition of addresses to host and net parts |
| 3399 |
// is done according to subnet mask, not the masks here. |
| 3400 |
// |
| 3401 |
// Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB, |
| 3402 |
// IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto |
| 3403 |
// obsolete". IN_MULTICAST macro should be used to test if a address |
| 3404 |
// is a multicast address. |
| 3405 |
|
| 3406 |
// We have removed CLASS E checks from the kernel |
| 3407 |
// But we preserve these defines for userland in order |
| 3408 |
// to avoid compile breakage of some 3rd party piece of software |
| 3409 |
|
| 3410 |
// Scoped IPv4 prefixes (in host byte-order) |
| 3411 |
|
| 3412 |
// RFC 3927 IPv4 link local address (i in host byte-order) |
| 3413 |
|
| 3414 |
// Well known 6to4 Relay Router Anycast address defined in RFC 3068 |
| 3415 |
|
| 3416 |
// Define a macro to stuff the loopback address into an Internet address |
| 3417 |
|
| 3418 |
// IPv4 Socket address. |
| 3419 |
type Sockaddr_in = struct { |
| 3420 |
Fsin_family uint16 |
| 3421 |
Fsin_port uint16 |
| 3422 |
Fsin_addr struct { |
| 3423 |
FS_un struct { |
| 3424 |
F__ccgo_pad1 [0]uint32 |
| 3425 |
FS_un_b struct { |
| 3426 |
Fs_b1 uint8 |
| 3427 |
Fs_b2 uint8 |
| 3428 |
Fs_b3 uint8 |
| 3429 |
Fs_b4 uint8 |
| 3430 |
} |
| 3431 |
} |
| 3432 |
} |
| 3433 |
Fsin_zero [8]int8 |
| 3434 |
} /* in.h:409:1 */ |
| 3435 |
|
| 3436 |
// IPv6 socket address. |
| 3437 |
type Sockaddr_in6 = struct { |
| 3438 |
Fsin6_family uint16 |
| 3439 |
Fsin6_port uint16 |
| 3440 |
Fsin6_flowinfo uint32 |
| 3441 |
Fsin6_addr struct { |
| 3442 |
F_S6_un struct { |
| 3443 |
F__ccgo_pad1 [0]uint32 |
| 3444 |
F_S6_u8 [16]uint8 |
| 3445 |
} |
| 3446 |
} |
| 3447 |
Fsin6_scope_id uint32 |
| 3448 |
F__sin6_src_id uint32 |
| 3449 |
} /* in.h:424:1 */ |
| 3450 |
|
| 3451 |
// Macros for accessing the traffic class and flow label fields from |
| 3452 |
// sin6_flowinfo. |
| 3453 |
// These are designed to be applied to a 32-bit value. |
| 3454 |
|
| 3455 |
// masks |
| 3456 |
|
| 3457 |
// Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for |
| 3458 |
// use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t) |
| 3459 |
// only. They need to be different for User/Kernel versions because union |
| 3460 |
// component data structure is defined differently (it is identical at |
| 3461 |
// binary representation level). |
| 3462 |
// |
| 3463 |
// const struct in6_addr IN6ADDR_ANY_INIT; |
| 3464 |
// const struct in6_addr IN6ADDR_LOOPBACK_INIT; |
| 3465 |
|
| 3466 |
// RFC 2553 specifies the following macros. Their type is defined |
| 3467 |
// as "int" in the RFC but they only have boolean significance |
| 3468 |
// (zero or non-zero). For the purposes of our comment notation, |
| 3469 |
// we assume a hypothetical type "bool" defined as follows to |
| 3470 |
// write the prototypes assumed for macros in our comments better. |
| 3471 |
// |
| 3472 |
// typedef int bool; |
| 3473 |
|
| 3474 |
// IN6 macros used to test for special IPv6 addresses |
| 3475 |
// (Mostly from spec) |
| 3476 |
// |
| 3477 |
// bool IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *); |
| 3478 |
// bool IN6_IS_ADDR_LOOPBACK (const struct in6_addr *); |
| 3479 |
// bool IN6_IS_ADDR_MULTICAST (const struct in6_addr *); |
| 3480 |
// bool IN6_IS_ADDR_LINKLOCAL (const struct in6_addr *); |
| 3481 |
// bool IN6_IS_ADDR_SITELOCAL (const struct in6_addr *); |
| 3482 |
// bool IN6_IS_ADDR_V4MAPPED (const struct in6_addr *); |
| 3483 |
// bool IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553 |
| 3484 |
// bool IN6_IS_ADDR_V4COMPAT (const struct in6_addr *); |
| 3485 |
// bool IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553 |
| 3486 |
// bool IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *); |
| 3487 |
// bool IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *); |
| 3488 |
// bool IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *); |
| 3489 |
// bool IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *); |
| 3490 |
// bool IN6_IS_ADDR_MC_GLOBAL (const struct in6_addr *); |
| 3491 |
// bool IN6_IS_ADDR_6TO4 (const struct in6_addr *); -- Not from RFC2553 |
| 3492 |
// bool IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *, |
| 3493 |
// const struct in6_addr *); -- Not from RFC2553 |
| 3494 |
// bool IN6_IS_ADDR_LINKSCOPE (const struct in6addr *); -- Not from RFC2553 |
| 3495 |
|
| 3496 |
// IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY |
| 3497 |
// Note: This macro is currently NOT defined in RFC2553 specification |
| 3498 |
// and not a standard macro that portable applications should use. |
| 3499 |
|
| 3500 |
// Exclude loopback and unspecified address |
| 3501 |
|
| 3502 |
// Note: |
| 3503 |
// IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553 |
| 3504 |
// specification and not a standard macro that portable applications |
| 3505 |
// should use. |
| 3506 |
|
| 3507 |
// The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or |
| 3508 |
// RFC, and shouldn't be used by portable applications. It is used to see |
| 3509 |
// if an address is a solicited-node multicast address, which is prefixed |
| 3510 |
// with ff02:0:0:0:0:1:ff00::/104. |
| 3511 |
|
| 3512 |
// Macros to a) test for 6to4 IPv6 address, and b) to test if two |
| 3513 |
// 6to4 addresses have the same /48 prefix, and, hence, are from the |
| 3514 |
// same 6to4 site. |
| 3515 |
|
| 3516 |
// IN6_IS_ADDR_LINKSCOPE |
| 3517 |
// Identifies an address as being either link-local, link-local multicast or |
| 3518 |
// node-local multicast. All types of addresses are considered to be unique |
| 3519 |
// within the scope of a given link. |
| 3520 |
|
| 3521 |
// Useful utility macros for operations with IPv6 addresses |
| 3522 |
// Note: These macros are NOT defined in the RFC2553 or any other |
| 3523 |
// standard specification and are not standard macros that portable |
| 3524 |
// applications should use. |
| 3525 |
|
| 3526 |
// IN6_V4MAPPED_TO_INADDR |
| 3527 |
// IN6_V4MAPPED_TO_IPADDR |
| 3528 |
// Assign a IPv4-Mapped IPv6 address to an IPv4 address. |
| 3529 |
// Note: These macros are NOT defined in RFC2553 or any other standard |
| 3530 |
// specification and are not macros that portable applications should |
| 3531 |
// use. |
| 3532 |
// |
| 3533 |
// void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4); |
| 3534 |
// void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4); |
| 3535 |
// |
| 3536 |
|
| 3537 |
// IN6_INADDR_TO_V4MAPPED |
| 3538 |
// IN6_IPADDR_TO_V4MAPPED |
| 3539 |
// Assign a IPv4 address address to an IPv6 address as a IPv4-mapped |
| 3540 |
// address. |
| 3541 |
// Note: These macros are NOT defined in RFC2553 or any other standard |
| 3542 |
// specification and are not macros that portable applications should |
| 3543 |
// use. |
| 3544 |
// |
| 3545 |
// void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6); |
| 3546 |
// void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6); |
| 3547 |
// |
| 3548 |
|
| 3549 |
// IN6_6TO4_TO_V4ADDR |
| 3550 |
// Extract the embedded IPv4 address from the prefix to a 6to4 IPv6 |
| 3551 |
// address. |
| 3552 |
// Note: This macro is NOT defined in RFC2553 or any other standard |
| 3553 |
// specification and is not a macro that portable applications should |
| 3554 |
// use. |
| 3555 |
// Note: we don't use the IPADDR form of the macro because we need |
| 3556 |
// to do a bytewise copy; the V4ADDR in the 6to4 address is not |
| 3557 |
// 32-bit aligned. |
| 3558 |
// |
| 3559 |
// void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4); |
| 3560 |
// |
| 3561 |
|
| 3562 |
// IN6_V4ADDR_TO_6TO4 |
| 3563 |
// Given an IPv4 address and an IPv6 address for output, a 6to4 address |
| 3564 |
// will be created from the IPv4 Address. |
| 3565 |
// Note: This method for creating 6to4 addresses is not standardized |
| 3566 |
// outside of Solaris. The newly created 6to4 address will be of the form |
| 3567 |
// 2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and |
| 3568 |
// HOSTID will equal 1. |
| 3569 |
// |
| 3570 |
// void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6) |
| 3571 |
// |
| 3572 |
|
| 3573 |
// IN6_ARE_ADDR_EQUAL (defined in RFC2292) |
| 3574 |
// Compares if IPv6 addresses are equal. |
| 3575 |
// Note: Compares in order of high likelyhood of a miss so we minimize |
| 3576 |
// compares. (Current heuristic order, compare in reverse order of |
| 3577 |
// uint32_t units) |
| 3578 |
// |
| 3579 |
// bool IN6_ARE_ADDR_EQUAL(const struct in6_addr *, |
| 3580 |
// const struct in6_addr *); |
| 3581 |
|
| 3582 |
// IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs) |
| 3583 |
// Compares if prefixed parts of IPv6 addresses are equal. |
| 3584 |
// |
| 3585 |
// uint32_t IN6_MASK_FROM_PREFIX(int, int); |
| 3586 |
// bool IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *, |
| 3587 |
// const struct in6_addr *, |
| 3588 |
// int); |
| 3589 |
|
| 3590 |
// Options for use with [gs]etsockopt at the IP level. |
| 3591 |
// |
| 3592 |
// Note: Some of the IP_ namespace has conflict with and |
| 3593 |
// and is exposed through <xti.h>. (It also requires exposing |
| 3594 |
// options not implemented). The options with potential |
| 3595 |
// for conflicts use #ifndef guards. |
| 3596 |
|
| 3597 |
// IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in |
| 3598 |
// is used to differentiate b/w the two. |
| 3599 |
|
| 3600 |
// Different preferences that can be requested from IPSEC protocols. |
| 3601 |
// This can be used with the setsockopt() call to set per socket security |
| 3602 |
// options. When the application uses per-socket API, we will reflect |
| 3603 |
// the request on both outbound and inbound packets. |
| 3604 |
|
| 3605 |
type Ipsec_req = struct { |
| 3606 |
Fipsr_ah_req uint32 |
| 3607 |
Fipsr_esp_req uint32 |
| 3608 |
Fipsr_self_encap_req uint32 |
| 3609 |
Fipsr_auth_alg uint8 |
| 3610 |
Fipsr_esp_alg uint8 |
| 3611 |
Fipsr_esp_auth_alg uint8 |
| 3612 |
F__ccgo_pad1 [1]byte |
| 3613 |
} /* in.h:950:9 */ |
| 3614 |
|
| 3615 |
// Macros for accessing the traffic class and flow label fields from |
| 3616 |
// sin6_flowinfo. |
| 3617 |
// These are designed to be applied to a 32-bit value. |
| 3618 |
|
| 3619 |
// masks |
| 3620 |
|
| 3621 |
// Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for |
| 3622 |
// use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t) |
| 3623 |
// only. They need to be different for User/Kernel versions because union |
| 3624 |
// component data structure is defined differently (it is identical at |
| 3625 |
// binary representation level). |
| 3626 |
// |
| 3627 |
// const struct in6_addr IN6ADDR_ANY_INIT; |
| 3628 |
// const struct in6_addr IN6ADDR_LOOPBACK_INIT; |
| 3629 |
|
| 3630 |
// RFC 2553 specifies the following macros. Their type is defined |
| 3631 |
// as "int" in the RFC but they only have boolean significance |
| 3632 |
// (zero or non-zero). For the purposes of our comment notation, |
| 3633 |
// we assume a hypothetical type "bool" defined as follows to |
| 3634 |
// write the prototypes assumed for macros in our comments better. |
| 3635 |
// |
| 3636 |
// typedef int bool; |
| 3637 |
|
| 3638 |
// IN6 macros used to test for special IPv6 addresses |
| 3639 |
// (Mostly from spec) |
| 3640 |
// |
| 3641 |
// bool IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *); |
| 3642 |
// bool IN6_IS_ADDR_LOOPBACK (const struct in6_addr *); |
| 3643 |
// bool IN6_IS_ADDR_MULTICAST (const struct in6_addr *); |
| 3644 |
// bool IN6_IS_ADDR_LINKLOCAL (const struct in6_addr *); |
| 3645 |
// bool IN6_IS_ADDR_SITELOCAL (const struct in6_addr *); |
| 3646 |
// bool IN6_IS_ADDR_V4MAPPED (const struct in6_addr *); |
| 3647 |
// bool IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553 |
| 3648 |
// bool IN6_IS_ADDR_V4COMPAT (const struct in6_addr *); |
| 3649 |
// bool IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553 |
| 3650 |
// bool IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *); |
| 3651 |
// bool IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *); |
| 3652 |
// bool IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *); |
| 3653 |
// bool IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *); |
| 3654 |
// bool IN6_IS_ADDR_MC_GLOBAL (const struct in6_addr *); |
| 3655 |
// bool IN6_IS_ADDR_6TO4 (const struct in6_addr *); -- Not from RFC2553 |
| 3656 |
// bool IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *, |
| 3657 |
// const struct in6_addr *); -- Not from RFC2553 |
| 3658 |
// bool IN6_IS_ADDR_LINKSCOPE (const struct in6addr *); -- Not from RFC2553 |
| 3659 |
|
| 3660 |
// IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY |
| 3661 |
// Note: This macro is currently NOT defined in RFC2553 specification |
| 3662 |
// and not a standard macro that portable applications should use. |
| 3663 |
|
| 3664 |
// Exclude loopback and unspecified address |
| 3665 |
|
| 3666 |
// Note: |
| 3667 |
// IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553 |
| 3668 |
// specification and not a standard macro that portable applications |
| 3669 |
// should use. |
| 3670 |
|
| 3671 |
// The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or |
| 3672 |
// RFC, and shouldn't be used by portable applications. It is used to see |
| 3673 |
// if an address is a solicited-node multicast address, which is prefixed |
| 3674 |
// with ff02:0:0:0:0:1:ff00::/104. |
| 3675 |
|
| 3676 |
// Macros to a) test for 6to4 IPv6 address, and b) to test if two |
| 3677 |
// 6to4 addresses have the same /48 prefix, and, hence, are from the |
| 3678 |
// same 6to4 site. |
| 3679 |
|
| 3680 |
// IN6_IS_ADDR_LINKSCOPE |
| 3681 |
// Identifies an address as being either link-local, link-local multicast or |
| 3682 |
// node-local multicast. All types of addresses are considered to be unique |
| 3683 |
// within the scope of a given link. |
| 3684 |
|
| 3685 |
// Useful utility macros for operations with IPv6 addresses |
| 3686 |
// Note: These macros are NOT defined in the RFC2553 or any other |
| 3687 |
// standard specification and are not standard macros that portable |
| 3688 |
// applications should use. |
| 3689 |
|
| 3690 |
// IN6_V4MAPPED_TO_INADDR |
| 3691 |
// IN6_V4MAPPED_TO_IPADDR |
| 3692 |
// Assign a IPv4-Mapped IPv6 address to an IPv4 address. |
| 3693 |
// Note: These macros are NOT defined in RFC2553 or any other standard |
| 3694 |
// specification and are not macros that portable applications should |
| 3695 |
// use. |
| 3696 |
// |
| 3697 |
// void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4); |
| 3698 |
// void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4); |
| 3699 |
// |
| 3700 |
|
| 3701 |
// IN6_INADDR_TO_V4MAPPED |
| 3702 |
// IN6_IPADDR_TO_V4MAPPED |
| 3703 |
// Assign a IPv4 address address to an IPv6 address as a IPv4-mapped |
| 3704 |
// address. |
| 3705 |
// Note: These macros are NOT defined in RFC2553 or any other standard |
| 3706 |
// specification and are not macros that portable applications should |
| 3707 |
// use. |
| 3708 |
// |
| 3709 |
// void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6); |
| 3710 |
// void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6); |
| 3711 |
// |
| 3712 |
|
| 3713 |
// IN6_6TO4_TO_V4ADDR |
| 3714 |
// Extract the embedded IPv4 address from the prefix to a 6to4 IPv6 |
| 3715 |
// address. |
| 3716 |
// Note: This macro is NOT defined in RFC2553 or any other standard |
| 3717 |
// specification and is not a macro that portable applications should |
| 3718 |
// use. |
| 3719 |
// Note: we don't use the IPADDR form of the macro because we need |
| 3720 |
// to do a bytewise copy; the V4ADDR in the 6to4 address is not |
| 3721 |
// 32-bit aligned. |
| 3722 |
// |
| 3723 |
// void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4); |
| 3724 |
// |
| 3725 |
|
| 3726 |
// IN6_V4ADDR_TO_6TO4 |
| 3727 |
// Given an IPv4 address and an IPv6 address for output, a 6to4 address |
| 3728 |
// will be created from the IPv4 Address. |
| 3729 |
// Note: This method for creating 6to4 addresses is not standardized |
| 3730 |
// outside of Solaris. The newly created 6to4 address will be of the form |
| 3731 |
// 2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and |
| 3732 |
// HOSTID will equal 1. |
| 3733 |
// |
| 3734 |
// void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6) |
| 3735 |
// |
| 3736 |
|
| 3737 |
// IN6_ARE_ADDR_EQUAL (defined in RFC2292) |
| 3738 |
// Compares if IPv6 addresses are equal. |
| 3739 |
// Note: Compares in order of high likelyhood of a miss so we minimize |
| 3740 |
// compares. (Current heuristic order, compare in reverse order of |
| 3741 |
// uint32_t units) |
| 3742 |
// |
| 3743 |
// bool IN6_ARE_ADDR_EQUAL(const struct in6_addr *, |
| 3744 |
// const struct in6_addr *); |
| 3745 |
|
| 3746 |
// IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs) |
| 3747 |
// Compares if prefixed parts of IPv6 addresses are equal. |
| 3748 |
// |
| 3749 |
// uint32_t IN6_MASK_FROM_PREFIX(int, int); |
| 3750 |
// bool IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *, |
| 3751 |
// const struct in6_addr *, |
| 3752 |
// int); |
| 3753 |
|
| 3754 |
// Options for use with [gs]etsockopt at the IP level. |
| 3755 |
// |
| 3756 |
// Note: Some of the IP_ namespace has conflict with and |
| 3757 |
// and is exposed through <xti.h>. (It also requires exposing |
| 3758 |
// options not implemented). The options with potential |
| 3759 |
// for conflicts use #ifndef guards. |
| 3760 |
|
| 3761 |
// IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in |
| 3762 |
// is used to differentiate b/w the two. |
| 3763 |
|
| 3764 |
// Different preferences that can be requested from IPSEC protocols. |
| 3765 |
// This can be used with the setsockopt() call to set per socket security |
| 3766 |
// options. When the application uses per-socket API, we will reflect |
| 3767 |
// the request on both outbound and inbound packets. |
| 3768 |
|
| 3769 |
type Ipsec_req_t = Ipsec_req /* in.h:957:3 */ |
| 3770 |
|
| 3771 |
// MCAST_* options are protocol-independent. The actual definitions |
| 3772 |
// are with the v6 options below; this comment is here to note the |
| 3773 |
// namespace usage. |
| 3774 |
// |
| 3775 |
// #define MCAST_JOIN_GROUP 0x29 |
| 3776 |
// #define MCAST_LEAVE_GROUP 0x2a |
| 3777 |
// #define MCAST_BLOCK_SOURCE 0x2b |
| 3778 |
// #define MCAST_UNBLOCK_SOURCE 0x2c |
| 3779 |
// #define MCAST_JOIN_SOURCE_GROUP 0x2d |
| 3780 |
// #define MCAST_LEAVE_SOURCE_GROUP 0x2e |
| 3781 |
|
| 3782 |
// SunOS private (potentially not portable) IP_ option names |
| 3783 |
// can be reused 0x44 |
| 3784 |
|
| 3785 |
// Option values and names (when !_XPG5) shared with <xti_inet.h> |
| 3786 |
|
| 3787 |
// The following option values are reserved by <xti_inet.h> |
| 3788 |
// |
| 3789 |
// T_IP_OPTIONS 0x107 - IP per-packet options |
| 3790 |
// T_IP_TOS 0x108 - IP per packet type of service |
| 3791 |
|
| 3792 |
// Default value constants for multicast attributes controlled by |
| 3793 |
// IP*_MULTICAST_LOOP and IP*_MULTICAST_{TTL,HOPS} options. |
| 3794 |
|
| 3795 |
// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. |
| 3796 |
type Ip_mreq = struct { |
| 3797 |
Fimr_multiaddr struct { |
| 3798 |
FS_un struct { |
| 3799 |
F__ccgo_pad1 [0]uint32 |
| 3800 |
FS_un_b struct { |
| 3801 |
Fs_b1 uint8 |
| 3802 |
Fs_b2 uint8 |
| 3803 |
Fs_b3 uint8 |
| 3804 |
Fs_b4 uint8 |
| 3805 |
} |
| 3806 |
} |
| 3807 |
} |
| 3808 |
Fimr_interface struct { |
| 3809 |
FS_un struct { |
| 3810 |
F__ccgo_pad1 [0]uint32 |
| 3811 |
FS_un_b struct { |
| 3812 |
Fs_b1 uint8 |
| 3813 |
Fs_b2 uint8 |
| 3814 |
Fs_b3 uint8 |
| 3815 |
Fs_b4 uint8 |
| 3816 |
} |
| 3817 |
} |
| 3818 |
} |
| 3819 |
} /* in.h:1015:1 */ |
| 3820 |
|
| 3821 |
// Argument structure for IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE, |
| 3822 |
// IP_ADD_SOURCE_MEMBERSHIP, and IP_DROP_SOURCE_MEMBERSHIP. |
| 3823 |
type Ip_mreq_source = struct { |
| 3824 |
Fimr_multiaddr struct { |
| 3825 |
FS_un struct { |
| 3826 |
F__ccgo_pad1 [0]uint32 |
| 3827 |
FS_un_b struct { |
| 3828 |
Fs_b1 uint8 |
| 3829 |
Fs_b2 uint8 |
| 3830 |
Fs_b3 uint8 |
| 3831 |
Fs_b4 uint8 |
| 3832 |
} |
| 3833 |
} |
| 3834 |
} |
| 3835 |
Fimr_sourceaddr struct { |
| 3836 |
FS_un struct { |
| 3837 |
F__ccgo_pad1 [0]uint32 |
| 3838 |
FS_un_b struct { |
| 3839 |
Fs_b1 uint8 |
| 3840 |
Fs_b2 uint8 |
| 3841 |
Fs_b3 uint8 |
| 3842 |
Fs_b4 uint8 |
| 3843 |
} |
| 3844 |
} |
| 3845 |
} |
| 3846 |
Fimr_interface struct { |
| 3847 |
FS_un struct { |
| 3848 |
F__ccgo_pad1 [0]uint32 |
| 3849 |
FS_un_b struct { |
| 3850 |
Fs_b1 uint8 |
| 3851 |
Fs_b2 uint8 |
| 3852 |
Fs_b3 uint8 |
| 3853 |
Fs_b4 uint8 |
| 3854 |
} |
| 3855 |
} |
| 3856 |
} |
| 3857 |
} /* in.h:1024:1 */ |
| 3858 |
|
| 3859 |
// Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP on |
| 3860 |
// IPv6 addresses. |
| 3861 |
type Ipv6_mreq = struct { |
| 3862 |
Fipv6mr_multiaddr struct { |
| 3863 |
F_S6_un struct { |
| 3864 |
F__ccgo_pad1 [0]uint32 |
| 3865 |
F_S6_u8 [16]uint8 |
| 3866 |
} |
| 3867 |
} |
| 3868 |
Fipv6mr_interface uint32 |
| 3869 |
} /* in.h:1034:1 */ |
| 3870 |
|
| 3871 |
// Use #pragma pack() construct to force 32-bit alignment on amd64. |
| 3872 |
// This is needed to keep the structure size and offsets consistent |
| 3873 |
// between a 32-bit app and the 64-bit amd64 kernel in structures |
| 3874 |
// where 64-bit alignment would create gaps (in this case, structures |
| 3875 |
// which have a uint32_t followed by a struct sockaddr_storage). |
| 3876 |
|
| 3877 |
// Argument structure for MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP. |
| 3878 |
type Group_req = struct { |
| 3879 |
Fgr_interface uint32 |
| 3880 |
F__ccgo_pad1 [4]byte |
| 3881 |
Fgr_group struct { |
| 3882 |
Fss_family uint16 |
| 3883 |
F_ss_pad1 [6]int8 |
| 3884 |
F_ss_align float64 |
| 3885 |
F_ss_pad2 [240]int8 |
| 3886 |
} |
| 3887 |
} /* in.h:1053:1 */ |
| 3888 |
|
| 3889 |
// Argument structure for MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE, |
| 3890 |
// MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP. |
| 3891 |
type Group_source_req = struct { |
| 3892 |
Fgsr_interface uint32 |
| 3893 |
F__ccgo_pad1 [4]byte |
| 3894 |
Fgsr_group struct { |
| 3895 |
Fss_family uint16 |
| 3896 |
F_ss_pad1 [6]int8 |
| 3897 |
F_ss_align float64 |
| 3898 |
F_ss_pad2 [240]int8 |
| 3899 |
} |
| 3900 |
Fgsr_source struct { |
| 3901 |
Fss_family uint16 |
| 3902 |
F_ss_pad1 [6]int8 |
| 3903 |
F_ss_align float64 |
| 3904 |
F_ss_pad2 [240]int8 |
| 3905 |
} |
| 3906 |
} /* in.h:1062:1 */ |
| 3907 |
|
| 3908 |
// Argument for SIOC[GS]MSFILTER ioctls |
| 3909 |
type Group_filter = struct { |
| 3910 |
Fgf_interface uint32 |
| 3911 |
F__ccgo_pad1 [4]byte |
| 3912 |
Fgf_group struct { |
| 3913 |
Fss_family uint16 |
| 3914 |
F_ss_pad1 [6]int8 |
| 3915 |
F_ss_align float64 |
| 3916 |
F_ss_pad2 [240]int8 |
| 3917 |
} |
| 3918 |
Fgf_fmode uint32 |
| 3919 |
Fgf_numsrc uint32 |
| 3920 |
Fgf_slist [1]struct { |
| 3921 |
Fss_family uint16 |
| 3922 |
F_ss_pad1 [6]int8 |
| 3923 |
F_ss_align float64 |
| 3924 |
F_ss_pad2 [240]int8 |
| 3925 |
} |
| 3926 |
} /* in.h:1071:1 */ |
| 3927 |
|
| 3928 |
// Argument for SIOC[GS]IPMSFILTER ioctls (IPv4-specific) |
| 3929 |
type Ip_msfilter = struct { |
| 3930 |
Fimsf_multiaddr struct { |
| 3931 |
FS_un struct { |
| 3932 |
F__ccgo_pad1 [0]uint32 |
| 3933 |
FS_un_b struct { |
| 3934 |
Fs_b1 uint8 |
| 3935 |
Fs_b2 uint8 |
| 3936 |
Fs_b3 uint8 |
| 3937 |
Fs_b4 uint8 |
| 3938 |
} |
| 3939 |
} |
| 3940 |
} |
| 3941 |
Fimsf_interface struct { |
| 3942 |
FS_un struct { |
| 3943 |
F__ccgo_pad1 [0]uint32 |
| 3944 |
FS_un_b struct { |
| 3945 |
Fs_b1 uint8 |
| 3946 |
Fs_b2 uint8 |
| 3947 |
Fs_b3 uint8 |
| 3948 |
Fs_b4 uint8 |
| 3949 |
} |
| 3950 |
} |
| 3951 |
} |
| 3952 |
Fimsf_fmode uint32 |
| 3953 |
Fimsf_numsrc uint32 |
| 3954 |
Fimsf_slist [1]struct { |
| 3955 |
FS_un struct { |
| 3956 |
F__ccgo_pad1 [0]uint32 |
| 3957 |
FS_un_b struct { |
| 3958 |
Fs_b1 uint8 |
| 3959 |
Fs_b2 uint8 |
| 3960 |
Fs_b3 uint8 |
| 3961 |
Fs_b4 uint8 |
| 3962 |
} |
| 3963 |
} |
| 3964 |
} |
| 3965 |
} /* in.h:1090:1 */ |
| 3966 |
|
| 3967 |
// Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter() |
| 3968 |
|
| 3969 |
// Argument struct for IP_PKTINFO option |
| 3970 |
type In_pktinfo = struct { |
| 3971 |
Fipi_ifindex uint32 |
| 3972 |
Fipi_spec_dst struct { |
| 3973 |
FS_un struct { |
| 3974 |
F__ccgo_pad1 [0]uint32 |
| 3975 |
FS_un_b struct { |
| 3976 |
Fs_b1 uint8 |
| 3977 |
Fs_b2 uint8 |
| 3978 |
Fs_b3 uint8 |
| 3979 |
Fs_b4 uint8 |
| 3980 |
} |
| 3981 |
} |
| 3982 |
} |
| 3983 |
Fipi_addr struct { |
| 3984 |
FS_un struct { |
| 3985 |
F__ccgo_pad1 [0]uint32 |
| 3986 |
FS_un_b struct { |
| 3987 |
Fs_b1 uint8 |
| 3988 |
Fs_b2 uint8 |
| 3989 |
Fs_b3 uint8 |
| 3990 |
Fs_b4 uint8 |
| 3991 |
} |
| 3992 |
} |
| 3993 |
} |
| 3994 |
} /* in.h:1127:9 */ |
| 3995 |
|
| 3996 |
// Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter() |
| 3997 |
|
| 3998 |
// Argument struct for IP_PKTINFO option |
| 3999 |
type In_pktinfo_t = In_pktinfo /* in.h:1131:3 */ |
| 4000 |
|
| 4001 |
// Argument struct for IPV6_PKTINFO option |
| 4002 |
type In6_pktinfo = struct { |
| 4003 |
Fipi6_addr struct { |
| 4004 |
F_S6_un struct { |
| 4005 |
F__ccgo_pad1 [0]uint32 |
| 4006 |
F_S6_u8 [16]uint8 |
| 4007 |
} |
| 4008 |
} |
| 4009 |
Fipi6_ifindex uint32 |
| 4010 |
} /* in.h:1136:1 */ |
| 4011 |
|
| 4012 |
// Argument struct for IPV6_MTUINFO option |
| 4013 |
type Ip6_mtuinfo = struct { |
| 4014 |
Fip6m_addr struct { |
| 4015 |
Fsin6_family uint16 |
| 4016 |
Fsin6_port uint16 |
| 4017 |
Fsin6_flowinfo uint32 |
| 4018 |
Fsin6_addr struct { |
| 4019 |
F_S6_un struct { |
| 4020 |
F__ccgo_pad1 [0]uint32 |
| 4021 |
F_S6_u8 [16]uint8 |
| 4022 |
} |
| 4023 |
} |
| 4024 |
Fsin6_scope_id uint32 |
| 4025 |
F__sin6_src_id uint32 |
| 4026 |
} |
| 4027 |
Fip6m_mtu uint32 |
| 4028 |
} /* in.h:1144:1 */ |
| 4029 |
|
| 4030 |
// Argument structure for IP_ADD_PROXY_ADDR. |
| 4031 |
// Note that this is an unstable, experimental interface. It may change |
| 4032 |
// later. Don't use it unless you know what it is. |
| 4033 |
type In_prefix_t = struct { |
| 4034 |
Fin_prefix_addr In_addr |
| 4035 |
Fin_prefix_len uint32 |
| 4036 |
} /* in.h:1183:3 */ |
| 4037 |
|
| 4038 |
var _ int8 /* gen.c:2:13: */ |