| 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_netbsd_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 |
AF_APPLETALK = 16 // socket.h:218:1: |
| 19 |
AF_ARP = 28 // socket.h:237:1: |
| 20 |
AF_BLUETOOTH = 31 // socket.h:243:1: |
| 21 |
AF_CAN = 35 // socket.h:247:1: |
| 22 |
AF_CCITT = 10 // socket.h:212:1: |
| 23 |
AF_CHAOS = 5 // socket.h:206:1: |
| 24 |
AF_CNT = 21 // socket.h:225:1: |
| 25 |
AF_COIP = 20 // socket.h:224:1: |
| 26 |
AF_DATAKIT = 9 // socket.h:211:1: |
| 27 |
AF_DECnet = 12 // socket.h:214:1: |
| 28 |
AF_DLI = 13 // socket.h:215:1: |
| 29 |
AF_E164 = 26 // socket.h:235:1: |
| 30 |
AF_ECMA = 8 // socket.h:210:1: |
| 31 |
AF_ETHER = 36 // socket.h:248:1: |
| 32 |
AF_HYLINK = 15 // socket.h:217:1: |
| 33 |
AF_IEEE80211 = 32 // socket.h:244:1: |
| 34 |
AF_IMPLINK = 3 // socket.h:204:1: |
| 35 |
AF_INET = 2 // socket.h:203:1: |
| 36 |
AF_INET6 = 24 // socket.h:230:1: |
| 37 |
AF_IPX = 23 // socket.h:229:1: |
| 38 |
AF_ISDN = 26 // socket.h:234:1: |
| 39 |
AF_ISO = 7 // socket.h:208:1: |
| 40 |
AF_LAT = 14 // socket.h:216:1: |
| 41 |
AF_LINK = 18 // socket.h:220:1: |
| 42 |
AF_LOCAL = 1 // socket.h:201:1: |
| 43 |
AF_MAX = 37 // socket.h:249:1: |
| 44 |
AF_MPLS = 33 // socket.h:245:1: |
| 45 |
AF_NATM = 27 // socket.h:236:1: |
| 46 |
AF_NS = 6 // socket.h:207:1: |
| 47 |
AF_OROUTE = 17 // socket.h:219:1: |
| 48 |
AF_OSI = 7 // socket.h:209:1: |
| 49 |
AF_PUP = 4 // socket.h:205:1: |
| 50 |
AF_ROUTE = 34 // socket.h:246:1: |
| 51 |
AF_SNA = 11 // socket.h:213:1: |
| 52 |
AF_UNIX = 1 // socket.h:202:1: |
| 53 |
AF_UNSPEC = 0 // socket.h:200:1: |
| 54 |
BIG_ENDIAN = 4321 // endian.h:101:1: |
| 55 |
BYTE_ORDER = 1234 // endian.h:103:1: |
| 56 |
CTL_IPPROTO_IPSEC = 258 // in.h:118:1: |
| 57 |
FD_SETSIZE = 256 // fd_set.h:59:1: |
| 58 |
ICMP6_FILTER = 18 // in6.h:393:1: |
| 59 |
INET6_ADDRSTRLEN = 46 // in6.h:138:1: |
| 60 |
INET6_IS_ADDR_LINKLOCAL = 1 // in6.h:678:1: |
| 61 |
INET6_IS_ADDR_MC_LINKLOCAL = 2 // in6.h:679:1: |
| 62 |
INET6_IS_ADDR_SITELOCAL = 4 // in6.h:680:1: |
| 63 |
INET_ADDRSTRLEN = 16 // in.h:249:1: |
| 64 |
INT16_MAX = 32767 // common_int_limits.h:53:1: |
| 65 |
INT16_MIN = -32768 // common_int_limits.h:47:1: |
| 66 |
INT32_MAX = 2147483647 // common_int_limits.h:54:1: |
| 67 |
INT32_MIN = -2147483648 // common_int_limits.h:48:1: |
| 68 |
INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1: |
| 69 |
INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1: |
| 70 |
INT8_MAX = 127 // common_int_limits.h:52:1: |
| 71 |
INT8_MIN = -128 // common_int_limits.h:46:1: |
| 72 |
INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1: |
| 73 |
INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1: |
| 74 |
INTPTR_MAX = 9223372036854775807 // common_int_limits.h:105:1: |
| 75 |
INTPTR_MIN = -9223372036854775808 // common_int_limits.h:104:1: |
| 76 |
INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1: |
| 77 |
INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1: |
| 78 |
INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1: |
| 79 |
INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1: |
| 80 |
INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1: |
| 81 |
INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1: |
| 82 |
INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1: |
| 83 |
INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1: |
| 84 |
INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1: |
| 85 |
INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1: |
| 86 |
INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1: |
| 87 |
INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1: |
| 88 |
INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1: |
| 89 |
INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1: |
| 90 |
INT_LEAST8_MAX = 127 // common_int_limits.h:72:1: |
| 91 |
INT_LEAST8_MIN = -128 // common_int_limits.h:66:1: |
| 92 |
IN_CLASSA_MAX = 128 // in.h:182:1: |
| 93 |
IN_CLASSA_NSHIFT = 24 // in.h:180:1: |
| 94 |
IN_CLASSB_MAX = 65536 // in.h:189:1: |
| 95 |
IN_CLASSB_NSHIFT = 16 // in.h:187:1: |
| 96 |
IN_CLASSC_NSHIFT = 8 // in.h:194:1: |
| 97 |
IN_CLASSD_NSHIFT = 28 // in.h:201:1: |
| 98 |
IN_LOOPBACKNET = 127 // in.h:236:1: |
| 99 |
IPCTL_ALLOWSRCRT = 7 // in.h:348:1: |
| 100 |
IPCTL_ANONPORTMAX = 11 // in.h:352:1: |
| 101 |
IPCTL_ANONPORTMIN = 10 // in.h:351:1: |
| 102 |
IPCTL_CHECKINTERFACE = 20 // in.h:361:1: |
| 103 |
IPCTL_DAD_COUNT = 25 // in.h:366:1: |
| 104 |
IPCTL_DEFTTL = 3 // in.h:344:1: |
| 105 |
IPCTL_DIRECTEDBCAST = 6 // in.h:347:1: |
| 106 |
IPCTL_FORWARDING = 1 // in.h:342:1: |
| 107 |
IPCTL_FORWSRCRT = 5 // in.h:346:1: |
| 108 |
IPCTL_GIF_TTL = 15 // in.h:356:1: |
| 109 |
IPCTL_GRE_TTL = 19 // in.h:360:1: |
| 110 |
IPCTL_HOSTZEROBROADCAST = 14 // in.h:355:1: |
| 111 |
IPCTL_IFQ = 21 // in.h:362:1: |
| 112 |
IPCTL_LOOPBACKCKSUM = 23 // in.h:364:1: |
| 113 |
IPCTL_LOWPORTMAX = 17 // in.h:358:1: |
| 114 |
IPCTL_LOWPORTMIN = 16 // in.h:357:1: |
| 115 |
IPCTL_MAXFLOWS = 13 // in.h:354:1: |
| 116 |
IPCTL_MAXFRAGPACKETS = 18 // in.h:359:1: |
| 117 |
IPCTL_MTUDISC = 9 // in.h:350:1: |
| 118 |
IPCTL_MTUDISCTIMEOUT = 12 // in.h:353:1: |
| 119 |
IPCTL_RANDOMID = 22 // in.h:363:1: |
| 120 |
IPCTL_SENDREDIRECTS = 2 // in.h:343:1: |
| 121 |
IPCTL_STATS = 24 // in.h:365:1: |
| 122 |
IPCTL_SUBNETSARELOCAL = 8 // in.h:349:1: |
| 123 |
IPPORT_ANONMAX = 65535 // in.h:151:1: |
| 124 |
IPPORT_ANONMIN = 49152 // in.h:150:1: |
| 125 |
IPPORT_RESERVED = 1024 // in.h:149:1: |
| 126 |
IPPORT_RESERVEDMAX = 1023 // in.h:153:1: |
| 127 |
IPPORT_RESERVEDMIN = 600 // in.h:152:1: |
| 128 |
IPPROTO_AH = 51 // in.h:95:1: |
| 129 |
IPPROTO_CARP = 112 // in.h:107:1: |
| 130 |
IPPROTO_DCCP = 33 // in.h:88:1: |
| 131 |
IPPROTO_DONE = 257 // in.h:115:1: |
| 132 |
IPPROTO_DSTOPTS = 60 // in.h:100:1: |
| 133 |
IPPROTO_EGP = 8 // in.h:83:1: |
| 134 |
IPPROTO_ENCAP = 98 // in.h:103:1: |
| 135 |
IPPROTO_EON = 80 // in.h:101:1: |
| 136 |
IPPROTO_ESP = 50 // in.h:94:1: |
| 137 |
IPPROTO_ETHERIP = 97 // in.h:102:1: |
| 138 |
IPPROTO_FRAGMENT = 44 // in.h:91:1: |
| 139 |
IPPROTO_GGP = 3 // in.h:79:1: |
| 140 |
IPPROTO_GRE = 47 // in.h:93:1: |
| 141 |
IPPROTO_HOPOPTS = 0 // in.h:76:1: |
| 142 |
IPPROTO_ICMP = 1 // in.h:77:1: |
| 143 |
IPPROTO_ICMPV6 = 58 // in.h:98:1: |
| 144 |
IPPROTO_IDP = 22 // in.h:86:1: |
| 145 |
IPPROTO_IGMP = 2 // in.h:78:1: |
| 146 |
IPPROTO_IP = 0 // in.h:75:1: |
| 147 |
IPPROTO_IPCOMP = 108 // in.h:105:1: |
| 148 |
IPPROTO_IPIP = 4 // in.h:81:1: |
| 149 |
IPPROTO_IPV4 = 4 // in.h:80:1: |
| 150 |
IPPROTO_IPV6 = 41 // in.h:89:1: |
| 151 |
IPPROTO_IPV6_ICMP = 58 // in.h:97:1: |
| 152 |
IPPROTO_L2TP = 115 // in.h:108:1: |
| 153 |
IPPROTO_MAX = 256 // in.h:112:1: |
| 154 |
IPPROTO_MOBILE = 55 // in.h:96:1: |
| 155 |
IPPROTO_NONE = 59 // in.h:99:1: |
| 156 |
IPPROTO_PFSYNC = 240 // in.h:110:1: |
| 157 |
IPPROTO_PIM = 103 // in.h:104:1: |
| 158 |
IPPROTO_PUP = 12 // in.h:84:1: |
| 159 |
IPPROTO_RAW = 255 // in.h:111:1: |
| 160 |
IPPROTO_ROUTING = 43 // in.h:90:1: |
| 161 |
IPPROTO_RSVP = 46 // in.h:92:1: |
| 162 |
IPPROTO_SCTP = 132 // in.h:109:1: |
| 163 |
IPPROTO_TCP = 6 // in.h:82:1: |
| 164 |
IPPROTO_TP = 29 // in.h:87:1: |
| 165 |
IPPROTO_UDP = 17 // in.h:85:1: |
| 166 |
IPPROTO_VRRP = 112 // in.h:106:1: |
| 167 |
IPV6CTL_ACCEPT_RTADV = 12 // in6.h:509:1: |
| 168 |
IPV6CTL_ADDRCTLPOLICY = 38 // in6.h:530:1: |
| 169 |
IPV6CTL_ANONPORTMAX = 29 // in6.h:524:1: |
| 170 |
IPV6CTL_ANONPORTMIN = 28 // in6.h:523:1: |
| 171 |
IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:514:1: |
| 172 |
IPV6CTL_AUTO_LINKLOCAL = 35 // in6.h:528:1: |
| 173 |
IPV6CTL_DAD_COUNT = 16 // in6.h:513:1: |
| 174 |
IPV6CTL_DEFHLIM = 3 // in6.h:500:1: |
| 175 |
IPV6CTL_DEFMCASTHLIM = 18 // in6.h:515:1: |
| 176 |
IPV6CTL_FORWARDING = 1 // in6.h:498:1: |
| 177 |
IPV6CTL_FORWSRCRT = 5 // in6.h:502:1: |
| 178 |
IPV6CTL_GIF_HLIM = 19 // in6.h:516:1: |
| 179 |
IPV6CTL_HDRNESTLIMIT = 15 // in6.h:512:1: |
| 180 |
IPV6CTL_IFQ = 42 // in6.h:534:1: |
| 181 |
IPV6CTL_KAME_VERSION = 20 // in6.h:517:1: |
| 182 |
IPV6CTL_KEEPFAITH = 13 // in6.h:510:1: |
| 183 |
IPV6CTL_LOG_INTERVAL = 14 // in6.h:511:1: |
| 184 |
IPV6CTL_LOWPORTMAX = 31 // in6.h:526:1: |
| 185 |
IPV6CTL_LOWPORTMIN = 30 // in6.h:525:1: |
| 186 |
IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:506:1: |
| 187 |
IPV6CTL_MAXFRAGS = 41 // in6.h:533:1: |
| 188 |
IPV6CTL_MRTPROTO = 8 // in6.h:505:1: |
| 189 |
IPV6CTL_MRTSTATS = 7 // in6.h:504:1: |
| 190 |
IPV6CTL_RR_PRUNE = 22 // in6.h:519:1: |
| 191 |
IPV6CTL_RTADV_MAXROUTES = 43 // in6.h:535:1: |
| 192 |
IPV6CTL_RTADV_NUMROUTES = 44 // in6.h:537:1: |
| 193 |
IPV6CTL_SENDREDIRECTS = 2 // in6.h:499:1: |
| 194 |
IPV6CTL_SOURCECHECK = 10 // in6.h:507:1: |
| 195 |
IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:508:1: |
| 196 |
IPV6CTL_STATS = 6 // in6.h:503:1: |
| 197 |
IPV6CTL_USE_DEFAULTZONE = 39 // in6.h:531:1: |
| 198 |
IPV6CTL_USE_DEPRECATED = 21 // in6.h:518:1: |
| 199 |
IPV6CTL_V6ONLY = 24 // in6.h:521:1: |
| 200 |
IPV6PORT_ANONMAX = 65535 // in6.h:115:1: |
| 201 |
IPV6PORT_ANONMIN = 49152 // in6.h:114:1: |
| 202 |
IPV6PORT_RESERVED = 1024 // in6.h:113:1: |
| 203 |
IPV6PORT_RESERVEDMAX = 1023 // in6.h:117:1: |
| 204 |
IPV6PORT_RESERVEDMIN = 600 // in6.h:116:1: |
| 205 |
IPV6_CHECKSUM = 26 // in6.h:405:1: |
| 206 |
IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:453:1: |
| 207 |
IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:454:1: |
| 208 |
IPV6_DONTFRAG = 62 // in6.h:441:1: |
| 209 |
IPV6_DSTOPTS = 50 // in6.h:432:1: |
| 210 |
IPV6_FAITH = 29 // in6.h:409:1: |
| 211 |
IPV6_HOPLIMIT = 47 // in6.h:429:1: |
| 212 |
IPV6_HOPOPTS = 49 // in6.h:431:1: |
| 213 |
IPV6_IPSEC_POLICY = 28 // in6.h:408:1: |
| 214 |
IPV6_JOIN_GROUP = 12 // in6.h:388:1: |
| 215 |
IPV6_LEAVE_GROUP = 13 // in6.h:389:1: |
| 216 |
IPV6_MULTICAST_HOPS = 10 // in6.h:385:1: |
| 217 |
IPV6_MULTICAST_IF = 9 // in6.h:384:1: |
| 218 |
IPV6_MULTICAST_LOOP = 11 // in6.h:386:1: |
| 219 |
IPV6_NEXTHOP = 48 // in6.h:430:1: |
| 220 |
IPV6_PATHMTU = 44 // in6.h:424:1: |
| 221 |
IPV6_PKTINFO = 46 // in6.h:428:1: |
| 222 |
IPV6_PORTALGO = 17 // in6.h:392:1: |
| 223 |
IPV6_PORTRANGE = 14 // in6.h:390:1: |
| 224 |
IPV6_PORTRANGE_DEFAULT = 0 // in6.h:484:1: |
| 225 |
IPV6_PORTRANGE_HIGH = 1 // in6.h:485:1: |
| 226 |
IPV6_PORTRANGE_LOW = 2 // in6.h:486:1: |
| 227 |
IPV6_PREFER_TEMPADDR = 63 // in6.h:442:1: |
| 228 |
IPV6_RECVDSTOPTS = 40 // in6.h:418:1: |
| 229 |
IPV6_RECVHOPLIMIT = 37 // in6.h:415:1: |
| 230 |
IPV6_RECVHOPOPTS = 39 // in6.h:417:1: |
| 231 |
IPV6_RECVPATHMTU = 43 // in6.h:423:1: |
| 232 |
IPV6_RECVPKTINFO = 36 // in6.h:414:1: |
| 233 |
IPV6_RECVRTHDR = 38 // in6.h:416:1: |
| 234 |
IPV6_RECVTCLASS = 57 // in6.h:435:1: |
| 235 |
IPV6_RTHDR = 51 // in6.h:433:1: |
| 236 |
IPV6_RTHDRDSTOPTS = 35 // in6.h:412:1: |
| 237 |
IPV6_RTHDR_LOOSE = 0 // in6.h:446:1: |
| 238 |
IPV6_RTHDR_STRICT = 1 // in6.h:447:1: |
| 239 |
IPV6_RTHDR_TYPE_0 = 0 // in6.h:448:1: |
| 240 |
IPV6_SOCKOPT_RESERVED1 = 3 // in6.h:382:1: |
| 241 |
IPV6_TCLASS = 61 // in6.h:440:1: |
| 242 |
IPV6_UNICAST_HOPS = 4 // in6.h:383:1: |
| 243 |
IPV6_USE_MIN_MTU = 42 // in6.h:422:1: |
| 244 |
IPV6_V6ONLY = 27 // in6.h:406:1: |
| 245 |
IP_ADD_MEMBERSHIP = 12 // in.h:283:1: |
| 246 |
IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:312:1: |
| 247 |
IP_DEFAULT_MULTICAST_TTL = 1 // in.h:311:1: |
| 248 |
IP_DROP_MEMBERSHIP = 13 // in.h:284:1: |
| 249 |
IP_ERRORMTU = 21 // in.h:288:1: |
| 250 |
IP_HDRINCL = 2 // in.h:272:1: |
| 251 |
IP_IPSEC_POLICY = 22 // in.h:289:1: |
| 252 |
IP_MAX_MEMBERSHIPS = 20 // in.h:313:1: |
| 253 |
IP_MINTTL = 24 // in.h:291:1: |
| 254 |
IP_MULTICAST_IF = 9 // in.h:279:1: |
| 255 |
IP_MULTICAST_LOOP = 11 // in.h:281:1: |
| 256 |
IP_MULTICAST_TTL = 10 // in.h:280:1: |
| 257 |
IP_OPTIONS = 1 // in.h:271:1: |
| 258 |
IP_PKTINFO = 25 // in.h:292:1: |
| 259 |
IP_PORTALGO = 18 // in.h:285:1: |
| 260 |
IP_PORTRANGE = 19 // in.h:286:1: |
| 261 |
IP_PORTRANGE_DEFAULT = 0 // in.h:327:1: |
| 262 |
IP_PORTRANGE_HIGH = 1 // in.h:328:1: |
| 263 |
IP_PORTRANGE_LOW = 2 // in.h:329:1: |
| 264 |
IP_RECVDSTADDR = 7 // in.h:277:1: |
| 265 |
IP_RECVIF = 20 // in.h:287:1: |
| 266 |
IP_RECVOPTS = 5 // in.h:275:1: |
| 267 |
IP_RECVPKTINFO = 26 // in.h:293:1: |
| 268 |
IP_RECVRETOPTS = 6 // in.h:276:1: |
| 269 |
IP_RECVTTL = 23 // in.h:290:1: |
| 270 |
IP_RETOPTS = 8 // in.h:278:1: |
| 271 |
IP_SENDSRCADDR = 7 // in.h:295:1: |
| 272 |
IP_TOS = 3 // in.h:273:1: |
| 273 |
IP_TTL = 4 // in.h:274:1: |
| 274 |
LITTLE_ENDIAN = 1234 // endian.h:100:1: |
| 275 |
MSG_BCAST = 0x0100 // socket.h:497:1: |
| 276 |
MSG_CMSG_CLOEXEC = 0x0800 // socket.h:501:1: |
| 277 |
MSG_CONTROLMBUF = 0x2000000 // socket.h:515:1: |
| 278 |
MSG_CTRUNC = 0x0020 // socket.h:494:1: |
| 279 |
MSG_DONTROUTE = 0x0004 // socket.h:491:1: |
| 280 |
MSG_DONTWAIT = 0x0080 // socket.h:496:1: |
| 281 |
MSG_EOR = 0x0008 // socket.h:492:1: |
| 282 |
MSG_IOVUSRSPACE = 0x4000000 // socket.h:516:1: |
| 283 |
MSG_LENUSRSPACE = 0x8000000 // socket.h:517:1: |
| 284 |
MSG_MCAST = 0x0200 // socket.h:498:1: |
| 285 |
MSG_NAMEMBUF = 0x1000000 // socket.h:514:1: |
| 286 |
MSG_NBIO = 0x1000 // socket.h:502:1: |
| 287 |
MSG_NOSIGNAL = 0x0400 // socket.h:499:1: |
| 288 |
MSG_NOTIFICATION = 0x4000 // socket.h:504:1: |
| 289 |
MSG_OOB = 0x0001 // socket.h:489:1: |
| 290 |
MSG_PEEK = 0x0002 // socket.h:490:1: |
| 291 |
MSG_TRUNC = 0x0010 // socket.h:493:1: |
| 292 |
MSG_USERFLAGS = 0x0ffffff // socket.h:513:1: |
| 293 |
MSG_WAITALL = 0x0040 // socket.h:495:1: |
| 294 |
MSG_WAITFORONE = 0x2000 // socket.h:503:1: |
| 295 |
NBBY = 8 // types.h:316:1: |
| 296 |
NET_RT_DUMP = 1 // socket.h:457:1: |
| 297 |
NET_RT_FLAGS = 2 // socket.h:458:1: |
| 298 |
NET_RT_IFLIST = 6 // socket.h:462:1: |
| 299 |
NET_RT_OIFLIST = 5 // socket.h:461:1: |
| 300 |
NET_RT_OOIFLIST = 4 // socket.h:460:1: |
| 301 |
NET_RT_OOOIFLIST = 3 // socket.h:459:1: |
| 302 |
NFDBITS = 32 // fd_set.h:93:1: |
| 303 |
NODEVMAJOR = -1 // types.h:258:1: |
| 304 |
PCB_ALL = 0 // socket.h:444:1: |
| 305 |
PCB_SLOP = 20 // socket.h:443:1: |
| 306 |
PDP_ENDIAN = 3412 // endian.h:102:1: |
| 307 |
PF_APPLETALK = 16 // socket.h:334:1: |
| 308 |
PF_ARP = 28 // socket.h:351:1: |
| 309 |
PF_BLUETOOTH = 31 // socket.h:355:1: |
| 310 |
PF_CAN = 35 // socket.h:358:1: |
| 311 |
PF_CCITT = 10 // socket.h:328:1: |
| 312 |
PF_CHAOS = 5 // socket.h:322:1: |
| 313 |
PF_CNT = 21 // socket.h:341:1: |
| 314 |
PF_COIP = 20 // socket.h:340:1: |
| 315 |
PF_DATAKIT = 9 // socket.h:327:1: |
| 316 |
PF_DECnet = 12 // socket.h:330:1: |
| 317 |
PF_DLI = 13 // socket.h:331:1: |
| 318 |
PF_E164 = 26 // socket.h:349:1: |
| 319 |
PF_ECMA = 8 // socket.h:326:1: |
| 320 |
PF_ETHER = 36 // socket.h:359:1: |
| 321 |
PF_HYLINK = 15 // socket.h:333:1: |
| 322 |
PF_IMPLINK = 3 // socket.h:320:1: |
| 323 |
PF_INET = 2 // socket.h:319:1: |
| 324 |
PF_INET6 = 24 // socket.h:342:1: |
| 325 |
PF_IPX = 23 // socket.h:343:1: |
| 326 |
PF_ISDN = 26 // socket.h:348:1: |
| 327 |
PF_ISO = 7 // socket.h:324:1: |
| 328 |
PF_KEY = 29 // socket.h:353:1: |
| 329 |
PF_LAT = 14 // socket.h:332:1: |
| 330 |
PF_LINK = 18 // socket.h:336:1: |
| 331 |
PF_LOCAL = 1 // socket.h:317:1: |
| 332 |
PF_MAX = 37 // socket.h:361:1: |
| 333 |
PF_MPLS = 33 // socket.h:356:1: |
| 334 |
PF_NATM = 27 // socket.h:350:1: |
| 335 |
PF_NS = 6 // socket.h:323:1: |
| 336 |
PF_OROUTE = 17 // socket.h:335:1: |
| 337 |
PF_OSI = 7 // socket.h:325:1: |
| 338 |
PF_PIP = 25 // socket.h:346:1: |
| 339 |
PF_PUP = 4 // socket.h:321:1: |
| 340 |
PF_ROUTE = 34 // socket.h:357:1: |
| 341 |
PF_RTIP = 22 // socket.h:345:1: |
| 342 |
PF_SNA = 11 // socket.h:329:1: |
| 343 |
PF_UNIX = 1 // socket.h:318:1: |
| 344 |
PF_UNSPEC = 0 // socket.h:316:1: |
| 345 |
PF_XTP = 19 // socket.h:338:1: |
| 346 |
PTRDIFF_MAX = 9223372036854775807 // common_int_limits.h:121:1: |
| 347 |
PTRDIFF_MIN = -9223372036854775808 // common_int_limits.h:120:1: |
| 348 |
SCM_CREDS = 0x10 // socket.h:581:1: |
| 349 |
SCM_RIGHTS = 0x01 // socket.h:576:1: |
| 350 |
SCM_TIMESTAMP = 0x08 // socket.h:580:1: |
| 351 |
SHUT_RD = 0 // socket.h:587:1: |
| 352 |
SHUT_RDWR = 2 // socket.h:589:1: |
| 353 |
SHUT_WR = 1 // socket.h:588:1: |
| 354 |
SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1: |
| 355 |
SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1: |
| 356 |
SIN6_LEN = 0 // in6.h:144:1: |
| 357 |
SIZE_MAX = 18446744073709551615 // common_int_limits.h:128:1: |
| 358 |
SOCK_CLOEXEC = 0x10000000 // socket.h:113:1: |
| 359 |
SOCK_CONN_DGRAM = 6 // socket.h:110:1: |
| 360 |
SOCK_DCCP = 6 // socket.h:111:1: |
| 361 |
SOCK_DGRAM = 2 // socket.h:106:1: |
| 362 |
SOCK_FLAGS_MASK = 0xf0000000 // socket.h:116:1: |
| 363 |
SOCK_NONBLOCK = 0x20000000 // socket.h:114:1: |
| 364 |
SOCK_NOSIGPIPE = 0x40000000 // socket.h:115:1: |
| 365 |
SOCK_RAW = 3 // socket.h:107:1: |
| 366 |
SOCK_RDM = 4 // socket.h:108:1: |
| 367 |
SOCK_SEQPACKET = 5 // socket.h:109:1: |
| 368 |
SOCK_STREAM = 1 // socket.h:105:1: |
| 369 |
SOL_SOCKET = 0xffff // socket.h:195:1: |
| 370 |
SOMAXCONN = 128 // socket.h:470:1: |
| 371 |
SO_ACCEPTCONN = 0x0002 // socket.h:122:1: |
| 372 |
SO_ACCEPTFILTER = 0x1000 // socket.h:133:1: |
| 373 |
SO_BROADCAST = 0x0020 // socket.h:126:1: |
| 374 |
SO_DEBUG = 0x0001 // socket.h:121:1: |
| 375 |
SO_DEFOPTS = 27645 // socket.h:138:1: |
| 376 |
SO_DONTROUTE = 0x0010 // socket.h:125:1: |
| 377 |
SO_ERROR = 0x1007 // socket.h:169:1: |
| 378 |
SO_KEEPALIVE = 0x0008 // socket.h:124:1: |
| 379 |
SO_LINGER = 0x0080 // socket.h:128:1: |
| 380 |
SO_NOHEADER = 0x100a // socket.h:173:1: |
| 381 |
SO_NOSIGPIPE = 0x0800 // socket.h:132:1: |
| 382 |
SO_OOBINLINE = 0x0100 // socket.h:129:1: |
| 383 |
SO_OVERFLOWED = 0x1009 // socket.h:171:1: |
| 384 |
SO_RCVBUF = 0x1002 // socket.h:164:1: |
| 385 |
SO_RCVLOWAT = 0x1004 // socket.h:166:1: |
| 386 |
SO_RCVTIMEO = 0x100c // socket.h:178:1: |
| 387 |
SO_RERROR = 0x4000 // socket.h:135:1: |
| 388 |
SO_REUSEADDR = 0x0004 // socket.h:123:1: |
| 389 |
SO_REUSEPORT = 0x0200 // socket.h:130:1: |
| 390 |
SO_SNDBUF = 0x1001 // socket.h:163:1: |
| 391 |
SO_SNDLOWAT = 0x1003 // socket.h:165:1: |
| 392 |
SO_SNDTIMEO = 0x100b // socket.h:177:1: |
| 393 |
SO_TIMESTAMP = 0x2000 // socket.h:134:1: |
| 394 |
SO_TYPE = 0x1008 // socket.h:170:1: |
| 395 |
SO_USELOOPBACK = 0x0040 // socket.h:127:1: |
| 396 |
UINT16_MAX = 65535 // common_int_limits.h:59:1: |
| 397 |
UINT32_MAX = 4294967295 // common_int_limits.h:60:1: |
| 398 |
UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1: |
| 399 |
UINT8_MAX = 255 // common_int_limits.h:58:1: |
| 400 |
UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1: |
| 401 |
UINTPTR_MAX = 18446744073709551615 // common_int_limits.h:106:1: |
| 402 |
UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1: |
| 403 |
UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1: |
| 404 |
UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1: |
| 405 |
UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1: |
| 406 |
UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1: |
| 407 |
UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1: |
| 408 |
UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1: |
| 409 |
UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1: |
| 410 |
UIO_MAXIOV = 1024 // uio.h:97:1: |
| 411 |
WCHAR_MAX = 0x7fffffff // wchar_limits.h:41:1: |
| 412 |
WCHAR_MIN = -2147483648 // wchar_limits.h:40:1: |
| 413 |
WINT_MAX = 0x7fffffff // wchar_limits.h:45:1: |
| 414 |
WINT_MIN = -2147483648 // wchar_limits.h:44:1: |
| 415 |
X_AMD64_BYTE_SWAP_H_ = 0 // byte_swap.h:37:1: |
| 416 |
X_AMD64_INT_CONST_H_ = 0 // int_const.h:33:1: |
| 417 |
X_AMD64_INT_LIMITS_H_ = 0 // int_limits.h:33:1: |
| 418 |
X_AMD64_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1: |
| 419 |
X_AMD64_INT_TYPES_H_ = 0 // int_types.h:35:1: |
| 420 |
X_AMD64_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1: |
| 421 |
X_BIG_ENDIAN = 4321 // endian.h:44:1: |
| 422 |
X_BSD_INT16_T_ = 0 // types.h:65:1: |
| 423 |
X_BSD_INT32_T_ = 0 // types.h:75:1: |
| 424 |
X_BSD_INT64_T_ = 0 // types.h:85:1: |
| 425 |
X_BSD_INT8_T_ = 0 // types.h:55:1: |
| 426 |
X_BSD_INTPTR_T_ = 0 // stdint.h:80:1: |
| 427 |
X_BSD_UINT16_T_ = 0 // types.h:70:1: |
| 428 |
X_BSD_UINT32_T_ = 0 // in.h:52:1: |
| 429 |
X_BSD_UINT64_T_ = 0 // types.h:90:1: |
| 430 |
X_BSD_UINT8_T_ = 0 // in.h:47:1: |
| 431 |
X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1: |
| 432 |
X_BYTE_ORDER = 1234 // endian_machdep.h:3:1: |
| 433 |
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: |
| 434 |
X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1: |
| 435 |
X_LITTLE_ENDIAN = 1234 // endian.h:43:1: |
| 436 |
X_LP64 = 1 // <predefined>:268:1: |
| 437 |
X_NETBSD_SOURCE = 1 // featuretest.h:70:1: |
| 438 |
X_NETINET6_IN6_H_ = 0 // in6.h:65:1: |
| 439 |
X_NETINET_IN_H_ = 0 // in.h:40:1: |
| 440 |
X_PDP_ENDIAN = 3412 // endian.h:45:1: |
| 441 |
X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1: |
| 442 |
X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1: |
| 443 |
X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1: |
| 444 |
X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1: |
| 445 |
X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1: |
| 446 |
X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1: |
| 447 |
X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1: |
| 448 |
X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1: |
| 449 |
X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1: |
| 450 |
X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1: |
| 451 |
X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1: |
| 452 |
X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1: |
| 453 |
X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1: |
| 454 |
X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1: |
| 455 |
X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1: |
| 456 |
X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1: |
| 457 |
X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1: |
| 458 |
X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1: |
| 459 |
X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1: |
| 460 |
X_QUAD_HIGHWORD = 1 // endian.h:84:1: |
| 461 |
X_QUAD_LOWWORD = 0 // endian.h:85:1: |
| 462 |
X_SS_MAXSIZE = 128 // socket.h:294:1: |
| 463 |
X_SYS_ANSI_H_ = 0 // ansi.h:33:1: |
| 464 |
X_SYS_BSWAP_H_ = 0 // bswap.h:6:1: |
| 465 |
X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: |
| 466 |
X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: |
| 467 |
X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: |
| 468 |
X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1: |
| 469 |
X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1: |
| 470 |
X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: |
| 471 |
X_SYS_ENDIAN_H_ = 0 // endian.h:35:1: |
| 472 |
X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1: |
| 473 |
X_SYS_SIGTYPES_H_ = 0 // sigtypes.h:40:1: |
| 474 |
X_SYS_SOCKET_H_ = 0 // socket.h:64:1: |
| 475 |
X_SYS_STDINT_H_ = 0 // stdint.h:33:1: |
| 476 |
X_SYS_TYPES_H_ = 0 // types.h:40:1: |
| 477 |
X_SYS_UIO_H_ = 0 // uio.h:35:1: |
| 478 |
X_X86_64_BSWAP_H_ = 0 // bswap.h:6:1: |
| 479 |
X_X86_64_CDEFS_H_ = 0 // cdefs.h:4:1: |
| 480 |
X_X86_64_TYPES_H_ = 0 // types.h:35:1: |
| 481 |
Pseudo_AF_HDRCMPLT = 30 // socket.h:240:1: |
| 482 |
Pseudo_AF_KEY = 29 // socket.h:239:1: |
| 483 |
Pseudo_AF_PIP = 25 // socket.h:232:1: |
| 484 |
Pseudo_AF_RTIP = 22 // socket.h:227:1: |
| 485 |
Pseudo_AF_XTP = 19 // socket.h:222:1: |
| 486 |
) |
| 487 |
|
| 488 |
// file offset |
| 489 |
|
| 490 |
const ( /* uio.h:69:1: */ |
| 491 |
UIO_READ = 0 |
| 492 |
UIO_WRITE = 1 |
| 493 |
) |
| 494 |
|
| 495 |
// Segment flag values. |
| 496 |
const ( /* uio.h:72:1: */ |
| 497 |
UIO_USERSPACE = 0 // from user data space |
| 498 |
UIO_SYSSPACE = 1 |
| 499 |
) |
| 500 |
|
| 501 |
type Ptrdiff_t = int64 /* <builtin>:3:26 */ |
| 502 |
|
| 503 |
type Size_t = uint64 /* <builtin>:9:23 */ |
| 504 |
|
| 505 |
type Wchar_t = int32 /* <builtin>:15:24 */ |
| 506 |
|
| 507 |
type X__int128_t = struct { |
| 508 |
Flo int64 |
| 509 |
Fhi int64 |
| 510 |
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 |
| 511 |
type X__uint128_t = struct { |
| 512 |
Flo uint64 |
| 513 |
Fhi uint64 |
| 514 |
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 |
| 515 |
|
| 516 |
type X__builtin_va_list = uintptr /* <builtin>:46:14 */ |
| 517 |
type X__float128 = float64 /* <builtin>:47:21 */ |
| 518 |
|
| 519 |
// $NetBSD: in.h,v 1.108 2018/11/09 11:46:28 maya Exp $ |
| 520 |
|
| 521 |
// Copyright (c) 1982, 1986, 1990, 1993 |
| 522 |
// The Regents of the University of California. All rights reserved. |
| 523 |
// |
| 524 |
// Redistribution and use in source and binary forms, with or without |
| 525 |
// modification, are permitted provided that the following conditions |
| 526 |
// are met: |
| 527 |
// 1. Redistributions of source code must retain the above copyright |
| 528 |
// notice, this list of conditions and the following disclaimer. |
| 529 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 530 |
// notice, this list of conditions and the following disclaimer in the |
| 531 |
// documentation and/or other materials provided with the distribution. |
| 532 |
// 3. Neither the name of the University nor the names of its contributors |
| 533 |
// may be used to endorse or promote products derived from this software |
| 534 |
// without specific prior written permission. |
| 535 |
// |
| 536 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 537 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 538 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 539 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 540 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 541 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 542 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 543 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 544 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 545 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 546 |
// SUCH DAMAGE. |
| 547 |
// |
| 548 |
// @(#)in.h 8.3 (Berkeley) 1/3/94 |
| 549 |
|
| 550 |
// Constants and structures defined by the internet system, |
| 551 |
// Per RFC 790, September 1981, and numerous additions. |
| 552 |
|
| 553 |
// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ |
| 554 |
|
| 555 |
// Written by Klaus Klein <[email protected]>, February 2, 1998. |
| 556 |
// Public domain. |
| 557 |
// |
| 558 |
// NOTE: Do not protect this header against multiple inclusion. Doing |
| 559 |
// so can have subtle side-effects due to header file inclusion order |
| 560 |
// and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, |
| 561 |
// protect each CPP macro that we want to supply. |
| 562 |
|
| 563 |
// Feature-test macros are defined by several standards, and allow an |
| 564 |
// application to specify what symbols they want the system headers to |
| 565 |
// expose, and hence what standard they want them to conform to. |
| 566 |
// There are two classes of feature-test macros. The first class |
| 567 |
// specify complete standards, and if one of these is defined, header |
| 568 |
// files will try to conform to the relevant standard. They are: |
| 569 |
// |
| 570 |
// ANSI macros: |
| 571 |
// _ANSI_SOURCE ANSI C89 |
| 572 |
// |
| 573 |
// POSIX macros: |
| 574 |
// _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) |
| 575 |
// _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 |
| 576 |
// _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 |
| 577 |
// _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 |
| 578 |
// _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 |
| 579 |
// _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 |
| 580 |
// _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 |
| 581 |
// |
| 582 |
// X/Open macros: |
| 583 |
// _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 |
| 584 |
// _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions |
| 585 |
// _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 |
| 586 |
// _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 |
| 587 |
// _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option |
| 588 |
// _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option |
| 589 |
// |
| 590 |
// NetBSD macros: |
| 591 |
// _NETBSD_SOURCE == 1 Make all NetBSD features available. |
| 592 |
// |
| 593 |
// If more than one of these "major" feature-test macros is defined, |
| 594 |
// then the set of facilities provided (and namespace used) is the |
| 595 |
// union of that specified by the relevant standards, and in case of |
| 596 |
// conflict, the earlier standard in the above list has precedence (so |
| 597 |
// if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version |
| 598 |
// of rename() that's used is the POSIX one). If none of the "major" |
| 599 |
// feature-test macros is defined, _NETBSD_SOURCE is assumed. |
| 600 |
// |
| 601 |
// There are also "minor" feature-test macros, which enable extra |
| 602 |
// functionality in addition to some base standard. They should be |
| 603 |
// defined along with one of the "major" macros. The "minor" macros |
| 604 |
// are: |
| 605 |
// |
| 606 |
// _REENTRANT |
| 607 |
// _ISOC99_SOURCE |
| 608 |
// _ISOC11_SOURCE |
| 609 |
// _LARGEFILE_SOURCE Large File Support |
| 610 |
// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> |
| 611 |
|
| 612 |
// $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ |
| 613 |
|
| 614 |
// - |
| 615 |
// Copyright (c) 1990 The Regents of the University of California. |
| 616 |
// All rights reserved. |
| 617 |
// |
| 618 |
// Redistribution and use in source and binary forms, with or without |
| 619 |
// modification, are permitted provided that the following conditions |
| 620 |
// are met: |
| 621 |
// 1. Redistributions of source code must retain the above copyright |
| 622 |
// notice, this list of conditions and the following disclaimer. |
| 623 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 624 |
// notice, this list of conditions and the following disclaimer in the |
| 625 |
// documentation and/or other materials provided with the distribution. |
| 626 |
// 3. Neither the name of the University nor the names of its contributors |
| 627 |
// may be used to endorse or promote products derived from this software |
| 628 |
// without specific prior written permission. |
| 629 |
// |
| 630 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 631 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 632 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 633 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 634 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 635 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 636 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 637 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 638 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 639 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 640 |
// SUCH DAMAGE. |
| 641 |
// |
| 642 |
// from: @(#)types.h 7.5 (Berkeley) 3/9/91 |
| 643 |
|
| 644 |
// $NetBSD: common_int_types.h,v 1.1 2014/07/25 21:43:13 joerg Exp $ |
| 645 |
|
| 646 |
// - |
| 647 |
// Copyright (c) 2014 The NetBSD Foundation, Inc. |
| 648 |
// All rights reserved. |
| 649 |
// |
| 650 |
// This code is derived from software contributed to The NetBSD Foundation |
| 651 |
// by Joerg Sonnenberger. |
| 652 |
// |
| 653 |
// Redistribution and use in source and binary forms, with or without |
| 654 |
// modification, are permitted provided that the following conditions |
| 655 |
// are met: |
| 656 |
// 1. Redistributions of source code must retain the above copyright |
| 657 |
// notice, this list of conditions and the following disclaimer. |
| 658 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 659 |
// notice, this list of conditions and the following disclaimer in the |
| 660 |
// documentation and/or other materials provided with the distribution. |
| 661 |
// |
| 662 |
// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
| 663 |
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 664 |
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 665 |
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
| 666 |
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 667 |
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 668 |
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 669 |
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 670 |
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 671 |
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 672 |
// POSSIBILITY OF SUCH DAMAGE. |
| 673 |
|
| 674 |
// 7.18.1 Integer types |
| 675 |
|
| 676 |
// 7.18.1.1 Exact-width integer types |
| 677 |
|
| 678 |
type X__int8_t = int8 /* common_int_types.h:45:27 */ |
| 679 |
type X__uint8_t = uint8 /* common_int_types.h:46:27 */ |
| 680 |
type X__int16_t = int16 /* common_int_types.h:47:27 */ |
| 681 |
type X__uint16_t = uint16 /* common_int_types.h:48:27 */ |
| 682 |
type X__int32_t = int32 /* common_int_types.h:49:27 */ |
| 683 |
type X__uint32_t = uint32 /* common_int_types.h:50:27 */ |
| 684 |
type X__int64_t = int64 /* common_int_types.h:51:27 */ |
| 685 |
type X__uint64_t = uint64 /* common_int_types.h:52:27 */ |
| 686 |
|
| 687 |
// 7.18.1.4 Integer types capable of holding object pointers |
| 688 |
|
| 689 |
type X__intptr_t = int64 /* common_int_types.h:58:27 */ |
| 690 |
type X__uintptr_t = uint64 /* common_int_types.h:59:26 */ |
| 691 |
|
| 692 |
type Uint8_t = X__uint8_t /* in.h:46:19 */ |
| 693 |
|
| 694 |
type Uint32_t = X__uint32_t /* in.h:51:20 */ |
| 695 |
|
| 696 |
// return true if value 'a' fits in type 't' |
| 697 |
|
| 698 |
// $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ |
| 699 |
|
| 700 |
// - |
| 701 |
// Copyright (c) 1990 The Regents of the University of California. |
| 702 |
// All rights reserved. |
| 703 |
// |
| 704 |
// Redistribution and use in source and binary forms, with or without |
| 705 |
// modification, are permitted provided that the following conditions |
| 706 |
// are met: |
| 707 |
// 1. Redistributions of source code must retain the above copyright |
| 708 |
// notice, this list of conditions and the following disclaimer. |
| 709 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 710 |
// notice, this list of conditions and the following disclaimer in the |
| 711 |
// documentation and/or other materials provided with the distribution. |
| 712 |
// 3. Neither the name of the University nor the names of its contributors |
| 713 |
// may be used to endorse or promote products derived from this software |
| 714 |
// without specific prior written permission. |
| 715 |
// |
| 716 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 717 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 718 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 719 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 720 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 721 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 722 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 723 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 724 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 725 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 726 |
// SUCH DAMAGE. |
| 727 |
// |
| 728 |
// from: @(#)types.h 7.5 (Berkeley) 3/9/91 |
| 729 |
|
| 730 |
// Types which are fundamental to the implementation and may appear in |
| 731 |
// more than one standard header are defined here. Standard headers |
| 732 |
// then use: |
| 733 |
// #ifdef _BSD_SIZE_T_ |
| 734 |
// typedef _BSD_SIZE_T_ size_t; |
| 735 |
// #undef _BSD_SIZE_T_ |
| 736 |
// #endif |
| 737 |
|
| 738 |
type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address |
| 739 |
type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id |
| 740 |
type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address |
| 741 |
type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number |
| 742 |
type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions |
| 743 |
type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset |
| 744 |
type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id |
| 745 |
type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family |
| 746 |
type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length |
| 747 |
type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id |
| 748 |
type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) |
| 749 |
type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ |
| 750 |
type X__wctrans_t = uintptr /* ansi.h:51:32 */ |
| 751 |
type X__wctype_t = uintptr /* ansi.h:54:31 */ |
| 752 |
|
| 753 |
// mbstate_t is an opaque object to keep conversion state, during multibyte |
| 754 |
// stream conversions. The content must not be referenced by user programs. |
| 755 |
type X__mbstate_t = struct { |
| 756 |
F__mbstateL X__int64_t |
| 757 |
F__ccgo_pad1 [120]byte |
| 758 |
} /* ansi.h:63:3 */ |
| 759 |
|
| 760 |
type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ |
| 761 |
|
| 762 |
type In_addr_t = X__in_addr_t /* in.h:58:21 */ |
| 763 |
|
| 764 |
type In_port_t = X__in_port_t /* in.h:63:21 */ |
| 765 |
|
| 766 |
type Sa_family_t = X__sa_family_t /* in.h:68:23 */ |
| 767 |
|
| 768 |
// Protocols |
| 769 |
|
| 770 |
// last return value of *_input(), meaning "all job for this pkt is done". |
| 771 |
|
| 772 |
// sysctl placeholder for (FAST_)IPSEC |
| 773 |
|
| 774 |
// Local port number conventions: |
| 775 |
// |
| 776 |
// Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root), |
| 777 |
// unless a kernel is compiled with IPNOPRIVPORTS defined. |
| 778 |
// |
| 779 |
// When a user does a bind(2) or connect(2) with a port number of zero, |
| 780 |
// a non-conflicting local port address is chosen. |
| 781 |
// |
| 782 |
// The default range is IPPORT_ANONMIN to IPPORT_ANONMAX, although |
| 783 |
// that is settable by sysctl(3); net.inet.ip.anonportmin and |
| 784 |
// net.inet.ip.anonportmax respectively. |
| 785 |
// |
| 786 |
// A user may set the IPPROTO_IP option IP_PORTRANGE to change this |
| 787 |
// default assignment range. |
| 788 |
// |
| 789 |
// The value IP_PORTRANGE_DEFAULT causes the default behavior. |
| 790 |
// |
| 791 |
// The value IP_PORTRANGE_HIGH is the same as IP_PORTRANGE_DEFAULT, |
| 792 |
// and exists only for FreeBSD compatibility purposes. |
| 793 |
// |
| 794 |
// The value IP_PORTRANGE_LOW changes the range to the "low" are |
| 795 |
// that is (by convention) restricted to privileged processes. |
| 796 |
// This convention is based on "vouchsafe" principles only. |
| 797 |
// It is only secure if you trust the remote host to restrict these ports. |
| 798 |
// The range is IPPORT_RESERVEDMIN to IPPORT_RESERVEDMAX. |
| 799 |
|
| 800 |
// Internet address (a structure for historical reasons) |
| 801 |
type In_addr = struct{ Fs_addr X__in_addr_t } /* in.h:158:1 */ |
| 802 |
|
| 803 |
// Definitions of bits in internet address integers. |
| 804 |
// On subnets, the decomposition of addresses to host and net parts |
| 805 |
// is done according to subnet mask, not the masks here. |
| 806 |
// |
| 807 |
// By byte-swapping the constants, we avoid ever having to byte-swap IP |
| 808 |
// addresses inside the kernel. Unfortunately, user-level programs rely |
| 809 |
// on these macros not doing byte-swapping. |
| 810 |
|
| 811 |
// These ones aren't really net and host fields, but routing needn't know. |
| 812 |
|
| 813 |
// Socket address, internet style. |
| 814 |
type Sockaddr_in = struct { |
| 815 |
Fsin_len Uint8_t |
| 816 |
Fsin_family X__sa_family_t |
| 817 |
Fsin_port X__in_port_t |
| 818 |
Fsin_addr struct{ Fs_addr X__in_addr_t } |
| 819 |
Fsin_zero [8]X__int8_t |
| 820 |
} /* in.h:241:1 */ |
| 821 |
|
| 822 |
// Structure used to describe IP options. |
| 823 |
// Used to store options internally, to pass them to a process, |
| 824 |
// or to restore options retrieved earlier. |
| 825 |
// The ip_dst is used for the first-hop gateway when using a source route |
| 826 |
// (this gets put into the header proper). |
| 827 |
type Ip_opts = struct { |
| 828 |
Fip_dst struct{ Fs_addr X__in_addr_t } |
| 829 |
Fip_opts [40]X__int8_t |
| 830 |
} /* in.h:258:1 */ |
| 831 |
|
| 832 |
// Options for use with [gs]etsockopt at the IP level. |
| 833 |
// First word of comment is data type; bool is stored in int. |
| 834 |
// The add and drop membership option numbers need to match with the v6 ones |
| 835 |
|
| 836 |
// Information sent in the control message of a datagram socket for |
| 837 |
// IP_PKTINFO and IP_RECVPKTINFO. |
| 838 |
type In_pktinfo = struct { |
| 839 |
Fipi_addr struct{ Fs_addr X__in_addr_t } |
| 840 |
Fipi_ifindex uint32 |
| 841 |
} /* in.h:301:1 */ |
| 842 |
|
| 843 |
// Defaults and limits for options |
| 844 |
|
| 845 |
// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. |
| 846 |
type Ip_mreq = struct { |
| 847 |
Fimr_multiaddr struct{ Fs_addr X__in_addr_t } |
| 848 |
Fimr_interface struct{ Fs_addr X__in_addr_t } |
| 849 |
} /* in.h:318:1 */ |
| 850 |
|
| 851 |
// Argument for IP_PORTRANGE: |
| 852 |
// - which range to search when port is unspecified at bind() or connect() |
| 853 |
|
| 854 |
// Definitions for inet sysctl operations. |
| 855 |
// |
| 856 |
// Third level is protocol number. |
| 857 |
// Fourth level is desired variable within that protocol. |
| 858 |
|
| 859 |
// Names for IP sysctl objects |
| 860 |
// IPCTL_DEFMTU=4, never implemented |
| 861 |
|
| 862 |
// INET6 stuff |
| 863 |
// $NetBSD: in6.h,v 1.95.2.1 2019/09/06 19:43:00 martin Exp $ |
| 864 |
// $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ |
| 865 |
|
| 866 |
// Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. |
| 867 |
// All rights reserved. |
| 868 |
// |
| 869 |
// Redistribution and use in source and binary forms, with or without |
| 870 |
// modification, are permitted provided that the following conditions |
| 871 |
// are met: |
| 872 |
// 1. Redistributions of source code must retain the above copyright |
| 873 |
// notice, this list of conditions and the following disclaimer. |
| 874 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 875 |
// notice, this list of conditions and the following disclaimer in the |
| 876 |
// documentation and/or other materials provided with the distribution. |
| 877 |
// 3. Neither the name of the project nor the names of its contributors |
| 878 |
// may be used to endorse or promote products derived from this software |
| 879 |
// without specific prior written permission. |
| 880 |
// |
| 881 |
// THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND |
| 882 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 883 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 884 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE |
| 885 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 886 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 887 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 888 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 889 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 890 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 891 |
// SUCH DAMAGE. |
| 892 |
|
| 893 |
// Copyright (c) 1982, 1986, 1990, 1993 |
| 894 |
// The Regents of the University of California. All rights reserved. |
| 895 |
// |
| 896 |
// Redistribution and use in source and binary forms, with or without |
| 897 |
// modification, are permitted provided that the following conditions |
| 898 |
// are met: |
| 899 |
// 1. Redistributions of source code must retain the above copyright |
| 900 |
// notice, this list of conditions and the following disclaimer. |
| 901 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 902 |
// notice, this list of conditions and the following disclaimer in the |
| 903 |
// documentation and/or other materials provided with the distribution. |
| 904 |
// 3. Neither the name of the University nor the names of its contributors |
| 905 |
// may be used to endorse or promote products derived from this software |
| 906 |
// without specific prior written permission. |
| 907 |
// |
| 908 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 909 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 910 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 911 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 912 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 913 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 914 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 915 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 916 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 917 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 918 |
// SUCH DAMAGE. |
| 919 |
// |
| 920 |
// @(#)in.h 8.3 (Berkeley) 1/3/94 |
| 921 |
|
| 922 |
// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ |
| 923 |
|
| 924 |
// Written by Klaus Klein <[email protected]>, February 2, 1998. |
| 925 |
// Public domain. |
| 926 |
// |
| 927 |
// NOTE: Do not protect this header against multiple inclusion. Doing |
| 928 |
// so can have subtle side-effects due to header file inclusion order |
| 929 |
// and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, |
| 930 |
// protect each CPP macro that we want to supply. |
| 931 |
|
| 932 |
// Feature-test macros are defined by several standards, and allow an |
| 933 |
// application to specify what symbols they want the system headers to |
| 934 |
// expose, and hence what standard they want them to conform to. |
| 935 |
// There are two classes of feature-test macros. The first class |
| 936 |
// specify complete standards, and if one of these is defined, header |
| 937 |
// files will try to conform to the relevant standard. They are: |
| 938 |
// |
| 939 |
// ANSI macros: |
| 940 |
// _ANSI_SOURCE ANSI C89 |
| 941 |
// |
| 942 |
// POSIX macros: |
| 943 |
// _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) |
| 944 |
// _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 |
| 945 |
// _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 |
| 946 |
// _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 |
| 947 |
// _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 |
| 948 |
// _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 |
| 949 |
// _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 |
| 950 |
// |
| 951 |
// X/Open macros: |
| 952 |
// _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 |
| 953 |
// _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions |
| 954 |
// _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 |
| 955 |
// _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 |
| 956 |
// _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option |
| 957 |
// _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option |
| 958 |
// |
| 959 |
// NetBSD macros: |
| 960 |
// _NETBSD_SOURCE == 1 Make all NetBSD features available. |
| 961 |
// |
| 962 |
// If more than one of these "major" feature-test macros is defined, |
| 963 |
// then the set of facilities provided (and namespace used) is the |
| 964 |
// union of that specified by the relevant standards, and in case of |
| 965 |
// conflict, the earlier standard in the above list has precedence (so |
| 966 |
// if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version |
| 967 |
// of rename() that's used is the POSIX one). If none of the "major" |
| 968 |
// feature-test macros is defined, _NETBSD_SOURCE is assumed. |
| 969 |
// |
| 970 |
// There are also "minor" feature-test macros, which enable extra |
| 971 |
// functionality in addition to some base standard. They should be |
| 972 |
// defined along with one of the "major" macros. The "minor" macros |
| 973 |
// are: |
| 974 |
// |
| 975 |
// _REENTRANT |
| 976 |
// _ISOC99_SOURCE |
| 977 |
// _ISOC11_SOURCE |
| 978 |
// _LARGEFILE_SOURCE Large File Support |
| 979 |
// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> |
| 980 |
|
| 981 |
// $NetBSD: socket.h,v 1.129 2018/11/04 16:30:29 christos Exp $ |
| 982 |
|
| 983 |
// Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. |
| 984 |
// All rights reserved. |
| 985 |
// |
| 986 |
// Redistribution and use in source and binary forms, with or without |
| 987 |
// modification, are permitted provided that the following conditions |
| 988 |
// are met: |
| 989 |
// 1. Redistributions of source code must retain the above copyright |
| 990 |
// notice, this list of conditions and the following disclaimer. |
| 991 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 992 |
// notice, this list of conditions and the following disclaimer in the |
| 993 |
// documentation and/or other materials provided with the distribution. |
| 994 |
// 3. Neither the name of the project nor the names of its contributors |
| 995 |
// may be used to endorse or promote products derived from this software |
| 996 |
// without specific prior written permission. |
| 997 |
// |
| 998 |
// THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND |
| 999 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 1000 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 1001 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE |
| 1002 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 1003 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 1004 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 1005 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 1006 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 1007 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 1008 |
// SUCH DAMAGE. |
| 1009 |
|
| 1010 |
// Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 |
| 1011 |
// The Regents of the University of California. All rights reserved. |
| 1012 |
// |
| 1013 |
// Redistribution and use in source and binary forms, with or without |
| 1014 |
// modification, are permitted provided that the following conditions |
| 1015 |
// are met: |
| 1016 |
// 1. Redistributions of source code must retain the above copyright |
| 1017 |
// notice, this list of conditions and the following disclaimer. |
| 1018 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 1019 |
// notice, this list of conditions and the following disclaimer in the |
| 1020 |
// documentation and/or other materials provided with the distribution. |
| 1021 |
// 3. Neither the name of the University nor the names of its contributors |
| 1022 |
// may be used to endorse or promote products derived from this software |
| 1023 |
// without specific prior written permission. |
| 1024 |
// |
| 1025 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 1026 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 1027 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 1028 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 1029 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 1030 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 1031 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 1032 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 1033 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 1034 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 1035 |
// SUCH DAMAGE. |
| 1036 |
// |
| 1037 |
// @(#)socket.h 8.6 (Berkeley) 5/3/95 |
| 1038 |
|
| 1039 |
// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ |
| 1040 |
|
| 1041 |
// Written by Klaus Klein <[email protected]>, February 2, 1998. |
| 1042 |
// Public domain. |
| 1043 |
// |
| 1044 |
// NOTE: Do not protect this header against multiple inclusion. Doing |
| 1045 |
// so can have subtle side-effects due to header file inclusion order |
| 1046 |
// and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, |
| 1047 |
// protect each CPP macro that we want to supply. |
| 1048 |
|
| 1049 |
// Feature-test macros are defined by several standards, and allow an |
| 1050 |
// application to specify what symbols they want the system headers to |
| 1051 |
// expose, and hence what standard they want them to conform to. |
| 1052 |
// There are two classes of feature-test macros. The first class |
| 1053 |
// specify complete standards, and if one of these is defined, header |
| 1054 |
// files will try to conform to the relevant standard. They are: |
| 1055 |
// |
| 1056 |
// ANSI macros: |
| 1057 |
// _ANSI_SOURCE ANSI C89 |
| 1058 |
// |
| 1059 |
// POSIX macros: |
| 1060 |
// _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) |
| 1061 |
// _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 |
| 1062 |
// _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 |
| 1063 |
// _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 |
| 1064 |
// _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 |
| 1065 |
// _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 |
| 1066 |
// _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 |
| 1067 |
// |
| 1068 |
// X/Open macros: |
| 1069 |
// _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 |
| 1070 |
// _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions |
| 1071 |
// _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 |
| 1072 |
// _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 |
| 1073 |
// _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option |
| 1074 |
// _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option |
| 1075 |
// |
| 1076 |
// NetBSD macros: |
| 1077 |
// _NETBSD_SOURCE == 1 Make all NetBSD features available. |
| 1078 |
// |
| 1079 |
// If more than one of these "major" feature-test macros is defined, |
| 1080 |
// then the set of facilities provided (and namespace used) is the |
| 1081 |
// union of that specified by the relevant standards, and in case of |
| 1082 |
// conflict, the earlier standard in the above list has precedence (so |
| 1083 |
// if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version |
| 1084 |
// of rename() that's used is the POSIX one). If none of the "major" |
| 1085 |
// feature-test macros is defined, _NETBSD_SOURCE is assumed. |
| 1086 |
// |
| 1087 |
// There are also "minor" feature-test macros, which enable extra |
| 1088 |
// functionality in addition to some base standard. They should be |
| 1089 |
// defined along with one of the "major" macros. The "minor" macros |
| 1090 |
// are: |
| 1091 |
// |
| 1092 |
// _REENTRANT |
| 1093 |
// _ISOC99_SOURCE |
| 1094 |
// _ISOC11_SOURCE |
| 1095 |
// _LARGEFILE_SOURCE Large File Support |
| 1096 |
// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> |
| 1097 |
|
| 1098 |
// Definitions related to sockets: types, address families, options. |
| 1099 |
|
| 1100 |
// Data types. |
| 1101 |
// $NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $ |
| 1102 |
|
| 1103 |
// - |
| 1104 |
// Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. |
| 1105 |
// All rights reserved. |
| 1106 |
// |
| 1107 |
// This code is derived from software contributed to The NetBSD Foundation |
| 1108 |
// by Jun-ichiro itojun Hagino and by Klaus Klein. |
| 1109 |
// |
| 1110 |
// Redistribution and use in source and binary forms, with or without |
| 1111 |
// modification, are permitted provided that the following conditions |
| 1112 |
// are met: |
| 1113 |
// 1. Redistributions of source code must retain the above copyright |
| 1114 |
// notice, this list of conditions and the following disclaimer. |
| 1115 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 1116 |
// notice, this list of conditions and the following disclaimer in the |
| 1117 |
// documentation and/or other materials provided with the distribution. |
| 1118 |
// |
| 1119 |
// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
| 1120 |
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 1121 |
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 1122 |
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
| 1123 |
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 1124 |
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 1125 |
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 1126 |
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 1127 |
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 1128 |
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 1129 |
// POSSIBILITY OF SUCH DAMAGE. |
| 1130 |
|
| 1131 |
type Socklen_t = X__socklen_t /* socket.h:83:21 */ |
| 1132 |
|
| 1133 |
type Ssize_t = int64 /* socket.h:95:23 */ |
| 1134 |
|
| 1135 |
// $NetBSD: uio.h,v 1.36 2011/07/27 13:20:07 uebayasi Exp $ |
| 1136 |
|
| 1137 |
// Copyright (c) 1982, 1986, 1993, 1994 |
| 1138 |
// The Regents of the University of California. All rights reserved. |
| 1139 |
// |
| 1140 |
// Redistribution and use in source and binary forms, with or without |
| 1141 |
// modification, are permitted provided that the following conditions |
| 1142 |
// are met: |
| 1143 |
// 1. Redistributions of source code must retain the above copyright |
| 1144 |
// notice, this list of conditions and the following disclaimer. |
| 1145 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 1146 |
// notice, this list of conditions and the following disclaimer in the |
| 1147 |
// documentation and/or other materials provided with the distribution. |
| 1148 |
// 3. Neither the name of the University nor the names of its contributors |
| 1149 |
// may be used to endorse or promote products derived from this software |
| 1150 |
// without specific prior written permission. |
| 1151 |
// |
| 1152 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 1153 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 1154 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 1155 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 1156 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 1157 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 1158 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 1159 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 1160 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 1161 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 1162 |
// SUCH DAMAGE. |
| 1163 |
// |
| 1164 |
// @(#)uio.h 8.5 (Berkeley) 2/22/94 |
| 1165 |
|
| 1166 |
// $NetBSD: ansi.h,v 1.11 2019/05/07 03:49:26 kamil Exp $ |
| 1167 |
|
| 1168 |
// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ |
| 1169 |
|
| 1170 |
// - |
| 1171 |
// Copyright (c) 2014 The NetBSD Foundation, Inc. |
| 1172 |
// All rights reserved. |
| 1173 |
// |
| 1174 |
// This code is derived from software contributed to The NetBSD Foundation |
| 1175 |
// by Matt Thomas of 3am Software Foundry. |
| 1176 |
// |
| 1177 |
// Redistribution and use in source and binary forms, with or without |
| 1178 |
// modification, are permitted provided that the following conditions |
| 1179 |
// are met: |
| 1180 |
// 1. Redistributions of source code must retain the above copyright |
| 1181 |
// notice, this list of conditions and the following disclaimer. |
| 1182 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 1183 |
// notice, this list of conditions and the following disclaimer in the |
| 1184 |
// documentation and/or other materials provided with the distribution. |
| 1185 |
// |
| 1186 |
// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
| 1187 |
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 1188 |
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 1189 |
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
| 1190 |
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 1191 |
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 1192 |
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 1193 |
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 1194 |
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 1195 |
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 1196 |
// POSSIBILITY OF SUCH DAMAGE. |
| 1197 |
|
| 1198 |
// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ |
| 1199 |
|
| 1200 |
// Written by Klaus Klein <[email protected]>, February 2, 1998. |
| 1201 |
// Public domain. |
| 1202 |
// |
| 1203 |
// NOTE: Do not protect this header against multiple inclusion. Doing |
| 1204 |
// so can have subtle side-effects due to header file inclusion order |
| 1205 |
// and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, |
| 1206 |
// protect each CPP macro that we want to supply. |
| 1207 |
|
| 1208 |
// Feature-test macros are defined by several standards, and allow an |
| 1209 |
// application to specify what symbols they want the system headers to |
| 1210 |
// expose, and hence what standard they want them to conform to. |
| 1211 |
// There are two classes of feature-test macros. The first class |
| 1212 |
// specify complete standards, and if one of these is defined, header |
| 1213 |
// files will try to conform to the relevant standard. They are: |
| 1214 |
// |
| 1215 |
// ANSI macros: |
| 1216 |
// _ANSI_SOURCE ANSI C89 |
| 1217 |
// |
| 1218 |
// POSIX macros: |
| 1219 |
// _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) |
| 1220 |
// _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 |
| 1221 |
// _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 |
| 1222 |
// _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 |
| 1223 |
// _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 |
| 1224 |
// _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 |
| 1225 |
// _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 |
| 1226 |
// |
| 1227 |
// X/Open macros: |
| 1228 |
// _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 |
| 1229 |
// _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions |
| 1230 |
// _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 |
| 1231 |
// _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 |
| 1232 |
// _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option |
| 1233 |
// _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option |
| 1234 |
// |
| 1235 |
// NetBSD macros: |
| 1236 |
// _NETBSD_SOURCE == 1 Make all NetBSD features available. |
| 1237 |
// |
| 1238 |
// If more than one of these "major" feature-test macros is defined, |
| 1239 |
// then the set of facilities provided (and namespace used) is the |
| 1240 |
// union of that specified by the relevant standards, and in case of |
| 1241 |
// conflict, the earlier standard in the above list has precedence (so |
| 1242 |
// if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version |
| 1243 |
// of rename() that's used is the POSIX one). If none of the "major" |
| 1244 |
// feature-test macros is defined, _NETBSD_SOURCE is assumed. |
| 1245 |
// |
| 1246 |
// There are also "minor" feature-test macros, which enable extra |
| 1247 |
// functionality in addition to some base standard. They should be |
| 1248 |
// defined along with one of the "major" macros. The "minor" macros |
| 1249 |
// are: |
| 1250 |
// |
| 1251 |
// _REENTRANT |
| 1252 |
// _ISOC99_SOURCE |
| 1253 |
// _ISOC11_SOURCE |
| 1254 |
// _LARGEFILE_SOURCE Large File Support |
| 1255 |
// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> |
| 1256 |
|
| 1257 |
type Iovec = struct { |
| 1258 |
Fiov_base uintptr |
| 1259 |
Fiov_len Size_t |
| 1260 |
} /* uio.h:56:1 */ |
| 1261 |
|
| 1262 |
// $NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $ |
| 1263 |
|
| 1264 |
// - |
| 1265 |
// Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. |
| 1266 |
// All rights reserved. |
| 1267 |
// |
| 1268 |
// This code is derived from software contributed to The NetBSD Foundation |
| 1269 |
// by Jun-ichiro itojun Hagino and by Klaus Klein. |
| 1270 |
// |
| 1271 |
// Redistribution and use in source and binary forms, with or without |
| 1272 |
// modification, are permitted provided that the following conditions |
| 1273 |
// are met: |
| 1274 |
// 1. Redistributions of source code must retain the above copyright |
| 1275 |
// notice, this list of conditions and the following disclaimer. |
| 1276 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 1277 |
// notice, this list of conditions and the following disclaimer in the |
| 1278 |
// documentation and/or other materials provided with the distribution. |
| 1279 |
// |
| 1280 |
// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
| 1281 |
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 1282 |
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 1283 |
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
| 1284 |
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 1285 |
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 1286 |
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 1287 |
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 1288 |
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 1289 |
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 1290 |
// POSSIBILITY OF SUCH DAMAGE. |
| 1291 |
|
| 1292 |
type Off_t = X__off_t /* uio.h:65:18 */ |
| 1293 |
|
| 1294 |
// $NetBSD: sigtypes.h,v 1.11 2017/01/12 18:29:14 christos Exp $ |
| 1295 |
|
| 1296 |
// Copyright (c) 1982, 1986, 1989, 1991, 1993 |
| 1297 |
// The Regents of the University of California. All rights reserved. |
| 1298 |
// (c) UNIX System Laboratories, Inc. |
| 1299 |
// All or some portions of this file are derived from material licensed |
| 1300 |
// to the University of California by American Telephone and Telegraph |
| 1301 |
// Co. or Unix System Laboratories, Inc. and are reproduced herein with |
| 1302 |
// the permission of UNIX System Laboratories, Inc. |
| 1303 |
// |
| 1304 |
// Redistribution and use in source and binary forms, with or without |
| 1305 |
// modification, are permitted provided that the following conditions |
| 1306 |
// are met: |
| 1307 |
// 1. Redistributions of source code must retain the above copyright |
| 1308 |
// notice, this list of conditions and the following disclaimer. |
| 1309 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 1310 |
// notice, this list of conditions and the following disclaimer in the |
| 1311 |
// documentation and/or other materials provided with the distribution. |
| 1312 |
// 3. Neither the name of the University nor the names of its contributors |
| 1313 |
// may be used to endorse or promote products derived from this software |
| 1314 |
// without specific prior written permission. |
| 1315 |
// |
| 1316 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 1317 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 1318 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 1319 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 1320 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 1321 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 1322 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 1323 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 1324 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 1325 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 1326 |
// SUCH DAMAGE. |
| 1327 |
// |
| 1328 |
// @(#)signal.h 8.4 (Berkeley) 5/4/95 |
| 1329 |
|
| 1330 |
// This header file defines various signal-related types. We also keep |
| 1331 |
// the macros to manipulate sigset_t here, to encapsulate knowledge of |
| 1332 |
// its internals. |
| 1333 |
|
| 1334 |
// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ |
| 1335 |
|
| 1336 |
// Written by Klaus Klein <[email protected]>, February 2, 1998. |
| 1337 |
// Public domain. |
| 1338 |
// |
| 1339 |
// NOTE: Do not protect this header against multiple inclusion. Doing |
| 1340 |
// so can have subtle side-effects due to header file inclusion order |
| 1341 |
// and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, |
| 1342 |
// protect each CPP macro that we want to supply. |
| 1343 |
|
| 1344 |
// Feature-test macros are defined by several standards, and allow an |
| 1345 |
// application to specify what symbols they want the system headers to |
| 1346 |
// expose, and hence what standard they want them to conform to. |
| 1347 |
// There are two classes of feature-test macros. The first class |
| 1348 |
// specify complete standards, and if one of these is defined, header |
| 1349 |
// files will try to conform to the relevant standard. They are: |
| 1350 |
// |
| 1351 |
// ANSI macros: |
| 1352 |
// _ANSI_SOURCE ANSI C89 |
| 1353 |
// |
| 1354 |
// POSIX macros: |
| 1355 |
// _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) |
| 1356 |
// _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 |
| 1357 |
// _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 |
| 1358 |
// _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 |
| 1359 |
// _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 |
| 1360 |
// _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 |
| 1361 |
// _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 |
| 1362 |
// |
| 1363 |
// X/Open macros: |
| 1364 |
// _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 |
| 1365 |
// _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions |
| 1366 |
// _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 |
| 1367 |
// _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 |
| 1368 |
// _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option |
| 1369 |
// _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option |
| 1370 |
// |
| 1371 |
// NetBSD macros: |
| 1372 |
// _NETBSD_SOURCE == 1 Make all NetBSD features available. |
| 1373 |
// |
| 1374 |
// If more than one of these "major" feature-test macros is defined, |
| 1375 |
// then the set of facilities provided (and namespace used) is the |
| 1376 |
// union of that specified by the relevant standards, and in case of |
| 1377 |
// conflict, the earlier standard in the above list has precedence (so |
| 1378 |
// if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version |
| 1379 |
// of rename() that's used is the POSIX one). If none of the "major" |
| 1380 |
// feature-test macros is defined, _NETBSD_SOURCE is assumed. |
| 1381 |
// |
| 1382 |
// There are also "minor" feature-test macros, which enable extra |
| 1383 |
// functionality in addition to some base standard. They should be |
| 1384 |
// defined along with one of the "major" macros. The "minor" macros |
| 1385 |
// are: |
| 1386 |
// |
| 1387 |
// _REENTRANT |
| 1388 |
// _ISOC99_SOURCE |
| 1389 |
// _ISOC11_SOURCE |
| 1390 |
// _LARGEFILE_SOURCE Large File Support |
| 1391 |
// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> |
| 1392 |
|
| 1393 |
// $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ |
| 1394 |
|
| 1395 |
// - |
| 1396 |
// Copyright (c) 1990 The Regents of the University of California. |
| 1397 |
// All rights reserved. |
| 1398 |
// |
| 1399 |
// Redistribution and use in source and binary forms, with or without |
| 1400 |
// modification, are permitted provided that the following conditions |
| 1401 |
// are met: |
| 1402 |
// 1. Redistributions of source code must retain the above copyright |
| 1403 |
// notice, this list of conditions and the following disclaimer. |
| 1404 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 1405 |
// notice, this list of conditions and the following disclaimer in the |
| 1406 |
// documentation and/or other materials provided with the distribution. |
| 1407 |
// 3. Neither the name of the University nor the names of its contributors |
| 1408 |
// may be used to endorse or promote products derived from this software |
| 1409 |
// without specific prior written permission. |
| 1410 |
// |
| 1411 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 1412 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 1413 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 1414 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 1415 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 1416 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 1417 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 1418 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 1419 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 1420 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 1421 |
// SUCH DAMAGE. |
| 1422 |
// |
| 1423 |
// from: @(#)types.h 7.5 (Berkeley) 3/9/91 |
| 1424 |
|
| 1425 |
// $NetBSD: ansi.h,v 1.11 2019/05/07 03:49:26 kamil Exp $ |
| 1426 |
|
| 1427 |
// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ |
| 1428 |
|
| 1429 |
// - |
| 1430 |
// Copyright (c) 2014 The NetBSD Foundation, Inc. |
| 1431 |
// All rights reserved. |
| 1432 |
// |
| 1433 |
// This code is derived from software contributed to The NetBSD Foundation |
| 1434 |
// by Matt Thomas of 3am Software Foundry. |
| 1435 |
// |
| 1436 |
// Redistribution and use in source and binary forms, with or without |
| 1437 |
// modification, are permitted provided that the following conditions |
| 1438 |
// are met: |
| 1439 |
// 1. Redistributions of source code must retain the above copyright |
| 1440 |
// notice, this list of conditions and the following disclaimer. |
| 1441 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 1442 |
// notice, this list of conditions and the following disclaimer in the |
| 1443 |
// documentation and/or other materials provided with the distribution. |
| 1444 |
// |
| 1445 |
// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
| 1446 |
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 1447 |
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 1448 |
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
| 1449 |
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 1450 |
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 1451 |
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 1452 |
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 1453 |
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 1454 |
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 1455 |
// POSSIBILITY OF SUCH DAMAGE. |
| 1456 |
|
| 1457 |
type Sigset_t = struct{ F__bits [4]X__uint32_t } /* sigtypes.h:62:3 */ |
| 1458 |
|
| 1459 |
// Macro for manipulating signal masks. |
| 1460 |
|
| 1461 |
type Sigaltstack = struct { |
| 1462 |
Fss_sp uintptr |
| 1463 |
Fss_size Size_t |
| 1464 |
Fss_flags int32 |
| 1465 |
F__ccgo_pad1 [4]byte |
| 1466 |
} /* sigtypes.h:108:9 */ |
| 1467 |
|
| 1468 |
// Macro for manipulating signal masks. |
| 1469 |
|
| 1470 |
type Stack_t = Sigaltstack /* sigtypes.h:116:3 */ |
| 1471 |
|
| 1472 |
// Socket types. |
| 1473 |
|
| 1474 |
// Option flags per-socket. |
| 1475 |
// SO_OTIMESTAMP 0x0400 |
| 1476 |
|
| 1477 |
// Allowed default option flags |
| 1478 |
|
| 1479 |
// Additional options, not kept in so_options. |
| 1480 |
// SO_OSNDTIMEO 0x1005 |
| 1481 |
// SO_ORCVTIMEO 0x1006 |
| 1482 |
|
| 1483 |
// Structure used for manipulating linger option. |
| 1484 |
type Linger = struct { |
| 1485 |
Fl_onoff int32 |
| 1486 |
Fl_linger int32 |
| 1487 |
} /* socket.h:182:1 */ |
| 1488 |
|
| 1489 |
type Accept_filter_arg = struct { |
| 1490 |
Faf_name [16]int8 |
| 1491 |
Faf_arg [240]int8 |
| 1492 |
} /* socket.h:187:1 */ |
| 1493 |
|
| 1494 |
// Level number for (get/set)sockopt() to apply to socket itself. |
| 1495 |
|
| 1496 |
// Address families. |
| 1497 |
|
| 1498 |
// Structure used by kernel to store most |
| 1499 |
// addresses. |
| 1500 |
type Sockaddr = struct { |
| 1501 |
Fsa_len X__uint8_t |
| 1502 |
Fsa_family X__sa_family_t |
| 1503 |
Fsa_data [14]int8 |
| 1504 |
} /* socket.h:255:1 */ |
| 1505 |
|
| 1506 |
// RFC 2553: protocol-independent placeholder for socket addresses |
| 1507 |
|
| 1508 |
type Sockaddr_storage = struct { |
| 1509 |
Fss_len X__uint8_t |
| 1510 |
Fss_family X__sa_family_t |
| 1511 |
F__ss_pad1 [6]int8 |
| 1512 |
F__ss_align X__int64_t |
| 1513 |
F__ss_pad2 [112]int8 |
| 1514 |
} /* socket.h:301:1 */ |
| 1515 |
|
| 1516 |
// Protocol families, same as address families for now. |
| 1517 |
|
| 1518 |
type Pid_t = X__pid_t /* socket.h:366:18 */ // process id |
| 1519 |
|
| 1520 |
type Gid_t = X__gid_t /* socket.h:371:18 */ // group id |
| 1521 |
|
| 1522 |
type Uid_t = X__uid_t /* socket.h:376:18 */ // user id |
| 1523 |
|
| 1524 |
// Socket credentials. |
| 1525 |
type Sockcred = struct { |
| 1526 |
Fsc_pid X__pid_t |
| 1527 |
Fsc_uid X__uid_t |
| 1528 |
Fsc_euid X__uid_t |
| 1529 |
Fsc_gid X__gid_t |
| 1530 |
Fsc_egid X__gid_t |
| 1531 |
Fsc_ngroups int32 |
| 1532 |
Fsc_groups [1]X__gid_t |
| 1533 |
} /* socket.h:383:1 */ |
| 1534 |
|
| 1535 |
// Compute size of a sockcred structure with groups. |
| 1536 |
|
| 1537 |
// Definition for CTL_NET PCB fetching sysctls |
| 1538 |
type Kinfo_pcb = struct { |
| 1539 |
Fki_pcbaddr X__uint64_t |
| 1540 |
Fki_ppcbaddr X__uint64_t |
| 1541 |
Fki_sockaddr X__uint64_t |
| 1542 |
Fki_family X__uint32_t |
| 1543 |
Fki_type X__uint32_t |
| 1544 |
Fki_protocol X__uint32_t |
| 1545 |
Fki_pflags X__uint32_t |
| 1546 |
Fki_sostate X__uint32_t |
| 1547 |
Fki_prstate X__uint32_t |
| 1548 |
Fki_tstate X__int32_t |
| 1549 |
Fki_tflags X__uint32_t |
| 1550 |
Fki_rcvq X__uint64_t |
| 1551 |
Fki_sndq X__uint64_t |
| 1552 |
Fki_s struct { |
| 1553 |
F_kis_src struct { |
| 1554 |
Fsa_len X__uint8_t |
| 1555 |
Fsa_family X__sa_family_t |
| 1556 |
Fsa_data [14]int8 |
| 1557 |
} |
| 1558 |
F__ccgo_pad1 [248]byte |
| 1559 |
} |
| 1560 |
Fki_d struct { |
| 1561 |
F_kid_dst struct { |
| 1562 |
Fsa_len X__uint8_t |
| 1563 |
Fsa_family X__sa_family_t |
| 1564 |
Fsa_data [14]int8 |
| 1565 |
} |
| 1566 |
F__ccgo_pad1 [248]byte |
| 1567 |
} |
| 1568 |
Fki_inode X__uint64_t |
| 1569 |
Fki_vnode X__uint64_t |
| 1570 |
Fki_conn X__uint64_t |
| 1571 |
Fki_refs X__uint64_t |
| 1572 |
Fki_nextref X__uint64_t |
| 1573 |
} /* socket.h:404:1 */ |
| 1574 |
|
| 1575 |
// PF_ROUTE - Routing table |
| 1576 |
// |
| 1577 |
// Three additional levels are defined: |
| 1578 |
// Fourth: address family, 0 is wildcard |
| 1579 |
// Fifth: type of info, defined below |
| 1580 |
// Sixth: flag(s) to mask with for NET_RT_FLAGS |
| 1581 |
|
| 1582 |
// Maximum queue length specifiable by listen(2). |
| 1583 |
|
| 1584 |
// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $ |
| 1585 |
|
| 1586 |
// * Copyright (c) 1991, 1993 |
| 1587 |
// The Regents of the University of California. All rights reserved. |
| 1588 |
// |
| 1589 |
// This code is derived from software contributed to Berkeley by |
| 1590 |
// Berkeley Software Design, Inc. |
| 1591 |
// |
| 1592 |
// Redistribution and use in source and binary forms, with or without |
| 1593 |
// modification, are permitted provided that the following conditions |
| 1594 |
// are met: |
| 1595 |
// 1. Redistributions of source code must retain the above copyright |
| 1596 |
// notice, this list of conditions and the following disclaimer. |
| 1597 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 1598 |
// notice, this list of conditions and the following disclaimer in the |
| 1599 |
// documentation and/or other materials provided with the distribution. |
| 1600 |
// 3. Neither the name of the University nor the names of its contributors |
| 1601 |
// may be used to endorse or promote products derived from this software |
| 1602 |
// without specific prior written permission. |
| 1603 |
// |
| 1604 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 1605 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 1606 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 1607 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 1608 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 1609 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 1610 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 1611 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 1612 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 1613 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 1614 |
// SUCH DAMAGE. |
| 1615 |
// |
| 1616 |
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 |
| 1617 |
|
| 1618 |
// Message header for recvmsg and sendmsg calls. |
| 1619 |
// Used value-result for recvmsg, value only for sendmsg. |
| 1620 |
type Msghdr = struct { |
| 1621 |
Fmsg_name uintptr |
| 1622 |
Fmsg_namelen X__socklen_t |
| 1623 |
F__ccgo_pad1 [4]byte |
| 1624 |
Fmsg_iov uintptr |
| 1625 |
Fmsg_iovlen int32 |
| 1626 |
F__ccgo_pad2 [4]byte |
| 1627 |
Fmsg_control uintptr |
| 1628 |
Fmsg_controllen X__socklen_t |
| 1629 |
Fmsg_flags int32 |
| 1630 |
} /* socket.h:479:1 */ |
| 1631 |
|
| 1632 |
type Mmsghdr = struct { |
| 1633 |
Fmsg_hdr struct { |
| 1634 |
Fmsg_name uintptr |
| 1635 |
Fmsg_namelen X__socklen_t |
| 1636 |
F__ccgo_pad1 [4]byte |
| 1637 |
Fmsg_iov uintptr |
| 1638 |
Fmsg_iovlen int32 |
| 1639 |
F__ccgo_pad2 [4]byte |
| 1640 |
Fmsg_control uintptr |
| 1641 |
Fmsg_controllen X__socklen_t |
| 1642 |
Fmsg_flags int32 |
| 1643 |
} |
| 1644 |
Fmsg_len uint32 |
| 1645 |
F__ccgo_pad1 [4]byte |
| 1646 |
} /* socket.h:506:1 */ |
| 1647 |
|
| 1648 |
// Extra flags used internally only |
| 1649 |
|
| 1650 |
// Header for ancillary data objects in msg_control buffer. |
| 1651 |
// Used for additional information with/about a datagram |
| 1652 |
// not expressible by flags. The format is a sequence |
| 1653 |
// of message elements headed by cmsghdr structures. |
| 1654 |
type Cmsghdr = struct { |
| 1655 |
Fcmsg_len X__socklen_t |
| 1656 |
Fcmsg_level int32 |
| 1657 |
Fcmsg_type int32 |
| 1658 |
} /* socket.h:525:1 */ |
| 1659 |
|
| 1660 |
// $NetBSD: endian.h,v 1.30 2016/02/27 21:37:35 christos Exp $ |
| 1661 |
|
| 1662 |
// Copyright (c) 1987, 1991, 1993 |
| 1663 |
// The Regents of the University of California. All rights reserved. |
| 1664 |
// |
| 1665 |
// Redistribution and use in source and binary forms, with or without |
| 1666 |
// modification, are permitted provided that the following conditions |
| 1667 |
// are met: |
| 1668 |
// 1. Redistributions of source code must retain the above copyright |
| 1669 |
// notice, this list of conditions and the following disclaimer. |
| 1670 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 1671 |
// notice, this list of conditions and the following disclaimer in the |
| 1672 |
// documentation and/or other materials provided with the distribution. |
| 1673 |
// 3. Neither the name of the University nor the names of its contributors |
| 1674 |
// may be used to endorse or promote products derived from this software |
| 1675 |
// without specific prior written permission. |
| 1676 |
// |
| 1677 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 1678 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 1679 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 1680 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 1681 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 1682 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 1683 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 1684 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 1685 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 1686 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 1687 |
// SUCH DAMAGE. |
| 1688 |
// |
| 1689 |
// @(#)endian.h 8.1 (Berkeley) 6/11/93 |
| 1690 |
|
| 1691 |
// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ |
| 1692 |
|
| 1693 |
// Written by Klaus Klein <[email protected]>, February 2, 1998. |
| 1694 |
// Public domain. |
| 1695 |
// |
| 1696 |
// NOTE: Do not protect this header against multiple inclusion. Doing |
| 1697 |
// so can have subtle side-effects due to header file inclusion order |
| 1698 |
// and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, |
| 1699 |
// protect each CPP macro that we want to supply. |
| 1700 |
|
| 1701 |
// Feature-test macros are defined by several standards, and allow an |
| 1702 |
// application to specify what symbols they want the system headers to |
| 1703 |
// expose, and hence what standard they want them to conform to. |
| 1704 |
// There are two classes of feature-test macros. The first class |
| 1705 |
// specify complete standards, and if one of these is defined, header |
| 1706 |
// files will try to conform to the relevant standard. They are: |
| 1707 |
// |
| 1708 |
// ANSI macros: |
| 1709 |
// _ANSI_SOURCE ANSI C89 |
| 1710 |
// |
| 1711 |
// POSIX macros: |
| 1712 |
// _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) |
| 1713 |
// _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 |
| 1714 |
// _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 |
| 1715 |
// _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 |
| 1716 |
// _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 |
| 1717 |
// _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 |
| 1718 |
// _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 |
| 1719 |
// |
| 1720 |
// X/Open macros: |
| 1721 |
// _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 |
| 1722 |
// _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions |
| 1723 |
// _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 |
| 1724 |
// _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 |
| 1725 |
// _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option |
| 1726 |
// _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option |
| 1727 |
// |
| 1728 |
// NetBSD macros: |
| 1729 |
// _NETBSD_SOURCE == 1 Make all NetBSD features available. |
| 1730 |
// |
| 1731 |
// If more than one of these "major" feature-test macros is defined, |
| 1732 |
// then the set of facilities provided (and namespace used) is the |
| 1733 |
// union of that specified by the relevant standards, and in case of |
| 1734 |
// conflict, the earlier standard in the above list has precedence (so |
| 1735 |
// if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version |
| 1736 |
// of rename() that's used is the POSIX one). If none of the "major" |
| 1737 |
// feature-test macros is defined, _NETBSD_SOURCE is assumed. |
| 1738 |
// |
| 1739 |
// There are also "minor" feature-test macros, which enable extra |
| 1740 |
// functionality in addition to some base standard. They should be |
| 1741 |
// defined along with one of the "major" macros. The "minor" macros |
| 1742 |
// are: |
| 1743 |
// |
| 1744 |
// _REENTRANT |
| 1745 |
// _ISOC99_SOURCE |
| 1746 |
// _ISOC11_SOURCE |
| 1747 |
// _LARGEFILE_SOURCE Large File Support |
| 1748 |
// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> |
| 1749 |
|
| 1750 |
// Definitions for byte order, according to byte significance from low |
| 1751 |
// address to high. |
| 1752 |
|
| 1753 |
// C-family endian-ness definitions |
| 1754 |
|
| 1755 |
// $NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $ |
| 1756 |
|
| 1757 |
// - |
| 1758 |
// Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. |
| 1759 |
// All rights reserved. |
| 1760 |
// |
| 1761 |
// This code is derived from software contributed to The NetBSD Foundation |
| 1762 |
// by Jun-ichiro itojun Hagino and by Klaus Klein. |
| 1763 |
// |
| 1764 |
// Redistribution and use in source and binary forms, with or without |
| 1765 |
// modification, are permitted provided that the following conditions |
| 1766 |
// are met: |
| 1767 |
// 1. Redistributions of source code must retain the above copyright |
| 1768 |
// notice, this list of conditions and the following disclaimer. |
| 1769 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 1770 |
// notice, this list of conditions and the following disclaimer in the |
| 1771 |
// documentation and/or other materials provided with the distribution. |
| 1772 |
// |
| 1773 |
// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
| 1774 |
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 1775 |
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 1776 |
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
| 1777 |
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 1778 |
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 1779 |
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 1780 |
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 1781 |
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 1782 |
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 1783 |
// POSSIBILITY OF SUCH DAMAGE. |
| 1784 |
|
| 1785 |
// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $ |
| 1786 |
|
| 1787 |
// * Copyright (c) 1991, 1993 |
| 1788 |
// The Regents of the University of California. All rights reserved. |
| 1789 |
// |
| 1790 |
// This code is derived from software contributed to Berkeley by |
| 1791 |
// Berkeley Software Design, Inc. |
| 1792 |
// |
| 1793 |
// Redistribution and use in source and binary forms, with or without |
| 1794 |
// modification, are permitted provided that the following conditions |
| 1795 |
// are met: |
| 1796 |
// 1. Redistributions of source code must retain the above copyright |
| 1797 |
// notice, this list of conditions and the following disclaimer. |
| 1798 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 1799 |
// notice, this list of conditions and the following disclaimer in the |
| 1800 |
// documentation and/or other materials provided with the distribution. |
| 1801 |
// 3. Neither the name of the University nor the names of its contributors |
| 1802 |
// may be used to endorse or promote products derived from this software |
| 1803 |
// without specific prior written permission. |
| 1804 |
// |
| 1805 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 1806 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 1807 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 1808 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 1809 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 1810 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 1811 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 1812 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 1813 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 1814 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 1815 |
// SUCH DAMAGE. |
| 1816 |
// |
| 1817 |
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 |
| 1818 |
|
| 1819 |
// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya Exp $ |
| 1820 |
|
| 1821 |
// - |
| 1822 |
// Copyright (c) 1982, 1986, 1991, 1993, 1994 |
| 1823 |
// The Regents of the University of California. All rights reserved. |
| 1824 |
// (c) UNIX System Laboratories, Inc. |
| 1825 |
// All or some portions of this file are derived from material licensed |
| 1826 |
// to the University of California by American Telephone and Telegraph |
| 1827 |
// Co. or Unix System Laboratories, Inc. and are reproduced herein with |
| 1828 |
// the permission of UNIX System Laboratories, Inc. |
| 1829 |
// |
| 1830 |
// Redistribution and use in source and binary forms, with or without |
| 1831 |
// modification, are permitted provided that the following conditions |
| 1832 |
// are met: |
| 1833 |
// 1. Redistributions of source code must retain the above copyright |
| 1834 |
// notice, this list of conditions and the following disclaimer. |
| 1835 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 1836 |
// notice, this list of conditions and the following disclaimer in the |
| 1837 |
// documentation and/or other materials provided with the distribution. |
| 1838 |
// 3. Neither the name of the University nor the names of its contributors |
| 1839 |
// may be used to endorse or promote products derived from this software |
| 1840 |
// without specific prior written permission. |
| 1841 |
// |
| 1842 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 1843 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 1844 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 1845 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 1846 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 1847 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 1848 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 1849 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 1850 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 1851 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 1852 |
// SUCH DAMAGE. |
| 1853 |
// |
| 1854 |
// @(#)types.h 8.4 (Berkeley) 1/21/94 |
| 1855 |
|
| 1856 |
// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ |
| 1857 |
|
| 1858 |
// Written by Klaus Klein <[email protected]>, February 2, 1998. |
| 1859 |
// Public domain. |
| 1860 |
// |
| 1861 |
// NOTE: Do not protect this header against multiple inclusion. Doing |
| 1862 |
// so can have subtle side-effects due to header file inclusion order |
| 1863 |
// and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, |
| 1864 |
// protect each CPP macro that we want to supply. |
| 1865 |
|
| 1866 |
// Feature-test macros are defined by several standards, and allow an |
| 1867 |
// application to specify what symbols they want the system headers to |
| 1868 |
// expose, and hence what standard they want them to conform to. |
| 1869 |
// There are two classes of feature-test macros. The first class |
| 1870 |
// specify complete standards, and if one of these is defined, header |
| 1871 |
// files will try to conform to the relevant standard. They are: |
| 1872 |
// |
| 1873 |
// ANSI macros: |
| 1874 |
// _ANSI_SOURCE ANSI C89 |
| 1875 |
// |
| 1876 |
// POSIX macros: |
| 1877 |
// _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) |
| 1878 |
// _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 |
| 1879 |
// _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 |
| 1880 |
// _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 |
| 1881 |
// _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 |
| 1882 |
// _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 |
| 1883 |
// _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 |
| 1884 |
// |
| 1885 |
// X/Open macros: |
| 1886 |
// _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 |
| 1887 |
// _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions |
| 1888 |
// _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 |
| 1889 |
// _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 |
| 1890 |
// _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option |
| 1891 |
// _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option |
| 1892 |
// |
| 1893 |
// NetBSD macros: |
| 1894 |
// _NETBSD_SOURCE == 1 Make all NetBSD features available. |
| 1895 |
// |
| 1896 |
// If more than one of these "major" feature-test macros is defined, |
| 1897 |
// then the set of facilities provided (and namespace used) is the |
| 1898 |
// union of that specified by the relevant standards, and in case of |
| 1899 |
// conflict, the earlier standard in the above list has precedence (so |
| 1900 |
// if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version |
| 1901 |
// of rename() that's used is the POSIX one). If none of the "major" |
| 1902 |
// feature-test macros is defined, _NETBSD_SOURCE is assumed. |
| 1903 |
// |
| 1904 |
// There are also "minor" feature-test macros, which enable extra |
| 1905 |
// functionality in addition to some base standard. They should be |
| 1906 |
// defined along with one of the "major" macros. The "minor" macros |
| 1907 |
// are: |
| 1908 |
// |
| 1909 |
// _REENTRANT |
| 1910 |
// _ISOC99_SOURCE |
| 1911 |
// _ISOC11_SOURCE |
| 1912 |
// _LARGEFILE_SOURCE Large File Support |
| 1913 |
// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> |
| 1914 |
|
| 1915 |
// Machine type dependent parameters. |
| 1916 |
// $NetBSD: types.h,v 1.60 2019/04/06 03:06:24 thorpej Exp $ |
| 1917 |
|
| 1918 |
// - |
| 1919 |
// Copyright (c) 1990 The Regents of the University of California. |
| 1920 |
// All rights reserved. |
| 1921 |
// |
| 1922 |
// Redistribution and use in source and binary forms, with or without |
| 1923 |
// modification, are permitted provided that the following conditions |
| 1924 |
// are met: |
| 1925 |
// 1. Redistributions of source code must retain the above copyright |
| 1926 |
// notice, this list of conditions and the following disclaimer. |
| 1927 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 1928 |
// notice, this list of conditions and the following disclaimer in the |
| 1929 |
// documentation and/or other materials provided with the distribution. |
| 1930 |
// 3. Neither the name of the University nor the names of its contributors |
| 1931 |
// may be used to endorse or promote products derived from this software |
| 1932 |
// without specific prior written permission. |
| 1933 |
// |
| 1934 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 1935 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 1936 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 1937 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 1938 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 1939 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 1940 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 1941 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 1942 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 1943 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 1944 |
// SUCH DAMAGE. |
| 1945 |
// |
| 1946 |
// @(#)types.h 7.5 (Berkeley) 3/9/91 |
| 1947 |
|
| 1948 |
// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $ |
| 1949 |
|
| 1950 |
// * Copyright (c) 1991, 1993 |
| 1951 |
// The Regents of the University of California. All rights reserved. |
| 1952 |
// |
| 1953 |
// This code is derived from software contributed to Berkeley by |
| 1954 |
// Berkeley Software Design, Inc. |
| 1955 |
// |
| 1956 |
// Redistribution and use in source and binary forms, with or without |
| 1957 |
// modification, are permitted provided that the following conditions |
| 1958 |
// are met: |
| 1959 |
// 1. Redistributions of source code must retain the above copyright |
| 1960 |
// notice, this list of conditions and the following disclaimer. |
| 1961 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 1962 |
// notice, this list of conditions and the following disclaimer in the |
| 1963 |
// documentation and/or other materials provided with the distribution. |
| 1964 |
// 3. Neither the name of the University nor the names of its contributors |
| 1965 |
// may be used to endorse or promote products derived from this software |
| 1966 |
// without specific prior written permission. |
| 1967 |
// |
| 1968 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 1969 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 1970 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 1971 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 1972 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 1973 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 1974 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 1975 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 1976 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 1977 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 1978 |
// SUCH DAMAGE. |
| 1979 |
// |
| 1980 |
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 |
| 1981 |
|
| 1982 |
// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ |
| 1983 |
|
| 1984 |
// Written by Klaus Klein <[email protected]>, February 2, 1998. |
| 1985 |
// Public domain. |
| 1986 |
// |
| 1987 |
// NOTE: Do not protect this header against multiple inclusion. Doing |
| 1988 |
// so can have subtle side-effects due to header file inclusion order |
| 1989 |
// and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, |
| 1990 |
// protect each CPP macro that we want to supply. |
| 1991 |
|
| 1992 |
// Feature-test macros are defined by several standards, and allow an |
| 1993 |
// application to specify what symbols they want the system headers to |
| 1994 |
// expose, and hence what standard they want them to conform to. |
| 1995 |
// There are two classes of feature-test macros. The first class |
| 1996 |
// specify complete standards, and if one of these is defined, header |
| 1997 |
// files will try to conform to the relevant standard. They are: |
| 1998 |
// |
| 1999 |
// ANSI macros: |
| 2000 |
// _ANSI_SOURCE ANSI C89 |
| 2001 |
// |
| 2002 |
// POSIX macros: |
| 2003 |
// _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) |
| 2004 |
// _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 |
| 2005 |
// _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 |
| 2006 |
// _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 |
| 2007 |
// _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 |
| 2008 |
// _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 |
| 2009 |
// _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 |
| 2010 |
// |
| 2011 |
// X/Open macros: |
| 2012 |
// _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 |
| 2013 |
// _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions |
| 2014 |
// _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 |
| 2015 |
// _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 |
| 2016 |
// _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option |
| 2017 |
// _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option |
| 2018 |
// |
| 2019 |
// NetBSD macros: |
| 2020 |
// _NETBSD_SOURCE == 1 Make all NetBSD features available. |
| 2021 |
// |
| 2022 |
// If more than one of these "major" feature-test macros is defined, |
| 2023 |
// then the set of facilities provided (and namespace used) is the |
| 2024 |
// union of that specified by the relevant standards, and in case of |
| 2025 |
// conflict, the earlier standard in the above list has precedence (so |
| 2026 |
// if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version |
| 2027 |
// of rename() that's used is the POSIX one). If none of the "major" |
| 2028 |
// feature-test macros is defined, _NETBSD_SOURCE is assumed. |
| 2029 |
// |
| 2030 |
// There are also "minor" feature-test macros, which enable extra |
| 2031 |
// functionality in addition to some base standard. They should be |
| 2032 |
// defined along with one of the "major" macros. The "minor" macros |
| 2033 |
// are: |
| 2034 |
// |
| 2035 |
// _REENTRANT |
| 2036 |
// _ISOC99_SOURCE |
| 2037 |
// _ISOC11_SOURCE |
| 2038 |
// _LARGEFILE_SOURCE Large File Support |
| 2039 |
// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> |
| 2040 |
|
| 2041 |
// $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ |
| 2042 |
|
| 2043 |
// - |
| 2044 |
// Copyright (c) 1990 The Regents of the University of California. |
| 2045 |
// All rights reserved. |
| 2046 |
// |
| 2047 |
// Redistribution and use in source and binary forms, with or without |
| 2048 |
// modification, are permitted provided that the following conditions |
| 2049 |
// are met: |
| 2050 |
// 1. Redistributions of source code must retain the above copyright |
| 2051 |
// notice, this list of conditions and the following disclaimer. |
| 2052 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 2053 |
// notice, this list of conditions and the following disclaimer in the |
| 2054 |
// documentation and/or other materials provided with the distribution. |
| 2055 |
// 3. Neither the name of the University nor the names of its contributors |
| 2056 |
// may be used to endorse or promote products derived from this software |
| 2057 |
// without specific prior written permission. |
| 2058 |
// |
| 2059 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 2060 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 2061 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 2062 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 2063 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 2064 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 2065 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 2066 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 2067 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 2068 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 2069 |
// SUCH DAMAGE. |
| 2070 |
// |
| 2071 |
// from: @(#)types.h 7.5 (Berkeley) 3/9/91 |
| 2072 |
|
| 2073 |
type X__register_t = int64 /* types.h:68:19 */ |
| 2074 |
type X__cpu_simple_lock_nv_t = uint8 /* types.h:69:24 */ |
| 2075 |
|
| 2076 |
// __cpu_simple_lock_t used to be a full word. |
| 2077 |
|
| 2078 |
// The amd64 does not have strict alignment requirements. |
| 2079 |
|
| 2080 |
// $NetBSD: ansi.h,v 1.11 2019/05/07 03:49:26 kamil Exp $ |
| 2081 |
|
| 2082 |
// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ |
| 2083 |
|
| 2084 |
// - |
| 2085 |
// Copyright (c) 2014 The NetBSD Foundation, Inc. |
| 2086 |
// All rights reserved. |
| 2087 |
// |
| 2088 |
// This code is derived from software contributed to The NetBSD Foundation |
| 2089 |
// by Matt Thomas of 3am Software Foundry. |
| 2090 |
// |
| 2091 |
// Redistribution and use in source and binary forms, with or without |
| 2092 |
// modification, are permitted provided that the following conditions |
| 2093 |
// are met: |
| 2094 |
// 1. Redistributions of source code must retain the above copyright |
| 2095 |
// notice, this list of conditions and the following disclaimer. |
| 2096 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 2097 |
// notice, this list of conditions and the following disclaimer in the |
| 2098 |
// documentation and/or other materials provided with the distribution. |
| 2099 |
// |
| 2100 |
// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
| 2101 |
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 2102 |
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 2103 |
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
| 2104 |
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 2105 |
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 2106 |
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 2107 |
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 2108 |
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 2109 |
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 2110 |
// POSSIBILITY OF SUCH DAMAGE. |
| 2111 |
|
| 2112 |
// $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ |
| 2113 |
|
| 2114 |
// - |
| 2115 |
// Copyright (c) 1990 The Regents of the University of California. |
| 2116 |
// All rights reserved. |
| 2117 |
// |
| 2118 |
// Redistribution and use in source and binary forms, with or without |
| 2119 |
// modification, are permitted provided that the following conditions |
| 2120 |
// are met: |
| 2121 |
// 1. Redistributions of source code must retain the above copyright |
| 2122 |
// notice, this list of conditions and the following disclaimer. |
| 2123 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 2124 |
// notice, this list of conditions and the following disclaimer in the |
| 2125 |
// documentation and/or other materials provided with the distribution. |
| 2126 |
// 3. Neither the name of the University nor the names of its contributors |
| 2127 |
// may be used to endorse or promote products derived from this software |
| 2128 |
// without specific prior written permission. |
| 2129 |
// |
| 2130 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 2131 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 2132 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 2133 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 2134 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 2135 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 2136 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 2137 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 2138 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 2139 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 2140 |
// SUCH DAMAGE. |
| 2141 |
// |
| 2142 |
// from: @(#)types.h 7.5 (Berkeley) 3/9/91 |
| 2143 |
|
| 2144 |
// $NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $ |
| 2145 |
|
| 2146 |
// - |
| 2147 |
// Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. |
| 2148 |
// All rights reserved. |
| 2149 |
// |
| 2150 |
// This code is derived from software contributed to The NetBSD Foundation |
| 2151 |
// by Jun-ichiro itojun Hagino and by Klaus Klein. |
| 2152 |
// |
| 2153 |
// Redistribution and use in source and binary forms, with or without |
| 2154 |
// modification, are permitted provided that the following conditions |
| 2155 |
// are met: |
| 2156 |
// 1. Redistributions of source code must retain the above copyright |
| 2157 |
// notice, this list of conditions and the following disclaimer. |
| 2158 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 2159 |
// notice, this list of conditions and the following disclaimer in the |
| 2160 |
// documentation and/or other materials provided with the distribution. |
| 2161 |
// |
| 2162 |
// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
| 2163 |
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 2164 |
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 2165 |
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
| 2166 |
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 2167 |
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 2168 |
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 2169 |
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 2170 |
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 2171 |
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 2172 |
// POSSIBILITY OF SUCH DAMAGE. |
| 2173 |
|
| 2174 |
type Int8_t = X__int8_t /* types.h:54:18 */ |
| 2175 |
|
| 2176 |
type Int16_t = X__int16_t /* types.h:64:19 */ |
| 2177 |
|
| 2178 |
type Uint16_t = X__uint16_t /* types.h:69:20 */ |
| 2179 |
|
| 2180 |
type Int32_t = X__int32_t /* types.h:74:19 */ |
| 2181 |
|
| 2182 |
type Int64_t = X__int64_t /* types.h:84:19 */ |
| 2183 |
|
| 2184 |
type Uint64_t = X__uint64_t /* types.h:89:20 */ |
| 2185 |
|
| 2186 |
type U_int8_t = Uint8_t /* types.h:93:18 */ |
| 2187 |
type U_int16_t = Uint16_t /* types.h:94:18 */ |
| 2188 |
type U_int32_t = Uint32_t /* types.h:95:18 */ |
| 2189 |
type U_int64_t = Uint64_t /* types.h:96:18 */ |
| 2190 |
|
| 2191 |
// $NetBSD: endian.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ |
| 2192 |
|
| 2193 |
// $NetBSD: endian.h,v 1.30 2016/02/27 21:37:35 christos Exp $ |
| 2194 |
|
| 2195 |
// Copyright (c) 1987, 1991, 1993 |
| 2196 |
// The Regents of the University of California. All rights reserved. |
| 2197 |
// |
| 2198 |
// Redistribution and use in source and binary forms, with or without |
| 2199 |
// modification, are permitted provided that the following conditions |
| 2200 |
// are met: |
| 2201 |
// 1. Redistributions of source code must retain the above copyright |
| 2202 |
// notice, this list of conditions and the following disclaimer. |
| 2203 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 2204 |
// notice, this list of conditions and the following disclaimer in the |
| 2205 |
// documentation and/or other materials provided with the distribution. |
| 2206 |
// 3. Neither the name of the University nor the names of its contributors |
| 2207 |
// may be used to endorse or promote products derived from this software |
| 2208 |
// without specific prior written permission. |
| 2209 |
// |
| 2210 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 2211 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 2212 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 2213 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 2214 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 2215 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 2216 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 2217 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 2218 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 2219 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 2220 |
// SUCH DAMAGE. |
| 2221 |
// |
| 2222 |
// @(#)endian.h 8.1 (Berkeley) 6/11/93 |
| 2223 |
|
| 2224 |
type U_char = uint8 /* types.h:101:23 */ |
| 2225 |
type U_short = uint16 /* types.h:102:24 */ |
| 2226 |
type U_int = uint32 /* types.h:103:22 */ |
| 2227 |
type U_long = uint64 /* types.h:104:23 */ |
| 2228 |
|
| 2229 |
type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility |
| 2230 |
type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility |
| 2231 |
type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility |
| 2232 |
type Ulong = uint64 /* types.h:109:23 */ // Sys V compatibility |
| 2233 |
|
| 2234 |
type U_quad_t = Uint64_t /* types.h:112:18 */ // quads |
| 2235 |
type Quad_t = Int64_t /* types.h:113:18 */ |
| 2236 |
type Qaddr_t = uintptr /* types.h:114:16 */ |
| 2237 |
|
| 2238 |
// The types longlong_t and u_longlong_t exist for use with the |
| 2239 |
// Sun-derived XDR routines involving these types, and their usage |
| 2240 |
// in other contexts is discouraged. Further note that these types |
| 2241 |
// may not be equivalent to "long long" and "unsigned long long", |
| 2242 |
// they are only guaranteed to be signed and unsigned 64-bit types |
| 2243 |
// respectively. Portable programs that need 64-bit types should use |
| 2244 |
// the C99 types int64_t and uint64_t instead. |
| 2245 |
|
| 2246 |
type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR |
| 2247 |
type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR |
| 2248 |
|
| 2249 |
type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count |
| 2250 |
type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size |
| 2251 |
|
| 2252 |
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs) |
| 2253 |
|
| 2254 |
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count |
| 2255 |
|
| 2256 |
// We don't and shouldn't use caddr_t in the kernel anymore |
| 2257 |
type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address |
| 2258 |
|
| 2259 |
type Daddr_t = Int64_t /* types.h:154:18 */ // disk address |
| 2260 |
|
| 2261 |
type Dev_t = Uint64_t /* types.h:157:18 */ // device number |
| 2262 |
type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number |
| 2263 |
|
| 2264 |
type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id |
| 2265 |
type Ino_t = Uint64_t /* types.h:166:18 */ // inode number |
| 2266 |
type Key_t = int64 /* types.h:167:15 */ // IPC key (for Sys V IPC) |
| 2267 |
|
| 2268 |
type Mode_t = X__mode_t /* types.h:170:18 */ // permissions |
| 2269 |
|
| 2270 |
type Nlink_t = Uint32_t /* types.h:174:18 */ // link count |
| 2271 |
|
| 2272 |
type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id |
| 2273 |
type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit |
| 2274 |
type Segsz_t = Int32_t /* types.h:187:18 */ // segment size |
| 2275 |
type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset |
| 2276 |
|
| 2277 |
type Mqd_t = int32 /* types.h:195:14 */ |
| 2278 |
|
| 2279 |
type Cpuid_t = uint64 /* types.h:197:23 */ |
| 2280 |
|
| 2281 |
type Psetid_t = int32 /* types.h:199:14 */ |
| 2282 |
|
| 2283 |
type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */ |
| 2284 |
|
| 2285 |
// Major, minor numbers, dev_t's. |
| 2286 |
type X__devmajor_t = Int32_t /* types.h:255:17 */ |
| 2287 |
type X__devminor_t = Int32_t /* types.h:255:31 */ |
| 2288 |
|
| 2289 |
type Clock_t = uint32 /* types.h:268:24 */ |
| 2290 |
|
| 2291 |
type Time_t = X__int64_t /* types.h:289:23 */ |
| 2292 |
|
| 2293 |
type Clockid_t = int32 /* types.h:294:26 */ |
| 2294 |
|
| 2295 |
type Timer_t = int32 /* types.h:299:24 */ |
| 2296 |
|
| 2297 |
type Suseconds_t = int32 /* types.h:304:27 */ |
| 2298 |
|
| 2299 |
type Useconds_t = uint32 /* types.h:309:26 */ |
| 2300 |
|
| 2301 |
// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil Exp $ |
| 2302 |
|
| 2303 |
// - |
| 2304 |
// Copyright (c) 1992, 1993 |
| 2305 |
// The Regents of the University of California. All rights reserved. |
| 2306 |
// |
| 2307 |
// Redistribution and use in source and binary forms, with or without |
| 2308 |
// modification, are permitted provided that the following conditions |
| 2309 |
// are met: |
| 2310 |
// 1. Redistributions of source code must retain the above copyright |
| 2311 |
// notice, this list of conditions and the following disclaimer. |
| 2312 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 2313 |
// notice, this list of conditions and the following disclaimer in the |
| 2314 |
// documentation and/or other materials provided with the distribution. |
| 2315 |
// 3. Neither the name of the University nor the names of its contributors |
| 2316 |
// may be used to endorse or promote products derived from this software |
| 2317 |
// without specific prior written permission. |
| 2318 |
// |
| 2319 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 2320 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 2321 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 2322 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 2323 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 2324 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 2325 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 2326 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 2327 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 2328 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 2329 |
// SUCH DAMAGE. |
| 2330 |
// |
| 2331 |
// from: @(#)types.h 8.4 (Berkeley) 1/21/94 |
| 2332 |
|
| 2333 |
// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $ |
| 2334 |
|
| 2335 |
// * Copyright (c) 1991, 1993 |
| 2336 |
// The Regents of the University of California. All rights reserved. |
| 2337 |
// |
| 2338 |
// This code is derived from software contributed to Berkeley by |
| 2339 |
// Berkeley Software Design, Inc. |
| 2340 |
// |
| 2341 |
// Redistribution and use in source and binary forms, with or without |
| 2342 |
// modification, are permitted provided that the following conditions |
| 2343 |
// are met: |
| 2344 |
// 1. Redistributions of source code must retain the above copyright |
| 2345 |
// notice, this list of conditions and the following disclaimer. |
| 2346 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 2347 |
// notice, this list of conditions and the following disclaimer in the |
| 2348 |
// documentation and/or other materials provided with the distribution. |
| 2349 |
// 3. Neither the name of the University nor the names of its contributors |
| 2350 |
// may be used to endorse or promote products derived from this software |
| 2351 |
// without specific prior written permission. |
| 2352 |
// |
| 2353 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 2354 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 2355 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 2356 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 2357 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 2358 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 2359 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 2360 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 2361 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 2362 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 2363 |
// SUCH DAMAGE. |
| 2364 |
// |
| 2365 |
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 |
| 2366 |
|
| 2367 |
// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ |
| 2368 |
|
| 2369 |
// Written by Klaus Klein <[email protected]>, February 2, 1998. |
| 2370 |
// Public domain. |
| 2371 |
// |
| 2372 |
// NOTE: Do not protect this header against multiple inclusion. Doing |
| 2373 |
// so can have subtle side-effects due to header file inclusion order |
| 2374 |
// and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, |
| 2375 |
// protect each CPP macro that we want to supply. |
| 2376 |
|
| 2377 |
// Feature-test macros are defined by several standards, and allow an |
| 2378 |
// application to specify what symbols they want the system headers to |
| 2379 |
// expose, and hence what standard they want them to conform to. |
| 2380 |
// There are two classes of feature-test macros. The first class |
| 2381 |
// specify complete standards, and if one of these is defined, header |
| 2382 |
// files will try to conform to the relevant standard. They are: |
| 2383 |
// |
| 2384 |
// ANSI macros: |
| 2385 |
// _ANSI_SOURCE ANSI C89 |
| 2386 |
// |
| 2387 |
// POSIX macros: |
| 2388 |
// _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) |
| 2389 |
// _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 |
| 2390 |
// _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 |
| 2391 |
// _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 |
| 2392 |
// _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 |
| 2393 |
// _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 |
| 2394 |
// _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 |
| 2395 |
// |
| 2396 |
// X/Open macros: |
| 2397 |
// _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 |
| 2398 |
// _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions |
| 2399 |
// _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 |
| 2400 |
// _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 |
| 2401 |
// _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option |
| 2402 |
// _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option |
| 2403 |
// |
| 2404 |
// NetBSD macros: |
| 2405 |
// _NETBSD_SOURCE == 1 Make all NetBSD features available. |
| 2406 |
// |
| 2407 |
// If more than one of these "major" feature-test macros is defined, |
| 2408 |
// then the set of facilities provided (and namespace used) is the |
| 2409 |
// union of that specified by the relevant standards, and in case of |
| 2410 |
// conflict, the earlier standard in the above list has precedence (so |
| 2411 |
// if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version |
| 2412 |
// of rename() that's used is the POSIX one). If none of the "major" |
| 2413 |
// feature-test macros is defined, _NETBSD_SOURCE is assumed. |
| 2414 |
// |
| 2415 |
// There are also "minor" feature-test macros, which enable extra |
| 2416 |
// functionality in addition to some base standard. They should be |
| 2417 |
// defined along with one of the "major" macros. The "minor" macros |
| 2418 |
// are: |
| 2419 |
// |
| 2420 |
// _REENTRANT |
| 2421 |
// _ISOC99_SOURCE |
| 2422 |
// _ISOC11_SOURCE |
| 2423 |
// _LARGEFILE_SOURCE Large File Support |
| 2424 |
// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> |
| 2425 |
|
| 2426 |
// $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ |
| 2427 |
|
| 2428 |
// - |
| 2429 |
// Copyright (c) 1990 The Regents of the University of California. |
| 2430 |
// All rights reserved. |
| 2431 |
// |
| 2432 |
// Redistribution and use in source and binary forms, with or without |
| 2433 |
// modification, are permitted provided that the following conditions |
| 2434 |
// are met: |
| 2435 |
// 1. Redistributions of source code must retain the above copyright |
| 2436 |
// notice, this list of conditions and the following disclaimer. |
| 2437 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 2438 |
// notice, this list of conditions and the following disclaimer in the |
| 2439 |
// documentation and/or other materials provided with the distribution. |
| 2440 |
// 3. Neither the name of the University nor the names of its contributors |
| 2441 |
// may be used to endorse or promote products derived from this software |
| 2442 |
// without specific prior written permission. |
| 2443 |
// |
| 2444 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 2445 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 2446 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 2447 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 2448 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 2449 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 2450 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 2451 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 2452 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 2453 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 2454 |
// SUCH DAMAGE. |
| 2455 |
// |
| 2456 |
// from: @(#)types.h 7.5 (Berkeley) 3/9/91 |
| 2457 |
|
| 2458 |
// Implementation dependent defines, hidden from user space. |
| 2459 |
// POSIX does not specify them. |
| 2460 |
|
| 2461 |
type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */ |
| 2462 |
|
| 2463 |
// 32 = 2 ^ 5 |
| 2464 |
|
| 2465 |
// Select uses bit fields of file descriptors. These macros manipulate |
| 2466 |
// such bit fields. Note: FD_SETSIZE may be defined by the user. |
| 2467 |
|
| 2468 |
type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */ |
| 2469 |
|
| 2470 |
// 32 = 2 ^ 5 |
| 2471 |
|
| 2472 |
// Select uses bit fields of file descriptors. These macros manipulate |
| 2473 |
// such bit fields. Note: FD_SETSIZE may be defined by the user. |
| 2474 |
|
| 2475 |
type Fd_set = Fd_set1 /* fd_set.h:68:3 */ |
| 2476 |
|
| 2477 |
// Expose our internals if we are not required to hide them. |
| 2478 |
|
| 2479 |
type Kauth_cred_t = uintptr /* types.h:318:27 */ |
| 2480 |
|
| 2481 |
type Pri_t = int32 /* types.h:320:13 */ |
| 2482 |
|
| 2483 |
// $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil Exp $ |
| 2484 |
|
| 2485 |
// - |
| 2486 |
// Copyright (c) 2001, 2008 The NetBSD Foundation, Inc. |
| 2487 |
// All rights reserved. |
| 2488 |
// |
| 2489 |
// This code is derived from software contributed to The NetBSD Foundation |
| 2490 |
// by Nathan J. Williams. |
| 2491 |
// |
| 2492 |
// Redistribution and use in source and binary forms, with or without |
| 2493 |
// modification, are permitted provided that the following conditions |
| 2494 |
// are met: |
| 2495 |
// 1. Redistributions of source code must retain the above copyright |
| 2496 |
// notice, this list of conditions and the following disclaimer. |
| 2497 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 2498 |
// notice, this list of conditions and the following disclaimer in the |
| 2499 |
// documentation and/or other materials provided with the distribution. |
| 2500 |
// |
| 2501 |
// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
| 2502 |
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 2503 |
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 2504 |
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
| 2505 |
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 2506 |
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 2507 |
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 2508 |
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 2509 |
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 2510 |
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 2511 |
// POSSIBILITY OF SUCH DAMAGE. |
| 2512 |
|
| 2513 |
// We use the "pthread_spin_t" name internally; "pthread_spinlock_t" is the |
| 2514 |
// POSIX spinlock object. |
| 2515 |
// |
| 2516 |
// C++ expects to be using PTHREAD_FOO_INITIALIZER as a member initializer. |
| 2517 |
// This does not work for volatile types. Since C++ does not touch the guts |
| 2518 |
// of those types, we do not include volatile in the C++ definitions. |
| 2519 |
type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */ |
| 2520 |
type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */ |
| 2521 |
|
| 2522 |
// Copied from PTQ_HEAD in pthread_queue.h |
| 2523 |
|
| 2524 |
type Pthread_queue_struct_t = struct { |
| 2525 |
Fptqh_first uintptr |
| 2526 |
Fptqh_last uintptr |
| 2527 |
} /* pthread_types.h:61:1 */ |
| 2528 |
|
| 2529 |
type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */ |
| 2530 |
type X__pthread_attr_st = struct { |
| 2531 |
Fpta_magic uint32 |
| 2532 |
Fpta_flags int32 |
| 2533 |
Fpta_private uintptr |
| 2534 |
} /* pthread_types.h:65:1 */ |
| 2535 |
|
| 2536 |
type X__pthread_mutex_st = struct { |
| 2537 |
Fptm_magic uint32 |
| 2538 |
Fptm_errorcheck X__pthread_spin_t |
| 2539 |
Fptm_pad1 [3]Uint8_t |
| 2540 |
F__8 struct{ Fptm_ceiling uint8 } |
| 2541 |
Fptm_pad2 [3]Uint8_t |
| 2542 |
F__ccgo_pad1 [4]byte |
| 2543 |
Fptm_owner Pthread_t |
| 2544 |
Fptm_waiters uintptr |
| 2545 |
Fptm_recursed uint32 |
| 2546 |
F__ccgo_pad2 [4]byte |
| 2547 |
Fptm_spare2 uintptr |
| 2548 |
} /* pthread_types.h:66:1 */ |
| 2549 |
|
| 2550 |
type X__pthread_mutexattr_st = struct { |
| 2551 |
Fptma_magic uint32 |
| 2552 |
F__ccgo_pad1 [4]byte |
| 2553 |
Fptma_private uintptr |
| 2554 |
} /* pthread_types.h:67:1 */ |
| 2555 |
|
| 2556 |
type X__pthread_cond_st = struct { |
| 2557 |
Fptc_magic uint32 |
| 2558 |
Fptc_lock X__pthread_spin_t |
| 2559 |
F__ccgo_pad1 [3]byte |
| 2560 |
Fptc_waiters Pthread_queue_t |
| 2561 |
Fptc_mutex uintptr |
| 2562 |
Fptc_private uintptr |
| 2563 |
} /* pthread_types.h:68:1 */ |
| 2564 |
|
| 2565 |
type X__pthread_condattr_st = struct { |
| 2566 |
Fptca_magic uint32 |
| 2567 |
F__ccgo_pad1 [4]byte |
| 2568 |
Fptca_private uintptr |
| 2569 |
} /* pthread_types.h:69:1 */ |
| 2570 |
|
| 2571 |
type X__pthread_rwlock_st = struct { |
| 2572 |
Fptr_magic uint32 |
| 2573 |
Fptr_interlock X__pthread_spin_t |
| 2574 |
F__ccgo_pad1 [3]byte |
| 2575 |
Fptr_rblocked Pthread_queue_t |
| 2576 |
Fptr_wblocked Pthread_queue_t |
| 2577 |
Fptr_nreaders uint32 |
| 2578 |
F__ccgo_pad2 [4]byte |
| 2579 |
Fptr_owner Pthread_t |
| 2580 |
Fptr_private uintptr |
| 2581 |
} /* pthread_types.h:71:1 */ |
| 2582 |
|
| 2583 |
type X__pthread_rwlockattr_st = struct { |
| 2584 |
Fptra_magic uint32 |
| 2585 |
F__ccgo_pad1 [4]byte |
| 2586 |
Fptra_private uintptr |
| 2587 |
} /* pthread_types.h:72:1 */ |
| 2588 |
|
| 2589 |
type X__pthread_barrier_st = struct { |
| 2590 |
Fptb_magic uint32 |
| 2591 |
Fptb_lock Pthread_spin_t |
| 2592 |
F__ccgo_pad1 [3]byte |
| 2593 |
Fptb_waiters Pthread_queue_t |
| 2594 |
Fptb_initcount uint32 |
| 2595 |
Fptb_curcount uint32 |
| 2596 |
Fptb_generation uint32 |
| 2597 |
F__ccgo_pad2 [4]byte |
| 2598 |
Fptb_private uintptr |
| 2599 |
} /* pthread_types.h:73:1 */ |
| 2600 |
|
| 2601 |
type X__pthread_barrierattr_st = struct { |
| 2602 |
Fptba_magic uint32 |
| 2603 |
F__ccgo_pad1 [4]byte |
| 2604 |
Fptba_private uintptr |
| 2605 |
} /* pthread_types.h:74:1 */ |
| 2606 |
|
| 2607 |
type Pthread_t = uintptr /* pthread_types.h:76:29 */ |
| 2608 |
type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */ |
| 2609 |
type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */ |
| 2610 |
type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */ |
| 2611 |
type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */ |
| 2612 |
type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */ |
| 2613 |
type X__pthread_once_st = struct { |
| 2614 |
Fpto_mutex Pthread_mutex_t |
| 2615 |
Fpto_done int32 |
| 2616 |
F__ccgo_pad1 [4]byte |
| 2617 |
} /* pthread_types.h:82:9 */ |
| 2618 |
|
| 2619 |
type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */ |
| 2620 |
type X__pthread_spinlock_st = struct { |
| 2621 |
Fpts_magic uint32 |
| 2622 |
Fpts_spin X__pthread_spin_t |
| 2623 |
F__ccgo_pad1 [3]byte |
| 2624 |
Fpts_flags int32 |
| 2625 |
} /* pthread_types.h:83:9 */ |
| 2626 |
|
| 2627 |
type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */ |
| 2628 |
type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */ |
| 2629 |
type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */ |
| 2630 |
type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */ |
| 2631 |
type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */ |
| 2632 |
type Pthread_key_t = int32 /* pthread_types.h:88:13 */ |
| 2633 |
|
| 2634 |
// $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ |
| 2635 |
|
| 2636 |
// Written by Manuel Bouyer. Public domain |
| 2637 |
|
| 2638 |
// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya Exp $ |
| 2639 |
|
| 2640 |
// - |
| 2641 |
// Copyright (c) 2001, 2004 The NetBSD Foundation, Inc. |
| 2642 |
// All rights reserved. |
| 2643 |
// |
| 2644 |
// This code is derived from software contributed to The NetBSD Foundation |
| 2645 |
// by Klaus Klein. |
| 2646 |
// |
| 2647 |
// Redistribution and use in source and binary forms, with or without |
| 2648 |
// modification, are permitted provided that the following conditions |
| 2649 |
// are met: |
| 2650 |
// 1. Redistributions of source code must retain the above copyright |
| 2651 |
// notice, this list of conditions and the following disclaimer. |
| 2652 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 2653 |
// notice, this list of conditions and the following disclaimer in the |
| 2654 |
// documentation and/or other materials provided with the distribution. |
| 2655 |
// |
| 2656 |
// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
| 2657 |
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 2658 |
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 2659 |
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
| 2660 |
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 2661 |
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 2662 |
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 2663 |
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 2664 |
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 2665 |
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 2666 |
// POSSIBILITY OF SUCH DAMAGE. |
| 2667 |
|
| 2668 |
// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $ |
| 2669 |
|
| 2670 |
// * Copyright (c) 1991, 1993 |
| 2671 |
// The Regents of the University of California. All rights reserved. |
| 2672 |
// |
| 2673 |
// This code is derived from software contributed to Berkeley by |
| 2674 |
// Berkeley Software Design, Inc. |
| 2675 |
// |
| 2676 |
// Redistribution and use in source and binary forms, with or without |
| 2677 |
// modification, are permitted provided that the following conditions |
| 2678 |
// are met: |
| 2679 |
// 1. Redistributions of source code must retain the above copyright |
| 2680 |
// notice, this list of conditions and the following disclaimer. |
| 2681 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 2682 |
// notice, this list of conditions and the following disclaimer in the |
| 2683 |
// documentation and/or other materials provided with the distribution. |
| 2684 |
// 3. Neither the name of the University nor the names of its contributors |
| 2685 |
// may be used to endorse or promote products derived from this software |
| 2686 |
// without specific prior written permission. |
| 2687 |
// |
| 2688 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 2689 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 2690 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 2691 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 2692 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 2693 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 2694 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 2695 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 2696 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 2697 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 2698 |
// SUCH DAMAGE. |
| 2699 |
// |
| 2700 |
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 |
| 2701 |
|
| 2702 |
// $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ |
| 2703 |
|
| 2704 |
// - |
| 2705 |
// Copyright (c) 1990 The Regents of the University of California. |
| 2706 |
// All rights reserved. |
| 2707 |
// |
| 2708 |
// Redistribution and use in source and binary forms, with or without |
| 2709 |
// modification, are permitted provided that the following conditions |
| 2710 |
// are met: |
| 2711 |
// 1. Redistributions of source code must retain the above copyright |
| 2712 |
// notice, this list of conditions and the following disclaimer. |
| 2713 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 2714 |
// notice, this list of conditions and the following disclaimer in the |
| 2715 |
// documentation and/or other materials provided with the distribution. |
| 2716 |
// 3. Neither the name of the University nor the names of its contributors |
| 2717 |
// may be used to endorse or promote products derived from this software |
| 2718 |
// without specific prior written permission. |
| 2719 |
// |
| 2720 |
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 2721 |
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 2722 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 2723 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 2724 |
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 2725 |
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 2726 |
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 2727 |
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 2728 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 2729 |
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 2730 |
// SUCH DAMAGE. |
| 2731 |
// |
| 2732 |
// from: @(#)types.h 7.5 (Berkeley) 3/9/91 |
| 2733 |
|
| 2734 |
type Intptr_t = X__intptr_t /* stdint.h:79:20 */ |
| 2735 |
|
| 2736 |
type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ |
| 2737 |
|
| 2738 |
// $NetBSD: int_mwgwtypes.h,v 1.8 2014/07/25 21:43:13 joerg Exp $ |
| 2739 |
|
| 2740 |
// - |
| 2741 |
// Copyright (c) 2001 The NetBSD Foundation, Inc. |
| 2742 |
// All rights reserved. |
| 2743 |
// |
| 2744 |
// This code is derived from software contributed to The NetBSD Foundation |
| 2745 |
// by Klaus Klein. |
| 2746 |
// |
| 2747 |
// Redistribution and use in source and binary forms, with or without |
| 2748 |
// modification, are permitted provided that the following conditions |
| 2749 |
// are met: |
| 2750 |
// 1. Redistributions of source code must retain the above copyright |
| 2751 |
// notice, this list of conditions and the following disclaimer. |
| 2752 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 2753 |
// notice, this list of conditions and the following disclaimer in the |
| 2754 |
// documentation and/or other materials provided with the distribution. |
| 2755 |
// |
| 2756 |
// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
| 2757 |
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 2758 |
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 2759 |
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
| 2760 |
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 2761 |
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 2762 |
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 2763 |
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 2764 |
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 2765 |
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 2766 |
// POSSIBILITY OF SUCH DAMAGE. |
| 2767 |
|
| 2768 |
// $NetBSD: common_int_mwgwtypes.h,v 1.1 2014/07/25 21:43:13 joerg Exp $ |
| 2769 |
|
| 2770 |
// - |
| 2771 |
// Copyright (c) 2014 The NetBSD Foundation, Inc. |
| 2772 |
// All rights reserved. |
| 2773 |
// |
| 2774 |
// This code is derived from software contributed to The NetBSD Foundation |
| 2775 |
// by Joerg Sonnenberger. |
| 2776 |
// |
| 2777 |
// Redistribution and use in source and binary forms, with or without |
| 2778 |
// modification, are permitted provided that the following conditions |
| 2779 |
// are met: |
| 2780 |
// 1. Redistributions of source code must retain the above copyright |
| 2781 |
// notice, this list of conditions and the following disclaimer. |
| 2782 |
// 2. Redistributions in binary form must reproduce the above copyright |
| 2783 |
// notice, this list of conditions and the following disclaimer in the |
| 2784 |
// documentation and/or other materials provided with the distribution. |
| 2785 |
// |
| 2786 |
// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
| 2787 |
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 2788 |
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 2789 |
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
| 2790 |
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 2791 |
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 2792 |
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 2793 |
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 2794 |
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 2795 |
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 2796 |
// POSSIBILITY OF SUCH DAMAGE. |
| 2797 |
|
| 2798 |
// 7.18.1 Integer types |
| 2799 |
|
| 2800 |
// 7.18.1.2 Minimum-width integer types |
| 2801 |
|
| 2802 |
type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ |
| 2803 |
type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ |
| 2804 |
type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ |
| 2805 |
type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ |
| 2806 |
type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ |
| 2807 |
type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ |
| 2808 |
type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ |
| 2809 |
type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ |
| 2810 |
|
| 2811 |
// 7.18.1.3 Fastest minimum-width integer types |
| 2812 |
type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ |
| 2813 |
type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ |
| 2814 |
type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ |
| 2815 |
type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ |
| 2816 |
type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ |
| 2817 |
type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ |
| 2818 |
type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ |
| 2819 |
type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ |
| 2820 |
|
| 2821 |
// 7.18.1.5 Greatest-width integer types |
| 2822 |
|
| 2823 |
type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ |
| 2824 |
type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ |
| 2825 |
|
| 2826 |
// Identification of the network protocol stack |
| 2827 |
// for *BSD-current/release: http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE |
| 2828 |
// has the table of implementation/integration differences. |
| 2829 |
|
| 2830 |
// Local port number conventions: |
| 2831 |
// |
| 2832 |
// Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root), |
| 2833 |
// unless a kernel is compiled with IPNOPRIVPORTS defined. |
| 2834 |
// |
| 2835 |
// When a user does a bind(2) or connect(2) with a port number of zero, |
| 2836 |
// a non-conflicting local port address is chosen. |
| 2837 |
// |
| 2838 |
// The default range is IPPORT_ANONMIN to IPPORT_ANONMAX, although |
| 2839 |
// that is settable by sysctl(3); net.inet.ip.anonportmin and |
| 2840 |
// net.inet.ip.anonportmax respectively. |
| 2841 |
// |
| 2842 |
// A user may set the IPPROTO_IP option IP_PORTRANGE to change this |
| 2843 |
// default assignment range. |
| 2844 |
// |
| 2845 |
// The value IP_PORTRANGE_DEFAULT causes the default behavior. |
| 2846 |
// |
| 2847 |
// The value IP_PORTRANGE_HIGH is the same as IP_PORTRANGE_DEFAULT, |
| 2848 |
// and exists only for FreeBSD compatibility purposes. |
| 2849 |
// |
| 2850 |
// The value IP_PORTRANGE_LOW changes the range to the "low" are |
| 2851 |
// that is (by convention) restricted to privileged processes. |
| 2852 |
// This convention is based on "vouchsafe" principles only. |
| 2853 |
// It is only secure if you trust the remote host to restrict these ports. |
| 2854 |
// The range is IPPORT_RESERVEDMIN to IPPORT_RESERVEDMAX. |
| 2855 |
|
| 2856 |
// IPv6 address |
| 2857 |
type In6_addr = struct { |
| 2858 |
F__u6_addr struct { |
| 2859 |
F__ccgo_pad1 [0]uint32 |
| 2860 |
F__u6_addr8 [16]X__uint8_t |
| 2861 |
} |
| 2862 |
} /* in6.h:123:1 */ |
| 2863 |
|
| 2864 |
// Socket address for IPv6 |
| 2865 |
type Sockaddr_in6 = struct { |
| 2866 |
Fsin6_len Uint8_t |
| 2867 |
Fsin6_family X__sa_family_t |
| 2868 |
Fsin6_port X__in_port_t |
| 2869 |
Fsin6_flowinfo Uint32_t |
| 2870 |
Fsin6_addr struct { |
| 2871 |
F__u6_addr struct { |
| 2872 |
F__ccgo_pad1 [0]uint32 |
| 2873 |
F__u6_addr8 [16]X__uint8_t |
| 2874 |
} |
| 2875 |
} |
| 2876 |
Fsin6_scope_id Uint32_t |
| 2877 |
} /* in6.h:146:1 */ |
| 2878 |
|
| 2879 |
// Unspecified |
| 2880 |
|
| 2881 |
// Loopback |
| 2882 |
|
| 2883 |
// IPv4 compatible |
| 2884 |
|
| 2885 |
// Mapped |
| 2886 |
|
| 2887 |
// KAME Scope Values |
| 2888 |
|
| 2889 |
// Unicast Scope |
| 2890 |
// Note that we must check topmost 10 bits only, not 16 bits (see RFC2373). |
| 2891 |
|
| 2892 |
// Multicast |
| 2893 |
|
| 2894 |
// Multicast Scope |
| 2895 |
|
| 2896 |
// Options for use with [gs]etsockopt at the IPV6 level. |
| 2897 |
// First word of comment is data type; bool is stored in int. |
| 2898 |
// no hdrincl |
| 2899 |
// The join and leave membership option numbers need to match with the v4 ones |
| 2900 |
// RFC2292 options |
| 2901 |
|
| 2902 |
// new socket options introduced in RFC3542 |
| 2903 |
|
| 2904 |
// more new socket options introduced in RFC3542 |
| 2905 |
|
| 2906 |
// to define items, should talk with KAME guys first, for *BSD compatibility |
| 2907 |
|
| 2908 |
// Defaults and limits for options |
| 2909 |
|
| 2910 |
// Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. |
| 2911 |
type Ipv6_mreq = struct { |
| 2912 |
Fipv6mr_multiaddr struct { |
| 2913 |
F__u6_addr struct { |
| 2914 |
F__ccgo_pad1 [0]uint32 |
| 2915 |
F__u6_addr8 [16]X__uint8_t |
| 2916 |
} |
| 2917 |
} |
| 2918 |
Fipv6mr_interface uint32 |
| 2919 |
} /* in6.h:459:1 */ |
| 2920 |
|
| 2921 |
// IPV6_PKTINFO: Packet information(RFC2292 sec 5) |
| 2922 |
type In6_pktinfo = struct { |
| 2923 |
Fipi6_addr struct { |
| 2924 |
F__u6_addr struct { |
| 2925 |
F__ccgo_pad1 [0]uint32 |
| 2926 |
F__u6_addr8 [16]X__uint8_t |
| 2927 |
} |
| 2928 |
} |
| 2929 |
Fipi6_ifindex uint32 |
| 2930 |
} /* in6.h:467:1 */ |
| 2931 |
|
| 2932 |
// Control structure for IPV6_RECVPATHMTU socket option. |
| 2933 |
type Ip6_mtuinfo = struct { |
| 2934 |
Fip6m_addr struct { |
| 2935 |
Fsin6_len Uint8_t |
| 2936 |
Fsin6_family X__sa_family_t |
| 2937 |
Fsin6_port X__in_port_t |
| 2938 |
Fsin6_flowinfo Uint32_t |
| 2939 |
Fsin6_addr struct { |
| 2940 |
F__u6_addr struct { |
| 2941 |
F__ccgo_pad1 [0]uint32 |
| 2942 |
F__u6_addr8 [16]X__uint8_t |
| 2943 |
} |
| 2944 |
} |
| 2945 |
Fsin6_scope_id Uint32_t |
| 2946 |
} |
| 2947 |
Fip6m_mtu Uint32_t |
| 2948 |
} /* in6.h:475:1 */ |
| 2949 |
|
| 2950 |
var _ int8 /* gen.c:2:13: */ |