Codebase list golang-github-vbatts-go-mtree / 9be0559
vendor: update sources ```shell dep ensure -update ``` Signed-off-by: Vincent Batts <vbatts@hashbangbash.com> Vincent Batts 5 years ago
319 changed file(s) with 98646 addition(s) and 19701 deletion(s). Raw diff Collapse all Expand all
1717 version = "v1.7.0"
1818
1919 [[projects]]
20 digest = "1:0a69a1c0db3591fcefb47f115b224592c8dfa4368b7ba9fae509d5e16cdc95c8"
21 name = "github.com/konsorten/go-windows-terminal-sequences"
22 packages = ["."]
23 pruneopts = "UT"
24 revision = "5c8c8bd35d3832f5d134ae1e1e375b69a4d25242"
25 version = "v1.0.1"
26
27 [[projects]]
2028 digest = "1:c658e84ad3916da105a761660dcaeb01e63416c8ec7bc62256a9b411a05fcd67"
2129 name = "github.com/mattn/go-colorable"
2230 packages = ["."]
3341 version = "v0.0.4"
3442
3543 [[projects]]
36 digest = "1:d867dfa6751c8d7a435821ad3b736310c2ed68945d05b50fb9d23aee0540c8cc"
44 digest = "1:87c2e02fb01c27060ccc5ba7c5a407cc91147726f8f40b70cceeedbc52b1f3a8"
3745 name = "github.com/sirupsen/logrus"
3846 packages = ["."]
3947 pruneopts = "UT"
40 revision = "3e01752db0189b9157070a0e1668a620f9a85da2"
41 version = "v1.0.6"
48 revision = "e1e72e9de974bd926e5c56f83753fba2df402ce5"
49 version = "v1.3.0"
4250
4351 [[projects]]
44 digest = "1:05e35c393defed734dba80c107a35b4d15f7a1e74379b68e666634049ea6af31"
52 branch = "master"
53 digest = "1:ee2bb461b8a43f9eace0910d7c9f567676760a038dc996295da0efff6f62f353"
4554 name = "golang.org/x/crypto"
4655 packages = [
4756 "ripemd160",
4857 "ssh/terminal",
4958 ]
5059 pruneopts = "UT"
51 revision = "1351f936d976c60a0a48d728281922cf63eafb8d"
60 revision = "ff983b9c42bc9fbf91556e191cc8efb585c16908"
5261
5362 [[projects]]
54 digest = "1:697d25e89b08707d4013085d26838044d58f61507cc08a6e08f9c59a789aee18"
63 branch = "master"
64 digest = "1:72f402ba458cb14ed7964c8b9a38d992f27834b3cf3479f3b08ea9e5334811b3"
5565 name = "golang.org/x/sys"
56 packages = ["unix"]
66 packages = [
67 "unix",
68 "windows",
69 ]
5770 pruneopts = "UT"
58 revision = "8dbc5d05d6edcc104950cc299a1ce6641235bc86"
71 revision = "770c60269bf0ef965e9e7ac8bedcb6bca2a1cefd"
5972
6073 [solve-meta]
6174 analyzer-name = "dep"
0 (The MIT License)
1
2 Copyright (c) 2017 marvin + konsorten GmbH (open-source@konsorten.de)
3
4 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
6 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7
8 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0 # Windows Terminal Sequences
1
2 This library allow for enabling Windows terminal color support for Go.
3
4 See [Console Virtual Terminal Sequences](https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences) for details.
5
6 ## Usage
7
8 ```go
9 import (
10 "syscall"
11
12 sequences "github.com/konsorten/go-windows-terminal-sequences"
13 )
14
15 func main() {
16 sequences.EnableVirtualTerminalProcessing(syscall.Stdout, true)
17 }
18
19 ```
20
21 ## Authors
22
23 The tool is sponsored by the [marvin + konsorten GmbH](http://www.konsorten.de).
24
25 We thank all the authors who provided code to this library:
26
27 * Felix Kollmann
28
29 ## License
30
31 (The MIT License)
32
33 Copyright (c) 2018 marvin + konsorten GmbH (open-source@konsorten.de)
34
35 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
36
37 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
38
39 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0 module github.com/konsorten/go-windows-terminal-sequences
0 // +build windows
1
2 package sequences
3
4 import (
5 "syscall"
6 "unsafe"
7 )
8
9 var (
10 kernel32Dll *syscall.LazyDLL = syscall.NewLazyDLL("Kernel32.dll")
11 setConsoleMode *syscall.LazyProc = kernel32Dll.NewProc("SetConsoleMode")
12 )
13
14 func EnableVirtualTerminalProcessing(stream syscall.Handle, enable bool) error {
15 const ENABLE_VIRTUAL_TERMINAL_PROCESSING uint32 = 0x4
16
17 var mode uint32
18 err := syscall.GetConsoleMode(syscall.Stdout, &mode)
19 if err != nil {
20 return err
21 }
22
23 if enable {
24 mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING
25 } else {
26 mode &^= ENABLE_VIRTUAL_TERMINAL_PROCESSING
27 }
28
29 ret, _, err := setConsoleMode.Call(uintptr(unsafe.Pointer(stream)), uintptr(mode))
30 if ret == 0 {
31 return err
32 }
33
34 return nil
35 }
00 language: go
1 go:
2 - 1.9.x
3 - 1.10.x
1 go_import_path: github.com/sirupsen/logrus
42 env:
53 - GOMAXPROCS=4 GORACE=halt_on_error=1
6 install:
7 - go get github.com/stretchr/testify/assert
8 - go get gopkg.in/gemnasium/logrus-airbrake-hook.v2
9 - go get golang.org/x/sys/unix
10 - go get golang.org/x/sys/windows
11 script:
12 - go test -race -v ./...
4 matrix:
5 include:
6 - go: 1.10.x
7 install:
8 - go get github.com/stretchr/testify/assert
9 - go get golang.org/x/crypto/ssh/terminal
10 - go get golang.org/x/sys/unix
11 - go get golang.org/x/sys/windows
12 script:
13 - go test -race -v ./...
14 - go: 1.11.x
15 env: GO111MODULE=on
16 install:
17 - go mod download
18 script:
19 - go test -race -v ./...
20 - go: 1.11.x
21 env: GO111MODULE=off
22 install:
23 - go get github.com/stretchr/testify/assert
24 - go get golang.org/x/crypto/ssh/terminal
25 - go get golang.org/x/sys/unix
26 - go get golang.org/x/sys/windows
27 script:
28 - go test -race -v ./...
29 - go: 1.10.x
30 install:
31 - go get github.com/stretchr/testify/assert
32 - go get golang.org/x/crypto/ssh/terminal
33 - go get golang.org/x/sys/unix
34 - go get golang.org/x/sys/windows
35 script:
36 - go test -race -v -tags appengine ./...
37 - go: 1.11.x
38 env: GO111MODULE=on
39 install:
40 - go mod download
41 script:
42 - go test -race -v -tags appengine ./...
43 - go: 1.11.x
44 env: GO111MODULE=off
45 install:
46 - go get github.com/stretchr/testify/assert
47 - go get golang.org/x/crypto/ssh/terminal
48 - go get golang.org/x/sys/unix
49 - go get golang.org/x/sys/windows
50 script:
51 - go test -race -v -tags appengine ./...
0 # 1.2.0
1 This new release introduces:
2 * A new method `SetReportCaller` in the `Logger` to enable the file, line and calling function from which the trace has been issued
3 * A new trace level named `Trace` whose level is below `Debug`
4 * A configurable exit function to be called upon a Fatal trace
5 * The `Level` object now implements `encoding.TextUnmarshaler` interface
6
7 # 1.1.1
8 This is a bug fix release.
9 * fix the build break on Solaris
10 * don't drop a whole trace in JSONFormatter when a field param is a function pointer which can not be serialized
11
12 # 1.1.0
13 This new release introduces:
14 * several fixes:
15 * a fix for a race condition on entry formatting
16 * proper cleanup of previously used entries before putting them back in the pool
17 * the extra new line at the end of message in text formatter has been removed
18 * a new global public API to check if a level is activated: IsLevelEnabled
19 * the following methods have been added to the Logger object
20 * IsLevelEnabled
21 * SetFormatter
22 * SetOutput
23 * ReplaceHooks
24 * introduction of go module
25 * an indent configuration for the json formatter
26 * output colour support for windows
27 * the field sort function is now configurable for text formatter
28 * the CLICOLOR and CLICOLOR\_FORCE environment variable support in text formater
29
30 # 1.0.6
31
32 This new release introduces:
33 * a new api WithTime which allows to easily force the time of the log entry
34 which is mostly useful for logger wrapper
35 * a fix reverting the immutability of the entry given as parameter to the hooks
36 a new configuration field of the json formatter in order to put all the fields
37 in a nested dictionnary
38 * a new SetOutput method in the Logger
39 * a new configuration of the textformatter to configure the name of the default keys
40 * a new configuration of the text formatter to disable the level truncation
41
042 # 1.0.5
143
244 * Fix hooks race (#707)
5555 time="2015-03-26T01:27:38-04:00" level=debug msg="Temperature changes" temperature=-4
5656 time="2015-03-26T01:27:38-04:00" level=panic msg="It's over 9000!" animal=orca size=9009
5757 time="2015-03-26T01:27:38-04:00" level=fatal msg="The ice breaks!" err=&{0x2082280c0 map[animal:orca size:9009] 2015-03-26 01:27:38.441574009 -0400 EDT panic It's over 9000!} number=100 omg=true
58 exit status 1
59 ```
58 ```
59 To ensure this behaviour even if a TTY is attached, set your formatter as follows:
60
61 ```go
62 log.SetFormatter(&log.TextFormatter{
63 DisableColors: true,
64 FullTimestamp: true,
65 })
66 ```
67
68 #### Logging Method Name
69
70 If you wish to add the calling method as a field, instruct the logger via:
71 ```go
72 log.SetReportCaller(true)
73 ```
74 This adds the caller as 'method' like so:
75
76 ```json
77 {"animal":"penguin","level":"fatal","method":"github.com/sirupsen/arcticcreatures.migrate","msg":"a penguin swims by",
78 "time":"2014-03-10 19:57:38.562543129 -0400 EDT"}
79 ```
80
81 ```text
82 time="2015-03-26T01:27:38-04:00" level=fatal method=github.com/sirupsen/arcticcreatures.migrate msg="a penguin swims by" animal=penguin
83 ```
84 Note that this does add measurable overhead - the cost will depend on the version of Go, but is
85 between 20 and 40% in recent tests with 1.6 and 1.7. You can validate this in your
86 environment via benchmarks:
87 ```
88 go test -bench=.*CallerTracing
89 ```
90
6091
6192 #### Case-sensitivity
6293
245276
246277 #### Level logging
247278
248 Logrus has six logging levels: Debug, Info, Warning, Error, Fatal and Panic.
249
250 ```go
279 Logrus has seven logging levels: Trace, Debug, Info, Warning, Error, Fatal and Panic.
280
281 ```go
282 log.Trace("Something very low level.")
251283 log.Debug("Useful debugging information.")
252284 log.Info("Something noteworthy happened!")
253285 log.Warn("You should probably take a look at this.")
328360 Third party logging formatters:
329361
330362 * [`FluentdFormatter`](https://github.com/joonix/log). Formats entries that can be parsed by Kubernetes and Google Container Engine.
363 * [`GELF`](https://github.com/fabienm/go-logrus-formatters). Formats entries so they comply to Graylog's [GELF 1.1 specification](http://docs.graylog.org/en/2.4/pages/gelf.html).
331364 * [`logstash`](https://github.com/bshuster-repo/logrus-logstash-hook). Logs fields as [Logstash](http://logstash.net) Events.
332365 * [`prefixed`](https://github.com/x-cray/logrus-prefixed-formatter). Displays log entry source along with alternative layout.
333366 * [`zalgo`](https://github.com/aybabtme/logzalgo). Invoking the P͉̫o̳̼̊w̖͈̰͎e̬͔̭͂r͚̼̹̲ ̫͓͉̳͈ō̠͕͖̚f̝͍̠ ͕̲̞͖͑Z̖̫̤̫ͪa͉̬͈̗l͖͎g̳̥o̰̥̅!̣͔̲̻͊̄ ̙̘̦̹̦.
33 "bytes"
44 "fmt"
55 "os"
6 "reflect"
7 "runtime"
8 "strings"
69 "sync"
710 "time"
811 )
912
10 var bufferPool *sync.Pool
13 var (
14 bufferPool *sync.Pool
15
16 // qualified package name, cached at first use
17 logrusPackage string
18
19 // Positions in the call stack when tracing to report the calling method
20 minimumCallerDepth int
21
22 // Used for caller information initialisation
23 callerInitOnce sync.Once
24 )
25
26 const (
27 maximumCallerDepth int = 25
28 knownLogrusFrames int = 4
29 )
1130
1231 func init() {
1332 bufferPool = &sync.Pool{
1534 return new(bytes.Buffer)
1635 },
1736 }
37
38 // start at the bottom of the stack before the package-name cache is primed
39 minimumCallerDepth = 1
1840 }
1941
2042 // Defines the key when adding errors using WithError.
2143 var ErrorKey = "error"
2244
2345 // An entry is the final or intermediate Logrus logging entry. It contains all
24 // the fields passed with WithField{,s}. It's finally logged when Debug, Info,
25 // Warn, Error, Fatal or Panic is called on it. These objects can be reused and
26 // passed around as much as you wish to avoid field duplication.
46 // the fields passed with WithField{,s}. It's finally logged when Trace, Debug,
47 // Info, Warn, Error, Fatal or Panic is called on it. These objects can be
48 // reused and passed around as much as you wish to avoid field duplication.
2749 type Entry struct {
2850 Logger *Logger
2951
3355 // Time at which the log entry was created
3456 Time time.Time
3557
36 // Level the log entry was logged at: Debug, Info, Warn, Error, Fatal or Panic
58 // Level the log entry was logged at: Trace, Debug, Info, Warn, Error, Fatal or Panic
3759 // This field will be set on entry firing and the value will be equal to the one in Logger struct field.
3860 Level Level
3961
40 // Message passed to Debug, Info, Warn, Error, Fatal or Panic
62 // Calling method, with package name
63 Caller *runtime.Frame
64
65 // Message passed to Trace, Debug, Info, Warn, Error, Fatal or Panic
4166 Message string
4267
43 // When formatter is called in entry.log(), an Buffer may be set to entry
68 // When formatter is called in entry.log(), a Buffer may be set to entry
4469 Buffer *bytes.Buffer
70
71 // err may contain a field formatting error
72 err string
4573 }
4674
4775 func NewEntry(logger *Logger) *Entry {
4876 return &Entry{
4977 Logger: logger,
50 // Default is five fields, give a little extra room
51 Data: make(Fields, 5),
78 // Default is three fields, plus one optional. Give a little extra room.
79 Data: make(Fields, 6),
5280 }
5381 }
5482
79107 for k, v := range entry.Data {
80108 data[k] = v
81109 }
110 fieldErr := entry.err
82111 for k, v := range fields {
83 data[k] = v
84 }
85 return &Entry{Logger: entry.Logger, Data: data, Time: entry.Time}
112 isErrField := false
113 if t := reflect.TypeOf(v); t != nil {
114 switch t.Kind() {
115 case reflect.Func:
116 isErrField = true
117 case reflect.Ptr:
118 isErrField = t.Elem().Kind() == reflect.Func
119 }
120 }
121 if isErrField {
122 tmp := fmt.Sprintf("can not add field %q", k)
123 if fieldErr != "" {
124 fieldErr = entry.err + ", " + tmp
125 } else {
126 fieldErr = tmp
127 }
128 } else {
129 data[k] = v
130 }
131 }
132 return &Entry{Logger: entry.Logger, Data: data, Time: entry.Time, err: fieldErr}
86133 }
87134
88135 // Overrides the time of the Entry.
89136 func (entry *Entry) WithTime(t time.Time) *Entry {
90 return &Entry{Logger: entry.Logger, Data: entry.Data, Time: t}
137 return &Entry{Logger: entry.Logger, Data: entry.Data, Time: t, err: entry.err}
138 }
139
140 // getPackageName reduces a fully qualified function name to the package name
141 // There really ought to be to be a better way...
142 func getPackageName(f string) string {
143 for {
144 lastPeriod := strings.LastIndex(f, ".")
145 lastSlash := strings.LastIndex(f, "/")
146 if lastPeriod > lastSlash {
147 f = f[:lastPeriod]
148 } else {
149 break
150 }
151 }
152
153 return f
154 }
155
156 // getCaller retrieves the name of the first non-logrus calling function
157 func getCaller() *runtime.Frame {
158 // Restrict the lookback frames to avoid runaway lookups
159 pcs := make([]uintptr, maximumCallerDepth)
160 depth := runtime.Callers(minimumCallerDepth, pcs)
161 frames := runtime.CallersFrames(pcs[:depth])
162
163 // cache this package's fully-qualified name
164 callerInitOnce.Do(func() {
165 logrusPackage = getPackageName(runtime.FuncForPC(pcs[0]).Name())
166
167 // now that we have the cache, we can skip a minimum count of known-logrus functions
168 // XXX this is dubious, the number of frames may vary store an entry in a logger interface
169 minimumCallerDepth = knownLogrusFrames
170 })
171
172 for f, again := frames.Next(); again; f, again = frames.Next() {
173 pkg := getPackageName(f.Function)
174
175 // If the caller isn't part of this package, we're done
176 if pkg != logrusPackage {
177 return &f
178 }
179 }
180
181 // if we got here, we failed to find the caller's context
182 return nil
183 }
184
185 func (entry Entry) HasCaller() (has bool) {
186 return entry.Logger != nil &&
187 entry.Logger.ReportCaller &&
188 entry.Caller != nil
91189 }
92190
93191 // This function is not declared with a pointer value because otherwise
106204
107205 entry.Level = level
108206 entry.Message = msg
207 if entry.Logger.ReportCaller {
208 entry.Caller = getCaller()
209 }
109210
110211 entry.fireHooks()
111212
136237 }
137238
138239 func (entry *Entry) write() {
139 serialized, err := entry.Logger.Formatter.Format(entry)
140240 entry.Logger.mu.Lock()
141241 defer entry.Logger.mu.Unlock()
242 serialized, err := entry.Logger.Formatter.Format(entry)
142243 if err != nil {
143244 fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err)
144245 } else {
149250 }
150251 }
151252
253 func (entry *Entry) Log(level Level, args ...interface{}) {
254 if entry.Logger.IsLevelEnabled(level) {
255 entry.log(level, fmt.Sprint(args...))
256 }
257 }
258
259 func (entry *Entry) Trace(args ...interface{}) {
260 entry.Log(TraceLevel, args...)
261 }
262
152263 func (entry *Entry) Debug(args ...interface{}) {
153 if entry.Logger.level() >= DebugLevel {
154 entry.log(DebugLevel, fmt.Sprint(args...))
155 }
264 entry.Log(DebugLevel, args...)
156265 }
157266
158267 func (entry *Entry) Print(args ...interface{}) {
160269 }
161270
162271 func (entry *Entry) Info(args ...interface{}) {
163 if entry.Logger.level() >= InfoLevel {
164 entry.log(InfoLevel, fmt.Sprint(args...))
165 }
272 entry.Log(InfoLevel, args...)
166273 }
167274
168275 func (entry *Entry) Warn(args ...interface{}) {
169 if entry.Logger.level() >= WarnLevel {
170 entry.log(WarnLevel, fmt.Sprint(args...))
171 }
276 entry.Log(WarnLevel, args...)
172277 }
173278
174279 func (entry *Entry) Warning(args ...interface{}) {
176281 }
177282
178283 func (entry *Entry) Error(args ...interface{}) {
179 if entry.Logger.level() >= ErrorLevel {
180 entry.log(ErrorLevel, fmt.Sprint(args...))
181 }
284 entry.Log(ErrorLevel, args...)
182285 }
183286
184287 func (entry *Entry) Fatal(args ...interface{}) {
185 if entry.Logger.level() >= FatalLevel {
186 entry.log(FatalLevel, fmt.Sprint(args...))
187 }
188 Exit(1)
288 entry.Log(FatalLevel, args...)
289 entry.Logger.Exit(1)
189290 }
190291
191292 func (entry *Entry) Panic(args ...interface{}) {
192 if entry.Logger.level() >= PanicLevel {
193 entry.log(PanicLevel, fmt.Sprint(args...))
194 }
293 entry.Log(PanicLevel, args...)
195294 panic(fmt.Sprint(args...))
196295 }
197296
198297 // Entry Printf family functions
199298
299 func (entry *Entry) Logf(level Level, format string, args ...interface{}) {
300 entry.Log(level, fmt.Sprintf(format, args...))
301 }
302
303 func (entry *Entry) Tracef(format string, args ...interface{}) {
304 entry.Logf(TraceLevel, format, args...)
305 }
306
200307 func (entry *Entry) Debugf(format string, args ...interface{}) {
201 if entry.Logger.level() >= DebugLevel {
202 entry.Debug(fmt.Sprintf(format, args...))
203 }
308 entry.Logf(DebugLevel, format, args...)
204309 }
205310
206311 func (entry *Entry) Infof(format string, args ...interface{}) {
207 if entry.Logger.level() >= InfoLevel {
208 entry.Info(fmt.Sprintf(format, args...))
209 }
312 entry.Logf(InfoLevel, format, args...)
210313 }
211314
212315 func (entry *Entry) Printf(format string, args ...interface{}) {
214317 }
215318
216319 func (entry *Entry) Warnf(format string, args ...interface{}) {
217 if entry.Logger.level() >= WarnLevel {
218 entry.Warn(fmt.Sprintf(format, args...))
219 }
320 entry.Logf(WarnLevel, format, args...)
220321 }
221322
222323 func (entry *Entry) Warningf(format string, args ...interface{}) {
224325 }
225326
226327 func (entry *Entry) Errorf(format string, args ...interface{}) {
227 if entry.Logger.level() >= ErrorLevel {
228 entry.Error(fmt.Sprintf(format, args...))
229 }
328 entry.Logf(ErrorLevel, format, args...)
230329 }
231330
232331 func (entry *Entry) Fatalf(format string, args ...interface{}) {
233 if entry.Logger.level() >= FatalLevel {
234 entry.Fatal(fmt.Sprintf(format, args...))
235 }
236 Exit(1)
332 entry.Logf(FatalLevel, format, args...)
333 entry.Logger.Exit(1)
237334 }
238335
239336 func (entry *Entry) Panicf(format string, args ...interface{}) {
240 if entry.Logger.level() >= PanicLevel {
241 entry.Panic(fmt.Sprintf(format, args...))
242 }
337 entry.Logf(PanicLevel, format, args...)
243338 }
244339
245340 // Entry Println family functions
246341
342 func (entry *Entry) Logln(level Level, args ...interface{}) {
343 if entry.Logger.IsLevelEnabled(level) {
344 entry.Log(level, entry.sprintlnn(args...))
345 }
346 }
347
348 func (entry *Entry) Traceln(args ...interface{}) {
349 entry.Logln(TraceLevel, args...)
350 }
351
247352 func (entry *Entry) Debugln(args ...interface{}) {
248 if entry.Logger.level() >= DebugLevel {
249 entry.Debug(entry.sprintlnn(args...))
250 }
353 entry.Logln(DebugLevel, args...)
251354 }
252355
253356 func (entry *Entry) Infoln(args ...interface{}) {
254 if entry.Logger.level() >= InfoLevel {
255 entry.Info(entry.sprintlnn(args...))
256 }
357 entry.Logln(InfoLevel, args...)
257358 }
258359
259360 func (entry *Entry) Println(args ...interface{}) {
261362 }
262363
263364 func (entry *Entry) Warnln(args ...interface{}) {
264 if entry.Logger.level() >= WarnLevel {
265 entry.Warn(entry.sprintlnn(args...))
266 }
365 entry.Logln(WarnLevel, args...)
267366 }
268367
269368 func (entry *Entry) Warningln(args ...interface{}) {
271370 }
272371
273372 func (entry *Entry) Errorln(args ...interface{}) {
274 if entry.Logger.level() >= ErrorLevel {
275 entry.Error(entry.sprintlnn(args...))
276 }
373 entry.Logln(ErrorLevel, args...)
277374 }
278375
279376 func (entry *Entry) Fatalln(args ...interface{}) {
280 if entry.Logger.level() >= FatalLevel {
281 entry.Fatal(entry.sprintlnn(args...))
282 }
283 Exit(1)
377 entry.Logln(FatalLevel, args...)
378 entry.Logger.Exit(1)
284379 }
285380
286381 func (entry *Entry) Panicln(args ...interface{}) {
287 if entry.Logger.level() >= PanicLevel {
288 entry.Panic(entry.sprintlnn(args...))
289 }
382 entry.Logln(PanicLevel, args...)
290383 }
291384
292385 // Sprintlnn => Sprint no newline. This is to get the behavior of how
2020
2121 // SetFormatter sets the standard logger formatter.
2222 func SetFormatter(formatter Formatter) {
23 std.mu.Lock()
24 defer std.mu.Unlock()
25 std.Formatter = formatter
23 std.SetFormatter(formatter)
24 }
25
26 // SetReportCaller sets whether the standard logger will include the calling
27 // method as a field.
28 func SetReportCaller(include bool) {
29 std.SetReportCaller(include)
2630 }
2731
2832 // SetLevel sets the standard logger level.
2933 func SetLevel(level Level) {
30 std.mu.Lock()
31 defer std.mu.Unlock()
3234 std.SetLevel(level)
3335 }
3436
3537 // GetLevel returns the standard logger level.
3638 func GetLevel() Level {
37 std.mu.Lock()
38 defer std.mu.Unlock()
39 return std.level()
39 return std.GetLevel()
40 }
41
42 // IsLevelEnabled checks if the log level of the standard logger is greater than the level param
43 func IsLevelEnabled(level Level) bool {
44 return std.IsLevelEnabled(level)
4045 }
4146
4247 // AddHook adds a hook to the standard logger hooks.
4348 func AddHook(hook Hook) {
44 std.mu.Lock()
45 defer std.mu.Unlock()
46 std.Hooks.Add(hook)
49 std.AddHook(hook)
4750 }
4851
4952 // WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.
7982 return std.WithTime(t)
8083 }
8184
85 // Trace logs a message at level Trace on the standard logger.
86 func Trace(args ...interface{}) {
87 std.Trace(args...)
88 }
89
8290 // Debug logs a message at level Debug on the standard logger.
8391 func Debug(args ...interface{}) {
8492 std.Debug(args...)
119127 std.Fatal(args...)
120128 }
121129
130 // Tracef logs a message at level Trace on the standard logger.
131 func Tracef(format string, args ...interface{}) {
132 std.Tracef(format, args...)
133 }
134
122135 // Debugf logs a message at level Debug on the standard logger.
123136 func Debugf(format string, args ...interface{}) {
124137 std.Debugf(format, args...)
159172 std.Fatalf(format, args...)
160173 }
161174
175 // Traceln logs a message at level Trace on the standard logger.
176 func Traceln(args ...interface{}) {
177 std.Traceln(args...)
178 }
179
162180 // Debugln logs a message at level Debug on the standard logger.
163181 func Debugln(args ...interface{}) {
164182 std.Debugln(args...)
11
22 import "time"
33
4 const defaultTimestampFormat = time.RFC3339
4 // Default key names for the default fields
5 const (
6 defaultTimestampFormat = time.RFC3339
7 FieldKeyMsg = "msg"
8 FieldKeyLevel = "level"
9 FieldKeyTime = "time"
10 FieldKeyLogrusError = "logrus_error"
11 FieldKeyFunc = "func"
12 FieldKeyFile = "file"
13 )
514
615 // The Formatter interface is used to implement a custom Formatter. It takes an
716 // `Entry`. It exposes all the fields, including the default ones:
1726 Format(*Entry) ([]byte, error)
1827 }
1928
20 // This is to not silently overwrite `time`, `msg` and `level` fields when
29 // This is to not silently overwrite `time`, `msg`, `func` and `level` fields when
2130 // dumping it. If this code wasn't there doing:
2231 //
2332 // logrus.WithField("level", 1).Info("hello")
2938 //
3039 // It's not exported because it's still using Data in an opinionated way. It's to
3140 // avoid code duplication between the two default formatters.
32 func prefixFieldClashes(data Fields, fieldMap FieldMap) {
41 func prefixFieldClashes(data Fields, fieldMap FieldMap, reportCaller bool) {
3342 timeKey := fieldMap.resolve(FieldKeyTime)
3443 if t, ok := data[timeKey]; ok {
3544 data["fields."+timeKey] = t
4756 data["fields."+levelKey] = l
4857 delete(data, levelKey)
4958 }
59
60 logrusErrKey := fieldMap.resolve(FieldKeyLogrusError)
61 if l, ok := data[logrusErrKey]; ok {
62 data["fields."+logrusErrKey] = l
63 delete(data, logrusErrKey)
64 }
65
66 // If reportCaller is not set, 'func' will not conflict.
67 if reportCaller {
68 funcKey := fieldMap.resolve(FieldKeyFunc)
69 if l, ok := data[funcKey]; ok {
70 data["fields."+funcKey] = l
71 }
72 fileKey := fieldMap.resolve(FieldKeyFile)
73 if l, ok := data[fileKey]; ok {
74 data["fields."+fileKey] = l
75 }
76 }
5077 }
0 module github.com/sirupsen/logrus
1
2 require (
3 github.com/davecgh/go-spew v1.1.1 // indirect
4 github.com/konsorten/go-windows-terminal-sequences v1.0.1
5 github.com/pmezard/go-difflib v1.0.0 // indirect
6 github.com/stretchr/objx v0.1.1 // indirect
7 github.com/stretchr/testify v1.2.2
8 golang.org/x/crypto v0.0.0-20180904163835-0709b304e793
9 golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33
10 )
0 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
1 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2 github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe h1:CHRGQ8V7OlCYtwaKPJi3iA7J+YdNKdo8j7nG5IgDhjs=
3 github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
4 github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
5 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
6 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7 github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
8 github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
9 github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
10 github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
11 golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I=
12 golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
13 golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8=
14 golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
00 package logrus
11
22 import (
3 "bytes"
34 "encoding/json"
45 "fmt"
56 )
89
910 // FieldMap allows customization of the key names for default fields.
1011 type FieldMap map[fieldKey]string
11
12 // Default key names for the default fields
13 const (
14 FieldKeyMsg = "msg"
15 FieldKeyLevel = "level"
16 FieldKeyTime = "time"
17 )
1812
1913 func (f FieldMap) resolve(key fieldKey) string {
2014 if k, ok := f[key]; ok {
3933 // As an example:
4034 // formatter := &JSONFormatter{
4135 // FieldMap: FieldMap{
42 // FieldKeyTime: "@timestamp",
36 // FieldKeyTime: "@timestamp",
4337 // FieldKeyLevel: "@level",
44 // FieldKeyMsg: "@message",
38 // FieldKeyMsg: "@message",
39 // FieldKeyFunc: "@caller",
4540 // },
4641 // }
4742 FieldMap FieldMap
43
44 // PrettyPrint will indent all json logs
45 PrettyPrint bool
4846 }
4947
5048 // Format renders a single log entry
5149 func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
52 data := make(Fields, len(entry.Data)+3)
50 data := make(Fields, len(entry.Data)+4)
5351 for k, v := range entry.Data {
5452 switch v := v.(type) {
5553 case error:
6765 data = newData
6866 }
6967
70 prefixFieldClashes(data, f.FieldMap)
68 prefixFieldClashes(data, f.FieldMap, entry.HasCaller())
7169
7270 timestampFormat := f.TimestampFormat
7371 if timestampFormat == "" {
7472 timestampFormat = defaultTimestampFormat
7573 }
7674
75 if entry.err != "" {
76 data[f.FieldMap.resolve(FieldKeyLogrusError)] = entry.err
77 }
7778 if !f.DisableTimestamp {
7879 data[f.FieldMap.resolve(FieldKeyTime)] = entry.Time.Format(timestampFormat)
7980 }
8081 data[f.FieldMap.resolve(FieldKeyMsg)] = entry.Message
8182 data[f.FieldMap.resolve(FieldKeyLevel)] = entry.Level.String()
83 if entry.HasCaller() {
84 data[f.FieldMap.resolve(FieldKeyFunc)] = entry.Caller.Function
85 data[f.FieldMap.resolve(FieldKeyFile)] = fmt.Sprintf("%s:%d", entry.Caller.File, entry.Caller.Line)
86 }
8287
83 serialized, err := json.Marshal(data)
84 if err != nil {
88 var b *bytes.Buffer
89 if entry.Buffer != nil {
90 b = entry.Buffer
91 } else {
92 b = &bytes.Buffer{}
93 }
94
95 encoder := json.NewEncoder(b)
96 if f.PrettyPrint {
97 encoder.SetIndent("", " ")
98 }
99 if err := encoder.Encode(data); err != nil {
85100 return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
86101 }
87 return append(serialized, '\n'), nil
102
103 return b.Bytes(), nil
88104 }
1010 type Logger struct {
1111 // The logs are `io.Copy`'d to this in a mutex. It's common to set this to a
1212 // file, or leave it default which is `os.Stderr`. You can also set this to
13 // something more adventorous, such as logging to Kafka.
13 // something more adventurous, such as logging to Kafka.
1414 Out io.Writer
1515 // Hooks for the logger instance. These allow firing events based on logging
1616 // levels and log entries. For example, to send errors to an error tracking
2323 // own that implements the `Formatter` interface, see the `README` or included
2424 // formatters for examples.
2525 Formatter Formatter
26
27 // Flag for whether to log caller info (off by default)
28 ReportCaller bool
29
2630 // The logging level the logger should log at. This is typically (and defaults
2731 // to) `logrus.Info`, which allows Info(), Warn(), Error() and Fatal() to be
2832 // logged.
3135 mu MutexWrap
3236 // Reusable empty entry
3337 entryPool sync.Pool
34 }
38 // Function to exit the application, defaults to `os.Exit()`
39 ExitFunc exitFunc
40 }
41
42 type exitFunc func(int)
3543
3644 type MutexWrap struct {
3745 lock sync.Mutex
6876 // It's recommended to make this a global instance called `log`.
6977 func New() *Logger {
7078 return &Logger{
71 Out: os.Stderr,
72 Formatter: new(TextFormatter),
73 Hooks: make(LevelHooks),
74 Level: InfoLevel,
79 Out: os.Stderr,
80 Formatter: new(TextFormatter),
81 Hooks: make(LevelHooks),
82 Level: InfoLevel,
83 ExitFunc: os.Exit,
84 ReportCaller: false,
7585 }
7686 }
7787
8494 }
8595
8696 func (logger *Logger) releaseEntry(entry *Entry) {
97 entry.Data = map[string]interface{}{}
8798 logger.entryPool.Put(entry)
8899 }
89100
119130 return entry.WithTime(t)
120131 }
121132
133 func (logger *Logger) Logf(level Level, format string, args ...interface{}) {
134 if logger.IsLevelEnabled(level) {
135 entry := logger.newEntry()
136 entry.Logf(level, format, args...)
137 logger.releaseEntry(entry)
138 }
139 }
140
141 func (logger *Logger) Tracef(format string, args ...interface{}) {
142 logger.Logf(TraceLevel, format, args...)
143 }
144
122145 func (logger *Logger) Debugf(format string, args ...interface{}) {
123 if logger.level() >= DebugLevel {
124 entry := logger.newEntry()
125 entry.Debugf(format, args...)
126 logger.releaseEntry(entry)
127 }
146 logger.Logf(DebugLevel, format, args...)
128147 }
129148
130149 func (logger *Logger) Infof(format string, args ...interface{}) {
131 if logger.level() >= InfoLevel {
132 entry := logger.newEntry()
133 entry.Infof(format, args...)
134 logger.releaseEntry(entry)
135 }
150 logger.Logf(InfoLevel, format, args...)
136151 }
137152
138153 func (logger *Logger) Printf(format string, args ...interface{}) {
142157 }
143158
144159 func (logger *Logger) Warnf(format string, args ...interface{}) {
145 if logger.level() >= WarnLevel {
160 logger.Logf(WarnLevel, format, args...)
161 }
162
163 func (logger *Logger) Warningf(format string, args ...interface{}) {
164 logger.Warnf(format, args...)
165 }
166
167 func (logger *Logger) Errorf(format string, args ...interface{}) {
168 logger.Logf(ErrorLevel, format, args...)
169 }
170
171 func (logger *Logger) Fatalf(format string, args ...interface{}) {
172 logger.Logf(FatalLevel, format, args...)
173 logger.Exit(1)
174 }
175
176 func (logger *Logger) Panicf(format string, args ...interface{}) {
177 logger.Logf(PanicLevel, format, args...)
178 }
179
180 func (logger *Logger) Log(level Level, args ...interface{}) {
181 if logger.IsLevelEnabled(level) {
146182 entry := logger.newEntry()
147 entry.Warnf(format, args...)
183 entry.Log(level, args...)
148184 logger.releaseEntry(entry)
149185 }
150186 }
151187
152 func (logger *Logger) Warningf(format string, args ...interface{}) {
153 if logger.level() >= WarnLevel {
154 entry := logger.newEntry()
155 entry.Warnf(format, args...)
156 logger.releaseEntry(entry)
157 }
158 }
159
160 func (logger *Logger) Errorf(format string, args ...interface{}) {
161 if logger.level() >= ErrorLevel {
162 entry := logger.newEntry()
163 entry.Errorf(format, args...)
164 logger.releaseEntry(entry)
165 }
166 }
167
168 func (logger *Logger) Fatalf(format string, args ...interface{}) {
169 if logger.level() >= FatalLevel {
170 entry := logger.newEntry()
171 entry.Fatalf(format, args...)
172 logger.releaseEntry(entry)
173 }
174 Exit(1)
175 }
176
177 func (logger *Logger) Panicf(format string, args ...interface{}) {
178 if logger.level() >= PanicLevel {
179 entry := logger.newEntry()
180 entry.Panicf(format, args...)
181 logger.releaseEntry(entry)
182 }
188 func (logger *Logger) Trace(args ...interface{}) {
189 logger.Log(TraceLevel, args...)
183190 }
184191
185192 func (logger *Logger) Debug(args ...interface{}) {
186 if logger.level() >= DebugLevel {
187 entry := logger.newEntry()
188 entry.Debug(args...)
189 logger.releaseEntry(entry)
190 }
193 logger.Log(DebugLevel, args...)
191194 }
192195
193196 func (logger *Logger) Info(args ...interface{}) {
194 if logger.level() >= InfoLevel {
195 entry := logger.newEntry()
196 entry.Info(args...)
197 logger.releaseEntry(entry)
198 }
197 logger.Log(InfoLevel, args...)
199198 }
200199
201200 func (logger *Logger) Print(args ...interface{}) {
205204 }
206205
207206 func (logger *Logger) Warn(args ...interface{}) {
208 if logger.level() >= WarnLevel {
207 logger.Log(WarnLevel, args...)
208 }
209
210 func (logger *Logger) Warning(args ...interface{}) {
211 logger.Warn(args...)
212 }
213
214 func (logger *Logger) Error(args ...interface{}) {
215 logger.Log(ErrorLevel, args...)
216 }
217
218 func (logger *Logger) Fatal(args ...interface{}) {
219 logger.Log(FatalLevel, args...)
220 logger.Exit(1)
221 }
222
223 func (logger *Logger) Panic(args ...interface{}) {
224 logger.Log(PanicLevel, args...)
225 }
226
227 func (logger *Logger) Logln(level Level, args ...interface{}) {
228 if logger.IsLevelEnabled(level) {
209229 entry := logger.newEntry()
210 entry.Warn(args...)
230 entry.Logln(level, args...)
211231 logger.releaseEntry(entry)
212232 }
213233 }
214234
215 func (logger *Logger) Warning(args ...interface{}) {
216 if logger.level() >= WarnLevel {
217 entry := logger.newEntry()
218 entry.Warn(args...)
219 logger.releaseEntry(entry)
220 }
221 }
222
223 func (logger *Logger) Error(args ...interface{}) {
224 if logger.level() >= ErrorLevel {
225 entry := logger.newEntry()
226 entry.Error(args...)
227 logger.releaseEntry(entry)
228 }
229 }
230
231 func (logger *Logger) Fatal(args ...interface{}) {
232 if logger.level() >= FatalLevel {
233 entry := logger.newEntry()
234 entry.Fatal(args...)
235 logger.releaseEntry(entry)
236 }
237 Exit(1)
238 }
239
240 func (logger *Logger) Panic(args ...interface{}) {
241 if logger.level() >= PanicLevel {
242 entry := logger.newEntry()
243 entry.Panic(args...)
244 logger.releaseEntry(entry)
245 }
235 func (logger *Logger) Traceln(args ...interface{}) {
236 logger.Logln(TraceLevel, args...)
246237 }
247238
248239 func (logger *Logger) Debugln(args ...interface{}) {
249 if logger.level() >= DebugLevel {
250 entry := logger.newEntry()
251 entry.Debugln(args...)
252 logger.releaseEntry(entry)
253 }
240 logger.Logln(DebugLevel, args...)
254241 }
255242
256243 func (logger *Logger) Infoln(args ...interface{}) {
257 if logger.level() >= InfoLevel {
258 entry := logger.newEntry()
259 entry.Infoln(args...)
260 logger.releaseEntry(entry)
261 }
244 logger.Logln(InfoLevel, args...)
262245 }
263246
264247 func (logger *Logger) Println(args ...interface{}) {
268251 }
269252
270253 func (logger *Logger) Warnln(args ...interface{}) {
271 if logger.level() >= WarnLevel {
272 entry := logger.newEntry()
273 entry.Warnln(args...)
274 logger.releaseEntry(entry)
275 }
254 logger.Logln(WarnLevel, args...)
276255 }
277256
278257 func (logger *Logger) Warningln(args ...interface{}) {
279 if logger.level() >= WarnLevel {
280 entry := logger.newEntry()
281 entry.Warnln(args...)
282 logger.releaseEntry(entry)
283 }
258 logger.Warn(args...)
284259 }
285260
286261 func (logger *Logger) Errorln(args ...interface{}) {
287 if logger.level() >= ErrorLevel {
288 entry := logger.newEntry()
289 entry.Errorln(args...)
290 logger.releaseEntry(entry)
291 }
262 logger.Logln(ErrorLevel, args...)
292263 }
293264
294265 func (logger *Logger) Fatalln(args ...interface{}) {
295 if logger.level() >= FatalLevel {
296 entry := logger.newEntry()
297 entry.Fatalln(args...)
298 logger.releaseEntry(entry)
299 }
300 Exit(1)
266 logger.Logln(FatalLevel, args...)
267 logger.Exit(1)
301268 }
302269
303270 func (logger *Logger) Panicln(args ...interface{}) {
304 if logger.level() >= PanicLevel {
305 entry := logger.newEntry()
306 entry.Panicln(args...)
307 logger.releaseEntry(entry)
308 }
271 logger.Logln(PanicLevel, args...)
272 }
273
274 func (logger *Logger) Exit(code int) {
275 runHandlers()
276 if logger.ExitFunc == nil {
277 logger.ExitFunc = os.Exit
278 }
279 logger.ExitFunc(code)
309280 }
310281
311282 //When file is opened with appending mode, it's safe to
319290 return Level(atomic.LoadUint32((*uint32)(&logger.Level)))
320291 }
321292
293 // SetLevel sets the logger level.
322294 func (logger *Logger) SetLevel(level Level) {
323295 atomic.StoreUint32((*uint32)(&logger.Level), uint32(level))
324296 }
325297
326 func (logger *Logger) SetOutput(out io.Writer) {
327 logger.mu.Lock()
328 defer logger.mu.Unlock()
329 logger.Out = out
330 }
331
298 // GetLevel returns the logger level.
299 func (logger *Logger) GetLevel() Level {
300 return logger.level()
301 }
302
303 // AddHook adds a hook to the logger hooks.
332304 func (logger *Logger) AddHook(hook Hook) {
333305 logger.mu.Lock()
334306 defer logger.mu.Unlock()
335307 logger.Hooks.Add(hook)
336308 }
309
310 // IsLevelEnabled checks if the log level of the logger is greater than the level param
311 func (logger *Logger) IsLevelEnabled(level Level) bool {
312 return logger.level() >= level
313 }
314
315 // SetFormatter sets the logger formatter.
316 func (logger *Logger) SetFormatter(formatter Formatter) {
317 logger.mu.Lock()
318 defer logger.mu.Unlock()
319 logger.Formatter = formatter
320 }
321
322 // SetOutput sets the logger output.
323 func (logger *Logger) SetOutput(output io.Writer) {
324 logger.mu.Lock()
325 defer logger.mu.Unlock()
326 logger.Out = output
327 }
328
329 func (logger *Logger) SetReportCaller(reportCaller bool) {
330 logger.mu.Lock()
331 defer logger.mu.Unlock()
332 logger.ReportCaller = reportCaller
333 }
334
335 // ReplaceHooks replaces the logger hooks and returns the old ones
336 func (logger *Logger) ReplaceHooks(hooks LevelHooks) LevelHooks {
337 logger.mu.Lock()
338 oldHooks := logger.Hooks
339 logger.Hooks = hooks
340 logger.mu.Unlock()
341 return oldHooks
342 }
1313
1414 // Convert the Level to a string. E.g. PanicLevel becomes "panic".
1515 func (level Level) String() string {
16 switch level {
17 case DebugLevel:
18 return "debug"
19 case InfoLevel:
20 return "info"
21 case WarnLevel:
22 return "warning"
23 case ErrorLevel:
24 return "error"
25 case FatalLevel:
26 return "fatal"
27 case PanicLevel:
28 return "panic"
16 if b, err := level.MarshalText(); err == nil {
17 return string(b)
18 } else {
19 return "unknown"
2920 }
30
31 return "unknown"
3221 }
3322
3423 // ParseLevel takes a string level and returns the Logrus log level constant.
4635 return InfoLevel, nil
4736 case "debug":
4837 return DebugLevel, nil
38 case "trace":
39 return TraceLevel, nil
4940 }
5041
5142 var l Level
5243 return l, fmt.Errorf("not a valid logrus Level: %q", lvl)
44 }
45
46 // UnmarshalText implements encoding.TextUnmarshaler.
47 func (level *Level) UnmarshalText(text []byte) error {
48 l, err := ParseLevel(string(text))
49 if err != nil {
50 return err
51 }
52
53 *level = Level(l)
54
55 return nil
56 }
57
58 func (level Level) MarshalText() ([]byte, error) {
59 switch level {
60 case TraceLevel:
61 return []byte("trace"), nil
62 case DebugLevel:
63 return []byte("debug"), nil
64 case InfoLevel:
65 return []byte("info"), nil
66 case WarnLevel:
67 return []byte("warning"), nil
68 case ErrorLevel:
69 return []byte("error"), nil
70 case FatalLevel:
71 return []byte("fatal"), nil
72 case PanicLevel:
73 return []byte("panic"), nil
74 }
75
76 return nil, fmt.Errorf("not a valid lorus level %q", level)
5377 }
5478
5579 // A constant exposing all logging levels
6084 WarnLevel,
6185 InfoLevel,
6286 DebugLevel,
87 TraceLevel,
6388 }
6489
6590 // These are the different logging levels. You can set the logging level to log
6893 // PanicLevel level, highest level of severity. Logs and then calls panic with the
6994 // message passed to Debug, Info, ...
7095 PanicLevel Level = iota
71 // FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the
96 // FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the
7297 // logging level is set to Panic.
7398 FatalLevel
7499 // ErrorLevel level. Logs. Used for errors that should definitely be noted.
81106 InfoLevel
82107 // DebugLevel level. Usually only enabled when debugging. Very verbose logging.
83108 DebugLevel
109 // TraceLevel level. Designates finer-grained informational events than the Debug.
110 TraceLevel
84111 )
85112
86113 // Won't compile if StdLogger can't be realized by a log.Logger
139166 Errorln(args ...interface{})
140167 Fatalln(args ...interface{})
141168 Panicln(args ...interface{})
169
170 // IsDebugEnabled() bool
171 // IsInfoEnabled() bool
172 // IsWarnEnabled() bool
173 // IsErrorEnabled() bool
174 // IsFatalEnabled() bool
175 // IsPanicEnabled() bool
142176 }
177
178 // Ext1FieldLogger (the first extension to FieldLogger) is superfluous, it is
179 // here for consistancy. Do not use. Use Logger or Entry instead.
180 type Ext1FieldLogger interface {
181 FieldLogger
182 Tracef(format string, args ...interface{})
183 Trace(args ...interface{})
184 Traceln(args ...interface{})
185 }
+0
-10
vendor/github.com/sirupsen/logrus/terminal_bsd.go less more
0 // +build darwin freebsd openbsd netbsd dragonfly
1 // +build !appengine,!gopherjs
2
3 package logrus
4
5 import "golang.org/x/sys/unix"
6
7 const ioctlReadTermios = unix.TIOCGETA
8
9 type Termios unix.Termios
0 // +build !appengine,!js,!windows,aix
1
2 package logrus
3
4 import "io"
5
6 func checkIfTerminal(w io.Writer) bool {
7 return false
8 }
0 // +build appengine gopherjs
0 // +build appengine
11
22 package logrus
33
0 // +build js
1
2 package logrus
3
4 import (
5 "io"
6 )
7
8 func checkIfTerminal(w io.Writer) bool {
9 return false
10 }
0 // +build !appengine,!gopherjs
0 // +build !appengine,!js,!windows,!aix
11
22 package logrus
33
0 // +build !appengine,!js,windows
1
2 package logrus
3
4 import (
5 "io"
6 "os"
7 "syscall"
8 )
9
10 func checkIfTerminal(w io.Writer) bool {
11 switch v := w.(type) {
12 case *os.File:
13 var mode uint32
14 err := syscall.GetConsoleMode(syscall.Handle(v.Fd()), &mode)
15 return err == nil
16 default:
17 return false
18 }
19 }
+0
-14
vendor/github.com/sirupsen/logrus/terminal_linux.go less more
0 // Based on ssh/terminal:
1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // +build !appengine,!gopherjs
6
7 package logrus
8
9 import "golang.org/x/sys/unix"
10
11 const ioctlReadTermios = unix.TCGETS
12
13 type Termios unix.Termios
0 // +build !windows
1
2 package logrus
3
4 import "io"
5
6 func initTerminal(w io.Writer) {
7 }
0 // +build !appengine,!js,windows
1
2 package logrus
3
4 import (
5 "io"
6 "os"
7 "syscall"
8
9 sequences "github.com/konsorten/go-windows-terminal-sequences"
10 )
11
12 func initTerminal(w io.Writer) {
13 switch v := w.(type) {
14 case *os.File:
15 sequences.EnableVirtualTerminalProcessing(syscall.Handle(v.Fd()), true)
16 }
17 }
22 import (
33 "bytes"
44 "fmt"
5 "os"
6 "runtime"
57 "sort"
68 "strings"
79 "sync"
3436 // Force disabling colors.
3537 DisableColors bool
3638
39 // Override coloring based on CLICOLOR and CLICOLOR_FORCE. - https://bixense.com/clicolors/
40 EnvironmentOverrideColors bool
41
3742 // Disable timestamp logging. useful when output is redirected to logging
3843 // system that already adds timestamps.
3944 DisableTimestamp bool
4954 // that log extremely frequently and don't use the JSON formatter this may not
5055 // be desired.
5156 DisableSorting bool
57
58 // The keys sorting function, when uninitialized it uses sort.Strings.
59 SortingFunc func([]string)
5260
5361 // Disables the truncation of the level text to 4 characters.
5462 DisableLevelTruncation bool
6876 // FieldKeyMsg: "@message"}}
6977 FieldMap FieldMap
7078
71 sync.Once
79 terminalInitOnce sync.Once
7280 }
7381
7482 func (f *TextFormatter) init(entry *Entry) {
7583 if entry.Logger != nil {
7684 f.isTerminal = checkIfTerminal(entry.Logger.Out)
77 }
85
86 if f.isTerminal {
87 initTerminal(entry.Logger.Out)
88 }
89 }
90 }
91
92 func (f *TextFormatter) isColored() bool {
93 isColored := f.ForceColors || (f.isTerminal && (runtime.GOOS != "windows"))
94
95 if f.EnvironmentOverrideColors {
96 if force, ok := os.LookupEnv("CLICOLOR_FORCE"); ok && force != "0" {
97 isColored = true
98 } else if ok && force == "0" {
99 isColored = false
100 } else if os.Getenv("CLICOLOR") == "0" {
101 isColored = false
102 }
103 }
104
105 return isColored && !f.DisableColors
78106 }
79107
80108 // Format renders a single log entry
81109 func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
82 prefixFieldClashes(entry.Data, f.FieldMap)
83
84 keys := make([]string, 0, len(entry.Data))
85 for k := range entry.Data {
110 data := make(Fields)
111 for k, v := range entry.Data {
112 data[k] = v
113 }
114 prefixFieldClashes(data, f.FieldMap, entry.HasCaller())
115 keys := make([]string, 0, len(data))
116 for k := range data {
86117 keys = append(keys, k)
87118 }
88119
120 fixedKeys := make([]string, 0, 4+len(data))
121 if !f.DisableTimestamp {
122 fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyTime))
123 }
124 fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyLevel))
125 if entry.Message != "" {
126 fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyMsg))
127 }
128 if entry.err != "" {
129 fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyLogrusError))
130 }
131 if entry.HasCaller() {
132 fixedKeys = append(fixedKeys,
133 f.FieldMap.resolve(FieldKeyFunc), f.FieldMap.resolve(FieldKeyFile))
134 }
135
89136 if !f.DisableSorting {
90 sort.Strings(keys)
137 if f.SortingFunc == nil {
138 sort.Strings(keys)
139 fixedKeys = append(fixedKeys, keys...)
140 } else {
141 if !f.isColored() {
142 fixedKeys = append(fixedKeys, keys...)
143 f.SortingFunc(fixedKeys)
144 } else {
145 f.SortingFunc(keys)
146 }
147 }
148 } else {
149 fixedKeys = append(fixedKeys, keys...)
91150 }
92151
93152 var b *bytes.Buffer
97156 b = &bytes.Buffer{}
98157 }
99158
100 f.Do(func() { f.init(entry) })
101
102 isColored := (f.ForceColors || f.isTerminal) && !f.DisableColors
159 f.terminalInitOnce.Do(func() { f.init(entry) })
103160
104161 timestampFormat := f.TimestampFormat
105162 if timestampFormat == "" {
106163 timestampFormat = defaultTimestampFormat
107164 }
108 if isColored {
109 f.printColored(b, entry, keys, timestampFormat)
110 } else {
111 if !f.DisableTimestamp {
112 f.appendKeyValue(b, f.FieldMap.resolve(FieldKeyTime), entry.Time.Format(timestampFormat))
113 }
114 f.appendKeyValue(b, f.FieldMap.resolve(FieldKeyLevel), entry.Level.String())
115 if entry.Message != "" {
116 f.appendKeyValue(b, f.FieldMap.resolve(FieldKeyMsg), entry.Message)
117 }
118 for _, key := range keys {
119 f.appendKeyValue(b, key, entry.Data[key])
165 if f.isColored() {
166 f.printColored(b, entry, keys, data, timestampFormat)
167 } else {
168 for _, key := range fixedKeys {
169 var value interface{}
170 switch {
171 case key == f.FieldMap.resolve(FieldKeyTime):
172 value = entry.Time.Format(timestampFormat)
173 case key == f.FieldMap.resolve(FieldKeyLevel):
174 value = entry.Level.String()
175 case key == f.FieldMap.resolve(FieldKeyMsg):
176 value = entry.Message
177 case key == f.FieldMap.resolve(FieldKeyLogrusError):
178 value = entry.err
179 case key == f.FieldMap.resolve(FieldKeyFunc) && entry.HasCaller():
180 value = entry.Caller.Function
181 case key == f.FieldMap.resolve(FieldKeyFile) && entry.HasCaller():
182 value = fmt.Sprintf("%s:%d", entry.Caller.File, entry.Caller.Line)
183 default:
184 value = data[key]
185 }
186 f.appendKeyValue(b, key, value)
120187 }
121188 }
122189
124191 return b.Bytes(), nil
125192 }
126193
127 func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, timestampFormat string) {
194 func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, data Fields, timestampFormat string) {
128195 var levelColor int
129196 switch entry.Level {
130 case DebugLevel:
197 case DebugLevel, TraceLevel:
131198 levelColor = gray
132199 case WarnLevel:
133200 levelColor = yellow
142209 levelText = levelText[0:4]
143210 }
144211
212 // Remove a single newline if it already exists in the message to keep
213 // the behavior of logrus text_formatter the same as the stdlib log package
214 entry.Message = strings.TrimSuffix(entry.Message, "\n")
215
216 caller := ""
217
218 if entry.HasCaller() {
219 caller = fmt.Sprintf("%s:%d %s()",
220 entry.Caller.File, entry.Caller.Line, entry.Caller.Function)
221 }
222
145223 if f.DisableTimestamp {
146 fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m %-44s ", levelColor, levelText, entry.Message)
224 fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m%s %-44s ", levelColor, levelText, caller, entry.Message)
147225 } else if !f.FullTimestamp {
148 fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d] %-44s ", levelColor, levelText, int(entry.Time.Sub(baseTimestamp)/time.Second), entry.Message)
149 } else {
150 fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s] %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), entry.Message)
226 fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d]%s %-44s ", levelColor, levelText, int(entry.Time.Sub(baseTimestamp)/time.Second), caller, entry.Message)
227 } else {
228 fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s]%s %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), caller, entry.Message)
151229 }
152230 for _, k := range keys {
153 v := entry.Data[k]
231 v := data[k]
154232 fmt.Fprintf(b, " \x1b[%dm%s\x1b[0m=", levelColor, k)
155233 f.appendValue(b, v)
156234 }
2323 var printFunc func(args ...interface{})
2424
2525 switch level {
26 case TraceLevel:
27 printFunc = entry.Trace
2628 case DebugLevel:
2729 printFunc = entry.Debug
2830 case InfoLevel:
00 # This source code refers to The Go Authors for copyright purposes.
11 # The master list of authors is in the main Go distribution,
2 # visible at http://tip.golang.org/AUTHORS.
2 # visible at https://tip.golang.org/AUTHORS.
00 # This source code was written by the Go contributors.
11 # The master list of contributors is in the main Go distribution,
2 # visible at http://tip.golang.org/CONTRIBUTORS.
2 # visible at https://tip.golang.org/CONTRIBUTORS.
44 // Package ripemd160 implements the RIPEMD-160 hash algorithm.
55 package ripemd160 // import "golang.org/x/crypto/ripemd160"
66
7 // RIPEMD-160 is designed by by Hans Dobbertin, Antoon Bosselaers, and Bart
7 // RIPEMD-160 is designed by Hans Dobbertin, Antoon Bosselaers, and Bart
88 // Preneel with specifications available at:
99 // http://homes.esat.kuleuven.be/~cosicart/pdf/AB-9601/AB-9601.pdf.
1010
66 // can be substituted easily.
77
88 package ripemd160
9
10 import (
11 "math/bits"
12 )
913
1014 // work buffer indices and roll amounts for one line
1115 var _n = [80]uint{
5862 i := 0
5963 for i < 16 {
6064 alpha = a + (b ^ c ^ d) + x[_n[i]]
61 s := _r[i]
62 alpha = (alpha<<s | alpha>>(32-s)) + e
63 beta = c<<10 | c>>22
65 s := int(_r[i])
66 alpha = bits.RotateLeft32(alpha, s) + e
67 beta = bits.RotateLeft32(c, 10)
6468 a, b, c, d, e = e, alpha, b, beta, d
6569
6670 // parallel line
6771 alpha = aa + (bb ^ (cc | ^dd)) + x[n_[i]] + 0x50a28be6
68 s = r_[i]
69 alpha = (alpha<<s | alpha>>(32-s)) + ee
70 beta = cc<<10 | cc>>22
72 s = int(r_[i])
73 alpha = bits.RotateLeft32(alpha, s) + ee
74 beta = bits.RotateLeft32(cc, 10)
7175 aa, bb, cc, dd, ee = ee, alpha, bb, beta, dd
7276
7377 i++
7680 // round 2
7781 for i < 32 {
7882 alpha = a + (b&c | ^b&d) + x[_n[i]] + 0x5a827999
79 s := _r[i]
80 alpha = (alpha<<s | alpha>>(32-s)) + e
81 beta = c<<10 | c>>22
83 s := int(_r[i])
84 alpha = bits.RotateLeft32(alpha, s) + e
85 beta = bits.RotateLeft32(c, 10)
8286 a, b, c, d, e = e, alpha, b, beta, d
8387
8488 // parallel line
8589 alpha = aa + (bb&dd | cc&^dd) + x[n_[i]] + 0x5c4dd124
86 s = r_[i]
87 alpha = (alpha<<s | alpha>>(32-s)) + ee
88 beta = cc<<10 | cc>>22
90 s = int(r_[i])
91 alpha = bits.RotateLeft32(alpha, s) + ee
92 beta = bits.RotateLeft32(cc, 10)
8993 aa, bb, cc, dd, ee = ee, alpha, bb, beta, dd
9094
9195 i++
9498 // round 3
9599 for i < 48 {
96100 alpha = a + (b | ^c ^ d) + x[_n[i]] + 0x6ed9eba1
97 s := _r[i]
98 alpha = (alpha<<s | alpha>>(32-s)) + e
99 beta = c<<10 | c>>22
101 s := int(_r[i])
102 alpha = bits.RotateLeft32(alpha, s) + e
103 beta = bits.RotateLeft32(c, 10)
100104 a, b, c, d, e = e, alpha, b, beta, d
101105
102106 // parallel line
103107 alpha = aa + (bb | ^cc ^ dd) + x[n_[i]] + 0x6d703ef3
104 s = r_[i]
105 alpha = (alpha<<s | alpha>>(32-s)) + ee
106 beta = cc<<10 | cc>>22
108 s = int(r_[i])
109 alpha = bits.RotateLeft32(alpha, s) + ee
110 beta = bits.RotateLeft32(cc, 10)
107111 aa, bb, cc, dd, ee = ee, alpha, bb, beta, dd
108112
109113 i++
112116 // round 4
113117 for i < 64 {
114118 alpha = a + (b&d | c&^d) + x[_n[i]] + 0x8f1bbcdc
115 s := _r[i]
116 alpha = (alpha<<s | alpha>>(32-s)) + e
117 beta = c<<10 | c>>22
119 s := int(_r[i])
120 alpha = bits.RotateLeft32(alpha, s) + e
121 beta = bits.RotateLeft32(c, 10)
118122 a, b, c, d, e = e, alpha, b, beta, d
119123
120124 // parallel line
121125 alpha = aa + (bb&cc | ^bb&dd) + x[n_[i]] + 0x7a6d76e9
122 s = r_[i]
123 alpha = (alpha<<s | alpha>>(32-s)) + ee
124 beta = cc<<10 | cc>>22
126 s = int(r_[i])
127 alpha = bits.RotateLeft32(alpha, s) + ee
128 beta = bits.RotateLeft32(cc, 10)
125129 aa, bb, cc, dd, ee = ee, alpha, bb, beta, dd
126130
127131 i++
130134 // round 5
131135 for i < 80 {
132136 alpha = a + (b ^ (c | ^d)) + x[_n[i]] + 0xa953fd4e
133 s := _r[i]
134 alpha = (alpha<<s | alpha>>(32-s)) + e
135 beta = c<<10 | c>>22
137 s := int(_r[i])
138 alpha = bits.RotateLeft32(alpha, s) + e
139 beta = bits.RotateLeft32(c, 10)
136140 a, b, c, d, e = e, alpha, b, beta, d
137141
138142 // parallel line
139143 alpha = aa + (bb ^ cc ^ dd) + x[n_[i]]
140 s = r_[i]
141 alpha = (alpha<<s | alpha>>(32-s)) + ee
142 beta = cc<<10 | cc>>22
144 s = int(r_[i])
145 alpha = bits.RotateLeft32(alpha, s) + ee
146 beta = bits.RotateLeft32(cc, 10)
143147 aa, bb, cc, dd, ee = ee, alpha, bb, beta, dd
144148
145149 i++
131131 keyPasteEnd
132132 )
133133
134 var pasteStart = []byte{keyEscape, '[', '2', '0', '0', '~'}
135 var pasteEnd = []byte{keyEscape, '[', '2', '0', '1', '~'}
134 var (
135 crlf = []byte{'\r', '\n'}
136 pasteStart = []byte{keyEscape, '[', '2', '0', '0', '~'}
137 pasteEnd = []byte{keyEscape, '[', '2', '0', '1', '~'}
138 )
136139
137140 // bytesToKey tries to parse a key sequence from b. If successful, it returns
138141 // the key and the remainder of the input. Otherwise it returns utf8.RuneError.
332335 // So, if we are stopping at the end of a line, we
333336 // need to write a newline so that our cursor can be
334337 // advanced to the next line.
335 t.outBuf = append(t.outBuf, '\n')
338 t.outBuf = append(t.outBuf, '\r', '\n')
336339 }
337340 }
338341
592595 }
593596 }
594597
598 // writeWithCRLF writes buf to w but replaces all occurrences of \n with \r\n.
599 func writeWithCRLF(w io.Writer, buf []byte) (n int, err error) {
600 for len(buf) > 0 {
601 i := bytes.IndexByte(buf, '\n')
602 todo := len(buf)
603 if i >= 0 {
604 todo = i
605 }
606
607 var nn int
608 nn, err = w.Write(buf[:todo])
609 n += nn
610 if err != nil {
611 return n, err
612 }
613 buf = buf[todo:]
614
615 if i >= 0 {
616 if _, err = w.Write(crlf); err != nil {
617 return n, err
618 }
619 n++
620 buf = buf[1:]
621 }
622 }
623
624 return n, nil
625 }
626
595627 func (t *Terminal) Write(buf []byte) (n int, err error) {
596628 t.lock.Lock()
597629 defer t.lock.Unlock()
599631 if t.cursorX == 0 && t.cursorY == 0 {
600632 // This is the easy case: there's nothing on the screen that we
601633 // have to move out of the way.
602 return t.c.Write(buf)
634 return writeWithCRLF(t.c, buf)
603635 }
604636
605637 // We have a prompt and possibly user input on the screen. We
619651 }
620652 t.outBuf = t.outBuf[:0]
621653
622 if n, err = t.c.Write(buf); err != nil {
654 if n, err = writeWithCRLF(t.c, buf); err != nil {
623655 return
624656 }
625657
739771
740772 t.remainder = t.inBuf[:n+len(t.remainder)]
741773 }
742
743 panic("unreachable") // for Go 1.0.
744774 }
745775
746776 // SetPrompt sets the prompt to be used when reading subsequent lines.
889919 }
890920 return s.entries[index], true
891921 }
922
923 // readPasswordLine reads from reader until it finds \n or io.EOF.
924 // The slice returned does not include the \n.
925 // readPasswordLine also ignores any \r it finds.
926 func readPasswordLine(reader io.Reader) ([]byte, error) {
927 var buf [1]byte
928 var ret []byte
929
930 for {
931 n, err := reader.Read(buf[:])
932 if n > 0 {
933 switch buf[0] {
934 case '\n':
935 return ret, nil
936 case '\r':
937 // remove \r from passwords on Windows
938 default:
939 ret = append(ret, buf[0])
940 }
941 continue
942 }
943 if err != nil {
944 if err == io.EOF && len(ret) > 0 {
945 return ret, nil
946 }
947 return ret, err
948 }
949 }
950 }
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 // +build darwin dragonfly freebsd linux,!appengine netbsd openbsd
4 // +build aix darwin dragonfly freebsd linux,!appengine netbsd openbsd
55
66 // Package terminal provides support functions for dealing with terminals, as
77 // commonly found on UNIX systems.
1616 package terminal // import "golang.org/x/crypto/ssh/terminal"
1717
1818 import (
19 "io"
20 "syscall"
21 "unsafe"
19 "golang.org/x/sys/unix"
2220 )
2321
2422 // State contains the state of a terminal.
2523 type State struct {
26 termios syscall.Termios
24 termios unix.Termios
2725 }
2826
29 // IsTerminal returns true if the given file descriptor is a terminal.
27 // IsTerminal returns whether the given file descriptor is a terminal.
3028 func IsTerminal(fd int) bool {
31 var termios syscall.Termios
32 _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
33 return err == 0
29 _, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
30 return err == nil
3431 }
3532
3633 // MakeRaw put the terminal connected to the given file descriptor into raw
3734 // mode and returns the previous state of the terminal so that it can be
3835 // restored.
3936 func MakeRaw(fd int) (*State, error) {
40 var oldState State
41 if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&oldState.termios)), 0, 0, 0); err != 0 {
37 termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
38 if err != nil {
4239 return nil, err
4340 }
4441
45 newState := oldState.termios
46 newState.Iflag &^= syscall.ISTRIP | syscall.INLCR | syscall.ICRNL | syscall.IGNCR | syscall.IXON | syscall.IXOFF
47 newState.Lflag &^= syscall.ECHO | syscall.ICANON | syscall.ISIG
48 if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&newState)), 0, 0, 0); err != 0 {
42 oldState := State{termios: *termios}
43
44 // This attempts to replicate the behaviour documented for cfmakeraw in
45 // the termios(3) manpage.
46 termios.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON
47 termios.Oflag &^= unix.OPOST
48 termios.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN
49 termios.Cflag &^= unix.CSIZE | unix.PARENB
50 termios.Cflag |= unix.CS8
51 termios.Cc[unix.VMIN] = 1
52 termios.Cc[unix.VTIME] = 0
53 if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, termios); err != nil {
4954 return nil, err
5055 }
5156
5560 // GetState returns the current state of a terminal which may be useful to
5661 // restore the terminal after a signal.
5762 func GetState(fd int) (*State, error) {
58 var oldState State
59 if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&oldState.termios)), 0, 0, 0); err != 0 {
63 termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
64 if err != nil {
6065 return nil, err
6166 }
6267
63 return &oldState, nil
68 return &State{termios: *termios}, nil
6469 }
6570
6671 // Restore restores the terminal connected to the given file descriptor to a
6772 // previous state.
6873 func Restore(fd int, state *State) error {
69 _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&state.termios)), 0, 0, 0)
70 return err
74 return unix.IoctlSetTermios(fd, ioctlWriteTermios, &state.termios)
7175 }
7276
7377 // GetSize returns the dimensions of the given terminal.
7478 func GetSize(fd int) (width, height int, err error) {
75 var dimensions [4]uint16
76
77 if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), uintptr(syscall.TIOCGWINSZ), uintptr(unsafe.Pointer(&dimensions)), 0, 0, 0); err != 0 {
79 ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
80 if err != nil {
7881 return -1, -1, err
7982 }
80 return int(dimensions[1]), int(dimensions[0]), nil
83 return int(ws.Col), int(ws.Row), nil
84 }
85
86 // passwordReader is an io.Reader that reads from a specific file descriptor.
87 type passwordReader int
88
89 func (r passwordReader) Read(buf []byte) (int, error) {
90 return unix.Read(int(r), buf)
8191 }
8292
8393 // ReadPassword reads a line of input from a terminal without local echo. This
8494 // is commonly used for inputting passwords and other sensitive data. The slice
8595 // returned does not include the \n.
8696 func ReadPassword(fd int) ([]byte, error) {
87 var oldState syscall.Termios
88 if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&oldState)), 0, 0, 0); err != 0 {
97 termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
98 if err != nil {
8999 return nil, err
90100 }
91101
92 newState := oldState
93 newState.Lflag &^= syscall.ECHO
94 newState.Lflag |= syscall.ICANON | syscall.ISIG
95 newState.Iflag |= syscall.ICRNL
96 if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&newState)), 0, 0, 0); err != 0 {
102 newState := *termios
103 newState.Lflag &^= unix.ECHO
104 newState.Lflag |= unix.ICANON | unix.ISIG
105 newState.Iflag |= unix.ICRNL
106 if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, &newState); err != nil {
97107 return nil, err
98108 }
99109
100 defer func() {
101 syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&oldState)), 0, 0, 0)
102 }()
110 defer unix.IoctlSetTermios(fd, ioctlWriteTermios, termios)
103111
104 var buf [16]byte
105 var ret []byte
106 for {
107 n, err := syscall.Read(fd, buf[:])
108 if err != nil {
109 return nil, err
110 }
111 if n == 0 {
112 if len(ret) == 0 {
113 return nil, io.EOF
114 }
115 break
116 }
117 if buf[n-1] == '\n' {
118 n--
119 }
120 ret = append(ret, buf[:n]...)
121 if n < len(buf) {
122 break
123 }
124 }
125
126 return ret, nil
112 return readPasswordLine(passwordReader(fd))
127113 }
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build aix
5
6 package terminal
7
8 import "golang.org/x/sys/unix"
9
10 const ioctlReadTermios = unix.TCGETS
11 const ioctlWriteTermios = unix.TCSETS
55
66 package terminal
77
8 import "syscall"
8 import "golang.org/x/sys/unix"
99
10 const ioctlReadTermios = syscall.TIOCGETA
11 const ioctlWriteTermios = syscall.TIOCSETA
10 const ioctlReadTermios = unix.TIOCGETA
11 const ioctlWriteTermios = unix.TIOCSETA
33
44 package terminal
55
6 // These constants are declared here, rather than importing
7 // them from the syscall package as some syscall packages, even
8 // on linux, for example gccgo, do not declare them.
9 const ioctlReadTermios = 0x5401 // syscall.TCGETS
10 const ioctlWriteTermios = 0x5402 // syscall.TCSETS
6 import "golang.org/x/sys/unix"
7
8 const ioctlReadTermios = unix.TCGETS
9 const ioctlWriteTermios = unix.TCSETS
0 // Copyright 2016 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // Package terminal provides support functions for dealing with terminals, as
5 // commonly found on UNIX systems.
6 //
7 // Putting a terminal into raw mode is the most common requirement:
8 //
9 // oldState, err := terminal.MakeRaw(0)
10 // if err != nil {
11 // panic(err)
12 // }
13 // defer terminal.Restore(0, oldState)
14 package terminal
15
16 import (
17 "fmt"
18 "runtime"
19 )
20
21 type State struct{}
22
23 // IsTerminal returns whether the given file descriptor is a terminal.
24 func IsTerminal(fd int) bool {
25 return false
26 }
27
28 // MakeRaw put the terminal connected to the given file descriptor into raw
29 // mode and returns the previous state of the terminal so that it can be
30 // restored.
31 func MakeRaw(fd int) (*State, error) {
32 return nil, fmt.Errorf("terminal: MakeRaw not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
33 }
34
35 // GetState returns the current state of a terminal which may be useful to
36 // restore the terminal after a signal.
37 func GetState(fd int) (*State, error) {
38 return nil, fmt.Errorf("terminal: GetState not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
39 }
40
41 // Restore restores the terminal connected to the given file descriptor to a
42 // previous state.
43 func Restore(fd int, state *State) error {
44 return fmt.Errorf("terminal: Restore not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
45 }
46
47 // GetSize returns the dimensions of the given terminal.
48 func GetSize(fd int) (width, height int, err error) {
49 return 0, 0, fmt.Errorf("terminal: GetSize not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
50 }
51
52 // ReadPassword reads a line of input from a terminal without local echo. This
53 // is commonly used for inputting passwords and other sensitive data. The slice
54 // returned does not include the \n.
55 func ReadPassword(fd int) ([]byte, error) {
56 return nil, fmt.Errorf("terminal: ReadPassword not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
57 }
0 // Copyright 2015 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build solaris
5
6 package terminal // import "golang.org/x/crypto/ssh/terminal"
7
8 import (
9 "golang.org/x/sys/unix"
10 "io"
11 "syscall"
12 )
13
14 // State contains the state of a terminal.
15 type State struct {
16 termios unix.Termios
17 }
18
19 // IsTerminal returns whether the given file descriptor is a terminal.
20 func IsTerminal(fd int) bool {
21 _, err := unix.IoctlGetTermio(fd, unix.TCGETA)
22 return err == nil
23 }
24
25 // ReadPassword reads a line of input from a terminal without local echo. This
26 // is commonly used for inputting passwords and other sensitive data. The slice
27 // returned does not include the \n.
28 func ReadPassword(fd int) ([]byte, error) {
29 // see also: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libast/common/uwin/getpass.c
30 val, err := unix.IoctlGetTermios(fd, unix.TCGETS)
31 if err != nil {
32 return nil, err
33 }
34 oldState := *val
35
36 newState := oldState
37 newState.Lflag &^= syscall.ECHO
38 newState.Lflag |= syscall.ICANON | syscall.ISIG
39 newState.Iflag |= syscall.ICRNL
40 err = unix.IoctlSetTermios(fd, unix.TCSETS, &newState)
41 if err != nil {
42 return nil, err
43 }
44
45 defer unix.IoctlSetTermios(fd, unix.TCSETS, &oldState)
46
47 var buf [16]byte
48 var ret []byte
49 for {
50 n, err := syscall.Read(fd, buf[:])
51 if err != nil {
52 return nil, err
53 }
54 if n == 0 {
55 if len(ret) == 0 {
56 return nil, io.EOF
57 }
58 break
59 }
60 if buf[n-1] == '\n' {
61 n--
62 }
63 ret = append(ret, buf[:n]...)
64 if n < len(buf) {
65 break
66 }
67 }
68
69 return ret, nil
70 }
71
72 // MakeRaw puts the terminal connected to the given file descriptor into raw
73 // mode and returns the previous state of the terminal so that it can be
74 // restored.
75 // see http://cr.illumos.org/~webrev/andy_js/1060/
76 func MakeRaw(fd int) (*State, error) {
77 termios, err := unix.IoctlGetTermios(fd, unix.TCGETS)
78 if err != nil {
79 return nil, err
80 }
81
82 oldState := State{termios: *termios}
83
84 termios.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON
85 termios.Oflag &^= unix.OPOST
86 termios.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN
87 termios.Cflag &^= unix.CSIZE | unix.PARENB
88 termios.Cflag |= unix.CS8
89 termios.Cc[unix.VMIN] = 1
90 termios.Cc[unix.VTIME] = 0
91
92 if err := unix.IoctlSetTermios(fd, unix.TCSETS, termios); err != nil {
93 return nil, err
94 }
95
96 return &oldState, nil
97 }
98
99 // Restore restores the terminal connected to the given file descriptor to a
100 // previous state.
101 func Restore(fd int, oldState *State) error {
102 return unix.IoctlSetTermios(fd, unix.TCSETS, &oldState.termios)
103 }
104
105 // GetState returns the current state of a terminal which may be useful to
106 // restore the terminal after a signal.
107 func GetState(fd int) (*State, error) {
108 termios, err := unix.IoctlGetTermios(fd, unix.TCGETS)
109 if err != nil {
110 return nil, err
111 }
112
113 return &State{termios: *termios}, nil
114 }
115
116 // GetSize returns the dimensions of the given terminal.
117 func GetSize(fd int) (width, height int, err error) {
118 ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
119 if err != nil {
120 return 0, 0, err
121 }
122 return int(ws.Col), int(ws.Row), nil
123 }
1616 package terminal
1717
1818 import (
19 "io"
20 "syscall"
21 "unsafe"
22 )
19 "os"
2320
24 const (
25 enableLineInput = 2
26 enableEchoInput = 4
27 enableProcessedInput = 1
28 enableWindowInput = 8
29 enableMouseInput = 16
30 enableInsertMode = 32
31 enableQuickEditMode = 64
32 enableExtendedFlags = 128
33 enableAutoPosition = 256
34 enableProcessedOutput = 1
35 enableWrapAtEolOutput = 2
36 )
37
38 var kernel32 = syscall.NewLazyDLL("kernel32.dll")
39
40 var (
41 procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
42 procSetConsoleMode = kernel32.NewProc("SetConsoleMode")
43 procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo")
44 )
45
46 type (
47 short int16
48 word uint16
49
50 coord struct {
51 x short
52 y short
53 }
54 smallRect struct {
55 left short
56 top short
57 right short
58 bottom short
59 }
60 consoleScreenBufferInfo struct {
61 size coord
62 cursorPosition coord
63 attributes word
64 window smallRect
65 maximumWindowSize coord
66 }
21 "golang.org/x/sys/windows"
6722 )
6823
6924 type State struct {
7025 mode uint32
7126 }
7227
73 // IsTerminal returns true if the given file descriptor is a terminal.
28 // IsTerminal returns whether the given file descriptor is a terminal.
7429 func IsTerminal(fd int) bool {
7530 var st uint32
76 r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
77 return r != 0 && e == 0
31 err := windows.GetConsoleMode(windows.Handle(fd), &st)
32 return err == nil
7833 }
7934
8035 // MakeRaw put the terminal connected to the given file descriptor into raw
8237 // restored.
8338 func MakeRaw(fd int) (*State, error) {
8439 var st uint32
85 _, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
86 if e != 0 {
87 return nil, error(e)
40 if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil {
41 return nil, err
8842 }
89 st &^= (enableEchoInput | enableProcessedInput | enableLineInput | enableProcessedOutput)
90 _, _, e = syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(st), 0)
91 if e != 0 {
92 return nil, error(e)
43 raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT)
44 if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil {
45 return nil, err
9346 }
9447 return &State{st}, nil
9548 }
9851 // restore the terminal after a signal.
9952 func GetState(fd int) (*State, error) {
10053 var st uint32
101 _, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
102 if e != 0 {
103 return nil, error(e)
54 if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil {
55 return nil, err
10456 }
10557 return &State{st}, nil
10658 }
10860 // Restore restores the terminal connected to the given file descriptor to a
10961 // previous state.
11062 func Restore(fd int, state *State) error {
111 _, _, err := syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(state.mode), 0)
112 return err
63 return windows.SetConsoleMode(windows.Handle(fd), state.mode)
11364 }
11465
11566 // GetSize returns the dimensions of the given terminal.
11667 func GetSize(fd int) (width, height int, err error) {
117 var info consoleScreenBufferInfo
118 _, _, e := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&info)), 0)
119 if e != 0 {
120 return 0, 0, error(e)
68 var info windows.ConsoleScreenBufferInfo
69 if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil {
70 return 0, 0, err
12171 }
122 return int(info.size.x), int(info.size.y), nil
72 return int(info.Size.X), int(info.Size.Y), nil
12373 }
12474
12575 // ReadPassword reads a line of input from a terminal without local echo. This
12777 // returned does not include the \n.
12878 func ReadPassword(fd int) ([]byte, error) {
12979 var st uint32
130 _, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
131 if e != 0 {
132 return nil, error(e)
80 if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil {
81 return nil, err
13382 }
13483 old := st
13584
136 st &^= (enableEchoInput)
137 st |= (enableProcessedInput | enableLineInput | enableProcessedOutput)
138 _, _, e = syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(st), 0)
139 if e != 0 {
140 return nil, error(e)
85 st &^= (windows.ENABLE_ECHO_INPUT)
86 st |= (windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT)
87 if err := windows.SetConsoleMode(windows.Handle(fd), st); err != nil {
88 return nil, err
14189 }
14290
143 defer func() {
144 syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(old), 0)
145 }()
91 defer windows.SetConsoleMode(windows.Handle(fd), old)
14692
147 var buf [16]byte
148 var ret []byte
149 for {
150 n, err := syscall.Read(syscall.Handle(fd), buf[:])
151 if err != nil {
152 return nil, err
153 }
154 if n == 0 {
155 if len(ret) == 0 {
156 return nil, io.EOF
157 }
158 break
159 }
160 if buf[n-1] == '\n' {
161 n--
162 }
163 if n > 0 && buf[n-1] == '\r' {
164 n--
165 }
166 ret = append(ret, buf[:n]...)
167 if n < len(buf) {
168 break
169 }
93 var h windows.Handle
94 p, _ := windows.GetCurrentProcess()
95 if err := windows.DuplicateHandle(p, windows.Handle(fd), p, &h, 0, false, windows.DUPLICATE_SAME_ACCESS); err != nil {
96 return nil, err
17097 }
17198
172 return ret, nil
99 f := os.NewFile(uintptr(h), "stdin")
100 defer f.Close()
101 return readPasswordLine(f)
173102 }
1313 This is being done on an OS-by-OS basis. Please update this documentation as
1414 components of the build system change.
1515
16 ### Old Build System (currently for `GOOS != "Linux" || GOARCH == "sparc64"`)
16 ### Old Build System (currently for `GOOS != "linux"`)
1717
1818 The old build system generates the Go files based on the C header files
1919 present on your system. This means that files
3333
3434 Requirements: bash, perl, go
3535
36 ### New Build System (currently for `GOOS == "Linux" && GOARCH != "sparc64"`)
36 ### New Build System (currently for `GOOS == "linux"`)
3737
3838 The new build system uses a Docker container to generate the go files directly
3939 from source checkouts of the kernel and various system libraries. This means
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // CPU affinity functions
5
6 package unix
7
8 import (
9 "unsafe"
10 )
11
12 const cpuSetSize = _CPU_SETSIZE / _NCPUBITS
13
14 // CPUSet represents a CPU affinity mask.
15 type CPUSet [cpuSetSize]cpuMask
16
17 func schedAffinity(trap uintptr, pid int, set *CPUSet) error {
18 _, _, e := RawSyscall(trap, uintptr(pid), uintptr(unsafe.Sizeof(*set)), uintptr(unsafe.Pointer(set)))
19 if e != 0 {
20 return errnoErr(e)
21 }
22 return nil
23 }
24
25 // SchedGetaffinity gets the CPU affinity mask of the thread specified by pid.
26 // If pid is 0 the calling thread is used.
27 func SchedGetaffinity(pid int, set *CPUSet) error {
28 return schedAffinity(SYS_SCHED_GETAFFINITY, pid, set)
29 }
30
31 // SchedSetaffinity sets the CPU affinity mask of the thread specified by pid.
32 // If pid is 0 the calling thread is used.
33 func SchedSetaffinity(pid int, set *CPUSet) error {
34 return schedAffinity(SYS_SCHED_SETAFFINITY, pid, set)
35 }
36
37 // Zero clears the set s, so that it contains no CPUs.
38 func (s *CPUSet) Zero() {
39 for i := range s {
40 s[i] = 0
41 }
42 }
43
44 func cpuBitsIndex(cpu int) int {
45 return cpu / _NCPUBITS
46 }
47
48 func cpuBitsMask(cpu int) cpuMask {
49 return cpuMask(1 << (uint(cpu) % _NCPUBITS))
50 }
51
52 // Set adds cpu to the set s.
53 func (s *CPUSet) Set(cpu int) {
54 i := cpuBitsIndex(cpu)
55 if i < len(s) {
56 s[i] |= cpuBitsMask(cpu)
57 }
58 }
59
60 // Clear removes cpu from the set s.
61 func (s *CPUSet) Clear(cpu int) {
62 i := cpuBitsIndex(cpu)
63 if i < len(s) {
64 s[i] &^= cpuBitsMask(cpu)
65 }
66 }
67
68 // IsSet reports whether cpu is in the set s.
69 func (s *CPUSet) IsSet(cpu int) bool {
70 i := cpuBitsIndex(cpu)
71 if i < len(s) {
72 return s[i]&cpuBitsMask(cpu) != 0
73 }
74 return false
75 }
76
77 // Count returns the number of CPUs in the set s.
78 func (s *CPUSet) Count() int {
79 c := 0
80 for _, b := range s {
81 c += onesCount64(uint64(b))
82 }
83 return c
84 }
85
86 // onesCount64 is a copy of Go 1.9's math/bits.OnesCount64.
87 // Once this package can require Go 1.9, we can delete this
88 // and update the caller to use bits.OnesCount64.
89 func onesCount64(x uint64) int {
90 const m0 = 0x5555555555555555 // 01010101 ...
91 const m1 = 0x3333333333333333 // 00110011 ...
92 const m2 = 0x0f0f0f0f0f0f0f0f // 00001111 ...
93 const m3 = 0x00ff00ff00ff00ff // etc.
94 const m4 = 0x0000ffff0000ffff
95
96 // Implementation: Parallel summing of adjacent bits.
97 // See "Hacker's Delight", Chap. 5: Counting Bits.
98 // The following pattern shows the general approach:
99 //
100 // x = x>>1&(m0&m) + x&(m0&m)
101 // x = x>>2&(m1&m) + x&(m1&m)
102 // x = x>>4&(m2&m) + x&(m2&m)
103 // x = x>>8&(m3&m) + x&(m3&m)
104 // x = x>>16&(m4&m) + x&(m4&m)
105 // x = x>>32&(m5&m) + x&(m5&m)
106 // return int(x)
107 //
108 // Masking (& operations) can be left away when there's no
109 // danger that a field's sum will carry over into the next
110 // field: Since the result cannot be > 64, 8 bits is enough
111 // and we can ignore the masks for the shifts by 8 and up.
112 // Per "Hacker's Delight", the first line can be simplified
113 // more, but it saves at best one instruction, so we leave
114 // it alone for clarity.
115 const m = 1<<64 - 1
116 x = x>>1&(m0&m) + x&(m0&m)
117 x = x>>2&(m1&m) + x&(m1&m)
118 x = (x>>4 + x) & (m2 & m)
119 x += x >> 8
120 x += x >> 16
121 x += x >> 32
122 return int(x) & (1<<7 - 1)
123 }
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
5 // +build go1.9
6
7 package unix
8
9 import "syscall"
10
11 type Signal = syscall.Signal
12 type Errno = syscall.Errno
13 type SysProcAttr = syscall.SysProcAttr
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build !gccgo
5
6 #include "textflag.h"
7
8 //
9 // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
10 //
11
12 TEXT ·syscall6(SB),NOSPLIT,$0-88
13 JMP syscall·syscall6(SB)
14
15 TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
16 JMP syscall·rawSyscall6(SB)
1212 // Just jump to package syscall's implementation for all these functions.
1313 // The runtime may know about them.
1414
15 TEXT ·Syscall(SB),NOSPLIT,$0-64
15 TEXT ·Syscall(SB),NOSPLIT,$0-56
1616 JMP syscall·Syscall(SB)
1717
18 TEXT ·Syscall6(SB),NOSPLIT,$0-88
18 TEXT ·Syscall6(SB),NOSPLIT,$0-80
1919 JMP syscall·Syscall6(SB)
2020
21 TEXT ·Syscall9(SB),NOSPLIT,$0-112
21 TEXT ·Syscall9(SB),NOSPLIT,$0-104
2222 JMP syscall·Syscall9(SB)
2323
24 TEXT ·RawSyscall(SB),NOSPLIT,$0-64
24 TEXT ·RawSyscall(SB),NOSPLIT,$0-56
2525 JMP syscall·RawSyscall(SB)
2626
27 TEXT ·RawSyscall6(SB),NOSPLIT,$0-88
27 TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
2828 JMP syscall·RawSyscall6(SB)
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build !gccgo
5
6 #include "textflag.h"
7
8 //
9 // System call support for ARM64, FreeBSD
10 //
11
12 // Just jump to package syscall's implementation for all these functions.
13 // The runtime may know about them.
14
15 TEXT ·Syscall(SB),NOSPLIT,$0-56
16 JMP syscall·Syscall(SB)
17
18 TEXT ·Syscall6(SB),NOSPLIT,$0-80
19 JMP syscall·Syscall6(SB)
20
21 TEXT ·Syscall9(SB),NOSPLIT,$0-104
22 JMP syscall·Syscall9(SB)
23
24 TEXT ·RawSyscall(SB),NOSPLIT,$0-56
25 JMP syscall·RawSyscall(SB)
26
27 TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
28 JMP syscall·RawSyscall6(SB)
99 // System calls for 386, Linux
1010 //
1111
12 // See ../runtime/sys_linux_386.s for the reason why we always use int 0x80
13 // instead of the glibc-specific "CALL 0x10(GS)".
14 #define INVOKE_SYSCALL INT $0x80
15
1216 // Just jump to package syscall's implementation for all these functions.
1317 // The runtime may know about them.
1418
15 TEXT ·Syscall(SB),NOSPLIT,$0-28
19 TEXT ·Syscall(SB),NOSPLIT,$0-28
1620 JMP syscall·Syscall(SB)
1721
18 TEXT ·Syscall6(SB),NOSPLIT,$0-40
22 TEXT ·Syscall6(SB),NOSPLIT,$0-40
1923 JMP syscall·Syscall6(SB)
24
25 TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
26 CALL runtime·entersyscall(SB)
27 MOVL trap+0(FP), AX // syscall entry
28 MOVL a1+4(FP), BX
29 MOVL a2+8(FP), CX
30 MOVL a3+12(FP), DX
31 MOVL $0, SI
32 MOVL $0, DI
33 INVOKE_SYSCALL
34 MOVL AX, r1+16(FP)
35 MOVL DX, r2+20(FP)
36 CALL runtime·exitsyscall(SB)
37 RET
2038
2139 TEXT ·RawSyscall(SB),NOSPLIT,$0-28
2240 JMP syscall·RawSyscall(SB)
2341
24 TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
42 TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
2543 JMP syscall·RawSyscall6(SB)
44
45 TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
46 MOVL trap+0(FP), AX // syscall entry
47 MOVL a1+4(FP), BX
48 MOVL a2+8(FP), CX
49 MOVL a3+12(FP), DX
50 MOVL $0, SI
51 MOVL $0, DI
52 INVOKE_SYSCALL
53 MOVL AX, r1+16(FP)
54 MOVL DX, r2+20(FP)
55 RET
2656
2757 TEXT ·socketcall(SB),NOSPLIT,$0-36
2858 JMP syscall·socketcall(SB)
1212 // Just jump to package syscall's implementation for all these functions.
1313 // The runtime may know about them.
1414
15 TEXT ·Syscall(SB),NOSPLIT,$0-56
15 TEXT ·Syscall(SB),NOSPLIT,$0-56
1616 JMP syscall·Syscall(SB)
1717
1818 TEXT ·Syscall6(SB),NOSPLIT,$0-80
1919 JMP syscall·Syscall6(SB)
20
21 TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
22 CALL runtime·entersyscall(SB)
23 MOVQ a1+8(FP), DI
24 MOVQ a2+16(FP), SI
25 MOVQ a3+24(FP), DX
26 MOVQ $0, R10
27 MOVQ $0, R8
28 MOVQ $0, R9
29 MOVQ trap+0(FP), AX // syscall entry
30 SYSCALL
31 MOVQ AX, r1+32(FP)
32 MOVQ DX, r2+40(FP)
33 CALL runtime·exitsyscall(SB)
34 RET
2035
2136 TEXT ·RawSyscall(SB),NOSPLIT,$0-56
2237 JMP syscall·RawSyscall(SB)
2439 TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
2540 JMP syscall·RawSyscall6(SB)
2641
42 TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
43 MOVQ a1+8(FP), DI
44 MOVQ a2+16(FP), SI
45 MOVQ a3+24(FP), DX
46 MOVQ $0, R10
47 MOVQ $0, R8
48 MOVQ $0, R9
49 MOVQ trap+0(FP), AX // syscall entry
50 SYSCALL
51 MOVQ AX, r1+32(FP)
52 MOVQ DX, r2+40(FP)
53 RET
54
2755 TEXT ·gettimeofday(SB),NOSPLIT,$0-16
2856 JMP syscall·gettimeofday(SB)
1212 // Just jump to package syscall's implementation for all these functions.
1313 // The runtime may know about them.
1414
15 TEXT ·Syscall(SB),NOSPLIT,$0-28
15 TEXT ·Syscall(SB),NOSPLIT,$0-28
1616 B syscall·Syscall(SB)
1717
18 TEXT ·Syscall6(SB),NOSPLIT,$0-40
18 TEXT ·Syscall6(SB),NOSPLIT,$0-40
1919 B syscall·Syscall6(SB)
20
21 TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
22 BL runtime·entersyscall(SB)
23 MOVW trap+0(FP), R7
24 MOVW a1+4(FP), R0
25 MOVW a2+8(FP), R1
26 MOVW a3+12(FP), R2
27 MOVW $0, R3
28 MOVW $0, R4
29 MOVW $0, R5
30 SWI $0
31 MOVW R0, r1+16(FP)
32 MOVW $0, R0
33 MOVW R0, r2+20(FP)
34 BL runtime·exitsyscall(SB)
35 RET
2036
2137 TEXT ·RawSyscall(SB),NOSPLIT,$0-28
2238 B syscall·RawSyscall(SB)
2339
24 TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
40 TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
2541 B syscall·RawSyscall6(SB)
2642
27 TEXT ·seek(SB),NOSPLIT,$0-32
43 TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
44 MOVW trap+0(FP), R7 // syscall entry
45 MOVW a1+4(FP), R0
46 MOVW a2+8(FP), R1
47 MOVW a3+12(FP), R2
48 SWI $0
49 MOVW R0, r1+16(FP)
50 MOVW $0, R0
51 MOVW R0, r2+20(FP)
52 RET
53
54 TEXT ·seek(SB),NOSPLIT,$0-28
2855 B syscall·seek(SB)
1010 // Just jump to package syscall's implementation for all these functions.
1111 // The runtime may know about them.
1212
13 TEXT ·Syscall(SB),NOSPLIT,$0-56
13 TEXT ·Syscall(SB),NOSPLIT,$0-56
1414 B syscall·Syscall(SB)
1515
1616 TEXT ·Syscall6(SB),NOSPLIT,$0-80
1717 B syscall·Syscall6(SB)
18
19 TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
20 BL runtime·entersyscall(SB)
21 MOVD a1+8(FP), R0
22 MOVD a2+16(FP), R1
23 MOVD a3+24(FP), R2
24 MOVD $0, R3
25 MOVD $0, R4
26 MOVD $0, R5
27 MOVD trap+0(FP), R8 // syscall entry
28 SVC
29 MOVD R0, r1+32(FP) // r1
30 MOVD R1, r2+40(FP) // r2
31 BL runtime·exitsyscall(SB)
32 RET
1833
1934 TEXT ·RawSyscall(SB),NOSPLIT,$0-56
2035 B syscall·RawSyscall(SB)
2136
2237 TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
2338 B syscall·RawSyscall6(SB)
39
40 TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
41 MOVD a1+8(FP), R0
42 MOVD a2+16(FP), R1
43 MOVD a3+24(FP), R2
44 MOVD $0, R3
45 MOVD $0, R4
46 MOVD $0, R5
47 MOVD trap+0(FP), R8 // syscall entry
48 SVC
49 MOVD R0, r1+32(FP)
50 MOVD R1, r2+40(FP)
51 RET
1414 // Just jump to package syscall's implementation for all these functions.
1515 // The runtime may know about them.
1616
17 TEXT ·Syscall(SB),NOSPLIT,$0-56
17 TEXT ·Syscall(SB),NOSPLIT,$0-56
1818 JMP syscall·Syscall(SB)
1919
20 TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 TEXT ·Syscall6(SB),NOSPLIT,$0-80
2121 JMP syscall·Syscall6(SB)
2222
23 TEXT ·RawSyscall(SB),NOSPLIT,$0-56
23 TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
24 JAL runtime·entersyscall(SB)
25 MOVV a1+8(FP), R4
26 MOVV a2+16(FP), R5
27 MOVV a3+24(FP), R6
28 MOVV R0, R7
29 MOVV R0, R8
30 MOVV R0, R9
31 MOVV trap+0(FP), R2 // syscall entry
32 SYSCALL
33 MOVV R2, r1+32(FP)
34 MOVV R3, r2+40(FP)
35 JAL runtime·exitsyscall(SB)
36 RET
37
38 TEXT ·RawSyscall(SB),NOSPLIT,$0-56
2439 JMP syscall·RawSyscall(SB)
2540
26 TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
41 TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
2742 JMP syscall·RawSyscall6(SB)
43
44 TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
45 MOVV a1+8(FP), R4
46 MOVV a2+16(FP), R5
47 MOVV a3+24(FP), R6
48 MOVV R0, R7
49 MOVV R0, R8
50 MOVV R0, R9
51 MOVV trap+0(FP), R2 // syscall entry
52 SYSCALL
53 MOVV R2, r1+32(FP)
54 MOVV R3, r2+40(FP)
55 RET
1414 // Just jump to package syscall's implementation for all these functions.
1515 // The runtime may know about them.
1616
17 TEXT ·Syscall(SB),NOSPLIT,$0-28
17 TEXT ·Syscall(SB),NOSPLIT,$0-28
1818 JMP syscall·Syscall(SB)
1919
20 TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 TEXT ·Syscall6(SB),NOSPLIT,$0-40
2121 JMP syscall·Syscall6(SB)
2222
23 TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 TEXT ·Syscall9(SB),NOSPLIT,$0-52
2424 JMP syscall·Syscall9(SB)
2525
26 TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
27 JAL runtime·entersyscall(SB)
28 MOVW a1+4(FP), R4
29 MOVW a2+8(FP), R5
30 MOVW a3+12(FP), R6
31 MOVW R0, R7
32 MOVW trap+0(FP), R2 // syscall entry
33 SYSCALL
34 MOVW R2, r1+16(FP) // r1
35 MOVW R3, r2+20(FP) // r2
36 JAL runtime·exitsyscall(SB)
37 RET
38
39 TEXT ·RawSyscall(SB),NOSPLIT,$0-28
2740 JMP syscall·RawSyscall(SB)
2841
29 TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
42 TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
3043 JMP syscall·RawSyscall6(SB)
44
45 TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
46 MOVW a1+4(FP), R4
47 MOVW a2+8(FP), R5
48 MOVW a3+12(FP), R6
49 MOVW trap+0(FP), R2 // syscall entry
50 SYSCALL
51 MOVW R2, r1+16(FP)
52 MOVW R3, r2+20(FP)
53 RET
1414 // Just jump to package syscall's implementation for all these functions.
1515 // The runtime may know about them.
1616
17 TEXT ·Syscall(SB),NOSPLIT,$0-56
18 BR syscall·Syscall(SB)
17 TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
18 BL runtime·entersyscall(SB)
19 MOVD a1+8(FP), R3
20 MOVD a2+16(FP), R4
21 MOVD a3+24(FP), R5
22 MOVD R0, R6
23 MOVD R0, R7
24 MOVD R0, R8
25 MOVD trap+0(FP), R9 // syscall entry
26 SYSCALL R9
27 MOVD R3, r1+32(FP)
28 MOVD R4, r2+40(FP)
29 BL runtime·exitsyscall(SB)
30 RET
1931
20 TEXT ·Syscall6(SB),NOSPLIT,$0-80
21 BR syscall·Syscall6(SB)
22
23 TEXT ·RawSyscall(SB),NOSPLIT,$0-56
24 BR syscall·RawSyscall(SB)
25
26 TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
27 BR syscall·RawSyscall6(SB)
32 TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
33 MOVD a1+8(FP), R3
34 MOVD a2+16(FP), R4
35 MOVD a3+24(FP), R5
36 MOVD R0, R6
37 MOVD R0, R7
38 MOVD R0, R8
39 MOVD trap+0(FP), R9 // syscall entry
40 SYSCALL R9
41 MOVD R3, r1+32(FP)
42 MOVD R4, r2+40(FP)
43 RET
2020 TEXT ·Syscall6(SB),NOSPLIT,$0-80
2121 BR syscall·Syscall6(SB)
2222
23 TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
24 BL runtime·entersyscall(SB)
25 MOVD a1+8(FP), R2
26 MOVD a2+16(FP), R3
27 MOVD a3+24(FP), R4
28 MOVD $0, R5
29 MOVD $0, R6
30 MOVD $0, R7
31 MOVD trap+0(FP), R1 // syscall entry
32 SYSCALL
33 MOVD R2, r1+32(FP)
34 MOVD R3, r2+40(FP)
35 BL runtime·exitsyscall(SB)
36 RET
37
2338 TEXT ·RawSyscall(SB),NOSPLIT,$0-56
2439 BR syscall·RawSyscall(SB)
2540
2641 TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
2742 BR syscall·RawSyscall6(SB)
43
44 TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
45 MOVD a1+8(FP), R2
46 MOVD a2+16(FP), R3
47 MOVD a3+24(FP), R4
48 MOVD $0, R5
49 MOVD $0, R6
50 MOVD $0, R7
51 MOVD trap+0(FP), R1 // syscall entry
52 SYSCALL
53 MOVD R2, r1+32(FP)
54 MOVD R3, r2+40(FP)
55 RET
0 // Copyright 2019 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build !gccgo
5
6 #include "textflag.h"
7
8 //
9 // System call support for ARM64, NetBSD
10 //
11
12 // Just jump to package syscall's implementation for all these functions.
13 // The runtime may know about them.
14
15 TEXT ·Syscall(SB),NOSPLIT,$0-56
16 B syscall·Syscall(SB)
17
18 TEXT ·Syscall6(SB),NOSPLIT,$0-80
19 B syscall·Syscall6(SB)
20
21 TEXT ·Syscall9(SB),NOSPLIT,$0-104
22 B syscall·Syscall9(SB)
23
24 TEXT ·RawSyscall(SB),NOSPLIT,$0-56
25 B syscall·RawSyscall(SB)
26
27 TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
28 B syscall·RawSyscall6(SB)
66 package unix
77
88 import (
9 errorspkg "errors"
9 "errors"
1010 "fmt"
1111 )
1212
5959
6060 n := caparsize(rights)
6161 if n < capArSizeMin || n > capArSizeMax {
62 return errorspkg.New("bad rights size")
62 return errors.New("bad rights size")
6363 }
6464
6565 for _, right := range setrights {
6666 if caprver(right) != CAP_RIGHTS_VERSION_00 {
67 return errorspkg.New("bad right version")
67 return errors.New("bad right version")
6868 }
6969 i, err := rightToIndex(right)
7070 if err != nil {
7171 return err
7272 }
7373 if i >= n {
74 return errorspkg.New("index overflow")
74 return errors.New("index overflow")
7575 }
7676 if capidxbit(rights.Rights[i]) != capidxbit(right) {
77 return errorspkg.New("index mismatch")
77 return errors.New("index mismatch")
7878 }
7979 rights.Rights[i] |= right
8080 if capidxbit(rights.Rights[i]) != capidxbit(right) {
81 return errorspkg.New("index mismatch (after assign)")
81 return errors.New("index mismatch (after assign)")
8282 }
8383 }
8484
9494
9595 n := caparsize(rights)
9696 if n < capArSizeMin || n > capArSizeMax {
97 return errorspkg.New("bad rights size")
97 return errors.New("bad rights size")
9898 }
9999
100100 for _, right := range clearrights {
101101 if caprver(right) != CAP_RIGHTS_VERSION_00 {
102 return errorspkg.New("bad right version")
102 return errors.New("bad right version")
103103 }
104104 i, err := rightToIndex(right)
105105 if err != nil {
106106 return err
107107 }
108108 if i >= n {
109 return errorspkg.New("index overflow")
109 return errors.New("index overflow")
110110 }
111111 if capidxbit(rights.Rights[i]) != capidxbit(right) {
112 return errorspkg.New("index mismatch")
112 return errors.New("index mismatch")
113113 }
114114 rights.Rights[i] &= ^(right & 0x01FFFFFFFFFFFFFF)
115115 if capidxbit(rights.Rights[i]) != capidxbit(right) {
116 return errorspkg.New("index mismatch (after assign)")
116 return errors.New("index mismatch (after assign)")
117117 }
118118 }
119119
129129
130130 n := caparsize(rights)
131131 if n < capArSizeMin || n > capArSizeMax {
132 return false, errorspkg.New("bad rights size")
132 return false, errors.New("bad rights size")
133133 }
134134
135135 for _, right := range setrights {
136136 if caprver(right) != CAP_RIGHTS_VERSION_00 {
137 return false, errorspkg.New("bad right version")
137 return false, errors.New("bad right version")
138138 }
139139 i, err := rightToIndex(right)
140140 if err != nil {
141141 return false, err
142142 }
143143 if i >= n {
144 return false, errorspkg.New("index overflow")
144 return false, errors.New("index overflow")
145145 }
146146 if capidxbit(rights.Rights[i]) != capidxbit(right) {
147 return false, errorspkg.New("index mismatch")
147 return false, errors.New("index mismatch")
148148 }
149149 if (rights.Rights[i] & right) != right {
150150 return false, nil
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
4 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
55
66 package unix
77
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build aix
5 // +build ppc
6
7 // Functions to access/create device major and minor numbers matching the
8 // encoding used by AIX.
9
10 package unix
11
12 // Major returns the major component of a Linux device number.
13 func Major(dev uint64) uint32 {
14 return uint32((dev >> 16) & 0xffff)
15 }
16
17 // Minor returns the minor component of a Linux device number.
18 func Minor(dev uint64) uint32 {
19 return uint32(dev & 0xffff)
20 }
21
22 // Mkdev returns a Linux device number generated from the given major and minor
23 // components.
24 func Mkdev(major, minor uint32) uint64 {
25 return uint64(((major) << 16) | (minor))
26 }
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build aix
5 // +build ppc64
6
7 // Functions to access/create device major and minor numbers matching the
8 // encoding used AIX.
9
10 package unix
11
12 // Major returns the major component of a Linux device number.
13 func Major(dev uint64) uint32 {
14 return uint32((dev & 0x3fffffff00000000) >> 32)
15 }
16
17 // Minor returns the minor component of a Linux device number.
18 func Minor(dev uint64) uint32 {
19 return uint32((dev & 0x00000000ffffffff) >> 0)
20 }
21
22 // Mkdev returns a Linux device number generated from the given major and minor
23 // components.
24 func Mkdev(major, minor uint32) uint64 {
25 var DEVNO64 uint64
26 DEVNO64 = 0x8000000000000000
27 return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64)
28 }
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 // +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
4 // +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
55
66 package unix
77
8 import "unsafe"
9
10 // readInt returns the size-bytes unsigned integer in native byte order at offset off.
11 func readInt(b []byte, off, size uintptr) (u uint64, ok bool) {
12 if len(b) < int(off+size) {
13 return 0, false
14 }
15 if isBigEndian {
16 return readIntBE(b[off:], size), true
17 }
18 return readIntLE(b[off:], size), true
19 }
20
21 func readIntBE(b []byte, size uintptr) uint64 {
22 switch size {
23 case 1:
24 return uint64(b[0])
25 case 2:
26 _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
27 return uint64(b[1]) | uint64(b[0])<<8
28 case 4:
29 _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
30 return uint64(b[3]) | uint64(b[2])<<8 | uint64(b[1])<<16 | uint64(b[0])<<24
31 case 8:
32 _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
33 return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 |
34 uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56
35 default:
36 panic("syscall: readInt with unsupported size")
37 }
38 }
39
40 func readIntLE(b []byte, size uintptr) uint64 {
41 switch size {
42 case 1:
43 return uint64(b[0])
44 case 2:
45 _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
46 return uint64(b[0]) | uint64(b[1])<<8
47 case 4:
48 _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
49 return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24
50 case 8:
51 _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
52 return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |
53 uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
54 default:
55 panic("syscall: readInt with unsupported size")
56 }
57 }
8 import "syscall"
589
5910 // ParseDirent parses up to max directory entries in buf,
6011 // appending the names to names. It returns the number of
6112 // bytes consumed from buf, the number of entries added
6213 // to names, and the new names slice.
6314 func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
64 origlen := len(buf)
65 count = 0
66 for max != 0 && len(buf) > 0 {
67 reclen, ok := direntReclen(buf)
68 if !ok || reclen > uint64(len(buf)) {
69 return origlen, count, names
70 }
71 rec := buf[:reclen]
72 buf = buf[reclen:]
73 ino, ok := direntIno(rec)
74 if !ok {
75 break
76 }
77 if ino == 0 { // File absent in directory.
78 continue
79 }
80 const namoff = uint64(unsafe.Offsetof(Dirent{}.Name))
81 namlen, ok := direntNamlen(rec)
82 if !ok || namoff+namlen > uint64(len(rec)) {
83 break
84 }
85 name := rec[namoff : namoff+namlen]
86 for i, c := range name {
87 if c == 0 {
88 name = name[:i]
89 break
90 }
91 }
92 // Check for useless names before allocating a string.
93 if string(name) == "." || string(name) == ".." {
94 continue
95 }
96 max--
97 count++
98 names = append(names, string(name))
99 }
100 return origlen - len(buf), count, names
15 return syscall.ParseDirent(buf, max, names)
10116 }
0 // Copyright 2010 The Go Authors. All rights reserved.
0 // Copyright 2010 The Go Authors. All rights reserved.
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
4 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
55
66 // Unix environment variables.
77
2424 func Environ() []string {
2525 return syscall.Environ()
2626 }
27
28 func Unsetenv(key string) error {
29 return syscall.Unsetenv(key)
30 }
+0
-14
vendor/golang.org/x/sys/unix/env_unset.go less more
0 // Copyright 2014 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build go1.4
5
6 package unix
7
8 import "syscall"
9
10 func Unsetenv(key string) error {
11 // This was added in Go 1.4.
12 return syscall.Unsetenv(key)
13 }
0 // Copyright 2014 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build dragonfly freebsd linux netbsd openbsd
5
6 package unix
7
8 import "unsafe"
9
10 // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
11 // systems by flock_linux_32bit.go to be SYS_FCNTL64.
12 var fcntl64Syscall uintptr = SYS_FCNTL
13
14 // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
15 func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
16 valptr, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg))
17 var err error
18 if errno != 0 {
19 err = errno
20 }
21 return int(valptr), err
22 }
23
24 // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
25 func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
26 _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
27 if errno == 0 {
28 return nil
29 }
30 return errno
31 }
0 // Copyright 2019 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 package unix
5
6 import "unsafe"
7
8 // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
9 func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
10 return fcntl(int(fd), cmd, arg)
11 }
12
13 // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
14 func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
15 _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))
16 return err
17 }
0 // +build linux,386 linux,arm linux,mips linux,mipsle
1
2 // Copyright 2014 The Go Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style
4 // license that can be found in the LICENSE file.
5
6 package unix
7
8 func init() {
9 // On 32-bit Linux systems, the fcntl syscall that matches Go's
10 // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
11 fcntl64Syscall = SYS_FCNTL64
12 }
+0
-27
vendor/golang.org/x/sys/unix/file_unix.go less more
0 // Copyright 2017 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 package unix
5
6 import (
7 "os"
8 "syscall"
9 )
10
11 // FIXME: unexported function from os
12 // syscallMode returns the syscall-specific mode bits from Go's portable mode bits.
13 func syscallMode(i os.FileMode) (o uint32) {
14 o |= uint32(i.Perm())
15 if i&os.ModeSetuid != 0 {
16 o |= syscall.S_ISUID
17 }
18 if i&os.ModeSetgid != 0 {
19 o |= syscall.S_ISGID
20 }
21 if i&os.ModeSticky != 0 {
22 o |= syscall.S_ISVTX
23 }
24 // No mapping for Go's ModeTemporary (plan9 only).
25 return
26 }
+0
-22
vendor/golang.org/x/sys/unix/flock.go less more
0 // Copyright 2014 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build darwin dragonfly freebsd linux netbsd openbsd
5
6 package unix
7
8 import "unsafe"
9
10 // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
11 // systems by flock_linux_32bit.go to be SYS_FCNTL64.
12 var fcntl64Syscall uintptr = SYS_FCNTL
13
14 // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
15 func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
16 _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
17 if errno == 0 {
18 return nil
19 }
20 return errno
21 }
+0
-13
vendor/golang.org/x/sys/unix/flock_linux_32bit.go less more
0 // +build linux,386 linux,arm linux,mips linux,mipsle
1
2 // Copyright 2014 The Go Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style
4 // license that can be found in the LICENSE file.
5
6 package unix
7
8 func init() {
9 // On 32-bit Linux systems, the fcntl syscall that matches Go's
10 // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
11 fcntl64Syscall = SYS_FCNTL64
12 }
0 // Copyright 2015 The Go Authors. All rights reserved.
0 // Copyright 2015 The Go Authors. All rights reserved.
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
44 // +build gccgo
5 // +build !aix
56
67 package unix
78
89 import "syscall"
910
10 // We can't use the gc-syntax .s files for gccgo. On the plus side
11 // We can't use the gc-syntax .s files for gccgo. On the plus side
1112 // much of the functionality can be written directly in Go.
13
14 //extern gccgoRealSyscallNoError
15 func realSyscallNoError(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r uintptr)
1216
1317 //extern gccgoRealSyscall
1418 func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr)
19
20 func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
21 syscall.Entersyscall()
22 r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
23 syscall.Exitsyscall()
24 return r, 0
25 }
1526
1627 func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
1728 syscall.Entersyscall()
3445 return r, 0, syscall.Errno(errno)
3546 }
3647
48 func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
49 r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
50 return r, 0
51 }
52
3753 func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
3854 r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
3955 return r, 0, syscall.Errno(errno)
0 // Copyright 2015 The Go Authors. All rights reserved.
0 // Copyright 2015 The Go Authors. All rights reserved.
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
44 // +build gccgo
5 // +build !aix
56
67 #include <errno.h>
78 #include <stdint.h>
3031 return r;
3132 }
3233
33 // Define the use function in C so that it is not inlined.
34
35 extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline));
36
37 void
38 use(void *p __attribute__ ((unused)))
34 uintptr_t
35 gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
3936 {
37 return syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
4038 }
0 // Copyright 2015 The Go Authors. All rights reserved.
0 // Copyright 2015 The Go Authors. All rights reserved.
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
5
6 package unix
7
8 import "runtime"
9
10 // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
11 //
12 // To change fd's window size, the req argument should be TIOCSWINSZ.
13 func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
14 // TODO: if we get the chance, remove the req parameter and
15 // hardcode TIOCSWINSZ.
16 err := ioctlSetWinsize(fd, req, value)
17 runtime.KeepAlive(value)
18 return err
19 }
20
21 // IoctlSetTermios performs an ioctl on fd with a *Termios.
22 //
23 // The req value will usually be TCSETA or TIOCSETA.
24 func IoctlSetTermios(fd int, req uint, value *Termios) error {
25 // TODO: if we get the chance, remove the req parameter.
26 err := ioctlSetTermios(fd, req, value)
27 runtime.KeepAlive(value)
28 return err
29 }
99 GOOSARCH="${GOOS}_${GOARCH}"
1010
1111 # defaults
12 mksyscall="./mksyscall.pl"
12 mksyscall="go run mksyscall.go"
1313 mkerrors="./mkerrors.sh"
1414 zerrors="zerrors_$GOOSARCH.go"
1515 mksysctl=""
1616 zsysctl="zsysctl_$GOOSARCH.go"
1717 mksysnum=
1818 mktypes=
19 mkasm=
1920 run="sh"
2021 cmd=""
2122
4445 exit 2
4546 esac
4647
47 if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
48 # Use then new build system
48 if [[ "$GOOS" = "linux" ]]; then
49 # Use the Docker-based build system
4950 # Files generated through docker (use $cmd so you can Ctl-C the build or run)
5051 $cmd docker build --tag generate:$GOOS $GOOS
5152 $cmd docker run --interactive --tty --volume $(dirname "$(readlink -f "$0")"):/build generate:$GOOS
5859 echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
5960 exit 1
6061 ;;
62 aix_ppc)
63 mkerrors="$mkerrors -maix32"
64 mksyscall="go run mksyscall_aix_ppc.go -aix"
65 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
66 ;;
67 aix_ppc64)
68 mkerrors="$mkerrors -maix64"
69 mksyscall="./mksyscall_aix_ppc64.pl -aix"
70 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
71 ;;
6172 darwin_386)
6273 mkerrors="$mkerrors -m32"
63 mksyscall="./mksyscall.pl -l32"
64 mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
65 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
74 mksyscall="go run mksyscall.go -l32"
75 mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
76 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
77 mkasm="go run mkasm_darwin.go"
6678 ;;
6779 darwin_amd64)
6880 mkerrors="$mkerrors -m64"
69 mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
70 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
81 mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
82 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
83 mkasm="go run mkasm_darwin.go"
7184 ;;
7285 darwin_arm)
7386 mkerrors="$mkerrors"
74 mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
75 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
87 mksyscall="go run mksyscall.go -l32"
88 mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
89 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
90 mkasm="go run mkasm_darwin.go"
7691 ;;
7792 darwin_arm64)
7893 mkerrors="$mkerrors -m64"
79 mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
80 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
81 ;;
82 dragonfly_386)
83 mkerrors="$mkerrors -m32"
84 mksyscall="./mksyscall.pl -l32 -dragonfly"
85 mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
86 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
94 mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
95 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
96 mkasm="go run mkasm_darwin.go"
8797 ;;
8898 dragonfly_amd64)
8999 mkerrors="$mkerrors -m64"
90 mksyscall="./mksyscall.pl -dragonfly"
91 mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
100 mksyscall="go run mksyscall.go -dragonfly"
101 mksysnum="go run mksysnum.go 'https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master'"
92102 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
93103 ;;
94104 freebsd_386)
95105 mkerrors="$mkerrors -m32"
96 mksyscall="./mksyscall.pl -l32"
97 mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
106 mksyscall="go run mksyscall.go -l32"
107 mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master'"
98108 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
99109 ;;
100110 freebsd_amd64)
101111 mkerrors="$mkerrors -m64"
102 mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
112 mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master'"
103113 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
104114 ;;
105115 freebsd_arm)
106116 mkerrors="$mkerrors"
107 mksyscall="./mksyscall.pl -l32 -arm"
108 mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
117 mksyscall="go run mksyscall.go -l32 -arm"
118 mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master'"
109119 # Let the type of C char be signed for making the bare syscall
110120 # API consistent across platforms.
111121 mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
112122 ;;
113 linux_sparc64)
114 GOOSARCH_in=syscall_linux_sparc64.go
115 unistd_h=/usr/include/sparc64-linux-gnu/asm/unistd.h
116 mkerrors="$mkerrors -m64"
117 mksysnum="./mksysnum_linux.pl $unistd_h"
123 freebsd_arm64)
124 mkerrors="$mkerrors -m64"
125 mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master'"
118126 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
119127 ;;
120128 netbsd_386)
121129 mkerrors="$mkerrors -m32"
122 mksyscall="./mksyscall.pl -l32 -netbsd"
123 mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
130 mksyscall="go run mksyscall.go -l32 -netbsd"
131 mksysnum="go run mksysnum.go 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master'"
124132 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
125133 ;;
126134 netbsd_amd64)
127135 mkerrors="$mkerrors -m64"
128 mksyscall="./mksyscall.pl -netbsd"
129 mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
136 mksyscall="go run mksyscall.go -netbsd"
137 mksysnum="go run mksysnum.go 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master'"
130138 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
131139 ;;
132140 netbsd_arm)
133141 mkerrors="$mkerrors"
134 mksyscall="./mksyscall.pl -l32 -netbsd -arm"
135 mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
142 mksyscall="go run mksyscall.go -l32 -netbsd -arm"
143 mksysnum="go run mksysnum.go 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master'"
136144 # Let the type of C char be signed for making the bare syscall
137145 # API consistent across platforms.
138146 mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
139147 ;;
140148 openbsd_386)
141149 mkerrors="$mkerrors -m32"
142 mksyscall="./mksyscall.pl -l32 -openbsd"
150 mksyscall="go run mksyscall.go -l32 -openbsd"
143151 mksysctl="./mksysctl_openbsd.pl"
144 mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
152 mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
145153 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
146154 ;;
147155 openbsd_amd64)
148156 mkerrors="$mkerrors -m64"
149 mksyscall="./mksyscall.pl -openbsd"
157 mksyscall="go run mksyscall.go -openbsd"
150158 mksysctl="./mksysctl_openbsd.pl"
151 mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
159 mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
152160 mktypes="GOARCH=$GOARCH go tool cgo -godefs"
153161 ;;
154162 openbsd_arm)
155163 mkerrors="$mkerrors"
156 mksyscall="./mksyscall.pl -l32 -openbsd -arm"
164 mksyscall="go run mksyscall.go -l32 -openbsd -arm"
157165 mksysctl="./mksysctl_openbsd.pl"
158 mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
166 mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
159167 # Let the type of C char be signed for making the bare syscall
160168 # API consistent across platforms.
161169 mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
182190 syscall_goos="syscall_bsd.go $syscall_goos"
183191 ;;
184192 esac
185 if [ -n "$mksyscall" ]; then echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"; fi
186 ;;
193 if [ -n "$mksyscall" ]; then
194 if [ "$GOOSARCH" == "aix_ppc64" ]; then
195 # aix/ppc64 script generates files instead of writing to stdin.
196 echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ;
197 elif [ "$GOOS" == "darwin" ]; then
198 # pre-1.12, direct syscalls
199 echo "$mksyscall -tags $GOOS,$GOARCH,!go1.12 $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.1_11.go";
200 # 1.12 and later, syscalls via libSystem
201 echo "$mksyscall -tags $GOOS,$GOARCH,go1.12 $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
202 else
203 echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
204 fi
205 fi
187206 esac
188207 if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
189208 if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
190209 if [ -n "$mktypes" ]; then
191210 echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go";
211 if [ -n "$mkasm" ]; then echo "$mkasm $GOARCH"; fi
192212 fi
193213 ) | $run
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build ignore
5
6 // mkasm_darwin.go generates assembly trampolines to call libSystem routines from Go.
7 //This program must be run after mksyscall.go.
8 package main
9
10 import (
11 "bytes"
12 "fmt"
13 "io/ioutil"
14 "log"
15 "os"
16 "strings"
17 )
18
19 func main() {
20 in1, err := ioutil.ReadFile("syscall_darwin.go")
21 if err != nil {
22 log.Fatalf("can't open syscall_darwin.go: %s", err)
23 }
24 arch := os.Args[1]
25 in2, err := ioutil.ReadFile(fmt.Sprintf("syscall_darwin_%s.go", arch))
26 if err != nil {
27 log.Fatalf("can't open syscall_darwin_%s.go: %s", arch, err)
28 }
29 in3, err := ioutil.ReadFile(fmt.Sprintf("zsyscall_darwin_%s.go", arch))
30 if err != nil {
31 log.Fatalf("can't open zsyscall_darwin_%s.go: %s", arch, err)
32 }
33 in := string(in1) + string(in2) + string(in3)
34
35 trampolines := map[string]bool{}
36
37 var out bytes.Buffer
38
39 fmt.Fprintf(&out, "// go run mkasm_darwin.go %s\n", strings.Join(os.Args[1:], " "))
40 fmt.Fprintf(&out, "// Code generated by the command above; DO NOT EDIT.\n")
41 fmt.Fprintf(&out, "\n")
42 fmt.Fprintf(&out, "// +build go1.12\n")
43 fmt.Fprintf(&out, "\n")
44 fmt.Fprintf(&out, "#include \"textflag.h\"\n")
45 for _, line := range strings.Split(in, "\n") {
46 if !strings.HasPrefix(line, "func ") || !strings.HasSuffix(line, "_trampoline()") {
47 continue
48 }
49 fn := line[5 : len(line)-13]
50 if !trampolines[fn] {
51 trampolines[fn] = true
52 fmt.Fprintf(&out, "TEXT ·%s_trampoline(SB),NOSPLIT,$0-0\n", fn)
53 fmt.Fprintf(&out, "\tJMP\t%s(SB)\n", fn)
54 }
55 }
56 err = ioutil.WriteFile(fmt.Sprintf("zsyscall_darwin_%s.s", arch), out.Bytes(), 0644)
57 if err != nil {
58 log.Fatalf("can't write zsyscall_darwin_%s.s: %s", arch, err)
59 }
60 }
1616 fi
1717
1818 # Check that we are using the new build system if we should
19 if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
20 if [[ "$GOLANG_SYS_BUILD" != "docker" ]]; then
21 echo 1>&2 "In the new build system, mkerrors should not be called directly."
22 echo 1>&2 "See README.md"
23 exit 1
24 fi
19 if [[ "$GOOS" = "linux" ]] && [[ "$GOLANG_SYS_BUILD" != "docker" ]]; then
20 echo 1>&2 "In the Docker based build system, mkerrors should not be called directly."
21 echo 1>&2 "See README.md"
22 exit 1
2523 fi
2624
27 CC=${CC:-cc}
25 if [[ "$GOOS" = "aix" ]]; then
26 CC=${CC:-gcc}
27 else
28 CC=${CC:-cc}
29 fi
2830
2931 if [[ "$GOOS" = "solaris" ]]; then
3032 # Assumes GNU versions of utilities in PATH.
3335
3436 uname=$(uname)
3537
38 includes_AIX='
39 #include <net/if.h>
40 #include <net/netopt.h>
41 #include <netinet/ip_mroute.h>
42 #include <sys/protosw.h>
43 #include <sys/stropts.h>
44 #include <sys/mman.h>
45 #include <sys/poll.h>
46 #include <sys/termio.h>
47 #include <termios.h>
48 #include <fcntl.h>
49
50 #define AF_LOCAL AF_UNIX
51 '
52
3653 includes_Darwin='
3754 #define _DARWIN_C_SOURCE
3855 #define KERNEL
3956 #define _DARWIN_USE_64_BIT_INODE
57 #include <stdint.h>
58 #include <sys/attr.h>
4059 #include <sys/types.h>
4160 #include <sys/event.h>
4261 #include <sys/ptrace.h>
4564 #include <sys/sysctl.h>
4665 #include <sys/mman.h>
4766 #include <sys/mount.h>
67 #include <sys/utsname.h>
4868 #include <sys/wait.h>
69 #include <sys/xattr.h>
4970 #include <net/bpf.h>
5071 #include <net/if.h>
5172 #include <net/if_types.h>
6081 #include <sys/event.h>
6182 #include <sys/socket.h>
6283 #include <sys/sockio.h>
84 #include <sys/stat.h>
6385 #include <sys/sysctl.h>
6486 #include <sys/mman.h>
87 #include <sys/mount.h>
6588 #include <sys/wait.h>
6689 #include <sys/ioctl.h>
6790 #include <net/bpf.h>
7598 '
7699
77100 includes_FreeBSD='
78 #include <sys/capability.h>
101 #include <sys/capsicum.h>
79102 #include <sys/param.h>
80103 #include <sys/types.h>
81104 #include <sys/event.h>
82105 #include <sys/socket.h>
83106 #include <sys/sockio.h>
107 #include <sys/stat.h>
84108 #include <sys/sysctl.h>
85109 #include <sys/mman.h>
86110 #include <sys/mount.h>
154178 #include <sys/stat.h>
155179 #include <sys/types.h>
156180 #include <sys/time.h>
181 #include <sys/signalfd.h>
157182 #include <sys/socket.h>
158183 #include <sys/xattr.h>
159184 #include <linux/if.h>
160185 #include <linux/if_alg.h>
161186 #include <linux/if_arp.h>
162187 #include <linux/if_ether.h>
188 #include <linux/if_ppp.h>
163189 #include <linux/if_tun.h>
164190 #include <linux/if_packet.h>
165191 #include <linux/if_addr.h>
166192 #include <linux/falloc.h>
167193 #include <linux/filter.h>
168194 #include <linux/fs.h>
195 #include <linux/kexec.h>
169196 #include <linux/keyctl.h>
197 #include <linux/magic.h>
198 #include <linux/memfd.h>
199 #include <linux/module.h>
200 #include <linux/netfilter/nfnetlink.h>
170201 #include <linux/netlink.h>
202 #include <linux/net_namespace.h>
171203 #include <linux/perf_event.h>
172204 #include <linux/random.h>
173205 #include <linux/reboot.h>
183215 #include <linux/vm_sockets.h>
184216 #include <linux/taskstats.h>
185217 #include <linux/genetlink.h>
218 #include <linux/watchdog.h>
219 #include <linux/hdreg.h>
220 #include <linux/rtc.h>
221 #include <linux/if_xdp.h>
222 #include <mtd/ubi-user.h>
186223 #include <net/route.h>
224
225 #if defined(__sparc__)
226 // On sparc{,64}, the kernel defines struct termios2 itself which clashes with the
227 // definition in glibc. As only the error constants are needed here, include the
228 // generic termibits.h (which is included by termbits.h on sparc).
229 #include <asm-generic/termbits.h>
230 #else
187231 #include <asm/termbits.h>
232 #endif
188233
189234 #ifndef MSG_FASTOPEN
190235 #define MSG_FASTOPEN 0x20000000
212257 #define FS_KEY_DESC_PREFIX "fscrypt:"
213258 #define FS_KEY_DESC_PREFIX_SIZE 8
214259 #define FS_MAX_KEY_SIZE 64
260
261 // XDP socket constants do not appear to be picked up otherwise.
262 // Copied from samples/bpf/xdpsock_user.c.
263 #ifndef SOL_XDP
264 #define SOL_XDP 283
265 #endif
266
267 #ifndef AF_XDP
268 #define AF_XDP 44
269 #endif
215270 '
216271
217272 includes_NetBSD='
218273 #include <sys/types.h>
219274 #include <sys/param.h>
220275 #include <sys/event.h>
221 #include <sys/mman.h>
276 #include <sys/extattr.h>
277 #include <sys/mman.h>
278 #include <sys/mount.h>
222279 #include <sys/socket.h>
223280 #include <sys/sockio.h>
224281 #include <sys/sysctl.h>
244301 #include <sys/param.h>
245302 #include <sys/event.h>
246303 #include <sys/mman.h>
304 #include <sys/mount.h>
247305 #include <sys/socket.h>
248306 #include <sys/sockio.h>
307 #include <sys/stat.h>
249308 #include <sys/sysctl.h>
250309 #include <sys/termios.h>
251310 #include <sys/ttycom.h>
311 #include <sys/unistd.h>
252312 #include <sys/wait.h>
253313 #include <net/bpf.h>
254314 #include <net/if.h>
280340 #include <sys/types.h>
281341 #include <sys/socket.h>
282342 #include <sys/sockio.h>
343 #include <sys/stat.h>
283344 #include <sys/mman.h>
284345 #include <sys/wait.h>
285346 #include <sys/ioctl.h>
342403 $2 ~ /^EXTATTR_NAMESPACE_NAMES/ ||
343404 $2 ~ /^EXTATTR_NAMESPACE_[A-Z]+_STRING/ {next}
344405
406 $2 !~ /^ECCAPBITS/ &&
345407 $2 !~ /^ETH_/ &&
346408 $2 !~ /^EPROC_/ &&
347409 $2 !~ /^EQUIV_/ &&
358420 $2 ~ /^IGN/ ||
359421 $2 ~ /^IX(ON|ANY|OFF)$/ ||
360422 $2 ~ /^IN(LCR|PCK)$/ ||
423 $2 !~ "X86_CR3_PCID_NOFLUSH" &&
361424 $2 ~ /(^FLU?SH)|(FLU?SH$)/ ||
362425 $2 ~ /^C(LOCAL|READ|MSPAR|RTSCTS)$/ ||
363426 $2 == "BRKINT" ||
376439 $2 ~ /^TC[IO](ON|OFF)$/ ||
377440 $2 ~ /^IN_/ ||
378441 $2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
379 $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
442 $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
443 $2 ~ /^TP_STATUS_/ ||
380444 $2 ~ /^FALLOC_/ ||
381445 $2 == "ICMPV6_FILTER" ||
382446 $2 == "SOMAXCONN" ||
383447 $2 == "NAME_MAX" ||
384448 $2 == "IFNAMSIZ" ||
385 $2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ ||
449 $2 ~ /^CTL_(HW|KERN|MAXNAME|NET|QUERY)$/ ||
450 $2 ~ /^KERN_(HOSTNAME|OS(RELEASE|TYPE)|VERSION)$/ ||
451 $2 ~ /^HW_MACHINE$/ ||
386452 $2 ~ /^SYSCTL_VERS/ ||
453 $2 !~ "MNT_BITS" &&
387454 $2 ~ /^(MS|MNT|UMOUNT)_/ ||
388455 $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
389 $2 ~ /^(O|F|E?FD|NAME|S|PTRACE|PT)_/ ||
456 $2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT)_/ ||
457 $2 ~ /^KEXEC_/ ||
390458 $2 ~ /^LINUX_REBOOT_CMD_/ ||
391459 $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
460 $2 ~ /^MODULE_INIT_/ ||
392461 $2 !~ "NLA_TYPE_MASK" &&
393 $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ ||
462 $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ ||
394463 $2 ~ /^SIOC/ ||
395464 $2 ~ /^TIOC/ ||
396465 $2 ~ /^TCGET/ ||
405474 $2 ~ /^CLONE_[A-Z_]+/ ||
406475 $2 !~ /^(BPF_TIMEVAL)$/ &&
407476 $2 ~ /^(BPF|DLT)_/ ||
408 $2 ~ /^CLOCK_/ ||
477 $2 ~ /^(CLOCK|TIMER)_/ ||
409478 $2 ~ /^CAN_/ ||
410479 $2 ~ /^CAP_/ ||
411480 $2 ~ /^ALG_/ ||
416485 $2 ~ /^PERF_EVENT_IOC_/ ||
417486 $2 ~ /^SECCOMP_MODE_/ ||
418487 $2 ~ /^SPLICE_/ ||
488 $2 ~ /^SYNC_FILE_RANGE_/ ||
489 $2 !~ /^AUDIT_RECORD_MAGIC/ &&
490 $2 !~ /IOC_MAGIC/ &&
491 $2 ~ /^[A-Z][A-Z0-9_]+_MAGIC2?$/ ||
419492 $2 ~ /^(VM|VMADDR)_/ ||
493 $2 ~ /^IOCTL_VM_SOCKETS_/ ||
420494 $2 ~ /^(TASKSTATS|TS)_/ ||
495 $2 ~ /^CGROUPSTATS_/ ||
421496 $2 ~ /^GENL_/ ||
422 $2 ~ /^XATTR_(CREATE|REPLACE)/ ||
497 $2 ~ /^STATX_/ ||
498 $2 ~ /^RENAME/ ||
499 $2 ~ /^UBI_IOC[A-Z]/ ||
500 $2 ~ /^UTIME_/ ||
501 $2 ~ /^XATTR_(CREATE|REPLACE|NO(DEFAULT|FOLLOW|SECURITY)|SHOWCOMPRESSION)/ ||
502 $2 ~ /^ATTR_(BIT_MAP_COUNT|(CMN|VOL|FILE)_)/ ||
503 $2 ~ /^FSOPT_/ ||
504 $2 ~ /^WDIOC_/ ||
505 $2 ~ /^NFN/ ||
506 $2 ~ /^XDP_/ ||
507 $2 ~ /^(HDIO|WIN|SMART)_/ ||
423508 $2 !~ "WMESGLEN" &&
424509 $2 ~ /^W[A-Z0-9]+$/ ||
510 $2 ~/^PPPIOC/ ||
425511 $2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
426512 $2 ~ /^__WCOREFLAG$/ {next}
427513 $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
443529 signals=$(
444530 echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
445531 awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
446 egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
532 egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
447533 sort
448534 )
449535
453539 sort >_error.grep
454540 echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
455541 awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
456 egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
542 egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
457543 sort >_signal.grep
458544
459545 echo '// mkerrors.sh' "$@"
489575
490576 enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below
491577
492 int errors[] = {
578 struct tuple {
579 int num;
580 const char *name;
581 };
582
583 struct tuple errors[] = {
493584 "
494585 for i in $errors
495586 do
496 echo -E ' '$i,
587 echo -E ' {'$i', "'$i'" },'
497588 done
498589
499590 echo -E "
500591 };
501592
502 int signals[] = {
593 struct tuple signals[] = {
503594 "
504595 for i in $signals
505596 do
506 echo -E ' '$i,
597 echo -E ' {'$i', "'$i'" },'
507598 done
508599
509600 # Use -E because on some systems bash builtin interprets \n itself.
511602 };
512603
513604 static int
514 intcmp(const void *a, const void *b)
605 tuplecmp(const void *a, const void *b)
515606 {
516 return *(int*)a - *(int*)b;
607 return ((struct tuple *)a)->num - ((struct tuple *)b)->num;
517608 }
518609
519610 int
523614 char buf[1024], *p;
524615
525616 printf("\n\n// Error table\n");
526 printf("var errors = [...]string {\n");
527 qsort(errors, nelem(errors), sizeof errors[0], intcmp);
617 printf("var errorList = [...]struct {\n");
618 printf("\tnum syscall.Errno\n");
619 printf("\tname string\n");
620 printf("\tdesc string\n");
621 printf("} {\n");
622 qsort(errors, nelem(errors), sizeof errors[0], tuplecmp);
528623 for(i=0; i<nelem(errors); i++) {
529 e = errors[i];
530 if(i > 0 && errors[i-1] == e)
624 e = errors[i].num;
625 if(i > 0 && errors[i-1].num == e)
531626 continue;
532627 strcpy(buf, strerror(e));
533628 // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
534629 if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
535630 buf[0] += a - A;
536 printf("\t%d: \"%s\",\n", e, buf);
631 printf("\t{ %d, \"%s\", \"%s\" },\n", e, errors[i].name, buf);
537632 }
538633 printf("}\n\n");
539634
540635 printf("\n\n// Signal table\n");
541 printf("var signals = [...]string {\n");
542 qsort(signals, nelem(signals), sizeof signals[0], intcmp);
636 printf("var signalList = [...]struct {\n");
637 printf("\tnum syscall.Signal\n");
638 printf("\tname string\n");
639 printf("\tdesc string\n");
640 printf("} {\n");
641 qsort(signals, nelem(signals), sizeof signals[0], tuplecmp);
543642 for(i=0; i<nelem(signals); i++) {
544 e = signals[i];
545 if(i > 0 && signals[i-1] == e)
643 e = signals[i].num;
644 if(i > 0 && signals[i-1].num == e)
546645 continue;
547646 strcpy(buf, strsignal(e));
548647 // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
552651 p = strrchr(buf, ":"[0]);
553652 if(p)
554653 *p = '\0';
555 printf("\t%d: \"%s\",\n", e, buf);
654 printf("\t{ %d, \"%s\", \"%s\" },\n", e, signals[i].name, buf);
556655 }
557656 printf("}\n\n");
558657
2727 if goarch == "" {
2828 goarch = os.Getenv("GOARCH")
2929 }
30 // Check that we are using the new build system if we should be.
31 if goos == "linux" && goarch != "sparc64" {
30 // Check that we are using the Docker-based build system if we should be.
31 if goos == "linux" {
3232 if os.Getenv("GOLANG_SYS_BUILD") != "docker" {
33 os.Stderr.WriteString("In the new build system, mkpost should not be called directly.\n")
33 os.Stderr.WriteString("In the Docker-based build system, mkpost should not be called directly.\n")
3434 os.Stderr.WriteString("See README.md\n")
3535 os.Exit(1)
3636 }
4040 if err != nil {
4141 log.Fatal(err)
4242 }
43
44 // Intentionally export __val fields in Fsid and Sigset_t
45 valRegex := regexp.MustCompile(`type (Fsid|Sigset_t) struct {(\s+)X__val(\s+\S+\s+)}`)
46 b = valRegex.ReplaceAll(b, []byte("type $1 struct {${2}Val$3}"))
47
48 // Intentionally export __fds_bits field in FdSet
49 fdSetRegex := regexp.MustCompile(`type (FdSet) struct {(\s+)X__fds_bits(\s+\S+\s+)}`)
50 b = fdSetRegex.ReplaceAll(b, []byte("type $1 struct {${2}Bits$3}"))
4351
4452 // If we have empty Ptrace structs, we should delete them. Only s390x emits
4553 // nonempty Ptrace structs.
5563 removeFieldsRegex := regexp.MustCompile(`X__glibc\S*`)
5664 b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
5765
58 // We refuse to export private fields on s390x
59 if goarch == "s390x" && goos == "linux" {
60 // Remove cgo padding fields
61 removeFieldsRegex := regexp.MustCompile(`Pad_cgo_\d+`)
62 b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
66 // Convert [65]int8 to [65]byte in Utsname members to simplify
67 // conversion to string; see golang.org/issue/20753
68 convertUtsnameRegex := regexp.MustCompile(`((Sys|Node|Domain)name|Release|Version|Machine)(\s+)\[(\d+)\]u?int8`)
69 b = convertUtsnameRegex.ReplaceAll(b, []byte("$1$3[$4]byte"))
6370
64 // Remove padding, hidden, or unused fields
65 removeFieldsRegex = regexp.MustCompile(`X_\S+`)
66 b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
67 }
71 // Convert [1024]int8 to [1024]byte in Ptmget members
72 convertPtmget := regexp.MustCompile(`([SC]n)(\s+)\[(\d+)\]u?int8`)
73 b = convertPtmget.ReplaceAll(b, []byte("$1[$3]byte"))
74
75 // Remove spare fields (e.g. in Statx_t)
76 spareFieldsRegex := regexp.MustCompile(`X__spare\S*`)
77 b = spareFieldsRegex.ReplaceAll(b, []byte("_"))
78
79 // Remove cgo padding fields
80 removePaddingFieldsRegex := regexp.MustCompile(`Pad_cgo_\d+`)
81 b = removePaddingFieldsRegex.ReplaceAll(b, []byte("_"))
82
83 // Remove padding, hidden, or unused fields
84 removeFieldsRegex = regexp.MustCompile(`\b(X_\S+|Padding)`)
85 b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
6886
6987 // Remove the first line of warning from cgo
7088 b = b[bytes.IndexByte(b, '\n')+1:]
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build ignore
5
6 /*
7 This program reads a file containing function prototypes
8 (like syscall_darwin.go) and generates system call bodies.
9 The prototypes are marked by lines beginning with "//sys"
10 and read like func declarations if //sys is replaced by func, but:
11 * The parameter lists must give a name for each argument.
12 This includes return parameters.
13 * The parameter lists must give a type for each argument:
14 the (x, y, z int) shorthand is not allowed.
15 * If the return parameter is an error number, it must be named errno.
16
17 A line beginning with //sysnb is like //sys, except that the
18 goroutine will not be suspended during the execution of the system
19 call. This must only be used for system calls which can never
20 block, as otherwise the system call could cause all goroutines to
21 hang.
22 */
23 package main
24
25 import (
26 "bufio"
27 "flag"
28 "fmt"
29 "os"
30 "regexp"
31 "strings"
32 )
33
34 var (
35 b32 = flag.Bool("b32", false, "32bit big-endian")
36 l32 = flag.Bool("l32", false, "32bit little-endian")
37 plan9 = flag.Bool("plan9", false, "plan9")
38 openbsd = flag.Bool("openbsd", false, "openbsd")
39 netbsd = flag.Bool("netbsd", false, "netbsd")
40 dragonfly = flag.Bool("dragonfly", false, "dragonfly")
41 arm = flag.Bool("arm", false, "arm") // 64-bit value should use (even, odd)-pair
42 tags = flag.String("tags", "", "build tags")
43 filename = flag.String("output", "", "output file name (standard output if omitted)")
44 )
45
46 // cmdLine returns this programs's commandline arguments
47 func cmdLine() string {
48 return "go run mksyscall.go " + strings.Join(os.Args[1:], " ")
49 }
50
51 // buildTags returns build tags
52 func buildTags() string {
53 return *tags
54 }
55
56 // Param is function parameter
57 type Param struct {
58 Name string
59 Type string
60 }
61
62 // usage prints the program usage
63 func usage() {
64 fmt.Fprintf(os.Stderr, "usage: go run mksyscall.go [-b32 | -l32] [-tags x,y] [file ...]\n")
65 os.Exit(1)
66 }
67
68 // parseParamList parses parameter list and returns a slice of parameters
69 func parseParamList(list string) []string {
70 list = strings.TrimSpace(list)
71 if list == "" {
72 return []string{}
73 }
74 return regexp.MustCompile(`\s*,\s*`).Split(list, -1)
75 }
76
77 // parseParam splits a parameter into name and type
78 func parseParam(p string) Param {
79 ps := regexp.MustCompile(`^(\S*) (\S*)$`).FindStringSubmatch(p)
80 if ps == nil {
81 fmt.Fprintf(os.Stderr, "malformed parameter: %s\n", p)
82 os.Exit(1)
83 }
84 return Param{ps[1], ps[2]}
85 }
86
87 func main() {
88 // Get the OS and architecture (using GOARCH_TARGET if it exists)
89 goos := os.Getenv("GOOS")
90 goarch := os.Getenv("GOARCH_TARGET")
91 if goarch == "" {
92 goarch = os.Getenv("GOARCH")
93 }
94
95 // Check that we are using the Docker-based build system if we should
96 if goos == "linux" {
97 if os.Getenv("GOLANG_SYS_BUILD") != "docker" {
98 fmt.Fprintf(os.Stderr, "In the Docker-based build system, mksyscall should not be called directly.\n")
99 fmt.Fprintf(os.Stderr, "See README.md\n")
100 os.Exit(1)
101 }
102 }
103
104 flag.Usage = usage
105 flag.Parse()
106 if len(flag.Args()) <= 0 {
107 fmt.Fprintf(os.Stderr, "no files to parse provided\n")
108 usage()
109 }
110
111 endianness := ""
112 if *b32 {
113 endianness = "big-endian"
114 } else if *l32 {
115 endianness = "little-endian"
116 }
117
118 libc := false
119 if goos == "darwin" && strings.Contains(buildTags(), ",go1.12") {
120 libc = true
121 }
122 trampolines := map[string]bool{}
123
124 text := ""
125 for _, path := range flag.Args() {
126 file, err := os.Open(path)
127 if err != nil {
128 fmt.Fprintf(os.Stderr, err.Error())
129 os.Exit(1)
130 }
131 s := bufio.NewScanner(file)
132 for s.Scan() {
133 t := s.Text()
134 t = strings.TrimSpace(t)
135 t = regexp.MustCompile(`\s+`).ReplaceAllString(t, ` `)
136 nonblock := regexp.MustCompile(`^\/\/sysnb `).FindStringSubmatch(t)
137 if regexp.MustCompile(`^\/\/sys `).FindStringSubmatch(t) == nil && nonblock == nil {
138 continue
139 }
140
141 // Line must be of the form
142 // func Open(path string, mode int, perm int) (fd int, errno error)
143 // Split into name, in params, out params.
144 f := regexp.MustCompile(`^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$`).FindStringSubmatch(t)
145 if f == nil {
146 fmt.Fprintf(os.Stderr, "%s:%s\nmalformed //sys declaration\n", path, t)
147 os.Exit(1)
148 }
149 funct, inps, outps, sysname := f[2], f[3], f[4], f[5]
150
151 // Split argument lists on comma.
152 in := parseParamList(inps)
153 out := parseParamList(outps)
154
155 // Try in vain to keep people from editing this file.
156 // The theory is that they jump into the middle of the file
157 // without reading the header.
158 text += "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"
159
160 // Go function header.
161 outDecl := ""
162 if len(out) > 0 {
163 outDecl = fmt.Sprintf(" (%s)", strings.Join(out, ", "))
164 }
165 text += fmt.Sprintf("func %s(%s)%s {\n", funct, strings.Join(in, ", "), outDecl)
166
167 // Check if err return available
168 errvar := ""
169 for _, param := range out {
170 p := parseParam(param)
171 if p.Type == "error" {
172 errvar = p.Name
173 break
174 }
175 }
176
177 // Prepare arguments to Syscall.
178 var args []string
179 n := 0
180 for _, param := range in {
181 p := parseParam(param)
182 if regexp.MustCompile(`^\*`).FindStringSubmatch(p.Type) != nil {
183 args = append(args, "uintptr(unsafe.Pointer("+p.Name+"))")
184 } else if p.Type == "string" && errvar != "" {
185 text += fmt.Sprintf("\tvar _p%d *byte\n", n)
186 text += fmt.Sprintf("\t_p%d, %s = BytePtrFromString(%s)\n", n, errvar, p.Name)
187 text += fmt.Sprintf("\tif %s != nil {\n\t\treturn\n\t}\n", errvar)
188 args = append(args, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n))
189 n++
190 } else if p.Type == "string" {
191 fmt.Fprintf(os.Stderr, path+":"+funct+" uses string arguments, but has no error return\n")
192 text += fmt.Sprintf("\tvar _p%d *byte\n", n)
193 text += fmt.Sprintf("\t_p%d, _ = BytePtrFromString(%s)\n", n, p.Name)
194 args = append(args, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n))
195 n++
196 } else if regexp.MustCompile(`^\[\](.*)`).FindStringSubmatch(p.Type) != nil {
197 // Convert slice into pointer, length.
198 // Have to be careful not to take address of &a[0] if len == 0:
199 // pass dummy pointer in that case.
200 // Used to pass nil, but some OSes or simulators reject write(fd, nil, 0).
201 text += fmt.Sprintf("\tvar _p%d unsafe.Pointer\n", n)
202 text += fmt.Sprintf("\tif len(%s) > 0 {\n\t\t_p%d = unsafe.Pointer(&%s[0])\n\t}", p.Name, n, p.Name)
203 text += fmt.Sprintf(" else {\n\t\t_p%d = unsafe.Pointer(&_zero)\n\t}\n", n)
204 args = append(args, fmt.Sprintf("uintptr(_p%d)", n), fmt.Sprintf("uintptr(len(%s))", p.Name))
205 n++
206 } else if p.Type == "int64" && (*openbsd || *netbsd) {
207 args = append(args, "0")
208 if endianness == "big-endian" {
209 args = append(args, fmt.Sprintf("uintptr(%s>>32)", p.Name), fmt.Sprintf("uintptr(%s)", p.Name))
210 } else if endianness == "little-endian" {
211 args = append(args, fmt.Sprintf("uintptr(%s)", p.Name), fmt.Sprintf("uintptr(%s>>32)", p.Name))
212 } else {
213 args = append(args, fmt.Sprintf("uintptr(%s)", p.Name))
214 }
215 } else if p.Type == "int64" && *dragonfly {
216 if regexp.MustCompile(`^(?i)extp(read|write)`).FindStringSubmatch(funct) == nil {
217 args = append(args, "0")
218 }
219 if endianness == "big-endian" {
220 args = append(args, fmt.Sprintf("uintptr(%s>>32)", p.Name), fmt.Sprintf("uintptr(%s)", p.Name))
221 } else if endianness == "little-endian" {
222 args = append(args, fmt.Sprintf("uintptr(%s)", p.Name), fmt.Sprintf("uintptr(%s>>32)", p.Name))
223 } else {
224 args = append(args, fmt.Sprintf("uintptr(%s)", p.Name))
225 }
226 } else if p.Type == "int64" && endianness != "" {
227 if len(args)%2 == 1 && *arm {
228 // arm abi specifies 64-bit argument uses
229 // (even, odd) pair
230 args = append(args, "0")
231 }
232 if endianness == "big-endian" {
233 args = append(args, fmt.Sprintf("uintptr(%s>>32)", p.Name), fmt.Sprintf("uintptr(%s)", p.Name))
234 } else {
235 args = append(args, fmt.Sprintf("uintptr(%s)", p.Name), fmt.Sprintf("uintptr(%s>>32)", p.Name))
236 }
237 } else {
238 args = append(args, fmt.Sprintf("uintptr(%s)", p.Name))
239 }
240 }
241
242 // Determine which form to use; pad args with zeros.
243 asm := "Syscall"
244 if nonblock != nil {
245 if errvar == "" && goos == "linux" {
246 asm = "RawSyscallNoError"
247 } else {
248 asm = "RawSyscall"
249 }
250 } else {
251 if errvar == "" && goos == "linux" {
252 asm = "SyscallNoError"
253 }
254 }
255 if len(args) <= 3 {
256 for len(args) < 3 {
257 args = append(args, "0")
258 }
259 } else if len(args) <= 6 {
260 asm += "6"
261 for len(args) < 6 {
262 args = append(args, "0")
263 }
264 } else if len(args) <= 9 {
265 asm += "9"
266 for len(args) < 9 {
267 args = append(args, "0")
268 }
269 } else {
270 fmt.Fprintf(os.Stderr, "%s:%s too many arguments to system call\n", path, funct)
271 }
272
273 // System call number.
274 if sysname == "" {
275 sysname = "SYS_" + funct
276 sysname = regexp.MustCompile(`([a-z])([A-Z])`).ReplaceAllString(sysname, `${1}_$2`)
277 sysname = strings.ToUpper(sysname)
278 }
279
280 var libcFn string
281 if libc {
282 asm = "syscall_" + strings.ToLower(asm[:1]) + asm[1:] // internal syscall call
283 sysname = strings.TrimPrefix(sysname, "SYS_") // remove SYS_
284 sysname = strings.ToLower(sysname) // lowercase
285 if sysname == "getdirentries64" {
286 // Special case - libSystem name and
287 // raw syscall name don't match.
288 sysname = "__getdirentries64"
289 }
290 libcFn = sysname
291 sysname = "funcPC(libc_" + sysname + "_trampoline)"
292 }
293
294 // Actual call.
295 arglist := strings.Join(args, ", ")
296 call := fmt.Sprintf("%s(%s, %s)", asm, sysname, arglist)
297
298 // Assign return values.
299 body := ""
300 ret := []string{"_", "_", "_"}
301 doErrno := false
302 for i := 0; i < len(out); i++ {
303 p := parseParam(out[i])
304 reg := ""
305 if p.Name == "err" && !*plan9 {
306 reg = "e1"
307 ret[2] = reg
308 doErrno = true
309 } else if p.Name == "err" && *plan9 {
310 ret[0] = "r0"
311 ret[2] = "e1"
312 break
313 } else {
314 reg = fmt.Sprintf("r%d", i)
315 ret[i] = reg
316 }
317 if p.Type == "bool" {
318 reg = fmt.Sprintf("%s != 0", reg)
319 }
320 if p.Type == "int64" && endianness != "" {
321 // 64-bit number in r1:r0 or r0:r1.
322 if i+2 > len(out) {
323 fmt.Fprintf(os.Stderr, "%s:%s not enough registers for int64 return\n", path, funct)
324 }
325 if endianness == "big-endian" {
326 reg = fmt.Sprintf("int64(r%d)<<32 | int64(r%d)", i, i+1)
327 } else {
328 reg = fmt.Sprintf("int64(r%d)<<32 | int64(r%d)", i+1, i)
329 }
330 ret[i] = fmt.Sprintf("r%d", i)
331 ret[i+1] = fmt.Sprintf("r%d", i+1)
332 }
333 if reg != "e1" || *plan9 {
334 body += fmt.Sprintf("\t%s = %s(%s)\n", p.Name, p.Type, reg)
335 }
336 }
337 if ret[0] == "_" && ret[1] == "_" && ret[2] == "_" {
338 text += fmt.Sprintf("\t%s\n", call)
339 } else {
340 if errvar == "" && goos == "linux" {
341 // raw syscall without error on Linux, see golang.org/issue/22924
342 text += fmt.Sprintf("\t%s, %s := %s\n", ret[0], ret[1], call)
343 } else {
344 text += fmt.Sprintf("\t%s, %s, %s := %s\n", ret[0], ret[1], ret[2], call)
345 }
346 }
347 text += body
348
349 if *plan9 && ret[2] == "e1" {
350 text += "\tif int32(r0) == -1 {\n"
351 text += "\t\terr = e1\n"
352 text += "\t}\n"
353 } else if doErrno {
354 text += "\tif e1 != 0 {\n"
355 text += "\t\terr = errnoErr(e1)\n"
356 text += "\t}\n"
357 }
358 text += "\treturn\n"
359 text += "}\n\n"
360
361 if libc && !trampolines[libcFn] {
362 // some system calls share a trampoline, like read and readlen.
363 trampolines[libcFn] = true
364 // Declare assembly trampoline.
365 text += fmt.Sprintf("func libc_%s_trampoline()\n", libcFn)
366 // Assembly trampoline calls the libc_* function, which this magic
367 // redirects to use the function from libSystem.
368 text += fmt.Sprintf("//go:linkname libc_%s libc_%s\n", libcFn, libcFn)
369 text += fmt.Sprintf("//go:cgo_import_dynamic libc_%s %s \"/usr/lib/libSystem.B.dylib\"\n", libcFn, libcFn)
370 text += "\n"
371 }
372 }
373 if err := s.Err(); err != nil {
374 fmt.Fprintf(os.Stderr, err.Error())
375 os.Exit(1)
376 }
377 file.Close()
378 }
379 fmt.Printf(srcTemplate, cmdLine(), buildTags(), text)
380 }
381
382 const srcTemplate = `// %s
383 // Code generated by the command above; see README.md. DO NOT EDIT.
384
385 // +build %s
386
387 package unix
388
389 import (
390 "syscall"
391 "unsafe"
392 )
393
394 var _ syscall.Errno
395
396 %s
397 `
+0
-328
vendor/golang.org/x/sys/unix/mksyscall.pl less more
0 #!/usr/bin/env perl
1 # Copyright 2009 The Go Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style
3 # license that can be found in the LICENSE file.
4
5 # This program reads a file containing function prototypes
6 # (like syscall_darwin.go) and generates system call bodies.
7 # The prototypes are marked by lines beginning with "//sys"
8 # and read like func declarations if //sys is replaced by func, but:
9 # * The parameter lists must give a name for each argument.
10 # This includes return parameters.
11 # * The parameter lists must give a type for each argument:
12 # the (x, y, z int) shorthand is not allowed.
13 # * If the return parameter is an error number, it must be named errno.
14
15 # A line beginning with //sysnb is like //sys, except that the
16 # goroutine will not be suspended during the execution of the system
17 # call. This must only be used for system calls which can never
18 # block, as otherwise the system call could cause all goroutines to
19 # hang.
20
21 use strict;
22
23 my $cmdline = "mksyscall.pl " . join(' ', @ARGV);
24 my $errors = 0;
25 my $_32bit = "";
26 my $plan9 = 0;
27 my $openbsd = 0;
28 my $netbsd = 0;
29 my $dragonfly = 0;
30 my $arm = 0; # 64-bit value should use (even, odd)-pair
31 my $tags = ""; # build tags
32
33 if($ARGV[0] eq "-b32") {
34 $_32bit = "big-endian";
35 shift;
36 } elsif($ARGV[0] eq "-l32") {
37 $_32bit = "little-endian";
38 shift;
39 }
40 if($ARGV[0] eq "-plan9") {
41 $plan9 = 1;
42 shift;
43 }
44 if($ARGV[0] eq "-openbsd") {
45 $openbsd = 1;
46 shift;
47 }
48 if($ARGV[0] eq "-netbsd") {
49 $netbsd = 1;
50 shift;
51 }
52 if($ARGV[0] eq "-dragonfly") {
53 $dragonfly = 1;
54 shift;
55 }
56 if($ARGV[0] eq "-arm") {
57 $arm = 1;
58 shift;
59 }
60 if($ARGV[0] eq "-tags") {
61 shift;
62 $tags = $ARGV[0];
63 shift;
64 }
65
66 if($ARGV[0] =~ /^-/) {
67 print STDERR "usage: mksyscall.pl [-b32 | -l32] [-tags x,y] [file ...]\n";
68 exit 1;
69 }
70
71 # Check that we are using the new build system if we should
72 if($ENV{'GOOS'} eq "linux" && $ENV{'GOARCH'} ne "sparc64") {
73 if($ENV{'GOLANG_SYS_BUILD'} ne "docker") {
74 print STDERR "In the new build system, mksyscall should not be called directly.\n";
75 print STDERR "See README.md\n";
76 exit 1;
77 }
78 }
79
80
81 sub parseparamlist($) {
82 my ($list) = @_;
83 $list =~ s/^\s*//;
84 $list =~ s/\s*$//;
85 if($list eq "") {
86 return ();
87 }
88 return split(/\s*,\s*/, $list);
89 }
90
91 sub parseparam($) {
92 my ($p) = @_;
93 if($p !~ /^(\S*) (\S*)$/) {
94 print STDERR "$ARGV:$.: malformed parameter: $p\n";
95 $errors = 1;
96 return ("xx", "int");
97 }
98 return ($1, $2);
99 }
100
101 my $text = "";
102 while(<>) {
103 chomp;
104 s/\s+/ /g;
105 s/^\s+//;
106 s/\s+$//;
107 my $nonblock = /^\/\/sysnb /;
108 next if !/^\/\/sys / && !$nonblock;
109
110 # Line must be of the form
111 # func Open(path string, mode int, perm int) (fd int, errno error)
112 # Split into name, in params, out params.
113 if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) {
114 print STDERR "$ARGV:$.: malformed //sys declaration\n";
115 $errors = 1;
116 next;
117 }
118 my ($func, $in, $out, $sysname) = ($2, $3, $4, $5);
119
120 # Split argument lists on comma.
121 my @in = parseparamlist($in);
122 my @out = parseparamlist($out);
123
124 # Try in vain to keep people from editing this file.
125 # The theory is that they jump into the middle of the file
126 # without reading the header.
127 $text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
128
129 # Go function header.
130 my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : "";
131 $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl;
132
133 # Check if err return available
134 my $errvar = "";
135 foreach my $p (@out) {
136 my ($name, $type) = parseparam($p);
137 if($type eq "error") {
138 $errvar = $name;
139 last;
140 }
141 }
142
143 # Prepare arguments to Syscall.
144 my @args = ();
145 my $n = 0;
146 foreach my $p (@in) {
147 my ($name, $type) = parseparam($p);
148 if($type =~ /^\*/) {
149 push @args, "uintptr(unsafe.Pointer($name))";
150 } elsif($type eq "string" && $errvar ne "") {
151 $text .= "\tvar _p$n *byte\n";
152 $text .= "\t_p$n, $errvar = BytePtrFromString($name)\n";
153 $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
154 push @args, "uintptr(unsafe.Pointer(_p$n))";
155 $n++;
156 } elsif($type eq "string") {
157 print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
158 $text .= "\tvar _p$n *byte\n";
159 $text .= "\t_p$n, _ = BytePtrFromString($name)\n";
160 push @args, "uintptr(unsafe.Pointer(_p$n))";
161 $n++;
162 } elsif($type =~ /^\[\](.*)/) {
163 # Convert slice into pointer, length.
164 # Have to be careful not to take address of &a[0] if len == 0:
165 # pass dummy pointer in that case.
166 # Used to pass nil, but some OSes or simulators reject write(fd, nil, 0).
167 $text .= "\tvar _p$n unsafe.Pointer\n";
168 $text .= "\tif len($name) > 0 {\n\t\t_p$n = unsafe.Pointer(\&${name}[0])\n\t}";
169 $text .= " else {\n\t\t_p$n = unsafe.Pointer(&_zero)\n\t}";
170 $text .= "\n";
171 push @args, "uintptr(_p$n)", "uintptr(len($name))";
172 $n++;
173 } elsif($type eq "int64" && ($openbsd || $netbsd)) {
174 push @args, "0";
175 if($_32bit eq "big-endian") {
176 push @args, "uintptr($name>>32)", "uintptr($name)";
177 } elsif($_32bit eq "little-endian") {
178 push @args, "uintptr($name)", "uintptr($name>>32)";
179 } else {
180 push @args, "uintptr($name)";
181 }
182 } elsif($type eq "int64" && $dragonfly) {
183 if ($func !~ /^extp(read|write)/i) {
184 push @args, "0";
185 }
186 if($_32bit eq "big-endian") {
187 push @args, "uintptr($name>>32)", "uintptr($name)";
188 } elsif($_32bit eq "little-endian") {
189 push @args, "uintptr($name)", "uintptr($name>>32)";
190 } else {
191 push @args, "uintptr($name)";
192 }
193 } elsif($type eq "int64" && $_32bit ne "") {
194 if(@args % 2 && $arm) {
195 # arm abi specifies 64-bit argument uses
196 # (even, odd) pair
197 push @args, "0"
198 }
199 if($_32bit eq "big-endian") {
200 push @args, "uintptr($name>>32)", "uintptr($name)";
201 } else {
202 push @args, "uintptr($name)", "uintptr($name>>32)";
203 }
204 } else {
205 push @args, "uintptr($name)";
206 }
207 }
208
209 # Determine which form to use; pad args with zeros.
210 my $asm = "Syscall";
211 if ($nonblock) {
212 $asm = "RawSyscall";
213 }
214 if(@args <= 3) {
215 while(@args < 3) {
216 push @args, "0";
217 }
218 } elsif(@args <= 6) {
219 $asm .= "6";
220 while(@args < 6) {
221 push @args, "0";
222 }
223 } elsif(@args <= 9) {
224 $asm .= "9";
225 while(@args < 9) {
226 push @args, "0";
227 }
228 } else {
229 print STDERR "$ARGV:$.: too many arguments to system call\n";
230 }
231
232 # System call number.
233 if($sysname eq "") {
234 $sysname = "SYS_$func";
235 $sysname =~ s/([a-z])([A-Z])/${1}_$2/g; # turn FooBar into Foo_Bar
236 $sysname =~ y/a-z/A-Z/;
237 }
238
239 # Actual call.
240 my $args = join(', ', @args);
241 my $call = "$asm($sysname, $args)";
242
243 # Assign return values.
244 my $body = "";
245 my @ret = ("_", "_", "_");
246 my $do_errno = 0;
247 for(my $i=0; $i<@out; $i++) {
248 my $p = $out[$i];
249 my ($name, $type) = parseparam($p);
250 my $reg = "";
251 if($name eq "err" && !$plan9) {
252 $reg = "e1";
253 $ret[2] = $reg;
254 $do_errno = 1;
255 } elsif($name eq "err" && $plan9) {
256 $ret[0] = "r0";
257 $ret[2] = "e1";
258 next;
259 } else {
260 $reg = sprintf("r%d", $i);
261 $ret[$i] = $reg;
262 }
263 if($type eq "bool") {
264 $reg = "$reg != 0";
265 }
266 if($type eq "int64" && $_32bit ne "") {
267 # 64-bit number in r1:r0 or r0:r1.
268 if($i+2 > @out) {
269 print STDERR "$ARGV:$.: not enough registers for int64 return\n";
270 }
271 if($_32bit eq "big-endian") {
272 $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
273 } else {
274 $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
275 }
276 $ret[$i] = sprintf("r%d", $i);
277 $ret[$i+1] = sprintf("r%d", $i+1);
278 }
279 if($reg ne "e1" || $plan9) {
280 $body .= "\t$name = $type($reg)\n";
281 }
282 }
283 if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
284 $text .= "\t$call\n";
285 } else {
286 $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
287 }
288 $text .= $body;
289
290 if ($plan9 && $ret[2] eq "e1") {
291 $text .= "\tif int32(r0) == -1 {\n";
292 $text .= "\t\terr = e1\n";
293 $text .= "\t}\n";
294 } elsif ($do_errno) {
295 $text .= "\tif e1 != 0 {\n";
296 $text .= "\t\terr = errnoErr(e1)\n";
297 $text .= "\t}\n";
298 }
299 $text .= "\treturn\n";
300 $text .= "}\n\n";
301 }
302
303 chomp $text;
304 chomp $text;
305
306 if($errors) {
307 exit 1;
308 }
309
310 print <<EOF;
311 // $cmdline
312 // Code generated by the command above; see README.md. DO NOT EDIT.
313
314 // +build $tags
315
316 package unix
317
318 import (
319 "syscall"
320 "unsafe"
321 )
322
323 var _ syscall.Errno
324
325 $text
326 EOF
327 exit 0;
0 // Copyright 2019 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build ignore
5
6 /*
7 This program reads a file containing function prototypes
8 (like syscall_aix.go) and generates system call bodies.
9 The prototypes are marked by lines beginning with "//sys"
10 and read like func declarations if //sys is replaced by func, but:
11 * The parameter lists must give a name for each argument.
12 This includes return parameters.
13 * The parameter lists must give a type for each argument:
14 the (x, y, z int) shorthand is not allowed.
15 * If the return parameter is an error number, it must be named err.
16 * If go func name needs to be different than its libc name,
17 * or the function is not in libc, name could be specified
18 * at the end, after "=" sign, like
19 //sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
20 */
21 package main
22
23 import (
24 "bufio"
25 "flag"
26 "fmt"
27 "os"
28 "regexp"
29 "strings"
30 )
31
32 var (
33 b32 = flag.Bool("b32", false, "32bit big-endian")
34 l32 = flag.Bool("l32", false, "32bit little-endian")
35 aix = flag.Bool("aix", false, "aix")
36 tags = flag.String("tags", "", "build tags")
37 )
38
39 // cmdLine returns this programs's commandline arguments
40 func cmdLine() string {
41 return "go run mksyscall_aix_ppc.go " + strings.Join(os.Args[1:], " ")
42 }
43
44 // buildTags returns build tags
45 func buildTags() string {
46 return *tags
47 }
48
49 // Param is function parameter
50 type Param struct {
51 Name string
52 Type string
53 }
54
55 // usage prints the program usage
56 func usage() {
57 fmt.Fprintf(os.Stderr, "usage: go run mksyscall_aix_ppc.go [-b32 | -l32] [-tags x,y] [file ...]\n")
58 os.Exit(1)
59 }
60
61 // parseParamList parses parameter list and returns a slice of parameters
62 func parseParamList(list string) []string {
63 list = strings.TrimSpace(list)
64 if list == "" {
65 return []string{}
66 }
67 return regexp.MustCompile(`\s*,\s*`).Split(list, -1)
68 }
69
70 // parseParam splits a parameter into name and type
71 func parseParam(p string) Param {
72 ps := regexp.MustCompile(`^(\S*) (\S*)$`).FindStringSubmatch(p)
73 if ps == nil {
74 fmt.Fprintf(os.Stderr, "malformed parameter: %s\n", p)
75 os.Exit(1)
76 }
77 return Param{ps[1], ps[2]}
78 }
79
80 func main() {
81 flag.Usage = usage
82 flag.Parse()
83 if len(flag.Args()) <= 0 {
84 fmt.Fprintf(os.Stderr, "no files to parse provided\n")
85 usage()
86 }
87
88 endianness := ""
89 if *b32 {
90 endianness = "big-endian"
91 } else if *l32 {
92 endianness = "little-endian"
93 }
94
95 pack := ""
96 text := ""
97 cExtern := "/*\n#include <stdint.h>\n#include <stddef.h>\n"
98 for _, path := range flag.Args() {
99 file, err := os.Open(path)
100 if err != nil {
101 fmt.Fprintf(os.Stderr, err.Error())
102 os.Exit(1)
103 }
104 s := bufio.NewScanner(file)
105 for s.Scan() {
106 t := s.Text()
107 t = strings.TrimSpace(t)
108 t = regexp.MustCompile(`\s+`).ReplaceAllString(t, ` `)
109 if p := regexp.MustCompile(`^package (\S+)$`).FindStringSubmatch(t); p != nil && pack == "" {
110 pack = p[1]
111 }
112 nonblock := regexp.MustCompile(`^\/\/sysnb `).FindStringSubmatch(t)
113 if regexp.MustCompile(`^\/\/sys `).FindStringSubmatch(t) == nil && nonblock == nil {
114 continue
115 }
116
117 // Line must be of the form
118 // func Open(path string, mode int, perm int) (fd int, err error)
119 // Split into name, in params, out params.
120 f := regexp.MustCompile(`^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$`).FindStringSubmatch(t)
121 if f == nil {
122 fmt.Fprintf(os.Stderr, "%s:%s\nmalformed //sys declaration\n", path, t)
123 os.Exit(1)
124 }
125 funct, inps, outps, modname, sysname := f[2], f[3], f[4], f[5], f[6]
126
127 // Split argument lists on comma.
128 in := parseParamList(inps)
129 out := parseParamList(outps)
130
131 inps = strings.Join(in, ", ")
132 outps = strings.Join(out, ", ")
133
134 // Try in vain to keep people from editing this file.
135 // The theory is that they jump into the middle of the file
136 // without reading the header.
137 text += "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"
138
139 // Check if value return, err return available
140 errvar := ""
141 retvar := ""
142 rettype := ""
143 for _, param := range out {
144 p := parseParam(param)
145 if p.Type == "error" {
146 errvar = p.Name
147 } else {
148 retvar = p.Name
149 rettype = p.Type
150 }
151 }
152
153 // System call name.
154 if sysname == "" {
155 sysname = funct
156 }
157 sysname = regexp.MustCompile(`([a-z])([A-Z])`).ReplaceAllString(sysname, `${1}_$2`)
158 sysname = strings.ToLower(sysname) // All libc functions are lowercase.
159
160 cRettype := ""
161 if rettype == "unsafe.Pointer" {
162 cRettype = "uintptr_t"
163 } else if rettype == "uintptr" {
164 cRettype = "uintptr_t"
165 } else if regexp.MustCompile(`^_`).FindStringSubmatch(rettype) != nil {
166 cRettype = "uintptr_t"
167 } else if rettype == "int" {
168 cRettype = "int"
169 } else if rettype == "int32" {
170 cRettype = "int"
171 } else if rettype == "int64" {
172 cRettype = "long long"
173 } else if rettype == "uint32" {
174 cRettype = "unsigned int"
175 } else if rettype == "uint64" {
176 cRettype = "unsigned long long"
177 } else {
178 cRettype = "int"
179 }
180 if sysname == "exit" {
181 cRettype = "void"
182 }
183
184 // Change p.Types to c
185 var cIn []string
186 for _, param := range in {
187 p := parseParam(param)
188 if regexp.MustCompile(`^\*`).FindStringSubmatch(p.Type) != nil {
189 cIn = append(cIn, "uintptr_t")
190 } else if p.Type == "string" {
191 cIn = append(cIn, "uintptr_t")
192 } else if regexp.MustCompile(`^\[\](.*)`).FindStringSubmatch(p.Type) != nil {
193 cIn = append(cIn, "uintptr_t", "size_t")
194 } else if p.Type == "unsafe.Pointer" {
195 cIn = append(cIn, "uintptr_t")
196 } else if p.Type == "uintptr" {
197 cIn = append(cIn, "uintptr_t")
198 } else if regexp.MustCompile(`^_`).FindStringSubmatch(p.Type) != nil {
199 cIn = append(cIn, "uintptr_t")
200 } else if p.Type == "int" {
201 cIn = append(cIn, "int")
202 } else if p.Type == "int32" {
203 cIn = append(cIn, "int")
204 } else if p.Type == "int64" {
205 cIn = append(cIn, "long long")
206 } else if p.Type == "uint32" {
207 cIn = append(cIn, "unsigned int")
208 } else if p.Type == "uint64" {
209 cIn = append(cIn, "unsigned long long")
210 } else {
211 cIn = append(cIn, "int")
212 }
213 }
214
215 if funct != "fcntl" && funct != "FcntlInt" && funct != "readlen" && funct != "writelen" {
216 // Imports of system calls from libc
217 cExtern += fmt.Sprintf("%s %s", cRettype, sysname)
218 cIn := strings.Join(cIn, ", ")
219 cExtern += fmt.Sprintf("(%s);\n", cIn)
220 }
221
222 // So file name.
223 if *aix {
224 if modname == "" {
225 modname = "libc.a/shr_64.o"
226 } else {
227 fmt.Fprintf(os.Stderr, "%s: only syscall using libc are available\n", funct)
228 os.Exit(1)
229 }
230 }
231
232 strconvfunc := "C.CString"
233
234 // Go function header.
235 if outps != "" {
236 outps = fmt.Sprintf(" (%s)", outps)
237 }
238 if text != "" {
239 text += "\n"
240 }
241
242 text += fmt.Sprintf("func %s(%s)%s {\n", funct, strings.Join(in, ", "), outps)
243
244 // Prepare arguments to Syscall.
245 var args []string
246 n := 0
247 argN := 0
248 for _, param := range in {
249 p := parseParam(param)
250 if regexp.MustCompile(`^\*`).FindStringSubmatch(p.Type) != nil {
251 args = append(args, "C.uintptr_t(uintptr(unsafe.Pointer("+p.Name+")))")
252 } else if p.Type == "string" && errvar != "" {
253 text += fmt.Sprintf("\t_p%d := uintptr(unsafe.Pointer(%s(%s)))\n", n, strconvfunc, p.Name)
254 args = append(args, fmt.Sprintf("C.uintptr_t(_p%d)", n))
255 n++
256 } else if p.Type == "string" {
257 fmt.Fprintf(os.Stderr, path+":"+funct+" uses string arguments, but has no error return\n")
258 text += fmt.Sprintf("\t_p%d := uintptr(unsafe.Pointer(%s(%s)))\n", n, strconvfunc, p.Name)
259 args = append(args, fmt.Sprintf("C.uintptr_t(_p%d)", n))
260 n++
261 } else if m := regexp.MustCompile(`^\[\](.*)`).FindStringSubmatch(p.Type); m != nil {
262 // Convert slice into pointer, length.
263 // Have to be careful not to take address of &a[0] if len == 0:
264 // pass nil in that case.
265 text += fmt.Sprintf("\tvar _p%d *%s\n", n, m[1])
266 text += fmt.Sprintf("\tif len(%s) > 0 {\n\t\t_p%d = &%s[0]\n\t}\n", p.Name, n, p.Name)
267 args = append(args, fmt.Sprintf("C.uintptr_t(uintptr(unsafe.Pointer(_p%d)))", n))
268 n++
269 text += fmt.Sprintf("\tvar _p%d int\n", n)
270 text += fmt.Sprintf("\t_p%d = len(%s)\n", n, p.Name)
271 args = append(args, fmt.Sprintf("C.size_t(_p%d)", n))
272 n++
273 } else if p.Type == "int64" && endianness != "" {
274 if endianness == "big-endian" {
275 args = append(args, fmt.Sprintf("uintptr(%s>>32)", p.Name), fmt.Sprintf("uintptr(%s)", p.Name))
276 } else {
277 args = append(args, fmt.Sprintf("uintptr(%s)", p.Name), fmt.Sprintf("uintptr(%s>>32)", p.Name))
278 }
279 n++
280 } else if p.Type == "bool" {
281 text += fmt.Sprintf("\tvar _p%d uint32\n", n)
282 text += fmt.Sprintf("\tif %s {\n\t\t_p%d = 1\n\t} else {\n\t\t_p%d = 0\n\t}\n", p.Name, n, n)
283 args = append(args, fmt.Sprintf("_p%d", n))
284 } else if regexp.MustCompile(`^_`).FindStringSubmatch(p.Type) != nil {
285 args = append(args, fmt.Sprintf("C.uintptr_t(uintptr(%s))", p.Name))
286 } else if p.Type == "unsafe.Pointer" {
287 args = append(args, fmt.Sprintf("C.uintptr_t(uintptr(%s))", p.Name))
288 } else if p.Type == "int" {
289 if (argN == 2) && ((funct == "readlen") || (funct == "writelen")) {
290 args = append(args, fmt.Sprintf("C.size_t(%s)", p.Name))
291 } else if argN == 0 && funct == "fcntl" {
292 args = append(args, fmt.Sprintf("C.uintptr_t(%s)", p.Name))
293 } else if (argN == 2) && ((funct == "fcntl") || (funct == "FcntlInt")) {
294 args = append(args, fmt.Sprintf("C.uintptr_t(%s)", p.Name))
295 } else {
296 args = append(args, fmt.Sprintf("C.int(%s)", p.Name))
297 }
298 } else if p.Type == "int32" {
299 args = append(args, fmt.Sprintf("C.int(%s)", p.Name))
300 } else if p.Type == "int64" {
301 args = append(args, fmt.Sprintf("C.longlong(%s)", p.Name))
302 } else if p.Type == "uint32" {
303 args = append(args, fmt.Sprintf("C.uint(%s)", p.Name))
304 } else if p.Type == "uint64" {
305 args = append(args, fmt.Sprintf("C.ulonglong(%s)", p.Name))
306 } else if p.Type == "uintptr" {
307 args = append(args, fmt.Sprintf("C.uintptr_t(%s)", p.Name))
308 } else {
309 args = append(args, fmt.Sprintf("C.int(%s)", p.Name))
310 }
311 argN++
312 }
313
314 // Actual call.
315 arglist := strings.Join(args, ", ")
316 call := ""
317 if sysname == "exit" {
318 if errvar != "" {
319 call += "er :="
320 } else {
321 call += ""
322 }
323 } else if errvar != "" {
324 call += "r0,er :="
325 } else if retvar != "" {
326 call += "r0,_ :="
327 } else {
328 call += ""
329 }
330 call += fmt.Sprintf("C.%s(%s)", sysname, arglist)
331
332 // Assign return values.
333 body := ""
334 for i := 0; i < len(out); i++ {
335 p := parseParam(out[i])
336 reg := ""
337 if p.Name == "err" {
338 reg = "e1"
339 } else {
340 reg = "r0"
341 }
342 if reg != "e1" {
343 body += fmt.Sprintf("\t%s = %s(%s)\n", p.Name, p.Type, reg)
344 }
345 }
346
347 // verify return
348 if sysname != "exit" && errvar != "" {
349 if regexp.MustCompile(`^uintptr`).FindStringSubmatch(cRettype) != nil {
350 body += "\tif (uintptr(r0) ==^uintptr(0) && er != nil) {\n"
351 body += fmt.Sprintf("\t\t%s = er\n", errvar)
352 body += "\t}\n"
353 } else {
354 body += "\tif (r0 ==-1 && er != nil) {\n"
355 body += fmt.Sprintf("\t\t%s = er\n", errvar)
356 body += "\t}\n"
357 }
358 } else if errvar != "" {
359 body += "\tif (er != nil) {\n"
360 body += fmt.Sprintf("\t\t%s = er\n", errvar)
361 body += "\t}\n"
362 }
363
364 text += fmt.Sprintf("\t%s\n", call)
365 text += body
366
367 text += "\treturn\n"
368 text += "}\n"
369 }
370 if err := s.Err(); err != nil {
371 fmt.Fprintf(os.Stderr, err.Error())
372 os.Exit(1)
373 }
374 file.Close()
375 }
376 imp := ""
377 if pack != "unix" {
378 imp = "import \"golang.org/x/sys/unix\"\n"
379
380 }
381 fmt.Printf(srcTemplate, cmdLine(), buildTags(), pack, cExtern, imp, text)
382 }
383
384 const srcTemplate = `// %s
385 // Code generated by the command above; see README.md. DO NOT EDIT.
386
387 // +build %s
388
389 package %s
390
391
392 %s
393 */
394 import "C"
395 import (
396 "unsafe"
397 )
398
399
400 %s
401
402 %s
403 `
0 #!/usr/bin/env perl
1 # Copyright 2018 The Go Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style
3 # license that can be found in the LICENSE file.
4
5 # This program reads a file containing function prototypes
6 # (like syscall_aix.go) and generates system call bodies.
7 # The prototypes are marked by lines beginning with "//sys"
8 # and read like func declarations if //sys is replaced by func, but:
9 # * The parameter lists must give a name for each argument.
10 # This includes return parameters.
11 # * The parameter lists must give a type for each argument:
12 # the (x, y, z int) shorthand is not allowed.
13 # * If the return parameter is an error number, it must be named err.
14 # * If go func name needs to be different than its libc name,
15 # * or the function is not in libc, name could be specified
16 # * at the end, after "=" sign, like
17 # //sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
18
19 # This program will generate three files and handle both gc and gccgo implementation:
20 # - zsyscall_aix_ppc64.go: the common part of each implementation (error handler, pointer creation)
21 # - zsyscall_aix_ppc64_gc.go: gc part with //go_cgo_import_dynamic and a call to syscall6
22 # - zsyscall_aix_ppc64_gccgo.go: gccgo part with C function and conversion to C type.
23
24 # The generated code looks like this
25 #
26 # zsyscall_aix_ppc64.go
27 # func asyscall(...) (n int, err error) {
28 # // Pointer Creation
29 # r1, e1 := callasyscall(...)
30 # // Type Conversion
31 # // Error Handler
32 # return
33 # }
34 #
35 # zsyscall_aix_ppc64_gc.go
36 # //go:cgo_import_dynamic libc_asyscall asyscall "libc.a/shr_64.o"
37 # //go:linkname libc_asyscall libc_asyscall
38 # var asyscall syscallFunc
39 #
40 # func callasyscall(...) (r1 uintptr, e1 Errno) {
41 # r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_asyscall)), "nb_args", ... )
42 # return
43 # }
44 #
45 # zsyscall_aix_ppc64_ggcgo.go
46 # /*
47 # int asyscall(...)
48 #
49 # */
50 # import "C"
51 #
52 # func callasyscall(...) (r1 uintptr, e1 Errno) {
53 # r1 = uintptr(C.asyscall(...))
54 # e1 = syscall.GetErrno()
55 # return
56 # }
57
58
59
60 use strict;
61
62 my $cmdline = "mksyscall_aix_ppc64.pl " . join(' ', @ARGV);
63 my $errors = 0;
64 my $_32bit = "";
65 my $tags = ""; # build tags
66 my $aix = 0;
67 my $solaris = 0;
68
69 binmode STDOUT;
70
71 if($ARGV[0] eq "-b32") {
72 $_32bit = "big-endian";
73 shift;
74 } elsif($ARGV[0] eq "-l32") {
75 $_32bit = "little-endian";
76 shift;
77 }
78 if($ARGV[0] eq "-aix") {
79 $aix = 1;
80 shift;
81 }
82 if($ARGV[0] eq "-tags") {
83 shift;
84 $tags = $ARGV[0];
85 shift;
86 }
87
88 if($ARGV[0] =~ /^-/) {
89 print STDERR "usage: mksyscall_aix.pl [-b32 | -l32] [-tags x,y] [file ...]\n";
90 exit 1;
91 }
92
93 sub parseparamlist($) {
94 my ($list) = @_;
95 $list =~ s/^\s*//;
96 $list =~ s/\s*$//;
97 if($list eq "") {
98 return ();
99 }
100 return split(/\s*,\s*/, $list);
101 }
102
103 sub parseparam($) {
104 my ($p) = @_;
105 if($p !~ /^(\S*) (\S*)$/) {
106 print STDERR "$ARGV:$.: malformed parameter: $p\n";
107 $errors = 1;
108 return ("xx", "int");
109 }
110 return ($1, $2);
111 }
112
113 my $package = "";
114 # GCCGO
115 my $textgccgo = "";
116 my $c_extern = "/*\n#include <stdint.h>\n";
117 # GC
118 my $textgc = "";
119 my $dynimports = "";
120 my $linknames = "";
121 my @vars = ();
122 # COMMUN
123 my $textcommon = "";
124
125 while(<>) {
126 chomp;
127 s/\s+/ /g;
128 s/^\s+//;
129 s/\s+$//;
130 $package = $1 if !$package && /^package (\S+)$/;
131 my $nonblock = /^\/\/sysnb /;
132 next if !/^\/\/sys / && !$nonblock;
133
134 # Line must be of the form
135 # func Open(path string, mode int, perm int) (fd int, err error)
136 # Split into name, in params, out params.
137 if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) {
138 print STDERR "$ARGV:$.: malformed //sys declaration\n";
139 $errors = 1;
140 next;
141 }
142 my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6);
143
144 # Split argument lists on comma.
145 my @in = parseparamlist($in);
146 my @out = parseparamlist($out);
147
148 $in = join(', ', @in);
149 $out = join(', ', @out);
150
151 if($sysname eq "") {
152 $sysname = "$func";
153 }
154
155 my $onlyCommon = 0;
156 if ($func eq "readlen" || $func eq "writelen" || $func eq "FcntlInt" || $func eq "FcntlFlock") {
157 # This function call another syscall which is already implemented.
158 # Therefore, the gc and gccgo part must not be generated.
159 $onlyCommon = 1
160 }
161
162 # Try in vain to keep people from editing this file.
163 # The theory is that they jump into the middle of the file
164 # without reading the header.
165
166 $textcommon .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
167 if (!$onlyCommon) {
168 $textgccgo .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
169 $textgc .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
170 }
171
172
173 # Check if value return, err return available
174 my $errvar = "";
175 my $retvar = "";
176 my $rettype = "";
177 foreach my $p (@out) {
178 my ($name, $type) = parseparam($p);
179 if($type eq "error") {
180 $errvar = $name;
181 } else {
182 $retvar = $name;
183 $rettype = $type;
184 }
185 }
186
187
188 $sysname =~ s/([a-z])([A-Z])/${1}_$2/g;
189 $sysname =~ y/A-Z/a-z/; # All libc functions are lowercase.
190
191 # GCCGO Prototype return type
192 my $C_rettype = "";
193 if($rettype eq "unsafe.Pointer") {
194 $C_rettype = "uintptr_t";
195 } elsif($rettype eq "uintptr") {
196 $C_rettype = "uintptr_t";
197 } elsif($rettype =~ /^_/) {
198 $C_rettype = "uintptr_t";
199 } elsif($rettype eq "int") {
200 $C_rettype = "int";
201 } elsif($rettype eq "int32") {
202 $C_rettype = "int";
203 } elsif($rettype eq "int64") {
204 $C_rettype = "long long";
205 } elsif($rettype eq "uint32") {
206 $C_rettype = "unsigned int";
207 } elsif($rettype eq "uint64") {
208 $C_rettype = "unsigned long long";
209 } else {
210 $C_rettype = "int";
211 }
212 if($sysname eq "exit") {
213 $C_rettype = "void";
214 }
215
216 # GCCGO Prototype arguments type
217 my @c_in = ();
218 foreach my $i (0 .. $#in) {
219 my ($name, $type) = parseparam($in[$i]);
220 if($type =~ /^\*/) {
221 push @c_in, "uintptr_t";
222 } elsif($type eq "string") {
223 push @c_in, "uintptr_t";
224 } elsif($type =~ /^\[\](.*)/) {
225 push @c_in, "uintptr_t", "size_t";
226 } elsif($type eq "unsafe.Pointer") {
227 push @c_in, "uintptr_t";
228 } elsif($type eq "uintptr") {
229 push @c_in, "uintptr_t";
230 } elsif($type =~ /^_/) {
231 push @c_in, "uintptr_t";
232 } elsif($type eq "int") {
233 if (($i == 0 || $i == 2) && $func eq "fcntl"){
234 # These fcntl arguments needs to be uintptr to be able to call FcntlInt and FcntlFlock
235 push @c_in, "uintptr_t";
236 } else {
237 push @c_in, "int";
238 }
239 } elsif($type eq "int32") {
240 push @c_in, "int";
241 } elsif($type eq "int64") {
242 push @c_in, "long long";
243 } elsif($type eq "uint32") {
244 push @c_in, "unsigned int";
245 } elsif($type eq "uint64") {
246 push @c_in, "unsigned long long";
247 } else {
248 push @c_in, "int";
249 }
250 }
251
252 if (!$onlyCommon){
253 # GCCGO Prototype Generation
254 # Imports of system calls from libc
255 $c_extern .= "$C_rettype $sysname";
256 my $c_in = join(', ', @c_in);
257 $c_extern .= "($c_in);\n";
258 }
259
260 # GC Library name
261 if($modname eq "") {
262 $modname = "libc.a/shr_64.o";
263 } else {
264 print STDERR "$func: only syscall using libc are available\n";
265 $errors = 1;
266 next;
267 }
268 my $sysvarname = "libc_${sysname}";
269
270 if (!$onlyCommon){
271 # GC Runtime import of function to allow cross-platform builds.
272 $dynimports .= "//go:cgo_import_dynamic ${sysvarname} ${sysname} \"$modname\"\n";
273 # GC Link symbol to proc address variable.
274 $linknames .= "//go:linkname ${sysvarname} ${sysvarname}\n";
275 # GC Library proc address variable.
276 push @vars, $sysvarname;
277 }
278
279 my $strconvfunc ="BytePtrFromString";
280 my $strconvtype = "*byte";
281
282 # Go function header.
283 if($out ne "") {
284 $out = " ($out)";
285 }
286 if($textcommon ne "") {
287 $textcommon .= "\n"
288 }
289
290 $textcommon .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out ;
291
292 # Prepare arguments to call.
293 my @argscommun = (); # Arguments in the commun part
294 my @argscall = (); # Arguments for call prototype
295 my @argsgc = (); # Arguments for gc call (with syscall6)
296 my @argsgccgo = (); # Arguments for gccgo call (with C.name_of_syscall)
297 my $n = 0;
298 my $arg_n = 0;
299 foreach my $p (@in) {
300 my ($name, $type) = parseparam($p);
301 if($type =~ /^\*/) {
302 push @argscommun, "uintptr(unsafe.Pointer($name))";
303 push @argscall, "$name uintptr";
304 push @argsgc, "$name";
305 push @argsgccgo, "C.uintptr_t($name)";
306 } elsif($type eq "string" && $errvar ne "") {
307 $textcommon .= "\tvar _p$n $strconvtype\n";
308 $textcommon .= "\t_p$n, $errvar = $strconvfunc($name)\n";
309 $textcommon .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
310
311 push @argscommun, "uintptr(unsafe.Pointer(_p$n))";
312 push @argscall, "_p$n uintptr ";
313 push @argsgc, "_p$n";
314 push @argsgccgo, "C.uintptr_t(_p$n)";
315 $n++;
316 } elsif($type eq "string") {
317 print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
318 $textcommon .= "\tvar _p$n $strconvtype\n";
319 $textcommon .= "\t_p$n, $errvar = $strconvfunc($name)\n";
320 $textcommon .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
321
322 push @argscommun, "uintptr(unsafe.Pointer(_p$n))";
323 push @argscall, "_p$n uintptr";
324 push @argsgc, "_p$n";
325 push @argsgccgo, "C.uintptr_t(_p$n)";
326 $n++;
327 } elsif($type =~ /^\[\](.*)/) {
328 # Convert slice into pointer, length.
329 # Have to be careful not to take address of &a[0] if len == 0:
330 # pass nil in that case.
331 $textcommon .= "\tvar _p$n *$1\n";
332 $textcommon .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n";
333 push @argscommun, "uintptr(unsafe.Pointer(_p$n))", "len($name)";
334 push @argscall, "_p$n uintptr", "_lenp$n int";
335 push @argsgc, "_p$n", "uintptr(_lenp$n)";
336 push @argsgccgo, "C.uintptr_t(_p$n)", "C.size_t(_lenp$n)";
337 $n++;
338 } elsif($type eq "int64" && $_32bit ne "") {
339 print STDERR "$ARGV:$.: $func uses int64 with 32 bits mode. Case not yet implemented\n";
340 # if($_32bit eq "big-endian") {
341 # push @args, "uintptr($name >> 32)", "uintptr($name)";
342 # } else {
343 # push @args, "uintptr($name)", "uintptr($name >> 32)";
344 # }
345 # $n++;
346 } elsif($type eq "bool") {
347 print STDERR "$ARGV:$.: $func uses bool. Case not yet implemented\n";
348 # $text .= "\tvar _p$n uint32\n";
349 # $text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n";
350 # push @args, "_p$n";
351 # $n++;
352 } elsif($type =~ /^_/ ||$type eq "unsafe.Pointer") {
353 push @argscommun, "uintptr($name)";
354 push @argscall, "$name uintptr";
355 push @argsgc, "$name";
356 push @argsgccgo, "C.uintptr_t($name)";
357 } elsif($type eq "int") {
358 if (($arg_n == 0 || $arg_n == 2) && ($func eq "fcntl" || $func eq "FcntlInt" || $func eq "FcntlFlock")) {
359 # These fcntl arguments need to be uintptr to be able to call FcntlInt and FcntlFlock
360 push @argscommun, "uintptr($name)";
361 push @argscall, "$name uintptr";
362 push @argsgc, "$name";
363 push @argsgccgo, "C.uintptr_t($name)";
364 } else {
365 push @argscommun, "$name";
366 push @argscall, "$name int";
367 push @argsgc, "uintptr($name)";
368 push @argsgccgo, "C.int($name)";
369 }
370 } elsif($type eq "int32") {
371 push @argscommun, "$name";
372 push @argscall, "$name int32";
373 push @argsgc, "uintptr($name)";
374 push @argsgccgo, "C.int($name)";
375 } elsif($type eq "int64") {
376 push @argscommun, "$name";
377 push @argscall, "$name int64";
378 push @argsgc, "uintptr($name)";
379 push @argsgccgo, "C.longlong($name)";
380 } elsif($type eq "uint32") {
381 push @argscommun, "$name";
382 push @argscall, "$name uint32";
383 push @argsgc, "uintptr($name)";
384 push @argsgccgo, "C.uint($name)";
385 } elsif($type eq "uint64") {
386 push @argscommun, "$name";
387 push @argscall, "$name uint64";
388 push @argsgc, "uintptr($name)";
389 push @argsgccgo, "C.ulonglong($name)";
390 } elsif($type eq "uintptr") {
391 push @argscommun, "$name";
392 push @argscall, "$name uintptr";
393 push @argsgc, "$name";
394 push @argsgccgo, "C.uintptr_t($name)";
395 } else {
396 push @argscommun, "int($name)";
397 push @argscall, "$name int";
398 push @argsgc, "uintptr($name)";
399 push @argsgccgo, "C.int($name)";
400 }
401 $arg_n++;
402 }
403 my $nargs = @argsgc;
404
405 # COMMUN function generation
406 my $argscommun = join(', ', @argscommun);
407 my $callcommun = "call$sysname($argscommun)";
408 my @ret = ("_", "_");
409 my $body = "";
410 my $do_errno = 0;
411 for(my $i=0; $i<@out; $i++) {
412 my $p = $out[$i];
413 my ($name, $type) = parseparam($p);
414 my $reg = "";
415 if($name eq "err") {
416 $reg = "e1";
417 $ret[1] = $reg;
418 $do_errno = 1;
419 } else {
420 $reg = "r0";
421 $ret[0] = $reg;
422 }
423 if($type eq "bool") {
424 $reg = "$reg != 0";
425 }
426 if($reg ne "e1") {
427 $body .= "\t$name = $type($reg)\n";
428 }
429 }
430 if ($ret[0] eq "_" && $ret[1] eq "_") {
431 $textcommon .= "\t$callcommun\n";
432 } else {
433 $textcommon .= "\t$ret[0], $ret[1] := $callcommun\n";
434 }
435 $textcommon .= $body;
436
437 if ($do_errno) {
438 $textcommon .= "\tif e1 != 0 {\n";
439 $textcommon .= "\t\terr = errnoErr(e1)\n";
440 $textcommon .= "\t}\n";
441 }
442 $textcommon .= "\treturn\n";
443 $textcommon .= "}\n";
444
445 if ($onlyCommon){
446 next
447 }
448 # CALL Prototype
449 my $callProto = sprintf "func call%s(%s) (r1 uintptr, e1 Errno) {\n", $sysname, join(', ', @argscall);
450
451 # GC function generation
452 my $asm = "syscall6";
453 if ($nonblock) {
454 $asm = "rawSyscall6";
455 }
456
457 if(@argsgc <= 6) {
458 while(@argsgc < 6) {
459 push @argsgc, "0";
460 }
461 } else {
462 print STDERR "$ARGV:$.: too many arguments to system call\n";
463 }
464 my $argsgc = join(', ', @argsgc);
465 my $callgc = "$asm(uintptr(unsafe.Pointer(&$sysvarname)), $nargs, $argsgc)";
466
467 $textgc .= $callProto;
468 $textgc .= "\tr1, _, e1 = $callgc\n";
469 $textgc .= "\treturn\n}\n";
470
471 # GCCGO function generation
472 my $argsgccgo = join(', ', @argsgccgo);
473 my $callgccgo = "C.$sysname($argsgccgo)";
474 $textgccgo .= $callProto;
475 $textgccgo .= "\tr1 = uintptr($callgccgo)\n";
476 $textgccgo .= "\te1 = syscall.GetErrno()\n";
477 $textgccgo .= "\treturn\n}\n";
478 }
479
480 if($errors) {
481 exit 1;
482 }
483
484 # Print zsyscall_aix_ppc64.go
485 open(my $fcommun, '>', 'zsyscall_aix_ppc64.go');
486 my $tofcommun = <<EOF;
487 // $cmdline
488 // Code generated by the command above; see README.md. DO NOT EDIT.
489
490 // +build $tags
491
492 package $package
493
494 import (
495 "unsafe"
496 )
497
498 EOF
499
500 $tofcommun .= "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
501
502 $tofcommun .=<<EOF;
503
504 $textcommon
505 EOF
506 print $fcommun $tofcommun;
507
508
509 # Print zsyscall_aix_ppc64_gc.go
510 open(my $fgc, '>', 'zsyscall_aix_ppc64_gc.go');
511 my $tofgc = <<EOF;
512 // $cmdline
513 // Code generated by the command above; see README.md. DO NOT EDIT.
514
515 // +build $tags
516 // +build !gccgo
517
518 package $package
519
520 import (
521 "unsafe"
522 )
523
524
525 EOF
526
527 $tofgc .= "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
528
529 my $vardecls = "\t" . join(",\n\t", @vars);
530 $vardecls .= " syscallFunc";
531
532 $tofgc .=<<EOF;
533 $dynimports
534 $linknames
535 type syscallFunc uintptr
536
537 var (
538 $vardecls
539 )
540
541 // Implemented in runtime/syscall_aix.go.
542 func rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
543 func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
544
545 $textgc
546 EOF
547 print $fgc $tofgc;
548
549 # Print zsyscall_aix_ppc64_gc.go
550 open(my $fgccgo, '>', 'zsyscall_aix_ppc64_gccgo.go');
551 my $tofgccgo = <<EOF;
552 // $cmdline
553 // Code generated by the command above; see README.md. DO NOT EDIT.
554
555 // +build $tags
556 // +build gccgo
557
558 package $package
559
560
561 $c_extern
562 */
563 import "C"
564 import (
565 "syscall"
566 )
567
568
569 EOF
570
571 $tofgccgo .= "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
572
573 $tofgccgo .=<<EOF;
574
575 $textgccgo
576 EOF
577 print $fgccgo $tofgccgo;
578 exit 0;
9090 # Split argument lists on comma.
9191 my @in = parseparamlist($in);
9292 my @out = parseparamlist($out);
93
94 # Try in vain to keep people from editing this file.
95 # The theory is that they jump into the middle of the file
96 # without reading the header.
97 $text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
9398
9499 # So file name.
95100 if($modname eq "") {
3131 sys/sem.h
3232 sys/shm.h
3333 sys/vmmeter.h
34 uvm/uvmexp.h
3435 uvm/uvm_param.h
3536 uvm/uvm_swap_encrypt.h
3637 ddb/db_var.h
239240
240241 print <<EOF;
241242 // mksysctl_openbsd.pl
242 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
243 // Code generated by the command above; DO NOT EDIT.
243244
244245 // +build $ENV{'GOARCH'},$ENV{'GOOS'}
245246
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build ignore
5
6 // Generate system call table for DragonFly, NetBSD,
7 // FreeBSD, OpenBSD or Darwin from master list
8 // (for example, /usr/src/sys/kern/syscalls.master or
9 // sys/syscall.h).
10 package main
11
12 import (
13 "bufio"
14 "fmt"
15 "io"
16 "io/ioutil"
17 "net/http"
18 "os"
19 "regexp"
20 "strings"
21 )
22
23 var (
24 goos, goarch string
25 )
26
27 // cmdLine returns this programs's commandline arguments
28 func cmdLine() string {
29 return "go run mksysnum.go " + strings.Join(os.Args[1:], " ")
30 }
31
32 // buildTags returns build tags
33 func buildTags() string {
34 return fmt.Sprintf("%s,%s", goarch, goos)
35 }
36
37 func checkErr(err error) {
38 if err != nil {
39 fmt.Fprintf(os.Stderr, "%v\n", err)
40 os.Exit(1)
41 }
42 }
43
44 // source string and substring slice for regexp
45 type re struct {
46 str string // source string
47 sub []string // matched sub-string
48 }
49
50 // Match performs regular expression match
51 func (r *re) Match(exp string) bool {
52 r.sub = regexp.MustCompile(exp).FindStringSubmatch(r.str)
53 if r.sub != nil {
54 return true
55 }
56 return false
57 }
58
59 // fetchFile fetches a text file from URL
60 func fetchFile(URL string) io.Reader {
61 resp, err := http.Get(URL)
62 checkErr(err)
63 defer resp.Body.Close()
64 body, err := ioutil.ReadAll(resp.Body)
65 checkErr(err)
66 return strings.NewReader(string(body))
67 }
68
69 // readFile reads a text file from path
70 func readFile(path string) io.Reader {
71 file, err := os.Open(os.Args[1])
72 checkErr(err)
73 return file
74 }
75
76 func format(name, num, proto string) string {
77 name = strings.ToUpper(name)
78 // There are multiple entries for enosys and nosys, so comment them out.
79 nm := re{str: name}
80 if nm.Match(`^SYS_E?NOSYS$`) {
81 name = fmt.Sprintf("// %s", name)
82 }
83 if name == `SYS_SYS_EXIT` {
84 name = `SYS_EXIT`
85 }
86 return fmt.Sprintf(" %s = %s; // %s\n", name, num, proto)
87 }
88
89 func main() {
90 // Get the OS (using GOOS_TARGET if it exist)
91 goos = os.Getenv("GOOS_TARGET")
92 if goos == "" {
93 goos = os.Getenv("GOOS")
94 }
95 // Get the architecture (using GOARCH_TARGET if it exists)
96 goarch = os.Getenv("GOARCH_TARGET")
97 if goarch == "" {
98 goarch = os.Getenv("GOARCH")
99 }
100 // Check if GOOS and GOARCH environment variables are defined
101 if goarch == "" || goos == "" {
102 fmt.Fprintf(os.Stderr, "GOARCH or GOOS not defined in environment\n")
103 os.Exit(1)
104 }
105
106 file := strings.TrimSpace(os.Args[1])
107 var syscalls io.Reader
108 if strings.HasPrefix(file, "https://") || strings.HasPrefix(file, "http://") {
109 // Download syscalls.master file
110 syscalls = fetchFile(file)
111 } else {
112 syscalls = readFile(file)
113 }
114
115 var text, line string
116 s := bufio.NewScanner(syscalls)
117 for s.Scan() {
118 t := re{str: line}
119 if t.Match(`^(.*)\\$`) {
120 // Handle continuation
121 line = t.sub[1]
122 line += strings.TrimLeft(s.Text(), " \t")
123 } else {
124 // New line
125 line = s.Text()
126 }
127 t = re{str: line}
128 if t.Match(`\\$`) {
129 continue
130 }
131 t = re{str: line}
132
133 switch goos {
134 case "dragonfly":
135 if t.Match(`^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$`) {
136 num, proto := t.sub[1], t.sub[2]
137 name := fmt.Sprintf("SYS_%s", t.sub[3])
138 text += format(name, num, proto)
139 }
140 case "freebsd":
141 if t.Match(`^([0-9]+)\s+\S+\s+(?:NO)?STD\s+({ \S+\s+(\w+).*)$`) {
142 num, proto := t.sub[1], t.sub[2]
143 name := fmt.Sprintf("SYS_%s", t.sub[3])
144 text += format(name, num, proto)
145 }
146 case "openbsd":
147 if t.Match(`^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$`) {
148 num, proto, name := t.sub[1], t.sub[3], t.sub[4]
149 text += format(name, num, proto)
150 }
151 case "netbsd":
152 if t.Match(`^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$`) {
153 num, proto, compat := t.sub[1], t.sub[6], t.sub[8]
154 name := t.sub[7] + "_" + t.sub[9]
155 if t.sub[11] != "" {
156 name = t.sub[7] + "_" + t.sub[11]
157 }
158 name = strings.ToUpper(name)
159 if compat == "" || compat == "13" || compat == "30" || compat == "50" {
160 text += fmt.Sprintf(" %s = %s; // %s\n", name, num, proto)
161 }
162 }
163 case "darwin":
164 if t.Match(`^#define\s+SYS_(\w+)\s+([0-9]+)`) {
165 name, num := t.sub[1], t.sub[2]
166 name = strings.ToUpper(name)
167 text += fmt.Sprintf(" SYS_%s = %s;\n", name, num)
168 }
169 default:
170 fmt.Fprintf(os.Stderr, "unrecognized GOOS=%s\n", goos)
171 os.Exit(1)
172
173 }
174 }
175 err := s.Err()
176 checkErr(err)
177
178 fmt.Printf(template, cmdLine(), buildTags(), text)
179 }
180
181 const template = `// %s
182 // Code generated by the command above; see README.md. DO NOT EDIT.
183
184 // +build %s
185
186 package unix
187
188 const(
189 %s)`
+0
-39
vendor/golang.org/x/sys/unix/mksysnum_darwin.pl less more
0 #!/usr/bin/env perl
1 # Copyright 2009 The Go Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style
3 # license that can be found in the LICENSE file.
4 #
5 # Generate system call table for Darwin from sys/syscall.h
6
7 use strict;
8
9 if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
10 print STDERR "GOARCH or GOOS not defined in environment\n";
11 exit 1;
12 }
13
14 my $command = "mksysnum_darwin.pl " . join(' ', @ARGV);
15
16 print <<EOF;
17 // $command
18 // Code generated by the command above; see README.md. DO NOT EDIT.
19
20 // +build $ENV{'GOARCH'},$ENV{'GOOS'}
21
22 package unix
23
24 const (
25 EOF
26
27 while(<>){
28 if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){
29 my $name = $1;
30 my $num = $2;
31 $name =~ y/a-z/A-Z/;
32 print " SYS_$name = $num;"
33 }
34 }
35
36 print <<EOF;
37 )
38 EOF
+0
-50
vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl less more
0 #!/usr/bin/env perl
1 # Copyright 2009 The Go Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style
3 # license that can be found in the LICENSE file.
4 #
5 # Generate system call table for DragonFly from master list
6 # (for example, /usr/src/sys/kern/syscalls.master).
7
8 use strict;
9
10 if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
11 print STDERR "GOARCH or GOOS not defined in environment\n";
12 exit 1;
13 }
14
15 my $command = "mksysnum_dragonfly.pl " . join(' ', @ARGV);
16
17 print <<EOF;
18 // $command
19 // Code generated by the command above; see README.md. DO NOT EDIT.
20
21 // +build $ENV{'GOARCH'},$ENV{'GOOS'}
22
23 package unix
24
25 const (
26 EOF
27
28 while(<>){
29 if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){
30 my $num = $1;
31 my $proto = $2;
32 my $name = "SYS_$3";
33 $name =~ y/a-z/A-Z/;
34
35 # There are multiple entries for enosys and nosys, so comment them out.
36 if($name =~ /^SYS_E?NOSYS$/){
37 $name = "// $name";
38 }
39 if($name eq 'SYS_SYS_EXIT'){
40 $name = 'SYS_EXIT';
41 }
42
43 print " $name = $num; // $proto\n";
44 }
45 }
46
47 print <<EOF;
48 )
49 EOF
+0
-50
vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl less more
0 #!/usr/bin/env perl
1 # Copyright 2009 The Go Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style
3 # license that can be found in the LICENSE file.
4 #
5 # Generate system call table for FreeBSD from master list
6 # (for example, /usr/src/sys/kern/syscalls.master).
7
8 use strict;
9
10 if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
11 print STDERR "GOARCH or GOOS not defined in environment\n";
12 exit 1;
13 }
14
15 my $command = "mksysnum_freebsd.pl " . join(' ', @ARGV);
16
17 print <<EOF;
18 // $command
19 // Code generated by the command above; see README.md. DO NOT EDIT.
20
21 // +build $ENV{'GOARCH'},$ENV{'GOOS'}
22
23 package unix
24
25 const (
26 EOF
27
28 while(<>){
29 if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){
30 my $num = $1;
31 my $proto = $2;
32 my $name = "SYS_$3";
33 $name =~ y/a-z/A-Z/;
34
35 # There are multiple entries for enosys and nosys, so comment them out.
36 if($name =~ /^SYS_E?NOSYS$/){
37 $name = "// $name";
38 }
39 if($name eq 'SYS_SYS_EXIT'){
40 $name = 'SYS_EXIT';
41 }
42
43 print " $name = $num; // $proto\n";
44 }
45 }
46
47 print <<EOF;
48 )
49 EOF
+0
-58
vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl less more
0 #!/usr/bin/env perl
1 # Copyright 2009 The Go Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style
3 # license that can be found in the LICENSE file.
4 #
5 # Generate system call table for OpenBSD from master list
6 # (for example, /usr/src/sys/kern/syscalls.master).
7
8 use strict;
9
10 if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
11 print STDERR "GOARCH or GOOS not defined in environment\n";
12 exit 1;
13 }
14
15 my $command = "mksysnum_netbsd.pl " . join(' ', @ARGV);
16
17 print <<EOF;
18 // $command
19 // Code generated by the command above; see README.md. DO NOT EDIT.
20
21 // +build $ENV{'GOARCH'},$ENV{'GOOS'}
22
23 package unix
24
25 const (
26 EOF
27
28 my $line = '';
29 while(<>){
30 if($line =~ /^(.*)\\$/) {
31 # Handle continuation
32 $line = $1;
33 $_ =~ s/^\s+//;
34 $line .= $_;
35 } else {
36 # New line
37 $line = $_;
38 }
39 next if $line =~ /\\$/;
40 if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) {
41 my $num = $1;
42 my $proto = $6;
43 my $compat = $8;
44 my $name = "$7_$9";
45
46 $name = "$7_$11" if $11 ne '';
47 $name =~ y/a-z/A-Z/;
48
49 if($compat eq '' || $compat eq '13' || $compat eq '30' || $compat eq '50') {
50 print " $name = $num; // $proto\n";
51 }
52 }
53 }
54
55 print <<EOF;
56 )
57 EOF
+0
-50
vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl less more
0 #!/usr/bin/env perl
1 # Copyright 2009 The Go Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style
3 # license that can be found in the LICENSE file.
4 #
5 # Generate system call table for OpenBSD from master list
6 # (for example, /usr/src/sys/kern/syscalls.master).
7
8 use strict;
9
10 if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
11 print STDERR "GOARCH or GOOS not defined in environment\n";
12 exit 1;
13 }
14
15 my $command = "mksysnum_openbsd.pl " . join(' ', @ARGV);
16
17 print <<EOF;
18 // $command
19 // Code generated by the command above; see README.md. DO NOT EDIT.
20
21 // +build $ENV{'GOARCH'},$ENV{'GOOS'}
22
23 package unix
24
25 const (
26 EOF
27
28 while(<>){
29 if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){
30 my $num = $1;
31 my $proto = $3;
32 my $name = $4;
33 $name =~ y/a-z/A-Z/;
34
35 # There are multiple entries for enosys and nosys, so comment them out.
36 if($name =~ /^SYS_E?NOSYS$/){
37 $name = "// $name";
38 }
39 if($name eq 'SYS_SYS_EXIT'){
40 $name = 'SYS_EXIT';
41 }
42
43 print " $name = $num; // $proto\n";
44 }
45 }
46
47 print <<EOF;
48 )
49 EOF
77 package unix
88
99 import (
10 "errors"
11 "fmt"
12 "strconv"
1013 "syscall"
1114 "unsafe"
1215 )
1316
14 const (
15 SYS_PLEDGE = 108
16 )
17
18 // Pledge implements the pledge syscall. For more information see pledge(2).
19 func Pledge(promises string, paths []string) error {
20 promisesPtr, err := syscall.BytePtrFromString(promises)
17 // Pledge implements the pledge syscall.
18 //
19 // The pledge syscall does not accept execpromises on OpenBSD releases
20 // before 6.3.
21 //
22 // execpromises must be empty when Pledge is called on OpenBSD
23 // releases predating 6.3, otherwise an error will be returned.
24 //
25 // For more information see pledge(2).
26 func Pledge(promises, execpromises string) error {
27 maj, min, err := majmin()
2128 if err != nil {
2229 return err
2330 }
24 promisesUnsafe, pathsUnsafe := unsafe.Pointer(promisesPtr), unsafe.Pointer(nil)
25 if paths != nil {
26 var pathsPtr []*byte
27 if pathsPtr, err = syscall.SlicePtrFromStrings(paths); err != nil {
31
32 err = pledgeAvailable(maj, min, execpromises)
33 if err != nil {
34 return err
35 }
36
37 pptr, err := syscall.BytePtrFromString(promises)
38 if err != nil {
39 return err
40 }
41
42 // This variable will hold either a nil unsafe.Pointer or
43 // an unsafe.Pointer to a string (execpromises).
44 var expr unsafe.Pointer
45
46 // If we're running on OpenBSD > 6.2, pass execpromises to the syscall.
47 if maj > 6 || (maj == 6 && min > 2) {
48 exptr, err := syscall.BytePtrFromString(execpromises)
49 if err != nil {
2850 return err
2951 }
30 pathsUnsafe = unsafe.Pointer(&pathsPtr[0])
52 expr = unsafe.Pointer(exptr)
3153 }
32 _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(promisesUnsafe), uintptr(pathsUnsafe), 0)
54
55 _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(expr), 0)
3356 if e != 0 {
3457 return e
3558 }
59
3660 return nil
3761 }
62
63 // PledgePromises implements the pledge syscall.
64 //
65 // This changes the promises and leaves the execpromises untouched.
66 //
67 // For more information see pledge(2).
68 func PledgePromises(promises string) error {
69 maj, min, err := majmin()
70 if err != nil {
71 return err
72 }
73
74 err = pledgeAvailable(maj, min, "")
75 if err != nil {
76 return err
77 }
78
79 // This variable holds the execpromises and is always nil.
80 var expr unsafe.Pointer
81
82 pptr, err := syscall.BytePtrFromString(promises)
83 if err != nil {
84 return err
85 }
86
87 _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(expr), 0)
88 if e != 0 {
89 return e
90 }
91
92 return nil
93 }
94
95 // PledgeExecpromises implements the pledge syscall.
96 //
97 // This changes the execpromises and leaves the promises untouched.
98 //
99 // For more information see pledge(2).
100 func PledgeExecpromises(execpromises string) error {
101 maj, min, err := majmin()
102 if err != nil {
103 return err
104 }
105
106 err = pledgeAvailable(maj, min, execpromises)
107 if err != nil {
108 return err
109 }
110
111 // This variable holds the promises and is always nil.
112 var pptr unsafe.Pointer
113
114 exptr, err := syscall.BytePtrFromString(execpromises)
115 if err != nil {
116 return err
117 }
118
119 _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(pptr), uintptr(unsafe.Pointer(exptr)), 0)
120 if e != 0 {
121 return e
122 }
123
124 return nil
125 }
126
127 // majmin returns major and minor version number for an OpenBSD system.
128 func majmin() (major int, minor int, err error) {
129 var v Utsname
130 err = Uname(&v)
131 if err != nil {
132 return
133 }
134
135 major, err = strconv.Atoi(string(v.Release[0]))
136 if err != nil {
137 err = errors.New("cannot parse major version number returned by uname")
138 return
139 }
140
141 minor, err = strconv.Atoi(string(v.Release[2]))
142 if err != nil {
143 err = errors.New("cannot parse minor version number returned by uname")
144 return
145 }
146
147 return
148 }
149
150 // pledgeAvailable checks for availability of the pledge(2) syscall
151 // based on the running OpenBSD version.
152 func pledgeAvailable(maj, min int, execpromises string) error {
153 // If OpenBSD <= 5.9, pledge is not available.
154 if (maj == 5 && min != 9) || maj < 5 {
155 return fmt.Errorf("pledge syscall is not available on OpenBSD %d.%d", maj, min)
156 }
157
158 // If OpenBSD <= 6.2 and execpromises is not empty,
159 // return an error - execpromises is not available before 6.3
160 if (maj < 6 || (maj == 6 && min <= 2)) && execpromises != "" {
161 return fmt.Errorf("cannot use execpromises on OpenBSD %d.%d", maj, min)
162 }
163
164 return nil
165 }
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build openbsd
5
6 package unix
7
8 import (
9 "syscall"
10 "unsafe"
11 )
12
13 // Unveil implements the unveil syscall.
14 // For more information see unveil(2).
15 // Note that the special case of blocking further
16 // unveil calls is handled by UnveilBlock.
17 func Unveil(path string, flags string) error {
18 pathPtr, err := syscall.BytePtrFromString(path)
19 if err != nil {
20 return err
21 }
22 flagsPtr, err := syscall.BytePtrFromString(flags)
23 if err != nil {
24 return err
25 }
26 _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(unsafe.Pointer(pathPtr)), uintptr(unsafe.Pointer(flagsPtr)), 0)
27 if e != 0 {
28 return e
29 }
30 return nil
31 }
32
33 // UnveilBlock blocks future unveil calls.
34 // For more information see unveil(2).
35 func UnveilBlock() error {
36 // Both pointers must be nil.
37 var pathUnsafe, flagsUnsafe unsafe.Pointer
38 _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(pathUnsafe), uintptr(flagsUnsafe), 0)
39 if e != 0 {
40 return e
41 }
42 return nil
43 }
0 // Copyright 2017 The Go Authors. All rights reserved.
0 // Copyright 2017 The Go Authors. All rights reserved.
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
4 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
55
66 // For Unix, get the pagesize from the runtime.
77
0 // Copyright 2012 The Go Authors. All rights reserved.
0 // Copyright 2012 The Go Authors. All rights reserved.
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
0 // Copyright 2012 The Go Authors. All rights reserved.
0 // Copyright 2012 The Go Authors. All rights reserved.
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 // +build darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly
4 // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly
55
66 package unix
77
0 // Copyright 2011 The Go Authors. All rights reserved.
0 // Copyright 2011 The Go Authors. All rights reserved.
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
4 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
55
66 // Socket control messages
77
88 package unix
99
10 import "unsafe"
10 import (
11 "runtime"
12 "unsafe"
13 )
1114
1215 // Round the length of a raw sockaddr up to align it properly.
1316 func cmsgAlignOf(salen int) int {
14 salign := sizeofPtr
15 // NOTE: It seems like 64-bit Darwin, DragonFly BSD and
16 // Solaris kernels still require 32-bit aligned access to
17 // network subsystem.
18 if darwin64Bit || dragonfly64Bit || solaris64Bit {
19 salign = 4
17 salign := SizeofPtr
18
19 switch runtime.GOOS {
20 case "darwin", "dragonfly", "solaris":
21 // NOTE: It seems like 64-bit Darwin, DragonFly BSD and
22 // Solaris kernels still require 32-bit aligned access to
23 // network subsystem.
24 if SizeofPtr == 8 {
25 salign = 4
26 }
27 case "openbsd":
28 // OpenBSD armv7 requires 64-bit alignment.
29 if runtime.GOARCH == "arm" {
30 salign = 8
31 }
2032 }
33
2134 return (salen + salign - 1) & ^(salign - 1)
2235 }
2336
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
4 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
55
66 package unix
77
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
4 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
55
66 // Package unix contains an interface to the low-level operating system
7 // primitives. OS details vary depending on the underlying system, and
7 // primitives. OS details vary depending on the underlying system, and
88 // by default, godoc will display OS-specific documentation for the current
9 // system. If you want godoc to display OS documentation for another
10 // system, set $GOOS and $GOARCH to the desired system. For example, if
9 // system. If you want godoc to display OS documentation for another
10 // system, set $GOOS and $GOARCH to the desired system. For example, if
1111 // you want to view documentation for freebsd/arm on linux/amd64, set $GOOS
1212 // to freebsd and $GOARCH to arm.
13 //
1314 // The primary use of this package is inside other packages that provide a more
1415 // portable interface to the system, such as "os", "time" and "net". Use
1516 // those packages rather than this one if you can.
17 //
1618 // For details of the functions and data types in this package consult
1719 // the manuals for the appropriate operating system.
20 //
1821 // These calls return err == nil to indicate success; otherwise
1922 // err represents an operating system error describing the failure and
2023 // holds a value of type syscall.Errno.
2124 package unix // import "golang.org/x/sys/unix"
2225
26 import "strings"
27
2328 // ByteSliceFromString returns a NUL-terminated slice of bytes
2429 // containing the text of s. If s contains a NUL byte at any
2530 // location, it returns (nil, EINVAL).
2631 func ByteSliceFromString(s string) ([]byte, error) {
27 for i := 0; i < len(s); i++ {
28 if s[i] == 0 {
29 return nil, EINVAL
30 }
32 if strings.IndexByte(s, 0) != -1 {
33 return nil, EINVAL
3134 }
3235 a := make([]byte, len(s)+1)
3336 copy(a, s)
4851 // Single-word zero for use when we need a valid pointer to 0 bytes.
4952 // See mkunix.pl.
5053 var _zero uintptr
51
52 func (ts *Timespec) Unix() (sec int64, nsec int64) {
53 return int64(ts.Sec), int64(ts.Nsec)
54 }
55
56 func (tv *Timeval) Unix() (sec int64, nsec int64) {
57 return int64(tv.Sec), int64(tv.Usec) * 1000
58 }
59
60 func (ts *Timespec) Nano() int64 {
61 return int64(ts.Sec)*1e9 + int64(ts.Nsec)
62 }
63
64 func (tv *Timeval) Nano() int64 {
65 return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
66 }
67
68 func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build aix
5
6 // Aix system calls.
7 // This file is compiled as ordinary Go code,
8 // but it is also input to mksyscall,
9 // which parses the //sys lines and generates system call stubs.
10 // Note that sometimes we use a lowercase //sys name and
11 // wrap it in our own nicer implementation.
12
13 package unix
14
15 import "unsafe"
16
17 /*
18 * Wrapped
19 */
20
21 //sys utimes(path string, times *[2]Timeval) (err error)
22 func Utimes(path string, tv []Timeval) error {
23 if len(tv) != 2 {
24 return EINVAL
25 }
26 return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
27 }
28
29 //sys utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error)
30 func UtimesNano(path string, ts []Timespec) error {
31 if len(ts) != 2 {
32 return EINVAL
33 }
34 return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
35 }
36
37 func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
38 if ts == nil {
39 return utimensat(dirfd, path, nil, flags)
40 }
41 if len(ts) != 2 {
42 return EINVAL
43 }
44 return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
45 }
46
47 func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
48 if sa.Port < 0 || sa.Port > 0xFFFF {
49 return nil, 0, EINVAL
50 }
51 sa.raw.Family = AF_INET
52 p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
53 p[0] = byte(sa.Port >> 8)
54 p[1] = byte(sa.Port)
55 for i := 0; i < len(sa.Addr); i++ {
56 sa.raw.Addr[i] = sa.Addr[i]
57 }
58 return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
59 }
60
61 func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
62 if sa.Port < 0 || sa.Port > 0xFFFF {
63 return nil, 0, EINVAL
64 }
65 sa.raw.Family = AF_INET6
66 p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
67 p[0] = byte(sa.Port >> 8)
68 p[1] = byte(sa.Port)
69 sa.raw.Scope_id = sa.ZoneId
70 for i := 0; i < len(sa.Addr); i++ {
71 sa.raw.Addr[i] = sa.Addr[i]
72 }
73 return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
74 }
75
76 func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
77 name := sa.Name
78 n := len(name)
79 if n > len(sa.raw.Path) {
80 return nil, 0, EINVAL
81 }
82 if n == len(sa.raw.Path) && name[0] != '@' {
83 return nil, 0, EINVAL
84 }
85 sa.raw.Family = AF_UNIX
86 for i := 0; i < n; i++ {
87 sa.raw.Path[i] = uint8(name[i])
88 }
89 // length is family (uint16), name, NUL.
90 sl := _Socklen(2)
91 if n > 0 {
92 sl += _Socklen(n) + 1
93 }
94 if sa.raw.Path[0] == '@' {
95 sa.raw.Path[0] = 0
96 // Don't count trailing NUL for abstract address.
97 sl--
98 }
99
100 return unsafe.Pointer(&sa.raw), sl, nil
101 }
102
103 func Getsockname(fd int) (sa Sockaddr, err error) {
104 var rsa RawSockaddrAny
105 var len _Socklen = SizeofSockaddrAny
106 if err = getsockname(fd, &rsa, &len); err != nil {
107 return
108 }
109 return anyToSockaddr(fd, &rsa)
110 }
111
112 //sys getcwd(buf []byte) (err error)
113
114 const ImplementsGetwd = true
115
116 func Getwd() (ret string, err error) {
117 for len := uint64(4096); ; len *= 2 {
118 b := make([]byte, len)
119 err := getcwd(b)
120 if err == nil {
121 i := 0
122 for b[i] != 0 {
123 i++
124 }
125 return string(b[0:i]), nil
126 }
127 if err != ERANGE {
128 return "", err
129 }
130 }
131 }
132
133 func Getcwd(buf []byte) (n int, err error) {
134 err = getcwd(buf)
135 if err == nil {
136 i := 0
137 for buf[i] != 0 {
138 i++
139 }
140 n = i + 1
141 }
142 return
143 }
144
145 func Getgroups() (gids []int, err error) {
146 n, err := getgroups(0, nil)
147 if err != nil {
148 return nil, err
149 }
150 if n == 0 {
151 return nil, nil
152 }
153
154 // Sanity check group count. Max is 16 on BSD.
155 if n < 0 || n > 1000 {
156 return nil, EINVAL
157 }
158
159 a := make([]_Gid_t, n)
160 n, err = getgroups(n, &a[0])
161 if err != nil {
162 return nil, err
163 }
164 gids = make([]int, n)
165 for i, v := range a[0:n] {
166 gids[i] = int(v)
167 }
168 return
169 }
170
171 func Setgroups(gids []int) (err error) {
172 if len(gids) == 0 {
173 return setgroups(0, nil)
174 }
175
176 a := make([]_Gid_t, len(gids))
177 for i, v := range gids {
178 a[i] = _Gid_t(v)
179 }
180 return setgroups(len(a), &a[0])
181 }
182
183 /*
184 * Socket
185 */
186
187 //sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
188
189 func Accept(fd int) (nfd int, sa Sockaddr, err error) {
190 var rsa RawSockaddrAny
191 var len _Socklen = SizeofSockaddrAny
192 nfd, err = accept(fd, &rsa, &len)
193 if nfd == -1 {
194 return
195 }
196 sa, err = anyToSockaddr(fd, &rsa)
197 if err != nil {
198 Close(nfd)
199 nfd = 0
200 }
201 return
202 }
203
204 func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
205 // Recvmsg not implemented on AIX
206 sa := new(SockaddrUnix)
207 return -1, -1, -1, sa, ENOSYS
208 }
209
210 func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
211 _, err = SendmsgN(fd, p, oob, to, flags)
212 return
213 }
214
215 func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
216 // SendmsgN not implemented on AIX
217 return -1, ENOSYS
218 }
219
220 func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
221 switch rsa.Addr.Family {
222
223 case AF_UNIX:
224 pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
225 sa := new(SockaddrUnix)
226
227 // Some versions of AIX have a bug in getsockname (see IV78655).
228 // We can't rely on sa.Len being set correctly.
229 n := SizeofSockaddrUnix - 3 // substract leading Family, Len, terminating NUL.
230 for i := 0; i < n; i++ {
231 if pp.Path[i] == 0 {
232 n = i
233 break
234 }
235 }
236
237 bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
238 sa.Name = string(bytes)
239 return sa, nil
240
241 case AF_INET:
242 pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
243 sa := new(SockaddrInet4)
244 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
245 sa.Port = int(p[0])<<8 + int(p[1])
246 for i := 0; i < len(sa.Addr); i++ {
247 sa.Addr[i] = pp.Addr[i]
248 }
249 return sa, nil
250
251 case AF_INET6:
252 pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
253 sa := new(SockaddrInet6)
254 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
255 sa.Port = int(p[0])<<8 + int(p[1])
256 sa.ZoneId = pp.Scope_id
257 for i := 0; i < len(sa.Addr); i++ {
258 sa.Addr[i] = pp.Addr[i]
259 }
260 return sa, nil
261 }
262 return nil, EAFNOSUPPORT
263 }
264
265 func Gettimeofday(tv *Timeval) (err error) {
266 err = gettimeofday(tv, nil)
267 return
268 }
269
270 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
271 if raceenabled {
272 raceReleaseMerge(unsafe.Pointer(&ioSync))
273 }
274 return sendfile(outfd, infd, offset, count)
275 }
276
277 // TODO
278 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
279 return -1, ENOSYS
280 }
281
282 //sys getdirent(fd int, buf []byte) (n int, err error)
283 func ReadDirent(fd int, buf []byte) (n int, err error) {
284 return getdirent(fd, buf)
285 }
286
287 //sys wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error)
288 func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
289 var status _C_int
290 var r Pid_t
291 err = ERESTART
292 // AIX wait4 may return with ERESTART errno, while the processus is still
293 // active.
294 for err == ERESTART {
295 r, err = wait4(Pid_t(pid), &status, options, rusage)
296 }
297 wpid = int(r)
298 if wstatus != nil {
299 *wstatus = WaitStatus(status)
300 }
301 return
302 }
303
304 /*
305 * Wait
306 */
307
308 type WaitStatus uint32
309
310 func (w WaitStatus) Stopped() bool { return w&0x40 != 0 }
311 func (w WaitStatus) StopSignal() Signal {
312 if !w.Stopped() {
313 return -1
314 }
315 return Signal(w>>8) & 0xFF
316 }
317
318 func (w WaitStatus) Exited() bool { return w&0xFF == 0 }
319 func (w WaitStatus) ExitStatus() int {
320 if !w.Exited() {
321 return -1
322 }
323 return int((w >> 8) & 0xFF)
324 }
325
326 func (w WaitStatus) Signaled() bool { return w&0x40 == 0 && w&0xFF != 0 }
327 func (w WaitStatus) Signal() Signal {
328 if !w.Signaled() {
329 return -1
330 }
331 return Signal(w>>16) & 0xFF
332 }
333
334 func (w WaitStatus) Continued() bool { return w&0x01000000 != 0 }
335
336 func (w WaitStatus) CoreDump() bool { return w&0x200 != 0 }
337
338 func (w WaitStatus) TrapCause() int { return -1 }
339
340 //sys ioctl(fd int, req uint, arg uintptr) (err error)
341
342 // ioctl itself should not be exposed directly, but additional get/set
343 // functions for specific types are permissible.
344
345 // IoctlSetInt performs an ioctl operation which sets an integer value
346 // on fd, using the specified request number.
347 func IoctlSetInt(fd int, req uint, value int) error {
348 return ioctl(fd, req, uintptr(value))
349 }
350
351 func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
352 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
353 }
354
355 func ioctlSetTermios(fd int, req uint, value *Termios) error {
356 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
357 }
358
359 // IoctlGetInt performs an ioctl operation which gets an integer value
360 // from fd, using the specified request number.
361 func IoctlGetInt(fd int, req uint) (int, error) {
362 var value int
363 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
364 return value, err
365 }
366
367 func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
368 var value Winsize
369 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
370 return &value, err
371 }
372
373 func IoctlGetTermios(fd int, req uint) (*Termios, error) {
374 var value Termios
375 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
376 return &value, err
377 }
378
379 // fcntl must never be called with cmd=F_DUP2FD because it doesn't work on AIX
380 // There is no way to create a custom fcntl and to keep //sys fcntl easily,
381 // Therefore, the programmer must call dup2 instead of fcntl in this case.
382
383 // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
384 //sys FcntlInt(fd uintptr, cmd int, arg int) (r int,err error) = fcntl
385
386 // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
387 //sys FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) = fcntl
388
389 //sys fcntl(fd int, cmd int, arg int) (val int, err error)
390
391 /*
392 * Direct access
393 */
394
395 //sys Acct(path string) (err error)
396 //sys Chdir(path string) (err error)
397 //sys Chroot(path string) (err error)
398 //sys Close(fd int) (err error)
399 //sys Dup(oldfd int) (fd int, err error)
400 //sys Exit(code int)
401 //sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
402 //sys Fchdir(fd int) (err error)
403 //sys Fchmod(fd int, mode uint32) (err error)
404 //sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
405 //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
406 //sys Fdatasync(fd int) (err error)
407 //sys Fsync(fd int) (err error)
408 // readdir_r
409 //sysnb Getpgid(pid int) (pgid int, err error)
410
411 //sys Getpgrp() (pid int)
412
413 //sysnb Getpid() (pid int)
414 //sysnb Getppid() (ppid int)
415 //sys Getpriority(which int, who int) (prio int, err error)
416 //sysnb Getrusage(who int, rusage *Rusage) (err error)
417 //sysnb Getsid(pid int) (sid int, err error)
418 //sysnb Kill(pid int, sig Signal) (err error)
419 //sys Klogctl(typ int, buf []byte) (n int, err error) = syslog
420 //sys Mkdir(dirfd int, path string, mode uint32) (err error)
421 //sys Mkdirat(dirfd int, path string, mode uint32) (err error)
422 //sys Mkfifo(path string, mode uint32) (err error)
423 //sys Mknod(path string, mode uint32, dev int) (err error)
424 //sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
425 //sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
426 //sys Open(path string, mode int, perm uint32) (fd int, err error) = open64
427 //sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
428 //sys read(fd int, p []byte) (n int, err error)
429 //sys Readlink(path string, buf []byte) (n int, err error)
430 //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
431 //sys Setdomainname(p []byte) (err error)
432 //sys Sethostname(p []byte) (err error)
433 //sysnb Setpgid(pid int, pgid int) (err error)
434 //sysnb Setsid() (pid int, err error)
435 //sysnb Settimeofday(tv *Timeval) (err error)
436
437 //sys Setuid(uid int) (err error)
438 //sys Setgid(uid int) (err error)
439
440 //sys Setpriority(which int, who int, prio int) (err error)
441 //sys Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error)
442 //sys Sync()
443 //sysnb Times(tms *Tms) (ticks uintptr, err error)
444 //sysnb Umask(mask int) (oldmask int)
445 //sysnb Uname(buf *Utsname) (err error)
446 //TODO umount
447 // //sys Unmount(target string, flags int) (err error) = umount
448 //sys Unlink(path string) (err error)
449 //sys Unlinkat(dirfd int, path string, flags int) (err error)
450 //sys Ustat(dev int, ubuf *Ustat_t) (err error)
451 //sys write(fd int, p []byte) (n int, err error)
452 //sys readlen(fd int, p *byte, np int) (n int, err error) = read
453 //sys writelen(fd int, p *byte, np int) (n int, err error) = write
454
455 //sys Dup2(oldfd int, newfd int) (err error)
456 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = posix_fadvise64
457 //sys Fchown(fd int, uid int, gid int) (err error)
458 //sys Fstat(fd int, stat *Stat_t) (err error)
459 //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = fstatat
460 //sys Fstatfs(fd int, buf *Statfs_t) (err error)
461 //sys Ftruncate(fd int, length int64) (err error)
462 //sysnb Getegid() (egid int)
463 //sysnb Geteuid() (euid int)
464 //sysnb Getgid() (gid int)
465 //sysnb Getuid() (uid int)
466 //sys Lchown(path string, uid int, gid int) (err error)
467 //sys Listen(s int, n int) (err error)
468 //sys Lstat(path string, stat *Stat_t) (err error)
469 //sys Pause() (err error)
470 //sys Pread(fd int, p []byte, offset int64) (n int, err error) = pread64
471 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64
472 //TODO Select
473 // //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
474 //sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
475 //sysnb Setregid(rgid int, egid int) (err error)
476 //sysnb Setreuid(ruid int, euid int) (err error)
477 //sys Shutdown(fd int, how int) (err error)
478 //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
479 //sys Stat(path string, stat *Stat_t) (err error)
480 //sys Statfs(path string, buf *Statfs_t) (err error)
481 //sys Truncate(path string, length int64) (err error)
482
483 //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
484 //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
485 //sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
486 //sysnb setgroups(n int, list *_Gid_t) (err error)
487 //sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
488 //sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
489 //sysnb socket(domain int, typ int, proto int) (fd int, err error)
490 //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
491 //sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
492 //sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
493 //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
494 //sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
495 //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
496 //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
497
498 //sys munmap(addr uintptr, length uintptr) (err error)
499
500 var mapper = &mmapper{
501 active: make(map[*byte][]byte),
502 mmap: mmap,
503 munmap: munmap,
504 }
505
506 func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
507 return mapper.Mmap(fd, offset, length, prot, flags)
508 }
509
510 func Munmap(b []byte) (err error) {
511 return mapper.Munmap(b)
512 }
513
514 //sys Madvise(b []byte, advice int) (err error)
515 //sys Mprotect(b []byte, prot int) (err error)
516 //sys Mlock(b []byte) (err error)
517 //sys Mlockall(flags int) (err error)
518 //sys Msync(b []byte, flags int) (err error)
519 //sys Munlock(b []byte) (err error)
520 //sys Munlockall() (err error)
521
522 //sysnb pipe(p *[2]_C_int) (err error)
523
524 func Pipe(p []int) (err error) {
525 if len(p) != 2 {
526 return EINVAL
527 }
528 var pp [2]_C_int
529 err = pipe(&pp)
530 p[0] = int(pp[0])
531 p[1] = int(pp[1])
532 return
533 }
534
535 //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
536
537 func Poll(fds []PollFd, timeout int) (n int, err error) {
538 if len(fds) == 0 {
539 return poll(nil, 0, timeout)
540 }
541 return poll(&fds[0], len(fds), timeout)
542 }
543
544 //sys gettimeofday(tv *Timeval, tzp *Timezone) (err error)
545 //sysnb Time(t *Time_t) (tt Time_t, err error)
546 //sys Utime(path string, buf *Utimbuf) (err error)
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build aix
5 // +build ppc
6
7 package unix
8
9 //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
10 //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64
11 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
12
13 //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
14
15 func setTimespec(sec, nsec int64) Timespec {
16 return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
17 }
18
19 func setTimeval(sec, usec int64) Timeval {
20 return Timeval{Sec: int32(sec), Usec: int32(usec)}
21 }
22
23 func (iov *Iovec) SetLen(length int) {
24 iov.Len = uint32(length)
25 }
26
27 func (msghdr *Msghdr) SetControllen(length int) {
28 msghdr.Controllen = uint32(length)
29 }
30
31 func (cmsg *Cmsghdr) SetLen(length int) {
32 cmsg.Len = uint32(length)
33 }
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build aix
5 // +build ppc64
6
7 package unix
8
9 //sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
10 //sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
11 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek
12
13 //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64
14
15 func setTimespec(sec, nsec int64) Timespec {
16 return Timespec{Sec: sec, Nsec: nsec}
17 }
18
19 func setTimeval(sec, usec int64) Timeval {
20 return Timeval{Sec: int64(sec), Usec: int32(usec)}
21 }
22
23 func (iov *Iovec) SetLen(length int) {
24 iov.Len = uint64(length)
25 }
26
27 func (msghdr *Msghdr) SetControllen(length int) {
28 msghdr.Controllen = uint32(length)
29 }
30
31 func (cmsg *Cmsghdr) SetLen(length int) {
32 cmsg.Len = uint32(length)
33 }
3333 return nil, nil
3434 }
3535
36 // Sanity check group count. Max is 16 on BSD.
36 // Sanity check group count. Max is 16 on BSD.
3737 if n < 0 || n > 1000 {
3838 return nil, EINVAL
3939 }
205205 return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
206206 }
207207
208 func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
208 func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
209209 switch rsa.Addr.Family {
210210 case AF_LINK:
211211 pp := (*RawSockaddrDatalink)(unsafe.Pointer(rsa))
285285 Close(nfd)
286286 return 0, nil, ECONNABORTED
287287 }
288 sa, err = anyToSockaddr(&rsa)
288 sa, err = anyToSockaddr(fd, &rsa)
289289 if err != nil {
290290 Close(nfd)
291291 nfd = 0
305305 rsa.Addr.Family = AF_UNIX
306306 rsa.Addr.Len = SizeofSockaddrUnix
307307 }
308 return anyToSockaddr(&rsa)
308 return anyToSockaddr(fd, &rsa)
309309 }
310310
311311 //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
312312
313 func GetsockoptByte(fd, level, opt int) (value byte, err error) {
314 var n byte
315 vallen := _Socklen(1)
316 err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
317 return n, err
318 }
319
320 func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {
321 vallen := _Socklen(4)
322 err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
323 return value, err
324 }
325
326 func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {
327 var value IPMreq
328 vallen := _Socklen(SizeofIPMreq)
329 err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
330 return &value, err
331 }
332
333 func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {
334 var value IPv6Mreq
335 vallen := _Socklen(SizeofIPv6Mreq)
336 err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
337 return &value, err
338 }
339
340 func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
341 var value IPv6MTUInfo
342 vallen := _Socklen(SizeofIPv6MTUInfo)
343 err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
344 return &value, err
345 }
346
347 func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
348 var value ICMPv6Filter
349 vallen := _Socklen(SizeofICMPv6Filter)
350 err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
351 return &value, err
313 // GetsockoptString returns the string value of the socket option opt for the
314 // socket associated with fd at the given socket level.
315 func GetsockoptString(fd, level, opt int) (string, error) {
316 buf := make([]byte, 256)
317 vallen := _Socklen(len(buf))
318 err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen)
319 if err != nil {
320 return "", err
321 }
322 return string(buf[:vallen-1]), nil
352323 }
353324
354325 //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
384355 recvflags = int(msg.Flags)
385356 // source address is only specified if the socket is unconnected
386357 if rsa.Addr.Family != AF_UNSPEC {
387 from, err = anyToSockaddr(&rsa)
358 from, err = anyToSockaddr(fd, &rsa)
388359 }
389360 return
390361 }
569540 if len(ts) != 2 {
570541 return EINVAL
571542 }
572 err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
543 // Darwin setattrlist can set nanosecond timestamps
544 err := setattrlistTimes(path, ts, 0)
545 if err != ENOSYS {
546 return err
547 }
548 err = utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
573549 if err != ENOSYS {
574550 return err
575551 }
589565 if len(ts) != 2 {
590566 return EINVAL
591567 }
568 err := setattrlistTimes(path, ts, flags)
569 if err != ENOSYS {
570 return err
571 }
592572 return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
593573 }
594574
605585 }
606586
607587 //sys fcntl(fd int, cmd int, arg int) (val int, err error)
588
589 //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
590
591 func Poll(fds []PollFd, timeout int) (n int, err error) {
592 if len(fds) == 0 {
593 return poll(nil, 0, timeout)
594 }
595 return poll(&fds[0], len(fds), timeout)
596 }
608597
609598 // TODO: wrap
610599 // Acct(name nil-string) (err error)
1212 package unix
1313
1414 import (
15 errorspkg "errors"
15 "errors"
1616 "syscall"
1717 "unsafe"
1818 )
3535 return "", ENOTSUP
3636 }
3737
38 // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
3839 type SockaddrDatalink struct {
3940 Len uint8
4041 Family uint8
5354
5455 // NOTE(rsc): It seems strange to set the buffer to have
5556 // size CTL_MAXNAME+2 but use only CTL_MAXNAME
56 // as the size. I don't know why the +2 is here, but the
57 // as the size. I don't know why the +2 is here, but the
5758 // kernel uses +2 for its own implementation of this function.
5859 // I am scared that if we don't include the +2 here, the kernel
5960 // will silently write 2 words farther than we specify
7374 return nil, err
7475 }
7576 return buf[0 : n/siz], nil
76 }
77
78 func direntIno(buf []byte) (uint64, bool) {
79 return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
80 }
81
82 func direntReclen(buf []byte) (uint64, bool) {
83 return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
84 }
85
86 func direntNamlen(buf []byte) (uint64, bool) {
87 return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
8877 }
8978
9079 //sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
10897
10998 func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (attrs [][]byte, err error) {
11099 if len(attrBuf) < 4 {
111 return nil, errorspkg.New("attrBuf too small")
100 return nil, errors.New("attrBuf too small")
112101 }
113102 attrList.bitmapCount = attrBitMapCount
114103
118107 return nil, err
119108 }
120109
121 _, _, e1 := Syscall6(
122 SYS_GETATTRLIST,
123 uintptr(unsafe.Pointer(_p0)),
124 uintptr(unsafe.Pointer(&attrList)),
125 uintptr(unsafe.Pointer(&attrBuf[0])),
126 uintptr(len(attrBuf)),
127 uintptr(options),
128 0,
129 )
130 if e1 != 0 {
131 return nil, e1
110 if err := getattrlist(_p0, unsafe.Pointer(&attrList), unsafe.Pointer(&attrBuf[0]), uintptr(len(attrBuf)), int(options)); err != nil {
111 return nil, err
132112 }
133113 size := *(*uint32)(unsafe.Pointer(&attrBuf[0]))
134114
144124 for i := uint32(0); int(i) < len(dat); {
145125 header := dat[i:]
146126 if len(header) < 8 {
147 return attrs, errorspkg.New("truncated attribute header")
127 return attrs, errors.New("truncated attribute header")
148128 }
149129 datOff := *(*int32)(unsafe.Pointer(&header[0]))
150130 attrLen := *(*uint32)(unsafe.Pointer(&header[4]))
151131 if datOff < 0 || uint32(datOff)+attrLen > uint32(len(dat)) {
152 return attrs, errorspkg.New("truncated results; attrBuf too small")
132 return attrs, errors.New("truncated results; attrBuf too small")
153133 }
154134 end := uint32(datOff) + attrLen
155135 attrs = append(attrs, dat[datOff:end])
161141 return
162142 }
163143
144 //sys getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
145
164146 //sysnb pipe() (r int, w int, err error)
165147
166148 func Pipe(p []int) (err error) {
178160 _p0 = unsafe.Pointer(&buf[0])
179161 bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
180162 }
181 r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(_p0), bufsize, uintptr(flags))
182 n = int(r0)
183 if e1 != 0 {
184 err = e1
185 }
186 return
187 }
163 return getfsstat(_p0, bufsize, flags)
164 }
165
166 func xattrPointer(dest []byte) *byte {
167 // It's only when dest is set to NULL that the OS X implementations of
168 // getxattr() and listxattr() return the current sizes of the named attributes.
169 // An empty byte array is not sufficient. To maintain the same behaviour as the
170 // linux implementation, we wrap around the system calls and pass in NULL when
171 // dest is empty.
172 var destp *byte
173 if len(dest) > 0 {
174 destp = &dest[0]
175 }
176 return destp
177 }
178
179 //sys getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error)
180
181 func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
182 return getxattr(path, attr, xattrPointer(dest), len(dest), 0, 0)
183 }
184
185 func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {
186 return getxattr(link, attr, xattrPointer(dest), len(dest), 0, XATTR_NOFOLLOW)
187 }
188
189 //sys fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error)
190
191 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
192 return fgetxattr(fd, attr, xattrPointer(dest), len(dest), 0, 0)
193 }
194
195 //sys setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error)
196
197 func Setxattr(path string, attr string, data []byte, flags int) (err error) {
198 // The parameters for the OS X implementation vary slightly compared to the
199 // linux system call, specifically the position parameter:
200 //
201 // linux:
202 // int setxattr(
203 // const char *path,
204 // const char *name,
205 // const void *value,
206 // size_t size,
207 // int flags
208 // );
209 //
210 // darwin:
211 // int setxattr(
212 // const char *path,
213 // const char *name,
214 // void *value,
215 // size_t size,
216 // u_int32_t position,
217 // int options
218 // );
219 //
220 // position specifies the offset within the extended attribute. In the
221 // current implementation, only the resource fork extended attribute makes
222 // use of this argument. For all others, position is reserved. We simply
223 // default to setting it to zero.
224 return setxattr(path, attr, xattrPointer(data), len(data), 0, flags)
225 }
226
227 func Lsetxattr(link string, attr string, data []byte, flags int) (err error) {
228 return setxattr(link, attr, xattrPointer(data), len(data), 0, flags|XATTR_NOFOLLOW)
229 }
230
231 //sys fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error)
232
233 func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) {
234 return fsetxattr(fd, attr, xattrPointer(data), len(data), 0, 0)
235 }
236
237 //sys removexattr(path string, attr string, options int) (err error)
238
239 func Removexattr(path string, attr string) (err error) {
240 // We wrap around and explicitly zero out the options provided to the OS X
241 // implementation of removexattr, we do so for interoperability with the
242 // linux variant.
243 return removexattr(path, attr, 0)
244 }
245
246 func Lremovexattr(link string, attr string) (err error) {
247 return removexattr(link, attr, XATTR_NOFOLLOW)
248 }
249
250 //sys fremovexattr(fd int, attr string, options int) (err error)
251
252 func Fremovexattr(fd int, attr string) (err error) {
253 return fremovexattr(fd, attr, 0)
254 }
255
256 //sys listxattr(path string, dest *byte, size int, options int) (sz int, err error)
257
258 func Listxattr(path string, dest []byte) (sz int, err error) {
259 return listxattr(path, xattrPointer(dest), len(dest), 0)
260 }
261
262 func Llistxattr(link string, dest []byte) (sz int, err error) {
263 return listxattr(link, xattrPointer(dest), len(dest), XATTR_NOFOLLOW)
264 }
265
266 //sys flistxattr(fd int, dest *byte, size int, options int) (sz int, err error)
267
268 func Flistxattr(fd int, dest []byte) (sz int, err error) {
269 return flistxattr(fd, xattrPointer(dest), len(dest), 0)
270 }
271
272 func setattrlistTimes(path string, times []Timespec, flags int) error {
273 _p0, err := BytePtrFromString(path)
274 if err != nil {
275 return err
276 }
277
278 var attrList attrList
279 attrList.bitmapCount = ATTR_BIT_MAP_COUNT
280 attrList.CommonAttr = ATTR_CMN_MODTIME | ATTR_CMN_ACCTIME
281
282 // order is mtime, atime: the opposite of Chtimes
283 attributes := [2]Timespec{times[1], times[0]}
284 options := 0
285 if flags&AT_SYMLINK_NOFOLLOW != 0 {
286 options |= FSOPT_NOFOLLOW
287 }
288 return setattrlist(
289 _p0,
290 unsafe.Pointer(&attrList),
291 unsafe.Pointer(&attributes),
292 unsafe.Sizeof(attributes),
293 options)
294 }
295
296 //sys setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
188297
189298 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
190299 // Darwin doesn't support SYS_UTIMENSAT
210319 return ioctl(fd, req, uintptr(value))
211320 }
212321
213 func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
322 func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
214323 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
215324 }
216325
217 func IoctlSetTermios(fd int, req uint, value *Termios) error {
326 func ioctlSetTermios(fd int, req uint, value *Termios) error {
218327 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
219328 }
220329
237346 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
238347 return &value, err
239348 }
349
350 func Uname(uname *Utsname) error {
351 mib := []_C_int{CTL_KERN, KERN_OSTYPE}
352 n := unsafe.Sizeof(uname.Sysname)
353 if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {
354 return err
355 }
356
357 mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
358 n = unsafe.Sizeof(uname.Nodename)
359 if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {
360 return err
361 }
362
363 mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
364 n = unsafe.Sizeof(uname.Release)
365 if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {
366 return err
367 }
368
369 mib = []_C_int{CTL_KERN, KERN_VERSION}
370 n = unsafe.Sizeof(uname.Version)
371 if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {
372 return err
373 }
374
375 // The version might have newlines or tabs in it, convert them to
376 // spaces.
377 for i, b := range uname.Version {
378 if b == '\n' || b == '\t' {
379 if i == len(uname.Version)-1 {
380 uname.Version[i] = 0
381 } else {
382 uname.Version[i] = ' '
383 }
384 }
385 }
386
387 mib = []_C_int{CTL_HW, HW_MACHINE}
388 n = unsafe.Sizeof(uname.Machine)
389 if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {
390 return err
391 }
392
393 return nil
394 }
395
396 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
397 if raceenabled {
398 raceReleaseMerge(unsafe.Pointer(&ioSync))
399 }
400 var length = int64(count)
401 err = sendfile(infd, outfd, *offset, &length, nil, 0)
402 written = int(length)
403 return
404 }
405
406 //sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
240407
241408 /*
242409 * Exposed directly
262429 //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
263430 //sys Flock(fd int, how int) (err error)
264431 //sys Fpathconf(fd int, name int) (val int, err error)
265 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
266 //sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
267432 //sys Fsync(fd int) (err error)
268433 //sys Ftruncate(fd int, length int64) (err error)
269 //sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
270434 //sys Getdtablesize() (size int)
271435 //sysnb Getegid() (egid int)
272436 //sysnb Geteuid() (uid int)
286450 //sys Link(path string, link string) (err error)
287451 //sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
288452 //sys Listen(s int, backlog int) (err error)
289 //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
290453 //sys Mkdir(path string, mode uint32) (err error)
291454 //sys Mkdirat(dirfd int, path string, mode uint32) (err error)
292455 //sys Mkfifo(path string, mode uint32) (err error)
318481 //sysnb Setsid() (pid int, err error)
319482 //sysnb Settimeofday(tp *Timeval) (err error)
320483 //sysnb Setuid(uid int) (err error)
321 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
322 //sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
323484 //sys Symlink(path string, link string) (err error)
324485 //sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
325486 //sys Sync() (err error)
376537 // Searchfs
377538 // Delete
378539 // Copyfile
379 // Poll
380540 // Watchevent
381541 // Waitevent
382542 // Modwatch
383 // Getxattr
384 // Fgetxattr
385 // Setxattr
386 // Fsetxattr
387 // Removexattr
388 // Fremovexattr
389 // Listxattr
390 // Flistxattr
391543 // Fsctl
392544 // Initgroups
393545 // Posix_spawn
77
88 import (
99 "syscall"
10 "unsafe"
1110 )
1211
13 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
14
15 func NsecToTimespec(nsec int64) (ts Timespec) {
16 ts.Sec = int32(nsec / 1e9)
17 ts.Nsec = int32(nsec % 1e9)
18 return
12 func setTimespec(sec, nsec int64) Timespec {
13 return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
1914 }
2015
21 func NsecToTimeval(nsec int64) (tv Timeval) {
22 nsec += 999 // round up to microsecond
23 tv.Usec = int32(nsec % 1e9 / 1e3)
24 tv.Sec = int32(nsec / 1e9)
25 return
16 func setTimeval(sec, usec int64) Timeval {
17 return Timeval{Sec: int32(sec), Usec: int32(usec)}
2618 }
2719
2820 //sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
2921 func Gettimeofday(tv *Timeval) (err error) {
3022 // The tv passed to gettimeofday must be non-nil
31 // but is otherwise unused. The answers come back
23 // but is otherwise unused. The answers come back
3224 // in the two registers.
3325 sec, usec, err := gettimeofday(tv)
3426 tv.Sec = int32(sec)
5446 cmsg.Len = uint32(length)
5547 }
5648
57 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
58 var length = uint64(count)
59
60 _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
61
62 written = int(length)
63
64 if e1 != 0 {
65 err = e1
66 }
67 return
68 }
69
7049 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
7150
7251 // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
7352 // of darwin/386 the syscall is called sysctl instead of __sysctl.
7453 const SYS___SYSCTL = SYS_SYSCTL
54
55 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
56 //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
57 //sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
58 //sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
59 //sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
60 //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
61 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
62 //sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
77
88 import (
99 "syscall"
10 "unsafe"
1110 )
1211
13 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
14
15 func NsecToTimespec(nsec int64) (ts Timespec) {
16 ts.Sec = nsec / 1e9
17 ts.Nsec = nsec % 1e9
18 return
12 func setTimespec(sec, nsec int64) Timespec {
13 return Timespec{Sec: sec, Nsec: nsec}
1914 }
2015
21 func NsecToTimeval(nsec int64) (tv Timeval) {
22 nsec += 999 // round up to microsecond
23 tv.Usec = int32(nsec % 1e9 / 1e3)
24 tv.Sec = int64(nsec / 1e9)
25 return
16 func setTimeval(sec, usec int64) Timeval {
17 return Timeval{Sec: sec, Usec: int32(usec)}
2618 }
2719
2820 //sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
2921 func Gettimeofday(tv *Timeval) (err error) {
3022 // The tv passed to gettimeofday must be non-nil
31 // but is otherwise unused. The answers come back
23 // but is otherwise unused. The answers come back
3224 // in the two registers.
3325 sec, usec, err := gettimeofday(tv)
3426 tv.Sec = sec
5446 cmsg.Len = uint32(length)
5547 }
5648
57 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
58 var length = uint64(count)
59
60 _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
61
62 written = int(length)
63
64 if e1 != 0 {
65 err = e1
66 }
67 return
68 }
69
7049 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
7150
7251 // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
7352 // of darwin/amd64 the syscall is called sysctl instead of __sysctl.
7453 const SYS___SYSCTL = SYS_SYSCTL
54
55 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
56 //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
57 //sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
58 //sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
59 //sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
60 //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
61 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
62 //sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
55
66 import (
77 "syscall"
8 "unsafe"
98 )
109
11 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
12
13 func NsecToTimespec(nsec int64) (ts Timespec) {
14 ts.Sec = int32(nsec / 1e9)
15 ts.Nsec = int32(nsec % 1e9)
16 return
10 func setTimespec(sec, nsec int64) Timespec {
11 return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
1712 }
1813
19 func NsecToTimeval(nsec int64) (tv Timeval) {
20 nsec += 999 // round up to microsecond
21 tv.Usec = int32(nsec % 1e9 / 1e3)
22 tv.Sec = int32(nsec / 1e9)
23 return
14 func setTimeval(sec, usec int64) Timeval {
15 return Timeval{Sec: int32(sec), Usec: int32(usec)}
2416 }
2517
2618 //sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
2719 func Gettimeofday(tv *Timeval) (err error) {
2820 // The tv passed to gettimeofday must be non-nil
29 // but is otherwise unused. The answers come back
21 // but is otherwise unused. The answers come back
3022 // in the two registers.
3123 sec, usec, err := gettimeofday(tv)
3224 tv.Sec = int32(sec)
5244 cmsg.Len = uint32(length)
5345 }
5446
55 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
56 var length = uint64(count)
47 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
5748
58 _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
49 // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
50 // of darwin/arm the syscall is called sysctl instead of __sysctl.
51 const SYS___SYSCTL = SYS_SYSCTL
5952
60 written = int(length)
53 //sys Fstat(fd int, stat *Stat_t) (err error)
54 //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
55 //sys Fstatfs(fd int, stat *Statfs_t) (err error)
56 //sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
57 //sys Lstat(path string, stat *Stat_t) (err error)
58 //sys Stat(path string, stat *Stat_t) (err error)
59 //sys Statfs(path string, stat *Statfs_t) (err error)
6160
62 if e1 != 0 {
63 err = e1
64 }
65 return
61 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
62 return 0, ENOSYS
6663 }
67
68 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
77
88 import (
99 "syscall"
10 "unsafe"
1110 )
1211
13 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
14
15 func NsecToTimespec(nsec int64) (ts Timespec) {
16 ts.Sec = nsec / 1e9
17 ts.Nsec = nsec % 1e9
18 return
12 func setTimespec(sec, nsec int64) Timespec {
13 return Timespec{Sec: sec, Nsec: nsec}
1914 }
2015
21 func NsecToTimeval(nsec int64) (tv Timeval) {
22 nsec += 999 // round up to microsecond
23 tv.Usec = int32(nsec % 1e9 / 1e3)
24 tv.Sec = int64(nsec / 1e9)
25 return
16 func setTimeval(sec, usec int64) Timeval {
17 return Timeval{Sec: sec, Usec: int32(usec)}
2618 }
2719
2820 //sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
2921 func Gettimeofday(tv *Timeval) (err error) {
3022 // The tv passed to gettimeofday must be non-nil
31 // but is otherwise unused. The answers come back
23 // but is otherwise unused. The answers come back
3224 // in the two registers.
3325 sec, usec, err := gettimeofday(tv)
3426 tv.Sec = sec
5446 cmsg.Len = uint32(length)
5547 }
5648
57 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
58 var length = uint64(count)
59
60 _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
61
62 written = int(length)
63
64 if e1 != 0 {
65 err = e1
66 }
67 return
68 }
69
7049 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
7150
7251 // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
7352 // of darwin/arm64 the syscall is called sysctl instead of __sysctl.
7453 const SYS___SYSCTL = SYS_SYSCTL
54
55 //sys Fstat(fd int, stat *Stat_t) (err error)
56 //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
57 //sys Fstatfs(fd int, stat *Statfs_t) (err error)
58 //sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
59 //sys Lstat(path string, stat *Stat_t) (err error)
60 //sys Stat(path string, stat *Stat_t) (err error)
61 //sys Statfs(path string, stat *Statfs_t) (err error)
62
63 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
64 return 0, ENOSYS
65 }
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build darwin,go1.12
5
6 package unix
7
8 import "unsafe"
9
10 // Implemented in the runtime package (runtime/sys_darwin.go)
11 func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
12 func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
13 func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
14 func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only
15 func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
16 func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
17
18 //go:linkname syscall_syscall syscall.syscall
19 //go:linkname syscall_syscall6 syscall.syscall6
20 //go:linkname syscall_syscall6X syscall.syscall6X
21 //go:linkname syscall_syscall9 syscall.syscall9
22 //go:linkname syscall_rawSyscall syscall.rawSyscall
23 //go:linkname syscall_rawSyscall6 syscall.rawSyscall6
24
25 // Find the entry point for f. See comments in runtime/proc.go for the
26 // function of the same name.
27 //go:nosplit
28 func funcPC(f func()) uintptr {
29 return **(**uintptr)(unsafe.Pointer(&f))
30 }
1313
1414 import "unsafe"
1515
16 // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
1617 type SockaddrDatalink struct {
1718 Len uint8
1819 Family uint8
5556 return buf[0 : n/siz], nil
5657 }
5758
58 func direntIno(buf []byte) (uint64, bool) {
59 return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
60 }
61
62 func direntReclen(buf []byte) (uint64, bool) {
63 namlen, ok := direntNamlen(buf)
64 if !ok {
65 return 0, false
66 }
67 return (16 + namlen + 1 + 7) &^ 7, true
68 }
69
70 func direntNamlen(buf []byte) (uint64, bool) {
71 return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
72 }
73
7459 //sysnb pipe() (r int, w int, err error)
7560
7661 func Pipe(p []int) (err error) {
10186 if len > SizeofSockaddrAny {
10287 panic("RawSockaddrAny too small")
10388 }
104 sa, err = anyToSockaddr(&rsa)
89 sa, err = anyToSockaddr(fd, &rsa)
10590 if err != nil {
10691 Close(nfd)
10792 nfd = 0
10893 }
10994 return
95 }
96
97 const ImplementsGetwd = true
98
99 //sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
100
101 func Getwd() (string, error) {
102 var buf [PathMax]byte
103 _, err := Getcwd(buf[0:])
104 if err != nil {
105 return "", err
106 }
107 n := clen(buf[:])
108 if n < 1 {
109 return "", EINVAL
110 }
111 return string(buf[:n]), nil
110112 }
111113
112114 func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
122124 err = e1
123125 }
124126 return
127 }
128
129 func setattrlistTimes(path string, times []Timespec, flags int) error {
130 // used on Darwin for UtimesNano
131 return ENOSYS
132 }
133
134 //sys ioctl(fd int, req uint, arg uintptr) (err error)
135
136 // ioctl itself should not be exposed directly, but additional get/set
137 // functions for specific types are permissible.
138
139 // IoctlSetInt performs an ioctl operation which sets an integer value
140 // on fd, using the specified request number.
141 func IoctlSetInt(fd int, req uint, value int) error {
142 return ioctl(fd, req, uintptr(value))
143 }
144
145 func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
146 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
147 }
148
149 func ioctlSetTermios(fd int, req uint, value *Termios) error {
150 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
151 }
152
153 // IoctlGetInt performs an ioctl operation which gets an integer value
154 // from fd, using the specified request number.
155 func IoctlGetInt(fd int, req uint) (int, error) {
156 var value int
157 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
158 return value, err
159 }
160
161 func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
162 var value Winsize
163 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
164 return &value, err
165 }
166
167 func IoctlGetTermios(fd int, req uint) (*Termios, error) {
168 var value Termios
169 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
170 return &value, err
171 }
172
173 func sysctlUname(mib []_C_int, old *byte, oldlen *uintptr) error {
174 err := sysctl(mib, old, oldlen, nil, 0)
175 if err != nil {
176 // Utsname members on Dragonfly are only 32 bytes and
177 // the syscall returns ENOMEM in case the actual value
178 // is longer.
179 if err == ENOMEM {
180 err = nil
181 }
182 }
183 return err
184 }
185
186 func Uname(uname *Utsname) error {
187 mib := []_C_int{CTL_KERN, KERN_OSTYPE}
188 n := unsafe.Sizeof(uname.Sysname)
189 if err := sysctlUname(mib, &uname.Sysname[0], &n); err != nil {
190 return err
191 }
192 uname.Sysname[unsafe.Sizeof(uname.Sysname)-1] = 0
193
194 mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
195 n = unsafe.Sizeof(uname.Nodename)
196 if err := sysctlUname(mib, &uname.Nodename[0], &n); err != nil {
197 return err
198 }
199 uname.Nodename[unsafe.Sizeof(uname.Nodename)-1] = 0
200
201 mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
202 n = unsafe.Sizeof(uname.Release)
203 if err := sysctlUname(mib, &uname.Release[0], &n); err != nil {
204 return err
205 }
206 uname.Release[unsafe.Sizeof(uname.Release)-1] = 0
207
208 mib = []_C_int{CTL_KERN, KERN_VERSION}
209 n = unsafe.Sizeof(uname.Version)
210 if err := sysctlUname(mib, &uname.Version[0], &n); err != nil {
211 return err
212 }
213
214 // The version might have newlines or tabs in it, convert them to
215 // spaces.
216 for i, b := range uname.Version {
217 if b == '\n' || b == '\t' {
218 if i == len(uname.Version)-1 {
219 uname.Version[i] = 0
220 } else {
221 uname.Version[i] = ' '
222 }
223 }
224 }
225
226 mib = []_C_int{CTL_HW, HW_MACHINE}
227 n = unsafe.Sizeof(uname.Machine)
228 if err := sysctlUname(mib, &uname.Machine[0], &n); err != nil {
229 return err
230 }
231 uname.Machine[unsafe.Sizeof(uname.Machine)-1] = 0
232
233 return nil
234 }
235
236 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
237 if raceenabled {
238 raceReleaseMerge(unsafe.Pointer(&ioSync))
239 }
240 return sendfile(outfd, infd, offset, count)
125241 }
126242
127243 /*
138254 //sys Dup(fd int) (nfd int, err error)
139255 //sys Dup2(from int, to int) (err error)
140256 //sys Exit(code int)
257 //sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
141258 //sys Fchdir(fd int) (err error)
142259 //sys Fchflags(fd int, flags int) (err error)
143260 //sys Fchmod(fd int, mode uint32) (err error)
261 //sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
144262 //sys Fchown(fd int, uid int, gid int) (err error)
263 //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
145264 //sys Flock(fd int, how int) (err error)
146265 //sys Fpathconf(fd int, name int) (val int, err error)
147266 //sys Fstat(fd int, stat *Stat_t) (err error)
267 //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
148268 //sys Fstatfs(fd int, stat *Statfs_t) (err error)
149269 //sys Fsync(fd int) (err error)
150270 //sys Ftruncate(fd int, length int64) (err error)
168288 //sys Kqueue() (fd int, err error)
169289 //sys Lchown(path string, uid int, gid int) (err error)
170290 //sys Link(path string, link string) (err error)
291 //sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
171292 //sys Listen(s int, backlog int) (err error)
172293 //sys Lstat(path string, stat *Stat_t) (err error)
173294 //sys Mkdir(path string, mode uint32) (err error)
295 //sys Mkdirat(dirfd int, path string, mode uint32) (err error)
174296 //sys Mkfifo(path string, mode uint32) (err error)
175297 //sys Mknod(path string, mode uint32, dev int) (err error)
298 //sys Mknodat(fd int, path string, mode uint32, dev int) (err error)
176299 //sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
177300 //sys Open(path string, mode int, perm uint32) (fd int, err error)
301 //sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
178302 //sys Pathconf(path string, name int) (val int, err error)
179303 //sys read(fd int, p []byte) (n int, err error)
180304 //sys Readlink(path string, buf []byte) (n int, err error)
181305 //sys Rename(from string, to string) (err error)
306 //sys Renameat(fromfd int, from string, tofd int, to string) (err error)
182307 //sys Revoke(path string) (err error)
183308 //sys Rmdir(path string) (err error)
184309 //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
200325 //sys Stat(path string, stat *Stat_t) (err error)
201326 //sys Statfs(path string, stat *Statfs_t) (err error)
202327 //sys Symlink(path string, link string) (err error)
328 //sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
203329 //sys Sync() (err error)
204330 //sys Truncate(path string, length int64) (err error)
205331 //sys Umask(newmask int) (oldmask int)
206332 //sys Undelete(path string) (err error)
207333 //sys Unlink(path string) (err error)
334 //sys Unlinkat(dirfd int, path string, flags int) (err error)
208335 //sys Unmount(path string, flags int) (err error)
209336 //sys write(fd int, p []byte) (n int, err error)
210337 //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
224351 // Getlogin
225352 // Sigpending
226353 // Sigaltstack
227 // Ioctl
228354 // Reboot
229355 // Execve
230356 // Vfork
256382 // Searchfs
257383 // Delete
258384 // Copyfile
259 // Poll
260385 // Watchevent
261386 // Waitevent
262387 // Modwatch
402527 // Pread_nocancel
403528 // Pwrite_nocancel
404529 // Waitid_nocancel
405 // Poll_nocancel
406530 // Msgsnd_nocancel
407531 // Msgrcv_nocancel
408532 // Sem_wait_nocancel
1010 "unsafe"
1111 )
1212
13 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
14
15 func NsecToTimespec(nsec int64) (ts Timespec) {
16 ts.Sec = nsec / 1e9
17 ts.Nsec = nsec % 1e9
18 return
13 func setTimespec(sec, nsec int64) Timespec {
14 return Timespec{Sec: sec, Nsec: nsec}
1915 }
2016
21 func NsecToTimeval(nsec int64) (tv Timeval) {
22 nsec += 999 // round up to microsecond
23 tv.Usec = nsec % 1e9 / 1e3
24 tv.Sec = int64(nsec / 1e9)
25 return
17 func setTimeval(sec, usec int64) Timeval {
18 return Timeval{Sec: sec, Usec: usec}
2619 }
2720
2821 func SetKevent(k *Kevent_t, fd, mode, flags int) {
1111
1212 package unix
1313
14 import "unsafe"
15
14 import (
15 "sync"
16 "unsafe"
17 )
18
19 const (
20 SYS_FSTAT_FREEBSD12 = 551 // { int fstat(int fd, _Out_ struct stat *sb); }
21 SYS_FSTATAT_FREEBSD12 = 552 // { int fstatat(int fd, _In_z_ char *path, \
22 SYS_GETDIRENTRIES_FREEBSD12 = 554 // { ssize_t getdirentries(int fd, \
23 SYS_STATFS_FREEBSD12 = 555 // { int statfs(_In_z_ char *path, \
24 SYS_FSTATFS_FREEBSD12 = 556 // { int fstatfs(int fd, \
25 SYS_GETFSSTAT_FREEBSD12 = 557 // { int getfsstat( \
26 SYS_MKNODAT_FREEBSD12 = 559 // { int mknodat(int fd, _In_z_ char *path, \
27 )
28
29 // See https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/versions.html.
30 var (
31 osreldateOnce sync.Once
32 osreldate uint32
33 )
34
35 // INO64_FIRST from /usr/src/lib/libc/sys/compat-ino64.h
36 const _ino64First = 1200031
37
38 func supportsABI(ver uint32) bool {
39 osreldateOnce.Do(func() { osreldate, _ = SysctlUint32("kern.osreldate") })
40 return osreldate >= ver
41 }
42
43 // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
1644 type SockaddrDatalink struct {
1745 Len uint8
1846 Family uint8
3159
3260 // NOTE(rsc): It seems strange to set the buffer to have
3361 // size CTL_MAXNAME+2 but use only CTL_MAXNAME
34 // as the size. I don't know why the +2 is here, but the
62 // as the size. I don't know why the +2 is here, but the
3563 // kernel uses +2 for its own implementation of this function.
3664 // I am scared that if we don't include the +2 here, the kernel
3765 // will silently write 2 words farther than we specify
5381 return buf[0 : n/siz], nil
5482 }
5583
56 func direntIno(buf []byte) (uint64, bool) {
57 return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
58 }
59
60 func direntReclen(buf []byte) (uint64, bool) {
61 return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
62 }
63
64 func direntNamlen(buf []byte) (uint64, bool) {
65 return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
66 }
67
68 //sysnb pipe() (r int, w int, err error)
69
7084 func Pipe(p []int) (err error) {
85 return Pipe2(p, 0)
86 }
87
88 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
89
90 func Pipe2(p []int, flags int) error {
7191 if len(p) != 2 {
7292 return EINVAL
7393 }
74 p[0], p[1], err = pipe()
75 return
94 var pp [2]_C_int
95 err := pipe2(&pp, flags)
96 p[0] = int(pp[0])
97 p[1] = int(pp[1])
98 return err
7699 }
77100
78101 func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
96119 if len > SizeofSockaddrAny {
97120 panic("RawSockaddrAny too small")
98121 }
99 sa, err = anyToSockaddr(&rsa)
122 sa, err = anyToSockaddr(fd, &rsa)
100123 if err != nil {
101124 Close(nfd)
102125 nfd = 0
104127 return
105128 }
106129
130 const ImplementsGetwd = true
131
132 //sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
133
134 func Getwd() (string, error) {
135 var buf [PathMax]byte
136 _, err := Getcwd(buf[0:])
137 if err != nil {
138 return "", err
139 }
140 n := clen(buf[:])
141 if n < 1 {
142 return "", EINVAL
143 }
144 return string(buf[:n]), nil
145 }
146
107147 func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
108 var _p0 unsafe.Pointer
109 var bufsize uintptr
148 var (
149 _p0 unsafe.Pointer
150 bufsize uintptr
151 oldBuf []statfs_freebsd11_t
152 needsConvert bool
153 )
154
110155 if len(buf) > 0 {
111 _p0 = unsafe.Pointer(&buf[0])
112 bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
113 }
114 r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
156 if supportsABI(_ino64First) {
157 _p0 = unsafe.Pointer(&buf[0])
158 bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
159 } else {
160 n := len(buf)
161 oldBuf = make([]statfs_freebsd11_t, n)
162 _p0 = unsafe.Pointer(&oldBuf[0])
163 bufsize = unsafe.Sizeof(statfs_freebsd11_t{}) * uintptr(n)
164 needsConvert = true
165 }
166 }
167 var sysno uintptr = SYS_GETFSSTAT
168 if supportsABI(_ino64First) {
169 sysno = SYS_GETFSSTAT_FREEBSD12
170 }
171 r0, _, e1 := Syscall(sysno, uintptr(_p0), bufsize, uintptr(flags))
115172 n = int(r0)
116173 if e1 != 0 {
117174 err = e1
118175 }
176 if e1 == 0 && needsConvert {
177 for i := range oldBuf {
178 buf[i].convertFrom(&oldBuf[i])
179 }
180 }
119181 return
120182 }
121183
122 // Derive extattr namespace and attribute name
123
124 func xattrnamespace(fullattr string) (ns int, attr string, err error) {
125 s := -1
126 for idx, val := range fullattr {
127 if val == '.' {
128 s = idx
129 break
130 }
131 }
132
133 if s == -1 {
134 return -1, "", ENOATTR
135 }
136
137 namespace := fullattr[0:s]
138 attr = fullattr[s+1:]
139
140 switch namespace {
141 case "user":
142 return EXTATTR_NAMESPACE_USER, attr, nil
143 case "system":
144 return EXTATTR_NAMESPACE_SYSTEM, attr, nil
145 default:
146 return -1, "", ENOATTR
147 }
148 }
149
150 func initxattrdest(dest []byte, idx int) (d unsafe.Pointer) {
151 if len(dest) > idx {
152 return unsafe.Pointer(&dest[idx])
153 } else {
154 return unsafe.Pointer(_zero)
155 }
156 }
157
158 // FreeBSD implements its own syscalls to handle extended attributes
159
160 func Getxattr(file string, attr string, dest []byte) (sz int, err error) {
161 d := initxattrdest(dest, 0)
162 destsize := len(dest)
163
164 nsid, a, err := xattrnamespace(attr)
165 if err != nil {
166 return -1, err
167 }
168
169 return ExtattrGetFile(file, nsid, a, uintptr(d), destsize)
170 }
171
172 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
173 d := initxattrdest(dest, 0)
174 destsize := len(dest)
175
176 nsid, a, err := xattrnamespace(attr)
177 if err != nil {
178 return -1, err
179 }
180
181 return ExtattrGetFd(fd, nsid, a, uintptr(d), destsize)
182 }
183
184 func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {
185 d := initxattrdest(dest, 0)
186 destsize := len(dest)
187
188 nsid, a, err := xattrnamespace(attr)
189 if err != nil {
190 return -1, err
191 }
192
193 return ExtattrGetLink(link, nsid, a, uintptr(d), destsize)
194 }
195
196 // flags are unused on FreeBSD
197
198 func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) {
199 d := unsafe.Pointer(&data[0])
200 datasiz := len(data)
201
202 nsid, a, err := xattrnamespace(attr)
203 if err != nil {
204 return
205 }
206
207 _, err = ExtattrSetFd(fd, nsid, a, uintptr(d), datasiz)
208 return
209 }
210
211 func Setxattr(file string, attr string, data []byte, flags int) (err error) {
212 d := unsafe.Pointer(&data[0])
213 datasiz := len(data)
214
215 nsid, a, err := xattrnamespace(attr)
216 if err != nil {
217 return
218 }
219
220 _, err = ExtattrSetFile(file, nsid, a, uintptr(d), datasiz)
221 return
222 }
223
224 func Lsetxattr(link string, attr string, data []byte, flags int) (err error) {
225 d := unsafe.Pointer(&data[0])
226 datasiz := len(data)
227
228 nsid, a, err := xattrnamespace(attr)
229 if err != nil {
230 return
231 }
232
233 _, err = ExtattrSetLink(link, nsid, a, uintptr(d), datasiz)
234 return
235 }
236
237 func Removexattr(file string, attr string) (err error) {
238 nsid, a, err := xattrnamespace(attr)
239 if err != nil {
240 return
241 }
242
243 err = ExtattrDeleteFile(file, nsid, a)
244 return
245 }
246
247 func Fremovexattr(fd int, attr string) (err error) {
248 nsid, a, err := xattrnamespace(attr)
249 if err != nil {
250 return
251 }
252
253 err = ExtattrDeleteFd(fd, nsid, a)
254 return
255 }
256
257 func Lremovexattr(link string, attr string) (err error) {
258 nsid, a, err := xattrnamespace(attr)
259 if err != nil {
260 return
261 }
262
263 err = ExtattrDeleteLink(link, nsid, a)
264 return
265 }
266
267 func Listxattr(file string, dest []byte) (sz int, err error) {
268 d := initxattrdest(dest, 0)
269 destsiz := len(dest)
270
271 // FreeBSD won't allow you to list xattrs from multiple namespaces
272 s := 0
273 var e error
274 for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
275 stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
276
277 /* Errors accessing system attrs are ignored so that
278 * we can implement the Linux-like behavior of omitting errors that
279 * we don't have read permissions on
280 *
281 * Linux will still error if we ask for user attributes on a file that
282 * we don't have read permissions on, so don't ignore those errors
283 */
284 if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
285 e = nil
286 continue
287 } else if e != nil {
288 return s, e
289 }
290
291 s += stmp
292 destsiz -= s
293 if destsiz < 0 {
294 destsiz = 0
295 }
296 d = initxattrdest(dest, s)
297 }
298
299 return s, e
300 }
301
302 func Flistxattr(fd int, dest []byte) (sz int, err error) {
303 d := initxattrdest(dest, 0)
304 destsiz := len(dest)
305
306 s := 0
307 var e error
308 for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
309 stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
310 if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
311 e = nil
312 continue
313 } else if e != nil {
314 return s, e
315 }
316
317 s += stmp
318 destsiz -= s
319 if destsiz < 0 {
320 destsiz = 0
321 }
322 d = initxattrdest(dest, s)
323 }
324
325 return s, e
326 }
327
328 func Llistxattr(link string, dest []byte) (sz int, err error) {
329 d := initxattrdest(dest, 0)
330 destsiz := len(dest)
331
332 s := 0
333 var e error
334 for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
335 stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
336 if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
337 e = nil
338 continue
339 } else if e != nil {
340 return s, e
341 }
342
343 s += stmp
344 destsiz -= s
345 if destsiz < 0 {
346 destsiz = 0
347 }
348 d = initxattrdest(dest, s)
349 }
350
351 return s, e
184 func setattrlistTimes(path string, times []Timespec, flags int) error {
185 // used on Darwin for UtimesNano
186 return ENOSYS
352187 }
353188
354189 //sys ioctl(fd int, req uint, arg uintptr) (err error)
362197 return ioctl(fd, req, uintptr(value))
363198 }
364199
365 func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
200 func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
366201 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
367202 }
368203
369 func IoctlSetTermios(fd int, req uint, value *Termios) error {
204 func ioctlSetTermios(fd int, req uint, value *Termios) error {
370205 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
371206 }
372207
388223 var value Termios
389224 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
390225 return &value, err
226 }
227
228 func Uname(uname *Utsname) error {
229 mib := []_C_int{CTL_KERN, KERN_OSTYPE}
230 n := unsafe.Sizeof(uname.Sysname)
231 if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {
232 return err
233 }
234
235 mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
236 n = unsafe.Sizeof(uname.Nodename)
237 if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {
238 return err
239 }
240
241 mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
242 n = unsafe.Sizeof(uname.Release)
243 if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {
244 return err
245 }
246
247 mib = []_C_int{CTL_KERN, KERN_VERSION}
248 n = unsafe.Sizeof(uname.Version)
249 if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {
250 return err
251 }
252
253 // The version might have newlines or tabs in it, convert them to
254 // spaces.
255 for i, b := range uname.Version {
256 if b == '\n' || b == '\t' {
257 if i == len(uname.Version)-1 {
258 uname.Version[i] = 0
259 } else {
260 uname.Version[i] = ' '
261 }
262 }
263 }
264
265 mib = []_C_int{CTL_HW, HW_MACHINE}
266 n = unsafe.Sizeof(uname.Machine)
267 if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {
268 return err
269 }
270
271 return nil
272 }
273
274 func Stat(path string, st *Stat_t) (err error) {
275 var oldStat stat_freebsd11_t
276 if supportsABI(_ino64First) {
277 return fstatat_freebsd12(AT_FDCWD, path, st, 0)
278 }
279 err = stat(path, &oldStat)
280 if err != nil {
281 return err
282 }
283
284 st.convertFrom(&oldStat)
285 return nil
286 }
287
288 func Lstat(path string, st *Stat_t) (err error) {
289 var oldStat stat_freebsd11_t
290 if supportsABI(_ino64First) {
291 return fstatat_freebsd12(AT_FDCWD, path, st, AT_SYMLINK_NOFOLLOW)
292 }
293 err = lstat(path, &oldStat)
294 if err != nil {
295 return err
296 }
297
298 st.convertFrom(&oldStat)
299 return nil
300 }
301
302 func Fstat(fd int, st *Stat_t) (err error) {
303 var oldStat stat_freebsd11_t
304 if supportsABI(_ino64First) {
305 return fstat_freebsd12(fd, st)
306 }
307 err = fstat(fd, &oldStat)
308 if err != nil {
309 return err
310 }
311
312 st.convertFrom(&oldStat)
313 return nil
314 }
315
316 func Fstatat(fd int, path string, st *Stat_t, flags int) (err error) {
317 var oldStat stat_freebsd11_t
318 if supportsABI(_ino64First) {
319 return fstatat_freebsd12(fd, path, st, flags)
320 }
321 err = fstatat(fd, path, &oldStat, flags)
322 if err != nil {
323 return err
324 }
325
326 st.convertFrom(&oldStat)
327 return nil
328 }
329
330 func Statfs(path string, st *Statfs_t) (err error) {
331 var oldStatfs statfs_freebsd11_t
332 if supportsABI(_ino64First) {
333 return statfs_freebsd12(path, st)
334 }
335 err = statfs(path, &oldStatfs)
336 if err != nil {
337 return err
338 }
339
340 st.convertFrom(&oldStatfs)
341 return nil
342 }
343
344 func Fstatfs(fd int, st *Statfs_t) (err error) {
345 var oldStatfs statfs_freebsd11_t
346 if supportsABI(_ino64First) {
347 return fstatfs_freebsd12(fd, st)
348 }
349 err = fstatfs(fd, &oldStatfs)
350 if err != nil {
351 return err
352 }
353
354 st.convertFrom(&oldStatfs)
355 return nil
356 }
357
358 func Getdents(fd int, buf []byte) (n int, err error) {
359 return Getdirentries(fd, buf, nil)
360 }
361
362 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
363 if supportsABI(_ino64First) {
364 return getdirentries_freebsd12(fd, buf, basep)
365 }
366
367 // The old syscall entries are smaller than the new. Use 1/4 of the original
368 // buffer size rounded up to DIRBLKSIZ (see /usr/src/lib/libc/sys/getdirentries.c).
369 oldBufLen := roundup(len(buf)/4, _dirblksiz)
370 oldBuf := make([]byte, oldBufLen)
371 n, err = getdirentries(fd, oldBuf, basep)
372 if err == nil && n > 0 {
373 n = convertFromDirents11(buf, oldBuf[:n])
374 }
375 return
376 }
377
378 func Mknod(path string, mode uint32, dev uint64) (err error) {
379 var oldDev int
380 if supportsABI(_ino64First) {
381 return mknodat_freebsd12(AT_FDCWD, path, mode, dev)
382 }
383 oldDev = int(dev)
384 return mknod(path, mode, oldDev)
385 }
386
387 func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {
388 var oldDev int
389 if supportsABI(_ino64First) {
390 return mknodat_freebsd12(fd, path, mode, dev)
391 }
392 oldDev = int(dev)
393 return mknodat(fd, path, mode, oldDev)
394 }
395
396 // round x to the nearest multiple of y, larger or equal to x.
397 //
398 // from /usr/include/sys/param.h Macros for counting and rounding.
399 // #define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
400 func roundup(x, y int) int {
401 return ((x + y - 1) / y) * y
402 }
403
404 func (s *Stat_t) convertFrom(old *stat_freebsd11_t) {
405 *s = Stat_t{
406 Dev: uint64(old.Dev),
407 Ino: uint64(old.Ino),
408 Nlink: uint64(old.Nlink),
409 Mode: old.Mode,
410 Uid: old.Uid,
411 Gid: old.Gid,
412 Rdev: uint64(old.Rdev),
413 Atim: old.Atim,
414 Mtim: old.Mtim,
415 Ctim: old.Ctim,
416 Birthtim: old.Birthtim,
417 Size: old.Size,
418 Blocks: old.Blocks,
419 Blksize: old.Blksize,
420 Flags: old.Flags,
421 Gen: uint64(old.Gen),
422 }
423 }
424
425 func (s *Statfs_t) convertFrom(old *statfs_freebsd11_t) {
426 *s = Statfs_t{
427 Version: _statfsVersion,
428 Type: old.Type,
429 Flags: old.Flags,
430 Bsize: old.Bsize,
431 Iosize: old.Iosize,
432 Blocks: old.Blocks,
433 Bfree: old.Bfree,
434 Bavail: old.Bavail,
435 Files: old.Files,
436 Ffree: old.Ffree,
437 Syncwrites: old.Syncwrites,
438 Asyncwrites: old.Asyncwrites,
439 Syncreads: old.Syncreads,
440 Asyncreads: old.Asyncreads,
441 // Spare
442 Namemax: old.Namemax,
443 Owner: old.Owner,
444 Fsid: old.Fsid,
445 // Charspare
446 // Fstypename
447 // Mntfromname
448 // Mntonname
449 }
450
451 sl := old.Fstypename[:]
452 n := clen(*(*[]byte)(unsafe.Pointer(&sl)))
453 copy(s.Fstypename[:], old.Fstypename[:n])
454
455 sl = old.Mntfromname[:]
456 n = clen(*(*[]byte)(unsafe.Pointer(&sl)))
457 copy(s.Mntfromname[:], old.Mntfromname[:n])
458
459 sl = old.Mntonname[:]
460 n = clen(*(*[]byte)(unsafe.Pointer(&sl)))
461 copy(s.Mntonname[:], old.Mntonname[:n])
462 }
463
464 func convertFromDirents11(buf []byte, old []byte) int {
465 const (
466 fixedSize = int(unsafe.Offsetof(Dirent{}.Name))
467 oldFixedSize = int(unsafe.Offsetof(dirent_freebsd11{}.Name))
468 )
469
470 dstPos := 0
471 srcPos := 0
472 for dstPos+fixedSize < len(buf) && srcPos+oldFixedSize < len(old) {
473 dstDirent := (*Dirent)(unsafe.Pointer(&buf[dstPos]))
474 srcDirent := (*dirent_freebsd11)(unsafe.Pointer(&old[srcPos]))
475
476 reclen := roundup(fixedSize+int(srcDirent.Namlen)+1, 8)
477 if dstPos+reclen > len(buf) {
478 break
479 }
480
481 dstDirent.Fileno = uint64(srcDirent.Fileno)
482 dstDirent.Off = 0
483 dstDirent.Reclen = uint16(reclen)
484 dstDirent.Type = srcDirent.Type
485 dstDirent.Pad0 = 0
486 dstDirent.Namlen = uint16(srcDirent.Namlen)
487 dstDirent.Pad1 = 0
488
489 copy(dstDirent.Name[:], srcDirent.Name[:srcDirent.Namlen])
490 padding := buf[dstPos+fixedSize+int(dstDirent.Namlen) : dstPos+reclen]
491 for i := range padding {
492 padding[i] = 0
493 }
494
495 dstPos += int(dstDirent.Reclen)
496 srcPos += int(srcDirent.Reclen)
497 }
498
499 return dstPos
500 }
501
502 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
503 if raceenabled {
504 raceReleaseMerge(unsafe.Pointer(&ioSync))
505 }
506 return sendfile(outfd, infd, offset, count)
391507 }
392508
393509 /*
429545 //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
430546 //sys Flock(fd int, how int) (err error)
431547 //sys Fpathconf(fd int, name int) (val int, err error)
432 //sys Fstat(fd int, stat *Stat_t) (err error)
433 //sys Fstatfs(fd int, stat *Statfs_t) (err error)
548 //sys fstat(fd int, stat *stat_freebsd11_t) (err error)
549 //sys fstat_freebsd12(fd int, stat *Stat_t) (err error)
550 //sys fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error)
551 //sys fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error)
552 //sys fstatfs(fd int, stat *statfs_freebsd11_t) (err error)
553 //sys fstatfs_freebsd12(fd int, stat *Statfs_t) (err error)
434554 //sys Fsync(fd int) (err error)
435555 //sys Ftruncate(fd int, length int64) (err error)
436 //sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
556 //sys getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
557 //sys getdirentries_freebsd12(fd int, buf []byte, basep *uintptr) (n int, err error)
437558 //sys Getdtablesize() (size int)
438559 //sysnb Getegid() (egid int)
439560 //sysnb Geteuid() (uid int)
455576 //sys Link(path string, link string) (err error)
456577 //sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
457578 //sys Listen(s int, backlog int) (err error)
458 //sys Lstat(path string, stat *Stat_t) (err error)
579 //sys lstat(path string, stat *stat_freebsd11_t) (err error)
459580 //sys Mkdir(path string, mode uint32) (err error)
460581 //sys Mkdirat(dirfd int, path string, mode uint32) (err error)
461582 //sys Mkfifo(path string, mode uint32) (err error)
462 //sys Mknod(path string, mode uint32, dev int) (err error)
583 //sys mknod(path string, mode uint32, dev int) (err error)
584 //sys mknodat(fd int, path string, mode uint32, dev int) (err error)
585 //sys mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error)
463586 //sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
464587 //sys Open(path string, mode int, perm uint32) (fd int, err error)
465588 //sys Openat(fdat int, path string, mode int, perm uint32) (fd int, err error)
489612 //sysnb Setsid() (pid int, err error)
490613 //sysnb Settimeofday(tp *Timeval) (err error)
491614 //sysnb Setuid(uid int) (err error)
492 //sys Stat(path string, stat *Stat_t) (err error)
493 //sys Statfs(path string, stat *Statfs_t) (err error)
615 //sys stat(path string, stat *stat_freebsd11_t) (err error)
616 //sys statfs(path string, stat *statfs_freebsd11_t) (err error)
617 //sys statfs_freebsd12(path string, stat *Statfs_t) (err error)
494618 //sys Symlink(path string, link string) (err error)
495619 //sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
496620 //sys Sync() (err error)
545669 // Kqueue_portset
546670 // Getattrlist
547671 // Setattrlist
672 // Getdents
548673 // Getdirentriesattr
549674 // Searchfs
550675 // Delete
551676 // Copyfile
552 // Poll
553677 // Watchevent
554678 // Waitevent
555679 // Modwatch
556 // Getxattr
557 // Fgetxattr
558 // Setxattr
559 // Fsetxattr
560 // Removexattr
561 // Fremovexattr
562 // Listxattr
563 // Flistxattr
564680 // Fsctl
565681 // Initgroups
566682 // Posix_spawn
1010 "unsafe"
1111 )
1212
13 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
14
15 func NsecToTimespec(nsec int64) (ts Timespec) {
16 ts.Sec = int32(nsec / 1e9)
17 ts.Nsec = int32(nsec % 1e9)
18 return
13 func setTimespec(sec, nsec int64) Timespec {
14 return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
1915 }
2016
21 func NsecToTimeval(nsec int64) (tv Timeval) {
22 nsec += 999 // round up to microsecond
23 tv.Usec = int32(nsec % 1e9 / 1e3)
24 tv.Sec = int32(nsec / 1e9)
25 return
17 func setTimeval(sec, usec int64) Timeval {
18 return Timeval{Sec: int32(sec), Usec: int32(usec)}
2619 }
2720
2821 func SetKevent(k *Kevent_t, fd, mode, flags int) {
1010 "unsafe"
1111 )
1212
13 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
14
15 func NsecToTimespec(nsec int64) (ts Timespec) {
16 ts.Sec = nsec / 1e9
17 ts.Nsec = nsec % 1e9
18 return
13 func setTimespec(sec, nsec int64) Timespec {
14 return Timespec{Sec: sec, Nsec: nsec}
1915 }
2016
21 func NsecToTimeval(nsec int64) (tv Timeval) {
22 nsec += 999 // round up to microsecond
23 tv.Usec = nsec % 1e9 / 1e3
24 tv.Sec = int64(nsec / 1e9)
25 return
17 func setTimeval(sec, usec int64) Timeval {
18 return Timeval{Sec: sec, Usec: usec}
2619 }
2720
2821 func SetKevent(k *Kevent_t, fd, mode, flags int) {
1010 "unsafe"
1111 )
1212
13 func TimespecToNsec(ts Timespec) int64 { return ts.Sec*1e9 + int64(ts.Nsec) }
14
15 func NsecToTimespec(nsec int64) (ts Timespec) {
16 ts.Sec = nsec / 1e9
17 ts.Nsec = int32(nsec % 1e9)
18 return
13 func setTimespec(sec, nsec int64) Timespec {
14 return Timespec{Sec: sec, Nsec: int32(nsec)}
1915 }
2016
21 func NsecToTimeval(nsec int64) (tv Timeval) {
22 nsec += 999 // round up to microsecond
23 tv.Usec = int32(nsec % 1e9 / 1e3)
24 tv.Sec = nsec / 1e9
25 return
17 func setTimeval(sec, usec int64) Timeval {
18 return Timeval{Sec: sec, Usec: int32(usec)}
2619 }
2720
2821 func SetKevent(k *Kevent_t, fd, mode, flags int) {
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build arm64,freebsd
5
6 package unix
7
8 import (
9 "syscall"
10 "unsafe"
11 )
12
13 func setTimespec(sec, nsec int64) Timespec {
14 return Timespec{Sec: sec, Nsec: nsec}
15 }
16
17 func setTimeval(sec, usec int64) Timeval {
18 return Timeval{Sec: sec, Usec: usec}
19 }
20
21 func SetKevent(k *Kevent_t, fd, mode, flags int) {
22 k.Ident = uint64(fd)
23 k.Filter = int16(mode)
24 k.Flags = uint16(flags)
25 }
26
27 func (iov *Iovec) SetLen(length int) {
28 iov.Len = uint64(length)
29 }
30
31 func (msghdr *Msghdr) SetControllen(length int) {
32 msghdr.Controllen = uint32(length)
33 }
34
35 func (cmsg *Cmsghdr) SetLen(length int) {
36 cmsg.Len = uint32(length)
37 }
38
39 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
40 var writtenOut uint64 = 0
41 _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
42
43 written = int(writtenOut)
44
45 if e1 != 0 {
46 err = e1
47 }
48 return
49 }
50
51 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
1111 package unix
1212
1313 import (
14 "encoding/binary"
15 "net"
1416 "syscall"
1517 "unsafe"
1618 )
5456 // ioctl itself should not be exposed directly, but additional get/set
5557 // functions for specific types are permissible.
5658
59 // IoctlSetPointerInt performs an ioctl operation which sets an
60 // integer value on fd, using the specified request number. The ioctl
61 // argument is called with a pointer to the integer value, rather than
62 // passing the integer value directly.
63 func IoctlSetPointerInt(fd int, req uint, value int) error {
64 v := int32(value)
65 return ioctl(fd, req, uintptr(unsafe.Pointer(&v)))
66 }
67
5768 // IoctlSetInt performs an ioctl operation which sets an integer value
5869 // on fd, using the specified request number.
5970 func IoctlSetInt(fd int, req uint, value int) error {
6071 return ioctl(fd, req, uintptr(value))
6172 }
6273
63 func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
74 func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
6475 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
6576 }
6677
67 func IoctlSetTermios(fd int, req uint, value *Termios) error {
78 func ioctlSetTermios(fd int, req uint, value *Termios) error {
6879 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
6980 }
7081
147158
148159 //sys Unlinkat(dirfd int, path string, flags int) (err error)
149160
150 //sys utimes(path string, times *[2]Timeval) (err error)
151
152161 func Utimes(path string, tv []Timeval) error {
153162 if tv == nil {
154163 err := utimensat(AT_FDCWD, path, nil, 0)
206215 return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
207216 }
208217
209 //sys futimesat(dirfd int, path *byte, times *[2]Timeval) (err error)
210
211218 func Futimesat(dirfd int, path string, tv []Timeval) error {
212 pathp, err := BytePtrFromString(path)
213 if err != nil {
214 return err
215 }
216219 if tv == nil {
217 return futimesat(dirfd, pathp, nil)
220 return futimesat(dirfd, path, nil)
218221 }
219222 if len(tv) != 2 {
220223 return EINVAL
221224 }
222 return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
225 return futimesat(dirfd, path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
223226 }
224227
225228 func Futimes(fd int, tv []Timeval) (err error) {
254257 return nil, nil
255258 }
256259
257 // Sanity check group count. Max is 1<<16 on Linux.
260 // Sanity check group count. Max is 1<<16 on Linux.
258261 if n < 0 || n > 1<<20 {
259262 return nil, EINVAL
260263 }
289292 // 0x7F (stopped), or a signal number that caused an exit.
290293 // The 0x80 bit is whether there was a core dump.
291294 // An extra number (exit code, signal causing a stop)
292 // is in the high bits. At least that's the idea.
293 // There are various irregularities. For example, the
295 // is in the high bits. At least that's the idea.
296 // There are various irregularities. For example, the
294297 // "continued" status is 0xFFFF, distinguishing itself
295298 // from stopped via the core dump bit.
296299
412415 return unsafe.Pointer(&sa.raw), sl, nil
413416 }
414417
418 // SockaddrLinklayer implements the Sockaddr interface for AF_PACKET type sockets.
415419 type SockaddrLinklayer struct {
416420 Protocol uint16
417421 Ifindex int
438442 return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
439443 }
440444
445 // SockaddrNetlink implements the Sockaddr interface for AF_NETLINK type sockets.
441446 type SockaddrNetlink struct {
442447 Family uint16
443448 Pad uint16
454459 return unsafe.Pointer(&sa.raw), SizeofSockaddrNetlink, nil
455460 }
456461
462 // SockaddrHCI implements the Sockaddr interface for AF_BLUETOOTH type sockets
463 // using the HCI protocol.
457464 type SockaddrHCI struct {
458465 Dev uint16
459466 Channel uint16
465472 sa.raw.Dev = sa.Dev
466473 sa.raw.Channel = sa.Channel
467474 return unsafe.Pointer(&sa.raw), SizeofSockaddrHCI, nil
475 }
476
477 // SockaddrL2 implements the Sockaddr interface for AF_BLUETOOTH type sockets
478 // using the L2CAP protocol.
479 type SockaddrL2 struct {
480 PSM uint16
481 CID uint16
482 Addr [6]uint8
483 AddrType uint8
484 raw RawSockaddrL2
485 }
486
487 func (sa *SockaddrL2) sockaddr() (unsafe.Pointer, _Socklen, error) {
488 sa.raw.Family = AF_BLUETOOTH
489 psm := (*[2]byte)(unsafe.Pointer(&sa.raw.Psm))
490 psm[0] = byte(sa.PSM)
491 psm[1] = byte(sa.PSM >> 8)
492 for i := 0; i < len(sa.Addr); i++ {
493 sa.raw.Bdaddr[i] = sa.Addr[len(sa.Addr)-1-i]
494 }
495 cid := (*[2]byte)(unsafe.Pointer(&sa.raw.Cid))
496 cid[0] = byte(sa.CID)
497 cid[1] = byte(sa.CID >> 8)
498 sa.raw.Bdaddr_type = sa.AddrType
499 return unsafe.Pointer(&sa.raw), SizeofSockaddrL2, nil
500 }
501
502 // SockaddrRFCOMM implements the Sockaddr interface for AF_BLUETOOTH type sockets
503 // using the RFCOMM protocol.
504 //
505 // Server example:
506 //
507 // fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)
508 // _ = unix.Bind(fd, &unix.SockaddrRFCOMM{
509 // Channel: 1,
510 // Addr: [6]uint8{0, 0, 0, 0, 0, 0}, // BDADDR_ANY or 00:00:00:00:00:00
511 // })
512 // _ = Listen(fd, 1)
513 // nfd, sa, _ := Accept(fd)
514 // fmt.Printf("conn addr=%v fd=%d", sa.(*unix.SockaddrRFCOMM).Addr, nfd)
515 // Read(nfd, buf)
516 //
517 // Client example:
518 //
519 // fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)
520 // _ = Connect(fd, &SockaddrRFCOMM{
521 // Channel: 1,
522 // Addr: [6]byte{0x11, 0x22, 0x33, 0xaa, 0xbb, 0xcc}, // CC:BB:AA:33:22:11
523 // })
524 // Write(fd, []byte(`hello`))
525 type SockaddrRFCOMM struct {
526 // Addr represents a bluetooth address, byte ordering is little-endian.
527 Addr [6]uint8
528
529 // Channel is a designated bluetooth channel, only 1-30 are available for use.
530 // Since Linux 2.6.7 and further zero value is the first available channel.
531 Channel uint8
532
533 raw RawSockaddrRFCOMM
534 }
535
536 func (sa *SockaddrRFCOMM) sockaddr() (unsafe.Pointer, _Socklen, error) {
537 sa.raw.Family = AF_BLUETOOTH
538 sa.raw.Channel = sa.Channel
539 sa.raw.Bdaddr = sa.Addr
540 return unsafe.Pointer(&sa.raw), SizeofSockaddrRFCOMM, nil
468541 }
469542
470543 // SockaddrCAN implements the Sockaddr interface for AF_CAN type sockets.
629702 return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
630703 }
631704
632 func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
705 type SockaddrXDP struct {
706 Flags uint16
707 Ifindex uint32
708 QueueID uint32
709 SharedUmemFD uint32
710 raw RawSockaddrXDP
711 }
712
713 func (sa *SockaddrXDP) sockaddr() (unsafe.Pointer, _Socklen, error) {
714 sa.raw.Family = AF_XDP
715 sa.raw.Flags = sa.Flags
716 sa.raw.Ifindex = sa.Ifindex
717 sa.raw.Queue_id = sa.QueueID
718 sa.raw.Shared_umem_fd = sa.SharedUmemFD
719
720 return unsafe.Pointer(&sa.raw), SizeofSockaddrXDP, nil
721 }
722
723 // This constant mirrors the #define of PX_PROTO_OE in
724 // linux/if_pppox.h. We're defining this by hand here instead of
725 // autogenerating through mkerrors.sh because including
726 // linux/if_pppox.h causes some declaration conflicts with other
727 // includes (linux/if_pppox.h includes linux/in.h, which conflicts
728 // with netinet/in.h). Given that we only need a single zero constant
729 // out of that file, it's cleaner to just define it by hand here.
730 const px_proto_oe = 0
731
732 type SockaddrPPPoE struct {
733 SID uint16
734 Remote net.HardwareAddr
735 Dev string
736 raw RawSockaddrPPPoX
737 }
738
739 func (sa *SockaddrPPPoE) sockaddr() (unsafe.Pointer, _Socklen, error) {
740 if len(sa.Remote) != 6 {
741 return nil, 0, EINVAL
742 }
743 if len(sa.Dev) > IFNAMSIZ-1 {
744 return nil, 0, EINVAL
745 }
746
747 *(*uint16)(unsafe.Pointer(&sa.raw[0])) = AF_PPPOX
748 // This next field is in host-endian byte order. We can't use the
749 // same unsafe pointer cast as above, because this value is not
750 // 32-bit aligned and some architectures don't allow unaligned
751 // access.
752 //
753 // However, the value of px_proto_oe is 0, so we can use
754 // encoding/binary helpers to write the bytes without worrying
755 // about the ordering.
756 binary.BigEndian.PutUint32(sa.raw[2:6], px_proto_oe)
757 // This field is deliberately big-endian, unlike the previous
758 // one. The kernel expects SID to be in network byte order.
759 binary.BigEndian.PutUint16(sa.raw[6:8], sa.SID)
760 copy(sa.raw[8:14], sa.Remote)
761 for i := 14; i < 14+IFNAMSIZ; i++ {
762 sa.raw[i] = 0
763 }
764 copy(sa.raw[14:], sa.Dev)
765 return unsafe.Pointer(&sa.raw), SizeofSockaddrPPPoX, nil
766 }
767
768 func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
633769 switch rsa.Addr.Family {
634770 case AF_NETLINK:
635771 pp := (*RawSockaddrNetlink)(unsafe.Pointer(rsa))
706842 Port: pp.Port,
707843 }
708844 return sa, nil
845 case AF_BLUETOOTH:
846 proto, err := GetsockoptInt(fd, SOL_SOCKET, SO_PROTOCOL)
847 if err != nil {
848 return nil, err
849 }
850 // only BTPROTO_L2CAP and BTPROTO_RFCOMM can accept connections
851 switch proto {
852 case BTPROTO_L2CAP:
853 pp := (*RawSockaddrL2)(unsafe.Pointer(rsa))
854 sa := &SockaddrL2{
855 PSM: pp.Psm,
856 CID: pp.Cid,
857 Addr: pp.Bdaddr,
858 AddrType: pp.Bdaddr_type,
859 }
860 return sa, nil
861 case BTPROTO_RFCOMM:
862 pp := (*RawSockaddrRFCOMM)(unsafe.Pointer(rsa))
863 sa := &SockaddrRFCOMM{
864 Channel: pp.Channel,
865 Addr: pp.Bdaddr,
866 }
867 return sa, nil
868 }
869 case AF_XDP:
870 pp := (*RawSockaddrXDP)(unsafe.Pointer(rsa))
871 sa := &SockaddrXDP{
872 Flags: pp.Flags,
873 Ifindex: pp.Ifindex,
874 QueueID: pp.Queue_id,
875 SharedUmemFD: pp.Shared_umem_fd,
876 }
877 return sa, nil
878 case AF_PPPOX:
879 pp := (*RawSockaddrPPPoX)(unsafe.Pointer(rsa))
880 if binary.BigEndian.Uint32(pp[2:6]) != px_proto_oe {
881 return nil, EINVAL
882 }
883 sa := &SockaddrPPPoE{
884 SID: binary.BigEndian.Uint16(pp[6:8]),
885 Remote: net.HardwareAddr(pp[8:14]),
886 }
887 for i := 14; i < 14+IFNAMSIZ; i++ {
888 if pp[i] == 0 {
889 sa.Dev = string(pp[14:i])
890 break
891 }
892 }
893 return sa, nil
709894 }
710895 return nil, EAFNOSUPPORT
711896 }
717902 if err != nil {
718903 return
719904 }
720 sa, err = anyToSockaddr(&rsa)
905 sa, err = anyToSockaddr(fd, &rsa)
721906 if err != nil {
722907 Close(nfd)
723908 nfd = 0
735920 if len > SizeofSockaddrAny {
736921 panic("RawSockaddrAny too small")
737922 }
738 sa, err = anyToSockaddr(&rsa)
923 sa, err = anyToSockaddr(fd, &rsa)
739924 if err != nil {
740925 Close(nfd)
741926 nfd = 0
749934 if err = getsockname(fd, &rsa, &len); err != nil {
750935 return
751936 }
752 return anyToSockaddr(&rsa)
753 }
754
755 func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {
756 vallen := _Socklen(4)
757 err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
758 return value, err
759 }
760
761 func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {
762 var value IPMreq
763 vallen := _Socklen(SizeofIPMreq)
764 err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
765 return &value, err
937 return anyToSockaddr(fd, &rsa)
766938 }
767939
768940 func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
772944 return &value, err
773945 }
774946
775 func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {
776 var value IPv6Mreq
777 vallen := _Socklen(SizeofIPv6Mreq)
778 err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
779 return &value, err
780 }
781
782 func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
783 var value IPv6MTUInfo
784 vallen := _Socklen(SizeofIPv6MTUInfo)
785 err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
786 return &value, err
787 }
788
789 func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
790 var value ICMPv6Filter
791 vallen := _Socklen(SizeofICMPv6Filter)
792 err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
793 return &value, err
794 }
795
796947 func GetsockoptUcred(fd, level, opt int) (*Ucred, error) {
797948 var value Ucred
798949 vallen := _Socklen(SizeofUcred)
805956 vallen := _Socklen(SizeofTCPInfo)
806957 err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
807958 return &value, err
959 }
960
961 // GetsockoptString returns the string value of the socket option opt for the
962 // socket associated with fd at the given socket level.
963 func GetsockoptString(fd, level, opt int) (string, error) {
964 buf := make([]byte, 256)
965 vallen := _Socklen(len(buf))
966 err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen)
967 if err != nil {
968 if err == ERANGE {
969 buf = make([]byte, vallen)
970 err = getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen)
971 }
972 if err != nil {
973 return "", err
974 }
975 }
976 return string(buf[:vallen-1]), nil
808977 }
809978
810979 func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
9251094 msg.Namelen = uint32(SizeofSockaddrAny)
9261095 var iov Iovec
9271096 if len(p) > 0 {
928 iov.Base = (*byte)(unsafe.Pointer(&p[0]))
1097 iov.Base = &p[0]
9291098 iov.SetLen(len(p))
9301099 }
9311100 var dummy byte
9321101 if len(oob) > 0 {
933 var sockType int
934 sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
935 if err != nil {
936 return
937 }
938 // receive at least one normal byte
939 if sockType != SOCK_DGRAM && len(p) == 0 {
940 iov.Base = &dummy
941 iov.SetLen(1)
942 }
943 msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
1102 if len(p) == 0 {
1103 var sockType int
1104 sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
1105 if err != nil {
1106 return
1107 }
1108 // receive at least one normal byte
1109 if sockType != SOCK_DGRAM {
1110 iov.Base = &dummy
1111 iov.SetLen(1)
1112 }
1113 }
1114 msg.Control = &oob[0]
9441115 msg.SetControllen(len(oob))
9451116 }
9461117 msg.Iov = &iov
9521123 recvflags = int(msg.Flags)
9531124 // source address is only specified if the socket is unconnected
9541125 if rsa.Addr.Family != AF_UNSPEC {
955 from, err = anyToSockaddr(&rsa)
1126 from, err = anyToSockaddr(fd, &rsa)
9561127 }
9571128 return
9581129 }
9731144 }
9741145 }
9751146 var msg Msghdr
976 msg.Name = (*byte)(unsafe.Pointer(ptr))
1147 msg.Name = (*byte)(ptr)
9771148 msg.Namelen = uint32(salen)
9781149 var iov Iovec
9791150 if len(p) > 0 {
980 iov.Base = (*byte)(unsafe.Pointer(&p[0]))
1151 iov.Base = &p[0]
9811152 iov.SetLen(len(p))
9821153 }
9831154 var dummy byte
9841155 if len(oob) > 0 {
985 var sockType int
986 sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
987 if err != nil {
988 return 0, err
989 }
990 // send at least one normal byte
991 if sockType != SOCK_DGRAM && len(p) == 0 {
992 iov.Base = &dummy
993 iov.SetLen(1)
994 }
995 msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
1156 if len(p) == 0 {
1157 var sockType int
1158 sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
1159 if err != nil {
1160 return 0, err
1161 }
1162 // send at least one normal byte
1163 if sockType != SOCK_DGRAM {
1164 iov.Base = &dummy
1165 iov.SetLen(1)
1166 }
1167 }
1168 msg.Control = &oob[0]
9961169 msg.SetControllen(len(oob))
9971170 }
9981171 msg.Iov = &iov
10201193 // The ptrace syscall differs from glibc's ptrace.
10211194 // Peeks returns the word in *data, not as the return value.
10221195
1023 var buf [sizeofPtr]byte
1024
1025 // Leading edge. PEEKTEXT/PEEKDATA don't require aligned
1196 var buf [SizeofPtr]byte
1197
1198 // Leading edge. PEEKTEXT/PEEKDATA don't require aligned
10261199 // access (PEEKUSER warns that it might), but if we don't
10271200 // align our reads, we might straddle an unmapped page
10281201 // boundary and not get the bytes leading up to the page
10291202 // boundary.
10301203 n := 0
1031 if addr%sizeofPtr != 0 {
1032 err = ptrace(req, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
1204 if addr%SizeofPtr != 0 {
1205 err = ptrace(req, pid, addr-addr%SizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
10331206 if err != nil {
10341207 return 0, err
10351208 }
1036 n += copy(out, buf[addr%sizeofPtr:])
1209 n += copy(out, buf[addr%SizeofPtr:])
10371210 out = out[n:]
10381211 }
10391212
10711244
10721245 // Leading edge.
10731246 n := 0
1074 if addr%sizeofPtr != 0 {
1075 var buf [sizeofPtr]byte
1076 err = ptrace(peekReq, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
1247 if addr%SizeofPtr != 0 {
1248 var buf [SizeofPtr]byte
1249 err = ptrace(peekReq, pid, addr-addr%SizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
10771250 if err != nil {
10781251 return 0, err
10791252 }
1080 n += copy(buf[addr%sizeofPtr:], data)
1253 n += copy(buf[addr%SizeofPtr:], data)
10811254 word := *((*uintptr)(unsafe.Pointer(&buf[0])))
1082 err = ptrace(pokeReq, pid, addr-addr%sizeofPtr, word)
1255 err = ptrace(pokeReq, pid, addr-addr%SizeofPtr, word)
10831256 if err != nil {
10841257 return 0, err
10851258 }
10871260 }
10881261
10891262 // Interior.
1090 for len(data) > sizeofPtr {
1263 for len(data) > SizeofPtr {
10911264 word := *((*uintptr)(unsafe.Pointer(&data[0])))
10921265 err = ptrace(pokeReq, pid, addr+uintptr(n), word)
10931266 if err != nil {
10941267 return n, err
10951268 }
1096 n += sizeofPtr
1097 data = data[sizeofPtr:]
1269 n += SizeofPtr
1270 data = data[SizeofPtr:]
10981271 }
10991272
11001273 // Trailing edge.
11011274 if len(data) > 0 {
1102 var buf [sizeofPtr]byte
1275 var buf [SizeofPtr]byte
11031276 err = ptrace(peekReq, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
11041277 if err != nil {
11051278 return n, err
11241297 return ptracePoke(PTRACE_POKEDATA, PTRACE_PEEKDATA, pid, addr, data)
11251298 }
11261299
1300 func PtracePokeUser(pid int, addr uintptr, data []byte) (count int, err error) {
1301 return ptracePoke(PTRACE_POKEUSR, PTRACE_PEEKUSR, pid, addr, data)
1302 }
1303
11271304 func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
11281305 return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
11291306 }
11671344 return Getdents(fd, buf)
11681345 }
11691346
1170 func direntIno(buf []byte) (uint64, bool) {
1171 return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
1172 }
1173
1174 func direntReclen(buf []byte) (uint64, bool) {
1175 return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
1176 }
1177
1178 func direntNamlen(buf []byte) (uint64, bool) {
1179 reclen, ok := direntReclen(buf)
1180 if !ok {
1181 return 0, false
1182 }
1183 return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
1184 }
1185
11861347 //sys mount(source string, target string, fstype string, flags uintptr, data *byte) (err error)
11871348
11881349 func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) {
11961357 return err
11971358 }
11981359 return mount(source, target, fstype, flags, datap)
1360 }
1361
1362 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
1363 if raceenabled {
1364 raceReleaseMerge(unsafe.Pointer(&ioSync))
1365 }
1366 return sendfile(outfd, infd, offset, count)
11991367 }
12001368
12011369 // Sendto
12101378 //sys Adjtimex(buf *Timex) (state int, err error)
12111379 //sys Chdir(path string) (err error)
12121380 //sys Chroot(path string) (err error)
1381 //sys ClockGetres(clockid int32, res *Timespec) (err error)
12131382 //sys ClockGettime(clockid int32, time *Timespec) (err error)
1383 //sys ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error)
12141384 //sys Close(fd int) (err error)
12151385 //sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
1386 //sys DeleteModule(name string, flags int) (err error)
12161387 //sys Dup(oldfd int) (fd int, err error)
12171388 //sys Dup3(oldfd int, newfd int, flags int) (err error)
1218 //sysnb EpollCreate(size int) (fd int, err error)
12191389 //sysnb EpollCreate1(flag int) (fd int, err error)
12201390 //sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
12211391 //sys Eventfd(initval uint, flags int) (fd int, err error) = SYS_EVENTFD2
12221392 //sys Exit(code int) = SYS_EXIT_GROUP
1223 //sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
12241393 //sys Fallocate(fd int, mode uint32, off int64, len int64) (err error)
12251394 //sys Fchdir(fd int) (err error)
12261395 //sys Fchmod(fd int, mode uint32) (err error)
12271396 //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
12281397 //sys fcntl(fd int, cmd int, arg int) (val int, err error)
12291398 //sys Fdatasync(fd int) (err error)
1399 //sys Fgetxattr(fd int, attr string, dest []byte) (sz int, err error)
1400 //sys FinitModule(fd int, params string, flags int) (err error)
1401 //sys Flistxattr(fd int, dest []byte) (sz int, err error)
12301402 //sys Flock(fd int, how int) (err error)
1403 //sys Fremovexattr(fd int, attr string) (err error)
1404 //sys Fsetxattr(fd int, attr string, dest []byte, flags int) (err error)
12311405 //sys Fsync(fd int) (err error)
12321406 //sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
12331407 //sysnb Getpgid(pid int) (pgid int, err error)
12451419 //sysnb Getsid(pid int) (sid int, err error)
12461420 //sysnb Gettid() (tid int)
12471421 //sys Getxattr(path string, attr string, dest []byte) (sz int, err error)
1422 //sys InitModule(moduleImage []byte, params string) (err error)
12481423 //sys InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error)
12491424 //sysnb InotifyInit1(flags int) (fd int, err error)
12501425 //sysnb InotifyRmWatch(fd int, watchdesc uint32) (success int, err error)
12551430 //sys Llistxattr(path string, dest []byte) (sz int, err error)
12561431 //sys Lremovexattr(path string, attr string) (err error)
12571432 //sys Lsetxattr(path string, attr string, data []byte, flags int) (err error)
1433 //sys MemfdCreate(name string, flags int) (fd int, err error)
12581434 //sys Mkdirat(dirfd int, path string, mode uint32) (err error)
12591435 //sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
12601436 //sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
1437 //sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
12611438 //sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
12621439 //sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
12631440 //sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
12641441 //sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
12651442 //sys read(fd int, p []byte) (n int, err error)
12661443 //sys Removexattr(path string, attr string) (err error)
1267 //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
1444 //sys Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error)
12681445 //sys RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error)
12691446 //sys Setdomainname(p []byte) (err error)
12701447 //sys Sethostname(p []byte) (err error)
12881465
12891466 //sys Setpriority(which int, who int, prio int) (err error)
12901467 //sys Setxattr(path string, attr string, data []byte, flags int) (err error)
1468 //sys Signalfd(fd int, mask *Sigset_t, flags int) = SYS_SIGNALFD4
1469 //sys Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error)
12911470 //sys Sync()
12921471 //sys Syncfs(fd int) (err error)
12931472 //sysnb Sysinfo(info *Sysinfo_t) (err error)
12981477 //sysnb Uname(buf *Utsname) (err error)
12991478 //sys Unmount(target string, flags int) (err error) = SYS_UMOUNT2
13001479 //sys Unshare(flags int) (err error)
1301 //sys Ustat(dev int, ubuf *Ustat_t) (err error)
13021480 //sys write(fd int, p []byte) (n int, err error)
13031481 //sys exitThread(code int) (err error) = SYS_EXIT
13041482 //sys readlen(fd int, p *byte, np int) (n int, err error) = SYS_READ
13321510 // Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd,
13331511 // using the specified flags.
13341512 func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
1335 n, _, errno := Syscall6(
1336 SYS_VMSPLICE,
1337 uintptr(fd),
1338 uintptr(unsafe.Pointer(&iovs[0])),
1339 uintptr(len(iovs)),
1340 uintptr(flags),
1341 0,
1342 0,
1343 )
1513 var p unsafe.Pointer
1514 if len(iovs) > 0 {
1515 p = unsafe.Pointer(&iovs[0])
1516 }
1517
1518 n, _, errno := Syscall6(SYS_VMSPLICE, uintptr(fd), uintptr(p), uintptr(len(iovs)), uintptr(flags), 0, 0)
13441519 if errno != 0 {
13451520 return 0, syscall.Errno(errno)
13461521 }
13471522
13481523 return int(n), nil
1524 }
1525
1526 //sys faccessat(dirfd int, path string, mode uint32) (err error)
1527
1528 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
1529 if flags & ^(AT_SYMLINK_NOFOLLOW|AT_EACCESS) != 0 {
1530 return EINVAL
1531 }
1532
1533 // The Linux kernel faccessat system call does not take any flags.
1534 // The glibc faccessat implements the flags itself; see
1535 // https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/faccessat.c;hb=HEAD
1536 // Because people naturally expect syscall.Faccessat to act
1537 // like C faccessat, we do the same.
1538
1539 if flags == 0 {
1540 return faccessat(dirfd, path, mode)
1541 }
1542
1543 var st Stat_t
1544 if err := Fstatat(dirfd, path, &st, flags&AT_SYMLINK_NOFOLLOW); err != nil {
1545 return err
1546 }
1547
1548 mode &= 7
1549 if mode == 0 {
1550 return nil
1551 }
1552
1553 var uid int
1554 if flags&AT_EACCESS != 0 {
1555 uid = Geteuid()
1556 } else {
1557 uid = Getuid()
1558 }
1559
1560 if uid == 0 {
1561 if mode&1 == 0 {
1562 // Root can read and write any file.
1563 return nil
1564 }
1565 if st.Mode&0111 != 0 {
1566 // Root can execute any file that anybody can execute.
1567 return nil
1568 }
1569 return EACCES
1570 }
1571
1572 var fmode uint32
1573 if uint32(uid) == st.Uid {
1574 fmode = (st.Mode >> 6) & 7
1575 } else {
1576 var gid int
1577 if flags&AT_EACCESS != 0 {
1578 gid = Getegid()
1579 } else {
1580 gid = Getgid()
1581 }
1582
1583 if uint32(gid) == st.Gid {
1584 fmode = (st.Mode >> 3) & 7
1585 } else {
1586 fmode = st.Mode & 7
1587 }
1588 }
1589
1590 if fmode&mode == mode {
1591 return nil
1592 }
1593
1594 return EACCES
13491595 }
13501596
13511597 /*
13571603 // Brk
13581604 // Capget
13591605 // Capset
1360 // ClockGetres
13611606 // ClockNanosleep
13621607 // ClockSettime
13631608 // Clone
1364 // CreateModule
1365 // DeleteModule
13661609 // EpollCtlOld
13671610 // EpollPwait
13681611 // EpollWaitOld
13691612 // Execve
1370 // Fgetxattr
1371 // Flistxattr
13721613 // Fork
1373 // Fremovexattr
1374 // Fsetxattr
13751614 // Futex
13761615 // GetKernelSyms
13771616 // GetMempolicy
14051644 // Msgget
14061645 // Msgrcv
14071646 // Msgsnd
1408 // Newfstatat
14091647 // Nfsservctl
14101648 // Personality
14111649 // Pselect6
14121650 // Ptrace
14131651 // Putpmsg
1414 // QueryModule
14151652 // Quotactl
14161653 // Readahead
14171654 // Readv
14261663 // RtSigtimedwait
14271664 // SchedGetPriorityMax
14281665 // SchedGetPriorityMin
1429 // SchedGetaffinity
14301666 // SchedGetparam
14311667 // SchedGetscheduler
14321668 // SchedRrGetInterval
1433 // SchedSetaffinity
14341669 // SchedSetparam
14351670 // SchedYield
14361671 // Security
14471682 // Shmdt
14481683 // Shmget
14491684 // Sigaltstack
1450 // Signalfd
14511685 // Swapoff
14521686 // Swapon
14531687 // Sysfs
99 package unix
1010
1111 import (
12 "syscall"
1312 "unsafe"
1413 )
1514
16 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
17
18 func NsecToTimespec(nsec int64) (ts Timespec) {
19 ts.Sec = int32(nsec / 1e9)
20 ts.Nsec = int32(nsec % 1e9)
21 return
22 }
23
24 func NsecToTimeval(nsec int64) (tv Timeval) {
25 nsec += 999 // round up to microsecond
26 tv.Sec = int32(nsec / 1e9)
27 tv.Usec = int32(nsec % 1e9 / 1e3)
28 return
15 func setTimespec(sec, nsec int64) Timespec {
16 return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
17 }
18
19 func setTimeval(sec, usec int64) Timeval {
20 return Timeval{Sec: int32(sec), Usec: int32(usec)}
2921 }
3022
3123 //sysnb pipe(p *[2]_C_int) (err error)
5749 // 64-bit file system and 32-bit uid calls
5850 // (386 default is 32-bit file system and 16-bit uid).
5951 //sys Dup2(oldfd int, newfd int) (err error)
52 //sysnb EpollCreate(size int) (fd int, err error)
53 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
6054 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
6155 //sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
6256 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
57 //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
6358 //sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
6459 //sysnb Getegid() (egid int) = SYS_GETEGID32
6560 //sysnb Geteuid() (euid int) = SYS_GETEUID32
7267 //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
7368 //sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
7469 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
70 //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
7571 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
7672 //sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
7773 //sys Setfsuid(uid int) (err error) = SYS_SETFSUID32
8379 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
8480 //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
8581 //sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
82 //sys Ustat(dev int, ubuf *Ustat_t) (err error)
8683 //sysnb getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32
8784 //sysnb setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32
8885 //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
8986
9087 //sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
91 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
9288 //sys Pause() (err error)
9389
9490 func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
162158 return setrlimit(resource, &rl)
163159 }
164160
165 // Underlying system call writes to newoffset via pointer.
166 // Implemented in assembly to avoid allocation.
167 func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
168
169161 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
170162 newoffset, errno := seek(fd, offset, whence)
171163 if errno != 0 {
174166 return newoffset, nil
175167 }
176168
177 // Vsyscalls on amd64.
169 //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error)
178170 //sysnb Gettimeofday(tv *Timeval) (err error)
179171 //sysnb Time(t *Time_t) (tt Time_t, err error)
180
181172 //sys Utime(path string, buf *Utimbuf) (err error)
173 //sys utimes(path string, times *[2]Timeval) (err error)
182174
183175 // On x86 Linux, all the socket calls go through an extra indirection,
184176 // I think because the 5-register system call interface can't handle
185 // the 6-argument calls like sendto and recvfrom. Instead the
177 // the 6-argument calls like sendto and recvfrom. Instead the
186178 // arguments to the underlying system call are the number below
187 // and a pointer to an array of uintptr. We hide the pointer in the
179 // and a pointer to an array of uintptr. We hide the pointer in the
188180 // socketcall assembly to avoid allocation on every system call.
189181
190182 const (
211203 _SENDMMSG = 20
212204 )
213205
214 func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
215 func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
216
217206 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
218207 fd, e := socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
219208 if e != 0 {
66 package unix
77
88 //sys Dup2(oldfd int, newfd int) (err error)
9 //sysnb EpollCreate(size int) (fd int, err error)
910 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
1011 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
1112 //sys Fchown(fd int, uid int, gid int) (err error)
1213 //sys Fstat(fd int, stat *Stat_t) (err error)
14 //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT
1315 //sys Fstatfs(fd int, buf *Statfs_t) (err error)
1416 //sys Ftruncate(fd int, length int64) (err error)
1517 //sysnb Getegid() (egid int)
1719 //sysnb Getgid() (gid int)
1820 //sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
1921 //sysnb Getuid() (uid int)
20 //sysnb InotifyInit() (fd int, err error)
22 //sysnb inotifyInit() (fd int, err error)
23
24 func InotifyInit() (fd int, err error) {
25 // First try inotify_init1, because Android's seccomp policy blocks the latter.
26 fd, err = InotifyInit1(0)
27 if err == ENOSYS {
28 fd, err = inotifyInit()
29 }
30 return
31 }
32
2133 //sys Ioperm(from int, num int, on int) (err error)
2234 //sys Iopl(level int) (err error)
2335 //sys Lchown(path string, uid int, gid int) (err error)
2436 //sys Listen(s int, n int) (err error)
25 //sys Lstat(path string, stat *Stat_t) (err error)
37
38 func Lstat(path string, stat *Stat_t) (err error) {
39 return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
40 }
41
2642 //sys Pause() (err error)
2743 //sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
2844 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
45 //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
2946 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
30 //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
47
48 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
49 var ts *Timespec
50 if timeout != nil {
51 ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
52 }
53 return Pselect(nfd, r, w, e, ts, nil)
54 }
55
3156 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
3257 //sys Setfsgid(gid int) (err error)
3358 //sys Setfsuid(uid int) (err error)
3863 //sysnb Setreuid(ruid int, euid int) (err error)
3964 //sys Shutdown(fd int, how int) (err error)
4065 //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
41 //sys Stat(path string, stat *Stat_t) (err error)
66
67 func Stat(path string, stat *Stat_t) (err error) {
68 // Use fstatat, because Android's seccomp policy blocks stat.
69 return Fstatat(AT_FDCWD, path, stat, 0)
70 }
71
4272 //sys Statfs(path string, buf *Statfs_t) (err error)
4373 //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
4474 //sys Truncate(path string, length int64) (err error)
75 //sys Ustat(dev int, ubuf *Ustat_t) (err error)
4576 //sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
4677 //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
4778 //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
5990 //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
6091 //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
6192 //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
93
94 //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error)
6295
6396 func Gettimeofday(tv *Timeval) (err error) {
6497 errno := gettimeofday(tv)
81114 }
82115
83116 //sys Utime(path string, buf *Utimbuf) (err error)
117 //sys utimes(path string, times *[2]Timeval) (err error)
84118
85 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
86
87 func NsecToTimespec(nsec int64) (ts Timespec) {
88 ts.Sec = nsec / 1e9
89 ts.Nsec = nsec % 1e9
90 return
119 func setTimespec(sec, nsec int64) Timespec {
120 return Timespec{Sec: sec, Nsec: nsec}
91121 }
92122
93 func NsecToTimeval(nsec int64) (tv Timeval) {
94 nsec += 999 // round up to microsecond
95 tv.Sec = nsec / 1e9
96 tv.Usec = nsec % 1e9 / 1e3
97 return
123 func setTimeval(sec, usec int64) Timeval {
124 return Timeval{Sec: sec, Usec: usec}
98125 }
99126
100127 //sysnb pipe(p *[2]_C_int) (err error)
147174 }
148175 return poll(&fds[0], len(fds), timeout)
149176 }
177
178 //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
179
180 func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
181 cmdlineLen := len(cmdline)
182 if cmdlineLen > 0 {
183 // Account for the additional NULL byte added by
184 // BytePtrFromString in kexecFileLoad. The kexec_file_load
185 // syscall expects a NULL-terminated string.
186 cmdlineLen++
187 }
188 return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
189 }
1010 "unsafe"
1111 )
1212
13 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
14
15 func NsecToTimespec(nsec int64) (ts Timespec) {
16 ts.Sec = int32(nsec / 1e9)
17 ts.Nsec = int32(nsec % 1e9)
18 return
19 }
20
21 func NsecToTimeval(nsec int64) (tv Timeval) {
22 nsec += 999 // round up to microsecond
23 tv.Sec = int32(nsec / 1e9)
24 tv.Usec = int32(nsec % 1e9 / 1e3)
25 return
13 func setTimespec(sec, nsec int64) Timespec {
14 return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
15 }
16
17 func setTimeval(sec, usec int64) Timeval {
18 return Timeval{Sec: int32(sec), Usec: int32(usec)}
2619 }
2720
2821 func Pipe(p []int) (err error) {
8174 // 64-bit file system and 32-bit uid calls
8275 // (16-bit uid calls are not always supported in newer kernels)
8376 //sys Dup2(oldfd int, newfd int) (err error)
77 //sysnb EpollCreate(size int) (fd int, err error)
78 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
8479 //sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
8580 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
81 //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
8682 //sysnb Getegid() (egid int) = SYS_GETEGID32
8783 //sysnb Geteuid() (euid int) = SYS_GETEUID32
8884 //sysnb Getgid() (gid int) = SYS_GETGID32
9187 //sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
9288 //sys Listen(s int, n int) (err error)
9389 //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
90 //sys Pause() (err error)
91 //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
9492 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
9593 //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
9694 //sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
102100 //sys Shutdown(fd int, how int) (err error)
103101 //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
104102 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
105
106 // Vsyscalls on amd64.
103 //sys Ustat(dev int, ubuf *Ustat_t) (err error)
104
105 //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error)
107106 //sysnb Gettimeofday(tv *Timeval) (err error)
108 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
109 //sys Pause() (err error)
110107
111108 func Time(t *Time_t) (Time_t, error) {
112109 var tv Timeval
128125 return Utimes(path, tv)
129126 }
130127
128 //sys utimes(path string, times *[2]Timeval) (err error)
129
131130 //sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
132131 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
133132 //sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
258257 }
259258 return poll(&fds[0], len(fds), timeout)
260259 }
260
261 //sys armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE
262
263 func SyncFileRange(fd int, off int64, n int64, flags int) error {
264 // The sync_file_range and arm_sync_file_range syscalls differ only in the
265 // order of their arguments.
266 return armSyncFileRange(fd, flags, off, n)
267 }
55
66 package unix
77
8 import "unsafe"
9
10 func EpollCreate(size int) (fd int, err error) {
11 if size <= 0 {
12 return -1, EINVAL
13 }
14 return EpollCreate1(0)
15 }
16
817 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
18 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
919 //sys Fchown(fd int, uid int, gid int) (err error)
1020 //sys Fstat(fd int, stat *Stat_t) (err error)
1121 //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
1929 //sys Listen(s int, n int) (err error)
2030 //sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
2131 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
32 //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
2233 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
2334
2435 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
25 ts := Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
26 return Pselect(nfd, r, w, e, &ts, nil)
36 var ts *Timespec
37 if timeout != nil {
38 ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
39 }
40 return Pselect(nfd, r, w, e, ts, nil)
2741 }
2842
2943 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
5266 //sys Statfs(path string, buf *Statfs_t) (err error)
5367 //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
5468 //sys Truncate(path string, length int64) (err error)
69
70 func Ustat(dev int, ubuf *Ustat_t) (err error) {
71 return ENOSYS
72 }
73
5574 //sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
5675 //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
5776 //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
7291
7392 //sysnb Gettimeofday(tv *Timeval) (err error)
7493
75 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
76
77 func NsecToTimespec(nsec int64) (ts Timespec) {
78 ts.Sec = nsec / 1e9
79 ts.Nsec = nsec % 1e9
80 return
81 }
82
83 func NsecToTimeval(nsec int64) (tv Timeval) {
84 nsec += 999 // round up to microsecond
85 tv.Sec = nsec / 1e9
86 tv.Usec = nsec % 1e9 / 1e3
87 return
94 func setTimespec(sec, nsec int64) Timespec {
95 return Timespec{Sec: sec, Nsec: nsec}
96 }
97
98 func setTimeval(sec, usec int64) Timeval {
99 return Timeval{Sec: sec, Usec: usec}
100 }
101
102 func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {
103 if tv == nil {
104 return utimensat(dirfd, path, nil, 0)
105 }
106
107 ts := []Timespec{
108 NsecToTimespec(TimevalToNsec(tv[0])),
109 NsecToTimespec(TimevalToNsec(tv[1])),
110 }
111 return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
88112 }
89113
90114 func Time(t *Time_t) (Time_t, error) {
107131 return Utimes(path, tv)
108132 }
109133
134 func utimes(path string, tv *[2]Timeval) (err error) {
135 if tv == nil {
136 return utimensat(AT_FDCWD, path, nil, 0)
137 }
138
139 ts := []Timespec{
140 NsecToTimespec(TimevalToNsec(tv[0])),
141 NsecToTimespec(TimevalToNsec(tv[1])),
142 }
143 return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
144 }
145
110146 func Pipe(p []int) (err error) {
111147 if len(p) != 2 {
112148 return EINVAL
155191 return Dup3(oldfd, newfd, 0)
156192 }
157193
158 func Pause() (err error) {
159 _, _, e1 := Syscall6(SYS_PPOLL, 0, 0, 0, 0, 0, 0)
160 if e1 != 0 {
161 err = errnoErr(e1)
162 }
163 return
164 }
165
166 // TODO(dfc): constants that should be in zsysnum_linux_arm64.go, remove
167 // these when the deprecated syscalls that the syscall package relies on
168 // are removed.
169 const (
170 SYS_GETPGRP = 1060
171 SYS_UTIMES = 1037
172 SYS_FUTIMESAT = 1066
173 SYS_PAUSE = 1061
174 SYS_USTAT = 1070
175 SYS_UTIME = 1063
176 SYS_LCHOWN = 1032
177 SYS_TIME = 1062
178 SYS_EPOLL_CREATE = 1042
179 SYS_EPOLL_WAIT = 1069
180 )
194 func Pause() error {
195 _, err := ppoll(nil, 0, nil, nil)
196 return err
197 }
181198
182199 func Poll(fds []PollFd, timeout int) (n int, err error) {
183200 var ts *Timespec
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build linux,!gccgo
5
6 package unix
7
8 // SyscallNoError may be used instead of Syscall for syscalls that don't fail.
9 func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
10
11 // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't
12 // fail.
13 func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build linux,!gccgo,386
5
6 package unix
7
8 import "syscall"
9
10 // Underlying system call writes to newoffset via pointer.
11 // Implemented in assembly to avoid allocation.
12 func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
13
14 func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
15 func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build linux,gccgo,386
5
6 package unix
7
8 import (
9 "syscall"
10 "unsafe"
11 )
12
13 func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
14 var newoffset int64
15 offsetLow := uint32(offset & 0xffffffff)
16 offsetHigh := uint32((offset >> 32) & 0xffffffff)
17 _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
18 return newoffset, err
19 }
20
21 func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
22 fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
23 return int(fd), err
24 }
25
26 func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
27 fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
28 return int(fd), err
29 }
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build linux,gccgo,arm
5
6 package unix
7
8 import (
9 "syscall"
10 "unsafe"
11 )
12
13 func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
14 var newoffset int64
15 offsetLow := uint32(offset & 0xffffffff)
16 offsetHigh := uint32((offset >> 32) & 0xffffffff)
17 _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
18 return newoffset, err
19 }
77 package unix
88
99 //sys Dup2(oldfd int, newfd int) (err error)
10 //sysnb EpollCreate(size int) (fd int, err error)
1011 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
12 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
1113 //sys Fchown(fd int, uid int, gid int) (err error)
1214 //sys Fstatfs(fd int, buf *Statfs_t) (err error)
1315 //sys Ftruncate(fd int, length int64) (err error)
2123 //sys Pause() (err error)
2224 //sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
2325 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
26 //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
2427 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
2528
2629 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
27 ts := Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
28 return Pselect(nfd, r, w, e, &ts, nil)
30 var ts *Timespec
31 if timeout != nil {
32 ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
33 }
34 return Pselect(nfd, r, w, e, ts, nil)
2935 }
3036
3137 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
4147 //sys Statfs(path string, buf *Statfs_t) (err error)
4248 //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
4349 //sys Truncate(path string, length int64) (err error)
50 //sys Ustat(dev int, ubuf *Ustat_t) (err error)
4451 //sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
4552 //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
4653 //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
5966 //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
6067 //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
6168
69 //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error)
6270 //sysnb Gettimeofday(tv *Timeval) (err error)
6371
6472 func Time(t *Time_t) (tt Time_t, err error) {
7482 }
7583
7684 //sys Utime(path string, buf *Utimbuf) (err error)
77
78 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
79
80 func NsecToTimespec(nsec int64) (ts Timespec) {
81 ts.Sec = nsec / 1e9
82 ts.Nsec = nsec % 1e9
83 return
84 }
85
86 func NsecToTimeval(nsec int64) (tv Timeval) {
87 nsec += 999 // round up to microsecond
88 tv.Sec = nsec / 1e9
89 tv.Usec = nsec % 1e9 / 1e3
90 return
85 //sys utimes(path string, times *[2]Timeval) (err error)
86
87 func setTimespec(sec, nsec int64) Timespec {
88 return Timespec{Sec: sec, Nsec: nsec}
89 }
90
91 func setTimeval(sec, usec int64) Timeval {
92 return Timeval{Sec: sec, Usec: usec}
9193 }
9294
9395 func Pipe(p []int) (err error) {
145147 }
146148
147149 //sys fstat(fd int, st *stat_t) (err error)
150 //sys fstatat(dirfd int, path string, st *stat_t, flags int) (err error) = SYS_NEWFSTATAT
148151 //sys lstat(path string, st *stat_t) (err error)
149152 //sys stat(path string, st *stat_t) (err error)
150153
151154 func Fstat(fd int, s *Stat_t) (err error) {
152155 st := &stat_t{}
153156 err = fstat(fd, st)
157 fillStat_t(s, st)
158 return
159 }
160
161 func Fstatat(dirfd int, path string, s *Stat_t, flags int) (err error) {
162 st := &stat_t{}
163 err = fstatat(dirfd, path, st, flags)
154164 fillStat_t(s, st)
155165 return
156166 }
1414 func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
1515
1616 //sys Dup2(oldfd int, newfd int) (err error)
17 //sysnb EpollCreate(size int) (fd int, err error)
18 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
19 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
1720 //sys Fchown(fd int, uid int, gid int) (err error)
1821 //sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
1922 //sysnb Getegid() (egid int)
2427 //sys Listen(s int, n int) (err error)
2528 //sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
2629 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
30 //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
2731 //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
2832 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
2933 //sys Setfsgid(gid int) (err error)
3135 //sysnb Setregid(rgid int, egid int) (err error)
3236 //sysnb Setresgid(rgid int, egid int, sgid int) (err error)
3337 //sysnb Setresuid(ruid int, euid int, suid int) (err error)
34
3538 //sysnb Setreuid(ruid int, euid int) (err error)
3639 //sys Shutdown(fd int, how int) (err error)
37 //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
38
40 //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
3941 //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
4042 //sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
43 //sys Ustat(dev int, ubuf *Ustat_t) (err error)
4144 //sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
4245 //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
4346 //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
5962 //sys Ioperm(from int, num int, on int) (err error)
6063 //sys Iopl(level int) (err error)
6164
65 //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error)
6266 //sysnb Gettimeofday(tv *Timeval) (err error)
6367 //sysnb Time(t *Time_t) (tt Time_t, err error)
68 //sys Utime(path string, buf *Utimbuf) (err error)
69 //sys utimes(path string, times *[2]Timeval) (err error)
6470
6571 //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
6672 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
73 //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
6774 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
6875
69 //sys Utime(path string, buf *Utimbuf) (err error)
70 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
7176 //sys Pause() (err error)
7277
7378 func Fstatfs(fd int, buf *Statfs_t) (err error) {
98103 return
99104 }
100105
101 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
102
103 func NsecToTimespec(nsec int64) (ts Timespec) {
104 ts.Sec = int32(nsec / 1e9)
105 ts.Nsec = int32(nsec % 1e9)
106 return
107 }
108
109 func NsecToTimeval(nsec int64) (tv Timeval) {
110 nsec += 999 // round up to microsecond
111 tv.Sec = int32(nsec / 1e9)
112 tv.Usec = int32(nsec % 1e9 / 1e3)
113 return
106 func setTimespec(sec, nsec int64) Timespec {
107 return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
108 }
109
110 func setTimeval(sec, usec int64) Timeval {
111 return Timeval{Sec: int32(sec), Usec: int32(usec)}
114112 }
115113
116114 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
126124 return
127125 }
128126
127 //sysnb pipe() (p1 int, p2 int, err error)
128
129129 func Pipe(p []int) (err error) {
130130 if len(p) != 2 {
131131 return EINVAL
132132 }
133 var pp [2]_C_int
134 err = pipe2(&pp, 0)
135 p[0] = int(pp[0])
136 p[1] = int(pp[1])
133 p[0], p[1], err = pipe()
137134 return
138135 }
139136
66
77 package unix
88
9 //sys Dup2(oldfd int, newfd int) (err error)
10 //sysnb EpollCreate(size int) (fd int, err error)
911 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
10 //sys Dup2(oldfd int, newfd int) (err error)
12 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
1113 //sys Fchown(fd int, uid int, gid int) (err error)
1214 //sys Fstat(fd int, stat *Stat_t) (err error)
15 //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT
1316 //sys Fstatfs(fd int, buf *Statfs_t) (err error)
1417 //sys Ftruncate(fd int, length int64) (err error)
1518 //sysnb Getegid() (egid int)
2629 //sys Pause() (err error)
2730 //sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
2831 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
32 //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
2933 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
3034 //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
3135 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
4044 //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
4145 //sys Stat(path string, stat *Stat_t) (err error)
4246 //sys Statfs(path string, buf *Statfs_t) (err error)
43 //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) = SYS_SYNC_FILE_RANGE2
4447 //sys Truncate(path string, length int64) (err error)
48 //sys Ustat(dev int, ubuf *Ustat_t) (err error)
4549 //sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
4650 //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
4751 //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
6064 //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
6165 //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
6266
67 //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error)
6368 //sysnb Gettimeofday(tv *Timeval) (err error)
6469 //sysnb Time(t *Time_t) (tt Time_t, err error)
70 //sys Utime(path string, buf *Utimbuf) (err error)
71 //sys utimes(path string, times *[2]Timeval) (err error)
6572
66 //sys Utime(path string, buf *Utimbuf) (err error)
67
68 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
69
70 func NsecToTimespec(nsec int64) (ts Timespec) {
71 ts.Sec = nsec / 1e9
72 ts.Nsec = nsec % 1e9
73 return
73 func setTimespec(sec, nsec int64) Timespec {
74 return Timespec{Sec: sec, Nsec: nsec}
7475 }
7576
76 func NsecToTimeval(nsec int64) (tv Timeval) {
77 nsec += 999 // round up to microsecond
78 tv.Sec = nsec / 1e9
79 tv.Usec = nsec % 1e9 / 1e3
80 return
77 func setTimeval(sec, usec int64) Timeval {
78 return Timeval{Sec: sec, Usec: usec}
8179 }
8280
8381 func (r *PtraceRegs) PC() uint64 { return r.Nip }
130128 }
131129 return poll(&fds[0], len(fds), timeout)
132130 }
131
132 //sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
133
134 func SyncFileRange(fd int, off int64, n int64, flags int) error {
135 // The sync_file_range and sync_file_range2 syscalls differ only in the
136 // order of their arguments.
137 return syncFileRange2(fd, flags, off, n)
138 }
139
140 //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
141
142 func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
143 cmdlineLen := len(cmdline)
144 if cmdlineLen > 0 {
145 // Account for the additional NULL byte added by
146 // BytePtrFromString in kexecFileLoad. The kexec_file_load
147 // syscall expects a NULL-terminated string.
148 cmdlineLen++
149 }
150 return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
151 }
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build riscv64,linux
5
6 package unix
7
8 import "unsafe"
9
10 func EpollCreate(size int) (fd int, err error) {
11 if size <= 0 {
12 return -1, EINVAL
13 }
14 return EpollCreate1(0)
15 }
16
17 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
18 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
19 //sys Fchown(fd int, uid int, gid int) (err error)
20 //sys Fstat(fd int, stat *Stat_t) (err error)
21 //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
22 //sys Fstatfs(fd int, buf *Statfs_t) (err error)
23 //sys Ftruncate(fd int, length int64) (err error)
24 //sysnb Getegid() (egid int)
25 //sysnb Geteuid() (euid int)
26 //sysnb Getgid() (gid int)
27 //sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
28 //sysnb Getuid() (uid int)
29 //sys Listen(s int, n int) (err error)
30 //sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
31 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
32 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
33
34 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
35 var ts *Timespec
36 if timeout != nil {
37 ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
38 }
39 return Pselect(nfd, r, w, e, ts, nil)
40 }
41
42 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
43 //sys Setfsgid(gid int) (err error)
44 //sys Setfsuid(uid int) (err error)
45 //sysnb Setregid(rgid int, egid int) (err error)
46 //sysnb Setresgid(rgid int, egid int, sgid int) (err error)
47 //sysnb Setresuid(ruid int, euid int, suid int) (err error)
48 //sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
49 //sysnb Setreuid(ruid int, euid int) (err error)
50 //sys Shutdown(fd int, how int) (err error)
51 //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
52
53 func Stat(path string, stat *Stat_t) (err error) {
54 return Fstatat(AT_FDCWD, path, stat, 0)
55 }
56
57 func Lchown(path string, uid int, gid int) (err error) {
58 return Fchownat(AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW)
59 }
60
61 func Lstat(path string, stat *Stat_t) (err error) {
62 return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
63 }
64
65 //sys Statfs(path string, buf *Statfs_t) (err error)
66 //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
67 //sys Truncate(path string, length int64) (err error)
68
69 func Ustat(dev int, ubuf *Ustat_t) (err error) {
70 return ENOSYS
71 }
72
73 //sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
74 //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
75 //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
76 //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
77 //sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
78 //sysnb setgroups(n int, list *_Gid_t) (err error)
79 //sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
80 //sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
81 //sysnb socket(domain int, typ int, proto int) (fd int, err error)
82 //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
83 //sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
84 //sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
85 //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
86 //sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
87 //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
88 //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
89 //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
90
91 //sysnb Gettimeofday(tv *Timeval) (err error)
92
93 func setTimespec(sec, nsec int64) Timespec {
94 return Timespec{Sec: sec, Nsec: nsec}
95 }
96
97 func setTimeval(sec, usec int64) Timeval {
98 return Timeval{Sec: sec, Usec: usec}
99 }
100
101 func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {
102 if tv == nil {
103 return utimensat(dirfd, path, nil, 0)
104 }
105
106 ts := []Timespec{
107 NsecToTimespec(TimevalToNsec(tv[0])),
108 NsecToTimespec(TimevalToNsec(tv[1])),
109 }
110 return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
111 }
112
113 func Time(t *Time_t) (Time_t, error) {
114 var tv Timeval
115 err := Gettimeofday(&tv)
116 if err != nil {
117 return 0, err
118 }
119 if t != nil {
120 *t = Time_t(tv.Sec)
121 }
122 return Time_t(tv.Sec), nil
123 }
124
125 func Utime(path string, buf *Utimbuf) error {
126 tv := []Timeval{
127 {Sec: buf.Actime},
128 {Sec: buf.Modtime},
129 }
130 return Utimes(path, tv)
131 }
132
133 func utimes(path string, tv *[2]Timeval) (err error) {
134 if tv == nil {
135 return utimensat(AT_FDCWD, path, nil, 0)
136 }
137
138 ts := []Timespec{
139 NsecToTimespec(TimevalToNsec(tv[0])),
140 NsecToTimespec(TimevalToNsec(tv[1])),
141 }
142 return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
143 }
144
145 func Pipe(p []int) (err error) {
146 if len(p) != 2 {
147 return EINVAL
148 }
149 var pp [2]_C_int
150 err = pipe2(&pp, 0)
151 p[0] = int(pp[0])
152 p[1] = int(pp[1])
153 return
154 }
155
156 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
157
158 func Pipe2(p []int, flags int) (err error) {
159 if len(p) != 2 {
160 return EINVAL
161 }
162 var pp [2]_C_int
163 err = pipe2(&pp, flags)
164 p[0] = int(pp[0])
165 p[1] = int(pp[1])
166 return
167 }
168
169 func (r *PtraceRegs) PC() uint64 { return r.Pc }
170
171 func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
172
173 func (iov *Iovec) SetLen(length int) {
174 iov.Len = uint64(length)
175 }
176
177 func (msghdr *Msghdr) SetControllen(length int) {
178 msghdr.Controllen = uint64(length)
179 }
180
181 func (cmsg *Cmsghdr) SetLen(length int) {
182 cmsg.Len = uint64(length)
183 }
184
185 func InotifyInit() (fd int, err error) {
186 return InotifyInit1(0)
187 }
188
189 func Dup2(oldfd int, newfd int) (err error) {
190 return Dup3(oldfd, newfd, 0)
191 }
192
193 func Pause() error {
194 _, err := ppoll(nil, 0, nil, nil)
195 return err
196 }
197
198 func Poll(fds []PollFd, timeout int) (n int, err error) {
199 var ts *Timespec
200 if timeout >= 0 {
201 ts = new(Timespec)
202 *ts = NsecToTimespec(int64(timeout) * 1e6)
203 }
204 if len(fds) == 0 {
205 return ppoll(nil, 0, ts, nil)
206 }
207 return ppoll(&fds[0], len(fds), ts, nil)
208 }
209
210 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
211 return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
212 }
1010 )
1111
1212 //sys Dup2(oldfd int, newfd int) (err error)
13 //sysnb EpollCreate(size int) (fd int, err error)
1314 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
1415 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
1516 //sys Fchown(fd int, uid int, gid int) (err error)
1617 //sys Fstat(fd int, stat *Stat_t) (err error)
18 //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT
1719 //sys Fstatfs(fd int, buf *Statfs_t) (err error)
1820 //sys Ftruncate(fd int, length int64) (err error)
1921 //sysnb Getegid() (egid int)
2729 //sys Pause() (err error)
2830 //sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
2931 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
32 //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
3033 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
3134 //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
3235 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
4245 //sys Statfs(path string, buf *Statfs_t) (err error)
4346 //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
4447 //sys Truncate(path string, length int64) (err error)
48 //sys Ustat(dev int, ubuf *Ustat_t) (err error)
4549 //sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
4650 //sysnb setgroups(n int, list *_Gid_t) (err error)
4751
52 //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error)
4853 //sysnb Gettimeofday(tv *Timeval) (err error)
4954
5055 func Time(t *Time_t) (tt Time_t, err error) {
6065 }
6166
6267 //sys Utime(path string, buf *Utimbuf) (err error)
63
64 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
65
66 func NsecToTimespec(nsec int64) (ts Timespec) {
67 ts.Sec = nsec / 1e9
68 ts.Nsec = nsec % 1e9
69 return
70 }
71
72 func NsecToTimeval(nsec int64) (tv Timeval) {
73 nsec += 999 // round up to microsecond
74 tv.Sec = nsec / 1e9
75 tv.Usec = nsec % 1e9 / 1e3
76 return
68 //sys utimes(path string, times *[2]Timeval) (err error)
69
70 func setTimespec(sec, nsec int64) Timespec {
71 return Timespec{Sec: sec, Nsec: nsec}
72 }
73
74 func setTimeval(sec, usec int64) Timeval {
75 return Timeval{Sec: sec, Usec: usec}
7776 }
7877
7978 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
323322 }
324323 return poll(&fds[0], len(fds), timeout)
325324 }
325
326 //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
327
328 func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
329 cmdlineLen := len(cmdline)
330 if cmdlineLen > 0 {
331 // Account for the additional NULL byte added by
332 // BytePtrFromString in kexecFileLoad. The kexec_file_load
333 // syscall expects a NULL-terminated string.
334 cmdlineLen++
335 }
336 return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
337 }
66 package unix
77
88 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
9 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
910 //sys Dup2(oldfd int, newfd int) (err error)
1011 //sys Fchown(fd int, uid int, gid int) (err error)
1112 //sys Fstat(fd int, stat *Stat_t) (err error)
13 //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
1214 //sys Fstatfs(fd int, buf *Statfs_t) (err error)
1315 //sys Ftruncate(fd int, length int64) (err error)
1416 //sysnb Getegid() (egid int)
2325 //sys Pause() (err error)
2426 //sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
2527 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
28 //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
2629 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
2730 //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
2831 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
6568 return ENOSYS
6669 }
6770
71 //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error)
6872 //sysnb Gettimeofday(tv *Timeval) (err error)
6973
7074 func Time(t *Time_t) (tt Time_t, err error) {
8084 }
8185
8286 //sys Utime(path string, buf *Utimbuf) (err error)
87 //sys utimes(path string, times *[2]Timeval) (err error)
8388
84 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
85
86 func NsecToTimespec(nsec int64) (ts Timespec) {
87 ts.Sec = nsec / 1e9
88 ts.Nsec = nsec % 1e9
89 return
89 func setTimespec(sec, nsec int64) Timespec {
90 return Timespec{Sec: sec, Nsec: nsec}
9091 }
9192
92 func NsecToTimeval(nsec int64) (tv Timeval) {
93 nsec += 999 // round up to microsecond
94 tv.Sec = nsec / 1e9
95 tv.Usec = int32(nsec % 1e9 / 1e3)
96 return
93 func setTimeval(sec, usec int64) Timeval {
94 return Timeval{Sec: sec, Usec: int32(usec)}
9795 }
9896
9997 func (r *PtraceRegs) PC() uint64 { return r.Tpc }
1212 package unix
1313
1414 import (
15 "runtime"
1516 "syscall"
1617 "unsafe"
1718 )
1819
20 // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
1921 type SockaddrDatalink struct {
2022 Len uint8
2123 Family uint8
5456 }
5557
5658 func nametomib(name string) (mib []_C_int, err error) {
57
5859 // Split name into components.
5960 var parts []string
6061 last := 0
9293 return mib, nil
9394 }
9495
95 func direntIno(buf []byte) (uint64, bool) {
96 return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
97 }
98
99 func direntReclen(buf []byte) (uint64, bool) {
100 return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
101 }
102
103 func direntNamlen(buf []byte) (uint64, bool) {
104 return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
96 func SysctlClockinfo(name string) (*Clockinfo, error) {
97 mib, err := sysctlmib(name)
98 if err != nil {
99 return nil, err
100 }
101
102 n := uintptr(SizeofClockinfo)
103 var ci Clockinfo
104 if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil {
105 return nil, err
106 }
107 if n != SizeofClockinfo {
108 return nil, EIO
109 }
110 return &ci, nil
105111 }
106112
107113 //sysnb pipe() (fd1 int, fd2 int, err error)
118124 return getdents(fd, buf)
119125 }
120126
127 const ImplementsGetwd = true
128
129 //sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
130
131 func Getwd() (string, error) {
132 var buf [PathMax]byte
133 _, err := Getcwd(buf[0:])
134 if err != nil {
135 return "", err
136 }
137 n := clen(buf[:])
138 if n < 1 {
139 return "", EINVAL
140 }
141 return string(buf[:n]), nil
142 }
143
121144 // TODO
122145 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
123146 return -1, ENOSYS
147 }
148
149 func setattrlistTimes(path string, times []Timespec, flags int) error {
150 // used on Darwin for UtimesNano
151 return ENOSYS
152 }
153
154 //sys ioctl(fd int, req uint, arg uintptr) (err error)
155
156 // ioctl itself should not be exposed directly, but additional get/set
157 // functions for specific types are permissible.
158
159 // IoctlSetInt performs an ioctl operation which sets an integer value
160 // on fd, using the specified request number.
161 func IoctlSetInt(fd int, req uint, value int) error {
162 return ioctl(fd, req, uintptr(value))
163 }
164
165 func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
166 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
167 }
168
169 func ioctlSetTermios(fd int, req uint, value *Termios) error {
170 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
171 }
172
173 // IoctlGetInt performs an ioctl operation which gets an integer value
174 // from fd, using the specified request number.
175 func IoctlGetInt(fd int, req uint) (int, error) {
176 var value int
177 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
178 return value, err
179 }
180
181 func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
182 var value Winsize
183 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
184 return &value, err
185 }
186
187 func IoctlGetTermios(fd int, req uint) (*Termios, error) {
188 var value Termios
189 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
190 return &value, err
191 }
192
193 func IoctlGetPtmget(fd int, req uint) (*Ptmget, error) {
194 var value Ptmget
195 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
196 runtime.KeepAlive(value)
197 return &value, err
198 }
199
200 func Uname(uname *Utsname) error {
201 mib := []_C_int{CTL_KERN, KERN_OSTYPE}
202 n := unsafe.Sizeof(uname.Sysname)
203 if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {
204 return err
205 }
206
207 mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
208 n = unsafe.Sizeof(uname.Nodename)
209 if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {
210 return err
211 }
212
213 mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
214 n = unsafe.Sizeof(uname.Release)
215 if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {
216 return err
217 }
218
219 mib = []_C_int{CTL_KERN, KERN_VERSION}
220 n = unsafe.Sizeof(uname.Version)
221 if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {
222 return err
223 }
224
225 // The version might have newlines or tabs in it, convert them to
226 // spaces.
227 for i, b := range uname.Version {
228 if b == '\n' || b == '\t' {
229 if i == len(uname.Version)-1 {
230 uname.Version[i] = 0
231 } else {
232 uname.Version[i] = ' '
233 }
234 }
235 }
236
237 mib = []_C_int{CTL_HW, HW_MACHINE}
238 n = unsafe.Sizeof(uname.Machine)
239 if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {
240 return err
241 }
242
243 return nil
244 }
245
246 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
247 if raceenabled {
248 raceReleaseMerge(unsafe.Pointer(&ioSync))
249 }
250 return sendfile(outfd, infd, offset, count)
124251 }
125252
126253 /*
137264 //sys Dup(fd int) (nfd int, err error)
138265 //sys Dup2(from int, to int) (err error)
139266 //sys Exit(code int)
267 //sys ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
268 //sys ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
269 //sys ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error)
270 //sys ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
271 //sys ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
272 //sys ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
273 //sys ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error)
274 //sys ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
275 //sys ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
276 //sys ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
277 //sys ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error)
278 //sys ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
279 //sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
280 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE
140281 //sys Fchdir(fd int) (err error)
141282 //sys Fchflags(fd int, flags int) (err error)
142283 //sys Fchmod(fd int, mode uint32) (err error)
284 //sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
143285 //sys Fchown(fd int, uid int, gid int) (err error)
286 //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
144287 //sys Flock(fd int, how int) (err error)
145288 //sys Fpathconf(fd int, name int) (val int, err error)
146289 //sys Fstat(fd int, stat *Stat_t) (err error)
290 //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
147291 //sys Fsync(fd int) (err error)
148292 //sys Ftruncate(fd int, length int64) (err error)
149293 //sysnb Getegid() (egid int)
164308 //sys Kqueue() (fd int, err error)
165309 //sys Lchown(path string, uid int, gid int) (err error)
166310 //sys Link(path string, link string) (err error)
311 //sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
167312 //sys Listen(s int, backlog int) (err error)
168313 //sys Lstat(path string, stat *Stat_t) (err error)
169314 //sys Mkdir(path string, mode uint32) (err error)
315 //sys Mkdirat(dirfd int, path string, mode uint32) (err error)
170316 //sys Mkfifo(path string, mode uint32) (err error)
317 //sys Mkfifoat(dirfd int, path string, mode uint32) (err error)
171318 //sys Mknod(path string, mode uint32, dev int) (err error)
319 //sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
172320 //sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
173321 //sys Open(path string, mode int, perm uint32) (fd int, err error)
322 //sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
174323 //sys Pathconf(path string, name int) (val int, err error)
175324 //sys Pread(fd int, p []byte, offset int64) (n int, err error)
176325 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
177326 //sys read(fd int, p []byte) (n int, err error)
178327 //sys Readlink(path string, buf []byte) (n int, err error)
328 //sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
179329 //sys Rename(from string, to string) (err error)
330 //sys Renameat(fromfd int, from string, tofd int, to string) (err error)
180331 //sys Revoke(path string) (err error)
181332 //sys Rmdir(path string) (err error)
182333 //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
194345 //sysnb Setuid(uid int) (err error)
195346 //sys Stat(path string, stat *Stat_t) (err error)
196347 //sys Symlink(path string, link string) (err error)
348 //sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
197349 //sys Sync() (err error)
198350 //sys Truncate(path string, length int64) (err error)
199351 //sys Umask(newmask int) (oldmask int)
200352 //sys Unlink(path string) (err error)
353 //sys Unlinkat(dirfd int, path string, flags int) (err error)
201354 //sys Unmount(path string, flags int) (err error)
202355 //sys write(fd int, p []byte) (n int, err error)
203356 //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
224377 // __msync13
225378 // __ntp_gettime30
226379 // __posix_chown
227 // __posix_fadvise50
228380 // __posix_fchown
229381 // __posix_lchown
230382 // __posix_rename
383535 // getitimer
384536 // getvfsstat
385537 // getxattr
386 // ioctl
387538 // ktrace
388539 // lchflags
389540 // lchmod
421572 // ntp_adjtime
422573 // pmc_control
423574 // pmc_get_info
424 // poll
425575 // pollts
426576 // preadv
427577 // profil
55
66 package unix
77
8 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
9
10 func NsecToTimespec(nsec int64) (ts Timespec) {
11 ts.Sec = int64(nsec / 1e9)
12 ts.Nsec = int32(nsec % 1e9)
13 return
8 func setTimespec(sec, nsec int64) Timespec {
9 return Timespec{Sec: sec, Nsec: int32(nsec)}
1410 }
1511
16 func NsecToTimeval(nsec int64) (tv Timeval) {
17 nsec += 999 // round up to microsecond
18 tv.Usec = int32(nsec % 1e9 / 1e3)
19 tv.Sec = int64(nsec / 1e9)
20 return
12 func setTimeval(sec, usec int64) Timeval {
13 return Timeval{Sec: sec, Usec: int32(usec)}
2114 }
2215
2316 func SetKevent(k *Kevent_t, fd, mode, flags int) {
55
66 package unix
77
8 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
9
10 func NsecToTimespec(nsec int64) (ts Timespec) {
11 ts.Sec = int64(nsec / 1e9)
12 ts.Nsec = int64(nsec % 1e9)
13 return
8 func setTimespec(sec, nsec int64) Timespec {
9 return Timespec{Sec: sec, Nsec: nsec}
1410 }
1511
16 func NsecToTimeval(nsec int64) (tv Timeval) {
17 nsec += 999 // round up to microsecond
18 tv.Usec = int32(nsec % 1e9 / 1e3)
19 tv.Sec = int64(nsec / 1e9)
20 return
12 func setTimeval(sec, usec int64) Timeval {
13 return Timeval{Sec: sec, Usec: int32(usec)}
2114 }
2215
2316 func SetKevent(k *Kevent_t, fd, mode, flags int) {
55
66 package unix
77
8 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
9
10 func NsecToTimespec(nsec int64) (ts Timespec) {
11 ts.Sec = int64(nsec / 1e9)
12 ts.Nsec = int32(nsec % 1e9)
13 return
8 func setTimespec(sec, nsec int64) Timespec {
9 return Timespec{Sec: sec, Nsec: int32(nsec)}
1410 }
1511
16 func NsecToTimeval(nsec int64) (tv Timeval) {
17 nsec += 999 // round up to microsecond
18 tv.Usec = int32(nsec % 1e9 / 1e3)
19 tv.Sec = int64(nsec / 1e9)
20 return
12 func setTimeval(sec, usec int64) Timeval {
13 return Timeval{Sec: sec, Usec: int32(usec)}
2114 }
2215
2316 func SetKevent(k *Kevent_t, fd, mode, flags int) {
0 // Copyright 2019 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build arm64,netbsd
5
6 package unix
7
8 func setTimespec(sec, nsec int64) Timespec {
9 return Timespec{Sec: sec, Nsec: nsec}
10 }
11
12 func setTimeval(sec, usec int64) Timeval {
13 return Timeval{Sec: sec, Usec: int32(usec)}
14 }
15
16 func SetKevent(k *Kevent_t, fd, mode, flags int) {
17 k.Ident = uint64(fd)
18 k.Filter = uint32(mode)
19 k.Flags = uint32(flags)
20 }
21
22 func (iov *Iovec) SetLen(length int) {
23 iov.Len = uint64(length)
24 }
25
26 func (msghdr *Msghdr) SetControllen(length int) {
27 msghdr.Controllen = uint32(length)
28 }
29
30 func (cmsg *Cmsghdr) SetLen(length int) {
31 cmsg.Len = uint32(length)
32 }
+0
-11
vendor/golang.org/x/sys/unix/syscall_no_getwd.go less more
0 // Copyright 2013 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build dragonfly freebsd netbsd openbsd
5
6 package unix
7
8 const ImplementsGetwd = false
9
10 func Getwd() (string, error) { return "", ENOTSUP }
1212 package unix
1313
1414 import (
15 "sort"
1516 "syscall"
1617 "unsafe"
1718 )
1819
20 // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
1921 type SockaddrDatalink struct {
2022 Len uint8
2123 Family uint8
3133 func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
3234
3335 func nametomib(name string) (mib []_C_int, err error) {
34
35 // Perform lookup via a binary search
36 left := 0
37 right := len(sysctlMib) - 1
38 for {
39 idx := left + (right-left)/2
40 switch {
41 case name == sysctlMib[idx].ctlname:
42 return sysctlMib[idx].ctloid, nil
43 case name > sysctlMib[idx].ctlname:
44 left = idx + 1
45 default:
46 right = idx - 1
47 }
48 if left > right {
49 break
50 }
36 i := sort.Search(len(sysctlMib), func(i int) bool {
37 return sysctlMib[i].ctlname >= name
38 })
39 if i < len(sysctlMib) && sysctlMib[i].ctlname == name {
40 return sysctlMib[i].ctloid, nil
5141 }
5242 return nil, EINVAL
5343 }
5444
55 func direntIno(buf []byte) (uint64, bool) {
56 return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
57 }
58
59 func direntReclen(buf []byte) (uint64, bool) {
60 return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
61 }
62
63 func direntNamlen(buf []byte) (uint64, bool) {
64 return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
45 func SysctlUvmexp(name string) (*Uvmexp, error) {
46 mib, err := sysctlmib(name)
47 if err != nil {
48 return nil, err
49 }
50
51 n := uintptr(SizeofUvmexp)
52 var u Uvmexp
53 if err := sysctl(mib, (*byte)(unsafe.Pointer(&u)), &n, nil, 0); err != nil {
54 return nil, err
55 }
56 if n != SizeofUvmexp {
57 return nil, EIO
58 }
59 return &u, nil
6560 }
6661
6762 //sysnb pipe(p *[2]_C_int) (err error)
7974 //sys getdents(fd int, buf []byte) (n int, err error)
8075 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
8176 return getdents(fd, buf)
77 }
78
79 const ImplementsGetwd = true
80
81 //sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD
82
83 func Getwd() (string, error) {
84 var buf [PathMax]byte
85 _, err := Getcwd(buf[0:])
86 if err != nil {
87 return "", err
88 }
89 n := clen(buf[:])
90 if n < 1 {
91 return "", EINVAL
92 }
93 return string(buf[:n]), nil
94 }
95
96 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
97 if raceenabled {
98 raceReleaseMerge(unsafe.Pointer(&ioSync))
99 }
100 return sendfile(outfd, infd, offset, count)
82101 }
83102
84103 // TODO
99118 err = e1
100119 }
101120 return
121 }
122
123 func setattrlistTimes(path string, times []Timespec, flags int) error {
124 // used on Darwin for UtimesNano
125 return ENOSYS
126 }
127
128 //sys ioctl(fd int, req uint, arg uintptr) (err error)
129
130 // ioctl itself should not be exposed directly, but additional get/set
131 // functions for specific types are permissible.
132
133 // IoctlSetInt performs an ioctl operation which sets an integer value
134 // on fd, using the specified request number.
135 func IoctlSetInt(fd int, req uint, value int) error {
136 return ioctl(fd, req, uintptr(value))
137 }
138
139 func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
140 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
141 }
142
143 func ioctlSetTermios(fd int, req uint, value *Termios) error {
144 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
145 }
146
147 // IoctlGetInt performs an ioctl operation which gets an integer value
148 // from fd, using the specified request number.
149 func IoctlGetInt(fd int, req uint) (int, error) {
150 var value int
151 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
152 return value, err
153 }
154
155 func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
156 var value Winsize
157 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
158 return &value, err
159 }
160
161 func IoctlGetTermios(fd int, req uint) (*Termios, error) {
162 var value Termios
163 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
164 return &value, err
165 }
166
167 //sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
168
169 func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
170 if len(fds) == 0 {
171 return ppoll(nil, 0, timeout, sigmask)
172 }
173 return ppoll(&fds[0], len(fds), timeout, sigmask)
174 }
175
176 func Uname(uname *Utsname) error {
177 mib := []_C_int{CTL_KERN, KERN_OSTYPE}
178 n := unsafe.Sizeof(uname.Sysname)
179 if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {
180 return err
181 }
182
183 mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
184 n = unsafe.Sizeof(uname.Nodename)
185 if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {
186 return err
187 }
188
189 mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
190 n = unsafe.Sizeof(uname.Release)
191 if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {
192 return err
193 }
194
195 mib = []_C_int{CTL_KERN, KERN_VERSION}
196 n = unsafe.Sizeof(uname.Version)
197 if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {
198 return err
199 }
200
201 // The version might have newlines or tabs in it, convert them to
202 // spaces.
203 for i, b := range uname.Version {
204 if b == '\n' || b == '\t' {
205 if i == len(uname.Version)-1 {
206 uname.Version[i] = 0
207 } else {
208 uname.Version[i] = ' '
209 }
210 }
211 }
212
213 mib = []_C_int{CTL_HW, HW_MACHINE}
214 n = unsafe.Sizeof(uname.Machine)
215 if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {
216 return err
217 }
218
219 return nil
102220 }
103221
104222 /*
115233 //sys Dup(fd int) (nfd int, err error)
116234 //sys Dup2(from int, to int) (err error)
117235 //sys Exit(code int)
236 //sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
118237 //sys Fchdir(fd int) (err error)
119238 //sys Fchflags(fd int, flags int) (err error)
120239 //sys Fchmod(fd int, mode uint32) (err error)
240 //sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
121241 //sys Fchown(fd int, uid int, gid int) (err error)
242 //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
122243 //sys Flock(fd int, how int) (err error)
123244 //sys Fpathconf(fd int, name int) (val int, err error)
124245 //sys Fstat(fd int, stat *Stat_t) (err error)
246 //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
125247 //sys Fstatfs(fd int, stat *Statfs_t) (err error)
126248 //sys Fsync(fd int) (err error)
127249 //sys Ftruncate(fd int, length int64) (err error)
134256 //sysnb Getppid() (ppid int)
135257 //sys Getpriority(which int, who int) (prio int, err error)
136258 //sysnb Getrlimit(which int, lim *Rlimit) (err error)
259 //sysnb Getrtable() (rtable int, err error)
137260 //sysnb Getrusage(who int, rusage *Rusage) (err error)
138261 //sysnb Getsid(pid int) (sid int, err error)
139262 //sysnb Gettimeofday(tv *Timeval) (err error)
143266 //sys Kqueue() (fd int, err error)
144267 //sys Lchown(path string, uid int, gid int) (err error)
145268 //sys Link(path string, link string) (err error)
269 //sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
146270 //sys Listen(s int, backlog int) (err error)
147271 //sys Lstat(path string, stat *Stat_t) (err error)
148272 //sys Mkdir(path string, mode uint32) (err error)
273 //sys Mkdirat(dirfd int, path string, mode uint32) (err error)
149274 //sys Mkfifo(path string, mode uint32) (err error)
275 //sys Mkfifoat(dirfd int, path string, mode uint32) (err error)
150276 //sys Mknod(path string, mode uint32, dev int) (err error)
277 //sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
151278 //sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
152279 //sys Open(path string, mode int, perm uint32) (fd int, err error)
280 //sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
153281 //sys Pathconf(path string, name int) (val int, err error)
154282 //sys Pread(fd int, p []byte, offset int64) (n int, err error)
155283 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
156284 //sys read(fd int, p []byte) (n int, err error)
157285 //sys Readlink(path string, buf []byte) (n int, err error)
286 //sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
158287 //sys Rename(from string, to string) (err error)
288 //sys Renameat(fromfd int, from string, tofd int, to string) (err error)
159289 //sys Revoke(path string) (err error)
160290 //sys Rmdir(path string) (err error)
161291 //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
171301 //sysnb Setresgid(rgid int, egid int, sgid int) (err error)
172302 //sysnb Setresuid(ruid int, euid int, suid int) (err error)
173303 //sysnb Setrlimit(which int, lim *Rlimit) (err error)
304 //sysnb Setrtable(rtable int) (err error)
174305 //sysnb Setsid() (pid int, err error)
175306 //sysnb Settimeofday(tp *Timeval) (err error)
176307 //sysnb Setuid(uid int) (err error)
177308 //sys Stat(path string, stat *Stat_t) (err error)
178309 //sys Statfs(path string, stat *Statfs_t) (err error)
179310 //sys Symlink(path string, link string) (err error)
311 //sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
180312 //sys Sync() (err error)
181313 //sys Truncate(path string, length int64) (err error)
182314 //sys Umask(newmask int) (oldmask int)
183315 //sys Unlink(path string) (err error)
316 //sys Unlinkat(dirfd int, path string, flags int) (err error)
184317 //sys Unmount(path string, flags int) (err error)
185318 //sys write(fd int, p []byte) (n int, err error)
186319 //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
203336 // clock_settime
204337 // closefrom
205338 // execve
206 // faccessat
207 // fchmodat
208 // fchownat
209339 // fcntl
210340 // fhopen
211341 // fhstat
212342 // fhstatfs
213343 // fork
214 // fstatat
215344 // futimens
216345 // getfh
217346 // getgid
219348 // getlogin
220349 // getresgid
221350 // getresuid
222 // getrtable
223351 // getthrid
224 // ioctl
225352 // ktrace
226353 // lfs_bmapv
227354 // lfs_markv
228355 // lfs_segclean
229356 // lfs_segwait
230 // linkat
231357 // mincore
232358 // minherit
233 // mkdirat
234 // mkfifoat
235 // mknodat
236359 // mount
237360 // mquery
238361 // msgctl
241364 // msgsnd
242365 // nfssvc
243366 // nnpfspioctl
244 // openat
245 // poll
246367 // preadv
247368 // profil
248369 // pwritev
249370 // quotactl
250 // readlinkat
251371 // readv
252372 // reboot
253373 // renameat
257377 // semop
258378 // setgroups
259379 // setitimer
260 // setrtable
261380 // setsockopt
262381 // shmat
263382 // shmctl
269388 // sigprocmask
270389 // sigreturn
271390 // sigsuspend
272 // symlinkat
273391 // sysarch
274392 // syscall
275393 // threxit
276394 // thrsigdivert
277395 // thrsleep
278396 // thrwakeup
279 // unlinkat
280397 // vfork
281398 // writev
55
66 package unix
77
8 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
9
10 func NsecToTimespec(nsec int64) (ts Timespec) {
11 ts.Sec = int64(nsec / 1e9)
12 ts.Nsec = int32(nsec % 1e9)
13 return
8 func setTimespec(sec, nsec int64) Timespec {
9 return Timespec{Sec: sec, Nsec: int32(nsec)}
1410 }
1511
16 func NsecToTimeval(nsec int64) (tv Timeval) {
17 nsec += 999 // round up to microsecond
18 tv.Usec = int32(nsec % 1e9 / 1e3)
19 tv.Sec = int64(nsec / 1e9)
20 return
12 func setTimeval(sec, usec int64) Timeval {
13 return Timeval{Sec: sec, Usec: int32(usec)}
2114 }
2215
2316 func SetKevent(k *Kevent_t, fd, mode, flags int) {
3730 func (cmsg *Cmsghdr) SetLen(length int) {
3831 cmsg.Len = uint32(length)
3932 }
33
34 // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
35 // of openbsd/386 the syscall is called sysctl instead of __sysctl.
36 const SYS___SYSCTL = SYS_SYSCTL
55
66 package unix
77
8 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
9
10 func NsecToTimespec(nsec int64) (ts Timespec) {
11 ts.Sec = nsec / 1e9
12 ts.Nsec = nsec % 1e9
13 return
8 func setTimespec(sec, nsec int64) Timespec {
9 return Timespec{Sec: sec, Nsec: nsec}
1410 }
1511
16 func NsecToTimeval(nsec int64) (tv Timeval) {
17 nsec += 999 // round up to microsecond
18 tv.Usec = nsec % 1e9 / 1e3
19 tv.Sec = nsec / 1e9
20 return
12 func setTimeval(sec, usec int64) Timeval {
13 return Timeval{Sec: sec, Usec: usec}
2114 }
2215
2316 func SetKevent(k *Kevent_t, fd, mode, flags int) {
3730 func (cmsg *Cmsghdr) SetLen(length int) {
3831 cmsg.Len = uint32(length)
3932 }
33
34 // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
35 // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
36 const SYS___SYSCTL = SYS_SYSCTL
55
66 package unix
77
8 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
9
10 func NsecToTimespec(nsec int64) (ts Timespec) {
11 ts.Sec = int64(nsec / 1e9)
12 ts.Nsec = int32(nsec % 1e9)
13 return
8 func setTimespec(sec, nsec int64) Timespec {
9 return Timespec{Sec: sec, Nsec: int32(nsec)}
1410 }
1511
16 func NsecToTimeval(nsec int64) (tv Timeval) {
17 nsec += 999 // round up to microsecond
18 tv.Usec = int32(nsec % 1e9 / 1e3)
19 tv.Sec = int64(nsec / 1e9)
20 return
12 func setTimeval(sec, usec int64) Timeval {
13 return Timeval{Sec: sec, Usec: int32(usec)}
2114 }
2215
2316 func SetKevent(k *Kevent_t, fd, mode, flags int) {
3730 func (cmsg *Cmsghdr) SetLen(length int) {
3831 cmsg.Len = uint32(length)
3932 }
33
34 // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
35 // of openbsd/arm the syscall is called sysctl instead of __sysctl.
36 const SYS___SYSCTL = SYS_SYSCTL
2222 func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
2323 func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
2424
25 // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
2526 type SockaddrDatalink struct {
2627 Family uint16
2728 Index uint16
3334 raw RawSockaddrDatalink
3435 }
3536
36 func clen(n []byte) int {
37 for i := 0; i < len(n); i++ {
38 if n[i] == 0 {
39 return i
40 }
41 }
42 return len(n)
43 }
44
45 func direntIno(buf []byte) (uint64, bool) {
46 return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
47 }
48
49 func direntReclen(buf []byte) (uint64, bool) {
50 return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
51 }
52
53 func direntNamlen(buf []byte) (uint64, bool) {
54 reclen, ok := direntReclen(buf)
55 if !ok {
56 return 0, false
57 }
58 return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
59 }
60
6137 //sysnb pipe(p *[2]_C_int) (n int, err error)
6238
6339 func Pipe(p []int) (err error) {
135111 if err = getsockname(fd, &rsa, &len); err != nil {
136112 return
137113 }
138 return anyToSockaddr(&rsa)
114 return anyToSockaddr(fd, &rsa)
115 }
116
117 // GetsockoptString returns the string value of the socket option opt for the
118 // socket associated with fd at the given socket level.
119 func GetsockoptString(fd, level, opt int) (string, error) {
120 buf := make([]byte, 256)
121 vallen := _Socklen(len(buf))
122 err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen)
123 if err != nil {
124 return "", err
125 }
126 return string(buf[:vallen-1]), nil
139127 }
140128
141129 const ImplementsGetwd = true
165153
166154 func Getgroups() (gids []int, err error) {
167155 n, err := getgroups(0, nil)
168 // Check for error and sanity check group count. Newer versions of
156 // Check for error and sanity check group count. Newer versions of
169157 // Solaris allow up to 1024 (NGROUPS_MAX).
170158 if n < 0 || n > 1024 {
171159 if err != nil {
323311
324312 //sys fcntl(fd int, cmd int, arg int) (val int, err error)
325313
314 // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
315 func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
316 valptr, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)
317 var err error
318 if errno != 0 {
319 err = errno
320 }
321 return int(valptr), err
322 }
323
326324 // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
327325 func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
328326 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(lk)), 0, 0, 0)
349347 }
350348
351349 // Solaris doesn't have an futimes function because it allows NULL to be
352 // specified as the path for futimesat. However, Go doesn't like
350 // specified as the path for futimesat. However, Go doesn't like
353351 // NULL-style string interfaces, so this simple wrapper is provided.
354352 func Futimes(fd int, tv []Timeval) error {
355353 if tv == nil {
361359 return futimesat(fd, nil, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
362360 }
363361
364 func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
362 func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
365363 switch rsa.Addr.Family {
366364 case AF_UNIX:
367365 pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
412410 if nfd == -1 {
413411 return
414412 }
415 sa, err = anyToSockaddr(&rsa)
413 sa, err = anyToSockaddr(fd, &rsa)
416414 if err != nil {
417415 Close(nfd)
418416 nfd = 0
449447 oobn = int(msg.Accrightslen)
450448 // source address is only specified if the socket is unconnected
451449 if rsa.Addr.Family != AF_UNSPEC {
452 from, err = anyToSockaddr(&rsa)
450 from, err = anyToSockaddr(fd, &rsa)
453451 }
454452 return
455453 }
541539 return ioctl(fd, req, uintptr(value))
542540 }
543541
544 func IoctlSetWinsize(fd int, req uint, value *Winsize) (err error) {
542 func ioctlSetWinsize(fd int, req uint, value *Winsize) (err error) {
545543 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
546544 }
547545
548 func IoctlSetTermios(fd int, req uint, value *Termios) (err error) {
546 func ioctlSetTermios(fd int, req uint, value *Termios) (err error) {
549547 return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
550548 }
551549
575573 var value Termio
576574 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
577575 return &value, err
576 }
577
578 //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
579
580 func Poll(fds []PollFd, timeout int) (n int, err error) {
581 if len(fds) == 0 {
582 return poll(nil, 0, timeout)
583 }
584 return poll(&fds[0], len(fds), timeout)
585 }
586
587 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
588 if raceenabled {
589 raceReleaseMerge(unsafe.Pointer(&ioSync))
590 }
591 return sendfile(outfd, infd, offset, count)
578592 }
579593
580594 /*
591605 //sys Dup(fd int) (nfd int, err error)
592606 //sys Dup2(oldfd int, newfd int) (err error)
593607 //sys Exit(code int)
608 //sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
594609 //sys Fchdir(fd int) (err error)
595610 //sys Fchmod(fd int, mode uint32) (err error)
596611 //sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
597612 //sys Fchown(fd int, uid int, gid int) (err error)
598613 //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
599614 //sys Fdatasync(fd int) (err error)
600 //sys Flock(fd int, how int) (err error)
615 //sys Flock(fd int, how int) (err error)
601616 //sys Fpathconf(fd int, name int) (val int, err error)
602617 //sys Fstat(fd int, stat *Stat_t) (err error)
618 //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
603619 //sys Fstatvfs(fd int, vfsstat *Statvfs_t) (err error)
604620 //sys Getdents(fd int, buf []byte, basep *uintptr) (n int, err error)
605621 //sysnb Getgid() (gid int)
645661 //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
646662 //sys Rmdir(path string) (err error)
647663 //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = lseek
664 //sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
648665 //sysnb Setegid(egid int) (err error)
649666 //sysnb Seteuid(euid int) (err error)
650667 //sysnb Setgid(gid int) (err error)
676693 //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_connect
677694 //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
678695 //sys munmap(addr uintptr, length uintptr) (err error)
696 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = libsendfile.sendfile
679697 //sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_sendto
680698 //sys socket(domain int, typ int, proto int) (fd int, err error) = libsocket.__xnet_socket
681699 //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.__xnet_socketpair
55
66 package unix
77
8 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
9
10 func NsecToTimespec(nsec int64) (ts Timespec) {
11 ts.Sec = nsec / 1e9
12 ts.Nsec = nsec % 1e9
13 return
8 func setTimespec(sec, nsec int64) Timespec {
9 return Timespec{Sec: sec, Nsec: nsec}
1410 }
1511
16 func NsecToTimeval(nsec int64) (tv Timeval) {
17 nsec += 999 // round up to microsecond
18 tv.Usec = nsec % 1e9 / 1e3
19 tv.Sec = int64(nsec / 1e9)
20 return
12 func setTimeval(sec, usec int64) Timeval {
13 return Timeval{Sec: sec, Usec: usec}
2114 }
2215
2316 func (iov *Iovec) SetLen(length int) {
2720 func (cmsg *Cmsghdr) SetLen(length int) {
2821 cmsg.Len = uint32(length)
2922 }
30
31 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
32 // TODO(aram): implement this, see issue 5847.
33 panic("unimplemented")
34 }
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
4 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
55
66 package unix
77
88 import (
9 "runtime"
9 "bytes"
10 "sort"
1011 "sync"
1112 "syscall"
1213 "unsafe"
1617 Stdin = 0
1718 Stdout = 1
1819 Stderr = 2
19 )
20
21 const (
22 darwin64Bit = runtime.GOOS == "darwin" && sizeofPtr == 8
23 dragonfly64Bit = runtime.GOOS == "dragonfly" && sizeofPtr == 8
24 netbsd32Bit = runtime.GOOS == "netbsd" && sizeofPtr == 4
25 solaris64Bit = runtime.GOOS == "solaris" && sizeofPtr == 8
2620 )
2721
2822 // Do the interface allocations only once for common
4943 return e
5044 }
5145
46 // ErrnoName returns the error name for error number e.
47 func ErrnoName(e syscall.Errno) string {
48 i := sort.Search(len(errorList), func(i int) bool {
49 return errorList[i].num >= e
50 })
51 if i < len(errorList) && errorList[i].num == e {
52 return errorList[i].name
53 }
54 return ""
55 }
56
57 // SignalName returns the signal name for signal number s.
58 func SignalName(s syscall.Signal) string {
59 i := sort.Search(len(signalList), func(i int) bool {
60 return signalList[i].num >= s
61 })
62 if i < len(signalList) && signalList[i].num == s {
63 return signalList[i].name
64 }
65 return ""
66 }
67
68 // clen returns the index of the first NULL byte in n or len(n) if n contains no NULL byte.
69 func clen(n []byte) int {
70 i := bytes.IndexByte(n, 0)
71 if i == -1 {
72 i = len(n)
73 }
74 return i
75 }
76
5277 // Mmap manager, for use by operating system-specific implementations.
5378
5479 type mmapper struct {
137162 // creation of IPv6 sockets to return EAFNOSUPPORT.
138163 var SocketDisableIPv6 bool
139164
165 // Sockaddr represents a socket address.
140166 type Sockaddr interface {
141167 sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs
142168 }
143169
170 // SockaddrInet4 implements the Sockaddr interface for AF_INET type sockets.
144171 type SockaddrInet4 struct {
145172 Port int
146173 Addr [4]byte
147174 raw RawSockaddrInet4
148175 }
149176
177 // SockaddrInet6 implements the Sockaddr interface for AF_INET6 type sockets.
150178 type SockaddrInet6 struct {
151179 Port int
152180 ZoneId uint32
154182 raw RawSockaddrInet6
155183 }
156184
185 // SockaddrUnix implements the Sockaddr interface for AF_UNIX type sockets.
157186 type SockaddrUnix struct {
158187 Name string
159188 raw RawSockaddrUnix
181210 if err = getpeername(fd, &rsa, &len); err != nil {
182211 return
183212 }
184 return anyToSockaddr(&rsa)
213 return anyToSockaddr(fd, &rsa)
214 }
215
216 func GetsockoptByte(fd, level, opt int) (value byte, err error) {
217 var n byte
218 vallen := _Socklen(1)
219 err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
220 return n, err
185221 }
186222
187223 func GetsockoptInt(fd, level, opt int) (value int, err error) {
191227 return int(n), err
192228 }
193229
230 func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {
231 vallen := _Socklen(4)
232 err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
233 return value, err
234 }
235
236 func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {
237 var value IPMreq
238 vallen := _Socklen(SizeofIPMreq)
239 err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
240 return &value, err
241 }
242
243 func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {
244 var value IPv6Mreq
245 vallen := _Socklen(SizeofIPv6Mreq)
246 err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
247 return &value, err
248 }
249
250 func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
251 var value IPv6MTUInfo
252 vallen := _Socklen(SizeofIPv6MTUInfo)
253 err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
254 return &value, err
255 }
256
257 func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
258 var value ICMPv6Filter
259 vallen := _Socklen(SizeofICMPv6Filter)
260 err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
261 return &value, err
262 }
263
264 func GetsockoptLinger(fd, level, opt int) (*Linger, error) {
265 var linger Linger
266 vallen := _Socklen(SizeofLinger)
267 err := getsockopt(fd, level, opt, unsafe.Pointer(&linger), &vallen)
268 return &linger, err
269 }
270
271 func GetsockoptTimeval(fd, level, opt int) (*Timeval, error) {
272 var tv Timeval
273 vallen := _Socklen(unsafe.Sizeof(tv))
274 err := getsockopt(fd, level, opt, unsafe.Pointer(&tv), &vallen)
275 return &tv, err
276 }
277
194278 func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
195279 var rsa RawSockaddrAny
196280 var len _Socklen = SizeofSockaddrAny
198282 return
199283 }
200284 if rsa.Addr.Family != AF_UNSPEC {
201 from, err = anyToSockaddr(&rsa)
285 from, err = anyToSockaddr(fd, &rsa)
202286 }
203287 return
204288 }
266350 return
267351 }
268352
269 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
270 if raceenabled {
271 raceReleaseMerge(unsafe.Pointer(&ioSync))
272 }
273 return sendfile(outfd, infd, offset, count)
274 }
275
276353 var ioSync int64
277354
278355 func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }
290367 _, err = fcntl(fd, F_SETFL, flag)
291368 return err
292369 }
370
371 // Exec calls execve(2), which replaces the calling executable in the process
372 // tree. argv0 should be the full path to an executable ("/bin/ls") and the
373 // executable name should also be the first argument in argv (["ls", "-l"]).
374 // envv are the environment variables that should be passed to the new
375 // process (["USER=go", "PWD=/tmp"]).
376 func Exec(argv0 string, argv []string, envv []string) error {
377 return syscall.Exec(argv0, argv, envv)
378 }
22 // license that can be found in the LICENSE file.
33
44 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
5 // +build !gccgo
5 // +build !gccgo,!ppc64le,!ppc64
66
77 package unix
88
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build linux
5 // +build ppc64le ppc64
6 // +build !gccgo
7
8 package unix
9
10 import "syscall"
11
12 func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
13 return syscall.Syscall(trap, a1, a2, a3)
14 }
15 func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
16 return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6)
17 }
18 func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
19 return syscall.RawSyscall(trap, a1, a2, a3)
20 }
21 func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
22 return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6)
23 }
0 // Copyright 2017 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
5
6 package unix
7
8 import "time"
9
10 // TimespecToNsec converts a Timespec value into a number of
11 // nanoseconds since the Unix epoch.
12 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
13
14 // NsecToTimespec takes a number of nanoseconds since the Unix epoch
15 // and returns the corresponding Timespec value.
16 func NsecToTimespec(nsec int64) Timespec {
17 sec := nsec / 1e9
18 nsec = nsec % 1e9
19 if nsec < 0 {
20 nsec += 1e9
21 sec--
22 }
23 return setTimespec(sec, nsec)
24 }
25
26 // TimeToTimespec converts t into a Timespec.
27 // On some 32-bit systems the range of valid Timespec values are smaller
28 // than that of time.Time values. So if t is out of the valid range of
29 // Timespec, it returns a zero Timespec and ERANGE.
30 func TimeToTimespec(t time.Time) (Timespec, error) {
31 sec := t.Unix()
32 nsec := int64(t.Nanosecond())
33 ts := setTimespec(sec, nsec)
34
35 // Currently all targets have either int32 or int64 for Timespec.Sec.
36 // If there were a new target with floating point type for it, we have
37 // to consider the rounding error.
38 if int64(ts.Sec) != sec {
39 return Timespec{}, ERANGE
40 }
41 return ts, nil
42 }
43
44 // TimevalToNsec converts a Timeval value into a number of nanoseconds
45 // since the Unix epoch.
46 func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
47
48 // NsecToTimeval takes a number of nanoseconds since the Unix epoch
49 // and returns the corresponding Timeval value.
50 func NsecToTimeval(nsec int64) Timeval {
51 nsec += 999 // round up to microsecond
52 usec := nsec % 1e9 / 1e3
53 sec := nsec / 1e9
54 if usec < 0 {
55 usec += 1e6
56 sec--
57 }
58 return setTimeval(sec, usec)
59 }
60
61 // Unix returns ts as the number of seconds and nanoseconds elapsed since the
62 // Unix epoch.
63 func (ts *Timespec) Unix() (sec int64, nsec int64) {
64 return int64(ts.Sec), int64(ts.Nsec)
65 }
66
67 // Unix returns tv as the number of seconds and nanoseconds elapsed since the
68 // Unix epoch.
69 func (tv *Timeval) Unix() (sec int64, nsec int64) {
70 return int64(tv.Sec), int64(tv.Usec) * 1000
71 }
72
73 // Nano returns ts as the number of nanoseconds elapsed since the Unix epoch.
74 func (ts *Timespec) Nano() int64 {
75 return int64(ts.Sec)*1e9 + int64(ts.Nsec)
76 }
77
78 // Nano returns tv as the number of nanoseconds elapsed since the Unix epoch.
79 func (tv *Timeval) Nano() int64 {
80 return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
81 }
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build ignore
5 // +build aix
6
7 /*
8 Input to cgo -godefs. See also mkerrors.sh and mkall.sh
9 */
10
11 // +godefs map struct_in_addr [4]byte /* in_addr */
12 // +godefs map struct_in6_addr [16]byte /* in6_addr */
13
14 package unix
15
16 /*
17 #include <sys/types.h>
18 #include <sys/time.h>
19 #include <sys/limits.h>
20 #include <sys/un.h>
21 #include <utime.h>
22 #include <sys/utsname.h>
23 #include <sys/poll.h>
24 #include <sys/resource.h>
25 #include <sys/stat.h>
26 #include <sys/statfs.h>
27 #include <sys/termio.h>
28 #include <sys/ioctl.h>
29
30 #include <termios.h>
31
32 #include <net/if.h>
33 #include <net/if_dl.h>
34 #include <netinet/in.h>
35 #include <netinet/icmp6.h>
36
37
38 #include <dirent.h>
39 #include <fcntl.h>
40
41 enum {
42 sizeofPtr = sizeof(void*),
43 };
44
45 union sockaddr_all {
46 struct sockaddr s1; // this one gets used for fields
47 struct sockaddr_in s2; // these pad it out
48 struct sockaddr_in6 s3;
49 struct sockaddr_un s4;
50 struct sockaddr_dl s5;
51 };
52
53 struct sockaddr_any {
54 struct sockaddr addr;
55 char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
56 };
57
58 */
59 import "C"
60
61 // Machine characteristics
62
63 const (
64 SizeofPtr = C.sizeofPtr
65 SizeofShort = C.sizeof_short
66 SizeofInt = C.sizeof_int
67 SizeofLong = C.sizeof_long
68 SizeofLongLong = C.sizeof_longlong
69 PathMax = C.PATH_MAX
70 )
71
72 // Basic types
73
74 type (
75 _C_short C.short
76 _C_int C.int
77 _C_long C.long
78 _C_long_long C.longlong
79 )
80
81 type off64 C.off64_t
82 type off C.off_t
83 type Mode_t C.mode_t
84
85 // Time
86
87 type Timespec C.struct_timespec
88
89 type StTimespec C.struct_st_timespec
90
91 type Timeval C.struct_timeval
92
93 type Timeval32 C.struct_timeval32
94
95 type Timex C.struct_timex
96
97 type Time_t C.time_t
98
99 type Tms C.struct_tms
100
101 type Utimbuf C.struct_utimbuf
102
103 type Timezone C.struct_timezone
104
105 // Processes
106
107 type Rusage C.struct_rusage
108
109 type Rlimit C.struct_rlimit64
110
111 type Pid_t C.pid_t
112
113 type _Gid_t C.gid_t
114
115 type dev_t C.dev_t
116
117 // Files
118
119 type Stat_t C.struct_stat
120
121 type StatxTimestamp C.struct_statx_timestamp
122
123 type Statx_t C.struct_statx
124
125 type Dirent C.struct_dirent
126
127 // Sockets
128
129 type RawSockaddrInet4 C.struct_sockaddr_in
130
131 type RawSockaddrInet6 C.struct_sockaddr_in6
132
133 type RawSockaddrUnix C.struct_sockaddr_un
134
135 type RawSockaddr C.struct_sockaddr
136
137 type RawSockaddrAny C.struct_sockaddr_any
138
139 type _Socklen C.socklen_t
140
141 type Cmsghdr C.struct_cmsghdr
142
143 type ICMPv6Filter C.struct_icmp6_filter
144
145 type Iovec C.struct_iovec
146
147 type IPMreq C.struct_ip_mreq
148
149 type IPv6Mreq C.struct_ipv6_mreq
150
151 type IPv6MTUInfo C.struct_ip6_mtuinfo
152
153 type Linger C.struct_linger
154
155 type Msghdr C.struct_msghdr
156
157 const (
158 SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
159 SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
160 SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
161 SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
162 SizeofLinger = C.sizeof_struct_linger
163 SizeofIPMreq = C.sizeof_struct_ip_mreq
164 SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
165 SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
166 SizeofMsghdr = C.sizeof_struct_msghdr
167 SizeofCmsghdr = C.sizeof_struct_cmsghdr
168 SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
169 )
170
171 // Routing and interface messages
172
173 const (
174 SizeofIfMsghdr = C.sizeof_struct_if_msghdr
175 )
176
177 type IfMsgHdr C.struct_if_msghdr
178
179 // Misc
180
181 type FdSet C.fd_set
182
183 type Utsname C.struct_utsname
184
185 type Ustat_t C.struct_ustat
186
187 type Sigset_t C.sigset_t
188
189 const (
190 AT_FDCWD = C.AT_FDCWD
191 AT_REMOVEDIR = C.AT_REMOVEDIR
192 AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
193 )
194
195 // Terminal handling
196
197 type Termios C.struct_termios
198
199 type Termio C.struct_termio
200
201 type Winsize C.struct_winsize
202
203 //poll
204
205 type PollFd struct {
206 Fd int32
207 Events uint16
208 Revents uint16
209 }
210
211 const (
212 POLLERR = C.POLLERR
213 POLLHUP = C.POLLHUP
214 POLLIN = C.POLLIN
215 POLLNVAL = C.POLLNVAL
216 POLLOUT = C.POLLOUT
217 POLLPRI = C.POLLPRI
218 POLLRDBAND = C.POLLRDBAND
219 POLLRDNORM = C.POLLRDNORM
220 POLLWRBAND = C.POLLWRBAND
221 POLLWRNORM = C.POLLWRNORM
222 )
223
224 //flock_t
225
226 type Flock_t C.struct_flock64
227
228 // Statfs
229
230 type Fsid_t C.struct_fsid_t
231 type Fsid64_t C.struct_fsid64_t
232
233 type Statfs_t C.struct_statfs
234
235 const RNDGETENTCNT = 0x80045200
1818 #define _DARWIN_USE_64_BIT_INODE
1919 #include <dirent.h>
2020 #include <fcntl.h>
21 #include <poll.h>
2122 #include <signal.h>
2223 #include <termios.h>
2324 #include <unistd.h>
3738 #include <sys/types.h>
3839 #include <sys/uio.h>
3940 #include <sys/un.h>
41 #include <sys/utsname.h>
4042 #include <sys/wait.h>
4143 #include <net/bpf.h>
4244 #include <net/if.h>
6769 */
6870 import "C"
6971
70 // Machine characteristics; for internal use.
71
72 const (
73 sizeofPtr = C.sizeofPtr
74 sizeofShort = C.sizeof_short
75 sizeofInt = C.sizeof_int
76 sizeofLong = C.sizeof_long
77 sizeofLongLong = C.sizeof_longlong
72 // Machine characteristics
73
74 const (
75 SizeofPtr = C.sizeofPtr
76 SizeofShort = C.sizeof_short
77 SizeofInt = C.sizeof_int
78 SizeofLong = C.sizeof_long
79 SizeofLongLong = C.sizeof_longlong
7880 )
7981
8082 // Basic types
251253 AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
252254 AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
253255 )
256
257 // poll
258
259 type PollFd C.struct_pollfd
260
261 const (
262 POLLERR = C.POLLERR
263 POLLHUP = C.POLLHUP
264 POLLIN = C.POLLIN
265 POLLNVAL = C.POLLNVAL
266 POLLOUT = C.POLLOUT
267 POLLPRI = C.POLLPRI
268 POLLRDBAND = C.POLLRDBAND
269 POLLRDNORM = C.POLLRDNORM
270 POLLWRBAND = C.POLLWRBAND
271 POLLWRNORM = C.POLLWRNORM
272 )
273
274 // uname
275
276 type Utsname C.struct_utsname
1616 #define KERNEL
1717 #include <dirent.h>
1818 #include <fcntl.h>
19 #include <poll.h>
1920 #include <signal.h>
2021 #include <termios.h>
2122 #include <stdio.h>
3334 #include <sys/time.h>
3435 #include <sys/types.h>
3536 #include <sys/un.h>
37 #include <sys/utsname.h>
3638 #include <sys/wait.h>
3739 #include <net/bpf.h>
3840 #include <net/if.h>
6264 */
6365 import "C"
6466
65 // Machine characteristics; for internal use.
66
67 const (
68 sizeofPtr = C.sizeofPtr
69 sizeofShort = C.sizeof_short
70 sizeofInt = C.sizeof_int
71 sizeofLong = C.sizeof_long
72 sizeofLongLong = C.sizeof_longlong
67 // Machine characteristics
68
69 const (
70 SizeofPtr = C.sizeofPtr
71 SizeofShort = C.sizeof_short
72 SizeofInt = C.sizeof_int
73 SizeofLong = C.sizeof_long
74 SizeofLongLong = C.sizeof_longlong
7375 )
7476
7577 // Basic types
9799
98100 // Files
99101
100 const ( // Directory mode bits
101 S_IFMT = C.S_IFMT
102 S_IFIFO = C.S_IFIFO
103 S_IFCHR = C.S_IFCHR
104 S_IFDIR = C.S_IFDIR
105 S_IFBLK = C.S_IFBLK
106 S_IFREG = C.S_IFREG
107 S_IFLNK = C.S_IFLNK
108 S_IFSOCK = C.S_IFSOCK
109 S_ISUID = C.S_ISUID
110 S_ISGID = C.S_ISGID
111 S_ISVTX = C.S_ISVTX
112 S_IRUSR = C.S_IRUSR
113 S_IWUSR = C.S_IWUSR
114 S_IXUSR = C.S_IXUSR
115 )
116
117102 type Stat_t C.struct_stat
118103
119104 type Statfs_t C.struct_statfs
123108 type Dirent C.struct_dirent
124109
125110 type Fsid C.struct_fsid
111
112 // File system limits
113
114 const (
115 PathMax = C.PATH_MAX
116 )
126117
127118 // Sockets
128119
240231
241232 type Termios C.struct_termios
242233
234 type Winsize C.struct_winsize
235
243236 // fchmodat-like syscalls.
244237
245238 const (
246239 AT_FDCWD = C.AT_FDCWD
247240 AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
248241 )
242
243 // poll
244
245 type PollFd C.struct_pollfd
246
247 const (
248 POLLERR = C.POLLERR
249 POLLHUP = C.POLLHUP
250 POLLIN = C.POLLIN
251 POLLNVAL = C.POLLNVAL
252 POLLOUT = C.POLLOUT
253 POLLPRI = C.POLLPRI
254 POLLRDBAND = C.POLLRDBAND
255 POLLRDNORM = C.POLLRDNORM
256 POLLWRBAND = C.POLLWRBAND
257 POLLWRNORM = C.POLLWRNORM
258 )
259
260 // Uname
261
262 type Utsname C.struct_utsname
1313 package unix
1414
1515 /*
16 #define KERNEL
16 #define _WANT_FREEBSD11_STAT 1
17 #define _WANT_FREEBSD11_STATFS 1
18 #define _WANT_FREEBSD11_DIRENT 1
19 #define _WANT_FREEBSD11_KEVENT 1
20
1721 #include <dirent.h>
1822 #include <fcntl.h>
23 #include <poll.h>
1924 #include <signal.h>
2025 #include <termios.h>
2126 #include <stdio.h>
2227 #include <unistd.h>
23 #include <sys/capability.h>
28 #include <sys/capsicum.h>
2429 #include <sys/event.h>
2530 #include <sys/mman.h>
2631 #include <sys/mount.h>
3439 #include <sys/time.h>
3540 #include <sys/types.h>
3641 #include <sys/un.h>
42 #include <sys/utsname.h>
3743 #include <sys/wait.h>
3844 #include <net/bpf.h>
3945 #include <net/if.h>
5864 struct sockaddr_any {
5965 struct sockaddr addr;
6066 char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
61 };
62
63 // This structure is a duplicate of stat on FreeBSD 8-STABLE.
64 // See /usr/include/sys/stat.h.
65 struct stat8 {
66 #undef st_atimespec st_atim
67 #undef st_mtimespec st_mtim
68 #undef st_ctimespec st_ctim
69 #undef st_birthtimespec st_birthtim
70 __dev_t st_dev;
71 ino_t st_ino;
72 mode_t st_mode;
73 nlink_t st_nlink;
74 uid_t st_uid;
75 gid_t st_gid;
76 __dev_t st_rdev;
77 #if __BSD_VISIBLE
78 struct timespec st_atimespec;
79 struct timespec st_mtimespec;
80 struct timespec st_ctimespec;
81 #else
82 time_t st_atime;
83 long __st_atimensec;
84 time_t st_mtime;
85 long __st_mtimensec;
86 time_t st_ctime;
87 long __st_ctimensec;
88 #endif
89 off_t st_size;
90 blkcnt_t st_blocks;
91 blksize_t st_blksize;
92 fflags_t st_flags;
93 __uint32_t st_gen;
94 __int32_t st_lspare;
95 #if __BSD_VISIBLE
96 struct timespec st_birthtimespec;
97 unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
98 unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
99 #else
100 time_t st_birthtime;
101 long st_birthtimensec;
102 unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
103 unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
104 #endif
10567 };
10668
10769 // This structure is a duplicate of if_data on FreeBSD 8-STABLE.
151113 */
152114 import "C"
153115
154 // Machine characteristics; for internal use.
155
156 const (
157 sizeofPtr = C.sizeofPtr
158 sizeofShort = C.sizeof_short
159 sizeofInt = C.sizeof_int
160 sizeofLong = C.sizeof_long
161 sizeofLongLong = C.sizeof_longlong
116 // Machine characteristics
117
118 const (
119 SizeofPtr = C.sizeofPtr
120 SizeofShort = C.sizeof_short
121 SizeofInt = C.sizeof_int
122 SizeofLong = C.sizeof_long
123 SizeofLongLong = C.sizeof_longlong
162124 )
163125
164126 // Basic types
186148
187149 // Files
188150
189 const ( // Directory mode bits
190 S_IFMT = C.S_IFMT
191 S_IFIFO = C.S_IFIFO
192 S_IFCHR = C.S_IFCHR
193 S_IFDIR = C.S_IFDIR
194 S_IFBLK = C.S_IFBLK
195 S_IFREG = C.S_IFREG
196 S_IFLNK = C.S_IFLNK
197 S_IFSOCK = C.S_IFSOCK
198 S_ISUID = C.S_ISUID
199 S_ISGID = C.S_ISGID
200 S_ISVTX = C.S_ISVTX
201 S_IRUSR = C.S_IRUSR
202 S_IWUSR = C.S_IWUSR
203 S_IXUSR = C.S_IXUSR
204 )
205
206 type Stat_t C.struct_stat8
151 const (
152 _statfsVersion = C.STATFS_VERSION
153 _dirblksiz = C.DIRBLKSIZ
154 )
155
156 type Stat_t C.struct_stat
157
158 type stat_freebsd11_t C.struct_freebsd11_stat
207159
208160 type Statfs_t C.struct_statfs
209161
162 type statfs_freebsd11_t C.struct_freebsd11_statfs
163
210164 type Flock_t C.struct_flock
211165
212166 type Dirent C.struct_dirent
213167
168 type dirent_freebsd11 C.struct_freebsd11_dirent
169
214170 type Fsid C.struct_fsid
171
172 // File system limits
173
174 const (
175 PathMax = C.PATH_MAX
176 )
215177
216178 // Advice to Fadvise
217179
287249
288250 // Events (kqueue, kevent)
289251
290 type Kevent_t C.struct_kevent
252 type Kevent_t C.struct_kevent_freebsd11
291253
292254 // Select
293255
366328 AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
367329 )
368330
331 // poll
332
333 type PollFd C.struct_pollfd
334
335 const (
336 POLLERR = C.POLLERR
337 POLLHUP = C.POLLHUP
338 POLLIN = C.POLLIN
339 POLLINIGNEOF = C.POLLINIGNEOF
340 POLLNVAL = C.POLLNVAL
341 POLLOUT = C.POLLOUT
342 POLLPRI = C.POLLPRI
343 POLLRDBAND = C.POLLRDBAND
344 POLLRDNORM = C.POLLRDNORM
345 POLLWRBAND = C.POLLWRBAND
346 POLLWRNORM = C.POLLWRNORM
347 )
348
369349 // Capabilities
370350
371351 type CapRights C.struct_cap_rights
352
353 // Uname
354
355 type Utsname C.struct_utsname
1616 #define KERNEL
1717 #include <dirent.h>
1818 #include <fcntl.h>
19 #include <poll.h>
1920 #include <signal.h>
2021 #include <termios.h>
2122 #include <stdio.h>
3536 #include <sys/time.h>
3637 #include <sys/uio.h>
3738 #include <sys/un.h>
39 #include <sys/utsname.h>
3840 #include <sys/wait.h>
3941 #include <net/bpf.h>
4042 #include <net/if.h>
6466 */
6567 import "C"
6668
67 // Machine characteristics; for internal use.
68
69 const (
70 sizeofPtr = C.sizeofPtr
71 sizeofShort = C.sizeof_short
72 sizeofInt = C.sizeof_int
73 sizeofLong = C.sizeof_long
74 sizeofLongLong = C.sizeof_longlong
69 // Machine characteristics
70
71 const (
72 SizeofPtr = C.sizeofPtr
73 SizeofShort = C.sizeof_short
74 SizeofInt = C.sizeof_int
75 SizeofLong = C.sizeof_long
76 SizeofLongLong = C.sizeof_longlong
7577 )
7678
7779 // Basic types
108110 type Dirent C.struct_dirent
109111
110112 type Fsid C.fsid_t
113
114 // File system limits
115
116 const (
117 PathMax = C.PATH_MAX
118 )
119
120 // Advice to Fadvise
121
122 const (
123 FADV_NORMAL = C.POSIX_FADV_NORMAL
124 FADV_RANDOM = C.POSIX_FADV_RANDOM
125 FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL
126 FADV_WILLNEED = C.POSIX_FADV_WILLNEED
127 FADV_DONTNEED = C.POSIX_FADV_DONTNEED
128 FADV_NOREUSE = C.POSIX_FADV_NOREUSE
129 )
111130
112131 // Sockets
113132
226245
227246 type Termios C.struct_termios
228247
248 type Winsize C.struct_winsize
249
250 type Ptmget C.struct_ptmget
251
229252 // fchmodat-like syscalls.
230253
231254 const (
233256 AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
234257 )
235258
259 // poll
260
261 type PollFd C.struct_pollfd
262
263 const (
264 POLLERR = C.POLLERR
265 POLLHUP = C.POLLHUP
266 POLLIN = C.POLLIN
267 POLLNVAL = C.POLLNVAL
268 POLLOUT = C.POLLOUT
269 POLLPRI = C.POLLPRI
270 POLLRDBAND = C.POLLRDBAND
271 POLLRDNORM = C.POLLRDNORM
272 POLLWRBAND = C.POLLWRBAND
273 POLLWRNORM = C.POLLWRNORM
274 )
275
236276 // Sysctl
237277
238278 type Sysctlnode C.struct_sysctlnode
279
280 // Uname
281
282 type Utsname C.struct_utsname
283
284 // Clockinfo
285
286 const SizeofClockinfo = C.sizeof_struct_clockinfo
287
288 type Clockinfo C.struct_clockinfo
1616 #define KERNEL
1717 #include <dirent.h>
1818 #include <fcntl.h>
19 #include <poll.h>
1920 #include <signal.h>
2021 #include <termios.h>
2122 #include <stdio.h>
3435 #include <sys/time.h>
3536 #include <sys/uio.h>
3637 #include <sys/un.h>
38 #include <sys/utsname.h>
3739 #include <sys/wait.h>
40 #include <uvm/uvmexp.h>
3841 #include <net/bpf.h>
3942 #include <net/if.h>
4043 #include <net/if_dl.h>
6366 */
6467 import "C"
6568
66 // Machine characteristics; for internal use.
67
68 const (
69 sizeofPtr = C.sizeofPtr
70 sizeofShort = C.sizeof_short
71 sizeofInt = C.sizeof_int
72 sizeofLong = C.sizeof_long
73 sizeofLongLong = C.sizeof_longlong
69 // Machine characteristics
70
71 const (
72 SizeofPtr = C.sizeofPtr
73 SizeofShort = C.sizeof_short
74 SizeofInt = C.sizeof_int
75 SizeofLong = C.sizeof_long
76 SizeofLongLong = C.sizeof_longlong
7477 )
7578
7679 // Basic types
98101
99102 // Files
100103
101 const ( // Directory mode bits
102 S_IFMT = C.S_IFMT
103 S_IFIFO = C.S_IFIFO
104 S_IFCHR = C.S_IFCHR
105 S_IFDIR = C.S_IFDIR
106 S_IFBLK = C.S_IFBLK
107 S_IFREG = C.S_IFREG
108 S_IFLNK = C.S_IFLNK
109 S_IFSOCK = C.S_IFSOCK
110 S_ISUID = C.S_ISUID
111 S_ISGID = C.S_ISGID
112 S_ISVTX = C.S_ISVTX
113 S_IRUSR = C.S_IRUSR
114 S_IWUSR = C.S_IWUSR
115 S_IXUSR = C.S_IXUSR
116 )
117
118104 type Stat_t C.struct_stat
119105
120106 type Statfs_t C.struct_statfs
124110 type Dirent C.struct_dirent
125111
126112 type Fsid C.fsid_t
113
114 // File system limits
115
116 const (
117 PathMax = C.PATH_MAX
118 )
127119
128120 // Sockets
129121
242234
243235 type Termios C.struct_termios
244236
237 type Winsize C.struct_winsize
238
245239 // fchmodat-like syscalls.
246240
247241 const (
248242 AT_FDCWD = C.AT_FDCWD
249243 AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
250244 )
245
246 // poll
247
248 type PollFd C.struct_pollfd
249
250 const (
251 POLLERR = C.POLLERR
252 POLLHUP = C.POLLHUP
253 POLLIN = C.POLLIN
254 POLLNVAL = C.POLLNVAL
255 POLLOUT = C.POLLOUT
256 POLLPRI = C.POLLPRI
257 POLLRDBAND = C.POLLRDBAND
258 POLLRDNORM = C.POLLRDNORM
259 POLLWRBAND = C.POLLWRBAND
260 POLLWRNORM = C.POLLWRNORM
261 )
262
263 // Signal Sets
264
265 type Sigset_t C.sigset_t
266
267 // Uname
268
269 type Utsname C.struct_utsname
270
271 // Uvmexp
272
273 const SizeofUvmexp = C.sizeof_struct_uvmexp
274
275 type Uvmexp C.struct_uvmexp
2323 #include <fcntl.h>
2424 #include <netdb.h>
2525 #include <limits.h>
26 #include <poll.h>
2627 #include <signal.h>
2728 #include <termios.h>
2829 #include <termio.h>
7374 */
7475 import "C"
7576
76 // Machine characteristics; for internal use.
77
78 const (
79 sizeofPtr = C.sizeofPtr
80 sizeofShort = C.sizeof_short
81 sizeofInt = C.sizeof_int
82 sizeofLong = C.sizeof_long
83 sizeofLongLong = C.sizeof_longlong
77 // Machine characteristics
78
79 const (
80 SizeofPtr = C.sizeofPtr
81 SizeofShort = C.sizeof_short
82 SizeofInt = C.sizeof_int
83 SizeofLong = C.sizeof_long
84 SizeofLongLong = C.sizeof_longlong
8485 PathMax = C.PATH_MAX
8586 MaxHostNameLen = C.MAXHOSTNAMELEN
8687 )
115116 type _Gid_t C.gid_t
116117
117118 // Files
118
119 const ( // Directory mode bits
120 S_IFMT = C.S_IFMT
121 S_IFIFO = C.S_IFIFO
122 S_IFCHR = C.S_IFCHR
123 S_IFDIR = C.S_IFDIR
124 S_IFBLK = C.S_IFBLK
125 S_IFREG = C.S_IFREG
126 S_IFLNK = C.S_IFLNK
127 S_IFSOCK = C.S_IFSOCK
128 S_ISUID = C.S_ISUID
129 S_ISGID = C.S_ISGID
130 S_ISVTX = C.S_ISVTX
131 S_IRUSR = C.S_IRUSR
132 S_IWUSR = C.S_IWUSR
133 S_IXUSR = C.S_IXUSR
134 )
135119
136120 type Stat_t C.struct_stat
137121
262246 type Termio C.struct_termio
263247
264248 type Winsize C.struct_winsize
249
250 // poll
251
252 type PollFd C.struct_pollfd
253
254 const (
255 POLLERR = C.POLLERR
256 POLLHUP = C.POLLHUP
257 POLLIN = C.POLLIN
258 POLLNVAL = C.POLLNVAL
259 POLLOUT = C.POLLOUT
260 POLLPRI = C.POLLPRI
261 POLLRDBAND = C.POLLRDBAND
262 POLLRDNORM = C.POLLRDNORM
263 POLLWRBAND = C.POLLWRBAND
264 POLLWRNORM = C.POLLWRNORM
265 )
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build freebsd netbsd
5
6 package unix
7
8 import (
9 "strings"
10 "unsafe"
11 )
12
13 // Derive extattr namespace and attribute name
14
15 func xattrnamespace(fullattr string) (ns int, attr string, err error) {
16 s := strings.IndexByte(fullattr, '.')
17 if s == -1 {
18 return -1, "", ENOATTR
19 }
20
21 namespace := fullattr[0:s]
22 attr = fullattr[s+1:]
23
24 switch namespace {
25 case "user":
26 return EXTATTR_NAMESPACE_USER, attr, nil
27 case "system":
28 return EXTATTR_NAMESPACE_SYSTEM, attr, nil
29 default:
30 return -1, "", ENOATTR
31 }
32 }
33
34 func initxattrdest(dest []byte, idx int) (d unsafe.Pointer) {
35 if len(dest) > idx {
36 return unsafe.Pointer(&dest[idx])
37 } else {
38 return unsafe.Pointer(_zero)
39 }
40 }
41
42 // FreeBSD and NetBSD implement their own syscalls to handle extended attributes
43
44 func Getxattr(file string, attr string, dest []byte) (sz int, err error) {
45 d := initxattrdest(dest, 0)
46 destsize := len(dest)
47
48 nsid, a, err := xattrnamespace(attr)
49 if err != nil {
50 return -1, err
51 }
52
53 return ExtattrGetFile(file, nsid, a, uintptr(d), destsize)
54 }
55
56 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
57 d := initxattrdest(dest, 0)
58 destsize := len(dest)
59
60 nsid, a, err := xattrnamespace(attr)
61 if err != nil {
62 return -1, err
63 }
64
65 return ExtattrGetFd(fd, nsid, a, uintptr(d), destsize)
66 }
67
68 func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {
69 d := initxattrdest(dest, 0)
70 destsize := len(dest)
71
72 nsid, a, err := xattrnamespace(attr)
73 if err != nil {
74 return -1, err
75 }
76
77 return ExtattrGetLink(link, nsid, a, uintptr(d), destsize)
78 }
79
80 // flags are unused on FreeBSD
81
82 func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) {
83 var d unsafe.Pointer
84 if len(data) > 0 {
85 d = unsafe.Pointer(&data[0])
86 }
87 datasiz := len(data)
88
89 nsid, a, err := xattrnamespace(attr)
90 if err != nil {
91 return
92 }
93
94 _, err = ExtattrSetFd(fd, nsid, a, uintptr(d), datasiz)
95 return
96 }
97
98 func Setxattr(file string, attr string, data []byte, flags int) (err error) {
99 var d unsafe.Pointer
100 if len(data) > 0 {
101 d = unsafe.Pointer(&data[0])
102 }
103 datasiz := len(data)
104
105 nsid, a, err := xattrnamespace(attr)
106 if err != nil {
107 return
108 }
109
110 _, err = ExtattrSetFile(file, nsid, a, uintptr(d), datasiz)
111 return
112 }
113
114 func Lsetxattr(link string, attr string, data []byte, flags int) (err error) {
115 var d unsafe.Pointer
116 if len(data) > 0 {
117 d = unsafe.Pointer(&data[0])
118 }
119 datasiz := len(data)
120
121 nsid, a, err := xattrnamespace(attr)
122 if err != nil {
123 return
124 }
125
126 _, err = ExtattrSetLink(link, nsid, a, uintptr(d), datasiz)
127 return
128 }
129
130 func Removexattr(file string, attr string) (err error) {
131 nsid, a, err := xattrnamespace(attr)
132 if err != nil {
133 return
134 }
135
136 err = ExtattrDeleteFile(file, nsid, a)
137 return
138 }
139
140 func Fremovexattr(fd int, attr string) (err error) {
141 nsid, a, err := xattrnamespace(attr)
142 if err != nil {
143 return
144 }
145
146 err = ExtattrDeleteFd(fd, nsid, a)
147 return
148 }
149
150 func Lremovexattr(link string, attr string) (err error) {
151 nsid, a, err := xattrnamespace(attr)
152 if err != nil {
153 return
154 }
155
156 err = ExtattrDeleteLink(link, nsid, a)
157 return
158 }
159
160 func Listxattr(file string, dest []byte) (sz int, err error) {
161 d := initxattrdest(dest, 0)
162 destsiz := len(dest)
163
164 // FreeBSD won't allow you to list xattrs from multiple namespaces
165 s := 0
166 for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
167 stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
168
169 /* Errors accessing system attrs are ignored so that
170 * we can implement the Linux-like behavior of omitting errors that
171 * we don't have read permissions on
172 *
173 * Linux will still error if we ask for user attributes on a file that
174 * we don't have read permissions on, so don't ignore those errors
175 */
176 if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
177 continue
178 } else if e != nil {
179 return s, e
180 }
181
182 s += stmp
183 destsiz -= s
184 if destsiz < 0 {
185 destsiz = 0
186 }
187 d = initxattrdest(dest, s)
188 }
189
190 return s, nil
191 }
192
193 func Flistxattr(fd int, dest []byte) (sz int, err error) {
194 d := initxattrdest(dest, 0)
195 destsiz := len(dest)
196
197 s := 0
198 for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
199 stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
200 if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
201 continue
202 } else if e != nil {
203 return s, e
204 }
205
206 s += stmp
207 destsiz -= s
208 if destsiz < 0 {
209 destsiz = 0
210 }
211 d = initxattrdest(dest, s)
212 }
213
214 return s, nil
215 }
216
217 func Llistxattr(link string, dest []byte) (sz int, err error) {
218 d := initxattrdest(dest, 0)
219 destsiz := len(dest)
220
221 s := 0
222 for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
223 stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
224 if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
225 continue
226 } else if e != nil {
227 return s, e
228 }
229
230 s += stmp
231 destsiz -= s
232 if destsiz < 0 {
233 destsiz = 0
234 }
235 d = initxattrdest(dest, s)
236 }
237
238 return s, nil
239 }
0 // mkerrors.sh -maix32
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build ppc,aix
4
5 // Created by cgo -godefs - DO NOT EDIT
6 // cgo -godefs -- -maix32 _const.go
7
8 package unix
9
10 import "syscall"
11
12 const (
13 AF_APPLETALK = 0x10
14 AF_BYPASS = 0x19
15 AF_CCITT = 0xa
16 AF_CHAOS = 0x5
17 AF_DATAKIT = 0x9
18 AF_DECnet = 0xc
19 AF_DLI = 0xd
20 AF_ECMA = 0x8
21 AF_HYLINK = 0xf
22 AF_IMPLINK = 0x3
23 AF_INET = 0x2
24 AF_INET6 = 0x18
25 AF_INTF = 0x14
26 AF_ISO = 0x7
27 AF_LAT = 0xe
28 AF_LINK = 0x12
29 AF_LOCAL = 0x1
30 AF_MAX = 0x1e
31 AF_NDD = 0x17
32 AF_NETWARE = 0x16
33 AF_NS = 0x6
34 AF_OSI = 0x7
35 AF_PUP = 0x4
36 AF_RIF = 0x15
37 AF_ROUTE = 0x11
38 AF_SNA = 0xb
39 AF_UNIX = 0x1
40 AF_UNSPEC = 0x0
41 ALTWERASE = 0x400000
42 ARPHRD_802_3 = 0x6
43 ARPHRD_802_5 = 0x6
44 ARPHRD_ETHER = 0x1
45 ARPHRD_FDDI = 0x1
46 B0 = 0x0
47 B110 = 0x3
48 B1200 = 0x9
49 B134 = 0x4
50 B150 = 0x5
51 B1800 = 0xa
52 B19200 = 0xe
53 B200 = 0x6
54 B2400 = 0xb
55 B300 = 0x7
56 B38400 = 0xf
57 B4800 = 0xc
58 B50 = 0x1
59 B600 = 0x8
60 B75 = 0x2
61 B9600 = 0xd
62 BRKINT = 0x2
63 BS0 = 0x0
64 BS1 = 0x1000
65 BSDLY = 0x1000
66 CAP_AACCT = 0x6
67 CAP_ARM_APPLICATION = 0x5
68 CAP_BYPASS_RAC_VMM = 0x3
69 CAP_CLEAR = 0x0
70 CAP_CREDENTIALS = 0x7
71 CAP_EFFECTIVE = 0x1
72 CAP_EWLM_AGENT = 0x4
73 CAP_INHERITABLE = 0x2
74 CAP_MAXIMUM = 0x7
75 CAP_NUMA_ATTACH = 0x2
76 CAP_PERMITTED = 0x3
77 CAP_PROPAGATE = 0x1
78 CAP_PROPOGATE = 0x1
79 CAP_SET = 0x1
80 CBAUD = 0xf
81 CFLUSH = 0xf
82 CIBAUD = 0xf0000
83 CLOCAL = 0x800
84 CLOCK_MONOTONIC = 0xa
85 CLOCK_PROCESS_CPUTIME_ID = 0xb
86 CLOCK_REALTIME = 0x9
87 CLOCK_THREAD_CPUTIME_ID = 0xc
88 CR0 = 0x0
89 CR1 = 0x100
90 CR2 = 0x200
91 CR3 = 0x300
92 CRDLY = 0x300
93 CREAD = 0x80
94 CS5 = 0x0
95 CS6 = 0x10
96 CS7 = 0x20
97 CS8 = 0x30
98 CSIOCGIFCONF = -0x3ff796dc
99 CSIZE = 0x30
100 CSMAP_DIR = "/usr/lib/nls/csmap/"
101 CSTART = '\021'
102 CSTOP = '\023'
103 CSTOPB = 0x40
104 CSUSP = 0x1a
105 ECHO = 0x8
106 ECHOCTL = 0x20000
107 ECHOE = 0x10
108 ECHOK = 0x20
109 ECHOKE = 0x80000
110 ECHONL = 0x40
111 ECHOPRT = 0x40000
112 ECH_ICMPID = 0x2
113 ETHERNET_CSMACD = 0x6
114 EVENP = 0x80
115 EXCONTINUE = 0x0
116 EXDLOK = 0x3
117 EXIO = 0x2
118 EXPGIO = 0x0
119 EXRESUME = 0x2
120 EXRETURN = 0x1
121 EXSIG = 0x4
122 EXTA = 0xe
123 EXTB = 0xf
124 EXTRAP = 0x1
125 EYEC_RTENTRYA = 0x257274656e747241
126 EYEC_RTENTRYF = 0x257274656e747246
127 E_ACC = 0x0
128 FD_CLOEXEC = 0x1
129 FD_SETSIZE = 0xfffe
130 FF0 = 0x0
131 FF1 = 0x2000
132 FFDLY = 0x2000
133 FLUSHBAND = 0x40
134 FLUSHLOW = 0x8
135 FLUSHO = 0x100000
136 FLUSHR = 0x1
137 FLUSHRW = 0x3
138 FLUSHW = 0x2
139 F_CLOSEM = 0xa
140 F_DUP2FD = 0xe
141 F_DUPFD = 0x0
142 F_GETFD = 0x1
143 F_GETFL = 0x3
144 F_GETLK = 0x5
145 F_GETLK64 = 0xb
146 F_GETOWN = 0x8
147 F_LOCK = 0x1
148 F_OK = 0x0
149 F_RDLCK = 0x1
150 F_SETFD = 0x2
151 F_SETFL = 0x4
152 F_SETLK = 0x6
153 F_SETLK64 = 0xc
154 F_SETLKW = 0x7
155 F_SETLKW64 = 0xd
156 F_SETOWN = 0x9
157 F_TEST = 0x3
158 F_TLOCK = 0x2
159 F_TSTLK = 0xf
160 F_ULOCK = 0x0
161 F_UNLCK = 0x3
162 F_WRLCK = 0x2
163 HUPCL = 0x400
164 IBSHIFT = 0x10
165 ICANON = 0x2
166 ICMP6_FILTER = 0x26
167 ICMP6_SEC_SEND_DEL = 0x46
168 ICMP6_SEC_SEND_GET = 0x47
169 ICMP6_SEC_SEND_SET = 0x44
170 ICMP6_SEC_SEND_SET_CGA_ADDR = 0x45
171 ICRNL = 0x100
172 IEXTEN = 0x200000
173 IFA_FIRSTALIAS = 0x2000
174 IFA_ROUTE = 0x1
175 IFF_64BIT = 0x4000000
176 IFF_ALLCAST = 0x20000
177 IFF_ALLMULTI = 0x200
178 IFF_BPF = 0x8000000
179 IFF_BRIDGE = 0x40000
180 IFF_BROADCAST = 0x2
181 IFF_CANTCHANGE = 0x80c52
182 IFF_CHECKSUM_OFFLOAD = 0x10000000
183 IFF_D1 = 0x8000
184 IFF_D2 = 0x4000
185 IFF_D3 = 0x2000
186 IFF_D4 = 0x1000
187 IFF_DEBUG = 0x4
188 IFF_DEVHEALTH = 0x4000
189 IFF_DO_HW_LOOPBACK = 0x10000
190 IFF_GROUP_ROUTING = 0x2000000
191 IFF_IFBUFMGT = 0x800000
192 IFF_LINK0 = 0x100000
193 IFF_LINK1 = 0x200000
194 IFF_LINK2 = 0x400000
195 IFF_LOOPBACK = 0x8
196 IFF_MULTICAST = 0x80000
197 IFF_NOARP = 0x80
198 IFF_NOECHO = 0x800
199 IFF_NOTRAILERS = 0x20
200 IFF_OACTIVE = 0x400
201 IFF_POINTOPOINT = 0x10
202 IFF_PROMISC = 0x100
203 IFF_PSEG = 0x40000000
204 IFF_RUNNING = 0x40
205 IFF_SIMPLEX = 0x800
206 IFF_SNAP = 0x8000
207 IFF_TCP_DISABLE_CKSUM = 0x20000000
208 IFF_TCP_NOCKSUM = 0x1000000
209 IFF_UP = 0x1
210 IFF_VIPA = 0x80000000
211 IFNAMSIZ = 0x10
212 IFO_FLUSH = 0x1
213 IFT_1822 = 0x2
214 IFT_AAL5 = 0x31
215 IFT_ARCNET = 0x23
216 IFT_ARCNETPLUS = 0x24
217 IFT_ATM = 0x25
218 IFT_CEPT = 0x13
219 IFT_CLUSTER = 0x3e
220 IFT_DS3 = 0x1e
221 IFT_EON = 0x19
222 IFT_ETHER = 0x6
223 IFT_FCS = 0x3a
224 IFT_FDDI = 0xf
225 IFT_FRELAY = 0x20
226 IFT_FRELAYDCE = 0x2c
227 IFT_GIFTUNNEL = 0x3c
228 IFT_HDH1822 = 0x3
229 IFT_HF = 0x3d
230 IFT_HIPPI = 0x2f
231 IFT_HSSI = 0x2e
232 IFT_HY = 0xe
233 IFT_IB = 0xc7
234 IFT_ISDNBASIC = 0x14
235 IFT_ISDNPRIMARY = 0x15
236 IFT_ISO88022LLC = 0x29
237 IFT_ISO88023 = 0x7
238 IFT_ISO88024 = 0x8
239 IFT_ISO88025 = 0x9
240 IFT_ISO88026 = 0xa
241 IFT_LAPB = 0x10
242 IFT_LOCALTALK = 0x2a
243 IFT_LOOP = 0x18
244 IFT_MIOX25 = 0x26
245 IFT_MODEM = 0x30
246 IFT_NSIP = 0x1b
247 IFT_OTHER = 0x1
248 IFT_P10 = 0xc
249 IFT_P80 = 0xd
250 IFT_PARA = 0x22
251 IFT_PPP = 0x17
252 IFT_PROPMUX = 0x36
253 IFT_PROPVIRTUAL = 0x35
254 IFT_PTPSERIAL = 0x16
255 IFT_RS232 = 0x21
256 IFT_SDLC = 0x11
257 IFT_SIP = 0x1f
258 IFT_SLIP = 0x1c
259 IFT_SMDSDXI = 0x2b
260 IFT_SMDSICIP = 0x34
261 IFT_SN = 0x38
262 IFT_SONET = 0x27
263 IFT_SONETPATH = 0x32
264 IFT_SONETVT = 0x33
265 IFT_SP = 0x39
266 IFT_STARLAN = 0xb
267 IFT_T1 = 0x12
268 IFT_TUNNEL = 0x3b
269 IFT_ULTRA = 0x1d
270 IFT_V35 = 0x2d
271 IFT_VIPA = 0x37
272 IFT_X25 = 0x5
273 IFT_X25DDN = 0x4
274 IFT_X25PLE = 0x28
275 IFT_XETHER = 0x1a
276 IGNBRK = 0x1
277 IGNCR = 0x80
278 IGNPAR = 0x4
279 IMAXBEL = 0x10000
280 INLCR = 0x40
281 INPCK = 0x10
282 IN_CLASSA_HOST = 0xffffff
283 IN_CLASSA_MAX = 0x80
284 IN_CLASSA_NET = 0xff000000
285 IN_CLASSA_NSHIFT = 0x18
286 IN_CLASSB_HOST = 0xffff
287 IN_CLASSB_MAX = 0x10000
288 IN_CLASSB_NET = 0xffff0000
289 IN_CLASSB_NSHIFT = 0x10
290 IN_CLASSC_HOST = 0xff
291 IN_CLASSC_NET = 0xffffff00
292 IN_CLASSC_NSHIFT = 0x8
293 IN_CLASSD_HOST = 0xfffffff
294 IN_CLASSD_NET = 0xf0000000
295 IN_CLASSD_NSHIFT = 0x1c
296 IN_LOOPBACKNET = 0x7f
297 IN_USE = 0x1
298 IPPROTO_AH = 0x33
299 IPPROTO_BIP = 0x53
300 IPPROTO_DSTOPTS = 0x3c
301 IPPROTO_EGP = 0x8
302 IPPROTO_EON = 0x50
303 IPPROTO_ESP = 0x32
304 IPPROTO_FRAGMENT = 0x2c
305 IPPROTO_GGP = 0x3
306 IPPROTO_GIF = 0x8c
307 IPPROTO_GRE = 0x2f
308 IPPROTO_HOPOPTS = 0x0
309 IPPROTO_ICMP = 0x1
310 IPPROTO_ICMPV6 = 0x3a
311 IPPROTO_IDP = 0x16
312 IPPROTO_IGMP = 0x2
313 IPPROTO_IP = 0x0
314 IPPROTO_IPIP = 0x4
315 IPPROTO_IPV6 = 0x29
316 IPPROTO_LOCAL = 0x3f
317 IPPROTO_MAX = 0x100
318 IPPROTO_MH = 0x87
319 IPPROTO_NONE = 0x3b
320 IPPROTO_PUP = 0xc
321 IPPROTO_QOS = 0x2d
322 IPPROTO_RAW = 0xff
323 IPPROTO_ROUTING = 0x2b
324 IPPROTO_RSVP = 0x2e
325 IPPROTO_SCTP = 0x84
326 IPPROTO_TCP = 0x6
327 IPPROTO_TP = 0x1d
328 IPPROTO_UDP = 0x11
329 IPV6_ADDRFORM = 0x16
330 IPV6_ADDR_PREFERENCES = 0x4a
331 IPV6_ADD_MEMBERSHIP = 0xc
332 IPV6_AIXRAWSOCKET = 0x39
333 IPV6_CHECKSUM = 0x27
334 IPV6_DONTFRAG = 0x2d
335 IPV6_DROP_MEMBERSHIP = 0xd
336 IPV6_DSTOPTS = 0x36
337 IPV6_FLOWINFO_FLOWLABEL = 0xffffff
338 IPV6_FLOWINFO_PRIFLOW = 0xfffffff
339 IPV6_FLOWINFO_PRIORITY = 0xf000000
340 IPV6_FLOWINFO_SRFLAG = 0x10000000
341 IPV6_FLOWINFO_VERSION = 0xf0000000
342 IPV6_HOPLIMIT = 0x28
343 IPV6_HOPOPTS = 0x34
344 IPV6_JOIN_GROUP = 0xc
345 IPV6_LEAVE_GROUP = 0xd
346 IPV6_MIPDSTOPTS = 0x36
347 IPV6_MULTICAST_HOPS = 0xa
348 IPV6_MULTICAST_IF = 0x9
349 IPV6_MULTICAST_LOOP = 0xb
350 IPV6_NEXTHOP = 0x30
351 IPV6_NOPROBE = 0x1c
352 IPV6_PATHMTU = 0x2e
353 IPV6_PKTINFO = 0x21
354 IPV6_PKTOPTIONS = 0x24
355 IPV6_PRIORITY_10 = 0xa000000
356 IPV6_PRIORITY_11 = 0xb000000
357 IPV6_PRIORITY_12 = 0xc000000
358 IPV6_PRIORITY_13 = 0xd000000
359 IPV6_PRIORITY_14 = 0xe000000
360 IPV6_PRIORITY_15 = 0xf000000
361 IPV6_PRIORITY_8 = 0x8000000
362 IPV6_PRIORITY_9 = 0x9000000
363 IPV6_PRIORITY_BULK = 0x4000000
364 IPV6_PRIORITY_CONTROL = 0x7000000
365 IPV6_PRIORITY_FILLER = 0x1000000
366 IPV6_PRIORITY_INTERACTIVE = 0x6000000
367 IPV6_PRIORITY_RESERVED1 = 0x3000000
368 IPV6_PRIORITY_RESERVED2 = 0x5000000
369 IPV6_PRIORITY_UNATTENDED = 0x2000000
370 IPV6_PRIORITY_UNCHARACTERIZED = 0x0
371 IPV6_RECVDSTOPTS = 0x38
372 IPV6_RECVHOPLIMIT = 0x29
373 IPV6_RECVHOPOPTS = 0x35
374 IPV6_RECVHOPS = 0x22
375 IPV6_RECVIF = 0x1e
376 IPV6_RECVPATHMTU = 0x2f
377 IPV6_RECVPKTINFO = 0x23
378 IPV6_RECVRTHDR = 0x33
379 IPV6_RECVSRCRT = 0x1d
380 IPV6_RECVTCLASS = 0x2a
381 IPV6_RTHDR = 0x32
382 IPV6_RTHDRDSTOPTS = 0x37
383 IPV6_RTHDR_TYPE_0 = 0x0
384 IPV6_RTHDR_TYPE_2 = 0x2
385 IPV6_SENDIF = 0x1f
386 IPV6_SRFLAG_LOOSE = 0x0
387 IPV6_SRFLAG_STRICT = 0x10000000
388 IPV6_TCLASS = 0x2b
389 IPV6_TOKEN_LENGTH = 0x40
390 IPV6_UNICAST_HOPS = 0x4
391 IPV6_USE_MIN_MTU = 0x2c
392 IPV6_V6ONLY = 0x25
393 IPV6_VERSION = 0x60000000
394 IP_ADDRFORM = 0x16
395 IP_ADD_MEMBERSHIP = 0xc
396 IP_ADD_SOURCE_MEMBERSHIP = 0x3c
397 IP_BLOCK_SOURCE = 0x3a
398 IP_BROADCAST_IF = 0x10
399 IP_CACHE_LINE_SIZE = 0x80
400 IP_DEFAULT_MULTICAST_LOOP = 0x1
401 IP_DEFAULT_MULTICAST_TTL = 0x1
402 IP_DF = 0x4000
403 IP_DHCPMODE = 0x11
404 IP_DONTFRAG = 0x19
405 IP_DROP_MEMBERSHIP = 0xd
406 IP_DROP_SOURCE_MEMBERSHIP = 0x3d
407 IP_FINDPMTU = 0x1a
408 IP_HDRINCL = 0x2
409 IP_INC_MEMBERSHIPS = 0x14
410 IP_INIT_MEMBERSHIP = 0x14
411 IP_MAXPACKET = 0xffff
412 IP_MF = 0x2000
413 IP_MSS = 0x240
414 IP_MULTICAST_HOPS = 0xa
415 IP_MULTICAST_IF = 0x9
416 IP_MULTICAST_LOOP = 0xb
417 IP_MULTICAST_TTL = 0xa
418 IP_OPT = 0x1b
419 IP_OPTIONS = 0x1
420 IP_PMTUAGE = 0x1b
421 IP_RECVDSTADDR = 0x7
422 IP_RECVIF = 0x14
423 IP_RECVIFINFO = 0xf
424 IP_RECVINTERFACE = 0x20
425 IP_RECVMACHDR = 0xe
426 IP_RECVOPTS = 0x5
427 IP_RECVRETOPTS = 0x6
428 IP_RECVTTL = 0x22
429 IP_RETOPTS = 0x8
430 IP_SOURCE_FILTER = 0x48
431 IP_TOS = 0x3
432 IP_TTL = 0x4
433 IP_UNBLOCK_SOURCE = 0x3b
434 IP_UNICAST_HOPS = 0x4
435 ISIG = 0x1
436 ISTRIP = 0x20
437 IUCLC = 0x800
438 IXANY = 0x1000
439 IXOFF = 0x400
440 IXON = 0x200
441 I_FLUSH = 0x20005305
442 LNOFLSH = 0x8000
443 LOCK_EX = 0x2
444 LOCK_NB = 0x4
445 LOCK_SH = 0x1
446 LOCK_UN = 0x8
447 MADV_DONTNEED = 0x4
448 MADV_NORMAL = 0x0
449 MADV_RANDOM = 0x1
450 MADV_SEQUENTIAL = 0x2
451 MADV_SPACEAVAIL = 0x5
452 MADV_WILLNEED = 0x3
453 MAP_ANON = 0x10
454 MAP_ANONYMOUS = 0x10
455 MAP_FILE = 0x0
456 MAP_FIXED = 0x100
457 MAP_PRIVATE = 0x2
458 MAP_SHARED = 0x1
459 MAP_TYPE = 0xf0
460 MAP_VARIABLE = 0x0
461 MCL_CURRENT = 0x100
462 MCL_FUTURE = 0x200
463 MSG_ANY = 0x4
464 MSG_ARGEXT = 0x400
465 MSG_BAND = 0x2
466 MSG_COMPAT = 0x8000
467 MSG_CTRUNC = 0x20
468 MSG_DONTROUTE = 0x4
469 MSG_EOR = 0x8
470 MSG_HIPRI = 0x1
471 MSG_MAXIOVLEN = 0x10
472 MSG_MPEG2 = 0x80
473 MSG_NONBLOCK = 0x4000
474 MSG_NOSIGNAL = 0x100
475 MSG_OOB = 0x1
476 MSG_PEEK = 0x2
477 MSG_TRUNC = 0x10
478 MSG_WAITALL = 0x40
479 MSG_WAITFORONE = 0x200
480 MS_ASYNC = 0x10
481 MS_EINTR = 0x80
482 MS_INVALIDATE = 0x40
483 MS_PER_SEC = 0x3e8
484 MS_SYNC = 0x20
485 NL0 = 0x0
486 NL1 = 0x4000
487 NL2 = 0x8000
488 NL3 = 0xc000
489 NLDLY = 0x4000
490 NOFLSH = 0x80
491 NOFLUSH = 0x80000000
492 OCRNL = 0x8
493 OFDEL = 0x80
494 OFILL = 0x40
495 OLCUC = 0x2
496 ONLCR = 0x4
497 ONLRET = 0x20
498 ONOCR = 0x10
499 ONOEOT = 0x80000
500 OPOST = 0x1
501 OXTABS = 0x40000
502 O_ACCMODE = 0x23
503 O_APPEND = 0x8
504 O_CIO = 0x80
505 O_CIOR = 0x800000000
506 O_CLOEXEC = 0x800000
507 O_CREAT = 0x100
508 O_DEFER = 0x2000
509 O_DELAY = 0x4000
510 O_DIRECT = 0x8000000
511 O_DIRECTORY = 0x80000
512 O_DSYNC = 0x400000
513 O_EFSOFF = 0x400000000
514 O_EFSON = 0x200000000
515 O_EXCL = 0x400
516 O_EXEC = 0x20
517 O_LARGEFILE = 0x4000000
518 O_NDELAY = 0x8000
519 O_NOCACHE = 0x100000
520 O_NOCTTY = 0x800
521 O_NOFOLLOW = 0x1000000
522 O_NONBLOCK = 0x4
523 O_NONE = 0x3
524 O_NSHARE = 0x10000
525 O_RAW = 0x100000000
526 O_RDONLY = 0x0
527 O_RDWR = 0x2
528 O_RSHARE = 0x1000
529 O_RSYNC = 0x200000
530 O_SEARCH = 0x20
531 O_SNAPSHOT = 0x40
532 O_SYNC = 0x10
533 O_TRUNC = 0x200
534 O_TTY_INIT = 0x0
535 O_WRONLY = 0x1
536 PARENB = 0x100
537 PAREXT = 0x100000
538 PARMRK = 0x8
539 PARODD = 0x200
540 PENDIN = 0x20000000
541 PRIO_PGRP = 0x1
542 PRIO_PROCESS = 0x0
543 PRIO_USER = 0x2
544 PROT_EXEC = 0x4
545 PROT_NONE = 0x0
546 PROT_READ = 0x1
547 PROT_WRITE = 0x2
548 PR_64BIT = 0x20
549 PR_ADDR = 0x2
550 PR_ARGEXT = 0x400
551 PR_ATOMIC = 0x1
552 PR_CONNREQUIRED = 0x4
553 PR_FASTHZ = 0x5
554 PR_INP = 0x40
555 PR_INTRLEVEL = 0x8000
556 PR_MLS = 0x100
557 PR_MLS_1_LABEL = 0x200
558 PR_NOEOR = 0x4000
559 PR_RIGHTS = 0x10
560 PR_SLOWHZ = 0x2
561 PR_WANTRCVD = 0x8
562 RLIMIT_AS = 0x6
563 RLIMIT_CORE = 0x4
564 RLIMIT_CPU = 0x0
565 RLIMIT_DATA = 0x2
566 RLIMIT_FSIZE = 0x1
567 RLIMIT_NOFILE = 0x7
568 RLIMIT_NPROC = 0x9
569 RLIMIT_RSS = 0x5
570 RLIMIT_STACK = 0x3
571 RLIM_INFINITY = 0x7fffffff
572 RTAX_AUTHOR = 0x6
573 RTAX_BRD = 0x7
574 RTAX_DST = 0x0
575 RTAX_GATEWAY = 0x1
576 RTAX_GENMASK = 0x3
577 RTAX_IFA = 0x5
578 RTAX_IFP = 0x4
579 RTAX_MAX = 0x8
580 RTAX_NETMASK = 0x2
581 RTA_AUTHOR = 0x40
582 RTA_BRD = 0x80
583 RTA_DOWNSTREAM = 0x100
584 RTA_DST = 0x1
585 RTA_GATEWAY = 0x2
586 RTA_GENMASK = 0x8
587 RTA_IFA = 0x20
588 RTA_IFP = 0x10
589 RTA_NETMASK = 0x4
590 RTC_IA64 = 0x3
591 RTC_POWER = 0x1
592 RTC_POWER_PC = 0x2
593 RTF_ACTIVE_DGD = 0x1000000
594 RTF_BCE = 0x80000
595 RTF_BLACKHOLE = 0x1000
596 RTF_BROADCAST = 0x400000
597 RTF_BUL = 0x2000
598 RTF_CLONE = 0x10000
599 RTF_CLONED = 0x20000
600 RTF_CLONING = 0x100
601 RTF_DONE = 0x40
602 RTF_DYNAMIC = 0x10
603 RTF_FREE_IN_PROG = 0x4000000
604 RTF_GATEWAY = 0x2
605 RTF_HOST = 0x4
606 RTF_LLINFO = 0x400
607 RTF_LOCAL = 0x200000
608 RTF_MASK = 0x80
609 RTF_MODIFIED = 0x20
610 RTF_MULTICAST = 0x800000
611 RTF_PERMANENT6 = 0x8000000
612 RTF_PINNED = 0x100000
613 RTF_PROTO1 = 0x8000
614 RTF_PROTO2 = 0x4000
615 RTF_PROTO3 = 0x40000
616 RTF_REJECT = 0x8
617 RTF_SMALLMTU = 0x40000
618 RTF_STATIC = 0x800
619 RTF_STOPSRCH = 0x2000000
620 RTF_UNREACHABLE = 0x10000000
621 RTF_UP = 0x1
622 RTF_XRESOLVE = 0x200
623 RTM_ADD = 0x1
624 RTM_CHANGE = 0x3
625 RTM_DELADDR = 0xd
626 RTM_DELETE = 0x2
627 RTM_EXPIRE = 0xf
628 RTM_GET = 0x4
629 RTM_GETNEXT = 0x11
630 RTM_IFINFO = 0xe
631 RTM_LOCK = 0x8
632 RTM_LOSING = 0x5
633 RTM_MISS = 0x7
634 RTM_NEWADDR = 0xc
635 RTM_OLDADD = 0x9
636 RTM_OLDDEL = 0xa
637 RTM_REDIRECT = 0x6
638 RTM_RESOLVE = 0xb
639 RTM_RTLOST = 0x10
640 RTM_RTTUNIT = 0xf4240
641 RTM_SAMEADDR = 0x12
642 RTM_SET = 0x13
643 RTM_VERSION = 0x2
644 RTM_VERSION_GR = 0x4
645 RTM_VERSION_GR_COMPAT = 0x3
646 RTM_VERSION_POLICY = 0x5
647 RTM_VERSION_POLICY_EXT = 0x6
648 RTM_VERSION_POLICY_PRFN = 0x7
649 RTV_EXPIRE = 0x4
650 RTV_HOPCOUNT = 0x2
651 RTV_MTU = 0x1
652 RTV_RPIPE = 0x8
653 RTV_RTT = 0x40
654 RTV_RTTVAR = 0x80
655 RTV_SPIPE = 0x10
656 RTV_SSTHRESH = 0x20
657 RUSAGE_CHILDREN = -0x1
658 RUSAGE_SELF = 0x0
659 RUSAGE_THREAD = 0x1
660 SCM_RIGHTS = 0x1
661 SHUT_RD = 0x0
662 SHUT_RDWR = 0x2
663 SHUT_WR = 0x1
664 SIGMAX64 = 0xff
665 SIGQUEUE_MAX = 0x20
666 SIOCADDIFVIPA = 0x20006942
667 SIOCADDMTU = -0x7ffb9690
668 SIOCADDMULTI = -0x7fdf96cf
669 SIOCADDNETID = -0x7fd796a9
670 SIOCADDRT = -0x7fcf8df6
671 SIOCAIFADDR = -0x7fbf96e6
672 SIOCATMARK = 0x40047307
673 SIOCDARP = -0x7fb396e0
674 SIOCDELIFVIPA = 0x20006943
675 SIOCDELMTU = -0x7ffb968f
676 SIOCDELMULTI = -0x7fdf96ce
677 SIOCDELPMTU = -0x7fd78ff6
678 SIOCDELRT = -0x7fcf8df5
679 SIOCDIFADDR = -0x7fd796e7
680 SIOCDNETOPT = -0x3ffe9680
681 SIOCDX25XLATE = -0x7fd7969b
682 SIOCFIFADDR = -0x7fdf966d
683 SIOCGARP = -0x3fb396da
684 SIOCGETMTUS = 0x2000696f
685 SIOCGETSGCNT = -0x3feb8acc
686 SIOCGETVIFCNT = -0x3feb8acd
687 SIOCGHIWAT = 0x40047301
688 SIOCGIFADDR = -0x3fd796df
689 SIOCGIFADDRS = 0x2000698c
690 SIOCGIFBAUDRATE = -0x3fd79693
691 SIOCGIFBRDADDR = -0x3fd796dd
692 SIOCGIFCONF = -0x3ff796bb
693 SIOCGIFCONFGLOB = -0x3ff79670
694 SIOCGIFDSTADDR = -0x3fd796de
695 SIOCGIFFLAGS = -0x3fd796ef
696 SIOCGIFGIDLIST = 0x20006968
697 SIOCGIFHWADDR = -0x3fab966b
698 SIOCGIFMETRIC = -0x3fd796e9
699 SIOCGIFMTU = -0x3fd796aa
700 SIOCGIFNETMASK = -0x3fd796db
701 SIOCGIFOPTIONS = -0x3fd796d6
702 SIOCGISNO = -0x3fd79695
703 SIOCGLOADF = -0x3ffb967e
704 SIOCGLOWAT = 0x40047303
705 SIOCGNETOPT = -0x3ffe96a5
706 SIOCGNETOPT1 = -0x3fdf967f
707 SIOCGNMTUS = 0x2000696e
708 SIOCGPGRP = 0x40047309
709 SIOCGSIZIFCONF = 0x4004696a
710 SIOCGSRCFILTER = -0x3fe796cb
711 SIOCGTUNEPHASE = -0x3ffb9676
712 SIOCGX25XLATE = -0x3fd7969c
713 SIOCIFATTACH = -0x7fdf9699
714 SIOCIFDETACH = -0x7fdf969a
715 SIOCIFGETPKEY = -0x7fdf969b
716 SIOCIF_ATM_DARP = -0x7fdf9683
717 SIOCIF_ATM_DUMPARP = -0x7fdf9685
718 SIOCIF_ATM_GARP = -0x7fdf9682
719 SIOCIF_ATM_IDLE = -0x7fdf9686
720 SIOCIF_ATM_SARP = -0x7fdf9681
721 SIOCIF_ATM_SNMPARP = -0x7fdf9687
722 SIOCIF_ATM_SVC = -0x7fdf9684
723 SIOCIF_ATM_UBR = -0x7fdf9688
724 SIOCIF_DEVHEALTH = -0x7ffb966c
725 SIOCIF_IB_ARP_INCOMP = -0x7fdf9677
726 SIOCIF_IB_ARP_TIMER = -0x7fdf9678
727 SIOCIF_IB_CLEAR_PINFO = -0x3fdf966f
728 SIOCIF_IB_DEL_ARP = -0x7fdf967f
729 SIOCIF_IB_DEL_PINFO = -0x3fdf9670
730 SIOCIF_IB_DUMP_ARP = -0x7fdf9680
731 SIOCIF_IB_GET_ARP = -0x7fdf967e
732 SIOCIF_IB_GET_INFO = -0x3f879675
733 SIOCIF_IB_GET_STATS = -0x3f879672
734 SIOCIF_IB_NOTIFY_ADDR_REM = -0x3f87966a
735 SIOCIF_IB_RESET_STATS = -0x3f879671
736 SIOCIF_IB_RESIZE_CQ = -0x7fdf9679
737 SIOCIF_IB_SET_ARP = -0x7fdf967d
738 SIOCIF_IB_SET_PKEY = -0x7fdf967c
739 SIOCIF_IB_SET_PORT = -0x7fdf967b
740 SIOCIF_IB_SET_QKEY = -0x7fdf9676
741 SIOCIF_IB_SET_QSIZE = -0x7fdf967a
742 SIOCLISTIFVIPA = 0x20006944
743 SIOCSARP = -0x7fb396e2
744 SIOCSHIWAT = 0x80047300
745 SIOCSIFADDR = -0x7fd796f4
746 SIOCSIFADDRORI = -0x7fdb9673
747 SIOCSIFBRDADDR = -0x7fd796ed
748 SIOCSIFDSTADDR = -0x7fd796f2
749 SIOCSIFFLAGS = -0x7fd796f0
750 SIOCSIFGIDLIST = 0x20006969
751 SIOCSIFMETRIC = -0x7fd796e8
752 SIOCSIFMTU = -0x7fd796a8
753 SIOCSIFNETDUMP = -0x7fd796e4
754 SIOCSIFNETMASK = -0x7fd796ea
755 SIOCSIFOPTIONS = -0x7fd796d7
756 SIOCSIFSUBCHAN = -0x7fd796e5
757 SIOCSISNO = -0x7fd79694
758 SIOCSLOADF = -0x3ffb967d
759 SIOCSLOWAT = 0x80047302
760 SIOCSNETOPT = -0x7ffe96a6
761 SIOCSPGRP = 0x80047308
762 SIOCSX25XLATE = -0x7fd7969d
763 SOCK_CONN_DGRAM = 0x6
764 SOCK_DGRAM = 0x2
765 SOCK_RAW = 0x3
766 SOCK_RDM = 0x4
767 SOCK_SEQPACKET = 0x5
768 SOCK_STREAM = 0x1
769 SOL_SOCKET = 0xffff
770 SOMAXCONN = 0x400
771 SO_ACCEPTCONN = 0x2
772 SO_AUDIT = 0x8000
773 SO_BROADCAST = 0x20
774 SO_CKSUMRECV = 0x800
775 SO_DEBUG = 0x1
776 SO_DONTROUTE = 0x10
777 SO_ERROR = 0x1007
778 SO_KEEPALIVE = 0x8
779 SO_KERNACCEPT = 0x2000
780 SO_LINGER = 0x80
781 SO_NOMULTIPATH = 0x4000
782 SO_NOREUSEADDR = 0x1000
783 SO_OOBINLINE = 0x100
784 SO_PEERID = 0x1009
785 SO_RCVBUF = 0x1002
786 SO_RCVLOWAT = 0x1004
787 SO_RCVTIMEO = 0x1006
788 SO_REUSEADDR = 0x4
789 SO_REUSEPORT = 0x200
790 SO_SNDBUF = 0x1001
791 SO_SNDLOWAT = 0x1003
792 SO_SNDTIMEO = 0x1005
793 SO_TIMESTAMPNS = 0x100a
794 SO_TYPE = 0x1008
795 SO_USELOOPBACK = 0x40
796 SO_USE_IFBUFS = 0x400
797 S_BANDURG = 0x400
798 S_EMODFMT = 0x3c000000
799 S_ENFMT = 0x400
800 S_ERROR = 0x100
801 S_HANGUP = 0x200
802 S_HIPRI = 0x2
803 S_ICRYPTO = 0x80000
804 S_IEXEC = 0x40
805 S_IFBLK = 0x6000
806 S_IFCHR = 0x2000
807 S_IFDIR = 0x4000
808 S_IFIFO = 0x1000
809 S_IFJOURNAL = 0x10000
810 S_IFLNK = 0xa000
811 S_IFMPX = 0x2200
812 S_IFMT = 0xf000
813 S_IFPDIR = 0x4000000
814 S_IFPSDIR = 0x8000000
815 S_IFPSSDIR = 0xc000000
816 S_IFREG = 0x8000
817 S_IFSOCK = 0xc000
818 S_IFSYSEA = 0x30000000
819 S_INPUT = 0x1
820 S_IREAD = 0x100
821 S_IRGRP = 0x20
822 S_IROTH = 0x4
823 S_IRUSR = 0x100
824 S_IRWXG = 0x38
825 S_IRWXO = 0x7
826 S_IRWXU = 0x1c0
827 S_ISGID = 0x400
828 S_ISUID = 0x800
829 S_ISVTX = 0x200
830 S_ITCB = 0x1000000
831 S_ITP = 0x800000
832 S_IWGRP = 0x10
833 S_IWOTH = 0x2
834 S_IWRITE = 0x80
835 S_IWUSR = 0x80
836 S_IXACL = 0x2000000
837 S_IXATTR = 0x40000
838 S_IXGRP = 0x8
839 S_IXINTERFACE = 0x100000
840 S_IXMOD = 0x40000000
841 S_IXOTH = 0x1
842 S_IXUSR = 0x40
843 S_MSG = 0x8
844 S_OUTPUT = 0x4
845 S_RDBAND = 0x20
846 S_RDNORM = 0x10
847 S_RESERVED1 = 0x20000
848 S_RESERVED2 = 0x200000
849 S_RESERVED3 = 0x400000
850 S_RESERVED4 = 0x80000000
851 S_RESFMT1 = 0x10000000
852 S_RESFMT10 = 0x34000000
853 S_RESFMT11 = 0x38000000
854 S_RESFMT12 = 0x3c000000
855 S_RESFMT2 = 0x14000000
856 S_RESFMT3 = 0x18000000
857 S_RESFMT4 = 0x1c000000
858 S_RESFMT5 = 0x20000000
859 S_RESFMT6 = 0x24000000
860 S_RESFMT7 = 0x28000000
861 S_RESFMT8 = 0x2c000000
862 S_WRBAND = 0x80
863 S_WRNORM = 0x40
864 TAB0 = 0x0
865 TAB1 = 0x400
866 TAB2 = 0x800
867 TAB3 = 0xc00
868 TABDLY = 0xc00
869 TCFLSH = 0x540c
870 TCGETA = 0x5405
871 TCGETS = 0x5401
872 TCIFLUSH = 0x0
873 TCIOFF = 0x2
874 TCIOFLUSH = 0x2
875 TCION = 0x3
876 TCOFLUSH = 0x1
877 TCOOFF = 0x0
878 TCOON = 0x1
879 TCP_24DAYS_WORTH_OF_SLOWTICKS = 0x3f4800
880 TCP_ACLADD = 0x23
881 TCP_ACLBIND = 0x26
882 TCP_ACLCLEAR = 0x22
883 TCP_ACLDEL = 0x24
884 TCP_ACLDENY = 0x8
885 TCP_ACLFLUSH = 0x21
886 TCP_ACLGID = 0x1
887 TCP_ACLLS = 0x25
888 TCP_ACLSUBNET = 0x4
889 TCP_ACLUID = 0x2
890 TCP_CWND_DF = 0x16
891 TCP_CWND_IF = 0x15
892 TCP_DELAY_ACK_FIN = 0x2
893 TCP_DELAY_ACK_SYN = 0x1
894 TCP_FASTNAME = 0x101080a
895 TCP_KEEPCNT = 0x13
896 TCP_KEEPIDLE = 0x11
897 TCP_KEEPINTVL = 0x12
898 TCP_LSPRIV = 0x29
899 TCP_LUID = 0x20
900 TCP_MAXBURST = 0x8
901 TCP_MAXDF = 0x64
902 TCP_MAXIF = 0x64
903 TCP_MAXSEG = 0x2
904 TCP_MAXWIN = 0xffff
905 TCP_MAXWINDOWSCALE = 0xe
906 TCP_MAX_SACK = 0x4
907 TCP_MSS = 0x5b4
908 TCP_NODELAY = 0x1
909 TCP_NODELAYACK = 0x14
910 TCP_NOREDUCE_CWND_EXIT_FRXMT = 0x19
911 TCP_NOREDUCE_CWND_IN_FRXMT = 0x18
912 TCP_NOTENTER_SSTART = 0x17
913 TCP_OPT = 0x19
914 TCP_RFC1323 = 0x4
915 TCP_SETPRIV = 0x27
916 TCP_STDURG = 0x10
917 TCP_TIMESTAMP_OPTLEN = 0xc
918 TCP_UNSETPRIV = 0x28
919 TCSAFLUSH = 0x2
920 TCSBRK = 0x5409
921 TCSETA = 0x5406
922 TCSETAF = 0x5408
923 TCSETAW = 0x5407
924 TCSETS = 0x5402
925 TCSETSF = 0x5404
926 TCSETSW = 0x5403
927 TCXONC = 0x540b
928 TIOC = 0x5400
929 TIOCCBRK = 0x2000747a
930 TIOCCDTR = 0x20007478
931 TIOCCONS = 0x80047462
932 TIOCEXCL = 0x2000740d
933 TIOCFLUSH = 0x80047410
934 TIOCGETC = 0x40067412
935 TIOCGETD = 0x40047400
936 TIOCGETP = 0x40067408
937 TIOCGLTC = 0x40067474
938 TIOCGPGRP = 0x40047477
939 TIOCGSID = 0x40047448
940 TIOCGSIZE = 0x40087468
941 TIOCGWINSZ = 0x40087468
942 TIOCHPCL = 0x20007402
943 TIOCLBIC = 0x8004747e
944 TIOCLBIS = 0x8004747f
945 TIOCLGET = 0x4004747c
946 TIOCLSET = 0x8004747d
947 TIOCMBIC = 0x8004746b
948 TIOCMBIS = 0x8004746c
949 TIOCMGET = 0x4004746a
950 TIOCMIWAIT = 0x80047464
951 TIOCMODG = 0x40047403
952 TIOCMODS = 0x80047404
953 TIOCMSET = 0x8004746d
954 TIOCM_CAR = 0x40
955 TIOCM_CD = 0x40
956 TIOCM_CTS = 0x20
957 TIOCM_DSR = 0x100
958 TIOCM_DTR = 0x2
959 TIOCM_LE = 0x1
960 TIOCM_RI = 0x80
961 TIOCM_RNG = 0x80
962 TIOCM_RTS = 0x4
963 TIOCM_SR = 0x10
964 TIOCM_ST = 0x8
965 TIOCNOTTY = 0x20007471
966 TIOCNXCL = 0x2000740e
967 TIOCOUTQ = 0x40047473
968 TIOCPKT = 0x80047470
969 TIOCPKT_DATA = 0x0
970 TIOCPKT_DOSTOP = 0x20
971 TIOCPKT_FLUSHREAD = 0x1
972 TIOCPKT_FLUSHWRITE = 0x2
973 TIOCPKT_NOSTOP = 0x10
974 TIOCPKT_START = 0x8
975 TIOCPKT_STOP = 0x4
976 TIOCREMOTE = 0x80047469
977 TIOCSBRK = 0x2000747b
978 TIOCSDTR = 0x20007479
979 TIOCSETC = 0x80067411
980 TIOCSETD = 0x80047401
981 TIOCSETN = 0x8006740a
982 TIOCSETP = 0x80067409
983 TIOCSLTC = 0x80067475
984 TIOCSPGRP = 0x80047476
985 TIOCSSIZE = 0x80087467
986 TIOCSTART = 0x2000746e
987 TIOCSTI = 0x80017472
988 TIOCSTOP = 0x2000746f
989 TIOCSWINSZ = 0x80087467
990 TIOCUCNTL = 0x80047466
991 TOSTOP = 0x10000
992 UTIME_NOW = -0x2
993 UTIME_OMIT = -0x3
994 VDISCRD = 0xc
995 VDSUSP = 0xa
996 VEOF = 0x4
997 VEOL = 0x5
998 VEOL2 = 0x6
999 VERASE = 0x2
1000 VINTR = 0x0
1001 VKILL = 0x3
1002 VLNEXT = 0xe
1003 VMIN = 0x4
1004 VQUIT = 0x1
1005 VREPRINT = 0xb
1006 VSTART = 0x7
1007 VSTOP = 0x8
1008 VSTRT = 0x7
1009 VSUSP = 0x9
1010 VT0 = 0x0
1011 VT1 = 0x8000
1012 VTDELAY = 0x2000
1013 VTDLY = 0x8000
1014 VTIME = 0x5
1015 VWERSE = 0xd
1016 WPARSTART = 0x1
1017 WPARSTOP = 0x2
1018 WPARTTYNAME = "Global"
1019 XCASE = 0x4
1020 XTABS = 0xc00
1021 _FDATAFLUSH = 0x2000000000
1022 )
1023
1024 // Errors
1025 const (
1026 E2BIG = syscall.Errno(0x7)
1027 EACCES = syscall.Errno(0xd)
1028 EADDRINUSE = syscall.Errno(0x43)
1029 EADDRNOTAVAIL = syscall.Errno(0x44)
1030 EAFNOSUPPORT = syscall.Errno(0x42)
1031 EAGAIN = syscall.Errno(0xb)
1032 EALREADY = syscall.Errno(0x38)
1033 EBADF = syscall.Errno(0x9)
1034 EBADMSG = syscall.Errno(0x78)
1035 EBUSY = syscall.Errno(0x10)
1036 ECANCELED = syscall.Errno(0x75)
1037 ECHILD = syscall.Errno(0xa)
1038 ECHRNG = syscall.Errno(0x25)
1039 ECLONEME = syscall.Errno(0x52)
1040 ECONNABORTED = syscall.Errno(0x48)
1041 ECONNREFUSED = syscall.Errno(0x4f)
1042 ECONNRESET = syscall.Errno(0x49)
1043 ECORRUPT = syscall.Errno(0x59)
1044 EDEADLK = syscall.Errno(0x2d)
1045 EDESTADDREQ = syscall.Errno(0x3a)
1046 EDESTADDRREQ = syscall.Errno(0x3a)
1047 EDIST = syscall.Errno(0x35)
1048 EDOM = syscall.Errno(0x21)
1049 EDQUOT = syscall.Errno(0x58)
1050 EEXIST = syscall.Errno(0x11)
1051 EFAULT = syscall.Errno(0xe)
1052 EFBIG = syscall.Errno(0x1b)
1053 EFORMAT = syscall.Errno(0x30)
1054 EHOSTDOWN = syscall.Errno(0x50)
1055 EHOSTUNREACH = syscall.Errno(0x51)
1056 EIDRM = syscall.Errno(0x24)
1057 EILSEQ = syscall.Errno(0x74)
1058 EINPROGRESS = syscall.Errno(0x37)
1059 EINTR = syscall.Errno(0x4)
1060 EINVAL = syscall.Errno(0x16)
1061 EIO = syscall.Errno(0x5)
1062 EISCONN = syscall.Errno(0x4b)
1063 EISDIR = syscall.Errno(0x15)
1064 EL2HLT = syscall.Errno(0x2c)
1065 EL2NSYNC = syscall.Errno(0x26)
1066 EL3HLT = syscall.Errno(0x27)
1067 EL3RST = syscall.Errno(0x28)
1068 ELNRNG = syscall.Errno(0x29)
1069 ELOOP = syscall.Errno(0x55)
1070 EMEDIA = syscall.Errno(0x6e)
1071 EMFILE = syscall.Errno(0x18)
1072 EMLINK = syscall.Errno(0x1f)
1073 EMSGSIZE = syscall.Errno(0x3b)
1074 EMULTIHOP = syscall.Errno(0x7d)
1075 ENAMETOOLONG = syscall.Errno(0x56)
1076 ENETDOWN = syscall.Errno(0x45)
1077 ENETRESET = syscall.Errno(0x47)
1078 ENETUNREACH = syscall.Errno(0x46)
1079 ENFILE = syscall.Errno(0x17)
1080 ENOATTR = syscall.Errno(0x70)
1081 ENOBUFS = syscall.Errno(0x4a)
1082 ENOCONNECT = syscall.Errno(0x32)
1083 ENOCSI = syscall.Errno(0x2b)
1084 ENODATA = syscall.Errno(0x7a)
1085 ENODEV = syscall.Errno(0x13)
1086 ENOENT = syscall.Errno(0x2)
1087 ENOEXEC = syscall.Errno(0x8)
1088 ENOLCK = syscall.Errno(0x31)
1089 ENOLINK = syscall.Errno(0x7e)
1090 ENOMEM = syscall.Errno(0xc)
1091 ENOMSG = syscall.Errno(0x23)
1092 ENOPROTOOPT = syscall.Errno(0x3d)
1093 ENOSPC = syscall.Errno(0x1c)
1094 ENOSR = syscall.Errno(0x76)
1095 ENOSTR = syscall.Errno(0x7b)
1096 ENOSYS = syscall.Errno(0x6d)
1097 ENOTBLK = syscall.Errno(0xf)
1098 ENOTCONN = syscall.Errno(0x4c)
1099 ENOTDIR = syscall.Errno(0x14)
1100 ENOTEMPTY = syscall.Errno(0x11)
1101 ENOTREADY = syscall.Errno(0x2e)
1102 ENOTRECOVERABLE = syscall.Errno(0x5e)
1103 ENOTRUST = syscall.Errno(0x72)
1104 ENOTSOCK = syscall.Errno(0x39)
1105 ENOTSUP = syscall.Errno(0x7c)
1106 ENOTTY = syscall.Errno(0x19)
1107 ENXIO = syscall.Errno(0x6)
1108 EOPNOTSUPP = syscall.Errno(0x40)
1109 EOVERFLOW = syscall.Errno(0x7f)
1110 EOWNERDEAD = syscall.Errno(0x5f)
1111 EPERM = syscall.Errno(0x1)
1112 EPFNOSUPPORT = syscall.Errno(0x41)
1113 EPIPE = syscall.Errno(0x20)
1114 EPROCLIM = syscall.Errno(0x53)
1115 EPROTO = syscall.Errno(0x79)
1116 EPROTONOSUPPORT = syscall.Errno(0x3e)
1117 EPROTOTYPE = syscall.Errno(0x3c)
1118 ERANGE = syscall.Errno(0x22)
1119 EREMOTE = syscall.Errno(0x5d)
1120 ERESTART = syscall.Errno(0x52)
1121 EROFS = syscall.Errno(0x1e)
1122 ESAD = syscall.Errno(0x71)
1123 ESHUTDOWN = syscall.Errno(0x4d)
1124 ESOCKTNOSUPPORT = syscall.Errno(0x3f)
1125 ESOFT = syscall.Errno(0x6f)
1126 ESPIPE = syscall.Errno(0x1d)
1127 ESRCH = syscall.Errno(0x3)
1128 ESTALE = syscall.Errno(0x34)
1129 ESYSERROR = syscall.Errno(0x5a)
1130 ETIME = syscall.Errno(0x77)
1131 ETIMEDOUT = syscall.Errno(0x4e)
1132 ETOOMANYREFS = syscall.Errno(0x73)
1133 ETXTBSY = syscall.Errno(0x1a)
1134 EUNATCH = syscall.Errno(0x2a)
1135 EUSERS = syscall.Errno(0x54)
1136 EWOULDBLOCK = syscall.Errno(0xb)
1137 EWRPROTECT = syscall.Errno(0x2f)
1138 EXDEV = syscall.Errno(0x12)
1139 )
1140
1141 // Signals
1142 const (
1143 SIGABRT = syscall.Signal(0x6)
1144 SIGAIO = syscall.Signal(0x17)
1145 SIGALRM = syscall.Signal(0xe)
1146 SIGALRM1 = syscall.Signal(0x26)
1147 SIGBUS = syscall.Signal(0xa)
1148 SIGCAPI = syscall.Signal(0x31)
1149 SIGCHLD = syscall.Signal(0x14)
1150 SIGCLD = syscall.Signal(0x14)
1151 SIGCONT = syscall.Signal(0x13)
1152 SIGCPUFAIL = syscall.Signal(0x3b)
1153 SIGDANGER = syscall.Signal(0x21)
1154 SIGEMT = syscall.Signal(0x7)
1155 SIGFPE = syscall.Signal(0x8)
1156 SIGGRANT = syscall.Signal(0x3c)
1157 SIGHUP = syscall.Signal(0x1)
1158 SIGILL = syscall.Signal(0x4)
1159 SIGINT = syscall.Signal(0x2)
1160 SIGIO = syscall.Signal(0x17)
1161 SIGIOINT = syscall.Signal(0x10)
1162 SIGIOT = syscall.Signal(0x6)
1163 SIGKAP = syscall.Signal(0x3c)
1164 SIGKILL = syscall.Signal(0x9)
1165 SIGLOST = syscall.Signal(0x6)
1166 SIGMAX = syscall.Signal(0x3f)
1167 SIGMAX32 = syscall.Signal(0x3f)
1168 SIGMIGRATE = syscall.Signal(0x23)
1169 SIGMSG = syscall.Signal(0x1b)
1170 SIGPIPE = syscall.Signal(0xd)
1171 SIGPOLL = syscall.Signal(0x17)
1172 SIGPRE = syscall.Signal(0x24)
1173 SIGPROF = syscall.Signal(0x20)
1174 SIGPTY = syscall.Signal(0x17)
1175 SIGPWR = syscall.Signal(0x1d)
1176 SIGQUIT = syscall.Signal(0x3)
1177 SIGRECONFIG = syscall.Signal(0x3a)
1178 SIGRETRACT = syscall.Signal(0x3d)
1179 SIGSAK = syscall.Signal(0x3f)
1180 SIGSEGV = syscall.Signal(0xb)
1181 SIGSOUND = syscall.Signal(0x3e)
1182 SIGSTOP = syscall.Signal(0x11)
1183 SIGSYS = syscall.Signal(0xc)
1184 SIGSYSERROR = syscall.Signal(0x30)
1185 SIGTALRM = syscall.Signal(0x26)
1186 SIGTERM = syscall.Signal(0xf)
1187 SIGTRAP = syscall.Signal(0x5)
1188 SIGTSTP = syscall.Signal(0x12)
1189 SIGTTIN = syscall.Signal(0x15)
1190 SIGTTOU = syscall.Signal(0x16)
1191 SIGURG = syscall.Signal(0x10)
1192 SIGUSR1 = syscall.Signal(0x1e)
1193 SIGUSR2 = syscall.Signal(0x1f)
1194 SIGVIRT = syscall.Signal(0x25)
1195 SIGVTALRM = syscall.Signal(0x22)
1196 SIGWAITING = syscall.Signal(0x27)
1197 SIGWINCH = syscall.Signal(0x1c)
1198 SIGXCPU = syscall.Signal(0x18)
1199 SIGXFSZ = syscall.Signal(0x19)
1200 )
1201
1202 // Error table
1203 var errorList = [...]struct {
1204 num syscall.Errno
1205 name string
1206 desc string
1207 }{
1208 {1, "EPERM", "not owner"},
1209 {2, "ENOENT", "no such file or directory"},
1210 {3, "ESRCH", "no such process"},
1211 {4, "EINTR", "interrupted system call"},
1212 {5, "EIO", "I/O error"},
1213 {6, "ENXIO", "no such device or address"},
1214 {7, "E2BIG", "arg list too long"},
1215 {8, "ENOEXEC", "exec format error"},
1216 {9, "EBADF", "bad file number"},
1217 {10, "ECHILD", "no child processes"},
1218 {11, "EWOULDBLOCK", "resource temporarily unavailable"},
1219 {12, "ENOMEM", "not enough space"},
1220 {13, "EACCES", "permission denied"},
1221 {14, "EFAULT", "bad address"},
1222 {15, "ENOTBLK", "block device required"},
1223 {16, "EBUSY", "device busy"},
1224 {17, "ENOTEMPTY", "file exists"},
1225 {18, "EXDEV", "cross-device link"},
1226 {19, "ENODEV", "no such device"},
1227 {20, "ENOTDIR", "not a directory"},
1228 {21, "EISDIR", "is a directory"},
1229 {22, "EINVAL", "invalid argument"},
1230 {23, "ENFILE", "file table overflow"},
1231 {24, "EMFILE", "too many open files"},
1232 {25, "ENOTTY", "not a typewriter"},
1233 {26, "ETXTBSY", "text file busy"},
1234 {27, "EFBIG", "file too large"},
1235 {28, "ENOSPC", "no space left on device"},
1236 {29, "ESPIPE", "illegal seek"},
1237 {30, "EROFS", "read-only file system"},
1238 {31, "EMLINK", "too many links"},
1239 {32, "EPIPE", "broken pipe"},
1240 {33, "EDOM", "argument out of domain"},
1241 {34, "ERANGE", "result too large"},
1242 {35, "ENOMSG", "no message of desired type"},
1243 {36, "EIDRM", "identifier removed"},
1244 {37, "ECHRNG", "channel number out of range"},
1245 {38, "EL2NSYNC", "level 2 not synchronized"},
1246 {39, "EL3HLT", "level 3 halted"},
1247 {40, "EL3RST", "level 3 reset"},
1248 {41, "ELNRNG", "link number out of range"},
1249 {42, "EUNATCH", "protocol driver not attached"},
1250 {43, "ENOCSI", "no CSI structure available"},
1251 {44, "EL2HLT", "level 2 halted"},
1252 {45, "EDEADLK", "deadlock condition if locked"},
1253 {46, "ENOTREADY", "device not ready"},
1254 {47, "EWRPROTECT", "write-protected media"},
1255 {48, "EFORMAT", "unformatted or incompatible media"},
1256 {49, "ENOLCK", "no locks available"},
1257 {50, "ENOCONNECT", "cannot Establish Connection"},
1258 {52, "ESTALE", "missing file or filesystem"},
1259 {53, "EDIST", "requests blocked by Administrator"},
1260 {55, "EINPROGRESS", "operation now in progress"},
1261 {56, "EALREADY", "operation already in progress"},
1262 {57, "ENOTSOCK", "socket operation on non-socket"},
1263 {58, "EDESTADDREQ", "destination address required"},
1264 {59, "EMSGSIZE", "message too long"},
1265 {60, "EPROTOTYPE", "protocol wrong type for socket"},
1266 {61, "ENOPROTOOPT", "protocol not available"},
1267 {62, "EPROTONOSUPPORT", "protocol not supported"},
1268 {63, "ESOCKTNOSUPPORT", "socket type not supported"},
1269 {64, "EOPNOTSUPP", "operation not supported on socket"},
1270 {65, "EPFNOSUPPORT", "protocol family not supported"},
1271 {66, "EAFNOSUPPORT", "addr family not supported by protocol"},
1272 {67, "EADDRINUSE", "address already in use"},
1273 {68, "EADDRNOTAVAIL", "can't assign requested address"},
1274 {69, "ENETDOWN", "network is down"},
1275 {70, "ENETUNREACH", "network is unreachable"},
1276 {71, "ENETRESET", "network dropped connection on reset"},
1277 {72, "ECONNABORTED", "software caused connection abort"},
1278 {73, "ECONNRESET", "connection reset by peer"},
1279 {74, "ENOBUFS", "no buffer space available"},
1280 {75, "EISCONN", "socket is already connected"},
1281 {76, "ENOTCONN", "socket is not connected"},
1282 {77, "ESHUTDOWN", "can't send after socket shutdown"},
1283 {78, "ETIMEDOUT", "connection timed out"},
1284 {79, "ECONNREFUSED", "connection refused"},
1285 {80, "EHOSTDOWN", "host is down"},
1286 {81, "EHOSTUNREACH", "no route to host"},
1287 {82, "ERESTART", "restart the system call"},
1288 {83, "EPROCLIM", "too many processes"},
1289 {84, "EUSERS", "too many users"},
1290 {85, "ELOOP", "too many levels of symbolic links"},
1291 {86, "ENAMETOOLONG", "file name too long"},
1292 {88, "EDQUOT", "disk quota exceeded"},
1293 {89, "ECORRUPT", "invalid file system control data detected"},
1294 {90, "ESYSERROR", "for future use "},
1295 {93, "EREMOTE", "item is not local to host"},
1296 {94, "ENOTRECOVERABLE", "state not recoverable "},
1297 {95, "EOWNERDEAD", "previous owner died "},
1298 {109, "ENOSYS", "function not implemented"},
1299 {110, "EMEDIA", "media surface error"},
1300 {111, "ESOFT", "I/O completed, but needs relocation"},
1301 {112, "ENOATTR", "no attribute found"},
1302 {113, "ESAD", "security Authentication Denied"},
1303 {114, "ENOTRUST", "not a Trusted Program"},
1304 {115, "ETOOMANYREFS", "too many references: can't splice"},
1305 {116, "EILSEQ", "invalid wide character"},
1306 {117, "ECANCELED", "asynchronous I/O cancelled"},
1307 {118, "ENOSR", "out of STREAMS resources"},
1308 {119, "ETIME", "system call timed out"},
1309 {120, "EBADMSG", "next message has wrong type"},
1310 {121, "EPROTO", "error in protocol"},
1311 {122, "ENODATA", "no message on stream head read q"},
1312 {123, "ENOSTR", "fd not associated with a stream"},
1313 {124, "ENOTSUP", "unsupported attribute value"},
1314 {125, "EMULTIHOP", "multihop is not allowed"},
1315 {126, "ENOLINK", "the server link has been severed"},
1316 {127, "EOVERFLOW", "value too large to be stored in data type"},
1317 }
1318
1319 // Signal table
1320 var signalList = [...]struct {
1321 num syscall.Signal
1322 name string
1323 desc string
1324 }{
1325 {1, "SIGHUP", "hangup"},
1326 {2, "SIGINT", "interrupt"},
1327 {3, "SIGQUIT", "quit"},
1328 {4, "SIGILL", "illegal instruction"},
1329 {5, "SIGTRAP", "trace/BPT trap"},
1330 {6, "SIGIOT", "IOT/Abort trap"},
1331 {7, "SIGEMT", "EMT trap"},
1332 {8, "SIGFPE", "floating point exception"},
1333 {9, "SIGKILL", "killed"},
1334 {10, "SIGBUS", "bus error"},
1335 {11, "SIGSEGV", "segmentation fault"},
1336 {12, "SIGSYS", "bad system call"},
1337 {13, "SIGPIPE", "broken pipe"},
1338 {14, "SIGALRM", "alarm clock"},
1339 {15, "SIGTERM", "terminated"},
1340 {16, "SIGURG", "urgent I/O condition"},
1341 {17, "SIGSTOP", "stopped (signal)"},
1342 {18, "SIGTSTP", "stopped"},
1343 {19, "SIGCONT", "continued"},
1344 {20, "SIGCHLD", "child exited"},
1345 {21, "SIGTTIN", "stopped (tty input)"},
1346 {22, "SIGTTOU", "stopped (tty output)"},
1347 {23, "SIGIO", "I/O possible/complete"},
1348 {24, "SIGXCPU", "cputime limit exceeded"},
1349 {25, "SIGXFSZ", "filesize limit exceeded"},
1350 {27, "SIGMSG", "input device data"},
1351 {28, "SIGWINCH", "window size changes"},
1352 {29, "SIGPWR", "power-failure"},
1353 {30, "SIGUSR1", "user defined signal 1"},
1354 {31, "SIGUSR2", "user defined signal 2"},
1355 {32, "SIGPROF", "profiling timer expired"},
1356 {33, "SIGDANGER", "paging space low"},
1357 {34, "SIGVTALRM", "virtual timer expired"},
1358 {35, "SIGMIGRATE", "signal 35"},
1359 {36, "SIGPRE", "signal 36"},
1360 {37, "SIGVIRT", "signal 37"},
1361 {38, "SIGTALRM", "signal 38"},
1362 {39, "SIGWAITING", "signal 39"},
1363 {48, "SIGSYSERROR", "signal 48"},
1364 {49, "SIGCAPI", "signal 49"},
1365 {58, "SIGRECONFIG", "signal 58"},
1366 {59, "SIGCPUFAIL", "CPU Failure Predicted"},
1367 {60, "SIGKAP", "monitor mode granted"},
1368 {61, "SIGRETRACT", "monitor mode retracted"},
1369 {62, "SIGSOUND", "sound completed"},
1370 {63, "SIGSAK", "secure attention"},
1371 }
0 // mkerrors.sh -maix64
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build ppc64,aix
4
5 // Created by cgo -godefs - DO NOT EDIT
6 // cgo -godefs -- -maix64 _const.go
7
8 package unix
9
10 import "syscall"
11
12 const (
13 AF_APPLETALK = 0x10
14 AF_BYPASS = 0x19
15 AF_CCITT = 0xa
16 AF_CHAOS = 0x5
17 AF_DATAKIT = 0x9
18 AF_DECnet = 0xc
19 AF_DLI = 0xd
20 AF_ECMA = 0x8
21 AF_HYLINK = 0xf
22 AF_IMPLINK = 0x3
23 AF_INET = 0x2
24 AF_INET6 = 0x18
25 AF_INTF = 0x14
26 AF_ISO = 0x7
27 AF_LAT = 0xe
28 AF_LINK = 0x12
29 AF_LOCAL = 0x1
30 AF_MAX = 0x1e
31 AF_NDD = 0x17
32 AF_NETWARE = 0x16
33 AF_NS = 0x6
34 AF_OSI = 0x7
35 AF_PUP = 0x4
36 AF_RIF = 0x15
37 AF_ROUTE = 0x11
38 AF_SNA = 0xb
39 AF_UNIX = 0x1
40 AF_UNSPEC = 0x0
41 ALTWERASE = 0x400000
42 ARPHRD_802_3 = 0x6
43 ARPHRD_802_5 = 0x6
44 ARPHRD_ETHER = 0x1
45 ARPHRD_FDDI = 0x1
46 B0 = 0x0
47 B110 = 0x3
48 B1200 = 0x9
49 B134 = 0x4
50 B150 = 0x5
51 B1800 = 0xa
52 B19200 = 0xe
53 B200 = 0x6
54 B2400 = 0xb
55 B300 = 0x7
56 B38400 = 0xf
57 B4800 = 0xc
58 B50 = 0x1
59 B600 = 0x8
60 B75 = 0x2
61 B9600 = 0xd
62 BRKINT = 0x2
63 BS0 = 0x0
64 BS1 = 0x1000
65 BSDLY = 0x1000
66 CAP_AACCT = 0x6
67 CAP_ARM_APPLICATION = 0x5
68 CAP_BYPASS_RAC_VMM = 0x3
69 CAP_CLEAR = 0x0
70 CAP_CREDENTIALS = 0x7
71 CAP_EFFECTIVE = 0x1
72 CAP_EWLM_AGENT = 0x4
73 CAP_INHERITABLE = 0x2
74 CAP_MAXIMUM = 0x7
75 CAP_NUMA_ATTACH = 0x2
76 CAP_PERMITTED = 0x3
77 CAP_PROPAGATE = 0x1
78 CAP_PROPOGATE = 0x1
79 CAP_SET = 0x1
80 CBAUD = 0xf
81 CFLUSH = 0xf
82 CIBAUD = 0xf0000
83 CLOCAL = 0x800
84 CLOCK_MONOTONIC = 0xa
85 CLOCK_PROCESS_CPUTIME_ID = 0xb
86 CLOCK_REALTIME = 0x9
87 CLOCK_THREAD_CPUTIME_ID = 0xc
88 CR0 = 0x0
89 CR1 = 0x100
90 CR2 = 0x200
91 CR3 = 0x300
92 CRDLY = 0x300
93 CREAD = 0x80
94 CS5 = 0x0
95 CS6 = 0x10
96 CS7 = 0x20
97 CS8 = 0x30
98 CSIOCGIFCONF = -0x3fef96dc
99 CSIZE = 0x30
100 CSMAP_DIR = "/usr/lib/nls/csmap/"
101 CSTART = '\021'
102 CSTOP = '\023'
103 CSTOPB = 0x40
104 CSUSP = 0x1a
105 ECHO = 0x8
106 ECHOCTL = 0x20000
107 ECHOE = 0x10
108 ECHOK = 0x20
109 ECHOKE = 0x80000
110 ECHONL = 0x40
111 ECHOPRT = 0x40000
112 ECH_ICMPID = 0x2
113 ETHERNET_CSMACD = 0x6
114 EVENP = 0x80
115 EXCONTINUE = 0x0
116 EXDLOK = 0x3
117 EXIO = 0x2
118 EXPGIO = 0x0
119 EXRESUME = 0x2
120 EXRETURN = 0x1
121 EXSIG = 0x4
122 EXTA = 0xe
123 EXTB = 0xf
124 EXTRAP = 0x1
125 EYEC_RTENTRYA = 0x257274656e747241
126 EYEC_RTENTRYF = 0x257274656e747246
127 E_ACC = 0x0
128 FD_CLOEXEC = 0x1
129 FD_SETSIZE = 0xfffe
130 FF0 = 0x0
131 FF1 = 0x2000
132 FFDLY = 0x2000
133 FLUSHBAND = 0x40
134 FLUSHLOW = 0x8
135 FLUSHO = 0x100000
136 FLUSHR = 0x1
137 FLUSHRW = 0x3
138 FLUSHW = 0x2
139 F_CLOSEM = 0xa
140 F_DUP2FD = 0xe
141 F_DUPFD = 0x0
142 F_GETFD = 0x1
143 F_GETFL = 0x3
144 F_GETLK = 0xb
145 F_GETLK64 = 0xb
146 F_GETOWN = 0x8
147 F_LOCK = 0x1
148 F_OK = 0x0
149 F_RDLCK = 0x1
150 F_SETFD = 0x2
151 F_SETFL = 0x4
152 F_SETLK = 0xc
153 F_SETLK64 = 0xc
154 F_SETLKW = 0xd
155 F_SETLKW64 = 0xd
156 F_SETOWN = 0x9
157 F_TEST = 0x3
158 F_TLOCK = 0x2
159 F_TSTLK = 0xf
160 F_ULOCK = 0x0
161 F_UNLCK = 0x3
162 F_WRLCK = 0x2
163 HUPCL = 0x400
164 IBSHIFT = 0x10
165 ICANON = 0x2
166 ICMP6_FILTER = 0x26
167 ICMP6_SEC_SEND_DEL = 0x46
168 ICMP6_SEC_SEND_GET = 0x47
169 ICMP6_SEC_SEND_SET = 0x44
170 ICMP6_SEC_SEND_SET_CGA_ADDR = 0x45
171 ICRNL = 0x100
172 IEXTEN = 0x200000
173 IFA_FIRSTALIAS = 0x2000
174 IFA_ROUTE = 0x1
175 IFF_64BIT = 0x4000000
176 IFF_ALLCAST = 0x20000
177 IFF_ALLMULTI = 0x200
178 IFF_BPF = 0x8000000
179 IFF_BRIDGE = 0x40000
180 IFF_BROADCAST = 0x2
181 IFF_CANTCHANGE = 0x80c52
182 IFF_CHECKSUM_OFFLOAD = 0x10000000
183 IFF_D1 = 0x8000
184 IFF_D2 = 0x4000
185 IFF_D3 = 0x2000
186 IFF_D4 = 0x1000
187 IFF_DEBUG = 0x4
188 IFF_DEVHEALTH = 0x4000
189 IFF_DO_HW_LOOPBACK = 0x10000
190 IFF_GROUP_ROUTING = 0x2000000
191 IFF_IFBUFMGT = 0x800000
192 IFF_LINK0 = 0x100000
193 IFF_LINK1 = 0x200000
194 IFF_LINK2 = 0x400000
195 IFF_LOOPBACK = 0x8
196 IFF_MULTICAST = 0x80000
197 IFF_NOARP = 0x80
198 IFF_NOECHO = 0x800
199 IFF_NOTRAILERS = 0x20
200 IFF_OACTIVE = 0x400
201 IFF_POINTOPOINT = 0x10
202 IFF_PROMISC = 0x100
203 IFF_PSEG = 0x40000000
204 IFF_RUNNING = 0x40
205 IFF_SIMPLEX = 0x800
206 IFF_SNAP = 0x8000
207 IFF_TCP_DISABLE_CKSUM = 0x20000000
208 IFF_TCP_NOCKSUM = 0x1000000
209 IFF_UP = 0x1
210 IFF_VIPA = 0x80000000
211 IFNAMSIZ = 0x10
212 IFO_FLUSH = 0x1
213 IFT_1822 = 0x2
214 IFT_AAL5 = 0x31
215 IFT_ARCNET = 0x23
216 IFT_ARCNETPLUS = 0x24
217 IFT_ATM = 0x25
218 IFT_CEPT = 0x13
219 IFT_CLUSTER = 0x3e
220 IFT_DS3 = 0x1e
221 IFT_EON = 0x19
222 IFT_ETHER = 0x6
223 IFT_FCS = 0x3a
224 IFT_FDDI = 0xf
225 IFT_FRELAY = 0x20
226 IFT_FRELAYDCE = 0x2c
227 IFT_GIFTUNNEL = 0x3c
228 IFT_HDH1822 = 0x3
229 IFT_HF = 0x3d
230 IFT_HIPPI = 0x2f
231 IFT_HSSI = 0x2e
232 IFT_HY = 0xe
233 IFT_IB = 0xc7
234 IFT_ISDNBASIC = 0x14
235 IFT_ISDNPRIMARY = 0x15
236 IFT_ISO88022LLC = 0x29
237 IFT_ISO88023 = 0x7
238 IFT_ISO88024 = 0x8
239 IFT_ISO88025 = 0x9
240 IFT_ISO88026 = 0xa
241 IFT_LAPB = 0x10
242 IFT_LOCALTALK = 0x2a
243 IFT_LOOP = 0x18
244 IFT_MIOX25 = 0x26
245 IFT_MODEM = 0x30
246 IFT_NSIP = 0x1b
247 IFT_OTHER = 0x1
248 IFT_P10 = 0xc
249 IFT_P80 = 0xd
250 IFT_PARA = 0x22
251 IFT_PPP = 0x17
252 IFT_PROPMUX = 0x36
253 IFT_PROPVIRTUAL = 0x35
254 IFT_PTPSERIAL = 0x16
255 IFT_RS232 = 0x21
256 IFT_SDLC = 0x11
257 IFT_SIP = 0x1f
258 IFT_SLIP = 0x1c
259 IFT_SMDSDXI = 0x2b
260 IFT_SMDSICIP = 0x34
261 IFT_SN = 0x38
262 IFT_SONET = 0x27
263 IFT_SONETPATH = 0x32
264 IFT_SONETVT = 0x33
265 IFT_SP = 0x39
266 IFT_STARLAN = 0xb
267 IFT_T1 = 0x12
268 IFT_TUNNEL = 0x3b
269 IFT_ULTRA = 0x1d
270 IFT_V35 = 0x2d
271 IFT_VIPA = 0x37
272 IFT_X25 = 0x5
273 IFT_X25DDN = 0x4
274 IFT_X25PLE = 0x28
275 IFT_XETHER = 0x1a
276 IGNBRK = 0x1
277 IGNCR = 0x80
278 IGNPAR = 0x4
279 IMAXBEL = 0x10000
280 INLCR = 0x40
281 INPCK = 0x10
282 IN_CLASSA_HOST = 0xffffff
283 IN_CLASSA_MAX = 0x80
284 IN_CLASSA_NET = 0xff000000
285 IN_CLASSA_NSHIFT = 0x18
286 IN_CLASSB_HOST = 0xffff
287 IN_CLASSB_MAX = 0x10000
288 IN_CLASSB_NET = 0xffff0000
289 IN_CLASSB_NSHIFT = 0x10
290 IN_CLASSC_HOST = 0xff
291 IN_CLASSC_NET = 0xffffff00
292 IN_CLASSC_NSHIFT = 0x8
293 IN_CLASSD_HOST = 0xfffffff
294 IN_CLASSD_NET = 0xf0000000
295 IN_CLASSD_NSHIFT = 0x1c
296 IN_LOOPBACKNET = 0x7f
297 IN_USE = 0x1
298 IPPROTO_AH = 0x33
299 IPPROTO_BIP = 0x53
300 IPPROTO_DSTOPTS = 0x3c
301 IPPROTO_EGP = 0x8
302 IPPROTO_EON = 0x50
303 IPPROTO_ESP = 0x32
304 IPPROTO_FRAGMENT = 0x2c
305 IPPROTO_GGP = 0x3
306 IPPROTO_GIF = 0x8c
307 IPPROTO_GRE = 0x2f
308 IPPROTO_HOPOPTS = 0x0
309 IPPROTO_ICMP = 0x1
310 IPPROTO_ICMPV6 = 0x3a
311 IPPROTO_IDP = 0x16
312 IPPROTO_IGMP = 0x2
313 IPPROTO_IP = 0x0
314 IPPROTO_IPIP = 0x4
315 IPPROTO_IPV6 = 0x29
316 IPPROTO_LOCAL = 0x3f
317 IPPROTO_MAX = 0x100
318 IPPROTO_MH = 0x87
319 IPPROTO_NONE = 0x3b
320 IPPROTO_PUP = 0xc
321 IPPROTO_QOS = 0x2d
322 IPPROTO_RAW = 0xff
323 IPPROTO_ROUTING = 0x2b
324 IPPROTO_RSVP = 0x2e
325 IPPROTO_SCTP = 0x84
326 IPPROTO_TCP = 0x6
327 IPPROTO_TP = 0x1d
328 IPPROTO_UDP = 0x11
329 IPV6_ADDRFORM = 0x16
330 IPV6_ADDR_PREFERENCES = 0x4a
331 IPV6_ADD_MEMBERSHIP = 0xc
332 IPV6_AIXRAWSOCKET = 0x39
333 IPV6_CHECKSUM = 0x27
334 IPV6_DONTFRAG = 0x2d
335 IPV6_DROP_MEMBERSHIP = 0xd
336 IPV6_DSTOPTS = 0x36
337 IPV6_FLOWINFO_FLOWLABEL = 0xffffff
338 IPV6_FLOWINFO_PRIFLOW = 0xfffffff
339 IPV6_FLOWINFO_PRIORITY = 0xf000000
340 IPV6_FLOWINFO_SRFLAG = 0x10000000
341 IPV6_FLOWINFO_VERSION = 0xf0000000
342 IPV6_HOPLIMIT = 0x28
343 IPV6_HOPOPTS = 0x34
344 IPV6_JOIN_GROUP = 0xc
345 IPV6_LEAVE_GROUP = 0xd
346 IPV6_MIPDSTOPTS = 0x36
347 IPV6_MULTICAST_HOPS = 0xa
348 IPV6_MULTICAST_IF = 0x9
349 IPV6_MULTICAST_LOOP = 0xb
350 IPV6_NEXTHOP = 0x30
351 IPV6_NOPROBE = 0x1c
352 IPV6_PATHMTU = 0x2e
353 IPV6_PKTINFO = 0x21
354 IPV6_PKTOPTIONS = 0x24
355 IPV6_PRIORITY_10 = 0xa000000
356 IPV6_PRIORITY_11 = 0xb000000
357 IPV6_PRIORITY_12 = 0xc000000
358 IPV6_PRIORITY_13 = 0xd000000
359 IPV6_PRIORITY_14 = 0xe000000
360 IPV6_PRIORITY_15 = 0xf000000
361 IPV6_PRIORITY_8 = 0x8000000
362 IPV6_PRIORITY_9 = 0x9000000
363 IPV6_PRIORITY_BULK = 0x4000000
364 IPV6_PRIORITY_CONTROL = 0x7000000
365 IPV6_PRIORITY_FILLER = 0x1000000
366 IPV6_PRIORITY_INTERACTIVE = 0x6000000
367 IPV6_PRIORITY_RESERVED1 = 0x3000000
368 IPV6_PRIORITY_RESERVED2 = 0x5000000
369 IPV6_PRIORITY_UNATTENDED = 0x2000000
370 IPV6_PRIORITY_UNCHARACTERIZED = 0x0
371 IPV6_RECVDSTOPTS = 0x38
372 IPV6_RECVHOPLIMIT = 0x29
373 IPV6_RECVHOPOPTS = 0x35
374 IPV6_RECVHOPS = 0x22
375 IPV6_RECVIF = 0x1e
376 IPV6_RECVPATHMTU = 0x2f
377 IPV6_RECVPKTINFO = 0x23
378 IPV6_RECVRTHDR = 0x33
379 IPV6_RECVSRCRT = 0x1d
380 IPV6_RECVTCLASS = 0x2a
381 IPV6_RTHDR = 0x32
382 IPV6_RTHDRDSTOPTS = 0x37
383 IPV6_RTHDR_TYPE_0 = 0x0
384 IPV6_RTHDR_TYPE_2 = 0x2
385 IPV6_SENDIF = 0x1f
386 IPV6_SRFLAG_LOOSE = 0x0
387 IPV6_SRFLAG_STRICT = 0x10000000
388 IPV6_TCLASS = 0x2b
389 IPV6_TOKEN_LENGTH = 0x40
390 IPV6_UNICAST_HOPS = 0x4
391 IPV6_USE_MIN_MTU = 0x2c
392 IPV6_V6ONLY = 0x25
393 IPV6_VERSION = 0x60000000
394 IP_ADDRFORM = 0x16
395 IP_ADD_MEMBERSHIP = 0xc
396 IP_ADD_SOURCE_MEMBERSHIP = 0x3c
397 IP_BLOCK_SOURCE = 0x3a
398 IP_BROADCAST_IF = 0x10
399 IP_CACHE_LINE_SIZE = 0x80
400 IP_DEFAULT_MULTICAST_LOOP = 0x1
401 IP_DEFAULT_MULTICAST_TTL = 0x1
402 IP_DF = 0x4000
403 IP_DHCPMODE = 0x11
404 IP_DONTFRAG = 0x19
405 IP_DROP_MEMBERSHIP = 0xd
406 IP_DROP_SOURCE_MEMBERSHIP = 0x3d
407 IP_FINDPMTU = 0x1a
408 IP_HDRINCL = 0x2
409 IP_INC_MEMBERSHIPS = 0x14
410 IP_INIT_MEMBERSHIP = 0x14
411 IP_MAXPACKET = 0xffff
412 IP_MF = 0x2000
413 IP_MSS = 0x240
414 IP_MULTICAST_HOPS = 0xa
415 IP_MULTICAST_IF = 0x9
416 IP_MULTICAST_LOOP = 0xb
417 IP_MULTICAST_TTL = 0xa
418 IP_OPT = 0x1b
419 IP_OPTIONS = 0x1
420 IP_PMTUAGE = 0x1b
421 IP_RECVDSTADDR = 0x7
422 IP_RECVIF = 0x14
423 IP_RECVIFINFO = 0xf
424 IP_RECVINTERFACE = 0x20
425 IP_RECVMACHDR = 0xe
426 IP_RECVOPTS = 0x5
427 IP_RECVRETOPTS = 0x6
428 IP_RECVTTL = 0x22
429 IP_RETOPTS = 0x8
430 IP_SOURCE_FILTER = 0x48
431 IP_TOS = 0x3
432 IP_TTL = 0x4
433 IP_UNBLOCK_SOURCE = 0x3b
434 IP_UNICAST_HOPS = 0x4
435 ISIG = 0x1
436 ISTRIP = 0x20
437 IUCLC = 0x800
438 IXANY = 0x1000
439 IXOFF = 0x400
440 IXON = 0x200
441 I_FLUSH = 0x20005305
442 LNOFLSH = 0x8000
443 LOCK_EX = 0x2
444 LOCK_NB = 0x4
445 LOCK_SH = 0x1
446 LOCK_UN = 0x8
447 MADV_DONTNEED = 0x4
448 MADV_NORMAL = 0x0
449 MADV_RANDOM = 0x1
450 MADV_SEQUENTIAL = 0x2
451 MADV_SPACEAVAIL = 0x5
452 MADV_WILLNEED = 0x3
453 MAP_ANON = 0x10
454 MAP_ANONYMOUS = 0x10
455 MAP_FILE = 0x0
456 MAP_FIXED = 0x100
457 MAP_PRIVATE = 0x2
458 MAP_SHARED = 0x1
459 MAP_TYPE = 0xf0
460 MAP_VARIABLE = 0x0
461 MCL_CURRENT = 0x100
462 MCL_FUTURE = 0x200
463 MSG_ANY = 0x4
464 MSG_ARGEXT = 0x400
465 MSG_BAND = 0x2
466 MSG_COMPAT = 0x8000
467 MSG_CTRUNC = 0x20
468 MSG_DONTROUTE = 0x4
469 MSG_EOR = 0x8
470 MSG_HIPRI = 0x1
471 MSG_MAXIOVLEN = 0x10
472 MSG_MPEG2 = 0x80
473 MSG_NONBLOCK = 0x4000
474 MSG_NOSIGNAL = 0x100
475 MSG_OOB = 0x1
476 MSG_PEEK = 0x2
477 MSG_TRUNC = 0x10
478 MSG_WAITALL = 0x40
479 MSG_WAITFORONE = 0x200
480 MS_ASYNC = 0x10
481 MS_EINTR = 0x80
482 MS_INVALIDATE = 0x40
483 MS_PER_SEC = 0x3e8
484 MS_SYNC = 0x20
485 NL0 = 0x0
486 NL1 = 0x4000
487 NL2 = 0x8000
488 NL3 = 0xc000
489 NLDLY = 0x4000
490 NOFLSH = 0x80
491 NOFLUSH = 0x80000000
492 OCRNL = 0x8
493 OFDEL = 0x80
494 OFILL = 0x40
495 OLCUC = 0x2
496 ONLCR = 0x4
497 ONLRET = 0x20
498 ONOCR = 0x10
499 ONOEOT = 0x80000
500 OPOST = 0x1
501 OXTABS = 0x40000
502 O_ACCMODE = 0x23
503 O_APPEND = 0x8
504 O_CIO = 0x80
505 O_CIOR = 0x800000000
506 O_CLOEXEC = 0x800000
507 O_CREAT = 0x100
508 O_DEFER = 0x2000
509 O_DELAY = 0x4000
510 O_DIRECT = 0x8000000
511 O_DIRECTORY = 0x80000
512 O_DSYNC = 0x400000
513 O_EFSOFF = 0x400000000
514 O_EFSON = 0x200000000
515 O_EXCL = 0x400
516 O_EXEC = 0x20
517 O_LARGEFILE = 0x4000000
518 O_NDELAY = 0x8000
519 O_NOCACHE = 0x100000
520 O_NOCTTY = 0x800
521 O_NOFOLLOW = 0x1000000
522 O_NONBLOCK = 0x4
523 O_NONE = 0x3
524 O_NSHARE = 0x10000
525 O_RAW = 0x100000000
526 O_RDONLY = 0x0
527 O_RDWR = 0x2
528 O_RSHARE = 0x1000
529 O_RSYNC = 0x200000
530 O_SEARCH = 0x20
531 O_SNAPSHOT = 0x40
532 O_SYNC = 0x10
533 O_TRUNC = 0x200
534 O_TTY_INIT = 0x0
535 O_WRONLY = 0x1
536 PARENB = 0x100
537 PAREXT = 0x100000
538 PARMRK = 0x8
539 PARODD = 0x200
540 PENDIN = 0x20000000
541 PRIO_PGRP = 0x1
542 PRIO_PROCESS = 0x0
543 PRIO_USER = 0x2
544 PROT_EXEC = 0x4
545 PROT_NONE = 0x0
546 PROT_READ = 0x1
547 PROT_WRITE = 0x2
548 PR_64BIT = 0x20
549 PR_ADDR = 0x2
550 PR_ARGEXT = 0x400
551 PR_ATOMIC = 0x1
552 PR_CONNREQUIRED = 0x4
553 PR_FASTHZ = 0x5
554 PR_INP = 0x40
555 PR_INTRLEVEL = 0x8000
556 PR_MLS = 0x100
557 PR_MLS_1_LABEL = 0x200
558 PR_NOEOR = 0x4000
559 PR_RIGHTS = 0x10
560 PR_SLOWHZ = 0x2
561 PR_WANTRCVD = 0x8
562 RLIMIT_AS = 0x6
563 RLIMIT_CORE = 0x4
564 RLIMIT_CPU = 0x0
565 RLIMIT_DATA = 0x2
566 RLIMIT_FSIZE = 0x1
567 RLIMIT_NOFILE = 0x7
568 RLIMIT_NPROC = 0x9
569 RLIMIT_RSS = 0x5
570 RLIMIT_STACK = 0x3
571 RLIM_INFINITY = 0x7fffffffffffffff
572 RTAX_AUTHOR = 0x6
573 RTAX_BRD = 0x7
574 RTAX_DST = 0x0
575 RTAX_GATEWAY = 0x1
576 RTAX_GENMASK = 0x3
577 RTAX_IFA = 0x5
578 RTAX_IFP = 0x4
579 RTAX_MAX = 0x8
580 RTAX_NETMASK = 0x2
581 RTA_AUTHOR = 0x40
582 RTA_BRD = 0x80
583 RTA_DOWNSTREAM = 0x100
584 RTA_DST = 0x1
585 RTA_GATEWAY = 0x2
586 RTA_GENMASK = 0x8
587 RTA_IFA = 0x20
588 RTA_IFP = 0x10
589 RTA_NETMASK = 0x4
590 RTC_IA64 = 0x3
591 RTC_POWER = 0x1
592 RTC_POWER_PC = 0x2
593 RTF_ACTIVE_DGD = 0x1000000
594 RTF_BCE = 0x80000
595 RTF_BLACKHOLE = 0x1000
596 RTF_BROADCAST = 0x400000
597 RTF_BUL = 0x2000
598 RTF_CLONE = 0x10000
599 RTF_CLONED = 0x20000
600 RTF_CLONING = 0x100
601 RTF_DONE = 0x40
602 RTF_DYNAMIC = 0x10
603 RTF_FREE_IN_PROG = 0x4000000
604 RTF_GATEWAY = 0x2
605 RTF_HOST = 0x4
606 RTF_LLINFO = 0x400
607 RTF_LOCAL = 0x200000
608 RTF_MASK = 0x80
609 RTF_MODIFIED = 0x20
610 RTF_MULTICAST = 0x800000
611 RTF_PERMANENT6 = 0x8000000
612 RTF_PINNED = 0x100000
613 RTF_PROTO1 = 0x8000
614 RTF_PROTO2 = 0x4000
615 RTF_PROTO3 = 0x40000
616 RTF_REJECT = 0x8
617 RTF_SMALLMTU = 0x40000
618 RTF_STATIC = 0x800
619 RTF_STOPSRCH = 0x2000000
620 RTF_UNREACHABLE = 0x10000000
621 RTF_UP = 0x1
622 RTF_XRESOLVE = 0x200
623 RTM_ADD = 0x1
624 RTM_CHANGE = 0x3
625 RTM_DELADDR = 0xd
626 RTM_DELETE = 0x2
627 RTM_EXPIRE = 0xf
628 RTM_GET = 0x4
629 RTM_GETNEXT = 0x11
630 RTM_IFINFO = 0xe
631 RTM_LOCK = 0x8
632 RTM_LOSING = 0x5
633 RTM_MISS = 0x7
634 RTM_NEWADDR = 0xc
635 RTM_OLDADD = 0x9
636 RTM_OLDDEL = 0xa
637 RTM_REDIRECT = 0x6
638 RTM_RESOLVE = 0xb
639 RTM_RTLOST = 0x10
640 RTM_RTTUNIT = 0xf4240
641 RTM_SAMEADDR = 0x12
642 RTM_SET = 0x13
643 RTM_VERSION = 0x2
644 RTM_VERSION_GR = 0x4
645 RTM_VERSION_GR_COMPAT = 0x3
646 RTM_VERSION_POLICY = 0x5
647 RTM_VERSION_POLICY_EXT = 0x6
648 RTM_VERSION_POLICY_PRFN = 0x7
649 RTV_EXPIRE = 0x4
650 RTV_HOPCOUNT = 0x2
651 RTV_MTU = 0x1
652 RTV_RPIPE = 0x8
653 RTV_RTT = 0x40
654 RTV_RTTVAR = 0x80
655 RTV_SPIPE = 0x10
656 RTV_SSTHRESH = 0x20
657 RUSAGE_CHILDREN = -0x1
658 RUSAGE_SELF = 0x0
659 RUSAGE_THREAD = 0x1
660 SCM_RIGHTS = 0x1
661 SHUT_RD = 0x0
662 SHUT_RDWR = 0x2
663 SHUT_WR = 0x1
664 SIGMAX64 = 0xff
665 SIGQUEUE_MAX = 0x20
666 SIOCADDIFVIPA = 0x20006942
667 SIOCADDMTU = -0x7ffb9690
668 SIOCADDMULTI = -0x7fdf96cf
669 SIOCADDNETID = -0x7fd796a9
670 SIOCADDRT = -0x7fc78df6
671 SIOCAIFADDR = -0x7fbf96e6
672 SIOCATMARK = 0x40047307
673 SIOCDARP = -0x7fb396e0
674 SIOCDELIFVIPA = 0x20006943
675 SIOCDELMTU = -0x7ffb968f
676 SIOCDELMULTI = -0x7fdf96ce
677 SIOCDELPMTU = -0x7fd78ff6
678 SIOCDELRT = -0x7fc78df5
679 SIOCDIFADDR = -0x7fd796e7
680 SIOCDNETOPT = -0x3ffe9680
681 SIOCDX25XLATE = -0x7fd7969b
682 SIOCFIFADDR = -0x7fdf966d
683 SIOCGARP = -0x3fb396da
684 SIOCGETMTUS = 0x2000696f
685 SIOCGETSGCNT = -0x3feb8acc
686 SIOCGETVIFCNT = -0x3feb8acd
687 SIOCGHIWAT = 0x40047301
688 SIOCGIFADDR = -0x3fd796df
689 SIOCGIFADDRS = 0x2000698c
690 SIOCGIFBAUDRATE = -0x3fd79693
691 SIOCGIFBRDADDR = -0x3fd796dd
692 SIOCGIFCONF = -0x3fef96bb
693 SIOCGIFCONFGLOB = -0x3fef9670
694 SIOCGIFDSTADDR = -0x3fd796de
695 SIOCGIFFLAGS = -0x3fd796ef
696 SIOCGIFGIDLIST = 0x20006968
697 SIOCGIFHWADDR = -0x3fab966b
698 SIOCGIFMETRIC = -0x3fd796e9
699 SIOCGIFMTU = -0x3fd796aa
700 SIOCGIFNETMASK = -0x3fd796db
701 SIOCGIFOPTIONS = -0x3fd796d6
702 SIOCGISNO = -0x3fd79695
703 SIOCGLOADF = -0x3ffb967e
704 SIOCGLOWAT = 0x40047303
705 SIOCGNETOPT = -0x3ffe96a5
706 SIOCGNETOPT1 = -0x3fdf967f
707 SIOCGNMTUS = 0x2000696e
708 SIOCGPGRP = 0x40047309
709 SIOCGSIZIFCONF = 0x4004696a
710 SIOCGSRCFILTER = -0x3fe796cb
711 SIOCGTUNEPHASE = -0x3ffb9676
712 SIOCGX25XLATE = -0x3fd7969c
713 SIOCIFATTACH = -0x7fdf9699
714 SIOCIFDETACH = -0x7fdf969a
715 SIOCIFGETPKEY = -0x7fdf969b
716 SIOCIF_ATM_DARP = -0x7fdf9683
717 SIOCIF_ATM_DUMPARP = -0x7fdf9685
718 SIOCIF_ATM_GARP = -0x7fdf9682
719 SIOCIF_ATM_IDLE = -0x7fdf9686
720 SIOCIF_ATM_SARP = -0x7fdf9681
721 SIOCIF_ATM_SNMPARP = -0x7fdf9687
722 SIOCIF_ATM_SVC = -0x7fdf9684
723 SIOCIF_ATM_UBR = -0x7fdf9688
724 SIOCIF_DEVHEALTH = -0x7ffb966c
725 SIOCIF_IB_ARP_INCOMP = -0x7fdf9677
726 SIOCIF_IB_ARP_TIMER = -0x7fdf9678
727 SIOCIF_IB_CLEAR_PINFO = -0x3fdf966f
728 SIOCIF_IB_DEL_ARP = -0x7fdf967f
729 SIOCIF_IB_DEL_PINFO = -0x3fdf9670
730 SIOCIF_IB_DUMP_ARP = -0x7fdf9680
731 SIOCIF_IB_GET_ARP = -0x7fdf967e
732 SIOCIF_IB_GET_INFO = -0x3f879675
733 SIOCIF_IB_GET_STATS = -0x3f879672
734 SIOCIF_IB_NOTIFY_ADDR_REM = -0x3f87966a
735 SIOCIF_IB_RESET_STATS = -0x3f879671
736 SIOCIF_IB_RESIZE_CQ = -0x7fdf9679
737 SIOCIF_IB_SET_ARP = -0x7fdf967d
738 SIOCIF_IB_SET_PKEY = -0x7fdf967c
739 SIOCIF_IB_SET_PORT = -0x7fdf967b
740 SIOCIF_IB_SET_QKEY = -0x7fdf9676
741 SIOCIF_IB_SET_QSIZE = -0x7fdf967a
742 SIOCLISTIFVIPA = 0x20006944
743 SIOCSARP = -0x7fb396e2
744 SIOCSHIWAT = 0xffffffff80047300
745 SIOCSIFADDR = -0x7fd796f4
746 SIOCSIFADDRORI = -0x7fdb9673
747 SIOCSIFBRDADDR = -0x7fd796ed
748 SIOCSIFDSTADDR = -0x7fd796f2
749 SIOCSIFFLAGS = -0x7fd796f0
750 SIOCSIFGIDLIST = 0x20006969
751 SIOCSIFMETRIC = -0x7fd796e8
752 SIOCSIFMTU = -0x7fd796a8
753 SIOCSIFNETDUMP = -0x7fd796e4
754 SIOCSIFNETMASK = -0x7fd796ea
755 SIOCSIFOPTIONS = -0x7fd796d7
756 SIOCSIFSUBCHAN = -0x7fd796e5
757 SIOCSISNO = -0x7fd79694
758 SIOCSLOADF = -0x3ffb967d
759 SIOCSLOWAT = 0xffffffff80047302
760 SIOCSNETOPT = -0x7ffe96a6
761 SIOCSPGRP = 0xffffffff80047308
762 SIOCSX25XLATE = -0x7fd7969d
763 SOCK_CONN_DGRAM = 0x6
764 SOCK_DGRAM = 0x2
765 SOCK_RAW = 0x3
766 SOCK_RDM = 0x4
767 SOCK_SEQPACKET = 0x5
768 SOCK_STREAM = 0x1
769 SOL_SOCKET = 0xffff
770 SOMAXCONN = 0x400
771 SO_ACCEPTCONN = 0x2
772 SO_AUDIT = 0x8000
773 SO_BROADCAST = 0x20
774 SO_CKSUMRECV = 0x800
775 SO_DEBUG = 0x1
776 SO_DONTROUTE = 0x10
777 SO_ERROR = 0x1007
778 SO_KEEPALIVE = 0x8
779 SO_KERNACCEPT = 0x2000
780 SO_LINGER = 0x80
781 SO_NOMULTIPATH = 0x4000
782 SO_NOREUSEADDR = 0x1000
783 SO_OOBINLINE = 0x100
784 SO_PEERID = 0x1009
785 SO_RCVBUF = 0x1002
786 SO_RCVLOWAT = 0x1004
787 SO_RCVTIMEO = 0x1006
788 SO_REUSEADDR = 0x4
789 SO_REUSEPORT = 0x200
790 SO_SNDBUF = 0x1001
791 SO_SNDLOWAT = 0x1003
792 SO_SNDTIMEO = 0x1005
793 SO_TIMESTAMPNS = 0x100a
794 SO_TYPE = 0x1008
795 SO_USELOOPBACK = 0x40
796 SO_USE_IFBUFS = 0x400
797 S_BANDURG = 0x400
798 S_EMODFMT = 0x3c000000
799 S_ENFMT = 0x400
800 S_ERROR = 0x100
801 S_HANGUP = 0x200
802 S_HIPRI = 0x2
803 S_ICRYPTO = 0x80000
804 S_IEXEC = 0x40
805 S_IFBLK = 0x6000
806 S_IFCHR = 0x2000
807 S_IFDIR = 0x4000
808 S_IFIFO = 0x1000
809 S_IFJOURNAL = 0x10000
810 S_IFLNK = 0xa000
811 S_IFMPX = 0x2200
812 S_IFMT = 0xf000
813 S_IFPDIR = 0x4000000
814 S_IFPSDIR = 0x8000000
815 S_IFPSSDIR = 0xc000000
816 S_IFREG = 0x8000
817 S_IFSOCK = 0xc000
818 S_IFSYSEA = 0x30000000
819 S_INPUT = 0x1
820 S_IREAD = 0x100
821 S_IRGRP = 0x20
822 S_IROTH = 0x4
823 S_IRUSR = 0x100
824 S_IRWXG = 0x38
825 S_IRWXO = 0x7
826 S_IRWXU = 0x1c0
827 S_ISGID = 0x400
828 S_ISUID = 0x800
829 S_ISVTX = 0x200
830 S_ITCB = 0x1000000
831 S_ITP = 0x800000
832 S_IWGRP = 0x10
833 S_IWOTH = 0x2
834 S_IWRITE = 0x80
835 S_IWUSR = 0x80
836 S_IXACL = 0x2000000
837 S_IXATTR = 0x40000
838 S_IXGRP = 0x8
839 S_IXINTERFACE = 0x100000
840 S_IXMOD = 0x40000000
841 S_IXOTH = 0x1
842 S_IXUSR = 0x40
843 S_MSG = 0x8
844 S_OUTPUT = 0x4
845 S_RDBAND = 0x20
846 S_RDNORM = 0x10
847 S_RESERVED1 = 0x20000
848 S_RESERVED2 = 0x200000
849 S_RESERVED3 = 0x400000
850 S_RESERVED4 = 0x80000000
851 S_RESFMT1 = 0x10000000
852 S_RESFMT10 = 0x34000000
853 S_RESFMT11 = 0x38000000
854 S_RESFMT12 = 0x3c000000
855 S_RESFMT2 = 0x14000000
856 S_RESFMT3 = 0x18000000
857 S_RESFMT4 = 0x1c000000
858 S_RESFMT5 = 0x20000000
859 S_RESFMT6 = 0x24000000
860 S_RESFMT7 = 0x28000000
861 S_RESFMT8 = 0x2c000000
862 S_WRBAND = 0x80
863 S_WRNORM = 0x40
864 TAB0 = 0x0
865 TAB1 = 0x400
866 TAB2 = 0x800
867 TAB3 = 0xc00
868 TABDLY = 0xc00
869 TCFLSH = 0x540c
870 TCGETA = 0x5405
871 TCGETS = 0x5401
872 TCIFLUSH = 0x0
873 TCIOFF = 0x2
874 TCIOFLUSH = 0x2
875 TCION = 0x3
876 TCOFLUSH = 0x1
877 TCOOFF = 0x0
878 TCOON = 0x1
879 TCP_24DAYS_WORTH_OF_SLOWTICKS = 0x3f4800
880 TCP_ACLADD = 0x23
881 TCP_ACLBIND = 0x26
882 TCP_ACLCLEAR = 0x22
883 TCP_ACLDEL = 0x24
884 TCP_ACLDENY = 0x8
885 TCP_ACLFLUSH = 0x21
886 TCP_ACLGID = 0x1
887 TCP_ACLLS = 0x25
888 TCP_ACLSUBNET = 0x4
889 TCP_ACLUID = 0x2
890 TCP_CWND_DF = 0x16
891 TCP_CWND_IF = 0x15
892 TCP_DELAY_ACK_FIN = 0x2
893 TCP_DELAY_ACK_SYN = 0x1
894 TCP_FASTNAME = 0x101080a
895 TCP_KEEPCNT = 0x13
896 TCP_KEEPIDLE = 0x11
897 TCP_KEEPINTVL = 0x12
898 TCP_LSPRIV = 0x29
899 TCP_LUID = 0x20
900 TCP_MAXBURST = 0x8
901 TCP_MAXDF = 0x64
902 TCP_MAXIF = 0x64
903 TCP_MAXSEG = 0x2
904 TCP_MAXWIN = 0xffff
905 TCP_MAXWINDOWSCALE = 0xe
906 TCP_MAX_SACK = 0x4
907 TCP_MSS = 0x5b4
908 TCP_NODELAY = 0x1
909 TCP_NODELAYACK = 0x14
910 TCP_NOREDUCE_CWND_EXIT_FRXMT = 0x19
911 TCP_NOREDUCE_CWND_IN_FRXMT = 0x18
912 TCP_NOTENTER_SSTART = 0x17
913 TCP_OPT = 0x19
914 TCP_RFC1323 = 0x4
915 TCP_SETPRIV = 0x27
916 TCP_STDURG = 0x10
917 TCP_TIMESTAMP_OPTLEN = 0xc
918 TCP_UNSETPRIV = 0x28
919 TCSAFLUSH = 0x2
920 TCSBRK = 0x5409
921 TCSETA = 0x5406
922 TCSETAF = 0x5408
923 TCSETAW = 0x5407
924 TCSETS = 0x5402
925 TCSETSF = 0x5404
926 TCSETSW = 0x5403
927 TCXONC = 0x540b
928 TIOC = 0x5400
929 TIOCCBRK = 0x2000747a
930 TIOCCDTR = 0x20007478
931 TIOCCONS = 0xffffffff80047462
932 TIOCEXCL = 0x2000740d
933 TIOCFLUSH = 0xffffffff80047410
934 TIOCGETC = 0x40067412
935 TIOCGETD = 0x40047400
936 TIOCGETP = 0x40067408
937 TIOCGLTC = 0x40067474
938 TIOCGPGRP = 0x40047477
939 TIOCGSID = 0x40047448
940 TIOCGSIZE = 0x40087468
941 TIOCGWINSZ = 0x40087468
942 TIOCHPCL = 0x20007402
943 TIOCLBIC = 0xffffffff8004747e
944 TIOCLBIS = 0xffffffff8004747f
945 TIOCLGET = 0x4004747c
946 TIOCLSET = 0xffffffff8004747d
947 TIOCMBIC = 0xffffffff8004746b
948 TIOCMBIS = 0xffffffff8004746c
949 TIOCMGET = 0x4004746a
950 TIOCMIWAIT = 0xffffffff80047464
951 TIOCMODG = 0x40047403
952 TIOCMODS = 0xffffffff80047404
953 TIOCMSET = 0xffffffff8004746d
954 TIOCM_CAR = 0x40
955 TIOCM_CD = 0x40
956 TIOCM_CTS = 0x20
957 TIOCM_DSR = 0x100
958 TIOCM_DTR = 0x2
959 TIOCM_LE = 0x1
960 TIOCM_RI = 0x80
961 TIOCM_RNG = 0x80
962 TIOCM_RTS = 0x4
963 TIOCM_SR = 0x10
964 TIOCM_ST = 0x8
965 TIOCNOTTY = 0x20007471
966 TIOCNXCL = 0x2000740e
967 TIOCOUTQ = 0x40047473
968 TIOCPKT = 0xffffffff80047470
969 TIOCPKT_DATA = 0x0
970 TIOCPKT_DOSTOP = 0x20
971 TIOCPKT_FLUSHREAD = 0x1
972 TIOCPKT_FLUSHWRITE = 0x2
973 TIOCPKT_NOSTOP = 0x10
974 TIOCPKT_START = 0x8
975 TIOCPKT_STOP = 0x4
976 TIOCREMOTE = 0xffffffff80047469
977 TIOCSBRK = 0x2000747b
978 TIOCSDTR = 0x20007479
979 TIOCSETC = 0xffffffff80067411
980 TIOCSETD = 0xffffffff80047401
981 TIOCSETN = 0xffffffff8006740a
982 TIOCSETP = 0xffffffff80067409
983 TIOCSLTC = 0xffffffff80067475
984 TIOCSPGRP = 0xffffffff80047476
985 TIOCSSIZE = 0xffffffff80087467
986 TIOCSTART = 0x2000746e
987 TIOCSTI = 0xffffffff80017472
988 TIOCSTOP = 0x2000746f
989 TIOCSWINSZ = 0xffffffff80087467
990 TIOCUCNTL = 0xffffffff80047466
991 TOSTOP = 0x10000
992 UTIME_NOW = -0x2
993 UTIME_OMIT = -0x3
994 VDISCRD = 0xc
995 VDSUSP = 0xa
996 VEOF = 0x4
997 VEOL = 0x5
998 VEOL2 = 0x6
999 VERASE = 0x2
1000 VINTR = 0x0
1001 VKILL = 0x3
1002 VLNEXT = 0xe
1003 VMIN = 0x4
1004 VQUIT = 0x1
1005 VREPRINT = 0xb
1006 VSTART = 0x7
1007 VSTOP = 0x8
1008 VSTRT = 0x7
1009 VSUSP = 0x9
1010 VT0 = 0x0
1011 VT1 = 0x8000
1012 VTDELAY = 0x2000
1013 VTDLY = 0x8000
1014 VTIME = 0x5
1015 VWERSE = 0xd
1016 WPARSTART = 0x1
1017 WPARSTOP = 0x2
1018 WPARTTYNAME = "Global"
1019 XCASE = 0x4
1020 XTABS = 0xc00
1021 _FDATAFLUSH = 0x2000000000
1022 )
1023
1024 // Errors
1025 const (
1026 E2BIG = syscall.Errno(0x7)
1027 EACCES = syscall.Errno(0xd)
1028 EADDRINUSE = syscall.Errno(0x43)
1029 EADDRNOTAVAIL = syscall.Errno(0x44)
1030 EAFNOSUPPORT = syscall.Errno(0x42)
1031 EAGAIN = syscall.Errno(0xb)
1032 EALREADY = syscall.Errno(0x38)
1033 EBADF = syscall.Errno(0x9)
1034 EBADMSG = syscall.Errno(0x78)
1035 EBUSY = syscall.Errno(0x10)
1036 ECANCELED = syscall.Errno(0x75)
1037 ECHILD = syscall.Errno(0xa)
1038 ECHRNG = syscall.Errno(0x25)
1039 ECLONEME = syscall.Errno(0x52)
1040 ECONNABORTED = syscall.Errno(0x48)
1041 ECONNREFUSED = syscall.Errno(0x4f)
1042 ECONNRESET = syscall.Errno(0x49)
1043 ECORRUPT = syscall.Errno(0x59)
1044 EDEADLK = syscall.Errno(0x2d)
1045 EDESTADDREQ = syscall.Errno(0x3a)
1046 EDESTADDRREQ = syscall.Errno(0x3a)
1047 EDIST = syscall.Errno(0x35)
1048 EDOM = syscall.Errno(0x21)
1049 EDQUOT = syscall.Errno(0x58)
1050 EEXIST = syscall.Errno(0x11)
1051 EFAULT = syscall.Errno(0xe)
1052 EFBIG = syscall.Errno(0x1b)
1053 EFORMAT = syscall.Errno(0x30)
1054 EHOSTDOWN = syscall.Errno(0x50)
1055 EHOSTUNREACH = syscall.Errno(0x51)
1056 EIDRM = syscall.Errno(0x24)
1057 EILSEQ = syscall.Errno(0x74)
1058 EINPROGRESS = syscall.Errno(0x37)
1059 EINTR = syscall.Errno(0x4)
1060 EINVAL = syscall.Errno(0x16)
1061 EIO = syscall.Errno(0x5)
1062 EISCONN = syscall.Errno(0x4b)
1063 EISDIR = syscall.Errno(0x15)
1064 EL2HLT = syscall.Errno(0x2c)
1065 EL2NSYNC = syscall.Errno(0x26)
1066 EL3HLT = syscall.Errno(0x27)
1067 EL3RST = syscall.Errno(0x28)
1068 ELNRNG = syscall.Errno(0x29)
1069 ELOOP = syscall.Errno(0x55)
1070 EMEDIA = syscall.Errno(0x6e)
1071 EMFILE = syscall.Errno(0x18)
1072 EMLINK = syscall.Errno(0x1f)
1073 EMSGSIZE = syscall.Errno(0x3b)
1074 EMULTIHOP = syscall.Errno(0x7d)
1075 ENAMETOOLONG = syscall.Errno(0x56)
1076 ENETDOWN = syscall.Errno(0x45)
1077 ENETRESET = syscall.Errno(0x47)
1078 ENETUNREACH = syscall.Errno(0x46)
1079 ENFILE = syscall.Errno(0x17)
1080 ENOATTR = syscall.Errno(0x70)
1081 ENOBUFS = syscall.Errno(0x4a)
1082 ENOCONNECT = syscall.Errno(0x32)
1083 ENOCSI = syscall.Errno(0x2b)
1084 ENODATA = syscall.Errno(0x7a)
1085 ENODEV = syscall.Errno(0x13)
1086 ENOENT = syscall.Errno(0x2)
1087 ENOEXEC = syscall.Errno(0x8)
1088 ENOLCK = syscall.Errno(0x31)
1089 ENOLINK = syscall.Errno(0x7e)
1090 ENOMEM = syscall.Errno(0xc)
1091 ENOMSG = syscall.Errno(0x23)
1092 ENOPROTOOPT = syscall.Errno(0x3d)
1093 ENOSPC = syscall.Errno(0x1c)
1094 ENOSR = syscall.Errno(0x76)
1095 ENOSTR = syscall.Errno(0x7b)
1096 ENOSYS = syscall.Errno(0x6d)
1097 ENOTBLK = syscall.Errno(0xf)
1098 ENOTCONN = syscall.Errno(0x4c)
1099 ENOTDIR = syscall.Errno(0x14)
1100 ENOTEMPTY = syscall.Errno(0x11)
1101 ENOTREADY = syscall.Errno(0x2e)
1102 ENOTRECOVERABLE = syscall.Errno(0x5e)
1103 ENOTRUST = syscall.Errno(0x72)
1104 ENOTSOCK = syscall.Errno(0x39)
1105 ENOTSUP = syscall.Errno(0x7c)
1106 ENOTTY = syscall.Errno(0x19)
1107 ENXIO = syscall.Errno(0x6)
1108 EOPNOTSUPP = syscall.Errno(0x40)
1109 EOVERFLOW = syscall.Errno(0x7f)
1110 EOWNERDEAD = syscall.Errno(0x5f)
1111 EPERM = syscall.Errno(0x1)
1112 EPFNOSUPPORT = syscall.Errno(0x41)
1113 EPIPE = syscall.Errno(0x20)
1114 EPROCLIM = syscall.Errno(0x53)
1115 EPROTO = syscall.Errno(0x79)
1116 EPROTONOSUPPORT = syscall.Errno(0x3e)
1117 EPROTOTYPE = syscall.Errno(0x3c)
1118 ERANGE = syscall.Errno(0x22)
1119 EREMOTE = syscall.Errno(0x5d)
1120 ERESTART = syscall.Errno(0x52)
1121 EROFS = syscall.Errno(0x1e)
1122 ESAD = syscall.Errno(0x71)
1123 ESHUTDOWN = syscall.Errno(0x4d)
1124 ESOCKTNOSUPPORT = syscall.Errno(0x3f)
1125 ESOFT = syscall.Errno(0x6f)
1126 ESPIPE = syscall.Errno(0x1d)
1127 ESRCH = syscall.Errno(0x3)
1128 ESTALE = syscall.Errno(0x34)
1129 ESYSERROR = syscall.Errno(0x5a)
1130 ETIME = syscall.Errno(0x77)
1131 ETIMEDOUT = syscall.Errno(0x4e)
1132 ETOOMANYREFS = syscall.Errno(0x73)
1133 ETXTBSY = syscall.Errno(0x1a)
1134 EUNATCH = syscall.Errno(0x2a)
1135 EUSERS = syscall.Errno(0x54)
1136 EWOULDBLOCK = syscall.Errno(0xb)
1137 EWRPROTECT = syscall.Errno(0x2f)
1138 EXDEV = syscall.Errno(0x12)
1139 )
1140
1141 // Signals
1142 const (
1143 SIGABRT = syscall.Signal(0x6)
1144 SIGAIO = syscall.Signal(0x17)
1145 SIGALRM = syscall.Signal(0xe)
1146 SIGALRM1 = syscall.Signal(0x26)
1147 SIGBUS = syscall.Signal(0xa)
1148 SIGCAPI = syscall.Signal(0x31)
1149 SIGCHLD = syscall.Signal(0x14)
1150 SIGCLD = syscall.Signal(0x14)
1151 SIGCONT = syscall.Signal(0x13)
1152 SIGCPUFAIL = syscall.Signal(0x3b)
1153 SIGDANGER = syscall.Signal(0x21)
1154 SIGEMT = syscall.Signal(0x7)
1155 SIGFPE = syscall.Signal(0x8)
1156 SIGGRANT = syscall.Signal(0x3c)
1157 SIGHUP = syscall.Signal(0x1)
1158 SIGILL = syscall.Signal(0x4)
1159 SIGINT = syscall.Signal(0x2)
1160 SIGIO = syscall.Signal(0x17)
1161 SIGIOINT = syscall.Signal(0x10)
1162 SIGIOT = syscall.Signal(0x6)
1163 SIGKAP = syscall.Signal(0x3c)
1164 SIGKILL = syscall.Signal(0x9)
1165 SIGLOST = syscall.Signal(0x6)
1166 SIGMAX = syscall.Signal(0xff)
1167 SIGMAX32 = syscall.Signal(0x3f)
1168 SIGMIGRATE = syscall.Signal(0x23)
1169 SIGMSG = syscall.Signal(0x1b)
1170 SIGPIPE = syscall.Signal(0xd)
1171 SIGPOLL = syscall.Signal(0x17)
1172 SIGPRE = syscall.Signal(0x24)
1173 SIGPROF = syscall.Signal(0x20)
1174 SIGPTY = syscall.Signal(0x17)
1175 SIGPWR = syscall.Signal(0x1d)
1176 SIGQUIT = syscall.Signal(0x3)
1177 SIGRECONFIG = syscall.Signal(0x3a)
1178 SIGRETRACT = syscall.Signal(0x3d)
1179 SIGSAK = syscall.Signal(0x3f)
1180 SIGSEGV = syscall.Signal(0xb)
1181 SIGSOUND = syscall.Signal(0x3e)
1182 SIGSTOP = syscall.Signal(0x11)
1183 SIGSYS = syscall.Signal(0xc)
1184 SIGSYSERROR = syscall.Signal(0x30)
1185 SIGTALRM = syscall.Signal(0x26)
1186 SIGTERM = syscall.Signal(0xf)
1187 SIGTRAP = syscall.Signal(0x5)
1188 SIGTSTP = syscall.Signal(0x12)
1189 SIGTTIN = syscall.Signal(0x15)
1190 SIGTTOU = syscall.Signal(0x16)
1191 SIGURG = syscall.Signal(0x10)
1192 SIGUSR1 = syscall.Signal(0x1e)
1193 SIGUSR2 = syscall.Signal(0x1f)
1194 SIGVIRT = syscall.Signal(0x25)
1195 SIGVTALRM = syscall.Signal(0x22)
1196 SIGWAITING = syscall.Signal(0x27)
1197 SIGWINCH = syscall.Signal(0x1c)
1198 SIGXCPU = syscall.Signal(0x18)
1199 SIGXFSZ = syscall.Signal(0x19)
1200 )
1201
1202 // Error table
1203 var errorList = [...]struct {
1204 num syscall.Errno
1205 name string
1206 desc string
1207 }{
1208 {1, "EPERM", "not owner"},
1209 {2, "ENOENT", "no such file or directory"},
1210 {3, "ESRCH", "no such process"},
1211 {4, "EINTR", "interrupted system call"},
1212 {5, "EIO", "I/O error"},
1213 {6, "ENXIO", "no such device or address"},
1214 {7, "E2BIG", "arg list too long"},
1215 {8, "ENOEXEC", "exec format error"},
1216 {9, "EBADF", "bad file number"},
1217 {10, "ECHILD", "no child processes"},
1218 {11, "EWOULDBLOCK", "resource temporarily unavailable"},
1219 {12, "ENOMEM", "not enough space"},
1220 {13, "EACCES", "permission denied"},
1221 {14, "EFAULT", "bad address"},
1222 {15, "ENOTBLK", "block device required"},
1223 {16, "EBUSY", "device busy"},
1224 {17, "ENOTEMPTY", "file exists"},
1225 {18, "EXDEV", "cross-device link"},
1226 {19, "ENODEV", "no such device"},
1227 {20, "ENOTDIR", "not a directory"},
1228 {21, "EISDIR", "is a directory"},
1229 {22, "EINVAL", "invalid argument"},
1230 {23, "ENFILE", "file table overflow"},
1231 {24, "EMFILE", "too many open files"},
1232 {25, "ENOTTY", "not a typewriter"},
1233 {26, "ETXTBSY", "text file busy"},
1234 {27, "EFBIG", "file too large"},
1235 {28, "ENOSPC", "no space left on device"},
1236 {29, "ESPIPE", "illegal seek"},
1237 {30, "EROFS", "read-only file system"},
1238 {31, "EMLINK", "too many links"},
1239 {32, "EPIPE", "broken pipe"},
1240 {33, "EDOM", "argument out of domain"},
1241 {34, "ERANGE", "result too large"},
1242 {35, "ENOMSG", "no message of desired type"},
1243 {36, "EIDRM", "identifier removed"},
1244 {37, "ECHRNG", "channel number out of range"},
1245 {38, "EL2NSYNC", "level 2 not synchronized"},
1246 {39, "EL3HLT", "level 3 halted"},
1247 {40, "EL3RST", "level 3 reset"},
1248 {41, "ELNRNG", "link number out of range"},
1249 {42, "EUNATCH", "protocol driver not attached"},
1250 {43, "ENOCSI", "no CSI structure available"},
1251 {44, "EL2HLT", "level 2 halted"},
1252 {45, "EDEADLK", "deadlock condition if locked"},
1253 {46, "ENOTREADY", "device not ready"},
1254 {47, "EWRPROTECT", "write-protected media"},
1255 {48, "EFORMAT", "unformatted or incompatible media"},
1256 {49, "ENOLCK", "no locks available"},
1257 {50, "ENOCONNECT", "cannot Establish Connection"},
1258 {52, "ESTALE", "missing file or filesystem"},
1259 {53, "EDIST", "requests blocked by Administrator"},
1260 {55, "EINPROGRESS", "operation now in progress"},
1261 {56, "EALREADY", "operation already in progress"},
1262 {57, "ENOTSOCK", "socket operation on non-socket"},
1263 {58, "EDESTADDREQ", "destination address required"},
1264 {59, "EMSGSIZE", "message too long"},
1265 {60, "EPROTOTYPE", "protocol wrong type for socket"},
1266 {61, "ENOPROTOOPT", "protocol not available"},
1267 {62, "EPROTONOSUPPORT", "protocol not supported"},
1268 {63, "ESOCKTNOSUPPORT", "socket type not supported"},
1269 {64, "EOPNOTSUPP", "operation not supported on socket"},
1270 {65, "EPFNOSUPPORT", "protocol family not supported"},
1271 {66, "EAFNOSUPPORT", "addr family not supported by protocol"},
1272 {67, "EADDRINUSE", "address already in use"},
1273 {68, "EADDRNOTAVAIL", "can't assign requested address"},
1274 {69, "ENETDOWN", "network is down"},
1275 {70, "ENETUNREACH", "network is unreachable"},
1276 {71, "ENETRESET", "network dropped connection on reset"},
1277 {72, "ECONNABORTED", "software caused connection abort"},
1278 {73, "ECONNRESET", "connection reset by peer"},
1279 {74, "ENOBUFS", "no buffer space available"},
1280 {75, "EISCONN", "socket is already connected"},
1281 {76, "ENOTCONN", "socket is not connected"},
1282 {77, "ESHUTDOWN", "can't send after socket shutdown"},
1283 {78, "ETIMEDOUT", "connection timed out"},
1284 {79, "ECONNREFUSED", "connection refused"},
1285 {80, "EHOSTDOWN", "host is down"},
1286 {81, "EHOSTUNREACH", "no route to host"},
1287 {82, "ERESTART", "restart the system call"},
1288 {83, "EPROCLIM", "too many processes"},
1289 {84, "EUSERS", "too many users"},
1290 {85, "ELOOP", "too many levels of symbolic links"},
1291 {86, "ENAMETOOLONG", "file name too long"},
1292 {88, "EDQUOT", "disk quota exceeded"},
1293 {89, "ECORRUPT", "invalid file system control data detected"},
1294 {90, "ESYSERROR", "for future use "},
1295 {93, "EREMOTE", "item is not local to host"},
1296 {94, "ENOTRECOVERABLE", "state not recoverable "},
1297 {95, "EOWNERDEAD", "previous owner died "},
1298 {109, "ENOSYS", "function not implemented"},
1299 {110, "EMEDIA", "media surface error"},
1300 {111, "ESOFT", "I/O completed, but needs relocation"},
1301 {112, "ENOATTR", "no attribute found"},
1302 {113, "ESAD", "security Authentication Denied"},
1303 {114, "ENOTRUST", "not a Trusted Program"},
1304 {115, "ETOOMANYREFS", "too many references: can't splice"},
1305 {116, "EILSEQ", "invalid wide character"},
1306 {117, "ECANCELED", "asynchronous I/O cancelled"},
1307 {118, "ENOSR", "out of STREAMS resources"},
1308 {119, "ETIME", "system call timed out"},
1309 {120, "EBADMSG", "next message has wrong type"},
1310 {121, "EPROTO", "error in protocol"},
1311 {122, "ENODATA", "no message on stream head read q"},
1312 {123, "ENOSTR", "fd not associated with a stream"},
1313 {124, "ENOTSUP", "unsupported attribute value"},
1314 {125, "EMULTIHOP", "multihop is not allowed"},
1315 {126, "ENOLINK", "the server link has been severed"},
1316 {127, "EOVERFLOW", "value too large to be stored in data type"},
1317 }
1318
1319 // Signal table
1320 var signalList = [...]struct {
1321 num syscall.Signal
1322 name string
1323 desc string
1324 }{
1325 {1, "SIGHUP", "hangup"},
1326 {2, "SIGINT", "interrupt"},
1327 {3, "SIGQUIT", "quit"},
1328 {4, "SIGILL", "illegal instruction"},
1329 {5, "SIGTRAP", "trace/BPT trap"},
1330 {6, "SIGIOT", "IOT/Abort trap"},
1331 {7, "SIGEMT", "EMT trap"},
1332 {8, "SIGFPE", "floating point exception"},
1333 {9, "SIGKILL", "killed"},
1334 {10, "SIGBUS", "bus error"},
1335 {11, "SIGSEGV", "segmentation fault"},
1336 {12, "SIGSYS", "bad system call"},
1337 {13, "SIGPIPE", "broken pipe"},
1338 {14, "SIGALRM", "alarm clock"},
1339 {15, "SIGTERM", "terminated"},
1340 {16, "SIGURG", "urgent I/O condition"},
1341 {17, "SIGSTOP", "stopped (signal)"},
1342 {18, "SIGTSTP", "stopped"},
1343 {19, "SIGCONT", "continued"},
1344 {20, "SIGCHLD", "child exited"},
1345 {21, "SIGTTIN", "stopped (tty input)"},
1346 {22, "SIGTTOU", "stopped (tty output)"},
1347 {23, "SIGIO", "I/O possible/complete"},
1348 {24, "SIGXCPU", "cputime limit exceeded"},
1349 {25, "SIGXFSZ", "filesize limit exceeded"},
1350 {27, "SIGMSG", "input device data"},
1351 {28, "SIGWINCH", "window size changes"},
1352 {29, "SIGPWR", "power-failure"},
1353 {30, "SIGUSR1", "user defined signal 1"},
1354 {31, "SIGUSR2", "user defined signal 2"},
1355 {32, "SIGPROF", "profiling timer expired"},
1356 {33, "SIGDANGER", "paging space low"},
1357 {34, "SIGVTALRM", "virtual timer expired"},
1358 {35, "SIGMIGRATE", "signal 35"},
1359 {36, "SIGPRE", "signal 36"},
1360 {37, "SIGVIRT", "signal 37"},
1361 {38, "SIGTALRM", "signal 38"},
1362 {39, "SIGWAITING", "signal 39"},
1363 {48, "SIGSYSERROR", "signal 48"},
1364 {49, "SIGCAPI", "signal 49"},
1365 {58, "SIGRECONFIG", "signal 58"},
1366 {59, "SIGCPUFAIL", "CPU Failure Predicted"},
1367 {60, "SIGGRANT", "monitor mode granted"},
1368 {61, "SIGRETRACT", "monitor mode retracted"},
1369 {62, "SIGSOUND", "sound completed"},
1370 {63, "SIGMAX32", "secure attention"},
1371 {255, "SIGMAX", "signal 255"},
1372 }
4848 AF_UNSPEC = 0x0
4949 AF_UTUN = 0x26
5050 ALTWERASE = 0x200
51 ATTR_BIT_MAP_COUNT = 0x5
52 ATTR_CMN_ACCESSMASK = 0x20000
53 ATTR_CMN_ACCTIME = 0x1000
54 ATTR_CMN_ADDEDTIME = 0x10000000
55 ATTR_CMN_BKUPTIME = 0x2000
56 ATTR_CMN_CHGTIME = 0x800
57 ATTR_CMN_CRTIME = 0x200
58 ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
59 ATTR_CMN_DEVID = 0x2
60 ATTR_CMN_DOCUMENT_ID = 0x100000
61 ATTR_CMN_ERROR = 0x20000000
62 ATTR_CMN_EXTENDED_SECURITY = 0x400000
63 ATTR_CMN_FILEID = 0x2000000
64 ATTR_CMN_FLAGS = 0x40000
65 ATTR_CMN_FNDRINFO = 0x4000
66 ATTR_CMN_FSID = 0x4
67 ATTR_CMN_FULLPATH = 0x8000000
68 ATTR_CMN_GEN_COUNT = 0x80000
69 ATTR_CMN_GRPID = 0x10000
70 ATTR_CMN_GRPUUID = 0x1000000
71 ATTR_CMN_MODTIME = 0x400
72 ATTR_CMN_NAME = 0x1
73 ATTR_CMN_NAMEDATTRCOUNT = 0x80000
74 ATTR_CMN_NAMEDATTRLIST = 0x100000
75 ATTR_CMN_OBJID = 0x20
76 ATTR_CMN_OBJPERMANENTID = 0x40
77 ATTR_CMN_OBJTAG = 0x10
78 ATTR_CMN_OBJTYPE = 0x8
79 ATTR_CMN_OWNERID = 0x8000
80 ATTR_CMN_PARENTID = 0x4000000
81 ATTR_CMN_PAROBJID = 0x80
82 ATTR_CMN_RETURNED_ATTRS = 0x80000000
83 ATTR_CMN_SCRIPT = 0x100
84 ATTR_CMN_SETMASK = 0x41c7ff00
85 ATTR_CMN_USERACCESS = 0x200000
86 ATTR_CMN_UUID = 0x800000
87 ATTR_CMN_VALIDMASK = 0xffffffff
88 ATTR_CMN_VOLSETMASK = 0x6700
89 ATTR_FILE_ALLOCSIZE = 0x4
90 ATTR_FILE_CLUMPSIZE = 0x10
91 ATTR_FILE_DATAALLOCSIZE = 0x400
92 ATTR_FILE_DATAEXTENTS = 0x800
93 ATTR_FILE_DATALENGTH = 0x200
94 ATTR_FILE_DEVTYPE = 0x20
95 ATTR_FILE_FILETYPE = 0x40
96 ATTR_FILE_FORKCOUNT = 0x80
97 ATTR_FILE_FORKLIST = 0x100
98 ATTR_FILE_IOBLOCKSIZE = 0x8
99 ATTR_FILE_LINKCOUNT = 0x1
100 ATTR_FILE_RSRCALLOCSIZE = 0x2000
101 ATTR_FILE_RSRCEXTENTS = 0x4000
102 ATTR_FILE_RSRCLENGTH = 0x1000
103 ATTR_FILE_SETMASK = 0x20
104 ATTR_FILE_TOTALSIZE = 0x2
105 ATTR_FILE_VALIDMASK = 0x37ff
106 ATTR_VOL_ALLOCATIONCLUMP = 0x40
107 ATTR_VOL_ATTRIBUTES = 0x40000000
108 ATTR_VOL_CAPABILITIES = 0x20000
109 ATTR_VOL_DIRCOUNT = 0x400
110 ATTR_VOL_ENCODINGSUSED = 0x10000
111 ATTR_VOL_FILECOUNT = 0x200
112 ATTR_VOL_FSTYPE = 0x1
113 ATTR_VOL_INFO = 0x80000000
114 ATTR_VOL_IOBLOCKSIZE = 0x80
115 ATTR_VOL_MAXOBJCOUNT = 0x800
116 ATTR_VOL_MINALLOCATION = 0x20
117 ATTR_VOL_MOUNTEDDEVICE = 0x8000
118 ATTR_VOL_MOUNTFLAGS = 0x4000
119 ATTR_VOL_MOUNTPOINT = 0x1000
120 ATTR_VOL_NAME = 0x2000
121 ATTR_VOL_OBJCOUNT = 0x100
122 ATTR_VOL_QUOTA_SIZE = 0x10000000
123 ATTR_VOL_RESERVED_SIZE = 0x20000000
124 ATTR_VOL_SETMASK = 0x80002000
125 ATTR_VOL_SIGNATURE = 0x2
126 ATTR_VOL_SIZE = 0x4
127 ATTR_VOL_SPACEAVAIL = 0x10
128 ATTR_VOL_SPACEFREE = 0x8
129 ATTR_VOL_UUID = 0x40000
130 ATTR_VOL_VALIDMASK = 0xf007ffff
51131 B0 = 0x0
52132 B110 = 0x6e
53133 B115200 = 0x1c200
168248 CSTOP = 0x13
169249 CSTOPB = 0x400
170250 CSUSP = 0x1a
251 CTL_HW = 0x6
252 CTL_KERN = 0x1
171253 CTL_MAXNAME = 0xc
172254 CTL_NET = 0x4
173255 DLT_A429 = 0xb8
389471 FF1 = 0x4000
390472 FFDLY = 0x4000
391473 FLUSHO = 0x800000
474 FSOPT_ATTR_CMN_EXTENDED = 0x20
475 FSOPT_NOFOLLOW = 0x1
476 FSOPT_NOINMEMUPDATE = 0x2
477 FSOPT_PACK_INVAL_ATTRS = 0x8
478 FSOPT_REPORT_FULLSIZE = 0x4
392479 F_ADDFILESIGS = 0x3d
393480 F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
394481 F_ADDFILESIGS_RETURN = 0x61
424511 F_PATHPKG_CHECK = 0x34
425512 F_PEOFPOSMODE = 0x3
426513 F_PREALLOCATE = 0x2a
514 F_PUNCHHOLE = 0x63
427515 F_RDADVISE = 0x2c
428516 F_RDAHEAD = 0x2d
429517 F_RDLCK = 0x1
440528 F_SINGLE_WRITER = 0x4c
441529 F_THAW_FS = 0x36
442530 F_TRANSCODEKEY = 0x4b
531 F_TRIM_ACTIVE_FILE = 0x64
443532 F_UNLCK = 0x2
444533 F_VOLPOSMODE = 0x4
445534 F_WRLCK = 0x3
446535 HUPCL = 0x4000
536 HW_MACHINE = 0x1
447537 ICANON = 0x100
448538 ICMP6_FILTER = 0x12
449539 ICRNL = 0x100
680770 IPV6_FAITH = 0x1d
681771 IPV6_FLOWINFO_MASK = 0xffffff0f
682772 IPV6_FLOWLABEL_MASK = 0xffff0f00
773 IPV6_FLOW_ECN_MASK = 0x300
683774 IPV6_FRAGTTL = 0x3c
684775 IPV6_FW_ADD = 0x1e
685776 IPV6_FW_DEL = 0x1f
770861 IP_RECVOPTS = 0x5
771862 IP_RECVPKTINFO = 0x1a
772863 IP_RECVRETOPTS = 0x6
864 IP_RECVTOS = 0x1b
773865 IP_RECVTTL = 0x18
774866 IP_RETOPTS = 0x8
775867 IP_RF = 0x8000
788880 IXANY = 0x800
789881 IXOFF = 0x400
790882 IXON = 0x200
883 KERN_HOSTNAME = 0xa
884 KERN_OSRELEASE = 0x2
885 KERN_OSTYPE = 0x1
886 KERN_VERSION = 0x4
791887 LOCK_EX = 0x2
792888 LOCK_NB = 0x4
793889 LOCK_SH = 0x1
13761472 WORDSIZE = 0x20
13771473 WSTOPPED = 0x8
13781474 WUNTRACED = 0x2
1475 XATTR_CREATE = 0x2
1476 XATTR_NODEFAULT = 0x10
1477 XATTR_NOFOLLOW = 0x1
1478 XATTR_NOSECURITY = 0x8
1479 XATTR_REPLACE = 0x4
1480 XATTR_SHOWCOMPRESSION = 0x20
13791481 )
13801482
13811483 // Errors
15271629 )
15281630
15291631 // Error table
1530 var errors = [...]string{
1531 1: "operation not permitted",
1532 2: "no such file or directory",
1533 3: "no such process",
1534 4: "interrupted system call",
1535 5: "input/output error",
1536 6: "device not configured",
1537 7: "argument list too long",
1538 8: "exec format error",
1539 9: "bad file descriptor",
1540 10: "no child processes",
1541 11: "resource deadlock avoided",
1542 12: "cannot allocate memory",
1543 13: "permission denied",
1544 14: "bad address",
1545 15: "block device required",
1546 16: "resource busy",
1547 17: "file exists",
1548 18: "cross-device link",
1549 19: "operation not supported by device",
1550 20: "not a directory",
1551 21: "is a directory",
1552 22: "invalid argument",
1553 23: "too many open files in system",
1554 24: "too many open files",
1555 25: "inappropriate ioctl for device",
1556 26: "text file busy",
1557 27: "file too large",
1558 28: "no space left on device",
1559 29: "illegal seek",
1560 30: "read-only file system",
1561 31: "too many links",
1562 32: "broken pipe",
1563 33: "numerical argument out of domain",
1564 34: "result too large",
1565 35: "resource temporarily unavailable",
1566 36: "operation now in progress",
1567 37: "operation already in progress",
1568 38: "socket operation on non-socket",
1569 39: "destination address required",
1570 40: "message too long",
1571 41: "protocol wrong type for socket",
1572 42: "protocol not available",
1573 43: "protocol not supported",
1574 44: "socket type not supported",
1575 45: "operation not supported",
1576 46: "protocol family not supported",
1577 47: "address family not supported by protocol family",
1578 48: "address already in use",
1579 49: "can't assign requested address",
1580 50: "network is down",
1581 51: "network is unreachable",
1582 52: "network dropped connection on reset",
1583 53: "software caused connection abort",
1584 54: "connection reset by peer",
1585 55: "no buffer space available",
1586 56: "socket is already connected",
1587 57: "socket is not connected",
1588 58: "can't send after socket shutdown",
1589 59: "too many references: can't splice",
1590 60: "operation timed out",
1591 61: "connection refused",
1592 62: "too many levels of symbolic links",
1593 63: "file name too long",
1594 64: "host is down",
1595 65: "no route to host",
1596 66: "directory not empty",
1597 67: "too many processes",
1598 68: "too many users",
1599 69: "disc quota exceeded",
1600 70: "stale NFS file handle",
1601 71: "too many levels of remote in path",
1602 72: "RPC struct is bad",
1603 73: "RPC version wrong",
1604 74: "RPC prog. not avail",
1605 75: "program version wrong",
1606 76: "bad procedure for program",
1607 77: "no locks available",
1608 78: "function not implemented",
1609 79: "inappropriate file type or format",
1610 80: "authentication error",
1611 81: "need authenticator",
1612 82: "device power is off",
1613 83: "device error",
1614 84: "value too large to be stored in data type",
1615 85: "bad executable (or shared library)",
1616 86: "bad CPU type in executable",
1617 87: "shared library version mismatch",
1618 88: "malformed Mach-o file",
1619 89: "operation canceled",
1620 90: "identifier removed",
1621 91: "no message of desired type",
1622 92: "illegal byte sequence",
1623 93: "attribute not found",
1624 94: "bad message",
1625 95: "EMULTIHOP (Reserved)",
1626 96: "no message available on STREAM",
1627 97: "ENOLINK (Reserved)",
1628 98: "no STREAM resources",
1629 99: "not a STREAM",
1630 100: "protocol error",
1631 101: "STREAM ioctl timeout",
1632 102: "operation not supported on socket",
1633 103: "policy not found",
1634 104: "state not recoverable",
1635 105: "previous owner died",
1636 106: "interface output queue is full",
1632 var errorList = [...]struct {
1633 num syscall.Errno
1634 name string
1635 desc string
1636 }{
1637 {1, "EPERM", "operation not permitted"},
1638 {2, "ENOENT", "no such file or directory"},
1639 {3, "ESRCH", "no such process"},
1640 {4, "EINTR", "interrupted system call"},
1641 {5, "EIO", "input/output error"},
1642 {6, "ENXIO", "device not configured"},
1643 {7, "E2BIG", "argument list too long"},
1644 {8, "ENOEXEC", "exec format error"},
1645 {9, "EBADF", "bad file descriptor"},
1646 {10, "ECHILD", "no child processes"},
1647 {11, "EDEADLK", "resource deadlock avoided"},
1648 {12, "ENOMEM", "cannot allocate memory"},
1649 {13, "EACCES", "permission denied"},
1650 {14, "EFAULT", "bad address"},
1651 {15, "ENOTBLK", "block device required"},
1652 {16, "EBUSY", "resource busy"},
1653 {17, "EEXIST", "file exists"},
1654 {18, "EXDEV", "cross-device link"},
1655 {19, "ENODEV", "operation not supported by device"},
1656 {20, "ENOTDIR", "not a directory"},
1657 {21, "EISDIR", "is a directory"},
1658 {22, "EINVAL", "invalid argument"},
1659 {23, "ENFILE", "too many open files in system"},
1660 {24, "EMFILE", "too many open files"},
1661 {25, "ENOTTY", "inappropriate ioctl for device"},
1662 {26, "ETXTBSY", "text file busy"},
1663 {27, "EFBIG", "file too large"},
1664 {28, "ENOSPC", "no space left on device"},
1665 {29, "ESPIPE", "illegal seek"},
1666 {30, "EROFS", "read-only file system"},
1667 {31, "EMLINK", "too many links"},
1668 {32, "EPIPE", "broken pipe"},
1669 {33, "EDOM", "numerical argument out of domain"},
1670 {34, "ERANGE", "result too large"},
1671 {35, "EAGAIN", "resource temporarily unavailable"},
1672 {36, "EINPROGRESS", "operation now in progress"},
1673 {37, "EALREADY", "operation already in progress"},
1674 {38, "ENOTSOCK", "socket operation on non-socket"},
1675 {39, "EDESTADDRREQ", "destination address required"},
1676 {40, "EMSGSIZE", "message too long"},
1677 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1678 {42, "ENOPROTOOPT", "protocol not available"},
1679 {43, "EPROTONOSUPPORT", "protocol not supported"},
1680 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1681 {45, "ENOTSUP", "operation not supported"},
1682 {46, "EPFNOSUPPORT", "protocol family not supported"},
1683 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1684 {48, "EADDRINUSE", "address already in use"},
1685 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1686 {50, "ENETDOWN", "network is down"},
1687 {51, "ENETUNREACH", "network is unreachable"},
1688 {52, "ENETRESET", "network dropped connection on reset"},
1689 {53, "ECONNABORTED", "software caused connection abort"},
1690 {54, "ECONNRESET", "connection reset by peer"},
1691 {55, "ENOBUFS", "no buffer space available"},
1692 {56, "EISCONN", "socket is already connected"},
1693 {57, "ENOTCONN", "socket is not connected"},
1694 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1695 {59, "ETOOMANYREFS", "too many references: can't splice"},
1696 {60, "ETIMEDOUT", "operation timed out"},
1697 {61, "ECONNREFUSED", "connection refused"},
1698 {62, "ELOOP", "too many levels of symbolic links"},
1699 {63, "ENAMETOOLONG", "file name too long"},
1700 {64, "EHOSTDOWN", "host is down"},
1701 {65, "EHOSTUNREACH", "no route to host"},
1702 {66, "ENOTEMPTY", "directory not empty"},
1703 {67, "EPROCLIM", "too many processes"},
1704 {68, "EUSERS", "too many users"},
1705 {69, "EDQUOT", "disc quota exceeded"},
1706 {70, "ESTALE", "stale NFS file handle"},
1707 {71, "EREMOTE", "too many levels of remote in path"},
1708 {72, "EBADRPC", "RPC struct is bad"},
1709 {73, "ERPCMISMATCH", "RPC version wrong"},
1710 {74, "EPROGUNAVAIL", "RPC prog. not avail"},
1711 {75, "EPROGMISMATCH", "program version wrong"},
1712 {76, "EPROCUNAVAIL", "bad procedure for program"},
1713 {77, "ENOLCK", "no locks available"},
1714 {78, "ENOSYS", "function not implemented"},
1715 {79, "EFTYPE", "inappropriate file type or format"},
1716 {80, "EAUTH", "authentication error"},
1717 {81, "ENEEDAUTH", "need authenticator"},
1718 {82, "EPWROFF", "device power is off"},
1719 {83, "EDEVERR", "device error"},
1720 {84, "EOVERFLOW", "value too large to be stored in data type"},
1721 {85, "EBADEXEC", "bad executable (or shared library)"},
1722 {86, "EBADARCH", "bad CPU type in executable"},
1723 {87, "ESHLIBVERS", "shared library version mismatch"},
1724 {88, "EBADMACHO", "malformed Mach-o file"},
1725 {89, "ECANCELED", "operation canceled"},
1726 {90, "EIDRM", "identifier removed"},
1727 {91, "ENOMSG", "no message of desired type"},
1728 {92, "EILSEQ", "illegal byte sequence"},
1729 {93, "ENOATTR", "attribute not found"},
1730 {94, "EBADMSG", "bad message"},
1731 {95, "EMULTIHOP", "EMULTIHOP (Reserved)"},
1732 {96, "ENODATA", "no message available on STREAM"},
1733 {97, "ENOLINK", "ENOLINK (Reserved)"},
1734 {98, "ENOSR", "no STREAM resources"},
1735 {99, "ENOSTR", "not a STREAM"},
1736 {100, "EPROTO", "protocol error"},
1737 {101, "ETIME", "STREAM ioctl timeout"},
1738 {102, "EOPNOTSUPP", "operation not supported on socket"},
1739 {103, "ENOPOLICY", "policy not found"},
1740 {104, "ENOTRECOVERABLE", "state not recoverable"},
1741 {105, "EOWNERDEAD", "previous owner died"},
1742 {106, "EQFULL", "interface output queue is full"},
16371743 }
16381744
16391745 // Signal table
1640 var signals = [...]string{
1641 1: "hangup",
1642 2: "interrupt",
1643 3: "quit",
1644 4: "illegal instruction",
1645 5: "trace/BPT trap",
1646 6: "abort trap",
1647 7: "EMT trap",
1648 8: "floating point exception",
1649 9: "killed",
1650 10: "bus error",
1651 11: "segmentation fault",
1652 12: "bad system call",
1653 13: "broken pipe",
1654 14: "alarm clock",
1655 15: "terminated",
1656 16: "urgent I/O condition",
1657 17: "suspended (signal)",
1658 18: "suspended",
1659 19: "continued",
1660 20: "child exited",
1661 21: "stopped (tty input)",
1662 22: "stopped (tty output)",
1663 23: "I/O possible",
1664 24: "cputime limit exceeded",
1665 25: "filesize limit exceeded",
1666 26: "virtual timer expired",
1667 27: "profiling timer expired",
1668 28: "window size changes",
1669 29: "information request",
1670 30: "user defined signal 1",
1671 31: "user defined signal 2",
1746 var signalList = [...]struct {
1747 num syscall.Signal
1748 name string
1749 desc string
1750 }{
1751 {1, "SIGHUP", "hangup"},
1752 {2, "SIGINT", "interrupt"},
1753 {3, "SIGQUIT", "quit"},
1754 {4, "SIGILL", "illegal instruction"},
1755 {5, "SIGTRAP", "trace/BPT trap"},
1756 {6, "SIGABRT", "abort trap"},
1757 {7, "SIGEMT", "EMT trap"},
1758 {8, "SIGFPE", "floating point exception"},
1759 {9, "SIGKILL", "killed"},
1760 {10, "SIGBUS", "bus error"},
1761 {11, "SIGSEGV", "segmentation fault"},
1762 {12, "SIGSYS", "bad system call"},
1763 {13, "SIGPIPE", "broken pipe"},
1764 {14, "SIGALRM", "alarm clock"},
1765 {15, "SIGTERM", "terminated"},
1766 {16, "SIGURG", "urgent I/O condition"},
1767 {17, "SIGSTOP", "suspended (signal)"},
1768 {18, "SIGTSTP", "suspended"},
1769 {19, "SIGCONT", "continued"},
1770 {20, "SIGCHLD", "child exited"},
1771 {21, "SIGTTIN", "stopped (tty input)"},
1772 {22, "SIGTTOU", "stopped (tty output)"},
1773 {23, "SIGIO", "I/O possible"},
1774 {24, "SIGXCPU", "cputime limit exceeded"},
1775 {25, "SIGXFSZ", "filesize limit exceeded"},
1776 {26, "SIGVTALRM", "virtual timer expired"},
1777 {27, "SIGPROF", "profiling timer expired"},
1778 {28, "SIGWINCH", "window size changes"},
1779 {29, "SIGINFO", "information request"},
1780 {30, "SIGUSR1", "user defined signal 1"},
1781 {31, "SIGUSR2", "user defined signal 2"},
16721782 }
4848 AF_UNSPEC = 0x0
4949 AF_UTUN = 0x26
5050 ALTWERASE = 0x200
51 ATTR_BIT_MAP_COUNT = 0x5
52 ATTR_CMN_ACCESSMASK = 0x20000
53 ATTR_CMN_ACCTIME = 0x1000
54 ATTR_CMN_ADDEDTIME = 0x10000000
55 ATTR_CMN_BKUPTIME = 0x2000
56 ATTR_CMN_CHGTIME = 0x800
57 ATTR_CMN_CRTIME = 0x200
58 ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
59 ATTR_CMN_DEVID = 0x2
60 ATTR_CMN_DOCUMENT_ID = 0x100000
61 ATTR_CMN_ERROR = 0x20000000
62 ATTR_CMN_EXTENDED_SECURITY = 0x400000
63 ATTR_CMN_FILEID = 0x2000000
64 ATTR_CMN_FLAGS = 0x40000
65 ATTR_CMN_FNDRINFO = 0x4000
66 ATTR_CMN_FSID = 0x4
67 ATTR_CMN_FULLPATH = 0x8000000
68 ATTR_CMN_GEN_COUNT = 0x80000
69 ATTR_CMN_GRPID = 0x10000
70 ATTR_CMN_GRPUUID = 0x1000000
71 ATTR_CMN_MODTIME = 0x400
72 ATTR_CMN_NAME = 0x1
73 ATTR_CMN_NAMEDATTRCOUNT = 0x80000
74 ATTR_CMN_NAMEDATTRLIST = 0x100000
75 ATTR_CMN_OBJID = 0x20
76 ATTR_CMN_OBJPERMANENTID = 0x40
77 ATTR_CMN_OBJTAG = 0x10
78 ATTR_CMN_OBJTYPE = 0x8
79 ATTR_CMN_OWNERID = 0x8000
80 ATTR_CMN_PARENTID = 0x4000000
81 ATTR_CMN_PAROBJID = 0x80
82 ATTR_CMN_RETURNED_ATTRS = 0x80000000
83 ATTR_CMN_SCRIPT = 0x100
84 ATTR_CMN_SETMASK = 0x41c7ff00
85 ATTR_CMN_USERACCESS = 0x200000
86 ATTR_CMN_UUID = 0x800000
87 ATTR_CMN_VALIDMASK = 0xffffffff
88 ATTR_CMN_VOLSETMASK = 0x6700
89 ATTR_FILE_ALLOCSIZE = 0x4
90 ATTR_FILE_CLUMPSIZE = 0x10
91 ATTR_FILE_DATAALLOCSIZE = 0x400
92 ATTR_FILE_DATAEXTENTS = 0x800
93 ATTR_FILE_DATALENGTH = 0x200
94 ATTR_FILE_DEVTYPE = 0x20
95 ATTR_FILE_FILETYPE = 0x40
96 ATTR_FILE_FORKCOUNT = 0x80
97 ATTR_FILE_FORKLIST = 0x100
98 ATTR_FILE_IOBLOCKSIZE = 0x8
99 ATTR_FILE_LINKCOUNT = 0x1
100 ATTR_FILE_RSRCALLOCSIZE = 0x2000
101 ATTR_FILE_RSRCEXTENTS = 0x4000
102 ATTR_FILE_RSRCLENGTH = 0x1000
103 ATTR_FILE_SETMASK = 0x20
104 ATTR_FILE_TOTALSIZE = 0x2
105 ATTR_FILE_VALIDMASK = 0x37ff
106 ATTR_VOL_ALLOCATIONCLUMP = 0x40
107 ATTR_VOL_ATTRIBUTES = 0x40000000
108 ATTR_VOL_CAPABILITIES = 0x20000
109 ATTR_VOL_DIRCOUNT = 0x400
110 ATTR_VOL_ENCODINGSUSED = 0x10000
111 ATTR_VOL_FILECOUNT = 0x200
112 ATTR_VOL_FSTYPE = 0x1
113 ATTR_VOL_INFO = 0x80000000
114 ATTR_VOL_IOBLOCKSIZE = 0x80
115 ATTR_VOL_MAXOBJCOUNT = 0x800
116 ATTR_VOL_MINALLOCATION = 0x20
117 ATTR_VOL_MOUNTEDDEVICE = 0x8000
118 ATTR_VOL_MOUNTFLAGS = 0x4000
119 ATTR_VOL_MOUNTPOINT = 0x1000
120 ATTR_VOL_NAME = 0x2000
121 ATTR_VOL_OBJCOUNT = 0x100
122 ATTR_VOL_QUOTA_SIZE = 0x10000000
123 ATTR_VOL_RESERVED_SIZE = 0x20000000
124 ATTR_VOL_SETMASK = 0x80002000
125 ATTR_VOL_SIGNATURE = 0x2
126 ATTR_VOL_SIZE = 0x4
127 ATTR_VOL_SPACEAVAIL = 0x10
128 ATTR_VOL_SPACEFREE = 0x8
129 ATTR_VOL_UUID = 0x40000
130 ATTR_VOL_VALIDMASK = 0xf007ffff
51131 B0 = 0x0
52132 B110 = 0x6e
53133 B115200 = 0x1c200
168248 CSTOP = 0x13
169249 CSTOPB = 0x400
170250 CSUSP = 0x1a
251 CTL_HW = 0x6
252 CTL_KERN = 0x1
171253 CTL_MAXNAME = 0xc
172254 CTL_NET = 0x4
173255 DLT_A429 = 0xb8
389471 FF1 = 0x4000
390472 FFDLY = 0x4000
391473 FLUSHO = 0x800000
474 FSOPT_ATTR_CMN_EXTENDED = 0x20
475 FSOPT_NOFOLLOW = 0x1
476 FSOPT_NOINMEMUPDATE = 0x2
477 FSOPT_PACK_INVAL_ATTRS = 0x8
478 FSOPT_REPORT_FULLSIZE = 0x4
392479 F_ADDFILESIGS = 0x3d
393480 F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
394481 F_ADDFILESIGS_RETURN = 0x61
424511 F_PATHPKG_CHECK = 0x34
425512 F_PEOFPOSMODE = 0x3
426513 F_PREALLOCATE = 0x2a
514 F_PUNCHHOLE = 0x63
427515 F_RDADVISE = 0x2c
428516 F_RDAHEAD = 0x2d
429517 F_RDLCK = 0x1
440528 F_SINGLE_WRITER = 0x4c
441529 F_THAW_FS = 0x36
442530 F_TRANSCODEKEY = 0x4b
531 F_TRIM_ACTIVE_FILE = 0x64
443532 F_UNLCK = 0x2
444533 F_VOLPOSMODE = 0x4
445534 F_WRLCK = 0x3
446535 HUPCL = 0x4000
536 HW_MACHINE = 0x1
447537 ICANON = 0x100
448538 ICMP6_FILTER = 0x12
449539 ICRNL = 0x100
680770 IPV6_FAITH = 0x1d
681771 IPV6_FLOWINFO_MASK = 0xffffff0f
682772 IPV6_FLOWLABEL_MASK = 0xffff0f00
773 IPV6_FLOW_ECN_MASK = 0x300
683774 IPV6_FRAGTTL = 0x3c
684775 IPV6_FW_ADD = 0x1e
685776 IPV6_FW_DEL = 0x1f
770861 IP_RECVOPTS = 0x5
771862 IP_RECVPKTINFO = 0x1a
772863 IP_RECVRETOPTS = 0x6
864 IP_RECVTOS = 0x1b
773865 IP_RECVTTL = 0x18
774866 IP_RETOPTS = 0x8
775867 IP_RF = 0x8000
788880 IXANY = 0x800
789881 IXOFF = 0x400
790882 IXON = 0x200
883 KERN_HOSTNAME = 0xa
884 KERN_OSRELEASE = 0x2
885 KERN_OSTYPE = 0x1
886 KERN_VERSION = 0x4
791887 LOCK_EX = 0x2
792888 LOCK_NB = 0x4
793889 LOCK_SH = 0x1
13761472 WORDSIZE = 0x40
13771473 WSTOPPED = 0x8
13781474 WUNTRACED = 0x2
1475 XATTR_CREATE = 0x2
1476 XATTR_NODEFAULT = 0x10
1477 XATTR_NOFOLLOW = 0x1
1478 XATTR_NOSECURITY = 0x8
1479 XATTR_REPLACE = 0x4
1480 XATTR_SHOWCOMPRESSION = 0x20
13791481 )
13801482
13811483 // Errors
15271629 )
15281630
15291631 // Error table
1530 var errors = [...]string{
1531 1: "operation not permitted",
1532 2: "no such file or directory",
1533 3: "no such process",
1534 4: "interrupted system call",
1535 5: "input/output error",
1536 6: "device not configured",
1537 7: "argument list too long",
1538 8: "exec format error",
1539 9: "bad file descriptor",
1540 10: "no child processes",
1541 11: "resource deadlock avoided",
1542 12: "cannot allocate memory",
1543 13: "permission denied",
1544 14: "bad address",
1545 15: "block device required",
1546 16: "resource busy",
1547 17: "file exists",
1548 18: "cross-device link",
1549 19: "operation not supported by device",
1550 20: "not a directory",
1551 21: "is a directory",
1552 22: "invalid argument",
1553 23: "too many open files in system",
1554 24: "too many open files",
1555 25: "inappropriate ioctl for device",
1556 26: "text file busy",
1557 27: "file too large",
1558 28: "no space left on device",
1559 29: "illegal seek",
1560 30: "read-only file system",
1561 31: "too many links",
1562 32: "broken pipe",
1563 33: "numerical argument out of domain",
1564 34: "result too large",
1565 35: "resource temporarily unavailable",
1566 36: "operation now in progress",
1567 37: "operation already in progress",
1568 38: "socket operation on non-socket",
1569 39: "destination address required",
1570 40: "message too long",
1571 41: "protocol wrong type for socket",
1572 42: "protocol not available",
1573 43: "protocol not supported",
1574 44: "socket type not supported",
1575 45: "operation not supported",
1576 46: "protocol family not supported",
1577 47: "address family not supported by protocol family",
1578 48: "address already in use",
1579 49: "can't assign requested address",
1580 50: "network is down",
1581 51: "network is unreachable",
1582 52: "network dropped connection on reset",
1583 53: "software caused connection abort",
1584 54: "connection reset by peer",
1585 55: "no buffer space available",
1586 56: "socket is already connected",
1587 57: "socket is not connected",
1588 58: "can't send after socket shutdown",
1589 59: "too many references: can't splice",
1590 60: "operation timed out",
1591 61: "connection refused",
1592 62: "too many levels of symbolic links",
1593 63: "file name too long",
1594 64: "host is down",
1595 65: "no route to host",
1596 66: "directory not empty",
1597 67: "too many processes",
1598 68: "too many users",
1599 69: "disc quota exceeded",
1600 70: "stale NFS file handle",
1601 71: "too many levels of remote in path",
1602 72: "RPC struct is bad",
1603 73: "RPC version wrong",
1604 74: "RPC prog. not avail",
1605 75: "program version wrong",
1606 76: "bad procedure for program",
1607 77: "no locks available",
1608 78: "function not implemented",
1609 79: "inappropriate file type or format",
1610 80: "authentication error",
1611 81: "need authenticator",
1612 82: "device power is off",
1613 83: "device error",
1614 84: "value too large to be stored in data type",
1615 85: "bad executable (or shared library)",
1616 86: "bad CPU type in executable",
1617 87: "shared library version mismatch",
1618 88: "malformed Mach-o file",
1619 89: "operation canceled",
1620 90: "identifier removed",
1621 91: "no message of desired type",
1622 92: "illegal byte sequence",
1623 93: "attribute not found",
1624 94: "bad message",
1625 95: "EMULTIHOP (Reserved)",
1626 96: "no message available on STREAM",
1627 97: "ENOLINK (Reserved)",
1628 98: "no STREAM resources",
1629 99: "not a STREAM",
1630 100: "protocol error",
1631 101: "STREAM ioctl timeout",
1632 102: "operation not supported on socket",
1633 103: "policy not found",
1634 104: "state not recoverable",
1635 105: "previous owner died",
1636 106: "interface output queue is full",
1632 var errorList = [...]struct {
1633 num syscall.Errno
1634 name string
1635 desc string
1636 }{
1637 {1, "EPERM", "operation not permitted"},
1638 {2, "ENOENT", "no such file or directory"},
1639 {3, "ESRCH", "no such process"},
1640 {4, "EINTR", "interrupted system call"},
1641 {5, "EIO", "input/output error"},
1642 {6, "ENXIO", "device not configured"},
1643 {7, "E2BIG", "argument list too long"},
1644 {8, "ENOEXEC", "exec format error"},
1645 {9, "EBADF", "bad file descriptor"},
1646 {10, "ECHILD", "no child processes"},
1647 {11, "EDEADLK", "resource deadlock avoided"},
1648 {12, "ENOMEM", "cannot allocate memory"},
1649 {13, "EACCES", "permission denied"},
1650 {14, "EFAULT", "bad address"},
1651 {15, "ENOTBLK", "block device required"},
1652 {16, "EBUSY", "resource busy"},
1653 {17, "EEXIST", "file exists"},
1654 {18, "EXDEV", "cross-device link"},
1655 {19, "ENODEV", "operation not supported by device"},
1656 {20, "ENOTDIR", "not a directory"},
1657 {21, "EISDIR", "is a directory"},
1658 {22, "EINVAL", "invalid argument"},
1659 {23, "ENFILE", "too many open files in system"},
1660 {24, "EMFILE", "too many open files"},
1661 {25, "ENOTTY", "inappropriate ioctl for device"},
1662 {26, "ETXTBSY", "text file busy"},
1663 {27, "EFBIG", "file too large"},
1664 {28, "ENOSPC", "no space left on device"},
1665 {29, "ESPIPE", "illegal seek"},
1666 {30, "EROFS", "read-only file system"},
1667 {31, "EMLINK", "too many links"},
1668 {32, "EPIPE", "broken pipe"},
1669 {33, "EDOM", "numerical argument out of domain"},
1670 {34, "ERANGE", "result too large"},
1671 {35, "EAGAIN", "resource temporarily unavailable"},
1672 {36, "EINPROGRESS", "operation now in progress"},
1673 {37, "EALREADY", "operation already in progress"},
1674 {38, "ENOTSOCK", "socket operation on non-socket"},
1675 {39, "EDESTADDRREQ", "destination address required"},
1676 {40, "EMSGSIZE", "message too long"},
1677 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1678 {42, "ENOPROTOOPT", "protocol not available"},
1679 {43, "EPROTONOSUPPORT", "protocol not supported"},
1680 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1681 {45, "ENOTSUP", "operation not supported"},
1682 {46, "EPFNOSUPPORT", "protocol family not supported"},
1683 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1684 {48, "EADDRINUSE", "address already in use"},
1685 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1686 {50, "ENETDOWN", "network is down"},
1687 {51, "ENETUNREACH", "network is unreachable"},
1688 {52, "ENETRESET", "network dropped connection on reset"},
1689 {53, "ECONNABORTED", "software caused connection abort"},
1690 {54, "ECONNRESET", "connection reset by peer"},
1691 {55, "ENOBUFS", "no buffer space available"},
1692 {56, "EISCONN", "socket is already connected"},
1693 {57, "ENOTCONN", "socket is not connected"},
1694 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1695 {59, "ETOOMANYREFS", "too many references: can't splice"},
1696 {60, "ETIMEDOUT", "operation timed out"},
1697 {61, "ECONNREFUSED", "connection refused"},
1698 {62, "ELOOP", "too many levels of symbolic links"},
1699 {63, "ENAMETOOLONG", "file name too long"},
1700 {64, "EHOSTDOWN", "host is down"},
1701 {65, "EHOSTUNREACH", "no route to host"},
1702 {66, "ENOTEMPTY", "directory not empty"},
1703 {67, "EPROCLIM", "too many processes"},
1704 {68, "EUSERS", "too many users"},
1705 {69, "EDQUOT", "disc quota exceeded"},
1706 {70, "ESTALE", "stale NFS file handle"},
1707 {71, "EREMOTE", "too many levels of remote in path"},
1708 {72, "EBADRPC", "RPC struct is bad"},
1709 {73, "ERPCMISMATCH", "RPC version wrong"},
1710 {74, "EPROGUNAVAIL", "RPC prog. not avail"},
1711 {75, "EPROGMISMATCH", "program version wrong"},
1712 {76, "EPROCUNAVAIL", "bad procedure for program"},
1713 {77, "ENOLCK", "no locks available"},
1714 {78, "ENOSYS", "function not implemented"},
1715 {79, "EFTYPE", "inappropriate file type or format"},
1716 {80, "EAUTH", "authentication error"},
1717 {81, "ENEEDAUTH", "need authenticator"},
1718 {82, "EPWROFF", "device power is off"},
1719 {83, "EDEVERR", "device error"},
1720 {84, "EOVERFLOW", "value too large to be stored in data type"},
1721 {85, "EBADEXEC", "bad executable (or shared library)"},
1722 {86, "EBADARCH", "bad CPU type in executable"},
1723 {87, "ESHLIBVERS", "shared library version mismatch"},
1724 {88, "EBADMACHO", "malformed Mach-o file"},
1725 {89, "ECANCELED", "operation canceled"},
1726 {90, "EIDRM", "identifier removed"},
1727 {91, "ENOMSG", "no message of desired type"},
1728 {92, "EILSEQ", "illegal byte sequence"},
1729 {93, "ENOATTR", "attribute not found"},
1730 {94, "EBADMSG", "bad message"},
1731 {95, "EMULTIHOP", "EMULTIHOP (Reserved)"},
1732 {96, "ENODATA", "no message available on STREAM"},
1733 {97, "ENOLINK", "ENOLINK (Reserved)"},
1734 {98, "ENOSR", "no STREAM resources"},
1735 {99, "ENOSTR", "not a STREAM"},
1736 {100, "EPROTO", "protocol error"},
1737 {101, "ETIME", "STREAM ioctl timeout"},
1738 {102, "EOPNOTSUPP", "operation not supported on socket"},
1739 {103, "ENOPOLICY", "policy not found"},
1740 {104, "ENOTRECOVERABLE", "state not recoverable"},
1741 {105, "EOWNERDEAD", "previous owner died"},
1742 {106, "EQFULL", "interface output queue is full"},
16371743 }
16381744
16391745 // Signal table
1640 var signals = [...]string{
1641 1: "hangup",
1642 2: "interrupt",
1643 3: "quit",
1644 4: "illegal instruction",
1645 5: "trace/BPT trap",
1646 6: "abort trap",
1647 7: "EMT trap",
1648 8: "floating point exception",
1649 9: "killed",
1650 10: "bus error",
1651 11: "segmentation fault",
1652 12: "bad system call",
1653 13: "broken pipe",
1654 14: "alarm clock",
1655 15: "terminated",
1656 16: "urgent I/O condition",
1657 17: "suspended (signal)",
1658 18: "suspended",
1659 19: "continued",
1660 20: "child exited",
1661 21: "stopped (tty input)",
1662 22: "stopped (tty output)",
1663 23: "I/O possible",
1664 24: "cputime limit exceeded",
1665 25: "filesize limit exceeded",
1666 26: "virtual timer expired",
1667 27: "profiling timer expired",
1668 28: "window size changes",
1669 29: "information request",
1670 30: "user defined signal 1",
1671 31: "user defined signal 2",
1746 var signalList = [...]struct {
1747 num syscall.Signal
1748 name string
1749 desc string
1750 }{
1751 {1, "SIGHUP", "hangup"},
1752 {2, "SIGINT", "interrupt"},
1753 {3, "SIGQUIT", "quit"},
1754 {4, "SIGILL", "illegal instruction"},
1755 {5, "SIGTRAP", "trace/BPT trap"},
1756 {6, "SIGABRT", "abort trap"},
1757 {7, "SIGEMT", "EMT trap"},
1758 {8, "SIGFPE", "floating point exception"},
1759 {9, "SIGKILL", "killed"},
1760 {10, "SIGBUS", "bus error"},
1761 {11, "SIGSEGV", "segmentation fault"},
1762 {12, "SIGSYS", "bad system call"},
1763 {13, "SIGPIPE", "broken pipe"},
1764 {14, "SIGALRM", "alarm clock"},
1765 {15, "SIGTERM", "terminated"},
1766 {16, "SIGURG", "urgent I/O condition"},
1767 {17, "SIGSTOP", "suspended (signal)"},
1768 {18, "SIGTSTP", "suspended"},
1769 {19, "SIGCONT", "continued"},
1770 {20, "SIGCHLD", "child exited"},
1771 {21, "SIGTTIN", "stopped (tty input)"},
1772 {22, "SIGTTOU", "stopped (tty output)"},
1773 {23, "SIGIO", "I/O possible"},
1774 {24, "SIGXCPU", "cputime limit exceeded"},
1775 {25, "SIGXFSZ", "filesize limit exceeded"},
1776 {26, "SIGVTALRM", "virtual timer expired"},
1777 {27, "SIGPROF", "profiling timer expired"},
1778 {28, "SIGWINCH", "window size changes"},
1779 {29, "SIGINFO", "information request"},
1780 {30, "SIGUSR1", "user defined signal 1"},
1781 {31, "SIGUSR2", "user defined signal 2"},
16721782 }
4848 AF_UNSPEC = 0x0
4949 AF_UTUN = 0x26
5050 ALTWERASE = 0x200
51 ATTR_BIT_MAP_COUNT = 0x5
52 ATTR_CMN_ACCESSMASK = 0x20000
53 ATTR_CMN_ACCTIME = 0x1000
54 ATTR_CMN_ADDEDTIME = 0x10000000
55 ATTR_CMN_BKUPTIME = 0x2000
56 ATTR_CMN_CHGTIME = 0x800
57 ATTR_CMN_CRTIME = 0x200
58 ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
59 ATTR_CMN_DEVID = 0x2
60 ATTR_CMN_DOCUMENT_ID = 0x100000
61 ATTR_CMN_ERROR = 0x20000000
62 ATTR_CMN_EXTENDED_SECURITY = 0x400000
63 ATTR_CMN_FILEID = 0x2000000
64 ATTR_CMN_FLAGS = 0x40000
65 ATTR_CMN_FNDRINFO = 0x4000
66 ATTR_CMN_FSID = 0x4
67 ATTR_CMN_FULLPATH = 0x8000000
68 ATTR_CMN_GEN_COUNT = 0x80000
69 ATTR_CMN_GRPID = 0x10000
70 ATTR_CMN_GRPUUID = 0x1000000
71 ATTR_CMN_MODTIME = 0x400
72 ATTR_CMN_NAME = 0x1
73 ATTR_CMN_NAMEDATTRCOUNT = 0x80000
74 ATTR_CMN_NAMEDATTRLIST = 0x100000
75 ATTR_CMN_OBJID = 0x20
76 ATTR_CMN_OBJPERMANENTID = 0x40
77 ATTR_CMN_OBJTAG = 0x10
78 ATTR_CMN_OBJTYPE = 0x8
79 ATTR_CMN_OWNERID = 0x8000
80 ATTR_CMN_PARENTID = 0x4000000
81 ATTR_CMN_PAROBJID = 0x80
82 ATTR_CMN_RETURNED_ATTRS = 0x80000000
83 ATTR_CMN_SCRIPT = 0x100
84 ATTR_CMN_SETMASK = 0x41c7ff00
85 ATTR_CMN_USERACCESS = 0x200000
86 ATTR_CMN_UUID = 0x800000
87 ATTR_CMN_VALIDMASK = 0xffffffff
88 ATTR_CMN_VOLSETMASK = 0x6700
89 ATTR_FILE_ALLOCSIZE = 0x4
90 ATTR_FILE_CLUMPSIZE = 0x10
91 ATTR_FILE_DATAALLOCSIZE = 0x400
92 ATTR_FILE_DATAEXTENTS = 0x800
93 ATTR_FILE_DATALENGTH = 0x200
94 ATTR_FILE_DEVTYPE = 0x20
95 ATTR_FILE_FILETYPE = 0x40
96 ATTR_FILE_FORKCOUNT = 0x80
97 ATTR_FILE_FORKLIST = 0x100
98 ATTR_FILE_IOBLOCKSIZE = 0x8
99 ATTR_FILE_LINKCOUNT = 0x1
100 ATTR_FILE_RSRCALLOCSIZE = 0x2000
101 ATTR_FILE_RSRCEXTENTS = 0x4000
102 ATTR_FILE_RSRCLENGTH = 0x1000
103 ATTR_FILE_SETMASK = 0x20
104 ATTR_FILE_TOTALSIZE = 0x2
105 ATTR_FILE_VALIDMASK = 0x37ff
106 ATTR_VOL_ALLOCATIONCLUMP = 0x40
107 ATTR_VOL_ATTRIBUTES = 0x40000000
108 ATTR_VOL_CAPABILITIES = 0x20000
109 ATTR_VOL_DIRCOUNT = 0x400
110 ATTR_VOL_ENCODINGSUSED = 0x10000
111 ATTR_VOL_FILECOUNT = 0x200
112 ATTR_VOL_FSTYPE = 0x1
113 ATTR_VOL_INFO = 0x80000000
114 ATTR_VOL_IOBLOCKSIZE = 0x80
115 ATTR_VOL_MAXOBJCOUNT = 0x800
116 ATTR_VOL_MINALLOCATION = 0x20
117 ATTR_VOL_MOUNTEDDEVICE = 0x8000
118 ATTR_VOL_MOUNTFLAGS = 0x4000
119 ATTR_VOL_MOUNTPOINT = 0x1000
120 ATTR_VOL_NAME = 0x2000
121 ATTR_VOL_OBJCOUNT = 0x100
122 ATTR_VOL_QUOTA_SIZE = 0x10000000
123 ATTR_VOL_RESERVED_SIZE = 0x20000000
124 ATTR_VOL_SETMASK = 0x80002000
125 ATTR_VOL_SIGNATURE = 0x2
126 ATTR_VOL_SIZE = 0x4
127 ATTR_VOL_SPACEAVAIL = 0x10
128 ATTR_VOL_SPACEFREE = 0x8
129 ATTR_VOL_UUID = 0x40000
130 ATTR_VOL_VALIDMASK = 0xf007ffff
51131 B0 = 0x0
52132 B110 = 0x6e
53133 B115200 = 0x1c200
168248 CSTOP = 0x13
169249 CSTOPB = 0x400
170250 CSUSP = 0x1a
251 CTL_HW = 0x6
252 CTL_KERN = 0x1
171253 CTL_MAXNAME = 0xc
172254 CTL_NET = 0x4
173255 DLT_A429 = 0xb8
389471 FF1 = 0x4000
390472 FFDLY = 0x4000
391473 FLUSHO = 0x800000
474 FSOPT_ATTR_CMN_EXTENDED = 0x20
475 FSOPT_NOFOLLOW = 0x1
476 FSOPT_NOINMEMUPDATE = 0x2
477 FSOPT_PACK_INVAL_ATTRS = 0x8
478 FSOPT_REPORT_FULLSIZE = 0x4
392479 F_ADDFILESIGS = 0x3d
393480 F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
394481 F_ADDFILESIGS_RETURN = 0x61
424511 F_PATHPKG_CHECK = 0x34
425512 F_PEOFPOSMODE = 0x3
426513 F_PREALLOCATE = 0x2a
514 F_PUNCHHOLE = 0x63
427515 F_RDADVISE = 0x2c
428516 F_RDAHEAD = 0x2d
429517 F_RDLCK = 0x1
440528 F_SINGLE_WRITER = 0x4c
441529 F_THAW_FS = 0x36
442530 F_TRANSCODEKEY = 0x4b
531 F_TRIM_ACTIVE_FILE = 0x64
443532 F_UNLCK = 0x2
444533 F_VOLPOSMODE = 0x4
445534 F_WRLCK = 0x3
446535 HUPCL = 0x4000
536 HW_MACHINE = 0x1
447537 ICANON = 0x100
448538 ICMP6_FILTER = 0x12
449539 ICRNL = 0x100
680770 IPV6_FAITH = 0x1d
681771 IPV6_FLOWINFO_MASK = 0xffffff0f
682772 IPV6_FLOWLABEL_MASK = 0xffff0f00
773 IPV6_FLOW_ECN_MASK = 0x300
683774 IPV6_FRAGTTL = 0x3c
684775 IPV6_FW_ADD = 0x1e
685776 IPV6_FW_DEL = 0x1f
770861 IP_RECVOPTS = 0x5
771862 IP_RECVPKTINFO = 0x1a
772863 IP_RECVRETOPTS = 0x6
864 IP_RECVTOS = 0x1b
773865 IP_RECVTTL = 0x18
774866 IP_RETOPTS = 0x8
775867 IP_RF = 0x8000
788880 IXANY = 0x800
789881 IXOFF = 0x400
790882 IXON = 0x200
883 KERN_HOSTNAME = 0xa
884 KERN_OSRELEASE = 0x2
885 KERN_OSTYPE = 0x1
886 KERN_VERSION = 0x4
791887 LOCK_EX = 0x2
792888 LOCK_NB = 0x4
793889 LOCK_SH = 0x1
13761472 WORDSIZE = 0x40
13771473 WSTOPPED = 0x8
13781474 WUNTRACED = 0x2
1475 XATTR_CREATE = 0x2
1476 XATTR_NODEFAULT = 0x10
1477 XATTR_NOFOLLOW = 0x1
1478 XATTR_NOSECURITY = 0x8
1479 XATTR_REPLACE = 0x4
1480 XATTR_SHOWCOMPRESSION = 0x20
13791481 )
13801482
13811483 // Errors
15271629 )
15281630
15291631 // Error table
1530 var errors = [...]string{
1531 1: "operation not permitted",
1532 2: "no such file or directory",
1533 3: "no such process",
1534 4: "interrupted system call",
1535 5: "input/output error",
1536 6: "device not configured",
1537 7: "argument list too long",
1538 8: "exec format error",
1539 9: "bad file descriptor",
1540 10: "no child processes",
1541 11: "resource deadlock avoided",
1542 12: "cannot allocate memory",
1543 13: "permission denied",
1544 14: "bad address",
1545 15: "block device required",
1546 16: "resource busy",
1547 17: "file exists",
1548 18: "cross-device link",
1549 19: "operation not supported by device",
1550 20: "not a directory",
1551 21: "is a directory",
1552 22: "invalid argument",
1553 23: "too many open files in system",
1554 24: "too many open files",
1555 25: "inappropriate ioctl for device",
1556 26: "text file busy",
1557 27: "file too large",
1558 28: "no space left on device",
1559 29: "illegal seek",
1560 30: "read-only file system",
1561 31: "too many links",
1562 32: "broken pipe",
1563 33: "numerical argument out of domain",
1564 34: "result too large",
1565 35: "resource temporarily unavailable",
1566 36: "operation now in progress",
1567 37: "operation already in progress",
1568 38: "socket operation on non-socket",
1569 39: "destination address required",
1570 40: "message too long",
1571 41: "protocol wrong type for socket",
1572 42: "protocol not available",
1573 43: "protocol not supported",
1574 44: "socket type not supported",
1575 45: "operation not supported",
1576 46: "protocol family not supported",
1577 47: "address family not supported by protocol family",
1578 48: "address already in use",
1579 49: "can't assign requested address",
1580 50: "network is down",
1581 51: "network is unreachable",
1582 52: "network dropped connection on reset",
1583 53: "software caused connection abort",
1584 54: "connection reset by peer",
1585 55: "no buffer space available",
1586 56: "socket is already connected",
1587 57: "socket is not connected",
1588 58: "can't send after socket shutdown",
1589 59: "too many references: can't splice",
1590 60: "operation timed out",
1591 61: "connection refused",
1592 62: "too many levels of symbolic links",
1593 63: "file name too long",
1594 64: "host is down",
1595 65: "no route to host",
1596 66: "directory not empty",
1597 67: "too many processes",
1598 68: "too many users",
1599 69: "disc quota exceeded",
1600 70: "stale NFS file handle",
1601 71: "too many levels of remote in path",
1602 72: "RPC struct is bad",
1603 73: "RPC version wrong",
1604 74: "RPC prog. not avail",
1605 75: "program version wrong",
1606 76: "bad procedure for program",
1607 77: "no locks available",
1608 78: "function not implemented",
1609 79: "inappropriate file type or format",
1610 80: "authentication error",
1611 81: "need authenticator",
1612 82: "device power is off",
1613 83: "device error",
1614 84: "value too large to be stored in data type",
1615 85: "bad executable (or shared library)",
1616 86: "bad CPU type in executable",
1617 87: "shared library version mismatch",
1618 88: "malformed Mach-o file",
1619 89: "operation canceled",
1620 90: "identifier removed",
1621 91: "no message of desired type",
1622 92: "illegal byte sequence",
1623 93: "attribute not found",
1624 94: "bad message",
1625 95: "EMULTIHOP (Reserved)",
1626 96: "no message available on STREAM",
1627 97: "ENOLINK (Reserved)",
1628 98: "no STREAM resources",
1629 99: "not a STREAM",
1630 100: "protocol error",
1631 101: "STREAM ioctl timeout",
1632 102: "operation not supported on socket",
1633 103: "policy not found",
1634 104: "state not recoverable",
1635 105: "previous owner died",
1636 106: "interface output queue is full",
1632 var errorList = [...]struct {
1633 num syscall.Errno
1634 name string
1635 desc string
1636 }{
1637 {1, "EPERM", "operation not permitted"},
1638 {2, "ENOENT", "no such file or directory"},
1639 {3, "ESRCH", "no such process"},
1640 {4, "EINTR", "interrupted system call"},
1641 {5, "EIO", "input/output error"},
1642 {6, "ENXIO", "device not configured"},
1643 {7, "E2BIG", "argument list too long"},
1644 {8, "ENOEXEC", "exec format error"},
1645 {9, "EBADF", "bad file descriptor"},
1646 {10, "ECHILD", "no child processes"},
1647 {11, "EDEADLK", "resource deadlock avoided"},
1648 {12, "ENOMEM", "cannot allocate memory"},
1649 {13, "EACCES", "permission denied"},
1650 {14, "EFAULT", "bad address"},
1651 {15, "ENOTBLK", "block device required"},
1652 {16, "EBUSY", "resource busy"},
1653 {17, "EEXIST", "file exists"},
1654 {18, "EXDEV", "cross-device link"},
1655 {19, "ENODEV", "operation not supported by device"},
1656 {20, "ENOTDIR", "not a directory"},
1657 {21, "EISDIR", "is a directory"},
1658 {22, "EINVAL", "invalid argument"},
1659 {23, "ENFILE", "too many open files in system"},
1660 {24, "EMFILE", "too many open files"},
1661 {25, "ENOTTY", "inappropriate ioctl for device"},
1662 {26, "ETXTBSY", "text file busy"},
1663 {27, "EFBIG", "file too large"},
1664 {28, "ENOSPC", "no space left on device"},
1665 {29, "ESPIPE", "illegal seek"},
1666 {30, "EROFS", "read-only file system"},
1667 {31, "EMLINK", "too many links"},
1668 {32, "EPIPE", "broken pipe"},
1669 {33, "EDOM", "numerical argument out of domain"},
1670 {34, "ERANGE", "result too large"},
1671 {35, "EAGAIN", "resource temporarily unavailable"},
1672 {36, "EINPROGRESS", "operation now in progress"},
1673 {37, "EALREADY", "operation already in progress"},
1674 {38, "ENOTSOCK", "socket operation on non-socket"},
1675 {39, "EDESTADDRREQ", "destination address required"},
1676 {40, "EMSGSIZE", "message too long"},
1677 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1678 {42, "ENOPROTOOPT", "protocol not available"},
1679 {43, "EPROTONOSUPPORT", "protocol not supported"},
1680 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1681 {45, "ENOTSUP", "operation not supported"},
1682 {46, "EPFNOSUPPORT", "protocol family not supported"},
1683 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1684 {48, "EADDRINUSE", "address already in use"},
1685 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1686 {50, "ENETDOWN", "network is down"},
1687 {51, "ENETUNREACH", "network is unreachable"},
1688 {52, "ENETRESET", "network dropped connection on reset"},
1689 {53, "ECONNABORTED", "software caused connection abort"},
1690 {54, "ECONNRESET", "connection reset by peer"},
1691 {55, "ENOBUFS", "no buffer space available"},
1692 {56, "EISCONN", "socket is already connected"},
1693 {57, "ENOTCONN", "socket is not connected"},
1694 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1695 {59, "ETOOMANYREFS", "too many references: can't splice"},
1696 {60, "ETIMEDOUT", "operation timed out"},
1697 {61, "ECONNREFUSED", "connection refused"},
1698 {62, "ELOOP", "too many levels of symbolic links"},
1699 {63, "ENAMETOOLONG", "file name too long"},
1700 {64, "EHOSTDOWN", "host is down"},
1701 {65, "EHOSTUNREACH", "no route to host"},
1702 {66, "ENOTEMPTY", "directory not empty"},
1703 {67, "EPROCLIM", "too many processes"},
1704 {68, "EUSERS", "too many users"},
1705 {69, "EDQUOT", "disc quota exceeded"},
1706 {70, "ESTALE", "stale NFS file handle"},
1707 {71, "EREMOTE", "too many levels of remote in path"},
1708 {72, "EBADRPC", "RPC struct is bad"},
1709 {73, "ERPCMISMATCH", "RPC version wrong"},
1710 {74, "EPROGUNAVAIL", "RPC prog. not avail"},
1711 {75, "EPROGMISMATCH", "program version wrong"},
1712 {76, "EPROCUNAVAIL", "bad procedure for program"},
1713 {77, "ENOLCK", "no locks available"},
1714 {78, "ENOSYS", "function not implemented"},
1715 {79, "EFTYPE", "inappropriate file type or format"},
1716 {80, "EAUTH", "authentication error"},
1717 {81, "ENEEDAUTH", "need authenticator"},
1718 {82, "EPWROFF", "device power is off"},
1719 {83, "EDEVERR", "device error"},
1720 {84, "EOVERFLOW", "value too large to be stored in data type"},
1721 {85, "EBADEXEC", "bad executable (or shared library)"},
1722 {86, "EBADARCH", "bad CPU type in executable"},
1723 {87, "ESHLIBVERS", "shared library version mismatch"},
1724 {88, "EBADMACHO", "malformed Mach-o file"},
1725 {89, "ECANCELED", "operation canceled"},
1726 {90, "EIDRM", "identifier removed"},
1727 {91, "ENOMSG", "no message of desired type"},
1728 {92, "EILSEQ", "illegal byte sequence"},
1729 {93, "ENOATTR", "attribute not found"},
1730 {94, "EBADMSG", "bad message"},
1731 {95, "EMULTIHOP", "EMULTIHOP (Reserved)"},
1732 {96, "ENODATA", "no message available on STREAM"},
1733 {97, "ENOLINK", "ENOLINK (Reserved)"},
1734 {98, "ENOSR", "no STREAM resources"},
1735 {99, "ENOSTR", "not a STREAM"},
1736 {100, "EPROTO", "protocol error"},
1737 {101, "ETIME", "STREAM ioctl timeout"},
1738 {102, "EOPNOTSUPP", "operation not supported on socket"},
1739 {103, "ENOPOLICY", "policy not found"},
1740 {104, "ENOTRECOVERABLE", "state not recoverable"},
1741 {105, "EOWNERDEAD", "previous owner died"},
1742 {106, "EQFULL", "interface output queue is full"},
16371743 }
16381744
16391745 // Signal table
1640 var signals = [...]string{
1641 1: "hangup",
1642 2: "interrupt",
1643 3: "quit",
1644 4: "illegal instruction",
1645 5: "trace/BPT trap",
1646 6: "abort trap",
1647 7: "EMT trap",
1648 8: "floating point exception",
1649 9: "killed",
1650 10: "bus error",
1651 11: "segmentation fault",
1652 12: "bad system call",
1653 13: "broken pipe",
1654 14: "alarm clock",
1655 15: "terminated",
1656 16: "urgent I/O condition",
1657 17: "suspended (signal)",
1658 18: "suspended",
1659 19: "continued",
1660 20: "child exited",
1661 21: "stopped (tty input)",
1662 22: "stopped (tty output)",
1663 23: "I/O possible",
1664 24: "cputime limit exceeded",
1665 25: "filesize limit exceeded",
1666 26: "virtual timer expired",
1667 27: "profiling timer expired",
1668 28: "window size changes",
1669 29: "information request",
1670 30: "user defined signal 1",
1671 31: "user defined signal 2",
1746 var signalList = [...]struct {
1747 num syscall.Signal
1748 name string
1749 desc string
1750 }{
1751 {1, "SIGHUP", "hangup"},
1752 {2, "SIGINT", "interrupt"},
1753 {3, "SIGQUIT", "quit"},
1754 {4, "SIGILL", "illegal instruction"},
1755 {5, "SIGTRAP", "trace/BPT trap"},
1756 {6, "SIGABRT", "abort trap"},
1757 {7, "SIGEMT", "EMT trap"},
1758 {8, "SIGFPE", "floating point exception"},
1759 {9, "SIGKILL", "killed"},
1760 {10, "SIGBUS", "bus error"},
1761 {11, "SIGSEGV", "segmentation fault"},
1762 {12, "SIGSYS", "bad system call"},
1763 {13, "SIGPIPE", "broken pipe"},
1764 {14, "SIGALRM", "alarm clock"},
1765 {15, "SIGTERM", "terminated"},
1766 {16, "SIGURG", "urgent I/O condition"},
1767 {17, "SIGSTOP", "suspended (signal)"},
1768 {18, "SIGTSTP", "suspended"},
1769 {19, "SIGCONT", "continued"},
1770 {20, "SIGCHLD", "child exited"},
1771 {21, "SIGTTIN", "stopped (tty input)"},
1772 {22, "SIGTTOU", "stopped (tty output)"},
1773 {23, "SIGIO", "I/O possible"},
1774 {24, "SIGXCPU", "cputime limit exceeded"},
1775 {25, "SIGXFSZ", "filesize limit exceeded"},
1776 {26, "SIGVTALRM", "virtual timer expired"},
1777 {27, "SIGPROF", "profiling timer expired"},
1778 {28, "SIGWINCH", "window size changes"},
1779 {29, "SIGINFO", "information request"},
1780 {30, "SIGUSR1", "user defined signal 1"},
1781 {31, "SIGUSR2", "user defined signal 2"},
16721782 }
4848 AF_UNSPEC = 0x0
4949 AF_UTUN = 0x26
5050 ALTWERASE = 0x200
51 ATTR_BIT_MAP_COUNT = 0x5
52 ATTR_CMN_ACCESSMASK = 0x20000
53 ATTR_CMN_ACCTIME = 0x1000
54 ATTR_CMN_ADDEDTIME = 0x10000000
55 ATTR_CMN_BKUPTIME = 0x2000
56 ATTR_CMN_CHGTIME = 0x800
57 ATTR_CMN_CRTIME = 0x200
58 ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
59 ATTR_CMN_DEVID = 0x2
60 ATTR_CMN_DOCUMENT_ID = 0x100000
61 ATTR_CMN_ERROR = 0x20000000
62 ATTR_CMN_EXTENDED_SECURITY = 0x400000
63 ATTR_CMN_FILEID = 0x2000000
64 ATTR_CMN_FLAGS = 0x40000
65 ATTR_CMN_FNDRINFO = 0x4000
66 ATTR_CMN_FSID = 0x4
67 ATTR_CMN_FULLPATH = 0x8000000
68 ATTR_CMN_GEN_COUNT = 0x80000
69 ATTR_CMN_GRPID = 0x10000
70 ATTR_CMN_GRPUUID = 0x1000000
71 ATTR_CMN_MODTIME = 0x400
72 ATTR_CMN_NAME = 0x1
73 ATTR_CMN_NAMEDATTRCOUNT = 0x80000
74 ATTR_CMN_NAMEDATTRLIST = 0x100000
75 ATTR_CMN_OBJID = 0x20
76 ATTR_CMN_OBJPERMANENTID = 0x40
77 ATTR_CMN_OBJTAG = 0x10
78 ATTR_CMN_OBJTYPE = 0x8
79 ATTR_CMN_OWNERID = 0x8000
80 ATTR_CMN_PARENTID = 0x4000000
81 ATTR_CMN_PAROBJID = 0x80
82 ATTR_CMN_RETURNED_ATTRS = 0x80000000
83 ATTR_CMN_SCRIPT = 0x100
84 ATTR_CMN_SETMASK = 0x41c7ff00
85 ATTR_CMN_USERACCESS = 0x200000
86 ATTR_CMN_UUID = 0x800000
87 ATTR_CMN_VALIDMASK = 0xffffffff
88 ATTR_CMN_VOLSETMASK = 0x6700
89 ATTR_FILE_ALLOCSIZE = 0x4
90 ATTR_FILE_CLUMPSIZE = 0x10
91 ATTR_FILE_DATAALLOCSIZE = 0x400
92 ATTR_FILE_DATAEXTENTS = 0x800
93 ATTR_FILE_DATALENGTH = 0x200
94 ATTR_FILE_DEVTYPE = 0x20
95 ATTR_FILE_FILETYPE = 0x40
96 ATTR_FILE_FORKCOUNT = 0x80
97 ATTR_FILE_FORKLIST = 0x100
98 ATTR_FILE_IOBLOCKSIZE = 0x8
99 ATTR_FILE_LINKCOUNT = 0x1
100 ATTR_FILE_RSRCALLOCSIZE = 0x2000
101 ATTR_FILE_RSRCEXTENTS = 0x4000
102 ATTR_FILE_RSRCLENGTH = 0x1000
103 ATTR_FILE_SETMASK = 0x20
104 ATTR_FILE_TOTALSIZE = 0x2
105 ATTR_FILE_VALIDMASK = 0x37ff
106 ATTR_VOL_ALLOCATIONCLUMP = 0x40
107 ATTR_VOL_ATTRIBUTES = 0x40000000
108 ATTR_VOL_CAPABILITIES = 0x20000
109 ATTR_VOL_DIRCOUNT = 0x400
110 ATTR_VOL_ENCODINGSUSED = 0x10000
111 ATTR_VOL_FILECOUNT = 0x200
112 ATTR_VOL_FSTYPE = 0x1
113 ATTR_VOL_INFO = 0x80000000
114 ATTR_VOL_IOBLOCKSIZE = 0x80
115 ATTR_VOL_MAXOBJCOUNT = 0x800
116 ATTR_VOL_MINALLOCATION = 0x20
117 ATTR_VOL_MOUNTEDDEVICE = 0x8000
118 ATTR_VOL_MOUNTFLAGS = 0x4000
119 ATTR_VOL_MOUNTPOINT = 0x1000
120 ATTR_VOL_NAME = 0x2000
121 ATTR_VOL_OBJCOUNT = 0x100
122 ATTR_VOL_QUOTA_SIZE = 0x10000000
123 ATTR_VOL_RESERVED_SIZE = 0x20000000
124 ATTR_VOL_SETMASK = 0x80002000
125 ATTR_VOL_SIGNATURE = 0x2
126 ATTR_VOL_SIZE = 0x4
127 ATTR_VOL_SPACEAVAIL = 0x10
128 ATTR_VOL_SPACEFREE = 0x8
129 ATTR_VOL_UUID = 0x40000
130 ATTR_VOL_VALIDMASK = 0xf007ffff
51131 B0 = 0x0
52132 B110 = 0x6e
53133 B115200 = 0x1c200
168248 CSTOP = 0x13
169249 CSTOPB = 0x400
170250 CSUSP = 0x1a
251 CTL_HW = 0x6
252 CTL_KERN = 0x1
171253 CTL_MAXNAME = 0xc
172254 CTL_NET = 0x4
173255 DLT_A429 = 0xb8
389471 FF1 = 0x4000
390472 FFDLY = 0x4000
391473 FLUSHO = 0x800000
474 FSOPT_ATTR_CMN_EXTENDED = 0x20
475 FSOPT_NOFOLLOW = 0x1
476 FSOPT_NOINMEMUPDATE = 0x2
477 FSOPT_PACK_INVAL_ATTRS = 0x8
478 FSOPT_REPORT_FULLSIZE = 0x4
392479 F_ADDFILESIGS = 0x3d
393480 F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
394481 F_ADDFILESIGS_RETURN = 0x61
424511 F_PATHPKG_CHECK = 0x34
425512 F_PEOFPOSMODE = 0x3
426513 F_PREALLOCATE = 0x2a
514 F_PUNCHHOLE = 0x63
427515 F_RDADVISE = 0x2c
428516 F_RDAHEAD = 0x2d
429517 F_RDLCK = 0x1
440528 F_SINGLE_WRITER = 0x4c
441529 F_THAW_FS = 0x36
442530 F_TRANSCODEKEY = 0x4b
531 F_TRIM_ACTIVE_FILE = 0x64
443532 F_UNLCK = 0x2
444533 F_VOLPOSMODE = 0x4
445534 F_WRLCK = 0x3
446535 HUPCL = 0x4000
536 HW_MACHINE = 0x1
447537 ICANON = 0x100
448538 ICMP6_FILTER = 0x12
449539 ICRNL = 0x100
680770 IPV6_FAITH = 0x1d
681771 IPV6_FLOWINFO_MASK = 0xffffff0f
682772 IPV6_FLOWLABEL_MASK = 0xffff0f00
773 IPV6_FLOW_ECN_MASK = 0x300
683774 IPV6_FRAGTTL = 0x3c
684775 IPV6_FW_ADD = 0x1e
685776 IPV6_FW_DEL = 0x1f
770861 IP_RECVOPTS = 0x5
771862 IP_RECVPKTINFO = 0x1a
772863 IP_RECVRETOPTS = 0x6
864 IP_RECVTOS = 0x1b
773865 IP_RECVTTL = 0x18
774866 IP_RETOPTS = 0x8
775867 IP_RF = 0x8000
788880 IXANY = 0x800
789881 IXOFF = 0x400
790882 IXON = 0x200
883 KERN_HOSTNAME = 0xa
884 KERN_OSRELEASE = 0x2
885 KERN_OSTYPE = 0x1
886 KERN_VERSION = 0x4
791887 LOCK_EX = 0x2
792888 LOCK_NB = 0x4
793889 LOCK_SH = 0x1
13761472 WORDSIZE = 0x40
13771473 WSTOPPED = 0x8
13781474 WUNTRACED = 0x2
1475 XATTR_CREATE = 0x2
1476 XATTR_NODEFAULT = 0x10
1477 XATTR_NOFOLLOW = 0x1
1478 XATTR_NOSECURITY = 0x8
1479 XATTR_REPLACE = 0x4
1480 XATTR_SHOWCOMPRESSION = 0x20
13791481 )
13801482
13811483 // Errors
15271629 )
15281630
15291631 // Error table
1530 var errors = [...]string{
1531 1: "operation not permitted",
1532 2: "no such file or directory",
1533 3: "no such process",
1534 4: "interrupted system call",
1535 5: "input/output error",
1536 6: "device not configured",
1537 7: "argument list too long",
1538 8: "exec format error",
1539 9: "bad file descriptor",
1540 10: "no child processes",
1541 11: "resource deadlock avoided",
1542 12: "cannot allocate memory",
1543 13: "permission denied",
1544 14: "bad address",
1545 15: "block device required",
1546 16: "resource busy",
1547 17: "file exists",
1548 18: "cross-device link",
1549 19: "operation not supported by device",
1550 20: "not a directory",
1551 21: "is a directory",
1552 22: "invalid argument",
1553 23: "too many open files in system",
1554 24: "too many open files",
1555 25: "inappropriate ioctl for device",
1556 26: "text file busy",
1557 27: "file too large",
1558 28: "no space left on device",
1559 29: "illegal seek",
1560 30: "read-only file system",
1561 31: "too many links",
1562 32: "broken pipe",
1563 33: "numerical argument out of domain",
1564 34: "result too large",
1565 35: "resource temporarily unavailable",
1566 36: "operation now in progress",
1567 37: "operation already in progress",
1568 38: "socket operation on non-socket",
1569 39: "destination address required",
1570 40: "message too long",
1571 41: "protocol wrong type for socket",
1572 42: "protocol not available",
1573 43: "protocol not supported",
1574 44: "socket type not supported",
1575 45: "operation not supported",
1576 46: "protocol family not supported",
1577 47: "address family not supported by protocol family",
1578 48: "address already in use",
1579 49: "can't assign requested address",
1580 50: "network is down",
1581 51: "network is unreachable",
1582 52: "network dropped connection on reset",
1583 53: "software caused connection abort",
1584 54: "connection reset by peer",
1585 55: "no buffer space available",
1586 56: "socket is already connected",
1587 57: "socket is not connected",
1588 58: "can't send after socket shutdown",
1589 59: "too many references: can't splice",
1590 60: "operation timed out",
1591 61: "connection refused",
1592 62: "too many levels of symbolic links",
1593 63: "file name too long",
1594 64: "host is down",
1595 65: "no route to host",
1596 66: "directory not empty",
1597 67: "too many processes",
1598 68: "too many users",
1599 69: "disc quota exceeded",
1600 70: "stale NFS file handle",
1601 71: "too many levels of remote in path",
1602 72: "RPC struct is bad",
1603 73: "RPC version wrong",
1604 74: "RPC prog. not avail",
1605 75: "program version wrong",
1606 76: "bad procedure for program",
1607 77: "no locks available",
1608 78: "function not implemented",
1609 79: "inappropriate file type or format",
1610 80: "authentication error",
1611 81: "need authenticator",
1612 82: "device power is off",
1613 83: "device error",
1614 84: "value too large to be stored in data type",
1615 85: "bad executable (or shared library)",
1616 86: "bad CPU type in executable",
1617 87: "shared library version mismatch",
1618 88: "malformed Mach-o file",
1619 89: "operation canceled",
1620 90: "identifier removed",
1621 91: "no message of desired type",
1622 92: "illegal byte sequence",
1623 93: "attribute not found",
1624 94: "bad message",
1625 95: "EMULTIHOP (Reserved)",
1626 96: "no message available on STREAM",
1627 97: "ENOLINK (Reserved)",
1628 98: "no STREAM resources",
1629 99: "not a STREAM",
1630 100: "protocol error",
1631 101: "STREAM ioctl timeout",
1632 102: "operation not supported on socket",
1633 103: "policy not found",
1634 104: "state not recoverable",
1635 105: "previous owner died",
1636 106: "interface output queue is full",
1632 var errorList = [...]struct {
1633 num syscall.Errno
1634 name string
1635 desc string
1636 }{
1637 {1, "EPERM", "operation not permitted"},
1638 {2, "ENOENT", "no such file or directory"},
1639 {3, "ESRCH", "no such process"},
1640 {4, "EINTR", "interrupted system call"},
1641 {5, "EIO", "input/output error"},
1642 {6, "ENXIO", "device not configured"},
1643 {7, "E2BIG", "argument list too long"},
1644 {8, "ENOEXEC", "exec format error"},
1645 {9, "EBADF", "bad file descriptor"},
1646 {10, "ECHILD", "no child processes"},
1647 {11, "EDEADLK", "resource deadlock avoided"},
1648 {12, "ENOMEM", "cannot allocate memory"},
1649 {13, "EACCES", "permission denied"},
1650 {14, "EFAULT", "bad address"},
1651 {15, "ENOTBLK", "block device required"},
1652 {16, "EBUSY", "resource busy"},
1653 {17, "EEXIST", "file exists"},
1654 {18, "EXDEV", "cross-device link"},
1655 {19, "ENODEV", "operation not supported by device"},
1656 {20, "ENOTDIR", "not a directory"},
1657 {21, "EISDIR", "is a directory"},
1658 {22, "EINVAL", "invalid argument"},
1659 {23, "ENFILE", "too many open files in system"},
1660 {24, "EMFILE", "too many open files"},
1661 {25, "ENOTTY", "inappropriate ioctl for device"},
1662 {26, "ETXTBSY", "text file busy"},
1663 {27, "EFBIG", "file too large"},
1664 {28, "ENOSPC", "no space left on device"},
1665 {29, "ESPIPE", "illegal seek"},
1666 {30, "EROFS", "read-only file system"},
1667 {31, "EMLINK", "too many links"},
1668 {32, "EPIPE", "broken pipe"},
1669 {33, "EDOM", "numerical argument out of domain"},
1670 {34, "ERANGE", "result too large"},
1671 {35, "EAGAIN", "resource temporarily unavailable"},
1672 {36, "EINPROGRESS", "operation now in progress"},
1673 {37, "EALREADY", "operation already in progress"},
1674 {38, "ENOTSOCK", "socket operation on non-socket"},
1675 {39, "EDESTADDRREQ", "destination address required"},
1676 {40, "EMSGSIZE", "message too long"},
1677 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1678 {42, "ENOPROTOOPT", "protocol not available"},
1679 {43, "EPROTONOSUPPORT", "protocol not supported"},
1680 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1681 {45, "ENOTSUP", "operation not supported"},
1682 {46, "EPFNOSUPPORT", "protocol family not supported"},
1683 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1684 {48, "EADDRINUSE", "address already in use"},
1685 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1686 {50, "ENETDOWN", "network is down"},
1687 {51, "ENETUNREACH", "network is unreachable"},
1688 {52, "ENETRESET", "network dropped connection on reset"},
1689 {53, "ECONNABORTED", "software caused connection abort"},
1690 {54, "ECONNRESET", "connection reset by peer"},
1691 {55, "ENOBUFS", "no buffer space available"},
1692 {56, "EISCONN", "socket is already connected"},
1693 {57, "ENOTCONN", "socket is not connected"},
1694 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1695 {59, "ETOOMANYREFS", "too many references: can't splice"},
1696 {60, "ETIMEDOUT", "operation timed out"},
1697 {61, "ECONNREFUSED", "connection refused"},
1698 {62, "ELOOP", "too many levels of symbolic links"},
1699 {63, "ENAMETOOLONG", "file name too long"},
1700 {64, "EHOSTDOWN", "host is down"},
1701 {65, "EHOSTUNREACH", "no route to host"},
1702 {66, "ENOTEMPTY", "directory not empty"},
1703 {67, "EPROCLIM", "too many processes"},
1704 {68, "EUSERS", "too many users"},
1705 {69, "EDQUOT", "disc quota exceeded"},
1706 {70, "ESTALE", "stale NFS file handle"},
1707 {71, "EREMOTE", "too many levels of remote in path"},
1708 {72, "EBADRPC", "RPC struct is bad"},
1709 {73, "ERPCMISMATCH", "RPC version wrong"},
1710 {74, "EPROGUNAVAIL", "RPC prog. not avail"},
1711 {75, "EPROGMISMATCH", "program version wrong"},
1712 {76, "EPROCUNAVAIL", "bad procedure for program"},
1713 {77, "ENOLCK", "no locks available"},
1714 {78, "ENOSYS", "function not implemented"},
1715 {79, "EFTYPE", "inappropriate file type or format"},
1716 {80, "EAUTH", "authentication error"},
1717 {81, "ENEEDAUTH", "need authenticator"},
1718 {82, "EPWROFF", "device power is off"},
1719 {83, "EDEVERR", "device error"},
1720 {84, "EOVERFLOW", "value too large to be stored in data type"},
1721 {85, "EBADEXEC", "bad executable (or shared library)"},
1722 {86, "EBADARCH", "bad CPU type in executable"},
1723 {87, "ESHLIBVERS", "shared library version mismatch"},
1724 {88, "EBADMACHO", "malformed Mach-o file"},
1725 {89, "ECANCELED", "operation canceled"},
1726 {90, "EIDRM", "identifier removed"},
1727 {91, "ENOMSG", "no message of desired type"},
1728 {92, "EILSEQ", "illegal byte sequence"},
1729 {93, "ENOATTR", "attribute not found"},
1730 {94, "EBADMSG", "bad message"},
1731 {95, "EMULTIHOP", "EMULTIHOP (Reserved)"},
1732 {96, "ENODATA", "no message available on STREAM"},
1733 {97, "ENOLINK", "ENOLINK (Reserved)"},
1734 {98, "ENOSR", "no STREAM resources"},
1735 {99, "ENOSTR", "not a STREAM"},
1736 {100, "EPROTO", "protocol error"},
1737 {101, "ETIME", "STREAM ioctl timeout"},
1738 {102, "EOPNOTSUPP", "operation not supported on socket"},
1739 {103, "ENOPOLICY", "policy not found"},
1740 {104, "ENOTRECOVERABLE", "state not recoverable"},
1741 {105, "EOWNERDEAD", "previous owner died"},
1742 {106, "EQFULL", "interface output queue is full"},
16371743 }
16381744
16391745 // Signal table
1640 var signals = [...]string{
1641 1: "hangup",
1642 2: "interrupt",
1643 3: "quit",
1644 4: "illegal instruction",
1645 5: "trace/BPT trap",
1646 6: "abort trap",
1647 7: "EMT trap",
1648 8: "floating point exception",
1649 9: "killed",
1650 10: "bus error",
1651 11: "segmentation fault",
1652 12: "bad system call",
1653 13: "broken pipe",
1654 14: "alarm clock",
1655 15: "terminated",
1656 16: "urgent I/O condition",
1657 17: "suspended (signal)",
1658 18: "suspended",
1659 19: "continued",
1660 20: "child exited",
1661 21: "stopped (tty input)",
1662 22: "stopped (tty output)",
1663 23: "I/O possible",
1664 24: "cputime limit exceeded",
1665 25: "filesize limit exceeded",
1666 26: "virtual timer expired",
1667 27: "profiling timer expired",
1668 28: "window size changes",
1669 29: "information request",
1670 30: "user defined signal 1",
1671 31: "user defined signal 2",
1746 var signalList = [...]struct {
1747 num syscall.Signal
1748 name string
1749 desc string
1750 }{
1751 {1, "SIGHUP", "hangup"},
1752 {2, "SIGINT", "interrupt"},
1753 {3, "SIGQUIT", "quit"},
1754 {4, "SIGILL", "illegal instruction"},
1755 {5, "SIGTRAP", "trace/BPT trap"},
1756 {6, "SIGABRT", "abort trap"},
1757 {7, "SIGEMT", "EMT trap"},
1758 {8, "SIGFPE", "floating point exception"},
1759 {9, "SIGKILL", "killed"},
1760 {10, "SIGBUS", "bus error"},
1761 {11, "SIGSEGV", "segmentation fault"},
1762 {12, "SIGSYS", "bad system call"},
1763 {13, "SIGPIPE", "broken pipe"},
1764 {14, "SIGALRM", "alarm clock"},
1765 {15, "SIGTERM", "terminated"},
1766 {16, "SIGURG", "urgent I/O condition"},
1767 {17, "SIGSTOP", "suspended (signal)"},
1768 {18, "SIGTSTP", "suspended"},
1769 {19, "SIGCONT", "continued"},
1770 {20, "SIGCHLD", "child exited"},
1771 {21, "SIGTTIN", "stopped (tty input)"},
1772 {22, "SIGTTOU", "stopped (tty output)"},
1773 {23, "SIGIO", "I/O possible"},
1774 {24, "SIGXCPU", "cputime limit exceeded"},
1775 {25, "SIGXFSZ", "filesize limit exceeded"},
1776 {26, "SIGVTALRM", "virtual timer expired"},
1777 {27, "SIGPROF", "profiling timer expired"},
1778 {28, "SIGWINCH", "window size changes"},
1779 {29, "SIGINFO", "information request"},
1780 {30, "SIGUSR1", "user defined signal 1"},
1781 {31, "SIGUSR2", "user defined signal 2"},
16721782 }
22
33 // +build amd64,dragonfly
44
5 // Created by cgo -godefs - DO NOT EDIT
5 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
66 // cgo -godefs -- -m64 _const.go
77
88 package unix
167167 CSTOP = 0x13
168168 CSTOPB = 0x400
169169 CSUSP = 0x1a
170 CTL_HW = 0x6
171 CTL_KERN = 0x1
170172 CTL_MAXNAME = 0xc
171173 CTL_NET = 0x4
172174 DLT_A429 = 0xb8
352354 F_UNLCK = 0x2
353355 F_WRLCK = 0x3
354356 HUPCL = 0x4000
357 HW_MACHINE = 0x1
355358 ICANON = 0x100
356359 ICMP6_FILTER = 0x12
357360 ICRNL = 0x100
834837 IXANY = 0x800
835838 IXOFF = 0x400
836839 IXON = 0x200
840 KERN_HOSTNAME = 0xa
841 KERN_OSRELEASE = 0x2
842 KERN_OSTYPE = 0x1
843 KERN_VERSION = 0x4
837844 LOCK_EX = 0x2
838845 LOCK_NB = 0x4
839846 LOCK_SH = 0x1
872879 MAP_VPAGETABLE = 0x2000
873880 MCL_CURRENT = 0x1
874881 MCL_FUTURE = 0x2
882 MNT_ASYNC = 0x40
883 MNT_AUTOMOUNTED = 0x20
884 MNT_CMDFLAGS = 0xf0000
885 MNT_DEFEXPORTED = 0x200
886 MNT_DELEXPORT = 0x20000
887 MNT_EXKERB = 0x800
888 MNT_EXPORTANON = 0x400
889 MNT_EXPORTED = 0x100
890 MNT_EXPUBLIC = 0x20000000
891 MNT_EXRDONLY = 0x80
892 MNT_FORCE = 0x80000
893 MNT_IGNORE = 0x800000
894 MNT_LAZY = 0x4
895 MNT_LOCAL = 0x1000
896 MNT_NOATIME = 0x10000000
897 MNT_NOCLUSTERR = 0x40000000
898 MNT_NOCLUSTERW = 0x80000000
899 MNT_NODEV = 0x10
900 MNT_NOEXEC = 0x4
901 MNT_NOSUID = 0x8
902 MNT_NOSYMFOLLOW = 0x400000
903 MNT_NOWAIT = 0x2
904 MNT_QUOTA = 0x2000
905 MNT_RDONLY = 0x1
906 MNT_RELOAD = 0x40000
907 MNT_ROOTFS = 0x4000
908 MNT_SOFTDEP = 0x200000
909 MNT_SUIDDIR = 0x100000
910 MNT_SYNCHRONOUS = 0x2
911 MNT_TRIM = 0x1000000
912 MNT_UPDATE = 0x10000
913 MNT_USER = 0x8000
914 MNT_VISFLAGMASK = 0xf1f0ffff
915 MNT_WAIT = 0x1
875916 MSG_CMSG_CLOEXEC = 0x1000
876917 MSG_CTRUNC = 0x20
877918 MSG_DONTROUTE = 0x4
9721013 RLIMIT_CPU = 0x0
9731014 RLIMIT_DATA = 0x2
9741015 RLIMIT_FSIZE = 0x1
1016 RLIMIT_MEMLOCK = 0x6
9751017 RLIMIT_NOFILE = 0x8
1018 RLIMIT_NPROC = 0x7
1019 RLIMIT_RSS = 0x5
9761020 RLIMIT_STACK = 0x3
9771021 RLIM_INFINITY = 0x7fffffffffffffff
9781022 RTAX_AUTHOR = 0x6
11571201 SO_TIMESTAMP = 0x400
11581202 SO_TYPE = 0x1008
11591203 SO_USELOOPBACK = 0x40
1204 S_BLKSIZE = 0x200
1205 S_IEXEC = 0x40
1206 S_IFBLK = 0x6000
1207 S_IFCHR = 0x2000
1208 S_IFDB = 0x9000
1209 S_IFDIR = 0x4000
1210 S_IFIFO = 0x1000
1211 S_IFLNK = 0xa000
1212 S_IFMT = 0xf000
1213 S_IFREG = 0x8000
1214 S_IFSOCK = 0xc000
1215 S_IFWHT = 0xe000
1216 S_IREAD = 0x100
1217 S_IRGRP = 0x20
1218 S_IROTH = 0x4
1219 S_IRUSR = 0x100
1220 S_IRWXG = 0x38
1221 S_IRWXO = 0x7
1222 S_IRWXU = 0x1c0
1223 S_ISGID = 0x400
1224 S_ISTXT = 0x200
1225 S_ISUID = 0x800
1226 S_ISVTX = 0x200
1227 S_IWGRP = 0x10
1228 S_IWOTH = 0x2
1229 S_IWRITE = 0x80
1230 S_IWUSR = 0x80
1231 S_IXGRP = 0x8
1232 S_IXOTH = 0x1
1233 S_IXUSR = 0x40
11601234 TCIFLUSH = 0x1
11611235 TCIOFF = 0x3
11621236 TCIOFLUSH = 0x3
14261500 )
14271501
14281502 // Error table
1429 var errors = [...]string{
1430 1: "operation not permitted",
1431 2: "no such file or directory",
1432 3: "no such process",
1433 4: "interrupted system call",
1434 5: "input/output error",
1435 6: "device not configured",
1436 7: "argument list too long",
1437 8: "exec format error",
1438 9: "bad file descriptor",
1439 10: "no child processes",
1440 11: "resource deadlock avoided",
1441 12: "cannot allocate memory",
1442 13: "permission denied",
1443 14: "bad address",
1444 15: "block device required",
1445 16: "device busy",
1446 17: "file exists",
1447 18: "cross-device link",
1448 19: "operation not supported by device",
1449 20: "not a directory",
1450 21: "is a directory",
1451 22: "invalid argument",
1452 23: "too many open files in system",
1453 24: "too many open files",
1454 25: "inappropriate ioctl for device",
1455 26: "text file busy",
1456 27: "file too large",
1457 28: "no space left on device",
1458 29: "illegal seek",
1459 30: "read-only file system",
1460 31: "too many links",
1461 32: "broken pipe",
1462 33: "numerical argument out of domain",
1463 34: "result too large",
1464 35: "resource temporarily unavailable",
1465 36: "operation now in progress",
1466 37: "operation already in progress",
1467 38: "socket operation on non-socket",
1468 39: "destination address required",
1469 40: "message too long",
1470 41: "protocol wrong type for socket",
1471 42: "protocol not available",
1472 43: "protocol not supported",
1473 44: "socket type not supported",
1474 45: "operation not supported",
1475 46: "protocol family not supported",
1476 47: "address family not supported by protocol family",
1477 48: "address already in use",
1478 49: "can't assign requested address",
1479 50: "network is down",
1480 51: "network is unreachable",
1481 52: "network dropped connection on reset",
1482 53: "software caused connection abort",
1483 54: "connection reset by peer",
1484 55: "no buffer space available",
1485 56: "socket is already connected",
1486 57: "socket is not connected",
1487 58: "can't send after socket shutdown",
1488 59: "too many references: can't splice",
1489 60: "operation timed out",
1490 61: "connection refused",
1491 62: "too many levels of symbolic links",
1492 63: "file name too long",
1493 64: "host is down",
1494 65: "no route to host",
1495 66: "directory not empty",
1496 67: "too many processes",
1497 68: "too many users",
1498 69: "disc quota exceeded",
1499 70: "stale NFS file handle",
1500 71: "too many levels of remote in path",
1501 72: "RPC struct is bad",
1502 73: "RPC version wrong",
1503 74: "RPC prog. not avail",
1504 75: "program version wrong",
1505 76: "bad procedure for program",
1506 77: "no locks available",
1507 78: "function not implemented",
1508 79: "inappropriate file type or format",
1509 80: "authentication error",
1510 81: "need authenticator",
1511 82: "identifier removed",
1512 83: "no message of desired type",
1513 84: "value too large to be stored in data type",
1514 85: "operation canceled",
1515 86: "illegal byte sequence",
1516 87: "attribute not found",
1517 88: "programming error",
1518 89: "bad message",
1519 90: "multihop attempted",
1520 91: "link has been severed",
1521 92: "protocol error",
1522 93: "no medium found",
1523 94: "unknown error: 94",
1524 95: "unknown error: 95",
1525 96: "unknown error: 96",
1526 97: "unknown error: 97",
1527 98: "unknown error: 98",
1528 99: "unknown error: 99",
1503 var errorList = [...]struct {
1504 num syscall.Errno
1505 name string
1506 desc string
1507 }{
1508 {1, "EPERM", "operation not permitted"},
1509 {2, "ENOENT", "no such file or directory"},
1510 {3, "ESRCH", "no such process"},
1511 {4, "EINTR", "interrupted system call"},
1512 {5, "EIO", "input/output error"},
1513 {6, "ENXIO", "device not configured"},
1514 {7, "E2BIG", "argument list too long"},
1515 {8, "ENOEXEC", "exec format error"},
1516 {9, "EBADF", "bad file descriptor"},
1517 {10, "ECHILD", "no child processes"},
1518 {11, "EDEADLK", "resource deadlock avoided"},
1519 {12, "ENOMEM", "cannot allocate memory"},
1520 {13, "EACCES", "permission denied"},
1521 {14, "EFAULT", "bad address"},
1522 {15, "ENOTBLK", "block device required"},
1523 {16, "EBUSY", "device busy"},
1524 {17, "EEXIST", "file exists"},
1525 {18, "EXDEV", "cross-device link"},
1526 {19, "ENODEV", "operation not supported by device"},
1527 {20, "ENOTDIR", "not a directory"},
1528 {21, "EISDIR", "is a directory"},
1529 {22, "EINVAL", "invalid argument"},
1530 {23, "ENFILE", "too many open files in system"},
1531 {24, "EMFILE", "too many open files"},
1532 {25, "ENOTTY", "inappropriate ioctl for device"},
1533 {26, "ETXTBSY", "text file busy"},
1534 {27, "EFBIG", "file too large"},
1535 {28, "ENOSPC", "no space left on device"},
1536 {29, "ESPIPE", "illegal seek"},
1537 {30, "EROFS", "read-only file system"},
1538 {31, "EMLINK", "too many links"},
1539 {32, "EPIPE", "broken pipe"},
1540 {33, "EDOM", "numerical argument out of domain"},
1541 {34, "ERANGE", "result too large"},
1542 {35, "EWOULDBLOCK", "resource temporarily unavailable"},
1543 {36, "EINPROGRESS", "operation now in progress"},
1544 {37, "EALREADY", "operation already in progress"},
1545 {38, "ENOTSOCK", "socket operation on non-socket"},
1546 {39, "EDESTADDRREQ", "destination address required"},
1547 {40, "EMSGSIZE", "message too long"},
1548 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1549 {42, "ENOPROTOOPT", "protocol not available"},
1550 {43, "EPROTONOSUPPORT", "protocol not supported"},
1551 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1552 {45, "EOPNOTSUPP", "operation not supported"},
1553 {46, "EPFNOSUPPORT", "protocol family not supported"},
1554 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1555 {48, "EADDRINUSE", "address already in use"},
1556 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1557 {50, "ENETDOWN", "network is down"},
1558 {51, "ENETUNREACH", "network is unreachable"},
1559 {52, "ENETRESET", "network dropped connection on reset"},
1560 {53, "ECONNABORTED", "software caused connection abort"},
1561 {54, "ECONNRESET", "connection reset by peer"},
1562 {55, "ENOBUFS", "no buffer space available"},
1563 {56, "EISCONN", "socket is already connected"},
1564 {57, "ENOTCONN", "socket is not connected"},
1565 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1566 {59, "ETOOMANYREFS", "too many references: can't splice"},
1567 {60, "ETIMEDOUT", "operation timed out"},
1568 {61, "ECONNREFUSED", "connection refused"},
1569 {62, "ELOOP", "too many levels of symbolic links"},
1570 {63, "ENAMETOOLONG", "file name too long"},
1571 {64, "EHOSTDOWN", "host is down"},
1572 {65, "EHOSTUNREACH", "no route to host"},
1573 {66, "ENOTEMPTY", "directory not empty"},
1574 {67, "EPROCLIM", "too many processes"},
1575 {68, "EUSERS", "too many users"},
1576 {69, "EDQUOT", "disc quota exceeded"},
1577 {70, "ESTALE", "stale NFS file handle"},
1578 {71, "EREMOTE", "too many levels of remote in path"},
1579 {72, "EBADRPC", "RPC struct is bad"},
1580 {73, "ERPCMISMATCH", "RPC version wrong"},
1581 {74, "EPROGUNAVAIL", "RPC prog. not avail"},
1582 {75, "EPROGMISMATCH", "program version wrong"},
1583 {76, "EPROCUNAVAIL", "bad procedure for program"},
1584 {77, "ENOLCK", "no locks available"},
1585 {78, "ENOSYS", "function not implemented"},
1586 {79, "EFTYPE", "inappropriate file type or format"},
1587 {80, "EAUTH", "authentication error"},
1588 {81, "ENEEDAUTH", "need authenticator"},
1589 {82, "EIDRM", "identifier removed"},
1590 {83, "ENOMSG", "no message of desired type"},
1591 {84, "EOVERFLOW", "value too large to be stored in data type"},
1592 {85, "ECANCELED", "operation canceled"},
1593 {86, "EILSEQ", "illegal byte sequence"},
1594 {87, "ENOATTR", "attribute not found"},
1595 {88, "EDOOFUS", "programming error"},
1596 {89, "EBADMSG", "bad message"},
1597 {90, "EMULTIHOP", "multihop attempted"},
1598 {91, "ENOLINK", "link has been severed"},
1599 {92, "EPROTO", "protocol error"},
1600 {93, "ENOMEDIUM", "no medium found"},
1601 {94, "EUNUSED94", "unknown error: 94"},
1602 {95, "EUNUSED95", "unknown error: 95"},
1603 {96, "EUNUSED96", "unknown error: 96"},
1604 {97, "EUNUSED97", "unknown error: 97"},
1605 {98, "EUNUSED98", "unknown error: 98"},
1606 {99, "ELAST", "unknown error: 99"},
15291607 }
15301608
15311609 // Signal table
1532 var signals = [...]string{
1533 1: "hangup",
1534 2: "interrupt",
1535 3: "quit",
1536 4: "illegal instruction",
1537 5: "trace/BPT trap",
1538 6: "abort trap",
1539 7: "EMT trap",
1540 8: "floating point exception",
1541 9: "killed",
1542 10: "bus error",
1543 11: "segmentation fault",
1544 12: "bad system call",
1545 13: "broken pipe",
1546 14: "alarm clock",
1547 15: "terminated",
1548 16: "urgent I/O condition",
1549 17: "suspended (signal)",
1550 18: "suspended",
1551 19: "continued",
1552 20: "child exited",
1553 21: "stopped (tty input)",
1554 22: "stopped (tty output)",
1555 23: "I/O possible",
1556 24: "cputime limit exceeded",
1557 25: "filesize limit exceeded",
1558 26: "virtual timer expired",
1559 27: "profiling timer expired",
1560 28: "window size changes",
1561 29: "information request",
1562 30: "user defined signal 1",
1563 31: "user defined signal 2",
1564 32: "thread Scheduler",
1565 33: "checkPoint",
1566 34: "checkPointExit",
1610 var signalList = [...]struct {
1611 num syscall.Signal
1612 name string
1613 desc string
1614 }{
1615 {1, "SIGHUP", "hangup"},
1616 {2, "SIGINT", "interrupt"},
1617 {3, "SIGQUIT", "quit"},
1618 {4, "SIGILL", "illegal instruction"},
1619 {5, "SIGTRAP", "trace/BPT trap"},
1620 {6, "SIGIOT", "abort trap"},
1621 {7, "SIGEMT", "EMT trap"},
1622 {8, "SIGFPE", "floating point exception"},
1623 {9, "SIGKILL", "killed"},
1624 {10, "SIGBUS", "bus error"},
1625 {11, "SIGSEGV", "segmentation fault"},
1626 {12, "SIGSYS", "bad system call"},
1627 {13, "SIGPIPE", "broken pipe"},
1628 {14, "SIGALRM", "alarm clock"},
1629 {15, "SIGTERM", "terminated"},
1630 {16, "SIGURG", "urgent I/O condition"},
1631 {17, "SIGSTOP", "suspended (signal)"},
1632 {18, "SIGTSTP", "suspended"},
1633 {19, "SIGCONT", "continued"},
1634 {20, "SIGCHLD", "child exited"},
1635 {21, "SIGTTIN", "stopped (tty input)"},
1636 {22, "SIGTTOU", "stopped (tty output)"},
1637 {23, "SIGIO", "I/O possible"},
1638 {24, "SIGXCPU", "cputime limit exceeded"},
1639 {25, "SIGXFSZ", "filesize limit exceeded"},
1640 {26, "SIGVTALRM", "virtual timer expired"},
1641 {27, "SIGPROF", "profiling timer expired"},
1642 {28, "SIGWINCH", "window size changes"},
1643 {29, "SIGINFO", "information request"},
1644 {30, "SIGUSR1", "user defined signal 1"},
1645 {31, "SIGUSR2", "user defined signal 2"},
1646 {32, "SIGTHR", "thread Scheduler"},
1647 {33, "SIGCKPT", "checkPoint"},
1648 {34, "SIGCKPTEXIT", "checkPointExit"},
15671649 }
350350 CSTOP = 0x13
351351 CSTOPB = 0x400
352352 CSUSP = 0x1a
353 CTL_HW = 0x6
354 CTL_KERN = 0x1
353355 CTL_MAXNAME = 0x18
354356 CTL_NET = 0x4
355357 DLT_A429 = 0xb8
607609 F_UNLCKSYS = 0x4
608610 F_WRLCK = 0x3
609611 HUPCL = 0x4000
612 HW_MACHINE = 0x1
610613 ICANON = 0x100
611614 ICMP6_FILTER = 0x12
612615 ICRNL = 0x100
943946 IXANY = 0x800
944947 IXOFF = 0x400
945948 IXON = 0x200
949 KERN_HOSTNAME = 0xa
950 KERN_OSRELEASE = 0x2
951 KERN_OSTYPE = 0x1
952 KERN_VERSION = 0x4
946953 LOCK_EX = 0x2
947954 LOCK_NB = 0x4
948955 LOCK_SH = 0x1
13371344 SO_USELOOPBACK = 0x40
13381345 SO_USER_COOKIE = 0x1015
13391346 SO_VENDOR = 0x80000000
1347 S_BLKSIZE = 0x200
1348 S_IEXEC = 0x40
1349 S_IFBLK = 0x6000
1350 S_IFCHR = 0x2000
1351 S_IFDIR = 0x4000
1352 S_IFIFO = 0x1000
1353 S_IFLNK = 0xa000
1354 S_IFMT = 0xf000
1355 S_IFREG = 0x8000
1356 S_IFSOCK = 0xc000
1357 S_IFWHT = 0xe000
1358 S_IREAD = 0x100
1359 S_IRGRP = 0x20
1360 S_IROTH = 0x4
1361 S_IRUSR = 0x100
1362 S_IRWXG = 0x38
1363 S_IRWXO = 0x7
1364 S_IRWXU = 0x1c0
1365 S_ISGID = 0x400
1366 S_ISTXT = 0x200
1367 S_ISUID = 0x800
1368 S_ISVTX = 0x200
1369 S_IWGRP = 0x10
1370 S_IWOTH = 0x2
1371 S_IWRITE = 0x80
1372 S_IWUSR = 0x80
1373 S_IXGRP = 0x8
1374 S_IXOTH = 0x1
1375 S_IXUSR = 0x40
13401376 TAB0 = 0x0
13411377 TAB3 = 0x4
13421378 TABDLY = 0x4
16111647 )
16121648
16131649 // Error table
1614 var errors = [...]string{
1615 1: "operation not permitted",
1616 2: "no such file or directory",
1617 3: "no such process",
1618 4: "interrupted system call",
1619 5: "input/output error",
1620 6: "device not configured",
1621 7: "argument list too long",
1622 8: "exec format error",
1623 9: "bad file descriptor",
1624 10: "no child processes",
1625 11: "resource deadlock avoided",
1626 12: "cannot allocate memory",
1627 13: "permission denied",
1628 14: "bad address",
1629 15: "block device required",
1630 16: "device busy",
1631 17: "file exists",
1632 18: "cross-device link",
1633 19: "operation not supported by device",
1634 20: "not a directory",
1635 21: "is a directory",
1636 22: "invalid argument",
1637 23: "too many open files in system",
1638 24: "too many open files",
1639 25: "inappropriate ioctl for device",
1640 26: "text file busy",
1641 27: "file too large",
1642 28: "no space left on device",
1643 29: "illegal seek",
1644 30: "read-only file system",
1645 31: "too many links",
1646 32: "broken pipe",
1647 33: "numerical argument out of domain",
1648 34: "result too large",
1649 35: "resource temporarily unavailable",
1650 36: "operation now in progress",
1651 37: "operation already in progress",
1652 38: "socket operation on non-socket",
1653 39: "destination address required",
1654 40: "message too long",
1655 41: "protocol wrong type for socket",
1656 42: "protocol not available",
1657 43: "protocol not supported",
1658 44: "socket type not supported",
1659 45: "operation not supported",
1660 46: "protocol family not supported",
1661 47: "address family not supported by protocol family",
1662 48: "address already in use",
1663 49: "can't assign requested address",
1664 50: "network is down",
1665 51: "network is unreachable",
1666 52: "network dropped connection on reset",
1667 53: "software caused connection abort",
1668 54: "connection reset by peer",
1669 55: "no buffer space available",
1670 56: "socket is already connected",
1671 57: "socket is not connected",
1672 58: "can't send after socket shutdown",
1673 59: "too many references: can't splice",
1674 60: "operation timed out",
1675 61: "connection refused",
1676 62: "too many levels of symbolic links",
1677 63: "file name too long",
1678 64: "host is down",
1679 65: "no route to host",
1680 66: "directory not empty",
1681 67: "too many processes",
1682 68: "too many users",
1683 69: "disc quota exceeded",
1684 70: "stale NFS file handle",
1685 71: "too many levels of remote in path",
1686 72: "RPC struct is bad",
1687 73: "RPC version wrong",
1688 74: "RPC prog. not avail",
1689 75: "program version wrong",
1690 76: "bad procedure for program",
1691 77: "no locks available",
1692 78: "function not implemented",
1693 79: "inappropriate file type or format",
1694 80: "authentication error",
1695 81: "need authenticator",
1696 82: "identifier removed",
1697 83: "no message of desired type",
1698 84: "value too large to be stored in data type",
1699 85: "operation canceled",
1700 86: "illegal byte sequence",
1701 87: "attribute not found",
1702 88: "programming error",
1703 89: "bad message",
1704 90: "multihop attempted",
1705 91: "link has been severed",
1706 92: "protocol error",
1707 93: "capabilities insufficient",
1708 94: "not permitted in capability mode",
1709 95: "state not recoverable",
1710 96: "previous owner died",
1650 var errorList = [...]struct {
1651 num syscall.Errno
1652 name string
1653 desc string
1654 }{
1655 {1, "EPERM", "operation not permitted"},
1656 {2, "ENOENT", "no such file or directory"},
1657 {3, "ESRCH", "no such process"},
1658 {4, "EINTR", "interrupted system call"},
1659 {5, "EIO", "input/output error"},
1660 {6, "ENXIO", "device not configured"},
1661 {7, "E2BIG", "argument list too long"},
1662 {8, "ENOEXEC", "exec format error"},
1663 {9, "EBADF", "bad file descriptor"},
1664 {10, "ECHILD", "no child processes"},
1665 {11, "EDEADLK", "resource deadlock avoided"},
1666 {12, "ENOMEM", "cannot allocate memory"},
1667 {13, "EACCES", "permission denied"},
1668 {14, "EFAULT", "bad address"},
1669 {15, "ENOTBLK", "block device required"},
1670 {16, "EBUSY", "device busy"},
1671 {17, "EEXIST", "file exists"},
1672 {18, "EXDEV", "cross-device link"},
1673 {19, "ENODEV", "operation not supported by device"},
1674 {20, "ENOTDIR", "not a directory"},
1675 {21, "EISDIR", "is a directory"},
1676 {22, "EINVAL", "invalid argument"},
1677 {23, "ENFILE", "too many open files in system"},
1678 {24, "EMFILE", "too many open files"},
1679 {25, "ENOTTY", "inappropriate ioctl for device"},
1680 {26, "ETXTBSY", "text file busy"},
1681 {27, "EFBIG", "file too large"},
1682 {28, "ENOSPC", "no space left on device"},
1683 {29, "ESPIPE", "illegal seek"},
1684 {30, "EROFS", "read-only file system"},
1685 {31, "EMLINK", "too many links"},
1686 {32, "EPIPE", "broken pipe"},
1687 {33, "EDOM", "numerical argument out of domain"},
1688 {34, "ERANGE", "result too large"},
1689 {35, "EAGAIN", "resource temporarily unavailable"},
1690 {36, "EINPROGRESS", "operation now in progress"},
1691 {37, "EALREADY", "operation already in progress"},
1692 {38, "ENOTSOCK", "socket operation on non-socket"},
1693 {39, "EDESTADDRREQ", "destination address required"},
1694 {40, "EMSGSIZE", "message too long"},
1695 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1696 {42, "ENOPROTOOPT", "protocol not available"},
1697 {43, "EPROTONOSUPPORT", "protocol not supported"},
1698 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1699 {45, "EOPNOTSUPP", "operation not supported"},
1700 {46, "EPFNOSUPPORT", "protocol family not supported"},
1701 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1702 {48, "EADDRINUSE", "address already in use"},
1703 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1704 {50, "ENETDOWN", "network is down"},
1705 {51, "ENETUNREACH", "network is unreachable"},
1706 {52, "ENETRESET", "network dropped connection on reset"},
1707 {53, "ECONNABORTED", "software caused connection abort"},
1708 {54, "ECONNRESET", "connection reset by peer"},
1709 {55, "ENOBUFS", "no buffer space available"},
1710 {56, "EISCONN", "socket is already connected"},
1711 {57, "ENOTCONN", "socket is not connected"},
1712 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1713 {59, "ETOOMANYREFS", "too many references: can't splice"},
1714 {60, "ETIMEDOUT", "operation timed out"},
1715 {61, "ECONNREFUSED", "connection refused"},
1716 {62, "ELOOP", "too many levels of symbolic links"},
1717 {63, "ENAMETOOLONG", "file name too long"},
1718 {64, "EHOSTDOWN", "host is down"},
1719 {65, "EHOSTUNREACH", "no route to host"},
1720 {66, "ENOTEMPTY", "directory not empty"},
1721 {67, "EPROCLIM", "too many processes"},
1722 {68, "EUSERS", "too many users"},
1723 {69, "EDQUOT", "disc quota exceeded"},
1724 {70, "ESTALE", "stale NFS file handle"},
1725 {71, "EREMOTE", "too many levels of remote in path"},
1726 {72, "EBADRPC", "RPC struct is bad"},
1727 {73, "ERPCMISMATCH", "RPC version wrong"},
1728 {74, "EPROGUNAVAIL", "RPC prog. not avail"},
1729 {75, "EPROGMISMATCH", "program version wrong"},
1730 {76, "EPROCUNAVAIL", "bad procedure for program"},
1731 {77, "ENOLCK", "no locks available"},
1732 {78, "ENOSYS", "function not implemented"},
1733 {79, "EFTYPE", "inappropriate file type or format"},
1734 {80, "EAUTH", "authentication error"},
1735 {81, "ENEEDAUTH", "need authenticator"},
1736 {82, "EIDRM", "identifier removed"},
1737 {83, "ENOMSG", "no message of desired type"},
1738 {84, "EOVERFLOW", "value too large to be stored in data type"},
1739 {85, "ECANCELED", "operation canceled"},
1740 {86, "EILSEQ", "illegal byte sequence"},
1741 {87, "ENOATTR", "attribute not found"},
1742 {88, "EDOOFUS", "programming error"},
1743 {89, "EBADMSG", "bad message"},
1744 {90, "EMULTIHOP", "multihop attempted"},
1745 {91, "ENOLINK", "link has been severed"},
1746 {92, "EPROTO", "protocol error"},
1747 {93, "ENOTCAPABLE", "capabilities insufficient"},
1748 {94, "ECAPMODE", "not permitted in capability mode"},
1749 {95, "ENOTRECOVERABLE", "state not recoverable"},
1750 {96, "EOWNERDEAD", "previous owner died"},
17111751 }
17121752
17131753 // Signal table
1714 var signals = [...]string{
1715 1: "hangup",
1716 2: "interrupt",
1717 3: "quit",
1718 4: "illegal instruction",
1719 5: "trace/BPT trap",
1720 6: "abort trap",
1721 7: "EMT trap",
1722 8: "floating point exception",
1723 9: "killed",
1724 10: "bus error",
1725 11: "segmentation fault",
1726 12: "bad system call",
1727 13: "broken pipe",
1728 14: "alarm clock",
1729 15: "terminated",
1730 16: "urgent I/O condition",
1731 17: "suspended (signal)",
1732 18: "suspended",
1733 19: "continued",
1734 20: "child exited",
1735 21: "stopped (tty input)",
1736 22: "stopped (tty output)",
1737 23: "I/O possible",
1738 24: "cputime limit exceeded",
1739 25: "filesize limit exceeded",
1740 26: "virtual timer expired",
1741 27: "profiling timer expired",
1742 28: "window size changes",
1743 29: "information request",
1744 30: "user defined signal 1",
1745 31: "user defined signal 2",
1746 32: "unknown signal",
1747 33: "unknown signal",
1754 var signalList = [...]struct {
1755 num syscall.Signal
1756 name string
1757 desc string
1758 }{
1759 {1, "SIGHUP", "hangup"},
1760 {2, "SIGINT", "interrupt"},
1761 {3, "SIGQUIT", "quit"},
1762 {4, "SIGILL", "illegal instruction"},
1763 {5, "SIGTRAP", "trace/BPT trap"},
1764 {6, "SIGIOT", "abort trap"},
1765 {7, "SIGEMT", "EMT trap"},
1766 {8, "SIGFPE", "floating point exception"},
1767 {9, "SIGKILL", "killed"},
1768 {10, "SIGBUS", "bus error"},
1769 {11, "SIGSEGV", "segmentation fault"},
1770 {12, "SIGSYS", "bad system call"},
1771 {13, "SIGPIPE", "broken pipe"},
1772 {14, "SIGALRM", "alarm clock"},
1773 {15, "SIGTERM", "terminated"},
1774 {16, "SIGURG", "urgent I/O condition"},
1775 {17, "SIGSTOP", "suspended (signal)"},
1776 {18, "SIGTSTP", "suspended"},
1777 {19, "SIGCONT", "continued"},
1778 {20, "SIGCHLD", "child exited"},
1779 {21, "SIGTTIN", "stopped (tty input)"},
1780 {22, "SIGTTOU", "stopped (tty output)"},
1781 {23, "SIGIO", "I/O possible"},
1782 {24, "SIGXCPU", "cputime limit exceeded"},
1783 {25, "SIGXFSZ", "filesize limit exceeded"},
1784 {26, "SIGVTALRM", "virtual timer expired"},
1785 {27, "SIGPROF", "profiling timer expired"},
1786 {28, "SIGWINCH", "window size changes"},
1787 {29, "SIGINFO", "information request"},
1788 {30, "SIGUSR1", "user defined signal 1"},
1789 {31, "SIGUSR2", "user defined signal 2"},
1790 {32, "SIGTHR", "unknown signal"},
1791 {33, "SIGLIBRT", "unknown signal"},
17481792 }
350350 CSTOP = 0x13
351351 CSTOPB = 0x400
352352 CSUSP = 0x1a
353 CTL_HW = 0x6
354 CTL_KERN = 0x1
353355 CTL_MAXNAME = 0x18
354356 CTL_NET = 0x4
355357 DLT_A429 = 0xb8
607609 F_UNLCKSYS = 0x4
608610 F_WRLCK = 0x3
609611 HUPCL = 0x4000
612 HW_MACHINE = 0x1
610613 ICANON = 0x100
611614 ICMP6_FILTER = 0x12
612615 ICRNL = 0x100
943946 IXANY = 0x800
944947 IXOFF = 0x400
945948 IXON = 0x200
949 KERN_HOSTNAME = 0xa
950 KERN_OSRELEASE = 0x2
951 KERN_OSTYPE = 0x1
952 KERN_VERSION = 0x4
946953 LOCK_EX = 0x2
947954 LOCK_NB = 0x4
948955 LOCK_SH = 0x1
13381345 SO_USELOOPBACK = 0x40
13391346 SO_USER_COOKIE = 0x1015
13401347 SO_VENDOR = 0x80000000
1348 S_BLKSIZE = 0x200
1349 S_IEXEC = 0x40
1350 S_IFBLK = 0x6000
1351 S_IFCHR = 0x2000
1352 S_IFDIR = 0x4000
1353 S_IFIFO = 0x1000
1354 S_IFLNK = 0xa000
1355 S_IFMT = 0xf000
1356 S_IFREG = 0x8000
1357 S_IFSOCK = 0xc000
1358 S_IFWHT = 0xe000
1359 S_IREAD = 0x100
1360 S_IRGRP = 0x20
1361 S_IROTH = 0x4
1362 S_IRUSR = 0x100
1363 S_IRWXG = 0x38
1364 S_IRWXO = 0x7
1365 S_IRWXU = 0x1c0
1366 S_ISGID = 0x400
1367 S_ISTXT = 0x200
1368 S_ISUID = 0x800
1369 S_ISVTX = 0x200
1370 S_IWGRP = 0x10
1371 S_IWOTH = 0x2
1372 S_IWRITE = 0x80
1373 S_IWUSR = 0x80
1374 S_IXGRP = 0x8
1375 S_IXOTH = 0x1
1376 S_IXUSR = 0x40
13411377 TAB0 = 0x0
13421378 TAB3 = 0x4
13431379 TABDLY = 0x4
16121648 )
16131649
16141650 // Error table
1615 var errors = [...]string{
1616 1: "operation not permitted",
1617 2: "no such file or directory",
1618 3: "no such process",
1619 4: "interrupted system call",
1620 5: "input/output error",
1621 6: "device not configured",
1622 7: "argument list too long",
1623 8: "exec format error",
1624 9: "bad file descriptor",
1625 10: "no child processes",
1626 11: "resource deadlock avoided",
1627 12: "cannot allocate memory",
1628 13: "permission denied",
1629 14: "bad address",
1630 15: "block device required",
1631 16: "device busy",
1632 17: "file exists",
1633 18: "cross-device link",
1634 19: "operation not supported by device",
1635 20: "not a directory",
1636 21: "is a directory",
1637 22: "invalid argument",
1638 23: "too many open files in system",
1639 24: "too many open files",
1640 25: "inappropriate ioctl for device",
1641 26: "text file busy",
1642 27: "file too large",
1643 28: "no space left on device",
1644 29: "illegal seek",
1645 30: "read-only file system",
1646 31: "too many links",
1647 32: "broken pipe",
1648 33: "numerical argument out of domain",
1649 34: "result too large",
1650 35: "resource temporarily unavailable",
1651 36: "operation now in progress",
1652 37: "operation already in progress",
1653 38: "socket operation on non-socket",
1654 39: "destination address required",
1655 40: "message too long",
1656 41: "protocol wrong type for socket",
1657 42: "protocol not available",
1658 43: "protocol not supported",
1659 44: "socket type not supported",
1660 45: "operation not supported",
1661 46: "protocol family not supported",
1662 47: "address family not supported by protocol family",
1663 48: "address already in use",
1664 49: "can't assign requested address",
1665 50: "network is down",
1666 51: "network is unreachable",
1667 52: "network dropped connection on reset",
1668 53: "software caused connection abort",
1669 54: "connection reset by peer",
1670 55: "no buffer space available",
1671 56: "socket is already connected",
1672 57: "socket is not connected",
1673 58: "can't send after socket shutdown",
1674 59: "too many references: can't splice",
1675 60: "operation timed out",
1676 61: "connection refused",
1677 62: "too many levels of symbolic links",
1678 63: "file name too long",
1679 64: "host is down",
1680 65: "no route to host",
1681 66: "directory not empty",
1682 67: "too many processes",
1683 68: "too many users",
1684 69: "disc quota exceeded",
1685 70: "stale NFS file handle",
1686 71: "too many levels of remote in path",
1687 72: "RPC struct is bad",
1688 73: "RPC version wrong",
1689 74: "RPC prog. not avail",
1690 75: "program version wrong",
1691 76: "bad procedure for program",
1692 77: "no locks available",
1693 78: "function not implemented",
1694 79: "inappropriate file type or format",
1695 80: "authentication error",
1696 81: "need authenticator",
1697 82: "identifier removed",
1698 83: "no message of desired type",
1699 84: "value too large to be stored in data type",
1700 85: "operation canceled",
1701 86: "illegal byte sequence",
1702 87: "attribute not found",
1703 88: "programming error",
1704 89: "bad message",
1705 90: "multihop attempted",
1706 91: "link has been severed",
1707 92: "protocol error",
1708 93: "capabilities insufficient",
1709 94: "not permitted in capability mode",
1710 95: "state not recoverable",
1711 96: "previous owner died",
1651 var errorList = [...]struct {
1652 num syscall.Errno
1653 name string
1654 desc string
1655 }{
1656 {1, "EPERM", "operation not permitted"},
1657 {2, "ENOENT", "no such file or directory"},
1658 {3, "ESRCH", "no such process"},
1659 {4, "EINTR", "interrupted system call"},
1660 {5, "EIO", "input/output error"},
1661 {6, "ENXIO", "device not configured"},
1662 {7, "E2BIG", "argument list too long"},
1663 {8, "ENOEXEC", "exec format error"},
1664 {9, "EBADF", "bad file descriptor"},
1665 {10, "ECHILD", "no child processes"},
1666 {11, "EDEADLK", "resource deadlock avoided"},
1667 {12, "ENOMEM", "cannot allocate memory"},
1668 {13, "EACCES", "permission denied"},
1669 {14, "EFAULT", "bad address"},
1670 {15, "ENOTBLK", "block device required"},
1671 {16, "EBUSY", "device busy"},
1672 {17, "EEXIST", "file exists"},
1673 {18, "EXDEV", "cross-device link"},
1674 {19, "ENODEV", "operation not supported by device"},
1675 {20, "ENOTDIR", "not a directory"},
1676 {21, "EISDIR", "is a directory"},
1677 {22, "EINVAL", "invalid argument"},
1678 {23, "ENFILE", "too many open files in system"},
1679 {24, "EMFILE", "too many open files"},
1680 {25, "ENOTTY", "inappropriate ioctl for device"},
1681 {26, "ETXTBSY", "text file busy"},
1682 {27, "EFBIG", "file too large"},
1683 {28, "ENOSPC", "no space left on device"},
1684 {29, "ESPIPE", "illegal seek"},
1685 {30, "EROFS", "read-only file system"},
1686 {31, "EMLINK", "too many links"},
1687 {32, "EPIPE", "broken pipe"},
1688 {33, "EDOM", "numerical argument out of domain"},
1689 {34, "ERANGE", "result too large"},
1690 {35, "EAGAIN", "resource temporarily unavailable"},
1691 {36, "EINPROGRESS", "operation now in progress"},
1692 {37, "EALREADY", "operation already in progress"},
1693 {38, "ENOTSOCK", "socket operation on non-socket"},
1694 {39, "EDESTADDRREQ", "destination address required"},
1695 {40, "EMSGSIZE", "message too long"},
1696 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1697 {42, "ENOPROTOOPT", "protocol not available"},
1698 {43, "EPROTONOSUPPORT", "protocol not supported"},
1699 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1700 {45, "EOPNOTSUPP", "operation not supported"},
1701 {46, "EPFNOSUPPORT", "protocol family not supported"},
1702 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1703 {48, "EADDRINUSE", "address already in use"},
1704 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1705 {50, "ENETDOWN", "network is down"},
1706 {51, "ENETUNREACH", "network is unreachable"},
1707 {52, "ENETRESET", "network dropped connection on reset"},
1708 {53, "ECONNABORTED", "software caused connection abort"},
1709 {54, "ECONNRESET", "connection reset by peer"},
1710 {55, "ENOBUFS", "no buffer space available"},
1711 {56, "EISCONN", "socket is already connected"},
1712 {57, "ENOTCONN", "socket is not connected"},
1713 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1714 {59, "ETOOMANYREFS", "too many references: can't splice"},
1715 {60, "ETIMEDOUT", "operation timed out"},
1716 {61, "ECONNREFUSED", "connection refused"},
1717 {62, "ELOOP", "too many levels of symbolic links"},
1718 {63, "ENAMETOOLONG", "file name too long"},
1719 {64, "EHOSTDOWN", "host is down"},
1720 {65, "EHOSTUNREACH", "no route to host"},
1721 {66, "ENOTEMPTY", "directory not empty"},
1722 {67, "EPROCLIM", "too many processes"},
1723 {68, "EUSERS", "too many users"},
1724 {69, "EDQUOT", "disc quota exceeded"},
1725 {70, "ESTALE", "stale NFS file handle"},
1726 {71, "EREMOTE", "too many levels of remote in path"},
1727 {72, "EBADRPC", "RPC struct is bad"},
1728 {73, "ERPCMISMATCH", "RPC version wrong"},
1729 {74, "EPROGUNAVAIL", "RPC prog. not avail"},
1730 {75, "EPROGMISMATCH", "program version wrong"},
1731 {76, "EPROCUNAVAIL", "bad procedure for program"},
1732 {77, "ENOLCK", "no locks available"},
1733 {78, "ENOSYS", "function not implemented"},
1734 {79, "EFTYPE", "inappropriate file type or format"},
1735 {80, "EAUTH", "authentication error"},
1736 {81, "ENEEDAUTH", "need authenticator"},
1737 {82, "EIDRM", "identifier removed"},
1738 {83, "ENOMSG", "no message of desired type"},
1739 {84, "EOVERFLOW", "value too large to be stored in data type"},
1740 {85, "ECANCELED", "operation canceled"},
1741 {86, "EILSEQ", "illegal byte sequence"},
1742 {87, "ENOATTR", "attribute not found"},
1743 {88, "EDOOFUS", "programming error"},
1744 {89, "EBADMSG", "bad message"},
1745 {90, "EMULTIHOP", "multihop attempted"},
1746 {91, "ENOLINK", "link has been severed"},
1747 {92, "EPROTO", "protocol error"},
1748 {93, "ENOTCAPABLE", "capabilities insufficient"},
1749 {94, "ECAPMODE", "not permitted in capability mode"},
1750 {95, "ENOTRECOVERABLE", "state not recoverable"},
1751 {96, "EOWNERDEAD", "previous owner died"},
17121752 }
17131753
17141754 // Signal table
1715 var signals = [...]string{
1716 1: "hangup",
1717 2: "interrupt",
1718 3: "quit",
1719 4: "illegal instruction",
1720 5: "trace/BPT trap",
1721 6: "abort trap",
1722 7: "EMT trap",
1723 8: "floating point exception",
1724 9: "killed",
1725 10: "bus error",
1726 11: "segmentation fault",
1727 12: "bad system call",
1728 13: "broken pipe",
1729 14: "alarm clock",
1730 15: "terminated",
1731 16: "urgent I/O condition",
1732 17: "suspended (signal)",
1733 18: "suspended",
1734 19: "continued",
1735 20: "child exited",
1736 21: "stopped (tty input)",
1737 22: "stopped (tty output)",
1738 23: "I/O possible",
1739 24: "cputime limit exceeded",
1740 25: "filesize limit exceeded",
1741 26: "virtual timer expired",
1742 27: "profiling timer expired",
1743 28: "window size changes",
1744 29: "information request",
1745 30: "user defined signal 1",
1746 31: "user defined signal 2",
1747 32: "unknown signal",
1748 33: "unknown signal",
1755 var signalList = [...]struct {
1756 num syscall.Signal
1757 name string
1758 desc string
1759 }{
1760 {1, "SIGHUP", "hangup"},
1761 {2, "SIGINT", "interrupt"},
1762 {3, "SIGQUIT", "quit"},
1763 {4, "SIGILL", "illegal instruction"},
1764 {5, "SIGTRAP", "trace/BPT trap"},
1765 {6, "SIGIOT", "abort trap"},
1766 {7, "SIGEMT", "EMT trap"},
1767 {8, "SIGFPE", "floating point exception"},
1768 {9, "SIGKILL", "killed"},
1769 {10, "SIGBUS", "bus error"},
1770 {11, "SIGSEGV", "segmentation fault"},
1771 {12, "SIGSYS", "bad system call"},
1772 {13, "SIGPIPE", "broken pipe"},
1773 {14, "SIGALRM", "alarm clock"},
1774 {15, "SIGTERM", "terminated"},
1775 {16, "SIGURG", "urgent I/O condition"},
1776 {17, "SIGSTOP", "suspended (signal)"},
1777 {18, "SIGTSTP", "suspended"},
1778 {19, "SIGCONT", "continued"},
1779 {20, "SIGCHLD", "child exited"},
1780 {21, "SIGTTIN", "stopped (tty input)"},
1781 {22, "SIGTTOU", "stopped (tty output)"},
1782 {23, "SIGIO", "I/O possible"},
1783 {24, "SIGXCPU", "cputime limit exceeded"},
1784 {25, "SIGXFSZ", "filesize limit exceeded"},
1785 {26, "SIGVTALRM", "virtual timer expired"},
1786 {27, "SIGPROF", "profiling timer expired"},
1787 {28, "SIGWINCH", "window size changes"},
1788 {29, "SIGINFO", "information request"},
1789 {30, "SIGUSR1", "user defined signal 1"},
1790 {31, "SIGUSR2", "user defined signal 2"},
1791 {32, "SIGTHR", "unknown signal"},
1792 {33, "SIGLIBRT", "unknown signal"},
17491793 }
350350 CSTOP = 0x13
351351 CSTOPB = 0x400
352352 CSUSP = 0x1a
353 CTL_HW = 0x6
354 CTL_KERN = 0x1
353355 CTL_MAXNAME = 0x18
354356 CTL_NET = 0x4
355357 DLT_A429 = 0xb8
614616 F_UNLCKSYS = 0x4
615617 F_WRLCK = 0x3
616618 HUPCL = 0x4000
619 HW_MACHINE = 0x1
617620 ICANON = 0x100
618621 ICMP6_FILTER = 0x12
619622 ICRNL = 0x100
950953 IXANY = 0x800
951954 IXOFF = 0x400
952955 IXON = 0x200
956 KERN_HOSTNAME = 0xa
957 KERN_OSRELEASE = 0x2
958 KERN_OSTYPE = 0x1
959 KERN_VERSION = 0x4
953960 LOCK_EX = 0x2
954961 LOCK_NB = 0x4
955962 LOCK_SH = 0x1
13461353 SO_USELOOPBACK = 0x40
13471354 SO_USER_COOKIE = 0x1015
13481355 SO_VENDOR = 0x80000000
1356 S_BLKSIZE = 0x200
1357 S_IEXEC = 0x40
1358 S_IFBLK = 0x6000
1359 S_IFCHR = 0x2000
1360 S_IFDIR = 0x4000
1361 S_IFIFO = 0x1000
1362 S_IFLNK = 0xa000
1363 S_IFMT = 0xf000
1364 S_IFREG = 0x8000
1365 S_IFSOCK = 0xc000
1366 S_IFWHT = 0xe000
1367 S_IREAD = 0x100
1368 S_IRGRP = 0x20
1369 S_IROTH = 0x4
1370 S_IRUSR = 0x100
1371 S_IRWXG = 0x38
1372 S_IRWXO = 0x7
1373 S_IRWXU = 0x1c0
1374 S_ISGID = 0x400
1375 S_ISTXT = 0x200
1376 S_ISUID = 0x800
1377 S_ISVTX = 0x200
1378 S_IWGRP = 0x10
1379 S_IWOTH = 0x2
1380 S_IWRITE = 0x80
1381 S_IWUSR = 0x80
1382 S_IXGRP = 0x8
1383 S_IXOTH = 0x1
1384 S_IXUSR = 0x40
13491385 TAB0 = 0x0
13501386 TAB3 = 0x4
13511387 TABDLY = 0x4
16201656 )
16211657
16221658 // Error table
1623 var errors = [...]string{
1624 1: "operation not permitted",
1625 2: "no such file or directory",
1626 3: "no such process",
1627 4: "interrupted system call",
1628 5: "input/output error",
1629 6: "device not configured",
1630 7: "argument list too long",
1631 8: "exec format error",
1632 9: "bad file descriptor",
1633 10: "no child processes",
1634 11: "resource deadlock avoided",
1635 12: "cannot allocate memory",
1636 13: "permission denied",
1637 14: "bad address",
1638 15: "block device required",
1639 16: "device busy",
1640 17: "file exists",
1641 18: "cross-device link",
1642 19: "operation not supported by device",
1643 20: "not a directory",
1644 21: "is a directory",
1645 22: "invalid argument",
1646 23: "too many open files in system",
1647 24: "too many open files",
1648 25: "inappropriate ioctl for device",
1649 26: "text file busy",
1650 27: "file too large",
1651 28: "no space left on device",
1652 29: "illegal seek",
1653 30: "read-only file system",
1654 31: "too many links",
1655 32: "broken pipe",
1656 33: "numerical argument out of domain",
1657 34: "result too large",
1658 35: "resource temporarily unavailable",
1659 36: "operation now in progress",
1660 37: "operation already in progress",
1661 38: "socket operation on non-socket",
1662 39: "destination address required",
1663 40: "message too long",
1664 41: "protocol wrong type for socket",
1665 42: "protocol not available",
1666 43: "protocol not supported",
1667 44: "socket type not supported",
1668 45: "operation not supported",
1669 46: "protocol family not supported",
1670 47: "address family not supported by protocol family",
1671 48: "address already in use",
1672 49: "can't assign requested address",
1673 50: "network is down",
1674 51: "network is unreachable",
1675 52: "network dropped connection on reset",
1676 53: "software caused connection abort",
1677 54: "connection reset by peer",
1678 55: "no buffer space available",
1679 56: "socket is already connected",
1680 57: "socket is not connected",
1681 58: "can't send after socket shutdown",
1682 59: "too many references: can't splice",
1683 60: "operation timed out",
1684 61: "connection refused",
1685 62: "too many levels of symbolic links",
1686 63: "file name too long",
1687 64: "host is down",
1688 65: "no route to host",
1689 66: "directory not empty",
1690 67: "too many processes",
1691 68: "too many users",
1692 69: "disc quota exceeded",
1693 70: "stale NFS file handle",
1694 71: "too many levels of remote in path",
1695 72: "RPC struct is bad",
1696 73: "RPC version wrong",
1697 74: "RPC prog. not avail",
1698 75: "program version wrong",
1699 76: "bad procedure for program",
1700 77: "no locks available",
1701 78: "function not implemented",
1702 79: "inappropriate file type or format",
1703 80: "authentication error",
1704 81: "need authenticator",
1705 82: "identifier removed",
1706 83: "no message of desired type",
1707 84: "value too large to be stored in data type",
1708 85: "operation canceled",
1709 86: "illegal byte sequence",
1710 87: "attribute not found",
1711 88: "programming error",
1712 89: "bad message",
1713 90: "multihop attempted",
1714 91: "link has been severed",
1715 92: "protocol error",
1716 93: "capabilities insufficient",
1717 94: "not permitted in capability mode",
1718 95: "state not recoverable",
1719 96: "previous owner died",
1659 var errorList = [...]struct {
1660 num syscall.Errno
1661 name string
1662 desc string
1663 }{
1664 {1, "EPERM", "operation not permitted"},
1665 {2, "ENOENT", "no such file or directory"},
1666 {3, "ESRCH", "no such process"},
1667 {4, "EINTR", "interrupted system call"},
1668 {5, "EIO", "input/output error"},
1669 {6, "ENXIO", "device not configured"},
1670 {7, "E2BIG", "argument list too long"},
1671 {8, "ENOEXEC", "exec format error"},
1672 {9, "EBADF", "bad file descriptor"},
1673 {10, "ECHILD", "no child processes"},
1674 {11, "EDEADLK", "resource deadlock avoided"},
1675 {12, "ENOMEM", "cannot allocate memory"},
1676 {13, "EACCES", "permission denied"},
1677 {14, "EFAULT", "bad address"},
1678 {15, "ENOTBLK", "block device required"},
1679 {16, "EBUSY", "device busy"},
1680 {17, "EEXIST", "file exists"},
1681 {18, "EXDEV", "cross-device link"},
1682 {19, "ENODEV", "operation not supported by device"},
1683 {20, "ENOTDIR", "not a directory"},
1684 {21, "EISDIR", "is a directory"},
1685 {22, "EINVAL", "invalid argument"},
1686 {23, "ENFILE", "too many open files in system"},
1687 {24, "EMFILE", "too many open files"},
1688 {25, "ENOTTY", "inappropriate ioctl for device"},
1689 {26, "ETXTBSY", "text file busy"},
1690 {27, "EFBIG", "file too large"},
1691 {28, "ENOSPC", "no space left on device"},
1692 {29, "ESPIPE", "illegal seek"},
1693 {30, "EROFS", "read-only file system"},
1694 {31, "EMLINK", "too many links"},
1695 {32, "EPIPE", "broken pipe"},
1696 {33, "EDOM", "numerical argument out of domain"},
1697 {34, "ERANGE", "result too large"},
1698 {35, "EAGAIN", "resource temporarily unavailable"},
1699 {36, "EINPROGRESS", "operation now in progress"},
1700 {37, "EALREADY", "operation already in progress"},
1701 {38, "ENOTSOCK", "socket operation on non-socket"},
1702 {39, "EDESTADDRREQ", "destination address required"},
1703 {40, "EMSGSIZE", "message too long"},
1704 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1705 {42, "ENOPROTOOPT", "protocol not available"},
1706 {43, "EPROTONOSUPPORT", "protocol not supported"},
1707 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1708 {45, "EOPNOTSUPP", "operation not supported"},
1709 {46, "EPFNOSUPPORT", "protocol family not supported"},
1710 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1711 {48, "EADDRINUSE", "address already in use"},
1712 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1713 {50, "ENETDOWN", "network is down"},
1714 {51, "ENETUNREACH", "network is unreachable"},
1715 {52, "ENETRESET", "network dropped connection on reset"},
1716 {53, "ECONNABORTED", "software caused connection abort"},
1717 {54, "ECONNRESET", "connection reset by peer"},
1718 {55, "ENOBUFS", "no buffer space available"},
1719 {56, "EISCONN", "socket is already connected"},
1720 {57, "ENOTCONN", "socket is not connected"},
1721 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1722 {59, "ETOOMANYREFS", "too many references: can't splice"},
1723 {60, "ETIMEDOUT", "operation timed out"},
1724 {61, "ECONNREFUSED", "connection refused"},
1725 {62, "ELOOP", "too many levels of symbolic links"},
1726 {63, "ENAMETOOLONG", "file name too long"},
1727 {64, "EHOSTDOWN", "host is down"},
1728 {65, "EHOSTUNREACH", "no route to host"},
1729 {66, "ENOTEMPTY", "directory not empty"},
1730 {67, "EPROCLIM", "too many processes"},
1731 {68, "EUSERS", "too many users"},
1732 {69, "EDQUOT", "disc quota exceeded"},
1733 {70, "ESTALE", "stale NFS file handle"},
1734 {71, "EREMOTE", "too many levels of remote in path"},
1735 {72, "EBADRPC", "RPC struct is bad"},
1736 {73, "ERPCMISMATCH", "RPC version wrong"},
1737 {74, "EPROGUNAVAIL", "RPC prog. not avail"},
1738 {75, "EPROGMISMATCH", "program version wrong"},
1739 {76, "EPROCUNAVAIL", "bad procedure for program"},
1740 {77, "ENOLCK", "no locks available"},
1741 {78, "ENOSYS", "function not implemented"},
1742 {79, "EFTYPE", "inappropriate file type or format"},
1743 {80, "EAUTH", "authentication error"},
1744 {81, "ENEEDAUTH", "need authenticator"},
1745 {82, "EIDRM", "identifier removed"},
1746 {83, "ENOMSG", "no message of desired type"},
1747 {84, "EOVERFLOW", "value too large to be stored in data type"},
1748 {85, "ECANCELED", "operation canceled"},
1749 {86, "EILSEQ", "illegal byte sequence"},
1750 {87, "ENOATTR", "attribute not found"},
1751 {88, "EDOOFUS", "programming error"},
1752 {89, "EBADMSG", "bad message"},
1753 {90, "EMULTIHOP", "multihop attempted"},
1754 {91, "ENOLINK", "link has been severed"},
1755 {92, "EPROTO", "protocol error"},
1756 {93, "ENOTCAPABLE", "capabilities insufficient"},
1757 {94, "ECAPMODE", "not permitted in capability mode"},
1758 {95, "ENOTRECOVERABLE", "state not recoverable"},
1759 {96, "EOWNERDEAD", "previous owner died"},
17201760 }
17211761
17221762 // Signal table
1723 var signals = [...]string{
1724 1: "hangup",
1725 2: "interrupt",
1726 3: "quit",
1727 4: "illegal instruction",
1728 5: "trace/BPT trap",
1729 6: "abort trap",
1730 7: "EMT trap",
1731 8: "floating point exception",
1732 9: "killed",
1733 10: "bus error",
1734 11: "segmentation fault",
1735 12: "bad system call",
1736 13: "broken pipe",
1737 14: "alarm clock",
1738 15: "terminated",
1739 16: "urgent I/O condition",
1740 17: "suspended (signal)",
1741 18: "suspended",
1742 19: "continued",
1743 20: "child exited",
1744 21: "stopped (tty input)",
1745 22: "stopped (tty output)",
1746 23: "I/O possible",
1747 24: "cputime limit exceeded",
1748 25: "filesize limit exceeded",
1749 26: "virtual timer expired",
1750 27: "profiling timer expired",
1751 28: "window size changes",
1752 29: "information request",
1753 30: "user defined signal 1",
1754 31: "user defined signal 2",
1755 32: "unknown signal",
1756 33: "unknown signal",
1763 var signalList = [...]struct {
1764 num syscall.Signal
1765 name string
1766 desc string
1767 }{
1768 {1, "SIGHUP", "hangup"},
1769 {2, "SIGINT", "interrupt"},
1770 {3, "SIGQUIT", "quit"},
1771 {4, "SIGILL", "illegal instruction"},
1772 {5, "SIGTRAP", "trace/BPT trap"},
1773 {6, "SIGIOT", "abort trap"},
1774 {7, "SIGEMT", "EMT trap"},
1775 {8, "SIGFPE", "floating point exception"},
1776 {9, "SIGKILL", "killed"},
1777 {10, "SIGBUS", "bus error"},
1778 {11, "SIGSEGV", "segmentation fault"},
1779 {12, "SIGSYS", "bad system call"},
1780 {13, "SIGPIPE", "broken pipe"},
1781 {14, "SIGALRM", "alarm clock"},
1782 {15, "SIGTERM", "terminated"},
1783 {16, "SIGURG", "urgent I/O condition"},
1784 {17, "SIGSTOP", "suspended (signal)"},
1785 {18, "SIGTSTP", "suspended"},
1786 {19, "SIGCONT", "continued"},
1787 {20, "SIGCHLD", "child exited"},
1788 {21, "SIGTTIN", "stopped (tty input)"},
1789 {22, "SIGTTOU", "stopped (tty output)"},
1790 {23, "SIGIO", "I/O possible"},
1791 {24, "SIGXCPU", "cputime limit exceeded"},
1792 {25, "SIGXFSZ", "filesize limit exceeded"},
1793 {26, "SIGVTALRM", "virtual timer expired"},
1794 {27, "SIGPROF", "profiling timer expired"},
1795 {28, "SIGWINCH", "window size changes"},
1796 {29, "SIGINFO", "information request"},
1797 {30, "SIGUSR1", "user defined signal 1"},
1798 {31, "SIGUSR2", "user defined signal 2"},
1799 {32, "SIGTHR", "unknown signal"},
1800 {33, "SIGLIBRT", "unknown signal"},
17571801 }
0 // mkerrors.sh -m64
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build arm64,freebsd
4
5 // Created by cgo -godefs - DO NOT EDIT
6 // cgo -godefs -- -m64 _const.go
7
8 package unix
9
10 import "syscall"
11
12 const (
13 AF_APPLETALK = 0x10
14 AF_ARP = 0x23
15 AF_ATM = 0x1e
16 AF_BLUETOOTH = 0x24
17 AF_CCITT = 0xa
18 AF_CHAOS = 0x5
19 AF_CNT = 0x15
20 AF_COIP = 0x14
21 AF_DATAKIT = 0x9
22 AF_DECnet = 0xc
23 AF_DLI = 0xd
24 AF_E164 = 0x1a
25 AF_ECMA = 0x8
26 AF_HYLINK = 0xf
27 AF_IEEE80211 = 0x25
28 AF_IMPLINK = 0x3
29 AF_INET = 0x2
30 AF_INET6 = 0x1c
31 AF_INET6_SDP = 0x2a
32 AF_INET_SDP = 0x28
33 AF_IPX = 0x17
34 AF_ISDN = 0x1a
35 AF_ISO = 0x7
36 AF_LAT = 0xe
37 AF_LINK = 0x12
38 AF_LOCAL = 0x1
39 AF_MAX = 0x2a
40 AF_NATM = 0x1d
41 AF_NETBIOS = 0x6
42 AF_NETGRAPH = 0x20
43 AF_OSI = 0x7
44 AF_PUP = 0x4
45 AF_ROUTE = 0x11
46 AF_SCLUSTER = 0x22
47 AF_SIP = 0x18
48 AF_SLOW = 0x21
49 AF_SNA = 0xb
50 AF_UNIX = 0x1
51 AF_UNSPEC = 0x0
52 AF_VENDOR00 = 0x27
53 AF_VENDOR01 = 0x29
54 AF_VENDOR02 = 0x2b
55 AF_VENDOR03 = 0x2d
56 AF_VENDOR04 = 0x2f
57 AF_VENDOR05 = 0x31
58 AF_VENDOR06 = 0x33
59 AF_VENDOR07 = 0x35
60 AF_VENDOR08 = 0x37
61 AF_VENDOR09 = 0x39
62 AF_VENDOR10 = 0x3b
63 AF_VENDOR11 = 0x3d
64 AF_VENDOR12 = 0x3f
65 AF_VENDOR13 = 0x41
66 AF_VENDOR14 = 0x43
67 AF_VENDOR15 = 0x45
68 AF_VENDOR16 = 0x47
69 AF_VENDOR17 = 0x49
70 AF_VENDOR18 = 0x4b
71 AF_VENDOR19 = 0x4d
72 AF_VENDOR20 = 0x4f
73 AF_VENDOR21 = 0x51
74 AF_VENDOR22 = 0x53
75 AF_VENDOR23 = 0x55
76 AF_VENDOR24 = 0x57
77 AF_VENDOR25 = 0x59
78 AF_VENDOR26 = 0x5b
79 AF_VENDOR27 = 0x5d
80 AF_VENDOR28 = 0x5f
81 AF_VENDOR29 = 0x61
82 AF_VENDOR30 = 0x63
83 AF_VENDOR31 = 0x65
84 AF_VENDOR32 = 0x67
85 AF_VENDOR33 = 0x69
86 AF_VENDOR34 = 0x6b
87 AF_VENDOR35 = 0x6d
88 AF_VENDOR36 = 0x6f
89 AF_VENDOR37 = 0x71
90 AF_VENDOR38 = 0x73
91 AF_VENDOR39 = 0x75
92 AF_VENDOR40 = 0x77
93 AF_VENDOR41 = 0x79
94 AF_VENDOR42 = 0x7b
95 AF_VENDOR43 = 0x7d
96 AF_VENDOR44 = 0x7f
97 AF_VENDOR45 = 0x81
98 AF_VENDOR46 = 0x83
99 AF_VENDOR47 = 0x85
100 ALTWERASE = 0x200
101 B0 = 0x0
102 B110 = 0x6e
103 B115200 = 0x1c200
104 B1200 = 0x4b0
105 B134 = 0x86
106 B14400 = 0x3840
107 B150 = 0x96
108 B1800 = 0x708
109 B19200 = 0x4b00
110 B200 = 0xc8
111 B230400 = 0x38400
112 B2400 = 0x960
113 B28800 = 0x7080
114 B300 = 0x12c
115 B38400 = 0x9600
116 B460800 = 0x70800
117 B4800 = 0x12c0
118 B50 = 0x32
119 B57600 = 0xe100
120 B600 = 0x258
121 B7200 = 0x1c20
122 B75 = 0x4b
123 B76800 = 0x12c00
124 B921600 = 0xe1000
125 B9600 = 0x2580
126 BIOCFEEDBACK = 0x8004427c
127 BIOCFLUSH = 0x20004268
128 BIOCGBLEN = 0x40044266
129 BIOCGDIRECTION = 0x40044276
130 BIOCGDLT = 0x4004426a
131 BIOCGDLTLIST = 0xc0104279
132 BIOCGETBUFMODE = 0x4004427d
133 BIOCGETIF = 0x4020426b
134 BIOCGETZMAX = 0x4008427f
135 BIOCGHDRCMPLT = 0x40044274
136 BIOCGRSIG = 0x40044272
137 BIOCGRTIMEOUT = 0x4010426e
138 BIOCGSEESENT = 0x40044276
139 BIOCGSTATS = 0x4008426f
140 BIOCGTSTAMP = 0x40044283
141 BIOCIMMEDIATE = 0x80044270
142 BIOCLOCK = 0x2000427a
143 BIOCPROMISC = 0x20004269
144 BIOCROTZBUF = 0x40184280
145 BIOCSBLEN = 0xc0044266
146 BIOCSDIRECTION = 0x80044277
147 BIOCSDLT = 0x80044278
148 BIOCSETBUFMODE = 0x8004427e
149 BIOCSETF = 0x80104267
150 BIOCSETFNR = 0x80104282
151 BIOCSETIF = 0x8020426c
152 BIOCSETWF = 0x8010427b
153 BIOCSETZBUF = 0x80184281
154 BIOCSHDRCMPLT = 0x80044275
155 BIOCSRSIG = 0x80044273
156 BIOCSRTIMEOUT = 0x8010426d
157 BIOCSSEESENT = 0x80044277
158 BIOCSTSTAMP = 0x80044284
159 BIOCVERSION = 0x40044271
160 BPF_A = 0x10
161 BPF_ABS = 0x20
162 BPF_ADD = 0x0
163 BPF_ALIGNMENT = 0x8
164 BPF_ALU = 0x4
165 BPF_AND = 0x50
166 BPF_B = 0x10
167 BPF_BUFMODE_BUFFER = 0x1
168 BPF_BUFMODE_ZBUF = 0x2
169 BPF_DIV = 0x30
170 BPF_H = 0x8
171 BPF_IMM = 0x0
172 BPF_IND = 0x40
173 BPF_JA = 0x0
174 BPF_JEQ = 0x10
175 BPF_JGE = 0x30
176 BPF_JGT = 0x20
177 BPF_JMP = 0x5
178 BPF_JSET = 0x40
179 BPF_K = 0x0
180 BPF_LD = 0x0
181 BPF_LDX = 0x1
182 BPF_LEN = 0x80
183 BPF_LSH = 0x60
184 BPF_MAJOR_VERSION = 0x1
185 BPF_MAXBUFSIZE = 0x80000
186 BPF_MAXINSNS = 0x200
187 BPF_MEM = 0x60
188 BPF_MEMWORDS = 0x10
189 BPF_MINBUFSIZE = 0x20
190 BPF_MINOR_VERSION = 0x1
191 BPF_MISC = 0x7
192 BPF_MOD = 0x90
193 BPF_MSH = 0xa0
194 BPF_MUL = 0x20
195 BPF_NEG = 0x80
196 BPF_OR = 0x40
197 BPF_RELEASE = 0x30bb6
198 BPF_RET = 0x6
199 BPF_RSH = 0x70
200 BPF_ST = 0x2
201 BPF_STX = 0x3
202 BPF_SUB = 0x10
203 BPF_TAX = 0x0
204 BPF_TXA = 0x80
205 BPF_T_BINTIME = 0x2
206 BPF_T_BINTIME_FAST = 0x102
207 BPF_T_BINTIME_MONOTONIC = 0x202
208 BPF_T_BINTIME_MONOTONIC_FAST = 0x302
209 BPF_T_FAST = 0x100
210 BPF_T_FLAG_MASK = 0x300
211 BPF_T_FORMAT_MASK = 0x3
212 BPF_T_MICROTIME = 0x0
213 BPF_T_MICROTIME_FAST = 0x100
214 BPF_T_MICROTIME_MONOTONIC = 0x200
215 BPF_T_MICROTIME_MONOTONIC_FAST = 0x300
216 BPF_T_MONOTONIC = 0x200
217 BPF_T_MONOTONIC_FAST = 0x300
218 BPF_T_NANOTIME = 0x1
219 BPF_T_NANOTIME_FAST = 0x101
220 BPF_T_NANOTIME_MONOTONIC = 0x201
221 BPF_T_NANOTIME_MONOTONIC_FAST = 0x301
222 BPF_T_NONE = 0x3
223 BPF_T_NORMAL = 0x0
224 BPF_W = 0x0
225 BPF_X = 0x8
226 BPF_XOR = 0xa0
227 BRKINT = 0x2
228 CAP_ACCEPT = 0x200000020000000
229 CAP_ACL_CHECK = 0x400000000010000
230 CAP_ACL_DELETE = 0x400000000020000
231 CAP_ACL_GET = 0x400000000040000
232 CAP_ACL_SET = 0x400000000080000
233 CAP_ALL0 = 0x20007ffffffffff
234 CAP_ALL1 = 0x4000000001fffff
235 CAP_BIND = 0x200000040000000
236 CAP_BINDAT = 0x200008000000400
237 CAP_CHFLAGSAT = 0x200000000001400
238 CAP_CONNECT = 0x200000080000000
239 CAP_CONNECTAT = 0x200010000000400
240 CAP_CREATE = 0x200000000000040
241 CAP_EVENT = 0x400000000000020
242 CAP_EXTATTR_DELETE = 0x400000000001000
243 CAP_EXTATTR_GET = 0x400000000002000
244 CAP_EXTATTR_LIST = 0x400000000004000
245 CAP_EXTATTR_SET = 0x400000000008000
246 CAP_FCHDIR = 0x200000000000800
247 CAP_FCHFLAGS = 0x200000000001000
248 CAP_FCHMOD = 0x200000000002000
249 CAP_FCHMODAT = 0x200000000002400
250 CAP_FCHOWN = 0x200000000004000
251 CAP_FCHOWNAT = 0x200000000004400
252 CAP_FCNTL = 0x200000000008000
253 CAP_FCNTL_ALL = 0x78
254 CAP_FCNTL_GETFL = 0x8
255 CAP_FCNTL_GETOWN = 0x20
256 CAP_FCNTL_SETFL = 0x10
257 CAP_FCNTL_SETOWN = 0x40
258 CAP_FEXECVE = 0x200000000000080
259 CAP_FLOCK = 0x200000000010000
260 CAP_FPATHCONF = 0x200000000020000
261 CAP_FSCK = 0x200000000040000
262 CAP_FSTAT = 0x200000000080000
263 CAP_FSTATAT = 0x200000000080400
264 CAP_FSTATFS = 0x200000000100000
265 CAP_FSYNC = 0x200000000000100
266 CAP_FTRUNCATE = 0x200000000000200
267 CAP_FUTIMES = 0x200000000200000
268 CAP_FUTIMESAT = 0x200000000200400
269 CAP_GETPEERNAME = 0x200000100000000
270 CAP_GETSOCKNAME = 0x200000200000000
271 CAP_GETSOCKOPT = 0x200000400000000
272 CAP_IOCTL = 0x400000000000080
273 CAP_IOCTLS_ALL = 0x7fffffffffffffff
274 CAP_KQUEUE = 0x400000000100040
275 CAP_KQUEUE_CHANGE = 0x400000000100000
276 CAP_KQUEUE_EVENT = 0x400000000000040
277 CAP_LINKAT_SOURCE = 0x200020000000400
278 CAP_LINKAT_TARGET = 0x200000000400400
279 CAP_LISTEN = 0x200000800000000
280 CAP_LOOKUP = 0x200000000000400
281 CAP_MAC_GET = 0x400000000000001
282 CAP_MAC_SET = 0x400000000000002
283 CAP_MKDIRAT = 0x200000000800400
284 CAP_MKFIFOAT = 0x200000001000400
285 CAP_MKNODAT = 0x200000002000400
286 CAP_MMAP = 0x200000000000010
287 CAP_MMAP_R = 0x20000000000001d
288 CAP_MMAP_RW = 0x20000000000001f
289 CAP_MMAP_RWX = 0x20000000000003f
290 CAP_MMAP_RX = 0x20000000000003d
291 CAP_MMAP_W = 0x20000000000001e
292 CAP_MMAP_WX = 0x20000000000003e
293 CAP_MMAP_X = 0x20000000000003c
294 CAP_PDGETPID = 0x400000000000200
295 CAP_PDKILL = 0x400000000000800
296 CAP_PDWAIT = 0x400000000000400
297 CAP_PEELOFF = 0x200001000000000
298 CAP_POLL_EVENT = 0x400000000000020
299 CAP_PREAD = 0x20000000000000d
300 CAP_PWRITE = 0x20000000000000e
301 CAP_READ = 0x200000000000001
302 CAP_RECV = 0x200000000000001
303 CAP_RENAMEAT_SOURCE = 0x200000004000400
304 CAP_RENAMEAT_TARGET = 0x200040000000400
305 CAP_RIGHTS_VERSION = 0x0
306 CAP_RIGHTS_VERSION_00 = 0x0
307 CAP_SEEK = 0x20000000000000c
308 CAP_SEEK_TELL = 0x200000000000004
309 CAP_SEM_GETVALUE = 0x400000000000004
310 CAP_SEM_POST = 0x400000000000008
311 CAP_SEM_WAIT = 0x400000000000010
312 CAP_SEND = 0x200000000000002
313 CAP_SETSOCKOPT = 0x200002000000000
314 CAP_SHUTDOWN = 0x200004000000000
315 CAP_SOCK_CLIENT = 0x200007780000003
316 CAP_SOCK_SERVER = 0x200007f60000003
317 CAP_SYMLINKAT = 0x200000008000400
318 CAP_TTYHOOK = 0x400000000000100
319 CAP_UNLINKAT = 0x200000010000400
320 CAP_UNUSED0_44 = 0x200080000000000
321 CAP_UNUSED0_57 = 0x300000000000000
322 CAP_UNUSED1_22 = 0x400000000200000
323 CAP_UNUSED1_57 = 0x500000000000000
324 CAP_WRITE = 0x200000000000002
325 CFLUSH = 0xf
326 CLOCAL = 0x8000
327 CLOCK_MONOTONIC = 0x4
328 CLOCK_MONOTONIC_FAST = 0xc
329 CLOCK_MONOTONIC_PRECISE = 0xb
330 CLOCK_PROCESS_CPUTIME_ID = 0xf
331 CLOCK_PROF = 0x2
332 CLOCK_REALTIME = 0x0
333 CLOCK_REALTIME_FAST = 0xa
334 CLOCK_REALTIME_PRECISE = 0x9
335 CLOCK_SECOND = 0xd
336 CLOCK_THREAD_CPUTIME_ID = 0xe
337 CLOCK_UPTIME = 0x5
338 CLOCK_UPTIME_FAST = 0x8
339 CLOCK_UPTIME_PRECISE = 0x7
340 CLOCK_VIRTUAL = 0x1
341 CREAD = 0x800
342 CRTSCTS = 0x30000
343 CS5 = 0x0
344 CS6 = 0x100
345 CS7 = 0x200
346 CS8 = 0x300
347 CSIZE = 0x300
348 CSTART = 0x11
349 CSTATUS = 0x14
350 CSTOP = 0x13
351 CSTOPB = 0x400
352 CSUSP = 0x1a
353 CTL_HW = 0x6
354 CTL_KERN = 0x1
355 CTL_MAXNAME = 0x18
356 CTL_NET = 0x4
357 DLT_A429 = 0xb8
358 DLT_A653_ICM = 0xb9
359 DLT_AIRONET_HEADER = 0x78
360 DLT_AOS = 0xde
361 DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
362 DLT_ARCNET = 0x7
363 DLT_ARCNET_LINUX = 0x81
364 DLT_ATM_CLIP = 0x13
365 DLT_ATM_RFC1483 = 0xb
366 DLT_AURORA = 0x7e
367 DLT_AX25 = 0x3
368 DLT_AX25_KISS = 0xca
369 DLT_BACNET_MS_TP = 0xa5
370 DLT_BLUETOOTH_BREDR_BB = 0xff
371 DLT_BLUETOOTH_HCI_H4 = 0xbb
372 DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
373 DLT_BLUETOOTH_LE_LL = 0xfb
374 DLT_BLUETOOTH_LE_LL_WITH_PHDR = 0x100
375 DLT_BLUETOOTH_LINUX_MONITOR = 0xfe
376 DLT_CAN20B = 0xbe
377 DLT_CAN_SOCKETCAN = 0xe3
378 DLT_CHAOS = 0x5
379 DLT_CHDLC = 0x68
380 DLT_CISCO_IOS = 0x76
381 DLT_C_HDLC = 0x68
382 DLT_C_HDLC_WITH_DIR = 0xcd
383 DLT_DBUS = 0xe7
384 DLT_DECT = 0xdd
385 DLT_DOCSIS = 0x8f
386 DLT_DVB_CI = 0xeb
387 DLT_ECONET = 0x73
388 DLT_EN10MB = 0x1
389 DLT_EN3MB = 0x2
390 DLT_ENC = 0x6d
391 DLT_EPON = 0x103
392 DLT_ERF = 0xc5
393 DLT_ERF_ETH = 0xaf
394 DLT_ERF_POS = 0xb0
395 DLT_FC_2 = 0xe0
396 DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
397 DLT_FDDI = 0xa
398 DLT_FLEXRAY = 0xd2
399 DLT_FRELAY = 0x6b
400 DLT_FRELAY_WITH_DIR = 0xce
401 DLT_GCOM_SERIAL = 0xad
402 DLT_GCOM_T1E1 = 0xac
403 DLT_GPF_F = 0xab
404 DLT_GPF_T = 0xaa
405 DLT_GPRS_LLC = 0xa9
406 DLT_GSMTAP_ABIS = 0xda
407 DLT_GSMTAP_UM = 0xd9
408 DLT_HHDLC = 0x79
409 DLT_IBM_SN = 0x92
410 DLT_IBM_SP = 0x91
411 DLT_IEEE802 = 0x6
412 DLT_IEEE802_11 = 0x69
413 DLT_IEEE802_11_RADIO = 0x7f
414 DLT_IEEE802_11_RADIO_AVS = 0xa3
415 DLT_IEEE802_15_4 = 0xc3
416 DLT_IEEE802_15_4_LINUX = 0xbf
417 DLT_IEEE802_15_4_NOFCS = 0xe6
418 DLT_IEEE802_15_4_NONASK_PHY = 0xd7
419 DLT_IEEE802_16_MAC_CPS = 0xbc
420 DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
421 DLT_INFINIBAND = 0xf7
422 DLT_IPFILTER = 0x74
423 DLT_IPMB = 0xc7
424 DLT_IPMB_LINUX = 0xd1
425 DLT_IPMI_HPM_2 = 0x104
426 DLT_IPNET = 0xe2
427 DLT_IPOIB = 0xf2
428 DLT_IPV4 = 0xe4
429 DLT_IPV6 = 0xe5
430 DLT_IP_OVER_FC = 0x7a
431 DLT_JUNIPER_ATM1 = 0x89
432 DLT_JUNIPER_ATM2 = 0x87
433 DLT_JUNIPER_ATM_CEMIC = 0xee
434 DLT_JUNIPER_CHDLC = 0xb5
435 DLT_JUNIPER_ES = 0x84
436 DLT_JUNIPER_ETHER = 0xb2
437 DLT_JUNIPER_FIBRECHANNEL = 0xea
438 DLT_JUNIPER_FRELAY = 0xb4
439 DLT_JUNIPER_GGSN = 0x85
440 DLT_JUNIPER_ISM = 0xc2
441 DLT_JUNIPER_MFR = 0x86
442 DLT_JUNIPER_MLFR = 0x83
443 DLT_JUNIPER_MLPPP = 0x82
444 DLT_JUNIPER_MONITOR = 0xa4
445 DLT_JUNIPER_PIC_PEER = 0xae
446 DLT_JUNIPER_PPP = 0xb3
447 DLT_JUNIPER_PPPOE = 0xa7
448 DLT_JUNIPER_PPPOE_ATM = 0xa8
449 DLT_JUNIPER_SERVICES = 0x88
450 DLT_JUNIPER_SRX_E2E = 0xe9
451 DLT_JUNIPER_ST = 0xc8
452 DLT_JUNIPER_VP = 0xb7
453 DLT_JUNIPER_VS = 0xe8
454 DLT_LAPB_WITH_DIR = 0xcf
455 DLT_LAPD = 0xcb
456 DLT_LIN = 0xd4
457 DLT_LINUX_EVDEV = 0xd8
458 DLT_LINUX_IRDA = 0x90
459 DLT_LINUX_LAPD = 0xb1
460 DLT_LINUX_PPP_WITHDIRECTION = 0xa6
461 DLT_LINUX_SLL = 0x71
462 DLT_LOOP = 0x6c
463 DLT_LTALK = 0x72
464 DLT_MATCHING_MAX = 0x104
465 DLT_MATCHING_MIN = 0x68
466 DLT_MFR = 0xb6
467 DLT_MOST = 0xd3
468 DLT_MPEG_2_TS = 0xf3
469 DLT_MPLS = 0xdb
470 DLT_MTP2 = 0x8c
471 DLT_MTP2_WITH_PHDR = 0x8b
472 DLT_MTP3 = 0x8d
473 DLT_MUX27010 = 0xec
474 DLT_NETANALYZER = 0xf0
475 DLT_NETANALYZER_TRANSPARENT = 0xf1
476 DLT_NETLINK = 0xfd
477 DLT_NFC_LLCP = 0xf5
478 DLT_NFLOG = 0xef
479 DLT_NG40 = 0xf4
480 DLT_NULL = 0x0
481 DLT_PCI_EXP = 0x7d
482 DLT_PFLOG = 0x75
483 DLT_PFSYNC = 0x79
484 DLT_PKTAP = 0x102
485 DLT_PPI = 0xc0
486 DLT_PPP = 0x9
487 DLT_PPP_BSDOS = 0x10
488 DLT_PPP_ETHER = 0x33
489 DLT_PPP_PPPD = 0xa6
490 DLT_PPP_SERIAL = 0x32
491 DLT_PPP_WITH_DIR = 0xcc
492 DLT_PPP_WITH_DIRECTION = 0xa6
493 DLT_PRISM_HEADER = 0x77
494 DLT_PROFIBUS_DL = 0x101
495 DLT_PRONET = 0x4
496 DLT_RAIF1 = 0xc6
497 DLT_RAW = 0xc
498 DLT_RIO = 0x7c
499 DLT_RTAC_SERIAL = 0xfa
500 DLT_SCCP = 0x8e
501 DLT_SCTP = 0xf8
502 DLT_SITA = 0xc4
503 DLT_SLIP = 0x8
504 DLT_SLIP_BSDOS = 0xf
505 DLT_STANAG_5066_D_PDU = 0xed
506 DLT_SUNATM = 0x7b
507 DLT_SYMANTEC_FIREWALL = 0x63
508 DLT_TZSP = 0x80
509 DLT_USB = 0xba
510 DLT_USBPCAP = 0xf9
511 DLT_USB_LINUX = 0xbd
512 DLT_USB_LINUX_MMAPPED = 0xdc
513 DLT_USER0 = 0x93
514 DLT_USER1 = 0x94
515 DLT_USER10 = 0x9d
516 DLT_USER11 = 0x9e
517 DLT_USER12 = 0x9f
518 DLT_USER13 = 0xa0
519 DLT_USER14 = 0xa1
520 DLT_USER15 = 0xa2
521 DLT_USER2 = 0x95
522 DLT_USER3 = 0x96
523 DLT_USER4 = 0x97
524 DLT_USER5 = 0x98
525 DLT_USER6 = 0x99
526 DLT_USER7 = 0x9a
527 DLT_USER8 = 0x9b
528 DLT_USER9 = 0x9c
529 DLT_WIHART = 0xdf
530 DLT_WIRESHARK_UPPER_PDU = 0xfc
531 DLT_X2E_SERIAL = 0xd5
532 DLT_X2E_XORAYA = 0xd6
533 DT_BLK = 0x6
534 DT_CHR = 0x2
535 DT_DIR = 0x4
536 DT_FIFO = 0x1
537 DT_LNK = 0xa
538 DT_REG = 0x8
539 DT_SOCK = 0xc
540 DT_UNKNOWN = 0x0
541 DT_WHT = 0xe
542 ECHO = 0x8
543 ECHOCTL = 0x40
544 ECHOE = 0x2
545 ECHOK = 0x4
546 ECHOKE = 0x1
547 ECHONL = 0x10
548 ECHOPRT = 0x20
549 EVFILT_AIO = -0x3
550 EVFILT_FS = -0x9
551 EVFILT_LIO = -0xa
552 EVFILT_PROC = -0x5
553 EVFILT_PROCDESC = -0x8
554 EVFILT_READ = -0x1
555 EVFILT_SENDFILE = -0xc
556 EVFILT_SIGNAL = -0x6
557 EVFILT_SYSCOUNT = 0xc
558 EVFILT_TIMER = -0x7
559 EVFILT_USER = -0xb
560 EVFILT_VNODE = -0x4
561 EVFILT_WRITE = -0x2
562 EV_ADD = 0x1
563 EV_CLEAR = 0x20
564 EV_DELETE = 0x2
565 EV_DISABLE = 0x8
566 EV_DISPATCH = 0x80
567 EV_DROP = 0x1000
568 EV_ENABLE = 0x4
569 EV_EOF = 0x8000
570 EV_ERROR = 0x4000
571 EV_FLAG1 = 0x2000
572 EV_FLAG2 = 0x4000
573 EV_FORCEONESHOT = 0x100
574 EV_ONESHOT = 0x10
575 EV_RECEIPT = 0x40
576 EV_SYSFLAGS = 0xf000
577 EXTA = 0x4b00
578 EXTATTR_NAMESPACE_EMPTY = 0x0
579 EXTATTR_NAMESPACE_SYSTEM = 0x2
580 EXTATTR_NAMESPACE_USER = 0x1
581 EXTB = 0x9600
582 EXTPROC = 0x800
583 FD_CLOEXEC = 0x1
584 FD_SETSIZE = 0x400
585 FLUSHO = 0x800000
586 F_CANCEL = 0x5
587 F_DUP2FD = 0xa
588 F_DUP2FD_CLOEXEC = 0x12
589 F_DUPFD = 0x0
590 F_DUPFD_CLOEXEC = 0x11
591 F_GETFD = 0x1
592 F_GETFL = 0x3
593 F_GETLK = 0xb
594 F_GETOWN = 0x5
595 F_OGETLK = 0x7
596 F_OK = 0x0
597 F_OSETLK = 0x8
598 F_OSETLKW = 0x9
599 F_RDAHEAD = 0x10
600 F_RDLCK = 0x1
601 F_READAHEAD = 0xf
602 F_SETFD = 0x2
603 F_SETFL = 0x4
604 F_SETLK = 0xc
605 F_SETLKW = 0xd
606 F_SETLK_REMOTE = 0xe
607 F_SETOWN = 0x6
608 F_UNLCK = 0x2
609 F_UNLCKSYS = 0x4
610 F_WRLCK = 0x3
611 HUPCL = 0x4000
612 HW_MACHINE = 0x1
613 ICANON = 0x100
614 ICMP6_FILTER = 0x12
615 ICRNL = 0x100
616 IEXTEN = 0x400
617 IFAN_ARRIVAL = 0x0
618 IFAN_DEPARTURE = 0x1
619 IFF_ALLMULTI = 0x200
620 IFF_ALTPHYS = 0x4000
621 IFF_BROADCAST = 0x2
622 IFF_CANTCHANGE = 0x218f52
623 IFF_CANTCONFIG = 0x10000
624 IFF_DEBUG = 0x4
625 IFF_DRV_OACTIVE = 0x400
626 IFF_DRV_RUNNING = 0x40
627 IFF_DYING = 0x200000
628 IFF_LINK0 = 0x1000
629 IFF_LINK1 = 0x2000
630 IFF_LINK2 = 0x4000
631 IFF_LOOPBACK = 0x8
632 IFF_MONITOR = 0x40000
633 IFF_MULTICAST = 0x8000
634 IFF_NOARP = 0x80
635 IFF_OACTIVE = 0x400
636 IFF_POINTOPOINT = 0x10
637 IFF_PPROMISC = 0x20000
638 IFF_PROMISC = 0x100
639 IFF_RENAMING = 0x400000
640 IFF_RUNNING = 0x40
641 IFF_SIMPLEX = 0x800
642 IFF_STATICARP = 0x80000
643 IFF_UP = 0x1
644 IFNAMSIZ = 0x10
645 IFT_BRIDGE = 0xd1
646 IFT_CARP = 0xf8
647 IFT_IEEE1394 = 0x90
648 IFT_INFINIBAND = 0xc7
649 IFT_L2VLAN = 0x87
650 IFT_L3IPVLAN = 0x88
651 IFT_PPP = 0x17
652 IFT_PROPVIRTUAL = 0x35
653 IGNBRK = 0x1
654 IGNCR = 0x80
655 IGNPAR = 0x4
656 IMAXBEL = 0x2000
657 INLCR = 0x40
658 INPCK = 0x10
659 IN_CLASSA_HOST = 0xffffff
660 IN_CLASSA_MAX = 0x80
661 IN_CLASSA_NET = 0xff000000
662 IN_CLASSA_NSHIFT = 0x18
663 IN_CLASSB_HOST = 0xffff
664 IN_CLASSB_MAX = 0x10000
665 IN_CLASSB_NET = 0xffff0000
666 IN_CLASSB_NSHIFT = 0x10
667 IN_CLASSC_HOST = 0xff
668 IN_CLASSC_NET = 0xffffff00
669 IN_CLASSC_NSHIFT = 0x8
670 IN_CLASSD_HOST = 0xfffffff
671 IN_CLASSD_NET = 0xf0000000
672 IN_CLASSD_NSHIFT = 0x1c
673 IN_LOOPBACKNET = 0x7f
674 IN_RFC3021_MASK = 0xfffffffe
675 IPPROTO_3PC = 0x22
676 IPPROTO_ADFS = 0x44
677 IPPROTO_AH = 0x33
678 IPPROTO_AHIP = 0x3d
679 IPPROTO_APES = 0x63
680 IPPROTO_ARGUS = 0xd
681 IPPROTO_AX25 = 0x5d
682 IPPROTO_BHA = 0x31
683 IPPROTO_BLT = 0x1e
684 IPPROTO_BRSATMON = 0x4c
685 IPPROTO_CARP = 0x70
686 IPPROTO_CFTP = 0x3e
687 IPPROTO_CHAOS = 0x10
688 IPPROTO_CMTP = 0x26
689 IPPROTO_CPHB = 0x49
690 IPPROTO_CPNX = 0x48
691 IPPROTO_DDP = 0x25
692 IPPROTO_DGP = 0x56
693 IPPROTO_DIVERT = 0x102
694 IPPROTO_DONE = 0x101
695 IPPROTO_DSTOPTS = 0x3c
696 IPPROTO_EGP = 0x8
697 IPPROTO_EMCON = 0xe
698 IPPROTO_ENCAP = 0x62
699 IPPROTO_EON = 0x50
700 IPPROTO_ESP = 0x32
701 IPPROTO_ETHERIP = 0x61
702 IPPROTO_FRAGMENT = 0x2c
703 IPPROTO_GGP = 0x3
704 IPPROTO_GMTP = 0x64
705 IPPROTO_GRE = 0x2f
706 IPPROTO_HELLO = 0x3f
707 IPPROTO_HIP = 0x8b
708 IPPROTO_HMP = 0x14
709 IPPROTO_HOPOPTS = 0x0
710 IPPROTO_ICMP = 0x1
711 IPPROTO_ICMPV6 = 0x3a
712 IPPROTO_IDP = 0x16
713 IPPROTO_IDPR = 0x23
714 IPPROTO_IDRP = 0x2d
715 IPPROTO_IGMP = 0x2
716 IPPROTO_IGP = 0x55
717 IPPROTO_IGRP = 0x58
718 IPPROTO_IL = 0x28
719 IPPROTO_INLSP = 0x34
720 IPPROTO_INP = 0x20
721 IPPROTO_IP = 0x0
722 IPPROTO_IPCOMP = 0x6c
723 IPPROTO_IPCV = 0x47
724 IPPROTO_IPEIP = 0x5e
725 IPPROTO_IPIP = 0x4
726 IPPROTO_IPPC = 0x43
727 IPPROTO_IPV4 = 0x4
728 IPPROTO_IPV6 = 0x29
729 IPPROTO_IRTP = 0x1c
730 IPPROTO_KRYPTOLAN = 0x41
731 IPPROTO_LARP = 0x5b
732 IPPROTO_LEAF1 = 0x19
733 IPPROTO_LEAF2 = 0x1a
734 IPPROTO_MAX = 0x100
735 IPPROTO_MEAS = 0x13
736 IPPROTO_MH = 0x87
737 IPPROTO_MHRP = 0x30
738 IPPROTO_MICP = 0x5f
739 IPPROTO_MOBILE = 0x37
740 IPPROTO_MPLS = 0x89
741 IPPROTO_MTP = 0x5c
742 IPPROTO_MUX = 0x12
743 IPPROTO_ND = 0x4d
744 IPPROTO_NHRP = 0x36
745 IPPROTO_NONE = 0x3b
746 IPPROTO_NSP = 0x1f
747 IPPROTO_NVPII = 0xb
748 IPPROTO_OLD_DIVERT = 0xfe
749 IPPROTO_OSPFIGP = 0x59
750 IPPROTO_PFSYNC = 0xf0
751 IPPROTO_PGM = 0x71
752 IPPROTO_PIGP = 0x9
753 IPPROTO_PIM = 0x67
754 IPPROTO_PRM = 0x15
755 IPPROTO_PUP = 0xc
756 IPPROTO_PVP = 0x4b
757 IPPROTO_RAW = 0xff
758 IPPROTO_RCCMON = 0xa
759 IPPROTO_RDP = 0x1b
760 IPPROTO_RESERVED_253 = 0xfd
761 IPPROTO_RESERVED_254 = 0xfe
762 IPPROTO_ROUTING = 0x2b
763 IPPROTO_RSVP = 0x2e
764 IPPROTO_RVD = 0x42
765 IPPROTO_SATEXPAK = 0x40
766 IPPROTO_SATMON = 0x45
767 IPPROTO_SCCSP = 0x60
768 IPPROTO_SCTP = 0x84
769 IPPROTO_SDRP = 0x2a
770 IPPROTO_SEND = 0x103
771 IPPROTO_SEP = 0x21
772 IPPROTO_SHIM6 = 0x8c
773 IPPROTO_SKIP = 0x39
774 IPPROTO_SPACER = 0x7fff
775 IPPROTO_SRPC = 0x5a
776 IPPROTO_ST = 0x7
777 IPPROTO_SVMTP = 0x52
778 IPPROTO_SWIPE = 0x35
779 IPPROTO_TCF = 0x57
780 IPPROTO_TCP = 0x6
781 IPPROTO_TLSP = 0x38
782 IPPROTO_TP = 0x1d
783 IPPROTO_TPXX = 0x27
784 IPPROTO_TRUNK1 = 0x17
785 IPPROTO_TRUNK2 = 0x18
786 IPPROTO_TTP = 0x54
787 IPPROTO_UDP = 0x11
788 IPPROTO_UDPLITE = 0x88
789 IPPROTO_VINES = 0x53
790 IPPROTO_VISA = 0x46
791 IPPROTO_VMTP = 0x51
792 IPPROTO_WBEXPAK = 0x4f
793 IPPROTO_WBMON = 0x4e
794 IPPROTO_WSN = 0x4a
795 IPPROTO_XNET = 0xf
796 IPPROTO_XTP = 0x24
797 IPV6_AUTOFLOWLABEL = 0x3b
798 IPV6_BINDANY = 0x40
799 IPV6_BINDMULTI = 0x41
800 IPV6_BINDV6ONLY = 0x1b
801 IPV6_CHECKSUM = 0x1a
802 IPV6_DEFAULT_MULTICAST_HOPS = 0x1
803 IPV6_DEFAULT_MULTICAST_LOOP = 0x1
804 IPV6_DEFHLIM = 0x40
805 IPV6_DONTFRAG = 0x3e
806 IPV6_DSTOPTS = 0x32
807 IPV6_FLOWID = 0x43
808 IPV6_FLOWINFO_MASK = 0xffffff0f
809 IPV6_FLOWLABEL_MASK = 0xffff0f00
810 IPV6_FLOWTYPE = 0x44
811 IPV6_FRAGTTL = 0x78
812 IPV6_FW_ADD = 0x1e
813 IPV6_FW_DEL = 0x1f
814 IPV6_FW_FLUSH = 0x20
815 IPV6_FW_GET = 0x22
816 IPV6_FW_ZERO = 0x21
817 IPV6_HLIMDEC = 0x1
818 IPV6_HOPLIMIT = 0x2f
819 IPV6_HOPOPTS = 0x31
820 IPV6_IPSEC_POLICY = 0x1c
821 IPV6_JOIN_GROUP = 0xc
822 IPV6_LEAVE_GROUP = 0xd
823 IPV6_MAXHLIM = 0xff
824 IPV6_MAXOPTHDR = 0x800
825 IPV6_MAXPACKET = 0xffff
826 IPV6_MAX_GROUP_SRC_FILTER = 0x200
827 IPV6_MAX_MEMBERSHIPS = 0xfff
828 IPV6_MAX_SOCK_SRC_FILTER = 0x80
829 IPV6_MIN_MEMBERSHIPS = 0x1f
830 IPV6_MMTU = 0x500
831 IPV6_MSFILTER = 0x4a
832 IPV6_MULTICAST_HOPS = 0xa
833 IPV6_MULTICAST_IF = 0x9
834 IPV6_MULTICAST_LOOP = 0xb
835 IPV6_NEXTHOP = 0x30
836 IPV6_PATHMTU = 0x2c
837 IPV6_PKTINFO = 0x2e
838 IPV6_PORTRANGE = 0xe
839 IPV6_PORTRANGE_DEFAULT = 0x0
840 IPV6_PORTRANGE_HIGH = 0x1
841 IPV6_PORTRANGE_LOW = 0x2
842 IPV6_PREFER_TEMPADDR = 0x3f
843 IPV6_RECVDSTOPTS = 0x28
844 IPV6_RECVFLOWID = 0x46
845 IPV6_RECVHOPLIMIT = 0x25
846 IPV6_RECVHOPOPTS = 0x27
847 IPV6_RECVPATHMTU = 0x2b
848 IPV6_RECVPKTINFO = 0x24
849 IPV6_RECVRSSBUCKETID = 0x47
850 IPV6_RECVRTHDR = 0x26
851 IPV6_RECVTCLASS = 0x39
852 IPV6_RSSBUCKETID = 0x45
853 IPV6_RSS_LISTEN_BUCKET = 0x42
854 IPV6_RTHDR = 0x33
855 IPV6_RTHDRDSTOPTS = 0x23
856 IPV6_RTHDR_LOOSE = 0x0
857 IPV6_RTHDR_STRICT = 0x1
858 IPV6_RTHDR_TYPE_0 = 0x0
859 IPV6_SOCKOPT_RESERVED1 = 0x3
860 IPV6_TCLASS = 0x3d
861 IPV6_UNICAST_HOPS = 0x4
862 IPV6_USE_MIN_MTU = 0x2a
863 IPV6_V6ONLY = 0x1b
864 IPV6_VERSION = 0x60
865 IPV6_VERSION_MASK = 0xf0
866 IP_ADD_MEMBERSHIP = 0xc
867 IP_ADD_SOURCE_MEMBERSHIP = 0x46
868 IP_BINDANY = 0x18
869 IP_BINDMULTI = 0x19
870 IP_BLOCK_SOURCE = 0x48
871 IP_DEFAULT_MULTICAST_LOOP = 0x1
872 IP_DEFAULT_MULTICAST_TTL = 0x1
873 IP_DF = 0x4000
874 IP_DONTFRAG = 0x43
875 IP_DROP_MEMBERSHIP = 0xd
876 IP_DROP_SOURCE_MEMBERSHIP = 0x47
877 IP_DUMMYNET3 = 0x31
878 IP_DUMMYNET_CONFIGURE = 0x3c
879 IP_DUMMYNET_DEL = 0x3d
880 IP_DUMMYNET_FLUSH = 0x3e
881 IP_DUMMYNET_GET = 0x40
882 IP_FLOWID = 0x5a
883 IP_FLOWTYPE = 0x5b
884 IP_FW3 = 0x30
885 IP_FW_ADD = 0x32
886 IP_FW_DEL = 0x33
887 IP_FW_FLUSH = 0x34
888 IP_FW_GET = 0x36
889 IP_FW_NAT_CFG = 0x38
890 IP_FW_NAT_DEL = 0x39
891 IP_FW_NAT_GET_CONFIG = 0x3a
892 IP_FW_NAT_GET_LOG = 0x3b
893 IP_FW_RESETLOG = 0x37
894 IP_FW_TABLE_ADD = 0x28
895 IP_FW_TABLE_DEL = 0x29
896 IP_FW_TABLE_FLUSH = 0x2a
897 IP_FW_TABLE_GETSIZE = 0x2b
898 IP_FW_TABLE_LIST = 0x2c
899 IP_FW_ZERO = 0x35
900 IP_HDRINCL = 0x2
901 IP_IPSEC_POLICY = 0x15
902 IP_MAXPACKET = 0xffff
903 IP_MAX_GROUP_SRC_FILTER = 0x200
904 IP_MAX_MEMBERSHIPS = 0xfff
905 IP_MAX_SOCK_MUTE_FILTER = 0x80
906 IP_MAX_SOCK_SRC_FILTER = 0x80
907 IP_MAX_SOURCE_FILTER = 0x400
908 IP_MF = 0x2000
909 IP_MINTTL = 0x42
910 IP_MIN_MEMBERSHIPS = 0x1f
911 IP_MSFILTER = 0x4a
912 IP_MSS = 0x240
913 IP_MULTICAST_IF = 0x9
914 IP_MULTICAST_LOOP = 0xb
915 IP_MULTICAST_TTL = 0xa
916 IP_MULTICAST_VIF = 0xe
917 IP_OFFMASK = 0x1fff
918 IP_ONESBCAST = 0x17
919 IP_OPTIONS = 0x1
920 IP_PORTRANGE = 0x13
921 IP_PORTRANGE_DEFAULT = 0x0
922 IP_PORTRANGE_HIGH = 0x1
923 IP_PORTRANGE_LOW = 0x2
924 IP_RECVDSTADDR = 0x7
925 IP_RECVFLOWID = 0x5d
926 IP_RECVIF = 0x14
927 IP_RECVOPTS = 0x5
928 IP_RECVRETOPTS = 0x6
929 IP_RECVRSSBUCKETID = 0x5e
930 IP_RECVTOS = 0x44
931 IP_RECVTTL = 0x41
932 IP_RETOPTS = 0x8
933 IP_RF = 0x8000
934 IP_RSSBUCKETID = 0x5c
935 IP_RSS_LISTEN_BUCKET = 0x1a
936 IP_RSVP_OFF = 0x10
937 IP_RSVP_ON = 0xf
938 IP_RSVP_VIF_OFF = 0x12
939 IP_RSVP_VIF_ON = 0x11
940 IP_SENDSRCADDR = 0x7
941 IP_TOS = 0x3
942 IP_TTL = 0x4
943 IP_UNBLOCK_SOURCE = 0x49
944 ISIG = 0x80
945 ISTRIP = 0x20
946 IXANY = 0x800
947 IXOFF = 0x400
948 IXON = 0x200
949 KERN_HOSTNAME = 0xa
950 KERN_OSRELEASE = 0x2
951 KERN_OSTYPE = 0x1
952 KERN_VERSION = 0x4
953 LOCK_EX = 0x2
954 LOCK_NB = 0x4
955 LOCK_SH = 0x1
956 LOCK_UN = 0x8
957 MADV_AUTOSYNC = 0x7
958 MADV_CORE = 0x9
959 MADV_DONTNEED = 0x4
960 MADV_FREE = 0x5
961 MADV_NOCORE = 0x8
962 MADV_NORMAL = 0x0
963 MADV_NOSYNC = 0x6
964 MADV_PROTECT = 0xa
965 MADV_RANDOM = 0x1
966 MADV_SEQUENTIAL = 0x2
967 MADV_WILLNEED = 0x3
968 MAP_32BIT = 0x80000
969 MAP_ALIGNED_SUPER = 0x1000000
970 MAP_ALIGNMENT_MASK = -0x1000000
971 MAP_ALIGNMENT_SHIFT = 0x18
972 MAP_ANON = 0x1000
973 MAP_ANONYMOUS = 0x1000
974 MAP_COPY = 0x2
975 MAP_EXCL = 0x4000
976 MAP_FILE = 0x0
977 MAP_FIXED = 0x10
978 MAP_HASSEMAPHORE = 0x200
979 MAP_NOCORE = 0x20000
980 MAP_NOSYNC = 0x800
981 MAP_PREFAULT_READ = 0x40000
982 MAP_PRIVATE = 0x2
983 MAP_RESERVED0020 = 0x20
984 MAP_RESERVED0040 = 0x40
985 MAP_RESERVED0080 = 0x80
986 MAP_RESERVED0100 = 0x100
987 MAP_SHARED = 0x1
988 MAP_STACK = 0x400
989 MCL_CURRENT = 0x1
990 MCL_FUTURE = 0x2
991 MNT_ACLS = 0x8000000
992 MNT_ASYNC = 0x40
993 MNT_AUTOMOUNTED = 0x200000000
994 MNT_BYFSID = 0x8000000
995 MNT_CMDFLAGS = 0xd0f0000
996 MNT_DEFEXPORTED = 0x200
997 MNT_DELEXPORT = 0x20000
998 MNT_EXKERB = 0x800
999 MNT_EXPORTANON = 0x400
1000 MNT_EXPORTED = 0x100
1001 MNT_EXPUBLIC = 0x20000000
1002 MNT_EXRDONLY = 0x80
1003 MNT_FORCE = 0x80000
1004 MNT_GJOURNAL = 0x2000000
1005 MNT_IGNORE = 0x800000
1006 MNT_LAZY = 0x3
1007 MNT_LOCAL = 0x1000
1008 MNT_MULTILABEL = 0x4000000
1009 MNT_NFS4ACLS = 0x10
1010 MNT_NOATIME = 0x10000000
1011 MNT_NOCLUSTERR = 0x40000000
1012 MNT_NOCLUSTERW = 0x80000000
1013 MNT_NOEXEC = 0x4
1014 MNT_NONBUSY = 0x4000000
1015 MNT_NOSUID = 0x8
1016 MNT_NOSYMFOLLOW = 0x400000
1017 MNT_NOWAIT = 0x2
1018 MNT_QUOTA = 0x2000
1019 MNT_RDONLY = 0x1
1020 MNT_RELOAD = 0x40000
1021 MNT_ROOTFS = 0x4000
1022 MNT_SNAPSHOT = 0x1000000
1023 MNT_SOFTDEP = 0x200000
1024 MNT_SUIDDIR = 0x100000
1025 MNT_SUJ = 0x100000000
1026 MNT_SUSPEND = 0x4
1027 MNT_SYNCHRONOUS = 0x2
1028 MNT_UNION = 0x20
1029 MNT_UPDATE = 0x10000
1030 MNT_UPDATEMASK = 0x2d8d0807e
1031 MNT_USER = 0x8000
1032 MNT_VISFLAGMASK = 0x3fef0ffff
1033 MNT_WAIT = 0x1
1034 MSG_CMSG_CLOEXEC = 0x40000
1035 MSG_COMPAT = 0x8000
1036 MSG_CTRUNC = 0x20
1037 MSG_DONTROUTE = 0x4
1038 MSG_DONTWAIT = 0x80
1039 MSG_EOF = 0x100
1040 MSG_EOR = 0x8
1041 MSG_NBIO = 0x4000
1042 MSG_NOSIGNAL = 0x20000
1043 MSG_NOTIFICATION = 0x2000
1044 MSG_OOB = 0x1
1045 MSG_PEEK = 0x2
1046 MSG_TRUNC = 0x10
1047 MSG_WAITALL = 0x40
1048 MSG_WAITFORONE = 0x80000
1049 MS_ASYNC = 0x1
1050 MS_INVALIDATE = 0x2
1051 MS_SYNC = 0x0
1052 NAME_MAX = 0xff
1053 NET_RT_DUMP = 0x1
1054 NET_RT_FLAGS = 0x2
1055 NET_RT_IFLIST = 0x3
1056 NET_RT_IFLISTL = 0x5
1057 NET_RT_IFMALIST = 0x4
1058 NOFLSH = 0x80000000
1059 NOKERNINFO = 0x2000000
1060 NOTE_ATTRIB = 0x8
1061 NOTE_CHILD = 0x4
1062 NOTE_CLOSE = 0x100
1063 NOTE_CLOSE_WRITE = 0x200
1064 NOTE_DELETE = 0x1
1065 NOTE_EXEC = 0x20000000
1066 NOTE_EXIT = 0x80000000
1067 NOTE_EXTEND = 0x4
1068 NOTE_FFAND = 0x40000000
1069 NOTE_FFCOPY = 0xc0000000
1070 NOTE_FFCTRLMASK = 0xc0000000
1071 NOTE_FFLAGSMASK = 0xffffff
1072 NOTE_FFNOP = 0x0
1073 NOTE_FFOR = 0x80000000
1074 NOTE_FILE_POLL = 0x2
1075 NOTE_FORK = 0x40000000
1076 NOTE_LINK = 0x10
1077 NOTE_LOWAT = 0x1
1078 NOTE_MSECONDS = 0x2
1079 NOTE_NSECONDS = 0x8
1080 NOTE_OPEN = 0x80
1081 NOTE_PCTRLMASK = 0xf0000000
1082 NOTE_PDATAMASK = 0xfffff
1083 NOTE_READ = 0x400
1084 NOTE_RENAME = 0x20
1085 NOTE_REVOKE = 0x40
1086 NOTE_SECONDS = 0x1
1087 NOTE_TRACK = 0x1
1088 NOTE_TRACKERR = 0x2
1089 NOTE_TRIGGER = 0x1000000
1090 NOTE_USECONDS = 0x4
1091 NOTE_WRITE = 0x2
1092 OCRNL = 0x10
1093 ONLCR = 0x2
1094 ONLRET = 0x40
1095 ONOCR = 0x20
1096 ONOEOT = 0x8
1097 OPOST = 0x1
1098 OXTABS = 0x4
1099 O_ACCMODE = 0x3
1100 O_APPEND = 0x8
1101 O_ASYNC = 0x40
1102 O_CLOEXEC = 0x100000
1103 O_CREAT = 0x200
1104 O_DIRECT = 0x10000
1105 O_DIRECTORY = 0x20000
1106 O_EXCL = 0x800
1107 O_EXEC = 0x40000
1108 O_EXLOCK = 0x20
1109 O_FSYNC = 0x80
1110 O_NDELAY = 0x4
1111 O_NOCTTY = 0x8000
1112 O_NOFOLLOW = 0x100
1113 O_NONBLOCK = 0x4
1114 O_RDONLY = 0x0
1115 O_RDWR = 0x2
1116 O_SHLOCK = 0x10
1117 O_SYNC = 0x80
1118 O_TRUNC = 0x400
1119 O_TTY_INIT = 0x80000
1120 O_VERIFY = 0x200000
1121 O_WRONLY = 0x1
1122 PARENB = 0x1000
1123 PARMRK = 0x8
1124 PARODD = 0x2000
1125 PENDIN = 0x20000000
1126 PRIO_PGRP = 0x1
1127 PRIO_PROCESS = 0x0
1128 PRIO_USER = 0x2
1129 PROT_EXEC = 0x4
1130 PROT_NONE = 0x0
1131 PROT_READ = 0x1
1132 PROT_WRITE = 0x2
1133 RLIMIT_AS = 0xa
1134 RLIMIT_CORE = 0x4
1135 RLIMIT_CPU = 0x0
1136 RLIMIT_DATA = 0x2
1137 RLIMIT_FSIZE = 0x1
1138 RLIMIT_MEMLOCK = 0x6
1139 RLIMIT_NOFILE = 0x8
1140 RLIMIT_NPROC = 0x7
1141 RLIMIT_RSS = 0x5
1142 RLIMIT_STACK = 0x3
1143 RLIM_INFINITY = 0x7fffffffffffffff
1144 RTAX_AUTHOR = 0x6
1145 RTAX_BRD = 0x7
1146 RTAX_DST = 0x0
1147 RTAX_GATEWAY = 0x1
1148 RTAX_GENMASK = 0x3
1149 RTAX_IFA = 0x5
1150 RTAX_IFP = 0x4
1151 RTAX_MAX = 0x8
1152 RTAX_NETMASK = 0x2
1153 RTA_AUTHOR = 0x40
1154 RTA_BRD = 0x80
1155 RTA_DST = 0x1
1156 RTA_GATEWAY = 0x2
1157 RTA_GENMASK = 0x8
1158 RTA_IFA = 0x20
1159 RTA_IFP = 0x10
1160 RTA_NETMASK = 0x4
1161 RTF_BLACKHOLE = 0x1000
1162 RTF_BROADCAST = 0x400000
1163 RTF_DONE = 0x40
1164 RTF_DYNAMIC = 0x10
1165 RTF_FIXEDMTU = 0x80000
1166 RTF_FMASK = 0x1004d808
1167 RTF_GATEWAY = 0x2
1168 RTF_GWFLAG_COMPAT = 0x80000000
1169 RTF_HOST = 0x4
1170 RTF_LLDATA = 0x400
1171 RTF_LLINFO = 0x400
1172 RTF_LOCAL = 0x200000
1173 RTF_MODIFIED = 0x20
1174 RTF_MULTICAST = 0x800000
1175 RTF_PINNED = 0x100000
1176 RTF_PROTO1 = 0x8000
1177 RTF_PROTO2 = 0x4000
1178 RTF_PROTO3 = 0x40000
1179 RTF_REJECT = 0x8
1180 RTF_RNH_LOCKED = 0x40000000
1181 RTF_STATIC = 0x800
1182 RTF_STICKY = 0x10000000
1183 RTF_UP = 0x1
1184 RTF_XRESOLVE = 0x200
1185 RTM_ADD = 0x1
1186 RTM_CHANGE = 0x3
1187 RTM_DELADDR = 0xd
1188 RTM_DELETE = 0x2
1189 RTM_DELMADDR = 0x10
1190 RTM_GET = 0x4
1191 RTM_IEEE80211 = 0x12
1192 RTM_IFANNOUNCE = 0x11
1193 RTM_IFINFO = 0xe
1194 RTM_LOCK = 0x8
1195 RTM_LOSING = 0x5
1196 RTM_MISS = 0x7
1197 RTM_NEWADDR = 0xc
1198 RTM_NEWMADDR = 0xf
1199 RTM_REDIRECT = 0x6
1200 RTM_RESOLVE = 0xb
1201 RTM_RTTUNIT = 0xf4240
1202 RTM_VERSION = 0x5
1203 RTV_EXPIRE = 0x4
1204 RTV_HOPCOUNT = 0x2
1205 RTV_MTU = 0x1
1206 RTV_RPIPE = 0x8
1207 RTV_RTT = 0x40
1208 RTV_RTTVAR = 0x80
1209 RTV_SPIPE = 0x10
1210 RTV_SSTHRESH = 0x20
1211 RTV_WEIGHT = 0x100
1212 RT_ALL_FIBS = -0x1
1213 RT_BLACKHOLE = 0x40
1214 RT_CACHING_CONTEXT = 0x1
1215 RT_DEFAULT_FIB = 0x0
1216 RT_HAS_GW = 0x80
1217 RT_HAS_HEADER = 0x10
1218 RT_HAS_HEADER_BIT = 0x4
1219 RT_L2_ME = 0x4
1220 RT_L2_ME_BIT = 0x2
1221 RT_LLE_CACHE = 0x100
1222 RT_MAY_LOOP = 0x8
1223 RT_MAY_LOOP_BIT = 0x3
1224 RT_NORTREF = 0x2
1225 RT_REJECT = 0x20
1226 RUSAGE_CHILDREN = -0x1
1227 RUSAGE_SELF = 0x0
1228 RUSAGE_THREAD = 0x1
1229 SCM_BINTIME = 0x4
1230 SCM_CREDS = 0x3
1231 SCM_RIGHTS = 0x1
1232 SCM_TIMESTAMP = 0x2
1233 SHUT_RD = 0x0
1234 SHUT_RDWR = 0x2
1235 SHUT_WR = 0x1
1236 SIOCADDMULTI = 0x80206931
1237 SIOCAIFADDR = 0x8040691a
1238 SIOCAIFGROUP = 0x80286987
1239 SIOCATMARK = 0x40047307
1240 SIOCDELMULTI = 0x80206932
1241 SIOCDIFADDR = 0x80206919
1242 SIOCDIFGROUP = 0x80286989
1243 SIOCDIFPHYADDR = 0x80206949
1244 SIOCGDRVSPEC = 0xc028697b
1245 SIOCGETSGCNT = 0xc0207210
1246 SIOCGETVIFCNT = 0xc028720f
1247 SIOCGHIWAT = 0x40047301
1248 SIOCGI2C = 0xc020693d
1249 SIOCGIFADDR = 0xc0206921
1250 SIOCGIFBRDADDR = 0xc0206923
1251 SIOCGIFCAP = 0xc020691f
1252 SIOCGIFCONF = 0xc0106924
1253 SIOCGIFDESCR = 0xc020692a
1254 SIOCGIFDSTADDR = 0xc0206922
1255 SIOCGIFFIB = 0xc020695c
1256 SIOCGIFFLAGS = 0xc0206911
1257 SIOCGIFGENERIC = 0xc020693a
1258 SIOCGIFGMEMB = 0xc028698a
1259 SIOCGIFGROUP = 0xc0286988
1260 SIOCGIFINDEX = 0xc0206920
1261 SIOCGIFMAC = 0xc0206926
1262 SIOCGIFMEDIA = 0xc0306938
1263 SIOCGIFMETRIC = 0xc0206917
1264 SIOCGIFMTU = 0xc0206933
1265 SIOCGIFNETMASK = 0xc0206925
1266 SIOCGIFPDSTADDR = 0xc0206948
1267 SIOCGIFPHYS = 0xc0206935
1268 SIOCGIFPSRCADDR = 0xc0206947
1269 SIOCGIFSTATUS = 0xc331693b
1270 SIOCGIFXMEDIA = 0xc030698b
1271 SIOCGLOWAT = 0x40047303
1272 SIOCGPGRP = 0x40047309
1273 SIOCGPRIVATE_0 = 0xc0206950
1274 SIOCGPRIVATE_1 = 0xc0206951
1275 SIOCGTUNFIB = 0xc020695e
1276 SIOCIFCREATE = 0xc020697a
1277 SIOCIFCREATE2 = 0xc020697c
1278 SIOCIFDESTROY = 0x80206979
1279 SIOCIFGCLONERS = 0xc0106978
1280 SIOCSDRVSPEC = 0x8028697b
1281 SIOCSHIWAT = 0x80047300
1282 SIOCSIFADDR = 0x8020690c
1283 SIOCSIFBRDADDR = 0x80206913
1284 SIOCSIFCAP = 0x8020691e
1285 SIOCSIFDESCR = 0x80206929
1286 SIOCSIFDSTADDR = 0x8020690e
1287 SIOCSIFFIB = 0x8020695d
1288 SIOCSIFFLAGS = 0x80206910
1289 SIOCSIFGENERIC = 0x80206939
1290 SIOCSIFLLADDR = 0x8020693c
1291 SIOCSIFMAC = 0x80206927
1292 SIOCSIFMEDIA = 0xc0206937
1293 SIOCSIFMETRIC = 0x80206918
1294 SIOCSIFMTU = 0x80206934
1295 SIOCSIFNAME = 0x80206928
1296 SIOCSIFNETMASK = 0x80206916
1297 SIOCSIFPHYADDR = 0x80406946
1298 SIOCSIFPHYS = 0x80206936
1299 SIOCSIFRVNET = 0xc020695b
1300 SIOCSIFVNET = 0xc020695a
1301 SIOCSLOWAT = 0x80047302
1302 SIOCSPGRP = 0x80047308
1303 SIOCSTUNFIB = 0x8020695f
1304 SOCK_CLOEXEC = 0x10000000
1305 SOCK_DGRAM = 0x2
1306 SOCK_MAXADDRLEN = 0xff
1307 SOCK_NONBLOCK = 0x20000000
1308 SOCK_RAW = 0x3
1309 SOCK_RDM = 0x4
1310 SOCK_SEQPACKET = 0x5
1311 SOCK_STREAM = 0x1
1312 SOL_SOCKET = 0xffff
1313 SOMAXCONN = 0x80
1314 SO_ACCEPTCONN = 0x2
1315 SO_ACCEPTFILTER = 0x1000
1316 SO_BINTIME = 0x2000
1317 SO_BROADCAST = 0x20
1318 SO_DEBUG = 0x1
1319 SO_DONTROUTE = 0x10
1320 SO_ERROR = 0x1007
1321 SO_KEEPALIVE = 0x8
1322 SO_LABEL = 0x1009
1323 SO_LINGER = 0x80
1324 SO_LISTENINCQLEN = 0x1013
1325 SO_LISTENQLEN = 0x1012
1326 SO_LISTENQLIMIT = 0x1011
1327 SO_NOSIGPIPE = 0x800
1328 SO_NO_DDP = 0x8000
1329 SO_NO_OFFLOAD = 0x4000
1330 SO_OOBINLINE = 0x100
1331 SO_PEERLABEL = 0x1010
1332 SO_PROTOCOL = 0x1016
1333 SO_PROTOTYPE = 0x1016
1334 SO_RCVBUF = 0x1002
1335 SO_RCVLOWAT = 0x1004
1336 SO_RCVTIMEO = 0x1006
1337 SO_REUSEADDR = 0x4
1338 SO_REUSEPORT = 0x200
1339 SO_SETFIB = 0x1014
1340 SO_SNDBUF = 0x1001
1341 SO_SNDLOWAT = 0x1003
1342 SO_SNDTIMEO = 0x1005
1343 SO_TIMESTAMP = 0x400
1344 SO_TYPE = 0x1008
1345 SO_USELOOPBACK = 0x40
1346 SO_USER_COOKIE = 0x1015
1347 SO_VENDOR = 0x80000000
1348 S_BLKSIZE = 0x200
1349 S_IEXEC = 0x40
1350 S_IFBLK = 0x6000
1351 S_IFCHR = 0x2000
1352 S_IFDIR = 0x4000
1353 S_IFIFO = 0x1000
1354 S_IFLNK = 0xa000
1355 S_IFMT = 0xf000
1356 S_IFREG = 0x8000
1357 S_IFSOCK = 0xc000
1358 S_IFWHT = 0xe000
1359 S_IREAD = 0x100
1360 S_IRGRP = 0x20
1361 S_IROTH = 0x4
1362 S_IRUSR = 0x100
1363 S_IRWXG = 0x38
1364 S_IRWXO = 0x7
1365 S_IRWXU = 0x1c0
1366 S_ISGID = 0x400
1367 S_ISTXT = 0x200
1368 S_ISUID = 0x800
1369 S_ISVTX = 0x200
1370 S_IWGRP = 0x10
1371 S_IWOTH = 0x2
1372 S_IWRITE = 0x80
1373 S_IWUSR = 0x80
1374 S_IXGRP = 0x8
1375 S_IXOTH = 0x1
1376 S_IXUSR = 0x40
1377 TAB0 = 0x0
1378 TAB3 = 0x4
1379 TABDLY = 0x4
1380 TCIFLUSH = 0x1
1381 TCIOFF = 0x3
1382 TCIOFLUSH = 0x3
1383 TCION = 0x4
1384 TCOFLUSH = 0x2
1385 TCOOFF = 0x1
1386 TCOON = 0x2
1387 TCP_CA_NAME_MAX = 0x10
1388 TCP_CCALGOOPT = 0x41
1389 TCP_CONGESTION = 0x40
1390 TCP_FASTOPEN = 0x401
1391 TCP_FUNCTION_BLK = 0x2000
1392 TCP_FUNCTION_NAME_LEN_MAX = 0x20
1393 TCP_INFO = 0x20
1394 TCP_KEEPCNT = 0x400
1395 TCP_KEEPIDLE = 0x100
1396 TCP_KEEPINIT = 0x80
1397 TCP_KEEPINTVL = 0x200
1398 TCP_MAXBURST = 0x4
1399 TCP_MAXHLEN = 0x3c
1400 TCP_MAXOLEN = 0x28
1401 TCP_MAXSEG = 0x2
1402 TCP_MAXWIN = 0xffff
1403 TCP_MAX_SACK = 0x4
1404 TCP_MAX_WINSHIFT = 0xe
1405 TCP_MD5SIG = 0x10
1406 TCP_MINMSS = 0xd8
1407 TCP_MSS = 0x218
1408 TCP_NODELAY = 0x1
1409 TCP_NOOPT = 0x8
1410 TCP_NOPUSH = 0x4
1411 TCP_PCAP_IN = 0x1000
1412 TCP_PCAP_OUT = 0x800
1413 TCP_VENDOR = 0x80000000
1414 TCSAFLUSH = 0x2
1415 TIOCCBRK = 0x2000747a
1416 TIOCCDTR = 0x20007478
1417 TIOCCONS = 0x80047462
1418 TIOCDRAIN = 0x2000745e
1419 TIOCEXCL = 0x2000740d
1420 TIOCEXT = 0x80047460
1421 TIOCFLUSH = 0x80047410
1422 TIOCGDRAINWAIT = 0x40047456
1423 TIOCGETA = 0x402c7413
1424 TIOCGETD = 0x4004741a
1425 TIOCGPGRP = 0x40047477
1426 TIOCGPTN = 0x4004740f
1427 TIOCGSID = 0x40047463
1428 TIOCGWINSZ = 0x40087468
1429 TIOCMBIC = 0x8004746b
1430 TIOCMBIS = 0x8004746c
1431 TIOCMGDTRWAIT = 0x4004745a
1432 TIOCMGET = 0x4004746a
1433 TIOCMSDTRWAIT = 0x8004745b
1434 TIOCMSET = 0x8004746d
1435 TIOCM_CAR = 0x40
1436 TIOCM_CD = 0x40
1437 TIOCM_CTS = 0x20
1438 TIOCM_DCD = 0x40
1439 TIOCM_DSR = 0x100
1440 TIOCM_DTR = 0x2
1441 TIOCM_LE = 0x1
1442 TIOCM_RI = 0x80
1443 TIOCM_RNG = 0x80
1444 TIOCM_RTS = 0x4
1445 TIOCM_SR = 0x10
1446 TIOCM_ST = 0x8
1447 TIOCNOTTY = 0x20007471
1448 TIOCNXCL = 0x2000740e
1449 TIOCOUTQ = 0x40047473
1450 TIOCPKT = 0x80047470
1451 TIOCPKT_DATA = 0x0
1452 TIOCPKT_DOSTOP = 0x20
1453 TIOCPKT_FLUSHREAD = 0x1
1454 TIOCPKT_FLUSHWRITE = 0x2
1455 TIOCPKT_IOCTL = 0x40
1456 TIOCPKT_NOSTOP = 0x10
1457 TIOCPKT_START = 0x8
1458 TIOCPKT_STOP = 0x4
1459 TIOCPTMASTER = 0x2000741c
1460 TIOCSBRK = 0x2000747b
1461 TIOCSCTTY = 0x20007461
1462 TIOCSDRAINWAIT = 0x80047457
1463 TIOCSDTR = 0x20007479
1464 TIOCSETA = 0x802c7414
1465 TIOCSETAF = 0x802c7416
1466 TIOCSETAW = 0x802c7415
1467 TIOCSETD = 0x8004741b
1468 TIOCSIG = 0x2004745f
1469 TIOCSPGRP = 0x80047476
1470 TIOCSTART = 0x2000746e
1471 TIOCSTAT = 0x20007465
1472 TIOCSTI = 0x80017472
1473 TIOCSTOP = 0x2000746f
1474 TIOCSWINSZ = 0x80087467
1475 TIOCTIMESTAMP = 0x40107459
1476 TIOCUCNTL = 0x80047466
1477 TOSTOP = 0x400000
1478 VDISCARD = 0xf
1479 VDSUSP = 0xb
1480 VEOF = 0x0
1481 VEOL = 0x1
1482 VEOL2 = 0x2
1483 VERASE = 0x3
1484 VERASE2 = 0x7
1485 VINTR = 0x8
1486 VKILL = 0x5
1487 VLNEXT = 0xe
1488 VMIN = 0x10
1489 VQUIT = 0x9
1490 VREPRINT = 0x6
1491 VSTART = 0xc
1492 VSTATUS = 0x12
1493 VSTOP = 0xd
1494 VSUSP = 0xa
1495 VTIME = 0x11
1496 VWERASE = 0x4
1497 WCONTINUED = 0x4
1498 WCOREFLAG = 0x80
1499 WEXITED = 0x10
1500 WLINUXCLONE = 0x80000000
1501 WNOHANG = 0x1
1502 WNOWAIT = 0x8
1503 WSTOPPED = 0x2
1504 WTRAPPED = 0x20
1505 WUNTRACED = 0x2
1506 )
1507
1508 // Errors
1509 const (
1510 E2BIG = syscall.Errno(0x7)
1511 EACCES = syscall.Errno(0xd)
1512 EADDRINUSE = syscall.Errno(0x30)
1513 EADDRNOTAVAIL = syscall.Errno(0x31)
1514 EAFNOSUPPORT = syscall.Errno(0x2f)
1515 EAGAIN = syscall.Errno(0x23)
1516 EALREADY = syscall.Errno(0x25)
1517 EAUTH = syscall.Errno(0x50)
1518 EBADF = syscall.Errno(0x9)
1519 EBADMSG = syscall.Errno(0x59)
1520 EBADRPC = syscall.Errno(0x48)
1521 EBUSY = syscall.Errno(0x10)
1522 ECANCELED = syscall.Errno(0x55)
1523 ECAPMODE = syscall.Errno(0x5e)
1524 ECHILD = syscall.Errno(0xa)
1525 ECONNABORTED = syscall.Errno(0x35)
1526 ECONNREFUSED = syscall.Errno(0x3d)
1527 ECONNRESET = syscall.Errno(0x36)
1528 EDEADLK = syscall.Errno(0xb)
1529 EDESTADDRREQ = syscall.Errno(0x27)
1530 EDOM = syscall.Errno(0x21)
1531 EDOOFUS = syscall.Errno(0x58)
1532 EDQUOT = syscall.Errno(0x45)
1533 EEXIST = syscall.Errno(0x11)
1534 EFAULT = syscall.Errno(0xe)
1535 EFBIG = syscall.Errno(0x1b)
1536 EFTYPE = syscall.Errno(0x4f)
1537 EHOSTDOWN = syscall.Errno(0x40)
1538 EHOSTUNREACH = syscall.Errno(0x41)
1539 EIDRM = syscall.Errno(0x52)
1540 EILSEQ = syscall.Errno(0x56)
1541 EINPROGRESS = syscall.Errno(0x24)
1542 EINTR = syscall.Errno(0x4)
1543 EINVAL = syscall.Errno(0x16)
1544 EIO = syscall.Errno(0x5)
1545 EISCONN = syscall.Errno(0x38)
1546 EISDIR = syscall.Errno(0x15)
1547 ELAST = syscall.Errno(0x60)
1548 ELOOP = syscall.Errno(0x3e)
1549 EMFILE = syscall.Errno(0x18)
1550 EMLINK = syscall.Errno(0x1f)
1551 EMSGSIZE = syscall.Errno(0x28)
1552 EMULTIHOP = syscall.Errno(0x5a)
1553 ENAMETOOLONG = syscall.Errno(0x3f)
1554 ENEEDAUTH = syscall.Errno(0x51)
1555 ENETDOWN = syscall.Errno(0x32)
1556 ENETRESET = syscall.Errno(0x34)
1557 ENETUNREACH = syscall.Errno(0x33)
1558 ENFILE = syscall.Errno(0x17)
1559 ENOATTR = syscall.Errno(0x57)
1560 ENOBUFS = syscall.Errno(0x37)
1561 ENODEV = syscall.Errno(0x13)
1562 ENOENT = syscall.Errno(0x2)
1563 ENOEXEC = syscall.Errno(0x8)
1564 ENOLCK = syscall.Errno(0x4d)
1565 ENOLINK = syscall.Errno(0x5b)
1566 ENOMEM = syscall.Errno(0xc)
1567 ENOMSG = syscall.Errno(0x53)
1568 ENOPROTOOPT = syscall.Errno(0x2a)
1569 ENOSPC = syscall.Errno(0x1c)
1570 ENOSYS = syscall.Errno(0x4e)
1571 ENOTBLK = syscall.Errno(0xf)
1572 ENOTCAPABLE = syscall.Errno(0x5d)
1573 ENOTCONN = syscall.Errno(0x39)
1574 ENOTDIR = syscall.Errno(0x14)
1575 ENOTEMPTY = syscall.Errno(0x42)
1576 ENOTRECOVERABLE = syscall.Errno(0x5f)
1577 ENOTSOCK = syscall.Errno(0x26)
1578 ENOTSUP = syscall.Errno(0x2d)
1579 ENOTTY = syscall.Errno(0x19)
1580 ENXIO = syscall.Errno(0x6)
1581 EOPNOTSUPP = syscall.Errno(0x2d)
1582 EOVERFLOW = syscall.Errno(0x54)
1583 EOWNERDEAD = syscall.Errno(0x60)
1584 EPERM = syscall.Errno(0x1)
1585 EPFNOSUPPORT = syscall.Errno(0x2e)
1586 EPIPE = syscall.Errno(0x20)
1587 EPROCLIM = syscall.Errno(0x43)
1588 EPROCUNAVAIL = syscall.Errno(0x4c)
1589 EPROGMISMATCH = syscall.Errno(0x4b)
1590 EPROGUNAVAIL = syscall.Errno(0x4a)
1591 EPROTO = syscall.Errno(0x5c)
1592 EPROTONOSUPPORT = syscall.Errno(0x2b)
1593 EPROTOTYPE = syscall.Errno(0x29)
1594 ERANGE = syscall.Errno(0x22)
1595 EREMOTE = syscall.Errno(0x47)
1596 EROFS = syscall.Errno(0x1e)
1597 ERPCMISMATCH = syscall.Errno(0x49)
1598 ESHUTDOWN = syscall.Errno(0x3a)
1599 ESOCKTNOSUPPORT = syscall.Errno(0x2c)
1600 ESPIPE = syscall.Errno(0x1d)
1601 ESRCH = syscall.Errno(0x3)
1602 ESTALE = syscall.Errno(0x46)
1603 ETIMEDOUT = syscall.Errno(0x3c)
1604 ETOOMANYREFS = syscall.Errno(0x3b)
1605 ETXTBSY = syscall.Errno(0x1a)
1606 EUSERS = syscall.Errno(0x44)
1607 EWOULDBLOCK = syscall.Errno(0x23)
1608 EXDEV = syscall.Errno(0x12)
1609 )
1610
1611 // Signals
1612 const (
1613 SIGABRT = syscall.Signal(0x6)
1614 SIGALRM = syscall.Signal(0xe)
1615 SIGBUS = syscall.Signal(0xa)
1616 SIGCHLD = syscall.Signal(0x14)
1617 SIGCONT = syscall.Signal(0x13)
1618 SIGEMT = syscall.Signal(0x7)
1619 SIGFPE = syscall.Signal(0x8)
1620 SIGHUP = syscall.Signal(0x1)
1621 SIGILL = syscall.Signal(0x4)
1622 SIGINFO = syscall.Signal(0x1d)
1623 SIGINT = syscall.Signal(0x2)
1624 SIGIO = syscall.Signal(0x17)
1625 SIGIOT = syscall.Signal(0x6)
1626 SIGKILL = syscall.Signal(0x9)
1627 SIGLIBRT = syscall.Signal(0x21)
1628 SIGLWP = syscall.Signal(0x20)
1629 SIGPIPE = syscall.Signal(0xd)
1630 SIGPROF = syscall.Signal(0x1b)
1631 SIGQUIT = syscall.Signal(0x3)
1632 SIGSEGV = syscall.Signal(0xb)
1633 SIGSTOP = syscall.Signal(0x11)
1634 SIGSYS = syscall.Signal(0xc)
1635 SIGTERM = syscall.Signal(0xf)
1636 SIGTHR = syscall.Signal(0x20)
1637 SIGTRAP = syscall.Signal(0x5)
1638 SIGTSTP = syscall.Signal(0x12)
1639 SIGTTIN = syscall.Signal(0x15)
1640 SIGTTOU = syscall.Signal(0x16)
1641 SIGURG = syscall.Signal(0x10)
1642 SIGUSR1 = syscall.Signal(0x1e)
1643 SIGUSR2 = syscall.Signal(0x1f)
1644 SIGVTALRM = syscall.Signal(0x1a)
1645 SIGWINCH = syscall.Signal(0x1c)
1646 SIGXCPU = syscall.Signal(0x18)
1647 SIGXFSZ = syscall.Signal(0x19)
1648 )
1649
1650 // Error table
1651 var errorList = [...]struct {
1652 num syscall.Errno
1653 name string
1654 desc string
1655 }{
1656 {1, "EPERM", "operation not permitted"},
1657 {2, "ENOENT", "no such file or directory"},
1658 {3, "ESRCH", "no such process"},
1659 {4, "EINTR", "interrupted system call"},
1660 {5, "EIO", "input/output error"},
1661 {6, "ENXIO", "device not configured"},
1662 {7, "E2BIG", "argument list too long"},
1663 {8, "ENOEXEC", "exec format error"},
1664 {9, "EBADF", "bad file descriptor"},
1665 {10, "ECHILD", "no child processes"},
1666 {11, "EDEADLK", "resource deadlock avoided"},
1667 {12, "ENOMEM", "cannot allocate memory"},
1668 {13, "EACCES", "permission denied"},
1669 {14, "EFAULT", "bad address"},
1670 {15, "ENOTBLK", "block device required"},
1671 {16, "EBUSY", "device busy"},
1672 {17, "EEXIST", "file exists"},
1673 {18, "EXDEV", "cross-device link"},
1674 {19, "ENODEV", "operation not supported by device"},
1675 {20, "ENOTDIR", "not a directory"},
1676 {21, "EISDIR", "is a directory"},
1677 {22, "EINVAL", "invalid argument"},
1678 {23, "ENFILE", "too many open files in system"},
1679 {24, "EMFILE", "too many open files"},
1680 {25, "ENOTTY", "inappropriate ioctl for device"},
1681 {26, "ETXTBSY", "text file busy"},
1682 {27, "EFBIG", "file too large"},
1683 {28, "ENOSPC", "no space left on device"},
1684 {29, "ESPIPE", "illegal seek"},
1685 {30, "EROFS", "read-only file system"},
1686 {31, "EMLINK", "too many links"},
1687 {32, "EPIPE", "broken pipe"},
1688 {33, "EDOM", "numerical argument out of domain"},
1689 {34, "ERANGE", "result too large"},
1690 {35, "EAGAIN", "resource temporarily unavailable"},
1691 {36, "EINPROGRESS", "operation now in progress"},
1692 {37, "EALREADY", "operation already in progress"},
1693 {38, "ENOTSOCK", "socket operation on non-socket"},
1694 {39, "EDESTADDRREQ", "destination address required"},
1695 {40, "EMSGSIZE", "message too long"},
1696 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1697 {42, "ENOPROTOOPT", "protocol not available"},
1698 {43, "EPROTONOSUPPORT", "protocol not supported"},
1699 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1700 {45, "EOPNOTSUPP", "operation not supported"},
1701 {46, "EPFNOSUPPORT", "protocol family not supported"},
1702 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1703 {48, "EADDRINUSE", "address already in use"},
1704 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1705 {50, "ENETDOWN", "network is down"},
1706 {51, "ENETUNREACH", "network is unreachable"},
1707 {52, "ENETRESET", "network dropped connection on reset"},
1708 {53, "ECONNABORTED", "software caused connection abort"},
1709 {54, "ECONNRESET", "connection reset by peer"},
1710 {55, "ENOBUFS", "no buffer space available"},
1711 {56, "EISCONN", "socket is already connected"},
1712 {57, "ENOTCONN", "socket is not connected"},
1713 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1714 {59, "ETOOMANYREFS", "too many references: can't splice"},
1715 {60, "ETIMEDOUT", "operation timed out"},
1716 {61, "ECONNREFUSED", "connection refused"},
1717 {62, "ELOOP", "too many levels of symbolic links"},
1718 {63, "ENAMETOOLONG", "file name too long"},
1719 {64, "EHOSTDOWN", "host is down"},
1720 {65, "EHOSTUNREACH", "no route to host"},
1721 {66, "ENOTEMPTY", "directory not empty"},
1722 {67, "EPROCLIM", "too many processes"},
1723 {68, "EUSERS", "too many users"},
1724 {69, "EDQUOT", "disc quota exceeded"},
1725 {70, "ESTALE", "stale NFS file handle"},
1726 {71, "EREMOTE", "too many levels of remote in path"},
1727 {72, "EBADRPC", "RPC struct is bad"},
1728 {73, "ERPCMISMATCH", "RPC version wrong"},
1729 {74, "EPROGUNAVAIL", "RPC prog. not avail"},
1730 {75, "EPROGMISMATCH", "program version wrong"},
1731 {76, "EPROCUNAVAIL", "bad procedure for program"},
1732 {77, "ENOLCK", "no locks available"},
1733 {78, "ENOSYS", "function not implemented"},
1734 {79, "EFTYPE", "inappropriate file type or format"},
1735 {80, "EAUTH", "authentication error"},
1736 {81, "ENEEDAUTH", "need authenticator"},
1737 {82, "EIDRM", "identifier removed"},
1738 {83, "ENOMSG", "no message of desired type"},
1739 {84, "EOVERFLOW", "value too large to be stored in data type"},
1740 {85, "ECANCELED", "operation canceled"},
1741 {86, "EILSEQ", "illegal byte sequence"},
1742 {87, "ENOATTR", "attribute not found"},
1743 {88, "EDOOFUS", "programming error"},
1744 {89, "EBADMSG", "bad message"},
1745 {90, "EMULTIHOP", "multihop attempted"},
1746 {91, "ENOLINK", "link has been severed"},
1747 {92, "EPROTO", "protocol error"},
1748 {93, "ENOTCAPABLE", "capabilities insufficient"},
1749 {94, "ECAPMODE", "not permitted in capability mode"},
1750 {95, "ENOTRECOVERABLE", "state not recoverable"},
1751 {96, "EOWNERDEAD", "previous owner died"},
1752 }
1753
1754 // Signal table
1755 var signalList = [...]struct {
1756 num syscall.Signal
1757 name string
1758 desc string
1759 }{
1760 {1, "SIGHUP", "hangup"},
1761 {2, "SIGINT", "interrupt"},
1762 {3, "SIGQUIT", "quit"},
1763 {4, "SIGILL", "illegal instruction"},
1764 {5, "SIGTRAP", "trace/BPT trap"},
1765 {6, "SIGIOT", "abort trap"},
1766 {7, "SIGEMT", "EMT trap"},
1767 {8, "SIGFPE", "floating point exception"},
1768 {9, "SIGKILL", "killed"},
1769 {10, "SIGBUS", "bus error"},
1770 {11, "SIGSEGV", "segmentation fault"},
1771 {12, "SIGSYS", "bad system call"},
1772 {13, "SIGPIPE", "broken pipe"},
1773 {14, "SIGALRM", "alarm clock"},
1774 {15, "SIGTERM", "terminated"},
1775 {16, "SIGURG", "urgent I/O condition"},
1776 {17, "SIGSTOP", "suspended (signal)"},
1777 {18, "SIGTSTP", "suspended"},
1778 {19, "SIGCONT", "continued"},
1779 {20, "SIGCHLD", "child exited"},
1780 {21, "SIGTTIN", "stopped (tty input)"},
1781 {22, "SIGTTOU", "stopped (tty output)"},
1782 {23, "SIGIO", "I/O possible"},
1783 {24, "SIGXCPU", "cputime limit exceeded"},
1784 {25, "SIGXFSZ", "filesize limit exceeded"},
1785 {26, "SIGVTALRM", "virtual timer expired"},
1786 {27, "SIGPROF", "profiling timer expired"},
1787 {28, "SIGWINCH", "window size changes"},
1788 {29, "SIGINFO", "information request"},
1789 {30, "SIGUSR1", "user defined signal 1"},
1790 {31, "SIGUSR2", "user defined signal 2"},
1791 {32, "SIGTHR", "unknown signal"},
1792 {33, "SIGLIBRT", "unknown signal"},
1793 }
22
33 // +build 386,linux
44
5 // Created by cgo -godefs - DO NOT EDIT
5 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
66 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 _const.go
77
88 package unix
1010 import "syscall"
1111
1212 const (
13 AAFS_MAGIC = 0x5a3c69f0
14 ADFS_SUPER_MAGIC = 0xadf5
15 AFFS_SUPER_MAGIC = 0xadff
16 AFS_FS_MAGIC = 0x6b414653
17 AFS_SUPER_MAGIC = 0x5346414f
1318 AF_ALG = 0x26
1419 AF_APPLETALK = 0x5
1520 AF_ASH = 0x12
5863 AF_VSOCK = 0x28
5964 AF_WANPIPE = 0x19
6065 AF_X25 = 0x9
66 AF_XDP = 0x2c
6167 ALG_OP_DECRYPT = 0x0
6268 ALG_OP_ENCRYPT = 0x1
6369 ALG_SET_AEAD_ASSOCLEN = 0x4
6571 ALG_SET_IV = 0x2
6672 ALG_SET_KEY = 0x1
6773 ALG_SET_OP = 0x3
74 ANON_INODE_FS_MAGIC = 0x9041934
6875 ARPHRD_6LOWPAN = 0x339
6976 ARPHRD_ADAPT = 0x108
7077 ARPHRD_APPLETLK = 0x8
120127 ARPHRD_PPP = 0x200
121128 ARPHRD_PRONET = 0x4
122129 ARPHRD_RAWHDLC = 0x206
130 ARPHRD_RAWIP = 0x207
123131 ARPHRD_ROSE = 0x10e
124132 ARPHRD_RSRVD = 0x104
125133 ARPHRD_SIT = 0x308
131139 ARPHRD_VOID = 0xffff
132140 ARPHRD_VSOCKMON = 0x33a
133141 ARPHRD_X25 = 0x10f
142 AUTOFS_SUPER_MAGIC = 0x187
134143 B0 = 0x0
135144 B1000000 = 0x1008
136145 B110 = 0x3
162171 B75 = 0x2
163172 B921600 = 0x1007
164173 B9600 = 0xd
174 BALLOON_KVM_MAGIC = 0x13661366
175 BDEVFS_MAGIC = 0x62646576
176 BINFMTFS_MAGIC = 0x42494e4d
165177 BLKBSZGET = 0x80041270
166178 BLKBSZSET = 0x40041271
167179 BLKFLSBUF = 0x1261
186198 BPF_AND = 0x50
187199 BPF_B = 0x10
188200 BPF_DIV = 0x30
201 BPF_FS_MAGIC = 0xcafe4a11
189202 BPF_H = 0x8
190203 BPF_IMM = 0x0
191204 BPF_IND = 0x40
227240 BS0 = 0x0
228241 BS1 = 0x2000
229242 BSDLY = 0x2000
243 BTRFS_SUPER_MAGIC = 0x9123683e
244 BTRFS_TEST_MAGIC = 0x73727279
230245 CAN_BCM = 0x2
231246 CAN_EFF_FLAG = 0x80000000
232247 CAN_EFF_ID_BITS = 0x1d
250265 CBAUD = 0x100f
251266 CBAUDEX = 0x1000
252267 CFLUSH = 0xf
268 CGROUP2_SUPER_MAGIC = 0x63677270
269 CGROUP_SUPER_MAGIC = 0x27e0eb
253270 CIBAUD = 0x100f0000
254271 CLOCAL = 0x800
255272 CLOCK_BOOTTIME = 0x7
292309 CLONE_VFORK = 0x4000
293310 CLONE_VM = 0x100
294311 CMSPAR = 0x40000000
312 CODA_SUPER_MAGIC = 0x73757245
295313 CR0 = 0x0
296314 CR1 = 0x200
297315 CR2 = 0x400
298316 CR3 = 0x600
317 CRAMFS_MAGIC = 0x28cd3d45
299318 CRDLY = 0x600
300319 CREAD = 0x80
301320 CRTSCTS = 0x80000000
310329 CSTOP = 0x13
311330 CSTOPB = 0x40
312331 CSUSP = 0x1a
332 DAXFS_MAGIC = 0x64646178
333 DEBUGFS_MAGIC = 0x64626720
334 DEVPTS_SUPER_MAGIC = 0x1cd1
313335 DT_BLK = 0x6
314336 DT_CHR = 0x2
315337 DT_DIR = 0x4
326348 ECHOKE = 0x800
327349 ECHONL = 0x40
328350 ECHOPRT = 0x400
351 ECRYPTFS_SUPER_MAGIC = 0xf15f
329352 EFD_CLOEXEC = 0x80000
330353 EFD_NONBLOCK = 0x800
331354 EFD_SEMAPHORE = 0x1
355 EFIVARFS_MAGIC = 0xde5e81e4
356 EFS_SUPER_MAGIC = 0x414a53
332357 ENCODING_DEFAULT = 0x0
333358 ENCODING_FM_MARK = 0x3
334359 ENCODING_FM_SPACE = 0x4
389414 ETH_P_DSA = 0x1b
390415 ETH_P_ECONET = 0x18
391416 ETH_P_EDSA = 0xdada
417 ETH_P_ERSPAN = 0x88be
418 ETH_P_ERSPAN2 = 0x22eb
392419 ETH_P_FCOE = 0x8906
393420 ETH_P_FIP = 0x8914
394421 ETH_P_HDLC = 0x19
397424 ETH_P_IEEE802154 = 0xf6
398425 ETH_P_IEEEPUP = 0xa00
399426 ETH_P_IEEEPUPAT = 0xa01
427 ETH_P_IFE = 0xed3e
400428 ETH_P_IP = 0x800
401429 ETH_P_IPV6 = 0x86dd
402430 ETH_P_IPX = 0x8137
407435 ETH_P_LOOP = 0x60
408436 ETH_P_LOOPBACK = 0x9000
409437 ETH_P_MACSEC = 0x88e5
438 ETH_P_MAP = 0xf9
410439 ETH_P_MOBITEX = 0x15
411440 ETH_P_MPLS_MC = 0x8848
412441 ETH_P_MPLS_UC = 0x8847
413442 ETH_P_MVRP = 0x88f5
414443 ETH_P_NCSI = 0x88f8
444 ETH_P_NSH = 0x894f
415445 ETH_P_PAE = 0x888e
416446 ETH_P_PAUSE = 0x8808
417447 ETH_P_PHONET = 0xf5
419449 ETH_P_PPP_DISC = 0x8863
420450 ETH_P_PPP_MP = 0x8
421451 ETH_P_PPP_SES = 0x8864
452 ETH_P_PREAUTH = 0x88c7
422453 ETH_P_PRP = 0x88fb
423454 ETH_P_PUP = 0x200
424455 ETH_P_PUPAT = 0x201
439470 ETH_P_WCCP = 0x883e
440471 ETH_P_X25 = 0x805
441472 ETH_P_XDSA = 0xf8
473 EXABYTE_ENABLE_NEST = 0xf0
474 EXT2_SUPER_MAGIC = 0xef53
475 EXT3_SUPER_MAGIC = 0xef53
476 EXT4_SUPER_MAGIC = 0xef53
442477 EXTA = 0xe
443478 EXTB = 0xf
444479 EXTPROC = 0x10000
480 F2FS_SUPER_MAGIC = 0xf2f52010
445481 FALLOC_FL_COLLAPSE_RANGE = 0x8
446482 FALLOC_FL_INSERT_RANGE = 0x20
447483 FALLOC_FL_KEEP_SIZE = 0x1
455491 FF1 = 0x8000
456492 FFDLY = 0x8000
457493 FLUSHO = 0x1000
494 FP_XSTATE_MAGIC2 = 0x46505845
458495 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
459496 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
460497 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
462499 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
463500 FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
464501 FS_ENCRYPTION_MODE_INVALID = 0x0
502 FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
503 FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
465504 FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
466505 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
467506 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
475514 FS_POLICY_FLAGS_PAD_8 = 0x1
476515 FS_POLICY_FLAGS_PAD_MASK = 0x3
477516 FS_POLICY_FLAGS_VALID = 0x3
517 FUTEXFS_SUPER_MAGIC = 0xbad1dea
518 F_ADD_SEALS = 0x409
478519 F_DUPFD = 0x0
479520 F_DUPFD_CLOEXEC = 0x406
480521 F_EXLCK = 0x4
487528 F_GETOWN_EX = 0x10
488529 F_GETPIPE_SZ = 0x408
489530 F_GETSIG = 0xb
531 F_GET_FILE_RW_HINT = 0x40d
532 F_GET_RW_HINT = 0x40b
533 F_GET_SEALS = 0x40a
490534 F_LOCK = 0x1
491535 F_NOTIFY = 0x402
492536 F_OFD_GETLK = 0x24
494538 F_OFD_SETLKW = 0x26
495539 F_OK = 0x0
496540 F_RDLCK = 0x0
541 F_SEAL_GROW = 0x4
542 F_SEAL_SEAL = 0x1
543 F_SEAL_SHRINK = 0x2
544 F_SEAL_WRITE = 0x8
497545 F_SETFD = 0x2
498546 F_SETFL = 0x4
499547 F_SETLEASE = 0x400
505553 F_SETOWN_EX = 0xf
506554 F_SETPIPE_SZ = 0x407
507555 F_SETSIG = 0xa
556 F_SET_FILE_RW_HINT = 0x40e
557 F_SET_RW_HINT = 0x40c
508558 F_SHLCK = 0x8
509559 F_TEST = 0x3
510560 F_TLOCK = 0x2
526576 GENL_UNS_ADMIN_PERM = 0x10
527577 GRND_NONBLOCK = 0x1
528578 GRND_RANDOM = 0x2
579 HDIO_DRIVE_CMD = 0x31f
580 HDIO_DRIVE_CMD_AEB = 0x31e
581 HDIO_DRIVE_CMD_HDR_SIZE = 0x4
582 HDIO_DRIVE_HOB_HDR_SIZE = 0x8
583 HDIO_DRIVE_RESET = 0x31c
584 HDIO_DRIVE_TASK = 0x31e
585 HDIO_DRIVE_TASKFILE = 0x31d
586 HDIO_DRIVE_TASK_HDR_SIZE = 0x8
587 HDIO_GETGEO = 0x301
588 HDIO_GET_32BIT = 0x309
589 HDIO_GET_ACOUSTIC = 0x30f
590 HDIO_GET_ADDRESS = 0x310
591 HDIO_GET_BUSSTATE = 0x31a
592 HDIO_GET_DMA = 0x30b
593 HDIO_GET_IDENTITY = 0x30d
594 HDIO_GET_KEEPSETTINGS = 0x308
595 HDIO_GET_MULTCOUNT = 0x304
596 HDIO_GET_NICE = 0x30c
597 HDIO_GET_NOWERR = 0x30a
598 HDIO_GET_QDMA = 0x305
599 HDIO_GET_UNMASKINTR = 0x302
600 HDIO_GET_WCACHE = 0x30e
601 HDIO_OBSOLETE_IDENTITY = 0x307
602 HDIO_SCAN_HWIF = 0x328
603 HDIO_SET_32BIT = 0x324
604 HDIO_SET_ACOUSTIC = 0x32c
605 HDIO_SET_ADDRESS = 0x32f
606 HDIO_SET_BUSSTATE = 0x32d
607 HDIO_SET_DMA = 0x326
608 HDIO_SET_KEEPSETTINGS = 0x323
609 HDIO_SET_MULTCOUNT = 0x321
610 HDIO_SET_NICE = 0x329
611 HDIO_SET_NOWERR = 0x325
612 HDIO_SET_PIO_MODE = 0x327
613 HDIO_SET_QDMA = 0x32e
614 HDIO_SET_UNMASKINTR = 0x322
615 HDIO_SET_WCACHE = 0x32b
616 HDIO_SET_XFER = 0x306
617 HDIO_TRISTATE_HWIF = 0x31b
618 HDIO_UNREGISTER_HWIF = 0x32a
619 HOSTFS_SUPER_MAGIC = 0xc0ffee
620 HPFS_SUPER_MAGIC = 0xf995e849
621 HUGETLBFS_MAGIC = 0x958458f6
529622 HUPCL = 0x400
530623 IBSHIFT = 0x10
531624 ICANON = 0x2
545638 IFA_F_STABLE_PRIVACY = 0x800
546639 IFA_F_TEMPORARY = 0x1
547640 IFA_F_TENTATIVE = 0x40
548 IFA_MAX = 0x8
641 IFA_MAX = 0xa
549642 IFF_ALLMULTI = 0x200
550643 IFF_ATTACH_QUEUE = 0x200
551644 IFF_AUTOMEDIA = 0x4000
560653 IFF_MASTER = 0x400
561654 IFF_MULTICAST = 0x1000
562655 IFF_MULTI_QUEUE = 0x100
656 IFF_NAPI = 0x10
657 IFF_NAPI_FRAGS = 0x20
563658 IFF_NOARP = 0x80
564659 IFF_NOFILTER = 0x1000
565660 IFF_NOTRAILERS = 0x20
622717 IN_OPEN = 0x20
623718 IN_Q_OVERFLOW = 0x4000
624719 IN_UNMOUNT = 0x2000
720 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
625721 IPPROTO_AH = 0x33
626722 IPPROTO_BEETPH = 0x5e
627723 IPPROTO_COMP = 0x6c
669765 IPV6_DONTFRAG = 0x3e
670766 IPV6_DROP_MEMBERSHIP = 0x15
671767 IPV6_DSTOPTS = 0x3b
768 IPV6_FREEBIND = 0x4e
672769 IPV6_HDRINCL = 0x24
673770 IPV6_HOPLIMIT = 0x34
674771 IPV6_HOPOPTS = 0x36
773870 IP_UNICAST_IF = 0x32
774871 IP_XFRM_POLICY = 0x11
775872 ISIG = 0x1
873 ISOFS_SUPER_MAGIC = 0x9660
776874 ISTRIP = 0x20
777875 IUCLC = 0x200
778876 IUTF8 = 0x4000
779877 IXANY = 0x800
780878 IXOFF = 0x1000
781879 IXON = 0x400
880 JFFS2_SUPER_MAGIC = 0x72b6
881 KEXEC_ARCH_386 = 0x30000
882 KEXEC_ARCH_68K = 0x40000
883 KEXEC_ARCH_AARCH64 = 0xb70000
884 KEXEC_ARCH_ARM = 0x280000
885 KEXEC_ARCH_DEFAULT = 0x0
886 KEXEC_ARCH_IA_64 = 0x320000
887 KEXEC_ARCH_MASK = 0xffff0000
888 KEXEC_ARCH_MIPS = 0x80000
889 KEXEC_ARCH_MIPS_LE = 0xa0000
890 KEXEC_ARCH_PPC = 0x140000
891 KEXEC_ARCH_PPC64 = 0x150000
892 KEXEC_ARCH_S390 = 0x160000
893 KEXEC_ARCH_SH = 0x2a0000
894 KEXEC_ARCH_X86_64 = 0x3e0000
895 KEXEC_FILE_NO_INITRAMFS = 0x4
896 KEXEC_FILE_ON_CRASH = 0x2
897 KEXEC_FILE_UNLOAD = 0x1
898 KEXEC_ON_CRASH = 0x1
899 KEXEC_PRESERVE_CONTEXT = 0x2
900 KEXEC_SEGMENT_MAX = 0x10
782901 KEYCTL_ASSUME_AUTHORITY = 0x10
783902 KEYCTL_CHOWN = 0x4
784903 KEYCTL_CLEAR = 0x7
793912 KEYCTL_JOIN_SESSION_KEYRING = 0x1
794913 KEYCTL_LINK = 0x8
795914 KEYCTL_NEGATE = 0xd
915 KEYCTL_PKEY_DECRYPT = 0x1a
916 KEYCTL_PKEY_ENCRYPT = 0x19
917 KEYCTL_PKEY_QUERY = 0x18
918 KEYCTL_PKEY_SIGN = 0x1b
919 KEYCTL_PKEY_VERIFY = 0x1c
796920 KEYCTL_READ = 0xb
797921 KEYCTL_REJECT = 0x13
798922 KEYCTL_RESTRICT_KEYRING = 0x1d
802926 KEYCTL_SETPERM = 0x5
803927 KEYCTL_SET_REQKEY_KEYRING = 0xe
804928 KEYCTL_SET_TIMEOUT = 0xf
929 KEYCTL_SUPPORTS_DECRYPT = 0x2
930 KEYCTL_SUPPORTS_ENCRYPT = 0x1
931 KEYCTL_SUPPORTS_SIGN = 0x4
932 KEYCTL_SUPPORTS_VERIFY = 0x8
805933 KEYCTL_UNLINK = 0x9
806934 KEYCTL_UPDATE = 0x2
807935 KEY_REQKEY_DEFL_DEFAULT = 0x0
843971 MADV_FREE = 0x8
844972 MADV_HUGEPAGE = 0xe
845973 MADV_HWPOISON = 0x64
974 MADV_KEEPONFORK = 0x13
846975 MADV_MERGEABLE = 0xc
847976 MADV_NOHUGEPAGE = 0xf
848977 MADV_NORMAL = 0x0
851980 MADV_SEQUENTIAL = 0x2
852981 MADV_UNMERGEABLE = 0xd
853982 MADV_WILLNEED = 0x3
983 MADV_WIPEONFORK = 0x12
854984 MAP_32BIT = 0x40
855985 MAP_ANON = 0x20
856986 MAP_ANONYMOUS = 0x20
858988 MAP_EXECUTABLE = 0x1000
859989 MAP_FILE = 0x0
860990 MAP_FIXED = 0x10
991 MAP_FIXED_NOREPLACE = 0x100000
861992 MAP_GROWSDOWN = 0x100
862993 MAP_HUGETLB = 0x40000
863994 MAP_HUGE_MASK = 0x3f
868999 MAP_POPULATE = 0x8000
8691000 MAP_PRIVATE = 0x2
8701001 MAP_SHARED = 0x1
1002 MAP_SHARED_VALIDATE = 0x3
8711003 MAP_STACK = 0x20000
1004 MAP_SYNC = 0x80000
8721005 MAP_TYPE = 0xf
8731006 MCL_CURRENT = 0x1
8741007 MCL_FUTURE = 0x2
8751008 MCL_ONFAULT = 0x4
1009 MFD_ALLOW_SEALING = 0x2
1010 MFD_CLOEXEC = 0x1
1011 MFD_HUGETLB = 0x4
1012 MFD_HUGE_16GB = -0x78000000
1013 MFD_HUGE_16MB = 0x60000000
1014 MFD_HUGE_1GB = 0x78000000
1015 MFD_HUGE_1MB = 0x50000000
1016 MFD_HUGE_256MB = 0x70000000
1017 MFD_HUGE_2GB = 0x7c000000
1018 MFD_HUGE_2MB = 0x54000000
1019 MFD_HUGE_32MB = 0x64000000
1020 MFD_HUGE_512KB = 0x4c000000
1021 MFD_HUGE_512MB = 0x74000000
1022 MFD_HUGE_64KB = 0x40000000
1023 MFD_HUGE_8MB = 0x5c000000
1024 MFD_HUGE_MASK = 0x3f
1025 MFD_HUGE_SHIFT = 0x1a
1026 MINIX2_SUPER_MAGIC = 0x2468
1027 MINIX2_SUPER_MAGIC2 = 0x2478
1028 MINIX3_SUPER_MAGIC = 0x4d5a
1029 MINIX_SUPER_MAGIC = 0x137f
1030 MINIX_SUPER_MAGIC2 = 0x138f
8761031 MNT_DETACH = 0x2
8771032 MNT_EXPIRE = 0x4
8781033 MNT_FORCE = 0x1
1034 MODULE_INIT_IGNORE_MODVERSIONS = 0x1
1035 MODULE_INIT_IGNORE_VERMAGIC = 0x2
1036 MSDOS_SUPER_MAGIC = 0x4d44
8791037 MSG_BATCH = 0x40000
8801038 MSG_CMSG_CLOEXEC = 0x40000000
8811039 MSG_CONFIRM = 0x800
8971055 MSG_TRYHARD = 0x4
8981056 MSG_WAITALL = 0x100
8991057 MSG_WAITFORONE = 0x10000
1058 MSG_ZEROCOPY = 0x4000000
9001059 MS_ACTIVE = 0x40000000
9011060 MS_ASYNC = 0x1
9021061 MS_BIND = 0x1000
9341093 MS_SYNCHRONOUS = 0x10
9351094 MS_UNBINDABLE = 0x20000
9361095 MS_VERBOSE = 0x8000
1096 MTD_INODE_FS_MAGIC = 0x11307854
9371097 NAME_MAX = 0xff
1098 NCP_SUPER_MAGIC = 0x564c
9381099 NETLINK_ADD_MEMBERSHIP = 0x1
9391100 NETLINK_AUDIT = 0x9
9401101 NETLINK_BROADCAST_ERROR = 0x4
9481109 NETLINK_FIB_LOOKUP = 0xa
9491110 NETLINK_FIREWALL = 0x3
9501111 NETLINK_GENERIC = 0x10
1112 NETLINK_GET_STRICT_CHK = 0xc
9511113 NETLINK_INET_DIAG = 0x4
9521114 NETLINK_IP6_FW = 0xd
9531115 NETLINK_ISCSI = 0x8
9691131 NETLINK_UNUSED = 0x1
9701132 NETLINK_USERSOCK = 0x2
9711133 NETLINK_XFRM = 0x6
1134 NETNSA_MAX = 0x3
1135 NETNSA_NSID_NOT_ASSIGNED = -0x1
1136 NFNETLINK_V0 = 0x0
1137 NFNLGRP_ACCT_QUOTA = 0x8
1138 NFNLGRP_CONNTRACK_DESTROY = 0x3
1139 NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
1140 NFNLGRP_CONNTRACK_EXP_NEW = 0x4
1141 NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
1142 NFNLGRP_CONNTRACK_NEW = 0x1
1143 NFNLGRP_CONNTRACK_UPDATE = 0x2
1144 NFNLGRP_MAX = 0x9
1145 NFNLGRP_NFTABLES = 0x7
1146 NFNLGRP_NFTRACE = 0x9
1147 NFNLGRP_NONE = 0x0
1148 NFNL_BATCH_MAX = 0x1
1149 NFNL_MSG_BATCH_BEGIN = 0x10
1150 NFNL_MSG_BATCH_END = 0x11
1151 NFNL_NFA_NEST = 0x8000
1152 NFNL_SUBSYS_ACCT = 0x7
1153 NFNL_SUBSYS_COUNT = 0xc
1154 NFNL_SUBSYS_CTHELPER = 0x9
1155 NFNL_SUBSYS_CTNETLINK = 0x1
1156 NFNL_SUBSYS_CTNETLINK_EXP = 0x2
1157 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
1158 NFNL_SUBSYS_IPSET = 0x6
1159 NFNL_SUBSYS_NFTABLES = 0xa
1160 NFNL_SUBSYS_NFT_COMPAT = 0xb
1161 NFNL_SUBSYS_NONE = 0x0
1162 NFNL_SUBSYS_OSF = 0x5
1163 NFNL_SUBSYS_QUEUE = 0x3
1164 NFNL_SUBSYS_ULOG = 0x4
1165 NFS_SUPER_MAGIC = 0x6969
1166 NILFS_SUPER_MAGIC = 0x3434
9721167 NL0 = 0x0
9731168 NL1 = 0x100
9741169 NLA_ALIGNTO = 0x4
9961191 NLM_F_EXCL = 0x200
9971192 NLM_F_MATCH = 0x200
9981193 NLM_F_MULTI = 0x2
1194 NLM_F_NONREC = 0x100
9991195 NLM_F_REPLACE = 0x100
10001196 NLM_F_REQUEST = 0x1
10011197 NLM_F_ROOT = 0x100
10021198 NOFLSH = 0x80
1199 NSFS_MAGIC = 0x6e736673
1200 OCFS2_SUPER_MAGIC = 0x7461636f
10031201 OCRNL = 0x8
10041202 OFDEL = 0x80
10051203 OFILL = 0x40
10071205 ONLCR = 0x4
10081206 ONLRET = 0x20
10091207 ONOCR = 0x10
1208 OPENPROM_SUPER_MAGIC = 0x9fa1
10101209 OPOST = 0x1
1210 OVERLAYFS_SUPER_MAGIC = 0x794c7630
10111211 O_ACCMODE = 0x3
10121212 O_APPEND = 0x400
10131213 O_ASYNC = 0x2000
10531253 PACKET_FASTROUTE = 0x6
10541254 PACKET_HDRLEN = 0xb
10551255 PACKET_HOST = 0x0
1256 PACKET_IGNORE_OUTGOING = 0x17
10561257 PACKET_KERNEL = 0x7
10571258 PACKET_LOOPBACK = 0x5
10581259 PACKET_LOSS = 0xe
10921293 PERF_EVENT_IOC_DISABLE = 0x2401
10931294 PERF_EVENT_IOC_ENABLE = 0x2400
10941295 PERF_EVENT_IOC_ID = 0x80042407
1296 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b
10951297 PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
10961298 PERF_EVENT_IOC_PERIOD = 0x40082404
1299 PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
10971300 PERF_EVENT_IOC_REFRESH = 0x2402
10981301 PERF_EVENT_IOC_RESET = 0x2403
10991302 PERF_EVENT_IOC_SET_BPF = 0x40042408
11001303 PERF_EVENT_IOC_SET_FILTER = 0x40042406
11011304 PERF_EVENT_IOC_SET_OUTPUT = 0x2405
1305 PIPEFS_MAGIC = 0x50495045
1306 PPPIOCATTACH = 0x4004743d
1307 PPPIOCATTCHAN = 0x40047438
1308 PPPIOCCONNECT = 0x4004743a
1309 PPPIOCDETACH = 0x4004743c
1310 PPPIOCDISCONN = 0x7439
1311 PPPIOCGASYNCMAP = 0x80047458
1312 PPPIOCGCHAN = 0x80047437
1313 PPPIOCGDEBUG = 0x80047441
1314 PPPIOCGFLAGS = 0x8004745a
1315 PPPIOCGIDLE = 0x8008743f
1316 PPPIOCGL2TPSTATS = 0x80487436
1317 PPPIOCGMRU = 0x80047453
1318 PPPIOCGNPMODE = 0xc008744c
1319 PPPIOCGRASYNCMAP = 0x80047455
1320 PPPIOCGUNIT = 0x80047456
1321 PPPIOCGXASYNCMAP = 0x80207450
1322 PPPIOCNEWUNIT = 0xc004743e
1323 PPPIOCSACTIVE = 0x40087446
1324 PPPIOCSASYNCMAP = 0x40047457
1325 PPPIOCSCOMPRESS = 0x400c744d
1326 PPPIOCSDEBUG = 0x40047440
1327 PPPIOCSFLAGS = 0x40047459
1328 PPPIOCSMAXCID = 0x40047451
1329 PPPIOCSMRRU = 0x4004743b
1330 PPPIOCSMRU = 0x40047452
1331 PPPIOCSNPMODE = 0x4008744b
1332 PPPIOCSPASS = 0x40087447
1333 PPPIOCSRASYNCMAP = 0x40047454
1334 PPPIOCSXASYNCMAP = 0x4020744f
1335 PPPIOCXFERUNIT = 0x744e
11021336 PRIO_PGRP = 0x1
11031337 PRIO_PROCESS = 0x0
11041338 PRIO_USER = 0x2
1339 PROC_SUPER_MAGIC = 0x9fa0
11051340 PROT_EXEC = 0x4
11061341 PROT_GROWSDOWN = 0x1000000
11071342 PROT_GROWSUP = 0x2000000
11441379 PR_GET_PDEATHSIG = 0x2
11451380 PR_GET_SECCOMP = 0x15
11461381 PR_GET_SECUREBITS = 0x1b
1382 PR_GET_SPECULATION_CTRL = 0x34
11471383 PR_GET_THP_DISABLE = 0x2a
11481384 PR_GET_TID_ADDRESS = 0x28
11491385 PR_GET_TIMERSLACK = 0x1e
11891425 PR_SET_PTRACER_ANY = 0xffffffff
11901426 PR_SET_SECCOMP = 0x16
11911427 PR_SET_SECUREBITS = 0x1c
1428 PR_SET_SPECULATION_CTRL = 0x35
11921429 PR_SET_THP_DISABLE = 0x29
11931430 PR_SET_TIMERSLACK = 0x1d
11941431 PR_SET_TIMING = 0xe
11951432 PR_SET_TSC = 0x1a
11961433 PR_SET_UNALIGN = 0x6
1434 PR_SPEC_DISABLE = 0x4
1435 PR_SPEC_ENABLE = 0x2
1436 PR_SPEC_FORCE_DISABLE = 0x8
1437 PR_SPEC_INDIRECT_BRANCH = 0x1
1438 PR_SPEC_NOT_AFFECTED = 0x0
1439 PR_SPEC_PRCTL = 0x1
1440 PR_SPEC_STORE_BYPASS = 0x0
1441 PR_SVE_GET_VL = 0x33
1442 PR_SVE_SET_VL = 0x32
1443 PR_SVE_SET_VL_ONEXEC = 0x40000
1444 PR_SVE_VL_INHERIT = 0x20000
1445 PR_SVE_VL_LEN_MASK = 0xffff
11971446 PR_TASK_PERF_EVENTS_DISABLE = 0x1f
11981447 PR_TASK_PERF_EVENTS_ENABLE = 0x20
11991448 PR_TIMING_STATISTICAL = 0x0
12021451 PR_TSC_SIGSEGV = 0x2
12031452 PR_UNALIGN_NOPRINT = 0x1
12041453 PR_UNALIGN_SIGBUS = 0x2
1454 PSTOREFS_MAGIC = 0x6165676c
12051455 PTRACE_ATTACH = 0x10
12061456 PTRACE_CONT = 0x7
12071457 PTRACE_DETACH = 0x11
12451495 PTRACE_POKETEXT = 0x4
12461496 PTRACE_POKEUSR = 0x6
12471497 PTRACE_SECCOMP_GET_FILTER = 0x420c
1498 PTRACE_SECCOMP_GET_METADATA = 0x420d
12481499 PTRACE_SEIZE = 0x4206
12491500 PTRACE_SETFPREGS = 0xf
12501501 PTRACE_SETFPXREGS = 0x13
12601511 PTRACE_SYSEMU = 0x1f
12611512 PTRACE_SYSEMU_SINGLESTEP = 0x20
12621513 PTRACE_TRACEME = 0x0
1514 QNX4_SUPER_MAGIC = 0x2f
1515 QNX6_SUPER_MAGIC = 0x68191122
1516 RAMFS_MAGIC = 0x858458f6
1517 RDTGROUP_SUPER_MAGIC = 0x7655821
1518 REISERFS_SUPER_MAGIC = 0x52654973
1519 RENAME_EXCHANGE = 0x2
1520 RENAME_NOREPLACE = 0x1
1521 RENAME_WHITEOUT = 0x4
12631522 RLIMIT_AS = 0x9
12641523 RLIMIT_CORE = 0x4
12651524 RLIMIT_CPU = 0x0
12761535 RLIMIT_RTTIME = 0xf
12771536 RLIMIT_SIGPENDING = 0xb
12781537 RLIMIT_STACK = 0x3
1279 RLIM_INFINITY = -0x1
1538 RLIM_INFINITY = 0xffffffffffffffff
12801539 RTAX_ADVMSS = 0x8
12811540 RTAX_CC_ALGO = 0x10
12821541 RTAX_CWND = 0x7
1542 RTAX_FASTOPEN_NO_COOKIE = 0x11
12831543 RTAX_FEATURES = 0xc
12841544 RTAX_FEATURE_ALLFRAG = 0x8
12851545 RTAX_FEATURE_ECN = 0x1
12901550 RTAX_INITCWND = 0xb
12911551 RTAX_INITRWND = 0xe
12921552 RTAX_LOCK = 0x1
1293 RTAX_MAX = 0x10
1553 RTAX_MAX = 0x11
12941554 RTAX_MTU = 0x2
12951555 RTAX_QUICKACK = 0xf
12961556 RTAX_REORDERING = 0x9
13011561 RTAX_UNSPEC = 0x0
13021562 RTAX_WINDOW = 0x3
13031563 RTA_ALIGNTO = 0x4
1304 RTA_MAX = 0x1a
1564 RTA_MAX = 0x1d
13051565 RTCF_DIRECTSRC = 0x4000000
13061566 RTCF_DOREDIRECT = 0x1000000
13071567 RTCF_LOG = 0x2000000
13081568 RTCF_MASQ = 0x400000
13091569 RTCF_NAT = 0x800000
13101570 RTCF_VALVE = 0x200000
1571 RTC_AF = 0x20
1572 RTC_AIE_OFF = 0x7002
1573 RTC_AIE_ON = 0x7001
1574 RTC_ALM_READ = 0x80247008
1575 RTC_ALM_SET = 0x40247007
1576 RTC_EPOCH_READ = 0x8004700d
1577 RTC_EPOCH_SET = 0x4004700e
1578 RTC_IRQF = 0x80
1579 RTC_IRQP_READ = 0x8004700b
1580 RTC_IRQP_SET = 0x4004700c
1581 RTC_MAX_FREQ = 0x2000
1582 RTC_PF = 0x40
1583 RTC_PIE_OFF = 0x7006
1584 RTC_PIE_ON = 0x7005
1585 RTC_PLL_GET = 0x801c7011
1586 RTC_PLL_SET = 0x401c7012
1587 RTC_RD_TIME = 0x80247009
1588 RTC_SET_TIME = 0x4024700a
1589 RTC_UF = 0x10
1590 RTC_UIE_OFF = 0x7004
1591 RTC_UIE_ON = 0x7003
1592 RTC_VL_CLR = 0x7014
1593 RTC_VL_READ = 0x80047013
1594 RTC_WIE_OFF = 0x7010
1595 RTC_WIE_ON = 0x700f
1596 RTC_WKALM_RD = 0x80287010
1597 RTC_WKALM_SET = 0x4028700f
13111598 RTF_ADDRCLASSMASK = 0xf8000000
13121599 RTF_ADDRCONF = 0x40000
13131600 RTF_ALLONLINK = 0x20000
13421629 RTM_DELACTION = 0x31
13431630 RTM_DELADDR = 0x15
13441631 RTM_DELADDRLABEL = 0x49
1632 RTM_DELCHAIN = 0x65
13451633 RTM_DELLINK = 0x11
13461634 RTM_DELMDB = 0x55
13471635 RTM_DELNEIGH = 0x1d
13621650 RTM_GETADDR = 0x16
13631651 RTM_GETADDRLABEL = 0x4a
13641652 RTM_GETANYCAST = 0x3e
1653 RTM_GETCHAIN = 0x66
13651654 RTM_GETDCB = 0x4e
13661655 RTM_GETLINK = 0x12
13671656 RTM_GETMDB = 0x56
13761665 RTM_GETSTATS = 0x5e
13771666 RTM_GETTCLASS = 0x2a
13781667 RTM_GETTFILTER = 0x2e
1379 RTM_MAX = 0x63
1668 RTM_MAX = 0x67
13801669 RTM_NEWACTION = 0x30
13811670 RTM_NEWADDR = 0x14
13821671 RTM_NEWADDRLABEL = 0x48
13831672 RTM_NEWCACHEREPORT = 0x60
1673 RTM_NEWCHAIN = 0x64
13841674 RTM_NEWLINK = 0x10
13851675 RTM_NEWMDB = 0x54
13861676 RTM_NEWNDUSEROPT = 0x44
13951685 RTM_NEWSTATS = 0x5c
13961686 RTM_NEWTCLASS = 0x28
13971687 RTM_NEWTFILTER = 0x2c
1398 RTM_NR_FAMILIES = 0x15
1399 RTM_NR_MSGTYPES = 0x54
1688 RTM_NR_FAMILIES = 0x16
1689 RTM_NR_MSGTYPES = 0x58
14001690 RTM_SETDCB = 0x4f
14011691 RTM_SETLINK = 0x13
14021692 RTM_SETNEIGHTBL = 0x43
14101700 RTNH_F_UNRESOLVED = 0x20
14111701 RTN_MAX = 0xb
14121702 RTPROT_BABEL = 0x2a
1703 RTPROT_BGP = 0xba
14131704 RTPROT_BIRD = 0xc
14141705 RTPROT_BOOT = 0x3
14151706 RTPROT_DHCP = 0x10
14161707 RTPROT_DNROUTED = 0xd
1708 RTPROT_EIGRP = 0xc0
14171709 RTPROT_GATED = 0x8
1710 RTPROT_ISIS = 0xbb
14181711 RTPROT_KERNEL = 0x2
14191712 RTPROT_MROUTED = 0x11
14201713 RTPROT_MRT = 0xa
14211714 RTPROT_NTK = 0xf
1715 RTPROT_OSPF = 0xbc
14221716 RTPROT_RA = 0x9
14231717 RTPROT_REDIRECT = 0x1
1718 RTPROT_RIP = 0xbd
14241719 RTPROT_STATIC = 0x4
14251720 RTPROT_UNSPEC = 0x0
14261721 RTPROT_XORP = 0xe
14401735 SCM_TIMESTAMPING_OPT_STATS = 0x36
14411736 SCM_TIMESTAMPING_PKTINFO = 0x3a
14421737 SCM_TIMESTAMPNS = 0x23
1738 SCM_TXTIME = 0x3d
14431739 SCM_WIFI_STATUS = 0x29
1740 SC_LOG_FLUSH = 0x100000
14441741 SECCOMP_MODE_DISABLED = 0x0
14451742 SECCOMP_MODE_FILTER = 0x2
14461743 SECCOMP_MODE_STRICT = 0x1
1744 SECURITYFS_MAGIC = 0x73636673
1745 SELINUX_MAGIC = 0xf97cff8c
1746 SFD_CLOEXEC = 0x80000
1747 SFD_NONBLOCK = 0x800
14471748 SHUT_RD = 0x0
14481749 SHUT_RDWR = 0x2
14491750 SHUT_WR = 0x1
14941795 SIOCGMIIPHY = 0x8947
14951796 SIOCGMIIREG = 0x8948
14961797 SIOCGPGRP = 0x8904
1798 SIOCGPPPCSTATS = 0x89f2
1799 SIOCGPPPSTATS = 0x89f0
1800 SIOCGPPPVER = 0x89f1
14971801 SIOCGRARP = 0x8961
14981802 SIOCGSKNS = 0x894c
14991803 SIOCGSTAMP = 0x8906
15281832 SIOCSPGRP = 0x8902
15291833 SIOCSRARP = 0x8962
15301834 SIOCWANDEV = 0x894a
1835 SMACK_MAGIC = 0x43415d53
1836 SMART_AUTOSAVE = 0xd2
1837 SMART_AUTO_OFFLINE = 0xdb
1838 SMART_DISABLE = 0xd9
1839 SMART_ENABLE = 0xd8
1840 SMART_HCYL_PASS = 0xc2
1841 SMART_IMMEDIATE_OFFLINE = 0xd4
1842 SMART_LCYL_PASS = 0x4f
1843 SMART_READ_LOG_SECTOR = 0xd5
1844 SMART_READ_THRESHOLDS = 0xd1
1845 SMART_READ_VALUES = 0xd0
1846 SMART_SAVE = 0xd3
1847 SMART_STATUS = 0xda
1848 SMART_WRITE_LOG_SECTOR = 0xd6
1849 SMART_WRITE_THRESHOLDS = 0xd7
1850 SMB_SUPER_MAGIC = 0x517b
1851 SOCKFS_MAGIC = 0x534f434b
15311852 SOCK_CLOEXEC = 0x80000
15321853 SOCK_DCCP = 0x6
15331854 SOCK_DGRAM = 0x2
15641885 SOL_SOCKET = 0x1
15651886 SOL_TCP = 0x6
15661887 SOL_TIPC = 0x10f
1888 SOL_TLS = 0x11a
15671889 SOL_X25 = 0x106
1890 SOL_XDP = 0x11b
15681891 SOMAXCONN = 0x80
15691892 SO_ACCEPTCONN = 0x1e
15701893 SO_ATTACH_BPF = 0x32
16231946 SO_TIMESTAMP = 0x1d
16241947 SO_TIMESTAMPING = 0x25
16251948 SO_TIMESTAMPNS = 0x23
1949 SO_TXTIME = 0x3d
16261950 SO_TYPE = 0x3
16271951 SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
16281952 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
16321956 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
16331957 SO_VM_SOCKETS_TRUSTED = 0x5
16341958 SO_WIFI_STATUS = 0x29
1959 SO_ZEROCOPY = 0x3c
16351960 SPLICE_F_GIFT = 0x8
16361961 SPLICE_F_MORE = 0x4
16371962 SPLICE_F_MOVE = 0x1
16381963 SPLICE_F_NONBLOCK = 0x2
1964 SQUASHFS_MAGIC = 0x73717368
1965 STACK_END_MAGIC = 0x57ac6e9d
1966 STATX_ALL = 0xfff
1967 STATX_ATIME = 0x20
1968 STATX_ATTR_APPEND = 0x20
1969 STATX_ATTR_AUTOMOUNT = 0x1000
1970 STATX_ATTR_COMPRESSED = 0x4
1971 STATX_ATTR_ENCRYPTED = 0x800
1972 STATX_ATTR_IMMUTABLE = 0x10
1973 STATX_ATTR_NODUMP = 0x40
1974 STATX_BASIC_STATS = 0x7ff
1975 STATX_BLOCKS = 0x400
1976 STATX_BTIME = 0x800
1977 STATX_CTIME = 0x80
1978 STATX_GID = 0x10
1979 STATX_INO = 0x100
1980 STATX_MODE = 0x2
1981 STATX_MTIME = 0x40
1982 STATX_NLINK = 0x4
1983 STATX_SIZE = 0x200
1984 STATX_TYPE = 0x1
1985 STATX_UID = 0x8
1986 STATX__RESERVED = 0x80000000
1987 SYNC_FILE_RANGE_WAIT_AFTER = 0x4
1988 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
1989 SYNC_FILE_RANGE_WRITE = 0x2
1990 SYSFS_MAGIC = 0x62656572
16391991 S_BLKSIZE = 0x200
16401992 S_IEXEC = 0x40
16411993 S_IFBLK = 0x6000
16732025 TASKSTATS_GENL_NAME = "TASKSTATS"
16742026 TASKSTATS_GENL_VERSION = 0x1
16752027 TASKSTATS_TYPE_MAX = 0x6
1676 TASKSTATS_VERSION = 0x8
2028 TASKSTATS_VERSION = 0x9
16772029 TCFLSH = 0x540b
16782030 TCGETA = 0x5405
16792031 TCGETS = 0x5401
16982050 TCP_DEFER_ACCEPT = 0x9
16992051 TCP_FASTOPEN = 0x17
17002052 TCP_FASTOPEN_CONNECT = 0x1e
2053 TCP_FASTOPEN_KEY = 0x21
2054 TCP_FASTOPEN_NO_COOKIE = 0x22
17012055 TCP_INFO = 0xb
17022056 TCP_KEEPCNT = 0x6
17032057 TCP_KEEPIDLE = 0x4
17072061 TCP_MAXWIN = 0xffff
17082062 TCP_MAX_WINSHIFT = 0xe
17092063 TCP_MD5SIG = 0xe
2064 TCP_MD5SIG_EXT = 0x20
2065 TCP_MD5SIG_FLAG_PREFIX = 0x1
17102066 TCP_MD5SIG_MAXKEYLEN = 0x50
17112067 TCP_MSS = 0x200
17122068 TCP_MSS_DEFAULT = 0x218
17272083 TCP_THIN_DUPACK = 0x11
17282084 TCP_THIN_LINEAR_TIMEOUTS = 0x10
17292085 TCP_TIMESTAMP = 0x18
2086 TCP_ULP = 0x1f
17302087 TCP_USER_TIMEOUT = 0x12
17312088 TCP_WINDOW_CLAMP = 0xa
17322089 TCSAFLUSH = 0x2
17452102 TCSETXF = 0x5434
17462103 TCSETXW = 0x5435
17472104 TCXONC = 0x540a
2105 TIMER_ABSTIME = 0x1
17482106 TIOCCBRK = 0x5428
17492107 TIOCCONS = 0x541d
17502108 TIOCEXCL = 0x540c
17522110 TIOCGETD = 0x5424
17532111 TIOCGEXCL = 0x80045440
17542112 TIOCGICOUNT = 0x545d
2113 TIOCGISO7816 = 0x80285442
17552114 TIOCGLCKTRMIOS = 0x5456
17562115 TIOCGPGRP = 0x540f
17572116 TIOCGPKT = 0x80045438
18052164 TIOCSER_TEMT = 0x1
18062165 TIOCSETD = 0x5423
18072166 TIOCSIG = 0x40045436
2167 TIOCSISO7816 = 0xc0285443
18082168 TIOCSLCKTRMIOS = 0x5457
18092169 TIOCSPGRP = 0x5410
18102170 TIOCSPTLCK = 0x40045431
18142174 TIOCSTI = 0x5412
18152175 TIOCSWINSZ = 0x5414
18162176 TIOCVHANGUP = 0x5437
2177 TMPFS_MAGIC = 0x1021994
18172178 TOSTOP = 0x100
2179 TPACKET_ALIGNMENT = 0x10
2180 TPACKET_HDRLEN = 0x34
2181 TP_STATUS_AVAILABLE = 0x0
2182 TP_STATUS_BLK_TMO = 0x20
2183 TP_STATUS_COPY = 0x2
2184 TP_STATUS_CSUMNOTREADY = 0x8
2185 TP_STATUS_CSUM_VALID = 0x80
2186 TP_STATUS_KERNEL = 0x0
2187 TP_STATUS_LOSING = 0x4
2188 TP_STATUS_SENDING = 0x2
2189 TP_STATUS_SEND_REQUEST = 0x1
2190 TP_STATUS_TS_RAW_HARDWARE = -0x80000000
2191 TP_STATUS_TS_SOFTWARE = 0x20000000
2192 TP_STATUS_TS_SYS_HARDWARE = 0x40000000
2193 TP_STATUS_USER = 0x1
2194 TP_STATUS_VLAN_TPID_VALID = 0x40
2195 TP_STATUS_VLAN_VALID = 0x10
2196 TP_STATUS_WRONG_FORMAT = 0x4
2197 TRACEFS_MAGIC = 0x74726163
18182198 TS_COMM_LEN = 0x20
18192199 TUNATTACHFILTER = 0x400854d5
18202200 TUNDETACHFILTER = 0x400854d6
18262206 TUNGETVNETHDRSZ = 0x800454d7
18272207 TUNGETVNETLE = 0x800454dd
18282208 TUNSETDEBUG = 0x400454c9
2209 TUNSETFILTEREBPF = 0x800454e1
18292210 TUNSETGROUP = 0x400454ce
18302211 TUNSETIFF = 0x400454ca
18312212 TUNSETIFINDEX = 0x400454da
18362217 TUNSETPERSIST = 0x400454cb
18372218 TUNSETQUEUE = 0x400454d9
18382219 TUNSETSNDBUF = 0x400454d4
2220 TUNSETSTEERINGEBPF = 0x800454e0
18392221 TUNSETTXFILTER = 0x400454d1
18402222 TUNSETVNETBE = 0x400454de
18412223 TUNSETVNETHDRSZ = 0x400454d8
18422224 TUNSETVNETLE = 0x400454dc
2225 UBI_IOCATT = 0x40186f40
2226 UBI_IOCDET = 0x40046f41
2227 UBI_IOCEBCH = 0x40044f02
2228 UBI_IOCEBER = 0x40044f01
2229 UBI_IOCEBISMAP = 0x80044f05
2230 UBI_IOCEBMAP = 0x40084f03
2231 UBI_IOCEBUNMAP = 0x40044f04
2232 UBI_IOCMKVOL = 0x40986f00
2233 UBI_IOCRMVOL = 0x40046f01
2234 UBI_IOCRNVOL = 0x51106f03
2235 UBI_IOCRSVOL = 0x400c6f02
2236 UBI_IOCSETVOLPROP = 0x40104f06
2237 UBI_IOCVOLCRBLK = 0x40804f07
2238 UBI_IOCVOLRMBLK = 0x4f08
2239 UBI_IOCVOLUP = 0x40084f00
2240 UDF_SUPER_MAGIC = 0x15013346
18432241 UMOUNT_NOFOLLOW = 0x8
2242 USBDEVICE_SUPER_MAGIC = 0x9fa2
2243 UTIME_NOW = 0x3fffffff
2244 UTIME_OMIT = 0x3ffffffe
2245 V9FS_MAGIC = 0x1021997
18442246 VDISCARD = 0xd
18452247 VEOF = 0x4
18462248 VEOL = 0xb
18702272 WALL = 0x40000000
18712273 WCLONE = 0x80000000
18722274 WCONTINUED = 0x8
2275 WDIOC_GETBOOTSTATUS = 0x80045702
2276 WDIOC_GETPRETIMEOUT = 0x80045709
2277 WDIOC_GETSTATUS = 0x80045701
2278 WDIOC_GETSUPPORT = 0x80285700
2279 WDIOC_GETTEMP = 0x80045703
2280 WDIOC_GETTIMELEFT = 0x8004570a
2281 WDIOC_GETTIMEOUT = 0x80045707
2282 WDIOC_KEEPALIVE = 0x80045705
2283 WDIOC_SETOPTIONS = 0x80045704
2284 WDIOC_SETPRETIMEOUT = 0xc0045708
2285 WDIOC_SETTIMEOUT = 0xc0045706
18732286 WEXITED = 0x4
2287 WIN_ACKMEDIACHANGE = 0xdb
2288 WIN_CHECKPOWERMODE1 = 0xe5
2289 WIN_CHECKPOWERMODE2 = 0x98
2290 WIN_DEVICE_RESET = 0x8
2291 WIN_DIAGNOSE = 0x90
2292 WIN_DOORLOCK = 0xde
2293 WIN_DOORUNLOCK = 0xdf
2294 WIN_DOWNLOAD_MICROCODE = 0x92
2295 WIN_FLUSH_CACHE = 0xe7
2296 WIN_FLUSH_CACHE_EXT = 0xea
2297 WIN_FORMAT = 0x50
2298 WIN_GETMEDIASTATUS = 0xda
2299 WIN_IDENTIFY = 0xec
2300 WIN_IDENTIFY_DMA = 0xee
2301 WIN_IDLEIMMEDIATE = 0xe1
2302 WIN_INIT = 0x60
2303 WIN_MEDIAEJECT = 0xed
2304 WIN_MULTREAD = 0xc4
2305 WIN_MULTREAD_EXT = 0x29
2306 WIN_MULTWRITE = 0xc5
2307 WIN_MULTWRITE_EXT = 0x39
2308 WIN_NOP = 0x0
2309 WIN_PACKETCMD = 0xa0
2310 WIN_PIDENTIFY = 0xa1
2311 WIN_POSTBOOT = 0xdc
2312 WIN_PREBOOT = 0xdd
2313 WIN_QUEUED_SERVICE = 0xa2
2314 WIN_READ = 0x20
2315 WIN_READDMA = 0xc8
2316 WIN_READDMA_EXT = 0x25
2317 WIN_READDMA_ONCE = 0xc9
2318 WIN_READDMA_QUEUED = 0xc7
2319 WIN_READDMA_QUEUED_EXT = 0x26
2320 WIN_READ_BUFFER = 0xe4
2321 WIN_READ_EXT = 0x24
2322 WIN_READ_LONG = 0x22
2323 WIN_READ_LONG_ONCE = 0x23
2324 WIN_READ_NATIVE_MAX = 0xf8
2325 WIN_READ_NATIVE_MAX_EXT = 0x27
2326 WIN_READ_ONCE = 0x21
2327 WIN_RECAL = 0x10
2328 WIN_RESTORE = 0x10
2329 WIN_SECURITY_DISABLE = 0xf6
2330 WIN_SECURITY_ERASE_PREPARE = 0xf3
2331 WIN_SECURITY_ERASE_UNIT = 0xf4
2332 WIN_SECURITY_FREEZE_LOCK = 0xf5
2333 WIN_SECURITY_SET_PASS = 0xf1
2334 WIN_SECURITY_UNLOCK = 0xf2
2335 WIN_SEEK = 0x70
2336 WIN_SETFEATURES = 0xef
2337 WIN_SETIDLE1 = 0xe3
2338 WIN_SETIDLE2 = 0x97
2339 WIN_SETMULT = 0xc6
2340 WIN_SET_MAX = 0xf9
2341 WIN_SET_MAX_EXT = 0x37
2342 WIN_SLEEPNOW1 = 0xe6
2343 WIN_SLEEPNOW2 = 0x99
2344 WIN_SMART = 0xb0
2345 WIN_SPECIFY = 0x91
2346 WIN_SRST = 0x8
2347 WIN_STANDBY = 0xe2
2348 WIN_STANDBY2 = 0x96
2349 WIN_STANDBYNOW1 = 0xe0
2350 WIN_STANDBYNOW2 = 0x94
2351 WIN_VERIFY = 0x40
2352 WIN_VERIFY_EXT = 0x42
2353 WIN_VERIFY_ONCE = 0x41
2354 WIN_WRITE = 0x30
2355 WIN_WRITEDMA = 0xca
2356 WIN_WRITEDMA_EXT = 0x35
2357 WIN_WRITEDMA_ONCE = 0xcb
2358 WIN_WRITEDMA_QUEUED = 0xcc
2359 WIN_WRITEDMA_QUEUED_EXT = 0x36
2360 WIN_WRITE_BUFFER = 0xe8
2361 WIN_WRITE_EXT = 0x34
2362 WIN_WRITE_LONG = 0x32
2363 WIN_WRITE_LONG_ONCE = 0x33
2364 WIN_WRITE_ONCE = 0x31
2365 WIN_WRITE_SAME = 0xe9
2366 WIN_WRITE_VERIFY = 0x3c
18742367 WNOHANG = 0x1
18752368 WNOTHREAD = 0x20000000
18762369 WNOWAIT = 0x1000000
18772370 WORDSIZE = 0x20
18782371 WSTOPPED = 0x2
18792372 WUNTRACED = 0x2
2373 X86_FXSR_MAGIC = 0x0
18802374 XATTR_CREATE = 0x1
18812375 XATTR_REPLACE = 0x2
18822376 XCASE = 0x4
2377 XDP_COPY = 0x2
2378 XDP_FLAGS_DRV_MODE = 0x4
2379 XDP_FLAGS_HW_MODE = 0x8
2380 XDP_FLAGS_MASK = 0xf
2381 XDP_FLAGS_MODES = 0xe
2382 XDP_FLAGS_SKB_MODE = 0x2
2383 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
2384 XDP_MMAP_OFFSETS = 0x1
2385 XDP_PGOFF_RX_RING = 0x0
2386 XDP_PGOFF_TX_RING = 0x80000000
2387 XDP_RX_RING = 0x2
2388 XDP_SHARED_UMEM = 0x1
2389 XDP_STATISTICS = 0x7
2390 XDP_TX_RING = 0x3
2391 XDP_UMEM_COMPLETION_RING = 0x6
2392 XDP_UMEM_FILL_RING = 0x5
2393 XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
2394 XDP_UMEM_PGOFF_FILL_RING = 0x100000000
2395 XDP_UMEM_REG = 0x4
2396 XDP_ZEROCOPY = 0x4
2397 XENFS_SUPER_MAGIC = 0xabba1974
2398 XFS_SUPER_MAGIC = 0x58465342
18832399 XTABS = 0x1800
2400 ZSMALLOC_MAGIC = 0x58295829
18842401 )
18852402
18862403 // Errors
20602577 )
20612578
20622579 // Error table
2063 var errors = [...]string{
2064 1: "operation not permitted",
2065 2: "no such file or directory",
2066 3: "no such process",
2067 4: "interrupted system call",
2068 5: "input/output error",
2069 6: "no such device or address",
2070 7: "argument list too long",
2071 8: "exec format error",
2072 9: "bad file descriptor",
2073 10: "no child processes",
2074 11: "resource temporarily unavailable",
2075 12: "cannot allocate memory",
2076 13: "permission denied",
2077 14: "bad address",
2078 15: "block device required",
2079 16: "device or resource busy",
2080 17: "file exists",
2081 18: "invalid cross-device link",
2082 19: "no such device",
2083 20: "not a directory",
2084 21: "is a directory",
2085 22: "invalid argument",
2086 23: "too many open files in system",
2087 24: "too many open files",
2088 25: "inappropriate ioctl for device",
2089 26: "text file busy",
2090 27: "file too large",
2091 28: "no space left on device",
2092 29: "illegal seek",
2093 30: "read-only file system",
2094 31: "too many links",
2095 32: "broken pipe",
2096 33: "numerical argument out of domain",
2097 34: "numerical result out of range",
2098 35: "resource deadlock avoided",
2099 36: "file name too long",
2100 37: "no locks available",
2101 38: "function not implemented",
2102 39: "directory not empty",
2103 40: "too many levels of symbolic links",
2104 42: "no message of desired type",
2105 43: "identifier removed",
2106 44: "channel number out of range",
2107 45: "level 2 not synchronized",
2108 46: "level 3 halted",
2109 47: "level 3 reset",
2110 48: "link number out of range",
2111 49: "protocol driver not attached",
2112 50: "no CSI structure available",
2113 51: "level 2 halted",
2114 52: "invalid exchange",
2115 53: "invalid request descriptor",
2116 54: "exchange full",
2117 55: "no anode",
2118 56: "invalid request code",
2119 57: "invalid slot",
2120 59: "bad font file format",
2121 60: "device not a stream",
2122 61: "no data available",
2123 62: "timer expired",
2124 63: "out of streams resources",
2125 64: "machine is not on the network",
2126 65: "package not installed",
2127 66: "object is remote",
2128 67: "link has been severed",
2129 68: "advertise error",
2130 69: "srmount error",
2131 70: "communication error on send",
2132 71: "protocol error",
2133 72: "multihop attempted",
2134 73: "RFS specific error",
2135 74: "bad message",
2136 75: "value too large for defined data type",
2137 76: "name not unique on network",
2138 77: "file descriptor in bad state",
2139 78: "remote address changed",
2140 79: "can not access a needed shared library",
2141 80: "accessing a corrupted shared library",
2142 81: ".lib section in a.out corrupted",
2143 82: "attempting to link in too many shared libraries",
2144 83: "cannot exec a shared library directly",
2145 84: "invalid or incomplete multibyte or wide character",
2146 85: "interrupted system call should be restarted",
2147 86: "streams pipe error",
2148 87: "too many users",
2149 88: "socket operation on non-socket",
2150 89: "destination address required",
2151 90: "message too long",
2152 91: "protocol wrong type for socket",
2153 92: "protocol not available",
2154 93: "protocol not supported",
2155 94: "socket type not supported",
2156 95: "operation not supported",
2157 96: "protocol family not supported",
2158 97: "address family not supported by protocol",
2159 98: "address already in use",
2160 99: "cannot assign requested address",
2161 100: "network is down",
2162 101: "network is unreachable",
2163 102: "network dropped connection on reset",
2164 103: "software caused connection abort",
2165 104: "connection reset by peer",
2166 105: "no buffer space available",
2167 106: "transport endpoint is already connected",
2168 107: "transport endpoint is not connected",
2169 108: "cannot send after transport endpoint shutdown",
2170 109: "too many references: cannot splice",
2171 110: "connection timed out",
2172 111: "connection refused",
2173 112: "host is down",
2174 113: "no route to host",
2175 114: "operation already in progress",
2176 115: "operation now in progress",
2177 116: "stale file handle",
2178 117: "structure needs cleaning",
2179 118: "not a XENIX named type file",
2180 119: "no XENIX semaphores available",
2181 120: "is a named type file",
2182 121: "remote I/O error",
2183 122: "disk quota exceeded",
2184 123: "no medium found",
2185 124: "wrong medium type",
2186 125: "operation canceled",
2187 126: "required key not available",
2188 127: "key has expired",
2189 128: "key has been revoked",
2190 129: "key was rejected by service",
2191 130: "owner died",
2192 131: "state not recoverable",
2193 132: "operation not possible due to RF-kill",
2194 133: "memory page has hardware error",
2580 var errorList = [...]struct {
2581 num syscall.Errno
2582 name string
2583 desc string
2584 }{
2585 {1, "EPERM", "operation not permitted"},
2586 {2, "ENOENT", "no such file or directory"},
2587 {3, "ESRCH", "no such process"},
2588 {4, "EINTR", "interrupted system call"},
2589 {5, "EIO", "input/output error"},
2590 {6, "ENXIO", "no such device or address"},
2591 {7, "E2BIG", "argument list too long"},
2592 {8, "ENOEXEC", "exec format error"},
2593 {9, "EBADF", "bad file descriptor"},
2594 {10, "ECHILD", "no child processes"},
2595 {11, "EAGAIN", "resource temporarily unavailable"},
2596 {12, "ENOMEM", "cannot allocate memory"},
2597 {13, "EACCES", "permission denied"},
2598 {14, "EFAULT", "bad address"},
2599 {15, "ENOTBLK", "block device required"},
2600 {16, "EBUSY", "device or resource busy"},
2601 {17, "EEXIST", "file exists"},
2602 {18, "EXDEV", "invalid cross-device link"},
2603 {19, "ENODEV", "no such device"},
2604 {20, "ENOTDIR", "not a directory"},
2605 {21, "EISDIR", "is a directory"},
2606 {22, "EINVAL", "invalid argument"},
2607 {23, "ENFILE", "too many open files in system"},
2608 {24, "EMFILE", "too many open files"},
2609 {25, "ENOTTY", "inappropriate ioctl for device"},
2610 {26, "ETXTBSY", "text file busy"},
2611 {27, "EFBIG", "file too large"},
2612 {28, "ENOSPC", "no space left on device"},
2613 {29, "ESPIPE", "illegal seek"},
2614 {30, "EROFS", "read-only file system"},
2615 {31, "EMLINK", "too many links"},
2616 {32, "EPIPE", "broken pipe"},
2617 {33, "EDOM", "numerical argument out of domain"},
2618 {34, "ERANGE", "numerical result out of range"},
2619 {35, "EDEADLK", "resource deadlock avoided"},
2620 {36, "ENAMETOOLONG", "file name too long"},
2621 {37, "ENOLCK", "no locks available"},
2622 {38, "ENOSYS", "function not implemented"},
2623 {39, "ENOTEMPTY", "directory not empty"},
2624 {40, "ELOOP", "too many levels of symbolic links"},
2625 {42, "ENOMSG", "no message of desired type"},
2626 {43, "EIDRM", "identifier removed"},
2627 {44, "ECHRNG", "channel number out of range"},
2628 {45, "EL2NSYNC", "level 2 not synchronized"},
2629 {46, "EL3HLT", "level 3 halted"},
2630 {47, "EL3RST", "level 3 reset"},
2631 {48, "ELNRNG", "link number out of range"},
2632 {49, "EUNATCH", "protocol driver not attached"},
2633 {50, "ENOCSI", "no CSI structure available"},
2634 {51, "EL2HLT", "level 2 halted"},
2635 {52, "EBADE", "invalid exchange"},
2636 {53, "EBADR", "invalid request descriptor"},
2637 {54, "EXFULL", "exchange full"},
2638 {55, "ENOANO", "no anode"},
2639 {56, "EBADRQC", "invalid request code"},
2640 {57, "EBADSLT", "invalid slot"},
2641 {59, "EBFONT", "bad font file format"},
2642 {60, "ENOSTR", "device not a stream"},
2643 {61, "ENODATA", "no data available"},
2644 {62, "ETIME", "timer expired"},
2645 {63, "ENOSR", "out of streams resources"},
2646 {64, "ENONET", "machine is not on the network"},
2647 {65, "ENOPKG", "package not installed"},
2648 {66, "EREMOTE", "object is remote"},
2649 {67, "ENOLINK", "link has been severed"},
2650 {68, "EADV", "advertise error"},
2651 {69, "ESRMNT", "srmount error"},
2652 {70, "ECOMM", "communication error on send"},
2653 {71, "EPROTO", "protocol error"},
2654 {72, "EMULTIHOP", "multihop attempted"},
2655 {73, "EDOTDOT", "RFS specific error"},
2656 {74, "EBADMSG", "bad message"},
2657 {75, "EOVERFLOW", "value too large for defined data type"},
2658 {76, "ENOTUNIQ", "name not unique on network"},
2659 {77, "EBADFD", "file descriptor in bad state"},
2660 {78, "EREMCHG", "remote address changed"},
2661 {79, "ELIBACC", "can not access a needed shared library"},
2662 {80, "ELIBBAD", "accessing a corrupted shared library"},
2663 {81, "ELIBSCN", ".lib section in a.out corrupted"},
2664 {82, "ELIBMAX", "attempting to link in too many shared libraries"},
2665 {83, "ELIBEXEC", "cannot exec a shared library directly"},
2666 {84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
2667 {85, "ERESTART", "interrupted system call should be restarted"},
2668 {86, "ESTRPIPE", "streams pipe error"},
2669 {87, "EUSERS", "too many users"},
2670 {88, "ENOTSOCK", "socket operation on non-socket"},
2671 {89, "EDESTADDRREQ", "destination address required"},
2672 {90, "EMSGSIZE", "message too long"},
2673 {91, "EPROTOTYPE", "protocol wrong type for socket"},
2674 {92, "ENOPROTOOPT", "protocol not available"},
2675 {93, "EPROTONOSUPPORT", "protocol not supported"},
2676 {94, "ESOCKTNOSUPPORT", "socket type not supported"},
2677 {95, "ENOTSUP", "operation not supported"},
2678 {96, "EPFNOSUPPORT", "protocol family not supported"},
2679 {97, "EAFNOSUPPORT", "address family not supported by protocol"},
2680 {98, "EADDRINUSE", "address already in use"},
2681 {99, "EADDRNOTAVAIL", "cannot assign requested address"},
2682 {100, "ENETDOWN", "network is down"},
2683 {101, "ENETUNREACH", "network is unreachable"},
2684 {102, "ENETRESET", "network dropped connection on reset"},
2685 {103, "ECONNABORTED", "software caused connection abort"},
2686 {104, "ECONNRESET", "connection reset by peer"},
2687 {105, "ENOBUFS", "no buffer space available"},
2688 {106, "EISCONN", "transport endpoint is already connected"},
2689 {107, "ENOTCONN", "transport endpoint is not connected"},
2690 {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
2691 {109, "ETOOMANYREFS", "too many references: cannot splice"},
2692 {110, "ETIMEDOUT", "connection timed out"},
2693 {111, "ECONNREFUSED", "connection refused"},
2694 {112, "EHOSTDOWN", "host is down"},
2695 {113, "EHOSTUNREACH", "no route to host"},
2696 {114, "EALREADY", "operation already in progress"},
2697 {115, "EINPROGRESS", "operation now in progress"},
2698 {116, "ESTALE", "stale file handle"},
2699 {117, "EUCLEAN", "structure needs cleaning"},
2700 {118, "ENOTNAM", "not a XENIX named type file"},
2701 {119, "ENAVAIL", "no XENIX semaphores available"},
2702 {120, "EISNAM", "is a named type file"},
2703 {121, "EREMOTEIO", "remote I/O error"},
2704 {122, "EDQUOT", "disk quota exceeded"},
2705 {123, "ENOMEDIUM", "no medium found"},
2706 {124, "EMEDIUMTYPE", "wrong medium type"},
2707 {125, "ECANCELED", "operation canceled"},
2708 {126, "ENOKEY", "required key not available"},
2709 {127, "EKEYEXPIRED", "key has expired"},
2710 {128, "EKEYREVOKED", "key has been revoked"},
2711 {129, "EKEYREJECTED", "key was rejected by service"},
2712 {130, "EOWNERDEAD", "owner died"},
2713 {131, "ENOTRECOVERABLE", "state not recoverable"},
2714 {132, "ERFKILL", "operation not possible due to RF-kill"},
2715 {133, "EHWPOISON", "memory page has hardware error"},
21952716 }
21962717
21972718 // Signal table
2198 var signals = [...]string{
2199 1: "hangup",
2200 2: "interrupt",
2201 3: "quit",
2202 4: "illegal instruction",
2203 5: "trace/breakpoint trap",
2204 6: "aborted",
2205 7: "bus error",
2206 8: "floating point exception",
2207 9: "killed",
2208 10: "user defined signal 1",
2209 11: "segmentation fault",
2210 12: "user defined signal 2",
2211 13: "broken pipe",
2212 14: "alarm clock",
2213 15: "terminated",
2214 16: "stack fault",
2215 17: "child exited",
2216 18: "continued",
2217 19: "stopped (signal)",
2218 20: "stopped",
2219 21: "stopped (tty input)",
2220 22: "stopped (tty output)",
2221 23: "urgent I/O condition",
2222 24: "CPU time limit exceeded",
2223 25: "file size limit exceeded",
2224 26: "virtual timer expired",
2225 27: "profiling timer expired",
2226 28: "window changed",
2227 29: "I/O possible",
2228 30: "power failure",
2229 31: "bad system call",
2719 var signalList = [...]struct {
2720 num syscall.Signal
2721 name string
2722 desc string
2723 }{
2724 {1, "SIGHUP", "hangup"},
2725 {2, "SIGINT", "interrupt"},
2726 {3, "SIGQUIT", "quit"},
2727 {4, "SIGILL", "illegal instruction"},
2728 {5, "SIGTRAP", "trace/breakpoint trap"},
2729 {6, "SIGABRT", "aborted"},
2730 {7, "SIGBUS", "bus error"},
2731 {8, "SIGFPE", "floating point exception"},
2732 {9, "SIGKILL", "killed"},
2733 {10, "SIGUSR1", "user defined signal 1"},
2734 {11, "SIGSEGV", "segmentation fault"},
2735 {12, "SIGUSR2", "user defined signal 2"},
2736 {13, "SIGPIPE", "broken pipe"},
2737 {14, "SIGALRM", "alarm clock"},
2738 {15, "SIGTERM", "terminated"},
2739 {16, "SIGSTKFLT", "stack fault"},
2740 {17, "SIGCHLD", "child exited"},
2741 {18, "SIGCONT", "continued"},
2742 {19, "SIGSTOP", "stopped (signal)"},
2743 {20, "SIGTSTP", "stopped"},
2744 {21, "SIGTTIN", "stopped (tty input)"},
2745 {22, "SIGTTOU", "stopped (tty output)"},
2746 {23, "SIGURG", "urgent I/O condition"},
2747 {24, "SIGXCPU", "CPU time limit exceeded"},
2748 {25, "SIGXFSZ", "file size limit exceeded"},
2749 {26, "SIGVTALRM", "virtual timer expired"},
2750 {27, "SIGPROF", "profiling timer expired"},
2751 {28, "SIGWINCH", "window changed"},
2752 {29, "SIGIO", "I/O possible"},
2753 {30, "SIGPWR", "power failure"},
2754 {31, "SIGSYS", "bad system call"},
22302755 }
22
33 // +build amd64,linux
44
5 // Created by cgo -godefs - DO NOT EDIT
5 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
66 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 _const.go
77
88 package unix
1010 import "syscall"
1111
1212 const (
13 AAFS_MAGIC = 0x5a3c69f0
14 ADFS_SUPER_MAGIC = 0xadf5
15 AFFS_SUPER_MAGIC = 0xadff
16 AFS_FS_MAGIC = 0x6b414653
17 AFS_SUPER_MAGIC = 0x5346414f
1318 AF_ALG = 0x26
1419 AF_APPLETALK = 0x5
1520 AF_ASH = 0x12
5863 AF_VSOCK = 0x28
5964 AF_WANPIPE = 0x19
6065 AF_X25 = 0x9
66 AF_XDP = 0x2c
6167 ALG_OP_DECRYPT = 0x0
6268 ALG_OP_ENCRYPT = 0x1
6369 ALG_SET_AEAD_ASSOCLEN = 0x4
6571 ALG_SET_IV = 0x2
6672 ALG_SET_KEY = 0x1
6773 ALG_SET_OP = 0x3
74 ANON_INODE_FS_MAGIC = 0x9041934
6875 ARPHRD_6LOWPAN = 0x339
6976 ARPHRD_ADAPT = 0x108
7077 ARPHRD_APPLETLK = 0x8
120127 ARPHRD_PPP = 0x200
121128 ARPHRD_PRONET = 0x4
122129 ARPHRD_RAWHDLC = 0x206
130 ARPHRD_RAWIP = 0x207
123131 ARPHRD_ROSE = 0x10e
124132 ARPHRD_RSRVD = 0x104
125133 ARPHRD_SIT = 0x308
131139 ARPHRD_VOID = 0xffff
132140 ARPHRD_VSOCKMON = 0x33a
133141 ARPHRD_X25 = 0x10f
142 AUTOFS_SUPER_MAGIC = 0x187
134143 B0 = 0x0
135144 B1000000 = 0x1008
136145 B110 = 0x3
162171 B75 = 0x2
163172 B921600 = 0x1007
164173 B9600 = 0xd
174 BALLOON_KVM_MAGIC = 0x13661366
175 BDEVFS_MAGIC = 0x62646576
176 BINFMTFS_MAGIC = 0x42494e4d
165177 BLKBSZGET = 0x80081270
166178 BLKBSZSET = 0x40081271
167179 BLKFLSBUF = 0x1261
186198 BPF_AND = 0x50
187199 BPF_B = 0x10
188200 BPF_DIV = 0x30
201 BPF_FS_MAGIC = 0xcafe4a11
189202 BPF_H = 0x8
190203 BPF_IMM = 0x0
191204 BPF_IND = 0x40
227240 BS0 = 0x0
228241 BS1 = 0x2000
229242 BSDLY = 0x2000
243 BTRFS_SUPER_MAGIC = 0x9123683e
244 BTRFS_TEST_MAGIC = 0x73727279
230245 CAN_BCM = 0x2
231246 CAN_EFF_FLAG = 0x80000000
232247 CAN_EFF_ID_BITS = 0x1d
250265 CBAUD = 0x100f
251266 CBAUDEX = 0x1000
252267 CFLUSH = 0xf
268 CGROUP2_SUPER_MAGIC = 0x63677270
269 CGROUP_SUPER_MAGIC = 0x27e0eb
253270 CIBAUD = 0x100f0000
254271 CLOCAL = 0x800
255272 CLOCK_BOOTTIME = 0x7
292309 CLONE_VFORK = 0x4000
293310 CLONE_VM = 0x100
294311 CMSPAR = 0x40000000
312 CODA_SUPER_MAGIC = 0x73757245
295313 CR0 = 0x0
296314 CR1 = 0x200
297315 CR2 = 0x400
298316 CR3 = 0x600
317 CRAMFS_MAGIC = 0x28cd3d45
299318 CRDLY = 0x600
300319 CREAD = 0x80
301320 CRTSCTS = 0x80000000
310329 CSTOP = 0x13
311330 CSTOPB = 0x40
312331 CSUSP = 0x1a
332 DAXFS_MAGIC = 0x64646178
333 DEBUGFS_MAGIC = 0x64626720
334 DEVPTS_SUPER_MAGIC = 0x1cd1
313335 DT_BLK = 0x6
314336 DT_CHR = 0x2
315337 DT_DIR = 0x4
326348 ECHOKE = 0x800
327349 ECHONL = 0x40
328350 ECHOPRT = 0x400
351 ECRYPTFS_SUPER_MAGIC = 0xf15f
329352 EFD_CLOEXEC = 0x80000
330353 EFD_NONBLOCK = 0x800
331354 EFD_SEMAPHORE = 0x1
355 EFIVARFS_MAGIC = 0xde5e81e4
356 EFS_SUPER_MAGIC = 0x414a53
332357 ENCODING_DEFAULT = 0x0
333358 ENCODING_FM_MARK = 0x3
334359 ENCODING_FM_SPACE = 0x4
389414 ETH_P_DSA = 0x1b
390415 ETH_P_ECONET = 0x18
391416 ETH_P_EDSA = 0xdada
417 ETH_P_ERSPAN = 0x88be
418 ETH_P_ERSPAN2 = 0x22eb
392419 ETH_P_FCOE = 0x8906
393420 ETH_P_FIP = 0x8914
394421 ETH_P_HDLC = 0x19
397424 ETH_P_IEEE802154 = 0xf6
398425 ETH_P_IEEEPUP = 0xa00
399426 ETH_P_IEEEPUPAT = 0xa01
427 ETH_P_IFE = 0xed3e
400428 ETH_P_IP = 0x800
401429 ETH_P_IPV6 = 0x86dd
402430 ETH_P_IPX = 0x8137
407435 ETH_P_LOOP = 0x60
408436 ETH_P_LOOPBACK = 0x9000
409437 ETH_P_MACSEC = 0x88e5
438 ETH_P_MAP = 0xf9
410439 ETH_P_MOBITEX = 0x15
411440 ETH_P_MPLS_MC = 0x8848
412441 ETH_P_MPLS_UC = 0x8847
413442 ETH_P_MVRP = 0x88f5
414443 ETH_P_NCSI = 0x88f8
444 ETH_P_NSH = 0x894f
415445 ETH_P_PAE = 0x888e
416446 ETH_P_PAUSE = 0x8808
417447 ETH_P_PHONET = 0xf5
419449 ETH_P_PPP_DISC = 0x8863
420450 ETH_P_PPP_MP = 0x8
421451 ETH_P_PPP_SES = 0x8864
452 ETH_P_PREAUTH = 0x88c7
422453 ETH_P_PRP = 0x88fb
423454 ETH_P_PUP = 0x200
424455 ETH_P_PUPAT = 0x201
439470 ETH_P_WCCP = 0x883e
440471 ETH_P_X25 = 0x805
441472 ETH_P_XDSA = 0xf8
473 EXABYTE_ENABLE_NEST = 0xf0
474 EXT2_SUPER_MAGIC = 0xef53
475 EXT3_SUPER_MAGIC = 0xef53
476 EXT4_SUPER_MAGIC = 0xef53
442477 EXTA = 0xe
443478 EXTB = 0xf
444479 EXTPROC = 0x10000
480 F2FS_SUPER_MAGIC = 0xf2f52010
445481 FALLOC_FL_COLLAPSE_RANGE = 0x8
446482 FALLOC_FL_INSERT_RANGE = 0x20
447483 FALLOC_FL_KEEP_SIZE = 0x1
455491 FF1 = 0x8000
456492 FFDLY = 0x8000
457493 FLUSHO = 0x1000
494 FP_XSTATE_MAGIC2 = 0x46505845
458495 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
459496 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
460497 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
462499 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
463500 FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
464501 FS_ENCRYPTION_MODE_INVALID = 0x0
502 FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
503 FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
465504 FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
466505 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
467506 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
475514 FS_POLICY_FLAGS_PAD_8 = 0x1
476515 FS_POLICY_FLAGS_PAD_MASK = 0x3
477516 FS_POLICY_FLAGS_VALID = 0x3
517 FUTEXFS_SUPER_MAGIC = 0xbad1dea
518 F_ADD_SEALS = 0x409
478519 F_DUPFD = 0x0
479520 F_DUPFD_CLOEXEC = 0x406
480521 F_EXLCK = 0x4
487528 F_GETOWN_EX = 0x10
488529 F_GETPIPE_SZ = 0x408
489530 F_GETSIG = 0xb
531 F_GET_FILE_RW_HINT = 0x40d
532 F_GET_RW_HINT = 0x40b
533 F_GET_SEALS = 0x40a
490534 F_LOCK = 0x1
491535 F_NOTIFY = 0x402
492536 F_OFD_GETLK = 0x24
494538 F_OFD_SETLKW = 0x26
495539 F_OK = 0x0
496540 F_RDLCK = 0x0
541 F_SEAL_GROW = 0x4
542 F_SEAL_SEAL = 0x1
543 F_SEAL_SHRINK = 0x2
544 F_SEAL_WRITE = 0x8
497545 F_SETFD = 0x2
498546 F_SETFL = 0x4
499547 F_SETLEASE = 0x400
505553 F_SETOWN_EX = 0xf
506554 F_SETPIPE_SZ = 0x407
507555 F_SETSIG = 0xa
556 F_SET_FILE_RW_HINT = 0x40e
557 F_SET_RW_HINT = 0x40c
508558 F_SHLCK = 0x8
509559 F_TEST = 0x3
510560 F_TLOCK = 0x2
526576 GENL_UNS_ADMIN_PERM = 0x10
527577 GRND_NONBLOCK = 0x1
528578 GRND_RANDOM = 0x2
579 HDIO_DRIVE_CMD = 0x31f
580 HDIO_DRIVE_CMD_AEB = 0x31e
581 HDIO_DRIVE_CMD_HDR_SIZE = 0x4
582 HDIO_DRIVE_HOB_HDR_SIZE = 0x8
583 HDIO_DRIVE_RESET = 0x31c
584 HDIO_DRIVE_TASK = 0x31e
585 HDIO_DRIVE_TASKFILE = 0x31d
586 HDIO_DRIVE_TASK_HDR_SIZE = 0x8
587 HDIO_GETGEO = 0x301
588 HDIO_GET_32BIT = 0x309
589 HDIO_GET_ACOUSTIC = 0x30f
590 HDIO_GET_ADDRESS = 0x310
591 HDIO_GET_BUSSTATE = 0x31a
592 HDIO_GET_DMA = 0x30b
593 HDIO_GET_IDENTITY = 0x30d
594 HDIO_GET_KEEPSETTINGS = 0x308
595 HDIO_GET_MULTCOUNT = 0x304
596 HDIO_GET_NICE = 0x30c
597 HDIO_GET_NOWERR = 0x30a
598 HDIO_GET_QDMA = 0x305
599 HDIO_GET_UNMASKINTR = 0x302
600 HDIO_GET_WCACHE = 0x30e
601 HDIO_OBSOLETE_IDENTITY = 0x307
602 HDIO_SCAN_HWIF = 0x328
603 HDIO_SET_32BIT = 0x324
604 HDIO_SET_ACOUSTIC = 0x32c
605 HDIO_SET_ADDRESS = 0x32f
606 HDIO_SET_BUSSTATE = 0x32d
607 HDIO_SET_DMA = 0x326
608 HDIO_SET_KEEPSETTINGS = 0x323
609 HDIO_SET_MULTCOUNT = 0x321
610 HDIO_SET_NICE = 0x329
611 HDIO_SET_NOWERR = 0x325
612 HDIO_SET_PIO_MODE = 0x327
613 HDIO_SET_QDMA = 0x32e
614 HDIO_SET_UNMASKINTR = 0x322
615 HDIO_SET_WCACHE = 0x32b
616 HDIO_SET_XFER = 0x306
617 HDIO_TRISTATE_HWIF = 0x31b
618 HDIO_UNREGISTER_HWIF = 0x32a
619 HOSTFS_SUPER_MAGIC = 0xc0ffee
620 HPFS_SUPER_MAGIC = 0xf995e849
621 HUGETLBFS_MAGIC = 0x958458f6
529622 HUPCL = 0x400
530623 IBSHIFT = 0x10
531624 ICANON = 0x2
545638 IFA_F_STABLE_PRIVACY = 0x800
546639 IFA_F_TEMPORARY = 0x1
547640 IFA_F_TENTATIVE = 0x40
548 IFA_MAX = 0x8
641 IFA_MAX = 0xa
549642 IFF_ALLMULTI = 0x200
550643 IFF_ATTACH_QUEUE = 0x200
551644 IFF_AUTOMEDIA = 0x4000
560653 IFF_MASTER = 0x400
561654 IFF_MULTICAST = 0x1000
562655 IFF_MULTI_QUEUE = 0x100
656 IFF_NAPI = 0x10
657 IFF_NAPI_FRAGS = 0x20
563658 IFF_NOARP = 0x80
564659 IFF_NOFILTER = 0x1000
565660 IFF_NOTRAILERS = 0x20
622717 IN_OPEN = 0x20
623718 IN_Q_OVERFLOW = 0x4000
624719 IN_UNMOUNT = 0x2000
720 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
625721 IPPROTO_AH = 0x33
626722 IPPROTO_BEETPH = 0x5e
627723 IPPROTO_COMP = 0x6c
669765 IPV6_DONTFRAG = 0x3e
670766 IPV6_DROP_MEMBERSHIP = 0x15
671767 IPV6_DSTOPTS = 0x3b
768 IPV6_FREEBIND = 0x4e
672769 IPV6_HDRINCL = 0x24
673770 IPV6_HOPLIMIT = 0x34
674771 IPV6_HOPOPTS = 0x36
773870 IP_UNICAST_IF = 0x32
774871 IP_XFRM_POLICY = 0x11
775872 ISIG = 0x1
873 ISOFS_SUPER_MAGIC = 0x9660
776874 ISTRIP = 0x20
777875 IUCLC = 0x200
778876 IUTF8 = 0x4000
779877 IXANY = 0x800
780878 IXOFF = 0x1000
781879 IXON = 0x400
880 JFFS2_SUPER_MAGIC = 0x72b6
881 KEXEC_ARCH_386 = 0x30000
882 KEXEC_ARCH_68K = 0x40000
883 KEXEC_ARCH_AARCH64 = 0xb70000
884 KEXEC_ARCH_ARM = 0x280000
885 KEXEC_ARCH_DEFAULT = 0x0
886 KEXEC_ARCH_IA_64 = 0x320000
887 KEXEC_ARCH_MASK = 0xffff0000
888 KEXEC_ARCH_MIPS = 0x80000
889 KEXEC_ARCH_MIPS_LE = 0xa0000
890 KEXEC_ARCH_PPC = 0x140000
891 KEXEC_ARCH_PPC64 = 0x150000
892 KEXEC_ARCH_S390 = 0x160000
893 KEXEC_ARCH_SH = 0x2a0000
894 KEXEC_ARCH_X86_64 = 0x3e0000
895 KEXEC_FILE_NO_INITRAMFS = 0x4
896 KEXEC_FILE_ON_CRASH = 0x2
897 KEXEC_FILE_UNLOAD = 0x1
898 KEXEC_ON_CRASH = 0x1
899 KEXEC_PRESERVE_CONTEXT = 0x2
900 KEXEC_SEGMENT_MAX = 0x10
782901 KEYCTL_ASSUME_AUTHORITY = 0x10
783902 KEYCTL_CHOWN = 0x4
784903 KEYCTL_CLEAR = 0x7
793912 KEYCTL_JOIN_SESSION_KEYRING = 0x1
794913 KEYCTL_LINK = 0x8
795914 KEYCTL_NEGATE = 0xd
915 KEYCTL_PKEY_DECRYPT = 0x1a
916 KEYCTL_PKEY_ENCRYPT = 0x19
917 KEYCTL_PKEY_QUERY = 0x18
918 KEYCTL_PKEY_SIGN = 0x1b
919 KEYCTL_PKEY_VERIFY = 0x1c
796920 KEYCTL_READ = 0xb
797921 KEYCTL_REJECT = 0x13
798922 KEYCTL_RESTRICT_KEYRING = 0x1d
802926 KEYCTL_SETPERM = 0x5
803927 KEYCTL_SET_REQKEY_KEYRING = 0xe
804928 KEYCTL_SET_TIMEOUT = 0xf
929 KEYCTL_SUPPORTS_DECRYPT = 0x2
930 KEYCTL_SUPPORTS_ENCRYPT = 0x1
931 KEYCTL_SUPPORTS_SIGN = 0x4
932 KEYCTL_SUPPORTS_VERIFY = 0x8
805933 KEYCTL_UNLINK = 0x9
806934 KEYCTL_UPDATE = 0x2
807935 KEY_REQKEY_DEFL_DEFAULT = 0x0
843971 MADV_FREE = 0x8
844972 MADV_HUGEPAGE = 0xe
845973 MADV_HWPOISON = 0x64
974 MADV_KEEPONFORK = 0x13
846975 MADV_MERGEABLE = 0xc
847976 MADV_NOHUGEPAGE = 0xf
848977 MADV_NORMAL = 0x0
851980 MADV_SEQUENTIAL = 0x2
852981 MADV_UNMERGEABLE = 0xd
853982 MADV_WILLNEED = 0x3
983 MADV_WIPEONFORK = 0x12
854984 MAP_32BIT = 0x40
855985 MAP_ANON = 0x20
856986 MAP_ANONYMOUS = 0x20
858988 MAP_EXECUTABLE = 0x1000
859989 MAP_FILE = 0x0
860990 MAP_FIXED = 0x10
991 MAP_FIXED_NOREPLACE = 0x100000
861992 MAP_GROWSDOWN = 0x100
862993 MAP_HUGETLB = 0x40000
863994 MAP_HUGE_MASK = 0x3f
868999 MAP_POPULATE = 0x8000
8691000 MAP_PRIVATE = 0x2
8701001 MAP_SHARED = 0x1
1002 MAP_SHARED_VALIDATE = 0x3
8711003 MAP_STACK = 0x20000
1004 MAP_SYNC = 0x80000
8721005 MAP_TYPE = 0xf
8731006 MCL_CURRENT = 0x1
8741007 MCL_FUTURE = 0x2
8751008 MCL_ONFAULT = 0x4
1009 MFD_ALLOW_SEALING = 0x2
1010 MFD_CLOEXEC = 0x1
1011 MFD_HUGETLB = 0x4
1012 MFD_HUGE_16GB = -0x78000000
1013 MFD_HUGE_16MB = 0x60000000
1014 MFD_HUGE_1GB = 0x78000000
1015 MFD_HUGE_1MB = 0x50000000
1016 MFD_HUGE_256MB = 0x70000000
1017 MFD_HUGE_2GB = 0x7c000000
1018 MFD_HUGE_2MB = 0x54000000
1019 MFD_HUGE_32MB = 0x64000000
1020 MFD_HUGE_512KB = 0x4c000000
1021 MFD_HUGE_512MB = 0x74000000
1022 MFD_HUGE_64KB = 0x40000000
1023 MFD_HUGE_8MB = 0x5c000000
1024 MFD_HUGE_MASK = 0x3f
1025 MFD_HUGE_SHIFT = 0x1a
1026 MINIX2_SUPER_MAGIC = 0x2468
1027 MINIX2_SUPER_MAGIC2 = 0x2478
1028 MINIX3_SUPER_MAGIC = 0x4d5a
1029 MINIX_SUPER_MAGIC = 0x137f
1030 MINIX_SUPER_MAGIC2 = 0x138f
8761031 MNT_DETACH = 0x2
8771032 MNT_EXPIRE = 0x4
8781033 MNT_FORCE = 0x1
1034 MODULE_INIT_IGNORE_MODVERSIONS = 0x1
1035 MODULE_INIT_IGNORE_VERMAGIC = 0x2
1036 MSDOS_SUPER_MAGIC = 0x4d44
8791037 MSG_BATCH = 0x40000
8801038 MSG_CMSG_CLOEXEC = 0x40000000
8811039 MSG_CONFIRM = 0x800
8971055 MSG_TRYHARD = 0x4
8981056 MSG_WAITALL = 0x100
8991057 MSG_WAITFORONE = 0x10000
1058 MSG_ZEROCOPY = 0x4000000
9001059 MS_ACTIVE = 0x40000000
9011060 MS_ASYNC = 0x1
9021061 MS_BIND = 0x1000
9341093 MS_SYNCHRONOUS = 0x10
9351094 MS_UNBINDABLE = 0x20000
9361095 MS_VERBOSE = 0x8000
1096 MTD_INODE_FS_MAGIC = 0x11307854
9371097 NAME_MAX = 0xff
1098 NCP_SUPER_MAGIC = 0x564c
9381099 NETLINK_ADD_MEMBERSHIP = 0x1
9391100 NETLINK_AUDIT = 0x9
9401101 NETLINK_BROADCAST_ERROR = 0x4
9481109 NETLINK_FIB_LOOKUP = 0xa
9491110 NETLINK_FIREWALL = 0x3
9501111 NETLINK_GENERIC = 0x10
1112 NETLINK_GET_STRICT_CHK = 0xc
9511113 NETLINK_INET_DIAG = 0x4
9521114 NETLINK_IP6_FW = 0xd
9531115 NETLINK_ISCSI = 0x8
9691131 NETLINK_UNUSED = 0x1
9701132 NETLINK_USERSOCK = 0x2
9711133 NETLINK_XFRM = 0x6
1134 NETNSA_MAX = 0x3
1135 NETNSA_NSID_NOT_ASSIGNED = -0x1
1136 NFNETLINK_V0 = 0x0
1137 NFNLGRP_ACCT_QUOTA = 0x8
1138 NFNLGRP_CONNTRACK_DESTROY = 0x3
1139 NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
1140 NFNLGRP_CONNTRACK_EXP_NEW = 0x4
1141 NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
1142 NFNLGRP_CONNTRACK_NEW = 0x1
1143 NFNLGRP_CONNTRACK_UPDATE = 0x2
1144 NFNLGRP_MAX = 0x9
1145 NFNLGRP_NFTABLES = 0x7
1146 NFNLGRP_NFTRACE = 0x9
1147 NFNLGRP_NONE = 0x0
1148 NFNL_BATCH_MAX = 0x1
1149 NFNL_MSG_BATCH_BEGIN = 0x10
1150 NFNL_MSG_BATCH_END = 0x11
1151 NFNL_NFA_NEST = 0x8000
1152 NFNL_SUBSYS_ACCT = 0x7
1153 NFNL_SUBSYS_COUNT = 0xc
1154 NFNL_SUBSYS_CTHELPER = 0x9
1155 NFNL_SUBSYS_CTNETLINK = 0x1
1156 NFNL_SUBSYS_CTNETLINK_EXP = 0x2
1157 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
1158 NFNL_SUBSYS_IPSET = 0x6
1159 NFNL_SUBSYS_NFTABLES = 0xa
1160 NFNL_SUBSYS_NFT_COMPAT = 0xb
1161 NFNL_SUBSYS_NONE = 0x0
1162 NFNL_SUBSYS_OSF = 0x5
1163 NFNL_SUBSYS_QUEUE = 0x3
1164 NFNL_SUBSYS_ULOG = 0x4
1165 NFS_SUPER_MAGIC = 0x6969
1166 NILFS_SUPER_MAGIC = 0x3434
9721167 NL0 = 0x0
9731168 NL1 = 0x100
9741169 NLA_ALIGNTO = 0x4
9961191 NLM_F_EXCL = 0x200
9971192 NLM_F_MATCH = 0x200
9981193 NLM_F_MULTI = 0x2
1194 NLM_F_NONREC = 0x100
9991195 NLM_F_REPLACE = 0x100
10001196 NLM_F_REQUEST = 0x1
10011197 NLM_F_ROOT = 0x100
10021198 NOFLSH = 0x80
1199 NSFS_MAGIC = 0x6e736673
1200 OCFS2_SUPER_MAGIC = 0x7461636f
10031201 OCRNL = 0x8
10041202 OFDEL = 0x80
10051203 OFILL = 0x40
10071205 ONLCR = 0x4
10081206 ONLRET = 0x20
10091207 ONOCR = 0x10
1208 OPENPROM_SUPER_MAGIC = 0x9fa1
10101209 OPOST = 0x1
1210 OVERLAYFS_SUPER_MAGIC = 0x794c7630
10111211 O_ACCMODE = 0x3
10121212 O_APPEND = 0x400
10131213 O_ASYNC = 0x2000
10531253 PACKET_FASTROUTE = 0x6
10541254 PACKET_HDRLEN = 0xb
10551255 PACKET_HOST = 0x0
1256 PACKET_IGNORE_OUTGOING = 0x17
10561257 PACKET_KERNEL = 0x7
10571258 PACKET_LOOPBACK = 0x5
10581259 PACKET_LOSS = 0xe
10921293 PERF_EVENT_IOC_DISABLE = 0x2401
10931294 PERF_EVENT_IOC_ENABLE = 0x2400
10941295 PERF_EVENT_IOC_ID = 0x80082407
1296 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
10951297 PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
10961298 PERF_EVENT_IOC_PERIOD = 0x40082404
1299 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
10971300 PERF_EVENT_IOC_REFRESH = 0x2402
10981301 PERF_EVENT_IOC_RESET = 0x2403
10991302 PERF_EVENT_IOC_SET_BPF = 0x40042408
11001303 PERF_EVENT_IOC_SET_FILTER = 0x40082406
11011304 PERF_EVENT_IOC_SET_OUTPUT = 0x2405
1305 PIPEFS_MAGIC = 0x50495045
1306 PPPIOCATTACH = 0x4004743d
1307 PPPIOCATTCHAN = 0x40047438
1308 PPPIOCCONNECT = 0x4004743a
1309 PPPIOCDETACH = 0x4004743c
1310 PPPIOCDISCONN = 0x7439
1311 PPPIOCGASYNCMAP = 0x80047458
1312 PPPIOCGCHAN = 0x80047437
1313 PPPIOCGDEBUG = 0x80047441
1314 PPPIOCGFLAGS = 0x8004745a
1315 PPPIOCGIDLE = 0x8010743f
1316 PPPIOCGL2TPSTATS = 0x80487436
1317 PPPIOCGMRU = 0x80047453
1318 PPPIOCGNPMODE = 0xc008744c
1319 PPPIOCGRASYNCMAP = 0x80047455
1320 PPPIOCGUNIT = 0x80047456
1321 PPPIOCGXASYNCMAP = 0x80207450
1322 PPPIOCNEWUNIT = 0xc004743e
1323 PPPIOCSACTIVE = 0x40107446
1324 PPPIOCSASYNCMAP = 0x40047457
1325 PPPIOCSCOMPRESS = 0x4010744d
1326 PPPIOCSDEBUG = 0x40047440
1327 PPPIOCSFLAGS = 0x40047459
1328 PPPIOCSMAXCID = 0x40047451
1329 PPPIOCSMRRU = 0x4004743b
1330 PPPIOCSMRU = 0x40047452
1331 PPPIOCSNPMODE = 0x4008744b
1332 PPPIOCSPASS = 0x40107447
1333 PPPIOCSRASYNCMAP = 0x40047454
1334 PPPIOCSXASYNCMAP = 0x4020744f
1335 PPPIOCXFERUNIT = 0x744e
11021336 PRIO_PGRP = 0x1
11031337 PRIO_PROCESS = 0x0
11041338 PRIO_USER = 0x2
1339 PROC_SUPER_MAGIC = 0x9fa0
11051340 PROT_EXEC = 0x4
11061341 PROT_GROWSDOWN = 0x1000000
11071342 PROT_GROWSUP = 0x2000000
11441379 PR_GET_PDEATHSIG = 0x2
11451380 PR_GET_SECCOMP = 0x15
11461381 PR_GET_SECUREBITS = 0x1b
1382 PR_GET_SPECULATION_CTRL = 0x34
11471383 PR_GET_THP_DISABLE = 0x2a
11481384 PR_GET_TID_ADDRESS = 0x28
11491385 PR_GET_TIMERSLACK = 0x1e
11861422 PR_SET_NO_NEW_PRIVS = 0x26
11871423 PR_SET_PDEATHSIG = 0x1
11881424 PR_SET_PTRACER = 0x59616d61
1189 PR_SET_PTRACER_ANY = -0x1
1425 PR_SET_PTRACER_ANY = 0xffffffffffffffff
11901426 PR_SET_SECCOMP = 0x16
11911427 PR_SET_SECUREBITS = 0x1c
1428 PR_SET_SPECULATION_CTRL = 0x35
11921429 PR_SET_THP_DISABLE = 0x29
11931430 PR_SET_TIMERSLACK = 0x1d
11941431 PR_SET_TIMING = 0xe
11951432 PR_SET_TSC = 0x1a
11961433 PR_SET_UNALIGN = 0x6
1434 PR_SPEC_DISABLE = 0x4
1435 PR_SPEC_ENABLE = 0x2
1436 PR_SPEC_FORCE_DISABLE = 0x8
1437 PR_SPEC_INDIRECT_BRANCH = 0x1
1438 PR_SPEC_NOT_AFFECTED = 0x0
1439 PR_SPEC_PRCTL = 0x1
1440 PR_SPEC_STORE_BYPASS = 0x0
1441 PR_SVE_GET_VL = 0x33
1442 PR_SVE_SET_VL = 0x32
1443 PR_SVE_SET_VL_ONEXEC = 0x40000
1444 PR_SVE_VL_INHERIT = 0x20000
1445 PR_SVE_VL_LEN_MASK = 0xffff
11971446 PR_TASK_PERF_EVENTS_DISABLE = 0x1f
11981447 PR_TASK_PERF_EVENTS_ENABLE = 0x20
11991448 PR_TIMING_STATISTICAL = 0x0
12021451 PR_TSC_SIGSEGV = 0x2
12031452 PR_UNALIGN_NOPRINT = 0x1
12041453 PR_UNALIGN_SIGBUS = 0x2
1454 PSTOREFS_MAGIC = 0x6165676c
12051455 PTRACE_ARCH_PRCTL = 0x1e
12061456 PTRACE_ATTACH = 0x10
12071457 PTRACE_CONT = 0x7
12461496 PTRACE_POKETEXT = 0x4
12471497 PTRACE_POKEUSR = 0x6
12481498 PTRACE_SECCOMP_GET_FILTER = 0x420c
1499 PTRACE_SECCOMP_GET_METADATA = 0x420d
12491500 PTRACE_SEIZE = 0x4206
12501501 PTRACE_SETFPREGS = 0xf
12511502 PTRACE_SETFPXREGS = 0x13
12611512 PTRACE_SYSEMU = 0x1f
12621513 PTRACE_SYSEMU_SINGLESTEP = 0x20
12631514 PTRACE_TRACEME = 0x0
1515 QNX4_SUPER_MAGIC = 0x2f
1516 QNX6_SUPER_MAGIC = 0x68191122
1517 RAMFS_MAGIC = 0x858458f6
1518 RDTGROUP_SUPER_MAGIC = 0x7655821
1519 REISERFS_SUPER_MAGIC = 0x52654973
1520 RENAME_EXCHANGE = 0x2
1521 RENAME_NOREPLACE = 0x1
1522 RENAME_WHITEOUT = 0x4
12641523 RLIMIT_AS = 0x9
12651524 RLIMIT_CORE = 0x4
12661525 RLIMIT_CPU = 0x0
12771536 RLIMIT_RTTIME = 0xf
12781537 RLIMIT_SIGPENDING = 0xb
12791538 RLIMIT_STACK = 0x3
1280 RLIM_INFINITY = -0x1
1539 RLIM_INFINITY = 0xffffffffffffffff
12811540 RTAX_ADVMSS = 0x8
12821541 RTAX_CC_ALGO = 0x10
12831542 RTAX_CWND = 0x7
1543 RTAX_FASTOPEN_NO_COOKIE = 0x11
12841544 RTAX_FEATURES = 0xc
12851545 RTAX_FEATURE_ALLFRAG = 0x8
12861546 RTAX_FEATURE_ECN = 0x1
12911551 RTAX_INITCWND = 0xb
12921552 RTAX_INITRWND = 0xe
12931553 RTAX_LOCK = 0x1
1294 RTAX_MAX = 0x10
1554 RTAX_MAX = 0x11
12951555 RTAX_MTU = 0x2
12961556 RTAX_QUICKACK = 0xf
12971557 RTAX_REORDERING = 0x9
13021562 RTAX_UNSPEC = 0x0
13031563 RTAX_WINDOW = 0x3
13041564 RTA_ALIGNTO = 0x4
1305 RTA_MAX = 0x1a
1565 RTA_MAX = 0x1d
13061566 RTCF_DIRECTSRC = 0x4000000
13071567 RTCF_DOREDIRECT = 0x1000000
13081568 RTCF_LOG = 0x2000000
13091569 RTCF_MASQ = 0x400000
13101570 RTCF_NAT = 0x800000
13111571 RTCF_VALVE = 0x200000
1572 RTC_AF = 0x20
1573 RTC_AIE_OFF = 0x7002
1574 RTC_AIE_ON = 0x7001
1575 RTC_ALM_READ = 0x80247008
1576 RTC_ALM_SET = 0x40247007
1577 RTC_EPOCH_READ = 0x8008700d
1578 RTC_EPOCH_SET = 0x4008700e
1579 RTC_IRQF = 0x80
1580 RTC_IRQP_READ = 0x8008700b
1581 RTC_IRQP_SET = 0x4008700c
1582 RTC_MAX_FREQ = 0x2000
1583 RTC_PF = 0x40
1584 RTC_PIE_OFF = 0x7006
1585 RTC_PIE_ON = 0x7005
1586 RTC_PLL_GET = 0x80207011
1587 RTC_PLL_SET = 0x40207012
1588 RTC_RD_TIME = 0x80247009
1589 RTC_SET_TIME = 0x4024700a
1590 RTC_UF = 0x10
1591 RTC_UIE_OFF = 0x7004
1592 RTC_UIE_ON = 0x7003
1593 RTC_VL_CLR = 0x7014
1594 RTC_VL_READ = 0x80047013
1595 RTC_WIE_OFF = 0x7010
1596 RTC_WIE_ON = 0x700f
1597 RTC_WKALM_RD = 0x80287010
1598 RTC_WKALM_SET = 0x4028700f
13121599 RTF_ADDRCLASSMASK = 0xf8000000
13131600 RTF_ADDRCONF = 0x40000
13141601 RTF_ALLONLINK = 0x20000
13431630 RTM_DELACTION = 0x31
13441631 RTM_DELADDR = 0x15
13451632 RTM_DELADDRLABEL = 0x49
1633 RTM_DELCHAIN = 0x65
13461634 RTM_DELLINK = 0x11
13471635 RTM_DELMDB = 0x55
13481636 RTM_DELNEIGH = 0x1d
13631651 RTM_GETADDR = 0x16
13641652 RTM_GETADDRLABEL = 0x4a
13651653 RTM_GETANYCAST = 0x3e
1654 RTM_GETCHAIN = 0x66
13661655 RTM_GETDCB = 0x4e
13671656 RTM_GETLINK = 0x12
13681657 RTM_GETMDB = 0x56
13771666 RTM_GETSTATS = 0x5e
13781667 RTM_GETTCLASS = 0x2a
13791668 RTM_GETTFILTER = 0x2e
1380 RTM_MAX = 0x63
1669 RTM_MAX = 0x67
13811670 RTM_NEWACTION = 0x30
13821671 RTM_NEWADDR = 0x14
13831672 RTM_NEWADDRLABEL = 0x48
13841673 RTM_NEWCACHEREPORT = 0x60
1674 RTM_NEWCHAIN = 0x64
13851675 RTM_NEWLINK = 0x10
13861676 RTM_NEWMDB = 0x54
13871677 RTM_NEWNDUSEROPT = 0x44
13961686 RTM_NEWSTATS = 0x5c
13971687 RTM_NEWTCLASS = 0x28
13981688 RTM_NEWTFILTER = 0x2c
1399 RTM_NR_FAMILIES = 0x15
1400 RTM_NR_MSGTYPES = 0x54
1689 RTM_NR_FAMILIES = 0x16
1690 RTM_NR_MSGTYPES = 0x58
14011691 RTM_SETDCB = 0x4f
14021692 RTM_SETLINK = 0x13
14031693 RTM_SETNEIGHTBL = 0x43
14111701 RTNH_F_UNRESOLVED = 0x20
14121702 RTN_MAX = 0xb
14131703 RTPROT_BABEL = 0x2a
1704 RTPROT_BGP = 0xba
14141705 RTPROT_BIRD = 0xc
14151706 RTPROT_BOOT = 0x3
14161707 RTPROT_DHCP = 0x10
14171708 RTPROT_DNROUTED = 0xd
1709 RTPROT_EIGRP = 0xc0
14181710 RTPROT_GATED = 0x8
1711 RTPROT_ISIS = 0xbb
14191712 RTPROT_KERNEL = 0x2
14201713 RTPROT_MROUTED = 0x11
14211714 RTPROT_MRT = 0xa
14221715 RTPROT_NTK = 0xf
1716 RTPROT_OSPF = 0xbc
14231717 RTPROT_RA = 0x9
14241718 RTPROT_REDIRECT = 0x1
1719 RTPROT_RIP = 0xbd
14251720 RTPROT_STATIC = 0x4
14261721 RTPROT_UNSPEC = 0x0
14271722 RTPROT_XORP = 0xe
14411736 SCM_TIMESTAMPING_OPT_STATS = 0x36
14421737 SCM_TIMESTAMPING_PKTINFO = 0x3a
14431738 SCM_TIMESTAMPNS = 0x23
1739 SCM_TXTIME = 0x3d
14441740 SCM_WIFI_STATUS = 0x29
1741 SC_LOG_FLUSH = 0x100000
14451742 SECCOMP_MODE_DISABLED = 0x0
14461743 SECCOMP_MODE_FILTER = 0x2
14471744 SECCOMP_MODE_STRICT = 0x1
1745 SECURITYFS_MAGIC = 0x73636673
1746 SELINUX_MAGIC = 0xf97cff8c
1747 SFD_CLOEXEC = 0x80000
1748 SFD_NONBLOCK = 0x800
14481749 SHUT_RD = 0x0
14491750 SHUT_RDWR = 0x2
14501751 SHUT_WR = 0x1
14951796 SIOCGMIIPHY = 0x8947
14961797 SIOCGMIIREG = 0x8948
14971798 SIOCGPGRP = 0x8904
1799 SIOCGPPPCSTATS = 0x89f2
1800 SIOCGPPPSTATS = 0x89f0
1801 SIOCGPPPVER = 0x89f1
14981802 SIOCGRARP = 0x8961
14991803 SIOCGSKNS = 0x894c
15001804 SIOCGSTAMP = 0x8906
15291833 SIOCSPGRP = 0x8902
15301834 SIOCSRARP = 0x8962
15311835 SIOCWANDEV = 0x894a
1836 SMACK_MAGIC = 0x43415d53
1837 SMART_AUTOSAVE = 0xd2
1838 SMART_AUTO_OFFLINE = 0xdb
1839 SMART_DISABLE = 0xd9
1840 SMART_ENABLE = 0xd8
1841 SMART_HCYL_PASS = 0xc2
1842 SMART_IMMEDIATE_OFFLINE = 0xd4
1843 SMART_LCYL_PASS = 0x4f
1844 SMART_READ_LOG_SECTOR = 0xd5
1845 SMART_READ_THRESHOLDS = 0xd1
1846 SMART_READ_VALUES = 0xd0
1847 SMART_SAVE = 0xd3
1848 SMART_STATUS = 0xda
1849 SMART_WRITE_LOG_SECTOR = 0xd6
1850 SMART_WRITE_THRESHOLDS = 0xd7
1851 SMB_SUPER_MAGIC = 0x517b
1852 SOCKFS_MAGIC = 0x534f434b
15321853 SOCK_CLOEXEC = 0x80000
15331854 SOCK_DCCP = 0x6
15341855 SOCK_DGRAM = 0x2
15651886 SOL_SOCKET = 0x1
15661887 SOL_TCP = 0x6
15671888 SOL_TIPC = 0x10f
1889 SOL_TLS = 0x11a
15681890 SOL_X25 = 0x106
1891 SOL_XDP = 0x11b
15691892 SOMAXCONN = 0x80
15701893 SO_ACCEPTCONN = 0x1e
15711894 SO_ATTACH_BPF = 0x32
16241947 SO_TIMESTAMP = 0x1d
16251948 SO_TIMESTAMPING = 0x25
16261949 SO_TIMESTAMPNS = 0x23
1950 SO_TXTIME = 0x3d
16271951 SO_TYPE = 0x3
16281952 SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
16291953 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
16331957 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
16341958 SO_VM_SOCKETS_TRUSTED = 0x5
16351959 SO_WIFI_STATUS = 0x29
1960 SO_ZEROCOPY = 0x3c
16361961 SPLICE_F_GIFT = 0x8
16371962 SPLICE_F_MORE = 0x4
16381963 SPLICE_F_MOVE = 0x1
16391964 SPLICE_F_NONBLOCK = 0x2
1965 SQUASHFS_MAGIC = 0x73717368
1966 STACK_END_MAGIC = 0x57ac6e9d
1967 STATX_ALL = 0xfff
1968 STATX_ATIME = 0x20
1969 STATX_ATTR_APPEND = 0x20
1970 STATX_ATTR_AUTOMOUNT = 0x1000
1971 STATX_ATTR_COMPRESSED = 0x4
1972 STATX_ATTR_ENCRYPTED = 0x800
1973 STATX_ATTR_IMMUTABLE = 0x10
1974 STATX_ATTR_NODUMP = 0x40
1975 STATX_BASIC_STATS = 0x7ff
1976 STATX_BLOCKS = 0x400
1977 STATX_BTIME = 0x800
1978 STATX_CTIME = 0x80
1979 STATX_GID = 0x10
1980 STATX_INO = 0x100
1981 STATX_MODE = 0x2
1982 STATX_MTIME = 0x40
1983 STATX_NLINK = 0x4
1984 STATX_SIZE = 0x200
1985 STATX_TYPE = 0x1
1986 STATX_UID = 0x8
1987 STATX__RESERVED = 0x80000000
1988 SYNC_FILE_RANGE_WAIT_AFTER = 0x4
1989 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
1990 SYNC_FILE_RANGE_WRITE = 0x2
1991 SYSFS_MAGIC = 0x62656572
16401992 S_BLKSIZE = 0x200
16411993 S_IEXEC = 0x40
16421994 S_IFBLK = 0x6000
16742026 TASKSTATS_GENL_NAME = "TASKSTATS"
16752027 TASKSTATS_GENL_VERSION = 0x1
16762028 TASKSTATS_TYPE_MAX = 0x6
1677 TASKSTATS_VERSION = 0x8
2029 TASKSTATS_VERSION = 0x9
16782030 TCFLSH = 0x540b
16792031 TCGETA = 0x5405
16802032 TCGETS = 0x5401
16992051 TCP_DEFER_ACCEPT = 0x9
17002052 TCP_FASTOPEN = 0x17
17012053 TCP_FASTOPEN_CONNECT = 0x1e
2054 TCP_FASTOPEN_KEY = 0x21
2055 TCP_FASTOPEN_NO_COOKIE = 0x22
17022056 TCP_INFO = 0xb
17032057 TCP_KEEPCNT = 0x6
17042058 TCP_KEEPIDLE = 0x4
17082062 TCP_MAXWIN = 0xffff
17092063 TCP_MAX_WINSHIFT = 0xe
17102064 TCP_MD5SIG = 0xe
2065 TCP_MD5SIG_EXT = 0x20
2066 TCP_MD5SIG_FLAG_PREFIX = 0x1
17112067 TCP_MD5SIG_MAXKEYLEN = 0x50
17122068 TCP_MSS = 0x200
17132069 TCP_MSS_DEFAULT = 0x218
17282084 TCP_THIN_DUPACK = 0x11
17292085 TCP_THIN_LINEAR_TIMEOUTS = 0x10
17302086 TCP_TIMESTAMP = 0x18
2087 TCP_ULP = 0x1f
17312088 TCP_USER_TIMEOUT = 0x12
17322089 TCP_WINDOW_CLAMP = 0xa
17332090 TCSAFLUSH = 0x2
17462103 TCSETXF = 0x5434
17472104 TCSETXW = 0x5435
17482105 TCXONC = 0x540a
2106 TIMER_ABSTIME = 0x1
17492107 TIOCCBRK = 0x5428
17502108 TIOCCONS = 0x541d
17512109 TIOCEXCL = 0x540c
17532111 TIOCGETD = 0x5424
17542112 TIOCGEXCL = 0x80045440
17552113 TIOCGICOUNT = 0x545d
2114 TIOCGISO7816 = 0x80285442
17562115 TIOCGLCKTRMIOS = 0x5456
17572116 TIOCGPGRP = 0x540f
17582117 TIOCGPKT = 0x80045438
18062165 TIOCSER_TEMT = 0x1
18072166 TIOCSETD = 0x5423
18082167 TIOCSIG = 0x40045436
2168 TIOCSISO7816 = 0xc0285443
18092169 TIOCSLCKTRMIOS = 0x5457
18102170 TIOCSPGRP = 0x5410
18112171 TIOCSPTLCK = 0x40045431
18152175 TIOCSTI = 0x5412
18162176 TIOCSWINSZ = 0x5414
18172177 TIOCVHANGUP = 0x5437
2178 TMPFS_MAGIC = 0x1021994
18182179 TOSTOP = 0x100
2180 TPACKET_ALIGNMENT = 0x10
2181 TPACKET_HDRLEN = 0x34
2182 TP_STATUS_AVAILABLE = 0x0
2183 TP_STATUS_BLK_TMO = 0x20
2184 TP_STATUS_COPY = 0x2
2185 TP_STATUS_CSUMNOTREADY = 0x8
2186 TP_STATUS_CSUM_VALID = 0x80
2187 TP_STATUS_KERNEL = 0x0
2188 TP_STATUS_LOSING = 0x4
2189 TP_STATUS_SENDING = 0x2
2190 TP_STATUS_SEND_REQUEST = 0x1
2191 TP_STATUS_TS_RAW_HARDWARE = -0x80000000
2192 TP_STATUS_TS_SOFTWARE = 0x20000000
2193 TP_STATUS_TS_SYS_HARDWARE = 0x40000000
2194 TP_STATUS_USER = 0x1
2195 TP_STATUS_VLAN_TPID_VALID = 0x40
2196 TP_STATUS_VLAN_VALID = 0x10
2197 TP_STATUS_WRONG_FORMAT = 0x4
2198 TRACEFS_MAGIC = 0x74726163
18192199 TS_COMM_LEN = 0x20
18202200 TUNATTACHFILTER = 0x401054d5
18212201 TUNDETACHFILTER = 0x401054d6
18272207 TUNGETVNETHDRSZ = 0x800454d7
18282208 TUNGETVNETLE = 0x800454dd
18292209 TUNSETDEBUG = 0x400454c9
2210 TUNSETFILTEREBPF = 0x800454e1
18302211 TUNSETGROUP = 0x400454ce
18312212 TUNSETIFF = 0x400454ca
18322213 TUNSETIFINDEX = 0x400454da
18372218 TUNSETPERSIST = 0x400454cb
18382219 TUNSETQUEUE = 0x400454d9
18392220 TUNSETSNDBUF = 0x400454d4
2221 TUNSETSTEERINGEBPF = 0x800454e0
18402222 TUNSETTXFILTER = 0x400454d1
18412223 TUNSETVNETBE = 0x400454de
18422224 TUNSETVNETHDRSZ = 0x400454d8
18432225 TUNSETVNETLE = 0x400454dc
2226 UBI_IOCATT = 0x40186f40
2227 UBI_IOCDET = 0x40046f41
2228 UBI_IOCEBCH = 0x40044f02
2229 UBI_IOCEBER = 0x40044f01
2230 UBI_IOCEBISMAP = 0x80044f05
2231 UBI_IOCEBMAP = 0x40084f03
2232 UBI_IOCEBUNMAP = 0x40044f04
2233 UBI_IOCMKVOL = 0x40986f00
2234 UBI_IOCRMVOL = 0x40046f01
2235 UBI_IOCRNVOL = 0x51106f03
2236 UBI_IOCRSVOL = 0x400c6f02
2237 UBI_IOCSETVOLPROP = 0x40104f06
2238 UBI_IOCVOLCRBLK = 0x40804f07
2239 UBI_IOCVOLRMBLK = 0x4f08
2240 UBI_IOCVOLUP = 0x40084f00
2241 UDF_SUPER_MAGIC = 0x15013346
18442242 UMOUNT_NOFOLLOW = 0x8
2243 USBDEVICE_SUPER_MAGIC = 0x9fa2
2244 UTIME_NOW = 0x3fffffff
2245 UTIME_OMIT = 0x3ffffffe
2246 V9FS_MAGIC = 0x1021997
18452247 VDISCARD = 0xd
18462248 VEOF = 0x4
18472249 VEOL = 0xb
18712273 WALL = 0x40000000
18722274 WCLONE = 0x80000000
18732275 WCONTINUED = 0x8
2276 WDIOC_GETBOOTSTATUS = 0x80045702
2277 WDIOC_GETPRETIMEOUT = 0x80045709
2278 WDIOC_GETSTATUS = 0x80045701
2279 WDIOC_GETSUPPORT = 0x80285700
2280 WDIOC_GETTEMP = 0x80045703
2281 WDIOC_GETTIMELEFT = 0x8004570a
2282 WDIOC_GETTIMEOUT = 0x80045707
2283 WDIOC_KEEPALIVE = 0x80045705
2284 WDIOC_SETOPTIONS = 0x80045704
2285 WDIOC_SETPRETIMEOUT = 0xc0045708
2286 WDIOC_SETTIMEOUT = 0xc0045706
18742287 WEXITED = 0x4
2288 WIN_ACKMEDIACHANGE = 0xdb
2289 WIN_CHECKPOWERMODE1 = 0xe5
2290 WIN_CHECKPOWERMODE2 = 0x98
2291 WIN_DEVICE_RESET = 0x8
2292 WIN_DIAGNOSE = 0x90
2293 WIN_DOORLOCK = 0xde
2294 WIN_DOORUNLOCK = 0xdf
2295 WIN_DOWNLOAD_MICROCODE = 0x92
2296 WIN_FLUSH_CACHE = 0xe7
2297 WIN_FLUSH_CACHE_EXT = 0xea
2298 WIN_FORMAT = 0x50
2299 WIN_GETMEDIASTATUS = 0xda
2300 WIN_IDENTIFY = 0xec
2301 WIN_IDENTIFY_DMA = 0xee
2302 WIN_IDLEIMMEDIATE = 0xe1
2303 WIN_INIT = 0x60
2304 WIN_MEDIAEJECT = 0xed
2305 WIN_MULTREAD = 0xc4
2306 WIN_MULTREAD_EXT = 0x29
2307 WIN_MULTWRITE = 0xc5
2308 WIN_MULTWRITE_EXT = 0x39
2309 WIN_NOP = 0x0
2310 WIN_PACKETCMD = 0xa0
2311 WIN_PIDENTIFY = 0xa1
2312 WIN_POSTBOOT = 0xdc
2313 WIN_PREBOOT = 0xdd
2314 WIN_QUEUED_SERVICE = 0xa2
2315 WIN_READ = 0x20
2316 WIN_READDMA = 0xc8
2317 WIN_READDMA_EXT = 0x25
2318 WIN_READDMA_ONCE = 0xc9
2319 WIN_READDMA_QUEUED = 0xc7
2320 WIN_READDMA_QUEUED_EXT = 0x26
2321 WIN_READ_BUFFER = 0xe4
2322 WIN_READ_EXT = 0x24
2323 WIN_READ_LONG = 0x22
2324 WIN_READ_LONG_ONCE = 0x23
2325 WIN_READ_NATIVE_MAX = 0xf8
2326 WIN_READ_NATIVE_MAX_EXT = 0x27
2327 WIN_READ_ONCE = 0x21
2328 WIN_RECAL = 0x10
2329 WIN_RESTORE = 0x10
2330 WIN_SECURITY_DISABLE = 0xf6
2331 WIN_SECURITY_ERASE_PREPARE = 0xf3
2332 WIN_SECURITY_ERASE_UNIT = 0xf4
2333 WIN_SECURITY_FREEZE_LOCK = 0xf5
2334 WIN_SECURITY_SET_PASS = 0xf1
2335 WIN_SECURITY_UNLOCK = 0xf2
2336 WIN_SEEK = 0x70
2337 WIN_SETFEATURES = 0xef
2338 WIN_SETIDLE1 = 0xe3
2339 WIN_SETIDLE2 = 0x97
2340 WIN_SETMULT = 0xc6
2341 WIN_SET_MAX = 0xf9
2342 WIN_SET_MAX_EXT = 0x37
2343 WIN_SLEEPNOW1 = 0xe6
2344 WIN_SLEEPNOW2 = 0x99
2345 WIN_SMART = 0xb0
2346 WIN_SPECIFY = 0x91
2347 WIN_SRST = 0x8
2348 WIN_STANDBY = 0xe2
2349 WIN_STANDBY2 = 0x96
2350 WIN_STANDBYNOW1 = 0xe0
2351 WIN_STANDBYNOW2 = 0x94
2352 WIN_VERIFY = 0x40
2353 WIN_VERIFY_EXT = 0x42
2354 WIN_VERIFY_ONCE = 0x41
2355 WIN_WRITE = 0x30
2356 WIN_WRITEDMA = 0xca
2357 WIN_WRITEDMA_EXT = 0x35
2358 WIN_WRITEDMA_ONCE = 0xcb
2359 WIN_WRITEDMA_QUEUED = 0xcc
2360 WIN_WRITEDMA_QUEUED_EXT = 0x36
2361 WIN_WRITE_BUFFER = 0xe8
2362 WIN_WRITE_EXT = 0x34
2363 WIN_WRITE_LONG = 0x32
2364 WIN_WRITE_LONG_ONCE = 0x33
2365 WIN_WRITE_ONCE = 0x31
2366 WIN_WRITE_SAME = 0xe9
2367 WIN_WRITE_VERIFY = 0x3c
18752368 WNOHANG = 0x1
18762369 WNOTHREAD = 0x20000000
18772370 WNOWAIT = 0x1000000
18812374 XATTR_CREATE = 0x1
18822375 XATTR_REPLACE = 0x2
18832376 XCASE = 0x4
2377 XDP_COPY = 0x2
2378 XDP_FLAGS_DRV_MODE = 0x4
2379 XDP_FLAGS_HW_MODE = 0x8
2380 XDP_FLAGS_MASK = 0xf
2381 XDP_FLAGS_MODES = 0xe
2382 XDP_FLAGS_SKB_MODE = 0x2
2383 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
2384 XDP_MMAP_OFFSETS = 0x1
2385 XDP_PGOFF_RX_RING = 0x0
2386 XDP_PGOFF_TX_RING = 0x80000000
2387 XDP_RX_RING = 0x2
2388 XDP_SHARED_UMEM = 0x1
2389 XDP_STATISTICS = 0x7
2390 XDP_TX_RING = 0x3
2391 XDP_UMEM_COMPLETION_RING = 0x6
2392 XDP_UMEM_FILL_RING = 0x5
2393 XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
2394 XDP_UMEM_PGOFF_FILL_RING = 0x100000000
2395 XDP_UMEM_REG = 0x4
2396 XDP_ZEROCOPY = 0x4
2397 XENFS_SUPER_MAGIC = 0xabba1974
2398 XFS_SUPER_MAGIC = 0x58465342
18842399 XTABS = 0x1800
2400 ZSMALLOC_MAGIC = 0x58295829
18852401 )
18862402
18872403 // Errors
20612577 )
20622578
20632579 // Error table
2064 var errors = [...]string{
2065 1: "operation not permitted",
2066 2: "no such file or directory",
2067 3: "no such process",
2068 4: "interrupted system call",
2069 5: "input/output error",
2070 6: "no such device or address",
2071 7: "argument list too long",
2072 8: "exec format error",
2073 9: "bad file descriptor",
2074 10: "no child processes",
2075 11: "resource temporarily unavailable",
2076 12: "cannot allocate memory",
2077 13: "permission denied",
2078 14: "bad address",
2079 15: "block device required",
2080 16: "device or resource busy",
2081 17: "file exists",
2082 18: "invalid cross-device link",
2083 19: "no such device",
2084 20: "not a directory",
2085 21: "is a directory",
2086 22: "invalid argument",
2087 23: "too many open files in system",
2088 24: "too many open files",
2089 25: "inappropriate ioctl for device",
2090 26: "text file busy",
2091 27: "file too large",
2092 28: "no space left on device",
2093 29: "illegal seek",
2094 30: "read-only file system",
2095 31: "too many links",
2096 32: "broken pipe",
2097 33: "numerical argument out of domain",
2098 34: "numerical result out of range",
2099 35: "resource deadlock avoided",
2100 36: "file name too long",
2101 37: "no locks available",
2102 38: "function not implemented",
2103 39: "directory not empty",
2104 40: "too many levels of symbolic links",
2105 42: "no message of desired type",
2106 43: "identifier removed",
2107 44: "channel number out of range",
2108 45: "level 2 not synchronized",
2109 46: "level 3 halted",
2110 47: "level 3 reset",
2111 48: "link number out of range",
2112 49: "protocol driver not attached",
2113 50: "no CSI structure available",
2114 51: "level 2 halted",
2115 52: "invalid exchange",
2116 53: "invalid request descriptor",
2117 54: "exchange full",
2118 55: "no anode",
2119 56: "invalid request code",
2120 57: "invalid slot",
2121 59: "bad font file format",
2122 60: "device not a stream",
2123 61: "no data available",
2124 62: "timer expired",
2125 63: "out of streams resources",
2126 64: "machine is not on the network",
2127 65: "package not installed",
2128 66: "object is remote",
2129 67: "link has been severed",
2130 68: "advertise error",
2131 69: "srmount error",
2132 70: "communication error on send",
2133 71: "protocol error",
2134 72: "multihop attempted",
2135 73: "RFS specific error",
2136 74: "bad message",
2137 75: "value too large for defined data type",
2138 76: "name not unique on network",
2139 77: "file descriptor in bad state",
2140 78: "remote address changed",
2141 79: "can not access a needed shared library",
2142 80: "accessing a corrupted shared library",
2143 81: ".lib section in a.out corrupted",
2144 82: "attempting to link in too many shared libraries",
2145 83: "cannot exec a shared library directly",
2146 84: "invalid or incomplete multibyte or wide character",
2147 85: "interrupted system call should be restarted",
2148 86: "streams pipe error",
2149 87: "too many users",
2150 88: "socket operation on non-socket",
2151 89: "destination address required",
2152 90: "message too long",
2153 91: "protocol wrong type for socket",
2154 92: "protocol not available",
2155 93: "protocol not supported",
2156 94: "socket type not supported",
2157 95: "operation not supported",
2158 96: "protocol family not supported",
2159 97: "address family not supported by protocol",
2160 98: "address already in use",
2161 99: "cannot assign requested address",
2162 100: "network is down",
2163 101: "network is unreachable",
2164 102: "network dropped connection on reset",
2165 103: "software caused connection abort",
2166 104: "connection reset by peer",
2167 105: "no buffer space available",
2168 106: "transport endpoint is already connected",
2169 107: "transport endpoint is not connected",
2170 108: "cannot send after transport endpoint shutdown",
2171 109: "too many references: cannot splice",
2172 110: "connection timed out",
2173 111: "connection refused",
2174 112: "host is down",
2175 113: "no route to host",
2176 114: "operation already in progress",
2177 115: "operation now in progress",
2178 116: "stale file handle",
2179 117: "structure needs cleaning",
2180 118: "not a XENIX named type file",
2181 119: "no XENIX semaphores available",
2182 120: "is a named type file",
2183 121: "remote I/O error",
2184 122: "disk quota exceeded",
2185 123: "no medium found",
2186 124: "wrong medium type",
2187 125: "operation canceled",
2188 126: "required key not available",
2189 127: "key has expired",
2190 128: "key has been revoked",
2191 129: "key was rejected by service",
2192 130: "owner died",
2193 131: "state not recoverable",
2194 132: "operation not possible due to RF-kill",
2195 133: "memory page has hardware error",
2580 var errorList = [...]struct {
2581 num syscall.Errno
2582 name string
2583 desc string
2584 }{
2585 {1, "EPERM", "operation not permitted"},
2586 {2, "ENOENT", "no such file or directory"},
2587 {3, "ESRCH", "no such process"},
2588 {4, "EINTR", "interrupted system call"},
2589 {5, "EIO", "input/output error"},
2590 {6, "ENXIO", "no such device or address"},
2591 {7, "E2BIG", "argument list too long"},
2592 {8, "ENOEXEC", "exec format error"},
2593 {9, "EBADF", "bad file descriptor"},
2594 {10, "ECHILD", "no child processes"},
2595 {11, "EAGAIN", "resource temporarily unavailable"},
2596 {12, "ENOMEM", "cannot allocate memory"},
2597 {13, "EACCES", "permission denied"},
2598 {14, "EFAULT", "bad address"},
2599 {15, "ENOTBLK", "block device required"},
2600 {16, "EBUSY", "device or resource busy"},
2601 {17, "EEXIST", "file exists"},
2602 {18, "EXDEV", "invalid cross-device link"},
2603 {19, "ENODEV", "no such device"},
2604 {20, "ENOTDIR", "not a directory"},
2605 {21, "EISDIR", "is a directory"},
2606 {22, "EINVAL", "invalid argument"},
2607 {23, "ENFILE", "too many open files in system"},
2608 {24, "EMFILE", "too many open files"},
2609 {25, "ENOTTY", "inappropriate ioctl for device"},
2610 {26, "ETXTBSY", "text file busy"},
2611 {27, "EFBIG", "file too large"},
2612 {28, "ENOSPC", "no space left on device"},
2613 {29, "ESPIPE", "illegal seek"},
2614 {30, "EROFS", "read-only file system"},
2615 {31, "EMLINK", "too many links"},
2616 {32, "EPIPE", "broken pipe"},
2617 {33, "EDOM", "numerical argument out of domain"},
2618 {34, "ERANGE", "numerical result out of range"},
2619 {35, "EDEADLK", "resource deadlock avoided"},
2620 {36, "ENAMETOOLONG", "file name too long"},
2621 {37, "ENOLCK", "no locks available"},
2622 {38, "ENOSYS", "function not implemented"},
2623 {39, "ENOTEMPTY", "directory not empty"},
2624 {40, "ELOOP", "too many levels of symbolic links"},
2625 {42, "ENOMSG", "no message of desired type"},
2626 {43, "EIDRM", "identifier removed"},
2627 {44, "ECHRNG", "channel number out of range"},
2628 {45, "EL2NSYNC", "level 2 not synchronized"},
2629 {46, "EL3HLT", "level 3 halted"},
2630 {47, "EL3RST", "level 3 reset"},
2631 {48, "ELNRNG", "link number out of range"},
2632 {49, "EUNATCH", "protocol driver not attached"},
2633 {50, "ENOCSI", "no CSI structure available"},
2634 {51, "EL2HLT", "level 2 halted"},
2635 {52, "EBADE", "invalid exchange"},
2636 {53, "EBADR", "invalid request descriptor"},
2637 {54, "EXFULL", "exchange full"},
2638 {55, "ENOANO", "no anode"},
2639 {56, "EBADRQC", "invalid request code"},
2640 {57, "EBADSLT", "invalid slot"},
2641 {59, "EBFONT", "bad font file format"},
2642 {60, "ENOSTR", "device not a stream"},
2643 {61, "ENODATA", "no data available"},
2644 {62, "ETIME", "timer expired"},
2645 {63, "ENOSR", "out of streams resources"},
2646 {64, "ENONET", "machine is not on the network"},
2647 {65, "ENOPKG", "package not installed"},
2648 {66, "EREMOTE", "object is remote"},
2649 {67, "ENOLINK", "link has been severed"},
2650 {68, "EADV", "advertise error"},
2651 {69, "ESRMNT", "srmount error"},
2652 {70, "ECOMM", "communication error on send"},
2653 {71, "EPROTO", "protocol error"},
2654 {72, "EMULTIHOP", "multihop attempted"},
2655 {73, "EDOTDOT", "RFS specific error"},
2656 {74, "EBADMSG", "bad message"},
2657 {75, "EOVERFLOW", "value too large for defined data type"},
2658 {76, "ENOTUNIQ", "name not unique on network"},
2659 {77, "EBADFD", "file descriptor in bad state"},
2660 {78, "EREMCHG", "remote address changed"},
2661 {79, "ELIBACC", "can not access a needed shared library"},
2662 {80, "ELIBBAD", "accessing a corrupted shared library"},
2663 {81, "ELIBSCN", ".lib section in a.out corrupted"},
2664 {82, "ELIBMAX", "attempting to link in too many shared libraries"},
2665 {83, "ELIBEXEC", "cannot exec a shared library directly"},
2666 {84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
2667 {85, "ERESTART", "interrupted system call should be restarted"},
2668 {86, "ESTRPIPE", "streams pipe error"},
2669 {87, "EUSERS", "too many users"},
2670 {88, "ENOTSOCK", "socket operation on non-socket"},
2671 {89, "EDESTADDRREQ", "destination address required"},
2672 {90, "EMSGSIZE", "message too long"},
2673 {91, "EPROTOTYPE", "protocol wrong type for socket"},
2674 {92, "ENOPROTOOPT", "protocol not available"},
2675 {93, "EPROTONOSUPPORT", "protocol not supported"},
2676 {94, "ESOCKTNOSUPPORT", "socket type not supported"},
2677 {95, "ENOTSUP", "operation not supported"},
2678 {96, "EPFNOSUPPORT", "protocol family not supported"},
2679 {97, "EAFNOSUPPORT", "address family not supported by protocol"},
2680 {98, "EADDRINUSE", "address already in use"},
2681 {99, "EADDRNOTAVAIL", "cannot assign requested address"},
2682 {100, "ENETDOWN", "network is down"},
2683 {101, "ENETUNREACH", "network is unreachable"},
2684 {102, "ENETRESET", "network dropped connection on reset"},
2685 {103, "ECONNABORTED", "software caused connection abort"},
2686 {104, "ECONNRESET", "connection reset by peer"},
2687 {105, "ENOBUFS", "no buffer space available"},
2688 {106, "EISCONN", "transport endpoint is already connected"},
2689 {107, "ENOTCONN", "transport endpoint is not connected"},
2690 {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
2691 {109, "ETOOMANYREFS", "too many references: cannot splice"},
2692 {110, "ETIMEDOUT", "connection timed out"},
2693 {111, "ECONNREFUSED", "connection refused"},
2694 {112, "EHOSTDOWN", "host is down"},
2695 {113, "EHOSTUNREACH", "no route to host"},
2696 {114, "EALREADY", "operation already in progress"},
2697 {115, "EINPROGRESS", "operation now in progress"},
2698 {116, "ESTALE", "stale file handle"},
2699 {117, "EUCLEAN", "structure needs cleaning"},
2700 {118, "ENOTNAM", "not a XENIX named type file"},
2701 {119, "ENAVAIL", "no XENIX semaphores available"},
2702 {120, "EISNAM", "is a named type file"},
2703 {121, "EREMOTEIO", "remote I/O error"},
2704 {122, "EDQUOT", "disk quota exceeded"},
2705 {123, "ENOMEDIUM", "no medium found"},
2706 {124, "EMEDIUMTYPE", "wrong medium type"},
2707 {125, "ECANCELED", "operation canceled"},
2708 {126, "ENOKEY", "required key not available"},
2709 {127, "EKEYEXPIRED", "key has expired"},
2710 {128, "EKEYREVOKED", "key has been revoked"},
2711 {129, "EKEYREJECTED", "key was rejected by service"},
2712 {130, "EOWNERDEAD", "owner died"},
2713 {131, "ENOTRECOVERABLE", "state not recoverable"},
2714 {132, "ERFKILL", "operation not possible due to RF-kill"},
2715 {133, "EHWPOISON", "memory page has hardware error"},
21962716 }
21972717
21982718 // Signal table
2199 var signals = [...]string{
2200 1: "hangup",
2201 2: "interrupt",
2202 3: "quit",
2203 4: "illegal instruction",
2204 5: "trace/breakpoint trap",
2205 6: "aborted",
2206 7: "bus error",
2207 8: "floating point exception",
2208 9: "killed",
2209 10: "user defined signal 1",
2210 11: "segmentation fault",
2211 12: "user defined signal 2",
2212 13: "broken pipe",
2213 14: "alarm clock",
2214 15: "terminated",
2215 16: "stack fault",
2216 17: "child exited",
2217 18: "continued",
2218 19: "stopped (signal)",
2219 20: "stopped",
2220 21: "stopped (tty input)",
2221 22: "stopped (tty output)",
2222 23: "urgent I/O condition",
2223 24: "CPU time limit exceeded",
2224 25: "file size limit exceeded",
2225 26: "virtual timer expired",
2226 27: "profiling timer expired",
2227 28: "window changed",
2228 29: "I/O possible",
2229 30: "power failure",
2230 31: "bad system call",
2719 var signalList = [...]struct {
2720 num syscall.Signal
2721 name string
2722 desc string
2723 }{
2724 {1, "SIGHUP", "hangup"},
2725 {2, "SIGINT", "interrupt"},
2726 {3, "SIGQUIT", "quit"},
2727 {4, "SIGILL", "illegal instruction"},
2728 {5, "SIGTRAP", "trace/breakpoint trap"},
2729 {6, "SIGABRT", "aborted"},
2730 {7, "SIGBUS", "bus error"},
2731 {8, "SIGFPE", "floating point exception"},
2732 {9, "SIGKILL", "killed"},
2733 {10, "SIGUSR1", "user defined signal 1"},
2734 {11, "SIGSEGV", "segmentation fault"},
2735 {12, "SIGUSR2", "user defined signal 2"},
2736 {13, "SIGPIPE", "broken pipe"},
2737 {14, "SIGALRM", "alarm clock"},
2738 {15, "SIGTERM", "terminated"},
2739 {16, "SIGSTKFLT", "stack fault"},
2740 {17, "SIGCHLD", "child exited"},
2741 {18, "SIGCONT", "continued"},
2742 {19, "SIGSTOP", "stopped (signal)"},
2743 {20, "SIGTSTP", "stopped"},
2744 {21, "SIGTTIN", "stopped (tty input)"},
2745 {22, "SIGTTOU", "stopped (tty output)"},
2746 {23, "SIGURG", "urgent I/O condition"},
2747 {24, "SIGXCPU", "CPU time limit exceeded"},
2748 {25, "SIGXFSZ", "file size limit exceeded"},
2749 {26, "SIGVTALRM", "virtual timer expired"},
2750 {27, "SIGPROF", "profiling timer expired"},
2751 {28, "SIGWINCH", "window changed"},
2752 {29, "SIGIO", "I/O possible"},
2753 {30, "SIGPWR", "power failure"},
2754 {31, "SIGSYS", "bad system call"},
22312755 }
22
33 // +build arm,linux
44
5 // Created by cgo -godefs - DO NOT EDIT
5 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
66 // cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
77
88 package unix
1010 import "syscall"
1111
1212 const (
13 AAFS_MAGIC = 0x5a3c69f0
14 ADFS_SUPER_MAGIC = 0xadf5
15 AFFS_SUPER_MAGIC = 0xadff
16 AFS_FS_MAGIC = 0x6b414653
17 AFS_SUPER_MAGIC = 0x5346414f
1318 AF_ALG = 0x26
1419 AF_APPLETALK = 0x5
1520 AF_ASH = 0x12
5863 AF_VSOCK = 0x28
5964 AF_WANPIPE = 0x19
6065 AF_X25 = 0x9
66 AF_XDP = 0x2c
6167 ALG_OP_DECRYPT = 0x0
6268 ALG_OP_ENCRYPT = 0x1
6369 ALG_SET_AEAD_ASSOCLEN = 0x4
6571 ALG_SET_IV = 0x2
6672 ALG_SET_KEY = 0x1
6773 ALG_SET_OP = 0x3
74 ANON_INODE_FS_MAGIC = 0x9041934
6875 ARPHRD_6LOWPAN = 0x339
6976 ARPHRD_ADAPT = 0x108
7077 ARPHRD_APPLETLK = 0x8
120127 ARPHRD_PPP = 0x200
121128 ARPHRD_PRONET = 0x4
122129 ARPHRD_RAWHDLC = 0x206
130 ARPHRD_RAWIP = 0x207
123131 ARPHRD_ROSE = 0x10e
124132 ARPHRD_RSRVD = 0x104
125133 ARPHRD_SIT = 0x308
131139 ARPHRD_VOID = 0xffff
132140 ARPHRD_VSOCKMON = 0x33a
133141 ARPHRD_X25 = 0x10f
142 AUTOFS_SUPER_MAGIC = 0x187
134143 B0 = 0x0
135144 B1000000 = 0x1008
136145 B110 = 0x3
162171 B75 = 0x2
163172 B921600 = 0x1007
164173 B9600 = 0xd
174 BALLOON_KVM_MAGIC = 0x13661366
175 BDEVFS_MAGIC = 0x62646576
176 BINFMTFS_MAGIC = 0x42494e4d
165177 BLKBSZGET = 0x80041270
166178 BLKBSZSET = 0x40041271
167179 BLKFLSBUF = 0x1261
186198 BPF_AND = 0x50
187199 BPF_B = 0x10
188200 BPF_DIV = 0x30
201 BPF_FS_MAGIC = 0xcafe4a11
189202 BPF_H = 0x8
190203 BPF_IMM = 0x0
191204 BPF_IND = 0x40
227240 BS0 = 0x0
228241 BS1 = 0x2000
229242 BSDLY = 0x2000
243 BTRFS_SUPER_MAGIC = 0x9123683e
244 BTRFS_TEST_MAGIC = 0x73727279
230245 CAN_BCM = 0x2
231246 CAN_EFF_FLAG = 0x80000000
232247 CAN_EFF_ID_BITS = 0x1d
250265 CBAUD = 0x100f
251266 CBAUDEX = 0x1000
252267 CFLUSH = 0xf
268 CGROUP2_SUPER_MAGIC = 0x63677270
269 CGROUP_SUPER_MAGIC = 0x27e0eb
253270 CIBAUD = 0x100f0000
254271 CLOCAL = 0x800
255272 CLOCK_BOOTTIME = 0x7
292309 CLONE_VFORK = 0x4000
293310 CLONE_VM = 0x100
294311 CMSPAR = 0x40000000
312 CODA_SUPER_MAGIC = 0x73757245
295313 CR0 = 0x0
296314 CR1 = 0x200
297315 CR2 = 0x400
298316 CR3 = 0x600
317 CRAMFS_MAGIC = 0x28cd3d45
299318 CRDLY = 0x600
300319 CREAD = 0x80
301320 CRTSCTS = 0x80000000
310329 CSTOP = 0x13
311330 CSTOPB = 0x40
312331 CSUSP = 0x1a
332 DAXFS_MAGIC = 0x64646178
333 DEBUGFS_MAGIC = 0x64626720
334 DEVPTS_SUPER_MAGIC = 0x1cd1
313335 DT_BLK = 0x6
314336 DT_CHR = 0x2
315337 DT_DIR = 0x4
326348 ECHOKE = 0x800
327349 ECHONL = 0x40
328350 ECHOPRT = 0x400
351 ECRYPTFS_SUPER_MAGIC = 0xf15f
329352 EFD_CLOEXEC = 0x80000
330353 EFD_NONBLOCK = 0x800
331354 EFD_SEMAPHORE = 0x1
355 EFIVARFS_MAGIC = 0xde5e81e4
356 EFS_SUPER_MAGIC = 0x414a53
332357 ENCODING_DEFAULT = 0x0
333358 ENCODING_FM_MARK = 0x3
334359 ENCODING_FM_SPACE = 0x4
389414 ETH_P_DSA = 0x1b
390415 ETH_P_ECONET = 0x18
391416 ETH_P_EDSA = 0xdada
417 ETH_P_ERSPAN = 0x88be
418 ETH_P_ERSPAN2 = 0x22eb
392419 ETH_P_FCOE = 0x8906
393420 ETH_P_FIP = 0x8914
394421 ETH_P_HDLC = 0x19
397424 ETH_P_IEEE802154 = 0xf6
398425 ETH_P_IEEEPUP = 0xa00
399426 ETH_P_IEEEPUPAT = 0xa01
427 ETH_P_IFE = 0xed3e
400428 ETH_P_IP = 0x800
401429 ETH_P_IPV6 = 0x86dd
402430 ETH_P_IPX = 0x8137
407435 ETH_P_LOOP = 0x60
408436 ETH_P_LOOPBACK = 0x9000
409437 ETH_P_MACSEC = 0x88e5
438 ETH_P_MAP = 0xf9
410439 ETH_P_MOBITEX = 0x15
411440 ETH_P_MPLS_MC = 0x8848
412441 ETH_P_MPLS_UC = 0x8847
413442 ETH_P_MVRP = 0x88f5
414443 ETH_P_NCSI = 0x88f8
444 ETH_P_NSH = 0x894f
415445 ETH_P_PAE = 0x888e
416446 ETH_P_PAUSE = 0x8808
417447 ETH_P_PHONET = 0xf5
419449 ETH_P_PPP_DISC = 0x8863
420450 ETH_P_PPP_MP = 0x8
421451 ETH_P_PPP_SES = 0x8864
452 ETH_P_PREAUTH = 0x88c7
422453 ETH_P_PRP = 0x88fb
423454 ETH_P_PUP = 0x200
424455 ETH_P_PUPAT = 0x201
439470 ETH_P_WCCP = 0x883e
440471 ETH_P_X25 = 0x805
441472 ETH_P_XDSA = 0xf8
473 EXABYTE_ENABLE_NEST = 0xf0
474 EXT2_SUPER_MAGIC = 0xef53
475 EXT3_SUPER_MAGIC = 0xef53
476 EXT4_SUPER_MAGIC = 0xef53
442477 EXTA = 0xe
443478 EXTB = 0xf
444479 EXTPROC = 0x10000
480 F2FS_SUPER_MAGIC = 0xf2f52010
445481 FALLOC_FL_COLLAPSE_RANGE = 0x8
446482 FALLOC_FL_INSERT_RANGE = 0x20
447483 FALLOC_FL_KEEP_SIZE = 0x1
462498 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
463499 FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
464500 FS_ENCRYPTION_MODE_INVALID = 0x0
501 FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
502 FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
465503 FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
466504 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
467505 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
475513 FS_POLICY_FLAGS_PAD_8 = 0x1
476514 FS_POLICY_FLAGS_PAD_MASK = 0x3
477515 FS_POLICY_FLAGS_VALID = 0x3
516 FUTEXFS_SUPER_MAGIC = 0xbad1dea
517 F_ADD_SEALS = 0x409
478518 F_DUPFD = 0x0
479519 F_DUPFD_CLOEXEC = 0x406
480520 F_EXLCK = 0x4
487527 F_GETOWN_EX = 0x10
488528 F_GETPIPE_SZ = 0x408
489529 F_GETSIG = 0xb
530 F_GET_FILE_RW_HINT = 0x40d
531 F_GET_RW_HINT = 0x40b
532 F_GET_SEALS = 0x40a
490533 F_LOCK = 0x1
491534 F_NOTIFY = 0x402
492535 F_OFD_GETLK = 0x24
494537 F_OFD_SETLKW = 0x26
495538 F_OK = 0x0
496539 F_RDLCK = 0x0
540 F_SEAL_GROW = 0x4
541 F_SEAL_SEAL = 0x1
542 F_SEAL_SHRINK = 0x2
543 F_SEAL_WRITE = 0x8
497544 F_SETFD = 0x2
498545 F_SETFL = 0x4
499546 F_SETLEASE = 0x400
505552 F_SETOWN_EX = 0xf
506553 F_SETPIPE_SZ = 0x407
507554 F_SETSIG = 0xa
555 F_SET_FILE_RW_HINT = 0x40e
556 F_SET_RW_HINT = 0x40c
508557 F_SHLCK = 0x8
509558 F_TEST = 0x3
510559 F_TLOCK = 0x2
526575 GENL_UNS_ADMIN_PERM = 0x10
527576 GRND_NONBLOCK = 0x1
528577 GRND_RANDOM = 0x2
578 HDIO_DRIVE_CMD = 0x31f
579 HDIO_DRIVE_CMD_AEB = 0x31e
580 HDIO_DRIVE_CMD_HDR_SIZE = 0x4
581 HDIO_DRIVE_HOB_HDR_SIZE = 0x8
582 HDIO_DRIVE_RESET = 0x31c
583 HDIO_DRIVE_TASK = 0x31e
584 HDIO_DRIVE_TASKFILE = 0x31d
585 HDIO_DRIVE_TASK_HDR_SIZE = 0x8
586 HDIO_GETGEO = 0x301
587 HDIO_GET_32BIT = 0x309
588 HDIO_GET_ACOUSTIC = 0x30f
589 HDIO_GET_ADDRESS = 0x310
590 HDIO_GET_BUSSTATE = 0x31a
591 HDIO_GET_DMA = 0x30b
592 HDIO_GET_IDENTITY = 0x30d
593 HDIO_GET_KEEPSETTINGS = 0x308
594 HDIO_GET_MULTCOUNT = 0x304
595 HDIO_GET_NICE = 0x30c
596 HDIO_GET_NOWERR = 0x30a
597 HDIO_GET_QDMA = 0x305
598 HDIO_GET_UNMASKINTR = 0x302
599 HDIO_GET_WCACHE = 0x30e
600 HDIO_OBSOLETE_IDENTITY = 0x307
601 HDIO_SCAN_HWIF = 0x328
602 HDIO_SET_32BIT = 0x324
603 HDIO_SET_ACOUSTIC = 0x32c
604 HDIO_SET_ADDRESS = 0x32f
605 HDIO_SET_BUSSTATE = 0x32d
606 HDIO_SET_DMA = 0x326
607 HDIO_SET_KEEPSETTINGS = 0x323
608 HDIO_SET_MULTCOUNT = 0x321
609 HDIO_SET_NICE = 0x329
610 HDIO_SET_NOWERR = 0x325
611 HDIO_SET_PIO_MODE = 0x327
612 HDIO_SET_QDMA = 0x32e
613 HDIO_SET_UNMASKINTR = 0x322
614 HDIO_SET_WCACHE = 0x32b
615 HDIO_SET_XFER = 0x306
616 HDIO_TRISTATE_HWIF = 0x31b
617 HDIO_UNREGISTER_HWIF = 0x32a
618 HOSTFS_SUPER_MAGIC = 0xc0ffee
619 HPFS_SUPER_MAGIC = 0xf995e849
620 HUGETLBFS_MAGIC = 0x958458f6
529621 HUPCL = 0x400
530622 IBSHIFT = 0x10
531623 ICANON = 0x2
545637 IFA_F_STABLE_PRIVACY = 0x800
546638 IFA_F_TEMPORARY = 0x1
547639 IFA_F_TENTATIVE = 0x40
548 IFA_MAX = 0x8
640 IFA_MAX = 0xa
549641 IFF_ALLMULTI = 0x200
550642 IFF_ATTACH_QUEUE = 0x200
551643 IFF_AUTOMEDIA = 0x4000
560652 IFF_MASTER = 0x400
561653 IFF_MULTICAST = 0x1000
562654 IFF_MULTI_QUEUE = 0x100
655 IFF_NAPI = 0x10
656 IFF_NAPI_FRAGS = 0x20
563657 IFF_NOARP = 0x80
564658 IFF_NOFILTER = 0x1000
565659 IFF_NOTRAILERS = 0x20
622716 IN_OPEN = 0x20
623717 IN_Q_OVERFLOW = 0x4000
624718 IN_UNMOUNT = 0x2000
719 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
625720 IPPROTO_AH = 0x33
626721 IPPROTO_BEETPH = 0x5e
627722 IPPROTO_COMP = 0x6c
669764 IPV6_DONTFRAG = 0x3e
670765 IPV6_DROP_MEMBERSHIP = 0x15
671766 IPV6_DSTOPTS = 0x3b
767 IPV6_FREEBIND = 0x4e
672768 IPV6_HDRINCL = 0x24
673769 IPV6_HOPLIMIT = 0x34
674770 IPV6_HOPOPTS = 0x36
773869 IP_UNICAST_IF = 0x32
774870 IP_XFRM_POLICY = 0x11
775871 ISIG = 0x1
872 ISOFS_SUPER_MAGIC = 0x9660
776873 ISTRIP = 0x20
777874 IUCLC = 0x200
778875 IUTF8 = 0x4000
779876 IXANY = 0x800
780877 IXOFF = 0x1000
781878 IXON = 0x400
879 JFFS2_SUPER_MAGIC = 0x72b6
880 KEXEC_ARCH_386 = 0x30000
881 KEXEC_ARCH_68K = 0x40000
882 KEXEC_ARCH_AARCH64 = 0xb70000
883 KEXEC_ARCH_ARM = 0x280000
884 KEXEC_ARCH_DEFAULT = 0x0
885 KEXEC_ARCH_IA_64 = 0x320000
886 KEXEC_ARCH_MASK = 0xffff0000
887 KEXEC_ARCH_MIPS = 0x80000
888 KEXEC_ARCH_MIPS_LE = 0xa0000
889 KEXEC_ARCH_PPC = 0x140000
890 KEXEC_ARCH_PPC64 = 0x150000
891 KEXEC_ARCH_S390 = 0x160000
892 KEXEC_ARCH_SH = 0x2a0000
893 KEXEC_ARCH_X86_64 = 0x3e0000
894 KEXEC_FILE_NO_INITRAMFS = 0x4
895 KEXEC_FILE_ON_CRASH = 0x2
896 KEXEC_FILE_UNLOAD = 0x1
897 KEXEC_ON_CRASH = 0x1
898 KEXEC_PRESERVE_CONTEXT = 0x2
899 KEXEC_SEGMENT_MAX = 0x10
782900 KEYCTL_ASSUME_AUTHORITY = 0x10
783901 KEYCTL_CHOWN = 0x4
784902 KEYCTL_CLEAR = 0x7
793911 KEYCTL_JOIN_SESSION_KEYRING = 0x1
794912 KEYCTL_LINK = 0x8
795913 KEYCTL_NEGATE = 0xd
914 KEYCTL_PKEY_DECRYPT = 0x1a
915 KEYCTL_PKEY_ENCRYPT = 0x19
916 KEYCTL_PKEY_QUERY = 0x18
917 KEYCTL_PKEY_SIGN = 0x1b
918 KEYCTL_PKEY_VERIFY = 0x1c
796919 KEYCTL_READ = 0xb
797920 KEYCTL_REJECT = 0x13
798921 KEYCTL_RESTRICT_KEYRING = 0x1d
802925 KEYCTL_SETPERM = 0x5
803926 KEYCTL_SET_REQKEY_KEYRING = 0xe
804927 KEYCTL_SET_TIMEOUT = 0xf
928 KEYCTL_SUPPORTS_DECRYPT = 0x2
929 KEYCTL_SUPPORTS_ENCRYPT = 0x1
930 KEYCTL_SUPPORTS_SIGN = 0x4
931 KEYCTL_SUPPORTS_VERIFY = 0x8
805932 KEYCTL_UNLINK = 0x9
806933 KEYCTL_UPDATE = 0x2
807934 KEY_REQKEY_DEFL_DEFAULT = 0x0
843970 MADV_FREE = 0x8
844971 MADV_HUGEPAGE = 0xe
845972 MADV_HWPOISON = 0x64
973 MADV_KEEPONFORK = 0x13
846974 MADV_MERGEABLE = 0xc
847975 MADV_NOHUGEPAGE = 0xf
848976 MADV_NORMAL = 0x0
851979 MADV_SEQUENTIAL = 0x2
852980 MADV_UNMERGEABLE = 0xd
853981 MADV_WILLNEED = 0x3
982 MADV_WIPEONFORK = 0x12
854983 MAP_ANON = 0x20
855984 MAP_ANONYMOUS = 0x20
856985 MAP_DENYWRITE = 0x800
857986 MAP_EXECUTABLE = 0x1000
858987 MAP_FILE = 0x0
859988 MAP_FIXED = 0x10
989 MAP_FIXED_NOREPLACE = 0x100000
860990 MAP_GROWSDOWN = 0x100
861991 MAP_HUGETLB = 0x40000
862992 MAP_HUGE_MASK = 0x3f
867997 MAP_POPULATE = 0x8000
868998 MAP_PRIVATE = 0x2
869999 MAP_SHARED = 0x1
1000 MAP_SHARED_VALIDATE = 0x3
8701001 MAP_STACK = 0x20000
1002 MAP_SYNC = 0x80000
8711003 MAP_TYPE = 0xf
8721004 MCL_CURRENT = 0x1
8731005 MCL_FUTURE = 0x2
8741006 MCL_ONFAULT = 0x4
1007 MFD_ALLOW_SEALING = 0x2
1008 MFD_CLOEXEC = 0x1
1009 MFD_HUGETLB = 0x4
1010 MFD_HUGE_16GB = -0x78000000
1011 MFD_HUGE_16MB = 0x60000000
1012 MFD_HUGE_1GB = 0x78000000
1013 MFD_HUGE_1MB = 0x50000000
1014 MFD_HUGE_256MB = 0x70000000
1015 MFD_HUGE_2GB = 0x7c000000
1016 MFD_HUGE_2MB = 0x54000000
1017 MFD_HUGE_32MB = 0x64000000
1018 MFD_HUGE_512KB = 0x4c000000
1019 MFD_HUGE_512MB = 0x74000000
1020 MFD_HUGE_64KB = 0x40000000
1021 MFD_HUGE_8MB = 0x5c000000
1022 MFD_HUGE_MASK = 0x3f
1023 MFD_HUGE_SHIFT = 0x1a
1024 MINIX2_SUPER_MAGIC = 0x2468
1025 MINIX2_SUPER_MAGIC2 = 0x2478
1026 MINIX3_SUPER_MAGIC = 0x4d5a
1027 MINIX_SUPER_MAGIC = 0x137f
1028 MINIX_SUPER_MAGIC2 = 0x138f
8751029 MNT_DETACH = 0x2
8761030 MNT_EXPIRE = 0x4
8771031 MNT_FORCE = 0x1
1032 MODULE_INIT_IGNORE_MODVERSIONS = 0x1
1033 MODULE_INIT_IGNORE_VERMAGIC = 0x2
1034 MSDOS_SUPER_MAGIC = 0x4d44
8781035 MSG_BATCH = 0x40000
8791036 MSG_CMSG_CLOEXEC = 0x40000000
8801037 MSG_CONFIRM = 0x800
8961053 MSG_TRYHARD = 0x4
8971054 MSG_WAITALL = 0x100
8981055 MSG_WAITFORONE = 0x10000
1056 MSG_ZEROCOPY = 0x4000000
8991057 MS_ACTIVE = 0x40000000
9001058 MS_ASYNC = 0x1
9011059 MS_BIND = 0x1000
9331091 MS_SYNCHRONOUS = 0x10
9341092 MS_UNBINDABLE = 0x20000
9351093 MS_VERBOSE = 0x8000
1094 MTD_INODE_FS_MAGIC = 0x11307854
9361095 NAME_MAX = 0xff
1096 NCP_SUPER_MAGIC = 0x564c
9371097 NETLINK_ADD_MEMBERSHIP = 0x1
9381098 NETLINK_AUDIT = 0x9
9391099 NETLINK_BROADCAST_ERROR = 0x4
9471107 NETLINK_FIB_LOOKUP = 0xa
9481108 NETLINK_FIREWALL = 0x3
9491109 NETLINK_GENERIC = 0x10
1110 NETLINK_GET_STRICT_CHK = 0xc
9501111 NETLINK_INET_DIAG = 0x4
9511112 NETLINK_IP6_FW = 0xd
9521113 NETLINK_ISCSI = 0x8
9681129 NETLINK_UNUSED = 0x1
9691130 NETLINK_USERSOCK = 0x2
9701131 NETLINK_XFRM = 0x6
1132 NETNSA_MAX = 0x3
1133 NETNSA_NSID_NOT_ASSIGNED = -0x1
1134 NFNETLINK_V0 = 0x0
1135 NFNLGRP_ACCT_QUOTA = 0x8
1136 NFNLGRP_CONNTRACK_DESTROY = 0x3
1137 NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
1138 NFNLGRP_CONNTRACK_EXP_NEW = 0x4
1139 NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
1140 NFNLGRP_CONNTRACK_NEW = 0x1
1141 NFNLGRP_CONNTRACK_UPDATE = 0x2
1142 NFNLGRP_MAX = 0x9
1143 NFNLGRP_NFTABLES = 0x7
1144 NFNLGRP_NFTRACE = 0x9
1145 NFNLGRP_NONE = 0x0
1146 NFNL_BATCH_MAX = 0x1
1147 NFNL_MSG_BATCH_BEGIN = 0x10
1148 NFNL_MSG_BATCH_END = 0x11
1149 NFNL_NFA_NEST = 0x8000
1150 NFNL_SUBSYS_ACCT = 0x7
1151 NFNL_SUBSYS_COUNT = 0xc
1152 NFNL_SUBSYS_CTHELPER = 0x9
1153 NFNL_SUBSYS_CTNETLINK = 0x1
1154 NFNL_SUBSYS_CTNETLINK_EXP = 0x2
1155 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
1156 NFNL_SUBSYS_IPSET = 0x6
1157 NFNL_SUBSYS_NFTABLES = 0xa
1158 NFNL_SUBSYS_NFT_COMPAT = 0xb
1159 NFNL_SUBSYS_NONE = 0x0
1160 NFNL_SUBSYS_OSF = 0x5
1161 NFNL_SUBSYS_QUEUE = 0x3
1162 NFNL_SUBSYS_ULOG = 0x4
1163 NFS_SUPER_MAGIC = 0x6969
1164 NILFS_SUPER_MAGIC = 0x3434
9711165 NL0 = 0x0
9721166 NL1 = 0x100
9731167 NLA_ALIGNTO = 0x4
9951189 NLM_F_EXCL = 0x200
9961190 NLM_F_MATCH = 0x200
9971191 NLM_F_MULTI = 0x2
1192 NLM_F_NONREC = 0x100
9981193 NLM_F_REPLACE = 0x100
9991194 NLM_F_REQUEST = 0x1
10001195 NLM_F_ROOT = 0x100
10011196 NOFLSH = 0x80
1197 NSFS_MAGIC = 0x6e736673
1198 OCFS2_SUPER_MAGIC = 0x7461636f
10021199 OCRNL = 0x8
10031200 OFDEL = 0x80
10041201 OFILL = 0x40
10061203 ONLCR = 0x4
10071204 ONLRET = 0x20
10081205 ONOCR = 0x10
1206 OPENPROM_SUPER_MAGIC = 0x9fa1
10091207 OPOST = 0x1
1208 OVERLAYFS_SUPER_MAGIC = 0x794c7630
10101209 O_ACCMODE = 0x3
10111210 O_APPEND = 0x400
10121211 O_ASYNC = 0x2000
10521251 PACKET_FASTROUTE = 0x6
10531252 PACKET_HDRLEN = 0xb
10541253 PACKET_HOST = 0x0
1254 PACKET_IGNORE_OUTGOING = 0x17
10551255 PACKET_KERNEL = 0x7
10561256 PACKET_LOOPBACK = 0x5
10571257 PACKET_LOSS = 0xe
10911291 PERF_EVENT_IOC_DISABLE = 0x2401
10921292 PERF_EVENT_IOC_ENABLE = 0x2400
10931293 PERF_EVENT_IOC_ID = 0x80042407
1294 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b
10941295 PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
10951296 PERF_EVENT_IOC_PERIOD = 0x40082404
1297 PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
10961298 PERF_EVENT_IOC_REFRESH = 0x2402
10971299 PERF_EVENT_IOC_RESET = 0x2403
10981300 PERF_EVENT_IOC_SET_BPF = 0x40042408
10991301 PERF_EVENT_IOC_SET_FILTER = 0x40042406
11001302 PERF_EVENT_IOC_SET_OUTPUT = 0x2405
1303 PIPEFS_MAGIC = 0x50495045
1304 PPPIOCATTACH = 0x4004743d
1305 PPPIOCATTCHAN = 0x40047438
1306 PPPIOCCONNECT = 0x4004743a
1307 PPPIOCDETACH = 0x4004743c
1308 PPPIOCDISCONN = 0x7439
1309 PPPIOCGASYNCMAP = 0x80047458
1310 PPPIOCGCHAN = 0x80047437
1311 PPPIOCGDEBUG = 0x80047441
1312 PPPIOCGFLAGS = 0x8004745a
1313 PPPIOCGIDLE = 0x8008743f
1314 PPPIOCGL2TPSTATS = 0x80487436
1315 PPPIOCGMRU = 0x80047453
1316 PPPIOCGNPMODE = 0xc008744c
1317 PPPIOCGRASYNCMAP = 0x80047455
1318 PPPIOCGUNIT = 0x80047456
1319 PPPIOCGXASYNCMAP = 0x80207450
1320 PPPIOCNEWUNIT = 0xc004743e
1321 PPPIOCSACTIVE = 0x40087446
1322 PPPIOCSASYNCMAP = 0x40047457
1323 PPPIOCSCOMPRESS = 0x400c744d
1324 PPPIOCSDEBUG = 0x40047440
1325 PPPIOCSFLAGS = 0x40047459
1326 PPPIOCSMAXCID = 0x40047451
1327 PPPIOCSMRRU = 0x4004743b
1328 PPPIOCSMRU = 0x40047452
1329 PPPIOCSNPMODE = 0x4008744b
1330 PPPIOCSPASS = 0x40087447
1331 PPPIOCSRASYNCMAP = 0x40047454
1332 PPPIOCSXASYNCMAP = 0x4020744f
1333 PPPIOCXFERUNIT = 0x744e
11011334 PRIO_PGRP = 0x1
11021335 PRIO_PROCESS = 0x0
11031336 PRIO_USER = 0x2
1337 PROC_SUPER_MAGIC = 0x9fa0
11041338 PROT_EXEC = 0x4
11051339 PROT_GROWSDOWN = 0x1000000
11061340 PROT_GROWSUP = 0x2000000
11431377 PR_GET_PDEATHSIG = 0x2
11441378 PR_GET_SECCOMP = 0x15
11451379 PR_GET_SECUREBITS = 0x1b
1380 PR_GET_SPECULATION_CTRL = 0x34
11461381 PR_GET_THP_DISABLE = 0x2a
11471382 PR_GET_TID_ADDRESS = 0x28
11481383 PR_GET_TIMERSLACK = 0x1e
11881423 PR_SET_PTRACER_ANY = 0xffffffff
11891424 PR_SET_SECCOMP = 0x16
11901425 PR_SET_SECUREBITS = 0x1c
1426 PR_SET_SPECULATION_CTRL = 0x35
11911427 PR_SET_THP_DISABLE = 0x29
11921428 PR_SET_TIMERSLACK = 0x1d
11931429 PR_SET_TIMING = 0xe
11941430 PR_SET_TSC = 0x1a
11951431 PR_SET_UNALIGN = 0x6
1432 PR_SPEC_DISABLE = 0x4
1433 PR_SPEC_ENABLE = 0x2
1434 PR_SPEC_FORCE_DISABLE = 0x8
1435 PR_SPEC_INDIRECT_BRANCH = 0x1
1436 PR_SPEC_NOT_AFFECTED = 0x0
1437 PR_SPEC_PRCTL = 0x1
1438 PR_SPEC_STORE_BYPASS = 0x0
1439 PR_SVE_GET_VL = 0x33
1440 PR_SVE_SET_VL = 0x32
1441 PR_SVE_SET_VL_ONEXEC = 0x40000
1442 PR_SVE_VL_INHERIT = 0x20000
1443 PR_SVE_VL_LEN_MASK = 0xffff
11961444 PR_TASK_PERF_EVENTS_DISABLE = 0x1f
11971445 PR_TASK_PERF_EVENTS_ENABLE = 0x20
11981446 PR_TIMING_STATISTICAL = 0x0
12011449 PR_TSC_SIGSEGV = 0x2
12021450 PR_UNALIGN_NOPRINT = 0x1
12031451 PR_UNALIGN_SIGBUS = 0x2
1452 PSTOREFS_MAGIC = 0x6165676c
12041453 PTRACE_ATTACH = 0x10
12051454 PTRACE_CONT = 0x7
12061455 PTRACE_DETACH = 0x11
12141463 PTRACE_EVENT_VFORK_DONE = 0x5
12151464 PTRACE_GETCRUNCHREGS = 0x19
12161465 PTRACE_GETEVENTMSG = 0x4201
1466 PTRACE_GETFDPIC = 0x1f
1467 PTRACE_GETFDPIC_EXEC = 0x0
1468 PTRACE_GETFDPIC_INTERP = 0x1
12171469 PTRACE_GETFPREGS = 0xe
12181470 PTRACE_GETHBPREGS = 0x1d
12191471 PTRACE_GETREGS = 0xc
12471499 PTRACE_POKETEXT = 0x4
12481500 PTRACE_POKEUSR = 0x6
12491501 PTRACE_SECCOMP_GET_FILTER = 0x420c
1502 PTRACE_SECCOMP_GET_METADATA = 0x420d
12501503 PTRACE_SEIZE = 0x4206
12511504 PTRACE_SETCRUNCHREGS = 0x1a
12521505 PTRACE_SETFPREGS = 0xf
12651518 PT_DATA_ADDR = 0x10004
12661519 PT_TEXT_ADDR = 0x10000
12671520 PT_TEXT_END_ADDR = 0x10008
1521 QNX4_SUPER_MAGIC = 0x2f
1522 QNX6_SUPER_MAGIC = 0x68191122
1523 RAMFS_MAGIC = 0x858458f6
1524 RDTGROUP_SUPER_MAGIC = 0x7655821
1525 REISERFS_SUPER_MAGIC = 0x52654973
1526 RENAME_EXCHANGE = 0x2
1527 RENAME_NOREPLACE = 0x1
1528 RENAME_WHITEOUT = 0x4
12681529 RLIMIT_AS = 0x9
12691530 RLIMIT_CORE = 0x4
12701531 RLIMIT_CPU = 0x0
12811542 RLIMIT_RTTIME = 0xf
12821543 RLIMIT_SIGPENDING = 0xb
12831544 RLIMIT_STACK = 0x3
1284 RLIM_INFINITY = -0x1
1545 RLIM_INFINITY = 0xffffffffffffffff
12851546 RTAX_ADVMSS = 0x8
12861547 RTAX_CC_ALGO = 0x10
12871548 RTAX_CWND = 0x7
1549 RTAX_FASTOPEN_NO_COOKIE = 0x11
12881550 RTAX_FEATURES = 0xc
12891551 RTAX_FEATURE_ALLFRAG = 0x8
12901552 RTAX_FEATURE_ECN = 0x1
12951557 RTAX_INITCWND = 0xb
12961558 RTAX_INITRWND = 0xe
12971559 RTAX_LOCK = 0x1
1298 RTAX_MAX = 0x10
1560 RTAX_MAX = 0x11
12991561 RTAX_MTU = 0x2
13001562 RTAX_QUICKACK = 0xf
13011563 RTAX_REORDERING = 0x9
13061568 RTAX_UNSPEC = 0x0
13071569 RTAX_WINDOW = 0x3
13081570 RTA_ALIGNTO = 0x4
1309 RTA_MAX = 0x1a
1571 RTA_MAX = 0x1d
13101572 RTCF_DIRECTSRC = 0x4000000
13111573 RTCF_DOREDIRECT = 0x1000000
13121574 RTCF_LOG = 0x2000000
13131575 RTCF_MASQ = 0x400000
13141576 RTCF_NAT = 0x800000
13151577 RTCF_VALVE = 0x200000
1578 RTC_AF = 0x20
1579 RTC_AIE_OFF = 0x7002
1580 RTC_AIE_ON = 0x7001
1581 RTC_ALM_READ = 0x80247008
1582 RTC_ALM_SET = 0x40247007
1583 RTC_EPOCH_READ = 0x8004700d
1584 RTC_EPOCH_SET = 0x4004700e
1585 RTC_IRQF = 0x80
1586 RTC_IRQP_READ = 0x8004700b
1587 RTC_IRQP_SET = 0x4004700c
1588 RTC_MAX_FREQ = 0x2000
1589 RTC_PF = 0x40
1590 RTC_PIE_OFF = 0x7006
1591 RTC_PIE_ON = 0x7005
1592 RTC_PLL_GET = 0x801c7011
1593 RTC_PLL_SET = 0x401c7012
1594 RTC_RD_TIME = 0x80247009
1595 RTC_SET_TIME = 0x4024700a
1596 RTC_UF = 0x10
1597 RTC_UIE_OFF = 0x7004
1598 RTC_UIE_ON = 0x7003
1599 RTC_VL_CLR = 0x7014
1600 RTC_VL_READ = 0x80047013
1601 RTC_WIE_OFF = 0x7010
1602 RTC_WIE_ON = 0x700f
1603 RTC_WKALM_RD = 0x80287010
1604 RTC_WKALM_SET = 0x4028700f
13161605 RTF_ADDRCLASSMASK = 0xf8000000
13171606 RTF_ADDRCONF = 0x40000
13181607 RTF_ALLONLINK = 0x20000
13471636 RTM_DELACTION = 0x31
13481637 RTM_DELADDR = 0x15
13491638 RTM_DELADDRLABEL = 0x49
1639 RTM_DELCHAIN = 0x65
13501640 RTM_DELLINK = 0x11
13511641 RTM_DELMDB = 0x55
13521642 RTM_DELNEIGH = 0x1d
13671657 RTM_GETADDR = 0x16
13681658 RTM_GETADDRLABEL = 0x4a
13691659 RTM_GETANYCAST = 0x3e
1660 RTM_GETCHAIN = 0x66
13701661 RTM_GETDCB = 0x4e
13711662 RTM_GETLINK = 0x12
13721663 RTM_GETMDB = 0x56
13811672 RTM_GETSTATS = 0x5e
13821673 RTM_GETTCLASS = 0x2a
13831674 RTM_GETTFILTER = 0x2e
1384 RTM_MAX = 0x63
1675 RTM_MAX = 0x67
13851676 RTM_NEWACTION = 0x30
13861677 RTM_NEWADDR = 0x14
13871678 RTM_NEWADDRLABEL = 0x48
13881679 RTM_NEWCACHEREPORT = 0x60
1680 RTM_NEWCHAIN = 0x64
13891681 RTM_NEWLINK = 0x10
13901682 RTM_NEWMDB = 0x54
13911683 RTM_NEWNDUSEROPT = 0x44
14001692 RTM_NEWSTATS = 0x5c
14011693 RTM_NEWTCLASS = 0x28
14021694 RTM_NEWTFILTER = 0x2c
1403 RTM_NR_FAMILIES = 0x15
1404 RTM_NR_MSGTYPES = 0x54
1695 RTM_NR_FAMILIES = 0x16
1696 RTM_NR_MSGTYPES = 0x58
14051697 RTM_SETDCB = 0x4f
14061698 RTM_SETLINK = 0x13
14071699 RTM_SETNEIGHTBL = 0x43
14151707 RTNH_F_UNRESOLVED = 0x20
14161708 RTN_MAX = 0xb
14171709 RTPROT_BABEL = 0x2a
1710 RTPROT_BGP = 0xba
14181711 RTPROT_BIRD = 0xc
14191712 RTPROT_BOOT = 0x3
14201713 RTPROT_DHCP = 0x10
14211714 RTPROT_DNROUTED = 0xd
1715 RTPROT_EIGRP = 0xc0
14221716 RTPROT_GATED = 0x8
1717 RTPROT_ISIS = 0xbb
14231718 RTPROT_KERNEL = 0x2
14241719 RTPROT_MROUTED = 0x11
14251720 RTPROT_MRT = 0xa
14261721 RTPROT_NTK = 0xf
1722 RTPROT_OSPF = 0xbc
14271723 RTPROT_RA = 0x9
14281724 RTPROT_REDIRECT = 0x1
1725 RTPROT_RIP = 0xbd
14291726 RTPROT_STATIC = 0x4
14301727 RTPROT_UNSPEC = 0x0
14311728 RTPROT_XORP = 0xe
14451742 SCM_TIMESTAMPING_OPT_STATS = 0x36
14461743 SCM_TIMESTAMPING_PKTINFO = 0x3a
14471744 SCM_TIMESTAMPNS = 0x23
1745 SCM_TXTIME = 0x3d
14481746 SCM_WIFI_STATUS = 0x29
1747 SC_LOG_FLUSH = 0x100000
14491748 SECCOMP_MODE_DISABLED = 0x0
14501749 SECCOMP_MODE_FILTER = 0x2
14511750 SECCOMP_MODE_STRICT = 0x1
1751 SECURITYFS_MAGIC = 0x73636673
1752 SELINUX_MAGIC = 0xf97cff8c
1753 SFD_CLOEXEC = 0x80000
1754 SFD_NONBLOCK = 0x800
14521755 SHUT_RD = 0x0
14531756 SHUT_RDWR = 0x2
14541757 SHUT_WR = 0x1
14991802 SIOCGMIIPHY = 0x8947
15001803 SIOCGMIIREG = 0x8948
15011804 SIOCGPGRP = 0x8904
1805 SIOCGPPPCSTATS = 0x89f2
1806 SIOCGPPPSTATS = 0x89f0
1807 SIOCGPPPVER = 0x89f1
15021808 SIOCGRARP = 0x8961
15031809 SIOCGSKNS = 0x894c
15041810 SIOCGSTAMP = 0x8906
15331839 SIOCSPGRP = 0x8902
15341840 SIOCSRARP = 0x8962
15351841 SIOCWANDEV = 0x894a
1842 SMACK_MAGIC = 0x43415d53
1843 SMART_AUTOSAVE = 0xd2
1844 SMART_AUTO_OFFLINE = 0xdb
1845 SMART_DISABLE = 0xd9
1846 SMART_ENABLE = 0xd8
1847 SMART_HCYL_PASS = 0xc2
1848 SMART_IMMEDIATE_OFFLINE = 0xd4
1849 SMART_LCYL_PASS = 0x4f
1850 SMART_READ_LOG_SECTOR = 0xd5
1851 SMART_READ_THRESHOLDS = 0xd1
1852 SMART_READ_VALUES = 0xd0
1853 SMART_SAVE = 0xd3
1854 SMART_STATUS = 0xda
1855 SMART_WRITE_LOG_SECTOR = 0xd6
1856 SMART_WRITE_THRESHOLDS = 0xd7
1857 SMB_SUPER_MAGIC = 0x517b
1858 SOCKFS_MAGIC = 0x534f434b
15361859 SOCK_CLOEXEC = 0x80000
15371860 SOCK_DCCP = 0x6
15381861 SOCK_DGRAM = 0x2
15691892 SOL_SOCKET = 0x1
15701893 SOL_TCP = 0x6
15711894 SOL_TIPC = 0x10f
1895 SOL_TLS = 0x11a
15721896 SOL_X25 = 0x106
1897 SOL_XDP = 0x11b
15731898 SOMAXCONN = 0x80
15741899 SO_ACCEPTCONN = 0x1e
15751900 SO_ATTACH_BPF = 0x32
16281953 SO_TIMESTAMP = 0x1d
16291954 SO_TIMESTAMPING = 0x25
16301955 SO_TIMESTAMPNS = 0x23
1956 SO_TXTIME = 0x3d
16311957 SO_TYPE = 0x3
16321958 SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
16331959 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
16371963 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
16381964 SO_VM_SOCKETS_TRUSTED = 0x5
16391965 SO_WIFI_STATUS = 0x29
1966 SO_ZEROCOPY = 0x3c
16401967 SPLICE_F_GIFT = 0x8
16411968 SPLICE_F_MORE = 0x4
16421969 SPLICE_F_MOVE = 0x1
16431970 SPLICE_F_NONBLOCK = 0x2
1971 SQUASHFS_MAGIC = 0x73717368
1972 STACK_END_MAGIC = 0x57ac6e9d
1973 STATX_ALL = 0xfff
1974 STATX_ATIME = 0x20
1975 STATX_ATTR_APPEND = 0x20
1976 STATX_ATTR_AUTOMOUNT = 0x1000
1977 STATX_ATTR_COMPRESSED = 0x4
1978 STATX_ATTR_ENCRYPTED = 0x800
1979 STATX_ATTR_IMMUTABLE = 0x10
1980 STATX_ATTR_NODUMP = 0x40
1981 STATX_BASIC_STATS = 0x7ff
1982 STATX_BLOCKS = 0x400
1983 STATX_BTIME = 0x800
1984 STATX_CTIME = 0x80
1985 STATX_GID = 0x10
1986 STATX_INO = 0x100
1987 STATX_MODE = 0x2
1988 STATX_MTIME = 0x40
1989 STATX_NLINK = 0x4
1990 STATX_SIZE = 0x200
1991 STATX_TYPE = 0x1
1992 STATX_UID = 0x8
1993 STATX__RESERVED = 0x80000000
1994 SYNC_FILE_RANGE_WAIT_AFTER = 0x4
1995 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
1996 SYNC_FILE_RANGE_WRITE = 0x2
1997 SYSFS_MAGIC = 0x62656572
16441998 S_BLKSIZE = 0x200
16451999 S_IEXEC = 0x40
16462000 S_IFBLK = 0x6000
16782032 TASKSTATS_GENL_NAME = "TASKSTATS"
16792033 TASKSTATS_GENL_VERSION = 0x1
16802034 TASKSTATS_TYPE_MAX = 0x6
1681 TASKSTATS_VERSION = 0x8
2035 TASKSTATS_VERSION = 0x9
16822036 TCFLSH = 0x540b
16832037 TCGETA = 0x5405
16842038 TCGETS = 0x5401
17032057 TCP_DEFER_ACCEPT = 0x9
17042058 TCP_FASTOPEN = 0x17
17052059 TCP_FASTOPEN_CONNECT = 0x1e
2060 TCP_FASTOPEN_KEY = 0x21
2061 TCP_FASTOPEN_NO_COOKIE = 0x22
17062062 TCP_INFO = 0xb
17072063 TCP_KEEPCNT = 0x6
17082064 TCP_KEEPIDLE = 0x4
17122068 TCP_MAXWIN = 0xffff
17132069 TCP_MAX_WINSHIFT = 0xe
17142070 TCP_MD5SIG = 0xe
2071 TCP_MD5SIG_EXT = 0x20
2072 TCP_MD5SIG_FLAG_PREFIX = 0x1
17152073 TCP_MD5SIG_MAXKEYLEN = 0x50
17162074 TCP_MSS = 0x200
17172075 TCP_MSS_DEFAULT = 0x218
17322090 TCP_THIN_DUPACK = 0x11
17332091 TCP_THIN_LINEAR_TIMEOUTS = 0x10
17342092 TCP_TIMESTAMP = 0x18
2093 TCP_ULP = 0x1f
17352094 TCP_USER_TIMEOUT = 0x12
17362095 TCP_WINDOW_CLAMP = 0xa
17372096 TCSAFLUSH = 0x2
17502109 TCSETXF = 0x5434
17512110 TCSETXW = 0x5435
17522111 TCXONC = 0x540a
2112 TIMER_ABSTIME = 0x1
17532113 TIOCCBRK = 0x5428
17542114 TIOCCONS = 0x541d
17552115 TIOCEXCL = 0x540c
17572117 TIOCGETD = 0x5424
17582118 TIOCGEXCL = 0x80045440
17592119 TIOCGICOUNT = 0x545d
2120 TIOCGISO7816 = 0x80285442
17602121 TIOCGLCKTRMIOS = 0x5456
17612122 TIOCGPGRP = 0x540f
17622123 TIOCGPKT = 0x80045438
18102171 TIOCSER_TEMT = 0x1
18112172 TIOCSETD = 0x5423
18122173 TIOCSIG = 0x40045436
2174 TIOCSISO7816 = 0xc0285443
18132175 TIOCSLCKTRMIOS = 0x5457
18142176 TIOCSPGRP = 0x5410
18152177 TIOCSPTLCK = 0x40045431
18192181 TIOCSTI = 0x5412
18202182 TIOCSWINSZ = 0x5414
18212183 TIOCVHANGUP = 0x5437
2184 TMPFS_MAGIC = 0x1021994
18222185 TOSTOP = 0x100
2186 TPACKET_ALIGNMENT = 0x10
2187 TPACKET_HDRLEN = 0x34
2188 TP_STATUS_AVAILABLE = 0x0
2189 TP_STATUS_BLK_TMO = 0x20
2190 TP_STATUS_COPY = 0x2
2191 TP_STATUS_CSUMNOTREADY = 0x8
2192 TP_STATUS_CSUM_VALID = 0x80
2193 TP_STATUS_KERNEL = 0x0
2194 TP_STATUS_LOSING = 0x4
2195 TP_STATUS_SENDING = 0x2
2196 TP_STATUS_SEND_REQUEST = 0x1
2197 TP_STATUS_TS_RAW_HARDWARE = -0x80000000
2198 TP_STATUS_TS_SOFTWARE = 0x20000000
2199 TP_STATUS_TS_SYS_HARDWARE = 0x40000000
2200 TP_STATUS_USER = 0x1
2201 TP_STATUS_VLAN_TPID_VALID = 0x40
2202 TP_STATUS_VLAN_VALID = 0x10
2203 TP_STATUS_WRONG_FORMAT = 0x4
2204 TRACEFS_MAGIC = 0x74726163
18232205 TS_COMM_LEN = 0x20
18242206 TUNATTACHFILTER = 0x400854d5
18252207 TUNDETACHFILTER = 0x400854d6
18312213 TUNGETVNETHDRSZ = 0x800454d7
18322214 TUNGETVNETLE = 0x800454dd
18332215 TUNSETDEBUG = 0x400454c9
2216 TUNSETFILTEREBPF = 0x800454e1
18342217 TUNSETGROUP = 0x400454ce
18352218 TUNSETIFF = 0x400454ca
18362219 TUNSETIFINDEX = 0x400454da
18412224 TUNSETPERSIST = 0x400454cb
18422225 TUNSETQUEUE = 0x400454d9
18432226 TUNSETSNDBUF = 0x400454d4
2227 TUNSETSTEERINGEBPF = 0x800454e0
18442228 TUNSETTXFILTER = 0x400454d1
18452229 TUNSETVNETBE = 0x400454de
18462230 TUNSETVNETHDRSZ = 0x400454d8
18472231 TUNSETVNETLE = 0x400454dc
2232 UBI_IOCATT = 0x40186f40
2233 UBI_IOCDET = 0x40046f41
2234 UBI_IOCEBCH = 0x40044f02
2235 UBI_IOCEBER = 0x40044f01
2236 UBI_IOCEBISMAP = 0x80044f05
2237 UBI_IOCEBMAP = 0x40084f03
2238 UBI_IOCEBUNMAP = 0x40044f04
2239 UBI_IOCMKVOL = 0x40986f00
2240 UBI_IOCRMVOL = 0x40046f01
2241 UBI_IOCRNVOL = 0x51106f03
2242 UBI_IOCRSVOL = 0x400c6f02
2243 UBI_IOCSETVOLPROP = 0x40104f06
2244 UBI_IOCVOLCRBLK = 0x40804f07
2245 UBI_IOCVOLRMBLK = 0x4f08
2246 UBI_IOCVOLUP = 0x40084f00
2247 UDF_SUPER_MAGIC = 0x15013346
18482248 UMOUNT_NOFOLLOW = 0x8
2249 USBDEVICE_SUPER_MAGIC = 0x9fa2
2250 UTIME_NOW = 0x3fffffff
2251 UTIME_OMIT = 0x3ffffffe
2252 V9FS_MAGIC = 0x1021997
18492253 VDISCARD = 0xd
18502254 VEOF = 0x4
18512255 VEOL = 0xb
18752279 WALL = 0x40000000
18762280 WCLONE = 0x80000000
18772281 WCONTINUED = 0x8
2282 WDIOC_GETBOOTSTATUS = 0x80045702
2283 WDIOC_GETPRETIMEOUT = 0x80045709
2284 WDIOC_GETSTATUS = 0x80045701
2285 WDIOC_GETSUPPORT = 0x80285700
2286 WDIOC_GETTEMP = 0x80045703
2287 WDIOC_GETTIMELEFT = 0x8004570a
2288 WDIOC_GETTIMEOUT = 0x80045707
2289 WDIOC_KEEPALIVE = 0x80045705
2290 WDIOC_SETOPTIONS = 0x80045704
2291 WDIOC_SETPRETIMEOUT = 0xc0045708
2292 WDIOC_SETTIMEOUT = 0xc0045706
18782293 WEXITED = 0x4
2294 WIN_ACKMEDIACHANGE = 0xdb
2295 WIN_CHECKPOWERMODE1 = 0xe5
2296 WIN_CHECKPOWERMODE2 = 0x98
2297 WIN_DEVICE_RESET = 0x8
2298 WIN_DIAGNOSE = 0x90
2299 WIN_DOORLOCK = 0xde
2300 WIN_DOORUNLOCK = 0xdf
2301 WIN_DOWNLOAD_MICROCODE = 0x92
2302 WIN_FLUSH_CACHE = 0xe7
2303 WIN_FLUSH_CACHE_EXT = 0xea
2304 WIN_FORMAT = 0x50
2305 WIN_GETMEDIASTATUS = 0xda
2306 WIN_IDENTIFY = 0xec
2307 WIN_IDENTIFY_DMA = 0xee
2308 WIN_IDLEIMMEDIATE = 0xe1
2309 WIN_INIT = 0x60
2310 WIN_MEDIAEJECT = 0xed
2311 WIN_MULTREAD = 0xc4
2312 WIN_MULTREAD_EXT = 0x29
2313 WIN_MULTWRITE = 0xc5
2314 WIN_MULTWRITE_EXT = 0x39
2315 WIN_NOP = 0x0
2316 WIN_PACKETCMD = 0xa0
2317 WIN_PIDENTIFY = 0xa1
2318 WIN_POSTBOOT = 0xdc
2319 WIN_PREBOOT = 0xdd
2320 WIN_QUEUED_SERVICE = 0xa2
2321 WIN_READ = 0x20
2322 WIN_READDMA = 0xc8
2323 WIN_READDMA_EXT = 0x25
2324 WIN_READDMA_ONCE = 0xc9
2325 WIN_READDMA_QUEUED = 0xc7
2326 WIN_READDMA_QUEUED_EXT = 0x26
2327 WIN_READ_BUFFER = 0xe4
2328 WIN_READ_EXT = 0x24
2329 WIN_READ_LONG = 0x22
2330 WIN_READ_LONG_ONCE = 0x23
2331 WIN_READ_NATIVE_MAX = 0xf8
2332 WIN_READ_NATIVE_MAX_EXT = 0x27
2333 WIN_READ_ONCE = 0x21
2334 WIN_RECAL = 0x10
2335 WIN_RESTORE = 0x10
2336 WIN_SECURITY_DISABLE = 0xf6
2337 WIN_SECURITY_ERASE_PREPARE = 0xf3
2338 WIN_SECURITY_ERASE_UNIT = 0xf4
2339 WIN_SECURITY_FREEZE_LOCK = 0xf5
2340 WIN_SECURITY_SET_PASS = 0xf1
2341 WIN_SECURITY_UNLOCK = 0xf2
2342 WIN_SEEK = 0x70
2343 WIN_SETFEATURES = 0xef
2344 WIN_SETIDLE1 = 0xe3
2345 WIN_SETIDLE2 = 0x97
2346 WIN_SETMULT = 0xc6
2347 WIN_SET_MAX = 0xf9
2348 WIN_SET_MAX_EXT = 0x37
2349 WIN_SLEEPNOW1 = 0xe6
2350 WIN_SLEEPNOW2 = 0x99
2351 WIN_SMART = 0xb0
2352 WIN_SPECIFY = 0x91
2353 WIN_SRST = 0x8
2354 WIN_STANDBY = 0xe2
2355 WIN_STANDBY2 = 0x96
2356 WIN_STANDBYNOW1 = 0xe0
2357 WIN_STANDBYNOW2 = 0x94
2358 WIN_VERIFY = 0x40
2359 WIN_VERIFY_EXT = 0x42
2360 WIN_VERIFY_ONCE = 0x41
2361 WIN_WRITE = 0x30
2362 WIN_WRITEDMA = 0xca
2363 WIN_WRITEDMA_EXT = 0x35
2364 WIN_WRITEDMA_ONCE = 0xcb
2365 WIN_WRITEDMA_QUEUED = 0xcc
2366 WIN_WRITEDMA_QUEUED_EXT = 0x36
2367 WIN_WRITE_BUFFER = 0xe8
2368 WIN_WRITE_EXT = 0x34
2369 WIN_WRITE_LONG = 0x32
2370 WIN_WRITE_LONG_ONCE = 0x33
2371 WIN_WRITE_ONCE = 0x31
2372 WIN_WRITE_SAME = 0xe9
2373 WIN_WRITE_VERIFY = 0x3c
18792374 WNOHANG = 0x1
18802375 WNOTHREAD = 0x20000000
18812376 WNOWAIT = 0x1000000
18852380 XATTR_CREATE = 0x1
18862381 XATTR_REPLACE = 0x2
18872382 XCASE = 0x4
2383 XDP_COPY = 0x2
2384 XDP_FLAGS_DRV_MODE = 0x4
2385 XDP_FLAGS_HW_MODE = 0x8
2386 XDP_FLAGS_MASK = 0xf
2387 XDP_FLAGS_MODES = 0xe
2388 XDP_FLAGS_SKB_MODE = 0x2
2389 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
2390 XDP_MMAP_OFFSETS = 0x1
2391 XDP_PGOFF_RX_RING = 0x0
2392 XDP_PGOFF_TX_RING = 0x80000000
2393 XDP_RX_RING = 0x2
2394 XDP_SHARED_UMEM = 0x1
2395 XDP_STATISTICS = 0x7
2396 XDP_TX_RING = 0x3
2397 XDP_UMEM_COMPLETION_RING = 0x6
2398 XDP_UMEM_FILL_RING = 0x5
2399 XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
2400 XDP_UMEM_PGOFF_FILL_RING = 0x100000000
2401 XDP_UMEM_REG = 0x4
2402 XDP_ZEROCOPY = 0x4
2403 XENFS_SUPER_MAGIC = 0xabba1974
2404 XFS_SUPER_MAGIC = 0x58465342
18882405 XTABS = 0x1800
2406 ZSMALLOC_MAGIC = 0x58295829
18892407 )
18902408
18912409 // Errors
20652583 )
20662584
20672585 // Error table
2068 var errors = [...]string{
2069 1: "operation not permitted",
2070 2: "no such file or directory",
2071 3: "no such process",
2072 4: "interrupted system call",
2073 5: "input/output error",
2074 6: "no such device or address",
2075 7: "argument list too long",
2076 8: "exec format error",
2077 9: "bad file descriptor",
2078 10: "no child processes",
2079 11: "resource temporarily unavailable",
2080 12: "cannot allocate memory",
2081 13: "permission denied",
2082 14: "bad address",
2083 15: "block device required",
2084 16: "device or resource busy",
2085 17: "file exists",
2086 18: "invalid cross-device link",
2087 19: "no such device",
2088 20: "not a directory",
2089 21: "is a directory",
2090 22: "invalid argument",
2091 23: "too many open files in system",
2092 24: "too many open files",
2093 25: "inappropriate ioctl for device",
2094 26: "text file busy",
2095 27: "file too large",
2096 28: "no space left on device",
2097 29: "illegal seek",
2098 30: "read-only file system",
2099 31: "too many links",
2100 32: "broken pipe",
2101 33: "numerical argument out of domain",
2102 34: "numerical result out of range",
2103 35: "resource deadlock avoided",
2104 36: "file name too long",
2105 37: "no locks available",
2106 38: "function not implemented",
2107 39: "directory not empty",
2108 40: "too many levels of symbolic links",
2109 42: "no message of desired type",
2110 43: "identifier removed",
2111 44: "channel number out of range",
2112 45: "level 2 not synchronized",
2113 46: "level 3 halted",
2114 47: "level 3 reset",
2115 48: "link number out of range",
2116 49: "protocol driver not attached",
2117 50: "no CSI structure available",
2118 51: "level 2 halted",
2119 52: "invalid exchange",
2120 53: "invalid request descriptor",
2121 54: "exchange full",
2122 55: "no anode",
2123 56: "invalid request code",
2124 57: "invalid slot",
2125 59: "bad font file format",
2126 60: "device not a stream",
2127 61: "no data available",
2128 62: "timer expired",
2129 63: "out of streams resources",
2130 64: "machine is not on the network",
2131 65: "package not installed",
2132 66: "object is remote",
2133 67: "link has been severed",
2134 68: "advertise error",
2135 69: "srmount error",
2136 70: "communication error on send",
2137 71: "protocol error",
2138 72: "multihop attempted",
2139 73: "RFS specific error",
2140 74: "bad message",
2141 75: "value too large for defined data type",
2142 76: "name not unique on network",
2143 77: "file descriptor in bad state",
2144 78: "remote address changed",
2145 79: "can not access a needed shared library",
2146 80: "accessing a corrupted shared library",
2147 81: ".lib section in a.out corrupted",
2148 82: "attempting to link in too many shared libraries",
2149 83: "cannot exec a shared library directly",
2150 84: "invalid or incomplete multibyte or wide character",
2151 85: "interrupted system call should be restarted",
2152 86: "streams pipe error",
2153 87: "too many users",
2154 88: "socket operation on non-socket",
2155 89: "destination address required",
2156 90: "message too long",
2157 91: "protocol wrong type for socket",
2158 92: "protocol not available",
2159 93: "protocol not supported",
2160 94: "socket type not supported",
2161 95: "operation not supported",
2162 96: "protocol family not supported",
2163 97: "address family not supported by protocol",
2164 98: "address already in use",
2165 99: "cannot assign requested address",
2166 100: "network is down",
2167 101: "network is unreachable",
2168 102: "network dropped connection on reset",
2169 103: "software caused connection abort",
2170 104: "connection reset by peer",
2171 105: "no buffer space available",
2172 106: "transport endpoint is already connected",
2173 107: "transport endpoint is not connected",
2174 108: "cannot send after transport endpoint shutdown",
2175 109: "too many references: cannot splice",
2176 110: "connection timed out",
2177 111: "connection refused",
2178 112: "host is down",
2179 113: "no route to host",
2180 114: "operation already in progress",
2181 115: "operation now in progress",
2182 116: "stale file handle",
2183 117: "structure needs cleaning",
2184 118: "not a XENIX named type file",
2185 119: "no XENIX semaphores available",
2186 120: "is a named type file",
2187 121: "remote I/O error",
2188 122: "disk quota exceeded",
2189 123: "no medium found",
2190 124: "wrong medium type",
2191 125: "operation canceled",
2192 126: "required key not available",
2193 127: "key has expired",
2194 128: "key has been revoked",
2195 129: "key was rejected by service",
2196 130: "owner died",
2197 131: "state not recoverable",
2198 132: "operation not possible due to RF-kill",
2199 133: "memory page has hardware error",
2586 var errorList = [...]struct {
2587 num syscall.Errno
2588 name string
2589 desc string
2590 }{
2591 {1, "EPERM", "operation not permitted"},
2592 {2, "ENOENT", "no such file or directory"},
2593 {3, "ESRCH", "no such process"},
2594 {4, "EINTR", "interrupted system call"},
2595 {5, "EIO", "input/output error"},
2596 {6, "ENXIO", "no such device or address"},
2597 {7, "E2BIG", "argument list too long"},
2598 {8, "ENOEXEC", "exec format error"},
2599 {9, "EBADF", "bad file descriptor"},
2600 {10, "ECHILD", "no child processes"},
2601 {11, "EAGAIN", "resource temporarily unavailable"},
2602 {12, "ENOMEM", "cannot allocate memory"},
2603 {13, "EACCES", "permission denied"},
2604 {14, "EFAULT", "bad address"},
2605 {15, "ENOTBLK", "block device required"},
2606 {16, "EBUSY", "device or resource busy"},
2607 {17, "EEXIST", "file exists"},
2608 {18, "EXDEV", "invalid cross-device link"},
2609 {19, "ENODEV", "no such device"},
2610 {20, "ENOTDIR", "not a directory"},
2611 {21, "EISDIR", "is a directory"},
2612 {22, "EINVAL", "invalid argument"},
2613 {23, "ENFILE", "too many open files in system"},
2614 {24, "EMFILE", "too many open files"},
2615 {25, "ENOTTY", "inappropriate ioctl for device"},
2616 {26, "ETXTBSY", "text file busy"},
2617 {27, "EFBIG", "file too large"},
2618 {28, "ENOSPC", "no space left on device"},
2619 {29, "ESPIPE", "illegal seek"},
2620 {30, "EROFS", "read-only file system"},
2621 {31, "EMLINK", "too many links"},
2622 {32, "EPIPE", "broken pipe"},
2623 {33, "EDOM", "numerical argument out of domain"},
2624 {34, "ERANGE", "numerical result out of range"},
2625 {35, "EDEADLK", "resource deadlock avoided"},
2626 {36, "ENAMETOOLONG", "file name too long"},
2627 {37, "ENOLCK", "no locks available"},
2628 {38, "ENOSYS", "function not implemented"},
2629 {39, "ENOTEMPTY", "directory not empty"},
2630 {40, "ELOOP", "too many levels of symbolic links"},
2631 {42, "ENOMSG", "no message of desired type"},
2632 {43, "EIDRM", "identifier removed"},
2633 {44, "ECHRNG", "channel number out of range"},
2634 {45, "EL2NSYNC", "level 2 not synchronized"},
2635 {46, "EL3HLT", "level 3 halted"},
2636 {47, "EL3RST", "level 3 reset"},
2637 {48, "ELNRNG", "link number out of range"},
2638 {49, "EUNATCH", "protocol driver not attached"},
2639 {50, "ENOCSI", "no CSI structure available"},
2640 {51, "EL2HLT", "level 2 halted"},
2641 {52, "EBADE", "invalid exchange"},
2642 {53, "EBADR", "invalid request descriptor"},
2643 {54, "EXFULL", "exchange full"},
2644 {55, "ENOANO", "no anode"},
2645 {56, "EBADRQC", "invalid request code"},
2646 {57, "EBADSLT", "invalid slot"},
2647 {59, "EBFONT", "bad font file format"},
2648 {60, "ENOSTR", "device not a stream"},
2649 {61, "ENODATA", "no data available"},
2650 {62, "ETIME", "timer expired"},
2651 {63, "ENOSR", "out of streams resources"},
2652 {64, "ENONET", "machine is not on the network"},
2653 {65, "ENOPKG", "package not installed"},
2654 {66, "EREMOTE", "object is remote"},
2655 {67, "ENOLINK", "link has been severed"},
2656 {68, "EADV", "advertise error"},
2657 {69, "ESRMNT", "srmount error"},
2658 {70, "ECOMM", "communication error on send"},
2659 {71, "EPROTO", "protocol error"},
2660 {72, "EMULTIHOP", "multihop attempted"},
2661 {73, "EDOTDOT", "RFS specific error"},
2662 {74, "EBADMSG", "bad message"},
2663 {75, "EOVERFLOW", "value too large for defined data type"},
2664 {76, "ENOTUNIQ", "name not unique on network"},
2665 {77, "EBADFD", "file descriptor in bad state"},
2666 {78, "EREMCHG", "remote address changed"},
2667 {79, "ELIBACC", "can not access a needed shared library"},
2668 {80, "ELIBBAD", "accessing a corrupted shared library"},
2669 {81, "ELIBSCN", ".lib section in a.out corrupted"},
2670 {82, "ELIBMAX", "attempting to link in too many shared libraries"},
2671 {83, "ELIBEXEC", "cannot exec a shared library directly"},
2672 {84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
2673 {85, "ERESTART", "interrupted system call should be restarted"},
2674 {86, "ESTRPIPE", "streams pipe error"},
2675 {87, "EUSERS", "too many users"},
2676 {88, "ENOTSOCK", "socket operation on non-socket"},
2677 {89, "EDESTADDRREQ", "destination address required"},
2678 {90, "EMSGSIZE", "message too long"},
2679 {91, "EPROTOTYPE", "protocol wrong type for socket"},
2680 {92, "ENOPROTOOPT", "protocol not available"},
2681 {93, "EPROTONOSUPPORT", "protocol not supported"},
2682 {94, "ESOCKTNOSUPPORT", "socket type not supported"},
2683 {95, "ENOTSUP", "operation not supported"},
2684 {96, "EPFNOSUPPORT", "protocol family not supported"},
2685 {97, "EAFNOSUPPORT", "address family not supported by protocol"},
2686 {98, "EADDRINUSE", "address already in use"},
2687 {99, "EADDRNOTAVAIL", "cannot assign requested address"},
2688 {100, "ENETDOWN", "network is down"},
2689 {101, "ENETUNREACH", "network is unreachable"},
2690 {102, "ENETRESET", "network dropped connection on reset"},
2691 {103, "ECONNABORTED", "software caused connection abort"},
2692 {104, "ECONNRESET", "connection reset by peer"},
2693 {105, "ENOBUFS", "no buffer space available"},
2694 {106, "EISCONN", "transport endpoint is already connected"},
2695 {107, "ENOTCONN", "transport endpoint is not connected"},
2696 {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
2697 {109, "ETOOMANYREFS", "too many references: cannot splice"},
2698 {110, "ETIMEDOUT", "connection timed out"},
2699 {111, "ECONNREFUSED", "connection refused"},
2700 {112, "EHOSTDOWN", "host is down"},
2701 {113, "EHOSTUNREACH", "no route to host"},
2702 {114, "EALREADY", "operation already in progress"},
2703 {115, "EINPROGRESS", "operation now in progress"},
2704 {116, "ESTALE", "stale file handle"},
2705 {117, "EUCLEAN", "structure needs cleaning"},
2706 {118, "ENOTNAM", "not a XENIX named type file"},
2707 {119, "ENAVAIL", "no XENIX semaphores available"},
2708 {120, "EISNAM", "is a named type file"},
2709 {121, "EREMOTEIO", "remote I/O error"},
2710 {122, "EDQUOT", "disk quota exceeded"},
2711 {123, "ENOMEDIUM", "no medium found"},
2712 {124, "EMEDIUMTYPE", "wrong medium type"},
2713 {125, "ECANCELED", "operation canceled"},
2714 {126, "ENOKEY", "required key not available"},
2715 {127, "EKEYEXPIRED", "key has expired"},
2716 {128, "EKEYREVOKED", "key has been revoked"},
2717 {129, "EKEYREJECTED", "key was rejected by service"},
2718 {130, "EOWNERDEAD", "owner died"},
2719 {131, "ENOTRECOVERABLE", "state not recoverable"},
2720 {132, "ERFKILL", "operation not possible due to RF-kill"},
2721 {133, "EHWPOISON", "memory page has hardware error"},
22002722 }
22012723
22022724 // Signal table
2203 var signals = [...]string{
2204 1: "hangup",
2205 2: "interrupt",
2206 3: "quit",
2207 4: "illegal instruction",
2208 5: "trace/breakpoint trap",
2209 6: "aborted",
2210 7: "bus error",
2211 8: "floating point exception",
2212 9: "killed",
2213 10: "user defined signal 1",
2214 11: "segmentation fault",
2215 12: "user defined signal 2",
2216 13: "broken pipe",
2217 14: "alarm clock",
2218 15: "terminated",
2219 16: "stack fault",
2220 17: "child exited",
2221 18: "continued",
2222 19: "stopped (signal)",
2223 20: "stopped",
2224 21: "stopped (tty input)",
2225 22: "stopped (tty output)",
2226 23: "urgent I/O condition",
2227 24: "CPU time limit exceeded",
2228 25: "file size limit exceeded",
2229 26: "virtual timer expired",
2230 27: "profiling timer expired",
2231 28: "window changed",
2232 29: "I/O possible",
2233 30: "power failure",
2234 31: "bad system call",
2725 var signalList = [...]struct {
2726 num syscall.Signal
2727 name string
2728 desc string
2729 }{
2730 {1, "SIGHUP", "hangup"},
2731 {2, "SIGINT", "interrupt"},
2732 {3, "SIGQUIT", "quit"},
2733 {4, "SIGILL", "illegal instruction"},
2734 {5, "SIGTRAP", "trace/breakpoint trap"},
2735 {6, "SIGABRT", "aborted"},
2736 {7, "SIGBUS", "bus error"},
2737 {8, "SIGFPE", "floating point exception"},
2738 {9, "SIGKILL", "killed"},
2739 {10, "SIGUSR1", "user defined signal 1"},
2740 {11, "SIGSEGV", "segmentation fault"},
2741 {12, "SIGUSR2", "user defined signal 2"},
2742 {13, "SIGPIPE", "broken pipe"},
2743 {14, "SIGALRM", "alarm clock"},
2744 {15, "SIGTERM", "terminated"},
2745 {16, "SIGSTKFLT", "stack fault"},
2746 {17, "SIGCHLD", "child exited"},
2747 {18, "SIGCONT", "continued"},
2748 {19, "SIGSTOP", "stopped (signal)"},
2749 {20, "SIGTSTP", "stopped"},
2750 {21, "SIGTTIN", "stopped (tty input)"},
2751 {22, "SIGTTOU", "stopped (tty output)"},
2752 {23, "SIGURG", "urgent I/O condition"},
2753 {24, "SIGXCPU", "CPU time limit exceeded"},
2754 {25, "SIGXFSZ", "file size limit exceeded"},
2755 {26, "SIGVTALRM", "virtual timer expired"},
2756 {27, "SIGPROF", "profiling timer expired"},
2757 {28, "SIGWINCH", "window changed"},
2758 {29, "SIGIO", "I/O possible"},
2759 {30, "SIGPWR", "power failure"},
2760 {31, "SIGSYS", "bad system call"},
22352761 }
22
33 // +build arm64,linux
44
5 // Created by cgo -godefs - DO NOT EDIT
5 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
66 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go
77
88 package unix
1010 import "syscall"
1111
1212 const (
13 AAFS_MAGIC = 0x5a3c69f0
14 ADFS_SUPER_MAGIC = 0xadf5
15 AFFS_SUPER_MAGIC = 0xadff
16 AFS_FS_MAGIC = 0x6b414653
17 AFS_SUPER_MAGIC = 0x5346414f
1318 AF_ALG = 0x26
1419 AF_APPLETALK = 0x5
1520 AF_ASH = 0x12
5863 AF_VSOCK = 0x28
5964 AF_WANPIPE = 0x19
6065 AF_X25 = 0x9
66 AF_XDP = 0x2c
6167 ALG_OP_DECRYPT = 0x0
6268 ALG_OP_ENCRYPT = 0x1
6369 ALG_SET_AEAD_ASSOCLEN = 0x4
6571 ALG_SET_IV = 0x2
6672 ALG_SET_KEY = 0x1
6773 ALG_SET_OP = 0x3
74 ANON_INODE_FS_MAGIC = 0x9041934
6875 ARPHRD_6LOWPAN = 0x339
6976 ARPHRD_ADAPT = 0x108
7077 ARPHRD_APPLETLK = 0x8
120127 ARPHRD_PPP = 0x200
121128 ARPHRD_PRONET = 0x4
122129 ARPHRD_RAWHDLC = 0x206
130 ARPHRD_RAWIP = 0x207
123131 ARPHRD_ROSE = 0x10e
124132 ARPHRD_RSRVD = 0x104
125133 ARPHRD_SIT = 0x308
131139 ARPHRD_VOID = 0xffff
132140 ARPHRD_VSOCKMON = 0x33a
133141 ARPHRD_X25 = 0x10f
142 AUTOFS_SUPER_MAGIC = 0x187
134143 B0 = 0x0
135144 B1000000 = 0x1008
136145 B110 = 0x3
162171 B75 = 0x2
163172 B921600 = 0x1007
164173 B9600 = 0xd
174 BALLOON_KVM_MAGIC = 0x13661366
175 BDEVFS_MAGIC = 0x62646576
176 BINFMTFS_MAGIC = 0x42494e4d
165177 BLKBSZGET = 0x80081270
166178 BLKBSZSET = 0x40081271
167179 BLKFLSBUF = 0x1261
186198 BPF_AND = 0x50
187199 BPF_B = 0x10
188200 BPF_DIV = 0x30
201 BPF_FS_MAGIC = 0xcafe4a11
189202 BPF_H = 0x8
190203 BPF_IMM = 0x0
191204 BPF_IND = 0x40
227240 BS0 = 0x0
228241 BS1 = 0x2000
229242 BSDLY = 0x2000
243 BTRFS_SUPER_MAGIC = 0x9123683e
244 BTRFS_TEST_MAGIC = 0x73727279
230245 CAN_BCM = 0x2
231246 CAN_EFF_FLAG = 0x80000000
232247 CAN_EFF_ID_BITS = 0x1d
250265 CBAUD = 0x100f
251266 CBAUDEX = 0x1000
252267 CFLUSH = 0xf
268 CGROUP2_SUPER_MAGIC = 0x63677270
269 CGROUP_SUPER_MAGIC = 0x27e0eb
253270 CIBAUD = 0x100f0000
254271 CLOCAL = 0x800
255272 CLOCK_BOOTTIME = 0x7
292309 CLONE_VFORK = 0x4000
293310 CLONE_VM = 0x100
294311 CMSPAR = 0x40000000
312 CODA_SUPER_MAGIC = 0x73757245
295313 CR0 = 0x0
296314 CR1 = 0x200
297315 CR2 = 0x400
298316 CR3 = 0x600
317 CRAMFS_MAGIC = 0x28cd3d45
299318 CRDLY = 0x600
300319 CREAD = 0x80
301320 CRTSCTS = 0x80000000
310329 CSTOP = 0x13
311330 CSTOPB = 0x40
312331 CSUSP = 0x1a
332 DAXFS_MAGIC = 0x64646178
333 DEBUGFS_MAGIC = 0x64626720
334 DEVPTS_SUPER_MAGIC = 0x1cd1
313335 DT_BLK = 0x6
314336 DT_CHR = 0x2
315337 DT_DIR = 0x4
326348 ECHOKE = 0x800
327349 ECHONL = 0x40
328350 ECHOPRT = 0x400
351 ECRYPTFS_SUPER_MAGIC = 0xf15f
329352 EFD_CLOEXEC = 0x80000
330353 EFD_NONBLOCK = 0x800
331354 EFD_SEMAPHORE = 0x1
355 EFIVARFS_MAGIC = 0xde5e81e4
356 EFS_SUPER_MAGIC = 0x414a53
332357 ENCODING_DEFAULT = 0x0
333358 ENCODING_FM_MARK = 0x3
334359 ENCODING_FM_SPACE = 0x4
390415 ETH_P_DSA = 0x1b
391416 ETH_P_ECONET = 0x18
392417 ETH_P_EDSA = 0xdada
418 ETH_P_ERSPAN = 0x88be
419 ETH_P_ERSPAN2 = 0x22eb
393420 ETH_P_FCOE = 0x8906
394421 ETH_P_FIP = 0x8914
395422 ETH_P_HDLC = 0x19
398425 ETH_P_IEEE802154 = 0xf6
399426 ETH_P_IEEEPUP = 0xa00
400427 ETH_P_IEEEPUPAT = 0xa01
428 ETH_P_IFE = 0xed3e
401429 ETH_P_IP = 0x800
402430 ETH_P_IPV6 = 0x86dd
403431 ETH_P_IPX = 0x8137
408436 ETH_P_LOOP = 0x60
409437 ETH_P_LOOPBACK = 0x9000
410438 ETH_P_MACSEC = 0x88e5
439 ETH_P_MAP = 0xf9
411440 ETH_P_MOBITEX = 0x15
412441 ETH_P_MPLS_MC = 0x8848
413442 ETH_P_MPLS_UC = 0x8847
414443 ETH_P_MVRP = 0x88f5
415444 ETH_P_NCSI = 0x88f8
445 ETH_P_NSH = 0x894f
416446 ETH_P_PAE = 0x888e
417447 ETH_P_PAUSE = 0x8808
418448 ETH_P_PHONET = 0xf5
420450 ETH_P_PPP_DISC = 0x8863
421451 ETH_P_PPP_MP = 0x8
422452 ETH_P_PPP_SES = 0x8864
453 ETH_P_PREAUTH = 0x88c7
423454 ETH_P_PRP = 0x88fb
424455 ETH_P_PUP = 0x200
425456 ETH_P_PUPAT = 0x201
440471 ETH_P_WCCP = 0x883e
441472 ETH_P_X25 = 0x805
442473 ETH_P_XDSA = 0xf8
474 EXABYTE_ENABLE_NEST = 0xf0
475 EXT2_SUPER_MAGIC = 0xef53
476 EXT3_SUPER_MAGIC = 0xef53
477 EXT4_SUPER_MAGIC = 0xef53
443478 EXTA = 0xe
444479 EXTB = 0xf
445480 EXTPROC = 0x10000
446481 EXTRA_MAGIC = 0x45585401
482 F2FS_SUPER_MAGIC = 0xf2f52010
447483 FALLOC_FL_COLLAPSE_RANGE = 0x8
448484 FALLOC_FL_INSERT_RANGE = 0x20
449485 FALLOC_FL_KEEP_SIZE = 0x1
457493 FF1 = 0x8000
458494 FFDLY = 0x8000
459495 FLUSHO = 0x1000
496 FPSIMD_MAGIC = 0x46508001
460497 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
461498 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
462499 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
464501 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
465502 FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
466503 FS_ENCRYPTION_MODE_INVALID = 0x0
504 FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
505 FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
467506 FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
468507 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
469508 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
477516 FS_POLICY_FLAGS_PAD_8 = 0x1
478517 FS_POLICY_FLAGS_PAD_MASK = 0x3
479518 FS_POLICY_FLAGS_VALID = 0x3
519 FUTEXFS_SUPER_MAGIC = 0xbad1dea
520 F_ADD_SEALS = 0x409
480521 F_DUPFD = 0x0
481522 F_DUPFD_CLOEXEC = 0x406
482523 F_EXLCK = 0x4
489530 F_GETOWN_EX = 0x10
490531 F_GETPIPE_SZ = 0x408
491532 F_GETSIG = 0xb
533 F_GET_FILE_RW_HINT = 0x40d
534 F_GET_RW_HINT = 0x40b
535 F_GET_SEALS = 0x40a
492536 F_LOCK = 0x1
493537 F_NOTIFY = 0x402
494538 F_OFD_GETLK = 0x24
496540 F_OFD_SETLKW = 0x26
497541 F_OK = 0x0
498542 F_RDLCK = 0x0
543 F_SEAL_GROW = 0x4
544 F_SEAL_SEAL = 0x1
545 F_SEAL_SHRINK = 0x2
546 F_SEAL_WRITE = 0x8
499547 F_SETFD = 0x2
500548 F_SETFL = 0x4
501549 F_SETLEASE = 0x400
507555 F_SETOWN_EX = 0xf
508556 F_SETPIPE_SZ = 0x407
509557 F_SETSIG = 0xa
558 F_SET_FILE_RW_HINT = 0x40e
559 F_SET_RW_HINT = 0x40c
510560 F_SHLCK = 0x8
511561 F_TEST = 0x3
512562 F_TLOCK = 0x2
528578 GENL_UNS_ADMIN_PERM = 0x10
529579 GRND_NONBLOCK = 0x1
530580 GRND_RANDOM = 0x2
581 HDIO_DRIVE_CMD = 0x31f
582 HDIO_DRIVE_CMD_AEB = 0x31e
583 HDIO_DRIVE_CMD_HDR_SIZE = 0x4
584 HDIO_DRIVE_HOB_HDR_SIZE = 0x8
585 HDIO_DRIVE_RESET = 0x31c
586 HDIO_DRIVE_TASK = 0x31e
587 HDIO_DRIVE_TASKFILE = 0x31d
588 HDIO_DRIVE_TASK_HDR_SIZE = 0x8
589 HDIO_GETGEO = 0x301
590 HDIO_GET_32BIT = 0x309
591 HDIO_GET_ACOUSTIC = 0x30f
592 HDIO_GET_ADDRESS = 0x310
593 HDIO_GET_BUSSTATE = 0x31a
594 HDIO_GET_DMA = 0x30b
595 HDIO_GET_IDENTITY = 0x30d
596 HDIO_GET_KEEPSETTINGS = 0x308
597 HDIO_GET_MULTCOUNT = 0x304
598 HDIO_GET_NICE = 0x30c
599 HDIO_GET_NOWERR = 0x30a
600 HDIO_GET_QDMA = 0x305
601 HDIO_GET_UNMASKINTR = 0x302
602 HDIO_GET_WCACHE = 0x30e
603 HDIO_OBSOLETE_IDENTITY = 0x307
604 HDIO_SCAN_HWIF = 0x328
605 HDIO_SET_32BIT = 0x324
606 HDIO_SET_ACOUSTIC = 0x32c
607 HDIO_SET_ADDRESS = 0x32f
608 HDIO_SET_BUSSTATE = 0x32d
609 HDIO_SET_DMA = 0x326
610 HDIO_SET_KEEPSETTINGS = 0x323
611 HDIO_SET_MULTCOUNT = 0x321
612 HDIO_SET_NICE = 0x329
613 HDIO_SET_NOWERR = 0x325
614 HDIO_SET_PIO_MODE = 0x327
615 HDIO_SET_QDMA = 0x32e
616 HDIO_SET_UNMASKINTR = 0x322
617 HDIO_SET_WCACHE = 0x32b
618 HDIO_SET_XFER = 0x306
619 HDIO_TRISTATE_HWIF = 0x31b
620 HDIO_UNREGISTER_HWIF = 0x32a
621 HOSTFS_SUPER_MAGIC = 0xc0ffee
622 HPFS_SUPER_MAGIC = 0xf995e849
623 HUGETLBFS_MAGIC = 0x958458f6
531624 HUPCL = 0x400
532625 IBSHIFT = 0x10
533626 ICANON = 0x2
547640 IFA_F_STABLE_PRIVACY = 0x800
548641 IFA_F_TEMPORARY = 0x1
549642 IFA_F_TENTATIVE = 0x40
550 IFA_MAX = 0x8
643 IFA_MAX = 0xa
551644 IFF_ALLMULTI = 0x200
552645 IFF_ATTACH_QUEUE = 0x200
553646 IFF_AUTOMEDIA = 0x4000
562655 IFF_MASTER = 0x400
563656 IFF_MULTICAST = 0x1000
564657 IFF_MULTI_QUEUE = 0x100
658 IFF_NAPI = 0x10
659 IFF_NAPI_FRAGS = 0x20
565660 IFF_NOARP = 0x80
566661 IFF_NOFILTER = 0x1000
567662 IFF_NOTRAILERS = 0x20
624719 IN_OPEN = 0x20
625720 IN_Q_OVERFLOW = 0x4000
626721 IN_UNMOUNT = 0x2000
722 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
627723 IPPROTO_AH = 0x33
628724 IPPROTO_BEETPH = 0x5e
629725 IPPROTO_COMP = 0x6c
671767 IPV6_DONTFRAG = 0x3e
672768 IPV6_DROP_MEMBERSHIP = 0x15
673769 IPV6_DSTOPTS = 0x3b
770 IPV6_FREEBIND = 0x4e
674771 IPV6_HDRINCL = 0x24
675772 IPV6_HOPLIMIT = 0x34
676773 IPV6_HOPOPTS = 0x36
775872 IP_UNICAST_IF = 0x32
776873 IP_XFRM_POLICY = 0x11
777874 ISIG = 0x1
875 ISOFS_SUPER_MAGIC = 0x9660
778876 ISTRIP = 0x20
779877 IUCLC = 0x200
780878 IUTF8 = 0x4000
781879 IXANY = 0x800
782880 IXOFF = 0x1000
783881 IXON = 0x400
882 JFFS2_SUPER_MAGIC = 0x72b6
883 KEXEC_ARCH_386 = 0x30000
884 KEXEC_ARCH_68K = 0x40000
885 KEXEC_ARCH_AARCH64 = 0xb70000
886 KEXEC_ARCH_ARM = 0x280000
887 KEXEC_ARCH_DEFAULT = 0x0
888 KEXEC_ARCH_IA_64 = 0x320000
889 KEXEC_ARCH_MASK = 0xffff0000
890 KEXEC_ARCH_MIPS = 0x80000
891 KEXEC_ARCH_MIPS_LE = 0xa0000
892 KEXEC_ARCH_PPC = 0x140000
893 KEXEC_ARCH_PPC64 = 0x150000
894 KEXEC_ARCH_S390 = 0x160000
895 KEXEC_ARCH_SH = 0x2a0000
896 KEXEC_ARCH_X86_64 = 0x3e0000
897 KEXEC_FILE_NO_INITRAMFS = 0x4
898 KEXEC_FILE_ON_CRASH = 0x2
899 KEXEC_FILE_UNLOAD = 0x1
900 KEXEC_ON_CRASH = 0x1
901 KEXEC_PRESERVE_CONTEXT = 0x2
902 KEXEC_SEGMENT_MAX = 0x10
784903 KEYCTL_ASSUME_AUTHORITY = 0x10
785904 KEYCTL_CHOWN = 0x4
786905 KEYCTL_CLEAR = 0x7
795914 KEYCTL_JOIN_SESSION_KEYRING = 0x1
796915 KEYCTL_LINK = 0x8
797916 KEYCTL_NEGATE = 0xd
917 KEYCTL_PKEY_DECRYPT = 0x1a
918 KEYCTL_PKEY_ENCRYPT = 0x19
919 KEYCTL_PKEY_QUERY = 0x18
920 KEYCTL_PKEY_SIGN = 0x1b
921 KEYCTL_PKEY_VERIFY = 0x1c
798922 KEYCTL_READ = 0xb
799923 KEYCTL_REJECT = 0x13
800924 KEYCTL_RESTRICT_KEYRING = 0x1d
804928 KEYCTL_SETPERM = 0x5
805929 KEYCTL_SET_REQKEY_KEYRING = 0xe
806930 KEYCTL_SET_TIMEOUT = 0xf
931 KEYCTL_SUPPORTS_DECRYPT = 0x2
932 KEYCTL_SUPPORTS_ENCRYPT = 0x1
933 KEYCTL_SUPPORTS_SIGN = 0x4
934 KEYCTL_SUPPORTS_VERIFY = 0x8
807935 KEYCTL_UNLINK = 0x9
808936 KEYCTL_UPDATE = 0x2
809937 KEY_REQKEY_DEFL_DEFAULT = 0x0
845973 MADV_FREE = 0x8
846974 MADV_HUGEPAGE = 0xe
847975 MADV_HWPOISON = 0x64
976 MADV_KEEPONFORK = 0x13
848977 MADV_MERGEABLE = 0xc
849978 MADV_NOHUGEPAGE = 0xf
850979 MADV_NORMAL = 0x0
853982 MADV_SEQUENTIAL = 0x2
854983 MADV_UNMERGEABLE = 0xd
855984 MADV_WILLNEED = 0x3
985 MADV_WIPEONFORK = 0x12
856986 MAP_ANON = 0x20
857987 MAP_ANONYMOUS = 0x20
858988 MAP_DENYWRITE = 0x800
859989 MAP_EXECUTABLE = 0x1000
860990 MAP_FILE = 0x0
861991 MAP_FIXED = 0x10
992 MAP_FIXED_NOREPLACE = 0x100000
862993 MAP_GROWSDOWN = 0x100
863994 MAP_HUGETLB = 0x40000
864995 MAP_HUGE_MASK = 0x3f
8691000 MAP_POPULATE = 0x8000
8701001 MAP_PRIVATE = 0x2
8711002 MAP_SHARED = 0x1
1003 MAP_SHARED_VALIDATE = 0x3
8721004 MAP_STACK = 0x20000
1005 MAP_SYNC = 0x80000
8731006 MAP_TYPE = 0xf
8741007 MCL_CURRENT = 0x1
8751008 MCL_FUTURE = 0x2
8761009 MCL_ONFAULT = 0x4
1010 MFD_ALLOW_SEALING = 0x2
1011 MFD_CLOEXEC = 0x1
1012 MFD_HUGETLB = 0x4
1013 MFD_HUGE_16GB = -0x78000000
1014 MFD_HUGE_16MB = 0x60000000
1015 MFD_HUGE_1GB = 0x78000000
1016 MFD_HUGE_1MB = 0x50000000
1017 MFD_HUGE_256MB = 0x70000000
1018 MFD_HUGE_2GB = 0x7c000000
1019 MFD_HUGE_2MB = 0x54000000
1020 MFD_HUGE_32MB = 0x64000000
1021 MFD_HUGE_512KB = 0x4c000000
1022 MFD_HUGE_512MB = 0x74000000
1023 MFD_HUGE_64KB = 0x40000000
1024 MFD_HUGE_8MB = 0x5c000000
1025 MFD_HUGE_MASK = 0x3f
1026 MFD_HUGE_SHIFT = 0x1a
1027 MINIX2_SUPER_MAGIC = 0x2468
1028 MINIX2_SUPER_MAGIC2 = 0x2478
1029 MINIX3_SUPER_MAGIC = 0x4d5a
1030 MINIX_SUPER_MAGIC = 0x137f
1031 MINIX_SUPER_MAGIC2 = 0x138f
8771032 MNT_DETACH = 0x2
8781033 MNT_EXPIRE = 0x4
8791034 MNT_FORCE = 0x1
1035 MODULE_INIT_IGNORE_MODVERSIONS = 0x1
1036 MODULE_INIT_IGNORE_VERMAGIC = 0x2
1037 MSDOS_SUPER_MAGIC = 0x4d44
8801038 MSG_BATCH = 0x40000
8811039 MSG_CMSG_CLOEXEC = 0x40000000
8821040 MSG_CONFIRM = 0x800
8981056 MSG_TRYHARD = 0x4
8991057 MSG_WAITALL = 0x100
9001058 MSG_WAITFORONE = 0x10000
1059 MSG_ZEROCOPY = 0x4000000
9011060 MS_ACTIVE = 0x40000000
9021061 MS_ASYNC = 0x1
9031062 MS_BIND = 0x1000
9351094 MS_SYNCHRONOUS = 0x10
9361095 MS_UNBINDABLE = 0x20000
9371096 MS_VERBOSE = 0x8000
1097 MTD_INODE_FS_MAGIC = 0x11307854
9381098 NAME_MAX = 0xff
1099 NCP_SUPER_MAGIC = 0x564c
9391100 NETLINK_ADD_MEMBERSHIP = 0x1
9401101 NETLINK_AUDIT = 0x9
9411102 NETLINK_BROADCAST_ERROR = 0x4
9491110 NETLINK_FIB_LOOKUP = 0xa
9501111 NETLINK_FIREWALL = 0x3
9511112 NETLINK_GENERIC = 0x10
1113 NETLINK_GET_STRICT_CHK = 0xc
9521114 NETLINK_INET_DIAG = 0x4
9531115 NETLINK_IP6_FW = 0xd
9541116 NETLINK_ISCSI = 0x8
9701132 NETLINK_UNUSED = 0x1
9711133 NETLINK_USERSOCK = 0x2
9721134 NETLINK_XFRM = 0x6
1135 NETNSA_MAX = 0x3
1136 NETNSA_NSID_NOT_ASSIGNED = -0x1
1137 NFNETLINK_V0 = 0x0
1138 NFNLGRP_ACCT_QUOTA = 0x8
1139 NFNLGRP_CONNTRACK_DESTROY = 0x3
1140 NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
1141 NFNLGRP_CONNTRACK_EXP_NEW = 0x4
1142 NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
1143 NFNLGRP_CONNTRACK_NEW = 0x1
1144 NFNLGRP_CONNTRACK_UPDATE = 0x2
1145 NFNLGRP_MAX = 0x9
1146 NFNLGRP_NFTABLES = 0x7
1147 NFNLGRP_NFTRACE = 0x9
1148 NFNLGRP_NONE = 0x0
1149 NFNL_BATCH_MAX = 0x1
1150 NFNL_MSG_BATCH_BEGIN = 0x10
1151 NFNL_MSG_BATCH_END = 0x11
1152 NFNL_NFA_NEST = 0x8000
1153 NFNL_SUBSYS_ACCT = 0x7
1154 NFNL_SUBSYS_COUNT = 0xc
1155 NFNL_SUBSYS_CTHELPER = 0x9
1156 NFNL_SUBSYS_CTNETLINK = 0x1
1157 NFNL_SUBSYS_CTNETLINK_EXP = 0x2
1158 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
1159 NFNL_SUBSYS_IPSET = 0x6
1160 NFNL_SUBSYS_NFTABLES = 0xa
1161 NFNL_SUBSYS_NFT_COMPAT = 0xb
1162 NFNL_SUBSYS_NONE = 0x0
1163 NFNL_SUBSYS_OSF = 0x5
1164 NFNL_SUBSYS_QUEUE = 0x3
1165 NFNL_SUBSYS_ULOG = 0x4
1166 NFS_SUPER_MAGIC = 0x6969
1167 NILFS_SUPER_MAGIC = 0x3434
9731168 NL0 = 0x0
9741169 NL1 = 0x100
9751170 NLA_ALIGNTO = 0x4
9971192 NLM_F_EXCL = 0x200
9981193 NLM_F_MATCH = 0x200
9991194 NLM_F_MULTI = 0x2
1195 NLM_F_NONREC = 0x100
10001196 NLM_F_REPLACE = 0x100
10011197 NLM_F_REQUEST = 0x1
10021198 NLM_F_ROOT = 0x100
10031199 NOFLSH = 0x80
1200 NSFS_MAGIC = 0x6e736673
1201 OCFS2_SUPER_MAGIC = 0x7461636f
10041202 OCRNL = 0x8
10051203 OFDEL = 0x80
10061204 OFILL = 0x40
10081206 ONLCR = 0x4
10091207 ONLRET = 0x20
10101208 ONOCR = 0x10
1209 OPENPROM_SUPER_MAGIC = 0x9fa1
10111210 OPOST = 0x1
1211 OVERLAYFS_SUPER_MAGIC = 0x794c7630
10121212 O_ACCMODE = 0x3
10131213 O_APPEND = 0x400
10141214 O_ASYNC = 0x2000
10541254 PACKET_FASTROUTE = 0x6
10551255 PACKET_HDRLEN = 0xb
10561256 PACKET_HOST = 0x0
1257 PACKET_IGNORE_OUTGOING = 0x17
10571258 PACKET_KERNEL = 0x7
10581259 PACKET_LOOPBACK = 0x5
10591260 PACKET_LOSS = 0xe
10931294 PERF_EVENT_IOC_DISABLE = 0x2401
10941295 PERF_EVENT_IOC_ENABLE = 0x2400
10951296 PERF_EVENT_IOC_ID = 0x80082407
1297 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
10961298 PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
10971299 PERF_EVENT_IOC_PERIOD = 0x40082404
1300 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
10981301 PERF_EVENT_IOC_REFRESH = 0x2402
10991302 PERF_EVENT_IOC_RESET = 0x2403
11001303 PERF_EVENT_IOC_SET_BPF = 0x40042408
11011304 PERF_EVENT_IOC_SET_FILTER = 0x40082406
11021305 PERF_EVENT_IOC_SET_OUTPUT = 0x2405
1306 PIPEFS_MAGIC = 0x50495045
1307 PPPIOCATTACH = 0x4004743d
1308 PPPIOCATTCHAN = 0x40047438
1309 PPPIOCCONNECT = 0x4004743a
1310 PPPIOCDETACH = 0x4004743c
1311 PPPIOCDISCONN = 0x7439
1312 PPPIOCGASYNCMAP = 0x80047458
1313 PPPIOCGCHAN = 0x80047437
1314 PPPIOCGDEBUG = 0x80047441
1315 PPPIOCGFLAGS = 0x8004745a
1316 PPPIOCGIDLE = 0x8010743f
1317 PPPIOCGL2TPSTATS = 0x80487436
1318 PPPIOCGMRU = 0x80047453
1319 PPPIOCGNPMODE = 0xc008744c
1320 PPPIOCGRASYNCMAP = 0x80047455
1321 PPPIOCGUNIT = 0x80047456
1322 PPPIOCGXASYNCMAP = 0x80207450
1323 PPPIOCNEWUNIT = 0xc004743e
1324 PPPIOCSACTIVE = 0x40107446
1325 PPPIOCSASYNCMAP = 0x40047457
1326 PPPIOCSCOMPRESS = 0x4010744d
1327 PPPIOCSDEBUG = 0x40047440
1328 PPPIOCSFLAGS = 0x40047459
1329 PPPIOCSMAXCID = 0x40047451
1330 PPPIOCSMRRU = 0x4004743b
1331 PPPIOCSMRU = 0x40047452
1332 PPPIOCSNPMODE = 0x4008744b
1333 PPPIOCSPASS = 0x40107447
1334 PPPIOCSRASYNCMAP = 0x40047454
1335 PPPIOCSXASYNCMAP = 0x4020744f
1336 PPPIOCXFERUNIT = 0x744e
11031337 PRIO_PGRP = 0x1
11041338 PRIO_PROCESS = 0x0
11051339 PRIO_USER = 0x2
1340 PROC_SUPER_MAGIC = 0x9fa0
11061341 PROT_EXEC = 0x4
11071342 PROT_GROWSDOWN = 0x1000000
11081343 PROT_GROWSUP = 0x2000000
11451380 PR_GET_PDEATHSIG = 0x2
11461381 PR_GET_SECCOMP = 0x15
11471382 PR_GET_SECUREBITS = 0x1b
1383 PR_GET_SPECULATION_CTRL = 0x34
11481384 PR_GET_THP_DISABLE = 0x2a
11491385 PR_GET_TID_ADDRESS = 0x28
11501386 PR_GET_TIMERSLACK = 0x1e
11871423 PR_SET_NO_NEW_PRIVS = 0x26
11881424 PR_SET_PDEATHSIG = 0x1
11891425 PR_SET_PTRACER = 0x59616d61
1190 PR_SET_PTRACER_ANY = -0x1
1426 PR_SET_PTRACER_ANY = 0xffffffffffffffff
11911427 PR_SET_SECCOMP = 0x16
11921428 PR_SET_SECUREBITS = 0x1c
1429 PR_SET_SPECULATION_CTRL = 0x35
11931430 PR_SET_THP_DISABLE = 0x29
11941431 PR_SET_TIMERSLACK = 0x1d
11951432 PR_SET_TIMING = 0xe
11961433 PR_SET_TSC = 0x1a
11971434 PR_SET_UNALIGN = 0x6
1435 PR_SPEC_DISABLE = 0x4
1436 PR_SPEC_ENABLE = 0x2
1437 PR_SPEC_FORCE_DISABLE = 0x8
1438 PR_SPEC_INDIRECT_BRANCH = 0x1
1439 PR_SPEC_NOT_AFFECTED = 0x0
1440 PR_SPEC_PRCTL = 0x1
1441 PR_SPEC_STORE_BYPASS = 0x0
1442 PR_SVE_GET_VL = 0x33
1443 PR_SVE_SET_VL = 0x32
1444 PR_SVE_SET_VL_ONEXEC = 0x40000
1445 PR_SVE_VL_INHERIT = 0x20000
1446 PR_SVE_VL_LEN_MASK = 0xffff
11981447 PR_TASK_PERF_EVENTS_DISABLE = 0x1f
11991448 PR_TASK_PERF_EVENTS_ENABLE = 0x20
12001449 PR_TIMING_STATISTICAL = 0x0
12031452 PR_TSC_SIGSEGV = 0x2
12041453 PR_UNALIGN_NOPRINT = 0x1
12051454 PR_UNALIGN_SIGBUS = 0x2
1455 PSTOREFS_MAGIC = 0x6165676c
12061456 PTRACE_ATTACH = 0x10
12071457 PTRACE_CONT = 0x7
12081458 PTRACE_DETACH = 0x11
12421492 PTRACE_POKETEXT = 0x4
12431493 PTRACE_POKEUSR = 0x6
12441494 PTRACE_SECCOMP_GET_FILTER = 0x420c
1495 PTRACE_SECCOMP_GET_METADATA = 0x420d
12451496 PTRACE_SEIZE = 0x4206
12461497 PTRACE_SETOPTIONS = 0x4200
12471498 PTRACE_SETREGS = 0xd
12511502 PTRACE_SINGLESTEP = 0x9
12521503 PTRACE_SYSCALL = 0x18
12531504 PTRACE_TRACEME = 0x0
1505 QNX4_SUPER_MAGIC = 0x2f
1506 QNX6_SUPER_MAGIC = 0x68191122
1507 RAMFS_MAGIC = 0x858458f6
1508 RDTGROUP_SUPER_MAGIC = 0x7655821
1509 REISERFS_SUPER_MAGIC = 0x52654973
1510 RENAME_EXCHANGE = 0x2
1511 RENAME_NOREPLACE = 0x1
1512 RENAME_WHITEOUT = 0x4
12541513 RLIMIT_AS = 0x9
12551514 RLIMIT_CORE = 0x4
12561515 RLIMIT_CPU = 0x0
12671526 RLIMIT_RTTIME = 0xf
12681527 RLIMIT_SIGPENDING = 0xb
12691528 RLIMIT_STACK = 0x3
1270 RLIM_INFINITY = -0x1
1529 RLIM_INFINITY = 0xffffffffffffffff
12711530 RTAX_ADVMSS = 0x8
12721531 RTAX_CC_ALGO = 0x10
12731532 RTAX_CWND = 0x7
1533 RTAX_FASTOPEN_NO_COOKIE = 0x11
12741534 RTAX_FEATURES = 0xc
12751535 RTAX_FEATURE_ALLFRAG = 0x8
12761536 RTAX_FEATURE_ECN = 0x1
12811541 RTAX_INITCWND = 0xb
12821542 RTAX_INITRWND = 0xe
12831543 RTAX_LOCK = 0x1
1284 RTAX_MAX = 0x10
1544 RTAX_MAX = 0x11
12851545 RTAX_MTU = 0x2
12861546 RTAX_QUICKACK = 0xf
12871547 RTAX_REORDERING = 0x9
12921552 RTAX_UNSPEC = 0x0
12931553 RTAX_WINDOW = 0x3
12941554 RTA_ALIGNTO = 0x4
1295 RTA_MAX = 0x1a
1555 RTA_MAX = 0x1d
12961556 RTCF_DIRECTSRC = 0x4000000
12971557 RTCF_DOREDIRECT = 0x1000000
12981558 RTCF_LOG = 0x2000000
12991559 RTCF_MASQ = 0x400000
13001560 RTCF_NAT = 0x800000
13011561 RTCF_VALVE = 0x200000
1562 RTC_AF = 0x20
1563 RTC_AIE_OFF = 0x7002
1564 RTC_AIE_ON = 0x7001
1565 RTC_ALM_READ = 0x80247008
1566 RTC_ALM_SET = 0x40247007
1567 RTC_EPOCH_READ = 0x8008700d
1568 RTC_EPOCH_SET = 0x4008700e
1569 RTC_IRQF = 0x80
1570 RTC_IRQP_READ = 0x8008700b
1571 RTC_IRQP_SET = 0x4008700c
1572 RTC_MAX_FREQ = 0x2000
1573 RTC_PF = 0x40
1574 RTC_PIE_OFF = 0x7006
1575 RTC_PIE_ON = 0x7005
1576 RTC_PLL_GET = 0x80207011
1577 RTC_PLL_SET = 0x40207012
1578 RTC_RD_TIME = 0x80247009
1579 RTC_SET_TIME = 0x4024700a
1580 RTC_UF = 0x10
1581 RTC_UIE_OFF = 0x7004
1582 RTC_UIE_ON = 0x7003
1583 RTC_VL_CLR = 0x7014
1584 RTC_VL_READ = 0x80047013
1585 RTC_WIE_OFF = 0x7010
1586 RTC_WIE_ON = 0x700f
1587 RTC_WKALM_RD = 0x80287010
1588 RTC_WKALM_SET = 0x4028700f
13021589 RTF_ADDRCLASSMASK = 0xf8000000
13031590 RTF_ADDRCONF = 0x40000
13041591 RTF_ALLONLINK = 0x20000
13331620 RTM_DELACTION = 0x31
13341621 RTM_DELADDR = 0x15
13351622 RTM_DELADDRLABEL = 0x49
1623 RTM_DELCHAIN = 0x65
13361624 RTM_DELLINK = 0x11
13371625 RTM_DELMDB = 0x55
13381626 RTM_DELNEIGH = 0x1d
13531641 RTM_GETADDR = 0x16
13541642 RTM_GETADDRLABEL = 0x4a
13551643 RTM_GETANYCAST = 0x3e
1644 RTM_GETCHAIN = 0x66
13561645 RTM_GETDCB = 0x4e
13571646 RTM_GETLINK = 0x12
13581647 RTM_GETMDB = 0x56
13671656 RTM_GETSTATS = 0x5e
13681657 RTM_GETTCLASS = 0x2a
13691658 RTM_GETTFILTER = 0x2e
1370 RTM_MAX = 0x63
1659 RTM_MAX = 0x67
13711660 RTM_NEWACTION = 0x30
13721661 RTM_NEWADDR = 0x14
13731662 RTM_NEWADDRLABEL = 0x48
13741663 RTM_NEWCACHEREPORT = 0x60
1664 RTM_NEWCHAIN = 0x64
13751665 RTM_NEWLINK = 0x10
13761666 RTM_NEWMDB = 0x54
13771667 RTM_NEWNDUSEROPT = 0x44
13861676 RTM_NEWSTATS = 0x5c
13871677 RTM_NEWTCLASS = 0x28
13881678 RTM_NEWTFILTER = 0x2c
1389 RTM_NR_FAMILIES = 0x15
1390 RTM_NR_MSGTYPES = 0x54
1679 RTM_NR_FAMILIES = 0x16
1680 RTM_NR_MSGTYPES = 0x58
13911681 RTM_SETDCB = 0x4f
13921682 RTM_SETLINK = 0x13
13931683 RTM_SETNEIGHTBL = 0x43
14011691 RTNH_F_UNRESOLVED = 0x20
14021692 RTN_MAX = 0xb
14031693 RTPROT_BABEL = 0x2a
1694 RTPROT_BGP = 0xba
14041695 RTPROT_BIRD = 0xc
14051696 RTPROT_BOOT = 0x3
14061697 RTPROT_DHCP = 0x10
14071698 RTPROT_DNROUTED = 0xd
1699 RTPROT_EIGRP = 0xc0
14081700 RTPROT_GATED = 0x8
1701 RTPROT_ISIS = 0xbb
14091702 RTPROT_KERNEL = 0x2
14101703 RTPROT_MROUTED = 0x11
14111704 RTPROT_MRT = 0xa
14121705 RTPROT_NTK = 0xf
1706 RTPROT_OSPF = 0xbc
14131707 RTPROT_RA = 0x9
14141708 RTPROT_REDIRECT = 0x1
1709 RTPROT_RIP = 0xbd
14151710 RTPROT_STATIC = 0x4
14161711 RTPROT_UNSPEC = 0x0
14171712 RTPROT_XORP = 0xe
14311726 SCM_TIMESTAMPING_OPT_STATS = 0x36
14321727 SCM_TIMESTAMPING_PKTINFO = 0x3a
14331728 SCM_TIMESTAMPNS = 0x23
1729 SCM_TXTIME = 0x3d
14341730 SCM_WIFI_STATUS = 0x29
1731 SC_LOG_FLUSH = 0x100000
14351732 SECCOMP_MODE_DISABLED = 0x0
14361733 SECCOMP_MODE_FILTER = 0x2
14371734 SECCOMP_MODE_STRICT = 0x1
1735 SECURITYFS_MAGIC = 0x73636673
1736 SELINUX_MAGIC = 0xf97cff8c
1737 SFD_CLOEXEC = 0x80000
1738 SFD_NONBLOCK = 0x800
14381739 SHUT_RD = 0x0
14391740 SHUT_RDWR = 0x2
14401741 SHUT_WR = 0x1
14851786 SIOCGMIIPHY = 0x8947
14861787 SIOCGMIIREG = 0x8948
14871788 SIOCGPGRP = 0x8904
1789 SIOCGPPPCSTATS = 0x89f2
1790 SIOCGPPPSTATS = 0x89f0
1791 SIOCGPPPVER = 0x89f1
14881792 SIOCGRARP = 0x8961
14891793 SIOCGSKNS = 0x894c
14901794 SIOCGSTAMP = 0x8906
15191823 SIOCSPGRP = 0x8902
15201824 SIOCSRARP = 0x8962
15211825 SIOCWANDEV = 0x894a
1826 SMACK_MAGIC = 0x43415d53
1827 SMART_AUTOSAVE = 0xd2
1828 SMART_AUTO_OFFLINE = 0xdb
1829 SMART_DISABLE = 0xd9
1830 SMART_ENABLE = 0xd8
1831 SMART_HCYL_PASS = 0xc2
1832 SMART_IMMEDIATE_OFFLINE = 0xd4
1833 SMART_LCYL_PASS = 0x4f
1834 SMART_READ_LOG_SECTOR = 0xd5
1835 SMART_READ_THRESHOLDS = 0xd1
1836 SMART_READ_VALUES = 0xd0
1837 SMART_SAVE = 0xd3
1838 SMART_STATUS = 0xda
1839 SMART_WRITE_LOG_SECTOR = 0xd6
1840 SMART_WRITE_THRESHOLDS = 0xd7
1841 SMB_SUPER_MAGIC = 0x517b
1842 SOCKFS_MAGIC = 0x534f434b
15221843 SOCK_CLOEXEC = 0x80000
15231844 SOCK_DCCP = 0x6
15241845 SOCK_DGRAM = 0x2
15551876 SOL_SOCKET = 0x1
15561877 SOL_TCP = 0x6
15571878 SOL_TIPC = 0x10f
1879 SOL_TLS = 0x11a
15581880 SOL_X25 = 0x106
1881 SOL_XDP = 0x11b
15591882 SOMAXCONN = 0x80
15601883 SO_ACCEPTCONN = 0x1e
15611884 SO_ATTACH_BPF = 0x32
16141937 SO_TIMESTAMP = 0x1d
16151938 SO_TIMESTAMPING = 0x25
16161939 SO_TIMESTAMPNS = 0x23
1940 SO_TXTIME = 0x3d
16171941 SO_TYPE = 0x3
16181942 SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
16191943 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
16231947 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
16241948 SO_VM_SOCKETS_TRUSTED = 0x5
16251949 SO_WIFI_STATUS = 0x29
1950 SO_ZEROCOPY = 0x3c
16261951 SPLICE_F_GIFT = 0x8
16271952 SPLICE_F_MORE = 0x4
16281953 SPLICE_F_MOVE = 0x1
16291954 SPLICE_F_NONBLOCK = 0x2
1955 SQUASHFS_MAGIC = 0x73717368
1956 STACK_END_MAGIC = 0x57ac6e9d
1957 STATX_ALL = 0xfff
1958 STATX_ATIME = 0x20
1959 STATX_ATTR_APPEND = 0x20
1960 STATX_ATTR_AUTOMOUNT = 0x1000
1961 STATX_ATTR_COMPRESSED = 0x4
1962 STATX_ATTR_ENCRYPTED = 0x800
1963 STATX_ATTR_IMMUTABLE = 0x10
1964 STATX_ATTR_NODUMP = 0x40
1965 STATX_BASIC_STATS = 0x7ff
1966 STATX_BLOCKS = 0x400
1967 STATX_BTIME = 0x800
1968 STATX_CTIME = 0x80
1969 STATX_GID = 0x10
1970 STATX_INO = 0x100
1971 STATX_MODE = 0x2
1972 STATX_MTIME = 0x40
1973 STATX_NLINK = 0x4
1974 STATX_SIZE = 0x200
1975 STATX_TYPE = 0x1
1976 STATX_UID = 0x8
1977 STATX__RESERVED = 0x80000000
1978 SVE_MAGIC = 0x53564501
1979 SYNC_FILE_RANGE_WAIT_AFTER = 0x4
1980 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
1981 SYNC_FILE_RANGE_WRITE = 0x2
1982 SYSFS_MAGIC = 0x62656572
16301983 S_BLKSIZE = 0x200
16311984 S_IEXEC = 0x40
16321985 S_IFBLK = 0x6000
16642017 TASKSTATS_GENL_NAME = "TASKSTATS"
16652018 TASKSTATS_GENL_VERSION = 0x1
16662019 TASKSTATS_TYPE_MAX = 0x6
1667 TASKSTATS_VERSION = 0x8
2020 TASKSTATS_VERSION = 0x9
16682021 TCFLSH = 0x540b
16692022 TCGETA = 0x5405
16702023 TCGETS = 0x5401
16892042 TCP_DEFER_ACCEPT = 0x9
16902043 TCP_FASTOPEN = 0x17
16912044 TCP_FASTOPEN_CONNECT = 0x1e
2045 TCP_FASTOPEN_KEY = 0x21
2046 TCP_FASTOPEN_NO_COOKIE = 0x22
16922047 TCP_INFO = 0xb
16932048 TCP_KEEPCNT = 0x6
16942049 TCP_KEEPIDLE = 0x4
16982053 TCP_MAXWIN = 0xffff
16992054 TCP_MAX_WINSHIFT = 0xe
17002055 TCP_MD5SIG = 0xe
2056 TCP_MD5SIG_EXT = 0x20
2057 TCP_MD5SIG_FLAG_PREFIX = 0x1
17012058 TCP_MD5SIG_MAXKEYLEN = 0x50
17022059 TCP_MSS = 0x200
17032060 TCP_MSS_DEFAULT = 0x218
17182075 TCP_THIN_DUPACK = 0x11
17192076 TCP_THIN_LINEAR_TIMEOUTS = 0x10
17202077 TCP_TIMESTAMP = 0x18
2078 TCP_ULP = 0x1f
17212079 TCP_USER_TIMEOUT = 0x12
17222080 TCP_WINDOW_CLAMP = 0xa
17232081 TCSAFLUSH = 0x2
17362094 TCSETXF = 0x5434
17372095 TCSETXW = 0x5435
17382096 TCXONC = 0x540a
2097 TIMER_ABSTIME = 0x1
17392098 TIOCCBRK = 0x5428
17402099 TIOCCONS = 0x541d
17412100 TIOCEXCL = 0x540c
17432102 TIOCGETD = 0x5424
17442103 TIOCGEXCL = 0x80045440
17452104 TIOCGICOUNT = 0x545d
2105 TIOCGISO7816 = 0x80285442
17462106 TIOCGLCKTRMIOS = 0x5456
17472107 TIOCGPGRP = 0x540f
17482108 TIOCGPKT = 0x80045438
17962156 TIOCSER_TEMT = 0x1
17972157 TIOCSETD = 0x5423
17982158 TIOCSIG = 0x40045436
2159 TIOCSISO7816 = 0xc0285443
17992160 TIOCSLCKTRMIOS = 0x5457
18002161 TIOCSPGRP = 0x5410
18012162 TIOCSPTLCK = 0x40045431
18052166 TIOCSTI = 0x5412
18062167 TIOCSWINSZ = 0x5414
18072168 TIOCVHANGUP = 0x5437
2169 TMPFS_MAGIC = 0x1021994
18082170 TOSTOP = 0x100
2171 TPACKET_ALIGNMENT = 0x10
2172 TPACKET_HDRLEN = 0x34
2173 TP_STATUS_AVAILABLE = 0x0
2174 TP_STATUS_BLK_TMO = 0x20
2175 TP_STATUS_COPY = 0x2
2176 TP_STATUS_CSUMNOTREADY = 0x8
2177 TP_STATUS_CSUM_VALID = 0x80
2178 TP_STATUS_KERNEL = 0x0
2179 TP_STATUS_LOSING = 0x4
2180 TP_STATUS_SENDING = 0x2
2181 TP_STATUS_SEND_REQUEST = 0x1
2182 TP_STATUS_TS_RAW_HARDWARE = -0x80000000
2183 TP_STATUS_TS_SOFTWARE = 0x20000000
2184 TP_STATUS_TS_SYS_HARDWARE = 0x40000000
2185 TP_STATUS_USER = 0x1
2186 TP_STATUS_VLAN_TPID_VALID = 0x40
2187 TP_STATUS_VLAN_VALID = 0x10
2188 TP_STATUS_WRONG_FORMAT = 0x4
2189 TRACEFS_MAGIC = 0x74726163
18092190 TS_COMM_LEN = 0x20
18102191 TUNATTACHFILTER = 0x401054d5
18112192 TUNDETACHFILTER = 0x401054d6
18172198 TUNGETVNETHDRSZ = 0x800454d7
18182199 TUNGETVNETLE = 0x800454dd
18192200 TUNSETDEBUG = 0x400454c9
2201 TUNSETFILTEREBPF = 0x800454e1
18202202 TUNSETGROUP = 0x400454ce
18212203 TUNSETIFF = 0x400454ca
18222204 TUNSETIFINDEX = 0x400454da
18272209 TUNSETPERSIST = 0x400454cb
18282210 TUNSETQUEUE = 0x400454d9
18292211 TUNSETSNDBUF = 0x400454d4
2212 TUNSETSTEERINGEBPF = 0x800454e0
18302213 TUNSETTXFILTER = 0x400454d1
18312214 TUNSETVNETBE = 0x400454de
18322215 TUNSETVNETHDRSZ = 0x400454d8
18332216 TUNSETVNETLE = 0x400454dc
2217 UBI_IOCATT = 0x40186f40
2218 UBI_IOCDET = 0x40046f41
2219 UBI_IOCEBCH = 0x40044f02
2220 UBI_IOCEBER = 0x40044f01
2221 UBI_IOCEBISMAP = 0x80044f05
2222 UBI_IOCEBMAP = 0x40084f03
2223 UBI_IOCEBUNMAP = 0x40044f04
2224 UBI_IOCMKVOL = 0x40986f00
2225 UBI_IOCRMVOL = 0x40046f01
2226 UBI_IOCRNVOL = 0x51106f03
2227 UBI_IOCRSVOL = 0x400c6f02
2228 UBI_IOCSETVOLPROP = 0x40104f06
2229 UBI_IOCVOLCRBLK = 0x40804f07
2230 UBI_IOCVOLRMBLK = 0x4f08
2231 UBI_IOCVOLUP = 0x40084f00
2232 UDF_SUPER_MAGIC = 0x15013346
18342233 UMOUNT_NOFOLLOW = 0x8
2234 USBDEVICE_SUPER_MAGIC = 0x9fa2
2235 UTIME_NOW = 0x3fffffff
2236 UTIME_OMIT = 0x3ffffffe
2237 V9FS_MAGIC = 0x1021997
18352238 VDISCARD = 0xd
18362239 VEOF = 0x4
18372240 VEOL = 0xb
18612264 WALL = 0x40000000
18622265 WCLONE = 0x80000000
18632266 WCONTINUED = 0x8
2267 WDIOC_GETBOOTSTATUS = 0x80045702
2268 WDIOC_GETPRETIMEOUT = 0x80045709
2269 WDIOC_GETSTATUS = 0x80045701
2270 WDIOC_GETSUPPORT = 0x80285700
2271 WDIOC_GETTEMP = 0x80045703
2272 WDIOC_GETTIMELEFT = 0x8004570a
2273 WDIOC_GETTIMEOUT = 0x80045707
2274 WDIOC_KEEPALIVE = 0x80045705
2275 WDIOC_SETOPTIONS = 0x80045704
2276 WDIOC_SETPRETIMEOUT = 0xc0045708
2277 WDIOC_SETTIMEOUT = 0xc0045706
18642278 WEXITED = 0x4
2279 WIN_ACKMEDIACHANGE = 0xdb
2280 WIN_CHECKPOWERMODE1 = 0xe5
2281 WIN_CHECKPOWERMODE2 = 0x98
2282 WIN_DEVICE_RESET = 0x8
2283 WIN_DIAGNOSE = 0x90
2284 WIN_DOORLOCK = 0xde
2285 WIN_DOORUNLOCK = 0xdf
2286 WIN_DOWNLOAD_MICROCODE = 0x92
2287 WIN_FLUSH_CACHE = 0xe7
2288 WIN_FLUSH_CACHE_EXT = 0xea
2289 WIN_FORMAT = 0x50
2290 WIN_GETMEDIASTATUS = 0xda
2291 WIN_IDENTIFY = 0xec
2292 WIN_IDENTIFY_DMA = 0xee
2293 WIN_IDLEIMMEDIATE = 0xe1
2294 WIN_INIT = 0x60
2295 WIN_MEDIAEJECT = 0xed
2296 WIN_MULTREAD = 0xc4
2297 WIN_MULTREAD_EXT = 0x29
2298 WIN_MULTWRITE = 0xc5
2299 WIN_MULTWRITE_EXT = 0x39
2300 WIN_NOP = 0x0
2301 WIN_PACKETCMD = 0xa0
2302 WIN_PIDENTIFY = 0xa1
2303 WIN_POSTBOOT = 0xdc
2304 WIN_PREBOOT = 0xdd
2305 WIN_QUEUED_SERVICE = 0xa2
2306 WIN_READ = 0x20
2307 WIN_READDMA = 0xc8
2308 WIN_READDMA_EXT = 0x25
2309 WIN_READDMA_ONCE = 0xc9
2310 WIN_READDMA_QUEUED = 0xc7
2311 WIN_READDMA_QUEUED_EXT = 0x26
2312 WIN_READ_BUFFER = 0xe4
2313 WIN_READ_EXT = 0x24
2314 WIN_READ_LONG = 0x22
2315 WIN_READ_LONG_ONCE = 0x23
2316 WIN_READ_NATIVE_MAX = 0xf8
2317 WIN_READ_NATIVE_MAX_EXT = 0x27
2318 WIN_READ_ONCE = 0x21
2319 WIN_RECAL = 0x10
2320 WIN_RESTORE = 0x10
2321 WIN_SECURITY_DISABLE = 0xf6
2322 WIN_SECURITY_ERASE_PREPARE = 0xf3
2323 WIN_SECURITY_ERASE_UNIT = 0xf4
2324 WIN_SECURITY_FREEZE_LOCK = 0xf5
2325 WIN_SECURITY_SET_PASS = 0xf1
2326 WIN_SECURITY_UNLOCK = 0xf2
2327 WIN_SEEK = 0x70
2328 WIN_SETFEATURES = 0xef
2329 WIN_SETIDLE1 = 0xe3
2330 WIN_SETIDLE2 = 0x97
2331 WIN_SETMULT = 0xc6
2332 WIN_SET_MAX = 0xf9
2333 WIN_SET_MAX_EXT = 0x37
2334 WIN_SLEEPNOW1 = 0xe6
2335 WIN_SLEEPNOW2 = 0x99
2336 WIN_SMART = 0xb0
2337 WIN_SPECIFY = 0x91
2338 WIN_SRST = 0x8
2339 WIN_STANDBY = 0xe2
2340 WIN_STANDBY2 = 0x96
2341 WIN_STANDBYNOW1 = 0xe0
2342 WIN_STANDBYNOW2 = 0x94
2343 WIN_VERIFY = 0x40
2344 WIN_VERIFY_EXT = 0x42
2345 WIN_VERIFY_ONCE = 0x41
2346 WIN_WRITE = 0x30
2347 WIN_WRITEDMA = 0xca
2348 WIN_WRITEDMA_EXT = 0x35
2349 WIN_WRITEDMA_ONCE = 0xcb
2350 WIN_WRITEDMA_QUEUED = 0xcc
2351 WIN_WRITEDMA_QUEUED_EXT = 0x36
2352 WIN_WRITE_BUFFER = 0xe8
2353 WIN_WRITE_EXT = 0x34
2354 WIN_WRITE_LONG = 0x32
2355 WIN_WRITE_LONG_ONCE = 0x33
2356 WIN_WRITE_ONCE = 0x31
2357 WIN_WRITE_SAME = 0xe9
2358 WIN_WRITE_VERIFY = 0x3c
18652359 WNOHANG = 0x1
18662360 WNOTHREAD = 0x20000000
18672361 WNOWAIT = 0x1000000
18712365 XATTR_CREATE = 0x1
18722366 XATTR_REPLACE = 0x2
18732367 XCASE = 0x4
2368 XDP_COPY = 0x2
2369 XDP_FLAGS_DRV_MODE = 0x4
2370 XDP_FLAGS_HW_MODE = 0x8
2371 XDP_FLAGS_MASK = 0xf
2372 XDP_FLAGS_MODES = 0xe
2373 XDP_FLAGS_SKB_MODE = 0x2
2374 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
2375 XDP_MMAP_OFFSETS = 0x1
2376 XDP_PGOFF_RX_RING = 0x0
2377 XDP_PGOFF_TX_RING = 0x80000000
2378 XDP_RX_RING = 0x2
2379 XDP_SHARED_UMEM = 0x1
2380 XDP_STATISTICS = 0x7
2381 XDP_TX_RING = 0x3
2382 XDP_UMEM_COMPLETION_RING = 0x6
2383 XDP_UMEM_FILL_RING = 0x5
2384 XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
2385 XDP_UMEM_PGOFF_FILL_RING = 0x100000000
2386 XDP_UMEM_REG = 0x4
2387 XDP_ZEROCOPY = 0x4
2388 XENFS_SUPER_MAGIC = 0xabba1974
2389 XFS_SUPER_MAGIC = 0x58465342
18742390 XTABS = 0x1800
2391 ZSMALLOC_MAGIC = 0x58295829
18752392 )
18762393
18772394 // Errors
20512568 )
20522569
20532570 // Error table
2054 var errors = [...]string{
2055 1: "operation not permitted",
2056 2: "no such file or directory",
2057 3: "no such process",
2058 4: "interrupted system call",
2059 5: "input/output error",
2060 6: "no such device or address",
2061 7: "argument list too long",
2062 8: "exec format error",
2063 9: "bad file descriptor",
2064 10: "no child processes",
2065 11: "resource temporarily unavailable",
2066 12: "cannot allocate memory",
2067 13: "permission denied",
2068 14: "bad address",
2069 15: "block device required",
2070 16: "device or resource busy",
2071 17: "file exists",
2072 18: "invalid cross-device link",
2073 19: "no such device",
2074 20: "not a directory",
2075 21: "is a directory",
2076 22: "invalid argument",
2077 23: "too many open files in system",
2078 24: "too many open files",
2079 25: "inappropriate ioctl for device",
2080 26: "text file busy",
2081 27: "file too large",
2082 28: "no space left on device",
2083 29: "illegal seek",
2084 30: "read-only file system",
2085 31: "too many links",
2086 32: "broken pipe",
2087 33: "numerical argument out of domain",
2088 34: "numerical result out of range",
2089 35: "resource deadlock avoided",
2090 36: "file name too long",
2091 37: "no locks available",
2092 38: "function not implemented",
2093 39: "directory not empty",
2094 40: "too many levels of symbolic links",
2095 42: "no message of desired type",
2096 43: "identifier removed",
2097 44: "channel number out of range",
2098 45: "level 2 not synchronized",
2099 46: "level 3 halted",
2100 47: "level 3 reset",
2101 48: "link number out of range",
2102 49: "protocol driver not attached",
2103 50: "no CSI structure available",
2104 51: "level 2 halted",
2105 52: "invalid exchange",
2106 53: "invalid request descriptor",
2107 54: "exchange full",
2108 55: "no anode",
2109 56: "invalid request code",
2110 57: "invalid slot",
2111 59: "bad font file format",
2112 60: "device not a stream",
2113 61: "no data available",
2114 62: "timer expired",
2115 63: "out of streams resources",
2116 64: "machine is not on the network",
2117 65: "package not installed",
2118 66: "object is remote",
2119 67: "link has been severed",
2120 68: "advertise error",
2121 69: "srmount error",
2122 70: "communication error on send",
2123 71: "protocol error",
2124 72: "multihop attempted",
2125 73: "RFS specific error",
2126 74: "bad message",
2127 75: "value too large for defined data type",
2128 76: "name not unique on network",
2129 77: "file descriptor in bad state",
2130 78: "remote address changed",
2131 79: "can not access a needed shared library",
2132 80: "accessing a corrupted shared library",
2133 81: ".lib section in a.out corrupted",
2134 82: "attempting to link in too many shared libraries",
2135 83: "cannot exec a shared library directly",
2136 84: "invalid or incomplete multibyte or wide character",
2137 85: "interrupted system call should be restarted",
2138 86: "streams pipe error",
2139 87: "too many users",
2140 88: "socket operation on non-socket",
2141 89: "destination address required",
2142 90: "message too long",
2143 91: "protocol wrong type for socket",
2144 92: "protocol not available",
2145 93: "protocol not supported",
2146 94: "socket type not supported",
2147 95: "operation not supported",
2148 96: "protocol family not supported",
2149 97: "address family not supported by protocol",
2150 98: "address already in use",
2151 99: "cannot assign requested address",
2152 100: "network is down",
2153 101: "network is unreachable",
2154 102: "network dropped connection on reset",
2155 103: "software caused connection abort",
2156 104: "connection reset by peer",
2157 105: "no buffer space available",
2158 106: "transport endpoint is already connected",
2159 107: "transport endpoint is not connected",
2160 108: "cannot send after transport endpoint shutdown",
2161 109: "too many references: cannot splice",
2162 110: "connection timed out",
2163 111: "connection refused",
2164 112: "host is down",
2165 113: "no route to host",
2166 114: "operation already in progress",
2167 115: "operation now in progress",
2168 116: "stale file handle",
2169 117: "structure needs cleaning",
2170 118: "not a XENIX named type file",
2171 119: "no XENIX semaphores available",
2172 120: "is a named type file",
2173 121: "remote I/O error",
2174 122: "disk quota exceeded",
2175 123: "no medium found",
2176 124: "wrong medium type",
2177 125: "operation canceled",
2178 126: "required key not available",
2179 127: "key has expired",
2180 128: "key has been revoked",
2181 129: "key was rejected by service",
2182 130: "owner died",
2183 131: "state not recoverable",
2184 132: "operation not possible due to RF-kill",
2185 133: "memory page has hardware error",
2571 var errorList = [...]struct {
2572 num syscall.Errno
2573 name string
2574 desc string
2575 }{
2576 {1, "EPERM", "operation not permitted"},
2577 {2, "ENOENT", "no such file or directory"},
2578 {3, "ESRCH", "no such process"},
2579 {4, "EINTR", "interrupted system call"},
2580 {5, "EIO", "input/output error"},
2581 {6, "ENXIO", "no such device or address"},
2582 {7, "E2BIG", "argument list too long"},
2583 {8, "ENOEXEC", "exec format error"},
2584 {9, "EBADF", "bad file descriptor"},
2585 {10, "ECHILD", "no child processes"},
2586 {11, "EAGAIN", "resource temporarily unavailable"},
2587 {12, "ENOMEM", "cannot allocate memory"},
2588 {13, "EACCES", "permission denied"},
2589 {14, "EFAULT", "bad address"},
2590 {15, "ENOTBLK", "block device required"},
2591 {16, "EBUSY", "device or resource busy"},
2592 {17, "EEXIST", "file exists"},
2593 {18, "EXDEV", "invalid cross-device link"},
2594 {19, "ENODEV", "no such device"},
2595 {20, "ENOTDIR", "not a directory"},
2596 {21, "EISDIR", "is a directory"},
2597 {22, "EINVAL", "invalid argument"},
2598 {23, "ENFILE", "too many open files in system"},
2599 {24, "EMFILE", "too many open files"},
2600 {25, "ENOTTY", "inappropriate ioctl for device"},
2601 {26, "ETXTBSY", "text file busy"},
2602 {27, "EFBIG", "file too large"},
2603 {28, "ENOSPC", "no space left on device"},
2604 {29, "ESPIPE", "illegal seek"},
2605 {30, "EROFS", "read-only file system"},
2606 {31, "EMLINK", "too many links"},
2607 {32, "EPIPE", "broken pipe"},
2608 {33, "EDOM", "numerical argument out of domain"},
2609 {34, "ERANGE", "numerical result out of range"},
2610 {35, "EDEADLK", "resource deadlock avoided"},
2611 {36, "ENAMETOOLONG", "file name too long"},
2612 {37, "ENOLCK", "no locks available"},
2613 {38, "ENOSYS", "function not implemented"},
2614 {39, "ENOTEMPTY", "directory not empty"},
2615 {40, "ELOOP", "too many levels of symbolic links"},
2616 {42, "ENOMSG", "no message of desired type"},
2617 {43, "EIDRM", "identifier removed"},
2618 {44, "ECHRNG", "channel number out of range"},
2619 {45, "EL2NSYNC", "level 2 not synchronized"},
2620 {46, "EL3HLT", "level 3 halted"},
2621 {47, "EL3RST", "level 3 reset"},
2622 {48, "ELNRNG", "link number out of range"},
2623 {49, "EUNATCH", "protocol driver not attached"},
2624 {50, "ENOCSI", "no CSI structure available"},
2625 {51, "EL2HLT", "level 2 halted"},
2626 {52, "EBADE", "invalid exchange"},
2627 {53, "EBADR", "invalid request descriptor"},
2628 {54, "EXFULL", "exchange full"},
2629 {55, "ENOANO", "no anode"},
2630 {56, "EBADRQC", "invalid request code"},
2631 {57, "EBADSLT", "invalid slot"},
2632 {59, "EBFONT", "bad font file format"},
2633 {60, "ENOSTR", "device not a stream"},
2634 {61, "ENODATA", "no data available"},
2635 {62, "ETIME", "timer expired"},
2636 {63, "ENOSR", "out of streams resources"},
2637 {64, "ENONET", "machine is not on the network"},
2638 {65, "ENOPKG", "package not installed"},
2639 {66, "EREMOTE", "object is remote"},
2640 {67, "ENOLINK", "link has been severed"},
2641 {68, "EADV", "advertise error"},
2642 {69, "ESRMNT", "srmount error"},
2643 {70, "ECOMM", "communication error on send"},
2644 {71, "EPROTO", "protocol error"},
2645 {72, "EMULTIHOP", "multihop attempted"},
2646 {73, "EDOTDOT", "RFS specific error"},
2647 {74, "EBADMSG", "bad message"},
2648 {75, "EOVERFLOW", "value too large for defined data type"},
2649 {76, "ENOTUNIQ", "name not unique on network"},
2650 {77, "EBADFD", "file descriptor in bad state"},
2651 {78, "EREMCHG", "remote address changed"},
2652 {79, "ELIBACC", "can not access a needed shared library"},
2653 {80, "ELIBBAD", "accessing a corrupted shared library"},
2654 {81, "ELIBSCN", ".lib section in a.out corrupted"},
2655 {82, "ELIBMAX", "attempting to link in too many shared libraries"},
2656 {83, "ELIBEXEC", "cannot exec a shared library directly"},
2657 {84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
2658 {85, "ERESTART", "interrupted system call should be restarted"},
2659 {86, "ESTRPIPE", "streams pipe error"},
2660 {87, "EUSERS", "too many users"},
2661 {88, "ENOTSOCK", "socket operation on non-socket"},
2662 {89, "EDESTADDRREQ", "destination address required"},
2663 {90, "EMSGSIZE", "message too long"},
2664 {91, "EPROTOTYPE", "protocol wrong type for socket"},
2665 {92, "ENOPROTOOPT", "protocol not available"},
2666 {93, "EPROTONOSUPPORT", "protocol not supported"},
2667 {94, "ESOCKTNOSUPPORT", "socket type not supported"},
2668 {95, "ENOTSUP", "operation not supported"},
2669 {96, "EPFNOSUPPORT", "protocol family not supported"},
2670 {97, "EAFNOSUPPORT", "address family not supported by protocol"},
2671 {98, "EADDRINUSE", "address already in use"},
2672 {99, "EADDRNOTAVAIL", "cannot assign requested address"},
2673 {100, "ENETDOWN", "network is down"},
2674 {101, "ENETUNREACH", "network is unreachable"},
2675 {102, "ENETRESET", "network dropped connection on reset"},
2676 {103, "ECONNABORTED", "software caused connection abort"},
2677 {104, "ECONNRESET", "connection reset by peer"},
2678 {105, "ENOBUFS", "no buffer space available"},
2679 {106, "EISCONN", "transport endpoint is already connected"},
2680 {107, "ENOTCONN", "transport endpoint is not connected"},
2681 {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
2682 {109, "ETOOMANYREFS", "too many references: cannot splice"},
2683 {110, "ETIMEDOUT", "connection timed out"},
2684 {111, "ECONNREFUSED", "connection refused"},
2685 {112, "EHOSTDOWN", "host is down"},
2686 {113, "EHOSTUNREACH", "no route to host"},
2687 {114, "EALREADY", "operation already in progress"},
2688 {115, "EINPROGRESS", "operation now in progress"},
2689 {116, "ESTALE", "stale file handle"},
2690 {117, "EUCLEAN", "structure needs cleaning"},
2691 {118, "ENOTNAM", "not a XENIX named type file"},
2692 {119, "ENAVAIL", "no XENIX semaphores available"},
2693 {120, "EISNAM", "is a named type file"},
2694 {121, "EREMOTEIO", "remote I/O error"},
2695 {122, "EDQUOT", "disk quota exceeded"},
2696 {123, "ENOMEDIUM", "no medium found"},
2697 {124, "EMEDIUMTYPE", "wrong medium type"},
2698 {125, "ECANCELED", "operation canceled"},
2699 {126, "ENOKEY", "required key not available"},
2700 {127, "EKEYEXPIRED", "key has expired"},
2701 {128, "EKEYREVOKED", "key has been revoked"},
2702 {129, "EKEYREJECTED", "key was rejected by service"},
2703 {130, "EOWNERDEAD", "owner died"},
2704 {131, "ENOTRECOVERABLE", "state not recoverable"},
2705 {132, "ERFKILL", "operation not possible due to RF-kill"},
2706 {133, "EHWPOISON", "memory page has hardware error"},
21862707 }
21872708
21882709 // Signal table
2189 var signals = [...]string{
2190 1: "hangup",
2191 2: "interrupt",
2192 3: "quit",
2193 4: "illegal instruction",
2194 5: "trace/breakpoint trap",
2195 6: "aborted",
2196 7: "bus error",
2197 8: "floating point exception",
2198 9: "killed",
2199 10: "user defined signal 1",
2200 11: "segmentation fault",
2201 12: "user defined signal 2",
2202 13: "broken pipe",
2203 14: "alarm clock",
2204 15: "terminated",
2205 16: "stack fault",
2206 17: "child exited",
2207 18: "continued",
2208 19: "stopped (signal)",
2209 20: "stopped",
2210 21: "stopped (tty input)",
2211 22: "stopped (tty output)",
2212 23: "urgent I/O condition",
2213 24: "CPU time limit exceeded",
2214 25: "file size limit exceeded",
2215 26: "virtual timer expired",
2216 27: "profiling timer expired",
2217 28: "window changed",
2218 29: "I/O possible",
2219 30: "power failure",
2220 31: "bad system call",
2710 var signalList = [...]struct {
2711 num syscall.Signal
2712 name string
2713 desc string
2714 }{
2715 {1, "SIGHUP", "hangup"},
2716 {2, "SIGINT", "interrupt"},
2717 {3, "SIGQUIT", "quit"},
2718 {4, "SIGILL", "illegal instruction"},
2719 {5, "SIGTRAP", "trace/breakpoint trap"},
2720 {6, "SIGABRT", "aborted"},
2721 {7, "SIGBUS", "bus error"},
2722 {8, "SIGFPE", "floating point exception"},
2723 {9, "SIGKILL", "killed"},
2724 {10, "SIGUSR1", "user defined signal 1"},
2725 {11, "SIGSEGV", "segmentation fault"},
2726 {12, "SIGUSR2", "user defined signal 2"},
2727 {13, "SIGPIPE", "broken pipe"},
2728 {14, "SIGALRM", "alarm clock"},
2729 {15, "SIGTERM", "terminated"},
2730 {16, "SIGSTKFLT", "stack fault"},
2731 {17, "SIGCHLD", "child exited"},
2732 {18, "SIGCONT", "continued"},
2733 {19, "SIGSTOP", "stopped (signal)"},
2734 {20, "SIGTSTP", "stopped"},
2735 {21, "SIGTTIN", "stopped (tty input)"},
2736 {22, "SIGTTOU", "stopped (tty output)"},
2737 {23, "SIGURG", "urgent I/O condition"},
2738 {24, "SIGXCPU", "CPU time limit exceeded"},
2739 {25, "SIGXFSZ", "file size limit exceeded"},
2740 {26, "SIGVTALRM", "virtual timer expired"},
2741 {27, "SIGPROF", "profiling timer expired"},
2742 {28, "SIGWINCH", "window changed"},
2743 {29, "SIGIO", "I/O possible"},
2744 {30, "SIGPWR", "power failure"},
2745 {31, "SIGSYS", "bad system call"},
22212746 }
22
33 // +build mips,linux
44
5 // Created by cgo -godefs - DO NOT EDIT
5 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
66 // cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
77
88 package unix
1010 import "syscall"
1111
1212 const (
13 AAFS_MAGIC = 0x5a3c69f0
14 ADFS_SUPER_MAGIC = 0xadf5
15 AFFS_SUPER_MAGIC = 0xadff
16 AFS_FS_MAGIC = 0x6b414653
17 AFS_SUPER_MAGIC = 0x5346414f
1318 AF_ALG = 0x26
1419 AF_APPLETALK = 0x5
1520 AF_ASH = 0x12
5863 AF_VSOCK = 0x28
5964 AF_WANPIPE = 0x19
6065 AF_X25 = 0x9
66 AF_XDP = 0x2c
6167 ALG_OP_DECRYPT = 0x0
6268 ALG_OP_ENCRYPT = 0x1
6369 ALG_SET_AEAD_ASSOCLEN = 0x4
6571 ALG_SET_IV = 0x2
6672 ALG_SET_KEY = 0x1
6773 ALG_SET_OP = 0x3
74 ANON_INODE_FS_MAGIC = 0x9041934
6875 ARPHRD_6LOWPAN = 0x339
6976 ARPHRD_ADAPT = 0x108
7077 ARPHRD_APPLETLK = 0x8
120127 ARPHRD_PPP = 0x200
121128 ARPHRD_PRONET = 0x4
122129 ARPHRD_RAWHDLC = 0x206
130 ARPHRD_RAWIP = 0x207
123131 ARPHRD_ROSE = 0x10e
124132 ARPHRD_RSRVD = 0x104
125133 ARPHRD_SIT = 0x308
131139 ARPHRD_VOID = 0xffff
132140 ARPHRD_VSOCKMON = 0x33a
133141 ARPHRD_X25 = 0x10f
142 AUTOFS_SUPER_MAGIC = 0x187
134143 B0 = 0x0
135144 B1000000 = 0x1008
136145 B110 = 0x3
162171 B75 = 0x2
163172 B921600 = 0x1007
164173 B9600 = 0xd
174 BALLOON_KVM_MAGIC = 0x13661366
175 BDEVFS_MAGIC = 0x62646576
176 BINFMTFS_MAGIC = 0x42494e4d
165177 BLKBSZGET = 0x40041270
166178 BLKBSZSET = 0x80041271
167179 BLKFLSBUF = 0x20001261
186198 BPF_AND = 0x50
187199 BPF_B = 0x10
188200 BPF_DIV = 0x30
201 BPF_FS_MAGIC = 0xcafe4a11
189202 BPF_H = 0x8
190203 BPF_IMM = 0x0
191204 BPF_IND = 0x40
227240 BS0 = 0x0
228241 BS1 = 0x2000
229242 BSDLY = 0x2000
243 BTRFS_SUPER_MAGIC = 0x9123683e
244 BTRFS_TEST_MAGIC = 0x73727279
230245 CAN_BCM = 0x2
231246 CAN_EFF_FLAG = 0x80000000
232247 CAN_EFF_ID_BITS = 0x1d
250265 CBAUD = 0x100f
251266 CBAUDEX = 0x1000
252267 CFLUSH = 0xf
268 CGROUP2_SUPER_MAGIC = 0x63677270
269 CGROUP_SUPER_MAGIC = 0x27e0eb
253270 CIBAUD = 0x100f0000
254271 CLOCAL = 0x800
255272 CLOCK_BOOTTIME = 0x7
292309 CLONE_VFORK = 0x4000
293310 CLONE_VM = 0x100
294311 CMSPAR = 0x40000000
312 CODA_SUPER_MAGIC = 0x73757245
295313 CR0 = 0x0
296314 CR1 = 0x200
297315 CR2 = 0x400
298316 CR3 = 0x600
317 CRAMFS_MAGIC = 0x28cd3d45
299318 CRDLY = 0x600
300319 CREAD = 0x80
301320 CRTSCTS = 0x80000000
310329 CSTOP = 0x13
311330 CSTOPB = 0x40
312331 CSUSP = 0x1a
332 DAXFS_MAGIC = 0x64646178
333 DEBUGFS_MAGIC = 0x64626720
334 DEVPTS_SUPER_MAGIC = 0x1cd1
313335 DT_BLK = 0x6
314336 DT_CHR = 0x2
315337 DT_DIR = 0x4
326348 ECHOKE = 0x800
327349 ECHONL = 0x40
328350 ECHOPRT = 0x400
351 ECRYPTFS_SUPER_MAGIC = 0xf15f
329352 EFD_CLOEXEC = 0x80000
330353 EFD_NONBLOCK = 0x80
331354 EFD_SEMAPHORE = 0x1
355 EFIVARFS_MAGIC = 0xde5e81e4
356 EFS_SUPER_MAGIC = 0x414a53
332357 ENCODING_DEFAULT = 0x0
333358 ENCODING_FM_MARK = 0x3
334359 ENCODING_FM_SPACE = 0x4
389414 ETH_P_DSA = 0x1b
390415 ETH_P_ECONET = 0x18
391416 ETH_P_EDSA = 0xdada
417 ETH_P_ERSPAN = 0x88be
418 ETH_P_ERSPAN2 = 0x22eb
392419 ETH_P_FCOE = 0x8906
393420 ETH_P_FIP = 0x8914
394421 ETH_P_HDLC = 0x19
397424 ETH_P_IEEE802154 = 0xf6
398425 ETH_P_IEEEPUP = 0xa00
399426 ETH_P_IEEEPUPAT = 0xa01
427 ETH_P_IFE = 0xed3e
400428 ETH_P_IP = 0x800
401429 ETH_P_IPV6 = 0x86dd
402430 ETH_P_IPX = 0x8137
407435 ETH_P_LOOP = 0x60
408436 ETH_P_LOOPBACK = 0x9000
409437 ETH_P_MACSEC = 0x88e5
438 ETH_P_MAP = 0xf9
410439 ETH_P_MOBITEX = 0x15
411440 ETH_P_MPLS_MC = 0x8848
412441 ETH_P_MPLS_UC = 0x8847
413442 ETH_P_MVRP = 0x88f5
414443 ETH_P_NCSI = 0x88f8
444 ETH_P_NSH = 0x894f
415445 ETH_P_PAE = 0x888e
416446 ETH_P_PAUSE = 0x8808
417447 ETH_P_PHONET = 0xf5
419449 ETH_P_PPP_DISC = 0x8863
420450 ETH_P_PPP_MP = 0x8
421451 ETH_P_PPP_SES = 0x8864
452 ETH_P_PREAUTH = 0x88c7
422453 ETH_P_PRP = 0x88fb
423454 ETH_P_PUP = 0x200
424455 ETH_P_PUPAT = 0x201
439470 ETH_P_WCCP = 0x883e
440471 ETH_P_X25 = 0x805
441472 ETH_P_XDSA = 0xf8
473 EXABYTE_ENABLE_NEST = 0xf0
474 EXT2_SUPER_MAGIC = 0xef53
475 EXT3_SUPER_MAGIC = 0xef53
476 EXT4_SUPER_MAGIC = 0xef53
442477 EXTA = 0xe
443478 EXTB = 0xf
444479 EXTPROC = 0x10000
480 F2FS_SUPER_MAGIC = 0xf2f52010
445481 FALLOC_FL_COLLAPSE_RANGE = 0x8
446482 FALLOC_FL_INSERT_RANGE = 0x20
447483 FALLOC_FL_KEEP_SIZE = 0x1
462498 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
463499 FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
464500 FS_ENCRYPTION_MODE_INVALID = 0x0
501 FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
502 FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
465503 FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
466504 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
467505 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
475513 FS_POLICY_FLAGS_PAD_8 = 0x1
476514 FS_POLICY_FLAGS_PAD_MASK = 0x3
477515 FS_POLICY_FLAGS_VALID = 0x3
516 FUTEXFS_SUPER_MAGIC = 0xbad1dea
517 F_ADD_SEALS = 0x409
478518 F_DUPFD = 0x0
479519 F_DUPFD_CLOEXEC = 0x406
480520 F_EXLCK = 0x4
487527 F_GETOWN_EX = 0x10
488528 F_GETPIPE_SZ = 0x408
489529 F_GETSIG = 0xb
530 F_GET_FILE_RW_HINT = 0x40d
531 F_GET_RW_HINT = 0x40b
532 F_GET_SEALS = 0x40a
490533 F_LOCK = 0x1
491534 F_NOTIFY = 0x402
492535 F_OFD_GETLK = 0x24
494537 F_OFD_SETLKW = 0x26
495538 F_OK = 0x0
496539 F_RDLCK = 0x0
540 F_SEAL_GROW = 0x4
541 F_SEAL_SEAL = 0x1
542 F_SEAL_SHRINK = 0x2
543 F_SEAL_WRITE = 0x8
497544 F_SETFD = 0x2
498545 F_SETFL = 0x4
499546 F_SETLEASE = 0x400
505552 F_SETOWN_EX = 0xf
506553 F_SETPIPE_SZ = 0x407
507554 F_SETSIG = 0xa
555 F_SET_FILE_RW_HINT = 0x40e
556 F_SET_RW_HINT = 0x40c
508557 F_SHLCK = 0x8
509558 F_TEST = 0x3
510559 F_TLOCK = 0x2
526575 GENL_UNS_ADMIN_PERM = 0x10
527576 GRND_NONBLOCK = 0x1
528577 GRND_RANDOM = 0x2
578 HDIO_DRIVE_CMD = 0x31f
579 HDIO_DRIVE_CMD_AEB = 0x31e
580 HDIO_DRIVE_CMD_HDR_SIZE = 0x4
581 HDIO_DRIVE_HOB_HDR_SIZE = 0x8
582 HDIO_DRIVE_RESET = 0x31c
583 HDIO_DRIVE_TASK = 0x31e
584 HDIO_DRIVE_TASKFILE = 0x31d
585 HDIO_DRIVE_TASK_HDR_SIZE = 0x8
586 HDIO_GETGEO = 0x301
587 HDIO_GET_32BIT = 0x309
588 HDIO_GET_ACOUSTIC = 0x30f
589 HDIO_GET_ADDRESS = 0x310
590 HDIO_GET_BUSSTATE = 0x31a
591 HDIO_GET_DMA = 0x30b
592 HDIO_GET_IDENTITY = 0x30d
593 HDIO_GET_KEEPSETTINGS = 0x308
594 HDIO_GET_MULTCOUNT = 0x304
595 HDIO_GET_NICE = 0x30c
596 HDIO_GET_NOWERR = 0x30a
597 HDIO_GET_QDMA = 0x305
598 HDIO_GET_UNMASKINTR = 0x302
599 HDIO_GET_WCACHE = 0x30e
600 HDIO_OBSOLETE_IDENTITY = 0x307
601 HDIO_SCAN_HWIF = 0x328
602 HDIO_SET_32BIT = 0x324
603 HDIO_SET_ACOUSTIC = 0x32c
604 HDIO_SET_ADDRESS = 0x32f
605 HDIO_SET_BUSSTATE = 0x32d
606 HDIO_SET_DMA = 0x326
607 HDIO_SET_KEEPSETTINGS = 0x323
608 HDIO_SET_MULTCOUNT = 0x321
609 HDIO_SET_NICE = 0x329
610 HDIO_SET_NOWERR = 0x325
611 HDIO_SET_PIO_MODE = 0x327
612 HDIO_SET_QDMA = 0x32e
613 HDIO_SET_UNMASKINTR = 0x322
614 HDIO_SET_WCACHE = 0x32b
615 HDIO_SET_XFER = 0x306
616 HDIO_TRISTATE_HWIF = 0x31b
617 HDIO_UNREGISTER_HWIF = 0x32a
618 HOSTFS_SUPER_MAGIC = 0xc0ffee
619 HPFS_SUPER_MAGIC = 0xf995e849
620 HUGETLBFS_MAGIC = 0x958458f6
529621 HUPCL = 0x400
530622 IBSHIFT = 0x10
531623 ICANON = 0x2
545637 IFA_F_STABLE_PRIVACY = 0x800
546638 IFA_F_TEMPORARY = 0x1
547639 IFA_F_TENTATIVE = 0x40
548 IFA_MAX = 0x8
640 IFA_MAX = 0xa
549641 IFF_ALLMULTI = 0x200
550642 IFF_ATTACH_QUEUE = 0x200
551643 IFF_AUTOMEDIA = 0x4000
560652 IFF_MASTER = 0x400
561653 IFF_MULTICAST = 0x1000
562654 IFF_MULTI_QUEUE = 0x100
655 IFF_NAPI = 0x10
656 IFF_NAPI_FRAGS = 0x20
563657 IFF_NOARP = 0x80
564658 IFF_NOFILTER = 0x1000
565659 IFF_NOTRAILERS = 0x20
622716 IN_OPEN = 0x20
623717 IN_Q_OVERFLOW = 0x4000
624718 IN_UNMOUNT = 0x2000
719 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
625720 IPPROTO_AH = 0x33
626721 IPPROTO_BEETPH = 0x5e
627722 IPPROTO_COMP = 0x6c
669764 IPV6_DONTFRAG = 0x3e
670765 IPV6_DROP_MEMBERSHIP = 0x15
671766 IPV6_DSTOPTS = 0x3b
767 IPV6_FREEBIND = 0x4e
672768 IPV6_HDRINCL = 0x24
673769 IPV6_HOPLIMIT = 0x34
674770 IPV6_HOPOPTS = 0x36
773869 IP_UNICAST_IF = 0x32
774870 IP_XFRM_POLICY = 0x11
775871 ISIG = 0x1
872 ISOFS_SUPER_MAGIC = 0x9660
776873 ISTRIP = 0x20
777874 IUCLC = 0x200
778875 IUTF8 = 0x4000
779876 IXANY = 0x800
780877 IXOFF = 0x1000
781878 IXON = 0x400
879 JFFS2_SUPER_MAGIC = 0x72b6
880 KEXEC_ARCH_386 = 0x30000
881 KEXEC_ARCH_68K = 0x40000
882 KEXEC_ARCH_AARCH64 = 0xb70000
883 KEXEC_ARCH_ARM = 0x280000
884 KEXEC_ARCH_DEFAULT = 0x0
885 KEXEC_ARCH_IA_64 = 0x320000
886 KEXEC_ARCH_MASK = 0xffff0000
887 KEXEC_ARCH_MIPS = 0x80000
888 KEXEC_ARCH_MIPS_LE = 0xa0000
889 KEXEC_ARCH_PPC = 0x140000
890 KEXEC_ARCH_PPC64 = 0x150000
891 KEXEC_ARCH_S390 = 0x160000
892 KEXEC_ARCH_SH = 0x2a0000
893 KEXEC_ARCH_X86_64 = 0x3e0000
894 KEXEC_FILE_NO_INITRAMFS = 0x4
895 KEXEC_FILE_ON_CRASH = 0x2
896 KEXEC_FILE_UNLOAD = 0x1
897 KEXEC_ON_CRASH = 0x1
898 KEXEC_PRESERVE_CONTEXT = 0x2
899 KEXEC_SEGMENT_MAX = 0x10
782900 KEYCTL_ASSUME_AUTHORITY = 0x10
783901 KEYCTL_CHOWN = 0x4
784902 KEYCTL_CLEAR = 0x7
793911 KEYCTL_JOIN_SESSION_KEYRING = 0x1
794912 KEYCTL_LINK = 0x8
795913 KEYCTL_NEGATE = 0xd
914 KEYCTL_PKEY_DECRYPT = 0x1a
915 KEYCTL_PKEY_ENCRYPT = 0x19
916 KEYCTL_PKEY_QUERY = 0x18
917 KEYCTL_PKEY_SIGN = 0x1b
918 KEYCTL_PKEY_VERIFY = 0x1c
796919 KEYCTL_READ = 0xb
797920 KEYCTL_REJECT = 0x13
798921 KEYCTL_RESTRICT_KEYRING = 0x1d
802925 KEYCTL_SETPERM = 0x5
803926 KEYCTL_SET_REQKEY_KEYRING = 0xe
804927 KEYCTL_SET_TIMEOUT = 0xf
928 KEYCTL_SUPPORTS_DECRYPT = 0x2
929 KEYCTL_SUPPORTS_ENCRYPT = 0x1
930 KEYCTL_SUPPORTS_SIGN = 0x4
931 KEYCTL_SUPPORTS_VERIFY = 0x8
805932 KEYCTL_UNLINK = 0x9
806933 KEYCTL_UPDATE = 0x2
807934 KEY_REQKEY_DEFL_DEFAULT = 0x0
843970 MADV_FREE = 0x8
844971 MADV_HUGEPAGE = 0xe
845972 MADV_HWPOISON = 0x64
973 MADV_KEEPONFORK = 0x13
846974 MADV_MERGEABLE = 0xc
847975 MADV_NOHUGEPAGE = 0xf
848976 MADV_NORMAL = 0x0
851979 MADV_SEQUENTIAL = 0x2
852980 MADV_UNMERGEABLE = 0xd
853981 MADV_WILLNEED = 0x3
982 MADV_WIPEONFORK = 0x12
854983 MAP_ANON = 0x800
855984 MAP_ANONYMOUS = 0x800
856985 MAP_DENYWRITE = 0x2000
857986 MAP_EXECUTABLE = 0x4000
858987 MAP_FILE = 0x0
859988 MAP_FIXED = 0x10
989 MAP_FIXED_NOREPLACE = 0x100000
860990 MAP_GROWSDOWN = 0x1000
861991 MAP_HUGETLB = 0x80000
862992 MAP_HUGE_MASK = 0x3f
868998 MAP_PRIVATE = 0x2
869999 MAP_RENAME = 0x800
8701000 MAP_SHARED = 0x1
1001 MAP_SHARED_VALIDATE = 0x3
8711002 MAP_STACK = 0x40000
8721003 MAP_TYPE = 0xf
8731004 MCL_CURRENT = 0x1
8741005 MCL_FUTURE = 0x2
8751006 MCL_ONFAULT = 0x4
1007 MFD_ALLOW_SEALING = 0x2
1008 MFD_CLOEXEC = 0x1
1009 MFD_HUGETLB = 0x4
1010 MFD_HUGE_16GB = -0x78000000
1011 MFD_HUGE_16MB = 0x60000000
1012 MFD_HUGE_1GB = 0x78000000
1013 MFD_HUGE_1MB = 0x50000000
1014 MFD_HUGE_256MB = 0x70000000
1015 MFD_HUGE_2GB = 0x7c000000
1016 MFD_HUGE_2MB = 0x54000000
1017 MFD_HUGE_32MB = 0x64000000
1018 MFD_HUGE_512KB = 0x4c000000
1019 MFD_HUGE_512MB = 0x74000000
1020 MFD_HUGE_64KB = 0x40000000
1021 MFD_HUGE_8MB = 0x5c000000
1022 MFD_HUGE_MASK = 0x3f
1023 MFD_HUGE_SHIFT = 0x1a
1024 MINIX2_SUPER_MAGIC = 0x2468
1025 MINIX2_SUPER_MAGIC2 = 0x2478
1026 MINIX3_SUPER_MAGIC = 0x4d5a
1027 MINIX_SUPER_MAGIC = 0x137f
1028 MINIX_SUPER_MAGIC2 = 0x138f
8761029 MNT_DETACH = 0x2
8771030 MNT_EXPIRE = 0x4
8781031 MNT_FORCE = 0x1
1032 MODULE_INIT_IGNORE_MODVERSIONS = 0x1
1033 MODULE_INIT_IGNORE_VERMAGIC = 0x2
1034 MSDOS_SUPER_MAGIC = 0x4d44
8791035 MSG_BATCH = 0x40000
8801036 MSG_CMSG_CLOEXEC = 0x40000000
8811037 MSG_CONFIRM = 0x800
8971053 MSG_TRYHARD = 0x4
8981054 MSG_WAITALL = 0x100
8991055 MSG_WAITFORONE = 0x10000
1056 MSG_ZEROCOPY = 0x4000000
9001057 MS_ACTIVE = 0x40000000
9011058 MS_ASYNC = 0x1
9021059 MS_BIND = 0x1000
9341091 MS_SYNCHRONOUS = 0x10
9351092 MS_UNBINDABLE = 0x20000
9361093 MS_VERBOSE = 0x8000
1094 MTD_INODE_FS_MAGIC = 0x11307854
9371095 NAME_MAX = 0xff
1096 NCP_SUPER_MAGIC = 0x564c
9381097 NETLINK_ADD_MEMBERSHIP = 0x1
9391098 NETLINK_AUDIT = 0x9
9401099 NETLINK_BROADCAST_ERROR = 0x4
9481107 NETLINK_FIB_LOOKUP = 0xa
9491108 NETLINK_FIREWALL = 0x3
9501109 NETLINK_GENERIC = 0x10
1110 NETLINK_GET_STRICT_CHK = 0xc
9511111 NETLINK_INET_DIAG = 0x4
9521112 NETLINK_IP6_FW = 0xd
9531113 NETLINK_ISCSI = 0x8
9691129 NETLINK_UNUSED = 0x1
9701130 NETLINK_USERSOCK = 0x2
9711131 NETLINK_XFRM = 0x6
1132 NETNSA_MAX = 0x3
1133 NETNSA_NSID_NOT_ASSIGNED = -0x1
1134 NFNETLINK_V0 = 0x0
1135 NFNLGRP_ACCT_QUOTA = 0x8
1136 NFNLGRP_CONNTRACK_DESTROY = 0x3
1137 NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
1138 NFNLGRP_CONNTRACK_EXP_NEW = 0x4
1139 NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
1140 NFNLGRP_CONNTRACK_NEW = 0x1
1141 NFNLGRP_CONNTRACK_UPDATE = 0x2
1142 NFNLGRP_MAX = 0x9
1143 NFNLGRP_NFTABLES = 0x7
1144 NFNLGRP_NFTRACE = 0x9
1145 NFNLGRP_NONE = 0x0
1146 NFNL_BATCH_MAX = 0x1
1147 NFNL_MSG_BATCH_BEGIN = 0x10
1148 NFNL_MSG_BATCH_END = 0x11
1149 NFNL_NFA_NEST = 0x8000
1150 NFNL_SUBSYS_ACCT = 0x7
1151 NFNL_SUBSYS_COUNT = 0xc
1152 NFNL_SUBSYS_CTHELPER = 0x9
1153 NFNL_SUBSYS_CTNETLINK = 0x1
1154 NFNL_SUBSYS_CTNETLINK_EXP = 0x2
1155 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
1156 NFNL_SUBSYS_IPSET = 0x6
1157 NFNL_SUBSYS_NFTABLES = 0xa
1158 NFNL_SUBSYS_NFT_COMPAT = 0xb
1159 NFNL_SUBSYS_NONE = 0x0
1160 NFNL_SUBSYS_OSF = 0x5
1161 NFNL_SUBSYS_QUEUE = 0x3
1162 NFNL_SUBSYS_ULOG = 0x4
1163 NFS_SUPER_MAGIC = 0x6969
1164 NILFS_SUPER_MAGIC = 0x3434
9721165 NL0 = 0x0
9731166 NL1 = 0x100
9741167 NLA_ALIGNTO = 0x4
9961189 NLM_F_EXCL = 0x200
9971190 NLM_F_MATCH = 0x200
9981191 NLM_F_MULTI = 0x2
1192 NLM_F_NONREC = 0x100
9991193 NLM_F_REPLACE = 0x100
10001194 NLM_F_REQUEST = 0x1
10011195 NLM_F_ROOT = 0x100
10021196 NOFLSH = 0x80
1197 NSFS_MAGIC = 0x6e736673
1198 OCFS2_SUPER_MAGIC = 0x7461636f
10031199 OCRNL = 0x8
10041200 OFDEL = 0x80
10051201 OFILL = 0x40
10071203 ONLCR = 0x4
10081204 ONLRET = 0x20
10091205 ONOCR = 0x10
1206 OPENPROM_SUPER_MAGIC = 0x9fa1
10101207 OPOST = 0x1
1208 OVERLAYFS_SUPER_MAGIC = 0x794c7630
10111209 O_ACCMODE = 0x3
10121210 O_APPEND = 0x8
10131211 O_ASYNC = 0x1000
10531251 PACKET_FASTROUTE = 0x6
10541252 PACKET_HDRLEN = 0xb
10551253 PACKET_HOST = 0x0
1254 PACKET_IGNORE_OUTGOING = 0x17
10561255 PACKET_KERNEL = 0x7
10571256 PACKET_LOOPBACK = 0x5
10581257 PACKET_LOSS = 0xe
10921291 PERF_EVENT_IOC_DISABLE = 0x20002401
10931292 PERF_EVENT_IOC_ENABLE = 0x20002400
10941293 PERF_EVENT_IOC_ID = 0x40042407
1294 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b
10951295 PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
10961296 PERF_EVENT_IOC_PERIOD = 0x80082404
1297 PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
10971298 PERF_EVENT_IOC_REFRESH = 0x20002402
10981299 PERF_EVENT_IOC_RESET = 0x20002403
10991300 PERF_EVENT_IOC_SET_BPF = 0x80042408
11001301 PERF_EVENT_IOC_SET_FILTER = 0x80042406
11011302 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
1303 PIPEFS_MAGIC = 0x50495045
1304 PPPIOCATTACH = 0x8004743d
1305 PPPIOCATTCHAN = 0x80047438
1306 PPPIOCCONNECT = 0x8004743a
1307 PPPIOCDETACH = 0x8004743c
1308 PPPIOCDISCONN = 0x20007439
1309 PPPIOCGASYNCMAP = 0x40047458
1310 PPPIOCGCHAN = 0x40047437
1311 PPPIOCGDEBUG = 0x40047441
1312 PPPIOCGFLAGS = 0x4004745a
1313 PPPIOCGIDLE = 0x4008743f
1314 PPPIOCGL2TPSTATS = 0x40487436
1315 PPPIOCGMRU = 0x40047453
1316 PPPIOCGNPMODE = 0xc008744c
1317 PPPIOCGRASYNCMAP = 0x40047455
1318 PPPIOCGUNIT = 0x40047456
1319 PPPIOCGXASYNCMAP = 0x40207450
1320 PPPIOCNEWUNIT = 0xc004743e
1321 PPPIOCSACTIVE = 0x80087446
1322 PPPIOCSASYNCMAP = 0x80047457
1323 PPPIOCSCOMPRESS = 0x800c744d
1324 PPPIOCSDEBUG = 0x80047440
1325 PPPIOCSFLAGS = 0x80047459
1326 PPPIOCSMAXCID = 0x80047451
1327 PPPIOCSMRRU = 0x8004743b
1328 PPPIOCSMRU = 0x80047452
1329 PPPIOCSNPMODE = 0x8008744b
1330 PPPIOCSPASS = 0x80087447
1331 PPPIOCSRASYNCMAP = 0x80047454
1332 PPPIOCSXASYNCMAP = 0x8020744f
1333 PPPIOCXFERUNIT = 0x2000744e
11021334 PRIO_PGRP = 0x1
11031335 PRIO_PROCESS = 0x0
11041336 PRIO_USER = 0x2
1337 PROC_SUPER_MAGIC = 0x9fa0
11051338 PROT_EXEC = 0x4
11061339 PROT_GROWSDOWN = 0x1000000
11071340 PROT_GROWSUP = 0x2000000
11441377 PR_GET_PDEATHSIG = 0x2
11451378 PR_GET_SECCOMP = 0x15
11461379 PR_GET_SECUREBITS = 0x1b
1380 PR_GET_SPECULATION_CTRL = 0x34
11471381 PR_GET_THP_DISABLE = 0x2a
11481382 PR_GET_TID_ADDRESS = 0x28
11491383 PR_GET_TIMERSLACK = 0x1e
11891423 PR_SET_PTRACER_ANY = 0xffffffff
11901424 PR_SET_SECCOMP = 0x16
11911425 PR_SET_SECUREBITS = 0x1c
1426 PR_SET_SPECULATION_CTRL = 0x35
11921427 PR_SET_THP_DISABLE = 0x29
11931428 PR_SET_TIMERSLACK = 0x1d
11941429 PR_SET_TIMING = 0xe
11951430 PR_SET_TSC = 0x1a
11961431 PR_SET_UNALIGN = 0x6
1432 PR_SPEC_DISABLE = 0x4
1433 PR_SPEC_ENABLE = 0x2
1434 PR_SPEC_FORCE_DISABLE = 0x8
1435 PR_SPEC_INDIRECT_BRANCH = 0x1
1436 PR_SPEC_NOT_AFFECTED = 0x0
1437 PR_SPEC_PRCTL = 0x1
1438 PR_SPEC_STORE_BYPASS = 0x0
1439 PR_SVE_GET_VL = 0x33
1440 PR_SVE_SET_VL = 0x32
1441 PR_SVE_SET_VL_ONEXEC = 0x40000
1442 PR_SVE_VL_INHERIT = 0x20000
1443 PR_SVE_VL_LEN_MASK = 0xffff
11971444 PR_TASK_PERF_EVENTS_DISABLE = 0x1f
11981445 PR_TASK_PERF_EVENTS_ENABLE = 0x20
11991446 PR_TIMING_STATISTICAL = 0x0
12021449 PR_TSC_SIGSEGV = 0x2
12031450 PR_UNALIGN_NOPRINT = 0x1
12041451 PR_UNALIGN_SIGBUS = 0x2
1452 PSTOREFS_MAGIC = 0x6165676c
12051453 PTRACE_ATTACH = 0x10
12061454 PTRACE_CONT = 0x7
12071455 PTRACE_DETACH = 0x11
12501498 PTRACE_POKETEXT_3264 = 0xc2
12511499 PTRACE_POKEUSR = 0x6
12521500 PTRACE_SECCOMP_GET_FILTER = 0x420c
1501 PTRACE_SECCOMP_GET_METADATA = 0x420d
12531502 PTRACE_SEIZE = 0x4206
12541503 PTRACE_SETFPREGS = 0xf
12551504 PTRACE_SETOPTIONS = 0x4200
12621511 PTRACE_SINGLESTEP = 0x9
12631512 PTRACE_SYSCALL = 0x18
12641513 PTRACE_TRACEME = 0x0
1514 QNX4_SUPER_MAGIC = 0x2f
1515 QNX6_SUPER_MAGIC = 0x68191122
1516 RAMFS_MAGIC = 0x858458f6
1517 RDTGROUP_SUPER_MAGIC = 0x7655821
1518 REISERFS_SUPER_MAGIC = 0x52654973
1519 RENAME_EXCHANGE = 0x2
1520 RENAME_NOREPLACE = 0x1
1521 RENAME_WHITEOUT = 0x4
12651522 RLIMIT_AS = 0x6
12661523 RLIMIT_CORE = 0x4
12671524 RLIMIT_CPU = 0x0
12781535 RLIMIT_RTTIME = 0xf
12791536 RLIMIT_SIGPENDING = 0xb
12801537 RLIMIT_STACK = 0x3
1281 RLIM_INFINITY = -0x1
1538 RLIM_INFINITY = 0xffffffffffffffff
12821539 RTAX_ADVMSS = 0x8
12831540 RTAX_CC_ALGO = 0x10
12841541 RTAX_CWND = 0x7
1542 RTAX_FASTOPEN_NO_COOKIE = 0x11
12851543 RTAX_FEATURES = 0xc
12861544 RTAX_FEATURE_ALLFRAG = 0x8
12871545 RTAX_FEATURE_ECN = 0x1
12921550 RTAX_INITCWND = 0xb
12931551 RTAX_INITRWND = 0xe
12941552 RTAX_LOCK = 0x1
1295 RTAX_MAX = 0x10
1553 RTAX_MAX = 0x11
12961554 RTAX_MTU = 0x2
12971555 RTAX_QUICKACK = 0xf
12981556 RTAX_REORDERING = 0x9
13031561 RTAX_UNSPEC = 0x0
13041562 RTAX_WINDOW = 0x3
13051563 RTA_ALIGNTO = 0x4
1306 RTA_MAX = 0x1a
1564 RTA_MAX = 0x1d
13071565 RTCF_DIRECTSRC = 0x4000000
13081566 RTCF_DOREDIRECT = 0x1000000
13091567 RTCF_LOG = 0x2000000
13101568 RTCF_MASQ = 0x400000
13111569 RTCF_NAT = 0x800000
13121570 RTCF_VALVE = 0x200000
1571 RTC_AF = 0x20
1572 RTC_AIE_OFF = 0x20007002
1573 RTC_AIE_ON = 0x20007001
1574 RTC_ALM_READ = 0x40247008
1575 RTC_ALM_SET = 0x80247007
1576 RTC_EPOCH_READ = 0x4004700d
1577 RTC_EPOCH_SET = 0x8004700e
1578 RTC_IRQF = 0x80
1579 RTC_IRQP_READ = 0x4004700b
1580 RTC_IRQP_SET = 0x8004700c
1581 RTC_MAX_FREQ = 0x2000
1582 RTC_PF = 0x40
1583 RTC_PIE_OFF = 0x20007006
1584 RTC_PIE_ON = 0x20007005
1585 RTC_PLL_GET = 0x401c7011
1586 RTC_PLL_SET = 0x801c7012
1587 RTC_RD_TIME = 0x40247009
1588 RTC_SET_TIME = 0x8024700a
1589 RTC_UF = 0x10
1590 RTC_UIE_OFF = 0x20007004
1591 RTC_UIE_ON = 0x20007003
1592 RTC_VL_CLR = 0x20007014
1593 RTC_VL_READ = 0x40047013
1594 RTC_WIE_OFF = 0x20007010
1595 RTC_WIE_ON = 0x2000700f
1596 RTC_WKALM_RD = 0x40287010
1597 RTC_WKALM_SET = 0x8028700f
13131598 RTF_ADDRCLASSMASK = 0xf8000000
13141599 RTF_ADDRCONF = 0x40000
13151600 RTF_ALLONLINK = 0x20000
13441629 RTM_DELACTION = 0x31
13451630 RTM_DELADDR = 0x15
13461631 RTM_DELADDRLABEL = 0x49
1632 RTM_DELCHAIN = 0x65
13471633 RTM_DELLINK = 0x11
13481634 RTM_DELMDB = 0x55
13491635 RTM_DELNEIGH = 0x1d
13641650 RTM_GETADDR = 0x16
13651651 RTM_GETADDRLABEL = 0x4a
13661652 RTM_GETANYCAST = 0x3e
1653 RTM_GETCHAIN = 0x66
13671654 RTM_GETDCB = 0x4e
13681655 RTM_GETLINK = 0x12
13691656 RTM_GETMDB = 0x56
13781665 RTM_GETSTATS = 0x5e
13791666 RTM_GETTCLASS = 0x2a
13801667 RTM_GETTFILTER = 0x2e
1381 RTM_MAX = 0x63
1668 RTM_MAX = 0x67
13821669 RTM_NEWACTION = 0x30
13831670 RTM_NEWADDR = 0x14
13841671 RTM_NEWADDRLABEL = 0x48
13851672 RTM_NEWCACHEREPORT = 0x60
1673 RTM_NEWCHAIN = 0x64
13861674 RTM_NEWLINK = 0x10
13871675 RTM_NEWMDB = 0x54
13881676 RTM_NEWNDUSEROPT = 0x44
13971685 RTM_NEWSTATS = 0x5c
13981686 RTM_NEWTCLASS = 0x28
13991687 RTM_NEWTFILTER = 0x2c
1400 RTM_NR_FAMILIES = 0x15
1401 RTM_NR_MSGTYPES = 0x54
1688 RTM_NR_FAMILIES = 0x16
1689 RTM_NR_MSGTYPES = 0x58
14021690 RTM_SETDCB = 0x4f
14031691 RTM_SETLINK = 0x13
14041692 RTM_SETNEIGHTBL = 0x43
14121700 RTNH_F_UNRESOLVED = 0x20
14131701 RTN_MAX = 0xb
14141702 RTPROT_BABEL = 0x2a
1703 RTPROT_BGP = 0xba
14151704 RTPROT_BIRD = 0xc
14161705 RTPROT_BOOT = 0x3
14171706 RTPROT_DHCP = 0x10
14181707 RTPROT_DNROUTED = 0xd
1708 RTPROT_EIGRP = 0xc0
14191709 RTPROT_GATED = 0x8
1710 RTPROT_ISIS = 0xbb
14201711 RTPROT_KERNEL = 0x2
14211712 RTPROT_MROUTED = 0x11
14221713 RTPROT_MRT = 0xa
14231714 RTPROT_NTK = 0xf
1715 RTPROT_OSPF = 0xbc
14241716 RTPROT_RA = 0x9
14251717 RTPROT_REDIRECT = 0x1
1718 RTPROT_RIP = 0xbd
14261719 RTPROT_STATIC = 0x4
14271720 RTPROT_UNSPEC = 0x0
14281721 RTPROT_XORP = 0xe
14421735 SCM_TIMESTAMPING_OPT_STATS = 0x36
14431736 SCM_TIMESTAMPING_PKTINFO = 0x3a
14441737 SCM_TIMESTAMPNS = 0x23
1738 SCM_TXTIME = 0x3d
14451739 SCM_WIFI_STATUS = 0x29
1740 SC_LOG_FLUSH = 0x100000
14461741 SECCOMP_MODE_DISABLED = 0x0
14471742 SECCOMP_MODE_FILTER = 0x2
14481743 SECCOMP_MODE_STRICT = 0x1
1744 SECURITYFS_MAGIC = 0x73636673
1745 SELINUX_MAGIC = 0xf97cff8c
1746 SFD_CLOEXEC = 0x80000
1747 SFD_NONBLOCK = 0x80
14491748 SHUT_RD = 0x0
14501749 SHUT_RDWR = 0x2
14511750 SHUT_WR = 0x1
14961795 SIOCGMIIPHY = 0x8947
14971796 SIOCGMIIREG = 0x8948
14981797 SIOCGPGRP = 0x40047309
1798 SIOCGPPPCSTATS = 0x89f2
1799 SIOCGPPPSTATS = 0x89f0
1800 SIOCGPPPVER = 0x89f1
14991801 SIOCGRARP = 0x8961
15001802 SIOCGSKNS = 0x894c
15011803 SIOCGSTAMP = 0x8906
15301832 SIOCSPGRP = 0x80047308
15311833 SIOCSRARP = 0x8962
15321834 SIOCWANDEV = 0x894a
1835 SMACK_MAGIC = 0x43415d53
1836 SMART_AUTOSAVE = 0xd2
1837 SMART_AUTO_OFFLINE = 0xdb
1838 SMART_DISABLE = 0xd9
1839 SMART_ENABLE = 0xd8
1840 SMART_HCYL_PASS = 0xc2
1841 SMART_IMMEDIATE_OFFLINE = 0xd4
1842 SMART_LCYL_PASS = 0x4f
1843 SMART_READ_LOG_SECTOR = 0xd5
1844 SMART_READ_THRESHOLDS = 0xd1
1845 SMART_READ_VALUES = 0xd0
1846 SMART_SAVE = 0xd3
1847 SMART_STATUS = 0xda
1848 SMART_WRITE_LOG_SECTOR = 0xd6
1849 SMART_WRITE_THRESHOLDS = 0xd7
1850 SMB_SUPER_MAGIC = 0x517b
1851 SOCKFS_MAGIC = 0x534f434b
15331852 SOCK_CLOEXEC = 0x80000
15341853 SOCK_DCCP = 0x6
15351854 SOCK_DGRAM = 0x1
15661885 SOL_SOCKET = 0xffff
15671886 SOL_TCP = 0x6
15681887 SOL_TIPC = 0x10f
1888 SOL_TLS = 0x11a
15691889 SOL_X25 = 0x106
1890 SOL_XDP = 0x11b
15701891 SOMAXCONN = 0x80
15711892 SO_ACCEPTCONN = 0x1009
15721893 SO_ATTACH_BPF = 0x32
16261947 SO_TIMESTAMP = 0x1d
16271948 SO_TIMESTAMPING = 0x25
16281949 SO_TIMESTAMPNS = 0x23
1950 SO_TXTIME = 0x3d
16291951 SO_TYPE = 0x1008
16301952 SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
16311953 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
16351957 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
16361958 SO_VM_SOCKETS_TRUSTED = 0x5
16371959 SO_WIFI_STATUS = 0x29
1960 SO_ZEROCOPY = 0x3c
16381961 SPLICE_F_GIFT = 0x8
16391962 SPLICE_F_MORE = 0x4
16401963 SPLICE_F_MOVE = 0x1
16411964 SPLICE_F_NONBLOCK = 0x2
1965 SQUASHFS_MAGIC = 0x73717368
1966 STACK_END_MAGIC = 0x57ac6e9d
1967 STATX_ALL = 0xfff
1968 STATX_ATIME = 0x20
1969 STATX_ATTR_APPEND = 0x20
1970 STATX_ATTR_AUTOMOUNT = 0x1000
1971 STATX_ATTR_COMPRESSED = 0x4
1972 STATX_ATTR_ENCRYPTED = 0x800
1973 STATX_ATTR_IMMUTABLE = 0x10
1974 STATX_ATTR_NODUMP = 0x40
1975 STATX_BASIC_STATS = 0x7ff
1976 STATX_BLOCKS = 0x400
1977 STATX_BTIME = 0x800
1978 STATX_CTIME = 0x80
1979 STATX_GID = 0x10
1980 STATX_INO = 0x100
1981 STATX_MODE = 0x2
1982 STATX_MTIME = 0x40
1983 STATX_NLINK = 0x4
1984 STATX_SIZE = 0x200
1985 STATX_TYPE = 0x1
1986 STATX_UID = 0x8
1987 STATX__RESERVED = 0x80000000
1988 SYNC_FILE_RANGE_WAIT_AFTER = 0x4
1989 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
1990 SYNC_FILE_RANGE_WRITE = 0x2
1991 SYSFS_MAGIC = 0x62656572
16421992 S_BLKSIZE = 0x200
16431993 S_IEXEC = 0x40
16441994 S_IFBLK = 0x6000
16762026 TASKSTATS_GENL_NAME = "TASKSTATS"
16772027 TASKSTATS_GENL_VERSION = 0x1
16782028 TASKSTATS_TYPE_MAX = 0x6
1679 TASKSTATS_VERSION = 0x8
2029 TASKSTATS_VERSION = 0x9
16802030 TCFLSH = 0x5407
16812031 TCGETA = 0x5401
16822032 TCGETS = 0x540d
17002050 TCP_DEFER_ACCEPT = 0x9
17012051 TCP_FASTOPEN = 0x17
17022052 TCP_FASTOPEN_CONNECT = 0x1e
2053 TCP_FASTOPEN_KEY = 0x21
2054 TCP_FASTOPEN_NO_COOKIE = 0x22
17032055 TCP_INFO = 0xb
17042056 TCP_KEEPCNT = 0x6
17052057 TCP_KEEPIDLE = 0x4
17092061 TCP_MAXWIN = 0xffff
17102062 TCP_MAX_WINSHIFT = 0xe
17112063 TCP_MD5SIG = 0xe
2064 TCP_MD5SIG_EXT = 0x20
2065 TCP_MD5SIG_FLAG_PREFIX = 0x1
17122066 TCP_MD5SIG_MAXKEYLEN = 0x50
17132067 TCP_MSS = 0x200
17142068 TCP_MSS_DEFAULT = 0x218
17292083 TCP_THIN_DUPACK = 0x11
17302084 TCP_THIN_LINEAR_TIMEOUTS = 0x10
17312085 TCP_TIMESTAMP = 0x18
2086 TCP_ULP = 0x1f
17322087 TCP_USER_TIMEOUT = 0x12
17332088 TCP_WINDOW_CLAMP = 0xa
17342089 TCSAFLUSH = 0x5410
17442099 TCSETSW = 0x540f
17452100 TCSETSW2 = 0x8030542c
17462101 TCXONC = 0x5406
2102 TIMER_ABSTIME = 0x1
17472103 TIOCCBRK = 0x5428
17482104 TIOCCONS = 0x80047478
17492105 TIOCEXCL = 0x740d
17522108 TIOCGETP = 0x7408
17532109 TIOCGEXCL = 0x40045440
17542110 TIOCGICOUNT = 0x5492
2111 TIOCGISO7816 = 0x40285442
17552112 TIOCGLCKTRMIOS = 0x548b
17562113 TIOCGLTC = 0x7474
17572114 TIOCGPGRP = 0x40047477
18082165 TIOCSETN = 0x740a
18092166 TIOCSETP = 0x7409
18102167 TIOCSIG = 0x80045436
2168 TIOCSISO7816 = 0xc0285443
18112169 TIOCSLCKTRMIOS = 0x548c
18122170 TIOCSLTC = 0x7475
18132171 TIOCSPGRP = 0x80047476
18182176 TIOCSTI = 0x5472
18192177 TIOCSWINSZ = 0x80087467
18202178 TIOCVHANGUP = 0x5437
2179 TMPFS_MAGIC = 0x1021994
18212180 TOSTOP = 0x8000
2181 TPACKET_ALIGNMENT = 0x10
2182 TPACKET_HDRLEN = 0x34
2183 TP_STATUS_AVAILABLE = 0x0
2184 TP_STATUS_BLK_TMO = 0x20
2185 TP_STATUS_COPY = 0x2
2186 TP_STATUS_CSUMNOTREADY = 0x8
2187 TP_STATUS_CSUM_VALID = 0x80
2188 TP_STATUS_KERNEL = 0x0
2189 TP_STATUS_LOSING = 0x4
2190 TP_STATUS_SENDING = 0x2
2191 TP_STATUS_SEND_REQUEST = 0x1
2192 TP_STATUS_TS_RAW_HARDWARE = -0x80000000
2193 TP_STATUS_TS_SOFTWARE = 0x20000000
2194 TP_STATUS_TS_SYS_HARDWARE = 0x40000000
2195 TP_STATUS_USER = 0x1
2196 TP_STATUS_VLAN_TPID_VALID = 0x40
2197 TP_STATUS_VLAN_VALID = 0x10
2198 TP_STATUS_WRONG_FORMAT = 0x4
2199 TRACEFS_MAGIC = 0x74726163
18222200 TS_COMM_LEN = 0x20
18232201 TUNATTACHFILTER = 0x800854d5
18242202 TUNDETACHFILTER = 0x800854d6
18302208 TUNGETVNETHDRSZ = 0x400454d7
18312209 TUNGETVNETLE = 0x400454dd
18322210 TUNSETDEBUG = 0x800454c9
2211 TUNSETFILTEREBPF = 0x400454e1
18332212 TUNSETGROUP = 0x800454ce
18342213 TUNSETIFF = 0x800454ca
18352214 TUNSETIFINDEX = 0x800454da
18402219 TUNSETPERSIST = 0x800454cb
18412220 TUNSETQUEUE = 0x800454d9
18422221 TUNSETSNDBUF = 0x800454d4
2222 TUNSETSTEERINGEBPF = 0x400454e0
18432223 TUNSETTXFILTER = 0x800454d1
18442224 TUNSETVNETBE = 0x800454de
18452225 TUNSETVNETHDRSZ = 0x800454d8
18462226 TUNSETVNETLE = 0x800454dc
2227 UBI_IOCATT = 0x80186f40
2228 UBI_IOCDET = 0x80046f41
2229 UBI_IOCEBCH = 0x80044f02
2230 UBI_IOCEBER = 0x80044f01
2231 UBI_IOCEBISMAP = 0x40044f05
2232 UBI_IOCEBMAP = 0x80084f03
2233 UBI_IOCEBUNMAP = 0x80044f04
2234 UBI_IOCMKVOL = 0x80986f00
2235 UBI_IOCRMVOL = 0x80046f01
2236 UBI_IOCRNVOL = 0x91106f03
2237 UBI_IOCRSVOL = 0x800c6f02
2238 UBI_IOCSETVOLPROP = 0x80104f06
2239 UBI_IOCVOLCRBLK = 0x80804f07
2240 UBI_IOCVOLRMBLK = 0x20004f08
2241 UBI_IOCVOLUP = 0x80084f00
2242 UDF_SUPER_MAGIC = 0x15013346
18472243 UMOUNT_NOFOLLOW = 0x8
2244 USBDEVICE_SUPER_MAGIC = 0x9fa2
2245 UTIME_NOW = 0x3fffffff
2246 UTIME_OMIT = 0x3ffffffe
2247 V9FS_MAGIC = 0x1021997
18482248 VDISCARD = 0xd
18492249 VEOF = 0x10
18502250 VEOL = 0x11
18752275 WALL = 0x40000000
18762276 WCLONE = 0x80000000
18772277 WCONTINUED = 0x8
2278 WDIOC_GETBOOTSTATUS = 0x40045702
2279 WDIOC_GETPRETIMEOUT = 0x40045709
2280 WDIOC_GETSTATUS = 0x40045701
2281 WDIOC_GETSUPPORT = 0x40285700
2282 WDIOC_GETTEMP = 0x40045703
2283 WDIOC_GETTIMELEFT = 0x4004570a
2284 WDIOC_GETTIMEOUT = 0x40045707
2285 WDIOC_KEEPALIVE = 0x40045705
2286 WDIOC_SETOPTIONS = 0x40045704
2287 WDIOC_SETPRETIMEOUT = 0xc0045708
2288 WDIOC_SETTIMEOUT = 0xc0045706
18782289 WEXITED = 0x4
2290 WIN_ACKMEDIACHANGE = 0xdb
2291 WIN_CHECKPOWERMODE1 = 0xe5
2292 WIN_CHECKPOWERMODE2 = 0x98
2293 WIN_DEVICE_RESET = 0x8
2294 WIN_DIAGNOSE = 0x90
2295 WIN_DOORLOCK = 0xde
2296 WIN_DOORUNLOCK = 0xdf
2297 WIN_DOWNLOAD_MICROCODE = 0x92
2298 WIN_FLUSH_CACHE = 0xe7
2299 WIN_FLUSH_CACHE_EXT = 0xea
2300 WIN_FORMAT = 0x50
2301 WIN_GETMEDIASTATUS = 0xda
2302 WIN_IDENTIFY = 0xec
2303 WIN_IDENTIFY_DMA = 0xee
2304 WIN_IDLEIMMEDIATE = 0xe1
2305 WIN_INIT = 0x60
2306 WIN_MEDIAEJECT = 0xed
2307 WIN_MULTREAD = 0xc4
2308 WIN_MULTREAD_EXT = 0x29
2309 WIN_MULTWRITE = 0xc5
2310 WIN_MULTWRITE_EXT = 0x39
2311 WIN_NOP = 0x0
2312 WIN_PACKETCMD = 0xa0
2313 WIN_PIDENTIFY = 0xa1
2314 WIN_POSTBOOT = 0xdc
2315 WIN_PREBOOT = 0xdd
2316 WIN_QUEUED_SERVICE = 0xa2
2317 WIN_READ = 0x20
2318 WIN_READDMA = 0xc8
2319 WIN_READDMA_EXT = 0x25
2320 WIN_READDMA_ONCE = 0xc9
2321 WIN_READDMA_QUEUED = 0xc7
2322 WIN_READDMA_QUEUED_EXT = 0x26
2323 WIN_READ_BUFFER = 0xe4
2324 WIN_READ_EXT = 0x24
2325 WIN_READ_LONG = 0x22
2326 WIN_READ_LONG_ONCE = 0x23
2327 WIN_READ_NATIVE_MAX = 0xf8
2328 WIN_READ_NATIVE_MAX_EXT = 0x27
2329 WIN_READ_ONCE = 0x21
2330 WIN_RECAL = 0x10
2331 WIN_RESTORE = 0x10
2332 WIN_SECURITY_DISABLE = 0xf6
2333 WIN_SECURITY_ERASE_PREPARE = 0xf3
2334 WIN_SECURITY_ERASE_UNIT = 0xf4
2335 WIN_SECURITY_FREEZE_LOCK = 0xf5
2336 WIN_SECURITY_SET_PASS = 0xf1
2337 WIN_SECURITY_UNLOCK = 0xf2
2338 WIN_SEEK = 0x70
2339 WIN_SETFEATURES = 0xef
2340 WIN_SETIDLE1 = 0xe3
2341 WIN_SETIDLE2 = 0x97
2342 WIN_SETMULT = 0xc6
2343 WIN_SET_MAX = 0xf9
2344 WIN_SET_MAX_EXT = 0x37
2345 WIN_SLEEPNOW1 = 0xe6
2346 WIN_SLEEPNOW2 = 0x99
2347 WIN_SMART = 0xb0
2348 WIN_SPECIFY = 0x91
2349 WIN_SRST = 0x8
2350 WIN_STANDBY = 0xe2
2351 WIN_STANDBY2 = 0x96
2352 WIN_STANDBYNOW1 = 0xe0
2353 WIN_STANDBYNOW2 = 0x94
2354 WIN_VERIFY = 0x40
2355 WIN_VERIFY_EXT = 0x42
2356 WIN_VERIFY_ONCE = 0x41
2357 WIN_WRITE = 0x30
2358 WIN_WRITEDMA = 0xca
2359 WIN_WRITEDMA_EXT = 0x35
2360 WIN_WRITEDMA_ONCE = 0xcb
2361 WIN_WRITEDMA_QUEUED = 0xcc
2362 WIN_WRITEDMA_QUEUED_EXT = 0x36
2363 WIN_WRITE_BUFFER = 0xe8
2364 WIN_WRITE_EXT = 0x34
2365 WIN_WRITE_LONG = 0x32
2366 WIN_WRITE_LONG_ONCE = 0x33
2367 WIN_WRITE_ONCE = 0x31
2368 WIN_WRITE_SAME = 0xe9
2369 WIN_WRITE_VERIFY = 0x3c
18792370 WNOHANG = 0x1
18802371 WNOTHREAD = 0x20000000
18812372 WNOWAIT = 0x1000000
18852376 XATTR_CREATE = 0x1
18862377 XATTR_REPLACE = 0x2
18872378 XCASE = 0x4
2379 XDP_COPY = 0x2
2380 XDP_FLAGS_DRV_MODE = 0x4
2381 XDP_FLAGS_HW_MODE = 0x8
2382 XDP_FLAGS_MASK = 0xf
2383 XDP_FLAGS_MODES = 0xe
2384 XDP_FLAGS_SKB_MODE = 0x2
2385 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
2386 XDP_MMAP_OFFSETS = 0x1
2387 XDP_PGOFF_RX_RING = 0x0
2388 XDP_PGOFF_TX_RING = 0x80000000
2389 XDP_RX_RING = 0x2
2390 XDP_SHARED_UMEM = 0x1
2391 XDP_STATISTICS = 0x7
2392 XDP_TX_RING = 0x3
2393 XDP_UMEM_COMPLETION_RING = 0x6
2394 XDP_UMEM_FILL_RING = 0x5
2395 XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
2396 XDP_UMEM_PGOFF_FILL_RING = 0x100000000
2397 XDP_UMEM_REG = 0x4
2398 XDP_ZEROCOPY = 0x4
2399 XENFS_SUPER_MAGIC = 0xabba1974
2400 XFS_SUPER_MAGIC = 0x58465342
18882401 XTABS = 0x1800
2402 ZSMALLOC_MAGIC = 0x58295829
18892403 )
18902404
18912405 // Errors
20672581 )
20682582
20692583 // Error table
2070 var errors = [...]string{
2071 1: "operation not permitted",
2072 2: "no such file or directory",
2073 3: "no such process",
2074 4: "interrupted system call",
2075 5: "input/output error",
2076 6: "no such device or address",
2077 7: "argument list too long",
2078 8: "exec format error",
2079 9: "bad file descriptor",
2080 10: "no child processes",
2081 11: "resource temporarily unavailable",
2082 12: "cannot allocate memory",
2083 13: "permission denied",
2084 14: "bad address",
2085 15: "block device required",
2086 16: "device or resource busy",
2087 17: "file exists",
2088 18: "invalid cross-device link",
2089 19: "no such device",
2090 20: "not a directory",
2091 21: "is a directory",
2092 22: "invalid argument",
2093 23: "too many open files in system",
2094 24: "too many open files",
2095 25: "inappropriate ioctl for device",
2096 26: "text file busy",
2097 27: "file too large",
2098 28: "no space left on device",
2099 29: "illegal seek",
2100 30: "read-only file system",
2101 31: "too many links",
2102 32: "broken pipe",
2103 33: "numerical argument out of domain",
2104 34: "numerical result out of range",
2105 35: "no message of desired type",
2106 36: "identifier removed",
2107 37: "channel number out of range",
2108 38: "level 2 not synchronized",
2109 39: "level 3 halted",
2110 40: "level 3 reset",
2111 41: "link number out of range",
2112 42: "protocol driver not attached",
2113 43: "no CSI structure available",
2114 44: "level 2 halted",
2115 45: "resource deadlock avoided",
2116 46: "no locks available",
2117 50: "invalid exchange",
2118 51: "invalid request descriptor",
2119 52: "exchange full",
2120 53: "no anode",
2121 54: "invalid request code",
2122 55: "invalid slot",
2123 56: "file locking deadlock error",
2124 59: "bad font file format",
2125 60: "device not a stream",
2126 61: "no data available",
2127 62: "timer expired",
2128 63: "out of streams resources",
2129 64: "machine is not on the network",
2130 65: "package not installed",
2131 66: "object is remote",
2132 67: "link has been severed",
2133 68: "advertise error",
2134 69: "srmount error",
2135 70: "communication error on send",
2136 71: "protocol error",
2137 73: "RFS specific error",
2138 74: "multihop attempted",
2139 77: "bad message",
2140 78: "file name too long",
2141 79: "value too large for defined data type",
2142 80: "name not unique on network",
2143 81: "file descriptor in bad state",
2144 82: "remote address changed",
2145 83: "can not access a needed shared library",
2146 84: "accessing a corrupted shared library",
2147 85: ".lib section in a.out corrupted",
2148 86: "attempting to link in too many shared libraries",
2149 87: "cannot exec a shared library directly",
2150 88: "invalid or incomplete multibyte or wide character",
2151 89: "function not implemented",
2152 90: "too many levels of symbolic links",
2153 91: "interrupted system call should be restarted",
2154 92: "streams pipe error",
2155 93: "directory not empty",
2156 94: "too many users",
2157 95: "socket operation on non-socket",
2158 96: "destination address required",
2159 97: "message too long",
2160 98: "protocol wrong type for socket",
2161 99: "protocol not available",
2162 120: "protocol not supported",
2163 121: "socket type not supported",
2164 122: "operation not supported",
2165 123: "protocol family not supported",
2166 124: "address family not supported by protocol",
2167 125: "address already in use",
2168 126: "cannot assign requested address",
2169 127: "network is down",
2170 128: "network is unreachable",
2171 129: "network dropped connection on reset",
2172 130: "software caused connection abort",
2173 131: "connection reset by peer",
2174 132: "no buffer space available",
2175 133: "transport endpoint is already connected",
2176 134: "transport endpoint is not connected",
2177 135: "structure needs cleaning",
2178 137: "not a XENIX named type file",
2179 138: "no XENIX semaphores available",
2180 139: "is a named type file",
2181 140: "remote I/O error",
2182 141: "unknown error 141",
2183 142: "unknown error 142",
2184 143: "cannot send after transport endpoint shutdown",
2185 144: "too many references: cannot splice",
2186 145: "connection timed out",
2187 146: "connection refused",
2188 147: "host is down",
2189 148: "no route to host",
2190 149: "operation already in progress",
2191 150: "operation now in progress",
2192 151: "stale file handle",
2193 158: "operation canceled",
2194 159: "no medium found",
2195 160: "wrong medium type",
2196 161: "required key not available",
2197 162: "key has expired",
2198 163: "key has been revoked",
2199 164: "key was rejected by service",
2200 165: "owner died",
2201 166: "state not recoverable",
2202 167: "operation not possible due to RF-kill",
2203 168: "memory page has hardware error",
2204 1133: "disk quota exceeded",
2584 var errorList = [...]struct {
2585 num syscall.Errno
2586 name string
2587 desc string
2588 }{
2589 {1, "EPERM", "operation not permitted"},
2590 {2, "ENOENT", "no such file or directory"},
2591 {3, "ESRCH", "no such process"},
2592 {4, "EINTR", "interrupted system call"},
2593 {5, "EIO", "input/output error"},
2594 {6, "ENXIO", "no such device or address"},
2595 {7, "E2BIG", "argument list too long"},
2596 {8, "ENOEXEC", "exec format error"},
2597 {9, "EBADF", "bad file descriptor"},
2598 {10, "ECHILD", "no child processes"},
2599 {11, "EAGAIN", "resource temporarily unavailable"},
2600 {12, "ENOMEM", "cannot allocate memory"},
2601 {13, "EACCES", "permission denied"},
2602 {14, "EFAULT", "bad address"},
2603 {15, "ENOTBLK", "block device required"},
2604 {16, "EBUSY", "device or resource busy"},
2605 {17, "EEXIST", "file exists"},
2606 {18, "EXDEV", "invalid cross-device link"},
2607 {19, "ENODEV", "no such device"},
2608 {20, "ENOTDIR", "not a directory"},
2609 {21, "EISDIR", "is a directory"},
2610 {22, "EINVAL", "invalid argument"},
2611 {23, "ENFILE", "too many open files in system"},
2612 {24, "EMFILE", "too many open files"},
2613 {25, "ENOTTY", "inappropriate ioctl for device"},
2614 {26, "ETXTBSY", "text file busy"},
2615 {27, "EFBIG", "file too large"},
2616 {28, "ENOSPC", "no space left on device"},
2617 {29, "ESPIPE", "illegal seek"},
2618 {30, "EROFS", "read-only file system"},
2619 {31, "EMLINK", "too many links"},
2620 {32, "EPIPE", "broken pipe"},
2621 {33, "EDOM", "numerical argument out of domain"},
2622 {34, "ERANGE", "numerical result out of range"},
2623 {35, "ENOMSG", "no message of desired type"},
2624 {36, "EIDRM", "identifier removed"},
2625 {37, "ECHRNG", "channel number out of range"},
2626 {38, "EL2NSYNC", "level 2 not synchronized"},
2627 {39, "EL3HLT", "level 3 halted"},
2628 {40, "EL3RST", "level 3 reset"},
2629 {41, "ELNRNG", "link number out of range"},
2630 {42, "EUNATCH", "protocol driver not attached"},
2631 {43, "ENOCSI", "no CSI structure available"},
2632 {44, "EL2HLT", "level 2 halted"},
2633 {45, "EDEADLK", "resource deadlock avoided"},
2634 {46, "ENOLCK", "no locks available"},
2635 {50, "EBADE", "invalid exchange"},
2636 {51, "EBADR", "invalid request descriptor"},
2637 {52, "EXFULL", "exchange full"},
2638 {53, "ENOANO", "no anode"},
2639 {54, "EBADRQC", "invalid request code"},
2640 {55, "EBADSLT", "invalid slot"},
2641 {56, "EDEADLOCK", "file locking deadlock error"},
2642 {59, "EBFONT", "bad font file format"},
2643 {60, "ENOSTR", "device not a stream"},
2644 {61, "ENODATA", "no data available"},
2645 {62, "ETIME", "timer expired"},
2646 {63, "ENOSR", "out of streams resources"},
2647 {64, "ENONET", "machine is not on the network"},
2648 {65, "ENOPKG", "package not installed"},
2649 {66, "EREMOTE", "object is remote"},
2650 {67, "ENOLINK", "link has been severed"},
2651 {68, "EADV", "advertise error"},
2652 {69, "ESRMNT", "srmount error"},
2653 {70, "ECOMM", "communication error on send"},
2654 {71, "EPROTO", "protocol error"},
2655 {73, "EDOTDOT", "RFS specific error"},
2656 {74, "EMULTIHOP", "multihop attempted"},
2657 {77, "EBADMSG", "bad message"},
2658 {78, "ENAMETOOLONG", "file name too long"},
2659 {79, "EOVERFLOW", "value too large for defined data type"},
2660 {80, "ENOTUNIQ", "name not unique on network"},
2661 {81, "EBADFD", "file descriptor in bad state"},
2662 {82, "EREMCHG", "remote address changed"},
2663 {83, "ELIBACC", "can not access a needed shared library"},
2664 {84, "ELIBBAD", "accessing a corrupted shared library"},
2665 {85, "ELIBSCN", ".lib section in a.out corrupted"},
2666 {86, "ELIBMAX", "attempting to link in too many shared libraries"},
2667 {87, "ELIBEXEC", "cannot exec a shared library directly"},
2668 {88, "EILSEQ", "invalid or incomplete multibyte or wide character"},
2669 {89, "ENOSYS", "function not implemented"},
2670 {90, "ELOOP", "too many levels of symbolic links"},
2671 {91, "ERESTART", "interrupted system call should be restarted"},
2672 {92, "ESTRPIPE", "streams pipe error"},
2673 {93, "ENOTEMPTY", "directory not empty"},
2674 {94, "EUSERS", "too many users"},
2675 {95, "ENOTSOCK", "socket operation on non-socket"},
2676 {96, "EDESTADDRREQ", "destination address required"},
2677 {97, "EMSGSIZE", "message too long"},
2678 {98, "EPROTOTYPE", "protocol wrong type for socket"},
2679 {99, "ENOPROTOOPT", "protocol not available"},
2680 {120, "EPROTONOSUPPORT", "protocol not supported"},
2681 {121, "ESOCKTNOSUPPORT", "socket type not supported"},
2682 {122, "ENOTSUP", "operation not supported"},
2683 {123, "EPFNOSUPPORT", "protocol family not supported"},
2684 {124, "EAFNOSUPPORT", "address family not supported by protocol"},
2685 {125, "EADDRINUSE", "address already in use"},
2686 {126, "EADDRNOTAVAIL", "cannot assign requested address"},
2687 {127, "ENETDOWN", "network is down"},
2688 {128, "ENETUNREACH", "network is unreachable"},
2689 {129, "ENETRESET", "network dropped connection on reset"},
2690 {130, "ECONNABORTED", "software caused connection abort"},
2691 {131, "ECONNRESET", "connection reset by peer"},
2692 {132, "ENOBUFS", "no buffer space available"},
2693 {133, "EISCONN", "transport endpoint is already connected"},
2694 {134, "ENOTCONN", "transport endpoint is not connected"},
2695 {135, "EUCLEAN", "structure needs cleaning"},
2696 {137, "ENOTNAM", "not a XENIX named type file"},
2697 {138, "ENAVAIL", "no XENIX semaphores available"},
2698 {139, "EISNAM", "is a named type file"},
2699 {140, "EREMOTEIO", "remote I/O error"},
2700 {141, "EINIT", "unknown error 141"},
2701 {142, "EREMDEV", "unknown error 142"},
2702 {143, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
2703 {144, "ETOOMANYREFS", "too many references: cannot splice"},
2704 {145, "ETIMEDOUT", "connection timed out"},
2705 {146, "ECONNREFUSED", "connection refused"},
2706 {147, "EHOSTDOWN", "host is down"},
2707 {148, "EHOSTUNREACH", "no route to host"},
2708 {149, "EALREADY", "operation already in progress"},
2709 {150, "EINPROGRESS", "operation now in progress"},
2710 {151, "ESTALE", "stale file handle"},
2711 {158, "ECANCELED", "operation canceled"},
2712 {159, "ENOMEDIUM", "no medium found"},
2713 {160, "EMEDIUMTYPE", "wrong medium type"},
2714 {161, "ENOKEY", "required key not available"},
2715 {162, "EKEYEXPIRED", "key has expired"},
2716 {163, "EKEYREVOKED", "key has been revoked"},
2717 {164, "EKEYREJECTED", "key was rejected by service"},
2718 {165, "EOWNERDEAD", "owner died"},
2719 {166, "ENOTRECOVERABLE", "state not recoverable"},
2720 {167, "ERFKILL", "operation not possible due to RF-kill"},
2721 {168, "EHWPOISON", "memory page has hardware error"},
2722 {1133, "EDQUOT", "disk quota exceeded"},
22052723 }
22062724
22072725 // Signal table
2208 var signals = [...]string{
2209 1: "hangup",
2210 2: "interrupt",
2211 3: "quit",
2212 4: "illegal instruction",
2213 5: "trace/breakpoint trap",
2214 6: "aborted",
2215 7: "EMT trap",
2216 8: "floating point exception",
2217 9: "killed",
2218 10: "bus error",
2219 11: "segmentation fault",
2220 12: "bad system call",
2221 13: "broken pipe",
2222 14: "alarm clock",
2223 15: "terminated",
2224 16: "user defined signal 1",
2225 17: "user defined signal 2",
2226 18: "child exited",
2227 19: "power failure",
2228 20: "window changed",
2229 21: "urgent I/O condition",
2230 22: "I/O possible",
2231 23: "stopped (signal)",
2232 24: "stopped",
2233 25: "continued",
2234 26: "stopped (tty input)",
2235 27: "stopped (tty output)",
2236 28: "virtual timer expired",
2237 29: "profiling timer expired",
2238 30: "CPU time limit exceeded",
2239 31: "file size limit exceeded",
2726 var signalList = [...]struct {
2727 num syscall.Signal
2728 name string
2729 desc string
2730 }{
2731 {1, "SIGHUP", "hangup"},
2732 {2, "SIGINT", "interrupt"},
2733 {3, "SIGQUIT", "quit"},
2734 {4, "SIGILL", "illegal instruction"},
2735 {5, "SIGTRAP", "trace/breakpoint trap"},
2736 {6, "SIGABRT", "aborted"},
2737 {7, "SIGEMT", "EMT trap"},
2738 {8, "SIGFPE", "floating point exception"},
2739 {9, "SIGKILL", "killed"},
2740 {10, "SIGBUS", "bus error"},
2741 {11, "SIGSEGV", "segmentation fault"},
2742 {12, "SIGSYS", "bad system call"},
2743 {13, "SIGPIPE", "broken pipe"},
2744 {14, "SIGALRM", "alarm clock"},
2745 {15, "SIGTERM", "terminated"},
2746 {16, "SIGUSR1", "user defined signal 1"},
2747 {17, "SIGUSR2", "user defined signal 2"},
2748 {18, "SIGCHLD", "child exited"},
2749 {19, "SIGPWR", "power failure"},
2750 {20, "SIGWINCH", "window changed"},
2751 {21, "SIGURG", "urgent I/O condition"},
2752 {22, "SIGIO", "I/O possible"},
2753 {23, "SIGSTOP", "stopped (signal)"},
2754 {24, "SIGTSTP", "stopped"},
2755 {25, "SIGCONT", "continued"},
2756 {26, "SIGTTIN", "stopped (tty input)"},
2757 {27, "SIGTTOU", "stopped (tty output)"},
2758 {28, "SIGVTALRM", "virtual timer expired"},
2759 {29, "SIGPROF", "profiling timer expired"},
2760 {30, "SIGXCPU", "CPU time limit exceeded"},
2761 {31, "SIGXFSZ", "file size limit exceeded"},
22402762 }
22
33 // +build mips64,linux
44
5 // Created by cgo -godefs - DO NOT EDIT
5 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
66 // cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
77
88 package unix
1010 import "syscall"
1111
1212 const (
13 AAFS_MAGIC = 0x5a3c69f0
14 ADFS_SUPER_MAGIC = 0xadf5
15 AFFS_SUPER_MAGIC = 0xadff
16 AFS_FS_MAGIC = 0x6b414653
17 AFS_SUPER_MAGIC = 0x5346414f
1318 AF_ALG = 0x26
1419 AF_APPLETALK = 0x5
1520 AF_ASH = 0x12
5863 AF_VSOCK = 0x28
5964 AF_WANPIPE = 0x19
6065 AF_X25 = 0x9
66 AF_XDP = 0x2c
6167 ALG_OP_DECRYPT = 0x0
6268 ALG_OP_ENCRYPT = 0x1
6369 ALG_SET_AEAD_ASSOCLEN = 0x4
6571 ALG_SET_IV = 0x2
6672 ALG_SET_KEY = 0x1
6773 ALG_SET_OP = 0x3
74 ANON_INODE_FS_MAGIC = 0x9041934
6875 ARPHRD_6LOWPAN = 0x339
6976 ARPHRD_ADAPT = 0x108
7077 ARPHRD_APPLETLK = 0x8
120127 ARPHRD_PPP = 0x200
121128 ARPHRD_PRONET = 0x4
122129 ARPHRD_RAWHDLC = 0x206
130 ARPHRD_RAWIP = 0x207
123131 ARPHRD_ROSE = 0x10e
124132 ARPHRD_RSRVD = 0x104
125133 ARPHRD_SIT = 0x308
131139 ARPHRD_VOID = 0xffff
132140 ARPHRD_VSOCKMON = 0x33a
133141 ARPHRD_X25 = 0x10f
142 AUTOFS_SUPER_MAGIC = 0x187
134143 B0 = 0x0
135144 B1000000 = 0x1008
136145 B110 = 0x3
162171 B75 = 0x2
163172 B921600 = 0x1007
164173 B9600 = 0xd
174 BALLOON_KVM_MAGIC = 0x13661366
175 BDEVFS_MAGIC = 0x62646576
176 BINFMTFS_MAGIC = 0x42494e4d
165177 BLKBSZGET = 0x40081270
166178 BLKBSZSET = 0x80081271
167179 BLKFLSBUF = 0x20001261
186198 BPF_AND = 0x50
187199 BPF_B = 0x10
188200 BPF_DIV = 0x30
201 BPF_FS_MAGIC = 0xcafe4a11
189202 BPF_H = 0x8
190203 BPF_IMM = 0x0
191204 BPF_IND = 0x40
227240 BS0 = 0x0
228241 BS1 = 0x2000
229242 BSDLY = 0x2000
243 BTRFS_SUPER_MAGIC = 0x9123683e
244 BTRFS_TEST_MAGIC = 0x73727279
230245 CAN_BCM = 0x2
231246 CAN_EFF_FLAG = 0x80000000
232247 CAN_EFF_ID_BITS = 0x1d
250265 CBAUD = 0x100f
251266 CBAUDEX = 0x1000
252267 CFLUSH = 0xf
268 CGROUP2_SUPER_MAGIC = 0x63677270
269 CGROUP_SUPER_MAGIC = 0x27e0eb
253270 CIBAUD = 0x100f0000
254271 CLOCAL = 0x800
255272 CLOCK_BOOTTIME = 0x7
292309 CLONE_VFORK = 0x4000
293310 CLONE_VM = 0x100
294311 CMSPAR = 0x40000000
312 CODA_SUPER_MAGIC = 0x73757245
295313 CR0 = 0x0
296314 CR1 = 0x200
297315 CR2 = 0x400
298316 CR3 = 0x600
317 CRAMFS_MAGIC = 0x28cd3d45
299318 CRDLY = 0x600
300319 CREAD = 0x80
301320 CRTSCTS = 0x80000000
310329 CSTOP = 0x13
311330 CSTOPB = 0x40
312331 CSUSP = 0x1a
332 DAXFS_MAGIC = 0x64646178
333 DEBUGFS_MAGIC = 0x64626720
334 DEVPTS_SUPER_MAGIC = 0x1cd1
313335 DT_BLK = 0x6
314336 DT_CHR = 0x2
315337 DT_DIR = 0x4
326348 ECHOKE = 0x800
327349 ECHONL = 0x40
328350 ECHOPRT = 0x400
351 ECRYPTFS_SUPER_MAGIC = 0xf15f
329352 EFD_CLOEXEC = 0x80000
330353 EFD_NONBLOCK = 0x80
331354 EFD_SEMAPHORE = 0x1
355 EFIVARFS_MAGIC = 0xde5e81e4
356 EFS_SUPER_MAGIC = 0x414a53
332357 ENCODING_DEFAULT = 0x0
333358 ENCODING_FM_MARK = 0x3
334359 ENCODING_FM_SPACE = 0x4
389414 ETH_P_DSA = 0x1b
390415 ETH_P_ECONET = 0x18
391416 ETH_P_EDSA = 0xdada
417 ETH_P_ERSPAN = 0x88be
418 ETH_P_ERSPAN2 = 0x22eb
392419 ETH_P_FCOE = 0x8906
393420 ETH_P_FIP = 0x8914
394421 ETH_P_HDLC = 0x19
397424 ETH_P_IEEE802154 = 0xf6
398425 ETH_P_IEEEPUP = 0xa00
399426 ETH_P_IEEEPUPAT = 0xa01
427 ETH_P_IFE = 0xed3e
400428 ETH_P_IP = 0x800
401429 ETH_P_IPV6 = 0x86dd
402430 ETH_P_IPX = 0x8137
407435 ETH_P_LOOP = 0x60
408436 ETH_P_LOOPBACK = 0x9000
409437 ETH_P_MACSEC = 0x88e5
438 ETH_P_MAP = 0xf9
410439 ETH_P_MOBITEX = 0x15
411440 ETH_P_MPLS_MC = 0x8848
412441 ETH_P_MPLS_UC = 0x8847
413442 ETH_P_MVRP = 0x88f5
414443 ETH_P_NCSI = 0x88f8
444 ETH_P_NSH = 0x894f
415445 ETH_P_PAE = 0x888e
416446 ETH_P_PAUSE = 0x8808
417447 ETH_P_PHONET = 0xf5
419449 ETH_P_PPP_DISC = 0x8863
420450 ETH_P_PPP_MP = 0x8
421451 ETH_P_PPP_SES = 0x8864
452 ETH_P_PREAUTH = 0x88c7
422453 ETH_P_PRP = 0x88fb
423454 ETH_P_PUP = 0x200
424455 ETH_P_PUPAT = 0x201
439470 ETH_P_WCCP = 0x883e
440471 ETH_P_X25 = 0x805
441472 ETH_P_XDSA = 0xf8
473 EXABYTE_ENABLE_NEST = 0xf0
474 EXT2_SUPER_MAGIC = 0xef53
475 EXT3_SUPER_MAGIC = 0xef53
476 EXT4_SUPER_MAGIC = 0xef53
442477 EXTA = 0xe
443478 EXTB = 0xf
444479 EXTPROC = 0x10000
480 F2FS_SUPER_MAGIC = 0xf2f52010
445481 FALLOC_FL_COLLAPSE_RANGE = 0x8
446482 FALLOC_FL_INSERT_RANGE = 0x20
447483 FALLOC_FL_KEEP_SIZE = 0x1
462498 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
463499 FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
464500 FS_ENCRYPTION_MODE_INVALID = 0x0
501 FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
502 FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
465503 FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
466504 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
467505 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
475513 FS_POLICY_FLAGS_PAD_8 = 0x1
476514 FS_POLICY_FLAGS_PAD_MASK = 0x3
477515 FS_POLICY_FLAGS_VALID = 0x3
516 FUTEXFS_SUPER_MAGIC = 0xbad1dea
517 F_ADD_SEALS = 0x409
478518 F_DUPFD = 0x0
479519 F_DUPFD_CLOEXEC = 0x406
480520 F_EXLCK = 0x4
487527 F_GETOWN_EX = 0x10
488528 F_GETPIPE_SZ = 0x408
489529 F_GETSIG = 0xb
530 F_GET_FILE_RW_HINT = 0x40d
531 F_GET_RW_HINT = 0x40b
532 F_GET_SEALS = 0x40a
490533 F_LOCK = 0x1
491534 F_NOTIFY = 0x402
492535 F_OFD_GETLK = 0x24
494537 F_OFD_SETLKW = 0x26
495538 F_OK = 0x0
496539 F_RDLCK = 0x0
540 F_SEAL_GROW = 0x4
541 F_SEAL_SEAL = 0x1
542 F_SEAL_SHRINK = 0x2
543 F_SEAL_WRITE = 0x8
497544 F_SETFD = 0x2
498545 F_SETFL = 0x4
499546 F_SETLEASE = 0x400
505552 F_SETOWN_EX = 0xf
506553 F_SETPIPE_SZ = 0x407
507554 F_SETSIG = 0xa
555 F_SET_FILE_RW_HINT = 0x40e
556 F_SET_RW_HINT = 0x40c
508557 F_SHLCK = 0x8
509558 F_TEST = 0x3
510559 F_TLOCK = 0x2
526575 GENL_UNS_ADMIN_PERM = 0x10
527576 GRND_NONBLOCK = 0x1
528577 GRND_RANDOM = 0x2
578 HDIO_DRIVE_CMD = 0x31f
579 HDIO_DRIVE_CMD_AEB = 0x31e
580 HDIO_DRIVE_CMD_HDR_SIZE = 0x4
581 HDIO_DRIVE_HOB_HDR_SIZE = 0x8
582 HDIO_DRIVE_RESET = 0x31c
583 HDIO_DRIVE_TASK = 0x31e
584 HDIO_DRIVE_TASKFILE = 0x31d
585 HDIO_DRIVE_TASK_HDR_SIZE = 0x8
586 HDIO_GETGEO = 0x301
587 HDIO_GET_32BIT = 0x309
588 HDIO_GET_ACOUSTIC = 0x30f
589 HDIO_GET_ADDRESS = 0x310
590 HDIO_GET_BUSSTATE = 0x31a
591 HDIO_GET_DMA = 0x30b
592 HDIO_GET_IDENTITY = 0x30d
593 HDIO_GET_KEEPSETTINGS = 0x308
594 HDIO_GET_MULTCOUNT = 0x304
595 HDIO_GET_NICE = 0x30c
596 HDIO_GET_NOWERR = 0x30a
597 HDIO_GET_QDMA = 0x305
598 HDIO_GET_UNMASKINTR = 0x302
599 HDIO_GET_WCACHE = 0x30e
600 HDIO_OBSOLETE_IDENTITY = 0x307
601 HDIO_SCAN_HWIF = 0x328
602 HDIO_SET_32BIT = 0x324
603 HDIO_SET_ACOUSTIC = 0x32c
604 HDIO_SET_ADDRESS = 0x32f
605 HDIO_SET_BUSSTATE = 0x32d
606 HDIO_SET_DMA = 0x326
607 HDIO_SET_KEEPSETTINGS = 0x323
608 HDIO_SET_MULTCOUNT = 0x321
609 HDIO_SET_NICE = 0x329
610 HDIO_SET_NOWERR = 0x325
611 HDIO_SET_PIO_MODE = 0x327
612 HDIO_SET_QDMA = 0x32e
613 HDIO_SET_UNMASKINTR = 0x322
614 HDIO_SET_WCACHE = 0x32b
615 HDIO_SET_XFER = 0x306
616 HDIO_TRISTATE_HWIF = 0x31b
617 HDIO_UNREGISTER_HWIF = 0x32a
618 HOSTFS_SUPER_MAGIC = 0xc0ffee
619 HPFS_SUPER_MAGIC = 0xf995e849
620 HUGETLBFS_MAGIC = 0x958458f6
529621 HUPCL = 0x400
530622 IBSHIFT = 0x10
531623 ICANON = 0x2
545637 IFA_F_STABLE_PRIVACY = 0x800
546638 IFA_F_TEMPORARY = 0x1
547639 IFA_F_TENTATIVE = 0x40
548 IFA_MAX = 0x8
640 IFA_MAX = 0xa
549641 IFF_ALLMULTI = 0x200
550642 IFF_ATTACH_QUEUE = 0x200
551643 IFF_AUTOMEDIA = 0x4000
560652 IFF_MASTER = 0x400
561653 IFF_MULTICAST = 0x1000
562654 IFF_MULTI_QUEUE = 0x100
655 IFF_NAPI = 0x10
656 IFF_NAPI_FRAGS = 0x20
563657 IFF_NOARP = 0x80
564658 IFF_NOFILTER = 0x1000
565659 IFF_NOTRAILERS = 0x20
622716 IN_OPEN = 0x20
623717 IN_Q_OVERFLOW = 0x4000
624718 IN_UNMOUNT = 0x2000
719 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
625720 IPPROTO_AH = 0x33
626721 IPPROTO_BEETPH = 0x5e
627722 IPPROTO_COMP = 0x6c
669764 IPV6_DONTFRAG = 0x3e
670765 IPV6_DROP_MEMBERSHIP = 0x15
671766 IPV6_DSTOPTS = 0x3b
767 IPV6_FREEBIND = 0x4e
672768 IPV6_HDRINCL = 0x24
673769 IPV6_HOPLIMIT = 0x34
674770 IPV6_HOPOPTS = 0x36
773869 IP_UNICAST_IF = 0x32
774870 IP_XFRM_POLICY = 0x11
775871 ISIG = 0x1
872 ISOFS_SUPER_MAGIC = 0x9660
776873 ISTRIP = 0x20
777874 IUCLC = 0x200
778875 IUTF8 = 0x4000
779876 IXANY = 0x800
780877 IXOFF = 0x1000
781878 IXON = 0x400
879 JFFS2_SUPER_MAGIC = 0x72b6
880 KEXEC_ARCH_386 = 0x30000
881 KEXEC_ARCH_68K = 0x40000
882 KEXEC_ARCH_AARCH64 = 0xb70000
883 KEXEC_ARCH_ARM = 0x280000
884 KEXEC_ARCH_DEFAULT = 0x0
885 KEXEC_ARCH_IA_64 = 0x320000
886 KEXEC_ARCH_MASK = 0xffff0000
887 KEXEC_ARCH_MIPS = 0x80000
888 KEXEC_ARCH_MIPS_LE = 0xa0000
889 KEXEC_ARCH_PPC = 0x140000
890 KEXEC_ARCH_PPC64 = 0x150000
891 KEXEC_ARCH_S390 = 0x160000
892 KEXEC_ARCH_SH = 0x2a0000
893 KEXEC_ARCH_X86_64 = 0x3e0000
894 KEXEC_FILE_NO_INITRAMFS = 0x4
895 KEXEC_FILE_ON_CRASH = 0x2
896 KEXEC_FILE_UNLOAD = 0x1
897 KEXEC_ON_CRASH = 0x1
898 KEXEC_PRESERVE_CONTEXT = 0x2
899 KEXEC_SEGMENT_MAX = 0x10
782900 KEYCTL_ASSUME_AUTHORITY = 0x10
783901 KEYCTL_CHOWN = 0x4
784902 KEYCTL_CLEAR = 0x7
793911 KEYCTL_JOIN_SESSION_KEYRING = 0x1
794912 KEYCTL_LINK = 0x8
795913 KEYCTL_NEGATE = 0xd
914 KEYCTL_PKEY_DECRYPT = 0x1a
915 KEYCTL_PKEY_ENCRYPT = 0x19
916 KEYCTL_PKEY_QUERY = 0x18
917 KEYCTL_PKEY_SIGN = 0x1b
918 KEYCTL_PKEY_VERIFY = 0x1c
796919 KEYCTL_READ = 0xb
797920 KEYCTL_REJECT = 0x13
798921 KEYCTL_RESTRICT_KEYRING = 0x1d
802925 KEYCTL_SETPERM = 0x5
803926 KEYCTL_SET_REQKEY_KEYRING = 0xe
804927 KEYCTL_SET_TIMEOUT = 0xf
928 KEYCTL_SUPPORTS_DECRYPT = 0x2
929 KEYCTL_SUPPORTS_ENCRYPT = 0x1
930 KEYCTL_SUPPORTS_SIGN = 0x4
931 KEYCTL_SUPPORTS_VERIFY = 0x8
805932 KEYCTL_UNLINK = 0x9
806933 KEYCTL_UPDATE = 0x2
807934 KEY_REQKEY_DEFL_DEFAULT = 0x0
843970 MADV_FREE = 0x8
844971 MADV_HUGEPAGE = 0xe
845972 MADV_HWPOISON = 0x64
973 MADV_KEEPONFORK = 0x13
846974 MADV_MERGEABLE = 0xc
847975 MADV_NOHUGEPAGE = 0xf
848976 MADV_NORMAL = 0x0
851979 MADV_SEQUENTIAL = 0x2
852980 MADV_UNMERGEABLE = 0xd
853981 MADV_WILLNEED = 0x3
982 MADV_WIPEONFORK = 0x12
854983 MAP_ANON = 0x800
855984 MAP_ANONYMOUS = 0x800
856985 MAP_DENYWRITE = 0x2000
857986 MAP_EXECUTABLE = 0x4000
858987 MAP_FILE = 0x0
859988 MAP_FIXED = 0x10
989 MAP_FIXED_NOREPLACE = 0x100000
860990 MAP_GROWSDOWN = 0x1000
861991 MAP_HUGETLB = 0x80000
862992 MAP_HUGE_MASK = 0x3f
868998 MAP_PRIVATE = 0x2
869999 MAP_RENAME = 0x800
8701000 MAP_SHARED = 0x1
1001 MAP_SHARED_VALIDATE = 0x3
8711002 MAP_STACK = 0x40000
8721003 MAP_TYPE = 0xf
8731004 MCL_CURRENT = 0x1
8741005 MCL_FUTURE = 0x2
8751006 MCL_ONFAULT = 0x4
1007 MFD_ALLOW_SEALING = 0x2
1008 MFD_CLOEXEC = 0x1
1009 MFD_HUGETLB = 0x4
1010 MFD_HUGE_16GB = -0x78000000
1011 MFD_HUGE_16MB = 0x60000000
1012 MFD_HUGE_1GB = 0x78000000
1013 MFD_HUGE_1MB = 0x50000000
1014 MFD_HUGE_256MB = 0x70000000
1015 MFD_HUGE_2GB = 0x7c000000
1016 MFD_HUGE_2MB = 0x54000000
1017 MFD_HUGE_32MB = 0x64000000
1018 MFD_HUGE_512KB = 0x4c000000
1019 MFD_HUGE_512MB = 0x74000000
1020 MFD_HUGE_64KB = 0x40000000
1021 MFD_HUGE_8MB = 0x5c000000
1022 MFD_HUGE_MASK = 0x3f
1023 MFD_HUGE_SHIFT = 0x1a
1024 MINIX2_SUPER_MAGIC = 0x2468
1025 MINIX2_SUPER_MAGIC2 = 0x2478
1026 MINIX3_SUPER_MAGIC = 0x4d5a
1027 MINIX_SUPER_MAGIC = 0x137f
1028 MINIX_SUPER_MAGIC2 = 0x138f
8761029 MNT_DETACH = 0x2
8771030 MNT_EXPIRE = 0x4
8781031 MNT_FORCE = 0x1
1032 MODULE_INIT_IGNORE_MODVERSIONS = 0x1
1033 MODULE_INIT_IGNORE_VERMAGIC = 0x2
1034 MSDOS_SUPER_MAGIC = 0x4d44
8791035 MSG_BATCH = 0x40000
8801036 MSG_CMSG_CLOEXEC = 0x40000000
8811037 MSG_CONFIRM = 0x800
8971053 MSG_TRYHARD = 0x4
8981054 MSG_WAITALL = 0x100
8991055 MSG_WAITFORONE = 0x10000
1056 MSG_ZEROCOPY = 0x4000000
9001057 MS_ACTIVE = 0x40000000
9011058 MS_ASYNC = 0x1
9021059 MS_BIND = 0x1000
9341091 MS_SYNCHRONOUS = 0x10
9351092 MS_UNBINDABLE = 0x20000
9361093 MS_VERBOSE = 0x8000
1094 MTD_INODE_FS_MAGIC = 0x11307854
9371095 NAME_MAX = 0xff
1096 NCP_SUPER_MAGIC = 0x564c
9381097 NETLINK_ADD_MEMBERSHIP = 0x1
9391098 NETLINK_AUDIT = 0x9
9401099 NETLINK_BROADCAST_ERROR = 0x4
9481107 NETLINK_FIB_LOOKUP = 0xa
9491108 NETLINK_FIREWALL = 0x3
9501109 NETLINK_GENERIC = 0x10
1110 NETLINK_GET_STRICT_CHK = 0xc
9511111 NETLINK_INET_DIAG = 0x4
9521112 NETLINK_IP6_FW = 0xd
9531113 NETLINK_ISCSI = 0x8
9691129 NETLINK_UNUSED = 0x1
9701130 NETLINK_USERSOCK = 0x2
9711131 NETLINK_XFRM = 0x6
1132 NETNSA_MAX = 0x3
1133 NETNSA_NSID_NOT_ASSIGNED = -0x1
1134 NFNETLINK_V0 = 0x0
1135 NFNLGRP_ACCT_QUOTA = 0x8
1136 NFNLGRP_CONNTRACK_DESTROY = 0x3
1137 NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
1138 NFNLGRP_CONNTRACK_EXP_NEW = 0x4
1139 NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
1140 NFNLGRP_CONNTRACK_NEW = 0x1
1141 NFNLGRP_CONNTRACK_UPDATE = 0x2
1142 NFNLGRP_MAX = 0x9
1143 NFNLGRP_NFTABLES = 0x7
1144 NFNLGRP_NFTRACE = 0x9
1145 NFNLGRP_NONE = 0x0
1146 NFNL_BATCH_MAX = 0x1
1147 NFNL_MSG_BATCH_BEGIN = 0x10
1148 NFNL_MSG_BATCH_END = 0x11
1149 NFNL_NFA_NEST = 0x8000
1150 NFNL_SUBSYS_ACCT = 0x7
1151 NFNL_SUBSYS_COUNT = 0xc
1152 NFNL_SUBSYS_CTHELPER = 0x9
1153 NFNL_SUBSYS_CTNETLINK = 0x1
1154 NFNL_SUBSYS_CTNETLINK_EXP = 0x2
1155 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
1156 NFNL_SUBSYS_IPSET = 0x6
1157 NFNL_SUBSYS_NFTABLES = 0xa
1158 NFNL_SUBSYS_NFT_COMPAT = 0xb
1159 NFNL_SUBSYS_NONE = 0x0
1160 NFNL_SUBSYS_OSF = 0x5
1161 NFNL_SUBSYS_QUEUE = 0x3
1162 NFNL_SUBSYS_ULOG = 0x4
1163 NFS_SUPER_MAGIC = 0x6969
1164 NILFS_SUPER_MAGIC = 0x3434
9721165 NL0 = 0x0
9731166 NL1 = 0x100
9741167 NLA_ALIGNTO = 0x4
9961189 NLM_F_EXCL = 0x200
9971190 NLM_F_MATCH = 0x200
9981191 NLM_F_MULTI = 0x2
1192 NLM_F_NONREC = 0x100
9991193 NLM_F_REPLACE = 0x100
10001194 NLM_F_REQUEST = 0x1
10011195 NLM_F_ROOT = 0x100
10021196 NOFLSH = 0x80
1197 NSFS_MAGIC = 0x6e736673
1198 OCFS2_SUPER_MAGIC = 0x7461636f
10031199 OCRNL = 0x8
10041200 OFDEL = 0x80
10051201 OFILL = 0x40
10071203 ONLCR = 0x4
10081204 ONLRET = 0x20
10091205 ONOCR = 0x10
1206 OPENPROM_SUPER_MAGIC = 0x9fa1
10101207 OPOST = 0x1
1208 OVERLAYFS_SUPER_MAGIC = 0x794c7630
10111209 O_ACCMODE = 0x3
10121210 O_APPEND = 0x8
10131211 O_ASYNC = 0x1000
10531251 PACKET_FASTROUTE = 0x6
10541252 PACKET_HDRLEN = 0xb
10551253 PACKET_HOST = 0x0
1254 PACKET_IGNORE_OUTGOING = 0x17
10561255 PACKET_KERNEL = 0x7
10571256 PACKET_LOOPBACK = 0x5
10581257 PACKET_LOSS = 0xe
10921291 PERF_EVENT_IOC_DISABLE = 0x20002401
10931292 PERF_EVENT_IOC_ENABLE = 0x20002400
10941293 PERF_EVENT_IOC_ID = 0x40082407
1294 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
10951295 PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
10961296 PERF_EVENT_IOC_PERIOD = 0x80082404
1297 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
10971298 PERF_EVENT_IOC_REFRESH = 0x20002402
10981299 PERF_EVENT_IOC_RESET = 0x20002403
10991300 PERF_EVENT_IOC_SET_BPF = 0x80042408
11001301 PERF_EVENT_IOC_SET_FILTER = 0x80082406
11011302 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
1303 PIPEFS_MAGIC = 0x50495045
1304 PPPIOCATTACH = 0x8004743d
1305 PPPIOCATTCHAN = 0x80047438
1306 PPPIOCCONNECT = 0x8004743a
1307 PPPIOCDETACH = 0x8004743c
1308 PPPIOCDISCONN = 0x20007439
1309 PPPIOCGASYNCMAP = 0x40047458
1310 PPPIOCGCHAN = 0x40047437
1311 PPPIOCGDEBUG = 0x40047441
1312 PPPIOCGFLAGS = 0x4004745a
1313 PPPIOCGIDLE = 0x4010743f
1314 PPPIOCGL2TPSTATS = 0x40487436
1315 PPPIOCGMRU = 0x40047453
1316 PPPIOCGNPMODE = 0xc008744c
1317 PPPIOCGRASYNCMAP = 0x40047455
1318 PPPIOCGUNIT = 0x40047456
1319 PPPIOCGXASYNCMAP = 0x40207450
1320 PPPIOCNEWUNIT = 0xc004743e
1321 PPPIOCSACTIVE = 0x80107446
1322 PPPIOCSASYNCMAP = 0x80047457
1323 PPPIOCSCOMPRESS = 0x8010744d
1324 PPPIOCSDEBUG = 0x80047440
1325 PPPIOCSFLAGS = 0x80047459
1326 PPPIOCSMAXCID = 0x80047451
1327 PPPIOCSMRRU = 0x8004743b
1328 PPPIOCSMRU = 0x80047452
1329 PPPIOCSNPMODE = 0x8008744b
1330 PPPIOCSPASS = 0x80107447
1331 PPPIOCSRASYNCMAP = 0x80047454
1332 PPPIOCSXASYNCMAP = 0x8020744f
1333 PPPIOCXFERUNIT = 0x2000744e
11021334 PRIO_PGRP = 0x1
11031335 PRIO_PROCESS = 0x0
11041336 PRIO_USER = 0x2
1337 PROC_SUPER_MAGIC = 0x9fa0
11051338 PROT_EXEC = 0x4
11061339 PROT_GROWSDOWN = 0x1000000
11071340 PROT_GROWSUP = 0x2000000
11441377 PR_GET_PDEATHSIG = 0x2
11451378 PR_GET_SECCOMP = 0x15
11461379 PR_GET_SECUREBITS = 0x1b
1380 PR_GET_SPECULATION_CTRL = 0x34
11471381 PR_GET_THP_DISABLE = 0x2a
11481382 PR_GET_TID_ADDRESS = 0x28
11491383 PR_GET_TIMERSLACK = 0x1e
11861420 PR_SET_NO_NEW_PRIVS = 0x26
11871421 PR_SET_PDEATHSIG = 0x1
11881422 PR_SET_PTRACER = 0x59616d61
1189 PR_SET_PTRACER_ANY = -0x1
1423 PR_SET_PTRACER_ANY = 0xffffffffffffffff
11901424 PR_SET_SECCOMP = 0x16
11911425 PR_SET_SECUREBITS = 0x1c
1426 PR_SET_SPECULATION_CTRL = 0x35
11921427 PR_SET_THP_DISABLE = 0x29
11931428 PR_SET_TIMERSLACK = 0x1d
11941429 PR_SET_TIMING = 0xe
11951430 PR_SET_TSC = 0x1a
11961431 PR_SET_UNALIGN = 0x6
1432 PR_SPEC_DISABLE = 0x4
1433 PR_SPEC_ENABLE = 0x2
1434 PR_SPEC_FORCE_DISABLE = 0x8
1435 PR_SPEC_INDIRECT_BRANCH = 0x1
1436 PR_SPEC_NOT_AFFECTED = 0x0
1437 PR_SPEC_PRCTL = 0x1
1438 PR_SPEC_STORE_BYPASS = 0x0
1439 PR_SVE_GET_VL = 0x33
1440 PR_SVE_SET_VL = 0x32
1441 PR_SVE_SET_VL_ONEXEC = 0x40000
1442 PR_SVE_VL_INHERIT = 0x20000
1443 PR_SVE_VL_LEN_MASK = 0xffff
11971444 PR_TASK_PERF_EVENTS_DISABLE = 0x1f
11981445 PR_TASK_PERF_EVENTS_ENABLE = 0x20
11991446 PR_TIMING_STATISTICAL = 0x0
12021449 PR_TSC_SIGSEGV = 0x2
12031450 PR_UNALIGN_NOPRINT = 0x1
12041451 PR_UNALIGN_SIGBUS = 0x2
1452 PSTOREFS_MAGIC = 0x6165676c
12051453 PTRACE_ATTACH = 0x10
12061454 PTRACE_CONT = 0x7
12071455 PTRACE_DETACH = 0x11
12501498 PTRACE_POKETEXT_3264 = 0xc2
12511499 PTRACE_POKEUSR = 0x6
12521500 PTRACE_SECCOMP_GET_FILTER = 0x420c
1501 PTRACE_SECCOMP_GET_METADATA = 0x420d
12531502 PTRACE_SEIZE = 0x4206
12541503 PTRACE_SETFPREGS = 0xf
12551504 PTRACE_SETOPTIONS = 0x4200
12621511 PTRACE_SINGLESTEP = 0x9
12631512 PTRACE_SYSCALL = 0x18
12641513 PTRACE_TRACEME = 0x0
1514 QNX4_SUPER_MAGIC = 0x2f
1515 QNX6_SUPER_MAGIC = 0x68191122
1516 RAMFS_MAGIC = 0x858458f6
1517 RDTGROUP_SUPER_MAGIC = 0x7655821
1518 REISERFS_SUPER_MAGIC = 0x52654973
1519 RENAME_EXCHANGE = 0x2
1520 RENAME_NOREPLACE = 0x1
1521 RENAME_WHITEOUT = 0x4
12651522 RLIMIT_AS = 0x6
12661523 RLIMIT_CORE = 0x4
12671524 RLIMIT_CPU = 0x0
12781535 RLIMIT_RTTIME = 0xf
12791536 RLIMIT_SIGPENDING = 0xb
12801537 RLIMIT_STACK = 0x3
1281 RLIM_INFINITY = -0x1
1538 RLIM_INFINITY = 0xffffffffffffffff
12821539 RTAX_ADVMSS = 0x8
12831540 RTAX_CC_ALGO = 0x10
12841541 RTAX_CWND = 0x7
1542 RTAX_FASTOPEN_NO_COOKIE = 0x11
12851543 RTAX_FEATURES = 0xc
12861544 RTAX_FEATURE_ALLFRAG = 0x8
12871545 RTAX_FEATURE_ECN = 0x1
12921550 RTAX_INITCWND = 0xb
12931551 RTAX_INITRWND = 0xe
12941552 RTAX_LOCK = 0x1
1295 RTAX_MAX = 0x10
1553 RTAX_MAX = 0x11
12961554 RTAX_MTU = 0x2
12971555 RTAX_QUICKACK = 0xf
12981556 RTAX_REORDERING = 0x9
13031561 RTAX_UNSPEC = 0x0
13041562 RTAX_WINDOW = 0x3
13051563 RTA_ALIGNTO = 0x4
1306 RTA_MAX = 0x1a
1564 RTA_MAX = 0x1d
13071565 RTCF_DIRECTSRC = 0x4000000
13081566 RTCF_DOREDIRECT = 0x1000000
13091567 RTCF_LOG = 0x2000000
13101568 RTCF_MASQ = 0x400000
13111569 RTCF_NAT = 0x800000
13121570 RTCF_VALVE = 0x200000
1571 RTC_AF = 0x20
1572 RTC_AIE_OFF = 0x20007002
1573 RTC_AIE_ON = 0x20007001
1574 RTC_ALM_READ = 0x40247008
1575 RTC_ALM_SET = 0x80247007
1576 RTC_EPOCH_READ = 0x4008700d
1577 RTC_EPOCH_SET = 0x8008700e
1578 RTC_IRQF = 0x80
1579 RTC_IRQP_READ = 0x4008700b
1580 RTC_IRQP_SET = 0x8008700c
1581 RTC_MAX_FREQ = 0x2000
1582 RTC_PF = 0x40
1583 RTC_PIE_OFF = 0x20007006
1584 RTC_PIE_ON = 0x20007005
1585 RTC_PLL_GET = 0x40207011
1586 RTC_PLL_SET = 0x80207012
1587 RTC_RD_TIME = 0x40247009
1588 RTC_SET_TIME = 0x8024700a
1589 RTC_UF = 0x10
1590 RTC_UIE_OFF = 0x20007004
1591 RTC_UIE_ON = 0x20007003
1592 RTC_VL_CLR = 0x20007014
1593 RTC_VL_READ = 0x40047013
1594 RTC_WIE_OFF = 0x20007010
1595 RTC_WIE_ON = 0x2000700f
1596 RTC_WKALM_RD = 0x40287010
1597 RTC_WKALM_SET = 0x8028700f
13131598 RTF_ADDRCLASSMASK = 0xf8000000
13141599 RTF_ADDRCONF = 0x40000
13151600 RTF_ALLONLINK = 0x20000
13441629 RTM_DELACTION = 0x31
13451630 RTM_DELADDR = 0x15
13461631 RTM_DELADDRLABEL = 0x49
1632 RTM_DELCHAIN = 0x65
13471633 RTM_DELLINK = 0x11
13481634 RTM_DELMDB = 0x55
13491635 RTM_DELNEIGH = 0x1d
13641650 RTM_GETADDR = 0x16
13651651 RTM_GETADDRLABEL = 0x4a
13661652 RTM_GETANYCAST = 0x3e
1653 RTM_GETCHAIN = 0x66
13671654 RTM_GETDCB = 0x4e
13681655 RTM_GETLINK = 0x12
13691656 RTM_GETMDB = 0x56
13781665 RTM_GETSTATS = 0x5e
13791666 RTM_GETTCLASS = 0x2a
13801667 RTM_GETTFILTER = 0x2e
1381 RTM_MAX = 0x63
1668 RTM_MAX = 0x67
13821669 RTM_NEWACTION = 0x30
13831670 RTM_NEWADDR = 0x14
13841671 RTM_NEWADDRLABEL = 0x48
13851672 RTM_NEWCACHEREPORT = 0x60
1673 RTM_NEWCHAIN = 0x64
13861674 RTM_NEWLINK = 0x10
13871675 RTM_NEWMDB = 0x54
13881676 RTM_NEWNDUSEROPT = 0x44
13971685 RTM_NEWSTATS = 0x5c
13981686 RTM_NEWTCLASS = 0x28
13991687 RTM_NEWTFILTER = 0x2c
1400 RTM_NR_FAMILIES = 0x15
1401 RTM_NR_MSGTYPES = 0x54
1688 RTM_NR_FAMILIES = 0x16
1689 RTM_NR_MSGTYPES = 0x58
14021690 RTM_SETDCB = 0x4f
14031691 RTM_SETLINK = 0x13
14041692 RTM_SETNEIGHTBL = 0x43
14121700 RTNH_F_UNRESOLVED = 0x20
14131701 RTN_MAX = 0xb
14141702 RTPROT_BABEL = 0x2a
1703 RTPROT_BGP = 0xba
14151704 RTPROT_BIRD = 0xc
14161705 RTPROT_BOOT = 0x3
14171706 RTPROT_DHCP = 0x10
14181707 RTPROT_DNROUTED = 0xd
1708 RTPROT_EIGRP = 0xc0
14191709 RTPROT_GATED = 0x8
1710 RTPROT_ISIS = 0xbb
14201711 RTPROT_KERNEL = 0x2
14211712 RTPROT_MROUTED = 0x11
14221713 RTPROT_MRT = 0xa
14231714 RTPROT_NTK = 0xf
1715 RTPROT_OSPF = 0xbc
14241716 RTPROT_RA = 0x9
14251717 RTPROT_REDIRECT = 0x1
1718 RTPROT_RIP = 0xbd
14261719 RTPROT_STATIC = 0x4
14271720 RTPROT_UNSPEC = 0x0
14281721 RTPROT_XORP = 0xe
14421735 SCM_TIMESTAMPING_OPT_STATS = 0x36
14431736 SCM_TIMESTAMPING_PKTINFO = 0x3a
14441737 SCM_TIMESTAMPNS = 0x23
1738 SCM_TXTIME = 0x3d
14451739 SCM_WIFI_STATUS = 0x29
1740 SC_LOG_FLUSH = 0x100000
14461741 SECCOMP_MODE_DISABLED = 0x0
14471742 SECCOMP_MODE_FILTER = 0x2
14481743 SECCOMP_MODE_STRICT = 0x1
1744 SECURITYFS_MAGIC = 0x73636673
1745 SELINUX_MAGIC = 0xf97cff8c
1746 SFD_CLOEXEC = 0x80000
1747 SFD_NONBLOCK = 0x80
14491748 SHUT_RD = 0x0
14501749 SHUT_RDWR = 0x2
14511750 SHUT_WR = 0x1
14961795 SIOCGMIIPHY = 0x8947
14971796 SIOCGMIIREG = 0x8948
14981797 SIOCGPGRP = 0x40047309
1798 SIOCGPPPCSTATS = 0x89f2
1799 SIOCGPPPSTATS = 0x89f0
1800 SIOCGPPPVER = 0x89f1
14991801 SIOCGRARP = 0x8961
15001802 SIOCGSKNS = 0x894c
15011803 SIOCGSTAMP = 0x8906
15301832 SIOCSPGRP = 0x80047308
15311833 SIOCSRARP = 0x8962
15321834 SIOCWANDEV = 0x894a
1835 SMACK_MAGIC = 0x43415d53
1836 SMART_AUTOSAVE = 0xd2
1837 SMART_AUTO_OFFLINE = 0xdb
1838 SMART_DISABLE = 0xd9
1839 SMART_ENABLE = 0xd8
1840 SMART_HCYL_PASS = 0xc2
1841 SMART_IMMEDIATE_OFFLINE = 0xd4
1842 SMART_LCYL_PASS = 0x4f
1843 SMART_READ_LOG_SECTOR = 0xd5
1844 SMART_READ_THRESHOLDS = 0xd1
1845 SMART_READ_VALUES = 0xd0
1846 SMART_SAVE = 0xd3
1847 SMART_STATUS = 0xda
1848 SMART_WRITE_LOG_SECTOR = 0xd6
1849 SMART_WRITE_THRESHOLDS = 0xd7
1850 SMB_SUPER_MAGIC = 0x517b
1851 SOCKFS_MAGIC = 0x534f434b
15331852 SOCK_CLOEXEC = 0x80000
15341853 SOCK_DCCP = 0x6
15351854 SOCK_DGRAM = 0x1
15661885 SOL_SOCKET = 0xffff
15671886 SOL_TCP = 0x6
15681887 SOL_TIPC = 0x10f
1888 SOL_TLS = 0x11a
15691889 SOL_X25 = 0x106
1890 SOL_XDP = 0x11b
15701891 SOMAXCONN = 0x80
15711892 SO_ACCEPTCONN = 0x1009
15721893 SO_ATTACH_BPF = 0x32
16261947 SO_TIMESTAMP = 0x1d
16271948 SO_TIMESTAMPING = 0x25
16281949 SO_TIMESTAMPNS = 0x23
1950 SO_TXTIME = 0x3d
16291951 SO_TYPE = 0x1008
16301952 SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
16311953 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
16351957 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
16361958 SO_VM_SOCKETS_TRUSTED = 0x5
16371959 SO_WIFI_STATUS = 0x29
1960 SO_ZEROCOPY = 0x3c
16381961 SPLICE_F_GIFT = 0x8
16391962 SPLICE_F_MORE = 0x4
16401963 SPLICE_F_MOVE = 0x1
16411964 SPLICE_F_NONBLOCK = 0x2
1965 SQUASHFS_MAGIC = 0x73717368
1966 STACK_END_MAGIC = 0x57ac6e9d
1967 STATX_ALL = 0xfff
1968 STATX_ATIME = 0x20
1969 STATX_ATTR_APPEND = 0x20
1970 STATX_ATTR_AUTOMOUNT = 0x1000
1971 STATX_ATTR_COMPRESSED = 0x4
1972 STATX_ATTR_ENCRYPTED = 0x800
1973 STATX_ATTR_IMMUTABLE = 0x10
1974 STATX_ATTR_NODUMP = 0x40
1975 STATX_BASIC_STATS = 0x7ff
1976 STATX_BLOCKS = 0x400
1977 STATX_BTIME = 0x800
1978 STATX_CTIME = 0x80
1979 STATX_GID = 0x10
1980 STATX_INO = 0x100
1981 STATX_MODE = 0x2
1982 STATX_MTIME = 0x40
1983 STATX_NLINK = 0x4
1984 STATX_SIZE = 0x200
1985 STATX_TYPE = 0x1
1986 STATX_UID = 0x8
1987 STATX__RESERVED = 0x80000000
1988 SYNC_FILE_RANGE_WAIT_AFTER = 0x4
1989 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
1990 SYNC_FILE_RANGE_WRITE = 0x2
1991 SYSFS_MAGIC = 0x62656572
16421992 S_BLKSIZE = 0x200
16431993 S_IEXEC = 0x40
16441994 S_IFBLK = 0x6000
16762026 TASKSTATS_GENL_NAME = "TASKSTATS"
16772027 TASKSTATS_GENL_VERSION = 0x1
16782028 TASKSTATS_TYPE_MAX = 0x6
1679 TASKSTATS_VERSION = 0x8
2029 TASKSTATS_VERSION = 0x9
16802030 TCFLSH = 0x5407
16812031 TCGETA = 0x5401
16822032 TCGETS = 0x540d
17002050 TCP_DEFER_ACCEPT = 0x9
17012051 TCP_FASTOPEN = 0x17
17022052 TCP_FASTOPEN_CONNECT = 0x1e
2053 TCP_FASTOPEN_KEY = 0x21
2054 TCP_FASTOPEN_NO_COOKIE = 0x22
17032055 TCP_INFO = 0xb
17042056 TCP_KEEPCNT = 0x6
17052057 TCP_KEEPIDLE = 0x4
17092061 TCP_MAXWIN = 0xffff
17102062 TCP_MAX_WINSHIFT = 0xe
17112063 TCP_MD5SIG = 0xe
2064 TCP_MD5SIG_EXT = 0x20
2065 TCP_MD5SIG_FLAG_PREFIX = 0x1
17122066 TCP_MD5SIG_MAXKEYLEN = 0x50
17132067 TCP_MSS = 0x200
17142068 TCP_MSS_DEFAULT = 0x218
17292083 TCP_THIN_DUPACK = 0x11
17302084 TCP_THIN_LINEAR_TIMEOUTS = 0x10
17312085 TCP_TIMESTAMP = 0x18
2086 TCP_ULP = 0x1f
17322087 TCP_USER_TIMEOUT = 0x12
17332088 TCP_WINDOW_CLAMP = 0xa
17342089 TCSAFLUSH = 0x5410
17442099 TCSETSW = 0x540f
17452100 TCSETSW2 = 0x8030542c
17462101 TCXONC = 0x5406
2102 TIMER_ABSTIME = 0x1
17472103 TIOCCBRK = 0x5428
17482104 TIOCCONS = 0x80047478
17492105 TIOCEXCL = 0x740d
17522108 TIOCGETP = 0x7408
17532109 TIOCGEXCL = 0x40045440
17542110 TIOCGICOUNT = 0x5492
2111 TIOCGISO7816 = 0x40285442
17552112 TIOCGLCKTRMIOS = 0x548b
17562113 TIOCGLTC = 0x7474
17572114 TIOCGPGRP = 0x40047477
18082165 TIOCSETN = 0x740a
18092166 TIOCSETP = 0x7409
18102167 TIOCSIG = 0x80045436
2168 TIOCSISO7816 = 0xc0285443
18112169 TIOCSLCKTRMIOS = 0x548c
18122170 TIOCSLTC = 0x7475
18132171 TIOCSPGRP = 0x80047476
18182176 TIOCSTI = 0x5472
18192177 TIOCSWINSZ = 0x80087467
18202178 TIOCVHANGUP = 0x5437
2179 TMPFS_MAGIC = 0x1021994
18212180 TOSTOP = 0x8000
2181 TPACKET_ALIGNMENT = 0x10
2182 TPACKET_HDRLEN = 0x34
2183 TP_STATUS_AVAILABLE = 0x0
2184 TP_STATUS_BLK_TMO = 0x20
2185 TP_STATUS_COPY = 0x2
2186 TP_STATUS_CSUMNOTREADY = 0x8
2187 TP_STATUS_CSUM_VALID = 0x80
2188 TP_STATUS_KERNEL = 0x0
2189 TP_STATUS_LOSING = 0x4
2190 TP_STATUS_SENDING = 0x2
2191 TP_STATUS_SEND_REQUEST = 0x1
2192 TP_STATUS_TS_RAW_HARDWARE = -0x80000000
2193 TP_STATUS_TS_SOFTWARE = 0x20000000
2194 TP_STATUS_TS_SYS_HARDWARE = 0x40000000
2195 TP_STATUS_USER = 0x1
2196 TP_STATUS_VLAN_TPID_VALID = 0x40
2197 TP_STATUS_VLAN_VALID = 0x10
2198 TP_STATUS_WRONG_FORMAT = 0x4
2199 TRACEFS_MAGIC = 0x74726163
18222200 TS_COMM_LEN = 0x20
18232201 TUNATTACHFILTER = 0x801054d5
18242202 TUNDETACHFILTER = 0x801054d6
18302208 TUNGETVNETHDRSZ = 0x400454d7
18312209 TUNGETVNETLE = 0x400454dd
18322210 TUNSETDEBUG = 0x800454c9
2211 TUNSETFILTEREBPF = 0x400454e1
18332212 TUNSETGROUP = 0x800454ce
18342213 TUNSETIFF = 0x800454ca
18352214 TUNSETIFINDEX = 0x800454da
18402219 TUNSETPERSIST = 0x800454cb
18412220 TUNSETQUEUE = 0x800454d9
18422221 TUNSETSNDBUF = 0x800454d4
2222 TUNSETSTEERINGEBPF = 0x400454e0
18432223 TUNSETTXFILTER = 0x800454d1
18442224 TUNSETVNETBE = 0x800454de
18452225 TUNSETVNETHDRSZ = 0x800454d8
18462226 TUNSETVNETLE = 0x800454dc
2227 UBI_IOCATT = 0x80186f40
2228 UBI_IOCDET = 0x80046f41
2229 UBI_IOCEBCH = 0x80044f02
2230 UBI_IOCEBER = 0x80044f01
2231 UBI_IOCEBISMAP = 0x40044f05
2232 UBI_IOCEBMAP = 0x80084f03
2233 UBI_IOCEBUNMAP = 0x80044f04
2234 UBI_IOCMKVOL = 0x80986f00
2235 UBI_IOCRMVOL = 0x80046f01
2236 UBI_IOCRNVOL = 0x91106f03
2237 UBI_IOCRSVOL = 0x800c6f02
2238 UBI_IOCSETVOLPROP = 0x80104f06
2239 UBI_IOCVOLCRBLK = 0x80804f07
2240 UBI_IOCVOLRMBLK = 0x20004f08
2241 UBI_IOCVOLUP = 0x80084f00
2242 UDF_SUPER_MAGIC = 0x15013346
18472243 UMOUNT_NOFOLLOW = 0x8
2244 USBDEVICE_SUPER_MAGIC = 0x9fa2
2245 UTIME_NOW = 0x3fffffff
2246 UTIME_OMIT = 0x3ffffffe
2247 V9FS_MAGIC = 0x1021997
18482248 VDISCARD = 0xd
18492249 VEOF = 0x10
18502250 VEOL = 0x11
18752275 WALL = 0x40000000
18762276 WCLONE = 0x80000000
18772277 WCONTINUED = 0x8
2278 WDIOC_GETBOOTSTATUS = 0x40045702
2279 WDIOC_GETPRETIMEOUT = 0x40045709
2280 WDIOC_GETSTATUS = 0x40045701
2281 WDIOC_GETSUPPORT = 0x40285700
2282 WDIOC_GETTEMP = 0x40045703
2283 WDIOC_GETTIMELEFT = 0x4004570a
2284 WDIOC_GETTIMEOUT = 0x40045707
2285 WDIOC_KEEPALIVE = 0x40045705
2286 WDIOC_SETOPTIONS = 0x40045704
2287 WDIOC_SETPRETIMEOUT = 0xc0045708
2288 WDIOC_SETTIMEOUT = 0xc0045706
18782289 WEXITED = 0x4
2290 WIN_ACKMEDIACHANGE = 0xdb
2291 WIN_CHECKPOWERMODE1 = 0xe5
2292 WIN_CHECKPOWERMODE2 = 0x98
2293 WIN_DEVICE_RESET = 0x8
2294 WIN_DIAGNOSE = 0x90
2295 WIN_DOORLOCK = 0xde
2296 WIN_DOORUNLOCK = 0xdf
2297 WIN_DOWNLOAD_MICROCODE = 0x92
2298 WIN_FLUSH_CACHE = 0xe7
2299 WIN_FLUSH_CACHE_EXT = 0xea
2300 WIN_FORMAT = 0x50
2301 WIN_GETMEDIASTATUS = 0xda
2302 WIN_IDENTIFY = 0xec
2303 WIN_IDENTIFY_DMA = 0xee
2304 WIN_IDLEIMMEDIATE = 0xe1
2305 WIN_INIT = 0x60
2306 WIN_MEDIAEJECT = 0xed
2307 WIN_MULTREAD = 0xc4
2308 WIN_MULTREAD_EXT = 0x29
2309 WIN_MULTWRITE = 0xc5
2310 WIN_MULTWRITE_EXT = 0x39
2311 WIN_NOP = 0x0
2312 WIN_PACKETCMD = 0xa0
2313 WIN_PIDENTIFY = 0xa1
2314 WIN_POSTBOOT = 0xdc
2315 WIN_PREBOOT = 0xdd
2316 WIN_QUEUED_SERVICE = 0xa2
2317 WIN_READ = 0x20
2318 WIN_READDMA = 0xc8
2319 WIN_READDMA_EXT = 0x25
2320 WIN_READDMA_ONCE = 0xc9
2321 WIN_READDMA_QUEUED = 0xc7
2322 WIN_READDMA_QUEUED_EXT = 0x26
2323 WIN_READ_BUFFER = 0xe4
2324 WIN_READ_EXT = 0x24
2325 WIN_READ_LONG = 0x22
2326 WIN_READ_LONG_ONCE = 0x23
2327 WIN_READ_NATIVE_MAX = 0xf8
2328 WIN_READ_NATIVE_MAX_EXT = 0x27
2329 WIN_READ_ONCE = 0x21
2330 WIN_RECAL = 0x10
2331 WIN_RESTORE = 0x10
2332 WIN_SECURITY_DISABLE = 0xf6
2333 WIN_SECURITY_ERASE_PREPARE = 0xf3
2334 WIN_SECURITY_ERASE_UNIT = 0xf4
2335 WIN_SECURITY_FREEZE_LOCK = 0xf5
2336 WIN_SECURITY_SET_PASS = 0xf1
2337 WIN_SECURITY_UNLOCK = 0xf2
2338 WIN_SEEK = 0x70
2339 WIN_SETFEATURES = 0xef
2340 WIN_SETIDLE1 = 0xe3
2341 WIN_SETIDLE2 = 0x97
2342 WIN_SETMULT = 0xc6
2343 WIN_SET_MAX = 0xf9
2344 WIN_SET_MAX_EXT = 0x37
2345 WIN_SLEEPNOW1 = 0xe6
2346 WIN_SLEEPNOW2 = 0x99
2347 WIN_SMART = 0xb0
2348 WIN_SPECIFY = 0x91
2349 WIN_SRST = 0x8
2350 WIN_STANDBY = 0xe2
2351 WIN_STANDBY2 = 0x96
2352 WIN_STANDBYNOW1 = 0xe0
2353 WIN_STANDBYNOW2 = 0x94
2354 WIN_VERIFY = 0x40
2355 WIN_VERIFY_EXT = 0x42
2356 WIN_VERIFY_ONCE = 0x41
2357 WIN_WRITE = 0x30
2358 WIN_WRITEDMA = 0xca
2359 WIN_WRITEDMA_EXT = 0x35
2360 WIN_WRITEDMA_ONCE = 0xcb
2361 WIN_WRITEDMA_QUEUED = 0xcc
2362 WIN_WRITEDMA_QUEUED_EXT = 0x36
2363 WIN_WRITE_BUFFER = 0xe8
2364 WIN_WRITE_EXT = 0x34
2365 WIN_WRITE_LONG = 0x32
2366 WIN_WRITE_LONG_ONCE = 0x33
2367 WIN_WRITE_ONCE = 0x31
2368 WIN_WRITE_SAME = 0xe9
2369 WIN_WRITE_VERIFY = 0x3c
18792370 WNOHANG = 0x1
18802371 WNOTHREAD = 0x20000000
18812372 WNOWAIT = 0x1000000
18852376 XATTR_CREATE = 0x1
18862377 XATTR_REPLACE = 0x2
18872378 XCASE = 0x4
2379 XDP_COPY = 0x2
2380 XDP_FLAGS_DRV_MODE = 0x4
2381 XDP_FLAGS_HW_MODE = 0x8
2382 XDP_FLAGS_MASK = 0xf
2383 XDP_FLAGS_MODES = 0xe
2384 XDP_FLAGS_SKB_MODE = 0x2
2385 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
2386 XDP_MMAP_OFFSETS = 0x1
2387 XDP_PGOFF_RX_RING = 0x0
2388 XDP_PGOFF_TX_RING = 0x80000000
2389 XDP_RX_RING = 0x2
2390 XDP_SHARED_UMEM = 0x1
2391 XDP_STATISTICS = 0x7
2392 XDP_TX_RING = 0x3
2393 XDP_UMEM_COMPLETION_RING = 0x6
2394 XDP_UMEM_FILL_RING = 0x5
2395 XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
2396 XDP_UMEM_PGOFF_FILL_RING = 0x100000000
2397 XDP_UMEM_REG = 0x4
2398 XDP_ZEROCOPY = 0x4
2399 XENFS_SUPER_MAGIC = 0xabba1974
2400 XFS_SUPER_MAGIC = 0x58465342
18882401 XTABS = 0x1800
2402 ZSMALLOC_MAGIC = 0x58295829
18892403 )
18902404
18912405 // Errors
20672581 )
20682582
20692583 // Error table
2070 var errors = [...]string{
2071 1: "operation not permitted",
2072 2: "no such file or directory",
2073 3: "no such process",
2074 4: "interrupted system call",
2075 5: "input/output error",
2076 6: "no such device or address",
2077 7: "argument list too long",
2078 8: "exec format error",
2079 9: "bad file descriptor",
2080 10: "no child processes",
2081 11: "resource temporarily unavailable",
2082 12: "cannot allocate memory",
2083 13: "permission denied",
2084 14: "bad address",
2085 15: "block device required",
2086 16: "device or resource busy",
2087 17: "file exists",
2088 18: "invalid cross-device link",
2089 19: "no such device",
2090 20: "not a directory",
2091 21: "is a directory",
2092 22: "invalid argument",
2093 23: "too many open files in system",
2094 24: "too many open files",
2095 25: "inappropriate ioctl for device",
2096 26: "text file busy",
2097 27: "file too large",
2098 28: "no space left on device",
2099 29: "illegal seek",
2100 30: "read-only file system",
2101 31: "too many links",
2102 32: "broken pipe",
2103 33: "numerical argument out of domain",
2104 34: "numerical result out of range",
2105 35: "no message of desired type",
2106 36: "identifier removed",
2107 37: "channel number out of range",
2108 38: "level 2 not synchronized",
2109 39: "level 3 halted",
2110 40: "level 3 reset",
2111 41: "link number out of range",
2112 42: "protocol driver not attached",
2113 43: "no CSI structure available",
2114 44: "level 2 halted",
2115 45: "resource deadlock avoided",
2116 46: "no locks available",
2117 50: "invalid exchange",
2118 51: "invalid request descriptor",
2119 52: "exchange full",
2120 53: "no anode",
2121 54: "invalid request code",
2122 55: "invalid slot",
2123 56: "file locking deadlock error",
2124 59: "bad font file format",
2125 60: "device not a stream",
2126 61: "no data available",
2127 62: "timer expired",
2128 63: "out of streams resources",
2129 64: "machine is not on the network",
2130 65: "package not installed",
2131 66: "object is remote",
2132 67: "link has been severed",
2133 68: "advertise error",
2134 69: "srmount error",
2135 70: "communication error on send",
2136 71: "protocol error",
2137 73: "RFS specific error",
2138 74: "multihop attempted",
2139 77: "bad message",
2140 78: "file name too long",
2141 79: "value too large for defined data type",
2142 80: "name not unique on network",
2143 81: "file descriptor in bad state",
2144 82: "remote address changed",
2145 83: "can not access a needed shared library",
2146 84: "accessing a corrupted shared library",
2147 85: ".lib section in a.out corrupted",
2148 86: "attempting to link in too many shared libraries",
2149 87: "cannot exec a shared library directly",
2150 88: "invalid or incomplete multibyte or wide character",
2151 89: "function not implemented",
2152 90: "too many levels of symbolic links",
2153 91: "interrupted system call should be restarted",
2154 92: "streams pipe error",
2155 93: "directory not empty",
2156 94: "too many users",
2157 95: "socket operation on non-socket",
2158 96: "destination address required",
2159 97: "message too long",
2160 98: "protocol wrong type for socket",
2161 99: "protocol not available",
2162 120: "protocol not supported",
2163 121: "socket type not supported",
2164 122: "operation not supported",
2165 123: "protocol family not supported",
2166 124: "address family not supported by protocol",
2167 125: "address already in use",
2168 126: "cannot assign requested address",
2169 127: "network is down",
2170 128: "network is unreachable",
2171 129: "network dropped connection on reset",
2172 130: "software caused connection abort",
2173 131: "connection reset by peer",
2174 132: "no buffer space available",
2175 133: "transport endpoint is already connected",
2176 134: "transport endpoint is not connected",
2177 135: "structure needs cleaning",
2178 137: "not a XENIX named type file",
2179 138: "no XENIX semaphores available",
2180 139: "is a named type file",
2181 140: "remote I/O error",
2182 141: "unknown error 141",
2183 142: "unknown error 142",
2184 143: "cannot send after transport endpoint shutdown",
2185 144: "too many references: cannot splice",
2186 145: "connection timed out",
2187 146: "connection refused",
2188 147: "host is down",
2189 148: "no route to host",
2190 149: "operation already in progress",
2191 150: "operation now in progress",
2192 151: "stale file handle",
2193 158: "operation canceled",
2194 159: "no medium found",
2195 160: "wrong medium type",
2196 161: "required key not available",
2197 162: "key has expired",
2198 163: "key has been revoked",
2199 164: "key was rejected by service",
2200 165: "owner died",
2201 166: "state not recoverable",
2202 167: "operation not possible due to RF-kill",
2203 168: "memory page has hardware error",
2204 1133: "disk quota exceeded",
2584 var errorList = [...]struct {
2585 num syscall.Errno
2586 name string
2587 desc string
2588 }{
2589 {1, "EPERM", "operation not permitted"},
2590 {2, "ENOENT", "no such file or directory"},
2591 {3, "ESRCH", "no such process"},
2592 {4, "EINTR", "interrupted system call"},
2593 {5, "EIO", "input/output error"},
2594 {6, "ENXIO", "no such device or address"},
2595 {7, "E2BIG", "argument list too long"},
2596 {8, "ENOEXEC", "exec format error"},
2597 {9, "EBADF", "bad file descriptor"},
2598 {10, "ECHILD", "no child processes"},
2599 {11, "EAGAIN", "resource temporarily unavailable"},
2600 {12, "ENOMEM", "cannot allocate memory"},
2601 {13, "EACCES", "permission denied"},
2602 {14, "EFAULT", "bad address"},
2603 {15, "ENOTBLK", "block device required"},
2604 {16, "EBUSY", "device or resource busy"},
2605 {17, "EEXIST", "file exists"},
2606 {18, "EXDEV", "invalid cross-device link"},
2607 {19, "ENODEV", "no such device"},
2608 {20, "ENOTDIR", "not a directory"},
2609 {21, "EISDIR", "is a directory"},
2610 {22, "EINVAL", "invalid argument"},
2611 {23, "ENFILE", "too many open files in system"},
2612 {24, "EMFILE", "too many open files"},
2613 {25, "ENOTTY", "inappropriate ioctl for device"},
2614 {26, "ETXTBSY", "text file busy"},
2615 {27, "EFBIG", "file too large"},
2616 {28, "ENOSPC", "no space left on device"},
2617 {29, "ESPIPE", "illegal seek"},
2618 {30, "EROFS", "read-only file system"},
2619 {31, "EMLINK", "too many links"},
2620 {32, "EPIPE", "broken pipe"},
2621 {33, "EDOM", "numerical argument out of domain"},
2622 {34, "ERANGE", "numerical result out of range"},
2623 {35, "ENOMSG", "no message of desired type"},
2624 {36, "EIDRM", "identifier removed"},
2625 {37, "ECHRNG", "channel number out of range"},
2626 {38, "EL2NSYNC", "level 2 not synchronized"},
2627 {39, "EL3HLT", "level 3 halted"},
2628 {40, "EL3RST", "level 3 reset"},
2629 {41, "ELNRNG", "link number out of range"},
2630 {42, "EUNATCH", "protocol driver not attached"},
2631 {43, "ENOCSI", "no CSI structure available"},
2632 {44, "EL2HLT", "level 2 halted"},
2633 {45, "EDEADLK", "resource deadlock avoided"},
2634 {46, "ENOLCK", "no locks available"},
2635 {50, "EBADE", "invalid exchange"},
2636 {51, "EBADR", "invalid request descriptor"},
2637 {52, "EXFULL", "exchange full"},
2638 {53, "ENOANO", "no anode"},
2639 {54, "EBADRQC", "invalid request code"},
2640 {55, "EBADSLT", "invalid slot"},
2641 {56, "EDEADLOCK", "file locking deadlock error"},
2642 {59, "EBFONT", "bad font file format"},
2643 {60, "ENOSTR", "device not a stream"},
2644 {61, "ENODATA", "no data available"},
2645 {62, "ETIME", "timer expired"},
2646 {63, "ENOSR", "out of streams resources"},
2647 {64, "ENONET", "machine is not on the network"},
2648 {65, "ENOPKG", "package not installed"},
2649 {66, "EREMOTE", "object is remote"},
2650 {67, "ENOLINK", "link has been severed"},
2651 {68, "EADV", "advertise error"},
2652 {69, "ESRMNT", "srmount error"},
2653 {70, "ECOMM", "communication error on send"},
2654 {71, "EPROTO", "protocol error"},
2655 {73, "EDOTDOT", "RFS specific error"},
2656 {74, "EMULTIHOP", "multihop attempted"},
2657 {77, "EBADMSG", "bad message"},
2658 {78, "ENAMETOOLONG", "file name too long"},
2659 {79, "EOVERFLOW", "value too large for defined data type"},
2660 {80, "ENOTUNIQ", "name not unique on network"},
2661 {81, "EBADFD", "file descriptor in bad state"},
2662 {82, "EREMCHG", "remote address changed"},
2663 {83, "ELIBACC", "can not access a needed shared library"},
2664 {84, "ELIBBAD", "accessing a corrupted shared library"},
2665 {85, "ELIBSCN", ".lib section in a.out corrupted"},
2666 {86, "ELIBMAX", "attempting to link in too many shared libraries"},
2667 {87, "ELIBEXEC", "cannot exec a shared library directly"},
2668 {88, "EILSEQ", "invalid or incomplete multibyte or wide character"},
2669 {89, "ENOSYS", "function not implemented"},
2670 {90, "ELOOP", "too many levels of symbolic links"},
2671 {91, "ERESTART", "interrupted system call should be restarted"},
2672 {92, "ESTRPIPE", "streams pipe error"},
2673 {93, "ENOTEMPTY", "directory not empty"},
2674 {94, "EUSERS", "too many users"},
2675 {95, "ENOTSOCK", "socket operation on non-socket"},
2676 {96, "EDESTADDRREQ", "destination address required"},
2677 {97, "EMSGSIZE", "message too long"},
2678 {98, "EPROTOTYPE", "protocol wrong type for socket"},
2679 {99, "ENOPROTOOPT", "protocol not available"},
2680 {120, "EPROTONOSUPPORT", "protocol not supported"},
2681 {121, "ESOCKTNOSUPPORT", "socket type not supported"},
2682 {122, "ENOTSUP", "operation not supported"},
2683 {123, "EPFNOSUPPORT", "protocol family not supported"},
2684 {124, "EAFNOSUPPORT", "address family not supported by protocol"},
2685 {125, "EADDRINUSE", "address already in use"},
2686 {126, "EADDRNOTAVAIL", "cannot assign requested address"},
2687 {127, "ENETDOWN", "network is down"},
2688 {128, "ENETUNREACH", "network is unreachable"},
2689 {129, "ENETRESET", "network dropped connection on reset"},
2690 {130, "ECONNABORTED", "software caused connection abort"},
2691 {131, "ECONNRESET", "connection reset by peer"},
2692 {132, "ENOBUFS", "no buffer space available"},
2693 {133, "EISCONN", "transport endpoint is already connected"},
2694 {134, "ENOTCONN", "transport endpoint is not connected"},
2695 {135, "EUCLEAN", "structure needs cleaning"},
2696 {137, "ENOTNAM", "not a XENIX named type file"},
2697 {138, "ENAVAIL", "no XENIX semaphores available"},
2698 {139, "EISNAM", "is a named type file"},
2699 {140, "EREMOTEIO", "remote I/O error"},
2700 {141, "EINIT", "unknown error 141"},
2701 {142, "EREMDEV", "unknown error 142"},
2702 {143, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
2703 {144, "ETOOMANYREFS", "too many references: cannot splice"},
2704 {145, "ETIMEDOUT", "connection timed out"},
2705 {146, "ECONNREFUSED", "connection refused"},
2706 {147, "EHOSTDOWN", "host is down"},
2707 {148, "EHOSTUNREACH", "no route to host"},
2708 {149, "EALREADY", "operation already in progress"},
2709 {150, "EINPROGRESS", "operation now in progress"},
2710 {151, "ESTALE", "stale file handle"},
2711 {158, "ECANCELED", "operation canceled"},
2712 {159, "ENOMEDIUM", "no medium found"},
2713 {160, "EMEDIUMTYPE", "wrong medium type"},
2714 {161, "ENOKEY", "required key not available"},
2715 {162, "EKEYEXPIRED", "key has expired"},
2716 {163, "EKEYREVOKED", "key has been revoked"},
2717 {164, "EKEYREJECTED", "key was rejected by service"},
2718 {165, "EOWNERDEAD", "owner died"},
2719 {166, "ENOTRECOVERABLE", "state not recoverable"},
2720 {167, "ERFKILL", "operation not possible due to RF-kill"},
2721 {168, "EHWPOISON", "memory page has hardware error"},
2722 {1133, "EDQUOT", "disk quota exceeded"},
22052723 }
22062724
22072725 // Signal table
2208 var signals = [...]string{
2209 1: "hangup",
2210 2: "interrupt",
2211 3: "quit",
2212 4: "illegal instruction",
2213 5: "trace/breakpoint trap",
2214 6: "aborted",
2215 7: "EMT trap",
2216 8: "floating point exception",
2217 9: "killed",
2218 10: "bus error",
2219 11: "segmentation fault",
2220 12: "bad system call",
2221 13: "broken pipe",
2222 14: "alarm clock",
2223 15: "terminated",
2224 16: "user defined signal 1",
2225 17: "user defined signal 2",
2226 18: "child exited",
2227 19: "power failure",
2228 20: "window changed",
2229 21: "urgent I/O condition",
2230 22: "I/O possible",
2231 23: "stopped (signal)",
2232 24: "stopped",
2233 25: "continued",
2234 26: "stopped (tty input)",
2235 27: "stopped (tty output)",
2236 28: "virtual timer expired",
2237 29: "profiling timer expired",
2238 30: "CPU time limit exceeded",
2239 31: "file size limit exceeded",
2726 var signalList = [...]struct {
2727 num syscall.Signal
2728 name string
2729 desc string
2730 }{
2731 {1, "SIGHUP", "hangup"},
2732 {2, "SIGINT", "interrupt"},
2733 {3, "SIGQUIT", "quit"},
2734 {4, "SIGILL", "illegal instruction"},
2735 {5, "SIGTRAP", "trace/breakpoint trap"},
2736 {6, "SIGABRT", "aborted"},
2737 {7, "SIGEMT", "EMT trap"},
2738 {8, "SIGFPE", "floating point exception"},
2739 {9, "SIGKILL", "killed"},
2740 {10, "SIGBUS", "bus error"},
2741 {11, "SIGSEGV", "segmentation fault"},
2742 {12, "SIGSYS", "bad system call"},
2743 {13, "SIGPIPE", "broken pipe"},
2744 {14, "SIGALRM", "alarm clock"},
2745 {15, "SIGTERM", "terminated"},
2746 {16, "SIGUSR1", "user defined signal 1"},
2747 {17, "SIGUSR2", "user defined signal 2"},
2748 {18, "SIGCHLD", "child exited"},
2749 {19, "SIGPWR", "power failure"},
2750 {20, "SIGWINCH", "window changed"},
2751 {21, "SIGURG", "urgent I/O condition"},
2752 {22, "SIGIO", "I/O possible"},
2753 {23, "SIGSTOP", "stopped (signal)"},
2754 {24, "SIGTSTP", "stopped"},
2755 {25, "SIGCONT", "continued"},
2756 {26, "SIGTTIN", "stopped (tty input)"},
2757 {27, "SIGTTOU", "stopped (tty output)"},
2758 {28, "SIGVTALRM", "virtual timer expired"},
2759 {29, "SIGPROF", "profiling timer expired"},
2760 {30, "SIGXCPU", "CPU time limit exceeded"},
2761 {31, "SIGXFSZ", "file size limit exceeded"},
22402762 }
22
33 // +build mips64le,linux
44
5 // Created by cgo -godefs - DO NOT EDIT
5 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
66 // cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
77
88 package unix
1010 import "syscall"
1111
1212 const (
13 AAFS_MAGIC = 0x5a3c69f0
14 ADFS_SUPER_MAGIC = 0xadf5
15 AFFS_SUPER_MAGIC = 0xadff
16 AFS_FS_MAGIC = 0x6b414653
17 AFS_SUPER_MAGIC = 0x5346414f
1318 AF_ALG = 0x26
1419 AF_APPLETALK = 0x5
1520 AF_ASH = 0x12
5863 AF_VSOCK = 0x28
5964 AF_WANPIPE = 0x19
6065 AF_X25 = 0x9
66 AF_XDP = 0x2c
6167 ALG_OP_DECRYPT = 0x0
6268 ALG_OP_ENCRYPT = 0x1
6369 ALG_SET_AEAD_ASSOCLEN = 0x4
6571 ALG_SET_IV = 0x2
6672 ALG_SET_KEY = 0x1
6773 ALG_SET_OP = 0x3
74 ANON_INODE_FS_MAGIC = 0x9041934
6875 ARPHRD_6LOWPAN = 0x339
6976 ARPHRD_ADAPT = 0x108
7077 ARPHRD_APPLETLK = 0x8
120127 ARPHRD_PPP = 0x200
121128 ARPHRD_PRONET = 0x4
122129 ARPHRD_RAWHDLC = 0x206
130 ARPHRD_RAWIP = 0x207
123131 ARPHRD_ROSE = 0x10e
124132 ARPHRD_RSRVD = 0x104
125133 ARPHRD_SIT = 0x308
131139 ARPHRD_VOID = 0xffff
132140 ARPHRD_VSOCKMON = 0x33a
133141 ARPHRD_X25 = 0x10f
142 AUTOFS_SUPER_MAGIC = 0x187
134143 B0 = 0x0
135144 B1000000 = 0x1008
136145 B110 = 0x3
162171 B75 = 0x2
163172 B921600 = 0x1007
164173 B9600 = 0xd
174 BALLOON_KVM_MAGIC = 0x13661366
175 BDEVFS_MAGIC = 0x62646576
176 BINFMTFS_MAGIC = 0x42494e4d
165177 BLKBSZGET = 0x40081270
166178 BLKBSZSET = 0x80081271
167179 BLKFLSBUF = 0x20001261
186198 BPF_AND = 0x50
187199 BPF_B = 0x10
188200 BPF_DIV = 0x30
201 BPF_FS_MAGIC = 0xcafe4a11
189202 BPF_H = 0x8
190203 BPF_IMM = 0x0
191204 BPF_IND = 0x40
227240 BS0 = 0x0
228241 BS1 = 0x2000
229242 BSDLY = 0x2000
243 BTRFS_SUPER_MAGIC = 0x9123683e
244 BTRFS_TEST_MAGIC = 0x73727279
230245 CAN_BCM = 0x2
231246 CAN_EFF_FLAG = 0x80000000
232247 CAN_EFF_ID_BITS = 0x1d
250265 CBAUD = 0x100f
251266 CBAUDEX = 0x1000
252267 CFLUSH = 0xf
268 CGROUP2_SUPER_MAGIC = 0x63677270
269 CGROUP_SUPER_MAGIC = 0x27e0eb
253270 CIBAUD = 0x100f0000
254271 CLOCAL = 0x800
255272 CLOCK_BOOTTIME = 0x7
292309 CLONE_VFORK = 0x4000
293310 CLONE_VM = 0x100
294311 CMSPAR = 0x40000000
312 CODA_SUPER_MAGIC = 0x73757245
295313 CR0 = 0x0
296314 CR1 = 0x200
297315 CR2 = 0x400
298316 CR3 = 0x600
317 CRAMFS_MAGIC = 0x28cd3d45
299318 CRDLY = 0x600
300319 CREAD = 0x80
301320 CRTSCTS = 0x80000000
310329 CSTOP = 0x13
311330 CSTOPB = 0x40
312331 CSUSP = 0x1a
332 DAXFS_MAGIC = 0x64646178
333 DEBUGFS_MAGIC = 0x64626720
334 DEVPTS_SUPER_MAGIC = 0x1cd1
313335 DT_BLK = 0x6
314336 DT_CHR = 0x2
315337 DT_DIR = 0x4
326348 ECHOKE = 0x800
327349 ECHONL = 0x40
328350 ECHOPRT = 0x400
351 ECRYPTFS_SUPER_MAGIC = 0xf15f
329352 EFD_CLOEXEC = 0x80000
330353 EFD_NONBLOCK = 0x80
331354 EFD_SEMAPHORE = 0x1
355 EFIVARFS_MAGIC = 0xde5e81e4
356 EFS_SUPER_MAGIC = 0x414a53
332357 ENCODING_DEFAULT = 0x0
333358 ENCODING_FM_MARK = 0x3
334359 ENCODING_FM_SPACE = 0x4
389414 ETH_P_DSA = 0x1b
390415 ETH_P_ECONET = 0x18
391416 ETH_P_EDSA = 0xdada
417 ETH_P_ERSPAN = 0x88be
418 ETH_P_ERSPAN2 = 0x22eb
392419 ETH_P_FCOE = 0x8906
393420 ETH_P_FIP = 0x8914
394421 ETH_P_HDLC = 0x19
397424 ETH_P_IEEE802154 = 0xf6
398425 ETH_P_IEEEPUP = 0xa00
399426 ETH_P_IEEEPUPAT = 0xa01
427 ETH_P_IFE = 0xed3e
400428 ETH_P_IP = 0x800
401429 ETH_P_IPV6 = 0x86dd
402430 ETH_P_IPX = 0x8137
407435 ETH_P_LOOP = 0x60
408436 ETH_P_LOOPBACK = 0x9000
409437 ETH_P_MACSEC = 0x88e5
438 ETH_P_MAP = 0xf9
410439 ETH_P_MOBITEX = 0x15
411440 ETH_P_MPLS_MC = 0x8848
412441 ETH_P_MPLS_UC = 0x8847
413442 ETH_P_MVRP = 0x88f5
414443 ETH_P_NCSI = 0x88f8
444 ETH_P_NSH = 0x894f
415445 ETH_P_PAE = 0x888e
416446 ETH_P_PAUSE = 0x8808
417447 ETH_P_PHONET = 0xf5
419449 ETH_P_PPP_DISC = 0x8863
420450 ETH_P_PPP_MP = 0x8
421451 ETH_P_PPP_SES = 0x8864
452 ETH_P_PREAUTH = 0x88c7
422453 ETH_P_PRP = 0x88fb
423454 ETH_P_PUP = 0x200
424455 ETH_P_PUPAT = 0x201
439470 ETH_P_WCCP = 0x883e
440471 ETH_P_X25 = 0x805
441472 ETH_P_XDSA = 0xf8
473 EXABYTE_ENABLE_NEST = 0xf0
474 EXT2_SUPER_MAGIC = 0xef53
475 EXT3_SUPER_MAGIC = 0xef53
476 EXT4_SUPER_MAGIC = 0xef53
442477 EXTA = 0xe
443478 EXTB = 0xf
444479 EXTPROC = 0x10000
480 F2FS_SUPER_MAGIC = 0xf2f52010
445481 FALLOC_FL_COLLAPSE_RANGE = 0x8
446482 FALLOC_FL_INSERT_RANGE = 0x20
447483 FALLOC_FL_KEEP_SIZE = 0x1
462498 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
463499 FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
464500 FS_ENCRYPTION_MODE_INVALID = 0x0
501 FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
502 FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
465503 FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
466504 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
467505 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
475513 FS_POLICY_FLAGS_PAD_8 = 0x1
476514 FS_POLICY_FLAGS_PAD_MASK = 0x3
477515 FS_POLICY_FLAGS_VALID = 0x3
516 FUTEXFS_SUPER_MAGIC = 0xbad1dea
517 F_ADD_SEALS = 0x409
478518 F_DUPFD = 0x0
479519 F_DUPFD_CLOEXEC = 0x406
480520 F_EXLCK = 0x4
487527 F_GETOWN_EX = 0x10
488528 F_GETPIPE_SZ = 0x408
489529 F_GETSIG = 0xb
530 F_GET_FILE_RW_HINT = 0x40d
531 F_GET_RW_HINT = 0x40b
532 F_GET_SEALS = 0x40a
490533 F_LOCK = 0x1
491534 F_NOTIFY = 0x402
492535 F_OFD_GETLK = 0x24
494537 F_OFD_SETLKW = 0x26
495538 F_OK = 0x0
496539 F_RDLCK = 0x0
540 F_SEAL_GROW = 0x4
541 F_SEAL_SEAL = 0x1
542 F_SEAL_SHRINK = 0x2
543 F_SEAL_WRITE = 0x8
497544 F_SETFD = 0x2
498545 F_SETFL = 0x4
499546 F_SETLEASE = 0x400
505552 F_SETOWN_EX = 0xf
506553 F_SETPIPE_SZ = 0x407
507554 F_SETSIG = 0xa
555 F_SET_FILE_RW_HINT = 0x40e
556 F_SET_RW_HINT = 0x40c
508557 F_SHLCK = 0x8
509558 F_TEST = 0x3
510559 F_TLOCK = 0x2
526575 GENL_UNS_ADMIN_PERM = 0x10
527576 GRND_NONBLOCK = 0x1
528577 GRND_RANDOM = 0x2
578 HDIO_DRIVE_CMD = 0x31f
579 HDIO_DRIVE_CMD_AEB = 0x31e
580 HDIO_DRIVE_CMD_HDR_SIZE = 0x4
581 HDIO_DRIVE_HOB_HDR_SIZE = 0x8
582 HDIO_DRIVE_RESET = 0x31c
583 HDIO_DRIVE_TASK = 0x31e
584 HDIO_DRIVE_TASKFILE = 0x31d
585 HDIO_DRIVE_TASK_HDR_SIZE = 0x8
586 HDIO_GETGEO = 0x301
587 HDIO_GET_32BIT = 0x309
588 HDIO_GET_ACOUSTIC = 0x30f
589 HDIO_GET_ADDRESS = 0x310
590 HDIO_GET_BUSSTATE = 0x31a
591 HDIO_GET_DMA = 0x30b
592 HDIO_GET_IDENTITY = 0x30d
593 HDIO_GET_KEEPSETTINGS = 0x308
594 HDIO_GET_MULTCOUNT = 0x304
595 HDIO_GET_NICE = 0x30c
596 HDIO_GET_NOWERR = 0x30a
597 HDIO_GET_QDMA = 0x305
598 HDIO_GET_UNMASKINTR = 0x302
599 HDIO_GET_WCACHE = 0x30e
600 HDIO_OBSOLETE_IDENTITY = 0x307
601 HDIO_SCAN_HWIF = 0x328
602 HDIO_SET_32BIT = 0x324
603 HDIO_SET_ACOUSTIC = 0x32c
604 HDIO_SET_ADDRESS = 0x32f
605 HDIO_SET_BUSSTATE = 0x32d
606 HDIO_SET_DMA = 0x326
607 HDIO_SET_KEEPSETTINGS = 0x323
608 HDIO_SET_MULTCOUNT = 0x321
609 HDIO_SET_NICE = 0x329
610 HDIO_SET_NOWERR = 0x325
611 HDIO_SET_PIO_MODE = 0x327
612 HDIO_SET_QDMA = 0x32e
613 HDIO_SET_UNMASKINTR = 0x322
614 HDIO_SET_WCACHE = 0x32b
615 HDIO_SET_XFER = 0x306
616 HDIO_TRISTATE_HWIF = 0x31b
617 HDIO_UNREGISTER_HWIF = 0x32a
618 HOSTFS_SUPER_MAGIC = 0xc0ffee
619 HPFS_SUPER_MAGIC = 0xf995e849
620 HUGETLBFS_MAGIC = 0x958458f6
529621 HUPCL = 0x400
530622 IBSHIFT = 0x10
531623 ICANON = 0x2
545637 IFA_F_STABLE_PRIVACY = 0x800
546638 IFA_F_TEMPORARY = 0x1
547639 IFA_F_TENTATIVE = 0x40
548 IFA_MAX = 0x8
640 IFA_MAX = 0xa
549641 IFF_ALLMULTI = 0x200
550642 IFF_ATTACH_QUEUE = 0x200
551643 IFF_AUTOMEDIA = 0x4000
560652 IFF_MASTER = 0x400
561653 IFF_MULTICAST = 0x1000
562654 IFF_MULTI_QUEUE = 0x100
655 IFF_NAPI = 0x10
656 IFF_NAPI_FRAGS = 0x20
563657 IFF_NOARP = 0x80
564658 IFF_NOFILTER = 0x1000
565659 IFF_NOTRAILERS = 0x20
622716 IN_OPEN = 0x20
623717 IN_Q_OVERFLOW = 0x4000
624718 IN_UNMOUNT = 0x2000
719 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
625720 IPPROTO_AH = 0x33
626721 IPPROTO_BEETPH = 0x5e
627722 IPPROTO_COMP = 0x6c
669764 IPV6_DONTFRAG = 0x3e
670765 IPV6_DROP_MEMBERSHIP = 0x15
671766 IPV6_DSTOPTS = 0x3b
767 IPV6_FREEBIND = 0x4e
672768 IPV6_HDRINCL = 0x24
673769 IPV6_HOPLIMIT = 0x34
674770 IPV6_HOPOPTS = 0x36
773869 IP_UNICAST_IF = 0x32
774870 IP_XFRM_POLICY = 0x11
775871 ISIG = 0x1
872 ISOFS_SUPER_MAGIC = 0x9660
776873 ISTRIP = 0x20
777874 IUCLC = 0x200
778875 IUTF8 = 0x4000
779876 IXANY = 0x800
780877 IXOFF = 0x1000
781878 IXON = 0x400
879 JFFS2_SUPER_MAGIC = 0x72b6
880 KEXEC_ARCH_386 = 0x30000
881 KEXEC_ARCH_68K = 0x40000
882 KEXEC_ARCH_AARCH64 = 0xb70000
883 KEXEC_ARCH_ARM = 0x280000
884 KEXEC_ARCH_DEFAULT = 0x0
885 KEXEC_ARCH_IA_64 = 0x320000
886 KEXEC_ARCH_MASK = 0xffff0000
887 KEXEC_ARCH_MIPS = 0x80000
888 KEXEC_ARCH_MIPS_LE = 0xa0000
889 KEXEC_ARCH_PPC = 0x140000
890 KEXEC_ARCH_PPC64 = 0x150000
891 KEXEC_ARCH_S390 = 0x160000
892 KEXEC_ARCH_SH = 0x2a0000
893 KEXEC_ARCH_X86_64 = 0x3e0000
894 KEXEC_FILE_NO_INITRAMFS = 0x4
895 KEXEC_FILE_ON_CRASH = 0x2
896 KEXEC_FILE_UNLOAD = 0x1
897 KEXEC_ON_CRASH = 0x1
898 KEXEC_PRESERVE_CONTEXT = 0x2
899 KEXEC_SEGMENT_MAX = 0x10
782900 KEYCTL_ASSUME_AUTHORITY = 0x10
783901 KEYCTL_CHOWN = 0x4
784902 KEYCTL_CLEAR = 0x7
793911 KEYCTL_JOIN_SESSION_KEYRING = 0x1
794912 KEYCTL_LINK = 0x8
795913 KEYCTL_NEGATE = 0xd
914 KEYCTL_PKEY_DECRYPT = 0x1a
915 KEYCTL_PKEY_ENCRYPT = 0x19
916 KEYCTL_PKEY_QUERY = 0x18
917 KEYCTL_PKEY_SIGN = 0x1b
918 KEYCTL_PKEY_VERIFY = 0x1c
796919 KEYCTL_READ = 0xb
797920 KEYCTL_REJECT = 0x13
798921 KEYCTL_RESTRICT_KEYRING = 0x1d
802925 KEYCTL_SETPERM = 0x5
803926 KEYCTL_SET_REQKEY_KEYRING = 0xe
804927 KEYCTL_SET_TIMEOUT = 0xf
928 KEYCTL_SUPPORTS_DECRYPT = 0x2
929 KEYCTL_SUPPORTS_ENCRYPT = 0x1
930 KEYCTL_SUPPORTS_SIGN = 0x4
931 KEYCTL_SUPPORTS_VERIFY = 0x8
805932 KEYCTL_UNLINK = 0x9
806933 KEYCTL_UPDATE = 0x2
807934 KEY_REQKEY_DEFL_DEFAULT = 0x0
843970 MADV_FREE = 0x8
844971 MADV_HUGEPAGE = 0xe
845972 MADV_HWPOISON = 0x64
973 MADV_KEEPONFORK = 0x13
846974 MADV_MERGEABLE = 0xc
847975 MADV_NOHUGEPAGE = 0xf
848976 MADV_NORMAL = 0x0
851979 MADV_SEQUENTIAL = 0x2
852980 MADV_UNMERGEABLE = 0xd
853981 MADV_WILLNEED = 0x3
982 MADV_WIPEONFORK = 0x12
854983 MAP_ANON = 0x800
855984 MAP_ANONYMOUS = 0x800
856985 MAP_DENYWRITE = 0x2000
857986 MAP_EXECUTABLE = 0x4000
858987 MAP_FILE = 0x0
859988 MAP_FIXED = 0x10
989 MAP_FIXED_NOREPLACE = 0x100000
860990 MAP_GROWSDOWN = 0x1000
861991 MAP_HUGETLB = 0x80000
862992 MAP_HUGE_MASK = 0x3f
868998 MAP_PRIVATE = 0x2
869999 MAP_RENAME = 0x800
8701000 MAP_SHARED = 0x1
1001 MAP_SHARED_VALIDATE = 0x3
8711002 MAP_STACK = 0x40000
8721003 MAP_TYPE = 0xf
8731004 MCL_CURRENT = 0x1
8741005 MCL_FUTURE = 0x2
8751006 MCL_ONFAULT = 0x4
1007 MFD_ALLOW_SEALING = 0x2
1008 MFD_CLOEXEC = 0x1
1009 MFD_HUGETLB = 0x4
1010 MFD_HUGE_16GB = -0x78000000
1011 MFD_HUGE_16MB = 0x60000000
1012 MFD_HUGE_1GB = 0x78000000
1013 MFD_HUGE_1MB = 0x50000000
1014 MFD_HUGE_256MB = 0x70000000
1015 MFD_HUGE_2GB = 0x7c000000
1016 MFD_HUGE_2MB = 0x54000000
1017 MFD_HUGE_32MB = 0x64000000
1018 MFD_HUGE_512KB = 0x4c000000
1019 MFD_HUGE_512MB = 0x74000000
1020 MFD_HUGE_64KB = 0x40000000
1021 MFD_HUGE_8MB = 0x5c000000
1022 MFD_HUGE_MASK = 0x3f
1023 MFD_HUGE_SHIFT = 0x1a
1024 MINIX2_SUPER_MAGIC = 0x2468
1025 MINIX2_SUPER_MAGIC2 = 0x2478
1026 MINIX3_SUPER_MAGIC = 0x4d5a
1027 MINIX_SUPER_MAGIC = 0x137f
1028 MINIX_SUPER_MAGIC2 = 0x138f
8761029 MNT_DETACH = 0x2
8771030 MNT_EXPIRE = 0x4
8781031 MNT_FORCE = 0x1
1032 MODULE_INIT_IGNORE_MODVERSIONS = 0x1
1033 MODULE_INIT_IGNORE_VERMAGIC = 0x2
1034 MSDOS_SUPER_MAGIC = 0x4d44
8791035 MSG_BATCH = 0x40000
8801036 MSG_CMSG_CLOEXEC = 0x40000000
8811037 MSG_CONFIRM = 0x800
8971053 MSG_TRYHARD = 0x4
8981054 MSG_WAITALL = 0x100
8991055 MSG_WAITFORONE = 0x10000
1056 MSG_ZEROCOPY = 0x4000000
9001057 MS_ACTIVE = 0x40000000
9011058 MS_ASYNC = 0x1
9021059 MS_BIND = 0x1000
9341091 MS_SYNCHRONOUS = 0x10
9351092 MS_UNBINDABLE = 0x20000
9361093 MS_VERBOSE = 0x8000
1094 MTD_INODE_FS_MAGIC = 0x11307854
9371095 NAME_MAX = 0xff
1096 NCP_SUPER_MAGIC = 0x564c
9381097 NETLINK_ADD_MEMBERSHIP = 0x1
9391098 NETLINK_AUDIT = 0x9
9401099 NETLINK_BROADCAST_ERROR = 0x4
9481107 NETLINK_FIB_LOOKUP = 0xa
9491108 NETLINK_FIREWALL = 0x3
9501109 NETLINK_GENERIC = 0x10
1110 NETLINK_GET_STRICT_CHK = 0xc
9511111 NETLINK_INET_DIAG = 0x4
9521112 NETLINK_IP6_FW = 0xd
9531113 NETLINK_ISCSI = 0x8
9691129 NETLINK_UNUSED = 0x1
9701130 NETLINK_USERSOCK = 0x2
9711131 NETLINK_XFRM = 0x6
1132 NETNSA_MAX = 0x3
1133 NETNSA_NSID_NOT_ASSIGNED = -0x1
1134 NFNETLINK_V0 = 0x0
1135 NFNLGRP_ACCT_QUOTA = 0x8
1136 NFNLGRP_CONNTRACK_DESTROY = 0x3
1137 NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
1138 NFNLGRP_CONNTRACK_EXP_NEW = 0x4
1139 NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
1140 NFNLGRP_CONNTRACK_NEW = 0x1
1141 NFNLGRP_CONNTRACK_UPDATE = 0x2
1142 NFNLGRP_MAX = 0x9
1143 NFNLGRP_NFTABLES = 0x7
1144 NFNLGRP_NFTRACE = 0x9
1145 NFNLGRP_NONE = 0x0
1146 NFNL_BATCH_MAX = 0x1
1147 NFNL_MSG_BATCH_BEGIN = 0x10
1148 NFNL_MSG_BATCH_END = 0x11
1149 NFNL_NFA_NEST = 0x8000
1150 NFNL_SUBSYS_ACCT = 0x7
1151 NFNL_SUBSYS_COUNT = 0xc
1152 NFNL_SUBSYS_CTHELPER = 0x9
1153 NFNL_SUBSYS_CTNETLINK = 0x1
1154 NFNL_SUBSYS_CTNETLINK_EXP = 0x2
1155 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
1156 NFNL_SUBSYS_IPSET = 0x6
1157 NFNL_SUBSYS_NFTABLES = 0xa
1158 NFNL_SUBSYS_NFT_COMPAT = 0xb
1159 NFNL_SUBSYS_NONE = 0x0
1160 NFNL_SUBSYS_OSF = 0x5
1161 NFNL_SUBSYS_QUEUE = 0x3
1162 NFNL_SUBSYS_ULOG = 0x4
1163 NFS_SUPER_MAGIC = 0x6969
1164 NILFS_SUPER_MAGIC = 0x3434
9721165 NL0 = 0x0
9731166 NL1 = 0x100
9741167 NLA_ALIGNTO = 0x4
9961189 NLM_F_EXCL = 0x200
9971190 NLM_F_MATCH = 0x200
9981191 NLM_F_MULTI = 0x2
1192 NLM_F_NONREC = 0x100
9991193 NLM_F_REPLACE = 0x100
10001194 NLM_F_REQUEST = 0x1
10011195 NLM_F_ROOT = 0x100
10021196 NOFLSH = 0x80
1197 NSFS_MAGIC = 0x6e736673
1198 OCFS2_SUPER_MAGIC = 0x7461636f
10031199 OCRNL = 0x8
10041200 OFDEL = 0x80
10051201 OFILL = 0x40
10071203 ONLCR = 0x4
10081204 ONLRET = 0x20
10091205 ONOCR = 0x10
1206 OPENPROM_SUPER_MAGIC = 0x9fa1
10101207 OPOST = 0x1
1208 OVERLAYFS_SUPER_MAGIC = 0x794c7630
10111209 O_ACCMODE = 0x3
10121210 O_APPEND = 0x8
10131211 O_ASYNC = 0x1000
10531251 PACKET_FASTROUTE = 0x6
10541252 PACKET_HDRLEN = 0xb
10551253 PACKET_HOST = 0x0
1254 PACKET_IGNORE_OUTGOING = 0x17
10561255 PACKET_KERNEL = 0x7
10571256 PACKET_LOOPBACK = 0x5
10581257 PACKET_LOSS = 0xe
10921291 PERF_EVENT_IOC_DISABLE = 0x20002401
10931292 PERF_EVENT_IOC_ENABLE = 0x20002400
10941293 PERF_EVENT_IOC_ID = 0x40082407
1294 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
10951295 PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
10961296 PERF_EVENT_IOC_PERIOD = 0x80082404
1297 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
10971298 PERF_EVENT_IOC_REFRESH = 0x20002402
10981299 PERF_EVENT_IOC_RESET = 0x20002403
10991300 PERF_EVENT_IOC_SET_BPF = 0x80042408
11001301 PERF_EVENT_IOC_SET_FILTER = 0x80082406
11011302 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
1303 PIPEFS_MAGIC = 0x50495045
1304 PPPIOCATTACH = 0x8004743d
1305 PPPIOCATTCHAN = 0x80047438
1306 PPPIOCCONNECT = 0x8004743a
1307 PPPIOCDETACH = 0x8004743c
1308 PPPIOCDISCONN = 0x20007439
1309 PPPIOCGASYNCMAP = 0x40047458
1310 PPPIOCGCHAN = 0x40047437
1311 PPPIOCGDEBUG = 0x40047441
1312 PPPIOCGFLAGS = 0x4004745a
1313 PPPIOCGIDLE = 0x4010743f
1314 PPPIOCGL2TPSTATS = 0x40487436
1315 PPPIOCGMRU = 0x40047453
1316 PPPIOCGNPMODE = 0xc008744c
1317 PPPIOCGRASYNCMAP = 0x40047455
1318 PPPIOCGUNIT = 0x40047456
1319 PPPIOCGXASYNCMAP = 0x40207450
1320 PPPIOCNEWUNIT = 0xc004743e
1321 PPPIOCSACTIVE = 0x80107446
1322 PPPIOCSASYNCMAP = 0x80047457
1323 PPPIOCSCOMPRESS = 0x8010744d
1324 PPPIOCSDEBUG = 0x80047440
1325 PPPIOCSFLAGS = 0x80047459
1326 PPPIOCSMAXCID = 0x80047451
1327 PPPIOCSMRRU = 0x8004743b
1328 PPPIOCSMRU = 0x80047452
1329 PPPIOCSNPMODE = 0x8008744b
1330 PPPIOCSPASS = 0x80107447
1331 PPPIOCSRASYNCMAP = 0x80047454
1332 PPPIOCSXASYNCMAP = 0x8020744f
1333 PPPIOCXFERUNIT = 0x2000744e
11021334 PRIO_PGRP = 0x1
11031335 PRIO_PROCESS = 0x0
11041336 PRIO_USER = 0x2
1337 PROC_SUPER_MAGIC = 0x9fa0
11051338 PROT_EXEC = 0x4
11061339 PROT_GROWSDOWN = 0x1000000
11071340 PROT_GROWSUP = 0x2000000
11441377 PR_GET_PDEATHSIG = 0x2
11451378 PR_GET_SECCOMP = 0x15
11461379 PR_GET_SECUREBITS = 0x1b
1380 PR_GET_SPECULATION_CTRL = 0x34
11471381 PR_GET_THP_DISABLE = 0x2a
11481382 PR_GET_TID_ADDRESS = 0x28
11491383 PR_GET_TIMERSLACK = 0x1e
11861420 PR_SET_NO_NEW_PRIVS = 0x26
11871421 PR_SET_PDEATHSIG = 0x1
11881422 PR_SET_PTRACER = 0x59616d61
1189 PR_SET_PTRACER_ANY = -0x1
1423 PR_SET_PTRACER_ANY = 0xffffffffffffffff
11901424 PR_SET_SECCOMP = 0x16
11911425 PR_SET_SECUREBITS = 0x1c
1426 PR_SET_SPECULATION_CTRL = 0x35
11921427 PR_SET_THP_DISABLE = 0x29
11931428 PR_SET_TIMERSLACK = 0x1d
11941429 PR_SET_TIMING = 0xe
11951430 PR_SET_TSC = 0x1a
11961431 PR_SET_UNALIGN = 0x6
1432 PR_SPEC_DISABLE = 0x4
1433 PR_SPEC_ENABLE = 0x2
1434 PR_SPEC_FORCE_DISABLE = 0x8
1435 PR_SPEC_INDIRECT_BRANCH = 0x1
1436 PR_SPEC_NOT_AFFECTED = 0x0
1437 PR_SPEC_PRCTL = 0x1
1438 PR_SPEC_STORE_BYPASS = 0x0
1439 PR_SVE_GET_VL = 0x33
1440 PR_SVE_SET_VL = 0x32
1441 PR_SVE_SET_VL_ONEXEC = 0x40000
1442 PR_SVE_VL_INHERIT = 0x20000
1443 PR_SVE_VL_LEN_MASK = 0xffff
11971444 PR_TASK_PERF_EVENTS_DISABLE = 0x1f
11981445 PR_TASK_PERF_EVENTS_ENABLE = 0x20
11991446 PR_TIMING_STATISTICAL = 0x0
12021449 PR_TSC_SIGSEGV = 0x2
12031450 PR_UNALIGN_NOPRINT = 0x1
12041451 PR_UNALIGN_SIGBUS = 0x2
1452 PSTOREFS_MAGIC = 0x6165676c
12051453 PTRACE_ATTACH = 0x10
12061454 PTRACE_CONT = 0x7
12071455 PTRACE_DETACH = 0x11
12501498 PTRACE_POKETEXT_3264 = 0xc2
12511499 PTRACE_POKEUSR = 0x6
12521500 PTRACE_SECCOMP_GET_FILTER = 0x420c
1501 PTRACE_SECCOMP_GET_METADATA = 0x420d
12531502 PTRACE_SEIZE = 0x4206
12541503 PTRACE_SETFPREGS = 0xf
12551504 PTRACE_SETOPTIONS = 0x4200
12621511 PTRACE_SINGLESTEP = 0x9
12631512 PTRACE_SYSCALL = 0x18
12641513 PTRACE_TRACEME = 0x0
1514 QNX4_SUPER_MAGIC = 0x2f
1515 QNX6_SUPER_MAGIC = 0x68191122
1516 RAMFS_MAGIC = 0x858458f6
1517 RDTGROUP_SUPER_MAGIC = 0x7655821
1518 REISERFS_SUPER_MAGIC = 0x52654973
1519 RENAME_EXCHANGE = 0x2
1520 RENAME_NOREPLACE = 0x1
1521 RENAME_WHITEOUT = 0x4
12651522 RLIMIT_AS = 0x6
12661523 RLIMIT_CORE = 0x4
12671524 RLIMIT_CPU = 0x0
12781535 RLIMIT_RTTIME = 0xf
12791536 RLIMIT_SIGPENDING = 0xb
12801537 RLIMIT_STACK = 0x3
1281 RLIM_INFINITY = -0x1
1538 RLIM_INFINITY = 0xffffffffffffffff
12821539 RTAX_ADVMSS = 0x8
12831540 RTAX_CC_ALGO = 0x10
12841541 RTAX_CWND = 0x7
1542 RTAX_FASTOPEN_NO_COOKIE = 0x11
12851543 RTAX_FEATURES = 0xc
12861544 RTAX_FEATURE_ALLFRAG = 0x8
12871545 RTAX_FEATURE_ECN = 0x1
12921550 RTAX_INITCWND = 0xb
12931551 RTAX_INITRWND = 0xe
12941552 RTAX_LOCK = 0x1
1295 RTAX_MAX = 0x10
1553 RTAX_MAX = 0x11
12961554 RTAX_MTU = 0x2
12971555 RTAX_QUICKACK = 0xf
12981556 RTAX_REORDERING = 0x9
13031561 RTAX_UNSPEC = 0x0
13041562 RTAX_WINDOW = 0x3
13051563 RTA_ALIGNTO = 0x4
1306 RTA_MAX = 0x1a
1564 RTA_MAX = 0x1d
13071565 RTCF_DIRECTSRC = 0x4000000
13081566 RTCF_DOREDIRECT = 0x1000000
13091567 RTCF_LOG = 0x2000000
13101568 RTCF_MASQ = 0x400000
13111569 RTCF_NAT = 0x800000
13121570 RTCF_VALVE = 0x200000
1571 RTC_AF = 0x20
1572 RTC_AIE_OFF = 0x20007002
1573 RTC_AIE_ON = 0x20007001
1574 RTC_ALM_READ = 0x40247008
1575 RTC_ALM_SET = 0x80247007
1576 RTC_EPOCH_READ = 0x4008700d
1577 RTC_EPOCH_SET = 0x8008700e
1578 RTC_IRQF = 0x80
1579 RTC_IRQP_READ = 0x4008700b
1580 RTC_IRQP_SET = 0x8008700c
1581 RTC_MAX_FREQ = 0x2000
1582 RTC_PF = 0x40
1583 RTC_PIE_OFF = 0x20007006
1584 RTC_PIE_ON = 0x20007005
1585 RTC_PLL_GET = 0x40207011
1586 RTC_PLL_SET = 0x80207012
1587 RTC_RD_TIME = 0x40247009
1588 RTC_SET_TIME = 0x8024700a
1589 RTC_UF = 0x10
1590 RTC_UIE_OFF = 0x20007004
1591 RTC_UIE_ON = 0x20007003
1592 RTC_VL_CLR = 0x20007014
1593 RTC_VL_READ = 0x40047013
1594 RTC_WIE_OFF = 0x20007010
1595 RTC_WIE_ON = 0x2000700f
1596 RTC_WKALM_RD = 0x40287010
1597 RTC_WKALM_SET = 0x8028700f
13131598 RTF_ADDRCLASSMASK = 0xf8000000
13141599 RTF_ADDRCONF = 0x40000
13151600 RTF_ALLONLINK = 0x20000
13441629 RTM_DELACTION = 0x31
13451630 RTM_DELADDR = 0x15
13461631 RTM_DELADDRLABEL = 0x49
1632 RTM_DELCHAIN = 0x65
13471633 RTM_DELLINK = 0x11
13481634 RTM_DELMDB = 0x55
13491635 RTM_DELNEIGH = 0x1d
13641650 RTM_GETADDR = 0x16
13651651 RTM_GETADDRLABEL = 0x4a
13661652 RTM_GETANYCAST = 0x3e
1653 RTM_GETCHAIN = 0x66
13671654 RTM_GETDCB = 0x4e
13681655 RTM_GETLINK = 0x12
13691656 RTM_GETMDB = 0x56
13781665 RTM_GETSTATS = 0x5e
13791666 RTM_GETTCLASS = 0x2a
13801667 RTM_GETTFILTER = 0x2e
1381 RTM_MAX = 0x63
1668 RTM_MAX = 0x67
13821669 RTM_NEWACTION = 0x30
13831670 RTM_NEWADDR = 0x14
13841671 RTM_NEWADDRLABEL = 0x48
13851672 RTM_NEWCACHEREPORT = 0x60
1673 RTM_NEWCHAIN = 0x64
13861674 RTM_NEWLINK = 0x10
13871675 RTM_NEWMDB = 0x54
13881676 RTM_NEWNDUSEROPT = 0x44
13971685 RTM_NEWSTATS = 0x5c
13981686 RTM_NEWTCLASS = 0x28
13991687 RTM_NEWTFILTER = 0x2c
1400 RTM_NR_FAMILIES = 0x15
1401 RTM_NR_MSGTYPES = 0x54
1688 RTM_NR_FAMILIES = 0x16
1689 RTM_NR_MSGTYPES = 0x58
14021690 RTM_SETDCB = 0x4f
14031691 RTM_SETLINK = 0x13
14041692 RTM_SETNEIGHTBL = 0x43
14121700 RTNH_F_UNRESOLVED = 0x20
14131701 RTN_MAX = 0xb
14141702 RTPROT_BABEL = 0x2a
1703 RTPROT_BGP = 0xba
14151704 RTPROT_BIRD = 0xc
14161705 RTPROT_BOOT = 0x3
14171706 RTPROT_DHCP = 0x10
14181707 RTPROT_DNROUTED = 0xd
1708 RTPROT_EIGRP = 0xc0
14191709 RTPROT_GATED = 0x8
1710 RTPROT_ISIS = 0xbb
14201711 RTPROT_KERNEL = 0x2
14211712 RTPROT_MROUTED = 0x11
14221713 RTPROT_MRT = 0xa
14231714 RTPROT_NTK = 0xf
1715 RTPROT_OSPF = 0xbc
14241716 RTPROT_RA = 0x9
14251717 RTPROT_REDIRECT = 0x1
1718 RTPROT_RIP = 0xbd
14261719 RTPROT_STATIC = 0x4
14271720 RTPROT_UNSPEC = 0x0
14281721 RTPROT_XORP = 0xe
14421735 SCM_TIMESTAMPING_OPT_STATS = 0x36
14431736 SCM_TIMESTAMPING_PKTINFO = 0x3a
14441737 SCM_TIMESTAMPNS = 0x23
1738 SCM_TXTIME = 0x3d
14451739 SCM_WIFI_STATUS = 0x29
1740 SC_LOG_FLUSH = 0x100000
14461741 SECCOMP_MODE_DISABLED = 0x0
14471742 SECCOMP_MODE_FILTER = 0x2
14481743 SECCOMP_MODE_STRICT = 0x1
1744 SECURITYFS_MAGIC = 0x73636673
1745 SELINUX_MAGIC = 0xf97cff8c
1746 SFD_CLOEXEC = 0x80000
1747 SFD_NONBLOCK = 0x80
14491748 SHUT_RD = 0x0
14501749 SHUT_RDWR = 0x2
14511750 SHUT_WR = 0x1
14961795 SIOCGMIIPHY = 0x8947
14971796 SIOCGMIIREG = 0x8948
14981797 SIOCGPGRP = 0x40047309
1798 SIOCGPPPCSTATS = 0x89f2
1799 SIOCGPPPSTATS = 0x89f0
1800 SIOCGPPPVER = 0x89f1
14991801 SIOCGRARP = 0x8961
15001802 SIOCGSKNS = 0x894c
15011803 SIOCGSTAMP = 0x8906
15301832 SIOCSPGRP = 0x80047308
15311833 SIOCSRARP = 0x8962
15321834 SIOCWANDEV = 0x894a
1835 SMACK_MAGIC = 0x43415d53
1836 SMART_AUTOSAVE = 0xd2
1837 SMART_AUTO_OFFLINE = 0xdb
1838 SMART_DISABLE = 0xd9
1839 SMART_ENABLE = 0xd8
1840 SMART_HCYL_PASS = 0xc2
1841 SMART_IMMEDIATE_OFFLINE = 0xd4
1842 SMART_LCYL_PASS = 0x4f
1843 SMART_READ_LOG_SECTOR = 0xd5
1844 SMART_READ_THRESHOLDS = 0xd1
1845 SMART_READ_VALUES = 0xd0
1846 SMART_SAVE = 0xd3
1847 SMART_STATUS = 0xda
1848 SMART_WRITE_LOG_SECTOR = 0xd6
1849 SMART_WRITE_THRESHOLDS = 0xd7
1850 SMB_SUPER_MAGIC = 0x517b
1851 SOCKFS_MAGIC = 0x534f434b
15331852 SOCK_CLOEXEC = 0x80000
15341853 SOCK_DCCP = 0x6
15351854 SOCK_DGRAM = 0x1
15661885 SOL_SOCKET = 0xffff
15671886 SOL_TCP = 0x6
15681887 SOL_TIPC = 0x10f
1888 SOL_TLS = 0x11a
15691889 SOL_X25 = 0x106
1890 SOL_XDP = 0x11b
15701891 SOMAXCONN = 0x80
15711892 SO_ACCEPTCONN = 0x1009
15721893 SO_ATTACH_BPF = 0x32
16261947 SO_TIMESTAMP = 0x1d
16271948 SO_TIMESTAMPING = 0x25
16281949 SO_TIMESTAMPNS = 0x23
1950 SO_TXTIME = 0x3d
16291951 SO_TYPE = 0x1008
16301952 SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
16311953 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
16351957 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
16361958 SO_VM_SOCKETS_TRUSTED = 0x5
16371959 SO_WIFI_STATUS = 0x29
1960 SO_ZEROCOPY = 0x3c
16381961 SPLICE_F_GIFT = 0x8
16391962 SPLICE_F_MORE = 0x4
16401963 SPLICE_F_MOVE = 0x1
16411964 SPLICE_F_NONBLOCK = 0x2
1965 SQUASHFS_MAGIC = 0x73717368
1966 STACK_END_MAGIC = 0x57ac6e9d
1967 STATX_ALL = 0xfff
1968 STATX_ATIME = 0x20
1969 STATX_ATTR_APPEND = 0x20
1970 STATX_ATTR_AUTOMOUNT = 0x1000
1971 STATX_ATTR_COMPRESSED = 0x4
1972 STATX_ATTR_ENCRYPTED = 0x800
1973 STATX_ATTR_IMMUTABLE = 0x10
1974 STATX_ATTR_NODUMP = 0x40
1975 STATX_BASIC_STATS = 0x7ff
1976 STATX_BLOCKS = 0x400
1977 STATX_BTIME = 0x800
1978 STATX_CTIME = 0x80
1979 STATX_GID = 0x10
1980 STATX_INO = 0x100
1981 STATX_MODE = 0x2
1982 STATX_MTIME = 0x40
1983 STATX_NLINK = 0x4
1984 STATX_SIZE = 0x200
1985 STATX_TYPE = 0x1
1986 STATX_UID = 0x8
1987 STATX__RESERVED = 0x80000000
1988 SYNC_FILE_RANGE_WAIT_AFTER = 0x4
1989 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
1990 SYNC_FILE_RANGE_WRITE = 0x2
1991 SYSFS_MAGIC = 0x62656572
16421992 S_BLKSIZE = 0x200
16431993 S_IEXEC = 0x40
16441994 S_IFBLK = 0x6000
16762026 TASKSTATS_GENL_NAME = "TASKSTATS"
16772027 TASKSTATS_GENL_VERSION = 0x1
16782028 TASKSTATS_TYPE_MAX = 0x6
1679 TASKSTATS_VERSION = 0x8
2029 TASKSTATS_VERSION = 0x9
16802030 TCFLSH = 0x5407
16812031 TCGETA = 0x5401
16822032 TCGETS = 0x540d
17002050 TCP_DEFER_ACCEPT = 0x9
17012051 TCP_FASTOPEN = 0x17
17022052 TCP_FASTOPEN_CONNECT = 0x1e
2053 TCP_FASTOPEN_KEY = 0x21
2054 TCP_FASTOPEN_NO_COOKIE = 0x22
17032055 TCP_INFO = 0xb
17042056 TCP_KEEPCNT = 0x6
17052057 TCP_KEEPIDLE = 0x4
17092061 TCP_MAXWIN = 0xffff
17102062 TCP_MAX_WINSHIFT = 0xe
17112063 TCP_MD5SIG = 0xe
2064 TCP_MD5SIG_EXT = 0x20
2065 TCP_MD5SIG_FLAG_PREFIX = 0x1
17122066 TCP_MD5SIG_MAXKEYLEN = 0x50
17132067 TCP_MSS = 0x200
17142068 TCP_MSS_DEFAULT = 0x218
17292083 TCP_THIN_DUPACK = 0x11
17302084 TCP_THIN_LINEAR_TIMEOUTS = 0x10
17312085 TCP_TIMESTAMP = 0x18
2086 TCP_ULP = 0x1f
17322087 TCP_USER_TIMEOUT = 0x12
17332088 TCP_WINDOW_CLAMP = 0xa
17342089 TCSAFLUSH = 0x5410
17442099 TCSETSW = 0x540f
17452100 TCSETSW2 = 0x8030542c
17462101 TCXONC = 0x5406
2102 TIMER_ABSTIME = 0x1
17472103 TIOCCBRK = 0x5428
17482104 TIOCCONS = 0x80047478
17492105 TIOCEXCL = 0x740d
17522108 TIOCGETP = 0x7408
17532109 TIOCGEXCL = 0x40045440
17542110 TIOCGICOUNT = 0x5492
2111 TIOCGISO7816 = 0x40285442
17552112 TIOCGLCKTRMIOS = 0x548b
17562113 TIOCGLTC = 0x7474
17572114 TIOCGPGRP = 0x40047477
18082165 TIOCSETN = 0x740a
18092166 TIOCSETP = 0x7409
18102167 TIOCSIG = 0x80045436
2168 TIOCSISO7816 = 0xc0285443
18112169 TIOCSLCKTRMIOS = 0x548c
18122170 TIOCSLTC = 0x7475
18132171 TIOCSPGRP = 0x80047476
18182176 TIOCSTI = 0x5472
18192177 TIOCSWINSZ = 0x80087467
18202178 TIOCVHANGUP = 0x5437
2179 TMPFS_MAGIC = 0x1021994
18212180 TOSTOP = 0x8000
2181 TPACKET_ALIGNMENT = 0x10
2182 TPACKET_HDRLEN = 0x34
2183 TP_STATUS_AVAILABLE = 0x0
2184 TP_STATUS_BLK_TMO = 0x20
2185 TP_STATUS_COPY = 0x2
2186 TP_STATUS_CSUMNOTREADY = 0x8
2187 TP_STATUS_CSUM_VALID = 0x80
2188 TP_STATUS_KERNEL = 0x0
2189 TP_STATUS_LOSING = 0x4
2190 TP_STATUS_SENDING = 0x2
2191 TP_STATUS_SEND_REQUEST = 0x1
2192 TP_STATUS_TS_RAW_HARDWARE = -0x80000000
2193 TP_STATUS_TS_SOFTWARE = 0x20000000
2194 TP_STATUS_TS_SYS_HARDWARE = 0x40000000
2195 TP_STATUS_USER = 0x1
2196 TP_STATUS_VLAN_TPID_VALID = 0x40
2197 TP_STATUS_VLAN_VALID = 0x10
2198 TP_STATUS_WRONG_FORMAT = 0x4
2199 TRACEFS_MAGIC = 0x74726163
18222200 TS_COMM_LEN = 0x20
18232201 TUNATTACHFILTER = 0x801054d5
18242202 TUNDETACHFILTER = 0x801054d6
18302208 TUNGETVNETHDRSZ = 0x400454d7
18312209 TUNGETVNETLE = 0x400454dd
18322210 TUNSETDEBUG = 0x800454c9
2211 TUNSETFILTEREBPF = 0x400454e1
18332212 TUNSETGROUP = 0x800454ce
18342213 TUNSETIFF = 0x800454ca
18352214 TUNSETIFINDEX = 0x800454da
18402219 TUNSETPERSIST = 0x800454cb
18412220 TUNSETQUEUE = 0x800454d9
18422221 TUNSETSNDBUF = 0x800454d4
2222 TUNSETSTEERINGEBPF = 0x400454e0
18432223 TUNSETTXFILTER = 0x800454d1
18442224 TUNSETVNETBE = 0x800454de
18452225 TUNSETVNETHDRSZ = 0x800454d8
18462226 TUNSETVNETLE = 0x800454dc
2227 UBI_IOCATT = 0x80186f40
2228 UBI_IOCDET = 0x80046f41
2229 UBI_IOCEBCH = 0x80044f02
2230 UBI_IOCEBER = 0x80044f01
2231 UBI_IOCEBISMAP = 0x40044f05
2232 UBI_IOCEBMAP = 0x80084f03
2233 UBI_IOCEBUNMAP = 0x80044f04
2234 UBI_IOCMKVOL = 0x80986f00
2235 UBI_IOCRMVOL = 0x80046f01
2236 UBI_IOCRNVOL = 0x91106f03
2237 UBI_IOCRSVOL = 0x800c6f02
2238 UBI_IOCSETVOLPROP = 0x80104f06
2239 UBI_IOCVOLCRBLK = 0x80804f07
2240 UBI_IOCVOLRMBLK = 0x20004f08
2241 UBI_IOCVOLUP = 0x80084f00
2242 UDF_SUPER_MAGIC = 0x15013346
18472243 UMOUNT_NOFOLLOW = 0x8
2244 USBDEVICE_SUPER_MAGIC = 0x9fa2
2245 UTIME_NOW = 0x3fffffff
2246 UTIME_OMIT = 0x3ffffffe
2247 V9FS_MAGIC = 0x1021997
18482248 VDISCARD = 0xd
18492249 VEOF = 0x10
18502250 VEOL = 0x11
18752275 WALL = 0x40000000
18762276 WCLONE = 0x80000000
18772277 WCONTINUED = 0x8
2278 WDIOC_GETBOOTSTATUS = 0x40045702
2279 WDIOC_GETPRETIMEOUT = 0x40045709
2280 WDIOC_GETSTATUS = 0x40045701
2281 WDIOC_GETSUPPORT = 0x40285700
2282 WDIOC_GETTEMP = 0x40045703
2283 WDIOC_GETTIMELEFT = 0x4004570a
2284 WDIOC_GETTIMEOUT = 0x40045707
2285 WDIOC_KEEPALIVE = 0x40045705
2286 WDIOC_SETOPTIONS = 0x40045704
2287 WDIOC_SETPRETIMEOUT = 0xc0045708
2288 WDIOC_SETTIMEOUT = 0xc0045706
18782289 WEXITED = 0x4
2290 WIN_ACKMEDIACHANGE = 0xdb
2291 WIN_CHECKPOWERMODE1 = 0xe5
2292 WIN_CHECKPOWERMODE2 = 0x98
2293 WIN_DEVICE_RESET = 0x8
2294 WIN_DIAGNOSE = 0x90
2295 WIN_DOORLOCK = 0xde
2296 WIN_DOORUNLOCK = 0xdf
2297 WIN_DOWNLOAD_MICROCODE = 0x92
2298 WIN_FLUSH_CACHE = 0xe7
2299 WIN_FLUSH_CACHE_EXT = 0xea
2300 WIN_FORMAT = 0x50
2301 WIN_GETMEDIASTATUS = 0xda
2302 WIN_IDENTIFY = 0xec
2303 WIN_IDENTIFY_DMA = 0xee
2304 WIN_IDLEIMMEDIATE = 0xe1
2305 WIN_INIT = 0x60
2306 WIN_MEDIAEJECT = 0xed
2307 WIN_MULTREAD = 0xc4
2308 WIN_MULTREAD_EXT = 0x29
2309 WIN_MULTWRITE = 0xc5
2310 WIN_MULTWRITE_EXT = 0x39
2311 WIN_NOP = 0x0
2312 WIN_PACKETCMD = 0xa0
2313 WIN_PIDENTIFY = 0xa1
2314 WIN_POSTBOOT = 0xdc
2315 WIN_PREBOOT = 0xdd
2316 WIN_QUEUED_SERVICE = 0xa2
2317 WIN_READ = 0x20
2318 WIN_READDMA = 0xc8
2319 WIN_READDMA_EXT = 0x25
2320 WIN_READDMA_ONCE = 0xc9
2321 WIN_READDMA_QUEUED = 0xc7
2322 WIN_READDMA_QUEUED_EXT = 0x26
2323 WIN_READ_BUFFER = 0xe4
2324 WIN_READ_EXT = 0x24
2325 WIN_READ_LONG = 0x22
2326 WIN_READ_LONG_ONCE = 0x23
2327 WIN_READ_NATIVE_MAX = 0xf8
2328 WIN_READ_NATIVE_MAX_EXT = 0x27
2329 WIN_READ_ONCE = 0x21
2330 WIN_RECAL = 0x10
2331 WIN_RESTORE = 0x10
2332 WIN_SECURITY_DISABLE = 0xf6
2333 WIN_SECURITY_ERASE_PREPARE = 0xf3
2334 WIN_SECURITY_ERASE_UNIT = 0xf4
2335 WIN_SECURITY_FREEZE_LOCK = 0xf5
2336 WIN_SECURITY_SET_PASS = 0xf1
2337 WIN_SECURITY_UNLOCK = 0xf2
2338 WIN_SEEK = 0x70
2339 WIN_SETFEATURES = 0xef
2340 WIN_SETIDLE1 = 0xe3
2341 WIN_SETIDLE2 = 0x97
2342 WIN_SETMULT = 0xc6
2343 WIN_SET_MAX = 0xf9
2344 WIN_SET_MAX_EXT = 0x37
2345 WIN_SLEEPNOW1 = 0xe6
2346 WIN_SLEEPNOW2 = 0x99
2347 WIN_SMART = 0xb0
2348 WIN_SPECIFY = 0x91
2349 WIN_SRST = 0x8
2350 WIN_STANDBY = 0xe2
2351 WIN_STANDBY2 = 0x96
2352 WIN_STANDBYNOW1 = 0xe0
2353 WIN_STANDBYNOW2 = 0x94
2354 WIN_VERIFY = 0x40
2355 WIN_VERIFY_EXT = 0x42
2356 WIN_VERIFY_ONCE = 0x41
2357 WIN_WRITE = 0x30
2358 WIN_WRITEDMA = 0xca
2359 WIN_WRITEDMA_EXT = 0x35
2360 WIN_WRITEDMA_ONCE = 0xcb
2361 WIN_WRITEDMA_QUEUED = 0xcc
2362 WIN_WRITEDMA_QUEUED_EXT = 0x36
2363 WIN_WRITE_BUFFER = 0xe8
2364 WIN_WRITE_EXT = 0x34
2365 WIN_WRITE_LONG = 0x32
2366 WIN_WRITE_LONG_ONCE = 0x33
2367 WIN_WRITE_ONCE = 0x31
2368 WIN_WRITE_SAME = 0xe9
2369 WIN_WRITE_VERIFY = 0x3c
18792370 WNOHANG = 0x1
18802371 WNOTHREAD = 0x20000000
18812372 WNOWAIT = 0x1000000
18852376 XATTR_CREATE = 0x1
18862377 XATTR_REPLACE = 0x2
18872378 XCASE = 0x4
2379 XDP_COPY = 0x2
2380 XDP_FLAGS_DRV_MODE = 0x4
2381 XDP_FLAGS_HW_MODE = 0x8
2382 XDP_FLAGS_MASK = 0xf
2383 XDP_FLAGS_MODES = 0xe
2384 XDP_FLAGS_SKB_MODE = 0x2
2385 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
2386 XDP_MMAP_OFFSETS = 0x1
2387 XDP_PGOFF_RX_RING = 0x0
2388 XDP_PGOFF_TX_RING = 0x80000000
2389 XDP_RX_RING = 0x2
2390 XDP_SHARED_UMEM = 0x1
2391 XDP_STATISTICS = 0x7
2392 XDP_TX_RING = 0x3
2393 XDP_UMEM_COMPLETION_RING = 0x6
2394 XDP_UMEM_FILL_RING = 0x5
2395 XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
2396 XDP_UMEM_PGOFF_FILL_RING = 0x100000000
2397 XDP_UMEM_REG = 0x4
2398 XDP_ZEROCOPY = 0x4
2399 XENFS_SUPER_MAGIC = 0xabba1974
2400 XFS_SUPER_MAGIC = 0x58465342
18882401 XTABS = 0x1800
2402 ZSMALLOC_MAGIC = 0x58295829
18892403 )
18902404
18912405 // Errors
20672581 )
20682582
20692583 // Error table
2070 var errors = [...]string{
2071 1: "operation not permitted",
2072 2: "no such file or directory",
2073 3: "no such process",
2074 4: "interrupted system call",
2075 5: "input/output error",
2076 6: "no such device or address",
2077 7: "argument list too long",
2078 8: "exec format error",
2079 9: "bad file descriptor",
2080 10: "no child processes",
2081 11: "resource temporarily unavailable",
2082 12: "cannot allocate memory",
2083 13: "permission denied",
2084 14: "bad address",
2085 15: "block device required",
2086 16: "device or resource busy",
2087 17: "file exists",
2088 18: "invalid cross-device link",
2089 19: "no such device",
2090 20: "not a directory",
2091 21: "is a directory",
2092 22: "invalid argument",
2093 23: "too many open files in system",
2094 24: "too many open files",
2095 25: "inappropriate ioctl for device",
2096 26: "text file busy",
2097 27: "file too large",
2098 28: "no space left on device",
2099 29: "illegal seek",
2100 30: "read-only file system",
2101 31: "too many links",
2102 32: "broken pipe",
2103 33: "numerical argument out of domain",
2104 34: "numerical result out of range",
2105 35: "no message of desired type",
2106 36: "identifier removed",
2107 37: "channel number out of range",
2108 38: "level 2 not synchronized",
2109 39: "level 3 halted",
2110 40: "level 3 reset",
2111 41: "link number out of range",
2112 42: "protocol driver not attached",
2113 43: "no CSI structure available",
2114 44: "level 2 halted",
2115 45: "resource deadlock avoided",
2116 46: "no locks available",
2117 50: "invalid exchange",
2118 51: "invalid request descriptor",
2119 52: "exchange full",
2120 53: "no anode",
2121 54: "invalid request code",
2122 55: "invalid slot",
2123 56: "file locking deadlock error",
2124 59: "bad font file format",
2125 60: "device not a stream",
2126 61: "no data available",
2127 62: "timer expired",
2128 63: "out of streams resources",
2129 64: "machine is not on the network",
2130 65: "package not installed",
2131 66: "object is remote",
2132 67: "link has been severed",
2133 68: "advertise error",
2134 69: "srmount error",
2135 70: "communication error on send",
2136 71: "protocol error",
2137 73: "RFS specific error",
2138 74: "multihop attempted",
2139 77: "bad message",
2140 78: "file name too long",
2141 79: "value too large for defined data type",
2142 80: "name not unique on network",
2143 81: "file descriptor in bad state",
2144 82: "remote address changed",
2145 83: "can not access a needed shared library",
2146 84: "accessing a corrupted shared library",
2147 85: ".lib section in a.out corrupted",
2148 86: "attempting to link in too many shared libraries",
2149 87: "cannot exec a shared library directly",
2150 88: "invalid or incomplete multibyte or wide character",
2151 89: "function not implemented",
2152 90: "too many levels of symbolic links",
2153 91: "interrupted system call should be restarted",
2154 92: "streams pipe error",
2155 93: "directory not empty",
2156 94: "too many users",
2157 95: "socket operation on non-socket",
2158 96: "destination address required",
2159 97: "message too long",
2160 98: "protocol wrong type for socket",
2161 99: "protocol not available",
2162 120: "protocol not supported",
2163 121: "socket type not supported",
2164 122: "operation not supported",
2165 123: "protocol family not supported",
2166 124: "address family not supported by protocol",
2167 125: "address already in use",
2168 126: "cannot assign requested address",
2169 127: "network is down",
2170 128: "network is unreachable",
2171 129: "network dropped connection on reset",
2172 130: "software caused connection abort",
2173 131: "connection reset by peer",
2174 132: "no buffer space available",
2175 133: "transport endpoint is already connected",
2176 134: "transport endpoint is not connected",
2177 135: "structure needs cleaning",
2178 137: "not a XENIX named type file",
2179 138: "no XENIX semaphores available",
2180 139: "is a named type file",
2181 140: "remote I/O error",
2182 141: "unknown error 141",
2183 142: "unknown error 142",
2184 143: "cannot send after transport endpoint shutdown",
2185 144: "too many references: cannot splice",
2186 145: "connection timed out",
2187 146: "connection refused",
2188 147: "host is down",
2189 148: "no route to host",
2190 149: "operation already in progress",
2191 150: "operation now in progress",
2192 151: "stale file handle",
2193 158: "operation canceled",
2194 159: "no medium found",
2195 160: "wrong medium type",
2196 161: "required key not available",
2197 162: "key has expired",
2198 163: "key has been revoked",
2199 164: "key was rejected by service",
2200 165: "owner died",
2201 166: "state not recoverable",
2202 167: "operation not possible due to RF-kill",
2203 168: "memory page has hardware error",
2204 1133: "disk quota exceeded",
2584 var errorList = [...]struct {
2585 num syscall.Errno
2586 name string
2587 desc string
2588 }{
2589 {1, "EPERM", "operation not permitted"},
2590 {2, "ENOENT", "no such file or directory"},
2591 {3, "ESRCH", "no such process"},
2592 {4, "EINTR", "interrupted system call"},
2593 {5, "EIO", "input/output error"},
2594 {6, "ENXIO", "no such device or address"},
2595 {7, "E2BIG", "argument list too long"},
2596 {8, "ENOEXEC", "exec format error"},
2597 {9, "EBADF", "bad file descriptor"},
2598 {10, "ECHILD", "no child processes"},
2599 {11, "EAGAIN", "resource temporarily unavailable"},
2600 {12, "ENOMEM", "cannot allocate memory"},
2601 {13, "EACCES", "permission denied"},
2602 {14, "EFAULT", "bad address"},
2603 {15, "ENOTBLK", "block device required"},
2604 {16, "EBUSY", "device or resource busy"},
2605 {17, "EEXIST", "file exists"},
2606 {18, "EXDEV", "invalid cross-device link"},
2607 {19, "ENODEV", "no such device"},
2608 {20, "ENOTDIR", "not a directory"},
2609 {21, "EISDIR", "is a directory"},
2610 {22, "EINVAL", "invalid argument"},
2611 {23, "ENFILE", "too many open files in system"},
2612 {24, "EMFILE", "too many open files"},
2613 {25, "ENOTTY", "inappropriate ioctl for device"},
2614 {26, "ETXTBSY", "text file busy"},
2615 {27, "EFBIG", "file too large"},
2616 {28, "ENOSPC", "no space left on device"},
2617 {29, "ESPIPE", "illegal seek"},
2618 {30, "EROFS", "read-only file system"},
2619 {31, "EMLINK", "too many links"},
2620 {32, "EPIPE", "broken pipe"},
2621 {33, "EDOM", "numerical argument out of domain"},
2622 {34, "ERANGE", "numerical result out of range"},
2623 {35, "ENOMSG", "no message of desired type"},
2624 {36, "EIDRM", "identifier removed"},
2625 {37, "ECHRNG", "channel number out of range"},
2626 {38, "EL2NSYNC", "level 2 not synchronized"},
2627 {39, "EL3HLT", "level 3 halted"},
2628 {40, "EL3RST", "level 3 reset"},
2629 {41, "ELNRNG", "link number out of range"},
2630 {42, "EUNATCH", "protocol driver not attached"},
2631 {43, "ENOCSI", "no CSI structure available"},
2632 {44, "EL2HLT", "level 2 halted"},
2633 {45, "EDEADLK", "resource deadlock avoided"},
2634 {46, "ENOLCK", "no locks available"},
2635 {50, "EBADE", "invalid exchange"},
2636 {51, "EBADR", "invalid request descriptor"},
2637 {52, "EXFULL", "exchange full"},
2638 {53, "ENOANO", "no anode"},
2639 {54, "EBADRQC", "invalid request code"},
2640 {55, "EBADSLT", "invalid slot"},
2641 {56, "EDEADLOCK", "file locking deadlock error"},
2642 {59, "EBFONT", "bad font file format"},
2643 {60, "ENOSTR", "device not a stream"},
2644 {61, "ENODATA", "no data available"},
2645 {62, "ETIME", "timer expired"},
2646 {63, "ENOSR", "out of streams resources"},
2647 {64, "ENONET", "machine is not on the network"},
2648 {65, "ENOPKG", "package not installed"},
2649 {66, "EREMOTE", "object is remote"},
2650 {67, "ENOLINK", "link has been severed"},
2651 {68, "EADV", "advertise error"},
2652 {69, "ESRMNT", "srmount error"},
2653 {70, "ECOMM", "communication error on send"},
2654 {71, "EPROTO", "protocol error"},
2655 {73, "EDOTDOT", "RFS specific error"},
2656 {74, "EMULTIHOP", "multihop attempted"},
2657 {77, "EBADMSG", "bad message"},
2658 {78, "ENAMETOOLONG", "file name too long"},
2659 {79, "EOVERFLOW", "value too large for defined data type"},
2660 {80, "ENOTUNIQ", "name not unique on network"},
2661 {81, "EBADFD", "file descriptor in bad state"},
2662 {82, "EREMCHG", "remote address changed"},
2663 {83, "ELIBACC", "can not access a needed shared library"},
2664 {84, "ELIBBAD", "accessing a corrupted shared library"},
2665 {85, "ELIBSCN", ".lib section in a.out corrupted"},
2666 {86, "ELIBMAX", "attempting to link in too many shared libraries"},
2667 {87, "ELIBEXEC", "cannot exec a shared library directly"},
2668 {88, "EILSEQ", "invalid or incomplete multibyte or wide character"},
2669 {89, "ENOSYS", "function not implemented"},
2670 {90, "ELOOP", "too many levels of symbolic links"},
2671 {91, "ERESTART", "interrupted system call should be restarted"},
2672 {92, "ESTRPIPE", "streams pipe error"},
2673 {93, "ENOTEMPTY", "directory not empty"},
2674 {94, "EUSERS", "too many users"},
2675 {95, "ENOTSOCK", "socket operation on non-socket"},
2676 {96, "EDESTADDRREQ", "destination address required"},
2677 {97, "EMSGSIZE", "message too long"},
2678 {98, "EPROTOTYPE", "protocol wrong type for socket"},
2679 {99, "ENOPROTOOPT", "protocol not available"},
2680 {120, "EPROTONOSUPPORT", "protocol not supported"},
2681 {121, "ESOCKTNOSUPPORT", "socket type not supported"},
2682 {122, "ENOTSUP", "operation not supported"},
2683 {123, "EPFNOSUPPORT", "protocol family not supported"},
2684 {124, "EAFNOSUPPORT", "address family not supported by protocol"},
2685 {125, "EADDRINUSE", "address already in use"},
2686 {126, "EADDRNOTAVAIL", "cannot assign requested address"},
2687 {127, "ENETDOWN", "network is down"},
2688 {128, "ENETUNREACH", "network is unreachable"},
2689 {129, "ENETRESET", "network dropped connection on reset"},
2690 {130, "ECONNABORTED", "software caused connection abort"},
2691 {131, "ECONNRESET", "connection reset by peer"},
2692 {132, "ENOBUFS", "no buffer space available"},
2693 {133, "EISCONN", "transport endpoint is already connected"},
2694 {134, "ENOTCONN", "transport endpoint is not connected"},
2695 {135, "EUCLEAN", "structure needs cleaning"},
2696 {137, "ENOTNAM", "not a XENIX named type file"},
2697 {138, "ENAVAIL", "no XENIX semaphores available"},
2698 {139, "EISNAM", "is a named type file"},
2699 {140, "EREMOTEIO", "remote I/O error"},
2700 {141, "EINIT", "unknown error 141"},
2701 {142, "EREMDEV", "unknown error 142"},
2702 {143, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
2703 {144, "ETOOMANYREFS", "too many references: cannot splice"},
2704 {145, "ETIMEDOUT", "connection timed out"},
2705 {146, "ECONNREFUSED", "connection refused"},
2706 {147, "EHOSTDOWN", "host is down"},
2707 {148, "EHOSTUNREACH", "no route to host"},
2708 {149, "EALREADY", "operation already in progress"},
2709 {150, "EINPROGRESS", "operation now in progress"},
2710 {151, "ESTALE", "stale file handle"},
2711 {158, "ECANCELED", "operation canceled"},
2712 {159, "ENOMEDIUM", "no medium found"},
2713 {160, "EMEDIUMTYPE", "wrong medium type"},
2714 {161, "ENOKEY", "required key not available"},
2715 {162, "EKEYEXPIRED", "key has expired"},
2716 {163, "EKEYREVOKED", "key has been revoked"},
2717 {164, "EKEYREJECTED", "key was rejected by service"},
2718 {165, "EOWNERDEAD", "owner died"},
2719 {166, "ENOTRECOVERABLE", "state not recoverable"},
2720 {167, "ERFKILL", "operation not possible due to RF-kill"},
2721 {168, "EHWPOISON", "memory page has hardware error"},
2722 {1133, "EDQUOT", "disk quota exceeded"},
22052723 }
22062724
22072725 // Signal table
2208 var signals = [...]string{
2209 1: "hangup",
2210 2: "interrupt",
2211 3: "quit",
2212 4: "illegal instruction",
2213 5: "trace/breakpoint trap",
2214 6: "aborted",
2215 7: "EMT trap",
2216 8: "floating point exception",
2217 9: "killed",
2218 10: "bus error",
2219 11: "segmentation fault",
2220 12: "bad system call",
2221 13: "broken pipe",
2222 14: "alarm clock",
2223 15: "terminated",
2224 16: "user defined signal 1",
2225 17: "user defined signal 2",
2226 18: "child exited",
2227 19: "power failure",
2228 20: "window changed",
2229 21: "urgent I/O condition",
2230 22: "I/O possible",
2231 23: "stopped (signal)",
2232 24: "stopped",
2233 25: "continued",
2234 26: "stopped (tty input)",
2235 27: "stopped (tty output)",
2236 28: "virtual timer expired",
2237 29: "profiling timer expired",
2238 30: "CPU time limit exceeded",
2239 31: "file size limit exceeded",
2726 var signalList = [...]struct {
2727 num syscall.Signal
2728 name string
2729 desc string
2730 }{
2731 {1, "SIGHUP", "hangup"},
2732 {2, "SIGINT", "interrupt"},
2733 {3, "SIGQUIT", "quit"},
2734 {4, "SIGILL", "illegal instruction"},
2735 {5, "SIGTRAP", "trace/breakpoint trap"},
2736 {6, "SIGABRT", "aborted"},
2737 {7, "SIGEMT", "EMT trap"},
2738 {8, "SIGFPE", "floating point exception"},
2739 {9, "SIGKILL", "killed"},
2740 {10, "SIGBUS", "bus error"},
2741 {11, "SIGSEGV", "segmentation fault"},
2742 {12, "SIGSYS", "bad system call"},
2743 {13, "SIGPIPE", "broken pipe"},
2744 {14, "SIGALRM", "alarm clock"},
2745 {15, "SIGTERM", "terminated"},
2746 {16, "SIGUSR1", "user defined signal 1"},
2747 {17, "SIGUSR2", "user defined signal 2"},
2748 {18, "SIGCHLD", "child exited"},
2749 {19, "SIGPWR", "power failure"},
2750 {20, "SIGWINCH", "window changed"},
2751 {21, "SIGURG", "urgent I/O condition"},
2752 {22, "SIGIO", "I/O possible"},
2753 {23, "SIGSTOP", "stopped (signal)"},
2754 {24, "SIGTSTP", "stopped"},
2755 {25, "SIGCONT", "continued"},
2756 {26, "SIGTTIN", "stopped (tty input)"},
2757 {27, "SIGTTOU", "stopped (tty output)"},
2758 {28, "SIGVTALRM", "virtual timer expired"},
2759 {29, "SIGPROF", "profiling timer expired"},
2760 {30, "SIGXCPU", "CPU time limit exceeded"},
2761 {31, "SIGXFSZ", "file size limit exceeded"},
22402762 }
22
33 // +build mipsle,linux
44
5 // Created by cgo -godefs - DO NOT EDIT
5 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
66 // cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
77
88 package unix
1010 import "syscall"
1111
1212 const (
13 AAFS_MAGIC = 0x5a3c69f0
14 ADFS_SUPER_MAGIC = 0xadf5
15 AFFS_SUPER_MAGIC = 0xadff
16 AFS_FS_MAGIC = 0x6b414653
17 AFS_SUPER_MAGIC = 0x5346414f
1318 AF_ALG = 0x26
1419 AF_APPLETALK = 0x5
1520 AF_ASH = 0x12
5863 AF_VSOCK = 0x28
5964 AF_WANPIPE = 0x19
6065 AF_X25 = 0x9
66 AF_XDP = 0x2c
6167 ALG_OP_DECRYPT = 0x0
6268 ALG_OP_ENCRYPT = 0x1
6369 ALG_SET_AEAD_ASSOCLEN = 0x4
6571 ALG_SET_IV = 0x2
6672 ALG_SET_KEY = 0x1
6773 ALG_SET_OP = 0x3
74 ANON_INODE_FS_MAGIC = 0x9041934
6875 ARPHRD_6LOWPAN = 0x339
6976 ARPHRD_ADAPT = 0x108
7077 ARPHRD_APPLETLK = 0x8
120127 ARPHRD_PPP = 0x200
121128 ARPHRD_PRONET = 0x4
122129 ARPHRD_RAWHDLC = 0x206
130 ARPHRD_RAWIP = 0x207
123131 ARPHRD_ROSE = 0x10e
124132 ARPHRD_RSRVD = 0x104
125133 ARPHRD_SIT = 0x308
131139 ARPHRD_VOID = 0xffff
132140 ARPHRD_VSOCKMON = 0x33a
133141 ARPHRD_X25 = 0x10f
142 AUTOFS_SUPER_MAGIC = 0x187
134143 B0 = 0x0
135144 B1000000 = 0x1008
136145 B110 = 0x3
162171 B75 = 0x2
163172 B921600 = 0x1007
164173 B9600 = 0xd
174 BALLOON_KVM_MAGIC = 0x13661366
175 BDEVFS_MAGIC = 0x62646576
176 BINFMTFS_MAGIC = 0x42494e4d
165177 BLKBSZGET = 0x40041270
166178 BLKBSZSET = 0x80041271
167179 BLKFLSBUF = 0x20001261
186198 BPF_AND = 0x50
187199 BPF_B = 0x10
188200 BPF_DIV = 0x30
201 BPF_FS_MAGIC = 0xcafe4a11
189202 BPF_H = 0x8
190203 BPF_IMM = 0x0
191204 BPF_IND = 0x40
227240 BS0 = 0x0
228241 BS1 = 0x2000
229242 BSDLY = 0x2000
243 BTRFS_SUPER_MAGIC = 0x9123683e
244 BTRFS_TEST_MAGIC = 0x73727279
230245 CAN_BCM = 0x2
231246 CAN_EFF_FLAG = 0x80000000
232247 CAN_EFF_ID_BITS = 0x1d
250265 CBAUD = 0x100f
251266 CBAUDEX = 0x1000
252267 CFLUSH = 0xf
268 CGROUP2_SUPER_MAGIC = 0x63677270
269 CGROUP_SUPER_MAGIC = 0x27e0eb
253270 CIBAUD = 0x100f0000
254271 CLOCAL = 0x800
255272 CLOCK_BOOTTIME = 0x7
292309 CLONE_VFORK = 0x4000
293310 CLONE_VM = 0x100
294311 CMSPAR = 0x40000000
312 CODA_SUPER_MAGIC = 0x73757245
295313 CR0 = 0x0
296314 CR1 = 0x200
297315 CR2 = 0x400
298316 CR3 = 0x600
317 CRAMFS_MAGIC = 0x28cd3d45
299318 CRDLY = 0x600
300319 CREAD = 0x80
301320 CRTSCTS = 0x80000000
310329 CSTOP = 0x13
311330 CSTOPB = 0x40
312331 CSUSP = 0x1a
332 DAXFS_MAGIC = 0x64646178
333 DEBUGFS_MAGIC = 0x64626720
334 DEVPTS_SUPER_MAGIC = 0x1cd1
313335 DT_BLK = 0x6
314336 DT_CHR = 0x2
315337 DT_DIR = 0x4
326348 ECHOKE = 0x800
327349 ECHONL = 0x40
328350 ECHOPRT = 0x400
351 ECRYPTFS_SUPER_MAGIC = 0xf15f
329352 EFD_CLOEXEC = 0x80000
330353 EFD_NONBLOCK = 0x80
331354 EFD_SEMAPHORE = 0x1
355 EFIVARFS_MAGIC = 0xde5e81e4
356 EFS_SUPER_MAGIC = 0x414a53
332357 ENCODING_DEFAULT = 0x0
333358 ENCODING_FM_MARK = 0x3
334359 ENCODING_FM_SPACE = 0x4
389414 ETH_P_DSA = 0x1b
390415 ETH_P_ECONET = 0x18
391416 ETH_P_EDSA = 0xdada
417 ETH_P_ERSPAN = 0x88be
418 ETH_P_ERSPAN2 = 0x22eb
392419 ETH_P_FCOE = 0x8906
393420 ETH_P_FIP = 0x8914
394421 ETH_P_HDLC = 0x19
397424 ETH_P_IEEE802154 = 0xf6
398425 ETH_P_IEEEPUP = 0xa00
399426 ETH_P_IEEEPUPAT = 0xa01
427 ETH_P_IFE = 0xed3e
400428 ETH_P_IP = 0x800
401429 ETH_P_IPV6 = 0x86dd
402430 ETH_P_IPX = 0x8137
407435 ETH_P_LOOP = 0x60
408436 ETH_P_LOOPBACK = 0x9000
409437 ETH_P_MACSEC = 0x88e5
438 ETH_P_MAP = 0xf9
410439 ETH_P_MOBITEX = 0x15
411440 ETH_P_MPLS_MC = 0x8848
412441 ETH_P_MPLS_UC = 0x8847
413442 ETH_P_MVRP = 0x88f5
414443 ETH_P_NCSI = 0x88f8
444 ETH_P_NSH = 0x894f
415445 ETH_P_PAE = 0x888e
416446 ETH_P_PAUSE = 0x8808
417447 ETH_P_PHONET = 0xf5
419449 ETH_P_PPP_DISC = 0x8863
420450 ETH_P_PPP_MP = 0x8
421451 ETH_P_PPP_SES = 0x8864
452 ETH_P_PREAUTH = 0x88c7
422453 ETH_P_PRP = 0x88fb
423454 ETH_P_PUP = 0x200
424455 ETH_P_PUPAT = 0x201
439470 ETH_P_WCCP = 0x883e
440471 ETH_P_X25 = 0x805
441472 ETH_P_XDSA = 0xf8
473 EXABYTE_ENABLE_NEST = 0xf0
474 EXT2_SUPER_MAGIC = 0xef53
475 EXT3_SUPER_MAGIC = 0xef53
476 EXT4_SUPER_MAGIC = 0xef53
442477 EXTA = 0xe
443478 EXTB = 0xf
444479 EXTPROC = 0x10000
480 F2FS_SUPER_MAGIC = 0xf2f52010
445481 FALLOC_FL_COLLAPSE_RANGE = 0x8
446482 FALLOC_FL_INSERT_RANGE = 0x20
447483 FALLOC_FL_KEEP_SIZE = 0x1
462498 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
463499 FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
464500 FS_ENCRYPTION_MODE_INVALID = 0x0
501 FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
502 FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
465503 FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
466504 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
467505 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
475513 FS_POLICY_FLAGS_PAD_8 = 0x1
476514 FS_POLICY_FLAGS_PAD_MASK = 0x3
477515 FS_POLICY_FLAGS_VALID = 0x3
516 FUTEXFS_SUPER_MAGIC = 0xbad1dea
517 F_ADD_SEALS = 0x409
478518 F_DUPFD = 0x0
479519 F_DUPFD_CLOEXEC = 0x406
480520 F_EXLCK = 0x4
487527 F_GETOWN_EX = 0x10
488528 F_GETPIPE_SZ = 0x408
489529 F_GETSIG = 0xb
530 F_GET_FILE_RW_HINT = 0x40d
531 F_GET_RW_HINT = 0x40b
532 F_GET_SEALS = 0x40a
490533 F_LOCK = 0x1
491534 F_NOTIFY = 0x402
492535 F_OFD_GETLK = 0x24
494537 F_OFD_SETLKW = 0x26
495538 F_OK = 0x0
496539 F_RDLCK = 0x0
540 F_SEAL_GROW = 0x4
541 F_SEAL_SEAL = 0x1
542 F_SEAL_SHRINK = 0x2
543 F_SEAL_WRITE = 0x8
497544 F_SETFD = 0x2
498545 F_SETFL = 0x4
499546 F_SETLEASE = 0x400
505552 F_SETOWN_EX = 0xf
506553 F_SETPIPE_SZ = 0x407
507554 F_SETSIG = 0xa
555 F_SET_FILE_RW_HINT = 0x40e
556 F_SET_RW_HINT = 0x40c
508557 F_SHLCK = 0x8
509558 F_TEST = 0x3
510559 F_TLOCK = 0x2
526575 GENL_UNS_ADMIN_PERM = 0x10
527576 GRND_NONBLOCK = 0x1
528577 GRND_RANDOM = 0x2
578 HDIO_DRIVE_CMD = 0x31f
579 HDIO_DRIVE_CMD_AEB = 0x31e
580 HDIO_DRIVE_CMD_HDR_SIZE = 0x4
581 HDIO_DRIVE_HOB_HDR_SIZE = 0x8
582 HDIO_DRIVE_RESET = 0x31c
583 HDIO_DRIVE_TASK = 0x31e
584 HDIO_DRIVE_TASKFILE = 0x31d
585 HDIO_DRIVE_TASK_HDR_SIZE = 0x8
586 HDIO_GETGEO = 0x301
587 HDIO_GET_32BIT = 0x309
588 HDIO_GET_ACOUSTIC = 0x30f
589 HDIO_GET_ADDRESS = 0x310
590 HDIO_GET_BUSSTATE = 0x31a
591 HDIO_GET_DMA = 0x30b
592 HDIO_GET_IDENTITY = 0x30d
593 HDIO_GET_KEEPSETTINGS = 0x308
594 HDIO_GET_MULTCOUNT = 0x304
595 HDIO_GET_NICE = 0x30c
596 HDIO_GET_NOWERR = 0x30a
597 HDIO_GET_QDMA = 0x305
598 HDIO_GET_UNMASKINTR = 0x302
599 HDIO_GET_WCACHE = 0x30e
600 HDIO_OBSOLETE_IDENTITY = 0x307
601 HDIO_SCAN_HWIF = 0x328
602 HDIO_SET_32BIT = 0x324
603 HDIO_SET_ACOUSTIC = 0x32c
604 HDIO_SET_ADDRESS = 0x32f
605 HDIO_SET_BUSSTATE = 0x32d
606 HDIO_SET_DMA = 0x326
607 HDIO_SET_KEEPSETTINGS = 0x323
608 HDIO_SET_MULTCOUNT = 0x321
609 HDIO_SET_NICE = 0x329
610 HDIO_SET_NOWERR = 0x325
611 HDIO_SET_PIO_MODE = 0x327
612 HDIO_SET_QDMA = 0x32e
613 HDIO_SET_UNMASKINTR = 0x322
614 HDIO_SET_WCACHE = 0x32b
615 HDIO_SET_XFER = 0x306
616 HDIO_TRISTATE_HWIF = 0x31b
617 HDIO_UNREGISTER_HWIF = 0x32a
618 HOSTFS_SUPER_MAGIC = 0xc0ffee
619 HPFS_SUPER_MAGIC = 0xf995e849
620 HUGETLBFS_MAGIC = 0x958458f6
529621 HUPCL = 0x400
530622 IBSHIFT = 0x10
531623 ICANON = 0x2
545637 IFA_F_STABLE_PRIVACY = 0x800
546638 IFA_F_TEMPORARY = 0x1
547639 IFA_F_TENTATIVE = 0x40
548 IFA_MAX = 0x8
640 IFA_MAX = 0xa
549641 IFF_ALLMULTI = 0x200
550642 IFF_ATTACH_QUEUE = 0x200
551643 IFF_AUTOMEDIA = 0x4000
560652 IFF_MASTER = 0x400
561653 IFF_MULTICAST = 0x1000
562654 IFF_MULTI_QUEUE = 0x100
655 IFF_NAPI = 0x10
656 IFF_NAPI_FRAGS = 0x20
563657 IFF_NOARP = 0x80
564658 IFF_NOFILTER = 0x1000
565659 IFF_NOTRAILERS = 0x20
622716 IN_OPEN = 0x20
623717 IN_Q_OVERFLOW = 0x4000
624718 IN_UNMOUNT = 0x2000
719 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
625720 IPPROTO_AH = 0x33
626721 IPPROTO_BEETPH = 0x5e
627722 IPPROTO_COMP = 0x6c
669764 IPV6_DONTFRAG = 0x3e
670765 IPV6_DROP_MEMBERSHIP = 0x15
671766 IPV6_DSTOPTS = 0x3b
767 IPV6_FREEBIND = 0x4e
672768 IPV6_HDRINCL = 0x24
673769 IPV6_HOPLIMIT = 0x34
674770 IPV6_HOPOPTS = 0x36
773869 IP_UNICAST_IF = 0x32
774870 IP_XFRM_POLICY = 0x11
775871 ISIG = 0x1
872 ISOFS_SUPER_MAGIC = 0x9660
776873 ISTRIP = 0x20
777874 IUCLC = 0x200
778875 IUTF8 = 0x4000
779876 IXANY = 0x800
780877 IXOFF = 0x1000
781878 IXON = 0x400
879 JFFS2_SUPER_MAGIC = 0x72b6
880 KEXEC_ARCH_386 = 0x30000
881 KEXEC_ARCH_68K = 0x40000
882 KEXEC_ARCH_AARCH64 = 0xb70000
883 KEXEC_ARCH_ARM = 0x280000
884 KEXEC_ARCH_DEFAULT = 0x0
885 KEXEC_ARCH_IA_64 = 0x320000
886 KEXEC_ARCH_MASK = 0xffff0000
887 KEXEC_ARCH_MIPS = 0x80000
888 KEXEC_ARCH_MIPS_LE = 0xa0000
889 KEXEC_ARCH_PPC = 0x140000
890 KEXEC_ARCH_PPC64 = 0x150000
891 KEXEC_ARCH_S390 = 0x160000
892 KEXEC_ARCH_SH = 0x2a0000
893 KEXEC_ARCH_X86_64 = 0x3e0000
894 KEXEC_FILE_NO_INITRAMFS = 0x4
895 KEXEC_FILE_ON_CRASH = 0x2
896 KEXEC_FILE_UNLOAD = 0x1
897 KEXEC_ON_CRASH = 0x1
898 KEXEC_PRESERVE_CONTEXT = 0x2
899 KEXEC_SEGMENT_MAX = 0x10
782900 KEYCTL_ASSUME_AUTHORITY = 0x10
783901 KEYCTL_CHOWN = 0x4
784902 KEYCTL_CLEAR = 0x7
793911 KEYCTL_JOIN_SESSION_KEYRING = 0x1
794912 KEYCTL_LINK = 0x8
795913 KEYCTL_NEGATE = 0xd
914 KEYCTL_PKEY_DECRYPT = 0x1a
915 KEYCTL_PKEY_ENCRYPT = 0x19
916 KEYCTL_PKEY_QUERY = 0x18
917 KEYCTL_PKEY_SIGN = 0x1b
918 KEYCTL_PKEY_VERIFY = 0x1c
796919 KEYCTL_READ = 0xb
797920 KEYCTL_REJECT = 0x13
798921 KEYCTL_RESTRICT_KEYRING = 0x1d
802925 KEYCTL_SETPERM = 0x5
803926 KEYCTL_SET_REQKEY_KEYRING = 0xe
804927 KEYCTL_SET_TIMEOUT = 0xf
928 KEYCTL_SUPPORTS_DECRYPT = 0x2
929 KEYCTL_SUPPORTS_ENCRYPT = 0x1
930 KEYCTL_SUPPORTS_SIGN = 0x4
931 KEYCTL_SUPPORTS_VERIFY = 0x8
805932 KEYCTL_UNLINK = 0x9
806933 KEYCTL_UPDATE = 0x2
807934 KEY_REQKEY_DEFL_DEFAULT = 0x0
843970 MADV_FREE = 0x8
844971 MADV_HUGEPAGE = 0xe
845972 MADV_HWPOISON = 0x64
973 MADV_KEEPONFORK = 0x13
846974 MADV_MERGEABLE = 0xc
847975 MADV_NOHUGEPAGE = 0xf
848976 MADV_NORMAL = 0x0
851979 MADV_SEQUENTIAL = 0x2
852980 MADV_UNMERGEABLE = 0xd
853981 MADV_WILLNEED = 0x3
982 MADV_WIPEONFORK = 0x12
854983 MAP_ANON = 0x800
855984 MAP_ANONYMOUS = 0x800
856985 MAP_DENYWRITE = 0x2000
857986 MAP_EXECUTABLE = 0x4000
858987 MAP_FILE = 0x0
859988 MAP_FIXED = 0x10
989 MAP_FIXED_NOREPLACE = 0x100000
860990 MAP_GROWSDOWN = 0x1000
861991 MAP_HUGETLB = 0x80000
862992 MAP_HUGE_MASK = 0x3f
868998 MAP_PRIVATE = 0x2
869999 MAP_RENAME = 0x800
8701000 MAP_SHARED = 0x1
1001 MAP_SHARED_VALIDATE = 0x3
8711002 MAP_STACK = 0x40000
8721003 MAP_TYPE = 0xf
8731004 MCL_CURRENT = 0x1
8741005 MCL_FUTURE = 0x2
8751006 MCL_ONFAULT = 0x4
1007 MFD_ALLOW_SEALING = 0x2
1008 MFD_CLOEXEC = 0x1
1009 MFD_HUGETLB = 0x4
1010 MFD_HUGE_16GB = -0x78000000
1011 MFD_HUGE_16MB = 0x60000000
1012 MFD_HUGE_1GB = 0x78000000
1013 MFD_HUGE_1MB = 0x50000000
1014 MFD_HUGE_256MB = 0x70000000
1015 MFD_HUGE_2GB = 0x7c000000
1016 MFD_HUGE_2MB = 0x54000000
1017 MFD_HUGE_32MB = 0x64000000
1018 MFD_HUGE_512KB = 0x4c000000
1019 MFD_HUGE_512MB = 0x74000000
1020 MFD_HUGE_64KB = 0x40000000
1021 MFD_HUGE_8MB = 0x5c000000
1022 MFD_HUGE_MASK = 0x3f
1023 MFD_HUGE_SHIFT = 0x1a
1024 MINIX2_SUPER_MAGIC = 0x2468
1025 MINIX2_SUPER_MAGIC2 = 0x2478
1026 MINIX3_SUPER_MAGIC = 0x4d5a
1027 MINIX_SUPER_MAGIC = 0x137f
1028 MINIX_SUPER_MAGIC2 = 0x138f
8761029 MNT_DETACH = 0x2
8771030 MNT_EXPIRE = 0x4
8781031 MNT_FORCE = 0x1
1032 MODULE_INIT_IGNORE_MODVERSIONS = 0x1
1033 MODULE_INIT_IGNORE_VERMAGIC = 0x2
1034 MSDOS_SUPER_MAGIC = 0x4d44
8791035 MSG_BATCH = 0x40000
8801036 MSG_CMSG_CLOEXEC = 0x40000000
8811037 MSG_CONFIRM = 0x800
8971053 MSG_TRYHARD = 0x4
8981054 MSG_WAITALL = 0x100
8991055 MSG_WAITFORONE = 0x10000
1056 MSG_ZEROCOPY = 0x4000000
9001057 MS_ACTIVE = 0x40000000
9011058 MS_ASYNC = 0x1
9021059 MS_BIND = 0x1000
9341091 MS_SYNCHRONOUS = 0x10
9351092 MS_UNBINDABLE = 0x20000
9361093 MS_VERBOSE = 0x8000
1094 MTD_INODE_FS_MAGIC = 0x11307854
9371095 NAME_MAX = 0xff
1096 NCP_SUPER_MAGIC = 0x564c
9381097 NETLINK_ADD_MEMBERSHIP = 0x1
9391098 NETLINK_AUDIT = 0x9
9401099 NETLINK_BROADCAST_ERROR = 0x4
9481107 NETLINK_FIB_LOOKUP = 0xa
9491108 NETLINK_FIREWALL = 0x3
9501109 NETLINK_GENERIC = 0x10
1110 NETLINK_GET_STRICT_CHK = 0xc
9511111 NETLINK_INET_DIAG = 0x4
9521112 NETLINK_IP6_FW = 0xd
9531113 NETLINK_ISCSI = 0x8
9691129 NETLINK_UNUSED = 0x1
9701130 NETLINK_USERSOCK = 0x2
9711131 NETLINK_XFRM = 0x6
1132 NETNSA_MAX = 0x3
1133 NETNSA_NSID_NOT_ASSIGNED = -0x1
1134 NFNETLINK_V0 = 0x0
1135 NFNLGRP_ACCT_QUOTA = 0x8
1136 NFNLGRP_CONNTRACK_DESTROY = 0x3
1137 NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
1138 NFNLGRP_CONNTRACK_EXP_NEW = 0x4
1139 NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
1140 NFNLGRP_CONNTRACK_NEW = 0x1
1141 NFNLGRP_CONNTRACK_UPDATE = 0x2
1142 NFNLGRP_MAX = 0x9
1143 NFNLGRP_NFTABLES = 0x7
1144 NFNLGRP_NFTRACE = 0x9
1145 NFNLGRP_NONE = 0x0
1146 NFNL_BATCH_MAX = 0x1
1147 NFNL_MSG_BATCH_BEGIN = 0x10
1148 NFNL_MSG_BATCH_END = 0x11
1149 NFNL_NFA_NEST = 0x8000
1150 NFNL_SUBSYS_ACCT = 0x7
1151 NFNL_SUBSYS_COUNT = 0xc
1152 NFNL_SUBSYS_CTHELPER = 0x9
1153 NFNL_SUBSYS_CTNETLINK = 0x1
1154 NFNL_SUBSYS_CTNETLINK_EXP = 0x2
1155 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
1156 NFNL_SUBSYS_IPSET = 0x6
1157 NFNL_SUBSYS_NFTABLES = 0xa
1158 NFNL_SUBSYS_NFT_COMPAT = 0xb
1159 NFNL_SUBSYS_NONE = 0x0
1160 NFNL_SUBSYS_OSF = 0x5
1161 NFNL_SUBSYS_QUEUE = 0x3
1162 NFNL_SUBSYS_ULOG = 0x4
1163 NFS_SUPER_MAGIC = 0x6969
1164 NILFS_SUPER_MAGIC = 0x3434
9721165 NL0 = 0x0
9731166 NL1 = 0x100
9741167 NLA_ALIGNTO = 0x4
9961189 NLM_F_EXCL = 0x200
9971190 NLM_F_MATCH = 0x200
9981191 NLM_F_MULTI = 0x2
1192 NLM_F_NONREC = 0x100
9991193 NLM_F_REPLACE = 0x100
10001194 NLM_F_REQUEST = 0x1
10011195 NLM_F_ROOT = 0x100
10021196 NOFLSH = 0x80
1197 NSFS_MAGIC = 0x6e736673
1198 OCFS2_SUPER_MAGIC = 0x7461636f
10031199 OCRNL = 0x8
10041200 OFDEL = 0x80
10051201 OFILL = 0x40
10071203 ONLCR = 0x4
10081204 ONLRET = 0x20
10091205 ONOCR = 0x10
1206 OPENPROM_SUPER_MAGIC = 0x9fa1
10101207 OPOST = 0x1
1208 OVERLAYFS_SUPER_MAGIC = 0x794c7630
10111209 O_ACCMODE = 0x3
10121210 O_APPEND = 0x8
10131211 O_ASYNC = 0x1000
10531251 PACKET_FASTROUTE = 0x6
10541252 PACKET_HDRLEN = 0xb
10551253 PACKET_HOST = 0x0
1254 PACKET_IGNORE_OUTGOING = 0x17
10561255 PACKET_KERNEL = 0x7
10571256 PACKET_LOOPBACK = 0x5
10581257 PACKET_LOSS = 0xe
10921291 PERF_EVENT_IOC_DISABLE = 0x20002401
10931292 PERF_EVENT_IOC_ENABLE = 0x20002400
10941293 PERF_EVENT_IOC_ID = 0x40042407
1294 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b
10951295 PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
10961296 PERF_EVENT_IOC_PERIOD = 0x80082404
1297 PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
10971298 PERF_EVENT_IOC_REFRESH = 0x20002402
10981299 PERF_EVENT_IOC_RESET = 0x20002403
10991300 PERF_EVENT_IOC_SET_BPF = 0x80042408
11001301 PERF_EVENT_IOC_SET_FILTER = 0x80042406
11011302 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
1303 PIPEFS_MAGIC = 0x50495045
1304 PPPIOCATTACH = 0x8004743d
1305 PPPIOCATTCHAN = 0x80047438
1306 PPPIOCCONNECT = 0x8004743a
1307 PPPIOCDETACH = 0x8004743c
1308 PPPIOCDISCONN = 0x20007439
1309 PPPIOCGASYNCMAP = 0x40047458
1310 PPPIOCGCHAN = 0x40047437
1311 PPPIOCGDEBUG = 0x40047441
1312 PPPIOCGFLAGS = 0x4004745a
1313 PPPIOCGIDLE = 0x4008743f
1314 PPPIOCGL2TPSTATS = 0x40487436
1315 PPPIOCGMRU = 0x40047453
1316 PPPIOCGNPMODE = 0xc008744c
1317 PPPIOCGRASYNCMAP = 0x40047455
1318 PPPIOCGUNIT = 0x40047456
1319 PPPIOCGXASYNCMAP = 0x40207450
1320 PPPIOCNEWUNIT = 0xc004743e
1321 PPPIOCSACTIVE = 0x80087446
1322 PPPIOCSASYNCMAP = 0x80047457
1323 PPPIOCSCOMPRESS = 0x800c744d
1324 PPPIOCSDEBUG = 0x80047440
1325 PPPIOCSFLAGS = 0x80047459
1326 PPPIOCSMAXCID = 0x80047451
1327 PPPIOCSMRRU = 0x8004743b
1328 PPPIOCSMRU = 0x80047452
1329 PPPIOCSNPMODE = 0x8008744b
1330 PPPIOCSPASS = 0x80087447
1331 PPPIOCSRASYNCMAP = 0x80047454
1332 PPPIOCSXASYNCMAP = 0x8020744f
1333 PPPIOCXFERUNIT = 0x2000744e
11021334 PRIO_PGRP = 0x1
11031335 PRIO_PROCESS = 0x0
11041336 PRIO_USER = 0x2
1337 PROC_SUPER_MAGIC = 0x9fa0
11051338 PROT_EXEC = 0x4
11061339 PROT_GROWSDOWN = 0x1000000
11071340 PROT_GROWSUP = 0x2000000
11441377 PR_GET_PDEATHSIG = 0x2
11451378 PR_GET_SECCOMP = 0x15
11461379 PR_GET_SECUREBITS = 0x1b
1380 PR_GET_SPECULATION_CTRL = 0x34
11471381 PR_GET_THP_DISABLE = 0x2a
11481382 PR_GET_TID_ADDRESS = 0x28
11491383 PR_GET_TIMERSLACK = 0x1e
11891423 PR_SET_PTRACER_ANY = 0xffffffff
11901424 PR_SET_SECCOMP = 0x16
11911425 PR_SET_SECUREBITS = 0x1c
1426 PR_SET_SPECULATION_CTRL = 0x35
11921427 PR_SET_THP_DISABLE = 0x29
11931428 PR_SET_TIMERSLACK = 0x1d
11941429 PR_SET_TIMING = 0xe
11951430 PR_SET_TSC = 0x1a
11961431 PR_SET_UNALIGN = 0x6
1432 PR_SPEC_DISABLE = 0x4
1433 PR_SPEC_ENABLE = 0x2
1434 PR_SPEC_FORCE_DISABLE = 0x8
1435 PR_SPEC_INDIRECT_BRANCH = 0x1
1436 PR_SPEC_NOT_AFFECTED = 0x0
1437 PR_SPEC_PRCTL = 0x1
1438 PR_SPEC_STORE_BYPASS = 0x0
1439 PR_SVE_GET_VL = 0x33
1440 PR_SVE_SET_VL = 0x32
1441 PR_SVE_SET_VL_ONEXEC = 0x40000
1442 PR_SVE_VL_INHERIT = 0x20000
1443 PR_SVE_VL_LEN_MASK = 0xffff
11971444 PR_TASK_PERF_EVENTS_DISABLE = 0x1f
11981445 PR_TASK_PERF_EVENTS_ENABLE = 0x20
11991446 PR_TIMING_STATISTICAL = 0x0
12021449 PR_TSC_SIGSEGV = 0x2
12031450 PR_UNALIGN_NOPRINT = 0x1
12041451 PR_UNALIGN_SIGBUS = 0x2
1452 PSTOREFS_MAGIC = 0x6165676c
12051453 PTRACE_ATTACH = 0x10
12061454 PTRACE_CONT = 0x7
12071455 PTRACE_DETACH = 0x11
12501498 PTRACE_POKETEXT_3264 = 0xc2
12511499 PTRACE_POKEUSR = 0x6
12521500 PTRACE_SECCOMP_GET_FILTER = 0x420c
1501 PTRACE_SECCOMP_GET_METADATA = 0x420d
12531502 PTRACE_SEIZE = 0x4206
12541503 PTRACE_SETFPREGS = 0xf
12551504 PTRACE_SETOPTIONS = 0x4200
12621511 PTRACE_SINGLESTEP = 0x9
12631512 PTRACE_SYSCALL = 0x18
12641513 PTRACE_TRACEME = 0x0
1514 QNX4_SUPER_MAGIC = 0x2f
1515 QNX6_SUPER_MAGIC = 0x68191122
1516 RAMFS_MAGIC = 0x858458f6
1517 RDTGROUP_SUPER_MAGIC = 0x7655821
1518 REISERFS_SUPER_MAGIC = 0x52654973
1519 RENAME_EXCHANGE = 0x2
1520 RENAME_NOREPLACE = 0x1
1521 RENAME_WHITEOUT = 0x4
12651522 RLIMIT_AS = 0x6
12661523 RLIMIT_CORE = 0x4
12671524 RLIMIT_CPU = 0x0
12781535 RLIMIT_RTTIME = 0xf
12791536 RLIMIT_SIGPENDING = 0xb
12801537 RLIMIT_STACK = 0x3
1281 RLIM_INFINITY = -0x1
1538 RLIM_INFINITY = 0xffffffffffffffff
12821539 RTAX_ADVMSS = 0x8
12831540 RTAX_CC_ALGO = 0x10
12841541 RTAX_CWND = 0x7
1542 RTAX_FASTOPEN_NO_COOKIE = 0x11
12851543 RTAX_FEATURES = 0xc
12861544 RTAX_FEATURE_ALLFRAG = 0x8
12871545 RTAX_FEATURE_ECN = 0x1
12921550 RTAX_INITCWND = 0xb
12931551 RTAX_INITRWND = 0xe
12941552 RTAX_LOCK = 0x1
1295 RTAX_MAX = 0x10
1553 RTAX_MAX = 0x11
12961554 RTAX_MTU = 0x2
12971555 RTAX_QUICKACK = 0xf
12981556 RTAX_REORDERING = 0x9
13031561 RTAX_UNSPEC = 0x0
13041562 RTAX_WINDOW = 0x3
13051563 RTA_ALIGNTO = 0x4
1306 RTA_MAX = 0x1a
1564 RTA_MAX = 0x1d
13071565 RTCF_DIRECTSRC = 0x4000000
13081566 RTCF_DOREDIRECT = 0x1000000
13091567 RTCF_LOG = 0x2000000
13101568 RTCF_MASQ = 0x400000
13111569 RTCF_NAT = 0x800000
13121570 RTCF_VALVE = 0x200000
1571 RTC_AF = 0x20
1572 RTC_AIE_OFF = 0x20007002
1573 RTC_AIE_ON = 0x20007001
1574 RTC_ALM_READ = 0x40247008
1575 RTC_ALM_SET = 0x80247007
1576 RTC_EPOCH_READ = 0x4004700d
1577 RTC_EPOCH_SET = 0x8004700e
1578 RTC_IRQF = 0x80
1579 RTC_IRQP_READ = 0x4004700b
1580 RTC_IRQP_SET = 0x8004700c
1581 RTC_MAX_FREQ = 0x2000
1582 RTC_PF = 0x40
1583 RTC_PIE_OFF = 0x20007006
1584 RTC_PIE_ON = 0x20007005
1585 RTC_PLL_GET = 0x401c7011
1586 RTC_PLL_SET = 0x801c7012
1587 RTC_RD_TIME = 0x40247009
1588 RTC_SET_TIME = 0x8024700a
1589 RTC_UF = 0x10
1590 RTC_UIE_OFF = 0x20007004
1591 RTC_UIE_ON = 0x20007003
1592 RTC_VL_CLR = 0x20007014
1593 RTC_VL_READ = 0x40047013
1594 RTC_WIE_OFF = 0x20007010
1595 RTC_WIE_ON = 0x2000700f
1596 RTC_WKALM_RD = 0x40287010
1597 RTC_WKALM_SET = 0x8028700f
13131598 RTF_ADDRCLASSMASK = 0xf8000000
13141599 RTF_ADDRCONF = 0x40000
13151600 RTF_ALLONLINK = 0x20000
13441629 RTM_DELACTION = 0x31
13451630 RTM_DELADDR = 0x15
13461631 RTM_DELADDRLABEL = 0x49
1632 RTM_DELCHAIN = 0x65
13471633 RTM_DELLINK = 0x11
13481634 RTM_DELMDB = 0x55
13491635 RTM_DELNEIGH = 0x1d
13641650 RTM_GETADDR = 0x16
13651651 RTM_GETADDRLABEL = 0x4a
13661652 RTM_GETANYCAST = 0x3e
1653 RTM_GETCHAIN = 0x66
13671654 RTM_GETDCB = 0x4e
13681655 RTM_GETLINK = 0x12
13691656 RTM_GETMDB = 0x56
13781665 RTM_GETSTATS = 0x5e
13791666 RTM_GETTCLASS = 0x2a
13801667 RTM_GETTFILTER = 0x2e
1381 RTM_MAX = 0x63
1668 RTM_MAX = 0x67
13821669 RTM_NEWACTION = 0x30
13831670 RTM_NEWADDR = 0x14
13841671 RTM_NEWADDRLABEL = 0x48
13851672 RTM_NEWCACHEREPORT = 0x60
1673 RTM_NEWCHAIN = 0x64
13861674 RTM_NEWLINK = 0x10
13871675 RTM_NEWMDB = 0x54
13881676 RTM_NEWNDUSEROPT = 0x44
13971685 RTM_NEWSTATS = 0x5c
13981686 RTM_NEWTCLASS = 0x28
13991687 RTM_NEWTFILTER = 0x2c
1400 RTM_NR_FAMILIES = 0x15
1401 RTM_NR_MSGTYPES = 0x54
1688 RTM_NR_FAMILIES = 0x16
1689 RTM_NR_MSGTYPES = 0x58
14021690 RTM_SETDCB = 0x4f
14031691 RTM_SETLINK = 0x13
14041692 RTM_SETNEIGHTBL = 0x43
14121700 RTNH_F_UNRESOLVED = 0x20
14131701 RTN_MAX = 0xb
14141702 RTPROT_BABEL = 0x2a
1703 RTPROT_BGP = 0xba
14151704 RTPROT_BIRD = 0xc
14161705 RTPROT_BOOT = 0x3
14171706 RTPROT_DHCP = 0x10
14181707 RTPROT_DNROUTED = 0xd
1708 RTPROT_EIGRP = 0xc0
14191709 RTPROT_GATED = 0x8
1710 RTPROT_ISIS = 0xbb
14201711 RTPROT_KERNEL = 0x2
14211712 RTPROT_MROUTED = 0x11
14221713 RTPROT_MRT = 0xa
14231714 RTPROT_NTK = 0xf
1715 RTPROT_OSPF = 0xbc
14241716 RTPROT_RA = 0x9
14251717 RTPROT_REDIRECT = 0x1
1718 RTPROT_RIP = 0xbd
14261719 RTPROT_STATIC = 0x4
14271720 RTPROT_UNSPEC = 0x0
14281721 RTPROT_XORP = 0xe
14421735 SCM_TIMESTAMPING_OPT_STATS = 0x36
14431736 SCM_TIMESTAMPING_PKTINFO = 0x3a
14441737 SCM_TIMESTAMPNS = 0x23
1738 SCM_TXTIME = 0x3d
14451739 SCM_WIFI_STATUS = 0x29
1740 SC_LOG_FLUSH = 0x100000
14461741 SECCOMP_MODE_DISABLED = 0x0
14471742 SECCOMP_MODE_FILTER = 0x2
14481743 SECCOMP_MODE_STRICT = 0x1
1744 SECURITYFS_MAGIC = 0x73636673
1745 SELINUX_MAGIC = 0xf97cff8c
1746 SFD_CLOEXEC = 0x80000
1747 SFD_NONBLOCK = 0x80
14491748 SHUT_RD = 0x0
14501749 SHUT_RDWR = 0x2
14511750 SHUT_WR = 0x1
14961795 SIOCGMIIPHY = 0x8947
14971796 SIOCGMIIREG = 0x8948
14981797 SIOCGPGRP = 0x40047309
1798 SIOCGPPPCSTATS = 0x89f2
1799 SIOCGPPPSTATS = 0x89f0
1800 SIOCGPPPVER = 0x89f1
14991801 SIOCGRARP = 0x8961
15001802 SIOCGSKNS = 0x894c
15011803 SIOCGSTAMP = 0x8906
15301832 SIOCSPGRP = 0x80047308
15311833 SIOCSRARP = 0x8962
15321834 SIOCWANDEV = 0x894a
1835 SMACK_MAGIC = 0x43415d53
1836 SMART_AUTOSAVE = 0xd2
1837 SMART_AUTO_OFFLINE = 0xdb
1838 SMART_DISABLE = 0xd9
1839 SMART_ENABLE = 0xd8
1840 SMART_HCYL_PASS = 0xc2
1841 SMART_IMMEDIATE_OFFLINE = 0xd4
1842 SMART_LCYL_PASS = 0x4f
1843 SMART_READ_LOG_SECTOR = 0xd5
1844 SMART_READ_THRESHOLDS = 0xd1
1845 SMART_READ_VALUES = 0xd0
1846 SMART_SAVE = 0xd3
1847 SMART_STATUS = 0xda
1848 SMART_WRITE_LOG_SECTOR = 0xd6
1849 SMART_WRITE_THRESHOLDS = 0xd7
1850 SMB_SUPER_MAGIC = 0x517b
1851 SOCKFS_MAGIC = 0x534f434b
15331852 SOCK_CLOEXEC = 0x80000
15341853 SOCK_DCCP = 0x6
15351854 SOCK_DGRAM = 0x1
15661885 SOL_SOCKET = 0xffff
15671886 SOL_TCP = 0x6
15681887 SOL_TIPC = 0x10f
1888 SOL_TLS = 0x11a
15691889 SOL_X25 = 0x106
1890 SOL_XDP = 0x11b
15701891 SOMAXCONN = 0x80
15711892 SO_ACCEPTCONN = 0x1009
15721893 SO_ATTACH_BPF = 0x32
16261947 SO_TIMESTAMP = 0x1d
16271948 SO_TIMESTAMPING = 0x25
16281949 SO_TIMESTAMPNS = 0x23
1950 SO_TXTIME = 0x3d
16291951 SO_TYPE = 0x1008
16301952 SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
16311953 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
16351957 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
16361958 SO_VM_SOCKETS_TRUSTED = 0x5
16371959 SO_WIFI_STATUS = 0x29
1960 SO_ZEROCOPY = 0x3c
16381961 SPLICE_F_GIFT = 0x8
16391962 SPLICE_F_MORE = 0x4
16401963 SPLICE_F_MOVE = 0x1
16411964 SPLICE_F_NONBLOCK = 0x2
1965 SQUASHFS_MAGIC = 0x73717368
1966 STACK_END_MAGIC = 0x57ac6e9d
1967 STATX_ALL = 0xfff
1968 STATX_ATIME = 0x20
1969 STATX_ATTR_APPEND = 0x20
1970 STATX_ATTR_AUTOMOUNT = 0x1000
1971 STATX_ATTR_COMPRESSED = 0x4
1972 STATX_ATTR_ENCRYPTED = 0x800
1973 STATX_ATTR_IMMUTABLE = 0x10
1974 STATX_ATTR_NODUMP = 0x40
1975 STATX_BASIC_STATS = 0x7ff
1976 STATX_BLOCKS = 0x400
1977 STATX_BTIME = 0x800
1978 STATX_CTIME = 0x80
1979 STATX_GID = 0x10
1980 STATX_INO = 0x100
1981 STATX_MODE = 0x2
1982 STATX_MTIME = 0x40
1983 STATX_NLINK = 0x4
1984 STATX_SIZE = 0x200
1985 STATX_TYPE = 0x1
1986 STATX_UID = 0x8
1987 STATX__RESERVED = 0x80000000
1988 SYNC_FILE_RANGE_WAIT_AFTER = 0x4
1989 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
1990 SYNC_FILE_RANGE_WRITE = 0x2
1991 SYSFS_MAGIC = 0x62656572
16421992 S_BLKSIZE = 0x200
16431993 S_IEXEC = 0x40
16441994 S_IFBLK = 0x6000
16762026 TASKSTATS_GENL_NAME = "TASKSTATS"
16772027 TASKSTATS_GENL_VERSION = 0x1
16782028 TASKSTATS_TYPE_MAX = 0x6
1679 TASKSTATS_VERSION = 0x8
2029 TASKSTATS_VERSION = 0x9
16802030 TCFLSH = 0x5407
16812031 TCGETA = 0x5401
16822032 TCGETS = 0x540d
17002050 TCP_DEFER_ACCEPT = 0x9
17012051 TCP_FASTOPEN = 0x17
17022052 TCP_FASTOPEN_CONNECT = 0x1e
2053 TCP_FASTOPEN_KEY = 0x21
2054 TCP_FASTOPEN_NO_COOKIE = 0x22
17032055 TCP_INFO = 0xb
17042056 TCP_KEEPCNT = 0x6
17052057 TCP_KEEPIDLE = 0x4
17092061 TCP_MAXWIN = 0xffff
17102062 TCP_MAX_WINSHIFT = 0xe
17112063 TCP_MD5SIG = 0xe
2064 TCP_MD5SIG_EXT = 0x20
2065 TCP_MD5SIG_FLAG_PREFIX = 0x1
17122066 TCP_MD5SIG_MAXKEYLEN = 0x50
17132067 TCP_MSS = 0x200
17142068 TCP_MSS_DEFAULT = 0x218
17292083 TCP_THIN_DUPACK = 0x11
17302084 TCP_THIN_LINEAR_TIMEOUTS = 0x10
17312085 TCP_TIMESTAMP = 0x18
2086 TCP_ULP = 0x1f
17322087 TCP_USER_TIMEOUT = 0x12
17332088 TCP_WINDOW_CLAMP = 0xa
17342089 TCSAFLUSH = 0x5410
17442099 TCSETSW = 0x540f
17452100 TCSETSW2 = 0x8030542c
17462101 TCXONC = 0x5406
2102 TIMER_ABSTIME = 0x1
17472103 TIOCCBRK = 0x5428
17482104 TIOCCONS = 0x80047478
17492105 TIOCEXCL = 0x740d
17522108 TIOCGETP = 0x7408
17532109 TIOCGEXCL = 0x40045440
17542110 TIOCGICOUNT = 0x5492
2111 TIOCGISO7816 = 0x40285442
17552112 TIOCGLCKTRMIOS = 0x548b
17562113 TIOCGLTC = 0x7474
17572114 TIOCGPGRP = 0x40047477
18082165 TIOCSETN = 0x740a
18092166 TIOCSETP = 0x7409
18102167 TIOCSIG = 0x80045436
2168 TIOCSISO7816 = 0xc0285443
18112169 TIOCSLCKTRMIOS = 0x548c
18122170 TIOCSLTC = 0x7475
18132171 TIOCSPGRP = 0x80047476
18182176 TIOCSTI = 0x5472
18192177 TIOCSWINSZ = 0x80087467
18202178 TIOCVHANGUP = 0x5437
2179 TMPFS_MAGIC = 0x1021994
18212180 TOSTOP = 0x8000
2181 TPACKET_ALIGNMENT = 0x10
2182 TPACKET_HDRLEN = 0x34
2183 TP_STATUS_AVAILABLE = 0x0
2184 TP_STATUS_BLK_TMO = 0x20
2185 TP_STATUS_COPY = 0x2
2186 TP_STATUS_CSUMNOTREADY = 0x8
2187 TP_STATUS_CSUM_VALID = 0x80
2188 TP_STATUS_KERNEL = 0x0
2189 TP_STATUS_LOSING = 0x4
2190 TP_STATUS_SENDING = 0x2
2191 TP_STATUS_SEND_REQUEST = 0x1
2192 TP_STATUS_TS_RAW_HARDWARE = -0x80000000
2193 TP_STATUS_TS_SOFTWARE = 0x20000000
2194 TP_STATUS_TS_SYS_HARDWARE = 0x40000000
2195 TP_STATUS_USER = 0x1
2196 TP_STATUS_VLAN_TPID_VALID = 0x40
2197 TP_STATUS_VLAN_VALID = 0x10
2198 TP_STATUS_WRONG_FORMAT = 0x4
2199 TRACEFS_MAGIC = 0x74726163
18222200 TS_COMM_LEN = 0x20
18232201 TUNATTACHFILTER = 0x800854d5
18242202 TUNDETACHFILTER = 0x800854d6
18302208 TUNGETVNETHDRSZ = 0x400454d7
18312209 TUNGETVNETLE = 0x400454dd
18322210 TUNSETDEBUG = 0x800454c9
2211 TUNSETFILTEREBPF = 0x400454e1
18332212 TUNSETGROUP = 0x800454ce
18342213 TUNSETIFF = 0x800454ca
18352214 TUNSETIFINDEX = 0x800454da
18402219 TUNSETPERSIST = 0x800454cb
18412220 TUNSETQUEUE = 0x800454d9
18422221 TUNSETSNDBUF = 0x800454d4
2222 TUNSETSTEERINGEBPF = 0x400454e0
18432223 TUNSETTXFILTER = 0x800454d1
18442224 TUNSETVNETBE = 0x800454de
18452225 TUNSETVNETHDRSZ = 0x800454d8
18462226 TUNSETVNETLE = 0x800454dc
2227 UBI_IOCATT = 0x80186f40
2228 UBI_IOCDET = 0x80046f41
2229 UBI_IOCEBCH = 0x80044f02
2230 UBI_IOCEBER = 0x80044f01
2231 UBI_IOCEBISMAP = 0x40044f05
2232 UBI_IOCEBMAP = 0x80084f03
2233 UBI_IOCEBUNMAP = 0x80044f04
2234 UBI_IOCMKVOL = 0x80986f00
2235 UBI_IOCRMVOL = 0x80046f01
2236 UBI_IOCRNVOL = 0x91106f03
2237 UBI_IOCRSVOL = 0x800c6f02
2238 UBI_IOCSETVOLPROP = 0x80104f06
2239 UBI_IOCVOLCRBLK = 0x80804f07
2240 UBI_IOCVOLRMBLK = 0x20004f08
2241 UBI_IOCVOLUP = 0x80084f00
2242 UDF_SUPER_MAGIC = 0x15013346
18472243 UMOUNT_NOFOLLOW = 0x8
2244 USBDEVICE_SUPER_MAGIC = 0x9fa2
2245 UTIME_NOW = 0x3fffffff
2246 UTIME_OMIT = 0x3ffffffe
2247 V9FS_MAGIC = 0x1021997
18482248 VDISCARD = 0xd
18492249 VEOF = 0x10
18502250 VEOL = 0x11
18752275 WALL = 0x40000000
18762276 WCLONE = 0x80000000
18772277 WCONTINUED = 0x8
2278 WDIOC_GETBOOTSTATUS = 0x40045702
2279 WDIOC_GETPRETIMEOUT = 0x40045709
2280 WDIOC_GETSTATUS = 0x40045701
2281 WDIOC_GETSUPPORT = 0x40285700
2282 WDIOC_GETTEMP = 0x40045703
2283 WDIOC_GETTIMELEFT = 0x4004570a
2284 WDIOC_GETTIMEOUT = 0x40045707
2285 WDIOC_KEEPALIVE = 0x40045705
2286 WDIOC_SETOPTIONS = 0x40045704
2287 WDIOC_SETPRETIMEOUT = 0xc0045708
2288 WDIOC_SETTIMEOUT = 0xc0045706
18782289 WEXITED = 0x4
2290 WIN_ACKMEDIACHANGE = 0xdb
2291 WIN_CHECKPOWERMODE1 = 0xe5
2292 WIN_CHECKPOWERMODE2 = 0x98
2293 WIN_DEVICE_RESET = 0x8
2294 WIN_DIAGNOSE = 0x90
2295 WIN_DOORLOCK = 0xde
2296 WIN_DOORUNLOCK = 0xdf
2297 WIN_DOWNLOAD_MICROCODE = 0x92
2298 WIN_FLUSH_CACHE = 0xe7
2299 WIN_FLUSH_CACHE_EXT = 0xea
2300 WIN_FORMAT = 0x50
2301 WIN_GETMEDIASTATUS = 0xda
2302 WIN_IDENTIFY = 0xec
2303 WIN_IDENTIFY_DMA = 0xee
2304 WIN_IDLEIMMEDIATE = 0xe1
2305 WIN_INIT = 0x60
2306 WIN_MEDIAEJECT = 0xed
2307 WIN_MULTREAD = 0xc4
2308 WIN_MULTREAD_EXT = 0x29
2309 WIN_MULTWRITE = 0xc5
2310 WIN_MULTWRITE_EXT = 0x39
2311 WIN_NOP = 0x0
2312 WIN_PACKETCMD = 0xa0
2313 WIN_PIDENTIFY = 0xa1
2314 WIN_POSTBOOT = 0xdc
2315 WIN_PREBOOT = 0xdd
2316 WIN_QUEUED_SERVICE = 0xa2
2317 WIN_READ = 0x20
2318 WIN_READDMA = 0xc8
2319 WIN_READDMA_EXT = 0x25
2320 WIN_READDMA_ONCE = 0xc9
2321 WIN_READDMA_QUEUED = 0xc7
2322 WIN_READDMA_QUEUED_EXT = 0x26
2323 WIN_READ_BUFFER = 0xe4
2324 WIN_READ_EXT = 0x24
2325 WIN_READ_LONG = 0x22
2326 WIN_READ_LONG_ONCE = 0x23
2327 WIN_READ_NATIVE_MAX = 0xf8
2328 WIN_READ_NATIVE_MAX_EXT = 0x27
2329 WIN_READ_ONCE = 0x21
2330 WIN_RECAL = 0x10
2331 WIN_RESTORE = 0x10
2332 WIN_SECURITY_DISABLE = 0xf6
2333 WIN_SECURITY_ERASE_PREPARE = 0xf3
2334 WIN_SECURITY_ERASE_UNIT = 0xf4
2335 WIN_SECURITY_FREEZE_LOCK = 0xf5
2336 WIN_SECURITY_SET_PASS = 0xf1
2337 WIN_SECURITY_UNLOCK = 0xf2
2338 WIN_SEEK = 0x70
2339 WIN_SETFEATURES = 0xef
2340 WIN_SETIDLE1 = 0xe3
2341 WIN_SETIDLE2 = 0x97
2342 WIN_SETMULT = 0xc6
2343 WIN_SET_MAX = 0xf9
2344 WIN_SET_MAX_EXT = 0x37
2345 WIN_SLEEPNOW1 = 0xe6
2346 WIN_SLEEPNOW2 = 0x99
2347 WIN_SMART = 0xb0
2348 WIN_SPECIFY = 0x91
2349 WIN_SRST = 0x8
2350 WIN_STANDBY = 0xe2
2351 WIN_STANDBY2 = 0x96
2352 WIN_STANDBYNOW1 = 0xe0
2353 WIN_STANDBYNOW2 = 0x94
2354 WIN_VERIFY = 0x40
2355 WIN_VERIFY_EXT = 0x42
2356 WIN_VERIFY_ONCE = 0x41
2357 WIN_WRITE = 0x30
2358 WIN_WRITEDMA = 0xca
2359 WIN_WRITEDMA_EXT = 0x35
2360 WIN_WRITEDMA_ONCE = 0xcb
2361 WIN_WRITEDMA_QUEUED = 0xcc
2362 WIN_WRITEDMA_QUEUED_EXT = 0x36
2363 WIN_WRITE_BUFFER = 0xe8
2364 WIN_WRITE_EXT = 0x34
2365 WIN_WRITE_LONG = 0x32
2366 WIN_WRITE_LONG_ONCE = 0x33
2367 WIN_WRITE_ONCE = 0x31
2368 WIN_WRITE_SAME = 0xe9
2369 WIN_WRITE_VERIFY = 0x3c
18792370 WNOHANG = 0x1
18802371 WNOTHREAD = 0x20000000
18812372 WNOWAIT = 0x1000000
18852376 XATTR_CREATE = 0x1
18862377 XATTR_REPLACE = 0x2
18872378 XCASE = 0x4
2379 XDP_COPY = 0x2
2380 XDP_FLAGS_DRV_MODE = 0x4
2381 XDP_FLAGS_HW_MODE = 0x8
2382 XDP_FLAGS_MASK = 0xf
2383 XDP_FLAGS_MODES = 0xe
2384 XDP_FLAGS_SKB_MODE = 0x2
2385 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
2386 XDP_MMAP_OFFSETS = 0x1
2387 XDP_PGOFF_RX_RING = 0x0
2388 XDP_PGOFF_TX_RING = 0x80000000
2389 XDP_RX_RING = 0x2
2390 XDP_SHARED_UMEM = 0x1
2391 XDP_STATISTICS = 0x7
2392 XDP_TX_RING = 0x3
2393 XDP_UMEM_COMPLETION_RING = 0x6
2394 XDP_UMEM_FILL_RING = 0x5
2395 XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
2396 XDP_UMEM_PGOFF_FILL_RING = 0x100000000
2397 XDP_UMEM_REG = 0x4
2398 XDP_ZEROCOPY = 0x4
2399 XENFS_SUPER_MAGIC = 0xabba1974
2400 XFS_SUPER_MAGIC = 0x58465342
18882401 XTABS = 0x1800
2402 ZSMALLOC_MAGIC = 0x58295829
18892403 )
18902404
18912405 // Errors
20672581 )
20682582
20692583 // Error table
2070 var errors = [...]string{
2071 1: "operation not permitted",
2072 2: "no such file or directory",
2073 3: "no such process",
2074 4: "interrupted system call",
2075 5: "input/output error",
2076 6: "no such device or address",
2077 7: "argument list too long",
2078 8: "exec format error",
2079 9: "bad file descriptor",
2080 10: "no child processes",
2081 11: "resource temporarily unavailable",
2082 12: "cannot allocate memory",
2083 13: "permission denied",
2084 14: "bad address",
2085 15: "block device required",
2086 16: "device or resource busy",
2087 17: "file exists",
2088 18: "invalid cross-device link",
2089 19: "no such device",
2090 20: "not a directory",
2091 21: "is a directory",
2092 22: "invalid argument",
2093 23: "too many open files in system",
2094 24: "too many open files",
2095 25: "inappropriate ioctl for device",
2096 26: "text file busy",
2097 27: "file too large",
2098 28: "no space left on device",
2099 29: "illegal seek",
2100 30: "read-only file system",
2101 31: "too many links",
2102 32: "broken pipe",
2103 33: "numerical argument out of domain",
2104 34: "numerical result out of range",
2105 35: "no message of desired type",
2106 36: "identifier removed",
2107 37: "channel number out of range",
2108 38: "level 2 not synchronized",
2109 39: "level 3 halted",
2110 40: "level 3 reset",
2111 41: "link number out of range",
2112 42: "protocol driver not attached",
2113 43: "no CSI structure available",
2114 44: "level 2 halted",
2115 45: "resource deadlock avoided",
2116 46: "no locks available",
2117 50: "invalid exchange",
2118 51: "invalid request descriptor",
2119 52: "exchange full",
2120 53: "no anode",
2121 54: "invalid request code",
2122 55: "invalid slot",
2123 56: "file locking deadlock error",
2124 59: "bad font file format",
2125 60: "device not a stream",
2126 61: "no data available",
2127 62: "timer expired",
2128 63: "out of streams resources",
2129 64: "machine is not on the network",
2130 65: "package not installed",
2131 66: "object is remote",
2132 67: "link has been severed",
2133 68: "advertise error",
2134 69: "srmount error",
2135 70: "communication error on send",
2136 71: "protocol error",
2137 73: "RFS specific error",
2138 74: "multihop attempted",
2139 77: "bad message",
2140 78: "file name too long",
2141 79: "value too large for defined data type",
2142 80: "name not unique on network",
2143 81: "file descriptor in bad state",
2144 82: "remote address changed",
2145 83: "can not access a needed shared library",
2146 84: "accessing a corrupted shared library",
2147 85: ".lib section in a.out corrupted",
2148 86: "attempting to link in too many shared libraries",
2149 87: "cannot exec a shared library directly",
2150 88: "invalid or incomplete multibyte or wide character",
2151 89: "function not implemented",
2152 90: "too many levels of symbolic links",
2153 91: "interrupted system call should be restarted",
2154 92: "streams pipe error",
2155 93: "directory not empty",
2156 94: "too many users",
2157 95: "socket operation on non-socket",
2158 96: "destination address required",
2159 97: "message too long",
2160 98: "protocol wrong type for socket",
2161 99: "protocol not available",
2162 120: "protocol not supported",
2163 121: "socket type not supported",
2164 122: "operation not supported",
2165 123: "protocol family not supported",
2166 124: "address family not supported by protocol",
2167 125: "address already in use",
2168 126: "cannot assign requested address",
2169 127: "network is down",
2170 128: "network is unreachable",
2171 129: "network dropped connection on reset",
2172 130: "software caused connection abort",
2173 131: "connection reset by peer",
2174 132: "no buffer space available",
2175 133: "transport endpoint is already connected",
2176 134: "transport endpoint is not connected",
2177 135: "structure needs cleaning",
2178 137: "not a XENIX named type file",
2179 138: "no XENIX semaphores available",
2180 139: "is a named type file",
2181 140: "remote I/O error",
2182 141: "unknown error 141",
2183 142: "unknown error 142",
2184 143: "cannot send after transport endpoint shutdown",
2185 144: "too many references: cannot splice",
2186 145: "connection timed out",
2187 146: "connection refused",
2188 147: "host is down",
2189 148: "no route to host",
2190 149: "operation already in progress",
2191 150: "operation now in progress",
2192 151: "stale file handle",
2193 158: "operation canceled",
2194 159: "no medium found",
2195 160: "wrong medium type",
2196 161: "required key not available",
2197 162: "key has expired",
2198 163: "key has been revoked",
2199 164: "key was rejected by service",
2200 165: "owner died",
2201 166: "state not recoverable",
2202 167: "operation not possible due to RF-kill",
2203 168: "memory page has hardware error",
2204 1133: "disk quota exceeded",
2584 var errorList = [...]struct {
2585 num syscall.Errno
2586 name string
2587 desc string
2588 }{
2589 {1, "EPERM", "operation not permitted"},
2590 {2, "ENOENT", "no such file or directory"},
2591 {3, "ESRCH", "no such process"},
2592 {4, "EINTR", "interrupted system call"},
2593 {5, "EIO", "input/output error"},
2594 {6, "ENXIO", "no such device or address"},
2595 {7, "E2BIG", "argument list too long"},
2596 {8, "ENOEXEC", "exec format error"},
2597 {9, "EBADF", "bad file descriptor"},
2598 {10, "ECHILD", "no child processes"},
2599 {11, "EAGAIN", "resource temporarily unavailable"},
2600 {12, "ENOMEM", "cannot allocate memory"},
2601 {13, "EACCES", "permission denied"},
2602 {14, "EFAULT", "bad address"},
2603 {15, "ENOTBLK", "block device required"},
2604 {16, "EBUSY", "device or resource busy"},
2605 {17, "EEXIST", "file exists"},
2606 {18, "EXDEV", "invalid cross-device link"},
2607 {19, "ENODEV", "no such device"},
2608 {20, "ENOTDIR", "not a directory"},
2609 {21, "EISDIR", "is a directory"},
2610 {22, "EINVAL", "invalid argument"},
2611 {23, "ENFILE", "too many open files in system"},
2612 {24, "EMFILE", "too many open files"},
2613 {25, "ENOTTY", "inappropriate ioctl for device"},
2614 {26, "ETXTBSY", "text file busy"},
2615 {27, "EFBIG", "file too large"},
2616 {28, "ENOSPC", "no space left on device"},
2617 {29, "ESPIPE", "illegal seek"},
2618 {30, "EROFS", "read-only file system"},
2619 {31, "EMLINK", "too many links"},
2620 {32, "EPIPE", "broken pipe"},
2621 {33, "EDOM", "numerical argument out of domain"},
2622 {34, "ERANGE", "numerical result out of range"},
2623 {35, "ENOMSG", "no message of desired type"},
2624 {36, "EIDRM", "identifier removed"},
2625 {37, "ECHRNG", "channel number out of range"},
2626 {38, "EL2NSYNC", "level 2 not synchronized"},
2627 {39, "EL3HLT", "level 3 halted"},
2628 {40, "EL3RST", "level 3 reset"},
2629 {41, "ELNRNG", "link number out of range"},
2630 {42, "EUNATCH", "protocol driver not attached"},
2631 {43, "ENOCSI", "no CSI structure available"},
2632 {44, "EL2HLT", "level 2 halted"},
2633 {45, "EDEADLK", "resource deadlock avoided"},
2634 {46, "ENOLCK", "no locks available"},
2635 {50, "EBADE", "invalid exchange"},
2636 {51, "EBADR", "invalid request descriptor"},
2637 {52, "EXFULL", "exchange full"},
2638 {53, "ENOANO", "no anode"},
2639 {54, "EBADRQC", "invalid request code"},
2640 {55, "EBADSLT", "invalid slot"},
2641 {56, "EDEADLOCK", "file locking deadlock error"},
2642 {59, "EBFONT", "bad font file format"},
2643 {60, "ENOSTR", "device not a stream"},
2644 {61, "ENODATA", "no data available"},
2645 {62, "ETIME", "timer expired"},
2646 {63, "ENOSR", "out of streams resources"},
2647 {64, "ENONET", "machine is not on the network"},
2648 {65, "ENOPKG", "package not installed"},
2649 {66, "EREMOTE", "object is remote"},
2650 {67, "ENOLINK", "link has been severed"},
2651 {68, "EADV", "advertise error"},
2652 {69, "ESRMNT", "srmount error"},
2653 {70, "ECOMM", "communication error on send"},
2654 {71, "EPROTO", "protocol error"},
2655 {73, "EDOTDOT", "RFS specific error"},
2656 {74, "EMULTIHOP", "multihop attempted"},
2657 {77, "EBADMSG", "bad message"},
2658 {78, "ENAMETOOLONG", "file name too long"},
2659 {79, "EOVERFLOW", "value too large for defined data type"},
2660 {80, "ENOTUNIQ", "name not unique on network"},
2661 {81, "EBADFD", "file descriptor in bad state"},
2662 {82, "EREMCHG", "remote address changed"},
2663 {83, "ELIBACC", "can not access a needed shared library"},
2664 {84, "ELIBBAD", "accessing a corrupted shared library"},
2665 {85, "ELIBSCN", ".lib section in a.out corrupted"},
2666 {86, "ELIBMAX", "attempting to link in too many shared libraries"},
2667 {87, "ELIBEXEC", "cannot exec a shared library directly"},
2668 {88, "EILSEQ", "invalid or incomplete multibyte or wide character"},
2669 {89, "ENOSYS", "function not implemented"},
2670 {90, "ELOOP", "too many levels of symbolic links"},
2671 {91, "ERESTART", "interrupted system call should be restarted"},
2672 {92, "ESTRPIPE", "streams pipe error"},
2673 {93, "ENOTEMPTY", "directory not empty"},
2674 {94, "EUSERS", "too many users"},
2675 {95, "ENOTSOCK", "socket operation on non-socket"},
2676 {96, "EDESTADDRREQ", "destination address required"},
2677 {97, "EMSGSIZE", "message too long"},
2678 {98, "EPROTOTYPE", "protocol wrong type for socket"},
2679 {99, "ENOPROTOOPT", "protocol not available"},
2680 {120, "EPROTONOSUPPORT", "protocol not supported"},
2681 {121, "ESOCKTNOSUPPORT", "socket type not supported"},
2682 {122, "ENOTSUP", "operation not supported"},
2683 {123, "EPFNOSUPPORT", "protocol family not supported"},
2684 {124, "EAFNOSUPPORT", "address family not supported by protocol"},
2685 {125, "EADDRINUSE", "address already in use"},
2686 {126, "EADDRNOTAVAIL", "cannot assign requested address"},
2687 {127, "ENETDOWN", "network is down"},
2688 {128, "ENETUNREACH", "network is unreachable"},
2689 {129, "ENETRESET", "network dropped connection on reset"},
2690 {130, "ECONNABORTED", "software caused connection abort"},
2691 {131, "ECONNRESET", "connection reset by peer"},
2692 {132, "ENOBUFS", "no buffer space available"},
2693 {133, "EISCONN", "transport endpoint is already connected"},
2694 {134, "ENOTCONN", "transport endpoint is not connected"},
2695 {135, "EUCLEAN", "structure needs cleaning"},
2696 {137, "ENOTNAM", "not a XENIX named type file"},
2697 {138, "ENAVAIL", "no XENIX semaphores available"},
2698 {139, "EISNAM", "is a named type file"},
2699 {140, "EREMOTEIO", "remote I/O error"},
2700 {141, "EINIT", "unknown error 141"},
2701 {142, "EREMDEV", "unknown error 142"},
2702 {143, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
2703 {144, "ETOOMANYREFS", "too many references: cannot splice"},
2704 {145, "ETIMEDOUT", "connection timed out"},
2705 {146, "ECONNREFUSED", "connection refused"},
2706 {147, "EHOSTDOWN", "host is down"},
2707 {148, "EHOSTUNREACH", "no route to host"},
2708 {149, "EALREADY", "operation already in progress"},
2709 {150, "EINPROGRESS", "operation now in progress"},
2710 {151, "ESTALE", "stale file handle"},
2711 {158, "ECANCELED", "operation canceled"},
2712 {159, "ENOMEDIUM", "no medium found"},
2713 {160, "EMEDIUMTYPE", "wrong medium type"},
2714 {161, "ENOKEY", "required key not available"},
2715 {162, "EKEYEXPIRED", "key has expired"},
2716 {163, "EKEYREVOKED", "key has been revoked"},
2717 {164, "EKEYREJECTED", "key was rejected by service"},
2718 {165, "EOWNERDEAD", "owner died"},
2719 {166, "ENOTRECOVERABLE", "state not recoverable"},
2720 {167, "ERFKILL", "operation not possible due to RF-kill"},
2721 {168, "EHWPOISON", "memory page has hardware error"},
2722 {1133, "EDQUOT", "disk quota exceeded"},
22052723 }
22062724
22072725 // Signal table
2208 var signals = [...]string{
2209 1: "hangup",
2210 2: "interrupt",
2211 3: "quit",
2212 4: "illegal instruction",
2213 5: "trace/breakpoint trap",
2214 6: "aborted",
2215 7: "EMT trap",
2216 8: "floating point exception",
2217 9: "killed",
2218 10: "bus error",
2219 11: "segmentation fault",
2220 12: "bad system call",
2221 13: "broken pipe",
2222 14: "alarm clock",
2223 15: "terminated",
2224 16: "user defined signal 1",
2225 17: "user defined signal 2",
2226 18: "child exited",
2227 19: "power failure",
2228 20: "window changed",
2229 21: "urgent I/O condition",
2230 22: "I/O possible",
2231 23: "stopped (signal)",
2232 24: "stopped",
2233 25: "continued",
2234 26: "stopped (tty input)",
2235 27: "stopped (tty output)",
2236 28: "virtual timer expired",
2237 29: "profiling timer expired",
2238 30: "CPU time limit exceeded",
2239 31: "file size limit exceeded",
2726 var signalList = [...]struct {
2727 num syscall.Signal
2728 name string
2729 desc string
2730 }{
2731 {1, "SIGHUP", "hangup"},
2732 {2, "SIGINT", "interrupt"},
2733 {3, "SIGQUIT", "quit"},
2734 {4, "SIGILL", "illegal instruction"},
2735 {5, "SIGTRAP", "trace/breakpoint trap"},
2736 {6, "SIGABRT", "aborted"},
2737 {7, "SIGEMT", "EMT trap"},
2738 {8, "SIGFPE", "floating point exception"},
2739 {9, "SIGKILL", "killed"},
2740 {10, "SIGBUS", "bus error"},
2741 {11, "SIGSEGV", "segmentation fault"},
2742 {12, "SIGSYS", "bad system call"},
2743 {13, "SIGPIPE", "broken pipe"},
2744 {14, "SIGALRM", "alarm clock"},
2745 {15, "SIGTERM", "terminated"},
2746 {16, "SIGUSR1", "user defined signal 1"},
2747 {17, "SIGUSR2", "user defined signal 2"},
2748 {18, "SIGCHLD", "child exited"},
2749 {19, "SIGPWR", "power failure"},
2750 {20, "SIGWINCH", "window changed"},
2751 {21, "SIGURG", "urgent I/O condition"},
2752 {22, "SIGIO", "I/O possible"},
2753 {23, "SIGSTOP", "stopped (signal)"},
2754 {24, "SIGTSTP", "stopped"},
2755 {25, "SIGCONT", "continued"},
2756 {26, "SIGTTIN", "stopped (tty input)"},
2757 {27, "SIGTTOU", "stopped (tty output)"},
2758 {28, "SIGVTALRM", "virtual timer expired"},
2759 {29, "SIGPROF", "profiling timer expired"},
2760 {30, "SIGXCPU", "CPU time limit exceeded"},
2761 {31, "SIGXFSZ", "file size limit exceeded"},
22402762 }
22
33 // +build ppc64,linux
44
5 // Created by cgo -godefs - DO NOT EDIT
5 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
66 // cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
77
88 package unix
1010 import "syscall"
1111
1212 const (
13 AAFS_MAGIC = 0x5a3c69f0
14 ADFS_SUPER_MAGIC = 0xadf5
15 AFFS_SUPER_MAGIC = 0xadff
16 AFS_FS_MAGIC = 0x6b414653
17 AFS_SUPER_MAGIC = 0x5346414f
1318 AF_ALG = 0x26
1419 AF_APPLETALK = 0x5
1520 AF_ASH = 0x12
5863 AF_VSOCK = 0x28
5964 AF_WANPIPE = 0x19
6065 AF_X25 = 0x9
66 AF_XDP = 0x2c
6167 ALG_OP_DECRYPT = 0x0
6268 ALG_OP_ENCRYPT = 0x1
6369 ALG_SET_AEAD_ASSOCLEN = 0x4
6571 ALG_SET_IV = 0x2
6672 ALG_SET_KEY = 0x1
6773 ALG_SET_OP = 0x3
74 ANON_INODE_FS_MAGIC = 0x9041934
6875 ARPHRD_6LOWPAN = 0x339
6976 ARPHRD_ADAPT = 0x108
7077 ARPHRD_APPLETLK = 0x8
120127 ARPHRD_PPP = 0x200
121128 ARPHRD_PRONET = 0x4
122129 ARPHRD_RAWHDLC = 0x206
130 ARPHRD_RAWIP = 0x207
123131 ARPHRD_ROSE = 0x10e
124132 ARPHRD_RSRVD = 0x104
125133 ARPHRD_SIT = 0x308
131139 ARPHRD_VOID = 0xffff
132140 ARPHRD_VSOCKMON = 0x33a
133141 ARPHRD_X25 = 0x10f
142 AUTOFS_SUPER_MAGIC = 0x187
134143 B0 = 0x0
135144 B1000000 = 0x17
136145 B110 = 0x3
162171 B75 = 0x2
163172 B921600 = 0x16
164173 B9600 = 0xd
174 BALLOON_KVM_MAGIC = 0x13661366
175 BDEVFS_MAGIC = 0x62646576
176 BINFMTFS_MAGIC = 0x42494e4d
165177 BLKBSZGET = 0x40081270
166178 BLKBSZSET = 0x80081271
167179 BLKFLSBUF = 0x20001261
186198 BPF_AND = 0x50
187199 BPF_B = 0x10
188200 BPF_DIV = 0x30
201 BPF_FS_MAGIC = 0xcafe4a11
189202 BPF_H = 0x8
190203 BPF_IMM = 0x0
191204 BPF_IND = 0x40
227240 BS0 = 0x0
228241 BS1 = 0x8000
229242 BSDLY = 0x8000
243 BTRFS_SUPER_MAGIC = 0x9123683e
244 BTRFS_TEST_MAGIC = 0x73727279
230245 CAN_BCM = 0x2
231246 CAN_EFF_FLAG = 0x80000000
232247 CAN_EFF_ID_BITS = 0x1d
250265 CBAUD = 0xff
251266 CBAUDEX = 0x0
252267 CFLUSH = 0xf
268 CGROUP2_SUPER_MAGIC = 0x63677270
269 CGROUP_SUPER_MAGIC = 0x27e0eb
253270 CIBAUD = 0xff0000
254271 CLOCAL = 0x8000
255272 CLOCK_BOOTTIME = 0x7
292309 CLONE_VFORK = 0x4000
293310 CLONE_VM = 0x100
294311 CMSPAR = 0x40000000
312 CODA_SUPER_MAGIC = 0x73757245
295313 CR0 = 0x0
296314 CR1 = 0x1000
297315 CR2 = 0x2000
298316 CR3 = 0x3000
317 CRAMFS_MAGIC = 0x28cd3d45
299318 CRDLY = 0x3000
300319 CREAD = 0x800
301320 CRTSCTS = 0x80000000
310329 CSTOP = 0x13
311330 CSTOPB = 0x400
312331 CSUSP = 0x1a
332 DAXFS_MAGIC = 0x64646178
333 DEBUGFS_MAGIC = 0x64626720
334 DEVPTS_SUPER_MAGIC = 0x1cd1
313335 DT_BLK = 0x6
314336 DT_CHR = 0x2
315337 DT_DIR = 0x4
326348 ECHOKE = 0x1
327349 ECHONL = 0x10
328350 ECHOPRT = 0x20
351 ECRYPTFS_SUPER_MAGIC = 0xf15f
329352 EFD_CLOEXEC = 0x80000
330353 EFD_NONBLOCK = 0x800
331354 EFD_SEMAPHORE = 0x1
355 EFIVARFS_MAGIC = 0xde5e81e4
356 EFS_SUPER_MAGIC = 0x414a53
332357 ENCODING_DEFAULT = 0x0
333358 ENCODING_FM_MARK = 0x3
334359 ENCODING_FM_SPACE = 0x4
389414 ETH_P_DSA = 0x1b
390415 ETH_P_ECONET = 0x18
391416 ETH_P_EDSA = 0xdada
417 ETH_P_ERSPAN = 0x88be
418 ETH_P_ERSPAN2 = 0x22eb
392419 ETH_P_FCOE = 0x8906
393420 ETH_P_FIP = 0x8914
394421 ETH_P_HDLC = 0x19
397424 ETH_P_IEEE802154 = 0xf6
398425 ETH_P_IEEEPUP = 0xa00
399426 ETH_P_IEEEPUPAT = 0xa01
427 ETH_P_IFE = 0xed3e
400428 ETH_P_IP = 0x800
401429 ETH_P_IPV6 = 0x86dd
402430 ETH_P_IPX = 0x8137
407435 ETH_P_LOOP = 0x60
408436 ETH_P_LOOPBACK = 0x9000
409437 ETH_P_MACSEC = 0x88e5
438 ETH_P_MAP = 0xf9
410439 ETH_P_MOBITEX = 0x15
411440 ETH_P_MPLS_MC = 0x8848
412441 ETH_P_MPLS_UC = 0x8847
413442 ETH_P_MVRP = 0x88f5
414443 ETH_P_NCSI = 0x88f8
444 ETH_P_NSH = 0x894f
415445 ETH_P_PAE = 0x888e
416446 ETH_P_PAUSE = 0x8808
417447 ETH_P_PHONET = 0xf5
419449 ETH_P_PPP_DISC = 0x8863
420450 ETH_P_PPP_MP = 0x8
421451 ETH_P_PPP_SES = 0x8864
452 ETH_P_PREAUTH = 0x88c7
422453 ETH_P_PRP = 0x88fb
423454 ETH_P_PUP = 0x200
424455 ETH_P_PUPAT = 0x201
439470 ETH_P_WCCP = 0x883e
440471 ETH_P_X25 = 0x805
441472 ETH_P_XDSA = 0xf8
473 EXABYTE_ENABLE_NEST = 0xf0
474 EXT2_SUPER_MAGIC = 0xef53
475 EXT3_SUPER_MAGIC = 0xef53
476 EXT4_SUPER_MAGIC = 0xef53
442477 EXTA = 0xe
443478 EXTB = 0xf
444479 EXTPROC = 0x10000000
480 F2FS_SUPER_MAGIC = 0xf2f52010
445481 FALLOC_FL_COLLAPSE_RANGE = 0x8
446482 FALLOC_FL_INSERT_RANGE = 0x20
447483 FALLOC_FL_KEEP_SIZE = 0x1
462498 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
463499 FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
464500 FS_ENCRYPTION_MODE_INVALID = 0x0
501 FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
502 FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
465503 FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
466504 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
467505 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
475513 FS_POLICY_FLAGS_PAD_8 = 0x1
476514 FS_POLICY_FLAGS_PAD_MASK = 0x3
477515 FS_POLICY_FLAGS_VALID = 0x3
516 FUTEXFS_SUPER_MAGIC = 0xbad1dea
517 F_ADD_SEALS = 0x409
478518 F_DUPFD = 0x0
479519 F_DUPFD_CLOEXEC = 0x406
480520 F_EXLCK = 0x4
487527 F_GETOWN_EX = 0x10
488528 F_GETPIPE_SZ = 0x408
489529 F_GETSIG = 0xb
530 F_GET_FILE_RW_HINT = 0x40d
531 F_GET_RW_HINT = 0x40b
532 F_GET_SEALS = 0x40a
490533 F_LOCK = 0x1
491534 F_NOTIFY = 0x402
492535 F_OFD_GETLK = 0x24
494537 F_OFD_SETLKW = 0x26
495538 F_OK = 0x0
496539 F_RDLCK = 0x0
540 F_SEAL_GROW = 0x4
541 F_SEAL_SEAL = 0x1
542 F_SEAL_SHRINK = 0x2
543 F_SEAL_WRITE = 0x8
497544 F_SETFD = 0x2
498545 F_SETFL = 0x4
499546 F_SETLEASE = 0x400
505552 F_SETOWN_EX = 0xf
506553 F_SETPIPE_SZ = 0x407
507554 F_SETSIG = 0xa
555 F_SET_FILE_RW_HINT = 0x40e
556 F_SET_RW_HINT = 0x40c
508557 F_SHLCK = 0x8
509558 F_TEST = 0x3
510559 F_TLOCK = 0x2
526575 GENL_UNS_ADMIN_PERM = 0x10
527576 GRND_NONBLOCK = 0x1
528577 GRND_RANDOM = 0x2
578 HDIO_DRIVE_CMD = 0x31f
579 HDIO_DRIVE_CMD_AEB = 0x31e
580 HDIO_DRIVE_CMD_HDR_SIZE = 0x4
581 HDIO_DRIVE_HOB_HDR_SIZE = 0x8
582 HDIO_DRIVE_RESET = 0x31c
583 HDIO_DRIVE_TASK = 0x31e
584 HDIO_DRIVE_TASKFILE = 0x31d
585 HDIO_DRIVE_TASK_HDR_SIZE = 0x8
586 HDIO_GETGEO = 0x301
587 HDIO_GET_32BIT = 0x309
588 HDIO_GET_ACOUSTIC = 0x30f
589 HDIO_GET_ADDRESS = 0x310
590 HDIO_GET_BUSSTATE = 0x31a
591 HDIO_GET_DMA = 0x30b
592 HDIO_GET_IDENTITY = 0x30d
593 HDIO_GET_KEEPSETTINGS = 0x308
594 HDIO_GET_MULTCOUNT = 0x304
595 HDIO_GET_NICE = 0x30c
596 HDIO_GET_NOWERR = 0x30a
597 HDIO_GET_QDMA = 0x305
598 HDIO_GET_UNMASKINTR = 0x302
599 HDIO_GET_WCACHE = 0x30e
600 HDIO_OBSOLETE_IDENTITY = 0x307
601 HDIO_SCAN_HWIF = 0x328
602 HDIO_SET_32BIT = 0x324
603 HDIO_SET_ACOUSTIC = 0x32c
604 HDIO_SET_ADDRESS = 0x32f
605 HDIO_SET_BUSSTATE = 0x32d
606 HDIO_SET_DMA = 0x326
607 HDIO_SET_KEEPSETTINGS = 0x323
608 HDIO_SET_MULTCOUNT = 0x321
609 HDIO_SET_NICE = 0x329
610 HDIO_SET_NOWERR = 0x325
611 HDIO_SET_PIO_MODE = 0x327
612 HDIO_SET_QDMA = 0x32e
613 HDIO_SET_UNMASKINTR = 0x322
614 HDIO_SET_WCACHE = 0x32b
615 HDIO_SET_XFER = 0x306
616 HDIO_TRISTATE_HWIF = 0x31b
617 HDIO_UNREGISTER_HWIF = 0x32a
618 HOSTFS_SUPER_MAGIC = 0xc0ffee
619 HPFS_SUPER_MAGIC = 0xf995e849
620 HUGETLBFS_MAGIC = 0x958458f6
529621 HUPCL = 0x4000
530622 IBSHIFT = 0x10
531623 ICANON = 0x100
545637 IFA_F_STABLE_PRIVACY = 0x800
546638 IFA_F_TEMPORARY = 0x1
547639 IFA_F_TENTATIVE = 0x40
548 IFA_MAX = 0x8
640 IFA_MAX = 0xa
549641 IFF_ALLMULTI = 0x200
550642 IFF_ATTACH_QUEUE = 0x200
551643 IFF_AUTOMEDIA = 0x4000
560652 IFF_MASTER = 0x400
561653 IFF_MULTICAST = 0x1000
562654 IFF_MULTI_QUEUE = 0x100
655 IFF_NAPI = 0x10
656 IFF_NAPI_FRAGS = 0x20
563657 IFF_NOARP = 0x80
564658 IFF_NOFILTER = 0x1000
565659 IFF_NOTRAILERS = 0x20
622716 IN_OPEN = 0x20
623717 IN_Q_OVERFLOW = 0x4000
624718 IN_UNMOUNT = 0x2000
719 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
625720 IPPROTO_AH = 0x33
626721 IPPROTO_BEETPH = 0x5e
627722 IPPROTO_COMP = 0x6c
669764 IPV6_DONTFRAG = 0x3e
670765 IPV6_DROP_MEMBERSHIP = 0x15
671766 IPV6_DSTOPTS = 0x3b
767 IPV6_FREEBIND = 0x4e
672768 IPV6_HDRINCL = 0x24
673769 IPV6_HOPLIMIT = 0x34
674770 IPV6_HOPOPTS = 0x36
773869 IP_UNICAST_IF = 0x32
774870 IP_XFRM_POLICY = 0x11
775871 ISIG = 0x80
872 ISOFS_SUPER_MAGIC = 0x9660
776873 ISTRIP = 0x20
777874 IUCLC = 0x1000
778875 IUTF8 = 0x4000
779876 IXANY = 0x800
780877 IXOFF = 0x400
781878 IXON = 0x200
879 JFFS2_SUPER_MAGIC = 0x72b6
880 KEXEC_ARCH_386 = 0x30000
881 KEXEC_ARCH_68K = 0x40000
882 KEXEC_ARCH_AARCH64 = 0xb70000
883 KEXEC_ARCH_ARM = 0x280000
884 KEXEC_ARCH_DEFAULT = 0x0
885 KEXEC_ARCH_IA_64 = 0x320000
886 KEXEC_ARCH_MASK = 0xffff0000
887 KEXEC_ARCH_MIPS = 0x80000
888 KEXEC_ARCH_MIPS_LE = 0xa0000
889 KEXEC_ARCH_PPC = 0x140000
890 KEXEC_ARCH_PPC64 = 0x150000
891 KEXEC_ARCH_S390 = 0x160000
892 KEXEC_ARCH_SH = 0x2a0000
893 KEXEC_ARCH_X86_64 = 0x3e0000
894 KEXEC_FILE_NO_INITRAMFS = 0x4
895 KEXEC_FILE_ON_CRASH = 0x2
896 KEXEC_FILE_UNLOAD = 0x1
897 KEXEC_ON_CRASH = 0x1
898 KEXEC_PRESERVE_CONTEXT = 0x2
899 KEXEC_SEGMENT_MAX = 0x10
782900 KEYCTL_ASSUME_AUTHORITY = 0x10
783901 KEYCTL_CHOWN = 0x4
784902 KEYCTL_CLEAR = 0x7
793911 KEYCTL_JOIN_SESSION_KEYRING = 0x1
794912 KEYCTL_LINK = 0x8
795913 KEYCTL_NEGATE = 0xd
914 KEYCTL_PKEY_DECRYPT = 0x1a
915 KEYCTL_PKEY_ENCRYPT = 0x19
916 KEYCTL_PKEY_QUERY = 0x18
917 KEYCTL_PKEY_SIGN = 0x1b
918 KEYCTL_PKEY_VERIFY = 0x1c
796919 KEYCTL_READ = 0xb
797920 KEYCTL_REJECT = 0x13
798921 KEYCTL_RESTRICT_KEYRING = 0x1d
802925 KEYCTL_SETPERM = 0x5
803926 KEYCTL_SET_REQKEY_KEYRING = 0xe
804927 KEYCTL_SET_TIMEOUT = 0xf
928 KEYCTL_SUPPORTS_DECRYPT = 0x2
929 KEYCTL_SUPPORTS_ENCRYPT = 0x1
930 KEYCTL_SUPPORTS_SIGN = 0x4
931 KEYCTL_SUPPORTS_VERIFY = 0x8
805932 KEYCTL_UNLINK = 0x9
806933 KEYCTL_UPDATE = 0x2
807934 KEY_REQKEY_DEFL_DEFAULT = 0x0
843970 MADV_FREE = 0x8
844971 MADV_HUGEPAGE = 0xe
845972 MADV_HWPOISON = 0x64
973 MADV_KEEPONFORK = 0x13
846974 MADV_MERGEABLE = 0xc
847975 MADV_NOHUGEPAGE = 0xf
848976 MADV_NORMAL = 0x0
851979 MADV_SEQUENTIAL = 0x2
852980 MADV_UNMERGEABLE = 0xd
853981 MADV_WILLNEED = 0x3
982 MADV_WIPEONFORK = 0x12
854983 MAP_ANON = 0x20
855984 MAP_ANONYMOUS = 0x20
856985 MAP_DENYWRITE = 0x800
857986 MAP_EXECUTABLE = 0x1000
858987 MAP_FILE = 0x0
859988 MAP_FIXED = 0x10
989 MAP_FIXED_NOREPLACE = 0x100000
860990 MAP_GROWSDOWN = 0x100
861991 MAP_HUGETLB = 0x40000
862992 MAP_HUGE_MASK = 0x3f
867997 MAP_POPULATE = 0x8000
868998 MAP_PRIVATE = 0x2
869999 MAP_SHARED = 0x1
1000 MAP_SHARED_VALIDATE = 0x3
8701001 MAP_STACK = 0x20000
8711002 MAP_TYPE = 0xf
8721003 MCL_CURRENT = 0x2000
8731004 MCL_FUTURE = 0x4000
8741005 MCL_ONFAULT = 0x8000
1006 MFD_ALLOW_SEALING = 0x2
1007 MFD_CLOEXEC = 0x1
1008 MFD_HUGETLB = 0x4
1009 MFD_HUGE_16GB = -0x78000000
1010 MFD_HUGE_16MB = 0x60000000
1011 MFD_HUGE_1GB = 0x78000000
1012 MFD_HUGE_1MB = 0x50000000
1013 MFD_HUGE_256MB = 0x70000000
1014 MFD_HUGE_2GB = 0x7c000000
1015 MFD_HUGE_2MB = 0x54000000
1016 MFD_HUGE_32MB = 0x64000000
1017 MFD_HUGE_512KB = 0x4c000000
1018 MFD_HUGE_512MB = 0x74000000
1019 MFD_HUGE_64KB = 0x40000000
1020 MFD_HUGE_8MB = 0x5c000000
1021 MFD_HUGE_MASK = 0x3f
1022 MFD_HUGE_SHIFT = 0x1a
1023 MINIX2_SUPER_MAGIC = 0x2468
1024 MINIX2_SUPER_MAGIC2 = 0x2478
1025 MINIX3_SUPER_MAGIC = 0x4d5a
1026 MINIX_SUPER_MAGIC = 0x137f
1027 MINIX_SUPER_MAGIC2 = 0x138f
8751028 MNT_DETACH = 0x2
8761029 MNT_EXPIRE = 0x4
8771030 MNT_FORCE = 0x1
1031 MODULE_INIT_IGNORE_MODVERSIONS = 0x1
1032 MODULE_INIT_IGNORE_VERMAGIC = 0x2
1033 MSDOS_SUPER_MAGIC = 0x4d44
8781034 MSG_BATCH = 0x40000
8791035 MSG_CMSG_CLOEXEC = 0x40000000
8801036 MSG_CONFIRM = 0x800
8961052 MSG_TRYHARD = 0x4
8971053 MSG_WAITALL = 0x100
8981054 MSG_WAITFORONE = 0x10000
1055 MSG_ZEROCOPY = 0x4000000
8991056 MS_ACTIVE = 0x40000000
9001057 MS_ASYNC = 0x1
9011058 MS_BIND = 0x1000
9331090 MS_SYNCHRONOUS = 0x10
9341091 MS_UNBINDABLE = 0x20000
9351092 MS_VERBOSE = 0x8000
1093 MTD_INODE_FS_MAGIC = 0x11307854
9361094 NAME_MAX = 0xff
1095 NCP_SUPER_MAGIC = 0x564c
9371096 NETLINK_ADD_MEMBERSHIP = 0x1
9381097 NETLINK_AUDIT = 0x9
9391098 NETLINK_BROADCAST_ERROR = 0x4
9471106 NETLINK_FIB_LOOKUP = 0xa
9481107 NETLINK_FIREWALL = 0x3
9491108 NETLINK_GENERIC = 0x10
1109 NETLINK_GET_STRICT_CHK = 0xc
9501110 NETLINK_INET_DIAG = 0x4
9511111 NETLINK_IP6_FW = 0xd
9521112 NETLINK_ISCSI = 0x8
9681128 NETLINK_UNUSED = 0x1
9691129 NETLINK_USERSOCK = 0x2
9701130 NETLINK_XFRM = 0x6
1131 NETNSA_MAX = 0x3
1132 NETNSA_NSID_NOT_ASSIGNED = -0x1
1133 NFNETLINK_V0 = 0x0
1134 NFNLGRP_ACCT_QUOTA = 0x8
1135 NFNLGRP_CONNTRACK_DESTROY = 0x3
1136 NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
1137 NFNLGRP_CONNTRACK_EXP_NEW = 0x4
1138 NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
1139 NFNLGRP_CONNTRACK_NEW = 0x1
1140 NFNLGRP_CONNTRACK_UPDATE = 0x2
1141 NFNLGRP_MAX = 0x9
1142 NFNLGRP_NFTABLES = 0x7
1143 NFNLGRP_NFTRACE = 0x9
1144 NFNLGRP_NONE = 0x0
1145 NFNL_BATCH_MAX = 0x1
1146 NFNL_MSG_BATCH_BEGIN = 0x10
1147 NFNL_MSG_BATCH_END = 0x11
1148 NFNL_NFA_NEST = 0x8000
1149 NFNL_SUBSYS_ACCT = 0x7
1150 NFNL_SUBSYS_COUNT = 0xc
1151 NFNL_SUBSYS_CTHELPER = 0x9
1152 NFNL_SUBSYS_CTNETLINK = 0x1
1153 NFNL_SUBSYS_CTNETLINK_EXP = 0x2
1154 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
1155 NFNL_SUBSYS_IPSET = 0x6
1156 NFNL_SUBSYS_NFTABLES = 0xa
1157 NFNL_SUBSYS_NFT_COMPAT = 0xb
1158 NFNL_SUBSYS_NONE = 0x0
1159 NFNL_SUBSYS_OSF = 0x5
1160 NFNL_SUBSYS_QUEUE = 0x3
1161 NFNL_SUBSYS_ULOG = 0x4
1162 NFS_SUPER_MAGIC = 0x6969
1163 NILFS_SUPER_MAGIC = 0x3434
9711164 NL0 = 0x0
9721165 NL1 = 0x100
9731166 NL2 = 0x200
9971190 NLM_F_EXCL = 0x200
9981191 NLM_F_MATCH = 0x200
9991192 NLM_F_MULTI = 0x2
1193 NLM_F_NONREC = 0x100
10001194 NLM_F_REPLACE = 0x100
10011195 NLM_F_REQUEST = 0x1
10021196 NLM_F_ROOT = 0x100
10031197 NOFLSH = 0x80000000
1198 NSFS_MAGIC = 0x6e736673
1199 OCFS2_SUPER_MAGIC = 0x7461636f
10041200 OCRNL = 0x8
10051201 OFDEL = 0x80
10061202 OFILL = 0x40
10081204 ONLCR = 0x2
10091205 ONLRET = 0x20
10101206 ONOCR = 0x10
1207 OPENPROM_SUPER_MAGIC = 0x9fa1
10111208 OPOST = 0x1
1209 OVERLAYFS_SUPER_MAGIC = 0x794c7630
10121210 O_ACCMODE = 0x3
10131211 O_APPEND = 0x400
10141212 O_ASYNC = 0x2000
10541252 PACKET_FASTROUTE = 0x6
10551253 PACKET_HDRLEN = 0xb
10561254 PACKET_HOST = 0x0
1255 PACKET_IGNORE_OUTGOING = 0x17
10571256 PACKET_KERNEL = 0x7
10581257 PACKET_LOOPBACK = 0x5
10591258 PACKET_LOSS = 0xe
10931292 PERF_EVENT_IOC_DISABLE = 0x20002401
10941293 PERF_EVENT_IOC_ENABLE = 0x20002400
10951294 PERF_EVENT_IOC_ID = 0x40082407
1295 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
10961296 PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
10971297 PERF_EVENT_IOC_PERIOD = 0x80082404
1298 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
10981299 PERF_EVENT_IOC_REFRESH = 0x20002402
10991300 PERF_EVENT_IOC_RESET = 0x20002403
11001301 PERF_EVENT_IOC_SET_BPF = 0x80042408
11011302 PERF_EVENT_IOC_SET_FILTER = 0x80082406
11021303 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
1304 PIPEFS_MAGIC = 0x50495045
1305 PPPIOCATTACH = 0x8004743d
1306 PPPIOCATTCHAN = 0x80047438
1307 PPPIOCCONNECT = 0x8004743a
1308 PPPIOCDETACH = 0x8004743c
1309 PPPIOCDISCONN = 0x20007439
1310 PPPIOCGASYNCMAP = 0x40047458
1311 PPPIOCGCHAN = 0x40047437
1312 PPPIOCGDEBUG = 0x40047441
1313 PPPIOCGFLAGS = 0x4004745a
1314 PPPIOCGIDLE = 0x4010743f
1315 PPPIOCGL2TPSTATS = 0x40487436
1316 PPPIOCGMRU = 0x40047453
1317 PPPIOCGNPMODE = 0xc008744c
1318 PPPIOCGRASYNCMAP = 0x40047455
1319 PPPIOCGUNIT = 0x40047456
1320 PPPIOCGXASYNCMAP = 0x40207450
1321 PPPIOCNEWUNIT = 0xc004743e
1322 PPPIOCSACTIVE = 0x80107446
1323 PPPIOCSASYNCMAP = 0x80047457
1324 PPPIOCSCOMPRESS = 0x8010744d
1325 PPPIOCSDEBUG = 0x80047440
1326 PPPIOCSFLAGS = 0x80047459
1327 PPPIOCSMAXCID = 0x80047451
1328 PPPIOCSMRRU = 0x8004743b
1329 PPPIOCSMRU = 0x80047452
1330 PPPIOCSNPMODE = 0x8008744b
1331 PPPIOCSPASS = 0x80107447
1332 PPPIOCSRASYNCMAP = 0x80047454
1333 PPPIOCSXASYNCMAP = 0x8020744f
1334 PPPIOCXFERUNIT = 0x2000744e
11031335 PRIO_PGRP = 0x1
11041336 PRIO_PROCESS = 0x0
11051337 PRIO_USER = 0x2
1338 PROC_SUPER_MAGIC = 0x9fa0
11061339 PROT_EXEC = 0x4
11071340 PROT_GROWSDOWN = 0x1000000
11081341 PROT_GROWSUP = 0x2000000
11461379 PR_GET_PDEATHSIG = 0x2
11471380 PR_GET_SECCOMP = 0x15
11481381 PR_GET_SECUREBITS = 0x1b
1382 PR_GET_SPECULATION_CTRL = 0x34
11491383 PR_GET_THP_DISABLE = 0x2a
11501384 PR_GET_TID_ADDRESS = 0x28
11511385 PR_GET_TIMERSLACK = 0x1e
11881422 PR_SET_NO_NEW_PRIVS = 0x26
11891423 PR_SET_PDEATHSIG = 0x1
11901424 PR_SET_PTRACER = 0x59616d61
1191 PR_SET_PTRACER_ANY = -0x1
1425 PR_SET_PTRACER_ANY = 0xffffffffffffffff
11921426 PR_SET_SECCOMP = 0x16
11931427 PR_SET_SECUREBITS = 0x1c
1428 PR_SET_SPECULATION_CTRL = 0x35
11941429 PR_SET_THP_DISABLE = 0x29
11951430 PR_SET_TIMERSLACK = 0x1d
11961431 PR_SET_TIMING = 0xe
11971432 PR_SET_TSC = 0x1a
11981433 PR_SET_UNALIGN = 0x6
1434 PR_SPEC_DISABLE = 0x4
1435 PR_SPEC_ENABLE = 0x2
1436 PR_SPEC_FORCE_DISABLE = 0x8
1437 PR_SPEC_INDIRECT_BRANCH = 0x1
1438 PR_SPEC_NOT_AFFECTED = 0x0
1439 PR_SPEC_PRCTL = 0x1
1440 PR_SPEC_STORE_BYPASS = 0x0
1441 PR_SVE_GET_VL = 0x33
1442 PR_SVE_SET_VL = 0x32
1443 PR_SVE_SET_VL_ONEXEC = 0x40000
1444 PR_SVE_VL_INHERIT = 0x20000
1445 PR_SVE_VL_LEN_MASK = 0xffff
11991446 PR_TASK_PERF_EVENTS_DISABLE = 0x1f
12001447 PR_TASK_PERF_EVENTS_ENABLE = 0x20
12011448 PR_TIMING_STATISTICAL = 0x0
12041451 PR_TSC_SIGSEGV = 0x2
12051452 PR_UNALIGN_NOPRINT = 0x1
12061453 PR_UNALIGN_SIGBUS = 0x2
1454 PSTOREFS_MAGIC = 0x6165676c
12071455 PTRACE_ATTACH = 0x10
12081456 PTRACE_CONT = 0x7
12091457 PTRACE_DETACH = 0x11
12491497 PTRACE_POKETEXT = 0x4
12501498 PTRACE_POKEUSR = 0x6
12511499 PTRACE_SECCOMP_GET_FILTER = 0x420c
1500 PTRACE_SECCOMP_GET_METADATA = 0x420d
12521501 PTRACE_SEIZE = 0x4206
12531502 PTRACE_SETEVRREGS = 0x15
12541503 PTRACE_SETFPREGS = 0xf
12641513 PTRACE_SINGLEBLOCK = 0x100
12651514 PTRACE_SINGLESTEP = 0x9
12661515 PTRACE_SYSCALL = 0x18
1516 PTRACE_SYSEMU = 0x1d
1517 PTRACE_SYSEMU_SINGLESTEP = 0x1e
12671518 PTRACE_TRACEME = 0x0
12681519 PT_CCR = 0x26
12691520 PT_CTR = 0x23
13181569 PT_VSR0 = 0x96
13191570 PT_VSR31 = 0xd4
13201571 PT_XER = 0x25
1572 QNX4_SUPER_MAGIC = 0x2f
1573 QNX6_SUPER_MAGIC = 0x68191122
1574 RAMFS_MAGIC = 0x858458f6
1575 RDTGROUP_SUPER_MAGIC = 0x7655821
1576 REISERFS_SUPER_MAGIC = 0x52654973
1577 RENAME_EXCHANGE = 0x2
1578 RENAME_NOREPLACE = 0x1
1579 RENAME_WHITEOUT = 0x4
13211580 RLIMIT_AS = 0x9
13221581 RLIMIT_CORE = 0x4
13231582 RLIMIT_CPU = 0x0
13341593 RLIMIT_RTTIME = 0xf
13351594 RLIMIT_SIGPENDING = 0xb
13361595 RLIMIT_STACK = 0x3
1337 RLIM_INFINITY = -0x1
1596 RLIM_INFINITY = 0xffffffffffffffff
13381597 RTAX_ADVMSS = 0x8
13391598 RTAX_CC_ALGO = 0x10
13401599 RTAX_CWND = 0x7
1600 RTAX_FASTOPEN_NO_COOKIE = 0x11
13411601 RTAX_FEATURES = 0xc
13421602 RTAX_FEATURE_ALLFRAG = 0x8
13431603 RTAX_FEATURE_ECN = 0x1
13481608 RTAX_INITCWND = 0xb
13491609 RTAX_INITRWND = 0xe
13501610 RTAX_LOCK = 0x1
1351 RTAX_MAX = 0x10
1611 RTAX_MAX = 0x11
13521612 RTAX_MTU = 0x2
13531613 RTAX_QUICKACK = 0xf
13541614 RTAX_REORDERING = 0x9
13591619 RTAX_UNSPEC = 0x0
13601620 RTAX_WINDOW = 0x3
13611621 RTA_ALIGNTO = 0x4
1362 RTA_MAX = 0x1a
1622 RTA_MAX = 0x1d
13631623 RTCF_DIRECTSRC = 0x4000000
13641624 RTCF_DOREDIRECT = 0x1000000
13651625 RTCF_LOG = 0x2000000
13661626 RTCF_MASQ = 0x400000
13671627 RTCF_NAT = 0x800000
13681628 RTCF_VALVE = 0x200000
1629 RTC_AF = 0x20
1630 RTC_AIE_OFF = 0x20007002
1631 RTC_AIE_ON = 0x20007001
1632 RTC_ALM_READ = 0x40247008
1633 RTC_ALM_SET = 0x80247007
1634 RTC_EPOCH_READ = 0x4008700d
1635 RTC_EPOCH_SET = 0x8008700e
1636 RTC_IRQF = 0x80
1637 RTC_IRQP_READ = 0x4008700b
1638 RTC_IRQP_SET = 0x8008700c
1639 RTC_MAX_FREQ = 0x2000
1640 RTC_PF = 0x40
1641 RTC_PIE_OFF = 0x20007006
1642 RTC_PIE_ON = 0x20007005
1643 RTC_PLL_GET = 0x40207011
1644 RTC_PLL_SET = 0x80207012
1645 RTC_RD_TIME = 0x40247009
1646 RTC_SET_TIME = 0x8024700a
1647 RTC_UF = 0x10
1648 RTC_UIE_OFF = 0x20007004
1649 RTC_UIE_ON = 0x20007003
1650 RTC_VL_CLR = 0x20007014
1651 RTC_VL_READ = 0x40047013
1652 RTC_WIE_OFF = 0x20007010
1653 RTC_WIE_ON = 0x2000700f
1654 RTC_WKALM_RD = 0x40287010
1655 RTC_WKALM_SET = 0x8028700f
13691656 RTF_ADDRCLASSMASK = 0xf8000000
13701657 RTF_ADDRCONF = 0x40000
13711658 RTF_ALLONLINK = 0x20000
14001687 RTM_DELACTION = 0x31
14011688 RTM_DELADDR = 0x15
14021689 RTM_DELADDRLABEL = 0x49
1690 RTM_DELCHAIN = 0x65
14031691 RTM_DELLINK = 0x11
14041692 RTM_DELMDB = 0x55
14051693 RTM_DELNEIGH = 0x1d
14201708 RTM_GETADDR = 0x16
14211709 RTM_GETADDRLABEL = 0x4a
14221710 RTM_GETANYCAST = 0x3e
1711 RTM_GETCHAIN = 0x66
14231712 RTM_GETDCB = 0x4e
14241713 RTM_GETLINK = 0x12
14251714 RTM_GETMDB = 0x56
14341723 RTM_GETSTATS = 0x5e
14351724 RTM_GETTCLASS = 0x2a
14361725 RTM_GETTFILTER = 0x2e
1437 RTM_MAX = 0x63
1726 RTM_MAX = 0x67
14381727 RTM_NEWACTION = 0x30
14391728 RTM_NEWADDR = 0x14
14401729 RTM_NEWADDRLABEL = 0x48
14411730 RTM_NEWCACHEREPORT = 0x60
1731 RTM_NEWCHAIN = 0x64
14421732 RTM_NEWLINK = 0x10
14431733 RTM_NEWMDB = 0x54
14441734 RTM_NEWNDUSEROPT = 0x44
14531743 RTM_NEWSTATS = 0x5c
14541744 RTM_NEWTCLASS = 0x28
14551745 RTM_NEWTFILTER = 0x2c
1456 RTM_NR_FAMILIES = 0x15
1457 RTM_NR_MSGTYPES = 0x54
1746 RTM_NR_FAMILIES = 0x16
1747 RTM_NR_MSGTYPES = 0x58
14581748 RTM_SETDCB = 0x4f
14591749 RTM_SETLINK = 0x13
14601750 RTM_SETNEIGHTBL = 0x43
14681758 RTNH_F_UNRESOLVED = 0x20
14691759 RTN_MAX = 0xb
14701760 RTPROT_BABEL = 0x2a
1761 RTPROT_BGP = 0xba
14711762 RTPROT_BIRD = 0xc
14721763 RTPROT_BOOT = 0x3
14731764 RTPROT_DHCP = 0x10
14741765 RTPROT_DNROUTED = 0xd
1766 RTPROT_EIGRP = 0xc0
14751767 RTPROT_GATED = 0x8
1768 RTPROT_ISIS = 0xbb
14761769 RTPROT_KERNEL = 0x2
14771770 RTPROT_MROUTED = 0x11
14781771 RTPROT_MRT = 0xa
14791772 RTPROT_NTK = 0xf
1773 RTPROT_OSPF = 0xbc
14801774 RTPROT_RA = 0x9
14811775 RTPROT_REDIRECT = 0x1
1776 RTPROT_RIP = 0xbd
14821777 RTPROT_STATIC = 0x4
14831778 RTPROT_UNSPEC = 0x0
14841779 RTPROT_XORP = 0xe
14981793 SCM_TIMESTAMPING_OPT_STATS = 0x36
14991794 SCM_TIMESTAMPING_PKTINFO = 0x3a
15001795 SCM_TIMESTAMPNS = 0x23
1796 SCM_TXTIME = 0x3d
15011797 SCM_WIFI_STATUS = 0x29
1798 SC_LOG_FLUSH = 0x100000
15021799 SECCOMP_MODE_DISABLED = 0x0
15031800 SECCOMP_MODE_FILTER = 0x2
15041801 SECCOMP_MODE_STRICT = 0x1
1802 SECURITYFS_MAGIC = 0x73636673
1803 SELINUX_MAGIC = 0xf97cff8c
1804 SFD_CLOEXEC = 0x80000
1805 SFD_NONBLOCK = 0x800
15051806 SHUT_RD = 0x0
15061807 SHUT_RDWR = 0x2
15071808 SHUT_WR = 0x1
15521853 SIOCGMIIPHY = 0x8947
15531854 SIOCGMIIREG = 0x8948
15541855 SIOCGPGRP = 0x8904
1856 SIOCGPPPCSTATS = 0x89f2
1857 SIOCGPPPSTATS = 0x89f0
1858 SIOCGPPPVER = 0x89f1
15551859 SIOCGRARP = 0x8961
15561860 SIOCGSKNS = 0x894c
15571861 SIOCGSTAMP = 0x8906
15861890 SIOCSPGRP = 0x8902
15871891 SIOCSRARP = 0x8962
15881892 SIOCWANDEV = 0x894a
1893 SMACK_MAGIC = 0x43415d53
1894 SMART_AUTOSAVE = 0xd2
1895 SMART_AUTO_OFFLINE = 0xdb
1896 SMART_DISABLE = 0xd9
1897 SMART_ENABLE = 0xd8
1898 SMART_HCYL_PASS = 0xc2
1899 SMART_IMMEDIATE_OFFLINE = 0xd4
1900 SMART_LCYL_PASS = 0x4f
1901 SMART_READ_LOG_SECTOR = 0xd5
1902 SMART_READ_THRESHOLDS = 0xd1
1903 SMART_READ_VALUES = 0xd0
1904 SMART_SAVE = 0xd3
1905 SMART_STATUS = 0xda
1906 SMART_WRITE_LOG_SECTOR = 0xd6
1907 SMART_WRITE_THRESHOLDS = 0xd7
1908 SMB_SUPER_MAGIC = 0x517b
1909 SOCKFS_MAGIC = 0x534f434b
15891910 SOCK_CLOEXEC = 0x80000
15901911 SOCK_DCCP = 0x6
15911912 SOCK_DGRAM = 0x2
16221943 SOL_SOCKET = 0x1
16231944 SOL_TCP = 0x6
16241945 SOL_TIPC = 0x10f
1946 SOL_TLS = 0x11a
16251947 SOL_X25 = 0x106
1948 SOL_XDP = 0x11b
16261949 SOMAXCONN = 0x80
16271950 SO_ACCEPTCONN = 0x1e
16281951 SO_ATTACH_BPF = 0x32
16812004 SO_TIMESTAMP = 0x1d
16822005 SO_TIMESTAMPING = 0x25
16832006 SO_TIMESTAMPNS = 0x23
2007 SO_TXTIME = 0x3d
16842008 SO_TYPE = 0x3
16852009 SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
16862010 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
16902014 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
16912015 SO_VM_SOCKETS_TRUSTED = 0x5
16922016 SO_WIFI_STATUS = 0x29
2017 SO_ZEROCOPY = 0x3c
16932018 SPLICE_F_GIFT = 0x8
16942019 SPLICE_F_MORE = 0x4
16952020 SPLICE_F_MOVE = 0x1
16962021 SPLICE_F_NONBLOCK = 0x2
2022 SQUASHFS_MAGIC = 0x73717368
2023 STACK_END_MAGIC = 0x57ac6e9d
2024 STATX_ALL = 0xfff
2025 STATX_ATIME = 0x20
2026 STATX_ATTR_APPEND = 0x20
2027 STATX_ATTR_AUTOMOUNT = 0x1000
2028 STATX_ATTR_COMPRESSED = 0x4
2029 STATX_ATTR_ENCRYPTED = 0x800
2030 STATX_ATTR_IMMUTABLE = 0x10
2031 STATX_ATTR_NODUMP = 0x40
2032 STATX_BASIC_STATS = 0x7ff
2033 STATX_BLOCKS = 0x400
2034 STATX_BTIME = 0x800
2035 STATX_CTIME = 0x80
2036 STATX_GID = 0x10
2037 STATX_INO = 0x100
2038 STATX_MODE = 0x2
2039 STATX_MTIME = 0x40
2040 STATX_NLINK = 0x4
2041 STATX_SIZE = 0x200
2042 STATX_TYPE = 0x1
2043 STATX_UID = 0x8
2044 STATX__RESERVED = 0x80000000
2045 SYNC_FILE_RANGE_WAIT_AFTER = 0x4
2046 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
2047 SYNC_FILE_RANGE_WRITE = 0x2
2048 SYSFS_MAGIC = 0x62656572
16972049 S_BLKSIZE = 0x200
16982050 S_IEXEC = 0x40
16992051 S_IFBLK = 0x6000
17312083 TASKSTATS_GENL_NAME = "TASKSTATS"
17322084 TASKSTATS_GENL_VERSION = 0x1
17332085 TASKSTATS_TYPE_MAX = 0x6
1734 TASKSTATS_VERSION = 0x8
2086 TASKSTATS_VERSION = 0x9
17352087 TCFLSH = 0x2000741f
17362088 TCGETA = 0x40147417
17372089 TCGETS = 0x402c7413
17542106 TCP_DEFER_ACCEPT = 0x9
17552107 TCP_FASTOPEN = 0x17
17562108 TCP_FASTOPEN_CONNECT = 0x1e
2109 TCP_FASTOPEN_KEY = 0x21
2110 TCP_FASTOPEN_NO_COOKIE = 0x22
17572111 TCP_INFO = 0xb
17582112 TCP_KEEPCNT = 0x6
17592113 TCP_KEEPIDLE = 0x4
17632117 TCP_MAXWIN = 0xffff
17642118 TCP_MAX_WINSHIFT = 0xe
17652119 TCP_MD5SIG = 0xe
2120 TCP_MD5SIG_EXT = 0x20
2121 TCP_MD5SIG_FLAG_PREFIX = 0x1
17662122 TCP_MD5SIG_MAXKEYLEN = 0x50
17672123 TCP_MSS = 0x200
17682124 TCP_MSS_DEFAULT = 0x218
17832139 TCP_THIN_DUPACK = 0x11
17842140 TCP_THIN_LINEAR_TIMEOUTS = 0x10
17852141 TCP_TIMESTAMP = 0x18
2142 TCP_ULP = 0x1f
17862143 TCP_USER_TIMEOUT = 0x12
17872144 TCP_WINDOW_CLAMP = 0xa
17882145 TCSAFLUSH = 0x2
17952152 TCSETSF = 0x802c7416
17962153 TCSETSW = 0x802c7415
17972154 TCXONC = 0x2000741e
2155 TIMER_ABSTIME = 0x1
17982156 TIOCCBRK = 0x5428
17992157 TIOCCONS = 0x541d
18002158 TIOCEXCL = 0x540c
18042162 TIOCGETP = 0x40067408
18052163 TIOCGEXCL = 0x40045440
18062164 TIOCGICOUNT = 0x545d
2165 TIOCGISO7816 = 0x40285442
18072166 TIOCGLCKTRMIOS = 0x5456
18082167 TIOCGLTC = 0x40067474
18092168 TIOCGPGRP = 0x40047477
18642223 TIOCSETN = 0x8006740a
18652224 TIOCSETP = 0x80067409
18662225 TIOCSIG = 0x80045436
2226 TIOCSISO7816 = 0xc0285443
18672227 TIOCSLCKTRMIOS = 0x5457
18682228 TIOCSLTC = 0x80067475
18692229 TIOCSPGRP = 0x80047476
18762236 TIOCSTOP = 0x2000746f
18772237 TIOCSWINSZ = 0x80087467
18782238 TIOCVHANGUP = 0x5437
2239 TMPFS_MAGIC = 0x1021994
18792240 TOSTOP = 0x400000
2241 TPACKET_ALIGNMENT = 0x10
2242 TPACKET_HDRLEN = 0x34
2243 TP_STATUS_AVAILABLE = 0x0
2244 TP_STATUS_BLK_TMO = 0x20
2245 TP_STATUS_COPY = 0x2
2246 TP_STATUS_CSUMNOTREADY = 0x8
2247 TP_STATUS_CSUM_VALID = 0x80
2248 TP_STATUS_KERNEL = 0x0
2249 TP_STATUS_LOSING = 0x4
2250 TP_STATUS_SENDING = 0x2
2251 TP_STATUS_SEND_REQUEST = 0x1
2252 TP_STATUS_TS_RAW_HARDWARE = -0x80000000
2253 TP_STATUS_TS_SOFTWARE = 0x20000000
2254 TP_STATUS_TS_SYS_HARDWARE = 0x40000000
2255 TP_STATUS_USER = 0x1
2256 TP_STATUS_VLAN_TPID_VALID = 0x40
2257 TP_STATUS_VLAN_VALID = 0x10
2258 TP_STATUS_WRONG_FORMAT = 0x4
2259 TRACEFS_MAGIC = 0x74726163
18802260 TS_COMM_LEN = 0x20
18812261 TUNATTACHFILTER = 0x801054d5
18822262 TUNDETACHFILTER = 0x801054d6
18882268 TUNGETVNETHDRSZ = 0x400454d7
18892269 TUNGETVNETLE = 0x400454dd
18902270 TUNSETDEBUG = 0x800454c9
2271 TUNSETFILTEREBPF = 0x400454e1
18912272 TUNSETGROUP = 0x800454ce
18922273 TUNSETIFF = 0x800454ca
18932274 TUNSETIFINDEX = 0x800454da
18982279 TUNSETPERSIST = 0x800454cb
18992280 TUNSETQUEUE = 0x800454d9
19002281 TUNSETSNDBUF = 0x800454d4
2282 TUNSETSTEERINGEBPF = 0x400454e0
19012283 TUNSETTXFILTER = 0x800454d1
19022284 TUNSETVNETBE = 0x800454de
19032285 TUNSETVNETHDRSZ = 0x800454d8
19042286 TUNSETVNETLE = 0x800454dc
2287 UBI_IOCATT = 0x80186f40
2288 UBI_IOCDET = 0x80046f41
2289 UBI_IOCEBCH = 0x80044f02
2290 UBI_IOCEBER = 0x80044f01
2291 UBI_IOCEBISMAP = 0x40044f05
2292 UBI_IOCEBMAP = 0x80084f03
2293 UBI_IOCEBUNMAP = 0x80044f04
2294 UBI_IOCMKVOL = 0x80986f00
2295 UBI_IOCRMVOL = 0x80046f01
2296 UBI_IOCRNVOL = 0x91106f03
2297 UBI_IOCRSVOL = 0x800c6f02
2298 UBI_IOCSETVOLPROP = 0x80104f06
2299 UBI_IOCVOLCRBLK = 0x80804f07
2300 UBI_IOCVOLRMBLK = 0x20004f08
2301 UBI_IOCVOLUP = 0x80084f00
2302 UDF_SUPER_MAGIC = 0x15013346
19052303 UMOUNT_NOFOLLOW = 0x8
2304 USBDEVICE_SUPER_MAGIC = 0x9fa2
2305 UTIME_NOW = 0x3fffffff
2306 UTIME_OMIT = 0x3ffffffe
2307 V9FS_MAGIC = 0x1021997
19062308 VDISCARD = 0x10
19072309 VEOF = 0x4
19082310 VEOL = 0x6
19322334 WALL = 0x40000000
19332335 WCLONE = 0x80000000
19342336 WCONTINUED = 0x8
2337 WDIOC_GETBOOTSTATUS = 0x40045702
2338 WDIOC_GETPRETIMEOUT = 0x40045709
2339 WDIOC_GETSTATUS = 0x40045701
2340 WDIOC_GETSUPPORT = 0x40285700
2341 WDIOC_GETTEMP = 0x40045703
2342 WDIOC_GETTIMELEFT = 0x4004570a
2343 WDIOC_GETTIMEOUT = 0x40045707
2344 WDIOC_KEEPALIVE = 0x40045705
2345 WDIOC_SETOPTIONS = 0x40045704
2346 WDIOC_SETPRETIMEOUT = 0xc0045708
2347 WDIOC_SETTIMEOUT = 0xc0045706
19352348 WEXITED = 0x4
2349 WIN_ACKMEDIACHANGE = 0xdb
2350 WIN_CHECKPOWERMODE1 = 0xe5
2351 WIN_CHECKPOWERMODE2 = 0x98
2352 WIN_DEVICE_RESET = 0x8
2353 WIN_DIAGNOSE = 0x90
2354 WIN_DOORLOCK = 0xde
2355 WIN_DOORUNLOCK = 0xdf
2356 WIN_DOWNLOAD_MICROCODE = 0x92
2357 WIN_FLUSH_CACHE = 0xe7
2358 WIN_FLUSH_CACHE_EXT = 0xea
2359 WIN_FORMAT = 0x50
2360 WIN_GETMEDIASTATUS = 0xda
2361 WIN_IDENTIFY = 0xec
2362 WIN_IDENTIFY_DMA = 0xee
2363 WIN_IDLEIMMEDIATE = 0xe1
2364 WIN_INIT = 0x60
2365 WIN_MEDIAEJECT = 0xed
2366 WIN_MULTREAD = 0xc4
2367 WIN_MULTREAD_EXT = 0x29
2368 WIN_MULTWRITE = 0xc5
2369 WIN_MULTWRITE_EXT = 0x39
2370 WIN_NOP = 0x0
2371 WIN_PACKETCMD = 0xa0
2372 WIN_PIDENTIFY = 0xa1
2373 WIN_POSTBOOT = 0xdc
2374 WIN_PREBOOT = 0xdd
2375 WIN_QUEUED_SERVICE = 0xa2
2376 WIN_READ = 0x20
2377 WIN_READDMA = 0xc8
2378 WIN_READDMA_EXT = 0x25
2379 WIN_READDMA_ONCE = 0xc9
2380 WIN_READDMA_QUEUED = 0xc7
2381 WIN_READDMA_QUEUED_EXT = 0x26
2382 WIN_READ_BUFFER = 0xe4
2383 WIN_READ_EXT = 0x24
2384 WIN_READ_LONG = 0x22
2385 WIN_READ_LONG_ONCE = 0x23
2386 WIN_READ_NATIVE_MAX = 0xf8
2387 WIN_READ_NATIVE_MAX_EXT = 0x27
2388 WIN_READ_ONCE = 0x21
2389 WIN_RECAL = 0x10
2390 WIN_RESTORE = 0x10
2391 WIN_SECURITY_DISABLE = 0xf6
2392 WIN_SECURITY_ERASE_PREPARE = 0xf3
2393 WIN_SECURITY_ERASE_UNIT = 0xf4
2394 WIN_SECURITY_FREEZE_LOCK = 0xf5
2395 WIN_SECURITY_SET_PASS = 0xf1
2396 WIN_SECURITY_UNLOCK = 0xf2
2397 WIN_SEEK = 0x70
2398 WIN_SETFEATURES = 0xef
2399 WIN_SETIDLE1 = 0xe3
2400 WIN_SETIDLE2 = 0x97
2401 WIN_SETMULT = 0xc6
2402 WIN_SET_MAX = 0xf9
2403 WIN_SET_MAX_EXT = 0x37
2404 WIN_SLEEPNOW1 = 0xe6
2405 WIN_SLEEPNOW2 = 0x99
2406 WIN_SMART = 0xb0
2407 WIN_SPECIFY = 0x91
2408 WIN_SRST = 0x8
2409 WIN_STANDBY = 0xe2
2410 WIN_STANDBY2 = 0x96
2411 WIN_STANDBYNOW1 = 0xe0
2412 WIN_STANDBYNOW2 = 0x94
2413 WIN_VERIFY = 0x40
2414 WIN_VERIFY_EXT = 0x42
2415 WIN_VERIFY_ONCE = 0x41
2416 WIN_WRITE = 0x30
2417 WIN_WRITEDMA = 0xca
2418 WIN_WRITEDMA_EXT = 0x35
2419 WIN_WRITEDMA_ONCE = 0xcb
2420 WIN_WRITEDMA_QUEUED = 0xcc
2421 WIN_WRITEDMA_QUEUED_EXT = 0x36
2422 WIN_WRITE_BUFFER = 0xe8
2423 WIN_WRITE_EXT = 0x34
2424 WIN_WRITE_LONG = 0x32
2425 WIN_WRITE_LONG_ONCE = 0x33
2426 WIN_WRITE_ONCE = 0x31
2427 WIN_WRITE_SAME = 0xe9
2428 WIN_WRITE_VERIFY = 0x3c
19362429 WNOHANG = 0x1
19372430 WNOTHREAD = 0x20000000
19382431 WNOWAIT = 0x1000000
19422435 XATTR_CREATE = 0x1
19432436 XATTR_REPLACE = 0x2
19442437 XCASE = 0x4000
2438 XDP_COPY = 0x2
2439 XDP_FLAGS_DRV_MODE = 0x4
2440 XDP_FLAGS_HW_MODE = 0x8
2441 XDP_FLAGS_MASK = 0xf
2442 XDP_FLAGS_MODES = 0xe
2443 XDP_FLAGS_SKB_MODE = 0x2
2444 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
2445 XDP_MMAP_OFFSETS = 0x1
2446 XDP_PGOFF_RX_RING = 0x0
2447 XDP_PGOFF_TX_RING = 0x80000000
2448 XDP_RX_RING = 0x2
2449 XDP_SHARED_UMEM = 0x1
2450 XDP_STATISTICS = 0x7
2451 XDP_TX_RING = 0x3
2452 XDP_UMEM_COMPLETION_RING = 0x6
2453 XDP_UMEM_FILL_RING = 0x5
2454 XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
2455 XDP_UMEM_PGOFF_FILL_RING = 0x100000000
2456 XDP_UMEM_REG = 0x4
2457 XDP_ZEROCOPY = 0x4
2458 XENFS_SUPER_MAGIC = 0xabba1974
2459 XFS_SUPER_MAGIC = 0x58465342
19452460 XTABS = 0xc00
2461 ZSMALLOC_MAGIC = 0x58295829
19462462 )
19472463
19482464 // Errors
21222638 )
21232639
21242640 // Error table
2125 var errors = [...]string{
2126 1: "operation not permitted",
2127 2: "no such file or directory",
2128 3: "no such process",
2129 4: "interrupted system call",
2130 5: "input/output error",
2131 6: "no such device or address",
2132 7: "argument list too long",
2133 8: "exec format error",
2134 9: "bad file descriptor",
2135 10: "no child processes",
2136 11: "resource temporarily unavailable",
2137 12: "cannot allocate memory",
2138 13: "permission denied",
2139 14: "bad address",
2140 15: "block device required",
2141 16: "device or resource busy",
2142 17: "file exists",
2143 18: "invalid cross-device link",
2144 19: "no such device",
2145 20: "not a directory",
2146 21: "is a directory",
2147 22: "invalid argument",
2148 23: "too many open files in system",
2149 24: "too many open files",
2150 25: "inappropriate ioctl for device",
2151 26: "text file busy",
2152 27: "file too large",
2153 28: "no space left on device",
2154 29: "illegal seek",
2155 30: "read-only file system",
2156 31: "too many links",
2157 32: "broken pipe",
2158 33: "numerical argument out of domain",
2159 34: "numerical result out of range",
2160 35: "resource deadlock avoided",
2161 36: "file name too long",
2162 37: "no locks available",
2163 38: "function not implemented",
2164 39: "directory not empty",
2165 40: "too many levels of symbolic links",
2166 42: "no message of desired type",
2167 43: "identifier removed",
2168 44: "channel number out of range",
2169 45: "level 2 not synchronized",
2170 46: "level 3 halted",
2171 47: "level 3 reset",
2172 48: "link number out of range",
2173 49: "protocol driver not attached",
2174 50: "no CSI structure available",
2175 51: "level 2 halted",
2176 52: "invalid exchange",
2177 53: "invalid request descriptor",
2178 54: "exchange full",
2179 55: "no anode",
2180 56: "invalid request code",
2181 57: "invalid slot",
2182 58: "file locking deadlock error",
2183 59: "bad font file format",
2184 60: "device not a stream",
2185 61: "no data available",
2186 62: "timer expired",
2187 63: "out of streams resources",
2188 64: "machine is not on the network",
2189 65: "package not installed",
2190 66: "object is remote",
2191 67: "link has been severed",
2192 68: "advertise error",
2193 69: "srmount error",
2194 70: "communication error on send",
2195 71: "protocol error",
2196 72: "multihop attempted",
2197 73: "RFS specific error",
2198 74: "bad message",
2199 75: "value too large for defined data type",
2200 76: "name not unique on network",
2201 77: "file descriptor in bad state",
2202 78: "remote address changed",
2203 79: "can not access a needed shared library",
2204 80: "accessing a corrupted shared library",
2205 81: ".lib section in a.out corrupted",
2206 82: "attempting to link in too many shared libraries",
2207 83: "cannot exec a shared library directly",
2208 84: "invalid or incomplete multibyte or wide character",
2209 85: "interrupted system call should be restarted",
2210 86: "streams pipe error",
2211 87: "too many users",
2212 88: "socket operation on non-socket",
2213 89: "destination address required",
2214 90: "message too long",
2215 91: "protocol wrong type for socket",
2216 92: "protocol not available",
2217 93: "protocol not supported",
2218 94: "socket type not supported",
2219 95: "operation not supported",
2220 96: "protocol family not supported",
2221 97: "address family not supported by protocol",
2222 98: "address already in use",
2223 99: "cannot assign requested address",
2224 100: "network is down",
2225 101: "network is unreachable",
2226 102: "network dropped connection on reset",
2227 103: "software caused connection abort",
2228 104: "connection reset by peer",
2229 105: "no buffer space available",
2230 106: "transport endpoint is already connected",
2231 107: "transport endpoint is not connected",
2232 108: "cannot send after transport endpoint shutdown",
2233 109: "too many references: cannot splice",
2234 110: "connection timed out",
2235 111: "connection refused",
2236 112: "host is down",
2237 113: "no route to host",
2238 114: "operation already in progress",
2239 115: "operation now in progress",
2240 116: "stale file handle",
2241 117: "structure needs cleaning",
2242 118: "not a XENIX named type file",
2243 119: "no XENIX semaphores available",
2244 120: "is a named type file",
2245 121: "remote I/O error",
2246 122: "disk quota exceeded",
2247 123: "no medium found",
2248 124: "wrong medium type",
2249 125: "operation canceled",
2250 126: "required key not available",
2251 127: "key has expired",
2252 128: "key has been revoked",
2253 129: "key was rejected by service",
2254 130: "owner died",
2255 131: "state not recoverable",
2256 132: "operation not possible due to RF-kill",
2257 133: "memory page has hardware error",
2641 var errorList = [...]struct {
2642 num syscall.Errno
2643 name string
2644 desc string
2645 }{
2646 {1, "EPERM", "operation not permitted"},
2647 {2, "ENOENT", "no such file or directory"},
2648 {3, "ESRCH", "no such process"},
2649 {4, "EINTR", "interrupted system call"},
2650 {5, "EIO", "input/output error"},
2651 {6, "ENXIO", "no such device or address"},
2652 {7, "E2BIG", "argument list too long"},
2653 {8, "ENOEXEC", "exec format error"},
2654 {9, "EBADF", "bad file descriptor"},
2655 {10, "ECHILD", "no child processes"},
2656 {11, "EAGAIN", "resource temporarily unavailable"},
2657 {12, "ENOMEM", "cannot allocate memory"},
2658 {13, "EACCES", "permission denied"},
2659 {14, "EFAULT", "bad address"},
2660 {15, "ENOTBLK", "block device required"},
2661 {16, "EBUSY", "device or resource busy"},
2662 {17, "EEXIST", "file exists"},
2663 {18, "EXDEV", "invalid cross-device link"},
2664 {19, "ENODEV", "no such device"},
2665 {20, "ENOTDIR", "not a directory"},
2666 {21, "EISDIR", "is a directory"},
2667 {22, "EINVAL", "invalid argument"},
2668 {23, "ENFILE", "too many open files in system"},
2669 {24, "EMFILE", "too many open files"},
2670 {25, "ENOTTY", "inappropriate ioctl for device"},
2671 {26, "ETXTBSY", "text file busy"},
2672 {27, "EFBIG", "file too large"},
2673 {28, "ENOSPC", "no space left on device"},
2674 {29, "ESPIPE", "illegal seek"},
2675 {30, "EROFS", "read-only file system"},
2676 {31, "EMLINK", "too many links"},
2677 {32, "EPIPE", "broken pipe"},
2678 {33, "EDOM", "numerical argument out of domain"},
2679 {34, "ERANGE", "numerical result out of range"},
2680 {35, "EDEADLK", "resource deadlock avoided"},
2681 {36, "ENAMETOOLONG", "file name too long"},
2682 {37, "ENOLCK", "no locks available"},
2683 {38, "ENOSYS", "function not implemented"},
2684 {39, "ENOTEMPTY", "directory not empty"},
2685 {40, "ELOOP", "too many levels of symbolic links"},
2686 {42, "ENOMSG", "no message of desired type"},
2687 {43, "EIDRM", "identifier removed"},
2688 {44, "ECHRNG", "channel number out of range"},
2689 {45, "EL2NSYNC", "level 2 not synchronized"},
2690 {46, "EL3HLT", "level 3 halted"},
2691 {47, "EL3RST", "level 3 reset"},
2692 {48, "ELNRNG", "link number out of range"},
2693 {49, "EUNATCH", "protocol driver not attached"},
2694 {50, "ENOCSI", "no CSI structure available"},
2695 {51, "EL2HLT", "level 2 halted"},
2696 {52, "EBADE", "invalid exchange"},
2697 {53, "EBADR", "invalid request descriptor"},
2698 {54, "EXFULL", "exchange full"},
2699 {55, "ENOANO", "no anode"},
2700 {56, "EBADRQC", "invalid request code"},
2701 {57, "EBADSLT", "invalid slot"},
2702 {58, "EDEADLOCK", "file locking deadlock error"},
2703 {59, "EBFONT", "bad font file format"},
2704 {60, "ENOSTR", "device not a stream"},
2705 {61, "ENODATA", "no data available"},
2706 {62, "ETIME", "timer expired"},
2707 {63, "ENOSR", "out of streams resources"},
2708 {64, "ENONET", "machine is not on the network"},
2709 {65, "ENOPKG", "package not installed"},
2710 {66, "EREMOTE", "object is remote"},
2711 {67, "ENOLINK", "link has been severed"},
2712 {68, "EADV", "advertise error"},
2713 {69, "ESRMNT", "srmount error"},
2714 {70, "ECOMM", "communication error on send"},
2715 {71, "EPROTO", "protocol error"},
2716 {72, "EMULTIHOP", "multihop attempted"},
2717 {73, "EDOTDOT", "RFS specific error"},
2718 {74, "EBADMSG", "bad message"},
2719 {75, "EOVERFLOW", "value too large for defined data type"},
2720 {76, "ENOTUNIQ", "name not unique on network"},
2721 {77, "EBADFD", "file descriptor in bad state"},
2722 {78, "EREMCHG", "remote address changed"},
2723 {79, "ELIBACC", "can not access a needed shared library"},
2724 {80, "ELIBBAD", "accessing a corrupted shared library"},
2725 {81, "ELIBSCN", ".lib section in a.out corrupted"},
2726 {82, "ELIBMAX", "attempting to link in too many shared libraries"},
2727 {83, "ELIBEXEC", "cannot exec a shared library directly"},
2728 {84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
2729 {85, "ERESTART", "interrupted system call should be restarted"},
2730 {86, "ESTRPIPE", "streams pipe error"},
2731 {87, "EUSERS", "too many users"},
2732 {88, "ENOTSOCK", "socket operation on non-socket"},
2733 {89, "EDESTADDRREQ", "destination address required"},
2734 {90, "EMSGSIZE", "message too long"},
2735 {91, "EPROTOTYPE", "protocol wrong type for socket"},
2736 {92, "ENOPROTOOPT", "protocol not available"},
2737 {93, "EPROTONOSUPPORT", "protocol not supported"},
2738 {94, "ESOCKTNOSUPPORT", "socket type not supported"},
2739 {95, "ENOTSUP", "operation not supported"},
2740 {96, "EPFNOSUPPORT", "protocol family not supported"},
2741 {97, "EAFNOSUPPORT", "address family not supported by protocol"},
2742 {98, "EADDRINUSE", "address already in use"},
2743 {99, "EADDRNOTAVAIL", "cannot assign requested address"},
2744 {100, "ENETDOWN", "network is down"},
2745 {101, "ENETUNREACH", "network is unreachable"},
2746 {102, "ENETRESET", "network dropped connection on reset"},
2747 {103, "ECONNABORTED", "software caused connection abort"},
2748 {104, "ECONNRESET", "connection reset by peer"},
2749 {105, "ENOBUFS", "no buffer space available"},
2750 {106, "EISCONN", "transport endpoint is already connected"},
2751 {107, "ENOTCONN", "transport endpoint is not connected"},
2752 {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
2753 {109, "ETOOMANYREFS", "too many references: cannot splice"},
2754 {110, "ETIMEDOUT", "connection timed out"},
2755 {111, "ECONNREFUSED", "connection refused"},
2756 {112, "EHOSTDOWN", "host is down"},
2757 {113, "EHOSTUNREACH", "no route to host"},
2758 {114, "EALREADY", "operation already in progress"},
2759 {115, "EINPROGRESS", "operation now in progress"},
2760 {116, "ESTALE", "stale file handle"},
2761 {117, "EUCLEAN", "structure needs cleaning"},
2762 {118, "ENOTNAM", "not a XENIX named type file"},
2763 {119, "ENAVAIL", "no XENIX semaphores available"},
2764 {120, "EISNAM", "is a named type file"},
2765 {121, "EREMOTEIO", "remote I/O error"},
2766 {122, "EDQUOT", "disk quota exceeded"},
2767 {123, "ENOMEDIUM", "no medium found"},
2768 {124, "EMEDIUMTYPE", "wrong medium type"},
2769 {125, "ECANCELED", "operation canceled"},
2770 {126, "ENOKEY", "required key not available"},
2771 {127, "EKEYEXPIRED", "key has expired"},
2772 {128, "EKEYREVOKED", "key has been revoked"},
2773 {129, "EKEYREJECTED", "key was rejected by service"},
2774 {130, "EOWNERDEAD", "owner died"},
2775 {131, "ENOTRECOVERABLE", "state not recoverable"},
2776 {132, "ERFKILL", "operation not possible due to RF-kill"},
2777 {133, "EHWPOISON", "memory page has hardware error"},
22582778 }
22592779
22602780 // Signal table
2261 var signals = [...]string{
2262 1: "hangup",
2263 2: "interrupt",
2264 3: "quit",
2265 4: "illegal instruction",
2266 5: "trace/breakpoint trap",
2267 6: "aborted",
2268 7: "bus error",
2269 8: "floating point exception",
2270 9: "killed",
2271 10: "user defined signal 1",
2272 11: "segmentation fault",
2273 12: "user defined signal 2",
2274 13: "broken pipe",
2275 14: "alarm clock",
2276 15: "terminated",
2277 16: "stack fault",
2278 17: "child exited",
2279 18: "continued",
2280 19: "stopped (signal)",
2281 20: "stopped",
2282 21: "stopped (tty input)",
2283 22: "stopped (tty output)",
2284 23: "urgent I/O condition",
2285 24: "CPU time limit exceeded",
2286 25: "file size limit exceeded",
2287 26: "virtual timer expired",
2288 27: "profiling timer expired",
2289 28: "window changed",
2290 29: "I/O possible",
2291 30: "power failure",
2292 31: "bad system call",
2781 var signalList = [...]struct {
2782 num syscall.Signal
2783 name string
2784 desc string
2785 }{
2786 {1, "SIGHUP", "hangup"},
2787 {2, "SIGINT", "interrupt"},
2788 {3, "SIGQUIT", "quit"},
2789 {4, "SIGILL", "illegal instruction"},
2790 {5, "SIGTRAP", "trace/breakpoint trap"},
2791 {6, "SIGABRT", "aborted"},
2792 {7, "SIGBUS", "bus error"},
2793 {8, "SIGFPE", "floating point exception"},
2794 {9, "SIGKILL", "killed"},
2795 {10, "SIGUSR1", "user defined signal 1"},
2796 {11, "SIGSEGV", "segmentation fault"},
2797 {12, "SIGUSR2", "user defined signal 2"},
2798 {13, "SIGPIPE", "broken pipe"},
2799 {14, "SIGALRM", "alarm clock"},
2800 {15, "SIGTERM", "terminated"},
2801 {16, "SIGSTKFLT", "stack fault"},
2802 {17, "SIGCHLD", "child exited"},
2803 {18, "SIGCONT", "continued"},
2804 {19, "SIGSTOP", "stopped (signal)"},
2805 {20, "SIGTSTP", "stopped"},
2806 {21, "SIGTTIN", "stopped (tty input)"},
2807 {22, "SIGTTOU", "stopped (tty output)"},
2808 {23, "SIGURG", "urgent I/O condition"},
2809 {24, "SIGXCPU", "CPU time limit exceeded"},
2810 {25, "SIGXFSZ", "file size limit exceeded"},
2811 {26, "SIGVTALRM", "virtual timer expired"},
2812 {27, "SIGPROF", "profiling timer expired"},
2813 {28, "SIGWINCH", "window changed"},
2814 {29, "SIGIO", "I/O possible"},
2815 {30, "SIGPWR", "power failure"},
2816 {31, "SIGSYS", "bad system call"},
22932817 }
22
33 // +build ppc64le,linux
44
5 // Created by cgo -godefs - DO NOT EDIT
5 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
66 // cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
77
88 package unix
1010 import "syscall"
1111
1212 const (
13 AAFS_MAGIC = 0x5a3c69f0
14 ADFS_SUPER_MAGIC = 0xadf5
15 AFFS_SUPER_MAGIC = 0xadff
16 AFS_FS_MAGIC = 0x6b414653
17 AFS_SUPER_MAGIC = 0x5346414f
1318 AF_ALG = 0x26
1419 AF_APPLETALK = 0x5
1520 AF_ASH = 0x12
5863 AF_VSOCK = 0x28
5964 AF_WANPIPE = 0x19
6065 AF_X25 = 0x9
66 AF_XDP = 0x2c
6167 ALG_OP_DECRYPT = 0x0
6268 ALG_OP_ENCRYPT = 0x1
6369 ALG_SET_AEAD_ASSOCLEN = 0x4
6571 ALG_SET_IV = 0x2
6672 ALG_SET_KEY = 0x1
6773 ALG_SET_OP = 0x3
74 ANON_INODE_FS_MAGIC = 0x9041934
6875 ARPHRD_6LOWPAN = 0x339
6976 ARPHRD_ADAPT = 0x108
7077 ARPHRD_APPLETLK = 0x8
120127 ARPHRD_PPP = 0x200
121128 ARPHRD_PRONET = 0x4
122129 ARPHRD_RAWHDLC = 0x206
130 ARPHRD_RAWIP = 0x207
123131 ARPHRD_ROSE = 0x10e
124132 ARPHRD_RSRVD = 0x104
125133 ARPHRD_SIT = 0x308
131139 ARPHRD_VOID = 0xffff
132140 ARPHRD_VSOCKMON = 0x33a
133141 ARPHRD_X25 = 0x10f
142 AUTOFS_SUPER_MAGIC = 0x187
134143 B0 = 0x0
135144 B1000000 = 0x17
136145 B110 = 0x3
162171 B75 = 0x2
163172 B921600 = 0x16
164173 B9600 = 0xd
174 BALLOON_KVM_MAGIC = 0x13661366
175 BDEVFS_MAGIC = 0x62646576
176 BINFMTFS_MAGIC = 0x42494e4d
165177 BLKBSZGET = 0x40081270
166178 BLKBSZSET = 0x80081271
167179 BLKFLSBUF = 0x20001261
186198 BPF_AND = 0x50
187199 BPF_B = 0x10
188200 BPF_DIV = 0x30
201 BPF_FS_MAGIC = 0xcafe4a11
189202 BPF_H = 0x8
190203 BPF_IMM = 0x0
191204 BPF_IND = 0x40
227240 BS0 = 0x0
228241 BS1 = 0x8000
229242 BSDLY = 0x8000
243 BTRFS_SUPER_MAGIC = 0x9123683e
244 BTRFS_TEST_MAGIC = 0x73727279
230245 CAN_BCM = 0x2
231246 CAN_EFF_FLAG = 0x80000000
232247 CAN_EFF_ID_BITS = 0x1d
250265 CBAUD = 0xff
251266 CBAUDEX = 0x0
252267 CFLUSH = 0xf
268 CGROUP2_SUPER_MAGIC = 0x63677270
269 CGROUP_SUPER_MAGIC = 0x27e0eb
253270 CIBAUD = 0xff0000
254271 CLOCAL = 0x8000
255272 CLOCK_BOOTTIME = 0x7
292309 CLONE_VFORK = 0x4000
293310 CLONE_VM = 0x100
294311 CMSPAR = 0x40000000
312 CODA_SUPER_MAGIC = 0x73757245
295313 CR0 = 0x0
296314 CR1 = 0x1000
297315 CR2 = 0x2000
298316 CR3 = 0x3000
317 CRAMFS_MAGIC = 0x28cd3d45
299318 CRDLY = 0x3000
300319 CREAD = 0x800
301320 CRTSCTS = 0x80000000
310329 CSTOP = 0x13
311330 CSTOPB = 0x400
312331 CSUSP = 0x1a
332 DAXFS_MAGIC = 0x64646178
333 DEBUGFS_MAGIC = 0x64626720
334 DEVPTS_SUPER_MAGIC = 0x1cd1
313335 DT_BLK = 0x6
314336 DT_CHR = 0x2
315337 DT_DIR = 0x4
326348 ECHOKE = 0x1
327349 ECHONL = 0x10
328350 ECHOPRT = 0x20
351 ECRYPTFS_SUPER_MAGIC = 0xf15f
329352 EFD_CLOEXEC = 0x80000
330353 EFD_NONBLOCK = 0x800
331354 EFD_SEMAPHORE = 0x1
355 EFIVARFS_MAGIC = 0xde5e81e4
356 EFS_SUPER_MAGIC = 0x414a53
332357 ENCODING_DEFAULT = 0x0
333358 ENCODING_FM_MARK = 0x3
334359 ENCODING_FM_SPACE = 0x4
389414 ETH_P_DSA = 0x1b
390415 ETH_P_ECONET = 0x18
391416 ETH_P_EDSA = 0xdada
417 ETH_P_ERSPAN = 0x88be
418 ETH_P_ERSPAN2 = 0x22eb
392419 ETH_P_FCOE = 0x8906
393420 ETH_P_FIP = 0x8914
394421 ETH_P_HDLC = 0x19
397424 ETH_P_IEEE802154 = 0xf6
398425 ETH_P_IEEEPUP = 0xa00
399426 ETH_P_IEEEPUPAT = 0xa01
427 ETH_P_IFE = 0xed3e
400428 ETH_P_IP = 0x800
401429 ETH_P_IPV6 = 0x86dd
402430 ETH_P_IPX = 0x8137
407435 ETH_P_LOOP = 0x60
408436 ETH_P_LOOPBACK = 0x9000
409437 ETH_P_MACSEC = 0x88e5
438 ETH_P_MAP = 0xf9
410439 ETH_P_MOBITEX = 0x15
411440 ETH_P_MPLS_MC = 0x8848
412441 ETH_P_MPLS_UC = 0x8847
413442 ETH_P_MVRP = 0x88f5
414443 ETH_P_NCSI = 0x88f8
444 ETH_P_NSH = 0x894f
415445 ETH_P_PAE = 0x888e
416446 ETH_P_PAUSE = 0x8808
417447 ETH_P_PHONET = 0xf5
419449 ETH_P_PPP_DISC = 0x8863
420450 ETH_P_PPP_MP = 0x8
421451 ETH_P_PPP_SES = 0x8864
452 ETH_P_PREAUTH = 0x88c7
422453 ETH_P_PRP = 0x88fb
423454 ETH_P_PUP = 0x200
424455 ETH_P_PUPAT = 0x201
439470 ETH_P_WCCP = 0x883e
440471 ETH_P_X25 = 0x805
441472 ETH_P_XDSA = 0xf8
473 EXABYTE_ENABLE_NEST = 0xf0
474 EXT2_SUPER_MAGIC = 0xef53
475 EXT3_SUPER_MAGIC = 0xef53
476 EXT4_SUPER_MAGIC = 0xef53
442477 EXTA = 0xe
443478 EXTB = 0xf
444479 EXTPROC = 0x10000000
480 F2FS_SUPER_MAGIC = 0xf2f52010
445481 FALLOC_FL_COLLAPSE_RANGE = 0x8
446482 FALLOC_FL_INSERT_RANGE = 0x20
447483 FALLOC_FL_KEEP_SIZE = 0x1
462498 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
463499 FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
464500 FS_ENCRYPTION_MODE_INVALID = 0x0
501 FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
502 FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
465503 FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
466504 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
467505 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
475513 FS_POLICY_FLAGS_PAD_8 = 0x1
476514 FS_POLICY_FLAGS_PAD_MASK = 0x3
477515 FS_POLICY_FLAGS_VALID = 0x3
516 FUTEXFS_SUPER_MAGIC = 0xbad1dea
517 F_ADD_SEALS = 0x409
478518 F_DUPFD = 0x0
479519 F_DUPFD_CLOEXEC = 0x406
480520 F_EXLCK = 0x4
487527 F_GETOWN_EX = 0x10
488528 F_GETPIPE_SZ = 0x408
489529 F_GETSIG = 0xb
530 F_GET_FILE_RW_HINT = 0x40d
531 F_GET_RW_HINT = 0x40b
532 F_GET_SEALS = 0x40a
490533 F_LOCK = 0x1
491534 F_NOTIFY = 0x402
492535 F_OFD_GETLK = 0x24
494537 F_OFD_SETLKW = 0x26
495538 F_OK = 0x0
496539 F_RDLCK = 0x0
540 F_SEAL_GROW = 0x4
541 F_SEAL_SEAL = 0x1
542 F_SEAL_SHRINK = 0x2
543 F_SEAL_WRITE = 0x8
497544 F_SETFD = 0x2
498545 F_SETFL = 0x4
499546 F_SETLEASE = 0x400
505552 F_SETOWN_EX = 0xf
506553 F_SETPIPE_SZ = 0x407
507554 F_SETSIG = 0xa
555 F_SET_FILE_RW_HINT = 0x40e
556 F_SET_RW_HINT = 0x40c
508557 F_SHLCK = 0x8
509558 F_TEST = 0x3
510559 F_TLOCK = 0x2
526575 GENL_UNS_ADMIN_PERM = 0x10
527576 GRND_NONBLOCK = 0x1
528577 GRND_RANDOM = 0x2
578 HDIO_DRIVE_CMD = 0x31f
579 HDIO_DRIVE_CMD_AEB = 0x31e
580 HDIO_DRIVE_CMD_HDR_SIZE = 0x4
581 HDIO_DRIVE_HOB_HDR_SIZE = 0x8
582 HDIO_DRIVE_RESET = 0x31c
583 HDIO_DRIVE_TASK = 0x31e
584 HDIO_DRIVE_TASKFILE = 0x31d
585 HDIO_DRIVE_TASK_HDR_SIZE = 0x8
586 HDIO_GETGEO = 0x301
587 HDIO_GET_32BIT = 0x309
588 HDIO_GET_ACOUSTIC = 0x30f
589 HDIO_GET_ADDRESS = 0x310
590 HDIO_GET_BUSSTATE = 0x31a
591 HDIO_GET_DMA = 0x30b
592 HDIO_GET_IDENTITY = 0x30d
593 HDIO_GET_KEEPSETTINGS = 0x308
594 HDIO_GET_MULTCOUNT = 0x304
595 HDIO_GET_NICE = 0x30c
596 HDIO_GET_NOWERR = 0x30a
597 HDIO_GET_QDMA = 0x305
598 HDIO_GET_UNMASKINTR = 0x302
599 HDIO_GET_WCACHE = 0x30e
600 HDIO_OBSOLETE_IDENTITY = 0x307
601 HDIO_SCAN_HWIF = 0x328
602 HDIO_SET_32BIT = 0x324
603 HDIO_SET_ACOUSTIC = 0x32c
604 HDIO_SET_ADDRESS = 0x32f
605 HDIO_SET_BUSSTATE = 0x32d
606 HDIO_SET_DMA = 0x326
607 HDIO_SET_KEEPSETTINGS = 0x323
608 HDIO_SET_MULTCOUNT = 0x321
609 HDIO_SET_NICE = 0x329
610 HDIO_SET_NOWERR = 0x325
611 HDIO_SET_PIO_MODE = 0x327
612 HDIO_SET_QDMA = 0x32e
613 HDIO_SET_UNMASKINTR = 0x322
614 HDIO_SET_WCACHE = 0x32b
615 HDIO_SET_XFER = 0x306
616 HDIO_TRISTATE_HWIF = 0x31b
617 HDIO_UNREGISTER_HWIF = 0x32a
618 HOSTFS_SUPER_MAGIC = 0xc0ffee
619 HPFS_SUPER_MAGIC = 0xf995e849
620 HUGETLBFS_MAGIC = 0x958458f6
529621 HUPCL = 0x4000
530622 IBSHIFT = 0x10
531623 ICANON = 0x100
545637 IFA_F_STABLE_PRIVACY = 0x800
546638 IFA_F_TEMPORARY = 0x1
547639 IFA_F_TENTATIVE = 0x40
548 IFA_MAX = 0x8
640 IFA_MAX = 0xa
549641 IFF_ALLMULTI = 0x200
550642 IFF_ATTACH_QUEUE = 0x200
551643 IFF_AUTOMEDIA = 0x4000
560652 IFF_MASTER = 0x400
561653 IFF_MULTICAST = 0x1000
562654 IFF_MULTI_QUEUE = 0x100
655 IFF_NAPI = 0x10
656 IFF_NAPI_FRAGS = 0x20
563657 IFF_NOARP = 0x80
564658 IFF_NOFILTER = 0x1000
565659 IFF_NOTRAILERS = 0x20
622716 IN_OPEN = 0x20
623717 IN_Q_OVERFLOW = 0x4000
624718 IN_UNMOUNT = 0x2000
719 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
625720 IPPROTO_AH = 0x33
626721 IPPROTO_BEETPH = 0x5e
627722 IPPROTO_COMP = 0x6c
669764 IPV6_DONTFRAG = 0x3e
670765 IPV6_DROP_MEMBERSHIP = 0x15
671766 IPV6_DSTOPTS = 0x3b
767 IPV6_FREEBIND = 0x4e
672768 IPV6_HDRINCL = 0x24
673769 IPV6_HOPLIMIT = 0x34
674770 IPV6_HOPOPTS = 0x36
773869 IP_UNICAST_IF = 0x32
774870 IP_XFRM_POLICY = 0x11
775871 ISIG = 0x80
872 ISOFS_SUPER_MAGIC = 0x9660
776873 ISTRIP = 0x20
777874 IUCLC = 0x1000
778875 IUTF8 = 0x4000
779876 IXANY = 0x800
780877 IXOFF = 0x400
781878 IXON = 0x200
879 JFFS2_SUPER_MAGIC = 0x72b6
880 KEXEC_ARCH_386 = 0x30000
881 KEXEC_ARCH_68K = 0x40000
882 KEXEC_ARCH_AARCH64 = 0xb70000
883 KEXEC_ARCH_ARM = 0x280000
884 KEXEC_ARCH_DEFAULT = 0x0
885 KEXEC_ARCH_IA_64 = 0x320000
886 KEXEC_ARCH_MASK = 0xffff0000
887 KEXEC_ARCH_MIPS = 0x80000
888 KEXEC_ARCH_MIPS_LE = 0xa0000
889 KEXEC_ARCH_PPC = 0x140000
890 KEXEC_ARCH_PPC64 = 0x150000
891 KEXEC_ARCH_S390 = 0x160000
892 KEXEC_ARCH_SH = 0x2a0000
893 KEXEC_ARCH_X86_64 = 0x3e0000
894 KEXEC_FILE_NO_INITRAMFS = 0x4
895 KEXEC_FILE_ON_CRASH = 0x2
896 KEXEC_FILE_UNLOAD = 0x1
897 KEXEC_ON_CRASH = 0x1
898 KEXEC_PRESERVE_CONTEXT = 0x2
899 KEXEC_SEGMENT_MAX = 0x10
782900 KEYCTL_ASSUME_AUTHORITY = 0x10
783901 KEYCTL_CHOWN = 0x4
784902 KEYCTL_CLEAR = 0x7
793911 KEYCTL_JOIN_SESSION_KEYRING = 0x1
794912 KEYCTL_LINK = 0x8
795913 KEYCTL_NEGATE = 0xd
914 KEYCTL_PKEY_DECRYPT = 0x1a
915 KEYCTL_PKEY_ENCRYPT = 0x19
916 KEYCTL_PKEY_QUERY = 0x18
917 KEYCTL_PKEY_SIGN = 0x1b
918 KEYCTL_PKEY_VERIFY = 0x1c
796919 KEYCTL_READ = 0xb
797920 KEYCTL_REJECT = 0x13
798921 KEYCTL_RESTRICT_KEYRING = 0x1d
802925 KEYCTL_SETPERM = 0x5
803926 KEYCTL_SET_REQKEY_KEYRING = 0xe
804927 KEYCTL_SET_TIMEOUT = 0xf
928 KEYCTL_SUPPORTS_DECRYPT = 0x2
929 KEYCTL_SUPPORTS_ENCRYPT = 0x1
930 KEYCTL_SUPPORTS_SIGN = 0x4
931 KEYCTL_SUPPORTS_VERIFY = 0x8
805932 KEYCTL_UNLINK = 0x9
806933 KEYCTL_UPDATE = 0x2
807934 KEY_REQKEY_DEFL_DEFAULT = 0x0
843970 MADV_FREE = 0x8
844971 MADV_HUGEPAGE = 0xe
845972 MADV_HWPOISON = 0x64
973 MADV_KEEPONFORK = 0x13
846974 MADV_MERGEABLE = 0xc
847975 MADV_NOHUGEPAGE = 0xf
848976 MADV_NORMAL = 0x0
851979 MADV_SEQUENTIAL = 0x2
852980 MADV_UNMERGEABLE = 0xd
853981 MADV_WILLNEED = 0x3
982 MADV_WIPEONFORK = 0x12
854983 MAP_ANON = 0x20
855984 MAP_ANONYMOUS = 0x20
856985 MAP_DENYWRITE = 0x800
857986 MAP_EXECUTABLE = 0x1000
858987 MAP_FILE = 0x0
859988 MAP_FIXED = 0x10
989 MAP_FIXED_NOREPLACE = 0x100000
860990 MAP_GROWSDOWN = 0x100
861991 MAP_HUGETLB = 0x40000
862992 MAP_HUGE_MASK = 0x3f
867997 MAP_POPULATE = 0x8000
868998 MAP_PRIVATE = 0x2
869999 MAP_SHARED = 0x1
1000 MAP_SHARED_VALIDATE = 0x3
8701001 MAP_STACK = 0x20000
8711002 MAP_TYPE = 0xf
8721003 MCL_CURRENT = 0x2000
8731004 MCL_FUTURE = 0x4000
8741005 MCL_ONFAULT = 0x8000
1006 MFD_ALLOW_SEALING = 0x2
1007 MFD_CLOEXEC = 0x1
1008 MFD_HUGETLB = 0x4
1009 MFD_HUGE_16GB = -0x78000000
1010 MFD_HUGE_16MB = 0x60000000
1011 MFD_HUGE_1GB = 0x78000000
1012 MFD_HUGE_1MB = 0x50000000
1013 MFD_HUGE_256MB = 0x70000000
1014 MFD_HUGE_2GB = 0x7c000000
1015 MFD_HUGE_2MB = 0x54000000
1016 MFD_HUGE_32MB = 0x64000000
1017 MFD_HUGE_512KB = 0x4c000000
1018 MFD_HUGE_512MB = 0x74000000
1019 MFD_HUGE_64KB = 0x40000000
1020 MFD_HUGE_8MB = 0x5c000000
1021 MFD_HUGE_MASK = 0x3f
1022 MFD_HUGE_SHIFT = 0x1a
1023 MINIX2_SUPER_MAGIC = 0x2468
1024 MINIX2_SUPER_MAGIC2 = 0x2478
1025 MINIX3_SUPER_MAGIC = 0x4d5a
1026 MINIX_SUPER_MAGIC = 0x137f
1027 MINIX_SUPER_MAGIC2 = 0x138f
8751028 MNT_DETACH = 0x2
8761029 MNT_EXPIRE = 0x4
8771030 MNT_FORCE = 0x1
1031 MODULE_INIT_IGNORE_MODVERSIONS = 0x1
1032 MODULE_INIT_IGNORE_VERMAGIC = 0x2
1033 MSDOS_SUPER_MAGIC = 0x4d44
8781034 MSG_BATCH = 0x40000
8791035 MSG_CMSG_CLOEXEC = 0x40000000
8801036 MSG_CONFIRM = 0x800
8961052 MSG_TRYHARD = 0x4
8971053 MSG_WAITALL = 0x100
8981054 MSG_WAITFORONE = 0x10000
1055 MSG_ZEROCOPY = 0x4000000
8991056 MS_ACTIVE = 0x40000000
9001057 MS_ASYNC = 0x1
9011058 MS_BIND = 0x1000
9331090 MS_SYNCHRONOUS = 0x10
9341091 MS_UNBINDABLE = 0x20000
9351092 MS_VERBOSE = 0x8000
1093 MTD_INODE_FS_MAGIC = 0x11307854
9361094 NAME_MAX = 0xff
1095 NCP_SUPER_MAGIC = 0x564c
9371096 NETLINK_ADD_MEMBERSHIP = 0x1
9381097 NETLINK_AUDIT = 0x9
9391098 NETLINK_BROADCAST_ERROR = 0x4
9471106 NETLINK_FIB_LOOKUP = 0xa
9481107 NETLINK_FIREWALL = 0x3
9491108 NETLINK_GENERIC = 0x10
1109 NETLINK_GET_STRICT_CHK = 0xc
9501110 NETLINK_INET_DIAG = 0x4
9511111 NETLINK_IP6_FW = 0xd
9521112 NETLINK_ISCSI = 0x8
9681128 NETLINK_UNUSED = 0x1
9691129 NETLINK_USERSOCK = 0x2
9701130 NETLINK_XFRM = 0x6
1131 NETNSA_MAX = 0x3
1132 NETNSA_NSID_NOT_ASSIGNED = -0x1
1133 NFNETLINK_V0 = 0x0
1134 NFNLGRP_ACCT_QUOTA = 0x8
1135 NFNLGRP_CONNTRACK_DESTROY = 0x3
1136 NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
1137 NFNLGRP_CONNTRACK_EXP_NEW = 0x4
1138 NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
1139 NFNLGRP_CONNTRACK_NEW = 0x1
1140 NFNLGRP_CONNTRACK_UPDATE = 0x2
1141 NFNLGRP_MAX = 0x9
1142 NFNLGRP_NFTABLES = 0x7
1143 NFNLGRP_NFTRACE = 0x9
1144 NFNLGRP_NONE = 0x0
1145 NFNL_BATCH_MAX = 0x1
1146 NFNL_MSG_BATCH_BEGIN = 0x10
1147 NFNL_MSG_BATCH_END = 0x11
1148 NFNL_NFA_NEST = 0x8000
1149 NFNL_SUBSYS_ACCT = 0x7
1150 NFNL_SUBSYS_COUNT = 0xc
1151 NFNL_SUBSYS_CTHELPER = 0x9
1152 NFNL_SUBSYS_CTNETLINK = 0x1
1153 NFNL_SUBSYS_CTNETLINK_EXP = 0x2
1154 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
1155 NFNL_SUBSYS_IPSET = 0x6
1156 NFNL_SUBSYS_NFTABLES = 0xa
1157 NFNL_SUBSYS_NFT_COMPAT = 0xb
1158 NFNL_SUBSYS_NONE = 0x0
1159 NFNL_SUBSYS_OSF = 0x5
1160 NFNL_SUBSYS_QUEUE = 0x3
1161 NFNL_SUBSYS_ULOG = 0x4
1162 NFS_SUPER_MAGIC = 0x6969
1163 NILFS_SUPER_MAGIC = 0x3434
9711164 NL0 = 0x0
9721165 NL1 = 0x100
9731166 NL2 = 0x200
9971190 NLM_F_EXCL = 0x200
9981191 NLM_F_MATCH = 0x200
9991192 NLM_F_MULTI = 0x2
1193 NLM_F_NONREC = 0x100
10001194 NLM_F_REPLACE = 0x100
10011195 NLM_F_REQUEST = 0x1
10021196 NLM_F_ROOT = 0x100
10031197 NOFLSH = 0x80000000
1198 NSFS_MAGIC = 0x6e736673
1199 OCFS2_SUPER_MAGIC = 0x7461636f
10041200 OCRNL = 0x8
10051201 OFDEL = 0x80
10061202 OFILL = 0x40
10081204 ONLCR = 0x2
10091205 ONLRET = 0x20
10101206 ONOCR = 0x10
1207 OPENPROM_SUPER_MAGIC = 0x9fa1
10111208 OPOST = 0x1
1209 OVERLAYFS_SUPER_MAGIC = 0x794c7630
10121210 O_ACCMODE = 0x3
10131211 O_APPEND = 0x400
10141212 O_ASYNC = 0x2000
10541252 PACKET_FASTROUTE = 0x6
10551253 PACKET_HDRLEN = 0xb
10561254 PACKET_HOST = 0x0
1255 PACKET_IGNORE_OUTGOING = 0x17
10571256 PACKET_KERNEL = 0x7
10581257 PACKET_LOOPBACK = 0x5
10591258 PACKET_LOSS = 0xe
10931292 PERF_EVENT_IOC_DISABLE = 0x20002401
10941293 PERF_EVENT_IOC_ENABLE = 0x20002400
10951294 PERF_EVENT_IOC_ID = 0x40082407
1295 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
10961296 PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
10971297 PERF_EVENT_IOC_PERIOD = 0x80082404
1298 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
10981299 PERF_EVENT_IOC_REFRESH = 0x20002402
10991300 PERF_EVENT_IOC_RESET = 0x20002403
11001301 PERF_EVENT_IOC_SET_BPF = 0x80042408
11011302 PERF_EVENT_IOC_SET_FILTER = 0x80082406
11021303 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
1304 PIPEFS_MAGIC = 0x50495045
1305 PPPIOCATTACH = 0x8004743d
1306 PPPIOCATTCHAN = 0x80047438
1307 PPPIOCCONNECT = 0x8004743a
1308 PPPIOCDETACH = 0x8004743c
1309 PPPIOCDISCONN = 0x20007439
1310 PPPIOCGASYNCMAP = 0x40047458
1311 PPPIOCGCHAN = 0x40047437
1312 PPPIOCGDEBUG = 0x40047441
1313 PPPIOCGFLAGS = 0x4004745a
1314 PPPIOCGIDLE = 0x4010743f
1315 PPPIOCGL2TPSTATS = 0x40487436
1316 PPPIOCGMRU = 0x40047453
1317 PPPIOCGNPMODE = 0xc008744c
1318 PPPIOCGRASYNCMAP = 0x40047455
1319 PPPIOCGUNIT = 0x40047456
1320 PPPIOCGXASYNCMAP = 0x40207450
1321 PPPIOCNEWUNIT = 0xc004743e
1322 PPPIOCSACTIVE = 0x80107446
1323 PPPIOCSASYNCMAP = 0x80047457
1324 PPPIOCSCOMPRESS = 0x8010744d
1325 PPPIOCSDEBUG = 0x80047440
1326 PPPIOCSFLAGS = 0x80047459
1327 PPPIOCSMAXCID = 0x80047451
1328 PPPIOCSMRRU = 0x8004743b
1329 PPPIOCSMRU = 0x80047452
1330 PPPIOCSNPMODE = 0x8008744b
1331 PPPIOCSPASS = 0x80107447
1332 PPPIOCSRASYNCMAP = 0x80047454
1333 PPPIOCSXASYNCMAP = 0x8020744f
1334 PPPIOCXFERUNIT = 0x2000744e
11031335 PRIO_PGRP = 0x1
11041336 PRIO_PROCESS = 0x0
11051337 PRIO_USER = 0x2
1338 PROC_SUPER_MAGIC = 0x9fa0
11061339 PROT_EXEC = 0x4
11071340 PROT_GROWSDOWN = 0x1000000
11081341 PROT_GROWSUP = 0x2000000
11461379 PR_GET_PDEATHSIG = 0x2
11471380 PR_GET_SECCOMP = 0x15
11481381 PR_GET_SECUREBITS = 0x1b
1382 PR_GET_SPECULATION_CTRL = 0x34
11491383 PR_GET_THP_DISABLE = 0x2a
11501384 PR_GET_TID_ADDRESS = 0x28
11511385 PR_GET_TIMERSLACK = 0x1e
11881422 PR_SET_NO_NEW_PRIVS = 0x26
11891423 PR_SET_PDEATHSIG = 0x1
11901424 PR_SET_PTRACER = 0x59616d61
1191 PR_SET_PTRACER_ANY = -0x1
1425 PR_SET_PTRACER_ANY = 0xffffffffffffffff
11921426 PR_SET_SECCOMP = 0x16
11931427 PR_SET_SECUREBITS = 0x1c
1428 PR_SET_SPECULATION_CTRL = 0x35
11941429 PR_SET_THP_DISABLE = 0x29
11951430 PR_SET_TIMERSLACK = 0x1d
11961431 PR_SET_TIMING = 0xe
11971432 PR_SET_TSC = 0x1a
11981433 PR_SET_UNALIGN = 0x6
1434 PR_SPEC_DISABLE = 0x4
1435 PR_SPEC_ENABLE = 0x2
1436 PR_SPEC_FORCE_DISABLE = 0x8
1437 PR_SPEC_INDIRECT_BRANCH = 0x1
1438 PR_SPEC_NOT_AFFECTED = 0x0
1439 PR_SPEC_PRCTL = 0x1
1440 PR_SPEC_STORE_BYPASS = 0x0
1441 PR_SVE_GET_VL = 0x33
1442 PR_SVE_SET_VL = 0x32
1443 PR_SVE_SET_VL_ONEXEC = 0x40000
1444 PR_SVE_VL_INHERIT = 0x20000
1445 PR_SVE_VL_LEN_MASK = 0xffff
11991446 PR_TASK_PERF_EVENTS_DISABLE = 0x1f
12001447 PR_TASK_PERF_EVENTS_ENABLE = 0x20
12011448 PR_TIMING_STATISTICAL = 0x0
12041451 PR_TSC_SIGSEGV = 0x2
12051452 PR_UNALIGN_NOPRINT = 0x1
12061453 PR_UNALIGN_SIGBUS = 0x2
1454 PSTOREFS_MAGIC = 0x6165676c
12071455 PTRACE_ATTACH = 0x10
12081456 PTRACE_CONT = 0x7
12091457 PTRACE_DETACH = 0x11
12491497 PTRACE_POKETEXT = 0x4
12501498 PTRACE_POKEUSR = 0x6
12511499 PTRACE_SECCOMP_GET_FILTER = 0x420c
1500 PTRACE_SECCOMP_GET_METADATA = 0x420d
12521501 PTRACE_SEIZE = 0x4206
12531502 PTRACE_SETEVRREGS = 0x15
12541503 PTRACE_SETFPREGS = 0xf
12641513 PTRACE_SINGLEBLOCK = 0x100
12651514 PTRACE_SINGLESTEP = 0x9
12661515 PTRACE_SYSCALL = 0x18
1516 PTRACE_SYSEMU = 0x1d
1517 PTRACE_SYSEMU_SINGLESTEP = 0x1e
12671518 PTRACE_TRACEME = 0x0
12681519 PT_CCR = 0x26
12691520 PT_CTR = 0x23
13181569 PT_VSR0 = 0x96
13191570 PT_VSR31 = 0xd4
13201571 PT_XER = 0x25
1572 QNX4_SUPER_MAGIC = 0x2f
1573 QNX6_SUPER_MAGIC = 0x68191122
1574 RAMFS_MAGIC = 0x858458f6
1575 RDTGROUP_SUPER_MAGIC = 0x7655821
1576 REISERFS_SUPER_MAGIC = 0x52654973
1577 RENAME_EXCHANGE = 0x2
1578 RENAME_NOREPLACE = 0x1
1579 RENAME_WHITEOUT = 0x4
13211580 RLIMIT_AS = 0x9
13221581 RLIMIT_CORE = 0x4
13231582 RLIMIT_CPU = 0x0
13341593 RLIMIT_RTTIME = 0xf
13351594 RLIMIT_SIGPENDING = 0xb
13361595 RLIMIT_STACK = 0x3
1337 RLIM_INFINITY = -0x1
1596 RLIM_INFINITY = 0xffffffffffffffff
13381597 RTAX_ADVMSS = 0x8
13391598 RTAX_CC_ALGO = 0x10
13401599 RTAX_CWND = 0x7
1600 RTAX_FASTOPEN_NO_COOKIE = 0x11
13411601 RTAX_FEATURES = 0xc
13421602 RTAX_FEATURE_ALLFRAG = 0x8
13431603 RTAX_FEATURE_ECN = 0x1
13481608 RTAX_INITCWND = 0xb
13491609 RTAX_INITRWND = 0xe
13501610 RTAX_LOCK = 0x1
1351 RTAX_MAX = 0x10
1611 RTAX_MAX = 0x11
13521612 RTAX_MTU = 0x2
13531613 RTAX_QUICKACK = 0xf
13541614 RTAX_REORDERING = 0x9
13591619 RTAX_UNSPEC = 0x0
13601620 RTAX_WINDOW = 0x3
13611621 RTA_ALIGNTO = 0x4
1362 RTA_MAX = 0x1a
1622 RTA_MAX = 0x1d
13631623 RTCF_DIRECTSRC = 0x4000000
13641624 RTCF_DOREDIRECT = 0x1000000
13651625 RTCF_LOG = 0x2000000
13661626 RTCF_MASQ = 0x400000
13671627 RTCF_NAT = 0x800000
13681628 RTCF_VALVE = 0x200000
1629 RTC_AF = 0x20
1630 RTC_AIE_OFF = 0x20007002
1631 RTC_AIE_ON = 0x20007001
1632 RTC_ALM_READ = 0x40247008
1633 RTC_ALM_SET = 0x80247007
1634 RTC_EPOCH_READ = 0x4008700d
1635 RTC_EPOCH_SET = 0x8008700e
1636 RTC_IRQF = 0x80
1637 RTC_IRQP_READ = 0x4008700b
1638 RTC_IRQP_SET = 0x8008700c
1639 RTC_MAX_FREQ = 0x2000
1640 RTC_PF = 0x40
1641 RTC_PIE_OFF = 0x20007006
1642 RTC_PIE_ON = 0x20007005
1643 RTC_PLL_GET = 0x40207011
1644 RTC_PLL_SET = 0x80207012
1645 RTC_RD_TIME = 0x40247009
1646 RTC_SET_TIME = 0x8024700a
1647 RTC_UF = 0x10
1648 RTC_UIE_OFF = 0x20007004
1649 RTC_UIE_ON = 0x20007003
1650 RTC_VL_CLR = 0x20007014
1651 RTC_VL_READ = 0x40047013
1652 RTC_WIE_OFF = 0x20007010
1653 RTC_WIE_ON = 0x2000700f
1654 RTC_WKALM_RD = 0x40287010
1655 RTC_WKALM_SET = 0x8028700f
13691656 RTF_ADDRCLASSMASK = 0xf8000000
13701657 RTF_ADDRCONF = 0x40000
13711658 RTF_ALLONLINK = 0x20000
14001687 RTM_DELACTION = 0x31
14011688 RTM_DELADDR = 0x15
14021689 RTM_DELADDRLABEL = 0x49
1690 RTM_DELCHAIN = 0x65
14031691 RTM_DELLINK = 0x11
14041692 RTM_DELMDB = 0x55
14051693 RTM_DELNEIGH = 0x1d
14201708 RTM_GETADDR = 0x16
14211709 RTM_GETADDRLABEL = 0x4a
14221710 RTM_GETANYCAST = 0x3e
1711 RTM_GETCHAIN = 0x66
14231712 RTM_GETDCB = 0x4e
14241713 RTM_GETLINK = 0x12
14251714 RTM_GETMDB = 0x56
14341723 RTM_GETSTATS = 0x5e
14351724 RTM_GETTCLASS = 0x2a
14361725 RTM_GETTFILTER = 0x2e
1437 RTM_MAX = 0x63
1726 RTM_MAX = 0x67
14381727 RTM_NEWACTION = 0x30
14391728 RTM_NEWADDR = 0x14
14401729 RTM_NEWADDRLABEL = 0x48
14411730 RTM_NEWCACHEREPORT = 0x60
1731 RTM_NEWCHAIN = 0x64
14421732 RTM_NEWLINK = 0x10
14431733 RTM_NEWMDB = 0x54
14441734 RTM_NEWNDUSEROPT = 0x44
14531743 RTM_NEWSTATS = 0x5c
14541744 RTM_NEWTCLASS = 0x28
14551745 RTM_NEWTFILTER = 0x2c
1456 RTM_NR_FAMILIES = 0x15
1457 RTM_NR_MSGTYPES = 0x54
1746 RTM_NR_FAMILIES = 0x16
1747 RTM_NR_MSGTYPES = 0x58
14581748 RTM_SETDCB = 0x4f
14591749 RTM_SETLINK = 0x13
14601750 RTM_SETNEIGHTBL = 0x43
14681758 RTNH_F_UNRESOLVED = 0x20
14691759 RTN_MAX = 0xb
14701760 RTPROT_BABEL = 0x2a
1761 RTPROT_BGP = 0xba
14711762 RTPROT_BIRD = 0xc
14721763 RTPROT_BOOT = 0x3
14731764 RTPROT_DHCP = 0x10
14741765 RTPROT_DNROUTED = 0xd
1766 RTPROT_EIGRP = 0xc0
14751767 RTPROT_GATED = 0x8
1768 RTPROT_ISIS = 0xbb
14761769 RTPROT_KERNEL = 0x2
14771770 RTPROT_MROUTED = 0x11
14781771 RTPROT_MRT = 0xa
14791772 RTPROT_NTK = 0xf
1773 RTPROT_OSPF = 0xbc
14801774 RTPROT_RA = 0x9
14811775 RTPROT_REDIRECT = 0x1
1776 RTPROT_RIP = 0xbd
14821777 RTPROT_STATIC = 0x4
14831778 RTPROT_UNSPEC = 0x0
14841779 RTPROT_XORP = 0xe
14981793 SCM_TIMESTAMPING_OPT_STATS = 0x36
14991794 SCM_TIMESTAMPING_PKTINFO = 0x3a
15001795 SCM_TIMESTAMPNS = 0x23
1796 SCM_TXTIME = 0x3d
15011797 SCM_WIFI_STATUS = 0x29
1798 SC_LOG_FLUSH = 0x100000
15021799 SECCOMP_MODE_DISABLED = 0x0
15031800 SECCOMP_MODE_FILTER = 0x2
15041801 SECCOMP_MODE_STRICT = 0x1
1802 SECURITYFS_MAGIC = 0x73636673
1803 SELINUX_MAGIC = 0xf97cff8c
1804 SFD_CLOEXEC = 0x80000
1805 SFD_NONBLOCK = 0x800
15051806 SHUT_RD = 0x0
15061807 SHUT_RDWR = 0x2
15071808 SHUT_WR = 0x1
15521853 SIOCGMIIPHY = 0x8947
15531854 SIOCGMIIREG = 0x8948
15541855 SIOCGPGRP = 0x8904
1856 SIOCGPPPCSTATS = 0x89f2
1857 SIOCGPPPSTATS = 0x89f0
1858 SIOCGPPPVER = 0x89f1
15551859 SIOCGRARP = 0x8961
15561860 SIOCGSKNS = 0x894c
15571861 SIOCGSTAMP = 0x8906
15861890 SIOCSPGRP = 0x8902
15871891 SIOCSRARP = 0x8962
15881892 SIOCWANDEV = 0x894a
1893 SMACK_MAGIC = 0x43415d53
1894 SMART_AUTOSAVE = 0xd2
1895 SMART_AUTO_OFFLINE = 0xdb
1896 SMART_DISABLE = 0xd9
1897 SMART_ENABLE = 0xd8
1898 SMART_HCYL_PASS = 0xc2
1899 SMART_IMMEDIATE_OFFLINE = 0xd4
1900 SMART_LCYL_PASS = 0x4f
1901 SMART_READ_LOG_SECTOR = 0xd5
1902 SMART_READ_THRESHOLDS = 0xd1
1903 SMART_READ_VALUES = 0xd0
1904 SMART_SAVE = 0xd3
1905 SMART_STATUS = 0xda
1906 SMART_WRITE_LOG_SECTOR = 0xd6
1907 SMART_WRITE_THRESHOLDS = 0xd7
1908 SMB_SUPER_MAGIC = 0x517b
1909 SOCKFS_MAGIC = 0x534f434b
15891910 SOCK_CLOEXEC = 0x80000
15901911 SOCK_DCCP = 0x6
15911912 SOCK_DGRAM = 0x2
16221943 SOL_SOCKET = 0x1
16231944 SOL_TCP = 0x6
16241945 SOL_TIPC = 0x10f
1946 SOL_TLS = 0x11a
16251947 SOL_X25 = 0x106
1948 SOL_XDP = 0x11b
16261949 SOMAXCONN = 0x80
16271950 SO_ACCEPTCONN = 0x1e
16281951 SO_ATTACH_BPF = 0x32
16812004 SO_TIMESTAMP = 0x1d
16822005 SO_TIMESTAMPING = 0x25
16832006 SO_TIMESTAMPNS = 0x23
2007 SO_TXTIME = 0x3d
16842008 SO_TYPE = 0x3
16852009 SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
16862010 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
16902014 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
16912015 SO_VM_SOCKETS_TRUSTED = 0x5
16922016 SO_WIFI_STATUS = 0x29
2017 SO_ZEROCOPY = 0x3c
16932018 SPLICE_F_GIFT = 0x8
16942019 SPLICE_F_MORE = 0x4
16952020 SPLICE_F_MOVE = 0x1
16962021 SPLICE_F_NONBLOCK = 0x2
2022 SQUASHFS_MAGIC = 0x73717368
2023 STACK_END_MAGIC = 0x57ac6e9d
2024 STATX_ALL = 0xfff
2025 STATX_ATIME = 0x20
2026 STATX_ATTR_APPEND = 0x20
2027 STATX_ATTR_AUTOMOUNT = 0x1000
2028 STATX_ATTR_COMPRESSED = 0x4
2029 STATX_ATTR_ENCRYPTED = 0x800
2030 STATX_ATTR_IMMUTABLE = 0x10
2031 STATX_ATTR_NODUMP = 0x40
2032 STATX_BASIC_STATS = 0x7ff
2033 STATX_BLOCKS = 0x400
2034 STATX_BTIME = 0x800
2035 STATX_CTIME = 0x80
2036 STATX_GID = 0x10
2037 STATX_INO = 0x100
2038 STATX_MODE = 0x2
2039 STATX_MTIME = 0x40
2040 STATX_NLINK = 0x4
2041 STATX_SIZE = 0x200
2042 STATX_TYPE = 0x1
2043 STATX_UID = 0x8
2044 STATX__RESERVED = 0x80000000
2045 SYNC_FILE_RANGE_WAIT_AFTER = 0x4
2046 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
2047 SYNC_FILE_RANGE_WRITE = 0x2
2048 SYSFS_MAGIC = 0x62656572
16972049 S_BLKSIZE = 0x200
16982050 S_IEXEC = 0x40
16992051 S_IFBLK = 0x6000
17312083 TASKSTATS_GENL_NAME = "TASKSTATS"
17322084 TASKSTATS_GENL_VERSION = 0x1
17332085 TASKSTATS_TYPE_MAX = 0x6
1734 TASKSTATS_VERSION = 0x8
2086 TASKSTATS_VERSION = 0x9
17352087 TCFLSH = 0x2000741f
17362088 TCGETA = 0x40147417
17372089 TCGETS = 0x402c7413
17542106 TCP_DEFER_ACCEPT = 0x9
17552107 TCP_FASTOPEN = 0x17
17562108 TCP_FASTOPEN_CONNECT = 0x1e
2109 TCP_FASTOPEN_KEY = 0x21
2110 TCP_FASTOPEN_NO_COOKIE = 0x22
17572111 TCP_INFO = 0xb
17582112 TCP_KEEPCNT = 0x6
17592113 TCP_KEEPIDLE = 0x4
17632117 TCP_MAXWIN = 0xffff
17642118 TCP_MAX_WINSHIFT = 0xe
17652119 TCP_MD5SIG = 0xe
2120 TCP_MD5SIG_EXT = 0x20
2121 TCP_MD5SIG_FLAG_PREFIX = 0x1
17662122 TCP_MD5SIG_MAXKEYLEN = 0x50
17672123 TCP_MSS = 0x200
17682124 TCP_MSS_DEFAULT = 0x218
17832139 TCP_THIN_DUPACK = 0x11
17842140 TCP_THIN_LINEAR_TIMEOUTS = 0x10
17852141 TCP_TIMESTAMP = 0x18
2142 TCP_ULP = 0x1f
17862143 TCP_USER_TIMEOUT = 0x12
17872144 TCP_WINDOW_CLAMP = 0xa
17882145 TCSAFLUSH = 0x2
17952152 TCSETSF = 0x802c7416
17962153 TCSETSW = 0x802c7415
17972154 TCXONC = 0x2000741e
2155 TIMER_ABSTIME = 0x1
17982156 TIOCCBRK = 0x5428
17992157 TIOCCONS = 0x541d
18002158 TIOCEXCL = 0x540c
18042162 TIOCGETP = 0x40067408
18052163 TIOCGEXCL = 0x40045440
18062164 TIOCGICOUNT = 0x545d
2165 TIOCGISO7816 = 0x40285442
18072166 TIOCGLCKTRMIOS = 0x5456
18082167 TIOCGLTC = 0x40067474
18092168 TIOCGPGRP = 0x40047477
18642223 TIOCSETN = 0x8006740a
18652224 TIOCSETP = 0x80067409
18662225 TIOCSIG = 0x80045436
2226 TIOCSISO7816 = 0xc0285443
18672227 TIOCSLCKTRMIOS = 0x5457
18682228 TIOCSLTC = 0x80067475
18692229 TIOCSPGRP = 0x80047476
18762236 TIOCSTOP = 0x2000746f
18772237 TIOCSWINSZ = 0x80087467
18782238 TIOCVHANGUP = 0x5437
2239 TMPFS_MAGIC = 0x1021994
18792240 TOSTOP = 0x400000
2241 TPACKET_ALIGNMENT = 0x10
2242 TPACKET_HDRLEN = 0x34
2243 TP_STATUS_AVAILABLE = 0x0
2244 TP_STATUS_BLK_TMO = 0x20
2245 TP_STATUS_COPY = 0x2
2246 TP_STATUS_CSUMNOTREADY = 0x8
2247 TP_STATUS_CSUM_VALID = 0x80
2248 TP_STATUS_KERNEL = 0x0
2249 TP_STATUS_LOSING = 0x4
2250 TP_STATUS_SENDING = 0x2
2251 TP_STATUS_SEND_REQUEST = 0x1
2252 TP_STATUS_TS_RAW_HARDWARE = -0x80000000
2253 TP_STATUS_TS_SOFTWARE = 0x20000000
2254 TP_STATUS_TS_SYS_HARDWARE = 0x40000000
2255 TP_STATUS_USER = 0x1
2256 TP_STATUS_VLAN_TPID_VALID = 0x40
2257 TP_STATUS_VLAN_VALID = 0x10
2258 TP_STATUS_WRONG_FORMAT = 0x4
2259 TRACEFS_MAGIC = 0x74726163
18802260 TS_COMM_LEN = 0x20
18812261 TUNATTACHFILTER = 0x801054d5
18822262 TUNDETACHFILTER = 0x801054d6
18882268 TUNGETVNETHDRSZ = 0x400454d7
18892269 TUNGETVNETLE = 0x400454dd
18902270 TUNSETDEBUG = 0x800454c9
2271 TUNSETFILTEREBPF = 0x400454e1
18912272 TUNSETGROUP = 0x800454ce
18922273 TUNSETIFF = 0x800454ca
18932274 TUNSETIFINDEX = 0x800454da
18982279 TUNSETPERSIST = 0x800454cb
18992280 TUNSETQUEUE = 0x800454d9
19002281 TUNSETSNDBUF = 0x800454d4
2282 TUNSETSTEERINGEBPF = 0x400454e0
19012283 TUNSETTXFILTER = 0x800454d1
19022284 TUNSETVNETBE = 0x800454de
19032285 TUNSETVNETHDRSZ = 0x800454d8
19042286 TUNSETVNETLE = 0x800454dc
2287 UBI_IOCATT = 0x80186f40
2288 UBI_IOCDET = 0x80046f41
2289 UBI_IOCEBCH = 0x80044f02
2290 UBI_IOCEBER = 0x80044f01
2291 UBI_IOCEBISMAP = 0x40044f05
2292 UBI_IOCEBMAP = 0x80084f03
2293 UBI_IOCEBUNMAP = 0x80044f04
2294 UBI_IOCMKVOL = 0x80986f00
2295 UBI_IOCRMVOL = 0x80046f01
2296 UBI_IOCRNVOL = 0x91106f03
2297 UBI_IOCRSVOL = 0x800c6f02
2298 UBI_IOCSETVOLPROP = 0x80104f06
2299 UBI_IOCVOLCRBLK = 0x80804f07
2300 UBI_IOCVOLRMBLK = 0x20004f08
2301 UBI_IOCVOLUP = 0x80084f00
2302 UDF_SUPER_MAGIC = 0x15013346
19052303 UMOUNT_NOFOLLOW = 0x8
2304 USBDEVICE_SUPER_MAGIC = 0x9fa2
2305 UTIME_NOW = 0x3fffffff
2306 UTIME_OMIT = 0x3ffffffe
2307 V9FS_MAGIC = 0x1021997
19062308 VDISCARD = 0x10
19072309 VEOF = 0x4
19082310 VEOL = 0x6
19322334 WALL = 0x40000000
19332335 WCLONE = 0x80000000
19342336 WCONTINUED = 0x8
2337 WDIOC_GETBOOTSTATUS = 0x40045702
2338 WDIOC_GETPRETIMEOUT = 0x40045709
2339 WDIOC_GETSTATUS = 0x40045701
2340 WDIOC_GETSUPPORT = 0x40285700
2341 WDIOC_GETTEMP = 0x40045703
2342 WDIOC_GETTIMELEFT = 0x4004570a
2343 WDIOC_GETTIMEOUT = 0x40045707
2344 WDIOC_KEEPALIVE = 0x40045705
2345 WDIOC_SETOPTIONS = 0x40045704
2346 WDIOC_SETPRETIMEOUT = 0xc0045708
2347 WDIOC_SETTIMEOUT = 0xc0045706
19352348 WEXITED = 0x4
2349 WIN_ACKMEDIACHANGE = 0xdb
2350 WIN_CHECKPOWERMODE1 = 0xe5
2351 WIN_CHECKPOWERMODE2 = 0x98
2352 WIN_DEVICE_RESET = 0x8
2353 WIN_DIAGNOSE = 0x90
2354 WIN_DOORLOCK = 0xde
2355 WIN_DOORUNLOCK = 0xdf
2356 WIN_DOWNLOAD_MICROCODE = 0x92
2357 WIN_FLUSH_CACHE = 0xe7
2358 WIN_FLUSH_CACHE_EXT = 0xea
2359 WIN_FORMAT = 0x50
2360 WIN_GETMEDIASTATUS = 0xda
2361 WIN_IDENTIFY = 0xec
2362 WIN_IDENTIFY_DMA = 0xee
2363 WIN_IDLEIMMEDIATE = 0xe1
2364 WIN_INIT = 0x60
2365 WIN_MEDIAEJECT = 0xed
2366 WIN_MULTREAD = 0xc4
2367 WIN_MULTREAD_EXT = 0x29
2368 WIN_MULTWRITE = 0xc5
2369 WIN_MULTWRITE_EXT = 0x39
2370 WIN_NOP = 0x0
2371 WIN_PACKETCMD = 0xa0
2372 WIN_PIDENTIFY = 0xa1
2373 WIN_POSTBOOT = 0xdc
2374 WIN_PREBOOT = 0xdd
2375 WIN_QUEUED_SERVICE = 0xa2
2376 WIN_READ = 0x20
2377 WIN_READDMA = 0xc8
2378 WIN_READDMA_EXT = 0x25
2379 WIN_READDMA_ONCE = 0xc9
2380 WIN_READDMA_QUEUED = 0xc7
2381 WIN_READDMA_QUEUED_EXT = 0x26
2382 WIN_READ_BUFFER = 0xe4
2383 WIN_READ_EXT = 0x24
2384 WIN_READ_LONG = 0x22
2385 WIN_READ_LONG_ONCE = 0x23
2386 WIN_READ_NATIVE_MAX = 0xf8
2387 WIN_READ_NATIVE_MAX_EXT = 0x27
2388 WIN_READ_ONCE = 0x21
2389 WIN_RECAL = 0x10
2390 WIN_RESTORE = 0x10
2391 WIN_SECURITY_DISABLE = 0xf6
2392 WIN_SECURITY_ERASE_PREPARE = 0xf3
2393 WIN_SECURITY_ERASE_UNIT = 0xf4
2394 WIN_SECURITY_FREEZE_LOCK = 0xf5
2395 WIN_SECURITY_SET_PASS = 0xf1
2396 WIN_SECURITY_UNLOCK = 0xf2
2397 WIN_SEEK = 0x70
2398 WIN_SETFEATURES = 0xef
2399 WIN_SETIDLE1 = 0xe3
2400 WIN_SETIDLE2 = 0x97
2401 WIN_SETMULT = 0xc6
2402 WIN_SET_MAX = 0xf9
2403 WIN_SET_MAX_EXT = 0x37
2404 WIN_SLEEPNOW1 = 0xe6
2405 WIN_SLEEPNOW2 = 0x99
2406 WIN_SMART = 0xb0
2407 WIN_SPECIFY = 0x91
2408 WIN_SRST = 0x8
2409 WIN_STANDBY = 0xe2
2410 WIN_STANDBY2 = 0x96
2411 WIN_STANDBYNOW1 = 0xe0
2412 WIN_STANDBYNOW2 = 0x94
2413 WIN_VERIFY = 0x40
2414 WIN_VERIFY_EXT = 0x42
2415 WIN_VERIFY_ONCE = 0x41
2416 WIN_WRITE = 0x30
2417 WIN_WRITEDMA = 0xca
2418 WIN_WRITEDMA_EXT = 0x35
2419 WIN_WRITEDMA_ONCE = 0xcb
2420 WIN_WRITEDMA_QUEUED = 0xcc
2421 WIN_WRITEDMA_QUEUED_EXT = 0x36
2422 WIN_WRITE_BUFFER = 0xe8
2423 WIN_WRITE_EXT = 0x34
2424 WIN_WRITE_LONG = 0x32
2425 WIN_WRITE_LONG_ONCE = 0x33
2426 WIN_WRITE_ONCE = 0x31
2427 WIN_WRITE_SAME = 0xe9
2428 WIN_WRITE_VERIFY = 0x3c
19362429 WNOHANG = 0x1
19372430 WNOTHREAD = 0x20000000
19382431 WNOWAIT = 0x1000000
19422435 XATTR_CREATE = 0x1
19432436 XATTR_REPLACE = 0x2
19442437 XCASE = 0x4000
2438 XDP_COPY = 0x2
2439 XDP_FLAGS_DRV_MODE = 0x4
2440 XDP_FLAGS_HW_MODE = 0x8
2441 XDP_FLAGS_MASK = 0xf
2442 XDP_FLAGS_MODES = 0xe
2443 XDP_FLAGS_SKB_MODE = 0x2
2444 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
2445 XDP_MMAP_OFFSETS = 0x1
2446 XDP_PGOFF_RX_RING = 0x0
2447 XDP_PGOFF_TX_RING = 0x80000000
2448 XDP_RX_RING = 0x2
2449 XDP_SHARED_UMEM = 0x1
2450 XDP_STATISTICS = 0x7
2451 XDP_TX_RING = 0x3
2452 XDP_UMEM_COMPLETION_RING = 0x6
2453 XDP_UMEM_FILL_RING = 0x5
2454 XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
2455 XDP_UMEM_PGOFF_FILL_RING = 0x100000000
2456 XDP_UMEM_REG = 0x4
2457 XDP_ZEROCOPY = 0x4
2458 XENFS_SUPER_MAGIC = 0xabba1974
2459 XFS_SUPER_MAGIC = 0x58465342
19452460 XTABS = 0xc00
2461 ZSMALLOC_MAGIC = 0x58295829
19462462 )
19472463
19482464 // Errors
21222638 )
21232639
21242640 // Error table
2125 var errors = [...]string{
2126 1: "operation not permitted",
2127 2: "no such file or directory",
2128 3: "no such process",
2129 4: "interrupted system call",
2130 5: "input/output error",
2131 6: "no such device or address",
2132 7: "argument list too long",
2133 8: "exec format error",
2134 9: "bad file descriptor",
2135 10: "no child processes",
2136 11: "resource temporarily unavailable",
2137 12: "cannot allocate memory",
2138 13: "permission denied",
2139 14: "bad address",
2140 15: "block device required",
2141 16: "device or resource busy",
2142 17: "file exists",
2143 18: "invalid cross-device link",
2144 19: "no such device",
2145 20: "not a directory",
2146 21: "is a directory",
2147 22: "invalid argument",
2148 23: "too many open files in system",
2149 24: "too many open files",
2150 25: "inappropriate ioctl for device",
2151 26: "text file busy",
2152 27: "file too large",
2153 28: "no space left on device",
2154 29: "illegal seek",
2155 30: "read-only file system",
2156 31: "too many links",
2157 32: "broken pipe",
2158 33: "numerical argument out of domain",
2159 34: "numerical result out of range",
2160 35: "resource deadlock avoided",
2161 36: "file name too long",
2162 37: "no locks available",
2163 38: "function not implemented",
2164 39: "directory not empty",
2165 40: "too many levels of symbolic links",
2166 42: "no message of desired type",
2167 43: "identifier removed",
2168 44: "channel number out of range",
2169 45: "level 2 not synchronized",
2170 46: "level 3 halted",
2171 47: "level 3 reset",
2172 48: "link number out of range",
2173 49: "protocol driver not attached",
2174 50: "no CSI structure available",
2175 51: "level 2 halted",
2176 52: "invalid exchange",
2177 53: "invalid request descriptor",
2178 54: "exchange full",
2179 55: "no anode",
2180 56: "invalid request code",
2181 57: "invalid slot",
2182 58: "file locking deadlock error",
2183 59: "bad font file format",
2184 60: "device not a stream",
2185 61: "no data available",
2186 62: "timer expired",
2187 63: "out of streams resources",
2188 64: "machine is not on the network",
2189 65: "package not installed",
2190 66: "object is remote",
2191 67: "link has been severed",
2192 68: "advertise error",
2193 69: "srmount error",
2194 70: "communication error on send",
2195 71: "protocol error",
2196 72: "multihop attempted",
2197 73: "RFS specific error",
2198 74: "bad message",
2199 75: "value too large for defined data type",
2200 76: "name not unique on network",
2201 77: "file descriptor in bad state",
2202 78: "remote address changed",
2203 79: "can not access a needed shared library",
2204 80: "accessing a corrupted shared library",
2205 81: ".lib section in a.out corrupted",
2206 82: "attempting to link in too many shared libraries",
2207 83: "cannot exec a shared library directly",
2208 84: "invalid or incomplete multibyte or wide character",
2209 85: "interrupted system call should be restarted",
2210 86: "streams pipe error",
2211 87: "too many users",
2212 88: "socket operation on non-socket",
2213 89: "destination address required",
2214 90: "message too long",
2215 91: "protocol wrong type for socket",
2216 92: "protocol not available",
2217 93: "protocol not supported",
2218 94: "socket type not supported",
2219 95: "operation not supported",
2220 96: "protocol family not supported",
2221 97: "address family not supported by protocol",
2222 98: "address already in use",
2223 99: "cannot assign requested address",
2224 100: "network is down",
2225 101: "network is unreachable",
2226 102: "network dropped connection on reset",
2227 103: "software caused connection abort",
2228 104: "connection reset by peer",
2229 105: "no buffer space available",
2230 106: "transport endpoint is already connected",
2231 107: "transport endpoint is not connected",
2232 108: "cannot send after transport endpoint shutdown",
2233 109: "too many references: cannot splice",
2234 110: "connection timed out",
2235 111: "connection refused",
2236 112: "host is down",
2237 113: "no route to host",
2238 114: "operation already in progress",
2239 115: "operation now in progress",
2240 116: "stale file handle",
2241 117: "structure needs cleaning",
2242 118: "not a XENIX named type file",
2243 119: "no XENIX semaphores available",
2244 120: "is a named type file",
2245 121: "remote I/O error",
2246 122: "disk quota exceeded",
2247 123: "no medium found",
2248 124: "wrong medium type",
2249 125: "operation canceled",
2250 126: "required key not available",
2251 127: "key has expired",
2252 128: "key has been revoked",
2253 129: "key was rejected by service",
2254 130: "owner died",
2255 131: "state not recoverable",
2256 132: "operation not possible due to RF-kill",
2257 133: "memory page has hardware error",
2641 var errorList = [...]struct {
2642 num syscall.Errno
2643 name string
2644 desc string
2645 }{
2646 {1, "EPERM", "operation not permitted"},
2647 {2, "ENOENT", "no such file or directory"},
2648 {3, "ESRCH", "no such process"},
2649 {4, "EINTR", "interrupted system call"},
2650 {5, "EIO", "input/output error"},
2651 {6, "ENXIO", "no such device or address"},
2652 {7, "E2BIG", "argument list too long"},
2653 {8, "ENOEXEC", "exec format error"},
2654 {9, "EBADF", "bad file descriptor"},
2655 {10, "ECHILD", "no child processes"},
2656 {11, "EAGAIN", "resource temporarily unavailable"},
2657 {12, "ENOMEM", "cannot allocate memory"},
2658 {13, "EACCES", "permission denied"},
2659 {14, "EFAULT", "bad address"},
2660 {15, "ENOTBLK", "block device required"},
2661 {16, "EBUSY", "device or resource busy"},
2662 {17, "EEXIST", "file exists"},
2663 {18, "EXDEV", "invalid cross-device link"},
2664 {19, "ENODEV", "no such device"},
2665 {20, "ENOTDIR", "not a directory"},
2666 {21, "EISDIR", "is a directory"},
2667 {22, "EINVAL", "invalid argument"},
2668 {23, "ENFILE", "too many open files in system"},
2669 {24, "EMFILE", "too many open files"},
2670 {25, "ENOTTY", "inappropriate ioctl for device"},
2671 {26, "ETXTBSY", "text file busy"},
2672 {27, "EFBIG", "file too large"},
2673 {28, "ENOSPC", "no space left on device"},
2674 {29, "ESPIPE", "illegal seek"},
2675 {30, "EROFS", "read-only file system"},
2676 {31, "EMLINK", "too many links"},
2677 {32, "EPIPE", "broken pipe"},
2678 {33, "EDOM", "numerical argument out of domain"},
2679 {34, "ERANGE", "numerical result out of range"},
2680 {35, "EDEADLK", "resource deadlock avoided"},
2681 {36, "ENAMETOOLONG", "file name too long"},
2682 {37, "ENOLCK", "no locks available"},
2683 {38, "ENOSYS", "function not implemented"},
2684 {39, "ENOTEMPTY", "directory not empty"},
2685 {40, "ELOOP", "too many levels of symbolic links"},
2686 {42, "ENOMSG", "no message of desired type"},
2687 {43, "EIDRM", "identifier removed"},
2688 {44, "ECHRNG", "channel number out of range"},
2689 {45, "EL2NSYNC", "level 2 not synchronized"},
2690 {46, "EL3HLT", "level 3 halted"},
2691 {47, "EL3RST", "level 3 reset"},
2692 {48, "ELNRNG", "link number out of range"},
2693 {49, "EUNATCH", "protocol driver not attached"},
2694 {50, "ENOCSI", "no CSI structure available"},
2695 {51, "EL2HLT", "level 2 halted"},
2696 {52, "EBADE", "invalid exchange"},
2697 {53, "EBADR", "invalid request descriptor"},
2698 {54, "EXFULL", "exchange full"},
2699 {55, "ENOANO", "no anode"},
2700 {56, "EBADRQC", "invalid request code"},
2701 {57, "EBADSLT", "invalid slot"},
2702 {58, "EDEADLOCK", "file locking deadlock error"},
2703 {59, "EBFONT", "bad font file format"},
2704 {60, "ENOSTR", "device not a stream"},
2705 {61, "ENODATA", "no data available"},
2706 {62, "ETIME", "timer expired"},
2707 {63, "ENOSR", "out of streams resources"},
2708 {64, "ENONET", "machine is not on the network"},
2709 {65, "ENOPKG", "package not installed"},
2710 {66, "EREMOTE", "object is remote"},
2711 {67, "ENOLINK", "link has been severed"},
2712 {68, "EADV", "advertise error"},
2713 {69, "ESRMNT", "srmount error"},
2714 {70, "ECOMM", "communication error on send"},
2715 {71, "EPROTO", "protocol error"},
2716 {72, "EMULTIHOP", "multihop attempted"},
2717 {73, "EDOTDOT", "RFS specific error"},
2718 {74, "EBADMSG", "bad message"},
2719 {75, "EOVERFLOW", "value too large for defined data type"},
2720 {76, "ENOTUNIQ", "name not unique on network"},
2721 {77, "EBADFD", "file descriptor in bad state"},
2722 {78, "EREMCHG", "remote address changed"},
2723 {79, "ELIBACC", "can not access a needed shared library"},
2724 {80, "ELIBBAD", "accessing a corrupted shared library"},
2725 {81, "ELIBSCN", ".lib section in a.out corrupted"},
2726 {82, "ELIBMAX", "attempting to link in too many shared libraries"},
2727 {83, "ELIBEXEC", "cannot exec a shared library directly"},
2728 {84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
2729 {85, "ERESTART", "interrupted system call should be restarted"},
2730 {86, "ESTRPIPE", "streams pipe error"},
2731 {87, "EUSERS", "too many users"},
2732 {88, "ENOTSOCK", "socket operation on non-socket"},
2733 {89, "EDESTADDRREQ", "destination address required"},
2734 {90, "EMSGSIZE", "message too long"},
2735 {91, "EPROTOTYPE", "protocol wrong type for socket"},
2736 {92, "ENOPROTOOPT", "protocol not available"},
2737 {93, "EPROTONOSUPPORT", "protocol not supported"},
2738 {94, "ESOCKTNOSUPPORT", "socket type not supported"},
2739 {95, "ENOTSUP", "operation not supported"},
2740 {96, "EPFNOSUPPORT", "protocol family not supported"},
2741 {97, "EAFNOSUPPORT", "address family not supported by protocol"},
2742 {98, "EADDRINUSE", "address already in use"},
2743 {99, "EADDRNOTAVAIL", "cannot assign requested address"},
2744 {100, "ENETDOWN", "network is down"},
2745 {101, "ENETUNREACH", "network is unreachable"},
2746 {102, "ENETRESET", "network dropped connection on reset"},
2747 {103, "ECONNABORTED", "software caused connection abort"},
2748 {104, "ECONNRESET", "connection reset by peer"},
2749 {105, "ENOBUFS", "no buffer space available"},
2750 {106, "EISCONN", "transport endpoint is already connected"},
2751 {107, "ENOTCONN", "transport endpoint is not connected"},
2752 {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
2753 {109, "ETOOMANYREFS", "too many references: cannot splice"},
2754 {110, "ETIMEDOUT", "connection timed out"},
2755 {111, "ECONNREFUSED", "connection refused"},
2756 {112, "EHOSTDOWN", "host is down"},
2757 {113, "EHOSTUNREACH", "no route to host"},
2758 {114, "EALREADY", "operation already in progress"},
2759 {115, "EINPROGRESS", "operation now in progress"},
2760 {116, "ESTALE", "stale file handle"},
2761 {117, "EUCLEAN", "structure needs cleaning"},
2762 {118, "ENOTNAM", "not a XENIX named type file"},
2763 {119, "ENAVAIL", "no XENIX semaphores available"},
2764 {120, "EISNAM", "is a named type file"},
2765 {121, "EREMOTEIO", "remote I/O error"},
2766 {122, "EDQUOT", "disk quota exceeded"},
2767 {123, "ENOMEDIUM", "no medium found"},
2768 {124, "EMEDIUMTYPE", "wrong medium type"},
2769 {125, "ECANCELED", "operation canceled"},
2770 {126, "ENOKEY", "required key not available"},
2771 {127, "EKEYEXPIRED", "key has expired"},
2772 {128, "EKEYREVOKED", "key has been revoked"},
2773 {129, "EKEYREJECTED", "key was rejected by service"},
2774 {130, "EOWNERDEAD", "owner died"},
2775 {131, "ENOTRECOVERABLE", "state not recoverable"},
2776 {132, "ERFKILL", "operation not possible due to RF-kill"},
2777 {133, "EHWPOISON", "memory page has hardware error"},
22582778 }
22592779
22602780 // Signal table
2261 var signals = [...]string{
2262 1: "hangup",
2263 2: "interrupt",
2264 3: "quit",
2265 4: "illegal instruction",
2266 5: "trace/breakpoint trap",
2267 6: "aborted",
2268 7: "bus error",
2269 8: "floating point exception",
2270 9: "killed",
2271 10: "user defined signal 1",
2272 11: "segmentation fault",
2273 12: "user defined signal 2",
2274 13: "broken pipe",
2275 14: "alarm clock",
2276 15: "terminated",
2277 16: "stack fault",
2278 17: "child exited",
2279 18: "continued",
2280 19: "stopped (signal)",
2281 20: "stopped",
2282 21: "stopped (tty input)",
2283 22: "stopped (tty output)",
2284 23: "urgent I/O condition",
2285 24: "CPU time limit exceeded",
2286 25: "file size limit exceeded",
2287 26: "virtual timer expired",
2288 27: "profiling timer expired",
2289 28: "window changed",
2290 29: "I/O possible",
2291 30: "power failure",
2292 31: "bad system call",
2781 var signalList = [...]struct {
2782 num syscall.Signal
2783 name string
2784 desc string
2785 }{
2786 {1, "SIGHUP", "hangup"},
2787 {2, "SIGINT", "interrupt"},
2788 {3, "SIGQUIT", "quit"},
2789 {4, "SIGILL", "illegal instruction"},
2790 {5, "SIGTRAP", "trace/breakpoint trap"},
2791 {6, "SIGABRT", "aborted"},
2792 {7, "SIGBUS", "bus error"},
2793 {8, "SIGFPE", "floating point exception"},
2794 {9, "SIGKILL", "killed"},
2795 {10, "SIGUSR1", "user defined signal 1"},
2796 {11, "SIGSEGV", "segmentation fault"},
2797 {12, "SIGUSR2", "user defined signal 2"},
2798 {13, "SIGPIPE", "broken pipe"},
2799 {14, "SIGALRM", "alarm clock"},
2800 {15, "SIGTERM", "terminated"},
2801 {16, "SIGSTKFLT", "stack fault"},
2802 {17, "SIGCHLD", "child exited"},
2803 {18, "SIGCONT", "continued"},
2804 {19, "SIGSTOP", "stopped (signal)"},
2805 {20, "SIGTSTP", "stopped"},
2806 {21, "SIGTTIN", "stopped (tty input)"},
2807 {22, "SIGTTOU", "stopped (tty output)"},
2808 {23, "SIGURG", "urgent I/O condition"},
2809 {24, "SIGXCPU", "CPU time limit exceeded"},
2810 {25, "SIGXFSZ", "file size limit exceeded"},
2811 {26, "SIGVTALRM", "virtual timer expired"},
2812 {27, "SIGPROF", "profiling timer expired"},
2813 {28, "SIGWINCH", "window changed"},
2814 {29, "SIGIO", "I/O possible"},
2815 {30, "SIGPWR", "power failure"},
2816 {31, "SIGSYS", "bad system call"},
22932817 }
0 // mkerrors.sh -Wall -Werror -static -I/tmp/include
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build riscv64,linux
4
5 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
6 // cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
7
8 package unix
9
10 import "syscall"
11
12 const (
13 AAFS_MAGIC = 0x5a3c69f0
14 ADFS_SUPER_MAGIC = 0xadf5
15 AFFS_SUPER_MAGIC = 0xadff
16 AFS_FS_MAGIC = 0x6b414653
17 AFS_SUPER_MAGIC = 0x5346414f
18 AF_ALG = 0x26
19 AF_APPLETALK = 0x5
20 AF_ASH = 0x12
21 AF_ATMPVC = 0x8
22 AF_ATMSVC = 0x14
23 AF_AX25 = 0x3
24 AF_BLUETOOTH = 0x1f
25 AF_BRIDGE = 0x7
26 AF_CAIF = 0x25
27 AF_CAN = 0x1d
28 AF_DECnet = 0xc
29 AF_ECONET = 0x13
30 AF_FILE = 0x1
31 AF_IB = 0x1b
32 AF_IEEE802154 = 0x24
33 AF_INET = 0x2
34 AF_INET6 = 0xa
35 AF_IPX = 0x4
36 AF_IRDA = 0x17
37 AF_ISDN = 0x22
38 AF_IUCV = 0x20
39 AF_KCM = 0x29
40 AF_KEY = 0xf
41 AF_LLC = 0x1a
42 AF_LOCAL = 0x1
43 AF_MAX = 0x2c
44 AF_MPLS = 0x1c
45 AF_NETBEUI = 0xd
46 AF_NETLINK = 0x10
47 AF_NETROM = 0x6
48 AF_NFC = 0x27
49 AF_PACKET = 0x11
50 AF_PHONET = 0x23
51 AF_PPPOX = 0x18
52 AF_QIPCRTR = 0x2a
53 AF_RDS = 0x15
54 AF_ROSE = 0xb
55 AF_ROUTE = 0x10
56 AF_RXRPC = 0x21
57 AF_SECURITY = 0xe
58 AF_SMC = 0x2b
59 AF_SNA = 0x16
60 AF_TIPC = 0x1e
61 AF_UNIX = 0x1
62 AF_UNSPEC = 0x0
63 AF_VSOCK = 0x28
64 AF_WANPIPE = 0x19
65 AF_X25 = 0x9
66 AF_XDP = 0x2c
67 ALG_OP_DECRYPT = 0x0
68 ALG_OP_ENCRYPT = 0x1
69 ALG_SET_AEAD_ASSOCLEN = 0x4
70 ALG_SET_AEAD_AUTHSIZE = 0x5
71 ALG_SET_IV = 0x2
72 ALG_SET_KEY = 0x1
73 ALG_SET_OP = 0x3
74 ANON_INODE_FS_MAGIC = 0x9041934
75 ARPHRD_6LOWPAN = 0x339
76 ARPHRD_ADAPT = 0x108
77 ARPHRD_APPLETLK = 0x8
78 ARPHRD_ARCNET = 0x7
79 ARPHRD_ASH = 0x30d
80 ARPHRD_ATM = 0x13
81 ARPHRD_AX25 = 0x3
82 ARPHRD_BIF = 0x307
83 ARPHRD_CAIF = 0x336
84 ARPHRD_CAN = 0x118
85 ARPHRD_CHAOS = 0x5
86 ARPHRD_CISCO = 0x201
87 ARPHRD_CSLIP = 0x101
88 ARPHRD_CSLIP6 = 0x103
89 ARPHRD_DDCMP = 0x205
90 ARPHRD_DLCI = 0xf
91 ARPHRD_ECONET = 0x30e
92 ARPHRD_EETHER = 0x2
93 ARPHRD_ETHER = 0x1
94 ARPHRD_EUI64 = 0x1b
95 ARPHRD_FCAL = 0x311
96 ARPHRD_FCFABRIC = 0x313
97 ARPHRD_FCPL = 0x312
98 ARPHRD_FCPP = 0x310
99 ARPHRD_FDDI = 0x306
100 ARPHRD_FRAD = 0x302
101 ARPHRD_HDLC = 0x201
102 ARPHRD_HIPPI = 0x30c
103 ARPHRD_HWX25 = 0x110
104 ARPHRD_IEEE1394 = 0x18
105 ARPHRD_IEEE802 = 0x6
106 ARPHRD_IEEE80211 = 0x321
107 ARPHRD_IEEE80211_PRISM = 0x322
108 ARPHRD_IEEE80211_RADIOTAP = 0x323
109 ARPHRD_IEEE802154 = 0x324
110 ARPHRD_IEEE802154_MONITOR = 0x325
111 ARPHRD_IEEE802_TR = 0x320
112 ARPHRD_INFINIBAND = 0x20
113 ARPHRD_IP6GRE = 0x337
114 ARPHRD_IPDDP = 0x309
115 ARPHRD_IPGRE = 0x30a
116 ARPHRD_IRDA = 0x30f
117 ARPHRD_LAPB = 0x204
118 ARPHRD_LOCALTLK = 0x305
119 ARPHRD_LOOPBACK = 0x304
120 ARPHRD_METRICOM = 0x17
121 ARPHRD_NETLINK = 0x338
122 ARPHRD_NETROM = 0x0
123 ARPHRD_NONE = 0xfffe
124 ARPHRD_PHONET = 0x334
125 ARPHRD_PHONET_PIPE = 0x335
126 ARPHRD_PIMREG = 0x30b
127 ARPHRD_PPP = 0x200
128 ARPHRD_PRONET = 0x4
129 ARPHRD_RAWHDLC = 0x206
130 ARPHRD_RAWIP = 0x207
131 ARPHRD_ROSE = 0x10e
132 ARPHRD_RSRVD = 0x104
133 ARPHRD_SIT = 0x308
134 ARPHRD_SKIP = 0x303
135 ARPHRD_SLIP = 0x100
136 ARPHRD_SLIP6 = 0x102
137 ARPHRD_TUNNEL = 0x300
138 ARPHRD_TUNNEL6 = 0x301
139 ARPHRD_VOID = 0xffff
140 ARPHRD_VSOCKMON = 0x33a
141 ARPHRD_X25 = 0x10f
142 AUTOFS_SUPER_MAGIC = 0x187
143 B0 = 0x0
144 B1000000 = 0x1008
145 B110 = 0x3
146 B115200 = 0x1002
147 B1152000 = 0x1009
148 B1200 = 0x9
149 B134 = 0x4
150 B150 = 0x5
151 B1500000 = 0x100a
152 B1800 = 0xa
153 B19200 = 0xe
154 B200 = 0x6
155 B2000000 = 0x100b
156 B230400 = 0x1003
157 B2400 = 0xb
158 B2500000 = 0x100c
159 B300 = 0x7
160 B3000000 = 0x100d
161 B3500000 = 0x100e
162 B38400 = 0xf
163 B4000000 = 0x100f
164 B460800 = 0x1004
165 B4800 = 0xc
166 B50 = 0x1
167 B500000 = 0x1005
168 B57600 = 0x1001
169 B576000 = 0x1006
170 B600 = 0x8
171 B75 = 0x2
172 B921600 = 0x1007
173 B9600 = 0xd
174 BALLOON_KVM_MAGIC = 0x13661366
175 BDEVFS_MAGIC = 0x62646576
176 BINFMTFS_MAGIC = 0x42494e4d
177 BLKBSZGET = 0x80081270
178 BLKBSZSET = 0x40081271
179 BLKFLSBUF = 0x1261
180 BLKFRAGET = 0x1265
181 BLKFRASET = 0x1264
182 BLKGETSIZE = 0x1260
183 BLKGETSIZE64 = 0x80081272
184 BLKPBSZGET = 0x127b
185 BLKRAGET = 0x1263
186 BLKRASET = 0x1262
187 BLKROGET = 0x125e
188 BLKROSET = 0x125d
189 BLKRRPART = 0x125f
190 BLKSECTGET = 0x1267
191 BLKSECTSET = 0x1266
192 BLKSSZGET = 0x1268
193 BOTHER = 0x1000
194 BPF_A = 0x10
195 BPF_ABS = 0x20
196 BPF_ADD = 0x0
197 BPF_ALU = 0x4
198 BPF_AND = 0x50
199 BPF_B = 0x10
200 BPF_DIV = 0x30
201 BPF_FS_MAGIC = 0xcafe4a11
202 BPF_H = 0x8
203 BPF_IMM = 0x0
204 BPF_IND = 0x40
205 BPF_JA = 0x0
206 BPF_JEQ = 0x10
207 BPF_JGE = 0x30
208 BPF_JGT = 0x20
209 BPF_JMP = 0x5
210 BPF_JSET = 0x40
211 BPF_K = 0x0
212 BPF_LD = 0x0
213 BPF_LDX = 0x1
214 BPF_LEN = 0x80
215 BPF_LL_OFF = -0x200000
216 BPF_LSH = 0x60
217 BPF_MAJOR_VERSION = 0x1
218 BPF_MAXINSNS = 0x1000
219 BPF_MEM = 0x60
220 BPF_MEMWORDS = 0x10
221 BPF_MINOR_VERSION = 0x1
222 BPF_MISC = 0x7
223 BPF_MOD = 0x90
224 BPF_MSH = 0xa0
225 BPF_MUL = 0x20
226 BPF_NEG = 0x80
227 BPF_NET_OFF = -0x100000
228 BPF_OR = 0x40
229 BPF_RET = 0x6
230 BPF_RSH = 0x70
231 BPF_ST = 0x2
232 BPF_STX = 0x3
233 BPF_SUB = 0x10
234 BPF_TAX = 0x0
235 BPF_TXA = 0x80
236 BPF_W = 0x0
237 BPF_X = 0x8
238 BPF_XOR = 0xa0
239 BRKINT = 0x2
240 BS0 = 0x0
241 BS1 = 0x2000
242 BSDLY = 0x2000
243 BTRFS_SUPER_MAGIC = 0x9123683e
244 BTRFS_TEST_MAGIC = 0x73727279
245 CAN_BCM = 0x2
246 CAN_EFF_FLAG = 0x80000000
247 CAN_EFF_ID_BITS = 0x1d
248 CAN_EFF_MASK = 0x1fffffff
249 CAN_ERR_FLAG = 0x20000000
250 CAN_ERR_MASK = 0x1fffffff
251 CAN_INV_FILTER = 0x20000000
252 CAN_ISOTP = 0x6
253 CAN_MAX_DLC = 0x8
254 CAN_MAX_DLEN = 0x8
255 CAN_MCNET = 0x5
256 CAN_MTU = 0x10
257 CAN_NPROTO = 0x7
258 CAN_RAW = 0x1
259 CAN_RAW_FILTER_MAX = 0x200
260 CAN_RTR_FLAG = 0x40000000
261 CAN_SFF_ID_BITS = 0xb
262 CAN_SFF_MASK = 0x7ff
263 CAN_TP16 = 0x3
264 CAN_TP20 = 0x4
265 CBAUD = 0x100f
266 CBAUDEX = 0x1000
267 CFLUSH = 0xf
268 CGROUP2_SUPER_MAGIC = 0x63677270
269 CGROUP_SUPER_MAGIC = 0x27e0eb
270 CIBAUD = 0x100f0000
271 CLOCAL = 0x800
272 CLOCK_BOOTTIME = 0x7
273 CLOCK_BOOTTIME_ALARM = 0x9
274 CLOCK_DEFAULT = 0x0
275 CLOCK_EXT = 0x1
276 CLOCK_INT = 0x2
277 CLOCK_MONOTONIC = 0x1
278 CLOCK_MONOTONIC_COARSE = 0x6
279 CLOCK_MONOTONIC_RAW = 0x4
280 CLOCK_PROCESS_CPUTIME_ID = 0x2
281 CLOCK_REALTIME = 0x0
282 CLOCK_REALTIME_ALARM = 0x8
283 CLOCK_REALTIME_COARSE = 0x5
284 CLOCK_TAI = 0xb
285 CLOCK_THREAD_CPUTIME_ID = 0x3
286 CLOCK_TXFROMRX = 0x4
287 CLOCK_TXINT = 0x3
288 CLONE_CHILD_CLEARTID = 0x200000
289 CLONE_CHILD_SETTID = 0x1000000
290 CLONE_DETACHED = 0x400000
291 CLONE_FILES = 0x400
292 CLONE_FS = 0x200
293 CLONE_IO = 0x80000000
294 CLONE_NEWCGROUP = 0x2000000
295 CLONE_NEWIPC = 0x8000000
296 CLONE_NEWNET = 0x40000000
297 CLONE_NEWNS = 0x20000
298 CLONE_NEWPID = 0x20000000
299 CLONE_NEWUSER = 0x10000000
300 CLONE_NEWUTS = 0x4000000
301 CLONE_PARENT = 0x8000
302 CLONE_PARENT_SETTID = 0x100000
303 CLONE_PTRACE = 0x2000
304 CLONE_SETTLS = 0x80000
305 CLONE_SIGHAND = 0x800
306 CLONE_SYSVSEM = 0x40000
307 CLONE_THREAD = 0x10000
308 CLONE_UNTRACED = 0x800000
309 CLONE_VFORK = 0x4000
310 CLONE_VM = 0x100
311 CMSPAR = 0x40000000
312 CODA_SUPER_MAGIC = 0x73757245
313 CR0 = 0x0
314 CR1 = 0x200
315 CR2 = 0x400
316 CR3 = 0x600
317 CRAMFS_MAGIC = 0x28cd3d45
318 CRDLY = 0x600
319 CREAD = 0x80
320 CRTSCTS = 0x80000000
321 CS5 = 0x0
322 CS6 = 0x10
323 CS7 = 0x20
324 CS8 = 0x30
325 CSIGNAL = 0xff
326 CSIZE = 0x30
327 CSTART = 0x11
328 CSTATUS = 0x0
329 CSTOP = 0x13
330 CSTOPB = 0x40
331 CSUSP = 0x1a
332 DAXFS_MAGIC = 0x64646178
333 DEBUGFS_MAGIC = 0x64626720
334 DEVPTS_SUPER_MAGIC = 0x1cd1
335 DT_BLK = 0x6
336 DT_CHR = 0x2
337 DT_DIR = 0x4
338 DT_FIFO = 0x1
339 DT_LNK = 0xa
340 DT_REG = 0x8
341 DT_SOCK = 0xc
342 DT_UNKNOWN = 0x0
343 DT_WHT = 0xe
344 ECHO = 0x8
345 ECHOCTL = 0x200
346 ECHOE = 0x10
347 ECHOK = 0x20
348 ECHOKE = 0x800
349 ECHONL = 0x40
350 ECHOPRT = 0x400
351 ECRYPTFS_SUPER_MAGIC = 0xf15f
352 EFD_CLOEXEC = 0x80000
353 EFD_NONBLOCK = 0x800
354 EFD_SEMAPHORE = 0x1
355 EFIVARFS_MAGIC = 0xde5e81e4
356 EFS_SUPER_MAGIC = 0x414a53
357 ENCODING_DEFAULT = 0x0
358 ENCODING_FM_MARK = 0x3
359 ENCODING_FM_SPACE = 0x4
360 ENCODING_MANCHESTER = 0x5
361 ENCODING_NRZ = 0x1
362 ENCODING_NRZI = 0x2
363 EPOLLERR = 0x8
364 EPOLLET = 0x80000000
365 EPOLLEXCLUSIVE = 0x10000000
366 EPOLLHUP = 0x10
367 EPOLLIN = 0x1
368 EPOLLMSG = 0x400
369 EPOLLONESHOT = 0x40000000
370 EPOLLOUT = 0x4
371 EPOLLPRI = 0x2
372 EPOLLRDBAND = 0x80
373 EPOLLRDHUP = 0x2000
374 EPOLLRDNORM = 0x40
375 EPOLLWAKEUP = 0x20000000
376 EPOLLWRBAND = 0x200
377 EPOLLWRNORM = 0x100
378 EPOLL_CLOEXEC = 0x80000
379 EPOLL_CTL_ADD = 0x1
380 EPOLL_CTL_DEL = 0x2
381 EPOLL_CTL_MOD = 0x3
382 ETH_P_1588 = 0x88f7
383 ETH_P_8021AD = 0x88a8
384 ETH_P_8021AH = 0x88e7
385 ETH_P_8021Q = 0x8100
386 ETH_P_80221 = 0x8917
387 ETH_P_802_2 = 0x4
388 ETH_P_802_3 = 0x1
389 ETH_P_802_3_MIN = 0x600
390 ETH_P_802_EX1 = 0x88b5
391 ETH_P_AARP = 0x80f3
392 ETH_P_AF_IUCV = 0xfbfb
393 ETH_P_ALL = 0x3
394 ETH_P_AOE = 0x88a2
395 ETH_P_ARCNET = 0x1a
396 ETH_P_ARP = 0x806
397 ETH_P_ATALK = 0x809b
398 ETH_P_ATMFATE = 0x8884
399 ETH_P_ATMMPOA = 0x884c
400 ETH_P_AX25 = 0x2
401 ETH_P_BATMAN = 0x4305
402 ETH_P_BPQ = 0x8ff
403 ETH_P_CAIF = 0xf7
404 ETH_P_CAN = 0xc
405 ETH_P_CANFD = 0xd
406 ETH_P_CONTROL = 0x16
407 ETH_P_CUST = 0x6006
408 ETH_P_DDCMP = 0x6
409 ETH_P_DEC = 0x6000
410 ETH_P_DIAG = 0x6005
411 ETH_P_DNA_DL = 0x6001
412 ETH_P_DNA_RC = 0x6002
413 ETH_P_DNA_RT = 0x6003
414 ETH_P_DSA = 0x1b
415 ETH_P_ECONET = 0x18
416 ETH_P_EDSA = 0xdada
417 ETH_P_ERSPAN = 0x88be
418 ETH_P_ERSPAN2 = 0x22eb
419 ETH_P_FCOE = 0x8906
420 ETH_P_FIP = 0x8914
421 ETH_P_HDLC = 0x19
422 ETH_P_HSR = 0x892f
423 ETH_P_IBOE = 0x8915
424 ETH_P_IEEE802154 = 0xf6
425 ETH_P_IEEEPUP = 0xa00
426 ETH_P_IEEEPUPAT = 0xa01
427 ETH_P_IFE = 0xed3e
428 ETH_P_IP = 0x800
429 ETH_P_IPV6 = 0x86dd
430 ETH_P_IPX = 0x8137
431 ETH_P_IRDA = 0x17
432 ETH_P_LAT = 0x6004
433 ETH_P_LINK_CTL = 0x886c
434 ETH_P_LOCALTALK = 0x9
435 ETH_P_LOOP = 0x60
436 ETH_P_LOOPBACK = 0x9000
437 ETH_P_MACSEC = 0x88e5
438 ETH_P_MAP = 0xf9
439 ETH_P_MOBITEX = 0x15
440 ETH_P_MPLS_MC = 0x8848
441 ETH_P_MPLS_UC = 0x8847
442 ETH_P_MVRP = 0x88f5
443 ETH_P_NCSI = 0x88f8
444 ETH_P_NSH = 0x894f
445 ETH_P_PAE = 0x888e
446 ETH_P_PAUSE = 0x8808
447 ETH_P_PHONET = 0xf5
448 ETH_P_PPPTALK = 0x10
449 ETH_P_PPP_DISC = 0x8863
450 ETH_P_PPP_MP = 0x8
451 ETH_P_PPP_SES = 0x8864
452 ETH_P_PREAUTH = 0x88c7
453 ETH_P_PRP = 0x88fb
454 ETH_P_PUP = 0x200
455 ETH_P_PUPAT = 0x201
456 ETH_P_QINQ1 = 0x9100
457 ETH_P_QINQ2 = 0x9200
458 ETH_P_QINQ3 = 0x9300
459 ETH_P_RARP = 0x8035
460 ETH_P_SCA = 0x6007
461 ETH_P_SLOW = 0x8809
462 ETH_P_SNAP = 0x5
463 ETH_P_TDLS = 0x890d
464 ETH_P_TEB = 0x6558
465 ETH_P_TIPC = 0x88ca
466 ETH_P_TRAILER = 0x1c
467 ETH_P_TR_802_2 = 0x11
468 ETH_P_TSN = 0x22f0
469 ETH_P_WAN_PPP = 0x7
470 ETH_P_WCCP = 0x883e
471 ETH_P_X25 = 0x805
472 ETH_P_XDSA = 0xf8
473 EXABYTE_ENABLE_NEST = 0xf0
474 EXT2_SUPER_MAGIC = 0xef53
475 EXT3_SUPER_MAGIC = 0xef53
476 EXT4_SUPER_MAGIC = 0xef53
477 EXTA = 0xe
478 EXTB = 0xf
479 EXTPROC = 0x10000
480 F2FS_SUPER_MAGIC = 0xf2f52010
481 FALLOC_FL_COLLAPSE_RANGE = 0x8
482 FALLOC_FL_INSERT_RANGE = 0x20
483 FALLOC_FL_KEEP_SIZE = 0x1
484 FALLOC_FL_NO_HIDE_STALE = 0x4
485 FALLOC_FL_PUNCH_HOLE = 0x2
486 FALLOC_FL_UNSHARE_RANGE = 0x40
487 FALLOC_FL_ZERO_RANGE = 0x10
488 FD_CLOEXEC = 0x1
489 FD_SETSIZE = 0x400
490 FF0 = 0x0
491 FF1 = 0x8000
492 FFDLY = 0x8000
493 FLUSHO = 0x1000
494 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
495 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
496 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
497 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
498 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
499 FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
500 FS_ENCRYPTION_MODE_INVALID = 0x0
501 FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
502 FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
503 FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
504 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
505 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
506 FS_KEY_DESCRIPTOR_SIZE = 0x8
507 FS_KEY_DESC_PREFIX = "fscrypt:"
508 FS_KEY_DESC_PREFIX_SIZE = 0x8
509 FS_MAX_KEY_SIZE = 0x40
510 FS_POLICY_FLAGS_PAD_16 = 0x2
511 FS_POLICY_FLAGS_PAD_32 = 0x3
512 FS_POLICY_FLAGS_PAD_4 = 0x0
513 FS_POLICY_FLAGS_PAD_8 = 0x1
514 FS_POLICY_FLAGS_PAD_MASK = 0x3
515 FS_POLICY_FLAGS_VALID = 0x3
516 FUTEXFS_SUPER_MAGIC = 0xbad1dea
517 F_ADD_SEALS = 0x409
518 F_DUPFD = 0x0
519 F_DUPFD_CLOEXEC = 0x406
520 F_EXLCK = 0x4
521 F_GETFD = 0x1
522 F_GETFL = 0x3
523 F_GETLEASE = 0x401
524 F_GETLK = 0x5
525 F_GETLK64 = 0x5
526 F_GETOWN = 0x9
527 F_GETOWN_EX = 0x10
528 F_GETPIPE_SZ = 0x408
529 F_GETSIG = 0xb
530 F_GET_FILE_RW_HINT = 0x40d
531 F_GET_RW_HINT = 0x40b
532 F_GET_SEALS = 0x40a
533 F_LOCK = 0x1
534 F_NOTIFY = 0x402
535 F_OFD_GETLK = 0x24
536 F_OFD_SETLK = 0x25
537 F_OFD_SETLKW = 0x26
538 F_OK = 0x0
539 F_RDLCK = 0x0
540 F_SEAL_GROW = 0x4
541 F_SEAL_SEAL = 0x1
542 F_SEAL_SHRINK = 0x2
543 F_SEAL_WRITE = 0x8
544 F_SETFD = 0x2
545 F_SETFL = 0x4
546 F_SETLEASE = 0x400
547 F_SETLK = 0x6
548 F_SETLK64 = 0x6
549 F_SETLKW = 0x7
550 F_SETLKW64 = 0x7
551 F_SETOWN = 0x8
552 F_SETOWN_EX = 0xf
553 F_SETPIPE_SZ = 0x407
554 F_SETSIG = 0xa
555 F_SET_FILE_RW_HINT = 0x40e
556 F_SET_RW_HINT = 0x40c
557 F_SHLCK = 0x8
558 F_TEST = 0x3
559 F_TLOCK = 0x2
560 F_ULOCK = 0x0
561 F_UNLCK = 0x2
562 F_WRLCK = 0x1
563 GENL_ADMIN_PERM = 0x1
564 GENL_CMD_CAP_DO = 0x2
565 GENL_CMD_CAP_DUMP = 0x4
566 GENL_CMD_CAP_HASPOL = 0x8
567 GENL_HDRLEN = 0x4
568 GENL_ID_CTRL = 0x10
569 GENL_ID_PMCRAID = 0x12
570 GENL_ID_VFS_DQUOT = 0x11
571 GENL_MAX_ID = 0x3ff
572 GENL_MIN_ID = 0x10
573 GENL_NAMSIZ = 0x10
574 GENL_START_ALLOC = 0x13
575 GENL_UNS_ADMIN_PERM = 0x10
576 GRND_NONBLOCK = 0x1
577 GRND_RANDOM = 0x2
578 HDIO_DRIVE_CMD = 0x31f
579 HDIO_DRIVE_CMD_AEB = 0x31e
580 HDIO_DRIVE_CMD_HDR_SIZE = 0x4
581 HDIO_DRIVE_HOB_HDR_SIZE = 0x8
582 HDIO_DRIVE_RESET = 0x31c
583 HDIO_DRIVE_TASK = 0x31e
584 HDIO_DRIVE_TASKFILE = 0x31d
585 HDIO_DRIVE_TASK_HDR_SIZE = 0x8
586 HDIO_GETGEO = 0x301
587 HDIO_GET_32BIT = 0x309
588 HDIO_GET_ACOUSTIC = 0x30f
589 HDIO_GET_ADDRESS = 0x310
590 HDIO_GET_BUSSTATE = 0x31a
591 HDIO_GET_DMA = 0x30b
592 HDIO_GET_IDENTITY = 0x30d
593 HDIO_GET_KEEPSETTINGS = 0x308
594 HDIO_GET_MULTCOUNT = 0x304
595 HDIO_GET_NICE = 0x30c
596 HDIO_GET_NOWERR = 0x30a
597 HDIO_GET_QDMA = 0x305
598 HDIO_GET_UNMASKINTR = 0x302
599 HDIO_GET_WCACHE = 0x30e
600 HDIO_OBSOLETE_IDENTITY = 0x307
601 HDIO_SCAN_HWIF = 0x328
602 HDIO_SET_32BIT = 0x324
603 HDIO_SET_ACOUSTIC = 0x32c
604 HDIO_SET_ADDRESS = 0x32f
605 HDIO_SET_BUSSTATE = 0x32d
606 HDIO_SET_DMA = 0x326
607 HDIO_SET_KEEPSETTINGS = 0x323
608 HDIO_SET_MULTCOUNT = 0x321
609 HDIO_SET_NICE = 0x329
610 HDIO_SET_NOWERR = 0x325
611 HDIO_SET_PIO_MODE = 0x327
612 HDIO_SET_QDMA = 0x32e
613 HDIO_SET_UNMASKINTR = 0x322
614 HDIO_SET_WCACHE = 0x32b
615 HDIO_SET_XFER = 0x306
616 HDIO_TRISTATE_HWIF = 0x31b
617 HDIO_UNREGISTER_HWIF = 0x32a
618 HOSTFS_SUPER_MAGIC = 0xc0ffee
619 HPFS_SUPER_MAGIC = 0xf995e849
620 HUGETLBFS_MAGIC = 0x958458f6
621 HUPCL = 0x400
622 IBSHIFT = 0x10
623 ICANON = 0x2
624 ICMPV6_FILTER = 0x1
625 ICRNL = 0x100
626 IEXTEN = 0x8000
627 IFA_F_DADFAILED = 0x8
628 IFA_F_DEPRECATED = 0x20
629 IFA_F_HOMEADDRESS = 0x10
630 IFA_F_MANAGETEMPADDR = 0x100
631 IFA_F_MCAUTOJOIN = 0x400
632 IFA_F_NODAD = 0x2
633 IFA_F_NOPREFIXROUTE = 0x200
634 IFA_F_OPTIMISTIC = 0x4
635 IFA_F_PERMANENT = 0x80
636 IFA_F_SECONDARY = 0x1
637 IFA_F_STABLE_PRIVACY = 0x800
638 IFA_F_TEMPORARY = 0x1
639 IFA_F_TENTATIVE = 0x40
640 IFA_MAX = 0xa
641 IFF_ALLMULTI = 0x200
642 IFF_ATTACH_QUEUE = 0x200
643 IFF_AUTOMEDIA = 0x4000
644 IFF_BROADCAST = 0x2
645 IFF_DEBUG = 0x4
646 IFF_DETACH_QUEUE = 0x400
647 IFF_DORMANT = 0x20000
648 IFF_DYNAMIC = 0x8000
649 IFF_ECHO = 0x40000
650 IFF_LOOPBACK = 0x8
651 IFF_LOWER_UP = 0x10000
652 IFF_MASTER = 0x400
653 IFF_MULTICAST = 0x1000
654 IFF_MULTI_QUEUE = 0x100
655 IFF_NAPI = 0x10
656 IFF_NAPI_FRAGS = 0x20
657 IFF_NOARP = 0x80
658 IFF_NOFILTER = 0x1000
659 IFF_NOTRAILERS = 0x20
660 IFF_NO_PI = 0x1000
661 IFF_ONE_QUEUE = 0x2000
662 IFF_PERSIST = 0x800
663 IFF_POINTOPOINT = 0x10
664 IFF_PORTSEL = 0x2000
665 IFF_PROMISC = 0x100
666 IFF_RUNNING = 0x40
667 IFF_SLAVE = 0x800
668 IFF_TAP = 0x2
669 IFF_TUN = 0x1
670 IFF_TUN_EXCL = 0x8000
671 IFF_UP = 0x1
672 IFF_VNET_HDR = 0x4000
673 IFF_VOLATILE = 0x70c5a
674 IFNAMSIZ = 0x10
675 IGNBRK = 0x1
676 IGNCR = 0x80
677 IGNPAR = 0x4
678 IMAXBEL = 0x2000
679 INLCR = 0x40
680 INPCK = 0x10
681 IN_ACCESS = 0x1
682 IN_ALL_EVENTS = 0xfff
683 IN_ATTRIB = 0x4
684 IN_CLASSA_HOST = 0xffffff
685 IN_CLASSA_MAX = 0x80
686 IN_CLASSA_NET = 0xff000000
687 IN_CLASSA_NSHIFT = 0x18
688 IN_CLASSB_HOST = 0xffff
689 IN_CLASSB_MAX = 0x10000
690 IN_CLASSB_NET = 0xffff0000
691 IN_CLASSB_NSHIFT = 0x10
692 IN_CLASSC_HOST = 0xff
693 IN_CLASSC_NET = 0xffffff00
694 IN_CLASSC_NSHIFT = 0x8
695 IN_CLOEXEC = 0x80000
696 IN_CLOSE = 0x18
697 IN_CLOSE_NOWRITE = 0x10
698 IN_CLOSE_WRITE = 0x8
699 IN_CREATE = 0x100
700 IN_DELETE = 0x200
701 IN_DELETE_SELF = 0x400
702 IN_DONT_FOLLOW = 0x2000000
703 IN_EXCL_UNLINK = 0x4000000
704 IN_IGNORED = 0x8000
705 IN_ISDIR = 0x40000000
706 IN_LOOPBACKNET = 0x7f
707 IN_MASK_ADD = 0x20000000
708 IN_MODIFY = 0x2
709 IN_MOVE = 0xc0
710 IN_MOVED_FROM = 0x40
711 IN_MOVED_TO = 0x80
712 IN_MOVE_SELF = 0x800
713 IN_NONBLOCK = 0x800
714 IN_ONESHOT = 0x80000000
715 IN_ONLYDIR = 0x1000000
716 IN_OPEN = 0x20
717 IN_Q_OVERFLOW = 0x4000
718 IN_UNMOUNT = 0x2000
719 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
720 IPPROTO_AH = 0x33
721 IPPROTO_BEETPH = 0x5e
722 IPPROTO_COMP = 0x6c
723 IPPROTO_DCCP = 0x21
724 IPPROTO_DSTOPTS = 0x3c
725 IPPROTO_EGP = 0x8
726 IPPROTO_ENCAP = 0x62
727 IPPROTO_ESP = 0x32
728 IPPROTO_FRAGMENT = 0x2c
729 IPPROTO_GRE = 0x2f
730 IPPROTO_HOPOPTS = 0x0
731 IPPROTO_ICMP = 0x1
732 IPPROTO_ICMPV6 = 0x3a
733 IPPROTO_IDP = 0x16
734 IPPROTO_IGMP = 0x2
735 IPPROTO_IP = 0x0
736 IPPROTO_IPIP = 0x4
737 IPPROTO_IPV6 = 0x29
738 IPPROTO_MH = 0x87
739 IPPROTO_MPLS = 0x89
740 IPPROTO_MTP = 0x5c
741 IPPROTO_NONE = 0x3b
742 IPPROTO_PIM = 0x67
743 IPPROTO_PUP = 0xc
744 IPPROTO_RAW = 0xff
745 IPPROTO_ROUTING = 0x2b
746 IPPROTO_RSVP = 0x2e
747 IPPROTO_SCTP = 0x84
748 IPPROTO_TCP = 0x6
749 IPPROTO_TP = 0x1d
750 IPPROTO_UDP = 0x11
751 IPPROTO_UDPLITE = 0x88
752 IPV6_2292DSTOPTS = 0x4
753 IPV6_2292HOPLIMIT = 0x8
754 IPV6_2292HOPOPTS = 0x3
755 IPV6_2292PKTINFO = 0x2
756 IPV6_2292PKTOPTIONS = 0x6
757 IPV6_2292RTHDR = 0x5
758 IPV6_ADDRFORM = 0x1
759 IPV6_ADDR_PREFERENCES = 0x48
760 IPV6_ADD_MEMBERSHIP = 0x14
761 IPV6_AUTHHDR = 0xa
762 IPV6_AUTOFLOWLABEL = 0x46
763 IPV6_CHECKSUM = 0x7
764 IPV6_DONTFRAG = 0x3e
765 IPV6_DROP_MEMBERSHIP = 0x15
766 IPV6_DSTOPTS = 0x3b
767 IPV6_FREEBIND = 0x4e
768 IPV6_HDRINCL = 0x24
769 IPV6_HOPLIMIT = 0x34
770 IPV6_HOPOPTS = 0x36
771 IPV6_IPSEC_POLICY = 0x22
772 IPV6_JOIN_ANYCAST = 0x1b
773 IPV6_JOIN_GROUP = 0x14
774 IPV6_LEAVE_ANYCAST = 0x1c
775 IPV6_LEAVE_GROUP = 0x15
776 IPV6_MINHOPCOUNT = 0x49
777 IPV6_MTU = 0x18
778 IPV6_MTU_DISCOVER = 0x17
779 IPV6_MULTICAST_HOPS = 0x12
780 IPV6_MULTICAST_IF = 0x11
781 IPV6_MULTICAST_LOOP = 0x13
782 IPV6_NEXTHOP = 0x9
783 IPV6_ORIGDSTADDR = 0x4a
784 IPV6_PATHMTU = 0x3d
785 IPV6_PKTINFO = 0x32
786 IPV6_PMTUDISC_DO = 0x2
787 IPV6_PMTUDISC_DONT = 0x0
788 IPV6_PMTUDISC_INTERFACE = 0x4
789 IPV6_PMTUDISC_OMIT = 0x5
790 IPV6_PMTUDISC_PROBE = 0x3
791 IPV6_PMTUDISC_WANT = 0x1
792 IPV6_RECVDSTOPTS = 0x3a
793 IPV6_RECVERR = 0x19
794 IPV6_RECVFRAGSIZE = 0x4d
795 IPV6_RECVHOPLIMIT = 0x33
796 IPV6_RECVHOPOPTS = 0x35
797 IPV6_RECVORIGDSTADDR = 0x4a
798 IPV6_RECVPATHMTU = 0x3c
799 IPV6_RECVPKTINFO = 0x31
800 IPV6_RECVRTHDR = 0x38
801 IPV6_RECVTCLASS = 0x42
802 IPV6_ROUTER_ALERT = 0x16
803 IPV6_RTHDR = 0x39
804 IPV6_RTHDRDSTOPTS = 0x37
805 IPV6_RTHDR_LOOSE = 0x0
806 IPV6_RTHDR_STRICT = 0x1
807 IPV6_RTHDR_TYPE_0 = 0x0
808 IPV6_RXDSTOPTS = 0x3b
809 IPV6_RXHOPOPTS = 0x36
810 IPV6_TCLASS = 0x43
811 IPV6_TRANSPARENT = 0x4b
812 IPV6_UNICAST_HOPS = 0x10
813 IPV6_UNICAST_IF = 0x4c
814 IPV6_V6ONLY = 0x1a
815 IPV6_XFRM_POLICY = 0x23
816 IP_ADD_MEMBERSHIP = 0x23
817 IP_ADD_SOURCE_MEMBERSHIP = 0x27
818 IP_BIND_ADDRESS_NO_PORT = 0x18
819 IP_BLOCK_SOURCE = 0x26
820 IP_CHECKSUM = 0x17
821 IP_DEFAULT_MULTICAST_LOOP = 0x1
822 IP_DEFAULT_MULTICAST_TTL = 0x1
823 IP_DF = 0x4000
824 IP_DROP_MEMBERSHIP = 0x24
825 IP_DROP_SOURCE_MEMBERSHIP = 0x28
826 IP_FREEBIND = 0xf
827 IP_HDRINCL = 0x3
828 IP_IPSEC_POLICY = 0x10
829 IP_MAXPACKET = 0xffff
830 IP_MAX_MEMBERSHIPS = 0x14
831 IP_MF = 0x2000
832 IP_MINTTL = 0x15
833 IP_MSFILTER = 0x29
834 IP_MSS = 0x240
835 IP_MTU = 0xe
836 IP_MTU_DISCOVER = 0xa
837 IP_MULTICAST_ALL = 0x31
838 IP_MULTICAST_IF = 0x20
839 IP_MULTICAST_LOOP = 0x22
840 IP_MULTICAST_TTL = 0x21
841 IP_NODEFRAG = 0x16
842 IP_OFFMASK = 0x1fff
843 IP_OPTIONS = 0x4
844 IP_ORIGDSTADDR = 0x14
845 IP_PASSSEC = 0x12
846 IP_PKTINFO = 0x8
847 IP_PKTOPTIONS = 0x9
848 IP_PMTUDISC = 0xa
849 IP_PMTUDISC_DO = 0x2
850 IP_PMTUDISC_DONT = 0x0
851 IP_PMTUDISC_INTERFACE = 0x4
852 IP_PMTUDISC_OMIT = 0x5
853 IP_PMTUDISC_PROBE = 0x3
854 IP_PMTUDISC_WANT = 0x1
855 IP_RECVERR = 0xb
856 IP_RECVFRAGSIZE = 0x19
857 IP_RECVOPTS = 0x6
858 IP_RECVORIGDSTADDR = 0x14
859 IP_RECVRETOPTS = 0x7
860 IP_RECVTOS = 0xd
861 IP_RECVTTL = 0xc
862 IP_RETOPTS = 0x7
863 IP_RF = 0x8000
864 IP_ROUTER_ALERT = 0x5
865 IP_TOS = 0x1
866 IP_TRANSPARENT = 0x13
867 IP_TTL = 0x2
868 IP_UNBLOCK_SOURCE = 0x25
869 IP_UNICAST_IF = 0x32
870 IP_XFRM_POLICY = 0x11
871 ISIG = 0x1
872 ISOFS_SUPER_MAGIC = 0x9660
873 ISTRIP = 0x20
874 IUCLC = 0x200
875 IUTF8 = 0x4000
876 IXANY = 0x800
877 IXOFF = 0x1000
878 IXON = 0x400
879 JFFS2_SUPER_MAGIC = 0x72b6
880 KEXEC_ARCH_386 = 0x30000
881 KEXEC_ARCH_68K = 0x40000
882 KEXEC_ARCH_AARCH64 = 0xb70000
883 KEXEC_ARCH_ARM = 0x280000
884 KEXEC_ARCH_DEFAULT = 0x0
885 KEXEC_ARCH_IA_64 = 0x320000
886 KEXEC_ARCH_MASK = 0xffff0000
887 KEXEC_ARCH_MIPS = 0x80000
888 KEXEC_ARCH_MIPS_LE = 0xa0000
889 KEXEC_ARCH_PPC = 0x140000
890 KEXEC_ARCH_PPC64 = 0x150000
891 KEXEC_ARCH_S390 = 0x160000
892 KEXEC_ARCH_SH = 0x2a0000
893 KEXEC_ARCH_X86_64 = 0x3e0000
894 KEXEC_FILE_NO_INITRAMFS = 0x4
895 KEXEC_FILE_ON_CRASH = 0x2
896 KEXEC_FILE_UNLOAD = 0x1
897 KEXEC_ON_CRASH = 0x1
898 KEXEC_PRESERVE_CONTEXT = 0x2
899 KEXEC_SEGMENT_MAX = 0x10
900 KEYCTL_ASSUME_AUTHORITY = 0x10
901 KEYCTL_CHOWN = 0x4
902 KEYCTL_CLEAR = 0x7
903 KEYCTL_DESCRIBE = 0x6
904 KEYCTL_DH_COMPUTE = 0x17
905 KEYCTL_GET_KEYRING_ID = 0x0
906 KEYCTL_GET_PERSISTENT = 0x16
907 KEYCTL_GET_SECURITY = 0x11
908 KEYCTL_INSTANTIATE = 0xc
909 KEYCTL_INSTANTIATE_IOV = 0x14
910 KEYCTL_INVALIDATE = 0x15
911 KEYCTL_JOIN_SESSION_KEYRING = 0x1
912 KEYCTL_LINK = 0x8
913 KEYCTL_NEGATE = 0xd
914 KEYCTL_PKEY_DECRYPT = 0x1a
915 KEYCTL_PKEY_ENCRYPT = 0x19
916 KEYCTL_PKEY_QUERY = 0x18
917 KEYCTL_PKEY_SIGN = 0x1b
918 KEYCTL_PKEY_VERIFY = 0x1c
919 KEYCTL_READ = 0xb
920 KEYCTL_REJECT = 0x13
921 KEYCTL_RESTRICT_KEYRING = 0x1d
922 KEYCTL_REVOKE = 0x3
923 KEYCTL_SEARCH = 0xa
924 KEYCTL_SESSION_TO_PARENT = 0x12
925 KEYCTL_SETPERM = 0x5
926 KEYCTL_SET_REQKEY_KEYRING = 0xe
927 KEYCTL_SET_TIMEOUT = 0xf
928 KEYCTL_SUPPORTS_DECRYPT = 0x2
929 KEYCTL_SUPPORTS_ENCRYPT = 0x1
930 KEYCTL_SUPPORTS_SIGN = 0x4
931 KEYCTL_SUPPORTS_VERIFY = 0x8
932 KEYCTL_UNLINK = 0x9
933 KEYCTL_UPDATE = 0x2
934 KEY_REQKEY_DEFL_DEFAULT = 0x0
935 KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
936 KEY_REQKEY_DEFL_NO_CHANGE = -0x1
937 KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
938 KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
939 KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
940 KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
941 KEY_REQKEY_DEFL_USER_KEYRING = 0x4
942 KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
943 KEY_SPEC_GROUP_KEYRING = -0x6
944 KEY_SPEC_PROCESS_KEYRING = -0x2
945 KEY_SPEC_REQKEY_AUTH_KEY = -0x7
946 KEY_SPEC_REQUESTOR_KEYRING = -0x8
947 KEY_SPEC_SESSION_KEYRING = -0x3
948 KEY_SPEC_THREAD_KEYRING = -0x1
949 KEY_SPEC_USER_KEYRING = -0x4
950 KEY_SPEC_USER_SESSION_KEYRING = -0x5
951 LINUX_REBOOT_CMD_CAD_OFF = 0x0
952 LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
953 LINUX_REBOOT_CMD_HALT = 0xcdef0123
954 LINUX_REBOOT_CMD_KEXEC = 0x45584543
955 LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
956 LINUX_REBOOT_CMD_RESTART = 0x1234567
957 LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
958 LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
959 LINUX_REBOOT_MAGIC1 = 0xfee1dead
960 LINUX_REBOOT_MAGIC2 = 0x28121969
961 LOCK_EX = 0x2
962 LOCK_NB = 0x4
963 LOCK_SH = 0x1
964 LOCK_UN = 0x8
965 MADV_DODUMP = 0x11
966 MADV_DOFORK = 0xb
967 MADV_DONTDUMP = 0x10
968 MADV_DONTFORK = 0xa
969 MADV_DONTNEED = 0x4
970 MADV_FREE = 0x8
971 MADV_HUGEPAGE = 0xe
972 MADV_HWPOISON = 0x64
973 MADV_KEEPONFORK = 0x13
974 MADV_MERGEABLE = 0xc
975 MADV_NOHUGEPAGE = 0xf
976 MADV_NORMAL = 0x0
977 MADV_RANDOM = 0x1
978 MADV_REMOVE = 0x9
979 MADV_SEQUENTIAL = 0x2
980 MADV_UNMERGEABLE = 0xd
981 MADV_WILLNEED = 0x3
982 MADV_WIPEONFORK = 0x12
983 MAP_ANON = 0x20
984 MAP_ANONYMOUS = 0x20
985 MAP_DENYWRITE = 0x800
986 MAP_EXECUTABLE = 0x1000
987 MAP_FILE = 0x0
988 MAP_FIXED = 0x10
989 MAP_FIXED_NOREPLACE = 0x100000
990 MAP_GROWSDOWN = 0x100
991 MAP_HUGETLB = 0x40000
992 MAP_HUGE_MASK = 0x3f
993 MAP_HUGE_SHIFT = 0x1a
994 MAP_LOCKED = 0x2000
995 MAP_NONBLOCK = 0x10000
996 MAP_NORESERVE = 0x4000
997 MAP_POPULATE = 0x8000
998 MAP_PRIVATE = 0x2
999 MAP_SHARED = 0x1
1000 MAP_SHARED_VALIDATE = 0x3
1001 MAP_STACK = 0x20000
1002 MAP_SYNC = 0x80000
1003 MAP_TYPE = 0xf
1004 MCL_CURRENT = 0x1
1005 MCL_FUTURE = 0x2
1006 MCL_ONFAULT = 0x4
1007 MFD_ALLOW_SEALING = 0x2
1008 MFD_CLOEXEC = 0x1
1009 MFD_HUGETLB = 0x4
1010 MFD_HUGE_16GB = -0x78000000
1011 MFD_HUGE_16MB = 0x60000000
1012 MFD_HUGE_1GB = 0x78000000
1013 MFD_HUGE_1MB = 0x50000000
1014 MFD_HUGE_256MB = 0x70000000
1015 MFD_HUGE_2GB = 0x7c000000
1016 MFD_HUGE_2MB = 0x54000000
1017 MFD_HUGE_32MB = 0x64000000
1018 MFD_HUGE_512KB = 0x4c000000
1019 MFD_HUGE_512MB = 0x74000000
1020 MFD_HUGE_64KB = 0x40000000
1021 MFD_HUGE_8MB = 0x5c000000
1022 MFD_HUGE_MASK = 0x3f
1023 MFD_HUGE_SHIFT = 0x1a
1024 MINIX2_SUPER_MAGIC = 0x2468
1025 MINIX2_SUPER_MAGIC2 = 0x2478
1026 MINIX3_SUPER_MAGIC = 0x4d5a
1027 MINIX_SUPER_MAGIC = 0x137f
1028 MINIX_SUPER_MAGIC2 = 0x138f
1029 MNT_DETACH = 0x2
1030 MNT_EXPIRE = 0x4
1031 MNT_FORCE = 0x1
1032 MODULE_INIT_IGNORE_MODVERSIONS = 0x1
1033 MODULE_INIT_IGNORE_VERMAGIC = 0x2
1034 MSDOS_SUPER_MAGIC = 0x4d44
1035 MSG_BATCH = 0x40000
1036 MSG_CMSG_CLOEXEC = 0x40000000
1037 MSG_CONFIRM = 0x800
1038 MSG_CTRUNC = 0x8
1039 MSG_DONTROUTE = 0x4
1040 MSG_DONTWAIT = 0x40
1041 MSG_EOR = 0x80
1042 MSG_ERRQUEUE = 0x2000
1043 MSG_FASTOPEN = 0x20000000
1044 MSG_FIN = 0x200
1045 MSG_MORE = 0x8000
1046 MSG_NOSIGNAL = 0x4000
1047 MSG_OOB = 0x1
1048 MSG_PEEK = 0x2
1049 MSG_PROXY = 0x10
1050 MSG_RST = 0x1000
1051 MSG_SYN = 0x400
1052 MSG_TRUNC = 0x20
1053 MSG_TRYHARD = 0x4
1054 MSG_WAITALL = 0x100
1055 MSG_WAITFORONE = 0x10000
1056 MSG_ZEROCOPY = 0x4000000
1057 MS_ACTIVE = 0x40000000
1058 MS_ASYNC = 0x1
1059 MS_BIND = 0x1000
1060 MS_BORN = 0x20000000
1061 MS_DIRSYNC = 0x80
1062 MS_INVALIDATE = 0x2
1063 MS_I_VERSION = 0x800000
1064 MS_KERNMOUNT = 0x400000
1065 MS_LAZYTIME = 0x2000000
1066 MS_MANDLOCK = 0x40
1067 MS_MGC_MSK = 0xffff0000
1068 MS_MGC_VAL = 0xc0ed0000
1069 MS_MOVE = 0x2000
1070 MS_NOATIME = 0x400
1071 MS_NODEV = 0x4
1072 MS_NODIRATIME = 0x800
1073 MS_NOEXEC = 0x8
1074 MS_NOREMOTELOCK = 0x8000000
1075 MS_NOSEC = 0x10000000
1076 MS_NOSUID = 0x2
1077 MS_NOUSER = -0x80000000
1078 MS_POSIXACL = 0x10000
1079 MS_PRIVATE = 0x40000
1080 MS_RDONLY = 0x1
1081 MS_REC = 0x4000
1082 MS_RELATIME = 0x200000
1083 MS_REMOUNT = 0x20
1084 MS_RMT_MASK = 0x2800051
1085 MS_SHARED = 0x100000
1086 MS_SILENT = 0x8000
1087 MS_SLAVE = 0x80000
1088 MS_STRICTATIME = 0x1000000
1089 MS_SUBMOUNT = 0x4000000
1090 MS_SYNC = 0x4
1091 MS_SYNCHRONOUS = 0x10
1092 MS_UNBINDABLE = 0x20000
1093 MS_VERBOSE = 0x8000
1094 MTD_INODE_FS_MAGIC = 0x11307854
1095 NAME_MAX = 0xff
1096 NCP_SUPER_MAGIC = 0x564c
1097 NETLINK_ADD_MEMBERSHIP = 0x1
1098 NETLINK_AUDIT = 0x9
1099 NETLINK_BROADCAST_ERROR = 0x4
1100 NETLINK_CAP_ACK = 0xa
1101 NETLINK_CONNECTOR = 0xb
1102 NETLINK_CRYPTO = 0x15
1103 NETLINK_DNRTMSG = 0xe
1104 NETLINK_DROP_MEMBERSHIP = 0x2
1105 NETLINK_ECRYPTFS = 0x13
1106 NETLINK_EXT_ACK = 0xb
1107 NETLINK_FIB_LOOKUP = 0xa
1108 NETLINK_FIREWALL = 0x3
1109 NETLINK_GENERIC = 0x10
1110 NETLINK_GET_STRICT_CHK = 0xc
1111 NETLINK_INET_DIAG = 0x4
1112 NETLINK_IP6_FW = 0xd
1113 NETLINK_ISCSI = 0x8
1114 NETLINK_KOBJECT_UEVENT = 0xf
1115 NETLINK_LISTEN_ALL_NSID = 0x8
1116 NETLINK_LIST_MEMBERSHIPS = 0x9
1117 NETLINK_NETFILTER = 0xc
1118 NETLINK_NFLOG = 0x5
1119 NETLINK_NO_ENOBUFS = 0x5
1120 NETLINK_PKTINFO = 0x3
1121 NETLINK_RDMA = 0x14
1122 NETLINK_ROUTE = 0x0
1123 NETLINK_RX_RING = 0x6
1124 NETLINK_SCSITRANSPORT = 0x12
1125 NETLINK_SELINUX = 0x7
1126 NETLINK_SMC = 0x16
1127 NETLINK_SOCK_DIAG = 0x4
1128 NETLINK_TX_RING = 0x7
1129 NETLINK_UNUSED = 0x1
1130 NETLINK_USERSOCK = 0x2
1131 NETLINK_XFRM = 0x6
1132 NETNSA_MAX = 0x3
1133 NETNSA_NSID_NOT_ASSIGNED = -0x1
1134 NFNETLINK_V0 = 0x0
1135 NFNLGRP_ACCT_QUOTA = 0x8
1136 NFNLGRP_CONNTRACK_DESTROY = 0x3
1137 NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
1138 NFNLGRP_CONNTRACK_EXP_NEW = 0x4
1139 NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
1140 NFNLGRP_CONNTRACK_NEW = 0x1
1141 NFNLGRP_CONNTRACK_UPDATE = 0x2
1142 NFNLGRP_MAX = 0x9
1143 NFNLGRP_NFTABLES = 0x7
1144 NFNLGRP_NFTRACE = 0x9
1145 NFNLGRP_NONE = 0x0
1146 NFNL_BATCH_MAX = 0x1
1147 NFNL_MSG_BATCH_BEGIN = 0x10
1148 NFNL_MSG_BATCH_END = 0x11
1149 NFNL_NFA_NEST = 0x8000
1150 NFNL_SUBSYS_ACCT = 0x7
1151 NFNL_SUBSYS_COUNT = 0xc
1152 NFNL_SUBSYS_CTHELPER = 0x9
1153 NFNL_SUBSYS_CTNETLINK = 0x1
1154 NFNL_SUBSYS_CTNETLINK_EXP = 0x2
1155 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
1156 NFNL_SUBSYS_IPSET = 0x6
1157 NFNL_SUBSYS_NFTABLES = 0xa
1158 NFNL_SUBSYS_NFT_COMPAT = 0xb
1159 NFNL_SUBSYS_NONE = 0x0
1160 NFNL_SUBSYS_OSF = 0x5
1161 NFNL_SUBSYS_QUEUE = 0x3
1162 NFNL_SUBSYS_ULOG = 0x4
1163 NFS_SUPER_MAGIC = 0x6969
1164 NILFS_SUPER_MAGIC = 0x3434
1165 NL0 = 0x0
1166 NL1 = 0x100
1167 NLA_ALIGNTO = 0x4
1168 NLA_F_NESTED = 0x8000
1169 NLA_F_NET_BYTEORDER = 0x4000
1170 NLA_HDRLEN = 0x4
1171 NLDLY = 0x100
1172 NLMSG_ALIGNTO = 0x4
1173 NLMSG_DONE = 0x3
1174 NLMSG_ERROR = 0x2
1175 NLMSG_HDRLEN = 0x10
1176 NLMSG_MIN_TYPE = 0x10
1177 NLMSG_NOOP = 0x1
1178 NLMSG_OVERRUN = 0x4
1179 NLM_F_ACK = 0x4
1180 NLM_F_ACK_TLVS = 0x200
1181 NLM_F_APPEND = 0x800
1182 NLM_F_ATOMIC = 0x400
1183 NLM_F_CAPPED = 0x100
1184 NLM_F_CREATE = 0x400
1185 NLM_F_DUMP = 0x300
1186 NLM_F_DUMP_FILTERED = 0x20
1187 NLM_F_DUMP_INTR = 0x10
1188 NLM_F_ECHO = 0x8
1189 NLM_F_EXCL = 0x200
1190 NLM_F_MATCH = 0x200
1191 NLM_F_MULTI = 0x2
1192 NLM_F_NONREC = 0x100
1193 NLM_F_REPLACE = 0x100
1194 NLM_F_REQUEST = 0x1
1195 NLM_F_ROOT = 0x100
1196 NOFLSH = 0x80
1197 NSFS_MAGIC = 0x6e736673
1198 OCFS2_SUPER_MAGIC = 0x7461636f
1199 OCRNL = 0x8
1200 OFDEL = 0x80
1201 OFILL = 0x40
1202 OLCUC = 0x2
1203 ONLCR = 0x4
1204 ONLRET = 0x20
1205 ONOCR = 0x10
1206 OPENPROM_SUPER_MAGIC = 0x9fa1
1207 OPOST = 0x1
1208 OVERLAYFS_SUPER_MAGIC = 0x794c7630
1209 O_ACCMODE = 0x3
1210 O_APPEND = 0x400
1211 O_ASYNC = 0x2000
1212 O_CLOEXEC = 0x80000
1213 O_CREAT = 0x40
1214 O_DIRECT = 0x4000
1215 O_DIRECTORY = 0x10000
1216 O_DSYNC = 0x1000
1217 O_EXCL = 0x80
1218 O_FSYNC = 0x101000
1219 O_LARGEFILE = 0x0
1220 O_NDELAY = 0x800
1221 O_NOATIME = 0x40000
1222 O_NOCTTY = 0x100
1223 O_NOFOLLOW = 0x20000
1224 O_NONBLOCK = 0x800
1225 O_PATH = 0x200000
1226 O_RDONLY = 0x0
1227 O_RDWR = 0x2
1228 O_RSYNC = 0x101000
1229 O_SYNC = 0x101000
1230 O_TMPFILE = 0x410000
1231 O_TRUNC = 0x200
1232 O_WRONLY = 0x1
1233 PACKET_ADD_MEMBERSHIP = 0x1
1234 PACKET_AUXDATA = 0x8
1235 PACKET_BROADCAST = 0x1
1236 PACKET_COPY_THRESH = 0x7
1237 PACKET_DROP_MEMBERSHIP = 0x2
1238 PACKET_FANOUT = 0x12
1239 PACKET_FANOUT_CBPF = 0x6
1240 PACKET_FANOUT_CPU = 0x2
1241 PACKET_FANOUT_DATA = 0x16
1242 PACKET_FANOUT_EBPF = 0x7
1243 PACKET_FANOUT_FLAG_DEFRAG = 0x8000
1244 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
1245 PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
1246 PACKET_FANOUT_HASH = 0x0
1247 PACKET_FANOUT_LB = 0x1
1248 PACKET_FANOUT_QM = 0x5
1249 PACKET_FANOUT_RND = 0x4
1250 PACKET_FANOUT_ROLLOVER = 0x3
1251 PACKET_FASTROUTE = 0x6
1252 PACKET_HDRLEN = 0xb
1253 PACKET_HOST = 0x0
1254 PACKET_IGNORE_OUTGOING = 0x17
1255 PACKET_KERNEL = 0x7
1256 PACKET_LOOPBACK = 0x5
1257 PACKET_LOSS = 0xe
1258 PACKET_MR_ALLMULTI = 0x2
1259 PACKET_MR_MULTICAST = 0x0
1260 PACKET_MR_PROMISC = 0x1
1261 PACKET_MR_UNICAST = 0x3
1262 PACKET_MULTICAST = 0x2
1263 PACKET_ORIGDEV = 0x9
1264 PACKET_OTHERHOST = 0x3
1265 PACKET_OUTGOING = 0x4
1266 PACKET_QDISC_BYPASS = 0x14
1267 PACKET_RECV_OUTPUT = 0x3
1268 PACKET_RESERVE = 0xc
1269 PACKET_ROLLOVER_STATS = 0x15
1270 PACKET_RX_RING = 0x5
1271 PACKET_STATISTICS = 0x6
1272 PACKET_TIMESTAMP = 0x11
1273 PACKET_TX_HAS_OFF = 0x13
1274 PACKET_TX_RING = 0xd
1275 PACKET_TX_TIMESTAMP = 0x10
1276 PACKET_USER = 0x6
1277 PACKET_VERSION = 0xa
1278 PACKET_VNET_HDR = 0xf
1279 PARENB = 0x100
1280 PARITY_CRC16_PR0 = 0x2
1281 PARITY_CRC16_PR0_CCITT = 0x4
1282 PARITY_CRC16_PR1 = 0x3
1283 PARITY_CRC16_PR1_CCITT = 0x5
1284 PARITY_CRC32_PR0_CCITT = 0x6
1285 PARITY_CRC32_PR1_CCITT = 0x7
1286 PARITY_DEFAULT = 0x0
1287 PARITY_NONE = 0x1
1288 PARMRK = 0x8
1289 PARODD = 0x200
1290 PENDIN = 0x4000
1291 PERF_EVENT_IOC_DISABLE = 0x2401
1292 PERF_EVENT_IOC_ENABLE = 0x2400
1293 PERF_EVENT_IOC_ID = 0x80082407
1294 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
1295 PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
1296 PERF_EVENT_IOC_PERIOD = 0x40082404
1297 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
1298 PERF_EVENT_IOC_REFRESH = 0x2402
1299 PERF_EVENT_IOC_RESET = 0x2403
1300 PERF_EVENT_IOC_SET_BPF = 0x40042408
1301 PERF_EVENT_IOC_SET_FILTER = 0x40082406
1302 PERF_EVENT_IOC_SET_OUTPUT = 0x2405
1303 PIPEFS_MAGIC = 0x50495045
1304 PPPIOCATTACH = 0x4004743d
1305 PPPIOCATTCHAN = 0x40047438
1306 PPPIOCCONNECT = 0x4004743a
1307 PPPIOCDETACH = 0x4004743c
1308 PPPIOCDISCONN = 0x7439
1309 PPPIOCGASYNCMAP = 0x80047458
1310 PPPIOCGCHAN = 0x80047437
1311 PPPIOCGDEBUG = 0x80047441
1312 PPPIOCGFLAGS = 0x8004745a
1313 PPPIOCGIDLE = 0x8010743f
1314 PPPIOCGL2TPSTATS = 0x80487436
1315 PPPIOCGMRU = 0x80047453
1316 PPPIOCGNPMODE = 0xc008744c
1317 PPPIOCGRASYNCMAP = 0x80047455
1318 PPPIOCGUNIT = 0x80047456
1319 PPPIOCGXASYNCMAP = 0x80207450
1320 PPPIOCNEWUNIT = 0xc004743e
1321 PPPIOCSACTIVE = 0x40107446
1322 PPPIOCSASYNCMAP = 0x40047457
1323 PPPIOCSCOMPRESS = 0x4010744d
1324 PPPIOCSDEBUG = 0x40047440
1325 PPPIOCSFLAGS = 0x40047459
1326 PPPIOCSMAXCID = 0x40047451
1327 PPPIOCSMRRU = 0x4004743b
1328 PPPIOCSMRU = 0x40047452
1329 PPPIOCSNPMODE = 0x4008744b
1330 PPPIOCSPASS = 0x40107447
1331 PPPIOCSRASYNCMAP = 0x40047454
1332 PPPIOCSXASYNCMAP = 0x4020744f
1333 PPPIOCXFERUNIT = 0x744e
1334 PRIO_PGRP = 0x1
1335 PRIO_PROCESS = 0x0
1336 PRIO_USER = 0x2
1337 PROC_SUPER_MAGIC = 0x9fa0
1338 PROT_EXEC = 0x4
1339 PROT_GROWSDOWN = 0x1000000
1340 PROT_GROWSUP = 0x2000000
1341 PROT_NONE = 0x0
1342 PROT_READ = 0x1
1343 PROT_WRITE = 0x2
1344 PR_CAPBSET_DROP = 0x18
1345 PR_CAPBSET_READ = 0x17
1346 PR_CAP_AMBIENT = 0x2f
1347 PR_CAP_AMBIENT_CLEAR_ALL = 0x4
1348 PR_CAP_AMBIENT_IS_SET = 0x1
1349 PR_CAP_AMBIENT_LOWER = 0x3
1350 PR_CAP_AMBIENT_RAISE = 0x2
1351 PR_ENDIAN_BIG = 0x0
1352 PR_ENDIAN_LITTLE = 0x1
1353 PR_ENDIAN_PPC_LITTLE = 0x2
1354 PR_FPEMU_NOPRINT = 0x1
1355 PR_FPEMU_SIGFPE = 0x2
1356 PR_FP_EXC_ASYNC = 0x2
1357 PR_FP_EXC_DISABLED = 0x0
1358 PR_FP_EXC_DIV = 0x10000
1359 PR_FP_EXC_INV = 0x100000
1360 PR_FP_EXC_NONRECOV = 0x1
1361 PR_FP_EXC_OVF = 0x20000
1362 PR_FP_EXC_PRECISE = 0x3
1363 PR_FP_EXC_RES = 0x80000
1364 PR_FP_EXC_SW_ENABLE = 0x80
1365 PR_FP_EXC_UND = 0x40000
1366 PR_FP_MODE_FR = 0x1
1367 PR_FP_MODE_FRE = 0x2
1368 PR_GET_CHILD_SUBREAPER = 0x25
1369 PR_GET_DUMPABLE = 0x3
1370 PR_GET_ENDIAN = 0x13
1371 PR_GET_FPEMU = 0x9
1372 PR_GET_FPEXC = 0xb
1373 PR_GET_FP_MODE = 0x2e
1374 PR_GET_KEEPCAPS = 0x7
1375 PR_GET_NAME = 0x10
1376 PR_GET_NO_NEW_PRIVS = 0x27
1377 PR_GET_PDEATHSIG = 0x2
1378 PR_GET_SECCOMP = 0x15
1379 PR_GET_SECUREBITS = 0x1b
1380 PR_GET_SPECULATION_CTRL = 0x34
1381 PR_GET_THP_DISABLE = 0x2a
1382 PR_GET_TID_ADDRESS = 0x28
1383 PR_GET_TIMERSLACK = 0x1e
1384 PR_GET_TIMING = 0xd
1385 PR_GET_TSC = 0x19
1386 PR_GET_UNALIGN = 0x5
1387 PR_MCE_KILL = 0x21
1388 PR_MCE_KILL_CLEAR = 0x0
1389 PR_MCE_KILL_DEFAULT = 0x2
1390 PR_MCE_KILL_EARLY = 0x1
1391 PR_MCE_KILL_GET = 0x22
1392 PR_MCE_KILL_LATE = 0x0
1393 PR_MCE_KILL_SET = 0x1
1394 PR_MPX_DISABLE_MANAGEMENT = 0x2c
1395 PR_MPX_ENABLE_MANAGEMENT = 0x2b
1396 PR_SET_CHILD_SUBREAPER = 0x24
1397 PR_SET_DUMPABLE = 0x4
1398 PR_SET_ENDIAN = 0x14
1399 PR_SET_FPEMU = 0xa
1400 PR_SET_FPEXC = 0xc
1401 PR_SET_FP_MODE = 0x2d
1402 PR_SET_KEEPCAPS = 0x8
1403 PR_SET_MM = 0x23
1404 PR_SET_MM_ARG_END = 0x9
1405 PR_SET_MM_ARG_START = 0x8
1406 PR_SET_MM_AUXV = 0xc
1407 PR_SET_MM_BRK = 0x7
1408 PR_SET_MM_END_CODE = 0x2
1409 PR_SET_MM_END_DATA = 0x4
1410 PR_SET_MM_ENV_END = 0xb
1411 PR_SET_MM_ENV_START = 0xa
1412 PR_SET_MM_EXE_FILE = 0xd
1413 PR_SET_MM_MAP = 0xe
1414 PR_SET_MM_MAP_SIZE = 0xf
1415 PR_SET_MM_START_BRK = 0x6
1416 PR_SET_MM_START_CODE = 0x1
1417 PR_SET_MM_START_DATA = 0x3
1418 PR_SET_MM_START_STACK = 0x5
1419 PR_SET_NAME = 0xf
1420 PR_SET_NO_NEW_PRIVS = 0x26
1421 PR_SET_PDEATHSIG = 0x1
1422 PR_SET_PTRACER = 0x59616d61
1423 PR_SET_PTRACER_ANY = 0xffffffffffffffff
1424 PR_SET_SECCOMP = 0x16
1425 PR_SET_SECUREBITS = 0x1c
1426 PR_SET_SPECULATION_CTRL = 0x35
1427 PR_SET_THP_DISABLE = 0x29
1428 PR_SET_TIMERSLACK = 0x1d
1429 PR_SET_TIMING = 0xe
1430 PR_SET_TSC = 0x1a
1431 PR_SET_UNALIGN = 0x6
1432 PR_SPEC_DISABLE = 0x4
1433 PR_SPEC_ENABLE = 0x2
1434 PR_SPEC_FORCE_DISABLE = 0x8
1435 PR_SPEC_INDIRECT_BRANCH = 0x1
1436 PR_SPEC_NOT_AFFECTED = 0x0
1437 PR_SPEC_PRCTL = 0x1
1438 PR_SPEC_STORE_BYPASS = 0x0
1439 PR_SVE_GET_VL = 0x33
1440 PR_SVE_SET_VL = 0x32
1441 PR_SVE_SET_VL_ONEXEC = 0x40000
1442 PR_SVE_VL_INHERIT = 0x20000
1443 PR_SVE_VL_LEN_MASK = 0xffff
1444 PR_TASK_PERF_EVENTS_DISABLE = 0x1f
1445 PR_TASK_PERF_EVENTS_ENABLE = 0x20
1446 PR_TIMING_STATISTICAL = 0x0
1447 PR_TIMING_TIMESTAMP = 0x1
1448 PR_TSC_ENABLE = 0x1
1449 PR_TSC_SIGSEGV = 0x2
1450 PR_UNALIGN_NOPRINT = 0x1
1451 PR_UNALIGN_SIGBUS = 0x2
1452 PSTOREFS_MAGIC = 0x6165676c
1453 PTRACE_ATTACH = 0x10
1454 PTRACE_CONT = 0x7
1455 PTRACE_DETACH = 0x11
1456 PTRACE_EVENT_CLONE = 0x3
1457 PTRACE_EVENT_EXEC = 0x4
1458 PTRACE_EVENT_EXIT = 0x6
1459 PTRACE_EVENT_FORK = 0x1
1460 PTRACE_EVENT_SECCOMP = 0x7
1461 PTRACE_EVENT_STOP = 0x80
1462 PTRACE_EVENT_VFORK = 0x2
1463 PTRACE_EVENT_VFORK_DONE = 0x5
1464 PTRACE_GETEVENTMSG = 0x4201
1465 PTRACE_GETREGS = 0xc
1466 PTRACE_GETREGSET = 0x4204
1467 PTRACE_GETSIGINFO = 0x4202
1468 PTRACE_GETSIGMASK = 0x420a
1469 PTRACE_INTERRUPT = 0x4207
1470 PTRACE_KILL = 0x8
1471 PTRACE_LISTEN = 0x4208
1472 PTRACE_O_EXITKILL = 0x100000
1473 PTRACE_O_MASK = 0x3000ff
1474 PTRACE_O_SUSPEND_SECCOMP = 0x200000
1475 PTRACE_O_TRACECLONE = 0x8
1476 PTRACE_O_TRACEEXEC = 0x10
1477 PTRACE_O_TRACEEXIT = 0x40
1478 PTRACE_O_TRACEFORK = 0x2
1479 PTRACE_O_TRACESECCOMP = 0x80
1480 PTRACE_O_TRACESYSGOOD = 0x1
1481 PTRACE_O_TRACEVFORK = 0x4
1482 PTRACE_O_TRACEVFORKDONE = 0x20
1483 PTRACE_PEEKDATA = 0x2
1484 PTRACE_PEEKSIGINFO = 0x4209
1485 PTRACE_PEEKSIGINFO_SHARED = 0x1
1486 PTRACE_PEEKTEXT = 0x1
1487 PTRACE_PEEKUSR = 0x3
1488 PTRACE_POKEDATA = 0x5
1489 PTRACE_POKETEXT = 0x4
1490 PTRACE_POKEUSR = 0x6
1491 PTRACE_SECCOMP_GET_FILTER = 0x420c
1492 PTRACE_SECCOMP_GET_METADATA = 0x420d
1493 PTRACE_SEIZE = 0x4206
1494 PTRACE_SETOPTIONS = 0x4200
1495 PTRACE_SETREGS = 0xd
1496 PTRACE_SETREGSET = 0x4205
1497 PTRACE_SETSIGINFO = 0x4203
1498 PTRACE_SETSIGMASK = 0x420b
1499 PTRACE_SINGLESTEP = 0x9
1500 PTRACE_SYSCALL = 0x18
1501 PTRACE_TRACEME = 0x0
1502 QNX4_SUPER_MAGIC = 0x2f
1503 QNX6_SUPER_MAGIC = 0x68191122
1504 RAMFS_MAGIC = 0x858458f6
1505 RDTGROUP_SUPER_MAGIC = 0x7655821
1506 REISERFS_SUPER_MAGIC = 0x52654973
1507 RENAME_EXCHANGE = 0x2
1508 RENAME_NOREPLACE = 0x1
1509 RENAME_WHITEOUT = 0x4
1510 RLIMIT_AS = 0x9
1511 RLIMIT_CORE = 0x4
1512 RLIMIT_CPU = 0x0
1513 RLIMIT_DATA = 0x2
1514 RLIMIT_FSIZE = 0x1
1515 RLIMIT_LOCKS = 0xa
1516 RLIMIT_MEMLOCK = 0x8
1517 RLIMIT_MSGQUEUE = 0xc
1518 RLIMIT_NICE = 0xd
1519 RLIMIT_NOFILE = 0x7
1520 RLIMIT_NPROC = 0x6
1521 RLIMIT_RSS = 0x5
1522 RLIMIT_RTPRIO = 0xe
1523 RLIMIT_RTTIME = 0xf
1524 RLIMIT_SIGPENDING = 0xb
1525 RLIMIT_STACK = 0x3
1526 RLIM_INFINITY = 0xffffffffffffffff
1527 RTAX_ADVMSS = 0x8
1528 RTAX_CC_ALGO = 0x10
1529 RTAX_CWND = 0x7
1530 RTAX_FASTOPEN_NO_COOKIE = 0x11
1531 RTAX_FEATURES = 0xc
1532 RTAX_FEATURE_ALLFRAG = 0x8
1533 RTAX_FEATURE_ECN = 0x1
1534 RTAX_FEATURE_MASK = 0xf
1535 RTAX_FEATURE_SACK = 0x2
1536 RTAX_FEATURE_TIMESTAMP = 0x4
1537 RTAX_HOPLIMIT = 0xa
1538 RTAX_INITCWND = 0xb
1539 RTAX_INITRWND = 0xe
1540 RTAX_LOCK = 0x1
1541 RTAX_MAX = 0x11
1542 RTAX_MTU = 0x2
1543 RTAX_QUICKACK = 0xf
1544 RTAX_REORDERING = 0x9
1545 RTAX_RTO_MIN = 0xd
1546 RTAX_RTT = 0x4
1547 RTAX_RTTVAR = 0x5
1548 RTAX_SSTHRESH = 0x6
1549 RTAX_UNSPEC = 0x0
1550 RTAX_WINDOW = 0x3
1551 RTA_ALIGNTO = 0x4
1552 RTA_MAX = 0x1d
1553 RTCF_DIRECTSRC = 0x4000000
1554 RTCF_DOREDIRECT = 0x1000000
1555 RTCF_LOG = 0x2000000
1556 RTCF_MASQ = 0x400000
1557 RTCF_NAT = 0x800000
1558 RTCF_VALVE = 0x200000
1559 RTC_AF = 0x20
1560 RTC_AIE_OFF = 0x7002
1561 RTC_AIE_ON = 0x7001
1562 RTC_ALM_READ = 0x80247008
1563 RTC_ALM_SET = 0x40247007
1564 RTC_EPOCH_READ = 0x8008700d
1565 RTC_EPOCH_SET = 0x4008700e
1566 RTC_IRQF = 0x80
1567 RTC_IRQP_READ = 0x8008700b
1568 RTC_IRQP_SET = 0x4008700c
1569 RTC_MAX_FREQ = 0x2000
1570 RTC_PF = 0x40
1571 RTC_PIE_OFF = 0x7006
1572 RTC_PIE_ON = 0x7005
1573 RTC_PLL_GET = 0x80207011
1574 RTC_PLL_SET = 0x40207012
1575 RTC_RD_TIME = 0x80247009
1576 RTC_SET_TIME = 0x4024700a
1577 RTC_UF = 0x10
1578 RTC_UIE_OFF = 0x7004
1579 RTC_UIE_ON = 0x7003
1580 RTC_VL_CLR = 0x7014
1581 RTC_VL_READ = 0x80047013
1582 RTC_WIE_OFF = 0x7010
1583 RTC_WIE_ON = 0x700f
1584 RTC_WKALM_RD = 0x80287010
1585 RTC_WKALM_SET = 0x4028700f
1586 RTF_ADDRCLASSMASK = 0xf8000000
1587 RTF_ADDRCONF = 0x40000
1588 RTF_ALLONLINK = 0x20000
1589 RTF_BROADCAST = 0x10000000
1590 RTF_CACHE = 0x1000000
1591 RTF_DEFAULT = 0x10000
1592 RTF_DYNAMIC = 0x10
1593 RTF_FLOW = 0x2000000
1594 RTF_GATEWAY = 0x2
1595 RTF_HOST = 0x4
1596 RTF_INTERFACE = 0x40000000
1597 RTF_IRTT = 0x100
1598 RTF_LINKRT = 0x100000
1599 RTF_LOCAL = 0x80000000
1600 RTF_MODIFIED = 0x20
1601 RTF_MSS = 0x40
1602 RTF_MTU = 0x40
1603 RTF_MULTICAST = 0x20000000
1604 RTF_NAT = 0x8000000
1605 RTF_NOFORWARD = 0x1000
1606 RTF_NONEXTHOP = 0x200000
1607 RTF_NOPMTUDISC = 0x4000
1608 RTF_POLICY = 0x4000000
1609 RTF_REINSTATE = 0x8
1610 RTF_REJECT = 0x200
1611 RTF_STATIC = 0x400
1612 RTF_THROW = 0x2000
1613 RTF_UP = 0x1
1614 RTF_WINDOW = 0x80
1615 RTF_XRESOLVE = 0x800
1616 RTM_BASE = 0x10
1617 RTM_DELACTION = 0x31
1618 RTM_DELADDR = 0x15
1619 RTM_DELADDRLABEL = 0x49
1620 RTM_DELCHAIN = 0x65
1621 RTM_DELLINK = 0x11
1622 RTM_DELMDB = 0x55
1623 RTM_DELNEIGH = 0x1d
1624 RTM_DELNETCONF = 0x51
1625 RTM_DELNSID = 0x59
1626 RTM_DELQDISC = 0x25
1627 RTM_DELROUTE = 0x19
1628 RTM_DELRULE = 0x21
1629 RTM_DELTCLASS = 0x29
1630 RTM_DELTFILTER = 0x2d
1631 RTM_F_CLONED = 0x200
1632 RTM_F_EQUALIZE = 0x400
1633 RTM_F_FIB_MATCH = 0x2000
1634 RTM_F_LOOKUP_TABLE = 0x1000
1635 RTM_F_NOTIFY = 0x100
1636 RTM_F_PREFIX = 0x800
1637 RTM_GETACTION = 0x32
1638 RTM_GETADDR = 0x16
1639 RTM_GETADDRLABEL = 0x4a
1640 RTM_GETANYCAST = 0x3e
1641 RTM_GETCHAIN = 0x66
1642 RTM_GETDCB = 0x4e
1643 RTM_GETLINK = 0x12
1644 RTM_GETMDB = 0x56
1645 RTM_GETMULTICAST = 0x3a
1646 RTM_GETNEIGH = 0x1e
1647 RTM_GETNEIGHTBL = 0x42
1648 RTM_GETNETCONF = 0x52
1649 RTM_GETNSID = 0x5a
1650 RTM_GETQDISC = 0x26
1651 RTM_GETROUTE = 0x1a
1652 RTM_GETRULE = 0x22
1653 RTM_GETSTATS = 0x5e
1654 RTM_GETTCLASS = 0x2a
1655 RTM_GETTFILTER = 0x2e
1656 RTM_MAX = 0x67
1657 RTM_NEWACTION = 0x30
1658 RTM_NEWADDR = 0x14
1659 RTM_NEWADDRLABEL = 0x48
1660 RTM_NEWCACHEREPORT = 0x60
1661 RTM_NEWCHAIN = 0x64
1662 RTM_NEWLINK = 0x10
1663 RTM_NEWMDB = 0x54
1664 RTM_NEWNDUSEROPT = 0x44
1665 RTM_NEWNEIGH = 0x1c
1666 RTM_NEWNEIGHTBL = 0x40
1667 RTM_NEWNETCONF = 0x50
1668 RTM_NEWNSID = 0x58
1669 RTM_NEWPREFIX = 0x34
1670 RTM_NEWQDISC = 0x24
1671 RTM_NEWROUTE = 0x18
1672 RTM_NEWRULE = 0x20
1673 RTM_NEWSTATS = 0x5c
1674 RTM_NEWTCLASS = 0x28
1675 RTM_NEWTFILTER = 0x2c
1676 RTM_NR_FAMILIES = 0x16
1677 RTM_NR_MSGTYPES = 0x58
1678 RTM_SETDCB = 0x4f
1679 RTM_SETLINK = 0x13
1680 RTM_SETNEIGHTBL = 0x43
1681 RTNH_ALIGNTO = 0x4
1682 RTNH_COMPARE_MASK = 0x19
1683 RTNH_F_DEAD = 0x1
1684 RTNH_F_LINKDOWN = 0x10
1685 RTNH_F_OFFLOAD = 0x8
1686 RTNH_F_ONLINK = 0x4
1687 RTNH_F_PERVASIVE = 0x2
1688 RTNH_F_UNRESOLVED = 0x20
1689 RTN_MAX = 0xb
1690 RTPROT_BABEL = 0x2a
1691 RTPROT_BGP = 0xba
1692 RTPROT_BIRD = 0xc
1693 RTPROT_BOOT = 0x3
1694 RTPROT_DHCP = 0x10
1695 RTPROT_DNROUTED = 0xd
1696 RTPROT_EIGRP = 0xc0
1697 RTPROT_GATED = 0x8
1698 RTPROT_ISIS = 0xbb
1699 RTPROT_KERNEL = 0x2
1700 RTPROT_MROUTED = 0x11
1701 RTPROT_MRT = 0xa
1702 RTPROT_NTK = 0xf
1703 RTPROT_OSPF = 0xbc
1704 RTPROT_RA = 0x9
1705 RTPROT_REDIRECT = 0x1
1706 RTPROT_RIP = 0xbd
1707 RTPROT_STATIC = 0x4
1708 RTPROT_UNSPEC = 0x0
1709 RTPROT_XORP = 0xe
1710 RTPROT_ZEBRA = 0xb
1711 RT_CLASS_DEFAULT = 0xfd
1712 RT_CLASS_LOCAL = 0xff
1713 RT_CLASS_MAIN = 0xfe
1714 RT_CLASS_MAX = 0xff
1715 RT_CLASS_UNSPEC = 0x0
1716 RUSAGE_CHILDREN = -0x1
1717 RUSAGE_SELF = 0x0
1718 RUSAGE_THREAD = 0x1
1719 SCM_CREDENTIALS = 0x2
1720 SCM_RIGHTS = 0x1
1721 SCM_TIMESTAMP = 0x1d
1722 SCM_TIMESTAMPING = 0x25
1723 SCM_TIMESTAMPING_OPT_STATS = 0x36
1724 SCM_TIMESTAMPING_PKTINFO = 0x3a
1725 SCM_TIMESTAMPNS = 0x23
1726 SCM_TXTIME = 0x3d
1727 SCM_WIFI_STATUS = 0x29
1728 SC_LOG_FLUSH = 0x100000
1729 SECCOMP_MODE_DISABLED = 0x0
1730 SECCOMP_MODE_FILTER = 0x2
1731 SECCOMP_MODE_STRICT = 0x1
1732 SECURITYFS_MAGIC = 0x73636673
1733 SELINUX_MAGIC = 0xf97cff8c
1734 SFD_CLOEXEC = 0x80000
1735 SFD_NONBLOCK = 0x800
1736 SHUT_RD = 0x0
1737 SHUT_RDWR = 0x2
1738 SHUT_WR = 0x1
1739 SIOCADDDLCI = 0x8980
1740 SIOCADDMULTI = 0x8931
1741 SIOCADDRT = 0x890b
1742 SIOCATMARK = 0x8905
1743 SIOCBONDCHANGEACTIVE = 0x8995
1744 SIOCBONDENSLAVE = 0x8990
1745 SIOCBONDINFOQUERY = 0x8994
1746 SIOCBONDRELEASE = 0x8991
1747 SIOCBONDSETHWADDR = 0x8992
1748 SIOCBONDSLAVEINFOQUERY = 0x8993
1749 SIOCBRADDBR = 0x89a0
1750 SIOCBRADDIF = 0x89a2
1751 SIOCBRDELBR = 0x89a1
1752 SIOCBRDELIF = 0x89a3
1753 SIOCDARP = 0x8953
1754 SIOCDELDLCI = 0x8981
1755 SIOCDELMULTI = 0x8932
1756 SIOCDELRT = 0x890c
1757 SIOCDEVPRIVATE = 0x89f0
1758 SIOCDIFADDR = 0x8936
1759 SIOCDRARP = 0x8960
1760 SIOCETHTOOL = 0x8946
1761 SIOCGARP = 0x8954
1762 SIOCGHWTSTAMP = 0x89b1
1763 SIOCGIFADDR = 0x8915
1764 SIOCGIFBR = 0x8940
1765 SIOCGIFBRDADDR = 0x8919
1766 SIOCGIFCONF = 0x8912
1767 SIOCGIFCOUNT = 0x8938
1768 SIOCGIFDSTADDR = 0x8917
1769 SIOCGIFENCAP = 0x8925
1770 SIOCGIFFLAGS = 0x8913
1771 SIOCGIFHWADDR = 0x8927
1772 SIOCGIFINDEX = 0x8933
1773 SIOCGIFMAP = 0x8970
1774 SIOCGIFMEM = 0x891f
1775 SIOCGIFMETRIC = 0x891d
1776 SIOCGIFMTU = 0x8921
1777 SIOCGIFNAME = 0x8910
1778 SIOCGIFNETMASK = 0x891b
1779 SIOCGIFPFLAGS = 0x8935
1780 SIOCGIFSLAVE = 0x8929
1781 SIOCGIFTXQLEN = 0x8942
1782 SIOCGIFVLAN = 0x8982
1783 SIOCGMIIPHY = 0x8947
1784 SIOCGMIIREG = 0x8948
1785 SIOCGPGRP = 0x8904
1786 SIOCGPPPCSTATS = 0x89f2
1787 SIOCGPPPSTATS = 0x89f0
1788 SIOCGPPPVER = 0x89f1
1789 SIOCGRARP = 0x8961
1790 SIOCGSKNS = 0x894c
1791 SIOCGSTAMP = 0x8906
1792 SIOCGSTAMPNS = 0x8907
1793 SIOCINQ = 0x541b
1794 SIOCOUTQ = 0x5411
1795 SIOCOUTQNSD = 0x894b
1796 SIOCPROTOPRIVATE = 0x89e0
1797 SIOCRTMSG = 0x890d
1798 SIOCSARP = 0x8955
1799 SIOCSHWTSTAMP = 0x89b0
1800 SIOCSIFADDR = 0x8916
1801 SIOCSIFBR = 0x8941
1802 SIOCSIFBRDADDR = 0x891a
1803 SIOCSIFDSTADDR = 0x8918
1804 SIOCSIFENCAP = 0x8926
1805 SIOCSIFFLAGS = 0x8914
1806 SIOCSIFHWADDR = 0x8924
1807 SIOCSIFHWBROADCAST = 0x8937
1808 SIOCSIFLINK = 0x8911
1809 SIOCSIFMAP = 0x8971
1810 SIOCSIFMEM = 0x8920
1811 SIOCSIFMETRIC = 0x891e
1812 SIOCSIFMTU = 0x8922
1813 SIOCSIFNAME = 0x8923
1814 SIOCSIFNETMASK = 0x891c
1815 SIOCSIFPFLAGS = 0x8934
1816 SIOCSIFSLAVE = 0x8930
1817 SIOCSIFTXQLEN = 0x8943
1818 SIOCSIFVLAN = 0x8983
1819 SIOCSMIIREG = 0x8949
1820 SIOCSPGRP = 0x8902
1821 SIOCSRARP = 0x8962
1822 SIOCWANDEV = 0x894a
1823 SMACK_MAGIC = 0x43415d53
1824 SMART_AUTOSAVE = 0xd2
1825 SMART_AUTO_OFFLINE = 0xdb
1826 SMART_DISABLE = 0xd9
1827 SMART_ENABLE = 0xd8
1828 SMART_HCYL_PASS = 0xc2
1829 SMART_IMMEDIATE_OFFLINE = 0xd4
1830 SMART_LCYL_PASS = 0x4f
1831 SMART_READ_LOG_SECTOR = 0xd5
1832 SMART_READ_THRESHOLDS = 0xd1
1833 SMART_READ_VALUES = 0xd0
1834 SMART_SAVE = 0xd3
1835 SMART_STATUS = 0xda
1836 SMART_WRITE_LOG_SECTOR = 0xd6
1837 SMART_WRITE_THRESHOLDS = 0xd7
1838 SMB_SUPER_MAGIC = 0x517b
1839 SOCKFS_MAGIC = 0x534f434b
1840 SOCK_CLOEXEC = 0x80000
1841 SOCK_DCCP = 0x6
1842 SOCK_DGRAM = 0x2
1843 SOCK_IOC_TYPE = 0x89
1844 SOCK_NONBLOCK = 0x800
1845 SOCK_PACKET = 0xa
1846 SOCK_RAW = 0x3
1847 SOCK_RDM = 0x4
1848 SOCK_SEQPACKET = 0x5
1849 SOCK_STREAM = 0x1
1850 SOL_AAL = 0x109
1851 SOL_ALG = 0x117
1852 SOL_ATM = 0x108
1853 SOL_CAIF = 0x116
1854 SOL_CAN_BASE = 0x64
1855 SOL_DCCP = 0x10d
1856 SOL_DECNET = 0x105
1857 SOL_ICMPV6 = 0x3a
1858 SOL_IP = 0x0
1859 SOL_IPV6 = 0x29
1860 SOL_IRDA = 0x10a
1861 SOL_IUCV = 0x115
1862 SOL_KCM = 0x119
1863 SOL_LLC = 0x10c
1864 SOL_NETBEUI = 0x10b
1865 SOL_NETLINK = 0x10e
1866 SOL_NFC = 0x118
1867 SOL_PACKET = 0x107
1868 SOL_PNPIPE = 0x113
1869 SOL_PPPOL2TP = 0x111
1870 SOL_RAW = 0xff
1871 SOL_RDS = 0x114
1872 SOL_RXRPC = 0x110
1873 SOL_SOCKET = 0x1
1874 SOL_TCP = 0x6
1875 SOL_TIPC = 0x10f
1876 SOL_TLS = 0x11a
1877 SOL_X25 = 0x106
1878 SOL_XDP = 0x11b
1879 SOMAXCONN = 0x80
1880 SO_ACCEPTCONN = 0x1e
1881 SO_ATTACH_BPF = 0x32
1882 SO_ATTACH_FILTER = 0x1a
1883 SO_ATTACH_REUSEPORT_CBPF = 0x33
1884 SO_ATTACH_REUSEPORT_EBPF = 0x34
1885 SO_BINDTODEVICE = 0x19
1886 SO_BPF_EXTENSIONS = 0x30
1887 SO_BROADCAST = 0x6
1888 SO_BSDCOMPAT = 0xe
1889 SO_BUSY_POLL = 0x2e
1890 SO_CNX_ADVICE = 0x35
1891 SO_COOKIE = 0x39
1892 SO_DEBUG = 0x1
1893 SO_DETACH_BPF = 0x1b
1894 SO_DETACH_FILTER = 0x1b
1895 SO_DOMAIN = 0x27
1896 SO_DONTROUTE = 0x5
1897 SO_ERROR = 0x4
1898 SO_GET_FILTER = 0x1a
1899 SO_INCOMING_CPU = 0x31
1900 SO_INCOMING_NAPI_ID = 0x38
1901 SO_KEEPALIVE = 0x9
1902 SO_LINGER = 0xd
1903 SO_LOCK_FILTER = 0x2c
1904 SO_MARK = 0x24
1905 SO_MAX_PACING_RATE = 0x2f
1906 SO_MEMINFO = 0x37
1907 SO_NOFCS = 0x2b
1908 SO_NO_CHECK = 0xb
1909 SO_OOBINLINE = 0xa
1910 SO_PASSCRED = 0x10
1911 SO_PASSSEC = 0x22
1912 SO_PEEK_OFF = 0x2a
1913 SO_PEERCRED = 0x11
1914 SO_PEERGROUPS = 0x3b
1915 SO_PEERNAME = 0x1c
1916 SO_PEERSEC = 0x1f
1917 SO_PRIORITY = 0xc
1918 SO_PROTOCOL = 0x26
1919 SO_RCVBUF = 0x8
1920 SO_RCVBUFFORCE = 0x21
1921 SO_RCVLOWAT = 0x12
1922 SO_RCVTIMEO = 0x14
1923 SO_REUSEADDR = 0x2
1924 SO_REUSEPORT = 0xf
1925 SO_RXQ_OVFL = 0x28
1926 SO_SECURITY_AUTHENTICATION = 0x16
1927 SO_SECURITY_ENCRYPTION_NETWORK = 0x18
1928 SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
1929 SO_SELECT_ERR_QUEUE = 0x2d
1930 SO_SNDBUF = 0x7
1931 SO_SNDBUFFORCE = 0x20
1932 SO_SNDLOWAT = 0x13
1933 SO_SNDTIMEO = 0x15
1934 SO_TIMESTAMP = 0x1d
1935 SO_TIMESTAMPING = 0x25
1936 SO_TIMESTAMPNS = 0x23
1937 SO_TXTIME = 0x3d
1938 SO_TYPE = 0x3
1939 SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
1940 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
1941 SO_VM_SOCKETS_BUFFER_SIZE = 0x0
1942 SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
1943 SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
1944 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
1945 SO_VM_SOCKETS_TRUSTED = 0x5
1946 SO_WIFI_STATUS = 0x29
1947 SO_ZEROCOPY = 0x3c
1948 SPLICE_F_GIFT = 0x8
1949 SPLICE_F_MORE = 0x4
1950 SPLICE_F_MOVE = 0x1
1951 SPLICE_F_NONBLOCK = 0x2
1952 SQUASHFS_MAGIC = 0x73717368
1953 STACK_END_MAGIC = 0x57ac6e9d
1954 STATX_ALL = 0xfff
1955 STATX_ATIME = 0x20
1956 STATX_ATTR_APPEND = 0x20
1957 STATX_ATTR_AUTOMOUNT = 0x1000
1958 STATX_ATTR_COMPRESSED = 0x4
1959 STATX_ATTR_ENCRYPTED = 0x800
1960 STATX_ATTR_IMMUTABLE = 0x10
1961 STATX_ATTR_NODUMP = 0x40
1962 STATX_BASIC_STATS = 0x7ff
1963 STATX_BLOCKS = 0x400
1964 STATX_BTIME = 0x800
1965 STATX_CTIME = 0x80
1966 STATX_GID = 0x10
1967 STATX_INO = 0x100
1968 STATX_MODE = 0x2
1969 STATX_MTIME = 0x40
1970 STATX_NLINK = 0x4
1971 STATX_SIZE = 0x200
1972 STATX_TYPE = 0x1
1973 STATX_UID = 0x8
1974 STATX__RESERVED = 0x80000000
1975 SYNC_FILE_RANGE_WAIT_AFTER = 0x4
1976 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
1977 SYNC_FILE_RANGE_WRITE = 0x2
1978 SYSFS_MAGIC = 0x62656572
1979 S_BLKSIZE = 0x200
1980 S_IEXEC = 0x40
1981 S_IFBLK = 0x6000
1982 S_IFCHR = 0x2000
1983 S_IFDIR = 0x4000
1984 S_IFIFO = 0x1000
1985 S_IFLNK = 0xa000
1986 S_IFMT = 0xf000
1987 S_IFREG = 0x8000
1988 S_IFSOCK = 0xc000
1989 S_IREAD = 0x100
1990 S_IRGRP = 0x20
1991 S_IROTH = 0x4
1992 S_IRUSR = 0x100
1993 S_IRWXG = 0x38
1994 S_IRWXO = 0x7
1995 S_IRWXU = 0x1c0
1996 S_ISGID = 0x400
1997 S_ISUID = 0x800
1998 S_ISVTX = 0x200
1999 S_IWGRP = 0x10
2000 S_IWOTH = 0x2
2001 S_IWRITE = 0x80
2002 S_IWUSR = 0x80
2003 S_IXGRP = 0x8
2004 S_IXOTH = 0x1
2005 S_IXUSR = 0x40
2006 TAB0 = 0x0
2007 TAB1 = 0x800
2008 TAB2 = 0x1000
2009 TAB3 = 0x1800
2010 TABDLY = 0x1800
2011 TASKSTATS_CMD_ATTR_MAX = 0x4
2012 TASKSTATS_CMD_MAX = 0x2
2013 TASKSTATS_GENL_NAME = "TASKSTATS"
2014 TASKSTATS_GENL_VERSION = 0x1
2015 TASKSTATS_TYPE_MAX = 0x6
2016 TASKSTATS_VERSION = 0x9
2017 TCFLSH = 0x540b
2018 TCGETA = 0x5405
2019 TCGETS = 0x5401
2020 TCGETS2 = 0x802c542a
2021 TCGETX = 0x5432
2022 TCIFLUSH = 0x0
2023 TCIOFF = 0x2
2024 TCIOFLUSH = 0x2
2025 TCION = 0x3
2026 TCOFLUSH = 0x1
2027 TCOOFF = 0x0
2028 TCOON = 0x1
2029 TCP_CC_INFO = 0x1a
2030 TCP_CONGESTION = 0xd
2031 TCP_COOKIE_IN_ALWAYS = 0x1
2032 TCP_COOKIE_MAX = 0x10
2033 TCP_COOKIE_MIN = 0x8
2034 TCP_COOKIE_OUT_NEVER = 0x2
2035 TCP_COOKIE_PAIR_SIZE = 0x20
2036 TCP_COOKIE_TRANSACTIONS = 0xf
2037 TCP_CORK = 0x3
2038 TCP_DEFER_ACCEPT = 0x9
2039 TCP_FASTOPEN = 0x17
2040 TCP_FASTOPEN_CONNECT = 0x1e
2041 TCP_FASTOPEN_KEY = 0x21
2042 TCP_FASTOPEN_NO_COOKIE = 0x22
2043 TCP_INFO = 0xb
2044 TCP_KEEPCNT = 0x6
2045 TCP_KEEPIDLE = 0x4
2046 TCP_KEEPINTVL = 0x5
2047 TCP_LINGER2 = 0x8
2048 TCP_MAXSEG = 0x2
2049 TCP_MAXWIN = 0xffff
2050 TCP_MAX_WINSHIFT = 0xe
2051 TCP_MD5SIG = 0xe
2052 TCP_MD5SIG_EXT = 0x20
2053 TCP_MD5SIG_FLAG_PREFIX = 0x1
2054 TCP_MD5SIG_MAXKEYLEN = 0x50
2055 TCP_MSS = 0x200
2056 TCP_MSS_DEFAULT = 0x218
2057 TCP_MSS_DESIRED = 0x4c4
2058 TCP_NODELAY = 0x1
2059 TCP_NOTSENT_LOWAT = 0x19
2060 TCP_QUEUE_SEQ = 0x15
2061 TCP_QUICKACK = 0xc
2062 TCP_REPAIR = 0x13
2063 TCP_REPAIR_OPTIONS = 0x16
2064 TCP_REPAIR_QUEUE = 0x14
2065 TCP_REPAIR_WINDOW = 0x1d
2066 TCP_SAVED_SYN = 0x1c
2067 TCP_SAVE_SYN = 0x1b
2068 TCP_SYNCNT = 0x7
2069 TCP_S_DATA_IN = 0x4
2070 TCP_S_DATA_OUT = 0x8
2071 TCP_THIN_DUPACK = 0x11
2072 TCP_THIN_LINEAR_TIMEOUTS = 0x10
2073 TCP_TIMESTAMP = 0x18
2074 TCP_ULP = 0x1f
2075 TCP_USER_TIMEOUT = 0x12
2076 TCP_WINDOW_CLAMP = 0xa
2077 TCSAFLUSH = 0x2
2078 TCSBRK = 0x5409
2079 TCSBRKP = 0x5425
2080 TCSETA = 0x5406
2081 TCSETAF = 0x5408
2082 TCSETAW = 0x5407
2083 TCSETS = 0x5402
2084 TCSETS2 = 0x402c542b
2085 TCSETSF = 0x5404
2086 TCSETSF2 = 0x402c542d
2087 TCSETSW = 0x5403
2088 TCSETSW2 = 0x402c542c
2089 TCSETX = 0x5433
2090 TCSETXF = 0x5434
2091 TCSETXW = 0x5435
2092 TCXONC = 0x540a
2093 TIMER_ABSTIME = 0x1
2094 TIOCCBRK = 0x5428
2095 TIOCCONS = 0x541d
2096 TIOCEXCL = 0x540c
2097 TIOCGDEV = 0x80045432
2098 TIOCGETD = 0x5424
2099 TIOCGEXCL = 0x80045440
2100 TIOCGICOUNT = 0x545d
2101 TIOCGISO7816 = 0x80285442
2102 TIOCGLCKTRMIOS = 0x5456
2103 TIOCGPGRP = 0x540f
2104 TIOCGPKT = 0x80045438
2105 TIOCGPTLCK = 0x80045439
2106 TIOCGPTN = 0x80045430
2107 TIOCGPTPEER = 0x5441
2108 TIOCGRS485 = 0x542e
2109 TIOCGSERIAL = 0x541e
2110 TIOCGSID = 0x5429
2111 TIOCGSOFTCAR = 0x5419
2112 TIOCGWINSZ = 0x5413
2113 TIOCINQ = 0x541b
2114 TIOCLINUX = 0x541c
2115 TIOCMBIC = 0x5417
2116 TIOCMBIS = 0x5416
2117 TIOCMGET = 0x5415
2118 TIOCMIWAIT = 0x545c
2119 TIOCMSET = 0x5418
2120 TIOCM_CAR = 0x40
2121 TIOCM_CD = 0x40
2122 TIOCM_CTS = 0x20
2123 TIOCM_DSR = 0x100
2124 TIOCM_DTR = 0x2
2125 TIOCM_LE = 0x1
2126 TIOCM_RI = 0x80
2127 TIOCM_RNG = 0x80
2128 TIOCM_RTS = 0x4
2129 TIOCM_SR = 0x10
2130 TIOCM_ST = 0x8
2131 TIOCNOTTY = 0x5422
2132 TIOCNXCL = 0x540d
2133 TIOCOUTQ = 0x5411
2134 TIOCPKT = 0x5420
2135 TIOCPKT_DATA = 0x0
2136 TIOCPKT_DOSTOP = 0x20
2137 TIOCPKT_FLUSHREAD = 0x1
2138 TIOCPKT_FLUSHWRITE = 0x2
2139 TIOCPKT_IOCTL = 0x40
2140 TIOCPKT_NOSTOP = 0x10
2141 TIOCPKT_START = 0x8
2142 TIOCPKT_STOP = 0x4
2143 TIOCSBRK = 0x5427
2144 TIOCSCTTY = 0x540e
2145 TIOCSERCONFIG = 0x5453
2146 TIOCSERGETLSR = 0x5459
2147 TIOCSERGETMULTI = 0x545a
2148 TIOCSERGSTRUCT = 0x5458
2149 TIOCSERGWILD = 0x5454
2150 TIOCSERSETMULTI = 0x545b
2151 TIOCSERSWILD = 0x5455
2152 TIOCSER_TEMT = 0x1
2153 TIOCSETD = 0x5423
2154 TIOCSIG = 0x40045436
2155 TIOCSISO7816 = 0xc0285443
2156 TIOCSLCKTRMIOS = 0x5457
2157 TIOCSPGRP = 0x5410
2158 TIOCSPTLCK = 0x40045431
2159 TIOCSRS485 = 0x542f
2160 TIOCSSERIAL = 0x541f
2161 TIOCSSOFTCAR = 0x541a
2162 TIOCSTI = 0x5412
2163 TIOCSWINSZ = 0x5414
2164 TIOCVHANGUP = 0x5437
2165 TMPFS_MAGIC = 0x1021994
2166 TOSTOP = 0x100
2167 TPACKET_ALIGNMENT = 0x10
2168 TPACKET_HDRLEN = 0x34
2169 TP_STATUS_AVAILABLE = 0x0
2170 TP_STATUS_BLK_TMO = 0x20
2171 TP_STATUS_COPY = 0x2
2172 TP_STATUS_CSUMNOTREADY = 0x8
2173 TP_STATUS_CSUM_VALID = 0x80
2174 TP_STATUS_KERNEL = 0x0
2175 TP_STATUS_LOSING = 0x4
2176 TP_STATUS_SENDING = 0x2
2177 TP_STATUS_SEND_REQUEST = 0x1
2178 TP_STATUS_TS_RAW_HARDWARE = -0x80000000
2179 TP_STATUS_TS_SOFTWARE = 0x20000000
2180 TP_STATUS_TS_SYS_HARDWARE = 0x40000000
2181 TP_STATUS_USER = 0x1
2182 TP_STATUS_VLAN_TPID_VALID = 0x40
2183 TP_STATUS_VLAN_VALID = 0x10
2184 TP_STATUS_WRONG_FORMAT = 0x4
2185 TRACEFS_MAGIC = 0x74726163
2186 TS_COMM_LEN = 0x20
2187 TUNATTACHFILTER = 0x401054d5
2188 TUNDETACHFILTER = 0x401054d6
2189 TUNGETFEATURES = 0x800454cf
2190 TUNGETFILTER = 0x801054db
2191 TUNGETIFF = 0x800454d2
2192 TUNGETSNDBUF = 0x800454d3
2193 TUNGETVNETBE = 0x800454df
2194 TUNGETVNETHDRSZ = 0x800454d7
2195 TUNGETVNETLE = 0x800454dd
2196 TUNSETDEBUG = 0x400454c9
2197 TUNSETFILTEREBPF = 0x800454e1
2198 TUNSETGROUP = 0x400454ce
2199 TUNSETIFF = 0x400454ca
2200 TUNSETIFINDEX = 0x400454da
2201 TUNSETLINK = 0x400454cd
2202 TUNSETNOCSUM = 0x400454c8
2203 TUNSETOFFLOAD = 0x400454d0
2204 TUNSETOWNER = 0x400454cc
2205 TUNSETPERSIST = 0x400454cb
2206 TUNSETQUEUE = 0x400454d9
2207 TUNSETSNDBUF = 0x400454d4
2208 TUNSETSTEERINGEBPF = 0x800454e0
2209 TUNSETTXFILTER = 0x400454d1
2210 TUNSETVNETBE = 0x400454de
2211 TUNSETVNETHDRSZ = 0x400454d8
2212 TUNSETVNETLE = 0x400454dc
2213 UBI_IOCATT = 0x40186f40
2214 UBI_IOCDET = 0x40046f41
2215 UBI_IOCEBCH = 0x40044f02
2216 UBI_IOCEBER = 0x40044f01
2217 UBI_IOCEBISMAP = 0x80044f05
2218 UBI_IOCEBMAP = 0x40084f03
2219 UBI_IOCEBUNMAP = 0x40044f04
2220 UBI_IOCMKVOL = 0x40986f00
2221 UBI_IOCRMVOL = 0x40046f01
2222 UBI_IOCRNVOL = 0x51106f03
2223 UBI_IOCRSVOL = 0x400c6f02
2224 UBI_IOCSETVOLPROP = 0x40104f06
2225 UBI_IOCVOLCRBLK = 0x40804f07
2226 UBI_IOCVOLRMBLK = 0x4f08
2227 UBI_IOCVOLUP = 0x40084f00
2228 UDF_SUPER_MAGIC = 0x15013346
2229 UMOUNT_NOFOLLOW = 0x8
2230 USBDEVICE_SUPER_MAGIC = 0x9fa2
2231 UTIME_NOW = 0x3fffffff
2232 UTIME_OMIT = 0x3ffffffe
2233 V9FS_MAGIC = 0x1021997
2234 VDISCARD = 0xd
2235 VEOF = 0x4
2236 VEOL = 0xb
2237 VEOL2 = 0x10
2238 VERASE = 0x2
2239 VINTR = 0x0
2240 VKILL = 0x3
2241 VLNEXT = 0xf
2242 VMADDR_CID_ANY = 0xffffffff
2243 VMADDR_CID_HOST = 0x2
2244 VMADDR_CID_HYPERVISOR = 0x0
2245 VMADDR_CID_RESERVED = 0x1
2246 VMADDR_PORT_ANY = 0xffffffff
2247 VMIN = 0x6
2248 VM_SOCKETS_INVALID_VERSION = 0xffffffff
2249 VQUIT = 0x1
2250 VREPRINT = 0xc
2251 VSTART = 0x8
2252 VSTOP = 0x9
2253 VSUSP = 0xa
2254 VSWTC = 0x7
2255 VT0 = 0x0
2256 VT1 = 0x4000
2257 VTDLY = 0x4000
2258 VTIME = 0x5
2259 VWERASE = 0xe
2260 WALL = 0x40000000
2261 WCLONE = 0x80000000
2262 WCONTINUED = 0x8
2263 WDIOC_GETBOOTSTATUS = 0x80045702
2264 WDIOC_GETPRETIMEOUT = 0x80045709
2265 WDIOC_GETSTATUS = 0x80045701
2266 WDIOC_GETSUPPORT = 0x80285700
2267 WDIOC_GETTEMP = 0x80045703
2268 WDIOC_GETTIMELEFT = 0x8004570a
2269 WDIOC_GETTIMEOUT = 0x80045707
2270 WDIOC_KEEPALIVE = 0x80045705
2271 WDIOC_SETOPTIONS = 0x80045704
2272 WDIOC_SETPRETIMEOUT = 0xc0045708
2273 WDIOC_SETTIMEOUT = 0xc0045706
2274 WEXITED = 0x4
2275 WIN_ACKMEDIACHANGE = 0xdb
2276 WIN_CHECKPOWERMODE1 = 0xe5
2277 WIN_CHECKPOWERMODE2 = 0x98
2278 WIN_DEVICE_RESET = 0x8
2279 WIN_DIAGNOSE = 0x90
2280 WIN_DOORLOCK = 0xde
2281 WIN_DOORUNLOCK = 0xdf
2282 WIN_DOWNLOAD_MICROCODE = 0x92
2283 WIN_FLUSH_CACHE = 0xe7
2284 WIN_FLUSH_CACHE_EXT = 0xea
2285 WIN_FORMAT = 0x50
2286 WIN_GETMEDIASTATUS = 0xda
2287 WIN_IDENTIFY = 0xec
2288 WIN_IDENTIFY_DMA = 0xee
2289 WIN_IDLEIMMEDIATE = 0xe1
2290 WIN_INIT = 0x60
2291 WIN_MEDIAEJECT = 0xed
2292 WIN_MULTREAD = 0xc4
2293 WIN_MULTREAD_EXT = 0x29
2294 WIN_MULTWRITE = 0xc5
2295 WIN_MULTWRITE_EXT = 0x39
2296 WIN_NOP = 0x0
2297 WIN_PACKETCMD = 0xa0
2298 WIN_PIDENTIFY = 0xa1
2299 WIN_POSTBOOT = 0xdc
2300 WIN_PREBOOT = 0xdd
2301 WIN_QUEUED_SERVICE = 0xa2
2302 WIN_READ = 0x20
2303 WIN_READDMA = 0xc8
2304 WIN_READDMA_EXT = 0x25
2305 WIN_READDMA_ONCE = 0xc9
2306 WIN_READDMA_QUEUED = 0xc7
2307 WIN_READDMA_QUEUED_EXT = 0x26
2308 WIN_READ_BUFFER = 0xe4
2309 WIN_READ_EXT = 0x24
2310 WIN_READ_LONG = 0x22
2311 WIN_READ_LONG_ONCE = 0x23
2312 WIN_READ_NATIVE_MAX = 0xf8
2313 WIN_READ_NATIVE_MAX_EXT = 0x27
2314 WIN_READ_ONCE = 0x21
2315 WIN_RECAL = 0x10
2316 WIN_RESTORE = 0x10
2317 WIN_SECURITY_DISABLE = 0xf6
2318 WIN_SECURITY_ERASE_PREPARE = 0xf3
2319 WIN_SECURITY_ERASE_UNIT = 0xf4
2320 WIN_SECURITY_FREEZE_LOCK = 0xf5
2321 WIN_SECURITY_SET_PASS = 0xf1
2322 WIN_SECURITY_UNLOCK = 0xf2
2323 WIN_SEEK = 0x70
2324 WIN_SETFEATURES = 0xef
2325 WIN_SETIDLE1 = 0xe3
2326 WIN_SETIDLE2 = 0x97
2327 WIN_SETMULT = 0xc6
2328 WIN_SET_MAX = 0xf9
2329 WIN_SET_MAX_EXT = 0x37
2330 WIN_SLEEPNOW1 = 0xe6
2331 WIN_SLEEPNOW2 = 0x99
2332 WIN_SMART = 0xb0
2333 WIN_SPECIFY = 0x91
2334 WIN_SRST = 0x8
2335 WIN_STANDBY = 0xe2
2336 WIN_STANDBY2 = 0x96
2337 WIN_STANDBYNOW1 = 0xe0
2338 WIN_STANDBYNOW2 = 0x94
2339 WIN_VERIFY = 0x40
2340 WIN_VERIFY_EXT = 0x42
2341 WIN_VERIFY_ONCE = 0x41
2342 WIN_WRITE = 0x30
2343 WIN_WRITEDMA = 0xca
2344 WIN_WRITEDMA_EXT = 0x35
2345 WIN_WRITEDMA_ONCE = 0xcb
2346 WIN_WRITEDMA_QUEUED = 0xcc
2347 WIN_WRITEDMA_QUEUED_EXT = 0x36
2348 WIN_WRITE_BUFFER = 0xe8
2349 WIN_WRITE_EXT = 0x34
2350 WIN_WRITE_LONG = 0x32
2351 WIN_WRITE_LONG_ONCE = 0x33
2352 WIN_WRITE_ONCE = 0x31
2353 WIN_WRITE_SAME = 0xe9
2354 WIN_WRITE_VERIFY = 0x3c
2355 WNOHANG = 0x1
2356 WNOTHREAD = 0x20000000
2357 WNOWAIT = 0x1000000
2358 WORDSIZE = 0x40
2359 WSTOPPED = 0x2
2360 WUNTRACED = 0x2
2361 XATTR_CREATE = 0x1
2362 XATTR_REPLACE = 0x2
2363 XCASE = 0x4
2364 XDP_COPY = 0x2
2365 XDP_FLAGS_DRV_MODE = 0x4
2366 XDP_FLAGS_HW_MODE = 0x8
2367 XDP_FLAGS_MASK = 0xf
2368 XDP_FLAGS_MODES = 0xe
2369 XDP_FLAGS_SKB_MODE = 0x2
2370 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
2371 XDP_MMAP_OFFSETS = 0x1
2372 XDP_PGOFF_RX_RING = 0x0
2373 XDP_PGOFF_TX_RING = 0x80000000
2374 XDP_RX_RING = 0x2
2375 XDP_SHARED_UMEM = 0x1
2376 XDP_STATISTICS = 0x7
2377 XDP_TX_RING = 0x3
2378 XDP_UMEM_COMPLETION_RING = 0x6
2379 XDP_UMEM_FILL_RING = 0x5
2380 XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
2381 XDP_UMEM_PGOFF_FILL_RING = 0x100000000
2382 XDP_UMEM_REG = 0x4
2383 XDP_ZEROCOPY = 0x4
2384 XENFS_SUPER_MAGIC = 0xabba1974
2385 XFS_SUPER_MAGIC = 0x58465342
2386 XTABS = 0x1800
2387 ZSMALLOC_MAGIC = 0x58295829
2388 )
2389
2390 // Errors
2391 const (
2392 E2BIG = syscall.Errno(0x7)
2393 EACCES = syscall.Errno(0xd)
2394 EADDRINUSE = syscall.Errno(0x62)
2395 EADDRNOTAVAIL = syscall.Errno(0x63)
2396 EADV = syscall.Errno(0x44)
2397 EAFNOSUPPORT = syscall.Errno(0x61)
2398 EAGAIN = syscall.Errno(0xb)
2399 EALREADY = syscall.Errno(0x72)
2400 EBADE = syscall.Errno(0x34)
2401 EBADF = syscall.Errno(0x9)
2402 EBADFD = syscall.Errno(0x4d)
2403 EBADMSG = syscall.Errno(0x4a)
2404 EBADR = syscall.Errno(0x35)
2405 EBADRQC = syscall.Errno(0x38)
2406 EBADSLT = syscall.Errno(0x39)
2407 EBFONT = syscall.Errno(0x3b)
2408 EBUSY = syscall.Errno(0x10)
2409 ECANCELED = syscall.Errno(0x7d)
2410 ECHILD = syscall.Errno(0xa)
2411 ECHRNG = syscall.Errno(0x2c)
2412 ECOMM = syscall.Errno(0x46)
2413 ECONNABORTED = syscall.Errno(0x67)
2414 ECONNREFUSED = syscall.Errno(0x6f)
2415 ECONNRESET = syscall.Errno(0x68)
2416 EDEADLK = syscall.Errno(0x23)
2417 EDEADLOCK = syscall.Errno(0x23)
2418 EDESTADDRREQ = syscall.Errno(0x59)
2419 EDOM = syscall.Errno(0x21)
2420 EDOTDOT = syscall.Errno(0x49)
2421 EDQUOT = syscall.Errno(0x7a)
2422 EEXIST = syscall.Errno(0x11)
2423 EFAULT = syscall.Errno(0xe)
2424 EFBIG = syscall.Errno(0x1b)
2425 EHOSTDOWN = syscall.Errno(0x70)
2426 EHOSTUNREACH = syscall.Errno(0x71)
2427 EHWPOISON = syscall.Errno(0x85)
2428 EIDRM = syscall.Errno(0x2b)
2429 EILSEQ = syscall.Errno(0x54)
2430 EINPROGRESS = syscall.Errno(0x73)
2431 EINTR = syscall.Errno(0x4)
2432 EINVAL = syscall.Errno(0x16)
2433 EIO = syscall.Errno(0x5)
2434 EISCONN = syscall.Errno(0x6a)
2435 EISDIR = syscall.Errno(0x15)
2436 EISNAM = syscall.Errno(0x78)
2437 EKEYEXPIRED = syscall.Errno(0x7f)
2438 EKEYREJECTED = syscall.Errno(0x81)
2439 EKEYREVOKED = syscall.Errno(0x80)
2440 EL2HLT = syscall.Errno(0x33)
2441 EL2NSYNC = syscall.Errno(0x2d)
2442 EL3HLT = syscall.Errno(0x2e)
2443 EL3RST = syscall.Errno(0x2f)
2444 ELIBACC = syscall.Errno(0x4f)
2445 ELIBBAD = syscall.Errno(0x50)
2446 ELIBEXEC = syscall.Errno(0x53)
2447 ELIBMAX = syscall.Errno(0x52)
2448 ELIBSCN = syscall.Errno(0x51)
2449 ELNRNG = syscall.Errno(0x30)
2450 ELOOP = syscall.Errno(0x28)
2451 EMEDIUMTYPE = syscall.Errno(0x7c)
2452 EMFILE = syscall.Errno(0x18)
2453 EMLINK = syscall.Errno(0x1f)
2454 EMSGSIZE = syscall.Errno(0x5a)
2455 EMULTIHOP = syscall.Errno(0x48)
2456 ENAMETOOLONG = syscall.Errno(0x24)
2457 ENAVAIL = syscall.Errno(0x77)
2458 ENETDOWN = syscall.Errno(0x64)
2459 ENETRESET = syscall.Errno(0x66)
2460 ENETUNREACH = syscall.Errno(0x65)
2461 ENFILE = syscall.Errno(0x17)
2462 ENOANO = syscall.Errno(0x37)
2463 ENOBUFS = syscall.Errno(0x69)
2464 ENOCSI = syscall.Errno(0x32)
2465 ENODATA = syscall.Errno(0x3d)
2466 ENODEV = syscall.Errno(0x13)
2467 ENOENT = syscall.Errno(0x2)
2468 ENOEXEC = syscall.Errno(0x8)
2469 ENOKEY = syscall.Errno(0x7e)
2470 ENOLCK = syscall.Errno(0x25)
2471 ENOLINK = syscall.Errno(0x43)
2472 ENOMEDIUM = syscall.Errno(0x7b)
2473 ENOMEM = syscall.Errno(0xc)
2474 ENOMSG = syscall.Errno(0x2a)
2475 ENONET = syscall.Errno(0x40)
2476 ENOPKG = syscall.Errno(0x41)
2477 ENOPROTOOPT = syscall.Errno(0x5c)
2478 ENOSPC = syscall.Errno(0x1c)
2479 ENOSR = syscall.Errno(0x3f)
2480 ENOSTR = syscall.Errno(0x3c)
2481 ENOSYS = syscall.Errno(0x26)
2482 ENOTBLK = syscall.Errno(0xf)
2483 ENOTCONN = syscall.Errno(0x6b)
2484 ENOTDIR = syscall.Errno(0x14)
2485 ENOTEMPTY = syscall.Errno(0x27)
2486 ENOTNAM = syscall.Errno(0x76)
2487 ENOTRECOVERABLE = syscall.Errno(0x83)
2488 ENOTSOCK = syscall.Errno(0x58)
2489 ENOTSUP = syscall.Errno(0x5f)
2490 ENOTTY = syscall.Errno(0x19)
2491 ENOTUNIQ = syscall.Errno(0x4c)
2492 ENXIO = syscall.Errno(0x6)
2493 EOPNOTSUPP = syscall.Errno(0x5f)
2494 EOVERFLOW = syscall.Errno(0x4b)
2495 EOWNERDEAD = syscall.Errno(0x82)
2496 EPERM = syscall.Errno(0x1)
2497 EPFNOSUPPORT = syscall.Errno(0x60)
2498 EPIPE = syscall.Errno(0x20)
2499 EPROTO = syscall.Errno(0x47)
2500 EPROTONOSUPPORT = syscall.Errno(0x5d)
2501 EPROTOTYPE = syscall.Errno(0x5b)
2502 ERANGE = syscall.Errno(0x22)
2503 EREMCHG = syscall.Errno(0x4e)
2504 EREMOTE = syscall.Errno(0x42)
2505 EREMOTEIO = syscall.Errno(0x79)
2506 ERESTART = syscall.Errno(0x55)
2507 ERFKILL = syscall.Errno(0x84)
2508 EROFS = syscall.Errno(0x1e)
2509 ESHUTDOWN = syscall.Errno(0x6c)
2510 ESOCKTNOSUPPORT = syscall.Errno(0x5e)
2511 ESPIPE = syscall.Errno(0x1d)
2512 ESRCH = syscall.Errno(0x3)
2513 ESRMNT = syscall.Errno(0x45)
2514 ESTALE = syscall.Errno(0x74)
2515 ESTRPIPE = syscall.Errno(0x56)
2516 ETIME = syscall.Errno(0x3e)
2517 ETIMEDOUT = syscall.Errno(0x6e)
2518 ETOOMANYREFS = syscall.Errno(0x6d)
2519 ETXTBSY = syscall.Errno(0x1a)
2520 EUCLEAN = syscall.Errno(0x75)
2521 EUNATCH = syscall.Errno(0x31)
2522 EUSERS = syscall.Errno(0x57)
2523 EWOULDBLOCK = syscall.Errno(0xb)
2524 EXDEV = syscall.Errno(0x12)
2525 EXFULL = syscall.Errno(0x36)
2526 )
2527
2528 // Signals
2529 const (
2530 SIGABRT = syscall.Signal(0x6)
2531 SIGALRM = syscall.Signal(0xe)
2532 SIGBUS = syscall.Signal(0x7)
2533 SIGCHLD = syscall.Signal(0x11)
2534 SIGCLD = syscall.Signal(0x11)
2535 SIGCONT = syscall.Signal(0x12)
2536 SIGFPE = syscall.Signal(0x8)
2537 SIGHUP = syscall.Signal(0x1)
2538 SIGILL = syscall.Signal(0x4)
2539 SIGINT = syscall.Signal(0x2)
2540 SIGIO = syscall.Signal(0x1d)
2541 SIGIOT = syscall.Signal(0x6)
2542 SIGKILL = syscall.Signal(0x9)
2543 SIGPIPE = syscall.Signal(0xd)
2544 SIGPOLL = syscall.Signal(0x1d)
2545 SIGPROF = syscall.Signal(0x1b)
2546 SIGPWR = syscall.Signal(0x1e)
2547 SIGQUIT = syscall.Signal(0x3)
2548 SIGSEGV = syscall.Signal(0xb)
2549 SIGSTKFLT = syscall.Signal(0x10)
2550 SIGSTOP = syscall.Signal(0x13)
2551 SIGSYS = syscall.Signal(0x1f)
2552 SIGTERM = syscall.Signal(0xf)
2553 SIGTRAP = syscall.Signal(0x5)
2554 SIGTSTP = syscall.Signal(0x14)
2555 SIGTTIN = syscall.Signal(0x15)
2556 SIGTTOU = syscall.Signal(0x16)
2557 SIGURG = syscall.Signal(0x17)
2558 SIGUSR1 = syscall.Signal(0xa)
2559 SIGUSR2 = syscall.Signal(0xc)
2560 SIGVTALRM = syscall.Signal(0x1a)
2561 SIGWINCH = syscall.Signal(0x1c)
2562 SIGXCPU = syscall.Signal(0x18)
2563 SIGXFSZ = syscall.Signal(0x19)
2564 )
2565
2566 // Error table
2567 var errorList = [...]struct {
2568 num syscall.Errno
2569 name string
2570 desc string
2571 }{
2572 {1, "EPERM", "operation not permitted"},
2573 {2, "ENOENT", "no such file or directory"},
2574 {3, "ESRCH", "no such process"},
2575 {4, "EINTR", "interrupted system call"},
2576 {5, "EIO", "input/output error"},
2577 {6, "ENXIO", "no such device or address"},
2578 {7, "E2BIG", "argument list too long"},
2579 {8, "ENOEXEC", "exec format error"},
2580 {9, "EBADF", "bad file descriptor"},
2581 {10, "ECHILD", "no child processes"},
2582 {11, "EAGAIN", "resource temporarily unavailable"},
2583 {12, "ENOMEM", "cannot allocate memory"},
2584 {13, "EACCES", "permission denied"},
2585 {14, "EFAULT", "bad address"},
2586 {15, "ENOTBLK", "block device required"},
2587 {16, "EBUSY", "device or resource busy"},
2588 {17, "EEXIST", "file exists"},
2589 {18, "EXDEV", "invalid cross-device link"},
2590 {19, "ENODEV", "no such device"},
2591 {20, "ENOTDIR", "not a directory"},
2592 {21, "EISDIR", "is a directory"},
2593 {22, "EINVAL", "invalid argument"},
2594 {23, "ENFILE", "too many open files in system"},
2595 {24, "EMFILE", "too many open files"},
2596 {25, "ENOTTY", "inappropriate ioctl for device"},
2597 {26, "ETXTBSY", "text file busy"},
2598 {27, "EFBIG", "file too large"},
2599 {28, "ENOSPC", "no space left on device"},
2600 {29, "ESPIPE", "illegal seek"},
2601 {30, "EROFS", "read-only file system"},
2602 {31, "EMLINK", "too many links"},
2603 {32, "EPIPE", "broken pipe"},
2604 {33, "EDOM", "numerical argument out of domain"},
2605 {34, "ERANGE", "numerical result out of range"},
2606 {35, "EDEADLK", "resource deadlock avoided"},
2607 {36, "ENAMETOOLONG", "file name too long"},
2608 {37, "ENOLCK", "no locks available"},
2609 {38, "ENOSYS", "function not implemented"},
2610 {39, "ENOTEMPTY", "directory not empty"},
2611 {40, "ELOOP", "too many levels of symbolic links"},
2612 {42, "ENOMSG", "no message of desired type"},
2613 {43, "EIDRM", "identifier removed"},
2614 {44, "ECHRNG", "channel number out of range"},
2615 {45, "EL2NSYNC", "level 2 not synchronized"},
2616 {46, "EL3HLT", "level 3 halted"},
2617 {47, "EL3RST", "level 3 reset"},
2618 {48, "ELNRNG", "link number out of range"},
2619 {49, "EUNATCH", "protocol driver not attached"},
2620 {50, "ENOCSI", "no CSI structure available"},
2621 {51, "EL2HLT", "level 2 halted"},
2622 {52, "EBADE", "invalid exchange"},
2623 {53, "EBADR", "invalid request descriptor"},
2624 {54, "EXFULL", "exchange full"},
2625 {55, "ENOANO", "no anode"},
2626 {56, "EBADRQC", "invalid request code"},
2627 {57, "EBADSLT", "invalid slot"},
2628 {59, "EBFONT", "bad font file format"},
2629 {60, "ENOSTR", "device not a stream"},
2630 {61, "ENODATA", "no data available"},
2631 {62, "ETIME", "timer expired"},
2632 {63, "ENOSR", "out of streams resources"},
2633 {64, "ENONET", "machine is not on the network"},
2634 {65, "ENOPKG", "package not installed"},
2635 {66, "EREMOTE", "object is remote"},
2636 {67, "ENOLINK", "link has been severed"},
2637 {68, "EADV", "advertise error"},
2638 {69, "ESRMNT", "srmount error"},
2639 {70, "ECOMM", "communication error on send"},
2640 {71, "EPROTO", "protocol error"},
2641 {72, "EMULTIHOP", "multihop attempted"},
2642 {73, "EDOTDOT", "RFS specific error"},
2643 {74, "EBADMSG", "bad message"},
2644 {75, "EOVERFLOW", "value too large for defined data type"},
2645 {76, "ENOTUNIQ", "name not unique on network"},
2646 {77, "EBADFD", "file descriptor in bad state"},
2647 {78, "EREMCHG", "remote address changed"},
2648 {79, "ELIBACC", "can not access a needed shared library"},
2649 {80, "ELIBBAD", "accessing a corrupted shared library"},
2650 {81, "ELIBSCN", ".lib section in a.out corrupted"},
2651 {82, "ELIBMAX", "attempting to link in too many shared libraries"},
2652 {83, "ELIBEXEC", "cannot exec a shared library directly"},
2653 {84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
2654 {85, "ERESTART", "interrupted system call should be restarted"},
2655 {86, "ESTRPIPE", "streams pipe error"},
2656 {87, "EUSERS", "too many users"},
2657 {88, "ENOTSOCK", "socket operation on non-socket"},
2658 {89, "EDESTADDRREQ", "destination address required"},
2659 {90, "EMSGSIZE", "message too long"},
2660 {91, "EPROTOTYPE", "protocol wrong type for socket"},
2661 {92, "ENOPROTOOPT", "protocol not available"},
2662 {93, "EPROTONOSUPPORT", "protocol not supported"},
2663 {94, "ESOCKTNOSUPPORT", "socket type not supported"},
2664 {95, "ENOTSUP", "operation not supported"},
2665 {96, "EPFNOSUPPORT", "protocol family not supported"},
2666 {97, "EAFNOSUPPORT", "address family not supported by protocol"},
2667 {98, "EADDRINUSE", "address already in use"},
2668 {99, "EADDRNOTAVAIL", "cannot assign requested address"},
2669 {100, "ENETDOWN", "network is down"},
2670 {101, "ENETUNREACH", "network is unreachable"},
2671 {102, "ENETRESET", "network dropped connection on reset"},
2672 {103, "ECONNABORTED", "software caused connection abort"},
2673 {104, "ECONNRESET", "connection reset by peer"},
2674 {105, "ENOBUFS", "no buffer space available"},
2675 {106, "EISCONN", "transport endpoint is already connected"},
2676 {107, "ENOTCONN", "transport endpoint is not connected"},
2677 {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
2678 {109, "ETOOMANYREFS", "too many references: cannot splice"},
2679 {110, "ETIMEDOUT", "connection timed out"},
2680 {111, "ECONNREFUSED", "connection refused"},
2681 {112, "EHOSTDOWN", "host is down"},
2682 {113, "EHOSTUNREACH", "no route to host"},
2683 {114, "EALREADY", "operation already in progress"},
2684 {115, "EINPROGRESS", "operation now in progress"},
2685 {116, "ESTALE", "stale file handle"},
2686 {117, "EUCLEAN", "structure needs cleaning"},
2687 {118, "ENOTNAM", "not a XENIX named type file"},
2688 {119, "ENAVAIL", "no XENIX semaphores available"},
2689 {120, "EISNAM", "is a named type file"},
2690 {121, "EREMOTEIO", "remote I/O error"},
2691 {122, "EDQUOT", "disk quota exceeded"},
2692 {123, "ENOMEDIUM", "no medium found"},
2693 {124, "EMEDIUMTYPE", "wrong medium type"},
2694 {125, "ECANCELED", "operation canceled"},
2695 {126, "ENOKEY", "required key not available"},
2696 {127, "EKEYEXPIRED", "key has expired"},
2697 {128, "EKEYREVOKED", "key has been revoked"},
2698 {129, "EKEYREJECTED", "key was rejected by service"},
2699 {130, "EOWNERDEAD", "owner died"},
2700 {131, "ENOTRECOVERABLE", "state not recoverable"},
2701 {132, "ERFKILL", "operation not possible due to RF-kill"},
2702 {133, "EHWPOISON", "memory page has hardware error"},
2703 }
2704
2705 // Signal table
2706 var signalList = [...]struct {
2707 num syscall.Signal
2708 name string
2709 desc string
2710 }{
2711 {1, "SIGHUP", "hangup"},
2712 {2, "SIGINT", "interrupt"},
2713 {3, "SIGQUIT", "quit"},
2714 {4, "SIGILL", "illegal instruction"},
2715 {5, "SIGTRAP", "trace/breakpoint trap"},
2716 {6, "SIGABRT", "aborted"},
2717 {7, "SIGBUS", "bus error"},
2718 {8, "SIGFPE", "floating point exception"},
2719 {9, "SIGKILL", "killed"},
2720 {10, "SIGUSR1", "user defined signal 1"},
2721 {11, "SIGSEGV", "segmentation fault"},
2722 {12, "SIGUSR2", "user defined signal 2"},
2723 {13, "SIGPIPE", "broken pipe"},
2724 {14, "SIGALRM", "alarm clock"},
2725 {15, "SIGTERM", "terminated"},
2726 {16, "SIGSTKFLT", "stack fault"},
2727 {17, "SIGCHLD", "child exited"},
2728 {18, "SIGCONT", "continued"},
2729 {19, "SIGSTOP", "stopped (signal)"},
2730 {20, "SIGTSTP", "stopped"},
2731 {21, "SIGTTIN", "stopped (tty input)"},
2732 {22, "SIGTTOU", "stopped (tty output)"},
2733 {23, "SIGURG", "urgent I/O condition"},
2734 {24, "SIGXCPU", "CPU time limit exceeded"},
2735 {25, "SIGXFSZ", "file size limit exceeded"},
2736 {26, "SIGVTALRM", "virtual timer expired"},
2737 {27, "SIGPROF", "profiling timer expired"},
2738 {28, "SIGWINCH", "window changed"},
2739 {29, "SIGIO", "I/O possible"},
2740 {30, "SIGPWR", "power failure"},
2741 {31, "SIGSYS", "bad system call"},
2742 }
22
33 // +build s390x,linux
44
5 // Created by cgo -godefs - DO NOT EDIT
5 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
66 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go
77
88 package unix
1010 import "syscall"
1111
1212 const (
13 AAFS_MAGIC = 0x5a3c69f0
14 ADFS_SUPER_MAGIC = 0xadf5
15 AFFS_SUPER_MAGIC = 0xadff
16 AFS_FS_MAGIC = 0x6b414653
17 AFS_SUPER_MAGIC = 0x5346414f
1318 AF_ALG = 0x26
1419 AF_APPLETALK = 0x5
1520 AF_ASH = 0x12
5863 AF_VSOCK = 0x28
5964 AF_WANPIPE = 0x19
6065 AF_X25 = 0x9
66 AF_XDP = 0x2c
6167 ALG_OP_DECRYPT = 0x0
6268 ALG_OP_ENCRYPT = 0x1
6369 ALG_SET_AEAD_ASSOCLEN = 0x4
6571 ALG_SET_IV = 0x2
6672 ALG_SET_KEY = 0x1
6773 ALG_SET_OP = 0x3
74 ANON_INODE_FS_MAGIC = 0x9041934
6875 ARPHRD_6LOWPAN = 0x339
6976 ARPHRD_ADAPT = 0x108
7077 ARPHRD_APPLETLK = 0x8
120127 ARPHRD_PPP = 0x200
121128 ARPHRD_PRONET = 0x4
122129 ARPHRD_RAWHDLC = 0x206
130 ARPHRD_RAWIP = 0x207
123131 ARPHRD_ROSE = 0x10e
124132 ARPHRD_RSRVD = 0x104
125133 ARPHRD_SIT = 0x308
131139 ARPHRD_VOID = 0xffff
132140 ARPHRD_VSOCKMON = 0x33a
133141 ARPHRD_X25 = 0x10f
142 AUTOFS_SUPER_MAGIC = 0x187
134143 B0 = 0x0
135144 B1000000 = 0x1008
136145 B110 = 0x3
162171 B75 = 0x2
163172 B921600 = 0x1007
164173 B9600 = 0xd
174 BALLOON_KVM_MAGIC = 0x13661366
175 BDEVFS_MAGIC = 0x62646576
176 BINFMTFS_MAGIC = 0x42494e4d
165177 BLKBSZGET = 0x80081270
166178 BLKBSZSET = 0x40081271
167179 BLKFLSBUF = 0x1261
186198 BPF_AND = 0x50
187199 BPF_B = 0x10
188200 BPF_DIV = 0x30
201 BPF_FS_MAGIC = 0xcafe4a11
189202 BPF_H = 0x8
190203 BPF_IMM = 0x0
191204 BPF_IND = 0x40
227240 BS0 = 0x0
228241 BS1 = 0x2000
229242 BSDLY = 0x2000
243 BTRFS_SUPER_MAGIC = 0x9123683e
244 BTRFS_TEST_MAGIC = 0x73727279
230245 CAN_BCM = 0x2
231246 CAN_EFF_FLAG = 0x80000000
232247 CAN_EFF_ID_BITS = 0x1d
250265 CBAUD = 0x100f
251266 CBAUDEX = 0x1000
252267 CFLUSH = 0xf
268 CGROUP2_SUPER_MAGIC = 0x63677270
269 CGROUP_SUPER_MAGIC = 0x27e0eb
253270 CIBAUD = 0x100f0000
254271 CLOCAL = 0x800
255272 CLOCK_BOOTTIME = 0x7
292309 CLONE_VFORK = 0x4000
293310 CLONE_VM = 0x100
294311 CMSPAR = 0x40000000
312 CODA_SUPER_MAGIC = 0x73757245
295313 CR0 = 0x0
296314 CR1 = 0x200
297315 CR2 = 0x400
298316 CR3 = 0x600
317 CRAMFS_MAGIC = 0x28cd3d45
299318 CRDLY = 0x600
300319 CREAD = 0x80
301320 CRTSCTS = 0x80000000
310329 CSTOP = 0x13
311330 CSTOPB = 0x40
312331 CSUSP = 0x1a
332 DAXFS_MAGIC = 0x64646178
333 DEBUGFS_MAGIC = 0x64626720
334 DEVPTS_SUPER_MAGIC = 0x1cd1
313335 DT_BLK = 0x6
314336 DT_CHR = 0x2
315337 DT_DIR = 0x4
326348 ECHOKE = 0x800
327349 ECHONL = 0x40
328350 ECHOPRT = 0x400
351 ECRYPTFS_SUPER_MAGIC = 0xf15f
329352 EFD_CLOEXEC = 0x80000
330353 EFD_NONBLOCK = 0x800
331354 EFD_SEMAPHORE = 0x1
355 EFIVARFS_MAGIC = 0xde5e81e4
356 EFS_SUPER_MAGIC = 0x414a53
332357 ENCODING_DEFAULT = 0x0
333358 ENCODING_FM_MARK = 0x3
334359 ENCODING_FM_SPACE = 0x4
389414 ETH_P_DSA = 0x1b
390415 ETH_P_ECONET = 0x18
391416 ETH_P_EDSA = 0xdada
417 ETH_P_ERSPAN = 0x88be
418 ETH_P_ERSPAN2 = 0x22eb
392419 ETH_P_FCOE = 0x8906
393420 ETH_P_FIP = 0x8914
394421 ETH_P_HDLC = 0x19
397424 ETH_P_IEEE802154 = 0xf6
398425 ETH_P_IEEEPUP = 0xa00
399426 ETH_P_IEEEPUPAT = 0xa01
427 ETH_P_IFE = 0xed3e
400428 ETH_P_IP = 0x800
401429 ETH_P_IPV6 = 0x86dd
402430 ETH_P_IPX = 0x8137
407435 ETH_P_LOOP = 0x60
408436 ETH_P_LOOPBACK = 0x9000
409437 ETH_P_MACSEC = 0x88e5
438 ETH_P_MAP = 0xf9
410439 ETH_P_MOBITEX = 0x15
411440 ETH_P_MPLS_MC = 0x8848
412441 ETH_P_MPLS_UC = 0x8847
413442 ETH_P_MVRP = 0x88f5
414443 ETH_P_NCSI = 0x88f8
444 ETH_P_NSH = 0x894f
415445 ETH_P_PAE = 0x888e
416446 ETH_P_PAUSE = 0x8808
417447 ETH_P_PHONET = 0xf5
419449 ETH_P_PPP_DISC = 0x8863
420450 ETH_P_PPP_MP = 0x8
421451 ETH_P_PPP_SES = 0x8864
452 ETH_P_PREAUTH = 0x88c7
422453 ETH_P_PRP = 0x88fb
423454 ETH_P_PUP = 0x200
424455 ETH_P_PUPAT = 0x201
439470 ETH_P_WCCP = 0x883e
440471 ETH_P_X25 = 0x805
441472 ETH_P_XDSA = 0xf8
473 EXABYTE_ENABLE_NEST = 0xf0
474 EXT2_SUPER_MAGIC = 0xef53
475 EXT3_SUPER_MAGIC = 0xef53
476 EXT4_SUPER_MAGIC = 0xef53
442477 EXTA = 0xe
443478 EXTB = 0xf
444479 EXTPROC = 0x10000
480 F2FS_SUPER_MAGIC = 0xf2f52010
445481 FALLOC_FL_COLLAPSE_RANGE = 0x8
446482 FALLOC_FL_INSERT_RANGE = 0x20
447483 FALLOC_FL_KEEP_SIZE = 0x1
462498 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
463499 FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
464500 FS_ENCRYPTION_MODE_INVALID = 0x0
501 FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
502 FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
465503 FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
466504 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
467505 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
475513 FS_POLICY_FLAGS_PAD_8 = 0x1
476514 FS_POLICY_FLAGS_PAD_MASK = 0x3
477515 FS_POLICY_FLAGS_VALID = 0x3
516 FUTEXFS_SUPER_MAGIC = 0xbad1dea
517 F_ADD_SEALS = 0x409
478518 F_DUPFD = 0x0
479519 F_DUPFD_CLOEXEC = 0x406
480520 F_EXLCK = 0x4
487527 F_GETOWN_EX = 0x10
488528 F_GETPIPE_SZ = 0x408
489529 F_GETSIG = 0xb
530 F_GET_FILE_RW_HINT = 0x40d
531 F_GET_RW_HINT = 0x40b
532 F_GET_SEALS = 0x40a
490533 F_LOCK = 0x1
491534 F_NOTIFY = 0x402
492535 F_OFD_GETLK = 0x24
494537 F_OFD_SETLKW = 0x26
495538 F_OK = 0x0
496539 F_RDLCK = 0x0
540 F_SEAL_GROW = 0x4
541 F_SEAL_SEAL = 0x1
542 F_SEAL_SHRINK = 0x2
543 F_SEAL_WRITE = 0x8
497544 F_SETFD = 0x2
498545 F_SETFL = 0x4
499546 F_SETLEASE = 0x400
505552 F_SETOWN_EX = 0xf
506553 F_SETPIPE_SZ = 0x407
507554 F_SETSIG = 0xa
555 F_SET_FILE_RW_HINT = 0x40e
556 F_SET_RW_HINT = 0x40c
508557 F_SHLCK = 0x8
509558 F_TEST = 0x3
510559 F_TLOCK = 0x2
526575 GENL_UNS_ADMIN_PERM = 0x10
527576 GRND_NONBLOCK = 0x1
528577 GRND_RANDOM = 0x2
578 HDIO_DRIVE_CMD = 0x31f
579 HDIO_DRIVE_CMD_AEB = 0x31e
580 HDIO_DRIVE_CMD_HDR_SIZE = 0x4
581 HDIO_DRIVE_HOB_HDR_SIZE = 0x8
582 HDIO_DRIVE_RESET = 0x31c
583 HDIO_DRIVE_TASK = 0x31e
584 HDIO_DRIVE_TASKFILE = 0x31d
585 HDIO_DRIVE_TASK_HDR_SIZE = 0x8
586 HDIO_GETGEO = 0x301
587 HDIO_GET_32BIT = 0x309
588 HDIO_GET_ACOUSTIC = 0x30f
589 HDIO_GET_ADDRESS = 0x310
590 HDIO_GET_BUSSTATE = 0x31a
591 HDIO_GET_DMA = 0x30b
592 HDIO_GET_IDENTITY = 0x30d
593 HDIO_GET_KEEPSETTINGS = 0x308
594 HDIO_GET_MULTCOUNT = 0x304
595 HDIO_GET_NICE = 0x30c
596 HDIO_GET_NOWERR = 0x30a
597 HDIO_GET_QDMA = 0x305
598 HDIO_GET_UNMASKINTR = 0x302
599 HDIO_GET_WCACHE = 0x30e
600 HDIO_OBSOLETE_IDENTITY = 0x307
601 HDIO_SCAN_HWIF = 0x328
602 HDIO_SET_32BIT = 0x324
603 HDIO_SET_ACOUSTIC = 0x32c
604 HDIO_SET_ADDRESS = 0x32f
605 HDIO_SET_BUSSTATE = 0x32d
606 HDIO_SET_DMA = 0x326
607 HDIO_SET_KEEPSETTINGS = 0x323
608 HDIO_SET_MULTCOUNT = 0x321
609 HDIO_SET_NICE = 0x329
610 HDIO_SET_NOWERR = 0x325
611 HDIO_SET_PIO_MODE = 0x327
612 HDIO_SET_QDMA = 0x32e
613 HDIO_SET_UNMASKINTR = 0x322
614 HDIO_SET_WCACHE = 0x32b
615 HDIO_SET_XFER = 0x306
616 HDIO_TRISTATE_HWIF = 0x31b
617 HDIO_UNREGISTER_HWIF = 0x32a
618 HOSTFS_SUPER_MAGIC = 0xc0ffee
619 HPFS_SUPER_MAGIC = 0xf995e849
620 HUGETLBFS_MAGIC = 0x958458f6
529621 HUPCL = 0x400
530622 IBSHIFT = 0x10
531623 ICANON = 0x2
545637 IFA_F_STABLE_PRIVACY = 0x800
546638 IFA_F_TEMPORARY = 0x1
547639 IFA_F_TENTATIVE = 0x40
548 IFA_MAX = 0x8
640 IFA_MAX = 0xa
549641 IFF_ALLMULTI = 0x200
550642 IFF_ATTACH_QUEUE = 0x200
551643 IFF_AUTOMEDIA = 0x4000
560652 IFF_MASTER = 0x400
561653 IFF_MULTICAST = 0x1000
562654 IFF_MULTI_QUEUE = 0x100
655 IFF_NAPI = 0x10
656 IFF_NAPI_FRAGS = 0x20
563657 IFF_NOARP = 0x80
564658 IFF_NOFILTER = 0x1000
565659 IFF_NOTRAILERS = 0x20
622716 IN_OPEN = 0x20
623717 IN_Q_OVERFLOW = 0x4000
624718 IN_UNMOUNT = 0x2000
719 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
625720 IPPROTO_AH = 0x33
626721 IPPROTO_BEETPH = 0x5e
627722 IPPROTO_COMP = 0x6c
669764 IPV6_DONTFRAG = 0x3e
670765 IPV6_DROP_MEMBERSHIP = 0x15
671766 IPV6_DSTOPTS = 0x3b
767 IPV6_FREEBIND = 0x4e
672768 IPV6_HDRINCL = 0x24
673769 IPV6_HOPLIMIT = 0x34
674770 IPV6_HOPOPTS = 0x36
773869 IP_UNICAST_IF = 0x32
774870 IP_XFRM_POLICY = 0x11
775871 ISIG = 0x1
872 ISOFS_SUPER_MAGIC = 0x9660
776873 ISTRIP = 0x20
777874 IUCLC = 0x200
778875 IUTF8 = 0x4000
779876 IXANY = 0x800
780877 IXOFF = 0x1000
781878 IXON = 0x400
879 JFFS2_SUPER_MAGIC = 0x72b6
880 KEXEC_ARCH_386 = 0x30000
881 KEXEC_ARCH_68K = 0x40000
882 KEXEC_ARCH_AARCH64 = 0xb70000
883 KEXEC_ARCH_ARM = 0x280000
884 KEXEC_ARCH_DEFAULT = 0x0
885 KEXEC_ARCH_IA_64 = 0x320000
886 KEXEC_ARCH_MASK = 0xffff0000
887 KEXEC_ARCH_MIPS = 0x80000
888 KEXEC_ARCH_MIPS_LE = 0xa0000
889 KEXEC_ARCH_PPC = 0x140000
890 KEXEC_ARCH_PPC64 = 0x150000
891 KEXEC_ARCH_S390 = 0x160000
892 KEXEC_ARCH_SH = 0x2a0000
893 KEXEC_ARCH_X86_64 = 0x3e0000
894 KEXEC_FILE_NO_INITRAMFS = 0x4
895 KEXEC_FILE_ON_CRASH = 0x2
896 KEXEC_FILE_UNLOAD = 0x1
897 KEXEC_ON_CRASH = 0x1
898 KEXEC_PRESERVE_CONTEXT = 0x2
899 KEXEC_SEGMENT_MAX = 0x10
782900 KEYCTL_ASSUME_AUTHORITY = 0x10
783901 KEYCTL_CHOWN = 0x4
784902 KEYCTL_CLEAR = 0x7
793911 KEYCTL_JOIN_SESSION_KEYRING = 0x1
794912 KEYCTL_LINK = 0x8
795913 KEYCTL_NEGATE = 0xd
914 KEYCTL_PKEY_DECRYPT = 0x1a
915 KEYCTL_PKEY_ENCRYPT = 0x19
916 KEYCTL_PKEY_QUERY = 0x18
917 KEYCTL_PKEY_SIGN = 0x1b
918 KEYCTL_PKEY_VERIFY = 0x1c
796919 KEYCTL_READ = 0xb
797920 KEYCTL_REJECT = 0x13
798921 KEYCTL_RESTRICT_KEYRING = 0x1d
802925 KEYCTL_SETPERM = 0x5
803926 KEYCTL_SET_REQKEY_KEYRING = 0xe
804927 KEYCTL_SET_TIMEOUT = 0xf
928 KEYCTL_SUPPORTS_DECRYPT = 0x2
929 KEYCTL_SUPPORTS_ENCRYPT = 0x1
930 KEYCTL_SUPPORTS_SIGN = 0x4
931 KEYCTL_SUPPORTS_VERIFY = 0x8
805932 KEYCTL_UNLINK = 0x9
806933 KEYCTL_UPDATE = 0x2
807934 KEY_REQKEY_DEFL_DEFAULT = 0x0
843970 MADV_FREE = 0x8
844971 MADV_HUGEPAGE = 0xe
845972 MADV_HWPOISON = 0x64
973 MADV_KEEPONFORK = 0x13
846974 MADV_MERGEABLE = 0xc
847975 MADV_NOHUGEPAGE = 0xf
848976 MADV_NORMAL = 0x0
851979 MADV_SEQUENTIAL = 0x2
852980 MADV_UNMERGEABLE = 0xd
853981 MADV_WILLNEED = 0x3
982 MADV_WIPEONFORK = 0x12
854983 MAP_ANON = 0x20
855984 MAP_ANONYMOUS = 0x20
856985 MAP_DENYWRITE = 0x800
857986 MAP_EXECUTABLE = 0x1000
858987 MAP_FILE = 0x0
859988 MAP_FIXED = 0x10
989 MAP_FIXED_NOREPLACE = 0x100000
860990 MAP_GROWSDOWN = 0x100
861991 MAP_HUGETLB = 0x40000
862992 MAP_HUGE_MASK = 0x3f
867997 MAP_POPULATE = 0x8000
868998 MAP_PRIVATE = 0x2
869999 MAP_SHARED = 0x1
1000 MAP_SHARED_VALIDATE = 0x3
8701001 MAP_STACK = 0x20000
1002 MAP_SYNC = 0x80000
8711003 MAP_TYPE = 0xf
8721004 MCL_CURRENT = 0x1
8731005 MCL_FUTURE = 0x2
8741006 MCL_ONFAULT = 0x4
1007 MFD_ALLOW_SEALING = 0x2
1008 MFD_CLOEXEC = 0x1
1009 MFD_HUGETLB = 0x4
1010 MFD_HUGE_16GB = -0x78000000
1011 MFD_HUGE_16MB = 0x60000000
1012 MFD_HUGE_1GB = 0x78000000
1013 MFD_HUGE_1MB = 0x50000000
1014 MFD_HUGE_256MB = 0x70000000
1015 MFD_HUGE_2GB = 0x7c000000
1016 MFD_HUGE_2MB = 0x54000000
1017 MFD_HUGE_32MB = 0x64000000
1018 MFD_HUGE_512KB = 0x4c000000
1019 MFD_HUGE_512MB = 0x74000000
1020 MFD_HUGE_64KB = 0x40000000
1021 MFD_HUGE_8MB = 0x5c000000
1022 MFD_HUGE_MASK = 0x3f
1023 MFD_HUGE_SHIFT = 0x1a
1024 MINIX2_SUPER_MAGIC = 0x2468
1025 MINIX2_SUPER_MAGIC2 = 0x2478
1026 MINIX3_SUPER_MAGIC = 0x4d5a
1027 MINIX_SUPER_MAGIC = 0x137f
1028 MINIX_SUPER_MAGIC2 = 0x138f
8751029 MNT_DETACH = 0x2
8761030 MNT_EXPIRE = 0x4
8771031 MNT_FORCE = 0x1
1032 MODULE_INIT_IGNORE_MODVERSIONS = 0x1
1033 MODULE_INIT_IGNORE_VERMAGIC = 0x2
1034 MSDOS_SUPER_MAGIC = 0x4d44
8781035 MSG_BATCH = 0x40000
8791036 MSG_CMSG_CLOEXEC = 0x40000000
8801037 MSG_CONFIRM = 0x800
8961053 MSG_TRYHARD = 0x4
8971054 MSG_WAITALL = 0x100
8981055 MSG_WAITFORONE = 0x10000
1056 MSG_ZEROCOPY = 0x4000000
8991057 MS_ACTIVE = 0x40000000
9001058 MS_ASYNC = 0x1
9011059 MS_BIND = 0x1000
9331091 MS_SYNCHRONOUS = 0x10
9341092 MS_UNBINDABLE = 0x20000
9351093 MS_VERBOSE = 0x8000
1094 MTD_INODE_FS_MAGIC = 0x11307854
9361095 NAME_MAX = 0xff
1096 NCP_SUPER_MAGIC = 0x564c
9371097 NETLINK_ADD_MEMBERSHIP = 0x1
9381098 NETLINK_AUDIT = 0x9
9391099 NETLINK_BROADCAST_ERROR = 0x4
9471107 NETLINK_FIB_LOOKUP = 0xa
9481108 NETLINK_FIREWALL = 0x3
9491109 NETLINK_GENERIC = 0x10
1110 NETLINK_GET_STRICT_CHK = 0xc
9501111 NETLINK_INET_DIAG = 0x4
9511112 NETLINK_IP6_FW = 0xd
9521113 NETLINK_ISCSI = 0x8
9681129 NETLINK_UNUSED = 0x1
9691130 NETLINK_USERSOCK = 0x2
9701131 NETLINK_XFRM = 0x6
1132 NETNSA_MAX = 0x3
1133 NETNSA_NSID_NOT_ASSIGNED = -0x1
1134 NFNETLINK_V0 = 0x0
1135 NFNLGRP_ACCT_QUOTA = 0x8
1136 NFNLGRP_CONNTRACK_DESTROY = 0x3
1137 NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
1138 NFNLGRP_CONNTRACK_EXP_NEW = 0x4
1139 NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
1140 NFNLGRP_CONNTRACK_NEW = 0x1
1141 NFNLGRP_CONNTRACK_UPDATE = 0x2
1142 NFNLGRP_MAX = 0x9
1143 NFNLGRP_NFTABLES = 0x7
1144 NFNLGRP_NFTRACE = 0x9
1145 NFNLGRP_NONE = 0x0
1146 NFNL_BATCH_MAX = 0x1
1147 NFNL_MSG_BATCH_BEGIN = 0x10
1148 NFNL_MSG_BATCH_END = 0x11
1149 NFNL_NFA_NEST = 0x8000
1150 NFNL_SUBSYS_ACCT = 0x7
1151 NFNL_SUBSYS_COUNT = 0xc
1152 NFNL_SUBSYS_CTHELPER = 0x9
1153 NFNL_SUBSYS_CTNETLINK = 0x1
1154 NFNL_SUBSYS_CTNETLINK_EXP = 0x2
1155 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
1156 NFNL_SUBSYS_IPSET = 0x6
1157 NFNL_SUBSYS_NFTABLES = 0xa
1158 NFNL_SUBSYS_NFT_COMPAT = 0xb
1159 NFNL_SUBSYS_NONE = 0x0
1160 NFNL_SUBSYS_OSF = 0x5
1161 NFNL_SUBSYS_QUEUE = 0x3
1162 NFNL_SUBSYS_ULOG = 0x4
1163 NFS_SUPER_MAGIC = 0x6969
1164 NILFS_SUPER_MAGIC = 0x3434
9711165 NL0 = 0x0
9721166 NL1 = 0x100
9731167 NLA_ALIGNTO = 0x4
9951189 NLM_F_EXCL = 0x200
9961190 NLM_F_MATCH = 0x200
9971191 NLM_F_MULTI = 0x2
1192 NLM_F_NONREC = 0x100
9981193 NLM_F_REPLACE = 0x100
9991194 NLM_F_REQUEST = 0x1
10001195 NLM_F_ROOT = 0x100
10011196 NOFLSH = 0x80
1197 NSFS_MAGIC = 0x6e736673
1198 OCFS2_SUPER_MAGIC = 0x7461636f
10021199 OCRNL = 0x8
10031200 OFDEL = 0x80
10041201 OFILL = 0x40
10061203 ONLCR = 0x4
10071204 ONLRET = 0x20
10081205 ONOCR = 0x10
1206 OPENPROM_SUPER_MAGIC = 0x9fa1
10091207 OPOST = 0x1
1208 OVERLAYFS_SUPER_MAGIC = 0x794c7630
10101209 O_ACCMODE = 0x3
10111210 O_APPEND = 0x400
10121211 O_ASYNC = 0x2000
10521251 PACKET_FASTROUTE = 0x6
10531252 PACKET_HDRLEN = 0xb
10541253 PACKET_HOST = 0x0
1254 PACKET_IGNORE_OUTGOING = 0x17
10551255 PACKET_KERNEL = 0x7
10561256 PACKET_LOOPBACK = 0x5
10571257 PACKET_LOSS = 0xe
10911291 PERF_EVENT_IOC_DISABLE = 0x2401
10921292 PERF_EVENT_IOC_ENABLE = 0x2400
10931293 PERF_EVENT_IOC_ID = 0x80082407
1294 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
10941295 PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
10951296 PERF_EVENT_IOC_PERIOD = 0x40082404
1297 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
10961298 PERF_EVENT_IOC_REFRESH = 0x2402
10971299 PERF_EVENT_IOC_RESET = 0x2403
10981300 PERF_EVENT_IOC_SET_BPF = 0x40042408
10991301 PERF_EVENT_IOC_SET_FILTER = 0x40082406
11001302 PERF_EVENT_IOC_SET_OUTPUT = 0x2405
1303 PIPEFS_MAGIC = 0x50495045
1304 PPPIOCATTACH = 0x4004743d
1305 PPPIOCATTCHAN = 0x40047438
1306 PPPIOCCONNECT = 0x4004743a
1307 PPPIOCDETACH = 0x4004743c
1308 PPPIOCDISCONN = 0x7439
1309 PPPIOCGASYNCMAP = 0x80047458
1310 PPPIOCGCHAN = 0x80047437
1311 PPPIOCGDEBUG = 0x80047441
1312 PPPIOCGFLAGS = 0x8004745a
1313 PPPIOCGIDLE = 0x8010743f
1314 PPPIOCGL2TPSTATS = 0x80487436
1315 PPPIOCGMRU = 0x80047453
1316 PPPIOCGNPMODE = 0xc008744c
1317 PPPIOCGRASYNCMAP = 0x80047455
1318 PPPIOCGUNIT = 0x80047456
1319 PPPIOCGXASYNCMAP = 0x80207450
1320 PPPIOCNEWUNIT = 0xc004743e
1321 PPPIOCSACTIVE = 0x40107446
1322 PPPIOCSASYNCMAP = 0x40047457
1323 PPPIOCSCOMPRESS = 0x4010744d
1324 PPPIOCSDEBUG = 0x40047440
1325 PPPIOCSFLAGS = 0x40047459
1326 PPPIOCSMAXCID = 0x40047451
1327 PPPIOCSMRRU = 0x4004743b
1328 PPPIOCSMRU = 0x40047452
1329 PPPIOCSNPMODE = 0x4008744b
1330 PPPIOCSPASS = 0x40107447
1331 PPPIOCSRASYNCMAP = 0x40047454
1332 PPPIOCSXASYNCMAP = 0x4020744f
1333 PPPIOCXFERUNIT = 0x744e
11011334 PRIO_PGRP = 0x1
11021335 PRIO_PROCESS = 0x0
11031336 PRIO_USER = 0x2
1337 PROC_SUPER_MAGIC = 0x9fa0
11041338 PROT_EXEC = 0x4
11051339 PROT_GROWSDOWN = 0x1000000
11061340 PROT_GROWSUP = 0x2000000
11431377 PR_GET_PDEATHSIG = 0x2
11441378 PR_GET_SECCOMP = 0x15
11451379 PR_GET_SECUREBITS = 0x1b
1380 PR_GET_SPECULATION_CTRL = 0x34
11461381 PR_GET_THP_DISABLE = 0x2a
11471382 PR_GET_TID_ADDRESS = 0x28
11481383 PR_GET_TIMERSLACK = 0x1e
11851420 PR_SET_NO_NEW_PRIVS = 0x26
11861421 PR_SET_PDEATHSIG = 0x1
11871422 PR_SET_PTRACER = 0x59616d61
1188 PR_SET_PTRACER_ANY = -0x1
1423 PR_SET_PTRACER_ANY = 0xffffffffffffffff
11891424 PR_SET_SECCOMP = 0x16
11901425 PR_SET_SECUREBITS = 0x1c
1426 PR_SET_SPECULATION_CTRL = 0x35
11911427 PR_SET_THP_DISABLE = 0x29
11921428 PR_SET_TIMERSLACK = 0x1d
11931429 PR_SET_TIMING = 0xe
11941430 PR_SET_TSC = 0x1a
11951431 PR_SET_UNALIGN = 0x6
1432 PR_SPEC_DISABLE = 0x4
1433 PR_SPEC_ENABLE = 0x2
1434 PR_SPEC_FORCE_DISABLE = 0x8
1435 PR_SPEC_INDIRECT_BRANCH = 0x1
1436 PR_SPEC_NOT_AFFECTED = 0x0
1437 PR_SPEC_PRCTL = 0x1
1438 PR_SPEC_STORE_BYPASS = 0x0
1439 PR_SVE_GET_VL = 0x33
1440 PR_SVE_SET_VL = 0x32
1441 PR_SVE_SET_VL_ONEXEC = 0x40000
1442 PR_SVE_VL_INHERIT = 0x20000
1443 PR_SVE_VL_LEN_MASK = 0xffff
11961444 PR_TASK_PERF_EVENTS_DISABLE = 0x1f
11971445 PR_TASK_PERF_EVENTS_ENABLE = 0x20
11981446 PR_TIMING_STATISTICAL = 0x0
12011449 PR_TSC_SIGSEGV = 0x2
12021450 PR_UNALIGN_NOPRINT = 0x1
12031451 PR_UNALIGN_SIGBUS = 0x2
1452 PSTOREFS_MAGIC = 0x6165676c
12041453 PTRACE_ATTACH = 0x10
12051454 PTRACE_CONT = 0x7
12061455 PTRACE_DETACH = 0x11
12531502 PTRACE_POKE_SYSTEM_CALL = 0x5008
12541503 PTRACE_PROT = 0x15
12551504 PTRACE_SECCOMP_GET_FILTER = 0x420c
1505 PTRACE_SECCOMP_GET_METADATA = 0x420d
12561506 PTRACE_SEIZE = 0x4206
12571507 PTRACE_SETOPTIONS = 0x4200
12581508 PTRACE_SETREGS = 0xd
13221572 PT_ORIGGPR2 = 0xd0
13231573 PT_PSWADDR = 0x8
13241574 PT_PSWMASK = 0x0
1575 QNX4_SUPER_MAGIC = 0x2f
1576 QNX6_SUPER_MAGIC = 0x68191122
1577 RAMFS_MAGIC = 0x858458f6
1578 RDTGROUP_SUPER_MAGIC = 0x7655821
1579 REISERFS_SUPER_MAGIC = 0x52654973
1580 RENAME_EXCHANGE = 0x2
1581 RENAME_NOREPLACE = 0x1
1582 RENAME_WHITEOUT = 0x4
13251583 RLIMIT_AS = 0x9
13261584 RLIMIT_CORE = 0x4
13271585 RLIMIT_CPU = 0x0
13381596 RLIMIT_RTTIME = 0xf
13391597 RLIMIT_SIGPENDING = 0xb
13401598 RLIMIT_STACK = 0x3
1341 RLIM_INFINITY = -0x1
1599 RLIM_INFINITY = 0xffffffffffffffff
13421600 RTAX_ADVMSS = 0x8
13431601 RTAX_CC_ALGO = 0x10
13441602 RTAX_CWND = 0x7
1603 RTAX_FASTOPEN_NO_COOKIE = 0x11
13451604 RTAX_FEATURES = 0xc
13461605 RTAX_FEATURE_ALLFRAG = 0x8
13471606 RTAX_FEATURE_ECN = 0x1
13521611 RTAX_INITCWND = 0xb
13531612 RTAX_INITRWND = 0xe
13541613 RTAX_LOCK = 0x1
1355 RTAX_MAX = 0x10
1614 RTAX_MAX = 0x11
13561615 RTAX_MTU = 0x2
13571616 RTAX_QUICKACK = 0xf
13581617 RTAX_REORDERING = 0x9
13631622 RTAX_UNSPEC = 0x0
13641623 RTAX_WINDOW = 0x3
13651624 RTA_ALIGNTO = 0x4
1366 RTA_MAX = 0x1a
1625 RTA_MAX = 0x1d
13671626 RTCF_DIRECTSRC = 0x4000000
13681627 RTCF_DOREDIRECT = 0x1000000
13691628 RTCF_LOG = 0x2000000
13701629 RTCF_MASQ = 0x400000
13711630 RTCF_NAT = 0x800000
13721631 RTCF_VALVE = 0x200000
1632 RTC_AF = 0x20
1633 RTC_AIE_OFF = 0x7002
1634 RTC_AIE_ON = 0x7001
1635 RTC_ALM_READ = 0x80247008
1636 RTC_ALM_SET = 0x40247007
1637 RTC_EPOCH_READ = 0x8008700d
1638 RTC_EPOCH_SET = 0x4008700e
1639 RTC_IRQF = 0x80
1640 RTC_IRQP_READ = 0x8008700b
1641 RTC_IRQP_SET = 0x4008700c
1642 RTC_MAX_FREQ = 0x2000
1643 RTC_PF = 0x40
1644 RTC_PIE_OFF = 0x7006
1645 RTC_PIE_ON = 0x7005
1646 RTC_PLL_GET = 0x80207011
1647 RTC_PLL_SET = 0x40207012
1648 RTC_RD_TIME = 0x80247009
1649 RTC_SET_TIME = 0x4024700a
1650 RTC_UF = 0x10
1651 RTC_UIE_OFF = 0x7004
1652 RTC_UIE_ON = 0x7003
1653 RTC_VL_CLR = 0x7014
1654 RTC_VL_READ = 0x80047013
1655 RTC_WIE_OFF = 0x7010
1656 RTC_WIE_ON = 0x700f
1657 RTC_WKALM_RD = 0x80287010
1658 RTC_WKALM_SET = 0x4028700f
13731659 RTF_ADDRCLASSMASK = 0xf8000000
13741660 RTF_ADDRCONF = 0x40000
13751661 RTF_ALLONLINK = 0x20000
14041690 RTM_DELACTION = 0x31
14051691 RTM_DELADDR = 0x15
14061692 RTM_DELADDRLABEL = 0x49
1693 RTM_DELCHAIN = 0x65
14071694 RTM_DELLINK = 0x11
14081695 RTM_DELMDB = 0x55
14091696 RTM_DELNEIGH = 0x1d
14241711 RTM_GETADDR = 0x16
14251712 RTM_GETADDRLABEL = 0x4a
14261713 RTM_GETANYCAST = 0x3e
1714 RTM_GETCHAIN = 0x66
14271715 RTM_GETDCB = 0x4e
14281716 RTM_GETLINK = 0x12
14291717 RTM_GETMDB = 0x56
14381726 RTM_GETSTATS = 0x5e
14391727 RTM_GETTCLASS = 0x2a
14401728 RTM_GETTFILTER = 0x2e
1441 RTM_MAX = 0x63
1729 RTM_MAX = 0x67
14421730 RTM_NEWACTION = 0x30
14431731 RTM_NEWADDR = 0x14
14441732 RTM_NEWADDRLABEL = 0x48
14451733 RTM_NEWCACHEREPORT = 0x60
1734 RTM_NEWCHAIN = 0x64
14461735 RTM_NEWLINK = 0x10
14471736 RTM_NEWMDB = 0x54
14481737 RTM_NEWNDUSEROPT = 0x44
14571746 RTM_NEWSTATS = 0x5c
14581747 RTM_NEWTCLASS = 0x28
14591748 RTM_NEWTFILTER = 0x2c
1460 RTM_NR_FAMILIES = 0x15
1461 RTM_NR_MSGTYPES = 0x54
1749 RTM_NR_FAMILIES = 0x16
1750 RTM_NR_MSGTYPES = 0x58
14621751 RTM_SETDCB = 0x4f
14631752 RTM_SETLINK = 0x13
14641753 RTM_SETNEIGHTBL = 0x43
14721761 RTNH_F_UNRESOLVED = 0x20
14731762 RTN_MAX = 0xb
14741763 RTPROT_BABEL = 0x2a
1764 RTPROT_BGP = 0xba
14751765 RTPROT_BIRD = 0xc
14761766 RTPROT_BOOT = 0x3
14771767 RTPROT_DHCP = 0x10
14781768 RTPROT_DNROUTED = 0xd
1769 RTPROT_EIGRP = 0xc0
14791770 RTPROT_GATED = 0x8
1771 RTPROT_ISIS = 0xbb
14801772 RTPROT_KERNEL = 0x2
14811773 RTPROT_MROUTED = 0x11
14821774 RTPROT_MRT = 0xa
14831775 RTPROT_NTK = 0xf
1776 RTPROT_OSPF = 0xbc
14841777 RTPROT_RA = 0x9
14851778 RTPROT_REDIRECT = 0x1
1779 RTPROT_RIP = 0xbd
14861780 RTPROT_STATIC = 0x4
14871781 RTPROT_UNSPEC = 0x0
14881782 RTPROT_XORP = 0xe
15021796 SCM_TIMESTAMPING_OPT_STATS = 0x36
15031797 SCM_TIMESTAMPING_PKTINFO = 0x3a
15041798 SCM_TIMESTAMPNS = 0x23
1799 SCM_TXTIME = 0x3d
15051800 SCM_WIFI_STATUS = 0x29
1801 SC_LOG_FLUSH = 0x100000
15061802 SECCOMP_MODE_DISABLED = 0x0
15071803 SECCOMP_MODE_FILTER = 0x2
15081804 SECCOMP_MODE_STRICT = 0x1
1805 SECURITYFS_MAGIC = 0x73636673
1806 SELINUX_MAGIC = 0xf97cff8c
1807 SFD_CLOEXEC = 0x80000
1808 SFD_NONBLOCK = 0x800
15091809 SHUT_RD = 0x0
15101810 SHUT_RDWR = 0x2
15111811 SHUT_WR = 0x1
15561856 SIOCGMIIPHY = 0x8947
15571857 SIOCGMIIREG = 0x8948
15581858 SIOCGPGRP = 0x8904
1859 SIOCGPPPCSTATS = 0x89f2
1860 SIOCGPPPSTATS = 0x89f0
1861 SIOCGPPPVER = 0x89f1
15591862 SIOCGRARP = 0x8961
15601863 SIOCGSKNS = 0x894c
15611864 SIOCGSTAMP = 0x8906
15901893 SIOCSPGRP = 0x8902
15911894 SIOCSRARP = 0x8962
15921895 SIOCWANDEV = 0x894a
1896 SMACK_MAGIC = 0x43415d53
1897 SMART_AUTOSAVE = 0xd2
1898 SMART_AUTO_OFFLINE = 0xdb
1899 SMART_DISABLE = 0xd9
1900 SMART_ENABLE = 0xd8
1901 SMART_HCYL_PASS = 0xc2
1902 SMART_IMMEDIATE_OFFLINE = 0xd4
1903 SMART_LCYL_PASS = 0x4f
1904 SMART_READ_LOG_SECTOR = 0xd5
1905 SMART_READ_THRESHOLDS = 0xd1
1906 SMART_READ_VALUES = 0xd0
1907 SMART_SAVE = 0xd3
1908 SMART_STATUS = 0xda
1909 SMART_WRITE_LOG_SECTOR = 0xd6
1910 SMART_WRITE_THRESHOLDS = 0xd7
1911 SMB_SUPER_MAGIC = 0x517b
1912 SOCKFS_MAGIC = 0x534f434b
15931913 SOCK_CLOEXEC = 0x80000
15941914 SOCK_DCCP = 0x6
15951915 SOCK_DGRAM = 0x2
16261946 SOL_SOCKET = 0x1
16271947 SOL_TCP = 0x6
16281948 SOL_TIPC = 0x10f
1949 SOL_TLS = 0x11a
16291950 SOL_X25 = 0x106
1951 SOL_XDP = 0x11b
16301952 SOMAXCONN = 0x80
16311953 SO_ACCEPTCONN = 0x1e
16321954 SO_ATTACH_BPF = 0x32
16852007 SO_TIMESTAMP = 0x1d
16862008 SO_TIMESTAMPING = 0x25
16872009 SO_TIMESTAMPNS = 0x23
2010 SO_TXTIME = 0x3d
16882011 SO_TYPE = 0x3
16892012 SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
16902013 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
16942017 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
16952018 SO_VM_SOCKETS_TRUSTED = 0x5
16962019 SO_WIFI_STATUS = 0x29
2020 SO_ZEROCOPY = 0x3c
16972021 SPLICE_F_GIFT = 0x8
16982022 SPLICE_F_MORE = 0x4
16992023 SPLICE_F_MOVE = 0x1
17002024 SPLICE_F_NONBLOCK = 0x2
2025 SQUASHFS_MAGIC = 0x73717368
2026 STACK_END_MAGIC = 0x57ac6e9d
2027 STATX_ALL = 0xfff
2028 STATX_ATIME = 0x20
2029 STATX_ATTR_APPEND = 0x20
2030 STATX_ATTR_AUTOMOUNT = 0x1000
2031 STATX_ATTR_COMPRESSED = 0x4
2032 STATX_ATTR_ENCRYPTED = 0x800
2033 STATX_ATTR_IMMUTABLE = 0x10
2034 STATX_ATTR_NODUMP = 0x40
2035 STATX_BASIC_STATS = 0x7ff
2036 STATX_BLOCKS = 0x400
2037 STATX_BTIME = 0x800
2038 STATX_CTIME = 0x80
2039 STATX_GID = 0x10
2040 STATX_INO = 0x100
2041 STATX_MODE = 0x2
2042 STATX_MTIME = 0x40
2043 STATX_NLINK = 0x4
2044 STATX_SIZE = 0x200
2045 STATX_TYPE = 0x1
2046 STATX_UID = 0x8
2047 STATX__RESERVED = 0x80000000
2048 SYNC_FILE_RANGE_WAIT_AFTER = 0x4
2049 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
2050 SYNC_FILE_RANGE_WRITE = 0x2
2051 SYSFS_MAGIC = 0x62656572
17012052 S_BLKSIZE = 0x200
17022053 S_IEXEC = 0x40
17032054 S_IFBLK = 0x6000
17352086 TASKSTATS_GENL_NAME = "TASKSTATS"
17362087 TASKSTATS_GENL_VERSION = 0x1
17372088 TASKSTATS_TYPE_MAX = 0x6
1738 TASKSTATS_VERSION = 0x8
2089 TASKSTATS_VERSION = 0x9
17392090 TCFLSH = 0x540b
17402091 TCGETA = 0x5405
17412092 TCGETS = 0x5401
17602111 TCP_DEFER_ACCEPT = 0x9
17612112 TCP_FASTOPEN = 0x17
17622113 TCP_FASTOPEN_CONNECT = 0x1e
2114 TCP_FASTOPEN_KEY = 0x21
2115 TCP_FASTOPEN_NO_COOKIE = 0x22
17632116 TCP_INFO = 0xb
17642117 TCP_KEEPCNT = 0x6
17652118 TCP_KEEPIDLE = 0x4
17692122 TCP_MAXWIN = 0xffff
17702123 TCP_MAX_WINSHIFT = 0xe
17712124 TCP_MD5SIG = 0xe
2125 TCP_MD5SIG_EXT = 0x20
2126 TCP_MD5SIG_FLAG_PREFIX = 0x1
17722127 TCP_MD5SIG_MAXKEYLEN = 0x50
17732128 TCP_MSS = 0x200
17742129 TCP_MSS_DEFAULT = 0x218
17892144 TCP_THIN_DUPACK = 0x11
17902145 TCP_THIN_LINEAR_TIMEOUTS = 0x10
17912146 TCP_TIMESTAMP = 0x18
2147 TCP_ULP = 0x1f
17922148 TCP_USER_TIMEOUT = 0x12
17932149 TCP_WINDOW_CLAMP = 0xa
17942150 TCSAFLUSH = 0x2
18072163 TCSETXF = 0x5434
18082164 TCSETXW = 0x5435
18092165 TCXONC = 0x540a
2166 TIMER_ABSTIME = 0x1
18102167 TIOCCBRK = 0x5428
18112168 TIOCCONS = 0x541d
18122169 TIOCEXCL = 0x540c
18142171 TIOCGETD = 0x5424
18152172 TIOCGEXCL = 0x80045440
18162173 TIOCGICOUNT = 0x545d
2174 TIOCGISO7816 = 0x80285442
18172175 TIOCGLCKTRMIOS = 0x5456
18182176 TIOCGPGRP = 0x540f
18192177 TIOCGPKT = 0x80045438
18672225 TIOCSER_TEMT = 0x1
18682226 TIOCSETD = 0x5423
18692227 TIOCSIG = 0x40045436
2228 TIOCSISO7816 = 0xc0285443
18702229 TIOCSLCKTRMIOS = 0x5457
18712230 TIOCSPGRP = 0x5410
18722231 TIOCSPTLCK = 0x40045431
18762235 TIOCSTI = 0x5412
18772236 TIOCSWINSZ = 0x5414
18782237 TIOCVHANGUP = 0x5437
2238 TMPFS_MAGIC = 0x1021994
18792239 TOSTOP = 0x100
2240 TPACKET_ALIGNMENT = 0x10
2241 TPACKET_HDRLEN = 0x34
2242 TP_STATUS_AVAILABLE = 0x0
2243 TP_STATUS_BLK_TMO = 0x20
2244 TP_STATUS_COPY = 0x2
2245 TP_STATUS_CSUMNOTREADY = 0x8
2246 TP_STATUS_CSUM_VALID = 0x80
2247 TP_STATUS_KERNEL = 0x0
2248 TP_STATUS_LOSING = 0x4
2249 TP_STATUS_SENDING = 0x2
2250 TP_STATUS_SEND_REQUEST = 0x1
2251 TP_STATUS_TS_RAW_HARDWARE = -0x80000000
2252 TP_STATUS_TS_SOFTWARE = 0x20000000
2253 TP_STATUS_TS_SYS_HARDWARE = 0x40000000
2254 TP_STATUS_USER = 0x1
2255 TP_STATUS_VLAN_TPID_VALID = 0x40
2256 TP_STATUS_VLAN_VALID = 0x10
2257 TP_STATUS_WRONG_FORMAT = 0x4
2258 TRACEFS_MAGIC = 0x74726163
18802259 TS_COMM_LEN = 0x20
18812260 TUNATTACHFILTER = 0x401054d5
18822261 TUNDETACHFILTER = 0x401054d6
18882267 TUNGETVNETHDRSZ = 0x800454d7
18892268 TUNGETVNETLE = 0x800454dd
18902269 TUNSETDEBUG = 0x400454c9
2270 TUNSETFILTEREBPF = 0x800454e1
18912271 TUNSETGROUP = 0x400454ce
18922272 TUNSETIFF = 0x400454ca
18932273 TUNSETIFINDEX = 0x400454da
18982278 TUNSETPERSIST = 0x400454cb
18992279 TUNSETQUEUE = 0x400454d9
19002280 TUNSETSNDBUF = 0x400454d4
2281 TUNSETSTEERINGEBPF = 0x800454e0
19012282 TUNSETTXFILTER = 0x400454d1
19022283 TUNSETVNETBE = 0x400454de
19032284 TUNSETVNETHDRSZ = 0x400454d8
19042285 TUNSETVNETLE = 0x400454dc
2286 UBI_IOCATT = 0x40186f40
2287 UBI_IOCDET = 0x40046f41
2288 UBI_IOCEBCH = 0x40044f02
2289 UBI_IOCEBER = 0x40044f01
2290 UBI_IOCEBISMAP = 0x80044f05
2291 UBI_IOCEBMAP = 0x40084f03
2292 UBI_IOCEBUNMAP = 0x40044f04
2293 UBI_IOCMKVOL = 0x40986f00
2294 UBI_IOCRMVOL = 0x40046f01
2295 UBI_IOCRNVOL = 0x51106f03
2296 UBI_IOCRSVOL = 0x400c6f02
2297 UBI_IOCSETVOLPROP = 0x40104f06
2298 UBI_IOCVOLCRBLK = 0x40804f07
2299 UBI_IOCVOLRMBLK = 0x4f08
2300 UBI_IOCVOLUP = 0x40084f00
2301 UDF_SUPER_MAGIC = 0x15013346
19052302 UMOUNT_NOFOLLOW = 0x8
2303 USBDEVICE_SUPER_MAGIC = 0x9fa2
2304 UTIME_NOW = 0x3fffffff
2305 UTIME_OMIT = 0x3ffffffe
2306 V9FS_MAGIC = 0x1021997
19062307 VDISCARD = 0xd
19072308 VEOF = 0x4
19082309 VEOL = 0xb
19322333 WALL = 0x40000000
19332334 WCLONE = 0x80000000
19342335 WCONTINUED = 0x8
2336 WDIOC_GETBOOTSTATUS = 0x80045702
2337 WDIOC_GETPRETIMEOUT = 0x80045709
2338 WDIOC_GETSTATUS = 0x80045701
2339 WDIOC_GETSUPPORT = 0x80285700
2340 WDIOC_GETTEMP = 0x80045703
2341 WDIOC_GETTIMELEFT = 0x8004570a
2342 WDIOC_GETTIMEOUT = 0x80045707
2343 WDIOC_KEEPALIVE = 0x80045705
2344 WDIOC_SETOPTIONS = 0x80045704
2345 WDIOC_SETPRETIMEOUT = 0xc0045708
2346 WDIOC_SETTIMEOUT = 0xc0045706
19352347 WEXITED = 0x4
2348 WIN_ACKMEDIACHANGE = 0xdb
2349 WIN_CHECKPOWERMODE1 = 0xe5
2350 WIN_CHECKPOWERMODE2 = 0x98
2351 WIN_DEVICE_RESET = 0x8
2352 WIN_DIAGNOSE = 0x90
2353 WIN_DOORLOCK = 0xde
2354 WIN_DOORUNLOCK = 0xdf
2355 WIN_DOWNLOAD_MICROCODE = 0x92
2356 WIN_FLUSH_CACHE = 0xe7
2357 WIN_FLUSH_CACHE_EXT = 0xea
2358 WIN_FORMAT = 0x50
2359 WIN_GETMEDIASTATUS = 0xda
2360 WIN_IDENTIFY = 0xec
2361 WIN_IDENTIFY_DMA = 0xee
2362 WIN_IDLEIMMEDIATE = 0xe1
2363 WIN_INIT = 0x60
2364 WIN_MEDIAEJECT = 0xed
2365 WIN_MULTREAD = 0xc4
2366 WIN_MULTREAD_EXT = 0x29
2367 WIN_MULTWRITE = 0xc5
2368 WIN_MULTWRITE_EXT = 0x39
2369 WIN_NOP = 0x0
2370 WIN_PACKETCMD = 0xa0
2371 WIN_PIDENTIFY = 0xa1
2372 WIN_POSTBOOT = 0xdc
2373 WIN_PREBOOT = 0xdd
2374 WIN_QUEUED_SERVICE = 0xa2
2375 WIN_READ = 0x20
2376 WIN_READDMA = 0xc8
2377 WIN_READDMA_EXT = 0x25
2378 WIN_READDMA_ONCE = 0xc9
2379 WIN_READDMA_QUEUED = 0xc7
2380 WIN_READDMA_QUEUED_EXT = 0x26
2381 WIN_READ_BUFFER = 0xe4
2382 WIN_READ_EXT = 0x24
2383 WIN_READ_LONG = 0x22
2384 WIN_READ_LONG_ONCE = 0x23
2385 WIN_READ_NATIVE_MAX = 0xf8
2386 WIN_READ_NATIVE_MAX_EXT = 0x27
2387 WIN_READ_ONCE = 0x21
2388 WIN_RECAL = 0x10
2389 WIN_RESTORE = 0x10
2390 WIN_SECURITY_DISABLE = 0xf6
2391 WIN_SECURITY_ERASE_PREPARE = 0xf3
2392 WIN_SECURITY_ERASE_UNIT = 0xf4
2393 WIN_SECURITY_FREEZE_LOCK = 0xf5
2394 WIN_SECURITY_SET_PASS = 0xf1
2395 WIN_SECURITY_UNLOCK = 0xf2
2396 WIN_SEEK = 0x70
2397 WIN_SETFEATURES = 0xef
2398 WIN_SETIDLE1 = 0xe3
2399 WIN_SETIDLE2 = 0x97
2400 WIN_SETMULT = 0xc6
2401 WIN_SET_MAX = 0xf9
2402 WIN_SET_MAX_EXT = 0x37
2403 WIN_SLEEPNOW1 = 0xe6
2404 WIN_SLEEPNOW2 = 0x99
2405 WIN_SMART = 0xb0
2406 WIN_SPECIFY = 0x91
2407 WIN_SRST = 0x8
2408 WIN_STANDBY = 0xe2
2409 WIN_STANDBY2 = 0x96
2410 WIN_STANDBYNOW1 = 0xe0
2411 WIN_STANDBYNOW2 = 0x94
2412 WIN_VERIFY = 0x40
2413 WIN_VERIFY_EXT = 0x42
2414 WIN_VERIFY_ONCE = 0x41
2415 WIN_WRITE = 0x30
2416 WIN_WRITEDMA = 0xca
2417 WIN_WRITEDMA_EXT = 0x35
2418 WIN_WRITEDMA_ONCE = 0xcb
2419 WIN_WRITEDMA_QUEUED = 0xcc
2420 WIN_WRITEDMA_QUEUED_EXT = 0x36
2421 WIN_WRITE_BUFFER = 0xe8
2422 WIN_WRITE_EXT = 0x34
2423 WIN_WRITE_LONG = 0x32
2424 WIN_WRITE_LONG_ONCE = 0x33
2425 WIN_WRITE_ONCE = 0x31
2426 WIN_WRITE_SAME = 0xe9
2427 WIN_WRITE_VERIFY = 0x3c
19362428 WNOHANG = 0x1
19372429 WNOTHREAD = 0x20000000
19382430 WNOWAIT = 0x1000000
19422434 XATTR_CREATE = 0x1
19432435 XATTR_REPLACE = 0x2
19442436 XCASE = 0x4
2437 XDP_COPY = 0x2
2438 XDP_FLAGS_DRV_MODE = 0x4
2439 XDP_FLAGS_HW_MODE = 0x8
2440 XDP_FLAGS_MASK = 0xf
2441 XDP_FLAGS_MODES = 0xe
2442 XDP_FLAGS_SKB_MODE = 0x2
2443 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
2444 XDP_MMAP_OFFSETS = 0x1
2445 XDP_PGOFF_RX_RING = 0x0
2446 XDP_PGOFF_TX_RING = 0x80000000
2447 XDP_RX_RING = 0x2
2448 XDP_SHARED_UMEM = 0x1
2449 XDP_STATISTICS = 0x7
2450 XDP_TX_RING = 0x3
2451 XDP_UMEM_COMPLETION_RING = 0x6
2452 XDP_UMEM_FILL_RING = 0x5
2453 XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
2454 XDP_UMEM_PGOFF_FILL_RING = 0x100000000
2455 XDP_UMEM_REG = 0x4
2456 XDP_ZEROCOPY = 0x4
2457 XENFS_SUPER_MAGIC = 0xabba1974
2458 XFS_SUPER_MAGIC = 0x58465342
19452459 XTABS = 0x1800
2460 ZSMALLOC_MAGIC = 0x58295829
19462461 )
19472462
19482463 // Errors
21222637 )
21232638
21242639 // Error table
2125 var errors = [...]string{
2126 1: "operation not permitted",
2127 2: "no such file or directory",
2128 3: "no such process",
2129 4: "interrupted system call",
2130 5: "input/output error",
2131 6: "no such device or address",
2132 7: "argument list too long",
2133 8: "exec format error",
2134 9: "bad file descriptor",
2135 10: "no child processes",
2136 11: "resource temporarily unavailable",
2137 12: "cannot allocate memory",
2138 13: "permission denied",
2139 14: "bad address",
2140 15: "block device required",
2141 16: "device or resource busy",
2142 17: "file exists",
2143 18: "invalid cross-device link",
2144 19: "no such device",
2145 20: "not a directory",
2146 21: "is a directory",
2147 22: "invalid argument",
2148 23: "too many open files in system",
2149 24: "too many open files",
2150 25: "inappropriate ioctl for device",
2151 26: "text file busy",
2152 27: "file too large",
2153 28: "no space left on device",
2154 29: "illegal seek",
2155 30: "read-only file system",
2156 31: "too many links",
2157 32: "broken pipe",
2158 33: "numerical argument out of domain",
2159 34: "numerical result out of range",
2160 35: "resource deadlock avoided",
2161 36: "file name too long",
2162 37: "no locks available",
2163 38: "function not implemented",
2164 39: "directory not empty",
2165 40: "too many levels of symbolic links",
2166 42: "no message of desired type",
2167 43: "identifier removed",
2168 44: "channel number out of range",
2169 45: "level 2 not synchronized",
2170 46: "level 3 halted",
2171 47: "level 3 reset",
2172 48: "link number out of range",
2173 49: "protocol driver not attached",
2174 50: "no CSI structure available",
2175 51: "level 2 halted",
2176 52: "invalid exchange",
2177 53: "invalid request descriptor",
2178 54: "exchange full",
2179 55: "no anode",
2180 56: "invalid request code",
2181 57: "invalid slot",
2182 59: "bad font file format",
2183 60: "device not a stream",
2184 61: "no data available",
2185 62: "timer expired",
2186 63: "out of streams resources",
2187 64: "machine is not on the network",
2188 65: "package not installed",
2189 66: "object is remote",
2190 67: "link has been severed",
2191 68: "advertise error",
2192 69: "srmount error",
2193 70: "communication error on send",
2194 71: "protocol error",
2195 72: "multihop attempted",
2196 73: "RFS specific error",
2197 74: "bad message",
2198 75: "value too large for defined data type",
2199 76: "name not unique on network",
2200 77: "file descriptor in bad state",
2201 78: "remote address changed",
2202 79: "can not access a needed shared library",
2203 80: "accessing a corrupted shared library",
2204 81: ".lib section in a.out corrupted",
2205 82: "attempting to link in too many shared libraries",
2206 83: "cannot exec a shared library directly",
2207 84: "invalid or incomplete multibyte or wide character",
2208 85: "interrupted system call should be restarted",
2209 86: "streams pipe error",
2210 87: "too many users",
2211 88: "socket operation on non-socket",
2212 89: "destination address required",
2213 90: "message too long",
2214 91: "protocol wrong type for socket",
2215 92: "protocol not available",
2216 93: "protocol not supported",
2217 94: "socket type not supported",
2218 95: "operation not supported",
2219 96: "protocol family not supported",
2220 97: "address family not supported by protocol",
2221 98: "address already in use",
2222 99: "cannot assign requested address",
2223 100: "network is down",
2224 101: "network is unreachable",
2225 102: "network dropped connection on reset",
2226 103: "software caused connection abort",
2227 104: "connection reset by peer",
2228 105: "no buffer space available",
2229 106: "transport endpoint is already connected",
2230 107: "transport endpoint is not connected",
2231 108: "cannot send after transport endpoint shutdown",
2232 109: "too many references: cannot splice",
2233 110: "connection timed out",
2234 111: "connection refused",
2235 112: "host is down",
2236 113: "no route to host",
2237 114: "operation already in progress",
2238 115: "operation now in progress",
2239 116: "stale file handle",
2240 117: "structure needs cleaning",
2241 118: "not a XENIX named type file",
2242 119: "no XENIX semaphores available",
2243 120: "is a named type file",
2244 121: "remote I/O error",
2245 122: "disk quota exceeded",
2246 123: "no medium found",
2247 124: "wrong medium type",
2248 125: "operation canceled",
2249 126: "required key not available",
2250 127: "key has expired",
2251 128: "key has been revoked",
2252 129: "key was rejected by service",
2253 130: "owner died",
2254 131: "state not recoverable",
2255 132: "operation not possible due to RF-kill",
2256 133: "memory page has hardware error",
2640 var errorList = [...]struct {
2641 num syscall.Errno
2642 name string
2643 desc string
2644 }{
2645 {1, "EPERM", "operation not permitted"},
2646 {2, "ENOENT", "no such file or directory"},
2647 {3, "ESRCH", "no such process"},
2648 {4, "EINTR", "interrupted system call"},
2649 {5, "EIO", "input/output error"},
2650 {6, "ENXIO", "no such device or address"},
2651 {7, "E2BIG", "argument list too long"},
2652 {8, "ENOEXEC", "exec format error"},
2653 {9, "EBADF", "bad file descriptor"},
2654 {10, "ECHILD", "no child processes"},
2655 {11, "EAGAIN", "resource temporarily unavailable"},
2656 {12, "ENOMEM", "cannot allocate memory"},
2657 {13, "EACCES", "permission denied"},
2658 {14, "EFAULT", "bad address"},
2659 {15, "ENOTBLK", "block device required"},
2660 {16, "EBUSY", "device or resource busy"},
2661 {17, "EEXIST", "file exists"},
2662 {18, "EXDEV", "invalid cross-device link"},
2663 {19, "ENODEV", "no such device"},
2664 {20, "ENOTDIR", "not a directory"},
2665 {21, "EISDIR", "is a directory"},
2666 {22, "EINVAL", "invalid argument"},
2667 {23, "ENFILE", "too many open files in system"},
2668 {24, "EMFILE", "too many open files"},
2669 {25, "ENOTTY", "inappropriate ioctl for device"},
2670 {26, "ETXTBSY", "text file busy"},
2671 {27, "EFBIG", "file too large"},
2672 {28, "ENOSPC", "no space left on device"},
2673 {29, "ESPIPE", "illegal seek"},
2674 {30, "EROFS", "read-only file system"},
2675 {31, "EMLINK", "too many links"},
2676 {32, "EPIPE", "broken pipe"},
2677 {33, "EDOM", "numerical argument out of domain"},
2678 {34, "ERANGE", "numerical result out of range"},
2679 {35, "EDEADLK", "resource deadlock avoided"},
2680 {36, "ENAMETOOLONG", "file name too long"},
2681 {37, "ENOLCK", "no locks available"},
2682 {38, "ENOSYS", "function not implemented"},
2683 {39, "ENOTEMPTY", "directory not empty"},
2684 {40, "ELOOP", "too many levels of symbolic links"},
2685 {42, "ENOMSG", "no message of desired type"},
2686 {43, "EIDRM", "identifier removed"},
2687 {44, "ECHRNG", "channel number out of range"},
2688 {45, "EL2NSYNC", "level 2 not synchronized"},
2689 {46, "EL3HLT", "level 3 halted"},
2690 {47, "EL3RST", "level 3 reset"},
2691 {48, "ELNRNG", "link number out of range"},
2692 {49, "EUNATCH", "protocol driver not attached"},
2693 {50, "ENOCSI", "no CSI structure available"},
2694 {51, "EL2HLT", "level 2 halted"},
2695 {52, "EBADE", "invalid exchange"},
2696 {53, "EBADR", "invalid request descriptor"},
2697 {54, "EXFULL", "exchange full"},
2698 {55, "ENOANO", "no anode"},
2699 {56, "EBADRQC", "invalid request code"},
2700 {57, "EBADSLT", "invalid slot"},
2701 {59, "EBFONT", "bad font file format"},
2702 {60, "ENOSTR", "device not a stream"},
2703 {61, "ENODATA", "no data available"},
2704 {62, "ETIME", "timer expired"},
2705 {63, "ENOSR", "out of streams resources"},
2706 {64, "ENONET", "machine is not on the network"},
2707 {65, "ENOPKG", "package not installed"},
2708 {66, "EREMOTE", "object is remote"},
2709 {67, "ENOLINK", "link has been severed"},
2710 {68, "EADV", "advertise error"},
2711 {69, "ESRMNT", "srmount error"},
2712 {70, "ECOMM", "communication error on send"},
2713 {71, "EPROTO", "protocol error"},
2714 {72, "EMULTIHOP", "multihop attempted"},
2715 {73, "EDOTDOT", "RFS specific error"},
2716 {74, "EBADMSG", "bad message"},
2717 {75, "EOVERFLOW", "value too large for defined data type"},
2718 {76, "ENOTUNIQ", "name not unique on network"},
2719 {77, "EBADFD", "file descriptor in bad state"},
2720 {78, "EREMCHG", "remote address changed"},
2721 {79, "ELIBACC", "can not access a needed shared library"},
2722 {80, "ELIBBAD", "accessing a corrupted shared library"},
2723 {81, "ELIBSCN", ".lib section in a.out corrupted"},
2724 {82, "ELIBMAX", "attempting to link in too many shared libraries"},
2725 {83, "ELIBEXEC", "cannot exec a shared library directly"},
2726 {84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
2727 {85, "ERESTART", "interrupted system call should be restarted"},
2728 {86, "ESTRPIPE", "streams pipe error"},
2729 {87, "EUSERS", "too many users"},
2730 {88, "ENOTSOCK", "socket operation on non-socket"},
2731 {89, "EDESTADDRREQ", "destination address required"},
2732 {90, "EMSGSIZE", "message too long"},
2733 {91, "EPROTOTYPE", "protocol wrong type for socket"},
2734 {92, "ENOPROTOOPT", "protocol not available"},
2735 {93, "EPROTONOSUPPORT", "protocol not supported"},
2736 {94, "ESOCKTNOSUPPORT", "socket type not supported"},
2737 {95, "ENOTSUP", "operation not supported"},
2738 {96, "EPFNOSUPPORT", "protocol family not supported"},
2739 {97, "EAFNOSUPPORT", "address family not supported by protocol"},
2740 {98, "EADDRINUSE", "address already in use"},
2741 {99, "EADDRNOTAVAIL", "cannot assign requested address"},
2742 {100, "ENETDOWN", "network is down"},
2743 {101, "ENETUNREACH", "network is unreachable"},
2744 {102, "ENETRESET", "network dropped connection on reset"},
2745 {103, "ECONNABORTED", "software caused connection abort"},
2746 {104, "ECONNRESET", "connection reset by peer"},
2747 {105, "ENOBUFS", "no buffer space available"},
2748 {106, "EISCONN", "transport endpoint is already connected"},
2749 {107, "ENOTCONN", "transport endpoint is not connected"},
2750 {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
2751 {109, "ETOOMANYREFS", "too many references: cannot splice"},
2752 {110, "ETIMEDOUT", "connection timed out"},
2753 {111, "ECONNREFUSED", "connection refused"},
2754 {112, "EHOSTDOWN", "host is down"},
2755 {113, "EHOSTUNREACH", "no route to host"},
2756 {114, "EALREADY", "operation already in progress"},
2757 {115, "EINPROGRESS", "operation now in progress"},
2758 {116, "ESTALE", "stale file handle"},
2759 {117, "EUCLEAN", "structure needs cleaning"},
2760 {118, "ENOTNAM", "not a XENIX named type file"},
2761 {119, "ENAVAIL", "no XENIX semaphores available"},
2762 {120, "EISNAM", "is a named type file"},
2763 {121, "EREMOTEIO", "remote I/O error"},
2764 {122, "EDQUOT", "disk quota exceeded"},
2765 {123, "ENOMEDIUM", "no medium found"},
2766 {124, "EMEDIUMTYPE", "wrong medium type"},
2767 {125, "ECANCELED", "operation canceled"},
2768 {126, "ENOKEY", "required key not available"},
2769 {127, "EKEYEXPIRED", "key has expired"},
2770 {128, "EKEYREVOKED", "key has been revoked"},
2771 {129, "EKEYREJECTED", "key was rejected by service"},
2772 {130, "EOWNERDEAD", "owner died"},
2773 {131, "ENOTRECOVERABLE", "state not recoverable"},
2774 {132, "ERFKILL", "operation not possible due to RF-kill"},
2775 {133, "EHWPOISON", "memory page has hardware error"},
22572776 }
22582777
22592778 // Signal table
2260 var signals = [...]string{
2261 1: "hangup",
2262 2: "interrupt",
2263 3: "quit",
2264 4: "illegal instruction",
2265 5: "trace/breakpoint trap",
2266 6: "aborted",
2267 7: "bus error",
2268 8: "floating point exception",
2269 9: "killed",
2270 10: "user defined signal 1",
2271 11: "segmentation fault",
2272 12: "user defined signal 2",
2273 13: "broken pipe",
2274 14: "alarm clock",
2275 15: "terminated",
2276 16: "stack fault",
2277 17: "child exited",
2278 18: "continued",
2279 19: "stopped (signal)",
2280 20: "stopped",
2281 21: "stopped (tty input)",
2282 22: "stopped (tty output)",
2283 23: "urgent I/O condition",
2284 24: "CPU time limit exceeded",
2285 25: "file size limit exceeded",
2286 26: "virtual timer expired",
2287 27: "profiling timer expired",
2288 28: "window changed",
2289 29: "I/O possible",
2290 30: "power failure",
2291 31: "bad system call",
2779 var signalList = [...]struct {
2780 num syscall.Signal
2781 name string
2782 desc string
2783 }{
2784 {1, "SIGHUP", "hangup"},
2785 {2, "SIGINT", "interrupt"},
2786 {3, "SIGQUIT", "quit"},
2787 {4, "SIGILL", "illegal instruction"},
2788 {5, "SIGTRAP", "trace/breakpoint trap"},
2789 {6, "SIGABRT", "aborted"},
2790 {7, "SIGBUS", "bus error"},
2791 {8, "SIGFPE", "floating point exception"},
2792 {9, "SIGKILL", "killed"},
2793 {10, "SIGUSR1", "user defined signal 1"},
2794 {11, "SIGSEGV", "segmentation fault"},
2795 {12, "SIGUSR2", "user defined signal 2"},
2796 {13, "SIGPIPE", "broken pipe"},
2797 {14, "SIGALRM", "alarm clock"},
2798 {15, "SIGTERM", "terminated"},
2799 {16, "SIGSTKFLT", "stack fault"},
2800 {17, "SIGCHLD", "child exited"},
2801 {18, "SIGCONT", "continued"},
2802 {19, "SIGSTOP", "stopped (signal)"},
2803 {20, "SIGTSTP", "stopped"},
2804 {21, "SIGTTIN", "stopped (tty input)"},
2805 {22, "SIGTTOU", "stopped (tty output)"},
2806 {23, "SIGURG", "urgent I/O condition"},
2807 {24, "SIGXCPU", "CPU time limit exceeded"},
2808 {25, "SIGXFSZ", "file size limit exceeded"},
2809 {26, "SIGVTALRM", "virtual timer expired"},
2810 {27, "SIGPROF", "profiling timer expired"},
2811 {28, "SIGWINCH", "window changed"},
2812 {29, "SIGIO", "I/O possible"},
2813 {30, "SIGPWR", "power failure"},
2814 {31, "SIGSYS", "bad system call"},
22922815 }
0 // mkerrors.sh -m64
1 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
0 // mkerrors.sh -Wall -Werror -static -I/tmp/include
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build sparc64,linux
44
5 // Created by cgo -godefs - DO NOT EDIT
6 // cgo -godefs -- -m64 _const.go
5 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
6 // cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
77
88 package unix
99
1010 import "syscall"
1111
1212 const (
13 AF_ALG = 0x26
14 AF_APPLETALK = 0x5
15 AF_ASH = 0x12
16 AF_ATMPVC = 0x8
17 AF_ATMSVC = 0x14
18 AF_AX25 = 0x3
19 AF_BLUETOOTH = 0x1f
20 AF_BRIDGE = 0x7
21 AF_CAIF = 0x25
22 AF_CAN = 0x1d
23 AF_DECnet = 0xc
24 AF_ECONET = 0x13
25 AF_FILE = 0x1
26 AF_IB = 0x1b
27 AF_IEEE802154 = 0x24
28 AF_INET = 0x2
29 AF_INET6 = 0xa
30 AF_IPX = 0x4
31 AF_IRDA = 0x17
32 AF_ISDN = 0x22
33 AF_IUCV = 0x20
34 AF_KCM = 0x29
35 AF_KEY = 0xf
36 AF_LLC = 0x1a
37 AF_LOCAL = 0x1
38 AF_MAX = 0x2a
39 AF_MPLS = 0x1c
40 AF_NETBEUI = 0xd
41 AF_NETLINK = 0x10
42 AF_NETROM = 0x6
43 AF_NFC = 0x27
44 AF_PACKET = 0x11
45 AF_PHONET = 0x23
46 AF_PPPOX = 0x18
47 AF_RDS = 0x15
48 AF_ROSE = 0xb
49 AF_ROUTE = 0x10
50 AF_RXRPC = 0x21
51 AF_SECURITY = 0xe
52 AF_SNA = 0x16
53 AF_TIPC = 0x1e
54 AF_UNIX = 0x1
55 AF_UNSPEC = 0x0
56 AF_VSOCK = 0x28
57 AF_WANPIPE = 0x19
58 AF_X25 = 0x9
59 ALG_OP_DECRYPT = 0x0
60 ALG_OP_ENCRYPT = 0x1
61 ALG_SET_AEAD_ASSOCLEN = 0x4
62 ALG_SET_AEAD_AUTHSIZE = 0x5
63 ALG_SET_IV = 0x2
64 ALG_SET_KEY = 0x1
65 ALG_SET_OP = 0x3
66 ARPHRD_6LOWPAN = 0x339
67 ARPHRD_ADAPT = 0x108
68 ARPHRD_APPLETLK = 0x8
69 ARPHRD_ARCNET = 0x7
70 ARPHRD_ASH = 0x30d
71 ARPHRD_ATM = 0x13
72 ARPHRD_AX25 = 0x3
73 ARPHRD_BIF = 0x307
74 ARPHRD_CAIF = 0x336
75 ARPHRD_CAN = 0x118
76 ARPHRD_CHAOS = 0x5
77 ARPHRD_CISCO = 0x201
78 ARPHRD_CSLIP = 0x101
79 ARPHRD_CSLIP6 = 0x103
80 ARPHRD_DDCMP = 0x205
81 ARPHRD_DLCI = 0xf
82 ARPHRD_ECONET = 0x30e
83 ARPHRD_EETHER = 0x2
84 ARPHRD_ETHER = 0x1
85 ARPHRD_EUI64 = 0x1b
86 ARPHRD_FCAL = 0x311
87 ARPHRD_FCFABRIC = 0x313
88 ARPHRD_FCPL = 0x312
89 ARPHRD_FCPP = 0x310
90 ARPHRD_FDDI = 0x306
91 ARPHRD_FRAD = 0x302
92 ARPHRD_HDLC = 0x201
93 ARPHRD_HIPPI = 0x30c
94 ARPHRD_HWX25 = 0x110
95 ARPHRD_IEEE1394 = 0x18
96 ARPHRD_IEEE802 = 0x6
97 ARPHRD_IEEE80211 = 0x321
98 ARPHRD_IEEE80211_PRISM = 0x322
99 ARPHRD_IEEE80211_RADIOTAP = 0x323
100 ARPHRD_IEEE802154 = 0x324
101 ARPHRD_IEEE802154_MONITOR = 0x325
102 ARPHRD_IEEE802_TR = 0x320
103 ARPHRD_INFINIBAND = 0x20
104 ARPHRD_IP6GRE = 0x337
105 ARPHRD_IPDDP = 0x309
106 ARPHRD_IPGRE = 0x30a
107 ARPHRD_IRDA = 0x30f
108 ARPHRD_LAPB = 0x204
109 ARPHRD_LOCALTLK = 0x305
110 ARPHRD_LOOPBACK = 0x304
111 ARPHRD_METRICOM = 0x17
112 ARPHRD_NETLINK = 0x338
113 ARPHRD_NETROM = 0x0
114 ARPHRD_NONE = 0xfffe
115 ARPHRD_PHONET = 0x334
116 ARPHRD_PHONET_PIPE = 0x335
117 ARPHRD_PIMREG = 0x30b
118 ARPHRD_PPP = 0x200
119 ARPHRD_PRONET = 0x4
120 ARPHRD_RAWHDLC = 0x206
121 ARPHRD_ROSE = 0x10e
122 ARPHRD_RSRVD = 0x104
123 ARPHRD_SIT = 0x308
124 ARPHRD_SKIP = 0x303
125 ARPHRD_SLIP = 0x100
126 ARPHRD_SLIP6 = 0x102
127 ARPHRD_TUNNEL = 0x300
128 ARPHRD_TUNNEL6 = 0x301
129 ARPHRD_VOID = 0xffff
130 ARPHRD_X25 = 0x10f
131 ASI_LEON_DFLUSH = 0x11
132 ASI_LEON_IFLUSH = 0x10
133 ASI_LEON_MMUFLUSH = 0x18
134 B0 = 0x0
135 B1000000 = 0x100c
136 B110 = 0x3
137 B115200 = 0x1002
138 B1152000 = 0x100d
139 B1200 = 0x9
140 B134 = 0x4
141 B150 = 0x5
142 B1500000 = 0x100e
143 B153600 = 0x1006
144 B1800 = 0xa
145 B19200 = 0xe
146 B200 = 0x6
147 B2000000 = 0x100f
148 B230400 = 0x1003
149 B2400 = 0xb
150 B300 = 0x7
151 B307200 = 0x1007
152 B38400 = 0xf
153 B460800 = 0x1004
154 B4800 = 0xc
155 B50 = 0x1
156 B500000 = 0x100a
157 B57600 = 0x1001
158 B576000 = 0x100b
159 B600 = 0x8
160 B614400 = 0x1008
161 B75 = 0x2
162 B76800 = 0x1005
163 B921600 = 0x1009
164 B9600 = 0xd
165 BLKBSZGET = 0x80081270
166 BLKBSZSET = 0x40081271
167 BLKFLSBUF = 0x1261
168 BLKFRAGET = 0x1265
169 BLKFRASET = 0x1264
170 BLKGETSIZE = 0x1260
171 BLKGETSIZE64 = 0x80081272
172 BLKRAGET = 0x1263
173 BLKRASET = 0x1262
174 BLKROGET = 0x125e
175 BLKROSET = 0x125d
176 BLKRRPART = 0x125f
177 BLKSECTGET = 0x1267
178 BLKSECTSET = 0x1266
179 BLKSSZGET = 0x1268
180 BOTHER = 0x1000
181 BPF_A = 0x10
182 BPF_ABS = 0x20
183 BPF_ADD = 0x0
184 BPF_ALU = 0x4
185 BPF_AND = 0x50
186 BPF_B = 0x10
187 BPF_DIV = 0x30
188 BPF_H = 0x8
189 BPF_IMM = 0x0
190 BPF_IND = 0x40
191 BPF_JA = 0x0
192 BPF_JEQ = 0x10
193 BPF_JGE = 0x30
194 BPF_JGT = 0x20
195 BPF_JMP = 0x5
196 BPF_JSET = 0x40
197 BPF_K = 0x0
198 BPF_LD = 0x0
199 BPF_LDX = 0x1
200 BPF_LEN = 0x80
201 BPF_LL_OFF = -0x200000
202 BPF_LSH = 0x60
203 BPF_MAJOR_VERSION = 0x1
204 BPF_MAXINSNS = 0x1000
205 BPF_MEM = 0x60
206 BPF_MEMWORDS = 0x10
207 BPF_MINOR_VERSION = 0x1
208 BPF_MISC = 0x7
209 BPF_MOD = 0x90
210 BPF_MSH = 0xa0
211 BPF_MUL = 0x20
212 BPF_NEG = 0x80
213 BPF_NET_OFF = -0x100000
214 BPF_OR = 0x40
215 BPF_RET = 0x6
216 BPF_RSH = 0x70
217 BPF_ST = 0x2
218 BPF_STX = 0x3
219 BPF_SUB = 0x10
220 BPF_TAX = 0x0
221 BPF_TXA = 0x80
222 BPF_W = 0x0
223 BPF_X = 0x8
224 BPF_XOR = 0xa0
225 BRKINT = 0x2
226 BS0 = 0x0
227 BS1 = 0x2000
228 BSDLY = 0x2000
229 CAN_BCM = 0x2
230 CAN_EFF_FLAG = 0x80000000
231 CAN_EFF_ID_BITS = 0x1d
232 CAN_EFF_MASK = 0x1fffffff
233 CAN_ERR_FLAG = 0x20000000
234 CAN_ERR_MASK = 0x1fffffff
235 CAN_INV_FILTER = 0x20000000
236 CAN_ISOTP = 0x6
237 CAN_MAX_DLC = 0x8
238 CAN_MAX_DLEN = 0x8
239 CAN_MCNET = 0x5
240 CAN_MTU = 0x10
241 CAN_NPROTO = 0x7
242 CAN_RAW = 0x1
243 CAN_RTR_FLAG = 0x40000000
244 CAN_SFF_ID_BITS = 0xb
245 CAN_SFF_MASK = 0x7ff
246 CAN_TP16 = 0x3
247 CAN_TP20 = 0x4
248 CBAUD = 0x100f
249 CBAUDEX = 0x1000
250 CFLUSH = 0xf
251 CIBAUD = 0x100f0000
252 CLOCAL = 0x800
253 CLOCK_BOOTTIME = 0x7
254 CLOCK_BOOTTIME_ALARM = 0x9
255 CLOCK_DEFAULT = 0x0
256 CLOCK_EXT = 0x1
257 CLOCK_INT = 0x2
258 CLOCK_MONOTONIC = 0x1
259 CLOCK_MONOTONIC_COARSE = 0x6
260 CLOCK_MONOTONIC_RAW = 0x4
261 CLOCK_PROCESS_CPUTIME_ID = 0x2
262 CLOCK_REALTIME = 0x0
263 CLOCK_REALTIME_ALARM = 0x8
264 CLOCK_REALTIME_COARSE = 0x5
265 CLOCK_TAI = 0xb
266 CLOCK_THREAD_CPUTIME_ID = 0x3
267 CLOCK_TXFROMRX = 0x4
268 CLOCK_TXINT = 0x3
269 CLONE_CHILD_CLEARTID = 0x200000
270 CLONE_CHILD_SETTID = 0x1000000
271 CLONE_DETACHED = 0x400000
272 CLONE_FILES = 0x400
273 CLONE_FS = 0x200
274 CLONE_IO = 0x80000000
275 CLONE_NEWCGROUP = 0x2000000
276 CLONE_NEWIPC = 0x8000000
277 CLONE_NEWNET = 0x40000000
278 CLONE_NEWNS = 0x20000
279 CLONE_NEWPID = 0x20000000
280 CLONE_NEWUSER = 0x10000000
281 CLONE_NEWUTS = 0x4000000
282 CLONE_PARENT = 0x8000
283 CLONE_PARENT_SETTID = 0x100000
284 CLONE_PTRACE = 0x2000
285 CLONE_SETTLS = 0x80000
286 CLONE_SIGHAND = 0x800
287 CLONE_SYSVSEM = 0x40000
288 CLONE_THREAD = 0x10000
289 CLONE_UNTRACED = 0x800000
290 CLONE_VFORK = 0x4000
291 CLONE_VM = 0x100
292 CMSPAR = 0x40000000
293 CR0 = 0x0
294 CR1 = 0x200
295 CR2 = 0x400
296 CR3 = 0x600
297 CRDLY = 0x600
298 CREAD = 0x80
299 CRTSCTS = 0x80000000
300 CS5 = 0x0
301 CS6 = 0x10
302 CS7 = 0x20
303 CS8 = 0x30
304 CSIGNAL = 0xff
305 CSIZE = 0x30
306 CSTART = 0x11
307 CSTATUS = 0x0
308 CSTOP = 0x13
309 CSTOPB = 0x40
310 CSUSP = 0x1a
311 DT_BLK = 0x6
312 DT_CHR = 0x2
313 DT_DIR = 0x4
314 DT_FIFO = 0x1
315 DT_LNK = 0xa
316 DT_REG = 0x8
317 DT_SOCK = 0xc
318 DT_UNKNOWN = 0x0
319 DT_WHT = 0xe
320 ECHO = 0x8
321 ECHOCTL = 0x200
322 ECHOE = 0x10
323 ECHOK = 0x20
324 ECHOKE = 0x800
325 ECHONL = 0x40
326 ECHOPRT = 0x400
327 EMT_TAGOVF = 0x1
328 ENCODING_DEFAULT = 0x0
329 ENCODING_FM_MARK = 0x3
330 ENCODING_FM_SPACE = 0x4
331 ENCODING_MANCHESTER = 0x5
332 ENCODING_NRZ = 0x1
333 ENCODING_NRZI = 0x2
334 EPOLLERR = 0x8
335 EPOLLET = 0x80000000
336 EPOLLEXCLUSIVE = 0x10000000
337 EPOLLHUP = 0x10
338 EPOLLIN = 0x1
339 EPOLLMSG = 0x400
340 EPOLLONESHOT = 0x40000000
341 EPOLLOUT = 0x4
342 EPOLLPRI = 0x2
343 EPOLLRDBAND = 0x80
344 EPOLLRDHUP = 0x2000
345 EPOLLRDNORM = 0x40
346 EPOLLWAKEUP = 0x20000000
347 EPOLLWRBAND = 0x200
348 EPOLLWRNORM = 0x100
349 EPOLL_CLOEXEC = 0x400000
350 EPOLL_CTL_ADD = 0x1
351 EPOLL_CTL_DEL = 0x2
352 EPOLL_CTL_MOD = 0x3
353 ETH_P_1588 = 0x88f7
354 ETH_P_8021AD = 0x88a8
355 ETH_P_8021AH = 0x88e7
356 ETH_P_8021Q = 0x8100
357 ETH_P_80221 = 0x8917
358 ETH_P_802_2 = 0x4
359 ETH_P_802_3 = 0x1
360 ETH_P_802_3_MIN = 0x600
361 ETH_P_802_EX1 = 0x88b5
362 ETH_P_AARP = 0x80f3
363 ETH_P_AF_IUCV = 0xfbfb
364 ETH_P_ALL = 0x3
365 ETH_P_AOE = 0x88a2
366 ETH_P_ARCNET = 0x1a
367 ETH_P_ARP = 0x806
368 ETH_P_ATALK = 0x809b
369 ETH_P_ATMFATE = 0x8884
370 ETH_P_ATMMPOA = 0x884c
371 ETH_P_AX25 = 0x2
372 ETH_P_BATMAN = 0x4305
373 ETH_P_BPQ = 0x8ff
374 ETH_P_CAIF = 0xf7
375 ETH_P_CAN = 0xc
376 ETH_P_CANFD = 0xd
377 ETH_P_CONTROL = 0x16
378 ETH_P_CUST = 0x6006
379 ETH_P_DDCMP = 0x6
380 ETH_P_DEC = 0x6000
381 ETH_P_DIAG = 0x6005
382 ETH_P_DNA_DL = 0x6001
383 ETH_P_DNA_RC = 0x6002
384 ETH_P_DNA_RT = 0x6003
385 ETH_P_DSA = 0x1b
386 ETH_P_ECONET = 0x18
387 ETH_P_EDSA = 0xdada
388 ETH_P_FCOE = 0x8906
389 ETH_P_FIP = 0x8914
390 ETH_P_HDLC = 0x19
391 ETH_P_HSR = 0x892f
392 ETH_P_IEEE802154 = 0xf6
393 ETH_P_IEEEPUP = 0xa00
394 ETH_P_IEEEPUPAT = 0xa01
395 ETH_P_IP = 0x800
396 ETH_P_IPV6 = 0x86dd
397 ETH_P_IPX = 0x8137
398 ETH_P_IRDA = 0x17
399 ETH_P_LAT = 0x6004
400 ETH_P_LINK_CTL = 0x886c
401 ETH_P_LOCALTALK = 0x9
402 ETH_P_LOOP = 0x60
403 ETH_P_LOOPBACK = 0x9000
404 ETH_P_MACSEC = 0x88e5
405 ETH_P_MOBITEX = 0x15
406 ETH_P_MPLS_MC = 0x8848
407 ETH_P_MPLS_UC = 0x8847
408 ETH_P_MVRP = 0x88f5
409 ETH_P_PAE = 0x888e
410 ETH_P_PAUSE = 0x8808
411 ETH_P_PHONET = 0xf5
412 ETH_P_PPPTALK = 0x10
413 ETH_P_PPP_DISC = 0x8863
414 ETH_P_PPP_MP = 0x8
415 ETH_P_PPP_SES = 0x8864
416 ETH_P_PRP = 0x88fb
417 ETH_P_PUP = 0x200
418 ETH_P_PUPAT = 0x201
419 ETH_P_QINQ1 = 0x9100
420 ETH_P_QINQ2 = 0x9200
421 ETH_P_QINQ3 = 0x9300
422 ETH_P_RARP = 0x8035
423 ETH_P_SCA = 0x6007
424 ETH_P_SLOW = 0x8809
425 ETH_P_SNAP = 0x5
426 ETH_P_TDLS = 0x890d
427 ETH_P_TEB = 0x6558
428 ETH_P_TIPC = 0x88ca
429 ETH_P_TRAILER = 0x1c
430 ETH_P_TR_802_2 = 0x11
431 ETH_P_TSN = 0x22f0
432 ETH_P_WAN_PPP = 0x7
433 ETH_P_WCCP = 0x883e
434 ETH_P_X25 = 0x805
435 ETH_P_XDSA = 0xf8
436 EXTA = 0xe
437 EXTB = 0xf
438 EXTPROC = 0x10000
439 FALLOC_FL_COLLAPSE_RANGE = 0x8
440 FALLOC_FL_INSERT_RANGE = 0x20
441 FALLOC_FL_KEEP_SIZE = 0x1
442 FALLOC_FL_NO_HIDE_STALE = 0x4
443 FALLOC_FL_PUNCH_HOLE = 0x2
444 FALLOC_FL_ZERO_RANGE = 0x10
445 FD_CLOEXEC = 0x1
446 FD_SETSIZE = 0x400
447 FF0 = 0x0
448 FF1 = 0x8000
449 FFDLY = 0x8000
450 FLUSHO = 0x2000
451 F_DUPFD = 0x0
452 F_DUPFD_CLOEXEC = 0x406
453 F_EXLCK = 0x4
454 F_GETFD = 0x1
455 F_GETFL = 0x3
456 F_GETLEASE = 0x401
457 F_GETLK = 0x7
458 F_GETLK64 = 0x7
459 F_GETOWN = 0x5
460 F_GETOWN_EX = 0x10
461 F_GETPIPE_SZ = 0x408
462 F_GETSIG = 0xb
463 F_LOCK = 0x1
464 F_NOTIFY = 0x402
465 F_OFD_GETLK = 0x24
466 F_OFD_SETLK = 0x25
467 F_OFD_SETLKW = 0x26
468 F_OK = 0x0
469 F_RDLCK = 0x1
470 F_SETFD = 0x2
471 F_SETFL = 0x4
472 F_SETLEASE = 0x400
473 F_SETLK = 0x8
474 F_SETLK64 = 0x8
475 F_SETLKW = 0x9
476 F_SETLKW64 = 0x9
477 F_SETOWN = 0x6
478 F_SETOWN_EX = 0xf
479 F_SETPIPE_SZ = 0x407
480 F_SETSIG = 0xa
481 F_SHLCK = 0x8
482 F_TEST = 0x3
483 F_TLOCK = 0x2
484 F_ULOCK = 0x0
485 F_UNLCK = 0x3
486 F_WRLCK = 0x2
487 GRND_NONBLOCK = 0x1
488 GRND_RANDOM = 0x2
489 HUPCL = 0x400
490 IBSHIFT = 0x10
491 ICANON = 0x2
492 ICMPV6_FILTER = 0x1
493 ICRNL = 0x100
494 IEXTEN = 0x8000
495 IFA_F_DADFAILED = 0x8
496 IFA_F_DEPRECATED = 0x20
497 IFA_F_HOMEADDRESS = 0x10
498 IFA_F_MANAGETEMPADDR = 0x100
499 IFA_F_MCAUTOJOIN = 0x400
500 IFA_F_NODAD = 0x2
501 IFA_F_NOPREFIXROUTE = 0x200
502 IFA_F_OPTIMISTIC = 0x4
503 IFA_F_PERMANENT = 0x80
504 IFA_F_SECONDARY = 0x1
505 IFA_F_STABLE_PRIVACY = 0x800
506 IFA_F_TEMPORARY = 0x1
507 IFA_F_TENTATIVE = 0x40
508 IFA_MAX = 0x8
509 IFF_ALLMULTI = 0x200
510 IFF_ATTACH_QUEUE = 0x200
511 IFF_AUTOMEDIA = 0x4000
512 IFF_BROADCAST = 0x2
513 IFF_DEBUG = 0x4
514 IFF_DETACH_QUEUE = 0x400
515 IFF_DORMANT = 0x20000
516 IFF_DYNAMIC = 0x8000
517 IFF_ECHO = 0x40000
518 IFF_LOOPBACK = 0x8
519 IFF_LOWER_UP = 0x10000
520 IFF_MASTER = 0x400
521 IFF_MULTICAST = 0x1000
522 IFF_MULTI_QUEUE = 0x100
523 IFF_NOARP = 0x80
524 IFF_NOFILTER = 0x1000
525 IFF_NOTRAILERS = 0x20
526 IFF_NO_PI = 0x1000
527 IFF_ONE_QUEUE = 0x2000
528 IFF_PERSIST = 0x800
529 IFF_POINTOPOINT = 0x10
530 IFF_PORTSEL = 0x2000
531 IFF_PROMISC = 0x100
532 IFF_RUNNING = 0x40
533 IFF_SLAVE = 0x800
534 IFF_TAP = 0x2
535 IFF_TUN = 0x1
536 IFF_TUN_EXCL = 0x8000
537 IFF_UP = 0x1
538 IFF_VNET_HDR = 0x4000
539 IFF_VOLATILE = 0x70c5a
540 IFNAMSIZ = 0x10
541 IGNBRK = 0x1
542 IGNCR = 0x80
543 IGNPAR = 0x4
544 IMAXBEL = 0x2000
545 INLCR = 0x40
546 INPCK = 0x10
547 IN_ACCESS = 0x1
548 IN_ALL_EVENTS = 0xfff
549 IN_ATTRIB = 0x4
550 IN_CLASSA_HOST = 0xffffff
551 IN_CLASSA_MAX = 0x80
552 IN_CLASSA_NET = 0xff000000
553 IN_CLASSA_NSHIFT = 0x18
554 IN_CLASSB_HOST = 0xffff
555 IN_CLASSB_MAX = 0x10000
556 IN_CLASSB_NET = 0xffff0000
557 IN_CLASSB_NSHIFT = 0x10
558 IN_CLASSC_HOST = 0xff
559 IN_CLASSC_NET = 0xffffff00
560 IN_CLASSC_NSHIFT = 0x8
561 IN_CLOEXEC = 0x400000
562 IN_CLOSE = 0x18
563 IN_CLOSE_NOWRITE = 0x10
564 IN_CLOSE_WRITE = 0x8
565 IN_CREATE = 0x100
566 IN_DELETE = 0x200
567 IN_DELETE_SELF = 0x400
568 IN_DONT_FOLLOW = 0x2000000
569 IN_EXCL_UNLINK = 0x4000000
570 IN_IGNORED = 0x8000
571 IN_ISDIR = 0x40000000
572 IN_LOOPBACKNET = 0x7f
573 IN_MASK_ADD = 0x20000000
574 IN_MODIFY = 0x2
575 IN_MOVE = 0xc0
576 IN_MOVED_FROM = 0x40
577 IN_MOVED_TO = 0x80
578 IN_MOVE_SELF = 0x800
579 IN_NONBLOCK = 0x4000
580 IN_ONESHOT = 0x80000000
581 IN_ONLYDIR = 0x1000000
582 IN_OPEN = 0x20
583 IN_Q_OVERFLOW = 0x4000
584 IN_UNMOUNT = 0x2000
585 IPPROTO_AH = 0x33
586 IPPROTO_BEETPH = 0x5e
587 IPPROTO_COMP = 0x6c
588 IPPROTO_DCCP = 0x21
589 IPPROTO_DSTOPTS = 0x3c
590 IPPROTO_EGP = 0x8
591 IPPROTO_ENCAP = 0x62
592 IPPROTO_ESP = 0x32
593 IPPROTO_FRAGMENT = 0x2c
594 IPPROTO_GRE = 0x2f
595 IPPROTO_HOPOPTS = 0x0
596 IPPROTO_ICMP = 0x1
597 IPPROTO_ICMPV6 = 0x3a
598 IPPROTO_IDP = 0x16
599 IPPROTO_IGMP = 0x2
600 IPPROTO_IP = 0x0
601 IPPROTO_IPIP = 0x4
602 IPPROTO_IPV6 = 0x29
603 IPPROTO_MH = 0x87
604 IPPROTO_MPLS = 0x89
605 IPPROTO_MTP = 0x5c
606 IPPROTO_NONE = 0x3b
607 IPPROTO_PIM = 0x67
608 IPPROTO_PUP = 0xc
609 IPPROTO_RAW = 0xff
610 IPPROTO_ROUTING = 0x2b
611 IPPROTO_RSVP = 0x2e
612 IPPROTO_SCTP = 0x84
613 IPPROTO_TCP = 0x6
614 IPPROTO_TP = 0x1d
615 IPPROTO_UDP = 0x11
616 IPPROTO_UDPLITE = 0x88
617 IPV6_2292DSTOPTS = 0x4
618 IPV6_2292HOPLIMIT = 0x8
619 IPV6_2292HOPOPTS = 0x3
620 IPV6_2292PKTINFO = 0x2
621 IPV6_2292PKTOPTIONS = 0x6
622 IPV6_2292RTHDR = 0x5
623 IPV6_ADDRFORM = 0x1
624 IPV6_ADD_MEMBERSHIP = 0x14
625 IPV6_AUTHHDR = 0xa
626 IPV6_CHECKSUM = 0x7
627 IPV6_DONTFRAG = 0x3e
628 IPV6_DROP_MEMBERSHIP = 0x15
629 IPV6_DSTOPTS = 0x3b
630 IPV6_HDRINCL = 0x24
631 IPV6_HOPLIMIT = 0x34
632 IPV6_HOPOPTS = 0x36
633 IPV6_IPSEC_POLICY = 0x22
634 IPV6_JOIN_ANYCAST = 0x1b
635 IPV6_JOIN_GROUP = 0x14
636 IPV6_LEAVE_ANYCAST = 0x1c
637 IPV6_LEAVE_GROUP = 0x15
638 IPV6_MTU = 0x18
639 IPV6_MTU_DISCOVER = 0x17
640 IPV6_MULTICAST_HOPS = 0x12
641 IPV6_MULTICAST_IF = 0x11
642 IPV6_MULTICAST_LOOP = 0x13
643 IPV6_NEXTHOP = 0x9
644 IPV6_PATHMTU = 0x3d
645 IPV6_PKTINFO = 0x32
646 IPV6_PMTUDISC_DO = 0x2
647 IPV6_PMTUDISC_DONT = 0x0
648 IPV6_PMTUDISC_INTERFACE = 0x4
649 IPV6_PMTUDISC_OMIT = 0x5
650 IPV6_PMTUDISC_PROBE = 0x3
651 IPV6_PMTUDISC_WANT = 0x1
652 IPV6_RECVDSTOPTS = 0x3a
653 IPV6_RECVERR = 0x19
654 IPV6_RECVHOPLIMIT = 0x33
655 IPV6_RECVHOPOPTS = 0x35
656 IPV6_RECVPATHMTU = 0x3c
657 IPV6_RECVPKTINFO = 0x31
658 IPV6_RECVRTHDR = 0x38
659 IPV6_RECVTCLASS = 0x42
660 IPV6_ROUTER_ALERT = 0x16
661 IPV6_RTHDR = 0x39
662 IPV6_RTHDRDSTOPTS = 0x37
663 IPV6_RTHDR_LOOSE = 0x0
664 IPV6_RTHDR_STRICT = 0x1
665 IPV6_RTHDR_TYPE_0 = 0x0
666 IPV6_RXDSTOPTS = 0x3b
667 IPV6_RXHOPOPTS = 0x36
668 IPV6_TCLASS = 0x43
669 IPV6_UNICAST_HOPS = 0x10
670 IPV6_V6ONLY = 0x1a
671 IPV6_XFRM_POLICY = 0x23
672 IP_ADD_MEMBERSHIP = 0x23
673 IP_ADD_SOURCE_MEMBERSHIP = 0x27
674 IP_BIND_ADDRESS_NO_PORT = 0x18
675 IP_BLOCK_SOURCE = 0x26
676 IP_CHECKSUM = 0x17
677 IP_DEFAULT_MULTICAST_LOOP = 0x1
678 IP_DEFAULT_MULTICAST_TTL = 0x1
679 IP_DF = 0x4000
680 IP_DROP_MEMBERSHIP = 0x24
681 IP_DROP_SOURCE_MEMBERSHIP = 0x28
682 IP_FREEBIND = 0xf
683 IP_HDRINCL = 0x3
684 IP_IPSEC_POLICY = 0x10
685 IP_MAXPACKET = 0xffff
686 IP_MAX_MEMBERSHIPS = 0x14
687 IP_MF = 0x2000
688 IP_MINTTL = 0x15
689 IP_MSFILTER = 0x29
690 IP_MSS = 0x240
691 IP_MTU = 0xe
692 IP_MTU_DISCOVER = 0xa
693 IP_MULTICAST_ALL = 0x31
694 IP_MULTICAST_IF = 0x20
695 IP_MULTICAST_LOOP = 0x22
696 IP_MULTICAST_TTL = 0x21
697 IP_NODEFRAG = 0x16
698 IP_OFFMASK = 0x1fff
699 IP_OPTIONS = 0x4
700 IP_ORIGDSTADDR = 0x14
701 IP_PASSSEC = 0x12
702 IP_PKTINFO = 0x8
703 IP_PKTOPTIONS = 0x9
704 IP_PMTUDISC = 0xa
705 IP_PMTUDISC_DO = 0x2
706 IP_PMTUDISC_DONT = 0x0
707 IP_PMTUDISC_INTERFACE = 0x4
708 IP_PMTUDISC_OMIT = 0x5
709 IP_PMTUDISC_PROBE = 0x3
710 IP_PMTUDISC_WANT = 0x1
711 IP_RECVERR = 0xb
712 IP_RECVOPTS = 0x6
713 IP_RECVORIGDSTADDR = 0x14
714 IP_RECVRETOPTS = 0x7
715 IP_RECVTOS = 0xd
716 IP_RECVTTL = 0xc
717 IP_RETOPTS = 0x7
718 IP_RF = 0x8000
719 IP_ROUTER_ALERT = 0x5
720 IP_TOS = 0x1
721 IP_TRANSPARENT = 0x13
722 IP_TTL = 0x2
723 IP_UNBLOCK_SOURCE = 0x25
724 IP_UNICAST_IF = 0x32
725 IP_XFRM_POLICY = 0x11
726 ISIG = 0x1
727 ISTRIP = 0x20
728 IUCLC = 0x200
729 IUTF8 = 0x4000
730 IXANY = 0x800
731 IXOFF = 0x1000
732 IXON = 0x400
733 LINUX_REBOOT_CMD_CAD_OFF = 0x0
734 LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
735 LINUX_REBOOT_CMD_HALT = 0xcdef0123
736 LINUX_REBOOT_CMD_KEXEC = 0x45584543
737 LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
738 LINUX_REBOOT_CMD_RESTART = 0x1234567
739 LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
740 LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
741 LINUX_REBOOT_MAGIC1 = 0xfee1dead
742 LINUX_REBOOT_MAGIC2 = 0x28121969
743 LOCK_EX = 0x2
744 LOCK_NB = 0x4
745 LOCK_SH = 0x1
746 LOCK_UN = 0x8
747 MADV_DODUMP = 0x11
748 MADV_DOFORK = 0xb
749 MADV_DONTDUMP = 0x10
750 MADV_DONTFORK = 0xa
751 MADV_DONTNEED = 0x4
752 MADV_FREE = 0x8
753 MADV_HUGEPAGE = 0xe
754 MADV_HWPOISON = 0x64
755 MADV_MERGEABLE = 0xc
756 MADV_NOHUGEPAGE = 0xf
757 MADV_NORMAL = 0x0
758 MADV_RANDOM = 0x1
759 MADV_REMOVE = 0x9
760 MADV_SEQUENTIAL = 0x2
761 MADV_UNMERGEABLE = 0xd
762 MADV_WILLNEED = 0x3
763 MAP_ANON = 0x20
764 MAP_ANONYMOUS = 0x20
765 MAP_DENYWRITE = 0x800
766 MAP_EXECUTABLE = 0x1000
767 MAP_FILE = 0x0
768 MAP_FIXED = 0x10
769 MAP_GROWSDOWN = 0x200
770 MAP_HUGETLB = 0x40000
771 MAP_HUGE_MASK = 0x3f
772 MAP_HUGE_SHIFT = 0x1a
773 MAP_LOCKED = 0x100
774 MAP_NONBLOCK = 0x10000
775 MAP_NORESERVE = 0x40
776 MAP_POPULATE = 0x8000
777 MAP_PRIVATE = 0x2
778 MAP_RENAME = 0x20
779 MAP_SHARED = 0x1
780 MAP_STACK = 0x20000
781 MAP_TYPE = 0xf
782 MCL_CURRENT = 0x2000
783 MCL_FUTURE = 0x4000
784 MCL_ONFAULT = 0x8000
785 MNT_DETACH = 0x2
786 MNT_EXPIRE = 0x4
787 MNT_FORCE = 0x1
788 MSG_BATCH = 0x40000
789 MSG_CMSG_CLOEXEC = 0x40000000
790 MSG_CONFIRM = 0x800
791 MSG_CTRUNC = 0x8
792 MSG_DONTROUTE = 0x4
793 MSG_DONTWAIT = 0x40
794 MSG_EOR = 0x80
795 MSG_ERRQUEUE = 0x2000
796 MSG_FASTOPEN = 0x20000000
797 MSG_FIN = 0x200
798 MSG_MORE = 0x8000
799 MSG_NOSIGNAL = 0x4000
800 MSG_OOB = 0x1
801 MSG_PEEK = 0x2
802 MSG_PROXY = 0x10
803 MSG_RST = 0x1000
804 MSG_SYN = 0x400
805 MSG_TRUNC = 0x20
806 MSG_TRYHARD = 0x4
807 MSG_WAITALL = 0x100
808 MSG_WAITFORONE = 0x10000
809 MS_ACTIVE = 0x40000000
810 MS_ASYNC = 0x1
811 MS_BIND = 0x1000
812 MS_DIRSYNC = 0x80
813 MS_INVALIDATE = 0x2
814 MS_I_VERSION = 0x800000
815 MS_KERNMOUNT = 0x400000
816 MS_LAZYTIME = 0x2000000
817 MS_MANDLOCK = 0x40
818 MS_MGC_MSK = 0xffff0000
819 MS_MGC_VAL = 0xc0ed0000
820 MS_MOVE = 0x2000
821 MS_NOATIME = 0x400
822 MS_NODEV = 0x4
823 MS_NODIRATIME = 0x800
824 MS_NOEXEC = 0x8
825 MS_NOSUID = 0x2
826 MS_NOUSER = -0x80000000
827 MS_POSIXACL = 0x10000
828 MS_PRIVATE = 0x40000
829 MS_RDONLY = 0x1
830 MS_REC = 0x4000
831 MS_RELATIME = 0x200000
832 MS_REMOUNT = 0x20
833 MS_RMT_MASK = 0x2800051
834 MS_SHARED = 0x100000
835 MS_SILENT = 0x8000
836 MS_SLAVE = 0x80000
837 MS_STRICTATIME = 0x1000000
838 MS_SYNC = 0x4
839 MS_SYNCHRONOUS = 0x10
840 MS_UNBINDABLE = 0x20000
841 NAME_MAX = 0xff
842 NETLINK_ADD_MEMBERSHIP = 0x1
843 NETLINK_AUDIT = 0x9
844 NETLINK_BROADCAST_ERROR = 0x4
845 NETLINK_CAP_ACK = 0xa
846 NETLINK_CONNECTOR = 0xb
847 NETLINK_CRYPTO = 0x15
848 NETLINK_DNRTMSG = 0xe
849 NETLINK_DROP_MEMBERSHIP = 0x2
850 NETLINK_ECRYPTFS = 0x13
851 NETLINK_FIB_LOOKUP = 0xa
852 NETLINK_FIREWALL = 0x3
853 NETLINK_GENERIC = 0x10
854 NETLINK_INET_DIAG = 0x4
855 NETLINK_IP6_FW = 0xd
856 NETLINK_ISCSI = 0x8
857 NETLINK_KOBJECT_UEVENT = 0xf
858 NETLINK_LISTEN_ALL_NSID = 0x8
859 NETLINK_LIST_MEMBERSHIPS = 0x9
860 NETLINK_NETFILTER = 0xc
861 NETLINK_NFLOG = 0x5
862 NETLINK_NO_ENOBUFS = 0x5
863 NETLINK_PKTINFO = 0x3
864 NETLINK_RDMA = 0x14
865 NETLINK_ROUTE = 0x0
866 NETLINK_RX_RING = 0x6
867 NETLINK_SCSITRANSPORT = 0x12
868 NETLINK_SELINUX = 0x7
869 NETLINK_SOCK_DIAG = 0x4
870 NETLINK_TX_RING = 0x7
871 NETLINK_UNUSED = 0x1
872 NETLINK_USERSOCK = 0x2
873 NETLINK_XFRM = 0x6
874 NL0 = 0x0
875 NL1 = 0x100
876 NLA_ALIGNTO = 0x4
877 NLA_F_NESTED = 0x8000
878 NLA_F_NET_BYTEORDER = 0x4000
879 NLA_HDRLEN = 0x4
880 NLDLY = 0x100
881 NLMSG_ALIGNTO = 0x4
882 NLMSG_DONE = 0x3
883 NLMSG_ERROR = 0x2
884 NLMSG_HDRLEN = 0x10
885 NLMSG_MIN_TYPE = 0x10
886 NLMSG_NOOP = 0x1
887 NLMSG_OVERRUN = 0x4
888 NLM_F_ACK = 0x4
889 NLM_F_APPEND = 0x800
890 NLM_F_ATOMIC = 0x400
891 NLM_F_CREATE = 0x400
892 NLM_F_DUMP = 0x300
893 NLM_F_DUMP_FILTERED = 0x20
894 NLM_F_DUMP_INTR = 0x10
895 NLM_F_ECHO = 0x8
896 NLM_F_EXCL = 0x200
897 NLM_F_MATCH = 0x200
898 NLM_F_MULTI = 0x2
899 NLM_F_REPLACE = 0x100
900 NLM_F_REQUEST = 0x1
901 NLM_F_ROOT = 0x100
902 NOFLSH = 0x80
903 OCRNL = 0x8
904 OFDEL = 0x80
905 OFILL = 0x40
906 OLCUC = 0x2
907 ONLCR = 0x4
908 ONLRET = 0x20
909 ONOCR = 0x10
910 OPOST = 0x1
911 O_ACCMODE = 0x3
912 O_APPEND = 0x8
913 O_ASYNC = 0x40
914 O_CLOEXEC = 0x400000
915 O_CREAT = 0x200
916 O_DIRECT = 0x100000
917 O_DIRECTORY = 0x10000
918 O_DSYNC = 0x2000
919 O_EXCL = 0x800
920 O_FSYNC = 0x802000
921 O_LARGEFILE = 0x0
922 O_NDELAY = 0x4004
923 O_NOATIME = 0x200000
924 O_NOCTTY = 0x8000
925 O_NOFOLLOW = 0x20000
926 O_NONBLOCK = 0x4000
927 O_PATH = 0x1000000
928 O_RDONLY = 0x0
929 O_RDWR = 0x2
930 O_RSYNC = 0x802000
931 O_SYNC = 0x802000
932 O_TMPFILE = 0x2010000
933 O_TRUNC = 0x400
934 O_WRONLY = 0x1
935 PACKET_ADD_MEMBERSHIP = 0x1
936 PACKET_AUXDATA = 0x8
937 PACKET_BROADCAST = 0x1
938 PACKET_COPY_THRESH = 0x7
939 PACKET_DROP_MEMBERSHIP = 0x2
940 PACKET_FANOUT = 0x12
941 PACKET_FANOUT_CBPF = 0x6
942 PACKET_FANOUT_CPU = 0x2
943 PACKET_FANOUT_DATA = 0x16
944 PACKET_FANOUT_EBPF = 0x7
945 PACKET_FANOUT_FLAG_DEFRAG = 0x8000
946 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
947 PACKET_FANOUT_HASH = 0x0
948 PACKET_FANOUT_LB = 0x1
949 PACKET_FANOUT_QM = 0x5
950 PACKET_FANOUT_RND = 0x4
951 PACKET_FANOUT_ROLLOVER = 0x3
952 PACKET_FASTROUTE = 0x6
953 PACKET_HDRLEN = 0xb
954 PACKET_HOST = 0x0
955 PACKET_KERNEL = 0x7
956 PACKET_LOOPBACK = 0x5
957 PACKET_LOSS = 0xe
958 PACKET_MR_ALLMULTI = 0x2
959 PACKET_MR_MULTICAST = 0x0
960 PACKET_MR_PROMISC = 0x1
961 PACKET_MR_UNICAST = 0x3
962 PACKET_MULTICAST = 0x2
963 PACKET_ORIGDEV = 0x9
964 PACKET_OTHERHOST = 0x3
965 PACKET_OUTGOING = 0x4
966 PACKET_QDISC_BYPASS = 0x14
967 PACKET_RECV_OUTPUT = 0x3
968 PACKET_RESERVE = 0xc
969 PACKET_ROLLOVER_STATS = 0x15
970 PACKET_RX_RING = 0x5
971 PACKET_STATISTICS = 0x6
972 PACKET_TIMESTAMP = 0x11
973 PACKET_TX_HAS_OFF = 0x13
974 PACKET_TX_RING = 0xd
975 PACKET_TX_TIMESTAMP = 0x10
976 PACKET_USER = 0x6
977 PACKET_VERSION = 0xa
978 PACKET_VNET_HDR = 0xf
979 PARENB = 0x100
980 PARITY_CRC16_PR0 = 0x2
981 PARITY_CRC16_PR0_CCITT = 0x4
982 PARITY_CRC16_PR1 = 0x3
983 PARITY_CRC16_PR1_CCITT = 0x5
984 PARITY_CRC32_PR0_CCITT = 0x6
985 PARITY_CRC32_PR1_CCITT = 0x7
986 PARITY_DEFAULT = 0x0
987 PARITY_NONE = 0x1
988 PARMRK = 0x8
989 PARODD = 0x200
990 PENDIN = 0x4000
991 PRIO_PGRP = 0x1
992 PRIO_PROCESS = 0x0
993 PRIO_USER = 0x2
994 PROT_EXEC = 0x4
995 PROT_GROWSDOWN = 0x1000000
996 PROT_GROWSUP = 0x2000000
997 PROT_NONE = 0x0
998 PROT_READ = 0x1
999 PROT_WRITE = 0x2
1000 PR_CAPBSET_DROP = 0x18
1001 PR_CAPBSET_READ = 0x17
1002 PR_CAP_AMBIENT = 0x2f
1003 PR_CAP_AMBIENT_CLEAR_ALL = 0x4
1004 PR_CAP_AMBIENT_IS_SET = 0x1
1005 PR_CAP_AMBIENT_LOWER = 0x3
1006 PR_CAP_AMBIENT_RAISE = 0x2
1007 PR_ENDIAN_BIG = 0x0
1008 PR_ENDIAN_LITTLE = 0x1
1009 PR_ENDIAN_PPC_LITTLE = 0x2
1010 PR_FPEMU_NOPRINT = 0x1
1011 PR_FPEMU_SIGFPE = 0x2
1012 PR_FP_EXC_ASYNC = 0x2
1013 PR_FP_EXC_DISABLED = 0x0
1014 PR_FP_EXC_DIV = 0x10000
1015 PR_FP_EXC_INV = 0x100000
1016 PR_FP_EXC_NONRECOV = 0x1
1017 PR_FP_EXC_OVF = 0x20000
1018 PR_FP_EXC_PRECISE = 0x3
1019 PR_FP_EXC_RES = 0x80000
1020 PR_FP_EXC_SW_ENABLE = 0x80
1021 PR_FP_EXC_UND = 0x40000
1022 PR_FP_MODE_FR = 0x1
1023 PR_FP_MODE_FRE = 0x2
1024 PR_GET_CHILD_SUBREAPER = 0x25
1025 PR_GET_DUMPABLE = 0x3
1026 PR_GET_ENDIAN = 0x13
1027 PR_GET_FPEMU = 0x9
1028 PR_GET_FPEXC = 0xb
1029 PR_GET_FP_MODE = 0x2e
1030 PR_GET_KEEPCAPS = 0x7
1031 PR_GET_NAME = 0x10
1032 PR_GET_NO_NEW_PRIVS = 0x27
1033 PR_GET_PDEATHSIG = 0x2
1034 PR_GET_SECCOMP = 0x15
1035 PR_GET_SECUREBITS = 0x1b
1036 PR_GET_THP_DISABLE = 0x2a
1037 PR_GET_TID_ADDRESS = 0x28
1038 PR_GET_TIMERSLACK = 0x1e
1039 PR_GET_TIMING = 0xd
1040 PR_GET_TSC = 0x19
1041 PR_GET_UNALIGN = 0x5
1042 PR_MCE_KILL = 0x21
1043 PR_MCE_KILL_CLEAR = 0x0
1044 PR_MCE_KILL_DEFAULT = 0x2
1045 PR_MCE_KILL_EARLY = 0x1
1046 PR_MCE_KILL_GET = 0x22
1047 PR_MCE_KILL_LATE = 0x0
1048 PR_MCE_KILL_SET = 0x1
1049 PR_MPX_DISABLE_MANAGEMENT = 0x2c
1050 PR_MPX_ENABLE_MANAGEMENT = 0x2b
1051 PR_SET_CHILD_SUBREAPER = 0x24
1052 PR_SET_DUMPABLE = 0x4
1053 PR_SET_ENDIAN = 0x14
1054 PR_SET_FPEMU = 0xa
1055 PR_SET_FPEXC = 0xc
1056 PR_SET_FP_MODE = 0x2d
1057 PR_SET_KEEPCAPS = 0x8
1058 PR_SET_MM = 0x23
1059 PR_SET_MM_ARG_END = 0x9
1060 PR_SET_MM_ARG_START = 0x8
1061 PR_SET_MM_AUXV = 0xc
1062 PR_SET_MM_BRK = 0x7
1063 PR_SET_MM_END_CODE = 0x2
1064 PR_SET_MM_END_DATA = 0x4
1065 PR_SET_MM_ENV_END = 0xb
1066 PR_SET_MM_ENV_START = 0xa
1067 PR_SET_MM_EXE_FILE = 0xd
1068 PR_SET_MM_MAP = 0xe
1069 PR_SET_MM_MAP_SIZE = 0xf
1070 PR_SET_MM_START_BRK = 0x6
1071 PR_SET_MM_START_CODE = 0x1
1072 PR_SET_MM_START_DATA = 0x3
1073 PR_SET_MM_START_STACK = 0x5
1074 PR_SET_NAME = 0xf
1075 PR_SET_NO_NEW_PRIVS = 0x26
1076 PR_SET_PDEATHSIG = 0x1
1077 PR_SET_PTRACER = 0x59616d61
1078 PR_SET_PTRACER_ANY = -0x1
1079 PR_SET_SECCOMP = 0x16
1080 PR_SET_SECUREBITS = 0x1c
1081 PR_SET_THP_DISABLE = 0x29
1082 PR_SET_TIMERSLACK = 0x1d
1083 PR_SET_TIMING = 0xe
1084 PR_SET_TSC = 0x1a
1085 PR_SET_UNALIGN = 0x6
1086 PR_TASK_PERF_EVENTS_DISABLE = 0x1f
1087 PR_TASK_PERF_EVENTS_ENABLE = 0x20
1088 PR_TIMING_STATISTICAL = 0x0
1089 PR_TIMING_TIMESTAMP = 0x1
1090 PR_TSC_ENABLE = 0x1
1091 PR_TSC_SIGSEGV = 0x2
1092 PR_UNALIGN_NOPRINT = 0x1
1093 PR_UNALIGN_SIGBUS = 0x2
1094 PTRACE_ATTACH = 0x10
1095 PTRACE_CONT = 0x7
1096 PTRACE_DETACH = 0x11
1097 PTRACE_EVENT_CLONE = 0x3
1098 PTRACE_EVENT_EXEC = 0x4
1099 PTRACE_EVENT_EXIT = 0x6
1100 PTRACE_EVENT_FORK = 0x1
1101 PTRACE_EVENT_SECCOMP = 0x7
1102 PTRACE_EVENT_STOP = 0x80
1103 PTRACE_EVENT_VFORK = 0x2
1104 PTRACE_EVENT_VFORK_DONE = 0x5
1105 PTRACE_GETEVENTMSG = 0x4201
1106 PTRACE_GETFPAREGS = 0x14
1107 PTRACE_GETFPREGS = 0xe
1108 PTRACE_GETFPREGS64 = 0x19
1109 PTRACE_GETREGS = 0xc
1110 PTRACE_GETREGS64 = 0x16
1111 PTRACE_GETREGSET = 0x4204
1112 PTRACE_GETSIGINFO = 0x4202
1113 PTRACE_GETSIGMASK = 0x420a
1114 PTRACE_INTERRUPT = 0x4207
1115 PTRACE_KILL = 0x8
1116 PTRACE_LISTEN = 0x4208
1117 PTRACE_O_EXITKILL = 0x100000
1118 PTRACE_O_MASK = 0x3000ff
1119 PTRACE_O_SUSPEND_SECCOMP = 0x200000
1120 PTRACE_O_TRACECLONE = 0x8
1121 PTRACE_O_TRACEEXEC = 0x10
1122 PTRACE_O_TRACEEXIT = 0x40
1123 PTRACE_O_TRACEFORK = 0x2
1124 PTRACE_O_TRACESECCOMP = 0x80
1125 PTRACE_O_TRACESYSGOOD = 0x1
1126 PTRACE_O_TRACEVFORK = 0x4
1127 PTRACE_O_TRACEVFORKDONE = 0x20
1128 PTRACE_PEEKDATA = 0x2
1129 PTRACE_PEEKSIGINFO = 0x4209
1130 PTRACE_PEEKSIGINFO_SHARED = 0x1
1131 PTRACE_PEEKTEXT = 0x1
1132 PTRACE_PEEKUSR = 0x3
1133 PTRACE_POKEDATA = 0x5
1134 PTRACE_POKETEXT = 0x4
1135 PTRACE_POKEUSR = 0x6
1136 PTRACE_READDATA = 0x10
1137 PTRACE_READTEXT = 0x12
1138 PTRACE_SECCOMP_GET_FILTER = 0x420c
1139 PTRACE_SEIZE = 0x4206
1140 PTRACE_SETFPAREGS = 0x15
1141 PTRACE_SETFPREGS = 0xf
1142 PTRACE_SETFPREGS64 = 0x1a
1143 PTRACE_SETOPTIONS = 0x4200
1144 PTRACE_SETREGS = 0xd
1145 PTRACE_SETREGS64 = 0x17
1146 PTRACE_SETREGSET = 0x4205
1147 PTRACE_SETSIGINFO = 0x4203
1148 PTRACE_SETSIGMASK = 0x420b
1149 PTRACE_SINGLESTEP = 0x9
1150 PTRACE_SPARC_DETACH = 0xb
1151 PTRACE_SYSCALL = 0x18
1152 PTRACE_TRACEME = 0x0
1153 PTRACE_WRITEDATA = 0x11
1154 PTRACE_WRITETEXT = 0x13
1155 PT_FP = 0x48
1156 PT_G0 = 0x10
1157 PT_G1 = 0x14
1158 PT_G2 = 0x18
1159 PT_G3 = 0x1c
1160 PT_G4 = 0x20
1161 PT_G5 = 0x24
1162 PT_G6 = 0x28
1163 PT_G7 = 0x2c
1164 PT_I0 = 0x30
1165 PT_I1 = 0x34
1166 PT_I2 = 0x38
1167 PT_I3 = 0x3c
1168 PT_I4 = 0x40
1169 PT_I5 = 0x44
1170 PT_I6 = 0x48
1171 PT_I7 = 0x4c
1172 PT_NPC = 0x8
1173 PT_PC = 0x4
1174 PT_PSR = 0x0
1175 PT_REGS_MAGIC = 0x57ac6c00
1176 PT_TNPC = 0x90
1177 PT_TPC = 0x88
1178 PT_TSTATE = 0x80
1179 PT_V9_FP = 0x70
1180 PT_V9_G0 = 0x0
1181 PT_V9_G1 = 0x8
1182 PT_V9_G2 = 0x10
1183 PT_V9_G3 = 0x18
1184 PT_V9_G4 = 0x20
1185 PT_V9_G5 = 0x28
1186 PT_V9_G6 = 0x30
1187 PT_V9_G7 = 0x38
1188 PT_V9_I0 = 0x40
1189 PT_V9_I1 = 0x48
1190 PT_V9_I2 = 0x50
1191 PT_V9_I3 = 0x58
1192 PT_V9_I4 = 0x60
1193 PT_V9_I5 = 0x68
1194 PT_V9_I6 = 0x70
1195 PT_V9_I7 = 0x78
1196 PT_V9_MAGIC = 0x9c
1197 PT_V9_TNPC = 0x90
1198 PT_V9_TPC = 0x88
1199 PT_V9_TSTATE = 0x80
1200 PT_V9_Y = 0x98
1201 PT_WIM = 0x10
1202 PT_Y = 0xc
1203 RLIMIT_AS = 0x9
1204 RLIMIT_CORE = 0x4
1205 RLIMIT_CPU = 0x0
1206 RLIMIT_DATA = 0x2
1207 RLIMIT_FSIZE = 0x1
1208 RLIMIT_NOFILE = 0x6
1209 RLIMIT_STACK = 0x3
1210 RLIM_INFINITY = -0x1
1211 RTAX_ADVMSS = 0x8
1212 RTAX_CC_ALGO = 0x10
1213 RTAX_CWND = 0x7
1214 RTAX_FEATURES = 0xc
1215 RTAX_FEATURE_ALLFRAG = 0x8
1216 RTAX_FEATURE_ECN = 0x1
1217 RTAX_FEATURE_MASK = 0xf
1218 RTAX_FEATURE_SACK = 0x2
1219 RTAX_FEATURE_TIMESTAMP = 0x4
1220 RTAX_HOPLIMIT = 0xa
1221 RTAX_INITCWND = 0xb
1222 RTAX_INITRWND = 0xe
1223 RTAX_LOCK = 0x1
1224 RTAX_MAX = 0x10
1225 RTAX_MTU = 0x2
1226 RTAX_QUICKACK = 0xf
1227 RTAX_REORDERING = 0x9
1228 RTAX_RTO_MIN = 0xd
1229 RTAX_RTT = 0x4
1230 RTAX_RTTVAR = 0x5
1231 RTAX_SSTHRESH = 0x6
1232 RTAX_UNSPEC = 0x0
1233 RTAX_WINDOW = 0x3
1234 RTA_ALIGNTO = 0x4
1235 RTA_MAX = 0x18
1236 RTCF_DIRECTSRC = 0x4000000
1237 RTCF_DOREDIRECT = 0x1000000
1238 RTCF_LOG = 0x2000000
1239 RTCF_MASQ = 0x400000
1240 RTCF_NAT = 0x800000
1241 RTCF_VALVE = 0x200000
1242 RTF_ADDRCLASSMASK = 0xf8000000
1243 RTF_ADDRCONF = 0x40000
1244 RTF_ALLONLINK = 0x20000
1245 RTF_BROADCAST = 0x10000000
1246 RTF_CACHE = 0x1000000
1247 RTF_DEFAULT = 0x10000
1248 RTF_DYNAMIC = 0x10
1249 RTF_FLOW = 0x2000000
1250 RTF_GATEWAY = 0x2
1251 RTF_HOST = 0x4
1252 RTF_INTERFACE = 0x40000000
1253 RTF_IRTT = 0x100
1254 RTF_LINKRT = 0x100000
1255 RTF_LOCAL = 0x80000000
1256 RTF_MODIFIED = 0x20
1257 RTF_MSS = 0x40
1258 RTF_MTU = 0x40
1259 RTF_MULTICAST = 0x20000000
1260 RTF_NAT = 0x8000000
1261 RTF_NOFORWARD = 0x1000
1262 RTF_NONEXTHOP = 0x200000
1263 RTF_NOPMTUDISC = 0x4000
1264 RTF_POLICY = 0x4000000
1265 RTF_REINSTATE = 0x8
1266 RTF_REJECT = 0x200
1267 RTF_STATIC = 0x400
1268 RTF_THROW = 0x2000
1269 RTF_UP = 0x1
1270 RTF_WINDOW = 0x80
1271 RTF_XRESOLVE = 0x800
1272 RTM_BASE = 0x10
1273 RTM_DELACTION = 0x31
1274 RTM_DELADDR = 0x15
1275 RTM_DELADDRLABEL = 0x49
1276 RTM_DELLINK = 0x11
1277 RTM_DELMDB = 0x55
1278 RTM_DELNEIGH = 0x1d
1279 RTM_DELNSID = 0x59
1280 RTM_DELQDISC = 0x25
1281 RTM_DELROUTE = 0x19
1282 RTM_DELRULE = 0x21
1283 RTM_DELTCLASS = 0x29
1284 RTM_DELTFILTER = 0x2d
1285 RTM_F_CLONED = 0x200
1286 RTM_F_EQUALIZE = 0x400
1287 RTM_F_LOOKUP_TABLE = 0x1000
1288 RTM_F_NOTIFY = 0x100
1289 RTM_F_PREFIX = 0x800
1290 RTM_GETACTION = 0x32
1291 RTM_GETADDR = 0x16
1292 RTM_GETADDRLABEL = 0x4a
1293 RTM_GETANYCAST = 0x3e
1294 RTM_GETDCB = 0x4e
1295 RTM_GETLINK = 0x12
1296 RTM_GETMDB = 0x56
1297 RTM_GETMULTICAST = 0x3a
1298 RTM_GETNEIGH = 0x1e
1299 RTM_GETNEIGHTBL = 0x42
1300 RTM_GETNETCONF = 0x52
1301 RTM_GETNSID = 0x5a
1302 RTM_GETQDISC = 0x26
1303 RTM_GETROUTE = 0x1a
1304 RTM_GETRULE = 0x22
1305 RTM_GETSTATS = 0x5e
1306 RTM_GETTCLASS = 0x2a
1307 RTM_GETTFILTER = 0x2e
1308 RTM_MAX = 0x5f
1309 RTM_NEWACTION = 0x30
1310 RTM_NEWADDR = 0x14
1311 RTM_NEWADDRLABEL = 0x48
1312 RTM_NEWLINK = 0x10
1313 RTM_NEWMDB = 0x54
1314 RTM_NEWNDUSEROPT = 0x44
1315 RTM_NEWNEIGH = 0x1c
1316 RTM_NEWNEIGHTBL = 0x40
1317 RTM_NEWNETCONF = 0x50
1318 RTM_NEWNSID = 0x58
1319 RTM_NEWPREFIX = 0x34
1320 RTM_NEWQDISC = 0x24
1321 RTM_NEWROUTE = 0x18
1322 RTM_NEWRULE = 0x20
1323 RTM_NEWSTATS = 0x5c
1324 RTM_NEWTCLASS = 0x28
1325 RTM_NEWTFILTER = 0x2c
1326 RTM_NR_FAMILIES = 0x14
1327 RTM_NR_MSGTYPES = 0x50
1328 RTM_SETDCB = 0x4f
1329 RTM_SETLINK = 0x13
1330 RTM_SETNEIGHTBL = 0x43
1331 RTNH_ALIGNTO = 0x4
1332 RTNH_COMPARE_MASK = 0x11
1333 RTNH_F_DEAD = 0x1
1334 RTNH_F_LINKDOWN = 0x10
1335 RTNH_F_OFFLOAD = 0x8
1336 RTNH_F_ONLINK = 0x4
1337 RTNH_F_PERVASIVE = 0x2
1338 RTN_MAX = 0xb
1339 RTPROT_BABEL = 0x2a
1340 RTPROT_BIRD = 0xc
1341 RTPROT_BOOT = 0x3
1342 RTPROT_DHCP = 0x10
1343 RTPROT_DNROUTED = 0xd
1344 RTPROT_GATED = 0x8
1345 RTPROT_KERNEL = 0x2
1346 RTPROT_MROUTED = 0x11
1347 RTPROT_MRT = 0xa
1348 RTPROT_NTK = 0xf
1349 RTPROT_RA = 0x9
1350 RTPROT_REDIRECT = 0x1
1351 RTPROT_STATIC = 0x4
1352 RTPROT_UNSPEC = 0x0
1353 RTPROT_XORP = 0xe
1354 RTPROT_ZEBRA = 0xb
1355 RT_CLASS_DEFAULT = 0xfd
1356 RT_CLASS_LOCAL = 0xff
1357 RT_CLASS_MAIN = 0xfe
1358 RT_CLASS_MAX = 0xff
1359 RT_CLASS_UNSPEC = 0x0
1360 RUSAGE_CHILDREN = -0x1
1361 RUSAGE_SELF = 0x0
1362 RUSAGE_THREAD = 0x1
1363 SCM_CREDENTIALS = 0x2
1364 SCM_RIGHTS = 0x1
1365 SCM_TIMESTAMP = 0x1d
1366 SCM_TIMESTAMPING = 0x23
1367 SCM_TIMESTAMPNS = 0x21
1368 SCM_WIFI_STATUS = 0x25
1369 SHUT_RD = 0x0
1370 SHUT_RDWR = 0x2
1371 SHUT_WR = 0x1
1372 SIOCADDDLCI = 0x8980
1373 SIOCADDMULTI = 0x8931
1374 SIOCADDRT = 0x890b
1375 SIOCATMARK = 0x8905
1376 SIOCBONDCHANGEACTIVE = 0x8995
1377 SIOCBONDENSLAVE = 0x8990
1378 SIOCBONDINFOQUERY = 0x8994
1379 SIOCBONDRELEASE = 0x8991
1380 SIOCBONDSETHWADDR = 0x8992
1381 SIOCBONDSLAVEINFOQUERY = 0x8993
1382 SIOCBRADDBR = 0x89a0
1383 SIOCBRADDIF = 0x89a2
1384 SIOCBRDELBR = 0x89a1
1385 SIOCBRDELIF = 0x89a3
1386 SIOCDARP = 0x8953
1387 SIOCDELDLCI = 0x8981
1388 SIOCDELMULTI = 0x8932
1389 SIOCDELRT = 0x890c
1390 SIOCDEVPRIVATE = 0x89f0
1391 SIOCDIFADDR = 0x8936
1392 SIOCDRARP = 0x8960
1393 SIOCETHTOOL = 0x8946
1394 SIOCGARP = 0x8954
1395 SIOCGHWTSTAMP = 0x89b1
1396 SIOCGIFADDR = 0x8915
1397 SIOCGIFBR = 0x8940
1398 SIOCGIFBRDADDR = 0x8919
1399 SIOCGIFCONF = 0x8912
1400 SIOCGIFCOUNT = 0x8938
1401 SIOCGIFDSTADDR = 0x8917
1402 SIOCGIFENCAP = 0x8925
1403 SIOCGIFFLAGS = 0x8913
1404 SIOCGIFHWADDR = 0x8927
1405 SIOCGIFINDEX = 0x8933
1406 SIOCGIFMAP = 0x8970
1407 SIOCGIFMEM = 0x891f
1408 SIOCGIFMETRIC = 0x891d
1409 SIOCGIFMTU = 0x8921
1410 SIOCGIFNAME = 0x8910
1411 SIOCGIFNETMASK = 0x891b
1412 SIOCGIFPFLAGS = 0x8935
1413 SIOCGIFSLAVE = 0x8929
1414 SIOCGIFTXQLEN = 0x8942
1415 SIOCGIFVLAN = 0x8982
1416 SIOCGMIIPHY = 0x8947
1417 SIOCGMIIREG = 0x8948
1418 SIOCGPGRP = 0x8904
1419 SIOCGRARP = 0x8961
1420 SIOCGSTAMP = 0x8906
1421 SIOCGSTAMPNS = 0x8907
1422 SIOCINQ = 0x4004667f
1423 SIOCOUTQ = 0x40047473
1424 SIOCOUTQNSD = 0x894b
1425 SIOCPROTOPRIVATE = 0x89e0
1426 SIOCRTMSG = 0x890d
1427 SIOCSARP = 0x8955
1428 SIOCSHWTSTAMP = 0x89b0
1429 SIOCSIFADDR = 0x8916
1430 SIOCSIFBR = 0x8941
1431 SIOCSIFBRDADDR = 0x891a
1432 SIOCSIFDSTADDR = 0x8918
1433 SIOCSIFENCAP = 0x8926
1434 SIOCSIFFLAGS = 0x8914
1435 SIOCSIFHWADDR = 0x8924
1436 SIOCSIFHWBROADCAST = 0x8937
1437 SIOCSIFLINK = 0x8911
1438 SIOCSIFMAP = 0x8971
1439 SIOCSIFMEM = 0x8920
1440 SIOCSIFMETRIC = 0x891e
1441 SIOCSIFMTU = 0x8922
1442 SIOCSIFNAME = 0x8923
1443 SIOCSIFNETMASK = 0x891c
1444 SIOCSIFPFLAGS = 0x8934
1445 SIOCSIFSLAVE = 0x8930
1446 SIOCSIFTXQLEN = 0x8943
1447 SIOCSIFVLAN = 0x8983
1448 SIOCSMIIREG = 0x8949
1449 SIOCSPGRP = 0x8902
1450 SIOCSRARP = 0x8962
1451 SIOCWANDEV = 0x894a
1452 SOCK_CLOEXEC = 0x400000
1453 SOCK_DCCP = 0x6
1454 SOCK_DGRAM = 0x2
1455 SOCK_NONBLOCK = 0x4000
1456 SOCK_PACKET = 0xa
1457 SOCK_RAW = 0x3
1458 SOCK_RDM = 0x4
1459 SOCK_SEQPACKET = 0x5
1460 SOCK_STREAM = 0x1
1461 SOL_AAL = 0x109
1462 SOL_ALG = 0x117
1463 SOL_ATM = 0x108
1464 SOL_CAIF = 0x116
1465 SOL_DCCP = 0x10d
1466 SOL_DECNET = 0x105
1467 SOL_ICMPV6 = 0x3a
1468 SOL_IP = 0x0
1469 SOL_IPV6 = 0x29
1470 SOL_IRDA = 0x10a
1471 SOL_IUCV = 0x115
1472 SOL_KCM = 0x119
1473 SOL_LLC = 0x10c
1474 SOL_NETBEUI = 0x10b
1475 SOL_NETLINK = 0x10e
1476 SOL_NFC = 0x118
1477 SOL_PACKET = 0x107
1478 SOL_PNPIPE = 0x113
1479 SOL_PPPOL2TP = 0x111
1480 SOL_RAW = 0xff
1481 SOL_RDS = 0x114
1482 SOL_RXRPC = 0x110
1483 SOL_SOCKET = 0xffff
1484 SOL_TCP = 0x6
1485 SOL_TIPC = 0x10f
1486 SOL_X25 = 0x106
1487 SOMAXCONN = 0x80
1488 SO_ACCEPTCONN = 0x8000
1489 SO_ATTACH_BPF = 0x34
1490 SO_ATTACH_FILTER = 0x1a
1491 SO_ATTACH_REUSEPORT_CBPF = 0x35
1492 SO_ATTACH_REUSEPORT_EBPF = 0x36
1493 SO_BINDTODEVICE = 0xd
1494 SO_BPF_EXTENSIONS = 0x32
1495 SO_BROADCAST = 0x20
1496 SO_BSDCOMPAT = 0x400
1497 SO_BUSY_POLL = 0x30
1498 SO_CNX_ADVICE = 0x37
1499 SO_DEBUG = 0x1
1500 SO_DETACH_BPF = 0x1b
1501 SO_DETACH_FILTER = 0x1b
1502 SO_DOMAIN = 0x1029
1503 SO_DONTROUTE = 0x10
1504 SO_ERROR = 0x1007
1505 SO_GET_FILTER = 0x1a
1506 SO_INCOMING_CPU = 0x33
1507 SO_KEEPALIVE = 0x8
1508 SO_LINGER = 0x80
1509 SO_LOCK_FILTER = 0x28
1510 SO_MARK = 0x22
1511 SO_MAX_PACING_RATE = 0x31
1512 SO_NOFCS = 0x27
1513 SO_NO_CHECK = 0xb
1514 SO_OOBINLINE = 0x100
1515 SO_PASSCRED = 0x2
1516 SO_PASSSEC = 0x1f
1517 SO_PEEK_OFF = 0x26
1518 SO_PEERCRED = 0x40
1519 SO_PEERNAME = 0x1c
1520 SO_PEERSEC = 0x1e
1521 SO_PRIORITY = 0xc
1522 SO_PROTOCOL = 0x1028
1523 SO_RCVBUF = 0x1002
1524 SO_RCVBUFFORCE = 0x100b
1525 SO_RCVLOWAT = 0x800
1526 SO_RCVTIMEO = 0x2000
1527 SO_REUSEADDR = 0x4
1528 SO_REUSEPORT = 0x200
1529 SO_RXQ_OVFL = 0x24
1530 SO_SECURITY_AUTHENTICATION = 0x5001
1531 SO_SECURITY_ENCRYPTION_NETWORK = 0x5004
1532 SO_SECURITY_ENCRYPTION_TRANSPORT = 0x5002
1533 SO_SELECT_ERR_QUEUE = 0x29
1534 SO_SNDBUF = 0x1001
1535 SO_SNDBUFFORCE = 0x100a
1536 SO_SNDLOWAT = 0x1000
1537 SO_SNDTIMEO = 0x4000
1538 SO_TIMESTAMP = 0x1d
1539 SO_TIMESTAMPING = 0x23
1540 SO_TIMESTAMPNS = 0x21
1541 SO_TYPE = 0x1008
1542 SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
1543 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
1544 SO_VM_SOCKETS_BUFFER_SIZE = 0x0
1545 SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
1546 SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
1547 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
1548 SO_VM_SOCKETS_TRUSTED = 0x5
1549 SO_WIFI_STATUS = 0x25
1550 SPLICE_F_GIFT = 0x8
1551 SPLICE_F_MORE = 0x4
1552 SPLICE_F_MOVE = 0x1
1553 SPLICE_F_NONBLOCK = 0x2
1554 S_BLKSIZE = 0x200
1555 S_IEXEC = 0x40
1556 S_IFBLK = 0x6000
1557 S_IFCHR = 0x2000
1558 S_IFDIR = 0x4000
1559 S_IFIFO = 0x1000
1560 S_IFLNK = 0xa000
1561 S_IFMT = 0xf000
1562 S_IFREG = 0x8000
1563 S_IFSOCK = 0xc000
1564 S_IREAD = 0x100
1565 S_IRGRP = 0x20
1566 S_IROTH = 0x4
1567 S_IRUSR = 0x100
1568 S_IRWXG = 0x38
1569 S_IRWXO = 0x7
1570 S_IRWXU = 0x1c0
1571 S_ISGID = 0x400
1572 S_ISUID = 0x800
1573 S_ISVTX = 0x200
1574 S_IWGRP = 0x10
1575 S_IWOTH = 0x2
1576 S_IWRITE = 0x80
1577 S_IWUSR = 0x80
1578 S_IXGRP = 0x8
1579 S_IXOTH = 0x1
1580 S_IXUSR = 0x40
1581 TAB0 = 0x0
1582 TAB1 = 0x800
1583 TAB2 = 0x1000
1584 TAB3 = 0x1800
1585 TABDLY = 0x1800
1586 TCFLSH = 0x20005407
1587 TCGETA = 0x40125401
1588 TCGETS = 0x40245408
1589 TCGETS2 = 0x402c540c
1590 TCIFLUSH = 0x0
1591 TCIOFF = 0x2
1592 TCIOFLUSH = 0x2
1593 TCION = 0x3
1594 TCOFLUSH = 0x1
1595 TCOOFF = 0x0
1596 TCOON = 0x1
1597 TCP_CC_INFO = 0x1a
1598 TCP_CONGESTION = 0xd
1599 TCP_COOKIE_IN_ALWAYS = 0x1
1600 TCP_COOKIE_MAX = 0x10
1601 TCP_COOKIE_MIN = 0x8
1602 TCP_COOKIE_OUT_NEVER = 0x2
1603 TCP_COOKIE_PAIR_SIZE = 0x20
1604 TCP_COOKIE_TRANSACTIONS = 0xf
1605 TCP_CORK = 0x3
1606 TCP_DEFER_ACCEPT = 0x9
1607 TCP_FASTOPEN = 0x17
1608 TCP_INFO = 0xb
1609 TCP_KEEPCNT = 0x6
1610 TCP_KEEPIDLE = 0x4
1611 TCP_KEEPINTVL = 0x5
1612 TCP_LINGER2 = 0x8
1613 TCP_MAXSEG = 0x2
1614 TCP_MAXWIN = 0xffff
1615 TCP_MAX_WINSHIFT = 0xe
1616 TCP_MD5SIG = 0xe
1617 TCP_MD5SIG_MAXKEYLEN = 0x50
1618 TCP_MSS = 0x200
1619 TCP_MSS_DEFAULT = 0x218
1620 TCP_MSS_DESIRED = 0x4c4
1621 TCP_NODELAY = 0x1
1622 TCP_NOTSENT_LOWAT = 0x19
1623 TCP_QUEUE_SEQ = 0x15
1624 TCP_QUICKACK = 0xc
1625 TCP_REPAIR = 0x13
1626 TCP_REPAIR_OPTIONS = 0x16
1627 TCP_REPAIR_QUEUE = 0x14
1628 TCP_SAVED_SYN = 0x1c
1629 TCP_SAVE_SYN = 0x1b
1630 TCP_SYNCNT = 0x7
1631 TCP_S_DATA_IN = 0x4
1632 TCP_S_DATA_OUT = 0x8
1633 TCP_THIN_DUPACK = 0x11
1634 TCP_THIN_LINEAR_TIMEOUTS = 0x10
1635 TCP_TIMESTAMP = 0x18
1636 TCP_USER_TIMEOUT = 0x12
1637 TCP_WINDOW_CLAMP = 0xa
1638 TCSAFLUSH = 0x2
1639 TCSBRK = 0x20005405
1640 TCSBRKP = 0x5425
1641 TCSETA = 0x80125402
1642 TCSETAF = 0x80125404
1643 TCSETAW = 0x80125403
1644 TCSETS = 0x80245409
1645 TCSETS2 = 0x802c540d
1646 TCSETSF = 0x8024540b
1647 TCSETSF2 = 0x802c540f
1648 TCSETSW = 0x8024540a
1649 TCSETSW2 = 0x802c540e
1650 TCXONC = 0x20005406
1651 TIOCCBRK = 0x2000747a
1652 TIOCCONS = 0x20007424
1653 TIOCEXCL = 0x2000740d
1654 TIOCGDEV = 0x40045432
1655 TIOCGETD = 0x40047400
1656 TIOCGEXCL = 0x40045440
1657 TIOCGICOUNT = 0x545d
1658 TIOCGLCKTRMIOS = 0x5456
1659 TIOCGPGRP = 0x40047483
1660 TIOCGPKT = 0x40045438
1661 TIOCGPTLCK = 0x40045439
1662 TIOCGPTN = 0x40047486
1663 TIOCGRS485 = 0x40205441
1664 TIOCGSERIAL = 0x541e
1665 TIOCGSID = 0x40047485
1666 TIOCGSOFTCAR = 0x40047464
1667 TIOCGWINSZ = 0x40087468
1668 TIOCINQ = 0x4004667f
1669 TIOCLINUX = 0x541c
1670 TIOCMBIC = 0x8004746b
1671 TIOCMBIS = 0x8004746c
1672 TIOCMGET = 0x4004746a
1673 TIOCMIWAIT = 0x545c
1674 TIOCMSET = 0x8004746d
1675 TIOCM_CAR = 0x40
1676 TIOCM_CD = 0x40
1677 TIOCM_CTS = 0x20
1678 TIOCM_DSR = 0x100
1679 TIOCM_DTR = 0x2
1680 TIOCM_LE = 0x1
1681 TIOCM_LOOP = 0x8000
1682 TIOCM_OUT1 = 0x2000
1683 TIOCM_OUT2 = 0x4000
1684 TIOCM_RI = 0x80
1685 TIOCM_RNG = 0x80
1686 TIOCM_RTS = 0x4
1687 TIOCM_SR = 0x10
1688 TIOCM_ST = 0x8
1689 TIOCNOTTY = 0x20007471
1690 TIOCNXCL = 0x2000740e
1691 TIOCOUTQ = 0x40047473
1692 TIOCPKT = 0x80047470
1693 TIOCPKT_DATA = 0x0
1694 TIOCPKT_DOSTOP = 0x20
1695 TIOCPKT_FLUSHREAD = 0x1
1696 TIOCPKT_FLUSHWRITE = 0x2
1697 TIOCPKT_IOCTL = 0x40
1698 TIOCPKT_NOSTOP = 0x10
1699 TIOCPKT_START = 0x8
1700 TIOCPKT_STOP = 0x4
1701 TIOCSBRK = 0x2000747b
1702 TIOCSCTTY = 0x20007484
1703 TIOCSERCONFIG = 0x5453
1704 TIOCSERGETLSR = 0x5459
1705 TIOCSERGETMULTI = 0x545a
1706 TIOCSERGSTRUCT = 0x5458
1707 TIOCSERGWILD = 0x5454
1708 TIOCSERSETMULTI = 0x545b
1709 TIOCSERSWILD = 0x5455
1710 TIOCSER_TEMT = 0x1
1711 TIOCSETD = 0x80047401
1712 TIOCSIG = 0x80047488
1713 TIOCSLCKTRMIOS = 0x5457
1714 TIOCSPGRP = 0x80047482
1715 TIOCSPTLCK = 0x80047487
1716 TIOCSRS485 = 0xc0205442
1717 TIOCSSERIAL = 0x541f
1718 TIOCSSOFTCAR = 0x80047465
1719 TIOCSTART = 0x2000746e
1720 TIOCSTI = 0x80017472
1721 TIOCSTOP = 0x2000746f
1722 TIOCSWINSZ = 0x80087467
1723 TIOCVHANGUP = 0x20005437
1724 TOSTOP = 0x100
1725 TUNATTACHFILTER = 0x801054d5
1726 TUNDETACHFILTER = 0x801054d6
1727 TUNGETFEATURES = 0x400454cf
1728 TUNGETFILTER = 0x401054db
1729 TUNGETIFF = 0x400454d2
1730 TUNGETSNDBUF = 0x400454d3
1731 TUNGETVNETBE = 0x400454df
1732 TUNGETVNETHDRSZ = 0x400454d7
1733 TUNGETVNETLE = 0x400454dd
1734 TUNSETDEBUG = 0x800454c9
1735 TUNSETGROUP = 0x800454ce
1736 TUNSETIFF = 0x800454ca
1737 TUNSETIFINDEX = 0x800454da
1738 TUNSETLINK = 0x800454cd
1739 TUNSETNOCSUM = 0x800454c8
1740 TUNSETOFFLOAD = 0x800454d0
1741 TUNSETOWNER = 0x800454cc
1742 TUNSETPERSIST = 0x800454cb
1743 TUNSETQUEUE = 0x800454d9
1744 TUNSETSNDBUF = 0x800454d4
1745 TUNSETTXFILTER = 0x800454d1
1746 TUNSETVNETBE = 0x800454de
1747 TUNSETVNETHDRSZ = 0x800454d8
1748 TUNSETVNETLE = 0x800454dc
1749 VDISCARD = 0xd
1750 VDSUSP = 0xb
1751 VEOF = 0x4
1752 VEOL = 0x5
1753 VEOL2 = 0x6
1754 VERASE = 0x2
1755 VINTR = 0x0
1756 VKILL = 0x3
1757 VLNEXT = 0xf
1758 VMADDR_CID_ANY = 0xffffffff
1759 VMADDR_CID_HOST = 0x2
1760 VMADDR_CID_HYPERVISOR = 0x0
1761 VMADDR_CID_RESERVED = 0x1
1762 VMADDR_PORT_ANY = 0xffffffff
1763 VMIN = 0x4
1764 VQUIT = 0x1
1765 VREPRINT = 0xc
1766 VSTART = 0x8
1767 VSTOP = 0x9
1768 VSUSP = 0xa
1769 VSWTC = 0x7
1770 VT0 = 0x0
1771 VT1 = 0x4000
1772 VTDLY = 0x4000
1773 VTIME = 0x5
1774 VWERASE = 0xe
1775 WALL = 0x40000000
1776 WCLONE = 0x80000000
1777 WCONTINUED = 0x8
1778 WEXITED = 0x4
1779 WNOHANG = 0x1
1780 WNOTHREAD = 0x20000000
1781 WNOWAIT = 0x1000000
1782 WORDSIZE = 0x40
1783 WRAP = 0x20000
1784 WSTOPPED = 0x2
1785 WUNTRACED = 0x2
1786 XCASE = 0x4
1787 XTABS = 0x1800
1788 __TIOCFLUSH = 0x80047410
13 AAFS_MAGIC = 0x5a3c69f0
14 ADFS_SUPER_MAGIC = 0xadf5
15 AFFS_SUPER_MAGIC = 0xadff
16 AFS_FS_MAGIC = 0x6b414653
17 AFS_SUPER_MAGIC = 0x5346414f
18 AF_ALG = 0x26
19 AF_APPLETALK = 0x5
20 AF_ASH = 0x12
21 AF_ATMPVC = 0x8
22 AF_ATMSVC = 0x14
23 AF_AX25 = 0x3
24 AF_BLUETOOTH = 0x1f
25 AF_BRIDGE = 0x7
26 AF_CAIF = 0x25
27 AF_CAN = 0x1d
28 AF_DECnet = 0xc
29 AF_ECONET = 0x13
30 AF_FILE = 0x1
31 AF_IB = 0x1b
32 AF_IEEE802154 = 0x24
33 AF_INET = 0x2
34 AF_INET6 = 0xa
35 AF_IPX = 0x4
36 AF_IRDA = 0x17
37 AF_ISDN = 0x22
38 AF_IUCV = 0x20
39 AF_KCM = 0x29
40 AF_KEY = 0xf
41 AF_LLC = 0x1a
42 AF_LOCAL = 0x1
43 AF_MAX = 0x2c
44 AF_MPLS = 0x1c
45 AF_NETBEUI = 0xd
46 AF_NETLINK = 0x10
47 AF_NETROM = 0x6
48 AF_NFC = 0x27
49 AF_PACKET = 0x11
50 AF_PHONET = 0x23
51 AF_PPPOX = 0x18
52 AF_QIPCRTR = 0x2a
53 AF_RDS = 0x15
54 AF_ROSE = 0xb
55 AF_ROUTE = 0x10
56 AF_RXRPC = 0x21
57 AF_SECURITY = 0xe
58 AF_SMC = 0x2b
59 AF_SNA = 0x16
60 AF_TIPC = 0x1e
61 AF_UNIX = 0x1
62 AF_UNSPEC = 0x0
63 AF_VSOCK = 0x28
64 AF_WANPIPE = 0x19
65 AF_X25 = 0x9
66 AF_XDP = 0x2c
67 ALG_OP_DECRYPT = 0x0
68 ALG_OP_ENCRYPT = 0x1
69 ALG_SET_AEAD_ASSOCLEN = 0x4
70 ALG_SET_AEAD_AUTHSIZE = 0x5
71 ALG_SET_IV = 0x2
72 ALG_SET_KEY = 0x1
73 ALG_SET_OP = 0x3
74 ANON_INODE_FS_MAGIC = 0x9041934
75 ARPHRD_6LOWPAN = 0x339
76 ARPHRD_ADAPT = 0x108
77 ARPHRD_APPLETLK = 0x8
78 ARPHRD_ARCNET = 0x7
79 ARPHRD_ASH = 0x30d
80 ARPHRD_ATM = 0x13
81 ARPHRD_AX25 = 0x3
82 ARPHRD_BIF = 0x307
83 ARPHRD_CAIF = 0x336
84 ARPHRD_CAN = 0x118
85 ARPHRD_CHAOS = 0x5
86 ARPHRD_CISCO = 0x201
87 ARPHRD_CSLIP = 0x101
88 ARPHRD_CSLIP6 = 0x103
89 ARPHRD_DDCMP = 0x205
90 ARPHRD_DLCI = 0xf
91 ARPHRD_ECONET = 0x30e
92 ARPHRD_EETHER = 0x2
93 ARPHRD_ETHER = 0x1
94 ARPHRD_EUI64 = 0x1b
95 ARPHRD_FCAL = 0x311
96 ARPHRD_FCFABRIC = 0x313
97 ARPHRD_FCPL = 0x312
98 ARPHRD_FCPP = 0x310
99 ARPHRD_FDDI = 0x306
100 ARPHRD_FRAD = 0x302
101 ARPHRD_HDLC = 0x201
102 ARPHRD_HIPPI = 0x30c
103 ARPHRD_HWX25 = 0x110
104 ARPHRD_IEEE1394 = 0x18
105 ARPHRD_IEEE802 = 0x6
106 ARPHRD_IEEE80211 = 0x321
107 ARPHRD_IEEE80211_PRISM = 0x322
108 ARPHRD_IEEE80211_RADIOTAP = 0x323
109 ARPHRD_IEEE802154 = 0x324
110 ARPHRD_IEEE802154_MONITOR = 0x325
111 ARPHRD_IEEE802_TR = 0x320
112 ARPHRD_INFINIBAND = 0x20
113 ARPHRD_IP6GRE = 0x337
114 ARPHRD_IPDDP = 0x309
115 ARPHRD_IPGRE = 0x30a
116 ARPHRD_IRDA = 0x30f
117 ARPHRD_LAPB = 0x204
118 ARPHRD_LOCALTLK = 0x305
119 ARPHRD_LOOPBACK = 0x304
120 ARPHRD_METRICOM = 0x17
121 ARPHRD_NETLINK = 0x338
122 ARPHRD_NETROM = 0x0
123 ARPHRD_NONE = 0xfffe
124 ARPHRD_PHONET = 0x334
125 ARPHRD_PHONET_PIPE = 0x335
126 ARPHRD_PIMREG = 0x30b
127 ARPHRD_PPP = 0x200
128 ARPHRD_PRONET = 0x4
129 ARPHRD_RAWHDLC = 0x206
130 ARPHRD_RAWIP = 0x207
131 ARPHRD_ROSE = 0x10e
132 ARPHRD_RSRVD = 0x104
133 ARPHRD_SIT = 0x308
134 ARPHRD_SKIP = 0x303
135 ARPHRD_SLIP = 0x100
136 ARPHRD_SLIP6 = 0x102
137 ARPHRD_TUNNEL = 0x300
138 ARPHRD_TUNNEL6 = 0x301
139 ARPHRD_VOID = 0xffff
140 ARPHRD_VSOCKMON = 0x33a
141 ARPHRD_X25 = 0x10f
142 ASI_LEON_DFLUSH = 0x11
143 ASI_LEON_IFLUSH = 0x10
144 ASI_LEON_MMUFLUSH = 0x18
145 AUTOFS_SUPER_MAGIC = 0x187
146 B0 = 0x0
147 B1000000 = 0x1008
148 B110 = 0x3
149 B115200 = 0x1002
150 B1152000 = 0x1009
151 B1200 = 0x9
152 B134 = 0x4
153 B150 = 0x5
154 B1500000 = 0x100a
155 B1800 = 0xa
156 B19200 = 0xe
157 B200 = 0x6
158 B2000000 = 0x100b
159 B230400 = 0x1003
160 B2400 = 0xb
161 B2500000 = 0x100c
162 B300 = 0x7
163 B3000000 = 0x100d
164 B3500000 = 0x100e
165 B38400 = 0xf
166 B4000000 = 0x100f
167 B460800 = 0x1004
168 B4800 = 0xc
169 B50 = 0x1
170 B500000 = 0x1005
171 B57600 = 0x1001
172 B576000 = 0x1006
173 B600 = 0x8
174 B75 = 0x2
175 B921600 = 0x1007
176 B9600 = 0xd
177 BALLOON_KVM_MAGIC = 0x13661366
178 BDEVFS_MAGIC = 0x62646576
179 BINFMTFS_MAGIC = 0x42494e4d
180 BLKBSZGET = 0x40081270
181 BLKBSZSET = 0x80081271
182 BLKFLSBUF = 0x20001261
183 BLKFRAGET = 0x20001265
184 BLKFRASET = 0x20001264
185 BLKGETSIZE = 0x20001260
186 BLKGETSIZE64 = 0x40081272
187 BLKPBSZGET = 0x2000127b
188 BLKRAGET = 0x20001263
189 BLKRASET = 0x20001262
190 BLKROGET = 0x2000125e
191 BLKROSET = 0x2000125d
192 BLKRRPART = 0x2000125f
193 BLKSECTGET = 0x20001267
194 BLKSECTSET = 0x20001266
195 BLKSSZGET = 0x20001268
196 BOTHER = 0x1000
197 BPF_A = 0x10
198 BPF_ABS = 0x20
199 BPF_ADD = 0x0
200 BPF_ALU = 0x4
201 BPF_AND = 0x50
202 BPF_B = 0x10
203 BPF_DIV = 0x30
204 BPF_FS_MAGIC = 0xcafe4a11
205 BPF_H = 0x8
206 BPF_IMM = 0x0
207 BPF_IND = 0x40
208 BPF_JA = 0x0
209 BPF_JEQ = 0x10
210 BPF_JGE = 0x30
211 BPF_JGT = 0x20
212 BPF_JMP = 0x5
213 BPF_JSET = 0x40
214 BPF_K = 0x0
215 BPF_LD = 0x0
216 BPF_LDX = 0x1
217 BPF_LEN = 0x80
218 BPF_LL_OFF = -0x200000
219 BPF_LSH = 0x60
220 BPF_MAJOR_VERSION = 0x1
221 BPF_MAXINSNS = 0x1000
222 BPF_MEM = 0x60
223 BPF_MEMWORDS = 0x10
224 BPF_MINOR_VERSION = 0x1
225 BPF_MISC = 0x7
226 BPF_MOD = 0x90
227 BPF_MSH = 0xa0
228 BPF_MUL = 0x20
229 BPF_NEG = 0x80
230 BPF_NET_OFF = -0x100000
231 BPF_OR = 0x40
232 BPF_RET = 0x6
233 BPF_RSH = 0x70
234 BPF_ST = 0x2
235 BPF_STX = 0x3
236 BPF_SUB = 0x10
237 BPF_TAX = 0x0
238 BPF_TXA = 0x80
239 BPF_W = 0x0
240 BPF_X = 0x8
241 BPF_XOR = 0xa0
242 BRKINT = 0x2
243 BS0 = 0x0
244 BS1 = 0x2000
245 BSDLY = 0x2000
246 BTRFS_SUPER_MAGIC = 0x9123683e
247 BTRFS_TEST_MAGIC = 0x73727279
248 CAN_BCM = 0x2
249 CAN_EFF_FLAG = 0x80000000
250 CAN_EFF_ID_BITS = 0x1d
251 CAN_EFF_MASK = 0x1fffffff
252 CAN_ERR_FLAG = 0x20000000
253 CAN_ERR_MASK = 0x1fffffff
254 CAN_INV_FILTER = 0x20000000
255 CAN_ISOTP = 0x6
256 CAN_MAX_DLC = 0x8
257 CAN_MAX_DLEN = 0x8
258 CAN_MCNET = 0x5
259 CAN_MTU = 0x10
260 CAN_NPROTO = 0x7
261 CAN_RAW = 0x1
262 CAN_RAW_FILTER_MAX = 0x200
263 CAN_RTR_FLAG = 0x40000000
264 CAN_SFF_ID_BITS = 0xb
265 CAN_SFF_MASK = 0x7ff
266 CAN_TP16 = 0x3
267 CAN_TP20 = 0x4
268 CBAUD = 0x100f
269 CBAUDEX = 0x1000
270 CFLUSH = 0xf
271 CGROUP2_SUPER_MAGIC = 0x63677270
272 CGROUP_SUPER_MAGIC = 0x27e0eb
273 CIBAUD = 0x100f0000
274 CLOCAL = 0x800
275 CLOCK_BOOTTIME = 0x7
276 CLOCK_BOOTTIME_ALARM = 0x9
277 CLOCK_DEFAULT = 0x0
278 CLOCK_EXT = 0x1
279 CLOCK_INT = 0x2
280 CLOCK_MONOTONIC = 0x1
281 CLOCK_MONOTONIC_COARSE = 0x6
282 CLOCK_MONOTONIC_RAW = 0x4
283 CLOCK_PROCESS_CPUTIME_ID = 0x2
284 CLOCK_REALTIME = 0x0
285 CLOCK_REALTIME_ALARM = 0x8
286 CLOCK_REALTIME_COARSE = 0x5
287 CLOCK_TAI = 0xb
288 CLOCK_THREAD_CPUTIME_ID = 0x3
289 CLOCK_TXFROMRX = 0x4
290 CLOCK_TXINT = 0x3
291 CLONE_CHILD_CLEARTID = 0x200000
292 CLONE_CHILD_SETTID = 0x1000000
293 CLONE_DETACHED = 0x400000
294 CLONE_FILES = 0x400
295 CLONE_FS = 0x200
296 CLONE_IO = 0x80000000
297 CLONE_NEWCGROUP = 0x2000000
298 CLONE_NEWIPC = 0x8000000
299 CLONE_NEWNET = 0x40000000
300 CLONE_NEWNS = 0x20000
301 CLONE_NEWPID = 0x20000000
302 CLONE_NEWUSER = 0x10000000
303 CLONE_NEWUTS = 0x4000000
304 CLONE_PARENT = 0x8000
305 CLONE_PARENT_SETTID = 0x100000
306 CLONE_PTRACE = 0x2000
307 CLONE_SETTLS = 0x80000
308 CLONE_SIGHAND = 0x800
309 CLONE_SYSVSEM = 0x40000
310 CLONE_THREAD = 0x10000
311 CLONE_UNTRACED = 0x800000
312 CLONE_VFORK = 0x4000
313 CLONE_VM = 0x100
314 CMSPAR = 0x40000000
315 CODA_SUPER_MAGIC = 0x73757245
316 CR0 = 0x0
317 CR1 = 0x200
318 CR2 = 0x400
319 CR3 = 0x600
320 CRAMFS_MAGIC = 0x28cd3d45
321 CRDLY = 0x600
322 CREAD = 0x80
323 CRTSCTS = 0x80000000
324 CS5 = 0x0
325 CS6 = 0x10
326 CS7 = 0x20
327 CS8 = 0x30
328 CSIGNAL = 0xff
329 CSIZE = 0x30
330 CSTART = 0x11
331 CSTATUS = 0x0
332 CSTOP = 0x13
333 CSTOPB = 0x40
334 CSUSP = 0x1a
335 DAXFS_MAGIC = 0x64646178
336 DEBUGFS_MAGIC = 0x64626720
337 DEVPTS_SUPER_MAGIC = 0x1cd1
338 DT_BLK = 0x6
339 DT_CHR = 0x2
340 DT_DIR = 0x4
341 DT_FIFO = 0x1
342 DT_LNK = 0xa
343 DT_REG = 0x8
344 DT_SOCK = 0xc
345 DT_UNKNOWN = 0x0
346 DT_WHT = 0xe
347 ECHO = 0x8
348 ECHOCTL = 0x200
349 ECHOE = 0x10
350 ECHOK = 0x20
351 ECHOKE = 0x800
352 ECHONL = 0x40
353 ECHOPRT = 0x400
354 ECRYPTFS_SUPER_MAGIC = 0xf15f
355 EFD_CLOEXEC = 0x400000
356 EFD_NONBLOCK = 0x4000
357 EFD_SEMAPHORE = 0x1
358 EFIVARFS_MAGIC = 0xde5e81e4
359 EFS_SUPER_MAGIC = 0x414a53
360 EMT_TAGOVF = 0x1
361 ENCODING_DEFAULT = 0x0
362 ENCODING_FM_MARK = 0x3
363 ENCODING_FM_SPACE = 0x4
364 ENCODING_MANCHESTER = 0x5
365 ENCODING_NRZ = 0x1
366 ENCODING_NRZI = 0x2
367 EPOLLERR = 0x8
368 EPOLLET = 0x80000000
369 EPOLLEXCLUSIVE = 0x10000000
370 EPOLLHUP = 0x10
371 EPOLLIN = 0x1
372 EPOLLMSG = 0x400
373 EPOLLONESHOT = 0x40000000
374 EPOLLOUT = 0x4
375 EPOLLPRI = 0x2
376 EPOLLRDBAND = 0x80
377 EPOLLRDHUP = 0x2000
378 EPOLLRDNORM = 0x40
379 EPOLLWAKEUP = 0x20000000
380 EPOLLWRBAND = 0x200
381 EPOLLWRNORM = 0x100
382 EPOLL_CLOEXEC = 0x400000
383 EPOLL_CTL_ADD = 0x1
384 EPOLL_CTL_DEL = 0x2
385 EPOLL_CTL_MOD = 0x3
386 ETH_P_1588 = 0x88f7
387 ETH_P_8021AD = 0x88a8
388 ETH_P_8021AH = 0x88e7
389 ETH_P_8021Q = 0x8100
390 ETH_P_80221 = 0x8917
391 ETH_P_802_2 = 0x4
392 ETH_P_802_3 = 0x1
393 ETH_P_802_3_MIN = 0x600
394 ETH_P_802_EX1 = 0x88b5
395 ETH_P_AARP = 0x80f3
396 ETH_P_AF_IUCV = 0xfbfb
397 ETH_P_ALL = 0x3
398 ETH_P_AOE = 0x88a2
399 ETH_P_ARCNET = 0x1a
400 ETH_P_ARP = 0x806
401 ETH_P_ATALK = 0x809b
402 ETH_P_ATMFATE = 0x8884
403 ETH_P_ATMMPOA = 0x884c
404 ETH_P_AX25 = 0x2
405 ETH_P_BATMAN = 0x4305
406 ETH_P_BPQ = 0x8ff
407 ETH_P_CAIF = 0xf7
408 ETH_P_CAN = 0xc
409 ETH_P_CANFD = 0xd
410 ETH_P_CONTROL = 0x16
411 ETH_P_CUST = 0x6006
412 ETH_P_DDCMP = 0x6
413 ETH_P_DEC = 0x6000
414 ETH_P_DIAG = 0x6005
415 ETH_P_DNA_DL = 0x6001
416 ETH_P_DNA_RC = 0x6002
417 ETH_P_DNA_RT = 0x6003
418 ETH_P_DSA = 0x1b
419 ETH_P_ECONET = 0x18
420 ETH_P_EDSA = 0xdada
421 ETH_P_ERSPAN = 0x88be
422 ETH_P_ERSPAN2 = 0x22eb
423 ETH_P_FCOE = 0x8906
424 ETH_P_FIP = 0x8914
425 ETH_P_HDLC = 0x19
426 ETH_P_HSR = 0x892f
427 ETH_P_IBOE = 0x8915
428 ETH_P_IEEE802154 = 0xf6
429 ETH_P_IEEEPUP = 0xa00
430 ETH_P_IEEEPUPAT = 0xa01
431 ETH_P_IFE = 0xed3e
432 ETH_P_IP = 0x800
433 ETH_P_IPV6 = 0x86dd
434 ETH_P_IPX = 0x8137
435 ETH_P_IRDA = 0x17
436 ETH_P_LAT = 0x6004
437 ETH_P_LINK_CTL = 0x886c
438 ETH_P_LOCALTALK = 0x9
439 ETH_P_LOOP = 0x60
440 ETH_P_LOOPBACK = 0x9000
441 ETH_P_MACSEC = 0x88e5
442 ETH_P_MAP = 0xf9
443 ETH_P_MOBITEX = 0x15
444 ETH_P_MPLS_MC = 0x8848
445 ETH_P_MPLS_UC = 0x8847
446 ETH_P_MVRP = 0x88f5
447 ETH_P_NCSI = 0x88f8
448 ETH_P_NSH = 0x894f
449 ETH_P_PAE = 0x888e
450 ETH_P_PAUSE = 0x8808
451 ETH_P_PHONET = 0xf5
452 ETH_P_PPPTALK = 0x10
453 ETH_P_PPP_DISC = 0x8863
454 ETH_P_PPP_MP = 0x8
455 ETH_P_PPP_SES = 0x8864
456 ETH_P_PREAUTH = 0x88c7
457 ETH_P_PRP = 0x88fb
458 ETH_P_PUP = 0x200
459 ETH_P_PUPAT = 0x201
460 ETH_P_QINQ1 = 0x9100
461 ETH_P_QINQ2 = 0x9200
462 ETH_P_QINQ3 = 0x9300
463 ETH_P_RARP = 0x8035
464 ETH_P_SCA = 0x6007
465 ETH_P_SLOW = 0x8809
466 ETH_P_SNAP = 0x5
467 ETH_P_TDLS = 0x890d
468 ETH_P_TEB = 0x6558
469 ETH_P_TIPC = 0x88ca
470 ETH_P_TRAILER = 0x1c
471 ETH_P_TR_802_2 = 0x11
472 ETH_P_TSN = 0x22f0
473 ETH_P_WAN_PPP = 0x7
474 ETH_P_WCCP = 0x883e
475 ETH_P_X25 = 0x805
476 ETH_P_XDSA = 0xf8
477 EXABYTE_ENABLE_NEST = 0xf0
478 EXT2_SUPER_MAGIC = 0xef53
479 EXT3_SUPER_MAGIC = 0xef53
480 EXT4_SUPER_MAGIC = 0xef53
481 EXTA = 0xe
482 EXTB = 0xf
483 EXTPROC = 0x10000
484 F2FS_SUPER_MAGIC = 0xf2f52010
485 FALLOC_FL_COLLAPSE_RANGE = 0x8
486 FALLOC_FL_INSERT_RANGE = 0x20
487 FALLOC_FL_KEEP_SIZE = 0x1
488 FALLOC_FL_NO_HIDE_STALE = 0x4
489 FALLOC_FL_PUNCH_HOLE = 0x2
490 FALLOC_FL_UNSHARE_RANGE = 0x40
491 FALLOC_FL_ZERO_RANGE = 0x10
492 FD_CLOEXEC = 0x1
493 FD_SETSIZE = 0x400
494 FF0 = 0x0
495 FF1 = 0x8000
496 FFDLY = 0x8000
497 FLUSHO = 0x1000
498 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
499 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
500 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
501 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
502 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
503 FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
504 FS_ENCRYPTION_MODE_INVALID = 0x0
505 FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
506 FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
507 FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
508 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
509 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
510 FS_KEY_DESCRIPTOR_SIZE = 0x8
511 FS_KEY_DESC_PREFIX = "fscrypt:"
512 FS_KEY_DESC_PREFIX_SIZE = 0x8
513 FS_MAX_KEY_SIZE = 0x40
514 FS_POLICY_FLAGS_PAD_16 = 0x2
515 FS_POLICY_FLAGS_PAD_32 = 0x3
516 FS_POLICY_FLAGS_PAD_4 = 0x0
517 FS_POLICY_FLAGS_PAD_8 = 0x1
518 FS_POLICY_FLAGS_PAD_MASK = 0x3
519 FS_POLICY_FLAGS_VALID = 0x3
520 FUTEXFS_SUPER_MAGIC = 0xbad1dea
521 F_ADD_SEALS = 0x409
522 F_DUPFD = 0x0
523 F_DUPFD_CLOEXEC = 0x406
524 F_EXLCK = 0x4
525 F_GETFD = 0x1
526 F_GETFL = 0x3
527 F_GETLEASE = 0x401
528 F_GETLK = 0x7
529 F_GETLK64 = 0x7
530 F_GETOWN = 0x5
531 F_GETOWN_EX = 0x10
532 F_GETPIPE_SZ = 0x408
533 F_GETSIG = 0xb
534 F_GET_FILE_RW_HINT = 0x40d
535 F_GET_RW_HINT = 0x40b
536 F_GET_SEALS = 0x40a
537 F_LOCK = 0x1
538 F_NOTIFY = 0x402
539 F_OFD_GETLK = 0x24
540 F_OFD_SETLK = 0x25
541 F_OFD_SETLKW = 0x26
542 F_OK = 0x0
543 F_RDLCK = 0x1
544 F_SEAL_GROW = 0x4
545 F_SEAL_SEAL = 0x1
546 F_SEAL_SHRINK = 0x2
547 F_SEAL_WRITE = 0x8
548 F_SETFD = 0x2
549 F_SETFL = 0x4
550 F_SETLEASE = 0x400
551 F_SETLK = 0x8
552 F_SETLK64 = 0x8
553 F_SETLKW = 0x9
554 F_SETLKW64 = 0x9
555 F_SETOWN = 0x6
556 F_SETOWN_EX = 0xf
557 F_SETPIPE_SZ = 0x407
558 F_SETSIG = 0xa
559 F_SET_FILE_RW_HINT = 0x40e
560 F_SET_RW_HINT = 0x40c
561 F_SHLCK = 0x8
562 F_TEST = 0x3
563 F_TLOCK = 0x2
564 F_ULOCK = 0x0
565 F_UNLCK = 0x3
566 F_WRLCK = 0x2
567 GENL_ADMIN_PERM = 0x1
568 GENL_CMD_CAP_DO = 0x2
569 GENL_CMD_CAP_DUMP = 0x4
570 GENL_CMD_CAP_HASPOL = 0x8
571 GENL_HDRLEN = 0x4
572 GENL_ID_CTRL = 0x10
573 GENL_ID_PMCRAID = 0x12
574 GENL_ID_VFS_DQUOT = 0x11
575 GENL_MAX_ID = 0x3ff
576 GENL_MIN_ID = 0x10
577 GENL_NAMSIZ = 0x10
578 GENL_START_ALLOC = 0x13
579 GENL_UNS_ADMIN_PERM = 0x10
580 GRND_NONBLOCK = 0x1
581 GRND_RANDOM = 0x2
582 HDIO_DRIVE_CMD = 0x31f
583 HDIO_DRIVE_CMD_AEB = 0x31e
584 HDIO_DRIVE_CMD_HDR_SIZE = 0x4
585 HDIO_DRIVE_HOB_HDR_SIZE = 0x8
586 HDIO_DRIVE_RESET = 0x31c
587 HDIO_DRIVE_TASK = 0x31e
588 HDIO_DRIVE_TASKFILE = 0x31d
589 HDIO_DRIVE_TASK_HDR_SIZE = 0x8
590 HDIO_GETGEO = 0x301
591 HDIO_GET_32BIT = 0x309
592 HDIO_GET_ACOUSTIC = 0x30f
593 HDIO_GET_ADDRESS = 0x310
594 HDIO_GET_BUSSTATE = 0x31a
595 HDIO_GET_DMA = 0x30b
596 HDIO_GET_IDENTITY = 0x30d
597 HDIO_GET_KEEPSETTINGS = 0x308
598 HDIO_GET_MULTCOUNT = 0x304
599 HDIO_GET_NICE = 0x30c
600 HDIO_GET_NOWERR = 0x30a
601 HDIO_GET_QDMA = 0x305
602 HDIO_GET_UNMASKINTR = 0x302
603 HDIO_GET_WCACHE = 0x30e
604 HDIO_OBSOLETE_IDENTITY = 0x307
605 HDIO_SCAN_HWIF = 0x328
606 HDIO_SET_32BIT = 0x324
607 HDIO_SET_ACOUSTIC = 0x32c
608 HDIO_SET_ADDRESS = 0x32f
609 HDIO_SET_BUSSTATE = 0x32d
610 HDIO_SET_DMA = 0x326
611 HDIO_SET_KEEPSETTINGS = 0x323
612 HDIO_SET_MULTCOUNT = 0x321
613 HDIO_SET_NICE = 0x329
614 HDIO_SET_NOWERR = 0x325
615 HDIO_SET_PIO_MODE = 0x327
616 HDIO_SET_QDMA = 0x32e
617 HDIO_SET_UNMASKINTR = 0x322
618 HDIO_SET_WCACHE = 0x32b
619 HDIO_SET_XFER = 0x306
620 HDIO_TRISTATE_HWIF = 0x31b
621 HDIO_UNREGISTER_HWIF = 0x32a
622 HOSTFS_SUPER_MAGIC = 0xc0ffee
623 HPFS_SUPER_MAGIC = 0xf995e849
624 HUGETLBFS_MAGIC = 0x958458f6
625 HUPCL = 0x400
626 IBSHIFT = 0x10
627 ICANON = 0x2
628 ICMPV6_FILTER = 0x1
629 ICRNL = 0x100
630 IEXTEN = 0x8000
631 IFA_F_DADFAILED = 0x8
632 IFA_F_DEPRECATED = 0x20
633 IFA_F_HOMEADDRESS = 0x10
634 IFA_F_MANAGETEMPADDR = 0x100
635 IFA_F_MCAUTOJOIN = 0x400
636 IFA_F_NODAD = 0x2
637 IFA_F_NOPREFIXROUTE = 0x200
638 IFA_F_OPTIMISTIC = 0x4
639 IFA_F_PERMANENT = 0x80
640 IFA_F_SECONDARY = 0x1
641 IFA_F_STABLE_PRIVACY = 0x800
642 IFA_F_TEMPORARY = 0x1
643 IFA_F_TENTATIVE = 0x40
644 IFA_MAX = 0xa
645 IFF_ALLMULTI = 0x200
646 IFF_ATTACH_QUEUE = 0x200
647 IFF_AUTOMEDIA = 0x4000
648 IFF_BROADCAST = 0x2
649 IFF_DEBUG = 0x4
650 IFF_DETACH_QUEUE = 0x400
651 IFF_DORMANT = 0x20000
652 IFF_DYNAMIC = 0x8000
653 IFF_ECHO = 0x40000
654 IFF_LOOPBACK = 0x8
655 IFF_LOWER_UP = 0x10000
656 IFF_MASTER = 0x400
657 IFF_MULTICAST = 0x1000
658 IFF_MULTI_QUEUE = 0x100
659 IFF_NAPI = 0x10
660 IFF_NAPI_FRAGS = 0x20
661 IFF_NOARP = 0x80
662 IFF_NOFILTER = 0x1000
663 IFF_NOTRAILERS = 0x20
664 IFF_NO_PI = 0x1000
665 IFF_ONE_QUEUE = 0x2000
666 IFF_PERSIST = 0x800
667 IFF_POINTOPOINT = 0x10
668 IFF_PORTSEL = 0x2000
669 IFF_PROMISC = 0x100
670 IFF_RUNNING = 0x40
671 IFF_SLAVE = 0x800
672 IFF_TAP = 0x2
673 IFF_TUN = 0x1
674 IFF_TUN_EXCL = 0x8000
675 IFF_UP = 0x1
676 IFF_VNET_HDR = 0x4000
677 IFF_VOLATILE = 0x70c5a
678 IFNAMSIZ = 0x10
679 IGNBRK = 0x1
680 IGNCR = 0x80
681 IGNPAR = 0x4
682 IMAXBEL = 0x2000
683 INLCR = 0x40
684 INPCK = 0x10
685 IN_ACCESS = 0x1
686 IN_ALL_EVENTS = 0xfff
687 IN_ATTRIB = 0x4
688 IN_CLASSA_HOST = 0xffffff
689 IN_CLASSA_MAX = 0x80
690 IN_CLASSA_NET = 0xff000000
691 IN_CLASSA_NSHIFT = 0x18
692 IN_CLASSB_HOST = 0xffff
693 IN_CLASSB_MAX = 0x10000
694 IN_CLASSB_NET = 0xffff0000
695 IN_CLASSB_NSHIFT = 0x10
696 IN_CLASSC_HOST = 0xff
697 IN_CLASSC_NET = 0xffffff00
698 IN_CLASSC_NSHIFT = 0x8
699 IN_CLOEXEC = 0x400000
700 IN_CLOSE = 0x18
701 IN_CLOSE_NOWRITE = 0x10
702 IN_CLOSE_WRITE = 0x8
703 IN_CREATE = 0x100
704 IN_DELETE = 0x200
705 IN_DELETE_SELF = 0x400
706 IN_DONT_FOLLOW = 0x2000000
707 IN_EXCL_UNLINK = 0x4000000
708 IN_IGNORED = 0x8000
709 IN_ISDIR = 0x40000000
710 IN_LOOPBACKNET = 0x7f
711 IN_MASK_ADD = 0x20000000
712 IN_MODIFY = 0x2
713 IN_MOVE = 0xc0
714 IN_MOVED_FROM = 0x40
715 IN_MOVED_TO = 0x80
716 IN_MOVE_SELF = 0x800
717 IN_NONBLOCK = 0x4000
718 IN_ONESHOT = 0x80000000
719 IN_ONLYDIR = 0x1000000
720 IN_OPEN = 0x20
721 IN_Q_OVERFLOW = 0x4000
722 IN_UNMOUNT = 0x2000
723 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
724 IPPROTO_AH = 0x33
725 IPPROTO_BEETPH = 0x5e
726 IPPROTO_COMP = 0x6c
727 IPPROTO_DCCP = 0x21
728 IPPROTO_DSTOPTS = 0x3c
729 IPPROTO_EGP = 0x8
730 IPPROTO_ENCAP = 0x62
731 IPPROTO_ESP = 0x32
732 IPPROTO_FRAGMENT = 0x2c
733 IPPROTO_GRE = 0x2f
734 IPPROTO_HOPOPTS = 0x0
735 IPPROTO_ICMP = 0x1
736 IPPROTO_ICMPV6 = 0x3a
737 IPPROTO_IDP = 0x16
738 IPPROTO_IGMP = 0x2
739 IPPROTO_IP = 0x0
740 IPPROTO_IPIP = 0x4
741 IPPROTO_IPV6 = 0x29
742 IPPROTO_MH = 0x87
743 IPPROTO_MPLS = 0x89
744 IPPROTO_MTP = 0x5c
745 IPPROTO_NONE = 0x3b
746 IPPROTO_PIM = 0x67
747 IPPROTO_PUP = 0xc
748 IPPROTO_RAW = 0xff
749 IPPROTO_ROUTING = 0x2b
750 IPPROTO_RSVP = 0x2e
751 IPPROTO_SCTP = 0x84
752 IPPROTO_TCP = 0x6
753 IPPROTO_TP = 0x1d
754 IPPROTO_UDP = 0x11
755 IPPROTO_UDPLITE = 0x88
756 IPV6_2292DSTOPTS = 0x4
757 IPV6_2292HOPLIMIT = 0x8
758 IPV6_2292HOPOPTS = 0x3
759 IPV6_2292PKTINFO = 0x2
760 IPV6_2292PKTOPTIONS = 0x6
761 IPV6_2292RTHDR = 0x5
762 IPV6_ADDRFORM = 0x1
763 IPV6_ADDR_PREFERENCES = 0x48
764 IPV6_ADD_MEMBERSHIP = 0x14
765 IPV6_AUTHHDR = 0xa
766 IPV6_AUTOFLOWLABEL = 0x46
767 IPV6_CHECKSUM = 0x7
768 IPV6_DONTFRAG = 0x3e
769 IPV6_DROP_MEMBERSHIP = 0x15
770 IPV6_DSTOPTS = 0x3b
771 IPV6_FREEBIND = 0x4e
772 IPV6_HDRINCL = 0x24
773 IPV6_HOPLIMIT = 0x34
774 IPV6_HOPOPTS = 0x36
775 IPV6_IPSEC_POLICY = 0x22
776 IPV6_JOIN_ANYCAST = 0x1b
777 IPV6_JOIN_GROUP = 0x14
778 IPV6_LEAVE_ANYCAST = 0x1c
779 IPV6_LEAVE_GROUP = 0x15
780 IPV6_MINHOPCOUNT = 0x49
781 IPV6_MTU = 0x18
782 IPV6_MTU_DISCOVER = 0x17
783 IPV6_MULTICAST_HOPS = 0x12
784 IPV6_MULTICAST_IF = 0x11
785 IPV6_MULTICAST_LOOP = 0x13
786 IPV6_NEXTHOP = 0x9
787 IPV6_ORIGDSTADDR = 0x4a
788 IPV6_PATHMTU = 0x3d
789 IPV6_PKTINFO = 0x32
790 IPV6_PMTUDISC_DO = 0x2
791 IPV6_PMTUDISC_DONT = 0x0
792 IPV6_PMTUDISC_INTERFACE = 0x4
793 IPV6_PMTUDISC_OMIT = 0x5
794 IPV6_PMTUDISC_PROBE = 0x3
795 IPV6_PMTUDISC_WANT = 0x1
796 IPV6_RECVDSTOPTS = 0x3a
797 IPV6_RECVERR = 0x19
798 IPV6_RECVFRAGSIZE = 0x4d
799 IPV6_RECVHOPLIMIT = 0x33
800 IPV6_RECVHOPOPTS = 0x35
801 IPV6_RECVORIGDSTADDR = 0x4a
802 IPV6_RECVPATHMTU = 0x3c
803 IPV6_RECVPKTINFO = 0x31
804 IPV6_RECVRTHDR = 0x38
805 IPV6_RECVTCLASS = 0x42
806 IPV6_ROUTER_ALERT = 0x16
807 IPV6_RTHDR = 0x39
808 IPV6_RTHDRDSTOPTS = 0x37
809 IPV6_RTHDR_LOOSE = 0x0
810 IPV6_RTHDR_STRICT = 0x1
811 IPV6_RTHDR_TYPE_0 = 0x0
812 IPV6_RXDSTOPTS = 0x3b
813 IPV6_RXHOPOPTS = 0x36
814 IPV6_TCLASS = 0x43
815 IPV6_TRANSPARENT = 0x4b
816 IPV6_UNICAST_HOPS = 0x10
817 IPV6_UNICAST_IF = 0x4c
818 IPV6_V6ONLY = 0x1a
819 IPV6_XFRM_POLICY = 0x23
820 IP_ADD_MEMBERSHIP = 0x23
821 IP_ADD_SOURCE_MEMBERSHIP = 0x27
822 IP_BIND_ADDRESS_NO_PORT = 0x18
823 IP_BLOCK_SOURCE = 0x26
824 IP_CHECKSUM = 0x17
825 IP_DEFAULT_MULTICAST_LOOP = 0x1
826 IP_DEFAULT_MULTICAST_TTL = 0x1
827 IP_DF = 0x4000
828 IP_DROP_MEMBERSHIP = 0x24
829 IP_DROP_SOURCE_MEMBERSHIP = 0x28
830 IP_FREEBIND = 0xf
831 IP_HDRINCL = 0x3
832 IP_IPSEC_POLICY = 0x10
833 IP_MAXPACKET = 0xffff
834 IP_MAX_MEMBERSHIPS = 0x14
835 IP_MF = 0x2000
836 IP_MINTTL = 0x15
837 IP_MSFILTER = 0x29
838 IP_MSS = 0x240
839 IP_MTU = 0xe
840 IP_MTU_DISCOVER = 0xa
841 IP_MULTICAST_ALL = 0x31
842 IP_MULTICAST_IF = 0x20
843 IP_MULTICAST_LOOP = 0x22
844 IP_MULTICAST_TTL = 0x21
845 IP_NODEFRAG = 0x16
846 IP_OFFMASK = 0x1fff
847 IP_OPTIONS = 0x4
848 IP_ORIGDSTADDR = 0x14
849 IP_PASSSEC = 0x12
850 IP_PKTINFO = 0x8
851 IP_PKTOPTIONS = 0x9
852 IP_PMTUDISC = 0xa
853 IP_PMTUDISC_DO = 0x2
854 IP_PMTUDISC_DONT = 0x0
855 IP_PMTUDISC_INTERFACE = 0x4
856 IP_PMTUDISC_OMIT = 0x5
857 IP_PMTUDISC_PROBE = 0x3
858 IP_PMTUDISC_WANT = 0x1
859 IP_RECVERR = 0xb
860 IP_RECVFRAGSIZE = 0x19
861 IP_RECVOPTS = 0x6
862 IP_RECVORIGDSTADDR = 0x14
863 IP_RECVRETOPTS = 0x7
864 IP_RECVTOS = 0xd
865 IP_RECVTTL = 0xc
866 IP_RETOPTS = 0x7
867 IP_RF = 0x8000
868 IP_ROUTER_ALERT = 0x5
869 IP_TOS = 0x1
870 IP_TRANSPARENT = 0x13
871 IP_TTL = 0x2
872 IP_UNBLOCK_SOURCE = 0x25
873 IP_UNICAST_IF = 0x32
874 IP_XFRM_POLICY = 0x11
875 ISIG = 0x1
876 ISOFS_SUPER_MAGIC = 0x9660
877 ISTRIP = 0x20
878 IUCLC = 0x200
879 IUTF8 = 0x4000
880 IXANY = 0x800
881 IXOFF = 0x1000
882 IXON = 0x400
883 JFFS2_SUPER_MAGIC = 0x72b6
884 KEXEC_ARCH_386 = 0x30000
885 KEXEC_ARCH_68K = 0x40000
886 KEXEC_ARCH_AARCH64 = 0xb70000
887 KEXEC_ARCH_ARM = 0x280000
888 KEXEC_ARCH_DEFAULT = 0x0
889 KEXEC_ARCH_IA_64 = 0x320000
890 KEXEC_ARCH_MASK = 0xffff0000
891 KEXEC_ARCH_MIPS = 0x80000
892 KEXEC_ARCH_MIPS_LE = 0xa0000
893 KEXEC_ARCH_PPC = 0x140000
894 KEXEC_ARCH_PPC64 = 0x150000
895 KEXEC_ARCH_S390 = 0x160000
896 KEXEC_ARCH_SH = 0x2a0000
897 KEXEC_ARCH_X86_64 = 0x3e0000
898 KEXEC_FILE_NO_INITRAMFS = 0x4
899 KEXEC_FILE_ON_CRASH = 0x2
900 KEXEC_FILE_UNLOAD = 0x1
901 KEXEC_ON_CRASH = 0x1
902 KEXEC_PRESERVE_CONTEXT = 0x2
903 KEXEC_SEGMENT_MAX = 0x10
904 KEYCTL_ASSUME_AUTHORITY = 0x10
905 KEYCTL_CHOWN = 0x4
906 KEYCTL_CLEAR = 0x7
907 KEYCTL_DESCRIBE = 0x6
908 KEYCTL_DH_COMPUTE = 0x17
909 KEYCTL_GET_KEYRING_ID = 0x0
910 KEYCTL_GET_PERSISTENT = 0x16
911 KEYCTL_GET_SECURITY = 0x11
912 KEYCTL_INSTANTIATE = 0xc
913 KEYCTL_INSTANTIATE_IOV = 0x14
914 KEYCTL_INVALIDATE = 0x15
915 KEYCTL_JOIN_SESSION_KEYRING = 0x1
916 KEYCTL_LINK = 0x8
917 KEYCTL_NEGATE = 0xd
918 KEYCTL_PKEY_DECRYPT = 0x1a
919 KEYCTL_PKEY_ENCRYPT = 0x19
920 KEYCTL_PKEY_QUERY = 0x18
921 KEYCTL_PKEY_SIGN = 0x1b
922 KEYCTL_PKEY_VERIFY = 0x1c
923 KEYCTL_READ = 0xb
924 KEYCTL_REJECT = 0x13
925 KEYCTL_RESTRICT_KEYRING = 0x1d
926 KEYCTL_REVOKE = 0x3
927 KEYCTL_SEARCH = 0xa
928 KEYCTL_SESSION_TO_PARENT = 0x12
929 KEYCTL_SETPERM = 0x5
930 KEYCTL_SET_REQKEY_KEYRING = 0xe
931 KEYCTL_SET_TIMEOUT = 0xf
932 KEYCTL_SUPPORTS_DECRYPT = 0x2
933 KEYCTL_SUPPORTS_ENCRYPT = 0x1
934 KEYCTL_SUPPORTS_SIGN = 0x4
935 KEYCTL_SUPPORTS_VERIFY = 0x8
936 KEYCTL_UNLINK = 0x9
937 KEYCTL_UPDATE = 0x2
938 KEY_REQKEY_DEFL_DEFAULT = 0x0
939 KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
940 KEY_REQKEY_DEFL_NO_CHANGE = -0x1
941 KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
942 KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
943 KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
944 KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
945 KEY_REQKEY_DEFL_USER_KEYRING = 0x4
946 KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
947 KEY_SPEC_GROUP_KEYRING = -0x6
948 KEY_SPEC_PROCESS_KEYRING = -0x2
949 KEY_SPEC_REQKEY_AUTH_KEY = -0x7
950 KEY_SPEC_REQUESTOR_KEYRING = -0x8
951 KEY_SPEC_SESSION_KEYRING = -0x3
952 KEY_SPEC_THREAD_KEYRING = -0x1
953 KEY_SPEC_USER_KEYRING = -0x4
954 KEY_SPEC_USER_SESSION_KEYRING = -0x5
955 LINUX_REBOOT_CMD_CAD_OFF = 0x0
956 LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
957 LINUX_REBOOT_CMD_HALT = 0xcdef0123
958 LINUX_REBOOT_CMD_KEXEC = 0x45584543
959 LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
960 LINUX_REBOOT_CMD_RESTART = 0x1234567
961 LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
962 LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
963 LINUX_REBOOT_MAGIC1 = 0xfee1dead
964 LINUX_REBOOT_MAGIC2 = 0x28121969
965 LOCK_EX = 0x2
966 LOCK_NB = 0x4
967 LOCK_SH = 0x1
968 LOCK_UN = 0x8
969 MADV_DODUMP = 0x11
970 MADV_DOFORK = 0xb
971 MADV_DONTDUMP = 0x10
972 MADV_DONTFORK = 0xa
973 MADV_DONTNEED = 0x4
974 MADV_FREE = 0x8
975 MADV_HUGEPAGE = 0xe
976 MADV_HWPOISON = 0x64
977 MADV_KEEPONFORK = 0x13
978 MADV_MERGEABLE = 0xc
979 MADV_NOHUGEPAGE = 0xf
980 MADV_NORMAL = 0x0
981 MADV_RANDOM = 0x1
982 MADV_REMOVE = 0x9
983 MADV_SEQUENTIAL = 0x2
984 MADV_UNMERGEABLE = 0xd
985 MADV_WILLNEED = 0x3
986 MADV_WIPEONFORK = 0x12
987 MAP_ANON = 0x20
988 MAP_ANONYMOUS = 0x20
989 MAP_DENYWRITE = 0x800
990 MAP_EXECUTABLE = 0x1000
991 MAP_FILE = 0x0
992 MAP_FIXED = 0x10
993 MAP_FIXED_NOREPLACE = 0x100000
994 MAP_GROWSDOWN = 0x200
995 MAP_HUGETLB = 0x40000
996 MAP_HUGE_MASK = 0x3f
997 MAP_HUGE_SHIFT = 0x1a
998 MAP_LOCKED = 0x100
999 MAP_NONBLOCK = 0x10000
1000 MAP_NORESERVE = 0x40
1001 MAP_POPULATE = 0x8000
1002 MAP_PRIVATE = 0x2
1003 MAP_RENAME = 0x20
1004 MAP_SHARED = 0x1
1005 MAP_SHARED_VALIDATE = 0x3
1006 MAP_STACK = 0x20000
1007 MAP_TYPE = 0xf
1008 MCL_CURRENT = 0x2000
1009 MCL_FUTURE = 0x4000
1010 MCL_ONFAULT = 0x8000
1011 MFD_ALLOW_SEALING = 0x2
1012 MFD_CLOEXEC = 0x1
1013 MFD_HUGETLB = 0x4
1014 MFD_HUGE_16GB = -0x78000000
1015 MFD_HUGE_16MB = 0x60000000
1016 MFD_HUGE_1GB = 0x78000000
1017 MFD_HUGE_1MB = 0x50000000
1018 MFD_HUGE_256MB = 0x70000000
1019 MFD_HUGE_2GB = 0x7c000000
1020 MFD_HUGE_2MB = 0x54000000
1021 MFD_HUGE_32MB = 0x64000000
1022 MFD_HUGE_512KB = 0x4c000000
1023 MFD_HUGE_512MB = 0x74000000
1024 MFD_HUGE_64KB = 0x40000000
1025 MFD_HUGE_8MB = 0x5c000000
1026 MFD_HUGE_MASK = 0x3f
1027 MFD_HUGE_SHIFT = 0x1a
1028 MINIX2_SUPER_MAGIC = 0x2468
1029 MINIX2_SUPER_MAGIC2 = 0x2478
1030 MINIX3_SUPER_MAGIC = 0x4d5a
1031 MINIX_SUPER_MAGIC = 0x137f
1032 MINIX_SUPER_MAGIC2 = 0x138f
1033 MNT_DETACH = 0x2
1034 MNT_EXPIRE = 0x4
1035 MNT_FORCE = 0x1
1036 MODULE_INIT_IGNORE_MODVERSIONS = 0x1
1037 MODULE_INIT_IGNORE_VERMAGIC = 0x2
1038 MSDOS_SUPER_MAGIC = 0x4d44
1039 MSG_BATCH = 0x40000
1040 MSG_CMSG_CLOEXEC = 0x40000000
1041 MSG_CONFIRM = 0x800
1042 MSG_CTRUNC = 0x8
1043 MSG_DONTROUTE = 0x4
1044 MSG_DONTWAIT = 0x40
1045 MSG_EOR = 0x80
1046 MSG_ERRQUEUE = 0x2000
1047 MSG_FASTOPEN = 0x20000000
1048 MSG_FIN = 0x200
1049 MSG_MORE = 0x8000
1050 MSG_NOSIGNAL = 0x4000
1051 MSG_OOB = 0x1
1052 MSG_PEEK = 0x2
1053 MSG_PROXY = 0x10
1054 MSG_RST = 0x1000
1055 MSG_SYN = 0x400
1056 MSG_TRUNC = 0x20
1057 MSG_TRYHARD = 0x4
1058 MSG_WAITALL = 0x100
1059 MSG_WAITFORONE = 0x10000
1060 MSG_ZEROCOPY = 0x4000000
1061 MS_ACTIVE = 0x40000000
1062 MS_ASYNC = 0x1
1063 MS_BIND = 0x1000
1064 MS_BORN = 0x20000000
1065 MS_DIRSYNC = 0x80
1066 MS_INVALIDATE = 0x2
1067 MS_I_VERSION = 0x800000
1068 MS_KERNMOUNT = 0x400000
1069 MS_LAZYTIME = 0x2000000
1070 MS_MANDLOCK = 0x40
1071 MS_MGC_MSK = 0xffff0000
1072 MS_MGC_VAL = 0xc0ed0000
1073 MS_MOVE = 0x2000
1074 MS_NOATIME = 0x400
1075 MS_NODEV = 0x4
1076 MS_NODIRATIME = 0x800
1077 MS_NOEXEC = 0x8
1078 MS_NOREMOTELOCK = 0x8000000
1079 MS_NOSEC = 0x10000000
1080 MS_NOSUID = 0x2
1081 MS_NOUSER = -0x80000000
1082 MS_POSIXACL = 0x10000
1083 MS_PRIVATE = 0x40000
1084 MS_RDONLY = 0x1
1085 MS_REC = 0x4000
1086 MS_RELATIME = 0x200000
1087 MS_REMOUNT = 0x20
1088 MS_RMT_MASK = 0x2800051
1089 MS_SHARED = 0x100000
1090 MS_SILENT = 0x8000
1091 MS_SLAVE = 0x80000
1092 MS_STRICTATIME = 0x1000000
1093 MS_SUBMOUNT = 0x4000000
1094 MS_SYNC = 0x4
1095 MS_SYNCHRONOUS = 0x10
1096 MS_UNBINDABLE = 0x20000
1097 MS_VERBOSE = 0x8000
1098 MTD_INODE_FS_MAGIC = 0x11307854
1099 NAME_MAX = 0xff
1100 NCP_SUPER_MAGIC = 0x564c
1101 NETLINK_ADD_MEMBERSHIP = 0x1
1102 NETLINK_AUDIT = 0x9
1103 NETLINK_BROADCAST_ERROR = 0x4
1104 NETLINK_CAP_ACK = 0xa
1105 NETLINK_CONNECTOR = 0xb
1106 NETLINK_CRYPTO = 0x15
1107 NETLINK_DNRTMSG = 0xe
1108 NETLINK_DROP_MEMBERSHIP = 0x2
1109 NETLINK_ECRYPTFS = 0x13
1110 NETLINK_EXT_ACK = 0xb
1111 NETLINK_FIB_LOOKUP = 0xa
1112 NETLINK_FIREWALL = 0x3
1113 NETLINK_GENERIC = 0x10
1114 NETLINK_GET_STRICT_CHK = 0xc
1115 NETLINK_INET_DIAG = 0x4
1116 NETLINK_IP6_FW = 0xd
1117 NETLINK_ISCSI = 0x8
1118 NETLINK_KOBJECT_UEVENT = 0xf
1119 NETLINK_LISTEN_ALL_NSID = 0x8
1120 NETLINK_LIST_MEMBERSHIPS = 0x9
1121 NETLINK_NETFILTER = 0xc
1122 NETLINK_NFLOG = 0x5
1123 NETLINK_NO_ENOBUFS = 0x5
1124 NETLINK_PKTINFO = 0x3
1125 NETLINK_RDMA = 0x14
1126 NETLINK_ROUTE = 0x0
1127 NETLINK_RX_RING = 0x6
1128 NETLINK_SCSITRANSPORT = 0x12
1129 NETLINK_SELINUX = 0x7
1130 NETLINK_SMC = 0x16
1131 NETLINK_SOCK_DIAG = 0x4
1132 NETLINK_TX_RING = 0x7
1133 NETLINK_UNUSED = 0x1
1134 NETLINK_USERSOCK = 0x2
1135 NETLINK_XFRM = 0x6
1136 NETNSA_MAX = 0x3
1137 NETNSA_NSID_NOT_ASSIGNED = -0x1
1138 NFNETLINK_V0 = 0x0
1139 NFNLGRP_ACCT_QUOTA = 0x8
1140 NFNLGRP_CONNTRACK_DESTROY = 0x3
1141 NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
1142 NFNLGRP_CONNTRACK_EXP_NEW = 0x4
1143 NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
1144 NFNLGRP_CONNTRACK_NEW = 0x1
1145 NFNLGRP_CONNTRACK_UPDATE = 0x2
1146 NFNLGRP_MAX = 0x9
1147 NFNLGRP_NFTABLES = 0x7
1148 NFNLGRP_NFTRACE = 0x9
1149 NFNLGRP_NONE = 0x0
1150 NFNL_BATCH_MAX = 0x1
1151 NFNL_MSG_BATCH_BEGIN = 0x10
1152 NFNL_MSG_BATCH_END = 0x11
1153 NFNL_NFA_NEST = 0x8000
1154 NFNL_SUBSYS_ACCT = 0x7
1155 NFNL_SUBSYS_COUNT = 0xc
1156 NFNL_SUBSYS_CTHELPER = 0x9
1157 NFNL_SUBSYS_CTNETLINK = 0x1
1158 NFNL_SUBSYS_CTNETLINK_EXP = 0x2
1159 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
1160 NFNL_SUBSYS_IPSET = 0x6
1161 NFNL_SUBSYS_NFTABLES = 0xa
1162 NFNL_SUBSYS_NFT_COMPAT = 0xb
1163 NFNL_SUBSYS_NONE = 0x0
1164 NFNL_SUBSYS_OSF = 0x5
1165 NFNL_SUBSYS_QUEUE = 0x3
1166 NFNL_SUBSYS_ULOG = 0x4
1167 NFS_SUPER_MAGIC = 0x6969
1168 NILFS_SUPER_MAGIC = 0x3434
1169 NL0 = 0x0
1170 NL1 = 0x100
1171 NLA_ALIGNTO = 0x4
1172 NLA_F_NESTED = 0x8000
1173 NLA_F_NET_BYTEORDER = 0x4000
1174 NLA_HDRLEN = 0x4
1175 NLDLY = 0x100
1176 NLMSG_ALIGNTO = 0x4
1177 NLMSG_DONE = 0x3
1178 NLMSG_ERROR = 0x2
1179 NLMSG_HDRLEN = 0x10
1180 NLMSG_MIN_TYPE = 0x10
1181 NLMSG_NOOP = 0x1
1182 NLMSG_OVERRUN = 0x4
1183 NLM_F_ACK = 0x4
1184 NLM_F_ACK_TLVS = 0x200
1185 NLM_F_APPEND = 0x800
1186 NLM_F_ATOMIC = 0x400
1187 NLM_F_CAPPED = 0x100
1188 NLM_F_CREATE = 0x400
1189 NLM_F_DUMP = 0x300
1190 NLM_F_DUMP_FILTERED = 0x20
1191 NLM_F_DUMP_INTR = 0x10
1192 NLM_F_ECHO = 0x8
1193 NLM_F_EXCL = 0x200
1194 NLM_F_MATCH = 0x200
1195 NLM_F_MULTI = 0x2
1196 NLM_F_NONREC = 0x100
1197 NLM_F_REPLACE = 0x100
1198 NLM_F_REQUEST = 0x1
1199 NLM_F_ROOT = 0x100
1200 NOFLSH = 0x80
1201 NSFS_MAGIC = 0x6e736673
1202 OCFS2_SUPER_MAGIC = 0x7461636f
1203 OCRNL = 0x8
1204 OFDEL = 0x80
1205 OFILL = 0x40
1206 OLCUC = 0x2
1207 ONLCR = 0x4
1208 ONLRET = 0x20
1209 ONOCR = 0x10
1210 OPENPROM_SUPER_MAGIC = 0x9fa1
1211 OPOST = 0x1
1212 OVERLAYFS_SUPER_MAGIC = 0x794c7630
1213 O_ACCMODE = 0x3
1214 O_APPEND = 0x8
1215 O_ASYNC = 0x40
1216 O_CLOEXEC = 0x400000
1217 O_CREAT = 0x200
1218 O_DIRECT = 0x100000
1219 O_DIRECTORY = 0x10000
1220 O_DSYNC = 0x2000
1221 O_EXCL = 0x800
1222 O_FSYNC = 0x802000
1223 O_LARGEFILE = 0x0
1224 O_NDELAY = 0x4004
1225 O_NOATIME = 0x200000
1226 O_NOCTTY = 0x8000
1227 O_NOFOLLOW = 0x20000
1228 O_NONBLOCK = 0x4000
1229 O_PATH = 0x1000000
1230 O_RDONLY = 0x0
1231 O_RDWR = 0x2
1232 O_RSYNC = 0x802000
1233 O_SYNC = 0x802000
1234 O_TMPFILE = 0x2010000
1235 O_TRUNC = 0x400
1236 O_WRONLY = 0x1
1237 PACKET_ADD_MEMBERSHIP = 0x1
1238 PACKET_AUXDATA = 0x8
1239 PACKET_BROADCAST = 0x1
1240 PACKET_COPY_THRESH = 0x7
1241 PACKET_DROP_MEMBERSHIP = 0x2
1242 PACKET_FANOUT = 0x12
1243 PACKET_FANOUT_CBPF = 0x6
1244 PACKET_FANOUT_CPU = 0x2
1245 PACKET_FANOUT_DATA = 0x16
1246 PACKET_FANOUT_EBPF = 0x7
1247 PACKET_FANOUT_FLAG_DEFRAG = 0x8000
1248 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
1249 PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
1250 PACKET_FANOUT_HASH = 0x0
1251 PACKET_FANOUT_LB = 0x1
1252 PACKET_FANOUT_QM = 0x5
1253 PACKET_FANOUT_RND = 0x4
1254 PACKET_FANOUT_ROLLOVER = 0x3
1255 PACKET_FASTROUTE = 0x6
1256 PACKET_HDRLEN = 0xb
1257 PACKET_HOST = 0x0
1258 PACKET_IGNORE_OUTGOING = 0x17
1259 PACKET_KERNEL = 0x7
1260 PACKET_LOOPBACK = 0x5
1261 PACKET_LOSS = 0xe
1262 PACKET_MR_ALLMULTI = 0x2
1263 PACKET_MR_MULTICAST = 0x0
1264 PACKET_MR_PROMISC = 0x1
1265 PACKET_MR_UNICAST = 0x3
1266 PACKET_MULTICAST = 0x2
1267 PACKET_ORIGDEV = 0x9
1268 PACKET_OTHERHOST = 0x3
1269 PACKET_OUTGOING = 0x4
1270 PACKET_QDISC_BYPASS = 0x14
1271 PACKET_RECV_OUTPUT = 0x3
1272 PACKET_RESERVE = 0xc
1273 PACKET_ROLLOVER_STATS = 0x15
1274 PACKET_RX_RING = 0x5
1275 PACKET_STATISTICS = 0x6
1276 PACKET_TIMESTAMP = 0x11
1277 PACKET_TX_HAS_OFF = 0x13
1278 PACKET_TX_RING = 0xd
1279 PACKET_TX_TIMESTAMP = 0x10
1280 PACKET_USER = 0x6
1281 PACKET_VERSION = 0xa
1282 PACKET_VNET_HDR = 0xf
1283 PARENB = 0x100
1284 PARITY_CRC16_PR0 = 0x2
1285 PARITY_CRC16_PR0_CCITT = 0x4
1286 PARITY_CRC16_PR1 = 0x3
1287 PARITY_CRC16_PR1_CCITT = 0x5
1288 PARITY_CRC32_PR0_CCITT = 0x6
1289 PARITY_CRC32_PR1_CCITT = 0x7
1290 PARITY_DEFAULT = 0x0
1291 PARITY_NONE = 0x1
1292 PARMRK = 0x8
1293 PARODD = 0x200
1294 PENDIN = 0x4000
1295 PERF_EVENT_IOC_DISABLE = 0x20002401
1296 PERF_EVENT_IOC_ENABLE = 0x20002400
1297 PERF_EVENT_IOC_ID = 0x40082407
1298 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
1299 PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
1300 PERF_EVENT_IOC_PERIOD = 0x80082404
1301 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
1302 PERF_EVENT_IOC_REFRESH = 0x20002402
1303 PERF_EVENT_IOC_RESET = 0x20002403
1304 PERF_EVENT_IOC_SET_BPF = 0x80042408
1305 PERF_EVENT_IOC_SET_FILTER = 0x80082406
1306 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
1307 PIPEFS_MAGIC = 0x50495045
1308 PPPIOCATTACH = 0x8004743d
1309 PPPIOCATTCHAN = 0x80047438
1310 PPPIOCCONNECT = 0x8004743a
1311 PPPIOCDETACH = 0x8004743c
1312 PPPIOCDISCONN = 0x20007439
1313 PPPIOCGASYNCMAP = 0x40047458
1314 PPPIOCGCHAN = 0x40047437
1315 PPPIOCGDEBUG = 0x40047441
1316 PPPIOCGFLAGS = 0x4004745a
1317 PPPIOCGIDLE = 0x4010743f
1318 PPPIOCGL2TPSTATS = 0x40487436
1319 PPPIOCGMRU = 0x40047453
1320 PPPIOCGNPMODE = 0xc008744c
1321 PPPIOCGRASYNCMAP = 0x40047455
1322 PPPIOCGUNIT = 0x40047456
1323 PPPIOCGXASYNCMAP = 0x40207450
1324 PPPIOCNEWUNIT = 0xc004743e
1325 PPPIOCSACTIVE = 0x80107446
1326 PPPIOCSASYNCMAP = 0x80047457
1327 PPPIOCSCOMPRESS = 0x8010744d
1328 PPPIOCSDEBUG = 0x80047440
1329 PPPIOCSFLAGS = 0x80047459
1330 PPPIOCSMAXCID = 0x80047451
1331 PPPIOCSMRRU = 0x8004743b
1332 PPPIOCSMRU = 0x80047452
1333 PPPIOCSNPMODE = 0x8008744b
1334 PPPIOCSPASS = 0x80107447
1335 PPPIOCSRASYNCMAP = 0x80047454
1336 PPPIOCSXASYNCMAP = 0x8020744f
1337 PPPIOCXFERUNIT = 0x2000744e
1338 PRIO_PGRP = 0x1
1339 PRIO_PROCESS = 0x0
1340 PRIO_USER = 0x2
1341 PROC_SUPER_MAGIC = 0x9fa0
1342 PROT_EXEC = 0x4
1343 PROT_GROWSDOWN = 0x1000000
1344 PROT_GROWSUP = 0x2000000
1345 PROT_NONE = 0x0
1346 PROT_READ = 0x1
1347 PROT_WRITE = 0x2
1348 PR_CAPBSET_DROP = 0x18
1349 PR_CAPBSET_READ = 0x17
1350 PR_CAP_AMBIENT = 0x2f
1351 PR_CAP_AMBIENT_CLEAR_ALL = 0x4
1352 PR_CAP_AMBIENT_IS_SET = 0x1
1353 PR_CAP_AMBIENT_LOWER = 0x3
1354 PR_CAP_AMBIENT_RAISE = 0x2
1355 PR_ENDIAN_BIG = 0x0
1356 PR_ENDIAN_LITTLE = 0x1
1357 PR_ENDIAN_PPC_LITTLE = 0x2
1358 PR_FPEMU_NOPRINT = 0x1
1359 PR_FPEMU_SIGFPE = 0x2
1360 PR_FP_EXC_ASYNC = 0x2
1361 PR_FP_EXC_DISABLED = 0x0
1362 PR_FP_EXC_DIV = 0x10000
1363 PR_FP_EXC_INV = 0x100000
1364 PR_FP_EXC_NONRECOV = 0x1
1365 PR_FP_EXC_OVF = 0x20000
1366 PR_FP_EXC_PRECISE = 0x3
1367 PR_FP_EXC_RES = 0x80000
1368 PR_FP_EXC_SW_ENABLE = 0x80
1369 PR_FP_EXC_UND = 0x40000
1370 PR_FP_MODE_FR = 0x1
1371 PR_FP_MODE_FRE = 0x2
1372 PR_GET_CHILD_SUBREAPER = 0x25
1373 PR_GET_DUMPABLE = 0x3
1374 PR_GET_ENDIAN = 0x13
1375 PR_GET_FPEMU = 0x9
1376 PR_GET_FPEXC = 0xb
1377 PR_GET_FP_MODE = 0x2e
1378 PR_GET_KEEPCAPS = 0x7
1379 PR_GET_NAME = 0x10
1380 PR_GET_NO_NEW_PRIVS = 0x27
1381 PR_GET_PDEATHSIG = 0x2
1382 PR_GET_SECCOMP = 0x15
1383 PR_GET_SECUREBITS = 0x1b
1384 PR_GET_SPECULATION_CTRL = 0x34
1385 PR_GET_THP_DISABLE = 0x2a
1386 PR_GET_TID_ADDRESS = 0x28
1387 PR_GET_TIMERSLACK = 0x1e
1388 PR_GET_TIMING = 0xd
1389 PR_GET_TSC = 0x19
1390 PR_GET_UNALIGN = 0x5
1391 PR_MCE_KILL = 0x21
1392 PR_MCE_KILL_CLEAR = 0x0
1393 PR_MCE_KILL_DEFAULT = 0x2
1394 PR_MCE_KILL_EARLY = 0x1
1395 PR_MCE_KILL_GET = 0x22
1396 PR_MCE_KILL_LATE = 0x0
1397 PR_MCE_KILL_SET = 0x1
1398 PR_MPX_DISABLE_MANAGEMENT = 0x2c
1399 PR_MPX_ENABLE_MANAGEMENT = 0x2b
1400 PR_SET_CHILD_SUBREAPER = 0x24
1401 PR_SET_DUMPABLE = 0x4
1402 PR_SET_ENDIAN = 0x14
1403 PR_SET_FPEMU = 0xa
1404 PR_SET_FPEXC = 0xc
1405 PR_SET_FP_MODE = 0x2d
1406 PR_SET_KEEPCAPS = 0x8
1407 PR_SET_MM = 0x23
1408 PR_SET_MM_ARG_END = 0x9
1409 PR_SET_MM_ARG_START = 0x8
1410 PR_SET_MM_AUXV = 0xc
1411 PR_SET_MM_BRK = 0x7
1412 PR_SET_MM_END_CODE = 0x2
1413 PR_SET_MM_END_DATA = 0x4
1414 PR_SET_MM_ENV_END = 0xb
1415 PR_SET_MM_ENV_START = 0xa
1416 PR_SET_MM_EXE_FILE = 0xd
1417 PR_SET_MM_MAP = 0xe
1418 PR_SET_MM_MAP_SIZE = 0xf
1419 PR_SET_MM_START_BRK = 0x6
1420 PR_SET_MM_START_CODE = 0x1
1421 PR_SET_MM_START_DATA = 0x3
1422 PR_SET_MM_START_STACK = 0x5
1423 PR_SET_NAME = 0xf
1424 PR_SET_NO_NEW_PRIVS = 0x26
1425 PR_SET_PDEATHSIG = 0x1
1426 PR_SET_PTRACER = 0x59616d61
1427 PR_SET_PTRACER_ANY = 0xffffffffffffffff
1428 PR_SET_SECCOMP = 0x16
1429 PR_SET_SECUREBITS = 0x1c
1430 PR_SET_SPECULATION_CTRL = 0x35
1431 PR_SET_THP_DISABLE = 0x29
1432 PR_SET_TIMERSLACK = 0x1d
1433 PR_SET_TIMING = 0xe
1434 PR_SET_TSC = 0x1a
1435 PR_SET_UNALIGN = 0x6
1436 PR_SPEC_DISABLE = 0x4
1437 PR_SPEC_ENABLE = 0x2
1438 PR_SPEC_FORCE_DISABLE = 0x8
1439 PR_SPEC_INDIRECT_BRANCH = 0x1
1440 PR_SPEC_NOT_AFFECTED = 0x0
1441 PR_SPEC_PRCTL = 0x1
1442 PR_SPEC_STORE_BYPASS = 0x0
1443 PR_SVE_GET_VL = 0x33
1444 PR_SVE_SET_VL = 0x32
1445 PR_SVE_SET_VL_ONEXEC = 0x40000
1446 PR_SVE_VL_INHERIT = 0x20000
1447 PR_SVE_VL_LEN_MASK = 0xffff
1448 PR_TASK_PERF_EVENTS_DISABLE = 0x1f
1449 PR_TASK_PERF_EVENTS_ENABLE = 0x20
1450 PR_TIMING_STATISTICAL = 0x0
1451 PR_TIMING_TIMESTAMP = 0x1
1452 PR_TSC_ENABLE = 0x1
1453 PR_TSC_SIGSEGV = 0x2
1454 PR_UNALIGN_NOPRINT = 0x1
1455 PR_UNALIGN_SIGBUS = 0x2
1456 PSTOREFS_MAGIC = 0x6165676c
1457 PTRACE_ATTACH = 0x10
1458 PTRACE_CONT = 0x7
1459 PTRACE_DETACH = 0x11
1460 PTRACE_EVENT_CLONE = 0x3
1461 PTRACE_EVENT_EXEC = 0x4
1462 PTRACE_EVENT_EXIT = 0x6
1463 PTRACE_EVENT_FORK = 0x1
1464 PTRACE_EVENT_SECCOMP = 0x7
1465 PTRACE_EVENT_STOP = 0x80
1466 PTRACE_EVENT_VFORK = 0x2
1467 PTRACE_EVENT_VFORK_DONE = 0x5
1468 PTRACE_GETEVENTMSG = 0x4201
1469 PTRACE_GETFPAREGS = 0x14
1470 PTRACE_GETFPREGS = 0xe
1471 PTRACE_GETFPREGS64 = 0x19
1472 PTRACE_GETREGS = 0xc
1473 PTRACE_GETREGS64 = 0x16
1474 PTRACE_GETREGSET = 0x4204
1475 PTRACE_GETSIGINFO = 0x4202
1476 PTRACE_GETSIGMASK = 0x420a
1477 PTRACE_INTERRUPT = 0x4207
1478 PTRACE_KILL = 0x8
1479 PTRACE_LISTEN = 0x4208
1480 PTRACE_O_EXITKILL = 0x100000
1481 PTRACE_O_MASK = 0x3000ff
1482 PTRACE_O_SUSPEND_SECCOMP = 0x200000
1483 PTRACE_O_TRACECLONE = 0x8
1484 PTRACE_O_TRACEEXEC = 0x10
1485 PTRACE_O_TRACEEXIT = 0x40
1486 PTRACE_O_TRACEFORK = 0x2
1487 PTRACE_O_TRACESECCOMP = 0x80
1488 PTRACE_O_TRACESYSGOOD = 0x1
1489 PTRACE_O_TRACEVFORK = 0x4
1490 PTRACE_O_TRACEVFORKDONE = 0x20
1491 PTRACE_PEEKDATA = 0x2
1492 PTRACE_PEEKSIGINFO = 0x4209
1493 PTRACE_PEEKSIGINFO_SHARED = 0x1
1494 PTRACE_PEEKTEXT = 0x1
1495 PTRACE_PEEKUSR = 0x3
1496 PTRACE_POKEDATA = 0x5
1497 PTRACE_POKETEXT = 0x4
1498 PTRACE_POKEUSR = 0x6
1499 PTRACE_READDATA = 0x10
1500 PTRACE_READTEXT = 0x12
1501 PTRACE_SECCOMP_GET_FILTER = 0x420c
1502 PTRACE_SECCOMP_GET_METADATA = 0x420d
1503 PTRACE_SEIZE = 0x4206
1504 PTRACE_SETFPAREGS = 0x15
1505 PTRACE_SETFPREGS = 0xf
1506 PTRACE_SETFPREGS64 = 0x1a
1507 PTRACE_SETOPTIONS = 0x4200
1508 PTRACE_SETREGS = 0xd
1509 PTRACE_SETREGS64 = 0x17
1510 PTRACE_SETREGSET = 0x4205
1511 PTRACE_SETSIGINFO = 0x4203
1512 PTRACE_SETSIGMASK = 0x420b
1513 PTRACE_SINGLESTEP = 0x9
1514 PTRACE_SPARC_DETACH = 0xb
1515 PTRACE_SYSCALL = 0x18
1516 PTRACE_TRACEME = 0x0
1517 PTRACE_WRITEDATA = 0x11
1518 PTRACE_WRITETEXT = 0x13
1519 PT_FP = 0x48
1520 PT_G0 = 0x10
1521 PT_G1 = 0x14
1522 PT_G2 = 0x18
1523 PT_G3 = 0x1c
1524 PT_G4 = 0x20
1525 PT_G5 = 0x24
1526 PT_G6 = 0x28
1527 PT_G7 = 0x2c
1528 PT_I0 = 0x30
1529 PT_I1 = 0x34
1530 PT_I2 = 0x38
1531 PT_I3 = 0x3c
1532 PT_I4 = 0x40
1533 PT_I5 = 0x44
1534 PT_I6 = 0x48
1535 PT_I7 = 0x4c
1536 PT_NPC = 0x8
1537 PT_PC = 0x4
1538 PT_PSR = 0x0
1539 PT_REGS_MAGIC = 0x57ac6c00
1540 PT_TNPC = 0x90
1541 PT_TPC = 0x88
1542 PT_TSTATE = 0x80
1543 PT_V9_FP = 0x70
1544 PT_V9_G0 = 0x0
1545 PT_V9_G1 = 0x8
1546 PT_V9_G2 = 0x10
1547 PT_V9_G3 = 0x18
1548 PT_V9_G4 = 0x20
1549 PT_V9_G5 = 0x28
1550 PT_V9_G6 = 0x30
1551 PT_V9_G7 = 0x38
1552 PT_V9_I0 = 0x40
1553 PT_V9_I1 = 0x48
1554 PT_V9_I2 = 0x50
1555 PT_V9_I3 = 0x58
1556 PT_V9_I4 = 0x60
1557 PT_V9_I5 = 0x68
1558 PT_V9_I6 = 0x70
1559 PT_V9_I7 = 0x78
1560 PT_V9_MAGIC = 0x9c
1561 PT_V9_TNPC = 0x90
1562 PT_V9_TPC = 0x88
1563 PT_V9_TSTATE = 0x80
1564 PT_V9_Y = 0x98
1565 PT_WIM = 0x10
1566 PT_Y = 0xc
1567 QNX4_SUPER_MAGIC = 0x2f
1568 QNX6_SUPER_MAGIC = 0x68191122
1569 RAMFS_MAGIC = 0x858458f6
1570 RDTGROUP_SUPER_MAGIC = 0x7655821
1571 REISERFS_SUPER_MAGIC = 0x52654973
1572 RENAME_EXCHANGE = 0x2
1573 RENAME_NOREPLACE = 0x1
1574 RENAME_WHITEOUT = 0x4
1575 RLIMIT_AS = 0x9
1576 RLIMIT_CORE = 0x4
1577 RLIMIT_CPU = 0x0
1578 RLIMIT_DATA = 0x2
1579 RLIMIT_FSIZE = 0x1
1580 RLIMIT_LOCKS = 0xa
1581 RLIMIT_MEMLOCK = 0x8
1582 RLIMIT_MSGQUEUE = 0xc
1583 RLIMIT_NICE = 0xd
1584 RLIMIT_NOFILE = 0x6
1585 RLIMIT_NPROC = 0x7
1586 RLIMIT_RSS = 0x5
1587 RLIMIT_RTPRIO = 0xe
1588 RLIMIT_RTTIME = 0xf
1589 RLIMIT_SIGPENDING = 0xb
1590 RLIMIT_STACK = 0x3
1591 RLIM_INFINITY = 0xffffffffffffffff
1592 RTAX_ADVMSS = 0x8
1593 RTAX_CC_ALGO = 0x10
1594 RTAX_CWND = 0x7
1595 RTAX_FASTOPEN_NO_COOKIE = 0x11
1596 RTAX_FEATURES = 0xc
1597 RTAX_FEATURE_ALLFRAG = 0x8
1598 RTAX_FEATURE_ECN = 0x1
1599 RTAX_FEATURE_MASK = 0xf
1600 RTAX_FEATURE_SACK = 0x2
1601 RTAX_FEATURE_TIMESTAMP = 0x4
1602 RTAX_HOPLIMIT = 0xa
1603 RTAX_INITCWND = 0xb
1604 RTAX_INITRWND = 0xe
1605 RTAX_LOCK = 0x1
1606 RTAX_MAX = 0x11
1607 RTAX_MTU = 0x2
1608 RTAX_QUICKACK = 0xf
1609 RTAX_REORDERING = 0x9
1610 RTAX_RTO_MIN = 0xd
1611 RTAX_RTT = 0x4
1612 RTAX_RTTVAR = 0x5
1613 RTAX_SSTHRESH = 0x6
1614 RTAX_UNSPEC = 0x0
1615 RTAX_WINDOW = 0x3
1616 RTA_ALIGNTO = 0x4
1617 RTA_MAX = 0x1d
1618 RTCF_DIRECTSRC = 0x4000000
1619 RTCF_DOREDIRECT = 0x1000000
1620 RTCF_LOG = 0x2000000
1621 RTCF_MASQ = 0x400000
1622 RTCF_NAT = 0x800000
1623 RTCF_VALVE = 0x200000
1624 RTC_AF = 0x20
1625 RTC_AIE_OFF = 0x20007002
1626 RTC_AIE_ON = 0x20007001
1627 RTC_ALM_READ = 0x40247008
1628 RTC_ALM_SET = 0x80247007
1629 RTC_EPOCH_READ = 0x4008700d
1630 RTC_EPOCH_SET = 0x8008700e
1631 RTC_IRQF = 0x80
1632 RTC_IRQP_READ = 0x4008700b
1633 RTC_IRQP_SET = 0x8008700c
1634 RTC_MAX_FREQ = 0x2000
1635 RTC_PF = 0x40
1636 RTC_PIE_OFF = 0x20007006
1637 RTC_PIE_ON = 0x20007005
1638 RTC_PLL_GET = 0x40207011
1639 RTC_PLL_SET = 0x80207012
1640 RTC_RD_TIME = 0x40247009
1641 RTC_SET_TIME = 0x8024700a
1642 RTC_UF = 0x10
1643 RTC_UIE_OFF = 0x20007004
1644 RTC_UIE_ON = 0x20007003
1645 RTC_VL_CLR = 0x20007014
1646 RTC_VL_READ = 0x40047013
1647 RTC_WIE_OFF = 0x20007010
1648 RTC_WIE_ON = 0x2000700f
1649 RTC_WKALM_RD = 0x40287010
1650 RTC_WKALM_SET = 0x8028700f
1651 RTF_ADDRCLASSMASK = 0xf8000000
1652 RTF_ADDRCONF = 0x40000
1653 RTF_ALLONLINK = 0x20000
1654 RTF_BROADCAST = 0x10000000
1655 RTF_CACHE = 0x1000000
1656 RTF_DEFAULT = 0x10000
1657 RTF_DYNAMIC = 0x10
1658 RTF_FLOW = 0x2000000
1659 RTF_GATEWAY = 0x2
1660 RTF_HOST = 0x4
1661 RTF_INTERFACE = 0x40000000
1662 RTF_IRTT = 0x100
1663 RTF_LINKRT = 0x100000
1664 RTF_LOCAL = 0x80000000
1665 RTF_MODIFIED = 0x20
1666 RTF_MSS = 0x40
1667 RTF_MTU = 0x40
1668 RTF_MULTICAST = 0x20000000
1669 RTF_NAT = 0x8000000
1670 RTF_NOFORWARD = 0x1000
1671 RTF_NONEXTHOP = 0x200000
1672 RTF_NOPMTUDISC = 0x4000
1673 RTF_POLICY = 0x4000000
1674 RTF_REINSTATE = 0x8
1675 RTF_REJECT = 0x200
1676 RTF_STATIC = 0x400
1677 RTF_THROW = 0x2000
1678 RTF_UP = 0x1
1679 RTF_WINDOW = 0x80
1680 RTF_XRESOLVE = 0x800
1681 RTM_BASE = 0x10
1682 RTM_DELACTION = 0x31
1683 RTM_DELADDR = 0x15
1684 RTM_DELADDRLABEL = 0x49
1685 RTM_DELCHAIN = 0x65
1686 RTM_DELLINK = 0x11
1687 RTM_DELMDB = 0x55
1688 RTM_DELNEIGH = 0x1d
1689 RTM_DELNETCONF = 0x51
1690 RTM_DELNSID = 0x59
1691 RTM_DELQDISC = 0x25
1692 RTM_DELROUTE = 0x19
1693 RTM_DELRULE = 0x21
1694 RTM_DELTCLASS = 0x29
1695 RTM_DELTFILTER = 0x2d
1696 RTM_F_CLONED = 0x200
1697 RTM_F_EQUALIZE = 0x400
1698 RTM_F_FIB_MATCH = 0x2000
1699 RTM_F_LOOKUP_TABLE = 0x1000
1700 RTM_F_NOTIFY = 0x100
1701 RTM_F_PREFIX = 0x800
1702 RTM_GETACTION = 0x32
1703 RTM_GETADDR = 0x16
1704 RTM_GETADDRLABEL = 0x4a
1705 RTM_GETANYCAST = 0x3e
1706 RTM_GETCHAIN = 0x66
1707 RTM_GETDCB = 0x4e
1708 RTM_GETLINK = 0x12
1709 RTM_GETMDB = 0x56
1710 RTM_GETMULTICAST = 0x3a
1711 RTM_GETNEIGH = 0x1e
1712 RTM_GETNEIGHTBL = 0x42
1713 RTM_GETNETCONF = 0x52
1714 RTM_GETNSID = 0x5a
1715 RTM_GETQDISC = 0x26
1716 RTM_GETROUTE = 0x1a
1717 RTM_GETRULE = 0x22
1718 RTM_GETSTATS = 0x5e
1719 RTM_GETTCLASS = 0x2a
1720 RTM_GETTFILTER = 0x2e
1721 RTM_MAX = 0x67
1722 RTM_NEWACTION = 0x30
1723 RTM_NEWADDR = 0x14
1724 RTM_NEWADDRLABEL = 0x48
1725 RTM_NEWCACHEREPORT = 0x60
1726 RTM_NEWCHAIN = 0x64
1727 RTM_NEWLINK = 0x10
1728 RTM_NEWMDB = 0x54
1729 RTM_NEWNDUSEROPT = 0x44
1730 RTM_NEWNEIGH = 0x1c
1731 RTM_NEWNEIGHTBL = 0x40
1732 RTM_NEWNETCONF = 0x50
1733 RTM_NEWNSID = 0x58
1734 RTM_NEWPREFIX = 0x34
1735 RTM_NEWQDISC = 0x24
1736 RTM_NEWROUTE = 0x18
1737 RTM_NEWRULE = 0x20
1738 RTM_NEWSTATS = 0x5c
1739 RTM_NEWTCLASS = 0x28
1740 RTM_NEWTFILTER = 0x2c
1741 RTM_NR_FAMILIES = 0x16
1742 RTM_NR_MSGTYPES = 0x58
1743 RTM_SETDCB = 0x4f
1744 RTM_SETLINK = 0x13
1745 RTM_SETNEIGHTBL = 0x43
1746 RTNH_ALIGNTO = 0x4
1747 RTNH_COMPARE_MASK = 0x19
1748 RTNH_F_DEAD = 0x1
1749 RTNH_F_LINKDOWN = 0x10
1750 RTNH_F_OFFLOAD = 0x8
1751 RTNH_F_ONLINK = 0x4
1752 RTNH_F_PERVASIVE = 0x2
1753 RTNH_F_UNRESOLVED = 0x20
1754 RTN_MAX = 0xb
1755 RTPROT_BABEL = 0x2a
1756 RTPROT_BGP = 0xba
1757 RTPROT_BIRD = 0xc
1758 RTPROT_BOOT = 0x3
1759 RTPROT_DHCP = 0x10
1760 RTPROT_DNROUTED = 0xd
1761 RTPROT_EIGRP = 0xc0
1762 RTPROT_GATED = 0x8
1763 RTPROT_ISIS = 0xbb
1764 RTPROT_KERNEL = 0x2
1765 RTPROT_MROUTED = 0x11
1766 RTPROT_MRT = 0xa
1767 RTPROT_NTK = 0xf
1768 RTPROT_OSPF = 0xbc
1769 RTPROT_RA = 0x9
1770 RTPROT_REDIRECT = 0x1
1771 RTPROT_RIP = 0xbd
1772 RTPROT_STATIC = 0x4
1773 RTPROT_UNSPEC = 0x0
1774 RTPROT_XORP = 0xe
1775 RTPROT_ZEBRA = 0xb
1776 RT_CLASS_DEFAULT = 0xfd
1777 RT_CLASS_LOCAL = 0xff
1778 RT_CLASS_MAIN = 0xfe
1779 RT_CLASS_MAX = 0xff
1780 RT_CLASS_UNSPEC = 0x0
1781 RUSAGE_CHILDREN = -0x1
1782 RUSAGE_SELF = 0x0
1783 RUSAGE_THREAD = 0x1
1784 SCM_CREDENTIALS = 0x2
1785 SCM_RIGHTS = 0x1
1786 SCM_TIMESTAMP = 0x1d
1787 SCM_TIMESTAMPING = 0x23
1788 SCM_TIMESTAMPING_OPT_STATS = 0x38
1789 SCM_TIMESTAMPING_PKTINFO = 0x3c
1790 SCM_TIMESTAMPNS = 0x21
1791 SCM_TXTIME = 0x3f
1792 SCM_WIFI_STATUS = 0x25
1793 SC_LOG_FLUSH = 0x100000
1794 SECCOMP_MODE_DISABLED = 0x0
1795 SECCOMP_MODE_FILTER = 0x2
1796 SECCOMP_MODE_STRICT = 0x1
1797 SECURITYFS_MAGIC = 0x73636673
1798 SELINUX_MAGIC = 0xf97cff8c
1799 SFD_CLOEXEC = 0x400000
1800 SFD_NONBLOCK = 0x4000
1801 SHUT_RD = 0x0
1802 SHUT_RDWR = 0x2
1803 SHUT_WR = 0x1
1804 SIOCADDDLCI = 0x8980
1805 SIOCADDMULTI = 0x8931
1806 SIOCADDRT = 0x890b
1807 SIOCATMARK = 0x8905
1808 SIOCBONDCHANGEACTIVE = 0x8995
1809 SIOCBONDENSLAVE = 0x8990
1810 SIOCBONDINFOQUERY = 0x8994
1811 SIOCBONDRELEASE = 0x8991
1812 SIOCBONDSETHWADDR = 0x8992
1813 SIOCBONDSLAVEINFOQUERY = 0x8993
1814 SIOCBRADDBR = 0x89a0
1815 SIOCBRADDIF = 0x89a2
1816 SIOCBRDELBR = 0x89a1
1817 SIOCBRDELIF = 0x89a3
1818 SIOCDARP = 0x8953
1819 SIOCDELDLCI = 0x8981
1820 SIOCDELMULTI = 0x8932
1821 SIOCDELRT = 0x890c
1822 SIOCDEVPRIVATE = 0x89f0
1823 SIOCDIFADDR = 0x8936
1824 SIOCDRARP = 0x8960
1825 SIOCETHTOOL = 0x8946
1826 SIOCGARP = 0x8954
1827 SIOCGHWTSTAMP = 0x89b1
1828 SIOCGIFADDR = 0x8915
1829 SIOCGIFBR = 0x8940
1830 SIOCGIFBRDADDR = 0x8919
1831 SIOCGIFCONF = 0x8912
1832 SIOCGIFCOUNT = 0x8938
1833 SIOCGIFDSTADDR = 0x8917
1834 SIOCGIFENCAP = 0x8925
1835 SIOCGIFFLAGS = 0x8913
1836 SIOCGIFHWADDR = 0x8927
1837 SIOCGIFINDEX = 0x8933
1838 SIOCGIFMAP = 0x8970
1839 SIOCGIFMEM = 0x891f
1840 SIOCGIFMETRIC = 0x891d
1841 SIOCGIFMTU = 0x8921
1842 SIOCGIFNAME = 0x8910
1843 SIOCGIFNETMASK = 0x891b
1844 SIOCGIFPFLAGS = 0x8935
1845 SIOCGIFSLAVE = 0x8929
1846 SIOCGIFTXQLEN = 0x8942
1847 SIOCGIFVLAN = 0x8982
1848 SIOCGMIIPHY = 0x8947
1849 SIOCGMIIREG = 0x8948
1850 SIOCGPGRP = 0x8904
1851 SIOCGPPPCSTATS = 0x89f2
1852 SIOCGPPPSTATS = 0x89f0
1853 SIOCGPPPVER = 0x89f1
1854 SIOCGRARP = 0x8961
1855 SIOCGSKNS = 0x894c
1856 SIOCGSTAMP = 0x8906
1857 SIOCGSTAMPNS = 0x8907
1858 SIOCINQ = 0x4004667f
1859 SIOCOUTQ = 0x40047473
1860 SIOCOUTQNSD = 0x894b
1861 SIOCPROTOPRIVATE = 0x89e0
1862 SIOCRTMSG = 0x890d
1863 SIOCSARP = 0x8955
1864 SIOCSHWTSTAMP = 0x89b0
1865 SIOCSIFADDR = 0x8916
1866 SIOCSIFBR = 0x8941
1867 SIOCSIFBRDADDR = 0x891a
1868 SIOCSIFDSTADDR = 0x8918
1869 SIOCSIFENCAP = 0x8926
1870 SIOCSIFFLAGS = 0x8914
1871 SIOCSIFHWADDR = 0x8924
1872 SIOCSIFHWBROADCAST = 0x8937
1873 SIOCSIFLINK = 0x8911
1874 SIOCSIFMAP = 0x8971
1875 SIOCSIFMEM = 0x8920
1876 SIOCSIFMETRIC = 0x891e
1877 SIOCSIFMTU = 0x8922
1878 SIOCSIFNAME = 0x8923
1879 SIOCSIFNETMASK = 0x891c
1880 SIOCSIFPFLAGS = 0x8934
1881 SIOCSIFSLAVE = 0x8930
1882 SIOCSIFTXQLEN = 0x8943
1883 SIOCSIFVLAN = 0x8983
1884 SIOCSMIIREG = 0x8949
1885 SIOCSPGRP = 0x8902
1886 SIOCSRARP = 0x8962
1887 SIOCWANDEV = 0x894a
1888 SMACK_MAGIC = 0x43415d53
1889 SMART_AUTOSAVE = 0xd2
1890 SMART_AUTO_OFFLINE = 0xdb
1891 SMART_DISABLE = 0xd9
1892 SMART_ENABLE = 0xd8
1893 SMART_HCYL_PASS = 0xc2
1894 SMART_IMMEDIATE_OFFLINE = 0xd4
1895 SMART_LCYL_PASS = 0x4f
1896 SMART_READ_LOG_SECTOR = 0xd5
1897 SMART_READ_THRESHOLDS = 0xd1
1898 SMART_READ_VALUES = 0xd0
1899 SMART_SAVE = 0xd3
1900 SMART_STATUS = 0xda
1901 SMART_WRITE_LOG_SECTOR = 0xd6
1902 SMART_WRITE_THRESHOLDS = 0xd7
1903 SMB_SUPER_MAGIC = 0x517b
1904 SOCKFS_MAGIC = 0x534f434b
1905 SOCK_CLOEXEC = 0x400000
1906 SOCK_DCCP = 0x6
1907 SOCK_DGRAM = 0x2
1908 SOCK_IOC_TYPE = 0x89
1909 SOCK_NONBLOCK = 0x4000
1910 SOCK_PACKET = 0xa
1911 SOCK_RAW = 0x3
1912 SOCK_RDM = 0x4
1913 SOCK_SEQPACKET = 0x5
1914 SOCK_STREAM = 0x1
1915 SOL_AAL = 0x109
1916 SOL_ALG = 0x117
1917 SOL_ATM = 0x108
1918 SOL_CAIF = 0x116
1919 SOL_CAN_BASE = 0x64
1920 SOL_DCCP = 0x10d
1921 SOL_DECNET = 0x105
1922 SOL_ICMPV6 = 0x3a
1923 SOL_IP = 0x0
1924 SOL_IPV6 = 0x29
1925 SOL_IRDA = 0x10a
1926 SOL_IUCV = 0x115
1927 SOL_KCM = 0x119
1928 SOL_LLC = 0x10c
1929 SOL_NETBEUI = 0x10b
1930 SOL_NETLINK = 0x10e
1931 SOL_NFC = 0x118
1932 SOL_PACKET = 0x107
1933 SOL_PNPIPE = 0x113
1934 SOL_PPPOL2TP = 0x111
1935 SOL_RAW = 0xff
1936 SOL_RDS = 0x114
1937 SOL_RXRPC = 0x110
1938 SOL_SOCKET = 0xffff
1939 SOL_TCP = 0x6
1940 SOL_TIPC = 0x10f
1941 SOL_TLS = 0x11a
1942 SOL_X25 = 0x106
1943 SOL_XDP = 0x11b
1944 SOMAXCONN = 0x80
1945 SO_ACCEPTCONN = 0x8000
1946 SO_ATTACH_BPF = 0x34
1947 SO_ATTACH_FILTER = 0x1a
1948 SO_ATTACH_REUSEPORT_CBPF = 0x35
1949 SO_ATTACH_REUSEPORT_EBPF = 0x36
1950 SO_BINDTODEVICE = 0xd
1951 SO_BPF_EXTENSIONS = 0x32
1952 SO_BROADCAST = 0x20
1953 SO_BSDCOMPAT = 0x400
1954 SO_BUSY_POLL = 0x30
1955 SO_CNX_ADVICE = 0x37
1956 SO_COOKIE = 0x3b
1957 SO_DEBUG = 0x1
1958 SO_DETACH_BPF = 0x1b
1959 SO_DETACH_FILTER = 0x1b
1960 SO_DOMAIN = 0x1029
1961 SO_DONTROUTE = 0x10
1962 SO_ERROR = 0x1007
1963 SO_GET_FILTER = 0x1a
1964 SO_INCOMING_CPU = 0x33
1965 SO_INCOMING_NAPI_ID = 0x3a
1966 SO_KEEPALIVE = 0x8
1967 SO_LINGER = 0x80
1968 SO_LOCK_FILTER = 0x28
1969 SO_MARK = 0x22
1970 SO_MAX_PACING_RATE = 0x31
1971 SO_MEMINFO = 0x39
1972 SO_NOFCS = 0x27
1973 SO_NO_CHECK = 0xb
1974 SO_OOBINLINE = 0x100
1975 SO_PASSCRED = 0x2
1976 SO_PASSSEC = 0x1f
1977 SO_PEEK_OFF = 0x26
1978 SO_PEERCRED = 0x40
1979 SO_PEERGROUPS = 0x3d
1980 SO_PEERNAME = 0x1c
1981 SO_PEERSEC = 0x1e
1982 SO_PRIORITY = 0xc
1983 SO_PROTOCOL = 0x1028
1984 SO_RCVBUF = 0x1002
1985 SO_RCVBUFFORCE = 0x100b
1986 SO_RCVLOWAT = 0x800
1987 SO_RCVTIMEO = 0x2000
1988 SO_REUSEADDR = 0x4
1989 SO_REUSEPORT = 0x200
1990 SO_RXQ_OVFL = 0x24
1991 SO_SECURITY_AUTHENTICATION = 0x5001
1992 SO_SECURITY_ENCRYPTION_NETWORK = 0x5004
1993 SO_SECURITY_ENCRYPTION_TRANSPORT = 0x5002
1994 SO_SELECT_ERR_QUEUE = 0x29
1995 SO_SNDBUF = 0x1001
1996 SO_SNDBUFFORCE = 0x100a
1997 SO_SNDLOWAT = 0x1000
1998 SO_SNDTIMEO = 0x4000
1999 SO_TIMESTAMP = 0x1d
2000 SO_TIMESTAMPING = 0x23
2001 SO_TIMESTAMPNS = 0x21
2002 SO_TXTIME = 0x3f
2003 SO_TYPE = 0x1008
2004 SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
2005 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
2006 SO_VM_SOCKETS_BUFFER_SIZE = 0x0
2007 SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
2008 SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
2009 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
2010 SO_VM_SOCKETS_TRUSTED = 0x5
2011 SO_WIFI_STATUS = 0x25
2012 SO_ZEROCOPY = 0x3e
2013 SPLICE_F_GIFT = 0x8
2014 SPLICE_F_MORE = 0x4
2015 SPLICE_F_MOVE = 0x1
2016 SPLICE_F_NONBLOCK = 0x2
2017 SQUASHFS_MAGIC = 0x73717368
2018 STACK_END_MAGIC = 0x57ac6e9d
2019 STATX_ALL = 0xfff
2020 STATX_ATIME = 0x20
2021 STATX_ATTR_APPEND = 0x20
2022 STATX_ATTR_AUTOMOUNT = 0x1000
2023 STATX_ATTR_COMPRESSED = 0x4
2024 STATX_ATTR_ENCRYPTED = 0x800
2025 STATX_ATTR_IMMUTABLE = 0x10
2026 STATX_ATTR_NODUMP = 0x40
2027 STATX_BASIC_STATS = 0x7ff
2028 STATX_BLOCKS = 0x400
2029 STATX_BTIME = 0x800
2030 STATX_CTIME = 0x80
2031 STATX_GID = 0x10
2032 STATX_INO = 0x100
2033 STATX_MODE = 0x2
2034 STATX_MTIME = 0x40
2035 STATX_NLINK = 0x4
2036 STATX_SIZE = 0x200
2037 STATX_TYPE = 0x1
2038 STATX_UID = 0x8
2039 STATX__RESERVED = 0x80000000
2040 SYNC_FILE_RANGE_WAIT_AFTER = 0x4
2041 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
2042 SYNC_FILE_RANGE_WRITE = 0x2
2043 SYSFS_MAGIC = 0x62656572
2044 S_BLKSIZE = 0x200
2045 S_IEXEC = 0x40
2046 S_IFBLK = 0x6000
2047 S_IFCHR = 0x2000
2048 S_IFDIR = 0x4000
2049 S_IFIFO = 0x1000
2050 S_IFLNK = 0xa000
2051 S_IFMT = 0xf000
2052 S_IFREG = 0x8000
2053 S_IFSOCK = 0xc000
2054 S_IREAD = 0x100
2055 S_IRGRP = 0x20
2056 S_IROTH = 0x4
2057 S_IRUSR = 0x100
2058 S_IRWXG = 0x38
2059 S_IRWXO = 0x7
2060 S_IRWXU = 0x1c0
2061 S_ISGID = 0x400
2062 S_ISUID = 0x800
2063 S_ISVTX = 0x200
2064 S_IWGRP = 0x10
2065 S_IWOTH = 0x2
2066 S_IWRITE = 0x80
2067 S_IWUSR = 0x80
2068 S_IXGRP = 0x8
2069 S_IXOTH = 0x1
2070 S_IXUSR = 0x40
2071 TAB0 = 0x0
2072 TAB1 = 0x800
2073 TAB2 = 0x1000
2074 TAB3 = 0x1800
2075 TABDLY = 0x1800
2076 TASKSTATS_CMD_ATTR_MAX = 0x4
2077 TASKSTATS_CMD_MAX = 0x2
2078 TASKSTATS_GENL_NAME = "TASKSTATS"
2079 TASKSTATS_GENL_VERSION = 0x1
2080 TASKSTATS_TYPE_MAX = 0x6
2081 TASKSTATS_VERSION = 0x9
2082 TCFLSH = 0x20005407
2083 TCGETA = 0x40125401
2084 TCGETS = 0x40245408
2085 TCGETS2 = 0x402c540c
2086 TCIFLUSH = 0x0
2087 TCIOFF = 0x2
2088 TCIOFLUSH = 0x2
2089 TCION = 0x3
2090 TCOFLUSH = 0x1
2091 TCOOFF = 0x0
2092 TCOON = 0x1
2093 TCP_CC_INFO = 0x1a
2094 TCP_CONGESTION = 0xd
2095 TCP_COOKIE_IN_ALWAYS = 0x1
2096 TCP_COOKIE_MAX = 0x10
2097 TCP_COOKIE_MIN = 0x8
2098 TCP_COOKIE_OUT_NEVER = 0x2
2099 TCP_COOKIE_PAIR_SIZE = 0x20
2100 TCP_COOKIE_TRANSACTIONS = 0xf
2101 TCP_CORK = 0x3
2102 TCP_DEFER_ACCEPT = 0x9
2103 TCP_FASTOPEN = 0x17
2104 TCP_FASTOPEN_CONNECT = 0x1e
2105 TCP_FASTOPEN_KEY = 0x21
2106 TCP_FASTOPEN_NO_COOKIE = 0x22
2107 TCP_INFO = 0xb
2108 TCP_KEEPCNT = 0x6
2109 TCP_KEEPIDLE = 0x4
2110 TCP_KEEPINTVL = 0x5
2111 TCP_LINGER2 = 0x8
2112 TCP_MAXSEG = 0x2
2113 TCP_MAXWIN = 0xffff
2114 TCP_MAX_WINSHIFT = 0xe
2115 TCP_MD5SIG = 0xe
2116 TCP_MD5SIG_EXT = 0x20
2117 TCP_MD5SIG_FLAG_PREFIX = 0x1
2118 TCP_MD5SIG_MAXKEYLEN = 0x50
2119 TCP_MSS = 0x200
2120 TCP_MSS_DEFAULT = 0x218
2121 TCP_MSS_DESIRED = 0x4c4
2122 TCP_NODELAY = 0x1
2123 TCP_NOTSENT_LOWAT = 0x19
2124 TCP_QUEUE_SEQ = 0x15
2125 TCP_QUICKACK = 0xc
2126 TCP_REPAIR = 0x13
2127 TCP_REPAIR_OPTIONS = 0x16
2128 TCP_REPAIR_QUEUE = 0x14
2129 TCP_REPAIR_WINDOW = 0x1d
2130 TCP_SAVED_SYN = 0x1c
2131 TCP_SAVE_SYN = 0x1b
2132 TCP_SYNCNT = 0x7
2133 TCP_S_DATA_IN = 0x4
2134 TCP_S_DATA_OUT = 0x8
2135 TCP_THIN_DUPACK = 0x11
2136 TCP_THIN_LINEAR_TIMEOUTS = 0x10
2137 TCP_TIMESTAMP = 0x18
2138 TCP_ULP = 0x1f
2139 TCP_USER_TIMEOUT = 0x12
2140 TCP_WINDOW_CLAMP = 0xa
2141 TCSAFLUSH = 0x2
2142 TCSBRK = 0x20005405
2143 TCSBRKP = 0x5425
2144 TCSETA = 0x80125402
2145 TCSETAF = 0x80125404
2146 TCSETAW = 0x80125403
2147 TCSETS = 0x80245409
2148 TCSETS2 = 0x802c540d
2149 TCSETSF = 0x8024540b
2150 TCSETSF2 = 0x802c540f
2151 TCSETSW = 0x8024540a
2152 TCSETSW2 = 0x802c540e
2153 TCXONC = 0x20005406
2154 TIMER_ABSTIME = 0x1
2155 TIOCCBRK = 0x2000747a
2156 TIOCCONS = 0x20007424
2157 TIOCEXCL = 0x2000740d
2158 TIOCGDEV = 0x40045432
2159 TIOCGETD = 0x40047400
2160 TIOCGEXCL = 0x40045440
2161 TIOCGICOUNT = 0x545d
2162 TIOCGISO7816 = 0x40285443
2163 TIOCGLCKTRMIOS = 0x5456
2164 TIOCGPGRP = 0x40047483
2165 TIOCGPKT = 0x40045438
2166 TIOCGPTLCK = 0x40045439
2167 TIOCGPTN = 0x40047486
2168 TIOCGPTPEER = 0x20007489
2169 TIOCGRS485 = 0x40205441
2170 TIOCGSERIAL = 0x541e
2171 TIOCGSID = 0x40047485
2172 TIOCGSOFTCAR = 0x40047464
2173 TIOCGWINSZ = 0x40087468
2174 TIOCINQ = 0x4004667f
2175 TIOCLINUX = 0x541c
2176 TIOCMBIC = 0x8004746b
2177 TIOCMBIS = 0x8004746c
2178 TIOCMGET = 0x4004746a
2179 TIOCMIWAIT = 0x545c
2180 TIOCMSET = 0x8004746d
2181 TIOCM_CAR = 0x40
2182 TIOCM_CD = 0x40
2183 TIOCM_CTS = 0x20
2184 TIOCM_DSR = 0x100
2185 TIOCM_DTR = 0x2
2186 TIOCM_LE = 0x1
2187 TIOCM_RI = 0x80
2188 TIOCM_RNG = 0x80
2189 TIOCM_RTS = 0x4
2190 TIOCM_SR = 0x10
2191 TIOCM_ST = 0x8
2192 TIOCNOTTY = 0x20007471
2193 TIOCNXCL = 0x2000740e
2194 TIOCOUTQ = 0x40047473
2195 TIOCPKT = 0x80047470
2196 TIOCPKT_DATA = 0x0
2197 TIOCPKT_DOSTOP = 0x20
2198 TIOCPKT_FLUSHREAD = 0x1
2199 TIOCPKT_FLUSHWRITE = 0x2
2200 TIOCPKT_IOCTL = 0x40
2201 TIOCPKT_NOSTOP = 0x10
2202 TIOCPKT_START = 0x8
2203 TIOCPKT_STOP = 0x4
2204 TIOCSBRK = 0x2000747b
2205 TIOCSCTTY = 0x20007484
2206 TIOCSERCONFIG = 0x5453
2207 TIOCSERGETLSR = 0x5459
2208 TIOCSERGETMULTI = 0x545a
2209 TIOCSERGSTRUCT = 0x5458
2210 TIOCSERGWILD = 0x5454
2211 TIOCSERSETMULTI = 0x545b
2212 TIOCSERSWILD = 0x5455
2213 TIOCSETD = 0x80047401
2214 TIOCSIG = 0x80047488
2215 TIOCSISO7816 = 0xc0285444
2216 TIOCSLCKTRMIOS = 0x5457
2217 TIOCSPGRP = 0x80047482
2218 TIOCSPTLCK = 0x80047487
2219 TIOCSRS485 = 0xc0205442
2220 TIOCSSERIAL = 0x541f
2221 TIOCSSOFTCAR = 0x80047465
2222 TIOCSTART = 0x2000746e
2223 TIOCSTI = 0x80017472
2224 TIOCSTOP = 0x2000746f
2225 TIOCSWINSZ = 0x80087467
2226 TIOCVHANGUP = 0x20005437
2227 TMPFS_MAGIC = 0x1021994
2228 TOSTOP = 0x100
2229 TPACKET_ALIGNMENT = 0x10
2230 TPACKET_HDRLEN = 0x34
2231 TP_STATUS_AVAILABLE = 0x0
2232 TP_STATUS_BLK_TMO = 0x20
2233 TP_STATUS_COPY = 0x2
2234 TP_STATUS_CSUMNOTREADY = 0x8
2235 TP_STATUS_CSUM_VALID = 0x80
2236 TP_STATUS_KERNEL = 0x0
2237 TP_STATUS_LOSING = 0x4
2238 TP_STATUS_SENDING = 0x2
2239 TP_STATUS_SEND_REQUEST = 0x1
2240 TP_STATUS_TS_RAW_HARDWARE = -0x80000000
2241 TP_STATUS_TS_SOFTWARE = 0x20000000
2242 TP_STATUS_TS_SYS_HARDWARE = 0x40000000
2243 TP_STATUS_USER = 0x1
2244 TP_STATUS_VLAN_TPID_VALID = 0x40
2245 TP_STATUS_VLAN_VALID = 0x10
2246 TP_STATUS_WRONG_FORMAT = 0x4
2247 TRACEFS_MAGIC = 0x74726163
2248 TS_COMM_LEN = 0x20
2249 TUNATTACHFILTER = 0x801054d5
2250 TUNDETACHFILTER = 0x801054d6
2251 TUNGETFEATURES = 0x400454cf
2252 TUNGETFILTER = 0x401054db
2253 TUNGETIFF = 0x400454d2
2254 TUNGETSNDBUF = 0x400454d3
2255 TUNGETVNETBE = 0x400454df
2256 TUNGETVNETHDRSZ = 0x400454d7
2257 TUNGETVNETLE = 0x400454dd
2258 TUNSETDEBUG = 0x800454c9
2259 TUNSETFILTEREBPF = 0x400454e1
2260 TUNSETGROUP = 0x800454ce
2261 TUNSETIFF = 0x800454ca
2262 TUNSETIFINDEX = 0x800454da
2263 TUNSETLINK = 0x800454cd
2264 TUNSETNOCSUM = 0x800454c8
2265 TUNSETOFFLOAD = 0x800454d0
2266 TUNSETOWNER = 0x800454cc
2267 TUNSETPERSIST = 0x800454cb
2268 TUNSETQUEUE = 0x800454d9
2269 TUNSETSNDBUF = 0x800454d4
2270 TUNSETSTEERINGEBPF = 0x400454e0
2271 TUNSETTXFILTER = 0x800454d1
2272 TUNSETVNETBE = 0x800454de
2273 TUNSETVNETHDRSZ = 0x800454d8
2274 TUNSETVNETLE = 0x800454dc
2275 UBI_IOCATT = 0x80186f40
2276 UBI_IOCDET = 0x80046f41
2277 UBI_IOCEBCH = 0x80044f02
2278 UBI_IOCEBER = 0x80044f01
2279 UBI_IOCEBISMAP = 0x40044f05
2280 UBI_IOCEBMAP = 0x80084f03
2281 UBI_IOCEBUNMAP = 0x80044f04
2282 UBI_IOCMKVOL = 0x80986f00
2283 UBI_IOCRMVOL = 0x80046f01
2284 UBI_IOCRNVOL = 0x91106f03
2285 UBI_IOCRSVOL = 0x800c6f02
2286 UBI_IOCSETVOLPROP = 0x80104f06
2287 UBI_IOCVOLCRBLK = 0x80804f07
2288 UBI_IOCVOLRMBLK = 0x20004f08
2289 UBI_IOCVOLUP = 0x80084f00
2290 UDF_SUPER_MAGIC = 0x15013346
2291 UMOUNT_NOFOLLOW = 0x8
2292 USBDEVICE_SUPER_MAGIC = 0x9fa2
2293 UTIME_NOW = 0x3fffffff
2294 UTIME_OMIT = 0x3ffffffe
2295 V9FS_MAGIC = 0x1021997
2296 VDISCARD = 0xd
2297 VEOF = 0x4
2298 VEOL = 0xb
2299 VEOL2 = 0x10
2300 VERASE = 0x2
2301 VINTR = 0x0
2302 VKILL = 0x3
2303 VLNEXT = 0xf
2304 VMADDR_CID_ANY = 0xffffffff
2305 VMADDR_CID_HOST = 0x2
2306 VMADDR_CID_HYPERVISOR = 0x0
2307 VMADDR_CID_RESERVED = 0x1
2308 VMADDR_PORT_ANY = 0xffffffff
2309 VMIN = 0x6
2310 VM_SOCKETS_INVALID_VERSION = 0xffffffff
2311 VQUIT = 0x1
2312 VREPRINT = 0xc
2313 VSTART = 0x8
2314 VSTOP = 0x9
2315 VSUSP = 0xa
2316 VSWTC = 0x7
2317 VT0 = 0x0
2318 VT1 = 0x4000
2319 VTDLY = 0x4000
2320 VTIME = 0x5
2321 VWERASE = 0xe
2322 WALL = 0x40000000
2323 WCLONE = 0x80000000
2324 WCONTINUED = 0x8
2325 WDIOC_GETBOOTSTATUS = 0x40045702
2326 WDIOC_GETPRETIMEOUT = 0x40045709
2327 WDIOC_GETSTATUS = 0x40045701
2328 WDIOC_GETSUPPORT = 0x40285700
2329 WDIOC_GETTEMP = 0x40045703
2330 WDIOC_GETTIMELEFT = 0x4004570a
2331 WDIOC_GETTIMEOUT = 0x40045707
2332 WDIOC_KEEPALIVE = 0x40045705
2333 WDIOC_SETOPTIONS = 0x40045704
2334 WDIOC_SETPRETIMEOUT = 0xc0045708
2335 WDIOC_SETTIMEOUT = 0xc0045706
2336 WEXITED = 0x4
2337 WIN_ACKMEDIACHANGE = 0xdb
2338 WIN_CHECKPOWERMODE1 = 0xe5
2339 WIN_CHECKPOWERMODE2 = 0x98
2340 WIN_DEVICE_RESET = 0x8
2341 WIN_DIAGNOSE = 0x90
2342 WIN_DOORLOCK = 0xde
2343 WIN_DOORUNLOCK = 0xdf
2344 WIN_DOWNLOAD_MICROCODE = 0x92
2345 WIN_FLUSH_CACHE = 0xe7
2346 WIN_FLUSH_CACHE_EXT = 0xea
2347 WIN_FORMAT = 0x50
2348 WIN_GETMEDIASTATUS = 0xda
2349 WIN_IDENTIFY = 0xec
2350 WIN_IDENTIFY_DMA = 0xee
2351 WIN_IDLEIMMEDIATE = 0xe1
2352 WIN_INIT = 0x60
2353 WIN_MEDIAEJECT = 0xed
2354 WIN_MULTREAD = 0xc4
2355 WIN_MULTREAD_EXT = 0x29
2356 WIN_MULTWRITE = 0xc5
2357 WIN_MULTWRITE_EXT = 0x39
2358 WIN_NOP = 0x0
2359 WIN_PACKETCMD = 0xa0
2360 WIN_PIDENTIFY = 0xa1
2361 WIN_POSTBOOT = 0xdc
2362 WIN_PREBOOT = 0xdd
2363 WIN_QUEUED_SERVICE = 0xa2
2364 WIN_READ = 0x20
2365 WIN_READDMA = 0xc8
2366 WIN_READDMA_EXT = 0x25
2367 WIN_READDMA_ONCE = 0xc9
2368 WIN_READDMA_QUEUED = 0xc7
2369 WIN_READDMA_QUEUED_EXT = 0x26
2370 WIN_READ_BUFFER = 0xe4
2371 WIN_READ_EXT = 0x24
2372 WIN_READ_LONG = 0x22
2373 WIN_READ_LONG_ONCE = 0x23
2374 WIN_READ_NATIVE_MAX = 0xf8
2375 WIN_READ_NATIVE_MAX_EXT = 0x27
2376 WIN_READ_ONCE = 0x21
2377 WIN_RECAL = 0x10
2378 WIN_RESTORE = 0x10
2379 WIN_SECURITY_DISABLE = 0xf6
2380 WIN_SECURITY_ERASE_PREPARE = 0xf3
2381 WIN_SECURITY_ERASE_UNIT = 0xf4
2382 WIN_SECURITY_FREEZE_LOCK = 0xf5
2383 WIN_SECURITY_SET_PASS = 0xf1
2384 WIN_SECURITY_UNLOCK = 0xf2
2385 WIN_SEEK = 0x70
2386 WIN_SETFEATURES = 0xef
2387 WIN_SETIDLE1 = 0xe3
2388 WIN_SETIDLE2 = 0x97
2389 WIN_SETMULT = 0xc6
2390 WIN_SET_MAX = 0xf9
2391 WIN_SET_MAX_EXT = 0x37
2392 WIN_SLEEPNOW1 = 0xe6
2393 WIN_SLEEPNOW2 = 0x99
2394 WIN_SMART = 0xb0
2395 WIN_SPECIFY = 0x91
2396 WIN_SRST = 0x8
2397 WIN_STANDBY = 0xe2
2398 WIN_STANDBY2 = 0x96
2399 WIN_STANDBYNOW1 = 0xe0
2400 WIN_STANDBYNOW2 = 0x94
2401 WIN_VERIFY = 0x40
2402 WIN_VERIFY_EXT = 0x42
2403 WIN_VERIFY_ONCE = 0x41
2404 WIN_WRITE = 0x30
2405 WIN_WRITEDMA = 0xca
2406 WIN_WRITEDMA_EXT = 0x35
2407 WIN_WRITEDMA_ONCE = 0xcb
2408 WIN_WRITEDMA_QUEUED = 0xcc
2409 WIN_WRITEDMA_QUEUED_EXT = 0x36
2410 WIN_WRITE_BUFFER = 0xe8
2411 WIN_WRITE_EXT = 0x34
2412 WIN_WRITE_LONG = 0x32
2413 WIN_WRITE_LONG_ONCE = 0x33
2414 WIN_WRITE_ONCE = 0x31
2415 WIN_WRITE_SAME = 0xe9
2416 WIN_WRITE_VERIFY = 0x3c
2417 WNOHANG = 0x1
2418 WNOTHREAD = 0x20000000
2419 WNOWAIT = 0x1000000
2420 WORDSIZE = 0x40
2421 WSTOPPED = 0x2
2422 WUNTRACED = 0x2
2423 XATTR_CREATE = 0x1
2424 XATTR_REPLACE = 0x2
2425 XCASE = 0x4
2426 XDP_COPY = 0x2
2427 XDP_FLAGS_DRV_MODE = 0x4
2428 XDP_FLAGS_HW_MODE = 0x8
2429 XDP_FLAGS_MASK = 0xf
2430 XDP_FLAGS_MODES = 0xe
2431 XDP_FLAGS_SKB_MODE = 0x2
2432 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
2433 XDP_MMAP_OFFSETS = 0x1
2434 XDP_PGOFF_RX_RING = 0x0
2435 XDP_PGOFF_TX_RING = 0x80000000
2436 XDP_RX_RING = 0x2
2437 XDP_SHARED_UMEM = 0x1
2438 XDP_STATISTICS = 0x7
2439 XDP_TX_RING = 0x3
2440 XDP_UMEM_COMPLETION_RING = 0x6
2441 XDP_UMEM_FILL_RING = 0x5
2442 XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
2443 XDP_UMEM_PGOFF_FILL_RING = 0x100000000
2444 XDP_UMEM_REG = 0x4
2445 XDP_ZEROCOPY = 0x4
2446 XENFS_SUPER_MAGIC = 0xabba1974
2447 XFS_SUPER_MAGIC = 0x58465342
2448 XTABS = 0x1800
2449 ZSMALLOC_MAGIC = 0x58295829
2450 __TIOCFLUSH = 0x80047410
17892451 )
17902452
17912453 // Errors
19682630 )
19692631
19702632 // Error table
1971 var errors = [...]string{
1972 1: "operation not permitted",
1973 2: "no such file or directory",
1974 3: "no such process",
1975 4: "interrupted system call",
1976 5: "input/output error",
1977 6: "no such device or address",
1978 7: "argument list too long",
1979 8: "exec format error",
1980 9: "bad file descriptor",
1981 10: "no child processes",
1982 11: "resource temporarily unavailable",
1983 12: "cannot allocate memory",
1984 13: "permission denied",
1985 14: "bad address",
1986 15: "block device required",
1987 16: "device or resource busy",
1988 17: "file exists",
1989 18: "invalid cross-device link",
1990 19: "no such device",
1991 20: "not a directory",
1992 21: "is a directory",
1993 22: "invalid argument",
1994 23: "too many open files in system",
1995 24: "too many open files",
1996 25: "inappropriate ioctl for device",
1997 26: "text file busy",
1998 27: "file too large",
1999 28: "no space left on device",
2000 29: "illegal seek",
2001 30: "read-only file system",
2002 31: "too many links",
2003 32: "broken pipe",
2004 33: "numerical argument out of domain",
2005 34: "numerical result out of range",
2006 36: "operation now in progress",
2007 37: "operation already in progress",
2008 38: "socket operation on non-socket",
2009 39: "destination address required",
2010 40: "message too long",
2011 41: "protocol wrong type for socket",
2012 42: "protocol not available",
2013 43: "protocol not supported",
2014 44: "socket type not supported",
2015 45: "operation not supported",
2016 46: "protocol family not supported",
2017 47: "address family not supported by protocol",
2018 48: "address already in use",
2019 49: "cannot assign requested address",
2020 50: "network is down",
2021 51: "network is unreachable",
2022 52: "network dropped connection on reset",
2023 53: "software caused connection abort",
2024 54: "connection reset by peer",
2025 55: "no buffer space available",
2026 56: "transport endpoint is already connected",
2027 57: "transport endpoint is not connected",
2028 58: "cannot send after transport endpoint shutdown",
2029 59: "too many references: cannot splice",
2030 60: "connection timed out",
2031 61: "connection refused",
2032 62: "too many levels of symbolic links",
2033 63: "file name too long",
2034 64: "host is down",
2035 65: "no route to host",
2036 66: "directory not empty",
2037 67: "too many processes",
2038 68: "too many users",
2039 69: "disk quota exceeded",
2040 70: "stale file handle",
2041 71: "object is remote",
2042 72: "device not a stream",
2043 73: "timer expired",
2044 74: "out of streams resources",
2045 75: "no message of desired type",
2046 76: "bad message",
2047 77: "identifier removed",
2048 78: "resource deadlock avoided",
2049 79: "no locks available",
2050 80: "machine is not on the network",
2051 81: "unknown error 81",
2052 82: "link has been severed",
2053 83: "advertise error",
2054 84: "srmount error",
2055 85: "communication error on send",
2056 86: "protocol error",
2057 87: "multihop attempted",
2058 88: "RFS specific error",
2059 89: "remote address changed",
2060 90: "function not implemented",
2061 91: "streams pipe error",
2062 92: "value too large for defined data type",
2063 93: "file descriptor in bad state",
2064 94: "channel number out of range",
2065 95: "level 2 not synchronized",
2066 96: "level 3 halted",
2067 97: "level 3 reset",
2068 98: "link number out of range",
2069 99: "protocol driver not attached",
2070 100: "no CSI structure available",
2071 101: "level 2 halted",
2072 102: "invalid exchange",
2073 103: "invalid request descriptor",
2074 104: "exchange full",
2075 105: "no anode",
2076 106: "invalid request code",
2077 107: "invalid slot",
2078 108: "file locking deadlock error",
2079 109: "bad font file format",
2080 110: "cannot exec a shared library directly",
2081 111: "no data available",
2082 112: "accessing a corrupted shared library",
2083 113: "package not installed",
2084 114: "can not access a needed shared library",
2085 115: "name not unique on network",
2086 116: "interrupted system call should be restarted",
2087 117: "structure needs cleaning",
2088 118: "not a XENIX named type file",
2089 119: "no XENIX semaphores available",
2090 120: "is a named type file",
2091 121: "remote I/O error",
2092 122: "invalid or incomplete multibyte or wide character",
2093 123: "attempting to link in too many shared libraries",
2094 124: ".lib section in a.out corrupted",
2095 125: "no medium found",
2096 126: "wrong medium type",
2097 127: "operation canceled",
2098 128: "required key not available",
2099 129: "key has expired",
2100 130: "key has been revoked",
2101 131: "key was rejected by service",
2102 132: "owner died",
2103 133: "state not recoverable",
2104 134: "operation not possible due to RF-kill",
2105 135: "memory page has hardware error",
2633 var errorList = [...]struct {
2634 num syscall.Errno
2635 name string
2636 desc string
2637 }{
2638 {1, "EPERM", "operation not permitted"},
2639 {2, "ENOENT", "no such file or directory"},
2640 {3, "ESRCH", "no such process"},
2641 {4, "EINTR", "interrupted system call"},
2642 {5, "EIO", "input/output error"},
2643 {6, "ENXIO", "no such device or address"},
2644 {7, "E2BIG", "argument list too long"},
2645 {8, "ENOEXEC", "exec format error"},
2646 {9, "EBADF", "bad file descriptor"},
2647 {10, "ECHILD", "no child processes"},
2648 {11, "EAGAIN", "resource temporarily unavailable"},
2649 {12, "ENOMEM", "cannot allocate memory"},
2650 {13, "EACCES", "permission denied"},
2651 {14, "EFAULT", "bad address"},
2652 {15, "ENOTBLK", "block device required"},
2653 {16, "EBUSY", "device or resource busy"},
2654 {17, "EEXIST", "file exists"},
2655 {18, "EXDEV", "invalid cross-device link"},
2656 {19, "ENODEV", "no such device"},
2657 {20, "ENOTDIR", "not a directory"},
2658 {21, "EISDIR", "is a directory"},
2659 {22, "EINVAL", "invalid argument"},
2660 {23, "ENFILE", "too many open files in system"},
2661 {24, "EMFILE", "too many open files"},
2662 {25, "ENOTTY", "inappropriate ioctl for device"},
2663 {26, "ETXTBSY", "text file busy"},
2664 {27, "EFBIG", "file too large"},
2665 {28, "ENOSPC", "no space left on device"},
2666 {29, "ESPIPE", "illegal seek"},
2667 {30, "EROFS", "read-only file system"},
2668 {31, "EMLINK", "too many links"},
2669 {32, "EPIPE", "broken pipe"},
2670 {33, "EDOM", "numerical argument out of domain"},
2671 {34, "ERANGE", "numerical result out of range"},
2672 {36, "EINPROGRESS", "operation now in progress"},
2673 {37, "EALREADY", "operation already in progress"},
2674 {38, "ENOTSOCK", "socket operation on non-socket"},
2675 {39, "EDESTADDRREQ", "destination address required"},
2676 {40, "EMSGSIZE", "message too long"},
2677 {41, "EPROTOTYPE", "protocol wrong type for socket"},
2678 {42, "ENOPROTOOPT", "protocol not available"},
2679 {43, "EPROTONOSUPPORT", "protocol not supported"},
2680 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
2681 {45, "ENOTSUP", "operation not supported"},
2682 {46, "EPFNOSUPPORT", "protocol family not supported"},
2683 {47, "EAFNOSUPPORT", "address family not supported by protocol"},
2684 {48, "EADDRINUSE", "address already in use"},
2685 {49, "EADDRNOTAVAIL", "cannot assign requested address"},
2686 {50, "ENETDOWN", "network is down"},
2687 {51, "ENETUNREACH", "network is unreachable"},
2688 {52, "ENETRESET", "network dropped connection on reset"},
2689 {53, "ECONNABORTED", "software caused connection abort"},
2690 {54, "ECONNRESET", "connection reset by peer"},
2691 {55, "ENOBUFS", "no buffer space available"},
2692 {56, "EISCONN", "transport endpoint is already connected"},
2693 {57, "ENOTCONN", "transport endpoint is not connected"},
2694 {58, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
2695 {59, "ETOOMANYREFS", "too many references: cannot splice"},
2696 {60, "ETIMEDOUT", "connection timed out"},
2697 {61, "ECONNREFUSED", "connection refused"},
2698 {62, "ELOOP", "too many levels of symbolic links"},
2699 {63, "ENAMETOOLONG", "file name too long"},
2700 {64, "EHOSTDOWN", "host is down"},
2701 {65, "EHOSTUNREACH", "no route to host"},
2702 {66, "ENOTEMPTY", "directory not empty"},
2703 {67, "EPROCLIM", "too many processes"},
2704 {68, "EUSERS", "too many users"},
2705 {69, "EDQUOT", "disk quota exceeded"},
2706 {70, "ESTALE", "stale file handle"},
2707 {71, "EREMOTE", "object is remote"},
2708 {72, "ENOSTR", "device not a stream"},
2709 {73, "ETIME", "timer expired"},
2710 {74, "ENOSR", "out of streams resources"},
2711 {75, "ENOMSG", "no message of desired type"},
2712 {76, "EBADMSG", "bad message"},
2713 {77, "EIDRM", "identifier removed"},
2714 {78, "EDEADLK", "resource deadlock avoided"},
2715 {79, "ENOLCK", "no locks available"},
2716 {80, "ENONET", "machine is not on the network"},
2717 {81, "ERREMOTE", "unknown error 81"},
2718 {82, "ENOLINK", "link has been severed"},
2719 {83, "EADV", "advertise error"},
2720 {84, "ESRMNT", "srmount error"},
2721 {85, "ECOMM", "communication error on send"},
2722 {86, "EPROTO", "protocol error"},
2723 {87, "EMULTIHOP", "multihop attempted"},
2724 {88, "EDOTDOT", "RFS specific error"},
2725 {89, "EREMCHG", "remote address changed"},
2726 {90, "ENOSYS", "function not implemented"},
2727 {91, "ESTRPIPE", "streams pipe error"},
2728 {92, "EOVERFLOW", "value too large for defined data type"},
2729 {93, "EBADFD", "file descriptor in bad state"},
2730 {94, "ECHRNG", "channel number out of range"},
2731 {95, "EL2NSYNC", "level 2 not synchronized"},
2732 {96, "EL3HLT", "level 3 halted"},
2733 {97, "EL3RST", "level 3 reset"},
2734 {98, "ELNRNG", "link number out of range"},
2735 {99, "EUNATCH", "protocol driver not attached"},
2736 {100, "ENOCSI", "no CSI structure available"},
2737 {101, "EL2HLT", "level 2 halted"},
2738 {102, "EBADE", "invalid exchange"},
2739 {103, "EBADR", "invalid request descriptor"},
2740 {104, "EXFULL", "exchange full"},
2741 {105, "ENOANO", "no anode"},
2742 {106, "EBADRQC", "invalid request code"},
2743 {107, "EBADSLT", "invalid slot"},
2744 {108, "EDEADLOCK", "file locking deadlock error"},
2745 {109, "EBFONT", "bad font file format"},
2746 {110, "ELIBEXEC", "cannot exec a shared library directly"},
2747 {111, "ENODATA", "no data available"},
2748 {112, "ELIBBAD", "accessing a corrupted shared library"},
2749 {113, "ENOPKG", "package not installed"},
2750 {114, "ELIBACC", "can not access a needed shared library"},
2751 {115, "ENOTUNIQ", "name not unique on network"},
2752 {116, "ERESTART", "interrupted system call should be restarted"},
2753 {117, "EUCLEAN", "structure needs cleaning"},
2754 {118, "ENOTNAM", "not a XENIX named type file"},
2755 {119, "ENAVAIL", "no XENIX semaphores available"},
2756 {120, "EISNAM", "is a named type file"},
2757 {121, "EREMOTEIO", "remote I/O error"},
2758 {122, "EILSEQ", "invalid or incomplete multibyte or wide character"},
2759 {123, "ELIBMAX", "attempting to link in too many shared libraries"},
2760 {124, "ELIBSCN", ".lib section in a.out corrupted"},
2761 {125, "ENOMEDIUM", "no medium found"},
2762 {126, "EMEDIUMTYPE", "wrong medium type"},
2763 {127, "ECANCELED", "operation canceled"},
2764 {128, "ENOKEY", "required key not available"},
2765 {129, "EKEYEXPIRED", "key has expired"},
2766 {130, "EKEYREVOKED", "key has been revoked"},
2767 {131, "EKEYREJECTED", "key was rejected by service"},
2768 {132, "EOWNERDEAD", "owner died"},
2769 {133, "ENOTRECOVERABLE", "state not recoverable"},
2770 {134, "ERFKILL", "operation not possible due to RF-kill"},
2771 {135, "EHWPOISON", "memory page has hardware error"},
21062772 }
21072773
21082774 // Signal table
2109 var signals = [...]string{
2110 1: "hangup",
2111 2: "interrupt",
2112 3: "quit",
2113 4: "illegal instruction",
2114 5: "trace/breakpoint trap",
2115 6: "aborted",
2116 7: "EMT trap",
2117 8: "floating point exception",
2118 9: "killed",
2119 10: "bus error",
2120 11: "segmentation fault",
2121 12: "bad system call",
2122 13: "broken pipe",
2123 14: "alarm clock",
2124 15: "terminated",
2125 16: "urgent I/O condition",
2126 17: "stopped (signal)",
2127 18: "stopped",
2128 19: "continued",
2129 20: "child exited",
2130 21: "stopped (tty input)",
2131 22: "stopped (tty output)",
2132 23: "I/O possible",
2133 24: "CPU time limit exceeded",
2134 25: "file size limit exceeded",
2135 26: "virtual timer expired",
2136 27: "profiling timer expired",
2137 28: "window changed",
2138 29: "resource lost",
2139 30: "user defined signal 1",
2140 31: "user defined signal 2",
2775 var signalList = [...]struct {
2776 num syscall.Signal
2777 name string
2778 desc string
2779 }{
2780 {1, "SIGHUP", "hangup"},
2781 {2, "SIGINT", "interrupt"},
2782 {3, "SIGQUIT", "quit"},
2783 {4, "SIGILL", "illegal instruction"},
2784 {5, "SIGTRAP", "trace/breakpoint trap"},
2785 {6, "SIGABRT", "aborted"},
2786 {7, "SIGEMT", "EMT trap"},
2787 {8, "SIGFPE", "floating point exception"},
2788 {9, "SIGKILL", "killed"},
2789 {10, "SIGBUS", "bus error"},
2790 {11, "SIGSEGV", "segmentation fault"},
2791 {12, "SIGSYS", "bad system call"},
2792 {13, "SIGPIPE", "broken pipe"},
2793 {14, "SIGALRM", "alarm clock"},
2794 {15, "SIGTERM", "terminated"},
2795 {16, "SIGURG", "urgent I/O condition"},
2796 {17, "SIGSTOP", "stopped (signal)"},
2797 {18, "SIGTSTP", "stopped"},
2798 {19, "SIGCONT", "continued"},
2799 {20, "SIGCHLD", "child exited"},
2800 {21, "SIGTTIN", "stopped (tty input)"},
2801 {22, "SIGTTOU", "stopped (tty output)"},
2802 {23, "SIGIO", "I/O possible"},
2803 {24, "SIGXCPU", "CPU time limit exceeded"},
2804 {25, "SIGXFSZ", "file size limit exceeded"},
2805 {26, "SIGVTALRM", "virtual timer expired"},
2806 {27, "SIGPROF", "profiling timer expired"},
2807 {28, "SIGWINCH", "window changed"},
2808 {29, "SIGLOST", "power failure"},
2809 {30, "SIGUSR1", "user defined signal 1"},
2810 {31, "SIGUSR2", "user defined signal 2"},
21412811 }
00 // mkerrors.sh -m32
1 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build 386,netbsd
44
158158 CLONE_VFORK = 0x4000
159159 CLONE_VM = 0x100
160160 CREAD = 0x800
161 CRTSCTS = 0x10000
161162 CS5 = 0x0
162163 CS6 = 0x100
163164 CS7 = 0x200
168169 CSTOP = 0x13
169170 CSTOPB = 0x400
170171 CSUSP = 0x1a
172 CTL_HW = 0x6
173 CTL_KERN = 0x1
171174 CTL_MAXNAME = 0xc
172175 CTL_NET = 0x4
173176 CTL_QUERY = -0x2
546549 EV_ONESHOT = 0x10
547550 EV_SYSFLAGS = 0xf000
548551 EXTA = 0x4b00
552 EXTATTR_CMD_START = 0x1
553 EXTATTR_CMD_STOP = 0x2
554 EXTATTR_NAMESPACE_SYSTEM = 0x2
555 EXTATTR_NAMESPACE_USER = 0x1
549556 EXTB = 0x9600
550557 EXTPROC = 0x800
551558 FD_CLOEXEC = 0x1
580587 F_UNLCK = 0x2
581588 F_WRLCK = 0x3
582589 HUPCL = 0x4000
590 HW_MACHINE = 0x1
583591 ICANON = 0x100
584592 ICMP6_FILTER = 0x12
585593 ICRNL = 0x100
969977 IXANY = 0x800
970978 IXOFF = 0x400
971979 IXON = 0x200
980 KERN_HOSTNAME = 0xa
981 KERN_OSRELEASE = 0x2
982 KERN_OSTYPE = 0x1
983 KERN_VERSION = 0x4
972984 LOCK_EX = 0x2
973985 LOCK_NB = 0x4
974986 LOCK_SH = 0x1
10071019 MAP_WIRED = 0x800
10081020 MCL_CURRENT = 0x1
10091021 MCL_FUTURE = 0x2
1022 MNT_ASYNC = 0x40
1023 MNT_BASIC_FLAGS = 0xe782807f
1024 MNT_DEFEXPORTED = 0x200
1025 MNT_DISCARD = 0x800000
1026 MNT_EXKERB = 0x800
1027 MNT_EXNORESPORT = 0x8000000
1028 MNT_EXPORTANON = 0x400
1029 MNT_EXPORTED = 0x100
1030 MNT_EXPUBLIC = 0x10000000
1031 MNT_EXRDONLY = 0x80
1032 MNT_EXTATTR = 0x1000000
1033 MNT_FORCE = 0x80000
1034 MNT_GETARGS = 0x400000
1035 MNT_IGNORE = 0x100000
1036 MNT_LAZY = 0x3
1037 MNT_LOCAL = 0x1000
1038 MNT_LOG = 0x2000000
1039 MNT_NOATIME = 0x4000000
1040 MNT_NOCOREDUMP = 0x8000
1041 MNT_NODEV = 0x10
1042 MNT_NODEVMTIME = 0x40000000
1043 MNT_NOEXEC = 0x4
1044 MNT_NOSUID = 0x8
1045 MNT_NOWAIT = 0x2
1046 MNT_OP_FLAGS = 0x4d0000
1047 MNT_QUOTA = 0x2000
1048 MNT_RDONLY = 0x1
1049 MNT_RELATIME = 0x20000
1050 MNT_RELOAD = 0x40000
1051 MNT_ROOTFS = 0x4000
1052 MNT_SOFTDEP = 0x80000000
1053 MNT_SYMPERM = 0x20000000
1054 MNT_SYNCHRONOUS = 0x2
1055 MNT_UNION = 0x20
1056 MNT_UPDATE = 0x10000
1057 MNT_VISFLAGMASK = 0xff90ffff
1058 MNT_WAIT = 0x1
10101059 MSG_BCAST = 0x100
10111060 MSG_CMSG_CLOEXEC = 0x800
10121061 MSG_CONTROLMBUF = 0x2000000
11001149 RLIMIT_CPU = 0x0
11011150 RLIMIT_DATA = 0x2
11021151 RLIMIT_FSIZE = 0x1
1152 RLIMIT_MEMLOCK = 0x6
11031153 RLIMIT_NOFILE = 0x8
1154 RLIMIT_NPROC = 0x7
1155 RLIMIT_RSS = 0x5
11041156 RLIMIT_STACK = 0x3
11051157 RLIM_INFINITY = 0x7fffffffffffffff
11061158 RTAX_AUTHOR = 0x6
15751627 )
15761628
15771629 // Error table
1578 var errors = [...]string{
1579 1: "operation not permitted",
1580 2: "no such file or directory",
1581 3: "no such process",
1582 4: "interrupted system call",
1583 5: "input/output error",
1584 6: "device not configured",
1585 7: "argument list too long",
1586 8: "exec format error",
1587 9: "bad file descriptor",
1588 10: "no child processes",
1589 11: "resource deadlock avoided",
1590 12: "cannot allocate memory",
1591 13: "permission denied",
1592 14: "bad address",
1593 15: "block device required",
1594 16: "device busy",
1595 17: "file exists",
1596 18: "cross-device link",
1597 19: "operation not supported by device",
1598 20: "not a directory",
1599 21: "is a directory",
1600 22: "invalid argument",
1601 23: "too many open files in system",
1602 24: "too many open files",
1603 25: "inappropriate ioctl for device",
1604 26: "text file busy",
1605 27: "file too large",
1606 28: "no space left on device",
1607 29: "illegal seek",
1608 30: "read-only file system",
1609 31: "too many links",
1610 32: "broken pipe",
1611 33: "numerical argument out of domain",
1612 34: "result too large or too small",
1613 35: "resource temporarily unavailable",
1614 36: "operation now in progress",
1615 37: "operation already in progress",
1616 38: "socket operation on non-socket",
1617 39: "destination address required",
1618 40: "message too long",
1619 41: "protocol wrong type for socket",
1620 42: "protocol option not available",
1621 43: "protocol not supported",
1622 44: "socket type not supported",
1623 45: "operation not supported",
1624 46: "protocol family not supported",
1625 47: "address family not supported by protocol family",
1626 48: "address already in use",
1627 49: "can't assign requested address",
1628 50: "network is down",
1629 51: "network is unreachable",
1630 52: "network dropped connection on reset",
1631 53: "software caused connection abort",
1632 54: "connection reset by peer",
1633 55: "no buffer space available",
1634 56: "socket is already connected",
1635 57: "socket is not connected",
1636 58: "can't send after socket shutdown",
1637 59: "too many references: can't splice",
1638 60: "connection timed out",
1639 61: "connection refused",
1640 62: "too many levels of symbolic links",
1641 63: "file name too long",
1642 64: "host is down",
1643 65: "no route to host",
1644 66: "directory not empty",
1645 67: "too many processes",
1646 68: "too many users",
1647 69: "disc quota exceeded",
1648 70: "stale NFS file handle",
1649 71: "too many levels of remote in path",
1650 72: "RPC struct is bad",
1651 73: "RPC version wrong",
1652 74: "RPC prog. not avail",
1653 75: "program version wrong",
1654 76: "bad procedure for program",
1655 77: "no locks available",
1656 78: "function not implemented",
1657 79: "inappropriate file type or format",
1658 80: "authentication error",
1659 81: "need authenticator",
1660 82: "identifier removed",
1661 83: "no message of desired type",
1662 84: "value too large to be stored in data type",
1663 85: "illegal byte sequence",
1664 86: "not supported",
1665 87: "operation Canceled",
1666 88: "bad or Corrupt message",
1667 89: "no message available",
1668 90: "no STREAM resources",
1669 91: "not a STREAM",
1670 92: "STREAM ioctl timeout",
1671 93: "attribute not found",
1672 94: "multihop attempted",
1673 95: "link has been severed",
1674 96: "protocol error",
1630 var errorList = [...]struct {
1631 num syscall.Errno
1632 name string
1633 desc string
1634 }{
1635 {1, "EPERM", "operation not permitted"},
1636 {2, "ENOENT", "no such file or directory"},
1637 {3, "ESRCH", "no such process"},
1638 {4, "EINTR", "interrupted system call"},
1639 {5, "EIO", "input/output error"},
1640 {6, "ENXIO", "device not configured"},
1641 {7, "E2BIG", "argument list too long"},
1642 {8, "ENOEXEC", "exec format error"},
1643 {9, "EBADF", "bad file descriptor"},
1644 {10, "ECHILD", "no child processes"},
1645 {11, "EDEADLK", "resource deadlock avoided"},
1646 {12, "ENOMEM", "cannot allocate memory"},
1647 {13, "EACCES", "permission denied"},
1648 {14, "EFAULT", "bad address"},
1649 {15, "ENOTBLK", "block device required"},
1650 {16, "EBUSY", "device busy"},
1651 {17, "EEXIST", "file exists"},
1652 {18, "EXDEV", "cross-device link"},
1653 {19, "ENODEV", "operation not supported by device"},
1654 {20, "ENOTDIR", "not a directory"},
1655 {21, "EISDIR", "is a directory"},
1656 {22, "EINVAL", "invalid argument"},
1657 {23, "ENFILE", "too many open files in system"},
1658 {24, "EMFILE", "too many open files"},
1659 {25, "ENOTTY", "inappropriate ioctl for device"},
1660 {26, "ETXTBSY", "text file busy"},
1661 {27, "EFBIG", "file too large"},
1662 {28, "ENOSPC", "no space left on device"},
1663 {29, "ESPIPE", "illegal seek"},
1664 {30, "EROFS", "read-only file system"},
1665 {31, "EMLINK", "too many links"},
1666 {32, "EPIPE", "broken pipe"},
1667 {33, "EDOM", "numerical argument out of domain"},
1668 {34, "ERANGE", "result too large or too small"},
1669 {35, "EAGAIN", "resource temporarily unavailable"},
1670 {36, "EINPROGRESS", "operation now in progress"},
1671 {37, "EALREADY", "operation already in progress"},
1672 {38, "ENOTSOCK", "socket operation on non-socket"},
1673 {39, "EDESTADDRREQ", "destination address required"},
1674 {40, "EMSGSIZE", "message too long"},
1675 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1676 {42, "ENOPROTOOPT", "protocol option not available"},
1677 {43, "EPROTONOSUPPORT", "protocol not supported"},
1678 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1679 {45, "EOPNOTSUPP", "operation not supported"},
1680 {46, "EPFNOSUPPORT", "protocol family not supported"},
1681 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1682 {48, "EADDRINUSE", "address already in use"},
1683 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1684 {50, "ENETDOWN", "network is down"},
1685 {51, "ENETUNREACH", "network is unreachable"},
1686 {52, "ENETRESET", "network dropped connection on reset"},
1687 {53, "ECONNABORTED", "software caused connection abort"},
1688 {54, "ECONNRESET", "connection reset by peer"},
1689 {55, "ENOBUFS", "no buffer space available"},
1690 {56, "EISCONN", "socket is already connected"},
1691 {57, "ENOTCONN", "socket is not connected"},
1692 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1693 {59, "ETOOMANYREFS", "too many references: can't splice"},
1694 {60, "ETIMEDOUT", "connection timed out"},
1695 {61, "ECONNREFUSED", "connection refused"},
1696 {62, "ELOOP", "too many levels of symbolic links"},
1697 {63, "ENAMETOOLONG", "file name too long"},
1698 {64, "EHOSTDOWN", "host is down"},
1699 {65, "EHOSTUNREACH", "no route to host"},
1700 {66, "ENOTEMPTY", "directory not empty"},
1701 {67, "EPROCLIM", "too many processes"},
1702 {68, "EUSERS", "too many users"},
1703 {69, "EDQUOT", "disc quota exceeded"},
1704 {70, "ESTALE", "stale NFS file handle"},
1705 {71, "EREMOTE", "too many levels of remote in path"},
1706 {72, "EBADRPC", "RPC struct is bad"},
1707 {73, "ERPCMISMATCH", "RPC version wrong"},
1708 {74, "EPROGUNAVAIL", "RPC prog. not avail"},
1709 {75, "EPROGMISMATCH", "program version wrong"},
1710 {76, "EPROCUNAVAIL", "bad procedure for program"},
1711 {77, "ENOLCK", "no locks available"},
1712 {78, "ENOSYS", "function not implemented"},
1713 {79, "EFTYPE", "inappropriate file type or format"},
1714 {80, "EAUTH", "authentication error"},
1715 {81, "ENEEDAUTH", "need authenticator"},
1716 {82, "EIDRM", "identifier removed"},
1717 {83, "ENOMSG", "no message of desired type"},
1718 {84, "EOVERFLOW", "value too large to be stored in data type"},
1719 {85, "EILSEQ", "illegal byte sequence"},
1720 {86, "ENOTSUP", "not supported"},
1721 {87, "ECANCELED", "operation Canceled"},
1722 {88, "EBADMSG", "bad or Corrupt message"},
1723 {89, "ENODATA", "no message available"},
1724 {90, "ENOSR", "no STREAM resources"},
1725 {91, "ENOSTR", "not a STREAM"},
1726 {92, "ETIME", "STREAM ioctl timeout"},
1727 {93, "ENOATTR", "attribute not found"},
1728 {94, "EMULTIHOP", "multihop attempted"},
1729 {95, "ENOLINK", "link has been severed"},
1730 {96, "ELAST", "protocol error"},
16751731 }
16761732
16771733 // Signal table
1678 var signals = [...]string{
1679 1: "hangup",
1680 2: "interrupt",
1681 3: "quit",
1682 4: "illegal instruction",
1683 5: "trace/BPT trap",
1684 6: "abort trap",
1685 7: "EMT trap",
1686 8: "floating point exception",
1687 9: "killed",
1688 10: "bus error",
1689 11: "segmentation fault",
1690 12: "bad system call",
1691 13: "broken pipe",
1692 14: "alarm clock",
1693 15: "terminated",
1694 16: "urgent I/O condition",
1695 17: "stopped (signal)",
1696 18: "stopped",
1697 19: "continued",
1698 20: "child exited",
1699 21: "stopped (tty input)",
1700 22: "stopped (tty output)",
1701 23: "I/O possible",
1702 24: "cputime limit exceeded",
1703 25: "filesize limit exceeded",
1704 26: "virtual timer expired",
1705 27: "profiling timer expired",
1706 28: "window size changes",
1707 29: "information request",
1708 30: "user defined signal 1",
1709 31: "user defined signal 2",
1710 32: "power fail/restart",
1734 var signalList = [...]struct {
1735 num syscall.Signal
1736 name string
1737 desc string
1738 }{
1739 {1, "SIGHUP", "hangup"},
1740 {2, "SIGINT", "interrupt"},
1741 {3, "SIGQUIT", "quit"},
1742 {4, "SIGILL", "illegal instruction"},
1743 {5, "SIGTRAP", "trace/BPT trap"},
1744 {6, "SIGIOT", "abort trap"},
1745 {7, "SIGEMT", "EMT trap"},
1746 {8, "SIGFPE", "floating point exception"},
1747 {9, "SIGKILL", "killed"},
1748 {10, "SIGBUS", "bus error"},
1749 {11, "SIGSEGV", "segmentation fault"},
1750 {12, "SIGSYS", "bad system call"},
1751 {13, "SIGPIPE", "broken pipe"},
1752 {14, "SIGALRM", "alarm clock"},
1753 {15, "SIGTERM", "terminated"},
1754 {16, "SIGURG", "urgent I/O condition"},
1755 {17, "SIGSTOP", "stopped (signal)"},
1756 {18, "SIGTSTP", "stopped"},
1757 {19, "SIGCONT", "continued"},
1758 {20, "SIGCHLD", "child exited"},
1759 {21, "SIGTTIN", "stopped (tty input)"},
1760 {22, "SIGTTOU", "stopped (tty output)"},
1761 {23, "SIGIO", "I/O possible"},
1762 {24, "SIGXCPU", "cputime limit exceeded"},
1763 {25, "SIGXFSZ", "filesize limit exceeded"},
1764 {26, "SIGVTALRM", "virtual timer expired"},
1765 {27, "SIGPROF", "profiling timer expired"},
1766 {28, "SIGWINCH", "window size changes"},
1767 {29, "SIGINFO", "information request"},
1768 {30, "SIGUSR1", "user defined signal 1"},
1769 {31, "SIGUSR2", "user defined signal 2"},
1770 {32, "SIGPWR", "power fail/restart"},
17111771 }
00 // mkerrors.sh -m64
1 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build amd64,netbsd
44
158158 CLONE_VFORK = 0x4000
159159 CLONE_VM = 0x100
160160 CREAD = 0x800
161 CRTSCTS = 0x10000
161162 CS5 = 0x0
162163 CS6 = 0x100
163164 CS7 = 0x200
168169 CSTOP = 0x13
169170 CSTOPB = 0x400
170171 CSUSP = 0x1a
172 CTL_HW = 0x6
173 CTL_KERN = 0x1
171174 CTL_MAXNAME = 0xc
172175 CTL_NET = 0x4
173176 CTL_QUERY = -0x2
536539 EV_ONESHOT = 0x10
537540 EV_SYSFLAGS = 0xf000
538541 EXTA = 0x4b00
542 EXTATTR_CMD_START = 0x1
543 EXTATTR_CMD_STOP = 0x2
544 EXTATTR_NAMESPACE_SYSTEM = 0x2
545 EXTATTR_NAMESPACE_USER = 0x1
539546 EXTB = 0x9600
540547 EXTPROC = 0x800
541548 FD_CLOEXEC = 0x1
570577 F_UNLCK = 0x2
571578 F_WRLCK = 0x3
572579 HUPCL = 0x4000
580 HW_MACHINE = 0x1
573581 ICANON = 0x100
574582 ICMP6_FILTER = 0x12
575583 ICRNL = 0x100
959967 IXANY = 0x800
960968 IXOFF = 0x400
961969 IXON = 0x200
970 KERN_HOSTNAME = 0xa
971 KERN_OSRELEASE = 0x2
972 KERN_OSTYPE = 0x1
973 KERN_VERSION = 0x4
962974 LOCK_EX = 0x2
963975 LOCK_NB = 0x4
964976 LOCK_SH = 0x1
9971009 MAP_WIRED = 0x800
9981010 MCL_CURRENT = 0x1
9991011 MCL_FUTURE = 0x2
1012 MNT_ASYNC = 0x40
1013 MNT_BASIC_FLAGS = 0xe782807f
1014 MNT_DEFEXPORTED = 0x200
1015 MNT_DISCARD = 0x800000
1016 MNT_EXKERB = 0x800
1017 MNT_EXNORESPORT = 0x8000000
1018 MNT_EXPORTANON = 0x400
1019 MNT_EXPORTED = 0x100
1020 MNT_EXPUBLIC = 0x10000000
1021 MNT_EXRDONLY = 0x80
1022 MNT_EXTATTR = 0x1000000
1023 MNT_FORCE = 0x80000
1024 MNT_GETARGS = 0x400000
1025 MNT_IGNORE = 0x100000
1026 MNT_LAZY = 0x3
1027 MNT_LOCAL = 0x1000
1028 MNT_LOG = 0x2000000
1029 MNT_NOATIME = 0x4000000
1030 MNT_NOCOREDUMP = 0x8000
1031 MNT_NODEV = 0x10
1032 MNT_NODEVMTIME = 0x40000000
1033 MNT_NOEXEC = 0x4
1034 MNT_NOSUID = 0x8
1035 MNT_NOWAIT = 0x2
1036 MNT_OP_FLAGS = 0x4d0000
1037 MNT_QUOTA = 0x2000
1038 MNT_RDONLY = 0x1
1039 MNT_RELATIME = 0x20000
1040 MNT_RELOAD = 0x40000
1041 MNT_ROOTFS = 0x4000
1042 MNT_SOFTDEP = 0x80000000
1043 MNT_SYMPERM = 0x20000000
1044 MNT_SYNCHRONOUS = 0x2
1045 MNT_UNION = 0x20
1046 MNT_UPDATE = 0x10000
1047 MNT_VISFLAGMASK = 0xff90ffff
1048 MNT_WAIT = 0x1
10001049 MSG_BCAST = 0x100
10011050 MSG_CMSG_CLOEXEC = 0x800
10021051 MSG_CONTROLMBUF = 0x2000000
10901139 RLIMIT_CPU = 0x0
10911140 RLIMIT_DATA = 0x2
10921141 RLIMIT_FSIZE = 0x1
1142 RLIMIT_MEMLOCK = 0x6
10931143 RLIMIT_NOFILE = 0x8
1144 RLIMIT_NPROC = 0x7
1145 RLIMIT_RSS = 0x5
10941146 RLIMIT_STACK = 0x3
10951147 RLIM_INFINITY = 0x7fffffffffffffff
10961148 RTAX_AUTHOR = 0x6
15651617 )
15661618
15671619 // Error table
1568 var errors = [...]string{
1569 1: "operation not permitted",
1570 2: "no such file or directory",
1571 3: "no such process",
1572 4: "interrupted system call",
1573 5: "input/output error",
1574 6: "device not configured",
1575 7: "argument list too long",
1576 8: "exec format error",
1577 9: "bad file descriptor",
1578 10: "no child processes",
1579 11: "resource deadlock avoided",
1580 12: "cannot allocate memory",
1581 13: "permission denied",
1582 14: "bad address",
1583 15: "block device required",
1584 16: "device busy",
1585 17: "file exists",
1586 18: "cross-device link",
1587 19: "operation not supported by device",
1588 20: "not a directory",
1589 21: "is a directory",
1590 22: "invalid argument",
1591 23: "too many open files in system",
1592 24: "too many open files",
1593 25: "inappropriate ioctl for device",
1594 26: "text file busy",
1595 27: "file too large",
1596 28: "no space left on device",
1597 29: "illegal seek",
1598 30: "read-only file system",
1599 31: "too many links",
1600 32: "broken pipe",
1601 33: "numerical argument out of domain",
1602 34: "result too large or too small",
1603 35: "resource temporarily unavailable",
1604 36: "operation now in progress",
1605 37: "operation already in progress",
1606 38: "socket operation on non-socket",
1607 39: "destination address required",
1608 40: "message too long",
1609 41: "protocol wrong type for socket",
1610 42: "protocol option not available",
1611 43: "protocol not supported",
1612 44: "socket type not supported",
1613 45: "operation not supported",
1614 46: "protocol family not supported",
1615 47: "address family not supported by protocol family",
1616 48: "address already in use",
1617 49: "can't assign requested address",
1618 50: "network is down",
1619 51: "network is unreachable",
1620 52: "network dropped connection on reset",
1621 53: "software caused connection abort",
1622 54: "connection reset by peer",
1623 55: "no buffer space available",
1624 56: "socket is already connected",
1625 57: "socket is not connected",
1626 58: "can't send after socket shutdown",
1627 59: "too many references: can't splice",
1628 60: "connection timed out",
1629 61: "connection refused",
1630 62: "too many levels of symbolic links",
1631 63: "file name too long",
1632 64: "host is down",
1633 65: "no route to host",
1634 66: "directory not empty",
1635 67: "too many processes",
1636 68: "too many users",
1637 69: "disc quota exceeded",
1638 70: "stale NFS file handle",
1639 71: "too many levels of remote in path",
1640 72: "RPC struct is bad",
1641 73: "RPC version wrong",
1642 74: "RPC prog. not avail",
1643 75: "program version wrong",
1644 76: "bad procedure for program",
1645 77: "no locks available",
1646 78: "function not implemented",
1647 79: "inappropriate file type or format",
1648 80: "authentication error",
1649 81: "need authenticator",
1650 82: "identifier removed",
1651 83: "no message of desired type",
1652 84: "value too large to be stored in data type",
1653 85: "illegal byte sequence",
1654 86: "not supported",
1655 87: "operation Canceled",
1656 88: "bad or Corrupt message",
1657 89: "no message available",
1658 90: "no STREAM resources",
1659 91: "not a STREAM",
1660 92: "STREAM ioctl timeout",
1661 93: "attribute not found",
1662 94: "multihop attempted",
1663 95: "link has been severed",
1664 96: "protocol error",
1620 var errorList = [...]struct {
1621 num syscall.Errno
1622 name string
1623 desc string
1624 }{
1625 {1, "EPERM", "operation not permitted"},
1626 {2, "ENOENT", "no such file or directory"},
1627 {3, "ESRCH", "no such process"},
1628 {4, "EINTR", "interrupted system call"},
1629 {5, "EIO", "input/output error"},
1630 {6, "ENXIO", "device not configured"},
1631 {7, "E2BIG", "argument list too long"},
1632 {8, "ENOEXEC", "exec format error"},
1633 {9, "EBADF", "bad file descriptor"},
1634 {10, "ECHILD", "no child processes"},
1635 {11, "EDEADLK", "resource deadlock avoided"},
1636 {12, "ENOMEM", "cannot allocate memory"},
1637 {13, "EACCES", "permission denied"},
1638 {14, "EFAULT", "bad address"},
1639 {15, "ENOTBLK", "block device required"},
1640 {16, "EBUSY", "device busy"},
1641 {17, "EEXIST", "file exists"},
1642 {18, "EXDEV", "cross-device link"},
1643 {19, "ENODEV", "operation not supported by device"},
1644 {20, "ENOTDIR", "not a directory"},
1645 {21, "EISDIR", "is a directory"},
1646 {22, "EINVAL", "invalid argument"},
1647 {23, "ENFILE", "too many open files in system"},
1648 {24, "EMFILE", "too many open files"},
1649 {25, "ENOTTY", "inappropriate ioctl for device"},
1650 {26, "ETXTBSY", "text file busy"},
1651 {27, "EFBIG", "file too large"},
1652 {28, "ENOSPC", "no space left on device"},
1653 {29, "ESPIPE", "illegal seek"},
1654 {30, "EROFS", "read-only file system"},
1655 {31, "EMLINK", "too many links"},
1656 {32, "EPIPE", "broken pipe"},
1657 {33, "EDOM", "numerical argument out of domain"},
1658 {34, "ERANGE", "result too large or too small"},
1659 {35, "EAGAIN", "resource temporarily unavailable"},
1660 {36, "EINPROGRESS", "operation now in progress"},
1661 {37, "EALREADY", "operation already in progress"},
1662 {38, "ENOTSOCK", "socket operation on non-socket"},
1663 {39, "EDESTADDRREQ", "destination address required"},
1664 {40, "EMSGSIZE", "message too long"},
1665 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1666 {42, "ENOPROTOOPT", "protocol option not available"},
1667 {43, "EPROTONOSUPPORT", "protocol not supported"},
1668 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1669 {45, "EOPNOTSUPP", "operation not supported"},
1670 {46, "EPFNOSUPPORT", "protocol family not supported"},
1671 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1672 {48, "EADDRINUSE", "address already in use"},
1673 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1674 {50, "ENETDOWN", "network is down"},
1675 {51, "ENETUNREACH", "network is unreachable"},
1676 {52, "ENETRESET", "network dropped connection on reset"},
1677 {53, "ECONNABORTED", "software caused connection abort"},
1678 {54, "ECONNRESET", "connection reset by peer"},
1679 {55, "ENOBUFS", "no buffer space available"},
1680 {56, "EISCONN", "socket is already connected"},
1681 {57, "ENOTCONN", "socket is not connected"},
1682 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1683 {59, "ETOOMANYREFS", "too many references: can't splice"},
1684 {60, "ETIMEDOUT", "connection timed out"},
1685 {61, "ECONNREFUSED", "connection refused"},
1686 {62, "ELOOP", "too many levels of symbolic links"},
1687 {63, "ENAMETOOLONG", "file name too long"},
1688 {64, "EHOSTDOWN", "host is down"},
1689 {65, "EHOSTUNREACH", "no route to host"},
1690 {66, "ENOTEMPTY", "directory not empty"},
1691 {67, "EPROCLIM", "too many processes"},
1692 {68, "EUSERS", "too many users"},
1693 {69, "EDQUOT", "disc quota exceeded"},
1694 {70, "ESTALE", "stale NFS file handle"},
1695 {71, "EREMOTE", "too many levels of remote in path"},
1696 {72, "EBADRPC", "RPC struct is bad"},
1697 {73, "ERPCMISMATCH", "RPC version wrong"},
1698 {74, "EPROGUNAVAIL", "RPC prog. not avail"},
1699 {75, "EPROGMISMATCH", "program version wrong"},
1700 {76, "EPROCUNAVAIL", "bad procedure for program"},
1701 {77, "ENOLCK", "no locks available"},
1702 {78, "ENOSYS", "function not implemented"},
1703 {79, "EFTYPE", "inappropriate file type or format"},
1704 {80, "EAUTH", "authentication error"},
1705 {81, "ENEEDAUTH", "need authenticator"},
1706 {82, "EIDRM", "identifier removed"},
1707 {83, "ENOMSG", "no message of desired type"},
1708 {84, "EOVERFLOW", "value too large to be stored in data type"},
1709 {85, "EILSEQ", "illegal byte sequence"},
1710 {86, "ENOTSUP", "not supported"},
1711 {87, "ECANCELED", "operation Canceled"},
1712 {88, "EBADMSG", "bad or Corrupt message"},
1713 {89, "ENODATA", "no message available"},
1714 {90, "ENOSR", "no STREAM resources"},
1715 {91, "ENOSTR", "not a STREAM"},
1716 {92, "ETIME", "STREAM ioctl timeout"},
1717 {93, "ENOATTR", "attribute not found"},
1718 {94, "EMULTIHOP", "multihop attempted"},
1719 {95, "ENOLINK", "link has been severed"},
1720 {96, "ELAST", "protocol error"},
16651721 }
16661722
16671723 // Signal table
1668 var signals = [...]string{
1669 1: "hangup",
1670 2: "interrupt",
1671 3: "quit",
1672 4: "illegal instruction",
1673 5: "trace/BPT trap",
1674 6: "abort trap",
1675 7: "EMT trap",
1676 8: "floating point exception",
1677 9: "killed",
1678 10: "bus error",
1679 11: "segmentation fault",
1680 12: "bad system call",
1681 13: "broken pipe",
1682 14: "alarm clock",
1683 15: "terminated",
1684 16: "urgent I/O condition",
1685 17: "stopped (signal)",
1686 18: "stopped",
1687 19: "continued",
1688 20: "child exited",
1689 21: "stopped (tty input)",
1690 22: "stopped (tty output)",
1691 23: "I/O possible",
1692 24: "cputime limit exceeded",
1693 25: "filesize limit exceeded",
1694 26: "virtual timer expired",
1695 27: "profiling timer expired",
1696 28: "window size changes",
1697 29: "information request",
1698 30: "user defined signal 1",
1699 31: "user defined signal 2",
1700 32: "power fail/restart",
1724 var signalList = [...]struct {
1725 num syscall.Signal
1726 name string
1727 desc string
1728 }{
1729 {1, "SIGHUP", "hangup"},
1730 {2, "SIGINT", "interrupt"},
1731 {3, "SIGQUIT", "quit"},
1732 {4, "SIGILL", "illegal instruction"},
1733 {5, "SIGTRAP", "trace/BPT trap"},
1734 {6, "SIGIOT", "abort trap"},
1735 {7, "SIGEMT", "EMT trap"},
1736 {8, "SIGFPE", "floating point exception"},
1737 {9, "SIGKILL", "killed"},
1738 {10, "SIGBUS", "bus error"},
1739 {11, "SIGSEGV", "segmentation fault"},
1740 {12, "SIGSYS", "bad system call"},
1741 {13, "SIGPIPE", "broken pipe"},
1742 {14, "SIGALRM", "alarm clock"},
1743 {15, "SIGTERM", "terminated"},
1744 {16, "SIGURG", "urgent I/O condition"},
1745 {17, "SIGSTOP", "stopped (signal)"},
1746 {18, "SIGTSTP", "stopped"},
1747 {19, "SIGCONT", "continued"},
1748 {20, "SIGCHLD", "child exited"},
1749 {21, "SIGTTIN", "stopped (tty input)"},
1750 {22, "SIGTTOU", "stopped (tty output)"},
1751 {23, "SIGIO", "I/O possible"},
1752 {24, "SIGXCPU", "cputime limit exceeded"},
1753 {25, "SIGXFSZ", "filesize limit exceeded"},
1754 {26, "SIGVTALRM", "virtual timer expired"},
1755 {27, "SIGPROF", "profiling timer expired"},
1756 {28, "SIGWINCH", "window size changes"},
1757 {29, "SIGINFO", "information request"},
1758 {30, "SIGUSR1", "user defined signal 1"},
1759 {31, "SIGUSR2", "user defined signal 2"},
1760 {32, "SIGPWR", "power fail/restart"},
17011761 }
00 // mkerrors.sh -marm
1 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build arm,netbsd
44
150150 CFLUSH = 0xf
151151 CLOCAL = 0x8000
152152 CREAD = 0x800
153 CRTSCTS = 0x10000
153154 CS5 = 0x0
154155 CS6 = 0x100
155156 CS7 = 0x200
160161 CSTOP = 0x13
161162 CSTOPB = 0x400
162163 CSUSP = 0x1a
164 CTL_HW = 0x6
165 CTL_KERN = 0x1
163166 CTL_MAXNAME = 0xc
164167 CTL_NET = 0x4
165168 CTL_QUERY = -0x2
528531 EV_ONESHOT = 0x10
529532 EV_SYSFLAGS = 0xf000
530533 EXTA = 0x4b00
534 EXTATTR_CMD_START = 0x1
535 EXTATTR_CMD_STOP = 0x2
536 EXTATTR_NAMESPACE_SYSTEM = 0x2
537 EXTATTR_NAMESPACE_USER = 0x1
531538 EXTB = 0x9600
532539 EXTPROC = 0x800
533540 FD_CLOEXEC = 0x1
562569 F_UNLCK = 0x2
563570 F_WRLCK = 0x3
564571 HUPCL = 0x4000
572 HW_MACHINE = 0x1
565573 ICANON = 0x100
566574 ICMP6_FILTER = 0x12
567575 ICRNL = 0x100
951959 IXANY = 0x800
952960 IXOFF = 0x400
953961 IXON = 0x200
962 KERN_HOSTNAME = 0xa
963 KERN_OSRELEASE = 0x2
964 KERN_OSTYPE = 0x1
965 KERN_VERSION = 0x4
954966 LOCK_EX = 0x2
955967 LOCK_NB = 0x4
956968 LOCK_SH = 0x1
987999 MAP_STACK = 0x2000
9881000 MAP_TRYFIXED = 0x400
9891001 MAP_WIRED = 0x800
1002 MNT_ASYNC = 0x40
1003 MNT_BASIC_FLAGS = 0xe782807f
1004 MNT_DEFEXPORTED = 0x200
1005 MNT_DISCARD = 0x800000
1006 MNT_EXKERB = 0x800
1007 MNT_EXNORESPORT = 0x8000000
1008 MNT_EXPORTANON = 0x400
1009 MNT_EXPORTED = 0x100
1010 MNT_EXPUBLIC = 0x10000000
1011 MNT_EXRDONLY = 0x80
1012 MNT_EXTATTR = 0x1000000
1013 MNT_FORCE = 0x80000
1014 MNT_GETARGS = 0x400000
1015 MNT_IGNORE = 0x100000
1016 MNT_LAZY = 0x3
1017 MNT_LOCAL = 0x1000
1018 MNT_LOG = 0x2000000
1019 MNT_NOATIME = 0x4000000
1020 MNT_NOCOREDUMP = 0x8000
1021 MNT_NODEV = 0x10
1022 MNT_NODEVMTIME = 0x40000000
1023 MNT_NOEXEC = 0x4
1024 MNT_NOSUID = 0x8
1025 MNT_NOWAIT = 0x2
1026 MNT_OP_FLAGS = 0x4d0000
1027 MNT_QUOTA = 0x2000
1028 MNT_RDONLY = 0x1
1029 MNT_RELATIME = 0x20000
1030 MNT_RELOAD = 0x40000
1031 MNT_ROOTFS = 0x4000
1032 MNT_SOFTDEP = 0x80000000
1033 MNT_SYMPERM = 0x20000000
1034 MNT_SYNCHRONOUS = 0x2
1035 MNT_UNION = 0x20
1036 MNT_UPDATE = 0x10000
1037 MNT_VISFLAGMASK = 0xff90ffff
1038 MNT_WAIT = 0x1
9901039 MSG_BCAST = 0x100
9911040 MSG_CMSG_CLOEXEC = 0x800
9921041 MSG_CONTROLMBUF = 0x2000000
10801129 RLIMIT_CPU = 0x0
10811130 RLIMIT_DATA = 0x2
10821131 RLIMIT_FSIZE = 0x1
1132 RLIMIT_MEMLOCK = 0x6
10831133 RLIMIT_NOFILE = 0x8
1134 RLIMIT_NPROC = 0x7
1135 RLIMIT_RSS = 0x5
10841136 RLIMIT_STACK = 0x3
10851137 RLIM_INFINITY = 0x7fffffffffffffff
10861138 RTAX_AUTHOR = 0x6
15541606 )
15551607
15561608 // Error table
1557 var errors = [...]string{
1558 1: "operation not permitted",
1559 2: "no such file or directory",
1560 3: "no such process",
1561 4: "interrupted system call",
1562 5: "input/output error",
1563 6: "device not configured",
1564 7: "argument list too long",
1565 8: "exec format error",
1566 9: "bad file descriptor",
1567 10: "no child processes",
1568 11: "resource deadlock avoided",
1569 12: "cannot allocate memory",
1570 13: "permission denied",
1571 14: "bad address",
1572 15: "block device required",
1573 16: "device busy",
1574 17: "file exists",
1575 18: "cross-device link",
1576 19: "operation not supported by device",
1577 20: "not a directory",
1578 21: "is a directory",
1579 22: "invalid argument",
1580 23: "too many open files in system",
1581 24: "too many open files",
1582 25: "inappropriate ioctl for device",
1583 26: "text file busy",
1584 27: "file too large",
1585 28: "no space left on device",
1586 29: "illegal seek",
1587 30: "read-only file system",
1588 31: "too many links",
1589 32: "broken pipe",
1590 33: "numerical argument out of domain",
1591 34: "result too large or too small",
1592 35: "resource temporarily unavailable",
1593 36: "operation now in progress",
1594 37: "operation already in progress",
1595 38: "socket operation on non-socket",
1596 39: "destination address required",
1597 40: "message too long",
1598 41: "protocol wrong type for socket",
1599 42: "protocol option not available",
1600 43: "protocol not supported",
1601 44: "socket type not supported",
1602 45: "operation not supported",
1603 46: "protocol family not supported",
1604 47: "address family not supported by protocol family",
1605 48: "address already in use",
1606 49: "can't assign requested address",
1607 50: "network is down",
1608 51: "network is unreachable",
1609 52: "network dropped connection on reset",
1610 53: "software caused connection abort",
1611 54: "connection reset by peer",
1612 55: "no buffer space available",
1613 56: "socket is already connected",
1614 57: "socket is not connected",
1615 58: "can't send after socket shutdown",
1616 59: "too many references: can't splice",
1617 60: "connection timed out",
1618 61: "connection refused",
1619 62: "too many levels of symbolic links",
1620 63: "file name too long",
1621 64: "host is down",
1622 65: "no route to host",
1623 66: "directory not empty",
1624 67: "too many processes",
1625 68: "too many users",
1626 69: "disc quota exceeded",
1627 70: "stale NFS file handle",
1628 71: "too many levels of remote in path",
1629 72: "RPC struct is bad",
1630 73: "RPC version wrong",
1631 74: "RPC prog. not avail",
1632 75: "program version wrong",
1633 76: "bad procedure for program",
1634 77: "no locks available",
1635 78: "function not implemented",
1636 79: "inappropriate file type or format",
1637 80: "authentication error",
1638 81: "need authenticator",
1639 82: "identifier removed",
1640 83: "no message of desired type",
1641 84: "value too large to be stored in data type",
1642 85: "illegal byte sequence",
1643 86: "not supported",
1644 87: "operation Canceled",
1645 88: "bad or Corrupt message",
1646 89: "no message available",
1647 90: "no STREAM resources",
1648 91: "not a STREAM",
1649 92: "STREAM ioctl timeout",
1650 93: "attribute not found",
1651 94: "multihop attempted",
1652 95: "link has been severed",
1653 96: "protocol error",
1609 var errorList = [...]struct {
1610 num syscall.Errno
1611 name string
1612 desc string
1613 }{
1614 {1, "EPERM", "operation not permitted"},
1615 {2, "ENOENT", "no such file or directory"},
1616 {3, "ESRCH", "no such process"},
1617 {4, "EINTR", "interrupted system call"},
1618 {5, "EIO", "input/output error"},
1619 {6, "ENXIO", "device not configured"},
1620 {7, "E2BIG", "argument list too long"},
1621 {8, "ENOEXEC", "exec format error"},
1622 {9, "EBADF", "bad file descriptor"},
1623 {10, "ECHILD", "no child processes"},
1624 {11, "EDEADLK", "resource deadlock avoided"},
1625 {12, "ENOMEM", "cannot allocate memory"},
1626 {13, "EACCES", "permission denied"},
1627 {14, "EFAULT", "bad address"},
1628 {15, "ENOTBLK", "block device required"},
1629 {16, "EBUSY", "device busy"},
1630 {17, "EEXIST", "file exists"},
1631 {18, "EXDEV", "cross-device link"},
1632 {19, "ENODEV", "operation not supported by device"},
1633 {20, "ENOTDIR", "not a directory"},
1634 {21, "EISDIR", "is a directory"},
1635 {22, "EINVAL", "invalid argument"},
1636 {23, "ENFILE", "too many open files in system"},
1637 {24, "EMFILE", "too many open files"},
1638 {25, "ENOTTY", "inappropriate ioctl for device"},
1639 {26, "ETXTBSY", "text file busy"},
1640 {27, "EFBIG", "file too large"},
1641 {28, "ENOSPC", "no space left on device"},
1642 {29, "ESPIPE", "illegal seek"},
1643 {30, "EROFS", "read-only file system"},
1644 {31, "EMLINK", "too many links"},
1645 {32, "EPIPE", "broken pipe"},
1646 {33, "EDOM", "numerical argument out of domain"},
1647 {34, "ERANGE", "result too large or too small"},
1648 {35, "EAGAIN", "resource temporarily unavailable"},
1649 {36, "EINPROGRESS", "operation now in progress"},
1650 {37, "EALREADY", "operation already in progress"},
1651 {38, "ENOTSOCK", "socket operation on non-socket"},
1652 {39, "EDESTADDRREQ", "destination address required"},
1653 {40, "EMSGSIZE", "message too long"},
1654 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1655 {42, "ENOPROTOOPT", "protocol option not available"},
1656 {43, "EPROTONOSUPPORT", "protocol not supported"},
1657 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1658 {45, "EOPNOTSUPP", "operation not supported"},
1659 {46, "EPFNOSUPPORT", "protocol family not supported"},
1660 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1661 {48, "EADDRINUSE", "address already in use"},
1662 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1663 {50, "ENETDOWN", "network is down"},
1664 {51, "ENETUNREACH", "network is unreachable"},
1665 {52, "ENETRESET", "network dropped connection on reset"},
1666 {53, "ECONNABORTED", "software caused connection abort"},
1667 {54, "ECONNRESET", "connection reset by peer"},
1668 {55, "ENOBUFS", "no buffer space available"},
1669 {56, "EISCONN", "socket is already connected"},
1670 {57, "ENOTCONN", "socket is not connected"},
1671 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1672 {59, "ETOOMANYREFS", "too many references: can't splice"},
1673 {60, "ETIMEDOUT", "connection timed out"},
1674 {61, "ECONNREFUSED", "connection refused"},
1675 {62, "ELOOP", "too many levels of symbolic links"},
1676 {63, "ENAMETOOLONG", "file name too long"},
1677 {64, "EHOSTDOWN", "host is down"},
1678 {65, "EHOSTUNREACH", "no route to host"},
1679 {66, "ENOTEMPTY", "directory not empty"},
1680 {67, "EPROCLIM", "too many processes"},
1681 {68, "EUSERS", "too many users"},
1682 {69, "EDQUOT", "disc quota exceeded"},
1683 {70, "ESTALE", "stale NFS file handle"},
1684 {71, "EREMOTE", "too many levels of remote in path"},
1685 {72, "EBADRPC", "RPC struct is bad"},
1686 {73, "ERPCMISMATCH", "RPC version wrong"},
1687 {74, "EPROGUNAVAIL", "RPC prog. not avail"},
1688 {75, "EPROGMISMATCH", "program version wrong"},
1689 {76, "EPROCUNAVAIL", "bad procedure for program"},
1690 {77, "ENOLCK", "no locks available"},
1691 {78, "ENOSYS", "function not implemented"},
1692 {79, "EFTYPE", "inappropriate file type or format"},
1693 {80, "EAUTH", "authentication error"},
1694 {81, "ENEEDAUTH", "need authenticator"},
1695 {82, "EIDRM", "identifier removed"},
1696 {83, "ENOMSG", "no message of desired type"},
1697 {84, "EOVERFLOW", "value too large to be stored in data type"},
1698 {85, "EILSEQ", "illegal byte sequence"},
1699 {86, "ENOTSUP", "not supported"},
1700 {87, "ECANCELED", "operation Canceled"},
1701 {88, "EBADMSG", "bad or Corrupt message"},
1702 {89, "ENODATA", "no message available"},
1703 {90, "ENOSR", "no STREAM resources"},
1704 {91, "ENOSTR", "not a STREAM"},
1705 {92, "ETIME", "STREAM ioctl timeout"},
1706 {93, "ENOATTR", "attribute not found"},
1707 {94, "EMULTIHOP", "multihop attempted"},
1708 {95, "ENOLINK", "link has been severed"},
1709 {96, "ELAST", "protocol error"},
16541710 }
16551711
16561712 // Signal table
1657 var signals = [...]string{
1658 1: "hangup",
1659 2: "interrupt",
1660 3: "quit",
1661 4: "illegal instruction",
1662 5: "trace/BPT trap",
1663 6: "abort trap",
1664 7: "EMT trap",
1665 8: "floating point exception",
1666 9: "killed",
1667 10: "bus error",
1668 11: "segmentation fault",
1669 12: "bad system call",
1670 13: "broken pipe",
1671 14: "alarm clock",
1672 15: "terminated",
1673 16: "urgent I/O condition",
1674 17: "stopped (signal)",
1675 18: "stopped",
1676 19: "continued",
1677 20: "child exited",
1678 21: "stopped (tty input)",
1679 22: "stopped (tty output)",
1680 23: "I/O possible",
1681 24: "cputime limit exceeded",
1682 25: "filesize limit exceeded",
1683 26: "virtual timer expired",
1684 27: "profiling timer expired",
1685 28: "window size changes",
1686 29: "information request",
1687 30: "user defined signal 1",
1688 31: "user defined signal 2",
1689 32: "power fail/restart",
1713 var signalList = [...]struct {
1714 num syscall.Signal
1715 name string
1716 desc string
1717 }{
1718 {1, "SIGHUP", "hangup"},
1719 {2, "SIGINT", "interrupt"},
1720 {3, "SIGQUIT", "quit"},
1721 {4, "SIGILL", "illegal instruction"},
1722 {5, "SIGTRAP", "trace/BPT trap"},
1723 {6, "SIGIOT", "abort trap"},
1724 {7, "SIGEMT", "EMT trap"},
1725 {8, "SIGFPE", "floating point exception"},
1726 {9, "SIGKILL", "killed"},
1727 {10, "SIGBUS", "bus error"},
1728 {11, "SIGSEGV", "segmentation fault"},
1729 {12, "SIGSYS", "bad system call"},
1730 {13, "SIGPIPE", "broken pipe"},
1731 {14, "SIGALRM", "alarm clock"},
1732 {15, "SIGTERM", "terminated"},
1733 {16, "SIGURG", "urgent I/O condition"},
1734 {17, "SIGSTOP", "stopped (signal)"},
1735 {18, "SIGTSTP", "stopped"},
1736 {19, "SIGCONT", "continued"},
1737 {20, "SIGCHLD", "child exited"},
1738 {21, "SIGTTIN", "stopped (tty input)"},
1739 {22, "SIGTTOU", "stopped (tty output)"},
1740 {23, "SIGIO", "I/O possible"},
1741 {24, "SIGXCPU", "cputime limit exceeded"},
1742 {25, "SIGXFSZ", "filesize limit exceeded"},
1743 {26, "SIGVTALRM", "virtual timer expired"},
1744 {27, "SIGPROF", "profiling timer expired"},
1745 {28, "SIGWINCH", "window size changes"},
1746 {29, "SIGINFO", "information request"},
1747 {30, "SIGUSR1", "user defined signal 1"},
1748 {31, "SIGUSR2", "user defined signal 2"},
1749 {32, "SIGPWR", "power fail/restart"},
16901750 }
0 // mkerrors.sh -m64
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build arm64,netbsd
4
5 // Created by cgo -godefs - DO NOT EDIT
6 // cgo -godefs -- -m64 _const.go
7
8 package unix
9
10 import "syscall"
11
12 const (
13 AF_APPLETALK = 0x10
14 AF_ARP = 0x1c
15 AF_BLUETOOTH = 0x1f
16 AF_CCITT = 0xa
17 AF_CHAOS = 0x5
18 AF_CNT = 0x15
19 AF_COIP = 0x14
20 AF_DATAKIT = 0x9
21 AF_DECnet = 0xc
22 AF_DLI = 0xd
23 AF_E164 = 0x1a
24 AF_ECMA = 0x8
25 AF_HYLINK = 0xf
26 AF_IEEE80211 = 0x20
27 AF_IMPLINK = 0x3
28 AF_INET = 0x2
29 AF_INET6 = 0x18
30 AF_IPX = 0x17
31 AF_ISDN = 0x1a
32 AF_ISO = 0x7
33 AF_LAT = 0xe
34 AF_LINK = 0x12
35 AF_LOCAL = 0x1
36 AF_MAX = 0x23
37 AF_MPLS = 0x21
38 AF_NATM = 0x1b
39 AF_NS = 0x6
40 AF_OROUTE = 0x11
41 AF_OSI = 0x7
42 AF_PUP = 0x4
43 AF_ROUTE = 0x22
44 AF_SNA = 0xb
45 AF_UNIX = 0x1
46 AF_UNSPEC = 0x0
47 ARPHRD_ARCNET = 0x7
48 ARPHRD_ETHER = 0x1
49 ARPHRD_FRELAY = 0xf
50 ARPHRD_IEEE1394 = 0x18
51 ARPHRD_IEEE802 = 0x6
52 ARPHRD_STRIP = 0x17
53 B0 = 0x0
54 B110 = 0x6e
55 B115200 = 0x1c200
56 B1200 = 0x4b0
57 B134 = 0x86
58 B14400 = 0x3840
59 B150 = 0x96
60 B1800 = 0x708
61 B19200 = 0x4b00
62 B200 = 0xc8
63 B230400 = 0x38400
64 B2400 = 0x960
65 B28800 = 0x7080
66 B300 = 0x12c
67 B38400 = 0x9600
68 B460800 = 0x70800
69 B4800 = 0x12c0
70 B50 = 0x32
71 B57600 = 0xe100
72 B600 = 0x258
73 B7200 = 0x1c20
74 B75 = 0x4b
75 B76800 = 0x12c00
76 B921600 = 0xe1000
77 B9600 = 0x2580
78 BIOCFEEDBACK = 0x8004427d
79 BIOCFLUSH = 0x20004268
80 BIOCGBLEN = 0x40044266
81 BIOCGDLT = 0x4004426a
82 BIOCGDLTLIST = 0xc0104277
83 BIOCGETIF = 0x4090426b
84 BIOCGFEEDBACK = 0x4004427c
85 BIOCGHDRCMPLT = 0x40044274
86 BIOCGRTIMEOUT = 0x4010427b
87 BIOCGSEESENT = 0x40044278
88 BIOCGSTATS = 0x4080426f
89 BIOCGSTATSOLD = 0x4008426f
90 BIOCIMMEDIATE = 0x80044270
91 BIOCPROMISC = 0x20004269
92 BIOCSBLEN = 0xc0044266
93 BIOCSDLT = 0x80044276
94 BIOCSETF = 0x80104267
95 BIOCSETIF = 0x8090426c
96 BIOCSFEEDBACK = 0x8004427d
97 BIOCSHDRCMPLT = 0x80044275
98 BIOCSRTIMEOUT = 0x8010427a
99 BIOCSSEESENT = 0x80044279
100 BIOCSTCPF = 0x80104272
101 BIOCSUDPF = 0x80104273
102 BIOCVERSION = 0x40044271
103 BPF_A = 0x10
104 BPF_ABS = 0x20
105 BPF_ADD = 0x0
106 BPF_ALIGNMENT = 0x8
107 BPF_ALIGNMENT32 = 0x4
108 BPF_ALU = 0x4
109 BPF_AND = 0x50
110 BPF_B = 0x10
111 BPF_DFLTBUFSIZE = 0x100000
112 BPF_DIV = 0x30
113 BPF_H = 0x8
114 BPF_IMM = 0x0
115 BPF_IND = 0x40
116 BPF_JA = 0x0
117 BPF_JEQ = 0x10
118 BPF_JGE = 0x30
119 BPF_JGT = 0x20
120 BPF_JMP = 0x5
121 BPF_JSET = 0x40
122 BPF_K = 0x0
123 BPF_LD = 0x0
124 BPF_LDX = 0x1
125 BPF_LEN = 0x80
126 BPF_LSH = 0x60
127 BPF_MAJOR_VERSION = 0x1
128 BPF_MAXBUFSIZE = 0x1000000
129 BPF_MAXINSNS = 0x200
130 BPF_MEM = 0x60
131 BPF_MEMWORDS = 0x10
132 BPF_MINBUFSIZE = 0x20
133 BPF_MINOR_VERSION = 0x1
134 BPF_MISC = 0x7
135 BPF_MSH = 0xa0
136 BPF_MUL = 0x20
137 BPF_NEG = 0x80
138 BPF_OR = 0x40
139 BPF_RELEASE = 0x30bb6
140 BPF_RET = 0x6
141 BPF_RSH = 0x70
142 BPF_ST = 0x2
143 BPF_STX = 0x3
144 BPF_SUB = 0x10
145 BPF_TAX = 0x0
146 BPF_TXA = 0x80
147 BPF_W = 0x0
148 BPF_X = 0x8
149 BRKINT = 0x2
150 CFLUSH = 0xf
151 CLOCAL = 0x8000
152 CLONE_CSIGNAL = 0xff
153 CLONE_FILES = 0x400
154 CLONE_FS = 0x200
155 CLONE_PID = 0x1000
156 CLONE_PTRACE = 0x2000
157 CLONE_SIGHAND = 0x800
158 CLONE_VFORK = 0x4000
159 CLONE_VM = 0x100
160 CREAD = 0x800
161 CRTSCTS = 0x10000
162 CS5 = 0x0
163 CS6 = 0x100
164 CS7 = 0x200
165 CS8 = 0x300
166 CSIZE = 0x300
167 CSTART = 0x11
168 CSTATUS = 0x14
169 CSTOP = 0x13
170 CSTOPB = 0x400
171 CSUSP = 0x1a
172 CTL_HW = 0x6
173 CTL_KERN = 0x1
174 CTL_MAXNAME = 0xc
175 CTL_NET = 0x4
176 CTL_QUERY = -0x2
177 DIOCBSFLUSH = 0x20006478
178 DLT_A429 = 0xb8
179 DLT_A653_ICM = 0xb9
180 DLT_AIRONET_HEADER = 0x78
181 DLT_AOS = 0xde
182 DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
183 DLT_ARCNET = 0x7
184 DLT_ARCNET_LINUX = 0x81
185 DLT_ATM_CLIP = 0x13
186 DLT_ATM_RFC1483 = 0xb
187 DLT_AURORA = 0x7e
188 DLT_AX25 = 0x3
189 DLT_AX25_KISS = 0xca
190 DLT_BACNET_MS_TP = 0xa5
191 DLT_BLUETOOTH_HCI_H4 = 0xbb
192 DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
193 DLT_CAN20B = 0xbe
194 DLT_CAN_SOCKETCAN = 0xe3
195 DLT_CHAOS = 0x5
196 DLT_CISCO_IOS = 0x76
197 DLT_C_HDLC = 0x68
198 DLT_C_HDLC_WITH_DIR = 0xcd
199 DLT_DECT = 0xdd
200 DLT_DOCSIS = 0x8f
201 DLT_ECONET = 0x73
202 DLT_EN10MB = 0x1
203 DLT_EN3MB = 0x2
204 DLT_ENC = 0x6d
205 DLT_ERF = 0xc5
206 DLT_ERF_ETH = 0xaf
207 DLT_ERF_POS = 0xb0
208 DLT_FC_2 = 0xe0
209 DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
210 DLT_FDDI = 0xa
211 DLT_FLEXRAY = 0xd2
212 DLT_FRELAY = 0x6b
213 DLT_FRELAY_WITH_DIR = 0xce
214 DLT_GCOM_SERIAL = 0xad
215 DLT_GCOM_T1E1 = 0xac
216 DLT_GPF_F = 0xab
217 DLT_GPF_T = 0xaa
218 DLT_GPRS_LLC = 0xa9
219 DLT_GSMTAP_ABIS = 0xda
220 DLT_GSMTAP_UM = 0xd9
221 DLT_HDLC = 0x10
222 DLT_HHDLC = 0x79
223 DLT_HIPPI = 0xf
224 DLT_IBM_SN = 0x92
225 DLT_IBM_SP = 0x91
226 DLT_IEEE802 = 0x6
227 DLT_IEEE802_11 = 0x69
228 DLT_IEEE802_11_RADIO = 0x7f
229 DLT_IEEE802_11_RADIO_AVS = 0xa3
230 DLT_IEEE802_15_4 = 0xc3
231 DLT_IEEE802_15_4_LINUX = 0xbf
232 DLT_IEEE802_15_4_NONASK_PHY = 0xd7
233 DLT_IEEE802_16_MAC_CPS = 0xbc
234 DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
235 DLT_IPMB = 0xc7
236 DLT_IPMB_LINUX = 0xd1
237 DLT_IPNET = 0xe2
238 DLT_IPV4 = 0xe4
239 DLT_IPV6 = 0xe5
240 DLT_IP_OVER_FC = 0x7a
241 DLT_JUNIPER_ATM1 = 0x89
242 DLT_JUNIPER_ATM2 = 0x87
243 DLT_JUNIPER_CHDLC = 0xb5
244 DLT_JUNIPER_ES = 0x84
245 DLT_JUNIPER_ETHER = 0xb2
246 DLT_JUNIPER_FRELAY = 0xb4
247 DLT_JUNIPER_GGSN = 0x85
248 DLT_JUNIPER_ISM = 0xc2
249 DLT_JUNIPER_MFR = 0x86
250 DLT_JUNIPER_MLFR = 0x83
251 DLT_JUNIPER_MLPPP = 0x82
252 DLT_JUNIPER_MONITOR = 0xa4
253 DLT_JUNIPER_PIC_PEER = 0xae
254 DLT_JUNIPER_PPP = 0xb3
255 DLT_JUNIPER_PPPOE = 0xa7
256 DLT_JUNIPER_PPPOE_ATM = 0xa8
257 DLT_JUNIPER_SERVICES = 0x88
258 DLT_JUNIPER_ST = 0xc8
259 DLT_JUNIPER_VP = 0xb7
260 DLT_LAPB_WITH_DIR = 0xcf
261 DLT_LAPD = 0xcb
262 DLT_LIN = 0xd4
263 DLT_LINUX_EVDEV = 0xd8
264 DLT_LINUX_IRDA = 0x90
265 DLT_LINUX_LAPD = 0xb1
266 DLT_LINUX_SLL = 0x71
267 DLT_LOOP = 0x6c
268 DLT_LTALK = 0x72
269 DLT_MFR = 0xb6
270 DLT_MOST = 0xd3
271 DLT_MPLS = 0xdb
272 DLT_MTP2 = 0x8c
273 DLT_MTP2_WITH_PHDR = 0x8b
274 DLT_MTP3 = 0x8d
275 DLT_NULL = 0x0
276 DLT_PCI_EXP = 0x7d
277 DLT_PFLOG = 0x75
278 DLT_PFSYNC = 0x12
279 DLT_PPI = 0xc0
280 DLT_PPP = 0x9
281 DLT_PPP_BSDOS = 0xe
282 DLT_PPP_ETHER = 0x33
283 DLT_PPP_PPPD = 0xa6
284 DLT_PPP_SERIAL = 0x32
285 DLT_PPP_WITH_DIR = 0xcc
286 DLT_PRISM_HEADER = 0x77
287 DLT_PRONET = 0x4
288 DLT_RAIF1 = 0xc6
289 DLT_RAW = 0xc
290 DLT_RAWAF_MASK = 0x2240000
291 DLT_RIO = 0x7c
292 DLT_SCCP = 0x8e
293 DLT_SITA = 0xc4
294 DLT_SLIP = 0x8
295 DLT_SLIP_BSDOS = 0xd
296 DLT_SUNATM = 0x7b
297 DLT_SYMANTEC_FIREWALL = 0x63
298 DLT_TZSP = 0x80
299 DLT_USB = 0xba
300 DLT_USB_LINUX = 0xbd
301 DLT_USB_LINUX_MMAPPED = 0xdc
302 DLT_WIHART = 0xdf
303 DLT_X2E_SERIAL = 0xd5
304 DLT_X2E_XORAYA = 0xd6
305 DT_BLK = 0x6
306 DT_CHR = 0x2
307 DT_DIR = 0x4
308 DT_FIFO = 0x1
309 DT_LNK = 0xa
310 DT_REG = 0x8
311 DT_SOCK = 0xc
312 DT_UNKNOWN = 0x0
313 DT_WHT = 0xe
314 ECHO = 0x8
315 ECHOCTL = 0x40
316 ECHOE = 0x2
317 ECHOK = 0x4
318 ECHOKE = 0x1
319 ECHONL = 0x10
320 ECHOPRT = 0x20
321 EMUL_LINUX = 0x1
322 EMUL_LINUX32 = 0x5
323 EMUL_MAXID = 0x6
324 ETHERCAP_JUMBO_MTU = 0x4
325 ETHERCAP_VLAN_HWTAGGING = 0x2
326 ETHERCAP_VLAN_MTU = 0x1
327 ETHERMIN = 0x2e
328 ETHERMTU = 0x5dc
329 ETHERMTU_JUMBO = 0x2328
330 ETHERTYPE_8023 = 0x4
331 ETHERTYPE_AARP = 0x80f3
332 ETHERTYPE_ACCTON = 0x8390
333 ETHERTYPE_AEONIC = 0x8036
334 ETHERTYPE_ALPHA = 0x814a
335 ETHERTYPE_AMBER = 0x6008
336 ETHERTYPE_AMOEBA = 0x8145
337 ETHERTYPE_APOLLO = 0x80f7
338 ETHERTYPE_APOLLODOMAIN = 0x8019
339 ETHERTYPE_APPLETALK = 0x809b
340 ETHERTYPE_APPLITEK = 0x80c7
341 ETHERTYPE_ARGONAUT = 0x803a
342 ETHERTYPE_ARP = 0x806
343 ETHERTYPE_AT = 0x809b
344 ETHERTYPE_ATALK = 0x809b
345 ETHERTYPE_ATOMIC = 0x86df
346 ETHERTYPE_ATT = 0x8069
347 ETHERTYPE_ATTSTANFORD = 0x8008
348 ETHERTYPE_AUTOPHON = 0x806a
349 ETHERTYPE_AXIS = 0x8856
350 ETHERTYPE_BCLOOP = 0x9003
351 ETHERTYPE_BOFL = 0x8102
352 ETHERTYPE_CABLETRON = 0x7034
353 ETHERTYPE_CHAOS = 0x804
354 ETHERTYPE_COMDESIGN = 0x806c
355 ETHERTYPE_COMPUGRAPHIC = 0x806d
356 ETHERTYPE_COUNTERPOINT = 0x8062
357 ETHERTYPE_CRONUS = 0x8004
358 ETHERTYPE_CRONUSVLN = 0x8003
359 ETHERTYPE_DCA = 0x1234
360 ETHERTYPE_DDE = 0x807b
361 ETHERTYPE_DEBNI = 0xaaaa
362 ETHERTYPE_DECAM = 0x8048
363 ETHERTYPE_DECCUST = 0x6006
364 ETHERTYPE_DECDIAG = 0x6005
365 ETHERTYPE_DECDNS = 0x803c
366 ETHERTYPE_DECDTS = 0x803e
367 ETHERTYPE_DECEXPER = 0x6000
368 ETHERTYPE_DECLAST = 0x8041
369 ETHERTYPE_DECLTM = 0x803f
370 ETHERTYPE_DECMUMPS = 0x6009
371 ETHERTYPE_DECNETBIOS = 0x8040
372 ETHERTYPE_DELTACON = 0x86de
373 ETHERTYPE_DIDDLE = 0x4321
374 ETHERTYPE_DLOG1 = 0x660
375 ETHERTYPE_DLOG2 = 0x661
376 ETHERTYPE_DN = 0x6003
377 ETHERTYPE_DOGFIGHT = 0x1989
378 ETHERTYPE_DSMD = 0x8039
379 ETHERTYPE_ECMA = 0x803
380 ETHERTYPE_ENCRYPT = 0x803d
381 ETHERTYPE_ES = 0x805d
382 ETHERTYPE_EXCELAN = 0x8010
383 ETHERTYPE_EXPERDATA = 0x8049
384 ETHERTYPE_FLIP = 0x8146
385 ETHERTYPE_FLOWCONTROL = 0x8808
386 ETHERTYPE_FRARP = 0x808
387 ETHERTYPE_GENDYN = 0x8068
388 ETHERTYPE_HAYES = 0x8130
389 ETHERTYPE_HIPPI_FP = 0x8180
390 ETHERTYPE_HITACHI = 0x8820
391 ETHERTYPE_HP = 0x8005
392 ETHERTYPE_IEEEPUP = 0xa00
393 ETHERTYPE_IEEEPUPAT = 0xa01
394 ETHERTYPE_IMLBL = 0x4c42
395 ETHERTYPE_IMLBLDIAG = 0x424c
396 ETHERTYPE_IP = 0x800
397 ETHERTYPE_IPAS = 0x876c
398 ETHERTYPE_IPV6 = 0x86dd
399 ETHERTYPE_IPX = 0x8137
400 ETHERTYPE_IPXNEW = 0x8037
401 ETHERTYPE_KALPANA = 0x8582
402 ETHERTYPE_LANBRIDGE = 0x8038
403 ETHERTYPE_LANPROBE = 0x8888
404 ETHERTYPE_LAT = 0x6004
405 ETHERTYPE_LBACK = 0x9000
406 ETHERTYPE_LITTLE = 0x8060
407 ETHERTYPE_LOGICRAFT = 0x8148
408 ETHERTYPE_LOOPBACK = 0x9000
409 ETHERTYPE_MATRA = 0x807a
410 ETHERTYPE_MAX = 0xffff
411 ETHERTYPE_MERIT = 0x807c
412 ETHERTYPE_MICP = 0x873a
413 ETHERTYPE_MOPDL = 0x6001
414 ETHERTYPE_MOPRC = 0x6002
415 ETHERTYPE_MOTOROLA = 0x818d
416 ETHERTYPE_MPLS = 0x8847
417 ETHERTYPE_MPLS_MCAST = 0x8848
418 ETHERTYPE_MUMPS = 0x813f
419 ETHERTYPE_NBPCC = 0x3c04
420 ETHERTYPE_NBPCLAIM = 0x3c09
421 ETHERTYPE_NBPCLREQ = 0x3c05
422 ETHERTYPE_NBPCLRSP = 0x3c06
423 ETHERTYPE_NBPCREQ = 0x3c02
424 ETHERTYPE_NBPCRSP = 0x3c03
425 ETHERTYPE_NBPDG = 0x3c07
426 ETHERTYPE_NBPDGB = 0x3c08
427 ETHERTYPE_NBPDLTE = 0x3c0a
428 ETHERTYPE_NBPRAR = 0x3c0c
429 ETHERTYPE_NBPRAS = 0x3c0b
430 ETHERTYPE_NBPRST = 0x3c0d
431 ETHERTYPE_NBPSCD = 0x3c01
432 ETHERTYPE_NBPVCD = 0x3c00
433 ETHERTYPE_NBS = 0x802
434 ETHERTYPE_NCD = 0x8149
435 ETHERTYPE_NESTAR = 0x8006
436 ETHERTYPE_NETBEUI = 0x8191
437 ETHERTYPE_NOVELL = 0x8138
438 ETHERTYPE_NS = 0x600
439 ETHERTYPE_NSAT = 0x601
440 ETHERTYPE_NSCOMPAT = 0x807
441 ETHERTYPE_NTRAILER = 0x10
442 ETHERTYPE_OS9 = 0x7007
443 ETHERTYPE_OS9NET = 0x7009
444 ETHERTYPE_PACER = 0x80c6
445 ETHERTYPE_PAE = 0x888e
446 ETHERTYPE_PCS = 0x4242
447 ETHERTYPE_PLANNING = 0x8044
448 ETHERTYPE_PPP = 0x880b
449 ETHERTYPE_PPPOE = 0x8864
450 ETHERTYPE_PPPOEDISC = 0x8863
451 ETHERTYPE_PRIMENTS = 0x7031
452 ETHERTYPE_PUP = 0x200
453 ETHERTYPE_PUPAT = 0x200
454 ETHERTYPE_RACAL = 0x7030
455 ETHERTYPE_RATIONAL = 0x8150
456 ETHERTYPE_RAWFR = 0x6559
457 ETHERTYPE_RCL = 0x1995
458 ETHERTYPE_RDP = 0x8739
459 ETHERTYPE_RETIX = 0x80f2
460 ETHERTYPE_REVARP = 0x8035
461 ETHERTYPE_SCA = 0x6007
462 ETHERTYPE_SECTRA = 0x86db
463 ETHERTYPE_SECUREDATA = 0x876d
464 ETHERTYPE_SGITW = 0x817e
465 ETHERTYPE_SG_BOUNCE = 0x8016
466 ETHERTYPE_SG_DIAG = 0x8013
467 ETHERTYPE_SG_NETGAMES = 0x8014
468 ETHERTYPE_SG_RESV = 0x8015
469 ETHERTYPE_SIMNET = 0x5208
470 ETHERTYPE_SLOWPROTOCOLS = 0x8809
471 ETHERTYPE_SNA = 0x80d5
472 ETHERTYPE_SNMP = 0x814c
473 ETHERTYPE_SONIX = 0xfaf5
474 ETHERTYPE_SPIDER = 0x809f
475 ETHERTYPE_SPRITE = 0x500
476 ETHERTYPE_STP = 0x8181
477 ETHERTYPE_TALARIS = 0x812b
478 ETHERTYPE_TALARISMC = 0x852b
479 ETHERTYPE_TCPCOMP = 0x876b
480 ETHERTYPE_TCPSM = 0x9002
481 ETHERTYPE_TEC = 0x814f
482 ETHERTYPE_TIGAN = 0x802f
483 ETHERTYPE_TRAIL = 0x1000
484 ETHERTYPE_TRANSETHER = 0x6558
485 ETHERTYPE_TYMSHARE = 0x802e
486 ETHERTYPE_UBBST = 0x7005
487 ETHERTYPE_UBDEBUG = 0x900
488 ETHERTYPE_UBDIAGLOOP = 0x7002
489 ETHERTYPE_UBDL = 0x7000
490 ETHERTYPE_UBNIU = 0x7001
491 ETHERTYPE_UBNMC = 0x7003
492 ETHERTYPE_VALID = 0x1600
493 ETHERTYPE_VARIAN = 0x80dd
494 ETHERTYPE_VAXELN = 0x803b
495 ETHERTYPE_VEECO = 0x8067
496 ETHERTYPE_VEXP = 0x805b
497 ETHERTYPE_VGLAB = 0x8131
498 ETHERTYPE_VINES = 0xbad
499 ETHERTYPE_VINESECHO = 0xbaf
500 ETHERTYPE_VINESLOOP = 0xbae
501 ETHERTYPE_VITAL = 0xff00
502 ETHERTYPE_VLAN = 0x8100
503 ETHERTYPE_VLTLMAN = 0x8080
504 ETHERTYPE_VPROD = 0x805c
505 ETHERTYPE_VURESERVED = 0x8147
506 ETHERTYPE_WATERLOO = 0x8130
507 ETHERTYPE_WELLFLEET = 0x8103
508 ETHERTYPE_X25 = 0x805
509 ETHERTYPE_X75 = 0x801
510 ETHERTYPE_XNSSM = 0x9001
511 ETHERTYPE_XTP = 0x817d
512 ETHER_ADDR_LEN = 0x6
513 ETHER_CRC_LEN = 0x4
514 ETHER_CRC_POLY_BE = 0x4c11db6
515 ETHER_CRC_POLY_LE = 0xedb88320
516 ETHER_HDR_LEN = 0xe
517 ETHER_MAX_LEN = 0x5ee
518 ETHER_MAX_LEN_JUMBO = 0x233a
519 ETHER_MIN_LEN = 0x40
520 ETHER_PPPOE_ENCAP_LEN = 0x8
521 ETHER_TYPE_LEN = 0x2
522 ETHER_VLAN_ENCAP_LEN = 0x4
523 EVFILT_AIO = 0x2
524 EVFILT_PROC = 0x4
525 EVFILT_READ = 0x0
526 EVFILT_SIGNAL = 0x5
527 EVFILT_SYSCOUNT = 0x7
528 EVFILT_TIMER = 0x6
529 EVFILT_VNODE = 0x3
530 EVFILT_WRITE = 0x1
531 EV_ADD = 0x1
532 EV_CLEAR = 0x20
533 EV_DELETE = 0x2
534 EV_DISABLE = 0x8
535 EV_ENABLE = 0x4
536 EV_EOF = 0x8000
537 EV_ERROR = 0x4000
538 EV_FLAG1 = 0x2000
539 EV_ONESHOT = 0x10
540 EV_SYSFLAGS = 0xf000
541 EXTA = 0x4b00
542 EXTATTR_CMD_START = 0x1
543 EXTATTR_CMD_STOP = 0x2
544 EXTATTR_NAMESPACE_SYSTEM = 0x2
545 EXTATTR_NAMESPACE_USER = 0x1
546 EXTB = 0x9600
547 EXTPROC = 0x800
548 FD_CLOEXEC = 0x1
549 FD_SETSIZE = 0x100
550 FLUSHO = 0x800000
551 F_CLOSEM = 0xa
552 F_DUPFD = 0x0
553 F_DUPFD_CLOEXEC = 0xc
554 F_FSCTL = -0x80000000
555 F_FSDIRMASK = 0x70000000
556 F_FSIN = 0x10000000
557 F_FSINOUT = 0x30000000
558 F_FSOUT = 0x20000000
559 F_FSPRIV = 0x8000
560 F_FSVOID = 0x40000000
561 F_GETFD = 0x1
562 F_GETFL = 0x3
563 F_GETLK = 0x7
564 F_GETNOSIGPIPE = 0xd
565 F_GETOWN = 0x5
566 F_MAXFD = 0xb
567 F_OK = 0x0
568 F_PARAM_MASK = 0xfff
569 F_PARAM_MAX = 0xfff
570 F_RDLCK = 0x1
571 F_SETFD = 0x2
572 F_SETFL = 0x4
573 F_SETLK = 0x8
574 F_SETLKW = 0x9
575 F_SETNOSIGPIPE = 0xe
576 F_SETOWN = 0x6
577 F_UNLCK = 0x2
578 F_WRLCK = 0x3
579 HUPCL = 0x4000
580 HW_MACHINE = 0x1
581 ICANON = 0x100
582 ICMP6_FILTER = 0x12
583 ICRNL = 0x100
584 IEXTEN = 0x400
585 IFAN_ARRIVAL = 0x0
586 IFAN_DEPARTURE = 0x1
587 IFA_ROUTE = 0x1
588 IFF_ALLMULTI = 0x200
589 IFF_BROADCAST = 0x2
590 IFF_CANTCHANGE = 0x8f52
591 IFF_DEBUG = 0x4
592 IFF_LINK0 = 0x1000
593 IFF_LINK1 = 0x2000
594 IFF_LINK2 = 0x4000
595 IFF_LOOPBACK = 0x8
596 IFF_MULTICAST = 0x8000
597 IFF_NOARP = 0x80
598 IFF_NOTRAILERS = 0x20
599 IFF_OACTIVE = 0x400
600 IFF_POINTOPOINT = 0x10
601 IFF_PROMISC = 0x100
602 IFF_RUNNING = 0x40
603 IFF_SIMPLEX = 0x800
604 IFF_UP = 0x1
605 IFNAMSIZ = 0x10
606 IFT_1822 = 0x2
607 IFT_A12MPPSWITCH = 0x82
608 IFT_AAL2 = 0xbb
609 IFT_AAL5 = 0x31
610 IFT_ADSL = 0x5e
611 IFT_AFLANE8023 = 0x3b
612 IFT_AFLANE8025 = 0x3c
613 IFT_ARAP = 0x58
614 IFT_ARCNET = 0x23
615 IFT_ARCNETPLUS = 0x24
616 IFT_ASYNC = 0x54
617 IFT_ATM = 0x25
618 IFT_ATMDXI = 0x69
619 IFT_ATMFUNI = 0x6a
620 IFT_ATMIMA = 0x6b
621 IFT_ATMLOGICAL = 0x50
622 IFT_ATMRADIO = 0xbd
623 IFT_ATMSUBINTERFACE = 0x86
624 IFT_ATMVCIENDPT = 0xc2
625 IFT_ATMVIRTUAL = 0x95
626 IFT_BGPPOLICYACCOUNTING = 0xa2
627 IFT_BRIDGE = 0xd1
628 IFT_BSC = 0x53
629 IFT_CARP = 0xf8
630 IFT_CCTEMUL = 0x3d
631 IFT_CEPT = 0x13
632 IFT_CES = 0x85
633 IFT_CHANNEL = 0x46
634 IFT_CNR = 0x55
635 IFT_COFFEE = 0x84
636 IFT_COMPOSITELINK = 0x9b
637 IFT_DCN = 0x8d
638 IFT_DIGITALPOWERLINE = 0x8a
639 IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
640 IFT_DLSW = 0x4a
641 IFT_DOCSCABLEDOWNSTREAM = 0x80
642 IFT_DOCSCABLEMACLAYER = 0x7f
643 IFT_DOCSCABLEUPSTREAM = 0x81
644 IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
645 IFT_DS0 = 0x51
646 IFT_DS0BUNDLE = 0x52
647 IFT_DS1FDL = 0xaa
648 IFT_DS3 = 0x1e
649 IFT_DTM = 0x8c
650 IFT_DVBASILN = 0xac
651 IFT_DVBASIOUT = 0xad
652 IFT_DVBRCCDOWNSTREAM = 0x93
653 IFT_DVBRCCMACLAYER = 0x92
654 IFT_DVBRCCUPSTREAM = 0x94
655 IFT_ECONET = 0xce
656 IFT_EON = 0x19
657 IFT_EPLRS = 0x57
658 IFT_ESCON = 0x49
659 IFT_ETHER = 0x6
660 IFT_FAITH = 0xf2
661 IFT_FAST = 0x7d
662 IFT_FASTETHER = 0x3e
663 IFT_FASTETHERFX = 0x45
664 IFT_FDDI = 0xf
665 IFT_FIBRECHANNEL = 0x38
666 IFT_FRAMERELAYINTERCONNECT = 0x3a
667 IFT_FRAMERELAYMPI = 0x5c
668 IFT_FRDLCIENDPT = 0xc1
669 IFT_FRELAY = 0x20
670 IFT_FRELAYDCE = 0x2c
671 IFT_FRF16MFRBUNDLE = 0xa3
672 IFT_FRFORWARD = 0x9e
673 IFT_G703AT2MB = 0x43
674 IFT_G703AT64K = 0x42
675 IFT_GIF = 0xf0
676 IFT_GIGABITETHERNET = 0x75
677 IFT_GR303IDT = 0xb2
678 IFT_GR303RDT = 0xb1
679 IFT_H323GATEKEEPER = 0xa4
680 IFT_H323PROXY = 0xa5
681 IFT_HDH1822 = 0x3
682 IFT_HDLC = 0x76
683 IFT_HDSL2 = 0xa8
684 IFT_HIPERLAN2 = 0xb7
685 IFT_HIPPI = 0x2f
686 IFT_HIPPIINTERFACE = 0x39
687 IFT_HOSTPAD = 0x5a
688 IFT_HSSI = 0x2e
689 IFT_HY = 0xe
690 IFT_IBM370PARCHAN = 0x48
691 IFT_IDSL = 0x9a
692 IFT_IEEE1394 = 0x90
693 IFT_IEEE80211 = 0x47
694 IFT_IEEE80212 = 0x37
695 IFT_IEEE8023ADLAG = 0xa1
696 IFT_IFGSN = 0x91
697 IFT_IMT = 0xbe
698 IFT_INFINIBAND = 0xc7
699 IFT_INTERLEAVE = 0x7c
700 IFT_IP = 0x7e
701 IFT_IPFORWARD = 0x8e
702 IFT_IPOVERATM = 0x72
703 IFT_IPOVERCDLC = 0x6d
704 IFT_IPOVERCLAW = 0x6e
705 IFT_IPSWITCH = 0x4e
706 IFT_ISDN = 0x3f
707 IFT_ISDNBASIC = 0x14
708 IFT_ISDNPRIMARY = 0x15
709 IFT_ISDNS = 0x4b
710 IFT_ISDNU = 0x4c
711 IFT_ISO88022LLC = 0x29
712 IFT_ISO88023 = 0x7
713 IFT_ISO88024 = 0x8
714 IFT_ISO88025 = 0x9
715 IFT_ISO88025CRFPINT = 0x62
716 IFT_ISO88025DTR = 0x56
717 IFT_ISO88025FIBER = 0x73
718 IFT_ISO88026 = 0xa
719 IFT_ISUP = 0xb3
720 IFT_L2VLAN = 0x87
721 IFT_L3IPVLAN = 0x88
722 IFT_L3IPXVLAN = 0x89
723 IFT_LAPB = 0x10
724 IFT_LAPD = 0x4d
725 IFT_LAPF = 0x77
726 IFT_LINEGROUP = 0xd2
727 IFT_LOCALTALK = 0x2a
728 IFT_LOOP = 0x18
729 IFT_MEDIAMAILOVERIP = 0x8b
730 IFT_MFSIGLINK = 0xa7
731 IFT_MIOX25 = 0x26
732 IFT_MODEM = 0x30
733 IFT_MPC = 0x71
734 IFT_MPLS = 0xa6
735 IFT_MPLSTUNNEL = 0x96
736 IFT_MSDSL = 0x8f
737 IFT_MVL = 0xbf
738 IFT_MYRINET = 0x63
739 IFT_NFAS = 0xaf
740 IFT_NSIP = 0x1b
741 IFT_OPTICALCHANNEL = 0xc3
742 IFT_OPTICALTRANSPORT = 0xc4
743 IFT_OTHER = 0x1
744 IFT_P10 = 0xc
745 IFT_P80 = 0xd
746 IFT_PARA = 0x22
747 IFT_PFLOG = 0xf5
748 IFT_PFSYNC = 0xf6
749 IFT_PLC = 0xae
750 IFT_PON155 = 0xcf
751 IFT_PON622 = 0xd0
752 IFT_POS = 0xab
753 IFT_PPP = 0x17
754 IFT_PPPMULTILINKBUNDLE = 0x6c
755 IFT_PROPATM = 0xc5
756 IFT_PROPBWAP2MP = 0xb8
757 IFT_PROPCNLS = 0x59
758 IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
759 IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
760 IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
761 IFT_PROPMUX = 0x36
762 IFT_PROPVIRTUAL = 0x35
763 IFT_PROPWIRELESSP2P = 0x9d
764 IFT_PTPSERIAL = 0x16
765 IFT_PVC = 0xf1
766 IFT_Q2931 = 0xc9
767 IFT_QLLC = 0x44
768 IFT_RADIOMAC = 0xbc
769 IFT_RADSL = 0x5f
770 IFT_REACHDSL = 0xc0
771 IFT_RFC1483 = 0x9f
772 IFT_RS232 = 0x21
773 IFT_RSRB = 0x4f
774 IFT_SDLC = 0x11
775 IFT_SDSL = 0x60
776 IFT_SHDSL = 0xa9
777 IFT_SIP = 0x1f
778 IFT_SIPSIG = 0xcc
779 IFT_SIPTG = 0xcb
780 IFT_SLIP = 0x1c
781 IFT_SMDSDXI = 0x2b
782 IFT_SMDSICIP = 0x34
783 IFT_SONET = 0x27
784 IFT_SONETOVERHEADCHANNEL = 0xb9
785 IFT_SONETPATH = 0x32
786 IFT_SONETVT = 0x33
787 IFT_SRP = 0x97
788 IFT_SS7SIGLINK = 0x9c
789 IFT_STACKTOSTACK = 0x6f
790 IFT_STARLAN = 0xb
791 IFT_STF = 0xd7
792 IFT_T1 = 0x12
793 IFT_TDLC = 0x74
794 IFT_TELINK = 0xc8
795 IFT_TERMPAD = 0x5b
796 IFT_TR008 = 0xb0
797 IFT_TRANSPHDLC = 0x7b
798 IFT_TUNNEL = 0x83
799 IFT_ULTRA = 0x1d
800 IFT_USB = 0xa0
801 IFT_V11 = 0x40
802 IFT_V35 = 0x2d
803 IFT_V36 = 0x41
804 IFT_V37 = 0x78
805 IFT_VDSL = 0x61
806 IFT_VIRTUALIPADDRESS = 0x70
807 IFT_VIRTUALTG = 0xca
808 IFT_VOICEDID = 0xd5
809 IFT_VOICEEM = 0x64
810 IFT_VOICEEMFGD = 0xd3
811 IFT_VOICEENCAP = 0x67
812 IFT_VOICEFGDEANA = 0xd4
813 IFT_VOICEFXO = 0x65
814 IFT_VOICEFXS = 0x66
815 IFT_VOICEOVERATM = 0x98
816 IFT_VOICEOVERCABLE = 0xc6
817 IFT_VOICEOVERFRAMERELAY = 0x99
818 IFT_VOICEOVERIP = 0x68
819 IFT_X213 = 0x5d
820 IFT_X25 = 0x5
821 IFT_X25DDN = 0x4
822 IFT_X25HUNTGROUP = 0x7a
823 IFT_X25MLP = 0x79
824 IFT_X25PLE = 0x28
825 IFT_XETHER = 0x1a
826 IGNBRK = 0x1
827 IGNCR = 0x80
828 IGNPAR = 0x4
829 IMAXBEL = 0x2000
830 INLCR = 0x40
831 INPCK = 0x10
832 IN_CLASSA_HOST = 0xffffff
833 IN_CLASSA_MAX = 0x80
834 IN_CLASSA_NET = 0xff000000
835 IN_CLASSA_NSHIFT = 0x18
836 IN_CLASSB_HOST = 0xffff
837 IN_CLASSB_MAX = 0x10000
838 IN_CLASSB_NET = 0xffff0000
839 IN_CLASSB_NSHIFT = 0x10
840 IN_CLASSC_HOST = 0xff
841 IN_CLASSC_NET = 0xffffff00
842 IN_CLASSC_NSHIFT = 0x8
843 IN_CLASSD_HOST = 0xfffffff
844 IN_CLASSD_NET = 0xf0000000
845 IN_CLASSD_NSHIFT = 0x1c
846 IN_LOOPBACKNET = 0x7f
847 IPPROTO_AH = 0x33
848 IPPROTO_CARP = 0x70
849 IPPROTO_DONE = 0x101
850 IPPROTO_DSTOPTS = 0x3c
851 IPPROTO_EGP = 0x8
852 IPPROTO_ENCAP = 0x62
853 IPPROTO_EON = 0x50
854 IPPROTO_ESP = 0x32
855 IPPROTO_ETHERIP = 0x61
856 IPPROTO_FRAGMENT = 0x2c
857 IPPROTO_GGP = 0x3
858 IPPROTO_GRE = 0x2f
859 IPPROTO_HOPOPTS = 0x0
860 IPPROTO_ICMP = 0x1
861 IPPROTO_ICMPV6 = 0x3a
862 IPPROTO_IDP = 0x16
863 IPPROTO_IGMP = 0x2
864 IPPROTO_IP = 0x0
865 IPPROTO_IPCOMP = 0x6c
866 IPPROTO_IPIP = 0x4
867 IPPROTO_IPV4 = 0x4
868 IPPROTO_IPV6 = 0x29
869 IPPROTO_IPV6_ICMP = 0x3a
870 IPPROTO_MAX = 0x100
871 IPPROTO_MAXID = 0x34
872 IPPROTO_MOBILE = 0x37
873 IPPROTO_NONE = 0x3b
874 IPPROTO_PFSYNC = 0xf0
875 IPPROTO_PIM = 0x67
876 IPPROTO_PUP = 0xc
877 IPPROTO_RAW = 0xff
878 IPPROTO_ROUTING = 0x2b
879 IPPROTO_RSVP = 0x2e
880 IPPROTO_TCP = 0x6
881 IPPROTO_TP = 0x1d
882 IPPROTO_UDP = 0x11
883 IPPROTO_VRRP = 0x70
884 IPV6_CHECKSUM = 0x1a
885 IPV6_DEFAULT_MULTICAST_HOPS = 0x1
886 IPV6_DEFAULT_MULTICAST_LOOP = 0x1
887 IPV6_DEFHLIM = 0x40
888 IPV6_DONTFRAG = 0x3e
889 IPV6_DSTOPTS = 0x32
890 IPV6_FAITH = 0x1d
891 IPV6_FLOWINFO_MASK = 0xffffff0f
892 IPV6_FLOWLABEL_MASK = 0xffff0f00
893 IPV6_FRAGTTL = 0x78
894 IPV6_HLIMDEC = 0x1
895 IPV6_HOPLIMIT = 0x2f
896 IPV6_HOPOPTS = 0x31
897 IPV6_IPSEC_POLICY = 0x1c
898 IPV6_JOIN_GROUP = 0xc
899 IPV6_LEAVE_GROUP = 0xd
900 IPV6_MAXHLIM = 0xff
901 IPV6_MAXPACKET = 0xffff
902 IPV6_MMTU = 0x500
903 IPV6_MULTICAST_HOPS = 0xa
904 IPV6_MULTICAST_IF = 0x9
905 IPV6_MULTICAST_LOOP = 0xb
906 IPV6_NEXTHOP = 0x30
907 IPV6_PATHMTU = 0x2c
908 IPV6_PKTINFO = 0x2e
909 IPV6_PORTRANGE = 0xe
910 IPV6_PORTRANGE_DEFAULT = 0x0
911 IPV6_PORTRANGE_HIGH = 0x1
912 IPV6_PORTRANGE_LOW = 0x2
913 IPV6_RECVDSTOPTS = 0x28
914 IPV6_RECVHOPLIMIT = 0x25
915 IPV6_RECVHOPOPTS = 0x27
916 IPV6_RECVPATHMTU = 0x2b
917 IPV6_RECVPKTINFO = 0x24
918 IPV6_RECVRTHDR = 0x26
919 IPV6_RECVTCLASS = 0x39
920 IPV6_RTHDR = 0x33
921 IPV6_RTHDRDSTOPTS = 0x23
922 IPV6_RTHDR_LOOSE = 0x0
923 IPV6_RTHDR_STRICT = 0x1
924 IPV6_RTHDR_TYPE_0 = 0x0
925 IPV6_SOCKOPT_RESERVED1 = 0x3
926 IPV6_TCLASS = 0x3d
927 IPV6_UNICAST_HOPS = 0x4
928 IPV6_USE_MIN_MTU = 0x2a
929 IPV6_V6ONLY = 0x1b
930 IPV6_VERSION = 0x60
931 IPV6_VERSION_MASK = 0xf0
932 IP_ADD_MEMBERSHIP = 0xc
933 IP_DEFAULT_MULTICAST_LOOP = 0x1
934 IP_DEFAULT_MULTICAST_TTL = 0x1
935 IP_DF = 0x4000
936 IP_DROP_MEMBERSHIP = 0xd
937 IP_EF = 0x8000
938 IP_ERRORMTU = 0x15
939 IP_HDRINCL = 0x2
940 IP_IPSEC_POLICY = 0x16
941 IP_MAXPACKET = 0xffff
942 IP_MAX_MEMBERSHIPS = 0x14
943 IP_MF = 0x2000
944 IP_MINFRAGSIZE = 0x45
945 IP_MINTTL = 0x18
946 IP_MSS = 0x240
947 IP_MULTICAST_IF = 0x9
948 IP_MULTICAST_LOOP = 0xb
949 IP_MULTICAST_TTL = 0xa
950 IP_OFFMASK = 0x1fff
951 IP_OPTIONS = 0x1
952 IP_PORTRANGE = 0x13
953 IP_PORTRANGE_DEFAULT = 0x0
954 IP_PORTRANGE_HIGH = 0x1
955 IP_PORTRANGE_LOW = 0x2
956 IP_RECVDSTADDR = 0x7
957 IP_RECVIF = 0x14
958 IP_RECVOPTS = 0x5
959 IP_RECVRETOPTS = 0x6
960 IP_RECVTTL = 0x17
961 IP_RETOPTS = 0x8
962 IP_RF = 0x8000
963 IP_TOS = 0x3
964 IP_TTL = 0x4
965 ISIG = 0x80
966 ISTRIP = 0x20
967 IXANY = 0x800
968 IXOFF = 0x400
969 IXON = 0x200
970 KERN_HOSTNAME = 0xa
971 KERN_OSRELEASE = 0x2
972 KERN_OSTYPE = 0x1
973 KERN_VERSION = 0x4
974 LOCK_EX = 0x2
975 LOCK_NB = 0x4
976 LOCK_SH = 0x1
977 LOCK_UN = 0x8
978 MADV_DONTNEED = 0x4
979 MADV_FREE = 0x6
980 MADV_NORMAL = 0x0
981 MADV_RANDOM = 0x1
982 MADV_SEQUENTIAL = 0x2
983 MADV_SPACEAVAIL = 0x5
984 MADV_WILLNEED = 0x3
985 MAP_ALIGNMENT_16MB = 0x18000000
986 MAP_ALIGNMENT_1TB = 0x28000000
987 MAP_ALIGNMENT_256TB = 0x30000000
988 MAP_ALIGNMENT_4GB = 0x20000000
989 MAP_ALIGNMENT_64KB = 0x10000000
990 MAP_ALIGNMENT_64PB = 0x38000000
991 MAP_ALIGNMENT_MASK = -0x1000000
992 MAP_ALIGNMENT_SHIFT = 0x18
993 MAP_ANON = 0x1000
994 MAP_FILE = 0x0
995 MAP_FIXED = 0x10
996 MAP_HASSEMAPHORE = 0x200
997 MAP_INHERIT = 0x80
998 MAP_INHERIT_COPY = 0x1
999 MAP_INHERIT_DEFAULT = 0x1
1000 MAP_INHERIT_DONATE_COPY = 0x3
1001 MAP_INHERIT_NONE = 0x2
1002 MAP_INHERIT_SHARE = 0x0
1003 MAP_NORESERVE = 0x40
1004 MAP_PRIVATE = 0x2
1005 MAP_RENAME = 0x20
1006 MAP_SHARED = 0x1
1007 MAP_STACK = 0x2000
1008 MAP_TRYFIXED = 0x400
1009 MAP_WIRED = 0x800
1010 MCL_CURRENT = 0x1
1011 MCL_FUTURE = 0x2
1012 MNT_ASYNC = 0x40
1013 MNT_BASIC_FLAGS = 0xe782807f
1014 MNT_DEFEXPORTED = 0x200
1015 MNT_DISCARD = 0x800000
1016 MNT_EXKERB = 0x800
1017 MNT_EXNORESPORT = 0x8000000
1018 MNT_EXPORTANON = 0x400
1019 MNT_EXPORTED = 0x100
1020 MNT_EXPUBLIC = 0x10000000
1021 MNT_EXRDONLY = 0x80
1022 MNT_EXTATTR = 0x1000000
1023 MNT_FORCE = 0x80000
1024 MNT_GETARGS = 0x400000
1025 MNT_IGNORE = 0x100000
1026 MNT_LAZY = 0x3
1027 MNT_LOCAL = 0x1000
1028 MNT_LOG = 0x2000000
1029 MNT_NOATIME = 0x4000000
1030 MNT_NOCOREDUMP = 0x8000
1031 MNT_NODEV = 0x10
1032 MNT_NODEVMTIME = 0x40000000
1033 MNT_NOEXEC = 0x4
1034 MNT_NOSUID = 0x8
1035 MNT_NOWAIT = 0x2
1036 MNT_OP_FLAGS = 0x4d0000
1037 MNT_QUOTA = 0x2000
1038 MNT_RDONLY = 0x1
1039 MNT_RELATIME = 0x20000
1040 MNT_RELOAD = 0x40000
1041 MNT_ROOTFS = 0x4000
1042 MNT_SOFTDEP = 0x80000000
1043 MNT_SYMPERM = 0x20000000
1044 MNT_SYNCHRONOUS = 0x2
1045 MNT_UNION = 0x20
1046 MNT_UPDATE = 0x10000
1047 MNT_VISFLAGMASK = 0xff90ffff
1048 MNT_WAIT = 0x1
1049 MSG_BCAST = 0x100
1050 MSG_CMSG_CLOEXEC = 0x800
1051 MSG_CONTROLMBUF = 0x2000000
1052 MSG_CTRUNC = 0x20
1053 MSG_DONTROUTE = 0x4
1054 MSG_DONTWAIT = 0x80
1055 MSG_EOR = 0x8
1056 MSG_IOVUSRSPACE = 0x4000000
1057 MSG_LENUSRSPACE = 0x8000000
1058 MSG_MCAST = 0x200
1059 MSG_NAMEMBUF = 0x1000000
1060 MSG_NBIO = 0x1000
1061 MSG_NOSIGNAL = 0x400
1062 MSG_OOB = 0x1
1063 MSG_PEEK = 0x2
1064 MSG_TRUNC = 0x10
1065 MSG_USERFLAGS = 0xffffff
1066 MSG_WAITALL = 0x40
1067 MS_ASYNC = 0x1
1068 MS_INVALIDATE = 0x2
1069 MS_SYNC = 0x4
1070 NAME_MAX = 0x1ff
1071 NET_RT_DUMP = 0x1
1072 NET_RT_FLAGS = 0x2
1073 NET_RT_IFLIST = 0x5
1074 NET_RT_MAXID = 0x6
1075 NET_RT_OIFLIST = 0x4
1076 NET_RT_OOIFLIST = 0x3
1077 NOFLSH = 0x80000000
1078 NOTE_ATTRIB = 0x8
1079 NOTE_CHILD = 0x4
1080 NOTE_DELETE = 0x1
1081 NOTE_EXEC = 0x20000000
1082 NOTE_EXIT = 0x80000000
1083 NOTE_EXTEND = 0x4
1084 NOTE_FORK = 0x40000000
1085 NOTE_LINK = 0x10
1086 NOTE_LOWAT = 0x1
1087 NOTE_PCTRLMASK = 0xf0000000
1088 NOTE_PDATAMASK = 0xfffff
1089 NOTE_RENAME = 0x20
1090 NOTE_REVOKE = 0x40
1091 NOTE_TRACK = 0x1
1092 NOTE_TRACKERR = 0x2
1093 NOTE_WRITE = 0x2
1094 OCRNL = 0x10
1095 OFIOGETBMAP = 0xc004667a
1096 ONLCR = 0x2
1097 ONLRET = 0x40
1098 ONOCR = 0x20
1099 ONOEOT = 0x8
1100 OPOST = 0x1
1101 O_ACCMODE = 0x3
1102 O_ALT_IO = 0x40000
1103 O_APPEND = 0x8
1104 O_ASYNC = 0x40
1105 O_CLOEXEC = 0x400000
1106 O_CREAT = 0x200
1107 O_DIRECT = 0x80000
1108 O_DIRECTORY = 0x200000
1109 O_DSYNC = 0x10000
1110 O_EXCL = 0x800
1111 O_EXLOCK = 0x20
1112 O_FSYNC = 0x80
1113 O_NDELAY = 0x4
1114 O_NOCTTY = 0x8000
1115 O_NOFOLLOW = 0x100
1116 O_NONBLOCK = 0x4
1117 O_NOSIGPIPE = 0x1000000
1118 O_RDONLY = 0x0
1119 O_RDWR = 0x2
1120 O_RSYNC = 0x20000
1121 O_SHLOCK = 0x10
1122 O_SYNC = 0x80
1123 O_TRUNC = 0x400
1124 O_WRONLY = 0x1
1125 PARENB = 0x1000
1126 PARMRK = 0x8
1127 PARODD = 0x2000
1128 PENDIN = 0x20000000
1129 PRIO_PGRP = 0x1
1130 PRIO_PROCESS = 0x0
1131 PRIO_USER = 0x2
1132 PRI_IOFLUSH = 0x7c
1133 PROT_EXEC = 0x4
1134 PROT_NONE = 0x0
1135 PROT_READ = 0x1
1136 PROT_WRITE = 0x2
1137 RLIMIT_AS = 0xa
1138 RLIMIT_CORE = 0x4
1139 RLIMIT_CPU = 0x0
1140 RLIMIT_DATA = 0x2
1141 RLIMIT_FSIZE = 0x1
1142 RLIMIT_MEMLOCK = 0x6
1143 RLIMIT_NOFILE = 0x8
1144 RLIMIT_NPROC = 0x7
1145 RLIMIT_RSS = 0x5
1146 RLIMIT_STACK = 0x3
1147 RLIM_INFINITY = 0x7fffffffffffffff
1148 RTAX_AUTHOR = 0x6
1149 RTAX_BRD = 0x7
1150 RTAX_DST = 0x0
1151 RTAX_GATEWAY = 0x1
1152 RTAX_GENMASK = 0x3
1153 RTAX_IFA = 0x5
1154 RTAX_IFP = 0x4
1155 RTAX_MAX = 0x9
1156 RTAX_NETMASK = 0x2
1157 RTAX_TAG = 0x8
1158 RTA_AUTHOR = 0x40
1159 RTA_BRD = 0x80
1160 RTA_DST = 0x1
1161 RTA_GATEWAY = 0x2
1162 RTA_GENMASK = 0x8
1163 RTA_IFA = 0x20
1164 RTA_IFP = 0x10
1165 RTA_NETMASK = 0x4
1166 RTA_TAG = 0x100
1167 RTF_ANNOUNCE = 0x20000
1168 RTF_BLACKHOLE = 0x1000
1169 RTF_CLONED = 0x2000
1170 RTF_CLONING = 0x100
1171 RTF_DONE = 0x40
1172 RTF_DYNAMIC = 0x10
1173 RTF_GATEWAY = 0x2
1174 RTF_HOST = 0x4
1175 RTF_LLINFO = 0x400
1176 RTF_MASK = 0x80
1177 RTF_MODIFIED = 0x20
1178 RTF_PROTO1 = 0x8000
1179 RTF_PROTO2 = 0x4000
1180 RTF_REJECT = 0x8
1181 RTF_SRC = 0x10000
1182 RTF_STATIC = 0x800
1183 RTF_UP = 0x1
1184 RTF_XRESOLVE = 0x200
1185 RTM_ADD = 0x1
1186 RTM_CHANGE = 0x3
1187 RTM_CHGADDR = 0x15
1188 RTM_DELADDR = 0xd
1189 RTM_DELETE = 0x2
1190 RTM_GET = 0x4
1191 RTM_IEEE80211 = 0x11
1192 RTM_IFANNOUNCE = 0x10
1193 RTM_IFINFO = 0x14
1194 RTM_LLINFO_UPD = 0x13
1195 RTM_LOCK = 0x8
1196 RTM_LOSING = 0x5
1197 RTM_MISS = 0x7
1198 RTM_NEWADDR = 0xc
1199 RTM_OIFINFO = 0xf
1200 RTM_OLDADD = 0x9
1201 RTM_OLDDEL = 0xa
1202 RTM_OOIFINFO = 0xe
1203 RTM_REDIRECT = 0x6
1204 RTM_RESOLVE = 0xb
1205 RTM_RTTUNIT = 0xf4240
1206 RTM_SETGATE = 0x12
1207 RTM_VERSION = 0x4
1208 RTV_EXPIRE = 0x4
1209 RTV_HOPCOUNT = 0x2
1210 RTV_MTU = 0x1
1211 RTV_RPIPE = 0x8
1212 RTV_RTT = 0x40
1213 RTV_RTTVAR = 0x80
1214 RTV_SPIPE = 0x10
1215 RTV_SSTHRESH = 0x20
1216 RUSAGE_CHILDREN = -0x1
1217 RUSAGE_SELF = 0x0
1218 SCM_CREDS = 0x4
1219 SCM_RIGHTS = 0x1
1220 SCM_TIMESTAMP = 0x8
1221 SHUT_RD = 0x0
1222 SHUT_RDWR = 0x2
1223 SHUT_WR = 0x1
1224 SIOCADDMULTI = 0x80906931
1225 SIOCADDRT = 0x8038720a
1226 SIOCAIFADDR = 0x8040691a
1227 SIOCALIFADDR = 0x8118691c
1228 SIOCATMARK = 0x40047307
1229 SIOCDELMULTI = 0x80906932
1230 SIOCDELRT = 0x8038720b
1231 SIOCDIFADDR = 0x80906919
1232 SIOCDIFPHYADDR = 0x80906949
1233 SIOCDLIFADDR = 0x8118691e
1234 SIOCGDRVSPEC = 0xc028697b
1235 SIOCGETPFSYNC = 0xc09069f8
1236 SIOCGETSGCNT = 0xc0207534
1237 SIOCGETVIFCNT = 0xc0287533
1238 SIOCGHIWAT = 0x40047301
1239 SIOCGIFADDR = 0xc0906921
1240 SIOCGIFADDRPREF = 0xc0986920
1241 SIOCGIFALIAS = 0xc040691b
1242 SIOCGIFBRDADDR = 0xc0906923
1243 SIOCGIFCAP = 0xc0206976
1244 SIOCGIFCONF = 0xc0106926
1245 SIOCGIFDATA = 0xc0986985
1246 SIOCGIFDLT = 0xc0906977
1247 SIOCGIFDSTADDR = 0xc0906922
1248 SIOCGIFFLAGS = 0xc0906911
1249 SIOCGIFGENERIC = 0xc090693a
1250 SIOCGIFMEDIA = 0xc0306936
1251 SIOCGIFMETRIC = 0xc0906917
1252 SIOCGIFMTU = 0xc090697e
1253 SIOCGIFNETMASK = 0xc0906925
1254 SIOCGIFPDSTADDR = 0xc0906948
1255 SIOCGIFPSRCADDR = 0xc0906947
1256 SIOCGLIFADDR = 0xc118691d
1257 SIOCGLIFPHYADDR = 0xc118694b
1258 SIOCGLINKSTR = 0xc0286987
1259 SIOCGLOWAT = 0x40047303
1260 SIOCGPGRP = 0x40047309
1261 SIOCGVH = 0xc0906983
1262 SIOCIFCREATE = 0x8090697a
1263 SIOCIFDESTROY = 0x80906979
1264 SIOCIFGCLONERS = 0xc0106978
1265 SIOCINITIFADDR = 0xc0706984
1266 SIOCSDRVSPEC = 0x8028697b
1267 SIOCSETPFSYNC = 0x809069f7
1268 SIOCSHIWAT = 0x80047300
1269 SIOCSIFADDR = 0x8090690c
1270 SIOCSIFADDRPREF = 0x8098691f
1271 SIOCSIFBRDADDR = 0x80906913
1272 SIOCSIFCAP = 0x80206975
1273 SIOCSIFDSTADDR = 0x8090690e
1274 SIOCSIFFLAGS = 0x80906910
1275 SIOCSIFGENERIC = 0x80906939
1276 SIOCSIFMEDIA = 0xc0906935
1277 SIOCSIFMETRIC = 0x80906918
1278 SIOCSIFMTU = 0x8090697f
1279 SIOCSIFNETMASK = 0x80906916
1280 SIOCSIFPHYADDR = 0x80406946
1281 SIOCSLIFPHYADDR = 0x8118694a
1282 SIOCSLINKSTR = 0x80286988
1283 SIOCSLOWAT = 0x80047302
1284 SIOCSPGRP = 0x80047308
1285 SIOCSVH = 0xc0906982
1286 SIOCZIFDATA = 0xc0986986
1287 SOCK_CLOEXEC = 0x10000000
1288 SOCK_DGRAM = 0x2
1289 SOCK_FLAGS_MASK = 0xf0000000
1290 SOCK_NONBLOCK = 0x20000000
1291 SOCK_NOSIGPIPE = 0x40000000
1292 SOCK_RAW = 0x3
1293 SOCK_RDM = 0x4
1294 SOCK_SEQPACKET = 0x5
1295 SOCK_STREAM = 0x1
1296 SOL_SOCKET = 0xffff
1297 SOMAXCONN = 0x80
1298 SO_ACCEPTCONN = 0x2
1299 SO_ACCEPTFILTER = 0x1000
1300 SO_BROADCAST = 0x20
1301 SO_DEBUG = 0x1
1302 SO_DONTROUTE = 0x10
1303 SO_ERROR = 0x1007
1304 SO_KEEPALIVE = 0x8
1305 SO_LINGER = 0x80
1306 SO_NOHEADER = 0x100a
1307 SO_NOSIGPIPE = 0x800
1308 SO_OOBINLINE = 0x100
1309 SO_OVERFLOWED = 0x1009
1310 SO_RCVBUF = 0x1002
1311 SO_RCVLOWAT = 0x1004
1312 SO_RCVTIMEO = 0x100c
1313 SO_REUSEADDR = 0x4
1314 SO_REUSEPORT = 0x200
1315 SO_SNDBUF = 0x1001
1316 SO_SNDLOWAT = 0x1003
1317 SO_SNDTIMEO = 0x100b
1318 SO_TIMESTAMP = 0x2000
1319 SO_TYPE = 0x1008
1320 SO_USELOOPBACK = 0x40
1321 SYSCTL_VERSION = 0x1000000
1322 SYSCTL_VERS_0 = 0x0
1323 SYSCTL_VERS_1 = 0x1000000
1324 SYSCTL_VERS_MASK = 0xff000000
1325 S_ARCH1 = 0x10000
1326 S_ARCH2 = 0x20000
1327 S_BLKSIZE = 0x200
1328 S_IEXEC = 0x40
1329 S_IFBLK = 0x6000
1330 S_IFCHR = 0x2000
1331 S_IFDIR = 0x4000
1332 S_IFIFO = 0x1000
1333 S_IFLNK = 0xa000
1334 S_IFMT = 0xf000
1335 S_IFREG = 0x8000
1336 S_IFSOCK = 0xc000
1337 S_IFWHT = 0xe000
1338 S_IREAD = 0x100
1339 S_IRGRP = 0x20
1340 S_IROTH = 0x4
1341 S_IRUSR = 0x100
1342 S_IRWXG = 0x38
1343 S_IRWXO = 0x7
1344 S_IRWXU = 0x1c0
1345 S_ISGID = 0x400
1346 S_ISTXT = 0x200
1347 S_ISUID = 0x800
1348 S_ISVTX = 0x200
1349 S_IWGRP = 0x10
1350 S_IWOTH = 0x2
1351 S_IWRITE = 0x80
1352 S_IWUSR = 0x80
1353 S_IXGRP = 0x8
1354 S_IXOTH = 0x1
1355 S_IXUSR = 0x40
1356 S_LOGIN_SET = 0x1
1357 TCIFLUSH = 0x1
1358 TCIOFLUSH = 0x3
1359 TCOFLUSH = 0x2
1360 TCP_CONGCTL = 0x20
1361 TCP_KEEPCNT = 0x6
1362 TCP_KEEPIDLE = 0x3
1363 TCP_KEEPINIT = 0x7
1364 TCP_KEEPINTVL = 0x5
1365 TCP_MAXBURST = 0x4
1366 TCP_MAXSEG = 0x2
1367 TCP_MAXWIN = 0xffff
1368 TCP_MAX_WINSHIFT = 0xe
1369 TCP_MD5SIG = 0x10
1370 TCP_MINMSS = 0xd8
1371 TCP_MSS = 0x218
1372 TCP_NODELAY = 0x1
1373 TCSAFLUSH = 0x2
1374 TIOCCBRK = 0x2000747a
1375 TIOCCDTR = 0x20007478
1376 TIOCCONS = 0x80047462
1377 TIOCDCDTIMESTAMP = 0x40107458
1378 TIOCDRAIN = 0x2000745e
1379 TIOCEXCL = 0x2000740d
1380 TIOCEXT = 0x80047460
1381 TIOCFLAG_CDTRCTS = 0x10
1382 TIOCFLAG_CLOCAL = 0x2
1383 TIOCFLAG_CRTSCTS = 0x4
1384 TIOCFLAG_MDMBUF = 0x8
1385 TIOCFLAG_SOFTCAR = 0x1
1386 TIOCFLUSH = 0x80047410
1387 TIOCGETA = 0x402c7413
1388 TIOCGETD = 0x4004741a
1389 TIOCGFLAGS = 0x4004745d
1390 TIOCGLINED = 0x40207442
1391 TIOCGPGRP = 0x40047477
1392 TIOCGQSIZE = 0x40047481
1393 TIOCGRANTPT = 0x20007447
1394 TIOCGSID = 0x40047463
1395 TIOCGSIZE = 0x40087468
1396 TIOCGWINSZ = 0x40087468
1397 TIOCMBIC = 0x8004746b
1398 TIOCMBIS = 0x8004746c
1399 TIOCMGET = 0x4004746a
1400 TIOCMSET = 0x8004746d
1401 TIOCM_CAR = 0x40
1402 TIOCM_CD = 0x40
1403 TIOCM_CTS = 0x20
1404 TIOCM_DSR = 0x100
1405 TIOCM_DTR = 0x2
1406 TIOCM_LE = 0x1
1407 TIOCM_RI = 0x80
1408 TIOCM_RNG = 0x80
1409 TIOCM_RTS = 0x4
1410 TIOCM_SR = 0x10
1411 TIOCM_ST = 0x8
1412 TIOCNOTTY = 0x20007471
1413 TIOCNXCL = 0x2000740e
1414 TIOCOUTQ = 0x40047473
1415 TIOCPKT = 0x80047470
1416 TIOCPKT_DATA = 0x0
1417 TIOCPKT_DOSTOP = 0x20
1418 TIOCPKT_FLUSHREAD = 0x1
1419 TIOCPKT_FLUSHWRITE = 0x2
1420 TIOCPKT_IOCTL = 0x40
1421 TIOCPKT_NOSTOP = 0x10
1422 TIOCPKT_START = 0x8
1423 TIOCPKT_STOP = 0x4
1424 TIOCPTMGET = 0x40287446
1425 TIOCPTSNAME = 0x40287448
1426 TIOCRCVFRAME = 0x80087445
1427 TIOCREMOTE = 0x80047469
1428 TIOCSBRK = 0x2000747b
1429 TIOCSCTTY = 0x20007461
1430 TIOCSDTR = 0x20007479
1431 TIOCSETA = 0x802c7414
1432 TIOCSETAF = 0x802c7416
1433 TIOCSETAW = 0x802c7415
1434 TIOCSETD = 0x8004741b
1435 TIOCSFLAGS = 0x8004745c
1436 TIOCSIG = 0x2000745f
1437 TIOCSLINED = 0x80207443
1438 TIOCSPGRP = 0x80047476
1439 TIOCSQSIZE = 0x80047480
1440 TIOCSSIZE = 0x80087467
1441 TIOCSTART = 0x2000746e
1442 TIOCSTAT = 0x80047465
1443 TIOCSTI = 0x80017472
1444 TIOCSTOP = 0x2000746f
1445 TIOCSWINSZ = 0x80087467
1446 TIOCUCNTL = 0x80047466
1447 TIOCXMTFRAME = 0x80087444
1448 TOSTOP = 0x400000
1449 VDISCARD = 0xf
1450 VDSUSP = 0xb
1451 VEOF = 0x0
1452 VEOL = 0x1
1453 VEOL2 = 0x2
1454 VERASE = 0x3
1455 VINTR = 0x8
1456 VKILL = 0x5
1457 VLNEXT = 0xe
1458 VMIN = 0x10
1459 VQUIT = 0x9
1460 VREPRINT = 0x6
1461 VSTART = 0xc
1462 VSTATUS = 0x12
1463 VSTOP = 0xd
1464 VSUSP = 0xa
1465 VTIME = 0x11
1466 VWERASE = 0x4
1467 WALL = 0x8
1468 WALLSIG = 0x8
1469 WALTSIG = 0x4
1470 WCLONE = 0x4
1471 WCOREFLAG = 0x80
1472 WNOHANG = 0x1
1473 WNOWAIT = 0x10000
1474 WNOZOMBIE = 0x20000
1475 WOPTSCHECKED = 0x40000
1476 WSTOPPED = 0x7f
1477 WUNTRACED = 0x2
1478 )
1479
1480 // Errors
1481 const (
1482 E2BIG = syscall.Errno(0x7)
1483 EACCES = syscall.Errno(0xd)
1484 EADDRINUSE = syscall.Errno(0x30)
1485 EADDRNOTAVAIL = syscall.Errno(0x31)
1486 EAFNOSUPPORT = syscall.Errno(0x2f)
1487 EAGAIN = syscall.Errno(0x23)
1488 EALREADY = syscall.Errno(0x25)
1489 EAUTH = syscall.Errno(0x50)
1490 EBADF = syscall.Errno(0x9)
1491 EBADMSG = syscall.Errno(0x58)
1492 EBADRPC = syscall.Errno(0x48)
1493 EBUSY = syscall.Errno(0x10)
1494 ECANCELED = syscall.Errno(0x57)
1495 ECHILD = syscall.Errno(0xa)
1496 ECONNABORTED = syscall.Errno(0x35)
1497 ECONNREFUSED = syscall.Errno(0x3d)
1498 ECONNRESET = syscall.Errno(0x36)
1499 EDEADLK = syscall.Errno(0xb)
1500 EDESTADDRREQ = syscall.Errno(0x27)
1501 EDOM = syscall.Errno(0x21)
1502 EDQUOT = syscall.Errno(0x45)
1503 EEXIST = syscall.Errno(0x11)
1504 EFAULT = syscall.Errno(0xe)
1505 EFBIG = syscall.Errno(0x1b)
1506 EFTYPE = syscall.Errno(0x4f)
1507 EHOSTDOWN = syscall.Errno(0x40)
1508 EHOSTUNREACH = syscall.Errno(0x41)
1509 EIDRM = syscall.Errno(0x52)
1510 EILSEQ = syscall.Errno(0x55)
1511 EINPROGRESS = syscall.Errno(0x24)
1512 EINTR = syscall.Errno(0x4)
1513 EINVAL = syscall.Errno(0x16)
1514 EIO = syscall.Errno(0x5)
1515 EISCONN = syscall.Errno(0x38)
1516 EISDIR = syscall.Errno(0x15)
1517 ELAST = syscall.Errno(0x60)
1518 ELOOP = syscall.Errno(0x3e)
1519 EMFILE = syscall.Errno(0x18)
1520 EMLINK = syscall.Errno(0x1f)
1521 EMSGSIZE = syscall.Errno(0x28)
1522 EMULTIHOP = syscall.Errno(0x5e)
1523 ENAMETOOLONG = syscall.Errno(0x3f)
1524 ENEEDAUTH = syscall.Errno(0x51)
1525 ENETDOWN = syscall.Errno(0x32)
1526 ENETRESET = syscall.Errno(0x34)
1527 ENETUNREACH = syscall.Errno(0x33)
1528 ENFILE = syscall.Errno(0x17)
1529 ENOATTR = syscall.Errno(0x5d)
1530 ENOBUFS = syscall.Errno(0x37)
1531 ENODATA = syscall.Errno(0x59)
1532 ENODEV = syscall.Errno(0x13)
1533 ENOENT = syscall.Errno(0x2)
1534 ENOEXEC = syscall.Errno(0x8)
1535 ENOLCK = syscall.Errno(0x4d)
1536 ENOLINK = syscall.Errno(0x5f)
1537 ENOMEM = syscall.Errno(0xc)
1538 ENOMSG = syscall.Errno(0x53)
1539 ENOPROTOOPT = syscall.Errno(0x2a)
1540 ENOSPC = syscall.Errno(0x1c)
1541 ENOSR = syscall.Errno(0x5a)
1542 ENOSTR = syscall.Errno(0x5b)
1543 ENOSYS = syscall.Errno(0x4e)
1544 ENOTBLK = syscall.Errno(0xf)
1545 ENOTCONN = syscall.Errno(0x39)
1546 ENOTDIR = syscall.Errno(0x14)
1547 ENOTEMPTY = syscall.Errno(0x42)
1548 ENOTSOCK = syscall.Errno(0x26)
1549 ENOTSUP = syscall.Errno(0x56)
1550 ENOTTY = syscall.Errno(0x19)
1551 ENXIO = syscall.Errno(0x6)
1552 EOPNOTSUPP = syscall.Errno(0x2d)
1553 EOVERFLOW = syscall.Errno(0x54)
1554 EPERM = syscall.Errno(0x1)
1555 EPFNOSUPPORT = syscall.Errno(0x2e)
1556 EPIPE = syscall.Errno(0x20)
1557 EPROCLIM = syscall.Errno(0x43)
1558 EPROCUNAVAIL = syscall.Errno(0x4c)
1559 EPROGMISMATCH = syscall.Errno(0x4b)
1560 EPROGUNAVAIL = syscall.Errno(0x4a)
1561 EPROTO = syscall.Errno(0x60)
1562 EPROTONOSUPPORT = syscall.Errno(0x2b)
1563 EPROTOTYPE = syscall.Errno(0x29)
1564 ERANGE = syscall.Errno(0x22)
1565 EREMOTE = syscall.Errno(0x47)
1566 EROFS = syscall.Errno(0x1e)
1567 ERPCMISMATCH = syscall.Errno(0x49)
1568 ESHUTDOWN = syscall.Errno(0x3a)
1569 ESOCKTNOSUPPORT = syscall.Errno(0x2c)
1570 ESPIPE = syscall.Errno(0x1d)
1571 ESRCH = syscall.Errno(0x3)
1572 ESTALE = syscall.Errno(0x46)
1573 ETIME = syscall.Errno(0x5c)
1574 ETIMEDOUT = syscall.Errno(0x3c)
1575 ETOOMANYREFS = syscall.Errno(0x3b)
1576 ETXTBSY = syscall.Errno(0x1a)
1577 EUSERS = syscall.Errno(0x44)
1578 EWOULDBLOCK = syscall.Errno(0x23)
1579 EXDEV = syscall.Errno(0x12)
1580 )
1581
1582 // Signals
1583 const (
1584 SIGABRT = syscall.Signal(0x6)
1585 SIGALRM = syscall.Signal(0xe)
1586 SIGBUS = syscall.Signal(0xa)
1587 SIGCHLD = syscall.Signal(0x14)
1588 SIGCONT = syscall.Signal(0x13)
1589 SIGEMT = syscall.Signal(0x7)
1590 SIGFPE = syscall.Signal(0x8)
1591 SIGHUP = syscall.Signal(0x1)
1592 SIGILL = syscall.Signal(0x4)
1593 SIGINFO = syscall.Signal(0x1d)
1594 SIGINT = syscall.Signal(0x2)
1595 SIGIO = syscall.Signal(0x17)
1596 SIGIOT = syscall.Signal(0x6)
1597 SIGKILL = syscall.Signal(0x9)
1598 SIGPIPE = syscall.Signal(0xd)
1599 SIGPROF = syscall.Signal(0x1b)
1600 SIGPWR = syscall.Signal(0x20)
1601 SIGQUIT = syscall.Signal(0x3)
1602 SIGSEGV = syscall.Signal(0xb)
1603 SIGSTOP = syscall.Signal(0x11)
1604 SIGSYS = syscall.Signal(0xc)
1605 SIGTERM = syscall.Signal(0xf)
1606 SIGTRAP = syscall.Signal(0x5)
1607 SIGTSTP = syscall.Signal(0x12)
1608 SIGTTIN = syscall.Signal(0x15)
1609 SIGTTOU = syscall.Signal(0x16)
1610 SIGURG = syscall.Signal(0x10)
1611 SIGUSR1 = syscall.Signal(0x1e)
1612 SIGUSR2 = syscall.Signal(0x1f)
1613 SIGVTALRM = syscall.Signal(0x1a)
1614 SIGWINCH = syscall.Signal(0x1c)
1615 SIGXCPU = syscall.Signal(0x18)
1616 SIGXFSZ = syscall.Signal(0x19)
1617 )
1618
1619 // Error table
1620 var errorList = [...]struct {
1621 num syscall.Errno
1622 name string
1623 desc string
1624 }{
1625 {1, "EPERM", "operation not permitted"},
1626 {2, "ENOENT", "no such file or directory"},
1627 {3, "ESRCH", "no such process"},
1628 {4, "EINTR", "interrupted system call"},
1629 {5, "EIO", "input/output error"},
1630 {6, "ENXIO", "device not configured"},
1631 {7, "E2BIG", "argument list too long"},
1632 {8, "ENOEXEC", "exec format error"},
1633 {9, "EBADF", "bad file descriptor"},
1634 {10, "ECHILD", "no child processes"},
1635 {11, "EDEADLK", "resource deadlock avoided"},
1636 {12, "ENOMEM", "cannot allocate memory"},
1637 {13, "EACCES", "permission denied"},
1638 {14, "EFAULT", "bad address"},
1639 {15, "ENOTBLK", "block device required"},
1640 {16, "EBUSY", "device busy"},
1641 {17, "EEXIST", "file exists"},
1642 {18, "EXDEV", "cross-device link"},
1643 {19, "ENODEV", "operation not supported by device"},
1644 {20, "ENOTDIR", "not a directory"},
1645 {21, "EISDIR", "is a directory"},
1646 {22, "EINVAL", "invalid argument"},
1647 {23, "ENFILE", "too many open files in system"},
1648 {24, "EMFILE", "too many open files"},
1649 {25, "ENOTTY", "inappropriate ioctl for device"},
1650 {26, "ETXTBSY", "text file busy"},
1651 {27, "EFBIG", "file too large"},
1652 {28, "ENOSPC", "no space left on device"},
1653 {29, "ESPIPE", "illegal seek"},
1654 {30, "EROFS", "read-only file system"},
1655 {31, "EMLINK", "too many links"},
1656 {32, "EPIPE", "broken pipe"},
1657 {33, "EDOM", "numerical argument out of domain"},
1658 {34, "ERANGE", "result too large or too small"},
1659 {35, "EAGAIN", "resource temporarily unavailable"},
1660 {36, "EINPROGRESS", "operation now in progress"},
1661 {37, "EALREADY", "operation already in progress"},
1662 {38, "ENOTSOCK", "socket operation on non-socket"},
1663 {39, "EDESTADDRREQ", "destination address required"},
1664 {40, "EMSGSIZE", "message too long"},
1665 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1666 {42, "ENOPROTOOPT", "protocol option not available"},
1667 {43, "EPROTONOSUPPORT", "protocol not supported"},
1668 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1669 {45, "EOPNOTSUPP", "operation not supported"},
1670 {46, "EPFNOSUPPORT", "protocol family not supported"},
1671 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1672 {48, "EADDRINUSE", "address already in use"},
1673 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1674 {50, "ENETDOWN", "network is down"},
1675 {51, "ENETUNREACH", "network is unreachable"},
1676 {52, "ENETRESET", "network dropped connection on reset"},
1677 {53, "ECONNABORTED", "software caused connection abort"},
1678 {54, "ECONNRESET", "connection reset by peer"},
1679 {55, "ENOBUFS", "no buffer space available"},
1680 {56, "EISCONN", "socket is already connected"},
1681 {57, "ENOTCONN", "socket is not connected"},
1682 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1683 {59, "ETOOMANYREFS", "too many references: can't splice"},
1684 {60, "ETIMEDOUT", "connection timed out"},
1685 {61, "ECONNREFUSED", "connection refused"},
1686 {62, "ELOOP", "too many levels of symbolic links"},
1687 {63, "ENAMETOOLONG", "file name too long"},
1688 {64, "EHOSTDOWN", "host is down"},
1689 {65, "EHOSTUNREACH", "no route to host"},
1690 {66, "ENOTEMPTY", "directory not empty"},
1691 {67, "EPROCLIM", "too many processes"},
1692 {68, "EUSERS", "too many users"},
1693 {69, "EDQUOT", "disc quota exceeded"},
1694 {70, "ESTALE", "stale NFS file handle"},
1695 {71, "EREMOTE", "too many levels of remote in path"},
1696 {72, "EBADRPC", "RPC struct is bad"},
1697 {73, "ERPCMISMATCH", "RPC version wrong"},
1698 {74, "EPROGUNAVAIL", "RPC prog. not avail"},
1699 {75, "EPROGMISMATCH", "program version wrong"},
1700 {76, "EPROCUNAVAIL", "bad procedure for program"},
1701 {77, "ENOLCK", "no locks available"},
1702 {78, "ENOSYS", "function not implemented"},
1703 {79, "EFTYPE", "inappropriate file type or format"},
1704 {80, "EAUTH", "authentication error"},
1705 {81, "ENEEDAUTH", "need authenticator"},
1706 {82, "EIDRM", "identifier removed"},
1707 {83, "ENOMSG", "no message of desired type"},
1708 {84, "EOVERFLOW", "value too large to be stored in data type"},
1709 {85, "EILSEQ", "illegal byte sequence"},
1710 {86, "ENOTSUP", "not supported"},
1711 {87, "ECANCELED", "operation Canceled"},
1712 {88, "EBADMSG", "bad or Corrupt message"},
1713 {89, "ENODATA", "no message available"},
1714 {90, "ENOSR", "no STREAM resources"},
1715 {91, "ENOSTR", "not a STREAM"},
1716 {92, "ETIME", "STREAM ioctl timeout"},
1717 {93, "ENOATTR", "attribute not found"},
1718 {94, "EMULTIHOP", "multihop attempted"},
1719 {95, "ENOLINK", "link has been severed"},
1720 {96, "ELAST", "protocol error"},
1721 }
1722
1723 // Signal table
1724 var signalList = [...]struct {
1725 num syscall.Signal
1726 name string
1727 desc string
1728 }{
1729 {1, "SIGHUP", "hangup"},
1730 {2, "SIGINT", "interrupt"},
1731 {3, "SIGQUIT", "quit"},
1732 {4, "SIGILL", "illegal instruction"},
1733 {5, "SIGTRAP", "trace/BPT trap"},
1734 {6, "SIGIOT", "abort trap"},
1735 {7, "SIGEMT", "EMT trap"},
1736 {8, "SIGFPE", "floating point exception"},
1737 {9, "SIGKILL", "killed"},
1738 {10, "SIGBUS", "bus error"},
1739 {11, "SIGSEGV", "segmentation fault"},
1740 {12, "SIGSYS", "bad system call"},
1741 {13, "SIGPIPE", "broken pipe"},
1742 {14, "SIGALRM", "alarm clock"},
1743 {15, "SIGTERM", "terminated"},
1744 {16, "SIGURG", "urgent I/O condition"},
1745 {17, "SIGSTOP", "stopped (signal)"},
1746 {18, "SIGTSTP", "stopped"},
1747 {19, "SIGCONT", "continued"},
1748 {20, "SIGCHLD", "child exited"},
1749 {21, "SIGTTIN", "stopped (tty input)"},
1750 {22, "SIGTTOU", "stopped (tty output)"},
1751 {23, "SIGIO", "I/O possible"},
1752 {24, "SIGXCPU", "cputime limit exceeded"},
1753 {25, "SIGXFSZ", "filesize limit exceeded"},
1754 {26, "SIGVTALRM", "virtual timer expired"},
1755 {27, "SIGPROF", "profiling timer expired"},
1756 {28, "SIGWINCH", "window size changes"},
1757 {29, "SIGINFO", "information request"},
1758 {30, "SIGUSR1", "user defined signal 1"},
1759 {31, "SIGUSR2", "user defined signal 2"},
1760 {32, "SIGPWR", "power fail/restart"},
1761 }
00 // mkerrors.sh -m32
1 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build 386,openbsd
44
146146 CFLUSH = 0xf
147147 CLOCAL = 0x8000
148148 CREAD = 0x800
149 CRTSCTS = 0x10000
149150 CS5 = 0x0
150151 CS6 = 0x100
151152 CS7 = 0x200
156157 CSTOP = 0x13
157158 CSTOPB = 0x400
158159 CSUSP = 0x1a
160 CTL_HW = 0x6
161 CTL_KERN = 0x1
159162 CTL_MAXNAME = 0xc
160163 CTL_NET = 0x4
161164 DIOCOSFPFLUSH = 0x2000444e
441444 F_UNLCK = 0x2
442445 F_WRLCK = 0x3
443446 HUPCL = 0x4000
447 HW_MACHINE = 0x1
444448 ICANON = 0x100
445449 ICMP6_FILTER = 0x12
446450 ICRNL = 0x100
859863 IXANY = 0x800
860864 IXOFF = 0x400
861865 IXON = 0x200
866 KERN_HOSTNAME = 0xa
867 KERN_OSRELEASE = 0x2
868 KERN_OSTYPE = 0x1
869 KERN_VERSION = 0x4
862870 LCNT_OVERLOAD_FLUSH = 0x6
863871 LOCK_EX = 0x2
864872 LOCK_NB = 0x4
890898 MAP_TRYFIXED = 0x400
891899 MCL_CURRENT = 0x1
892900 MCL_FUTURE = 0x2
901 MNT_ASYNC = 0x40
902 MNT_DEFEXPORTED = 0x200
903 MNT_DELEXPORT = 0x20000
904 MNT_DOOMED = 0x8000000
905 MNT_EXPORTANON = 0x400
906 MNT_EXPORTED = 0x100
907 MNT_EXRDONLY = 0x80
908 MNT_FORCE = 0x80000
909 MNT_LAZY = 0x3
910 MNT_LOCAL = 0x1000
911 MNT_NOATIME = 0x8000
912 MNT_NODEV = 0x10
913 MNT_NOEXEC = 0x4
914 MNT_NOSUID = 0x8
915 MNT_NOWAIT = 0x2
916 MNT_QUOTA = 0x2000
917 MNT_RDONLY = 0x1
918 MNT_RELOAD = 0x40000
919 MNT_ROOTFS = 0x4000
920 MNT_SOFTDEP = 0x4000000
921 MNT_SYNCHRONOUS = 0x2
922 MNT_UPDATE = 0x10000
923 MNT_VISFLAGMASK = 0x400ffff
924 MNT_WAIT = 0x1
925 MNT_WANTRDWR = 0x2000000
926 MNT_WXALLOWED = 0x800
893927 MSG_BCAST = 0x100
894928 MSG_CTRUNC = 0x20
895929 MSG_DONTROUTE = 0x4
12091243 SO_TIMESTAMP = 0x800
12101244 SO_TYPE = 0x1008
12111245 SO_USELOOPBACK = 0x40
1246 S_BLKSIZE = 0x200
1247 S_IEXEC = 0x40
1248 S_IFBLK = 0x6000
1249 S_IFCHR = 0x2000
1250 S_IFDIR = 0x4000
1251 S_IFIFO = 0x1000
1252 S_IFLNK = 0xa000
1253 S_IFMT = 0xf000
1254 S_IFREG = 0x8000
1255 S_IFSOCK = 0xc000
1256 S_IREAD = 0x100
1257 S_IRGRP = 0x20
1258 S_IROTH = 0x4
1259 S_IRUSR = 0x100
1260 S_IRWXG = 0x38
1261 S_IRWXO = 0x7
1262 S_IRWXU = 0x1c0
1263 S_ISGID = 0x400
1264 S_ISTXT = 0x200
1265 S_ISUID = 0x800
1266 S_ISVTX = 0x200
1267 S_IWGRP = 0x10
1268 S_IWOTH = 0x2
1269 S_IWRITE = 0x80
1270 S_IWUSR = 0x80
1271 S_IXGRP = 0x8
1272 S_IXOTH = 0x1
1273 S_IXUSR = 0x40
12121274 TCIFLUSH = 0x1
12131275 TCIOFLUSH = 0x3
12141276 TCOFLUSH = 0x2
14521514 )
14531515
14541516 // Error table
1455 var errors = [...]string{
1456 1: "operation not permitted",
1457 2: "no such file or directory",
1458 3: "no such process",
1459 4: "interrupted system call",
1460 5: "input/output error",
1461 6: "device not configured",
1462 7: "argument list too long",
1463 8: "exec format error",
1464 9: "bad file descriptor",
1465 10: "no child processes",
1466 11: "resource deadlock avoided",
1467 12: "cannot allocate memory",
1468 13: "permission denied",
1469 14: "bad address",
1470 15: "block device required",
1471 16: "device busy",
1472 17: "file exists",
1473 18: "cross-device link",
1474 19: "operation not supported by device",
1475 20: "not a directory",
1476 21: "is a directory",
1477 22: "invalid argument",
1478 23: "too many open files in system",
1479 24: "too many open files",
1480 25: "inappropriate ioctl for device",
1481 26: "text file busy",
1482 27: "file too large",
1483 28: "no space left on device",
1484 29: "illegal seek",
1485 30: "read-only file system",
1486 31: "too many links",
1487 32: "broken pipe",
1488 33: "numerical argument out of domain",
1489 34: "result too large",
1490 35: "resource temporarily unavailable",
1491 36: "operation now in progress",
1492 37: "operation already in progress",
1493 38: "socket operation on non-socket",
1494 39: "destination address required",
1495 40: "message too long",
1496 41: "protocol wrong type for socket",
1497 42: "protocol not available",
1498 43: "protocol not supported",
1499 44: "socket type not supported",
1500 45: "operation not supported",
1501 46: "protocol family not supported",
1502 47: "address family not supported by protocol family",
1503 48: "address already in use",
1504 49: "can't assign requested address",
1505 50: "network is down",
1506 51: "network is unreachable",
1507 52: "network dropped connection on reset",
1508 53: "software caused connection abort",
1509 54: "connection reset by peer",
1510 55: "no buffer space available",
1511 56: "socket is already connected",
1512 57: "socket is not connected",
1513 58: "can't send after socket shutdown",
1514 59: "too many references: can't splice",
1515 60: "connection timed out",
1516 61: "connection refused",
1517 62: "too many levels of symbolic links",
1518 63: "file name too long",
1519 64: "host is down",
1520 65: "no route to host",
1521 66: "directory not empty",
1522 67: "too many processes",
1523 68: "too many users",
1524 69: "disc quota exceeded",
1525 70: "stale NFS file handle",
1526 71: "too many levels of remote in path",
1527 72: "RPC struct is bad",
1528 73: "RPC version wrong",
1529 74: "RPC prog. not avail",
1530 75: "program version wrong",
1531 76: "bad procedure for program",
1532 77: "no locks available",
1533 78: "function not implemented",
1534 79: "inappropriate file type or format",
1535 80: "authentication error",
1536 81: "need authenticator",
1537 82: "IPsec processing failure",
1538 83: "attribute not found",
1539 84: "illegal byte sequence",
1540 85: "no medium found",
1541 86: "wrong medium type",
1542 87: "value too large to be stored in data type",
1543 88: "operation canceled",
1544 89: "identifier removed",
1545 90: "no message of desired type",
1546 91: "not supported",
1517 var errorList = [...]struct {
1518 num syscall.Errno
1519 name string
1520 desc string
1521 }{
1522 {1, "EPERM", "operation not permitted"},
1523 {2, "ENOENT", "no such file or directory"},
1524 {3, "ESRCH", "no such process"},
1525 {4, "EINTR", "interrupted system call"},
1526 {5, "EIO", "input/output error"},
1527 {6, "ENXIO", "device not configured"},
1528 {7, "E2BIG", "argument list too long"},
1529 {8, "ENOEXEC", "exec format error"},
1530 {9, "EBADF", "bad file descriptor"},
1531 {10, "ECHILD", "no child processes"},
1532 {11, "EDEADLK", "resource deadlock avoided"},
1533 {12, "ENOMEM", "cannot allocate memory"},
1534 {13, "EACCES", "permission denied"},
1535 {14, "EFAULT", "bad address"},
1536 {15, "ENOTBLK", "block device required"},
1537 {16, "EBUSY", "device busy"},
1538 {17, "EEXIST", "file exists"},
1539 {18, "EXDEV", "cross-device link"},
1540 {19, "ENODEV", "operation not supported by device"},
1541 {20, "ENOTDIR", "not a directory"},
1542 {21, "EISDIR", "is a directory"},
1543 {22, "EINVAL", "invalid argument"},
1544 {23, "ENFILE", "too many open files in system"},
1545 {24, "EMFILE", "too many open files"},
1546 {25, "ENOTTY", "inappropriate ioctl for device"},
1547 {26, "ETXTBSY", "text file busy"},
1548 {27, "EFBIG", "file too large"},
1549 {28, "ENOSPC", "no space left on device"},
1550 {29, "ESPIPE", "illegal seek"},
1551 {30, "EROFS", "read-only file system"},
1552 {31, "EMLINK", "too many links"},
1553 {32, "EPIPE", "broken pipe"},
1554 {33, "EDOM", "numerical argument out of domain"},
1555 {34, "ERANGE", "result too large"},
1556 {35, "EWOULDBLOCK", "resource temporarily unavailable"},
1557 {36, "EINPROGRESS", "operation now in progress"},
1558 {37, "EALREADY", "operation already in progress"},
1559 {38, "ENOTSOCK", "socket operation on non-socket"},
1560 {39, "EDESTADDRREQ", "destination address required"},
1561 {40, "EMSGSIZE", "message too long"},
1562 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1563 {42, "ENOPROTOOPT", "protocol not available"},
1564 {43, "EPROTONOSUPPORT", "protocol not supported"},
1565 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1566 {45, "EOPNOTSUPP", "operation not supported"},
1567 {46, "EPFNOSUPPORT", "protocol family not supported"},
1568 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1569 {48, "EADDRINUSE", "address already in use"},
1570 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1571 {50, "ENETDOWN", "network is down"},
1572 {51, "ENETUNREACH", "network is unreachable"},
1573 {52, "ENETRESET", "network dropped connection on reset"},
1574 {53, "ECONNABORTED", "software caused connection abort"},
1575 {54, "ECONNRESET", "connection reset by peer"},
1576 {55, "ENOBUFS", "no buffer space available"},
1577 {56, "EISCONN", "socket is already connected"},
1578 {57, "ENOTCONN", "socket is not connected"},
1579 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1580 {59, "ETOOMANYREFS", "too many references: can't splice"},
1581 {60, "ETIMEDOUT", "operation timed out"},
1582 {61, "ECONNREFUSED", "connection refused"},
1583 {62, "ELOOP", "too many levels of symbolic links"},
1584 {63, "ENAMETOOLONG", "file name too long"},
1585 {64, "EHOSTDOWN", "host is down"},
1586 {65, "EHOSTUNREACH", "no route to host"},
1587 {66, "ENOTEMPTY", "directory not empty"},
1588 {67, "EPROCLIM", "too many processes"},
1589 {68, "EUSERS", "too many users"},
1590 {69, "EDQUOT", "disk quota exceeded"},
1591 {70, "ESTALE", "stale NFS file handle"},
1592 {71, "EREMOTE", "too many levels of remote in path"},
1593 {72, "EBADRPC", "RPC struct is bad"},
1594 {73, "ERPCMISMATCH", "RPC version wrong"},
1595 {74, "EPROGUNAVAIL", "RPC program not available"},
1596 {75, "EPROGMISMATCH", "program version wrong"},
1597 {76, "EPROCUNAVAIL", "bad procedure for program"},
1598 {77, "ENOLCK", "no locks available"},
1599 {78, "ENOSYS", "function not implemented"},
1600 {79, "EFTYPE", "inappropriate file type or format"},
1601 {80, "EAUTH", "authentication error"},
1602 {81, "ENEEDAUTH", "need authenticator"},
1603 {82, "EIPSEC", "IPsec processing failure"},
1604 {83, "ENOATTR", "attribute not found"},
1605 {84, "EILSEQ", "illegal byte sequence"},
1606 {85, "ENOMEDIUM", "no medium found"},
1607 {86, "EMEDIUMTYPE", "wrong medium type"},
1608 {87, "EOVERFLOW", "value too large to be stored in data type"},
1609 {88, "ECANCELED", "operation canceled"},
1610 {89, "EIDRM", "identifier removed"},
1611 {90, "ENOMSG", "no message of desired type"},
1612 {91, "ELAST", "not supported"},
15471613 }
15481614
15491615 // Signal table
1550 var signals = [...]string{
1551 1: "hangup",
1552 2: "interrupt",
1553 3: "quit",
1554 4: "illegal instruction",
1555 5: "trace/BPT trap",
1556 6: "abort trap",
1557 7: "EMT trap",
1558 8: "floating point exception",
1559 9: "killed",
1560 10: "bus error",
1561 11: "segmentation fault",
1562 12: "bad system call",
1563 13: "broken pipe",
1564 14: "alarm clock",
1565 15: "terminated",
1566 16: "urgent I/O condition",
1567 17: "stopped (signal)",
1568 18: "stopped",
1569 19: "continued",
1570 20: "child exited",
1571 21: "stopped (tty input)",
1572 22: "stopped (tty output)",
1573 23: "I/O possible",
1574 24: "cputime limit exceeded",
1575 25: "filesize limit exceeded",
1576 26: "virtual timer expired",
1577 27: "profiling timer expired",
1578 28: "window size changes",
1579 29: "information request",
1580 30: "user defined signal 1",
1581 31: "user defined signal 2",
1582 32: "thread AST",
1616 var signalList = [...]struct {
1617 num syscall.Signal
1618 name string
1619 desc string
1620 }{
1621 {1, "SIGHUP", "hangup"},
1622 {2, "SIGINT", "interrupt"},
1623 {3, "SIGQUIT", "quit"},
1624 {4, "SIGILL", "illegal instruction"},
1625 {5, "SIGTRAP", "trace/BPT trap"},
1626 {6, "SIGABRT", "abort trap"},
1627 {7, "SIGEMT", "EMT trap"},
1628 {8, "SIGFPE", "floating point exception"},
1629 {9, "SIGKILL", "killed"},
1630 {10, "SIGBUS", "bus error"},
1631 {11, "SIGSEGV", "segmentation fault"},
1632 {12, "SIGSYS", "bad system call"},
1633 {13, "SIGPIPE", "broken pipe"},
1634 {14, "SIGALRM", "alarm clock"},
1635 {15, "SIGTERM", "terminated"},
1636 {16, "SIGURG", "urgent I/O condition"},
1637 {17, "SIGSTOP", "suspended (signal)"},
1638 {18, "SIGTSTP", "suspended"},
1639 {19, "SIGCONT", "continued"},
1640 {20, "SIGCHLD", "child exited"},
1641 {21, "SIGTTIN", "stopped (tty input)"},
1642 {22, "SIGTTOU", "stopped (tty output)"},
1643 {23, "SIGIO", "I/O possible"},
1644 {24, "SIGXCPU", "cputime limit exceeded"},
1645 {25, "SIGXFSZ", "filesize limit exceeded"},
1646 {26, "SIGVTALRM", "virtual timer expired"},
1647 {27, "SIGPROF", "profiling timer expired"},
1648 {28, "SIGWINCH", "window size changes"},
1649 {29, "SIGINFO", "information request"},
1650 {30, "SIGUSR1", "user defined signal 1"},
1651 {31, "SIGUSR2", "user defined signal 2"},
1652 {32, "SIGTHR", "thread AST"},
15831653 }
00 // mkerrors.sh -m64
1 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build amd64,openbsd
44
4444 AF_SNA = 0xb
4545 AF_UNIX = 0x1
4646 AF_UNSPEC = 0x0
47 ALTWERASE = 0x200
4748 ARPHRD_ETHER = 0x1
4849 ARPHRD_FRELAY = 0xf
4950 ARPHRD_IEEE1394 = 0x18
145146 BRKINT = 0x2
146147 CFLUSH = 0xf
147148 CLOCAL = 0x8000
149 CLOCK_BOOTTIME = 0x6
150 CLOCK_MONOTONIC = 0x3
151 CLOCK_PROCESS_CPUTIME_ID = 0x2
152 CLOCK_REALTIME = 0x0
153 CLOCK_THREAD_CPUTIME_ID = 0x4
154 CLOCK_UPTIME = 0x5
148155 CREAD = 0x800
156 CRTSCTS = 0x10000
149157 CS5 = 0x0
150158 CS6 = 0x100
151159 CS7 = 0x200
156164 CSTOP = 0x13
157165 CSTOPB = 0x400
158166 CSUSP = 0x1a
167 CTL_HW = 0x6
168 CTL_KERN = 0x1
159169 CTL_MAXNAME = 0xc
160170 CTL_NET = 0x4
161171 DIOCOSFPFLUSH = 0x2000444e
174184 DLT_LOOP = 0xc
175185 DLT_MPLS = 0xdb
176186 DLT_NULL = 0x0
187 DLT_OPENFLOW = 0x10b
177188 DLT_PFLOG = 0x75
178189 DLT_PFSYNC = 0x12
179190 DLT_PPP = 0x9
184195 DLT_RAW = 0xe
185196 DLT_SLIP = 0x8
186197 DLT_SLIP_BSDOS = 0xf
198 DLT_USBPCAP = 0xf9
199 DLT_USER0 = 0x93
200 DLT_USER1 = 0x94
201 DLT_USER10 = 0x9d
202 DLT_USER11 = 0x9e
203 DLT_USER12 = 0x9f
204 DLT_USER13 = 0xa0
205 DLT_USER14 = 0xa1
206 DLT_USER15 = 0xa2
207 DLT_USER2 = 0x95
208 DLT_USER3 = 0x96
209 DLT_USER4 = 0x97
210 DLT_USER5 = 0x98
211 DLT_USER6 = 0x99
212 DLT_USER7 = 0x9a
213 DLT_USER8 = 0x9b
214 DLT_USER9 = 0x9c
187215 DT_BLK = 0x6
188216 DT_CHR = 0x2
189217 DT_DIR = 0x4
397425 ETHER_CRC_POLY_LE = 0xedb88320
398426 ETHER_HDR_LEN = 0xe
399427 ETHER_MAX_DIX_LEN = 0x600
428 ETHER_MAX_HARDMTU_LEN = 0xff9b
400429 ETHER_MAX_LEN = 0x5ee
401430 ETHER_MIN_LEN = 0x40
402431 ETHER_TYPE_LEN = 0x2
403432 ETHER_VLAN_ENCAP_LEN = 0x4
404433 EVFILT_AIO = -0x3
434 EVFILT_DEVICE = -0x8
405435 EVFILT_PROC = -0x5
406436 EVFILT_READ = -0x1
407437 EVFILT_SIGNAL = -0x6
408 EVFILT_SYSCOUNT = 0x7
438 EVFILT_SYSCOUNT = 0x8
409439 EVFILT_TIMER = -0x7
410440 EVFILT_VNODE = -0x4
411441 EVFILT_WRITE = -0x2
442 EVL_ENCAPLEN = 0x4
443 EVL_PRIO_BITS = 0xd
444 EVL_PRIO_MAX = 0x7
445 EVL_VLID_MASK = 0xfff
446 EVL_VLID_MAX = 0xffe
447 EVL_VLID_MIN = 0x1
448 EVL_VLID_NULL = 0x0
412449 EV_ADD = 0x1
413450 EV_CLEAR = 0x20
414451 EV_DELETE = 0x2
415452 EV_DISABLE = 0x8
453 EV_DISPATCH = 0x80
416454 EV_ENABLE = 0x4
417455 EV_EOF = 0x8000
418456 EV_ERROR = 0x4000
419457 EV_FLAG1 = 0x2000
420458 EV_ONESHOT = 0x10
459 EV_RECEIPT = 0x40
421460 EV_SYSFLAGS = 0xf000
422461 EXTA = 0x4b00
423462 EXTB = 0x9600
431470 F_GETFL = 0x3
432471 F_GETLK = 0x7
433472 F_GETOWN = 0x5
473 F_ISATTY = 0xb
434474 F_OK = 0x0
435475 F_RDLCK = 0x1
436476 F_SETFD = 0x2
441481 F_UNLCK = 0x2
442482 F_WRLCK = 0x3
443483 HUPCL = 0x4000
484 HW_MACHINE = 0x1
444485 ICANON = 0x100
445486 ICMP6_FILTER = 0x12
446487 ICRNL = 0x100
447488 IEXTEN = 0x400
448489 IFAN_ARRIVAL = 0x0
449490 IFAN_DEPARTURE = 0x1
450 IFA_ROUTE = 0x1
451491 IFF_ALLMULTI = 0x200
452492 IFF_BROADCAST = 0x2
453493 IFF_CANTCHANGE = 0x8e52
458498 IFF_LOOPBACK = 0x8
459499 IFF_MULTICAST = 0x8000
460500 IFF_NOARP = 0x80
461 IFF_NOTRAILERS = 0x20
462501 IFF_OACTIVE = 0x400
463502 IFF_POINTOPOINT = 0x10
464503 IFF_PROMISC = 0x100
465504 IFF_RUNNING = 0x40
466505 IFF_SIMPLEX = 0x800
506 IFF_STATICARP = 0x20
467507 IFF_UP = 0x1
468508 IFNAMSIZ = 0x10
469509 IFT_1822 = 0x2
592632 IFT_LINEGROUP = 0xd2
593633 IFT_LOCALTALK = 0x2a
594634 IFT_LOOP = 0x18
635 IFT_MBIM = 0xfa
595636 IFT_MEDIAMAILOVERIP = 0x8b
596637 IFT_MFSIGLINK = 0xa7
597638 IFT_MIOX25 = 0x26
716757 IPPROTO_AH = 0x33
717758 IPPROTO_CARP = 0x70
718759 IPPROTO_DIVERT = 0x102
719 IPPROTO_DIVERT_INIT = 0x2
720 IPPROTO_DIVERT_RESP = 0x1
721760 IPPROTO_DONE = 0x101
722761 IPPROTO_DSTOPTS = 0x3c
723762 IPPROTO_EGP = 0x8
774813 IPV6_LEAVE_GROUP = 0xd
775814 IPV6_MAXHLIM = 0xff
776815 IPV6_MAXPACKET = 0xffff
816 IPV6_MINHOPCOUNT = 0x41
777817 IPV6_MMTU = 0x500
778818 IPV6_MULTICAST_HOPS = 0xa
779819 IPV6_MULTICAST_IF = 0x9
813853 IP_DEFAULT_MULTICAST_LOOP = 0x1
814854 IP_DEFAULT_MULTICAST_TTL = 0x1
815855 IP_DF = 0x4000
816 IP_DIVERTFL = 0x1022
817856 IP_DROP_MEMBERSHIP = 0xd
818857 IP_ESP_NETWORK_LEVEL = 0x16
819858 IP_ESP_TRANS_LEVEL = 0x15
820859 IP_HDRINCL = 0x2
821860 IP_IPCOMP_LEVEL = 0x1d
861 IP_IPDEFTTL = 0x25
822862 IP_IPSECFLOWINFO = 0x24
823863 IP_IPSEC_LOCAL_AUTH = 0x1b
824864 IP_IPSEC_LOCAL_CRED = 0x19
852892 IP_RETOPTS = 0x8
853893 IP_RF = 0x8000
854894 IP_RTABLE = 0x1021
895 IP_SENDSRCADDR = 0x7
855896 IP_TOS = 0x3
856897 IP_TTL = 0x4
857898 ISIG = 0x80
858899 ISTRIP = 0x20
900 IUCLC = 0x1000
859901 IXANY = 0x800
860902 IXOFF = 0x400
861903 IXON = 0x200
904 KERN_HOSTNAME = 0xa
905 KERN_OSRELEASE = 0x2
906 KERN_OSTYPE = 0x1
907 KERN_VERSION = 0x4
862908 LCNT_OVERLOAD_FLUSH = 0x6
863909 LOCK_EX = 0x2
864910 LOCK_NB = 0x4
872918 MADV_SPACEAVAIL = 0x5
873919 MADV_WILLNEED = 0x3
874920 MAP_ANON = 0x1000
875 MAP_COPY = 0x4
921 MAP_ANONYMOUS = 0x1000
922 MAP_COPY = 0x2
876923 MAP_FILE = 0x0
877924 MAP_FIXED = 0x10
878 MAP_FLAGMASK = 0x1ff7
879 MAP_HASSEMAPHORE = 0x200
880 MAP_INHERIT = 0x80
925 MAP_FLAGMASK = 0x7ff7
926 MAP_HASSEMAPHORE = 0x0
927 MAP_INHERIT = 0x0
881928 MAP_INHERIT_COPY = 0x1
882 MAP_INHERIT_DONATE_COPY = 0x3
883929 MAP_INHERIT_NONE = 0x2
884930 MAP_INHERIT_SHARE = 0x0
885 MAP_NOEXTEND = 0x100
886 MAP_NORESERVE = 0x40
931 MAP_INHERIT_ZERO = 0x3
932 MAP_NOEXTEND = 0x0
933 MAP_NORESERVE = 0x0
887934 MAP_PRIVATE = 0x2
888 MAP_RENAME = 0x20
935 MAP_RENAME = 0x0
889936 MAP_SHARED = 0x1
890 MAP_TRYFIXED = 0x400
937 MAP_STACK = 0x4000
938 MAP_TRYFIXED = 0x0
891939 MCL_CURRENT = 0x1
892940 MCL_FUTURE = 0x2
941 MNT_ASYNC = 0x40
942 MNT_DEFEXPORTED = 0x200
943 MNT_DELEXPORT = 0x20000
944 MNT_DOOMED = 0x8000000
945 MNT_EXPORTANON = 0x400
946 MNT_EXPORTED = 0x100
947 MNT_EXRDONLY = 0x80
948 MNT_FORCE = 0x80000
949 MNT_LAZY = 0x3
950 MNT_LOCAL = 0x1000
951 MNT_NOATIME = 0x8000
952 MNT_NODEV = 0x10
953 MNT_NOEXEC = 0x4
954 MNT_NOPERM = 0x20
955 MNT_NOSUID = 0x8
956 MNT_NOWAIT = 0x2
957 MNT_QUOTA = 0x2000
958 MNT_RDONLY = 0x1
959 MNT_RELOAD = 0x40000
960 MNT_ROOTFS = 0x4000
961 MNT_SOFTDEP = 0x4000000
962 MNT_STALLED = 0x100000
963 MNT_SYNCHRONOUS = 0x2
964 MNT_UPDATE = 0x10000
965 MNT_VISFLAGMASK = 0x400ffff
966 MNT_WAIT = 0x1
967 MNT_WANTRDWR = 0x2000000
968 MNT_WXALLOWED = 0x800
893969 MSG_BCAST = 0x100
970 MSG_CMSG_CLOEXEC = 0x800
894971 MSG_CTRUNC = 0x20
895972 MSG_DONTROUTE = 0x4
896973 MSG_DONTWAIT = 0x80
908985 NET_RT_DUMP = 0x1
909986 NET_RT_FLAGS = 0x2
910987 NET_RT_IFLIST = 0x3
911 NET_RT_MAXID = 0x6
988 NET_RT_IFNAMES = 0x6
989 NET_RT_MAXID = 0x7
912990 NET_RT_STATS = 0x4
913991 NET_RT_TABLE = 0x5
914992 NOFLSH = 0x80000000
993 NOKERNINFO = 0x2000000
915994 NOTE_ATTRIB = 0x8
995 NOTE_CHANGE = 0x1
916996 NOTE_CHILD = 0x4
917997 NOTE_DELETE = 0x1
918998 NOTE_EOF = 0x2
9311011 NOTE_TRUNCATE = 0x80
9321012 NOTE_WRITE = 0x2
9331013 OCRNL = 0x10
1014 OLCUC = 0x20
9341015 ONLCR = 0x2
9351016 ONLRET = 0x80
9361017 ONOCR = 0x40
9371018 ONOEOT = 0x8
9381019 OPOST = 0x1
1020 OXTABS = 0x4
9391021 O_ACCMODE = 0x3
9401022 O_APPEND = 0x8
9411023 O_ASYNC = 0x40
9731055 RLIMIT_CPU = 0x0
9741056 RLIMIT_DATA = 0x2
9751057 RLIMIT_FSIZE = 0x1
1058 RLIMIT_MEMLOCK = 0x6
9761059 RLIMIT_NOFILE = 0x8
1060 RLIMIT_NPROC = 0x7
1061 RLIMIT_RSS = 0x5
9771062 RLIMIT_STACK = 0x3
9781063 RLIM_INFINITY = 0x7fffffffffffffff
9791064 RTAX_AUTHOR = 0x6
1065 RTAX_BFD = 0xb
9801066 RTAX_BRD = 0x7
1067 RTAX_DNS = 0xc
9811068 RTAX_DST = 0x0
9821069 RTAX_GATEWAY = 0x1
9831070 RTAX_GENMASK = 0x3
9841071 RTAX_IFA = 0x5
9851072 RTAX_IFP = 0x4
9861073 RTAX_LABEL = 0xa
987 RTAX_MAX = 0xb
1074 RTAX_MAX = 0xf
9881075 RTAX_NETMASK = 0x2
1076 RTAX_SEARCH = 0xe
9891077 RTAX_SRC = 0x8
9901078 RTAX_SRCMASK = 0x9
1079 RTAX_STATIC = 0xd
9911080 RTA_AUTHOR = 0x40
1081 RTA_BFD = 0x800
9921082 RTA_BRD = 0x80
1083 RTA_DNS = 0x1000
9931084 RTA_DST = 0x1
9941085 RTA_GATEWAY = 0x2
9951086 RTA_GENMASK = 0x8
9971088 RTA_IFP = 0x10
9981089 RTA_LABEL = 0x400
9991090 RTA_NETMASK = 0x4
1091 RTA_SEARCH = 0x4000
10001092 RTA_SRC = 0x100
10011093 RTA_SRCMASK = 0x200
1094 RTA_STATIC = 0x2000
10021095 RTF_ANNOUNCE = 0x4000
1096 RTF_BFD = 0x1000000
10031097 RTF_BLACKHOLE = 0x1000
1098 RTF_BROADCAST = 0x400000
1099 RTF_CACHED = 0x20000
10041100 RTF_CLONED = 0x10000
10051101 RTF_CLONING = 0x100
1102 RTF_CONNECTED = 0x800000
10061103 RTF_DONE = 0x40
10071104 RTF_DYNAMIC = 0x10
1008 RTF_FMASK = 0x10f808
1105 RTF_FMASK = 0x110fc08
10091106 RTF_GATEWAY = 0x2
10101107 RTF_HOST = 0x4
10111108 RTF_LLINFO = 0x400
1012 RTF_MASK = 0x80
1109 RTF_LOCAL = 0x200000
10131110 RTF_MODIFIED = 0x20
10141111 RTF_MPATH = 0x40000
10151112 RTF_MPLS = 0x100000
1113 RTF_MULTICAST = 0x200
10161114 RTF_PERMANENT_ARP = 0x2000
10171115 RTF_PROTO1 = 0x8000
10181116 RTF_PROTO2 = 0x4000
10191117 RTF_PROTO3 = 0x2000
10201118 RTF_REJECT = 0x8
1021 RTF_SOURCE = 0x20000
10221119 RTF_STATIC = 0x800
1023 RTF_TUNNEL = 0x100000
10241120 RTF_UP = 0x1
10251121 RTF_USETRAILERS = 0x8000
1026 RTF_XRESOLVE = 0x200
10271122 RTM_ADD = 0x1
1123 RTM_BFD = 0x12
10281124 RTM_CHANGE = 0x3
10291125 RTM_DELADDR = 0xd
10301126 RTM_DELETE = 0x2
10321128 RTM_GET = 0x4
10331129 RTM_IFANNOUNCE = 0xf
10341130 RTM_IFINFO = 0xe
1131 RTM_INVALIDATE = 0x11
10351132 RTM_LOCK = 0x8
10361133 RTM_LOSING = 0x5
10371134 RTM_MAXSIZE = 0x800
10381135 RTM_MISS = 0x7
10391136 RTM_NEWADDR = 0xc
1137 RTM_PROPOSAL = 0x13
10401138 RTM_REDIRECT = 0x6
10411139 RTM_RESOLVE = 0xb
10421140 RTM_RTTUNIT = 0xf4240
10491147 RTV_RTTVAR = 0x80
10501148 RTV_SPIPE = 0x10
10511149 RTV_SSTHRESH = 0x20
1150 RT_TABLEID_BITS = 0x8
1151 RT_TABLEID_MASK = 0xff
10521152 RT_TABLEID_MAX = 0xff
10531153 RUSAGE_CHILDREN = -0x1
10541154 RUSAGE_SELF = 0x0
10611161 SIOCADDMULTI = 0x80206931
10621162 SIOCAIFADDR = 0x8040691a
10631163 SIOCAIFGROUP = 0x80286987
1064 SIOCALIFADDR = 0x8218691c
10651164 SIOCATMARK = 0x40047307
1066 SIOCBRDGADD = 0x8058693c
1067 SIOCBRDGADDS = 0x80586941
1068 SIOCBRDGARL = 0x806e694d
1165 SIOCBRDGADD = 0x8060693c
1166 SIOCBRDGADDL = 0x80606949
1167 SIOCBRDGADDS = 0x80606941
1168 SIOCBRDGARL = 0x808c694d
10691169 SIOCBRDGDADDR = 0x81286947
1070 SIOCBRDGDEL = 0x8058693d
1071 SIOCBRDGDELS = 0x80586942
1072 SIOCBRDGFLUSH = 0x80586948
1073 SIOCBRDGFRL = 0x806e694e
1074 SIOCBRDGGCACHE = 0xc0146941
1075 SIOCBRDGGFD = 0xc0146952
1076 SIOCBRDGGHT = 0xc0146951
1077 SIOCBRDGGIFFLGS = 0xc058693e
1078 SIOCBRDGGMA = 0xc0146953
1170 SIOCBRDGDEL = 0x8060693d
1171 SIOCBRDGDELS = 0x80606942
1172 SIOCBRDGFLUSH = 0x80606948
1173 SIOCBRDGFRL = 0x808c694e
1174 SIOCBRDGGCACHE = 0xc0186941
1175 SIOCBRDGGFD = 0xc0186952
1176 SIOCBRDGGHT = 0xc0186951
1177 SIOCBRDGGIFFLGS = 0xc060693e
1178 SIOCBRDGGMA = 0xc0186953
10791179 SIOCBRDGGPARAM = 0xc0406958
1080 SIOCBRDGGPRI = 0xc0146950
1180 SIOCBRDGGPRI = 0xc0186950
10811181 SIOCBRDGGRL = 0xc030694f
1082 SIOCBRDGGSIFS = 0xc058693c
1083 SIOCBRDGGTO = 0xc0146946
1084 SIOCBRDGIFS = 0xc0586942
1182 SIOCBRDGGTO = 0xc0186946
1183 SIOCBRDGIFS = 0xc0606942
10851184 SIOCBRDGRTS = 0xc0206943
10861185 SIOCBRDGSADDR = 0xc1286944
1087 SIOCBRDGSCACHE = 0x80146940
1088 SIOCBRDGSFD = 0x80146952
1089 SIOCBRDGSHT = 0x80146951
1090 SIOCBRDGSIFCOST = 0x80586955
1091 SIOCBRDGSIFFLGS = 0x8058693f
1092 SIOCBRDGSIFPRIO = 0x80586954
1093 SIOCBRDGSMA = 0x80146953
1094 SIOCBRDGSPRI = 0x80146950
1095 SIOCBRDGSPROTO = 0x8014695a
1096 SIOCBRDGSTO = 0x80146945
1097 SIOCBRDGSTXHC = 0x80146959
1186 SIOCBRDGSCACHE = 0x80186940
1187 SIOCBRDGSFD = 0x80186952
1188 SIOCBRDGSHT = 0x80186951
1189 SIOCBRDGSIFCOST = 0x80606955
1190 SIOCBRDGSIFFLGS = 0x8060693f
1191 SIOCBRDGSIFPRIO = 0x80606954
1192 SIOCBRDGSIFPROT = 0x8060694a
1193 SIOCBRDGSMA = 0x80186953
1194 SIOCBRDGSPRI = 0x80186950
1195 SIOCBRDGSPROTO = 0x8018695a
1196 SIOCBRDGSTO = 0x80186945
1197 SIOCBRDGSTXHC = 0x80186959
10981198 SIOCDELMULTI = 0x80206932
10991199 SIOCDIFADDR = 0x80206919
11001200 SIOCDIFGROUP = 0x80286989
1201 SIOCDIFPARENT = 0x802069b4
11011202 SIOCDIFPHYADDR = 0x80206949
1102 SIOCDLIFADDR = 0x8218691e
1203 SIOCDVNETID = 0x802069af
11031204 SIOCGETKALIVE = 0xc01869a4
11041205 SIOCGETLABEL = 0x8020699a
1206 SIOCGETMPWCFG = 0xc02069ae
11051207 SIOCGETPFLOW = 0xc02069fe
11061208 SIOCGETPFSYNC = 0xc02069f8
11071209 SIOCGETSGCNT = 0xc0207534
11081210 SIOCGETVIFCNT = 0xc0287533
11091211 SIOCGETVLAN = 0xc0206990
1110 SIOCGHIWAT = 0x40047301
11111212 SIOCGIFADDR = 0xc0206921
1112 SIOCGIFASYNCMAP = 0xc020697c
11131213 SIOCGIFBRDADDR = 0xc0206923
11141214 SIOCGIFCONF = 0xc0106924
11151215 SIOCGIFDATA = 0xc020691b
11211221 SIOCGIFGMEMB = 0xc028698a
11221222 SIOCGIFGROUP = 0xc0286988
11231223 SIOCGIFHARDMTU = 0xc02069a5
1124 SIOCGIFMEDIA = 0xc0306936
1224 SIOCGIFLLPRIO = 0xc02069b6
1225 SIOCGIFMEDIA = 0xc0406938
11251226 SIOCGIFMETRIC = 0xc0206917
11261227 SIOCGIFMTU = 0xc020697e
11271228 SIOCGIFNETMASK = 0xc0206925
1128 SIOCGIFPDSTADDR = 0xc0206948
1229 SIOCGIFPAIR = 0xc02069b1
1230 SIOCGIFPARENT = 0xc02069b3
11291231 SIOCGIFPRIORITY = 0xc020699c
1130 SIOCGIFPSRCADDR = 0xc0206947
11311232 SIOCGIFRDOMAIN = 0xc02069a0
11321233 SIOCGIFRTLABEL = 0xc0206983
1133 SIOCGIFTIMESLOT = 0xc0206986
1234 SIOCGIFRXR = 0x802069aa
11341235 SIOCGIFXFLAGS = 0xc020699e
1135 SIOCGLIFADDR = 0xc218691d
11361236 SIOCGLIFPHYADDR = 0xc218694b
1237 SIOCGLIFPHYDF = 0xc02069c2
11371238 SIOCGLIFPHYRTABLE = 0xc02069a2
11381239 SIOCGLIFPHYTTL = 0xc02069a9
1139 SIOCGLOWAT = 0x40047303
11401240 SIOCGPGRP = 0x40047309
11411241 SIOCGSPPPPARAMS = 0xc0206994
1242 SIOCGUMBINFO = 0xc02069be
1243 SIOCGUMBPARAM = 0xc02069c0
11421244 SIOCGVH = 0xc02069f6
1245 SIOCGVNETFLOWID = 0xc02069c4
11431246 SIOCGVNETID = 0xc02069a7
1247 SIOCIFAFATTACH = 0x801169ab
1248 SIOCIFAFDETACH = 0x801169ac
11441249 SIOCIFCREATE = 0x8020697a
11451250 SIOCIFDESTROY = 0x80206979
11461251 SIOCIFGCLONERS = 0xc0106978
11471252 SIOCSETKALIVE = 0x801869a3
11481253 SIOCSETLABEL = 0x80206999
1254 SIOCSETMPWCFG = 0x802069ad
11491255 SIOCSETPFLOW = 0x802069fd
11501256 SIOCSETPFSYNC = 0x802069f7
11511257 SIOCSETVLAN = 0x8020698f
1152 SIOCSHIWAT = 0x80047300
11531258 SIOCSIFADDR = 0x8020690c
1154 SIOCSIFASYNCMAP = 0x8020697d
11551259 SIOCSIFBRDADDR = 0x80206913
11561260 SIOCSIFDESCR = 0x80206980
11571261 SIOCSIFDSTADDR = 0x8020690e
11591263 SIOCSIFGATTR = 0x8028698c
11601264 SIOCSIFGENERIC = 0x80206939
11611265 SIOCSIFLLADDR = 0x8020691f
1162 SIOCSIFMEDIA = 0xc0206935
1266 SIOCSIFLLPRIO = 0x802069b5
1267 SIOCSIFMEDIA = 0xc0206937
11631268 SIOCSIFMETRIC = 0x80206918
11641269 SIOCSIFMTU = 0x8020697f
11651270 SIOCSIFNETMASK = 0x80206916
1166 SIOCSIFPHYADDR = 0x80406946
1271 SIOCSIFPAIR = 0x802069b0
1272 SIOCSIFPARENT = 0x802069b2
11671273 SIOCSIFPRIORITY = 0x8020699b
11681274 SIOCSIFRDOMAIN = 0x8020699f
11691275 SIOCSIFRTLABEL = 0x80206982
1170 SIOCSIFTIMESLOT = 0x80206985
11711276 SIOCSIFXFLAGS = 0x8020699d
11721277 SIOCSLIFPHYADDR = 0x8218694a
1278 SIOCSLIFPHYDF = 0x802069c1
11731279 SIOCSLIFPHYRTABLE = 0x802069a1
11741280 SIOCSLIFPHYTTL = 0x802069a8
1175 SIOCSLOWAT = 0x80047302
11761281 SIOCSPGRP = 0x80047308
11771282 SIOCSSPPPPARAMS = 0x80206993
1283 SIOCSUMBPARAM = 0x802069bf
11781284 SIOCSVH = 0xc02069f5
1285 SIOCSVNETFLOWID = 0x802069c3
11791286 SIOCSVNETID = 0x802069a6
1287 SIOCSWGDPID = 0xc018695b
1288 SIOCSWGMAXFLOW = 0xc0186960
1289 SIOCSWGMAXGROUP = 0xc018695d
1290 SIOCSWSDPID = 0x8018695c
1291 SIOCSWSPORTNO = 0xc060695f
1292 SOCK_CLOEXEC = 0x8000
11801293 SOCK_DGRAM = 0x2
1294 SOCK_DNS = 0x1000
1295 SOCK_NONBLOCK = 0x4000
11811296 SOCK_RAW = 0x3
11821297 SOCK_RDM = 0x4
11831298 SOCK_SEQPACKET = 0x5
12081323 SO_TIMESTAMP = 0x800
12091324 SO_TYPE = 0x1008
12101325 SO_USELOOPBACK = 0x40
1326 SO_ZEROIZE = 0x2000
1327 S_BLKSIZE = 0x200
1328 S_IEXEC = 0x40
1329 S_IFBLK = 0x6000
1330 S_IFCHR = 0x2000
1331 S_IFDIR = 0x4000
1332 S_IFIFO = 0x1000
1333 S_IFLNK = 0xa000
1334 S_IFMT = 0xf000
1335 S_IFREG = 0x8000
1336 S_IFSOCK = 0xc000
1337 S_IREAD = 0x100
1338 S_IRGRP = 0x20
1339 S_IROTH = 0x4
1340 S_IRUSR = 0x100
1341 S_IRWXG = 0x38
1342 S_IRWXO = 0x7
1343 S_IRWXU = 0x1c0
1344 S_ISGID = 0x400
1345 S_ISTXT = 0x200
1346 S_ISUID = 0x800
1347 S_ISVTX = 0x200
1348 S_IWGRP = 0x10
1349 S_IWOTH = 0x2
1350 S_IWRITE = 0x80
1351 S_IWUSR = 0x80
1352 S_IXGRP = 0x8
1353 S_IXOTH = 0x1
1354 S_IXUSR = 0x40
12111355 TCIFLUSH = 0x1
1356 TCIOFF = 0x3
12121357 TCIOFLUSH = 0x3
1358 TCION = 0x4
12131359 TCOFLUSH = 0x2
1360 TCOOFF = 0x1
1361 TCOON = 0x2
12141362 TCP_MAXBURST = 0x4
12151363 TCP_MAXSEG = 0x2
12161364 TCP_MAXWIN = 0xffff
12201368 TCP_MSS = 0x200
12211369 TCP_NODELAY = 0x1
12221370 TCP_NOPUSH = 0x10
1223 TCP_NSTATES = 0xb
12241371 TCP_SACK_ENABLE = 0x8
12251372 TCSAFLUSH = 0x2
12261373 TIOCCBRK = 0x2000747a
12271374 TIOCCDTR = 0x20007478
1375 TIOCCHKVERAUTH = 0x2000741e
1376 TIOCCLRVERAUTH = 0x2000741d
12281377 TIOCCONS = 0x80047462
12291378 TIOCDRAIN = 0x2000745e
12301379 TIOCEXCL = 0x2000740d
12791428 TIOCSETAF = 0x802c7416
12801429 TIOCSETAW = 0x802c7415
12811430 TIOCSETD = 0x8004741b
1431 TIOCSETVERAUTH = 0x8004741c
12821432 TIOCSFLAGS = 0x8004745c
12831433 TIOCSIG = 0x8004745f
12841434 TIOCSPGRP = 0x80047476
12851435 TIOCSTART = 0x2000746e
1286 TIOCSTAT = 0x80047465
1436 TIOCSTAT = 0x20007465
12871437 TIOCSTI = 0x80017472
12881438 TIOCSTOP = 0x2000746f
12891439 TIOCSTSTAMP = 0x8008745a
12901440 TIOCSWINSZ = 0x80087467
12911441 TIOCUCNTL = 0x80047466
1442 TIOCUCNTL_CBRK = 0x7a
1443 TIOCUCNTL_SBRK = 0x7b
12921444 TOSTOP = 0x400000
1445 UTIME_NOW = -0x2
1446 UTIME_OMIT = -0x1
12931447 VDISCARD = 0xf
12941448 VDSUSP = 0xb
12951449 VEOF = 0x0
13001454 VKILL = 0x5
13011455 VLNEXT = 0xe
13021456 VMIN = 0x10
1457 VM_ANONMIN = 0x7
1458 VM_LOADAVG = 0x2
1459 VM_MAXID = 0xc
1460 VM_MAXSLP = 0xa
1461 VM_METER = 0x1
1462 VM_NKMEMPAGES = 0x6
1463 VM_PSSTRINGS = 0x3
1464 VM_SWAPENCRYPT = 0x5
1465 VM_USPACE = 0xb
1466 VM_UVMEXP = 0x4
1467 VM_VNODEMIN = 0x9
1468 VM_VTEXTMIN = 0x8
13031469 VQUIT = 0x9
13041470 VREPRINT = 0x6
13051471 VSTART = 0xc
13121478 WCONTINUED = 0x8
13131479 WCOREFLAG = 0x80
13141480 WNOHANG = 0x1
1315 WSTOPPED = 0x7f
13161481 WUNTRACED = 0x2
1482 XCASE = 0x1000000
13171483 )
13181484
13191485 // Errors
13271493 EALREADY = syscall.Errno(0x25)
13281494 EAUTH = syscall.Errno(0x50)
13291495 EBADF = syscall.Errno(0x9)
1496 EBADMSG = syscall.Errno(0x5c)
13301497 EBADRPC = syscall.Errno(0x48)
13311498 EBUSY = syscall.Errno(0x10)
13321499 ECANCELED = syscall.Errno(0x58)
13531520 EIPSEC = syscall.Errno(0x52)
13541521 EISCONN = syscall.Errno(0x38)
13551522 EISDIR = syscall.Errno(0x15)
1356 ELAST = syscall.Errno(0x5b)
1523 ELAST = syscall.Errno(0x5f)
13571524 ELOOP = syscall.Errno(0x3e)
13581525 EMEDIUMTYPE = syscall.Errno(0x56)
13591526 EMFILE = syscall.Errno(0x18)
13811548 ENOTCONN = syscall.Errno(0x39)
13821549 ENOTDIR = syscall.Errno(0x14)
13831550 ENOTEMPTY = syscall.Errno(0x42)
1551 ENOTRECOVERABLE = syscall.Errno(0x5d)
13841552 ENOTSOCK = syscall.Errno(0x26)
13851553 ENOTSUP = syscall.Errno(0x5b)
13861554 ENOTTY = syscall.Errno(0x19)
13871555 ENXIO = syscall.Errno(0x6)
13881556 EOPNOTSUPP = syscall.Errno(0x2d)
13891557 EOVERFLOW = syscall.Errno(0x57)
1558 EOWNERDEAD = syscall.Errno(0x5e)
13901559 EPERM = syscall.Errno(0x1)
13911560 EPFNOSUPPORT = syscall.Errno(0x2e)
13921561 EPIPE = syscall.Errno(0x20)
13941563 EPROCUNAVAIL = syscall.Errno(0x4c)
13951564 EPROGMISMATCH = syscall.Errno(0x4b)
13961565 EPROGUNAVAIL = syscall.Errno(0x4a)
1566 EPROTO = syscall.Errno(0x5f)
13971567 EPROTONOSUPPORT = syscall.Errno(0x2b)
13981568 EPROTOTYPE = syscall.Errno(0x29)
13991569 ERANGE = syscall.Errno(0x22)
14511621 )
14521622
14531623 // Error table
1454 var errors = [...]string{
1455 1: "operation not permitted",
1456 2: "no such file or directory",
1457 3: "no such process",
1458 4: "interrupted system call",
1459 5: "input/output error",
1460 6: "device not configured",
1461 7: "argument list too long",
1462 8: "exec format error",
1463 9: "bad file descriptor",
1464 10: "no child processes",
1465 11: "resource deadlock avoided",
1466 12: "cannot allocate memory",
1467 13: "permission denied",
1468 14: "bad address",
1469 15: "block device required",
1470 16: "device busy",
1471 17: "file exists",
1472 18: "cross-device link",
1473 19: "operation not supported by device",
1474 20: "not a directory",
1475 21: "is a directory",
1476 22: "invalid argument",
1477 23: "too many open files in system",
1478 24: "too many open files",
1479 25: "inappropriate ioctl for device",
1480 26: "text file busy",
1481 27: "file too large",
1482 28: "no space left on device",
1483 29: "illegal seek",
1484 30: "read-only file system",
1485 31: "too many links",
1486 32: "broken pipe",
1487 33: "numerical argument out of domain",
1488 34: "result too large",
1489 35: "resource temporarily unavailable",
1490 36: "operation now in progress",
1491 37: "operation already in progress",
1492 38: "socket operation on non-socket",
1493 39: "destination address required",
1494 40: "message too long",
1495 41: "protocol wrong type for socket",
1496 42: "protocol not available",
1497 43: "protocol not supported",
1498 44: "socket type not supported",
1499 45: "operation not supported",
1500 46: "protocol family not supported",
1501 47: "address family not supported by protocol family",
1502 48: "address already in use",
1503 49: "can't assign requested address",
1504 50: "network is down",
1505 51: "network is unreachable",
1506 52: "network dropped connection on reset",
1507 53: "software caused connection abort",
1508 54: "connection reset by peer",
1509 55: "no buffer space available",
1510 56: "socket is already connected",
1511 57: "socket is not connected",
1512 58: "can't send after socket shutdown",
1513 59: "too many references: can't splice",
1514 60: "connection timed out",
1515 61: "connection refused",
1516 62: "too many levels of symbolic links",
1517 63: "file name too long",
1518 64: "host is down",
1519 65: "no route to host",
1520 66: "directory not empty",
1521 67: "too many processes",
1522 68: "too many users",
1523 69: "disc quota exceeded",
1524 70: "stale NFS file handle",
1525 71: "too many levels of remote in path",
1526 72: "RPC struct is bad",
1527 73: "RPC version wrong",
1528 74: "RPC prog. not avail",
1529 75: "program version wrong",
1530 76: "bad procedure for program",
1531 77: "no locks available",
1532 78: "function not implemented",
1533 79: "inappropriate file type or format",
1534 80: "authentication error",
1535 81: "need authenticator",
1536 82: "IPsec processing failure",
1537 83: "attribute not found",
1538 84: "illegal byte sequence",
1539 85: "no medium found",
1540 86: "wrong medium type",
1541 87: "value too large to be stored in data type",
1542 88: "operation canceled",
1543 89: "identifier removed",
1544 90: "no message of desired type",
1545 91: "not supported",
1624 var errorList = [...]struct {
1625 num syscall.Errno
1626 name string
1627 desc string
1628 }{
1629 {1, "EPERM", "operation not permitted"},
1630 {2, "ENOENT", "no such file or directory"},
1631 {3, "ESRCH", "no such process"},
1632 {4, "EINTR", "interrupted system call"},
1633 {5, "EIO", "input/output error"},
1634 {6, "ENXIO", "device not configured"},
1635 {7, "E2BIG", "argument list too long"},
1636 {8, "ENOEXEC", "exec format error"},
1637 {9, "EBADF", "bad file descriptor"},
1638 {10, "ECHILD", "no child processes"},
1639 {11, "EDEADLK", "resource deadlock avoided"},
1640 {12, "ENOMEM", "cannot allocate memory"},
1641 {13, "EACCES", "permission denied"},
1642 {14, "EFAULT", "bad address"},
1643 {15, "ENOTBLK", "block device required"},
1644 {16, "EBUSY", "device busy"},
1645 {17, "EEXIST", "file exists"},
1646 {18, "EXDEV", "cross-device link"},
1647 {19, "ENODEV", "operation not supported by device"},
1648 {20, "ENOTDIR", "not a directory"},
1649 {21, "EISDIR", "is a directory"},
1650 {22, "EINVAL", "invalid argument"},
1651 {23, "ENFILE", "too many open files in system"},
1652 {24, "EMFILE", "too many open files"},
1653 {25, "ENOTTY", "inappropriate ioctl for device"},
1654 {26, "ETXTBSY", "text file busy"},
1655 {27, "EFBIG", "file too large"},
1656 {28, "ENOSPC", "no space left on device"},
1657 {29, "ESPIPE", "illegal seek"},
1658 {30, "EROFS", "read-only file system"},
1659 {31, "EMLINK", "too many links"},
1660 {32, "EPIPE", "broken pipe"},
1661 {33, "EDOM", "numerical argument out of domain"},
1662 {34, "ERANGE", "result too large"},
1663 {35, "EAGAIN", "resource temporarily unavailable"},
1664 {36, "EINPROGRESS", "operation now in progress"},
1665 {37, "EALREADY", "operation already in progress"},
1666 {38, "ENOTSOCK", "socket operation on non-socket"},
1667 {39, "EDESTADDRREQ", "destination address required"},
1668 {40, "EMSGSIZE", "message too long"},
1669 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1670 {42, "ENOPROTOOPT", "protocol not available"},
1671 {43, "EPROTONOSUPPORT", "protocol not supported"},
1672 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1673 {45, "EOPNOTSUPP", "operation not supported"},
1674 {46, "EPFNOSUPPORT", "protocol family not supported"},
1675 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1676 {48, "EADDRINUSE", "address already in use"},
1677 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1678 {50, "ENETDOWN", "network is down"},
1679 {51, "ENETUNREACH", "network is unreachable"},
1680 {52, "ENETRESET", "network dropped connection on reset"},
1681 {53, "ECONNABORTED", "software caused connection abort"},
1682 {54, "ECONNRESET", "connection reset by peer"},
1683 {55, "ENOBUFS", "no buffer space available"},
1684 {56, "EISCONN", "socket is already connected"},
1685 {57, "ENOTCONN", "socket is not connected"},
1686 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1687 {59, "ETOOMANYREFS", "too many references: can't splice"},
1688 {60, "ETIMEDOUT", "operation timed out"},
1689 {61, "ECONNREFUSED", "connection refused"},
1690 {62, "ELOOP", "too many levels of symbolic links"},
1691 {63, "ENAMETOOLONG", "file name too long"},
1692 {64, "EHOSTDOWN", "host is down"},
1693 {65, "EHOSTUNREACH", "no route to host"},
1694 {66, "ENOTEMPTY", "directory not empty"},
1695 {67, "EPROCLIM", "too many processes"},
1696 {68, "EUSERS", "too many users"},
1697 {69, "EDQUOT", "disk quota exceeded"},
1698 {70, "ESTALE", "stale NFS file handle"},
1699 {71, "EREMOTE", "too many levels of remote in path"},
1700 {72, "EBADRPC", "RPC struct is bad"},
1701 {73, "ERPCMISMATCH", "RPC version wrong"},
1702 {74, "EPROGUNAVAIL", "RPC program not available"},
1703 {75, "EPROGMISMATCH", "program version wrong"},
1704 {76, "EPROCUNAVAIL", "bad procedure for program"},
1705 {77, "ENOLCK", "no locks available"},
1706 {78, "ENOSYS", "function not implemented"},
1707 {79, "EFTYPE", "inappropriate file type or format"},
1708 {80, "EAUTH", "authentication error"},
1709 {81, "ENEEDAUTH", "need authenticator"},
1710 {82, "EIPSEC", "IPsec processing failure"},
1711 {83, "ENOATTR", "attribute not found"},
1712 {84, "EILSEQ", "illegal byte sequence"},
1713 {85, "ENOMEDIUM", "no medium found"},
1714 {86, "EMEDIUMTYPE", "wrong medium type"},
1715 {87, "EOVERFLOW", "value too large to be stored in data type"},
1716 {88, "ECANCELED", "operation canceled"},
1717 {89, "EIDRM", "identifier removed"},
1718 {90, "ENOMSG", "no message of desired type"},
1719 {91, "ENOTSUP", "not supported"},
1720 {92, "EBADMSG", "bad message"},
1721 {93, "ENOTRECOVERABLE", "state not recoverable"},
1722 {94, "EOWNERDEAD", "previous owner died"},
1723 {95, "ELAST", "protocol error"},
15461724 }
15471725
15481726 // Signal table
1549 var signals = [...]string{
1550 1: "hangup",
1551 2: "interrupt",
1552 3: "quit",
1553 4: "illegal instruction",
1554 5: "trace/BPT trap",
1555 6: "abort trap",
1556 7: "EMT trap",
1557 8: "floating point exception",
1558 9: "killed",
1559 10: "bus error",
1560 11: "segmentation fault",
1561 12: "bad system call",
1562 13: "broken pipe",
1563 14: "alarm clock",
1564 15: "terminated",
1565 16: "urgent I/O condition",
1566 17: "stopped (signal)",
1567 18: "stopped",
1568 19: "continued",
1569 20: "child exited",
1570 21: "stopped (tty input)",
1571 22: "stopped (tty output)",
1572 23: "I/O possible",
1573 24: "cputime limit exceeded",
1574 25: "filesize limit exceeded",
1575 26: "virtual timer expired",
1576 27: "profiling timer expired",
1577 28: "window size changes",
1578 29: "information request",
1579 30: "user defined signal 1",
1580 31: "user defined signal 2",
1581 32: "thread AST",
1727 var signalList = [...]struct {
1728 num syscall.Signal
1729 name string
1730 desc string
1731 }{
1732 {1, "SIGHUP", "hangup"},
1733 {2, "SIGINT", "interrupt"},
1734 {3, "SIGQUIT", "quit"},
1735 {4, "SIGILL", "illegal instruction"},
1736 {5, "SIGTRAP", "trace/BPT trap"},
1737 {6, "SIGABRT", "abort trap"},
1738 {7, "SIGEMT", "EMT trap"},
1739 {8, "SIGFPE", "floating point exception"},
1740 {9, "SIGKILL", "killed"},
1741 {10, "SIGBUS", "bus error"},
1742 {11, "SIGSEGV", "segmentation fault"},
1743 {12, "SIGSYS", "bad system call"},
1744 {13, "SIGPIPE", "broken pipe"},
1745 {14, "SIGALRM", "alarm clock"},
1746 {15, "SIGTERM", "terminated"},
1747 {16, "SIGURG", "urgent I/O condition"},
1748 {17, "SIGSTOP", "suspended (signal)"},
1749 {18, "SIGTSTP", "suspended"},
1750 {19, "SIGCONT", "continued"},
1751 {20, "SIGCHLD", "child exited"},
1752 {21, "SIGTTIN", "stopped (tty input)"},
1753 {22, "SIGTTOU", "stopped (tty output)"},
1754 {23, "SIGIO", "I/O possible"},
1755 {24, "SIGXCPU", "cputime limit exceeded"},
1756 {25, "SIGXFSZ", "filesize limit exceeded"},
1757 {26, "SIGVTALRM", "virtual timer expired"},
1758 {27, "SIGPROF", "profiling timer expired"},
1759 {28, "SIGWINCH", "window size changes"},
1760 {29, "SIGINFO", "information request"},
1761 {30, "SIGUSR1", "user defined signal 1"},
1762 {31, "SIGUSR2", "user defined signal 2"},
1763 {32, "SIGTHR", "thread AST"},
15821764 }
00 // mkerrors.sh
1 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // Created by cgo -godefs - DO NOT EDIT
44 // cgo -godefs -- _const.go
146146 CFLUSH = 0xf
147147 CLOCAL = 0x8000
148148 CREAD = 0x800
149 CRTSCTS = 0x10000
149150 CS5 = 0x0
150151 CS6 = 0x100
151152 CS7 = 0x200
156157 CSTOP = 0x13
157158 CSTOPB = 0x400
158159 CSUSP = 0x1a
160 CTL_HW = 0x6
161 CTL_KERN = 0x1
159162 CTL_MAXNAME = 0xc
160163 CTL_NET = 0x4
161164 DIOCOSFPFLUSH = 0x2000444e
440443 F_UNLCK = 0x2
441444 F_WRLCK = 0x3
442445 HUPCL = 0x4000
446 HW_MACHINE = 0x1
443447 ICANON = 0x100
444448 ICMP6_FILTER = 0x12
445449 ICRNL = 0x100
858862 IXANY = 0x800
859863 IXOFF = 0x400
860864 IXON = 0x200
865 KERN_HOSTNAME = 0xa
866 KERN_OSRELEASE = 0x2
867 KERN_OSTYPE = 0x1
868 KERN_VERSION = 0x4
861869 LCNT_OVERLOAD_FLUSH = 0x6
862870 LOCK_EX = 0x2
863871 LOCK_NB = 0x4
890898 MAP_TRYFIXED = 0x0
891899 MCL_CURRENT = 0x1
892900 MCL_FUTURE = 0x2
901 MNT_ASYNC = 0x40
902 MNT_DEFEXPORTED = 0x200
903 MNT_DELEXPORT = 0x20000
904 MNT_DOOMED = 0x8000000
905 MNT_EXPORTANON = 0x400
906 MNT_EXPORTED = 0x100
907 MNT_EXRDONLY = 0x80
908 MNT_FORCE = 0x80000
909 MNT_LAZY = 0x3
910 MNT_LOCAL = 0x1000
911 MNT_NOATIME = 0x8000
912 MNT_NODEV = 0x10
913 MNT_NOEXEC = 0x4
914 MNT_NOSUID = 0x8
915 MNT_NOWAIT = 0x2
916 MNT_QUOTA = 0x2000
917 MNT_RDONLY = 0x1
918 MNT_RELOAD = 0x40000
919 MNT_ROOTFS = 0x4000
920 MNT_SOFTDEP = 0x4000000
921 MNT_SYNCHRONOUS = 0x2
922 MNT_UPDATE = 0x10000
923 MNT_VISFLAGMASK = 0x400ffff
924 MNT_WAIT = 0x1
925 MNT_WANTRDWR = 0x2000000
926 MNT_WXALLOWED = 0x800
893927 MSG_BCAST = 0x100
894928 MSG_CMSG_CLOEXEC = 0x800
895929 MSG_CTRUNC = 0x20
12121246 SO_TIMESTAMP = 0x800
12131247 SO_TYPE = 0x1008
12141248 SO_USELOOPBACK = 0x40
1249 S_BLKSIZE = 0x200
1250 S_IEXEC = 0x40
1251 S_IFBLK = 0x6000
1252 S_IFCHR = 0x2000
1253 S_IFDIR = 0x4000
1254 S_IFIFO = 0x1000
1255 S_IFLNK = 0xa000
1256 S_IFMT = 0xf000
1257 S_IFREG = 0x8000
1258 S_IFSOCK = 0xc000
1259 S_IREAD = 0x100
1260 S_IRGRP = 0x20
1261 S_IROTH = 0x4
1262 S_IRUSR = 0x100
1263 S_IRWXG = 0x38
1264 S_IRWXO = 0x7
1265 S_IRWXU = 0x1c0
1266 S_ISGID = 0x400
1267 S_ISTXT = 0x200
1268 S_ISUID = 0x800
1269 S_ISVTX = 0x200
1270 S_IWGRP = 0x10
1271 S_IWOTH = 0x2
1272 S_IWRITE = 0x80
1273 S_IWUSR = 0x80
1274 S_IXGRP = 0x8
1275 S_IXOTH = 0x1
1276 S_IXUSR = 0x40
12151277 TCIFLUSH = 0x1
12161278 TCIOFLUSH = 0x3
12171279 TCOFLUSH = 0x2
14541516 )
14551517
14561518 // Error table
1457 var errors = [...]string{
1458 1: "operation not permitted",
1459 2: "no such file or directory",
1460 3: "no such process",
1461 4: "interrupted system call",
1462 5: "input/output error",
1463 6: "device not configured",
1464 7: "argument list too long",
1465 8: "exec format error",
1466 9: "bad file descriptor",
1467 10: "no child processes",
1468 11: "resource deadlock avoided",
1469 12: "cannot allocate memory",
1470 13: "permission denied",
1471 14: "bad address",
1472 15: "block device required",
1473 16: "device busy",
1474 17: "file exists",
1475 18: "cross-device link",
1476 19: "operation not supported by device",
1477 20: "not a directory",
1478 21: "is a directory",
1479 22: "invalid argument",
1480 23: "too many open files in system",
1481 24: "too many open files",
1482 25: "inappropriate ioctl for device",
1483 26: "text file busy",
1484 27: "file too large",
1485 28: "no space left on device",
1486 29: "illegal seek",
1487 30: "read-only file system",
1488 31: "too many links",
1489 32: "broken pipe",
1490 33: "numerical argument out of domain",
1491 34: "result too large",
1492 35: "resource temporarily unavailable",
1493 36: "operation now in progress",
1494 37: "operation already in progress",
1495 38: "socket operation on non-socket",
1496 39: "destination address required",
1497 40: "message too long",
1498 41: "protocol wrong type for socket",
1499 42: "protocol not available",
1500 43: "protocol not supported",
1501 44: "socket type not supported",
1502 45: "operation not supported",
1503 46: "protocol family not supported",
1504 47: "address family not supported by protocol family",
1505 48: "address already in use",
1506 49: "can't assign requested address",
1507 50: "network is down",
1508 51: "network is unreachable",
1509 52: "network dropped connection on reset",
1510 53: "software caused connection abort",
1511 54: "connection reset by peer",
1512 55: "no buffer space available",
1513 56: "socket is already connected",
1514 57: "socket is not connected",
1515 58: "can't send after socket shutdown",
1516 59: "too many references: can't splice",
1517 60: "connection timed out",
1518 61: "connection refused",
1519 62: "too many levels of symbolic links",
1520 63: "file name too long",
1521 64: "host is down",
1522 65: "no route to host",
1523 66: "directory not empty",
1524 67: "too many processes",
1525 68: "too many users",
1526 69: "disc quota exceeded",
1527 70: "stale NFS file handle",
1528 71: "too many levels of remote in path",
1529 72: "RPC struct is bad",
1530 73: "RPC version wrong",
1531 74: "RPC prog. not avail",
1532 75: "program version wrong",
1533 76: "bad procedure for program",
1534 77: "no locks available",
1535 78: "function not implemented",
1536 79: "inappropriate file type or format",
1537 80: "authentication error",
1538 81: "need authenticator",
1539 82: "IPsec processing failure",
1540 83: "attribute not found",
1541 84: "illegal byte sequence",
1542 85: "no medium found",
1543 86: "wrong medium type",
1544 87: "value too large to be stored in data type",
1545 88: "operation canceled",
1546 89: "identifier removed",
1547 90: "no message of desired type",
1548 91: "not supported",
1519 var errorList = [...]struct {
1520 num syscall.Errno
1521 name string
1522 desc string
1523 }{
1524 {1, "EPERM", "operation not permitted"},
1525 {2, "ENOENT", "no such file or directory"},
1526 {3, "ESRCH", "no such process"},
1527 {4, "EINTR", "interrupted system call"},
1528 {5, "EIO", "input/output error"},
1529 {6, "ENXIO", "device not configured"},
1530 {7, "E2BIG", "argument list too long"},
1531 {8, "ENOEXEC", "exec format error"},
1532 {9, "EBADF", "bad file descriptor"},
1533 {10, "ECHILD", "no child processes"},
1534 {11, "EDEADLK", "resource deadlock avoided"},
1535 {12, "ENOMEM", "cannot allocate memory"},
1536 {13, "EACCES", "permission denied"},
1537 {14, "EFAULT", "bad address"},
1538 {15, "ENOTBLK", "block device required"},
1539 {16, "EBUSY", "device busy"},
1540 {17, "EEXIST", "file exists"},
1541 {18, "EXDEV", "cross-device link"},
1542 {19, "ENODEV", "operation not supported by device"},
1543 {20, "ENOTDIR", "not a directory"},
1544 {21, "EISDIR", "is a directory"},
1545 {22, "EINVAL", "invalid argument"},
1546 {23, "ENFILE", "too many open files in system"},
1547 {24, "EMFILE", "too many open files"},
1548 {25, "ENOTTY", "inappropriate ioctl for device"},
1549 {26, "ETXTBSY", "text file busy"},
1550 {27, "EFBIG", "file too large"},
1551 {28, "ENOSPC", "no space left on device"},
1552 {29, "ESPIPE", "illegal seek"},
1553 {30, "EROFS", "read-only file system"},
1554 {31, "EMLINK", "too many links"},
1555 {32, "EPIPE", "broken pipe"},
1556 {33, "EDOM", "numerical argument out of domain"},
1557 {34, "ERANGE", "result too large"},
1558 {35, "EWOULDBLOCK", "resource temporarily unavailable"},
1559 {36, "EINPROGRESS", "operation now in progress"},
1560 {37, "EALREADY", "operation already in progress"},
1561 {38, "ENOTSOCK", "socket operation on non-socket"},
1562 {39, "EDESTADDRREQ", "destination address required"},
1563 {40, "EMSGSIZE", "message too long"},
1564 {41, "EPROTOTYPE", "protocol wrong type for socket"},
1565 {42, "ENOPROTOOPT", "protocol not available"},
1566 {43, "EPROTONOSUPPORT", "protocol not supported"},
1567 {44, "ESOCKTNOSUPPORT", "socket type not supported"},
1568 {45, "EOPNOTSUPP", "operation not supported"},
1569 {46, "EPFNOSUPPORT", "protocol family not supported"},
1570 {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
1571 {48, "EADDRINUSE", "address already in use"},
1572 {49, "EADDRNOTAVAIL", "can't assign requested address"},
1573 {50, "ENETDOWN", "network is down"},
1574 {51, "ENETUNREACH", "network is unreachable"},
1575 {52, "ENETRESET", "network dropped connection on reset"},
1576 {53, "ECONNABORTED", "software caused connection abort"},
1577 {54, "ECONNRESET", "connection reset by peer"},
1578 {55, "ENOBUFS", "no buffer space available"},
1579 {56, "EISCONN", "socket is already connected"},
1580 {57, "ENOTCONN", "socket is not connected"},
1581 {58, "ESHUTDOWN", "can't send after socket shutdown"},
1582 {59, "ETOOMANYREFS", "too many references: can't splice"},
1583 {60, "ETIMEDOUT", "operation timed out"},
1584 {61, "ECONNREFUSED", "connection refused"},
1585 {62, "ELOOP", "too many levels of symbolic links"},
1586 {63, "ENAMETOOLONG", "file name too long"},
1587 {64, "EHOSTDOWN", "host is down"},
1588 {65, "EHOSTUNREACH", "no route to host"},
1589 {66, "ENOTEMPTY", "directory not empty"},
1590 {67, "EPROCLIM", "too many processes"},
1591 {68, "EUSERS", "too many users"},
1592 {69, "EDQUOT", "disk quota exceeded"},
1593 {70, "ESTALE", "stale NFS file handle"},
1594 {71, "EREMOTE", "too many levels of remote in path"},
1595 {72, "EBADRPC", "RPC struct is bad"},
1596 {73, "ERPCMISMATCH", "RPC version wrong"},
1597 {74, "EPROGUNAVAIL", "RPC program not available"},
1598 {75, "EPROGMISMATCH", "program version wrong"},
1599 {76, "EPROCUNAVAIL", "bad procedure for program"},
1600 {77, "ENOLCK", "no locks available"},
1601 {78, "ENOSYS", "function not implemented"},
1602 {79, "EFTYPE", "inappropriate file type or format"},
1603 {80, "EAUTH", "authentication error"},
1604 {81, "ENEEDAUTH", "need authenticator"},
1605 {82, "EIPSEC", "IPsec processing failure"},
1606 {83, "ENOATTR", "attribute not found"},
1607 {84, "EILSEQ", "illegal byte sequence"},
1608 {85, "ENOMEDIUM", "no medium found"},
1609 {86, "EMEDIUMTYPE", "wrong medium type"},
1610 {87, "EOVERFLOW", "value too large to be stored in data type"},
1611 {88, "ECANCELED", "operation canceled"},
1612 {89, "EIDRM", "identifier removed"},
1613 {90, "ENOMSG", "no message of desired type"},
1614 {91, "ELAST", "not supported"},
15491615 }
15501616
15511617 // Signal table
1552 var signals = [...]string{
1553 1: "hangup",
1554 2: "interrupt",
1555 3: "quit",
1556 4: "illegal instruction",
1557 5: "trace/BPT trap",
1558 6: "abort trap",
1559 7: "EMT trap",
1560 8: "floating point exception",
1561 9: "killed",
1562 10: "bus error",
1563 11: "segmentation fault",
1564 12: "bad system call",
1565 13: "broken pipe",
1566 14: "alarm clock",
1567 15: "terminated",
1568 16: "urgent I/O condition",
1569 17: "stopped (signal)",
1570 18: "stopped",
1571 19: "continued",
1572 20: "child exited",
1573 21: "stopped (tty input)",
1574 22: "stopped (tty output)",
1575 23: "I/O possible",
1576 24: "cputime limit exceeded",
1577 25: "filesize limit exceeded",
1578 26: "virtual timer expired",
1579 27: "profiling timer expired",
1580 28: "window size changes",
1581 29: "information request",
1582 30: "user defined signal 1",
1583 31: "user defined signal 2",
1584 32: "thread AST",
1618 var signalList = [...]struct {
1619 num syscall.Signal
1620 name string
1621 desc string
1622 }{
1623 {1, "SIGHUP", "hangup"},
1624 {2, "SIGINT", "interrupt"},
1625 {3, "SIGQUIT", "quit"},
1626 {4, "SIGILL", "illegal instruction"},
1627 {5, "SIGTRAP", "trace/BPT trap"},
1628 {6, "SIGABRT", "abort trap"},
1629 {7, "SIGEMT", "EMT trap"},
1630 {8, "SIGFPE", "floating point exception"},
1631 {9, "SIGKILL", "killed"},
1632 {10, "SIGBUS", "bus error"},
1633 {11, "SIGSEGV", "segmentation fault"},
1634 {12, "SIGSYS", "bad system call"},
1635 {13, "SIGPIPE", "broken pipe"},
1636 {14, "SIGALRM", "alarm clock"},
1637 {15, "SIGTERM", "terminated"},
1638 {16, "SIGURG", "urgent I/O condition"},
1639 {17, "SIGSTOP", "suspended (signal)"},
1640 {18, "SIGTSTP", "suspended"},
1641 {19, "SIGCONT", "continued"},
1642 {20, "SIGCHLD", "child exited"},
1643 {21, "SIGTTIN", "stopped (tty input)"},
1644 {22, "SIGTTOU", "stopped (tty output)"},
1645 {23, "SIGIO", "I/O possible"},
1646 {24, "SIGXCPU", "cputime limit exceeded"},
1647 {25, "SIGXFSZ", "filesize limit exceeded"},
1648 {26, "SIGVTALRM", "virtual timer expired"},
1649 {27, "SIGPROF", "profiling timer expired"},
1650 {28, "SIGWINCH", "window size changes"},
1651 {29, "SIGINFO", "information request"},
1652 {30, "SIGUSR1", "user defined signal 1"},
1653 {31, "SIGUSR2", "user defined signal 2"},
1654 {32, "SIGTHR", "thread AST"},
15851655 }
995995 SO_USELOOPBACK = 0x40
996996 SO_VRRP = 0x1017
997997 SO_WROFF = 0x2
998 S_ENFMT = 0x400
999 S_IAMB = 0x1ff
1000 S_IEXEC = 0x40
1001 S_IFBLK = 0x6000
1002 S_IFCHR = 0x2000
1003 S_IFDIR = 0x4000
1004 S_IFDOOR = 0xd000
1005 S_IFIFO = 0x1000
1006 S_IFLNK = 0xa000
1007 S_IFMT = 0xf000
1008 S_IFNAM = 0x5000
1009 S_IFPORT = 0xe000
1010 S_IFREG = 0x8000
1011 S_IFSOCK = 0xc000
1012 S_INSEM = 0x1
1013 S_INSHD = 0x2
1014 S_IREAD = 0x100
1015 S_IRGRP = 0x20
1016 S_IROTH = 0x4
1017 S_IRUSR = 0x100
1018 S_IRWXG = 0x38
1019 S_IRWXO = 0x7
1020 S_IRWXU = 0x1c0
1021 S_ISGID = 0x400
1022 S_ISUID = 0x800
1023 S_ISVTX = 0x200
1024 S_IWGRP = 0x10
1025 S_IWOTH = 0x2
1026 S_IWRITE = 0x80
1027 S_IWUSR = 0x80
1028 S_IXGRP = 0x8
1029 S_IXOTH = 0x1
1030 S_IXUSR = 0x40
9981031 TAB0 = 0x0
9991032 TAB1 = 0x800
10001033 TAB2 = 0x1000
11011134 TIOCSTOP = 0x746f
11021135 TIOCSWINSZ = 0x5467
11031136 TOSTOP = 0x100
1137 UTIME_NOW = -0x1
1138 UTIME_OMIT = -0x2
11041139 VCEOF = 0x8
11051140 VCEOL = 0x9
11061141 VDISCARD = 0xd
13181353 )
13191354
13201355 // Error table
1321 var errors = [...]string{
1322 1: "not owner",
1323 2: "no such file or directory",
1324 3: "no such process",
1325 4: "interrupted system call",
1326 5: "I/O error",
1327 6: "no such device or address",
1328 7: "arg list too long",
1329 8: "exec format error",
1330 9: "bad file number",
1331 10: "no child processes",
1332 11: "resource temporarily unavailable",
1333 12: "not enough space",
1334 13: "permission denied",
1335 14: "bad address",
1336 15: "block device required",
1337 16: "device busy",
1338 17: "file exists",
1339 18: "cross-device link",
1340 19: "no such device",
1341 20: "not a directory",
1342 21: "is a directory",
1343 22: "invalid argument",
1344 23: "file table overflow",
1345 24: "too many open files",
1346 25: "inappropriate ioctl for device",
1347 26: "text file busy",
1348 27: "file too large",
1349 28: "no space left on device",
1350 29: "illegal seek",
1351 30: "read-only file system",
1352 31: "too many links",
1353 32: "broken pipe",
1354 33: "argument out of domain",
1355 34: "result too large",
1356 35: "no message of desired type",
1357 36: "identifier removed",
1358 37: "channel number out of range",
1359 38: "level 2 not synchronized",
1360 39: "level 3 halted",
1361 40: "level 3 reset",
1362 41: "link number out of range",
1363 42: "protocol driver not attached",
1364 43: "no CSI structure available",
1365 44: "level 2 halted",
1366 45: "deadlock situation detected/avoided",
1367 46: "no record locks available",
1368 47: "operation canceled",
1369 48: "operation not supported",
1370 49: "disc quota exceeded",
1371 50: "bad exchange descriptor",
1372 51: "bad request descriptor",
1373 52: "message tables full",
1374 53: "anode table overflow",
1375 54: "bad request code",
1376 55: "invalid slot",
1377 56: "file locking deadlock",
1378 57: "bad font file format",
1379 58: "owner of the lock died",
1380 59: "lock is not recoverable",
1381 60: "not a stream device",
1382 61: "no data available",
1383 62: "timer expired",
1384 63: "out of stream resources",
1385 64: "machine is not on the network",
1386 65: "package not installed",
1387 66: "object is remote",
1388 67: "link has been severed",
1389 68: "advertise error",
1390 69: "srmount error",
1391 70: "communication error on send",
1392 71: "protocol error",
1393 72: "locked lock was unmapped ",
1394 73: "facility is not active",
1395 74: "multihop attempted",
1396 77: "not a data message",
1397 78: "file name too long",
1398 79: "value too large for defined data type",
1399 80: "name not unique on network",
1400 81: "file descriptor in bad state",
1401 82: "remote address changed",
1402 83: "can not access a needed shared library",
1403 84: "accessing a corrupted shared library",
1404 85: ".lib section in a.out corrupted",
1405 86: "attempting to link in more shared libraries than system limit",
1406 87: "can not exec a shared library directly",
1407 88: "illegal byte sequence",
1408 89: "operation not applicable",
1409 90: "number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS",
1410 91: "error 91",
1411 92: "error 92",
1412 93: "directory not empty",
1413 94: "too many users",
1414 95: "socket operation on non-socket",
1415 96: "destination address required",
1416 97: "message too long",
1417 98: "protocol wrong type for socket",
1418 99: "option not supported by protocol",
1419 120: "protocol not supported",
1420 121: "socket type not supported",
1421 122: "operation not supported on transport endpoint",
1422 123: "protocol family not supported",
1423 124: "address family not supported by protocol family",
1424 125: "address already in use",
1425 126: "cannot assign requested address",
1426 127: "network is down",
1427 128: "network is unreachable",
1428 129: "network dropped connection because of reset",
1429 130: "software caused connection abort",
1430 131: "connection reset by peer",
1431 132: "no buffer space available",
1432 133: "transport endpoint is already connected",
1433 134: "transport endpoint is not connected",
1434 143: "cannot send after socket shutdown",
1435 144: "too many references: cannot splice",
1436 145: "connection timed out",
1437 146: "connection refused",
1438 147: "host is down",
1439 148: "no route to host",
1440 149: "operation already in progress",
1441 150: "operation now in progress",
1442 151: "stale NFS file handle",
1356 var errorList = [...]struct {
1357 num syscall.Errno
1358 name string
1359 desc string
1360 }{
1361 {1, "EPERM", "not owner"},
1362 {2, "ENOENT", "no such file or directory"},
1363 {3, "ESRCH", "no such process"},
1364 {4, "EINTR", "interrupted system call"},
1365 {5, "EIO", "I/O error"},
1366 {6, "ENXIO", "no such device or address"},
1367 {7, "E2BIG", "arg list too long"},
1368 {8, "ENOEXEC", "exec format error"},
1369 {9, "EBADF", "bad file number"},
1370 {10, "ECHILD", "no child processes"},
1371 {11, "EAGAIN", "resource temporarily unavailable"},
1372 {12, "ENOMEM", "not enough space"},
1373 {13, "EACCES", "permission denied"},
1374 {14, "EFAULT", "bad address"},
1375 {15, "ENOTBLK", "block device required"},
1376 {16, "EBUSY", "device busy"},
1377 {17, "EEXIST", "file exists"},
1378 {18, "EXDEV", "cross-device link"},
1379 {19, "ENODEV", "no such device"},
1380 {20, "ENOTDIR", "not a directory"},
1381 {21, "EISDIR", "is a directory"},
1382 {22, "EINVAL", "invalid argument"},
1383 {23, "ENFILE", "file table overflow"},
1384 {24, "EMFILE", "too many open files"},
1385 {25, "ENOTTY", "inappropriate ioctl for device"},
1386 {26, "ETXTBSY", "text file busy"},
1387 {27, "EFBIG", "file too large"},
1388 {28, "ENOSPC", "no space left on device"},
1389 {29, "ESPIPE", "illegal seek"},
1390 {30, "EROFS", "read-only file system"},
1391 {31, "EMLINK", "too many links"},
1392 {32, "EPIPE", "broken pipe"},
1393 {33, "EDOM", "argument out of domain"},
1394 {34, "ERANGE", "result too large"},
1395 {35, "ENOMSG", "no message of desired type"},
1396 {36, "EIDRM", "identifier removed"},
1397 {37, "ECHRNG", "channel number out of range"},
1398 {38, "EL2NSYNC", "level 2 not synchronized"},
1399 {39, "EL3HLT", "level 3 halted"},
1400 {40, "EL3RST", "level 3 reset"},
1401 {41, "ELNRNG", "link number out of range"},
1402 {42, "EUNATCH", "protocol driver not attached"},
1403 {43, "ENOCSI", "no CSI structure available"},
1404 {44, "EL2HLT", "level 2 halted"},
1405 {45, "EDEADLK", "deadlock situation detected/avoided"},
1406 {46, "ENOLCK", "no record locks available"},
1407 {47, "ECANCELED", "operation canceled"},
1408 {48, "ENOTSUP", "operation not supported"},
1409 {49, "EDQUOT", "disc quota exceeded"},
1410 {50, "EBADE", "bad exchange descriptor"},
1411 {51, "EBADR", "bad request descriptor"},
1412 {52, "EXFULL", "message tables full"},
1413 {53, "ENOANO", "anode table overflow"},
1414 {54, "EBADRQC", "bad request code"},
1415 {55, "EBADSLT", "invalid slot"},
1416 {56, "EDEADLOCK", "file locking deadlock"},
1417 {57, "EBFONT", "bad font file format"},
1418 {58, "EOWNERDEAD", "owner of the lock died"},
1419 {59, "ENOTRECOVERABLE", "lock is not recoverable"},
1420 {60, "ENOSTR", "not a stream device"},
1421 {61, "ENODATA", "no data available"},
1422 {62, "ETIME", "timer expired"},
1423 {63, "ENOSR", "out of stream resources"},
1424 {64, "ENONET", "machine is not on the network"},
1425 {65, "ENOPKG", "package not installed"},
1426 {66, "EREMOTE", "object is remote"},
1427 {67, "ENOLINK", "link has been severed"},
1428 {68, "EADV", "advertise error"},
1429 {69, "ESRMNT", "srmount error"},
1430 {70, "ECOMM", "communication error on send"},
1431 {71, "EPROTO", "protocol error"},
1432 {72, "ELOCKUNMAPPED", "locked lock was unmapped "},
1433 {73, "ENOTACTIVE", "facility is not active"},
1434 {74, "EMULTIHOP", "multihop attempted"},
1435 {77, "EBADMSG", "not a data message"},
1436 {78, "ENAMETOOLONG", "file name too long"},
1437 {79, "EOVERFLOW", "value too large for defined data type"},
1438 {80, "ENOTUNIQ", "name not unique on network"},
1439 {81, "EBADFD", "file descriptor in bad state"},
1440 {82, "EREMCHG", "remote address changed"},
1441 {83, "ELIBACC", "can not access a needed shared library"},
1442 {84, "ELIBBAD", "accessing a corrupted shared library"},
1443 {85, "ELIBSCN", ".lib section in a.out corrupted"},
1444 {86, "ELIBMAX", "attempting to link in more shared libraries than system limit"},
1445 {87, "ELIBEXEC", "can not exec a shared library directly"},
1446 {88, "EILSEQ", "illegal byte sequence"},
1447 {89, "ENOSYS", "operation not applicable"},
1448 {90, "ELOOP", "number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS"},
1449 {91, "ERESTART", "error 91"},
1450 {92, "ESTRPIPE", "error 92"},
1451 {93, "ENOTEMPTY", "directory not empty"},
1452 {94, "EUSERS", "too many users"},
1453 {95, "ENOTSOCK", "socket operation on non-socket"},
1454 {96, "EDESTADDRREQ", "destination address required"},
1455 {97, "EMSGSIZE", "message too long"},
1456 {98, "EPROTOTYPE", "protocol wrong type for socket"},
1457 {99, "ENOPROTOOPT", "option not supported by protocol"},
1458 {120, "EPROTONOSUPPORT", "protocol not supported"},
1459 {121, "ESOCKTNOSUPPORT", "socket type not supported"},
1460 {122, "EOPNOTSUPP", "operation not supported on transport endpoint"},
1461 {123, "EPFNOSUPPORT", "protocol family not supported"},
1462 {124, "EAFNOSUPPORT", "address family not supported by protocol family"},
1463 {125, "EADDRINUSE", "address already in use"},
1464 {126, "EADDRNOTAVAIL", "cannot assign requested address"},
1465 {127, "ENETDOWN", "network is down"},
1466 {128, "ENETUNREACH", "network is unreachable"},
1467 {129, "ENETRESET", "network dropped connection because of reset"},
1468 {130, "ECONNABORTED", "software caused connection abort"},
1469 {131, "ECONNRESET", "connection reset by peer"},
1470 {132, "ENOBUFS", "no buffer space available"},
1471 {133, "EISCONN", "transport endpoint is already connected"},
1472 {134, "ENOTCONN", "transport endpoint is not connected"},
1473 {143, "ESHUTDOWN", "cannot send after socket shutdown"},
1474 {144, "ETOOMANYREFS", "too many references: cannot splice"},
1475 {145, "ETIMEDOUT", "connection timed out"},
1476 {146, "ECONNREFUSED", "connection refused"},
1477 {147, "EHOSTDOWN", "host is down"},
1478 {148, "EHOSTUNREACH", "no route to host"},
1479 {149, "EALREADY", "operation already in progress"},
1480 {150, "EINPROGRESS", "operation now in progress"},
1481 {151, "ESTALE", "stale NFS file handle"},
14431482 }
14441483
14451484 // Signal table
1446 var signals = [...]string{
1447 1: "hangup",
1448 2: "interrupt",
1449 3: "quit",
1450 4: "illegal Instruction",
1451 5: "trace/Breakpoint Trap",
1452 6: "abort",
1453 7: "emulation Trap",
1454 8: "arithmetic Exception",
1455 9: "killed",
1456 10: "bus Error",
1457 11: "segmentation Fault",
1458 12: "bad System Call",
1459 13: "broken Pipe",
1460 14: "alarm Clock",
1461 15: "terminated",
1462 16: "user Signal 1",
1463 17: "user Signal 2",
1464 18: "child Status Changed",
1465 19: "power-Fail/Restart",
1466 20: "window Size Change",
1467 21: "urgent Socket Condition",
1468 22: "pollable Event",
1469 23: "stopped (signal)",
1470 24: "stopped (user)",
1471 25: "continued",
1472 26: "stopped (tty input)",
1473 27: "stopped (tty output)",
1474 28: "virtual Timer Expired",
1475 29: "profiling Timer Expired",
1476 30: "cpu Limit Exceeded",
1477 31: "file Size Limit Exceeded",
1478 32: "no runnable lwp",
1479 33: "inter-lwp signal",
1480 34: "checkpoint Freeze",
1481 35: "checkpoint Thaw",
1482 36: "thread Cancellation",
1483 37: "resource Lost",
1484 38: "resource Control Exceeded",
1485 39: "reserved for JVM 1",
1486 40: "reserved for JVM 2",
1487 41: "information Request",
1485 var signalList = [...]struct {
1486 num syscall.Signal
1487 name string
1488 desc string
1489 }{
1490 {1, "SIGHUP", "hangup"},
1491 {2, "SIGINT", "interrupt"},
1492 {3, "SIGQUIT", "quit"},
1493 {4, "SIGILL", "illegal Instruction"},
1494 {5, "SIGTRAP", "trace/Breakpoint Trap"},
1495 {6, "SIGABRT", "abort"},
1496 {7, "SIGEMT", "emulation Trap"},
1497 {8, "SIGFPE", "arithmetic Exception"},
1498 {9, "SIGKILL", "killed"},
1499 {10, "SIGBUS", "bus Error"},
1500 {11, "SIGSEGV", "segmentation Fault"},
1501 {12, "SIGSYS", "bad System Call"},
1502 {13, "SIGPIPE", "broken Pipe"},
1503 {14, "SIGALRM", "alarm Clock"},
1504 {15, "SIGTERM", "terminated"},
1505 {16, "SIGUSR1", "user Signal 1"},
1506 {17, "SIGUSR2", "user Signal 2"},
1507 {18, "SIGCHLD", "child Status Changed"},
1508 {19, "SIGPWR", "power-Fail/Restart"},
1509 {20, "SIGWINCH", "window Size Change"},
1510 {21, "SIGURG", "urgent Socket Condition"},
1511 {22, "SIGIO", "pollable Event"},
1512 {23, "SIGSTOP", "stopped (signal)"},
1513 {24, "SIGTSTP", "stopped (user)"},
1514 {25, "SIGCONT", "continued"},
1515 {26, "SIGTTIN", "stopped (tty input)"},
1516 {27, "SIGTTOU", "stopped (tty output)"},
1517 {28, "SIGVTALRM", "virtual Timer Expired"},
1518 {29, "SIGPROF", "profiling Timer Expired"},
1519 {30, "SIGXCPU", "cpu Limit Exceeded"},
1520 {31, "SIGXFSZ", "file Size Limit Exceeded"},
1521 {32, "SIGWAITING", "no runnable lwp"},
1522 {33, "SIGLWP", "inter-lwp signal"},
1523 {34, "SIGFREEZE", "checkpoint Freeze"},
1524 {35, "SIGTHAW", "checkpoint Thaw"},
1525 {36, "SIGCANCEL", "thread Cancellation"},
1526 {37, "SIGLOST", "resource Lost"},
1527 {38, "SIGXRES", "resource Control Exceeded"},
1528 {39, "SIGJVM1", "reserved for JVM 1"},
1529 {40, "SIGJVM2", "reserved for JVM 2"},
1530 {41, "SIGINFO", "information Request"},
14881531 }
0 // Code generated by linux/mkall.go generatePtracePair(386, amd64). DO NOT EDIT.
1
2 // +build linux
3 // +build 386 amd64
4
5 package unix
6
7 import "unsafe"
8
9 // PtraceRegs386 is the registers used by 386 binaries.
10 type PtraceRegs386 struct {
11 Ebx int32
12 Ecx int32
13 Edx int32
14 Esi int32
15 Edi int32
16 Ebp int32
17 Eax int32
18 Xds int32
19 Xes int32
20 Xfs int32
21 Xgs int32
22 Orig_eax int32
23 Eip int32
24 Xcs int32
25 Eflags int32
26 Esp int32
27 Xss int32
28 }
29
30 // PtraceGetRegs386 fetches the registers used by 386 binaries.
31 func PtraceGetRegs386(pid int, regsout *PtraceRegs386) error {
32 return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
33 }
34
35 // PtraceSetRegs386 sets the registers used by 386 binaries.
36 func PtraceSetRegs386(pid int, regs *PtraceRegs386) error {
37 return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
38 }
39
40 // PtraceRegsAmd64 is the registers used by amd64 binaries.
41 type PtraceRegsAmd64 struct {
42 R15 uint64
43 R14 uint64
44 R13 uint64
45 R12 uint64
46 Rbp uint64
47 Rbx uint64
48 R11 uint64
49 R10 uint64
50 R9 uint64
51 R8 uint64
52 Rax uint64
53 Rcx uint64
54 Rdx uint64
55 Rsi uint64
56 Rdi uint64
57 Orig_rax uint64
58 Rip uint64
59 Cs uint64
60 Eflags uint64
61 Rsp uint64
62 Ss uint64
63 Fs_base uint64
64 Gs_base uint64
65 Ds uint64
66 Es uint64
67 Fs uint64
68 Gs uint64
69 }
70
71 // PtraceGetRegsAmd64 fetches the registers used by amd64 binaries.
72 func PtraceGetRegsAmd64(pid int, regsout *PtraceRegsAmd64) error {
73 return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
74 }
75
76 // PtraceSetRegsAmd64 sets the registers used by amd64 binaries.
77 func PtraceSetRegsAmd64(pid int, regs *PtraceRegsAmd64) error {
78 return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
79 }
0 // Code generated by linux/mkall.go generatePtracePair(arm, arm64). DO NOT EDIT.
1
2 // +build linux
3 // +build arm arm64
4
5 package unix
6
7 import "unsafe"
8
9 // PtraceRegsArm is the registers used by arm binaries.
10 type PtraceRegsArm struct {
11 Uregs [18]uint32
12 }
13
14 // PtraceGetRegsArm fetches the registers used by arm binaries.
15 func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
16 return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
17 }
18
19 // PtraceSetRegsArm sets the registers used by arm binaries.
20 func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
21 return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
22 }
23
24 // PtraceRegsArm64 is the registers used by arm64 binaries.
25 type PtraceRegsArm64 struct {
26 Regs [31]uint64
27 Sp uint64
28 Pc uint64
29 Pstate uint64
30 }
31
32 // PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
33 func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
34 return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
35 }
36
37 // PtraceSetRegsArm64 sets the registers used by arm64 binaries.
38 func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
39 return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
40 }
0 // Code generated by linux/mkall.go generatePtracePair(mips, mips64). DO NOT EDIT.
1
2 // +build linux
3 // +build mips mips64
4
5 package unix
6
7 import "unsafe"
8
9 // PtraceRegsMips is the registers used by mips binaries.
10 type PtraceRegsMips struct {
11 Regs [32]uint64
12 Lo uint64
13 Hi uint64
14 Epc uint64
15 Badvaddr uint64
16 Status uint64
17 Cause uint64
18 }
19
20 // PtraceGetRegsMips fetches the registers used by mips binaries.
21 func PtraceGetRegsMips(pid int, regsout *PtraceRegsMips) error {
22 return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
23 }
24
25 // PtraceSetRegsMips sets the registers used by mips binaries.
26 func PtraceSetRegsMips(pid int, regs *PtraceRegsMips) error {
27 return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
28 }
29
30 // PtraceRegsMips64 is the registers used by mips64 binaries.
31 type PtraceRegsMips64 struct {
32 Regs [32]uint64
33 Lo uint64
34 Hi uint64
35 Epc uint64
36 Badvaddr uint64
37 Status uint64
38 Cause uint64
39 }
40
41 // PtraceGetRegsMips64 fetches the registers used by mips64 binaries.
42 func PtraceGetRegsMips64(pid int, regsout *PtraceRegsMips64) error {
43 return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
44 }
45
46 // PtraceSetRegsMips64 sets the registers used by mips64 binaries.
47 func PtraceSetRegsMips64(pid int, regs *PtraceRegsMips64) error {
48 return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
49 }
0 // Code generated by linux/mkall.go generatePtracePair(mipsle, mips64le). DO NOT EDIT.
1
2 // +build linux
3 // +build mipsle mips64le
4
5 package unix
6
7 import "unsafe"
8
9 // PtraceRegsMipsle is the registers used by mipsle binaries.
10 type PtraceRegsMipsle struct {
11 Regs [32]uint64
12 Lo uint64
13 Hi uint64
14 Epc uint64
15 Badvaddr uint64
16 Status uint64
17 Cause uint64
18 }
19
20 // PtraceGetRegsMipsle fetches the registers used by mipsle binaries.
21 func PtraceGetRegsMipsle(pid int, regsout *PtraceRegsMipsle) error {
22 return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
23 }
24
25 // PtraceSetRegsMipsle sets the registers used by mipsle binaries.
26 func PtraceSetRegsMipsle(pid int, regs *PtraceRegsMipsle) error {
27 return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
28 }
29
30 // PtraceRegsMips64le is the registers used by mips64le binaries.
31 type PtraceRegsMips64le struct {
32 Regs [32]uint64
33 Lo uint64
34 Hi uint64
35 Epc uint64
36 Badvaddr uint64
37 Status uint64
38 Cause uint64
39 }
40
41 // PtraceGetRegsMips64le fetches the registers used by mips64le binaries.
42 func PtraceGetRegsMips64le(pid int, regsout *PtraceRegsMips64le) error {
43 return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
44 }
45
46 // PtraceSetRegsMips64le sets the registers used by mips64le binaries.
47 func PtraceSetRegsMips64le(pid int, regs *PtraceRegsMips64le) error {
48 return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
49 }
0 // go run mksyscall_aix_ppc.go -aix -tags aix,ppc syscall_aix.go syscall_aix_ppc.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build aix,ppc
4
5 package unix
6
7 /*
8 #include <stdint.h>
9 #include <stddef.h>
10 int utimes(uintptr_t, uintptr_t);
11 int utimensat(int, uintptr_t, uintptr_t, int);
12 int getcwd(uintptr_t, size_t);
13 int accept(int, uintptr_t, uintptr_t);
14 int getdirent(int, uintptr_t, size_t);
15 int wait4(int, uintptr_t, int, uintptr_t);
16 int ioctl(int, int, uintptr_t);
17 int fcntl(uintptr_t, int, uintptr_t);
18 int acct(uintptr_t);
19 int chdir(uintptr_t);
20 int chroot(uintptr_t);
21 int close(int);
22 int dup(int);
23 void exit(int);
24 int faccessat(int, uintptr_t, unsigned int, int);
25 int fchdir(int);
26 int fchmod(int, unsigned int);
27 int fchmodat(int, uintptr_t, unsigned int, int);
28 int fchownat(int, uintptr_t, int, int, int);
29 int fdatasync(int);
30 int fsync(int);
31 int getpgid(int);
32 int getpgrp();
33 int getpid();
34 int getppid();
35 int getpriority(int, int);
36 int getrusage(int, uintptr_t);
37 int getsid(int);
38 int kill(int, int);
39 int syslog(int, uintptr_t, size_t);
40 int mkdir(int, uintptr_t, unsigned int);
41 int mkdirat(int, uintptr_t, unsigned int);
42 int mkfifo(uintptr_t, unsigned int);
43 int mknod(uintptr_t, unsigned int, int);
44 int mknodat(int, uintptr_t, unsigned int, int);
45 int nanosleep(uintptr_t, uintptr_t);
46 int open64(uintptr_t, int, unsigned int);
47 int openat(int, uintptr_t, int, unsigned int);
48 int read(int, uintptr_t, size_t);
49 int readlink(uintptr_t, uintptr_t, size_t);
50 int renameat(int, uintptr_t, int, uintptr_t);
51 int setdomainname(uintptr_t, size_t);
52 int sethostname(uintptr_t, size_t);
53 int setpgid(int, int);
54 int setsid();
55 int settimeofday(uintptr_t);
56 int setuid(int);
57 int setgid(int);
58 int setpriority(int, int, int);
59 int statx(int, uintptr_t, int, int, uintptr_t);
60 int sync();
61 uintptr_t times(uintptr_t);
62 int umask(int);
63 int uname(uintptr_t);
64 int unlink(uintptr_t);
65 int unlinkat(int, uintptr_t, int);
66 int ustat(int, uintptr_t);
67 int write(int, uintptr_t, size_t);
68 int dup2(int, int);
69 int posix_fadvise64(int, long long, long long, int);
70 int fchown(int, int, int);
71 int fstat(int, uintptr_t);
72 int fstatat(int, uintptr_t, uintptr_t, int);
73 int fstatfs(int, uintptr_t);
74 int ftruncate(int, long long);
75 int getegid();
76 int geteuid();
77 int getgid();
78 int getuid();
79 int lchown(uintptr_t, int, int);
80 int listen(int, int);
81 int lstat(uintptr_t, uintptr_t);
82 int pause();
83 int pread64(int, uintptr_t, size_t, long long);
84 int pwrite64(int, uintptr_t, size_t, long long);
85 int pselect(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
86 int setregid(int, int);
87 int setreuid(int, int);
88 int shutdown(int, int);
89 long long splice(int, uintptr_t, int, uintptr_t, int, int);
90 int stat(uintptr_t, uintptr_t);
91 int statfs(uintptr_t, uintptr_t);
92 int truncate(uintptr_t, long long);
93 int bind(int, uintptr_t, uintptr_t);
94 int connect(int, uintptr_t, uintptr_t);
95 int getgroups(int, uintptr_t);
96 int setgroups(int, uintptr_t);
97 int getsockopt(int, int, int, uintptr_t, uintptr_t);
98 int setsockopt(int, int, int, uintptr_t, uintptr_t);
99 int socket(int, int, int);
100 int socketpair(int, int, int, uintptr_t);
101 int getpeername(int, uintptr_t, uintptr_t);
102 int getsockname(int, uintptr_t, uintptr_t);
103 int recvfrom(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);
104 int sendto(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);
105 int recvmsg(int, uintptr_t, int);
106 int sendmsg(int, uintptr_t, int);
107 int munmap(uintptr_t, uintptr_t);
108 int madvise(uintptr_t, size_t, int);
109 int mprotect(uintptr_t, size_t, int);
110 int mlock(uintptr_t, size_t);
111 int mlockall(int);
112 int msync(uintptr_t, size_t, int);
113 int munlock(uintptr_t, size_t);
114 int munlockall();
115 int pipe(uintptr_t);
116 int poll(uintptr_t, int, int);
117 int gettimeofday(uintptr_t, uintptr_t);
118 int time(uintptr_t);
119 int utime(uintptr_t, uintptr_t);
120 int getrlimit64(int, uintptr_t);
121 int setrlimit64(int, uintptr_t);
122 long long lseek64(int, long long, int);
123 uintptr_t mmap(uintptr_t, uintptr_t, int, int, int, long long);
124
125 */
126 import "C"
127 import (
128 "unsafe"
129 )
130
131 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
132
133 func utimes(path string, times *[2]Timeval) (err error) {
134 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
135 r0, er := C.utimes(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(times))))
136 if r0 == -1 && er != nil {
137 err = er
138 }
139 return
140 }
141
142 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
143
144 func utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) {
145 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
146 r0, er := C.utimensat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(times))), C.int(flag))
147 if r0 == -1 && er != nil {
148 err = er
149 }
150 return
151 }
152
153 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
154
155 func getcwd(buf []byte) (err error) {
156 var _p0 *byte
157 if len(buf) > 0 {
158 _p0 = &buf[0]
159 }
160 var _p1 int
161 _p1 = len(buf)
162 r0, er := C.getcwd(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
163 if r0 == -1 && er != nil {
164 err = er
165 }
166 return
167 }
168
169 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
170
171 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
172 r0, er := C.accept(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen))))
173 fd = int(r0)
174 if r0 == -1 && er != nil {
175 err = er
176 }
177 return
178 }
179
180 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
181
182 func getdirent(fd int, buf []byte) (n int, err error) {
183 var _p0 *byte
184 if len(buf) > 0 {
185 _p0 = &buf[0]
186 }
187 var _p1 int
188 _p1 = len(buf)
189 r0, er := C.getdirent(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
190 n = int(r0)
191 if r0 == -1 && er != nil {
192 err = er
193 }
194 return
195 }
196
197 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
198
199 func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error) {
200 r0, er := C.wait4(C.int(pid), C.uintptr_t(uintptr(unsafe.Pointer(status))), C.int(options), C.uintptr_t(uintptr(unsafe.Pointer(rusage))))
201 wpid = Pid_t(r0)
202 if r0 == -1 && er != nil {
203 err = er
204 }
205 return
206 }
207
208 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
209
210 func ioctl(fd int, req uint, arg uintptr) (err error) {
211 r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(arg))
212 if r0 == -1 && er != nil {
213 err = er
214 }
215 return
216 }
217
218 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
219
220 func FcntlInt(fd uintptr, cmd int, arg int) (r int, err error) {
221 r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg))
222 r = int(r0)
223 if r0 == -1 && er != nil {
224 err = er
225 }
226 return
227 }
228
229 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
230
231 func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) {
232 r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(uintptr(unsafe.Pointer(lk))))
233 if r0 == -1 && er != nil {
234 err = er
235 }
236 return
237 }
238
239 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
240
241 func fcntl(fd int, cmd int, arg int) (val int, err error) {
242 r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg))
243 val = int(r0)
244 if r0 == -1 && er != nil {
245 err = er
246 }
247 return
248 }
249
250 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
251
252 func Acct(path string) (err error) {
253 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
254 r0, er := C.acct(C.uintptr_t(_p0))
255 if r0 == -1 && er != nil {
256 err = er
257 }
258 return
259 }
260
261 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
262
263 func Chdir(path string) (err error) {
264 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
265 r0, er := C.chdir(C.uintptr_t(_p0))
266 if r0 == -1 && er != nil {
267 err = er
268 }
269 return
270 }
271
272 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
273
274 func Chroot(path string) (err error) {
275 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
276 r0, er := C.chroot(C.uintptr_t(_p0))
277 if r0 == -1 && er != nil {
278 err = er
279 }
280 return
281 }
282
283 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
284
285 func Close(fd int) (err error) {
286 r0, er := C.close(C.int(fd))
287 if r0 == -1 && er != nil {
288 err = er
289 }
290 return
291 }
292
293 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
294
295 func Dup(oldfd int) (fd int, err error) {
296 r0, er := C.dup(C.int(oldfd))
297 fd = int(r0)
298 if r0 == -1 && er != nil {
299 err = er
300 }
301 return
302 }
303
304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
305
306 func Exit(code int) {
307 C.exit(C.int(code))
308 return
309 }
310
311 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
312
313 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
314 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
315 r0, er := C.faccessat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags))
316 if r0 == -1 && er != nil {
317 err = er
318 }
319 return
320 }
321
322 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
323
324 func Fchdir(fd int) (err error) {
325 r0, er := C.fchdir(C.int(fd))
326 if r0 == -1 && er != nil {
327 err = er
328 }
329 return
330 }
331
332 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
333
334 func Fchmod(fd int, mode uint32) (err error) {
335 r0, er := C.fchmod(C.int(fd), C.uint(mode))
336 if r0 == -1 && er != nil {
337 err = er
338 }
339 return
340 }
341
342 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
343
344 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
345 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
346 r0, er := C.fchmodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags))
347 if r0 == -1 && er != nil {
348 err = er
349 }
350 return
351 }
352
353 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
354
355 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
356 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
357 r0, er := C.fchownat(C.int(dirfd), C.uintptr_t(_p0), C.int(uid), C.int(gid), C.int(flags))
358 if r0 == -1 && er != nil {
359 err = er
360 }
361 return
362 }
363
364 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
365
366 func Fdatasync(fd int) (err error) {
367 r0, er := C.fdatasync(C.int(fd))
368 if r0 == -1 && er != nil {
369 err = er
370 }
371 return
372 }
373
374 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
375
376 func Fsync(fd int) (err error) {
377 r0, er := C.fsync(C.int(fd))
378 if r0 == -1 && er != nil {
379 err = er
380 }
381 return
382 }
383
384 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
385
386 func Getpgid(pid int) (pgid int, err error) {
387 r0, er := C.getpgid(C.int(pid))
388 pgid = int(r0)
389 if r0 == -1 && er != nil {
390 err = er
391 }
392 return
393 }
394
395 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
396
397 func Getpgrp() (pid int) {
398 r0, _ := C.getpgrp()
399 pid = int(r0)
400 return
401 }
402
403 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
404
405 func Getpid() (pid int) {
406 r0, _ := C.getpid()
407 pid = int(r0)
408 return
409 }
410
411 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
412
413 func Getppid() (ppid int) {
414 r0, _ := C.getppid()
415 ppid = int(r0)
416 return
417 }
418
419 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
420
421 func Getpriority(which int, who int) (prio int, err error) {
422 r0, er := C.getpriority(C.int(which), C.int(who))
423 prio = int(r0)
424 if r0 == -1 && er != nil {
425 err = er
426 }
427 return
428 }
429
430 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
431
432 func Getrusage(who int, rusage *Rusage) (err error) {
433 r0, er := C.getrusage(C.int(who), C.uintptr_t(uintptr(unsafe.Pointer(rusage))))
434 if r0 == -1 && er != nil {
435 err = er
436 }
437 return
438 }
439
440 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
441
442 func Getsid(pid int) (sid int, err error) {
443 r0, er := C.getsid(C.int(pid))
444 sid = int(r0)
445 if r0 == -1 && er != nil {
446 err = er
447 }
448 return
449 }
450
451 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
452
453 func Kill(pid int, sig Signal) (err error) {
454 r0, er := C.kill(C.int(pid), C.int(sig))
455 if r0 == -1 && er != nil {
456 err = er
457 }
458 return
459 }
460
461 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
462
463 func Klogctl(typ int, buf []byte) (n int, err error) {
464 var _p0 *byte
465 if len(buf) > 0 {
466 _p0 = &buf[0]
467 }
468 var _p1 int
469 _p1 = len(buf)
470 r0, er := C.syslog(C.int(typ), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
471 n = int(r0)
472 if r0 == -1 && er != nil {
473 err = er
474 }
475 return
476 }
477
478 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
479
480 func Mkdir(dirfd int, path string, mode uint32) (err error) {
481 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
482 r0, er := C.mkdir(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode))
483 if r0 == -1 && er != nil {
484 err = er
485 }
486 return
487 }
488
489 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
490
491 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
492 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
493 r0, er := C.mkdirat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode))
494 if r0 == -1 && er != nil {
495 err = er
496 }
497 return
498 }
499
500 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
501
502 func Mkfifo(path string, mode uint32) (err error) {
503 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
504 r0, er := C.mkfifo(C.uintptr_t(_p0), C.uint(mode))
505 if r0 == -1 && er != nil {
506 err = er
507 }
508 return
509 }
510
511 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
512
513 func Mknod(path string, mode uint32, dev int) (err error) {
514 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
515 r0, er := C.mknod(C.uintptr_t(_p0), C.uint(mode), C.int(dev))
516 if r0 == -1 && er != nil {
517 err = er
518 }
519 return
520 }
521
522 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
523
524 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
525 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
526 r0, er := C.mknodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(dev))
527 if r0 == -1 && er != nil {
528 err = er
529 }
530 return
531 }
532
533 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
534
535 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
536 r0, er := C.nanosleep(C.uintptr_t(uintptr(unsafe.Pointer(time))), C.uintptr_t(uintptr(unsafe.Pointer(leftover))))
537 if r0 == -1 && er != nil {
538 err = er
539 }
540 return
541 }
542
543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
544
545 func Open(path string, mode int, perm uint32) (fd int, err error) {
546 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
547 r0, er := C.open64(C.uintptr_t(_p0), C.int(mode), C.uint(perm))
548 fd = int(r0)
549 if r0 == -1 && er != nil {
550 err = er
551 }
552 return
553 }
554
555 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
556
557 func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
558 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
559 r0, er := C.openat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.uint(mode))
560 fd = int(r0)
561 if r0 == -1 && er != nil {
562 err = er
563 }
564 return
565 }
566
567 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
568
569 func read(fd int, p []byte) (n int, err error) {
570 var _p0 *byte
571 if len(p) > 0 {
572 _p0 = &p[0]
573 }
574 var _p1 int
575 _p1 = len(p)
576 r0, er := C.read(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
577 n = int(r0)
578 if r0 == -1 && er != nil {
579 err = er
580 }
581 return
582 }
583
584 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
585
586 func Readlink(path string, buf []byte) (n int, err error) {
587 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
588 var _p1 *byte
589 if len(buf) > 0 {
590 _p1 = &buf[0]
591 }
592 var _p2 int
593 _p2 = len(buf)
594 r0, er := C.readlink(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(_p1))), C.size_t(_p2))
595 n = int(r0)
596 if r0 == -1 && er != nil {
597 err = er
598 }
599 return
600 }
601
602 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
603
604 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
605 _p0 := uintptr(unsafe.Pointer(C.CString(oldpath)))
606 _p1 := uintptr(unsafe.Pointer(C.CString(newpath)))
607 r0, er := C.renameat(C.int(olddirfd), C.uintptr_t(_p0), C.int(newdirfd), C.uintptr_t(_p1))
608 if r0 == -1 && er != nil {
609 err = er
610 }
611 return
612 }
613
614 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
615
616 func Setdomainname(p []byte) (err error) {
617 var _p0 *byte
618 if len(p) > 0 {
619 _p0 = &p[0]
620 }
621 var _p1 int
622 _p1 = len(p)
623 r0, er := C.setdomainname(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
624 if r0 == -1 && er != nil {
625 err = er
626 }
627 return
628 }
629
630 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
631
632 func Sethostname(p []byte) (err error) {
633 var _p0 *byte
634 if len(p) > 0 {
635 _p0 = &p[0]
636 }
637 var _p1 int
638 _p1 = len(p)
639 r0, er := C.sethostname(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
640 if r0 == -1 && er != nil {
641 err = er
642 }
643 return
644 }
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func Setpgid(pid int, pgid int) (err error) {
649 r0, er := C.setpgid(C.int(pid), C.int(pgid))
650 if r0 == -1 && er != nil {
651 err = er
652 }
653 return
654 }
655
656 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
657
658 func Setsid() (pid int, err error) {
659 r0, er := C.setsid()
660 pid = int(r0)
661 if r0 == -1 && er != nil {
662 err = er
663 }
664 return
665 }
666
667 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
668
669 func Settimeofday(tv *Timeval) (err error) {
670 r0, er := C.settimeofday(C.uintptr_t(uintptr(unsafe.Pointer(tv))))
671 if r0 == -1 && er != nil {
672 err = er
673 }
674 return
675 }
676
677 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
678
679 func Setuid(uid int) (err error) {
680 r0, er := C.setuid(C.int(uid))
681 if r0 == -1 && er != nil {
682 err = er
683 }
684 return
685 }
686
687 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
688
689 func Setgid(uid int) (err error) {
690 r0, er := C.setgid(C.int(uid))
691 if r0 == -1 && er != nil {
692 err = er
693 }
694 return
695 }
696
697 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
698
699 func Setpriority(which int, who int, prio int) (err error) {
700 r0, er := C.setpriority(C.int(which), C.int(who), C.int(prio))
701 if r0 == -1 && er != nil {
702 err = er
703 }
704 return
705 }
706
707 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
708
709 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
710 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
711 r0, er := C.statx(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.int(mask), C.uintptr_t(uintptr(unsafe.Pointer(stat))))
712 if r0 == -1 && er != nil {
713 err = er
714 }
715 return
716 }
717
718 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
719
720 func Sync() {
721 C.sync()
722 return
723 }
724
725 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
726
727 func Times(tms *Tms) (ticks uintptr, err error) {
728 r0, er := C.times(C.uintptr_t(uintptr(unsafe.Pointer(tms))))
729 ticks = uintptr(r0)
730 if uintptr(r0) == ^uintptr(0) && er != nil {
731 err = er
732 }
733 return
734 }
735
736 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
737
738 func Umask(mask int) (oldmask int) {
739 r0, _ := C.umask(C.int(mask))
740 oldmask = int(r0)
741 return
742 }
743
744 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
745
746 func Uname(buf *Utsname) (err error) {
747 r0, er := C.uname(C.uintptr_t(uintptr(unsafe.Pointer(buf))))
748 if r0 == -1 && er != nil {
749 err = er
750 }
751 return
752 }
753
754 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
755
756 func Unlink(path string) (err error) {
757 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
758 r0, er := C.unlink(C.uintptr_t(_p0))
759 if r0 == -1 && er != nil {
760 err = er
761 }
762 return
763 }
764
765 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
766
767 func Unlinkat(dirfd int, path string, flags int) (err error) {
768 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
769 r0, er := C.unlinkat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags))
770 if r0 == -1 && er != nil {
771 err = er
772 }
773 return
774 }
775
776 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
777
778 func Ustat(dev int, ubuf *Ustat_t) (err error) {
779 r0, er := C.ustat(C.int(dev), C.uintptr_t(uintptr(unsafe.Pointer(ubuf))))
780 if r0 == -1 && er != nil {
781 err = er
782 }
783 return
784 }
785
786 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
787
788 func write(fd int, p []byte) (n int, err error) {
789 var _p0 *byte
790 if len(p) > 0 {
791 _p0 = &p[0]
792 }
793 var _p1 int
794 _p1 = len(p)
795 r0, er := C.write(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
796 n = int(r0)
797 if r0 == -1 && er != nil {
798 err = er
799 }
800 return
801 }
802
803 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
804
805 func readlen(fd int, p *byte, np int) (n int, err error) {
806 r0, er := C.read(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(p))), C.size_t(np))
807 n = int(r0)
808 if r0 == -1 && er != nil {
809 err = er
810 }
811 return
812 }
813
814 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
815
816 func writelen(fd int, p *byte, np int) (n int, err error) {
817 r0, er := C.write(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(p))), C.size_t(np))
818 n = int(r0)
819 if r0 == -1 && er != nil {
820 err = er
821 }
822 return
823 }
824
825 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
826
827 func Dup2(oldfd int, newfd int) (err error) {
828 r0, er := C.dup2(C.int(oldfd), C.int(newfd))
829 if r0 == -1 && er != nil {
830 err = er
831 }
832 return
833 }
834
835 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
836
837 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
838 r0, er := C.posix_fadvise64(C.int(fd), C.longlong(offset), C.longlong(length), C.int(advice))
839 if r0 == -1 && er != nil {
840 err = er
841 }
842 return
843 }
844
845 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
846
847 func Fchown(fd int, uid int, gid int) (err error) {
848 r0, er := C.fchown(C.int(fd), C.int(uid), C.int(gid))
849 if r0 == -1 && er != nil {
850 err = er
851 }
852 return
853 }
854
855 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
856
857 func Fstat(fd int, stat *Stat_t) (err error) {
858 r0, er := C.fstat(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(stat))))
859 if r0 == -1 && er != nil {
860 err = er
861 }
862 return
863 }
864
865 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
866
867 func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
868 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
869 r0, er := C.fstatat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(stat))), C.int(flags))
870 if r0 == -1 && er != nil {
871 err = er
872 }
873 return
874 }
875
876 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
877
878 func Fstatfs(fd int, buf *Statfs_t) (err error) {
879 r0, er := C.fstatfs(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(buf))))
880 if r0 == -1 && er != nil {
881 err = er
882 }
883 return
884 }
885
886 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
887
888 func Ftruncate(fd int, length int64) (err error) {
889 r0, er := C.ftruncate(C.int(fd), C.longlong(length))
890 if r0 == -1 && er != nil {
891 err = er
892 }
893 return
894 }
895
896 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
897
898 func Getegid() (egid int) {
899 r0, _ := C.getegid()
900 egid = int(r0)
901 return
902 }
903
904 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
905
906 func Geteuid() (euid int) {
907 r0, _ := C.geteuid()
908 euid = int(r0)
909 return
910 }
911
912 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
913
914 func Getgid() (gid int) {
915 r0, _ := C.getgid()
916 gid = int(r0)
917 return
918 }
919
920 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
921
922 func Getuid() (uid int) {
923 r0, _ := C.getuid()
924 uid = int(r0)
925 return
926 }
927
928 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
929
930 func Lchown(path string, uid int, gid int) (err error) {
931 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
932 r0, er := C.lchown(C.uintptr_t(_p0), C.int(uid), C.int(gid))
933 if r0 == -1 && er != nil {
934 err = er
935 }
936 return
937 }
938
939 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
940
941 func Listen(s int, n int) (err error) {
942 r0, er := C.listen(C.int(s), C.int(n))
943 if r0 == -1 && er != nil {
944 err = er
945 }
946 return
947 }
948
949 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
950
951 func Lstat(path string, stat *Stat_t) (err error) {
952 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
953 r0, er := C.lstat(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(stat))))
954 if r0 == -1 && er != nil {
955 err = er
956 }
957 return
958 }
959
960 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
961
962 func Pause() (err error) {
963 r0, er := C.pause()
964 if r0 == -1 && er != nil {
965 err = er
966 }
967 return
968 }
969
970 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
971
972 func Pread(fd int, p []byte, offset int64) (n int, err error) {
973 var _p0 *byte
974 if len(p) > 0 {
975 _p0 = &p[0]
976 }
977 var _p1 int
978 _p1 = len(p)
979 r0, er := C.pread64(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.longlong(offset))
980 n = int(r0)
981 if r0 == -1 && er != nil {
982 err = er
983 }
984 return
985 }
986
987 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
988
989 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
990 var _p0 *byte
991 if len(p) > 0 {
992 _p0 = &p[0]
993 }
994 var _p1 int
995 _p1 = len(p)
996 r0, er := C.pwrite64(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.longlong(offset))
997 n = int(r0)
998 if r0 == -1 && er != nil {
999 err = er
1000 }
1001 return
1002 }
1003
1004 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1005
1006 func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
1007 r0, er := C.pselect(C.int(nfd), C.uintptr_t(uintptr(unsafe.Pointer(r))), C.uintptr_t(uintptr(unsafe.Pointer(w))), C.uintptr_t(uintptr(unsafe.Pointer(e))), C.uintptr_t(uintptr(unsafe.Pointer(timeout))), C.uintptr_t(uintptr(unsafe.Pointer(sigmask))))
1008 n = int(r0)
1009 if r0 == -1 && er != nil {
1010 err = er
1011 }
1012 return
1013 }
1014
1015 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1016
1017 func Setregid(rgid int, egid int) (err error) {
1018 r0, er := C.setregid(C.int(rgid), C.int(egid))
1019 if r0 == -1 && er != nil {
1020 err = er
1021 }
1022 return
1023 }
1024
1025 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1026
1027 func Setreuid(ruid int, euid int) (err error) {
1028 r0, er := C.setreuid(C.int(ruid), C.int(euid))
1029 if r0 == -1 && er != nil {
1030 err = er
1031 }
1032 return
1033 }
1034
1035 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1036
1037 func Shutdown(fd int, how int) (err error) {
1038 r0, er := C.shutdown(C.int(fd), C.int(how))
1039 if r0 == -1 && er != nil {
1040 err = er
1041 }
1042 return
1043 }
1044
1045 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1046
1047 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
1048 r0, er := C.splice(C.int(rfd), C.uintptr_t(uintptr(unsafe.Pointer(roff))), C.int(wfd), C.uintptr_t(uintptr(unsafe.Pointer(woff))), C.int(len), C.int(flags))
1049 n = int64(r0)
1050 if r0 == -1 && er != nil {
1051 err = er
1052 }
1053 return
1054 }
1055
1056 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1057
1058 func Stat(path string, stat *Stat_t) (err error) {
1059 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
1060 r0, er := C.stat(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(stat))))
1061 if r0 == -1 && er != nil {
1062 err = er
1063 }
1064 return
1065 }
1066
1067 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1068
1069 func Statfs(path string, buf *Statfs_t) (err error) {
1070 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
1071 r0, er := C.statfs(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(buf))))
1072 if r0 == -1 && er != nil {
1073 err = er
1074 }
1075 return
1076 }
1077
1078 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1079
1080 func Truncate(path string, length int64) (err error) {
1081 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
1082 r0, er := C.truncate(C.uintptr_t(_p0), C.longlong(length))
1083 if r0 == -1 && er != nil {
1084 err = er
1085 }
1086 return
1087 }
1088
1089 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1090
1091 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
1092 r0, er := C.bind(C.int(s), C.uintptr_t(uintptr(addr)), C.uintptr_t(uintptr(addrlen)))
1093 if r0 == -1 && er != nil {
1094 err = er
1095 }
1096 return
1097 }
1098
1099 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1100
1101 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
1102 r0, er := C.connect(C.int(s), C.uintptr_t(uintptr(addr)), C.uintptr_t(uintptr(addrlen)))
1103 if r0 == -1 && er != nil {
1104 err = er
1105 }
1106 return
1107 }
1108
1109 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1110
1111 func getgroups(n int, list *_Gid_t) (nn int, err error) {
1112 r0, er := C.getgroups(C.int(n), C.uintptr_t(uintptr(unsafe.Pointer(list))))
1113 nn = int(r0)
1114 if r0 == -1 && er != nil {
1115 err = er
1116 }
1117 return
1118 }
1119
1120 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1121
1122 func setgroups(n int, list *_Gid_t) (err error) {
1123 r0, er := C.setgroups(C.int(n), C.uintptr_t(uintptr(unsafe.Pointer(list))))
1124 if r0 == -1 && er != nil {
1125 err = er
1126 }
1127 return
1128 }
1129
1130 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1131
1132 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
1133 r0, er := C.getsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(uintptr(val)), C.uintptr_t(uintptr(unsafe.Pointer(vallen))))
1134 if r0 == -1 && er != nil {
1135 err = er
1136 }
1137 return
1138 }
1139
1140 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1141
1142 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
1143 r0, er := C.setsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(uintptr(val)), C.uintptr_t(vallen))
1144 if r0 == -1 && er != nil {
1145 err = er
1146 }
1147 return
1148 }
1149
1150 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1151
1152 func socket(domain int, typ int, proto int) (fd int, err error) {
1153 r0, er := C.socket(C.int(domain), C.int(typ), C.int(proto))
1154 fd = int(r0)
1155 if r0 == -1 && er != nil {
1156 err = er
1157 }
1158 return
1159 }
1160
1161 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1162
1163 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
1164 r0, er := C.socketpair(C.int(domain), C.int(typ), C.int(proto), C.uintptr_t(uintptr(unsafe.Pointer(fd))))
1165 if r0 == -1 && er != nil {
1166 err = er
1167 }
1168 return
1169 }
1170
1171 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1172
1173 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
1174 r0, er := C.getpeername(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen))))
1175 if r0 == -1 && er != nil {
1176 err = er
1177 }
1178 return
1179 }
1180
1181 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1182
1183 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
1184 r0, er := C.getsockname(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen))))
1185 if r0 == -1 && er != nil {
1186 err = er
1187 }
1188 return
1189 }
1190
1191 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1192
1193 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
1194 var _p0 *byte
1195 if len(p) > 0 {
1196 _p0 = &p[0]
1197 }
1198 var _p1 int
1199 _p1 = len(p)
1200 r0, er := C.recvfrom(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags), C.uintptr_t(uintptr(unsafe.Pointer(from))), C.uintptr_t(uintptr(unsafe.Pointer(fromlen))))
1201 n = int(r0)
1202 if r0 == -1 && er != nil {
1203 err = er
1204 }
1205 return
1206 }
1207
1208 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1209
1210 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
1211 var _p0 *byte
1212 if len(buf) > 0 {
1213 _p0 = &buf[0]
1214 }
1215 var _p1 int
1216 _p1 = len(buf)
1217 r0, er := C.sendto(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags), C.uintptr_t(uintptr(to)), C.uintptr_t(uintptr(addrlen)))
1218 if r0 == -1 && er != nil {
1219 err = er
1220 }
1221 return
1222 }
1223
1224 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1225
1226 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
1227 r0, er := C.recvmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags))
1228 n = int(r0)
1229 if r0 == -1 && er != nil {
1230 err = er
1231 }
1232 return
1233 }
1234
1235 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1236
1237 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
1238 r0, er := C.sendmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags))
1239 n = int(r0)
1240 if r0 == -1 && er != nil {
1241 err = er
1242 }
1243 return
1244 }
1245
1246 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1247
1248 func munmap(addr uintptr, length uintptr) (err error) {
1249 r0, er := C.munmap(C.uintptr_t(addr), C.uintptr_t(length))
1250 if r0 == -1 && er != nil {
1251 err = er
1252 }
1253 return
1254 }
1255
1256 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1257
1258 func Madvise(b []byte, advice int) (err error) {
1259 var _p0 *byte
1260 if len(b) > 0 {
1261 _p0 = &b[0]
1262 }
1263 var _p1 int
1264 _p1 = len(b)
1265 r0, er := C.madvise(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(advice))
1266 if r0 == -1 && er != nil {
1267 err = er
1268 }
1269 return
1270 }
1271
1272 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1273
1274 func Mprotect(b []byte, prot int) (err error) {
1275 var _p0 *byte
1276 if len(b) > 0 {
1277 _p0 = &b[0]
1278 }
1279 var _p1 int
1280 _p1 = len(b)
1281 r0, er := C.mprotect(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(prot))
1282 if r0 == -1 && er != nil {
1283 err = er
1284 }
1285 return
1286 }
1287
1288 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1289
1290 func Mlock(b []byte) (err error) {
1291 var _p0 *byte
1292 if len(b) > 0 {
1293 _p0 = &b[0]
1294 }
1295 var _p1 int
1296 _p1 = len(b)
1297 r0, er := C.mlock(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
1298 if r0 == -1 && er != nil {
1299 err = er
1300 }
1301 return
1302 }
1303
1304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1305
1306 func Mlockall(flags int) (err error) {
1307 r0, er := C.mlockall(C.int(flags))
1308 if r0 == -1 && er != nil {
1309 err = er
1310 }
1311 return
1312 }
1313
1314 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1315
1316 func Msync(b []byte, flags int) (err error) {
1317 var _p0 *byte
1318 if len(b) > 0 {
1319 _p0 = &b[0]
1320 }
1321 var _p1 int
1322 _p1 = len(b)
1323 r0, er := C.msync(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags))
1324 if r0 == -1 && er != nil {
1325 err = er
1326 }
1327 return
1328 }
1329
1330 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1331
1332 func Munlock(b []byte) (err error) {
1333 var _p0 *byte
1334 if len(b) > 0 {
1335 _p0 = &b[0]
1336 }
1337 var _p1 int
1338 _p1 = len(b)
1339 r0, er := C.munlock(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))
1340 if r0 == -1 && er != nil {
1341 err = er
1342 }
1343 return
1344 }
1345
1346 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1347
1348 func Munlockall() (err error) {
1349 r0, er := C.munlockall()
1350 if r0 == -1 && er != nil {
1351 err = er
1352 }
1353 return
1354 }
1355
1356 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1357
1358 func pipe(p *[2]_C_int) (err error) {
1359 r0, er := C.pipe(C.uintptr_t(uintptr(unsafe.Pointer(p))))
1360 if r0 == -1 && er != nil {
1361 err = er
1362 }
1363 return
1364 }
1365
1366 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1367
1368 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
1369 r0, er := C.poll(C.uintptr_t(uintptr(unsafe.Pointer(fds))), C.int(nfds), C.int(timeout))
1370 n = int(r0)
1371 if r0 == -1 && er != nil {
1372 err = er
1373 }
1374 return
1375 }
1376
1377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1378
1379 func gettimeofday(tv *Timeval, tzp *Timezone) (err error) {
1380 r0, er := C.gettimeofday(C.uintptr_t(uintptr(unsafe.Pointer(tv))), C.uintptr_t(uintptr(unsafe.Pointer(tzp))))
1381 if r0 == -1 && er != nil {
1382 err = er
1383 }
1384 return
1385 }
1386
1387 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1388
1389 func Time(t *Time_t) (tt Time_t, err error) {
1390 r0, er := C.time(C.uintptr_t(uintptr(unsafe.Pointer(t))))
1391 tt = Time_t(r0)
1392 if r0 == -1 && er != nil {
1393 err = er
1394 }
1395 return
1396 }
1397
1398 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1399
1400 func Utime(path string, buf *Utimbuf) (err error) {
1401 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
1402 r0, er := C.utime(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(buf))))
1403 if r0 == -1 && er != nil {
1404 err = er
1405 }
1406 return
1407 }
1408
1409 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1410
1411 func Getrlimit(resource int, rlim *Rlimit) (err error) {
1412 r0, er := C.getrlimit64(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim))))
1413 if r0 == -1 && er != nil {
1414 err = er
1415 }
1416 return
1417 }
1418
1419 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1420
1421 func Setrlimit(resource int, rlim *Rlimit) (err error) {
1422 r0, er := C.setrlimit64(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim))))
1423 if r0 == -1 && er != nil {
1424 err = er
1425 }
1426 return
1427 }
1428
1429 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1430
1431 func Seek(fd int, offset int64, whence int) (off int64, err error) {
1432 r0, er := C.lseek64(C.int(fd), C.longlong(offset), C.int(whence))
1433 off = int64(r0)
1434 if r0 == -1 && er != nil {
1435 err = er
1436 }
1437 return
1438 }
1439
1440 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1441
1442 func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
1443 r0, er := C.mmap(C.uintptr_t(addr), C.uintptr_t(length), C.int(prot), C.int(flags), C.int(fd), C.longlong(offset))
1444 xaddr = uintptr(r0)
1445 if uintptr(r0) == ^uintptr(0) && er != nil {
1446 err = er
1447 }
1448 return
1449 }
0 // mksyscall_aix_ppc64.pl -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build aix,ppc64
4
5 package unix
6
7 import (
8 "unsafe"
9 )
10
11 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12
13 func utimes(path string, times *[2]Timeval) (err error) {
14 var _p0 *byte
15 _p0, err = BytePtrFromString(path)
16 if err != nil {
17 return
18 }
19 _, e1 := callutimes(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
20 if e1 != 0 {
21 err = errnoErr(e1)
22 }
23 return
24 }
25
26 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
27
28 func utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) {
29 var _p0 *byte
30 _p0, err = BytePtrFromString(path)
31 if err != nil {
32 return
33 }
34 _, e1 := callutimensat(dirfd, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), flag)
35 if e1 != 0 {
36 err = errnoErr(e1)
37 }
38 return
39 }
40
41 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
42
43 func getcwd(buf []byte) (err error) {
44 var _p0 *byte
45 if len(buf) > 0 {
46 _p0 = &buf[0]
47 }
48 _, e1 := callgetcwd(uintptr(unsafe.Pointer(_p0)), len(buf))
49 if e1 != 0 {
50 err = errnoErr(e1)
51 }
52 return
53 }
54
55 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
56
57 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
58 r0, e1 := callaccept(s, uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
59 fd = int(r0)
60 if e1 != 0 {
61 err = errnoErr(e1)
62 }
63 return
64 }
65
66 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
67
68 func getdirent(fd int, buf []byte) (n int, err error) {
69 var _p0 *byte
70 if len(buf) > 0 {
71 _p0 = &buf[0]
72 }
73 r0, e1 := callgetdirent(fd, uintptr(unsafe.Pointer(_p0)), len(buf))
74 n = int(r0)
75 if e1 != 0 {
76 err = errnoErr(e1)
77 }
78 return
79 }
80
81 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
82
83 func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error) {
84 r0, e1 := callwait4(int(pid), uintptr(unsafe.Pointer(status)), options, uintptr(unsafe.Pointer(rusage)))
85 wpid = Pid_t(r0)
86 if e1 != 0 {
87 err = errnoErr(e1)
88 }
89 return
90 }
91
92 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
93
94 func ioctl(fd int, req uint, arg uintptr) (err error) {
95 _, e1 := callioctl(fd, int(req), arg)
96 if e1 != 0 {
97 err = errnoErr(e1)
98 }
99 return
100 }
101
102 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
103
104 func FcntlInt(fd uintptr, cmd int, arg int) (r int, err error) {
105 r0, e1 := callfcntl(fd, cmd, uintptr(arg))
106 r = int(r0)
107 if e1 != 0 {
108 err = errnoErr(e1)
109 }
110 return
111 }
112
113 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
114
115 func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) {
116 _, e1 := callfcntl(fd, cmd, uintptr(unsafe.Pointer(lk)))
117 if e1 != 0 {
118 err = errnoErr(e1)
119 }
120 return
121 }
122
123 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
124
125 func fcntl(fd int, cmd int, arg int) (val int, err error) {
126 r0, e1 := callfcntl(uintptr(fd), cmd, uintptr(arg))
127 val = int(r0)
128 if e1 != 0 {
129 err = errnoErr(e1)
130 }
131 return
132 }
133
134 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
135
136 func Acct(path string) (err error) {
137 var _p0 *byte
138 _p0, err = BytePtrFromString(path)
139 if err != nil {
140 return
141 }
142 _, e1 := callacct(uintptr(unsafe.Pointer(_p0)))
143 if e1 != 0 {
144 err = errnoErr(e1)
145 }
146 return
147 }
148
149 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
150
151 func Chdir(path string) (err error) {
152 var _p0 *byte
153 _p0, err = BytePtrFromString(path)
154 if err != nil {
155 return
156 }
157 _, e1 := callchdir(uintptr(unsafe.Pointer(_p0)))
158 if e1 != 0 {
159 err = errnoErr(e1)
160 }
161 return
162 }
163
164 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
165
166 func Chroot(path string) (err error) {
167 var _p0 *byte
168 _p0, err = BytePtrFromString(path)
169 if err != nil {
170 return
171 }
172 _, e1 := callchroot(uintptr(unsafe.Pointer(_p0)))
173 if e1 != 0 {
174 err = errnoErr(e1)
175 }
176 return
177 }
178
179 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
180
181 func Close(fd int) (err error) {
182 _, e1 := callclose(fd)
183 if e1 != 0 {
184 err = errnoErr(e1)
185 }
186 return
187 }
188
189 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
190
191 func Dup(oldfd int) (fd int, err error) {
192 r0, e1 := calldup(oldfd)
193 fd = int(r0)
194 if e1 != 0 {
195 err = errnoErr(e1)
196 }
197 return
198 }
199
200 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
201
202 func Exit(code int) {
203 callexit(code)
204 return
205 }
206
207 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
208
209 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
210 var _p0 *byte
211 _p0, err = BytePtrFromString(path)
212 if err != nil {
213 return
214 }
215 _, e1 := callfaccessat(dirfd, uintptr(unsafe.Pointer(_p0)), mode, flags)
216 if e1 != 0 {
217 err = errnoErr(e1)
218 }
219 return
220 }
221
222 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
223
224 func Fchdir(fd int) (err error) {
225 _, e1 := callfchdir(fd)
226 if e1 != 0 {
227 err = errnoErr(e1)
228 }
229 return
230 }
231
232 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
233
234 func Fchmod(fd int, mode uint32) (err error) {
235 _, e1 := callfchmod(fd, mode)
236 if e1 != 0 {
237 err = errnoErr(e1)
238 }
239 return
240 }
241
242 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
243
244 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
245 var _p0 *byte
246 _p0, err = BytePtrFromString(path)
247 if err != nil {
248 return
249 }
250 _, e1 := callfchmodat(dirfd, uintptr(unsafe.Pointer(_p0)), mode, flags)
251 if e1 != 0 {
252 err = errnoErr(e1)
253 }
254 return
255 }
256
257 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
258
259 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
260 var _p0 *byte
261 _p0, err = BytePtrFromString(path)
262 if err != nil {
263 return
264 }
265 _, e1 := callfchownat(dirfd, uintptr(unsafe.Pointer(_p0)), uid, gid, flags)
266 if e1 != 0 {
267 err = errnoErr(e1)
268 }
269 return
270 }
271
272 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
273
274 func Fdatasync(fd int) (err error) {
275 _, e1 := callfdatasync(fd)
276 if e1 != 0 {
277 err = errnoErr(e1)
278 }
279 return
280 }
281
282 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
283
284 func Fsync(fd int) (err error) {
285 _, e1 := callfsync(fd)
286 if e1 != 0 {
287 err = errnoErr(e1)
288 }
289 return
290 }
291
292 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
293
294 func Getpgid(pid int) (pgid int, err error) {
295 r0, e1 := callgetpgid(pid)
296 pgid = int(r0)
297 if e1 != 0 {
298 err = errnoErr(e1)
299 }
300 return
301 }
302
303 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
304
305 func Getpgrp() (pid int) {
306 r0, _ := callgetpgrp()
307 pid = int(r0)
308 return
309 }
310
311 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
312
313 func Getpid() (pid int) {
314 r0, _ := callgetpid()
315 pid = int(r0)
316 return
317 }
318
319 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
320
321 func Getppid() (ppid int) {
322 r0, _ := callgetppid()
323 ppid = int(r0)
324 return
325 }
326
327 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
328
329 func Getpriority(which int, who int) (prio int, err error) {
330 r0, e1 := callgetpriority(which, who)
331 prio = int(r0)
332 if e1 != 0 {
333 err = errnoErr(e1)
334 }
335 return
336 }
337
338 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
339
340 func Getrusage(who int, rusage *Rusage) (err error) {
341 _, e1 := callgetrusage(who, uintptr(unsafe.Pointer(rusage)))
342 if e1 != 0 {
343 err = errnoErr(e1)
344 }
345 return
346 }
347
348 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
349
350 func Getsid(pid int) (sid int, err error) {
351 r0, e1 := callgetsid(pid)
352 sid = int(r0)
353 if e1 != 0 {
354 err = errnoErr(e1)
355 }
356 return
357 }
358
359 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
360
361 func Kill(pid int, sig Signal) (err error) {
362 _, e1 := callkill(pid, int(sig))
363 if e1 != 0 {
364 err = errnoErr(e1)
365 }
366 return
367 }
368
369 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
370
371 func Klogctl(typ int, buf []byte) (n int, err error) {
372 var _p0 *byte
373 if len(buf) > 0 {
374 _p0 = &buf[0]
375 }
376 r0, e1 := callsyslog(typ, uintptr(unsafe.Pointer(_p0)), len(buf))
377 n = int(r0)
378 if e1 != 0 {
379 err = errnoErr(e1)
380 }
381 return
382 }
383
384 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
385
386 func Mkdir(dirfd int, path string, mode uint32) (err error) {
387 var _p0 *byte
388 _p0, err = BytePtrFromString(path)
389 if err != nil {
390 return
391 }
392 _, e1 := callmkdir(dirfd, uintptr(unsafe.Pointer(_p0)), mode)
393 if e1 != 0 {
394 err = errnoErr(e1)
395 }
396 return
397 }
398
399 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
400
401 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
402 var _p0 *byte
403 _p0, err = BytePtrFromString(path)
404 if err != nil {
405 return
406 }
407 _, e1 := callmkdirat(dirfd, uintptr(unsafe.Pointer(_p0)), mode)
408 if e1 != 0 {
409 err = errnoErr(e1)
410 }
411 return
412 }
413
414 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
415
416 func Mkfifo(path string, mode uint32) (err error) {
417 var _p0 *byte
418 _p0, err = BytePtrFromString(path)
419 if err != nil {
420 return
421 }
422 _, e1 := callmkfifo(uintptr(unsafe.Pointer(_p0)), mode)
423 if e1 != 0 {
424 err = errnoErr(e1)
425 }
426 return
427 }
428
429 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
430
431 func Mknod(path string, mode uint32, dev int) (err error) {
432 var _p0 *byte
433 _p0, err = BytePtrFromString(path)
434 if err != nil {
435 return
436 }
437 _, e1 := callmknod(uintptr(unsafe.Pointer(_p0)), mode, dev)
438 if e1 != 0 {
439 err = errnoErr(e1)
440 }
441 return
442 }
443
444 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
445
446 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
447 var _p0 *byte
448 _p0, err = BytePtrFromString(path)
449 if err != nil {
450 return
451 }
452 _, e1 := callmknodat(dirfd, uintptr(unsafe.Pointer(_p0)), mode, dev)
453 if e1 != 0 {
454 err = errnoErr(e1)
455 }
456 return
457 }
458
459 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
460
461 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
462 _, e1 := callnanosleep(uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)))
463 if e1 != 0 {
464 err = errnoErr(e1)
465 }
466 return
467 }
468
469 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
470
471 func Open(path string, mode int, perm uint32) (fd int, err error) {
472 var _p0 *byte
473 _p0, err = BytePtrFromString(path)
474 if err != nil {
475 return
476 }
477 r0, e1 := callopen64(uintptr(unsafe.Pointer(_p0)), mode, perm)
478 fd = int(r0)
479 if e1 != 0 {
480 err = errnoErr(e1)
481 }
482 return
483 }
484
485 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
486
487 func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
488 var _p0 *byte
489 _p0, err = BytePtrFromString(path)
490 if err != nil {
491 return
492 }
493 r0, e1 := callopenat(dirfd, uintptr(unsafe.Pointer(_p0)), flags, mode)
494 fd = int(r0)
495 if e1 != 0 {
496 err = errnoErr(e1)
497 }
498 return
499 }
500
501 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
502
503 func read(fd int, p []byte) (n int, err error) {
504 var _p0 *byte
505 if len(p) > 0 {
506 _p0 = &p[0]
507 }
508 r0, e1 := callread(fd, uintptr(unsafe.Pointer(_p0)), len(p))
509 n = int(r0)
510 if e1 != 0 {
511 err = errnoErr(e1)
512 }
513 return
514 }
515
516 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
517
518 func Readlink(path string, buf []byte) (n int, err error) {
519 var _p0 *byte
520 _p0, err = BytePtrFromString(path)
521 if err != nil {
522 return
523 }
524 var _p1 *byte
525 if len(buf) > 0 {
526 _p1 = &buf[0]
527 }
528 r0, e1 := callreadlink(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), len(buf))
529 n = int(r0)
530 if e1 != 0 {
531 err = errnoErr(e1)
532 }
533 return
534 }
535
536 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
537
538 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
539 var _p0 *byte
540 _p0, err = BytePtrFromString(oldpath)
541 if err != nil {
542 return
543 }
544 var _p1 *byte
545 _p1, err = BytePtrFromString(newpath)
546 if err != nil {
547 return
548 }
549 _, e1 := callrenameat(olddirfd, uintptr(unsafe.Pointer(_p0)), newdirfd, uintptr(unsafe.Pointer(_p1)))
550 if e1 != 0 {
551 err = errnoErr(e1)
552 }
553 return
554 }
555
556 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
557
558 func Setdomainname(p []byte) (err error) {
559 var _p0 *byte
560 if len(p) > 0 {
561 _p0 = &p[0]
562 }
563 _, e1 := callsetdomainname(uintptr(unsafe.Pointer(_p0)), len(p))
564 if e1 != 0 {
565 err = errnoErr(e1)
566 }
567 return
568 }
569
570 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
571
572 func Sethostname(p []byte) (err error) {
573 var _p0 *byte
574 if len(p) > 0 {
575 _p0 = &p[0]
576 }
577 _, e1 := callsethostname(uintptr(unsafe.Pointer(_p0)), len(p))
578 if e1 != 0 {
579 err = errnoErr(e1)
580 }
581 return
582 }
583
584 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
585
586 func Setpgid(pid int, pgid int) (err error) {
587 _, e1 := callsetpgid(pid, pgid)
588 if e1 != 0 {
589 err = errnoErr(e1)
590 }
591 return
592 }
593
594 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
595
596 func Setsid() (pid int, err error) {
597 r0, e1 := callsetsid()
598 pid = int(r0)
599 if e1 != 0 {
600 err = errnoErr(e1)
601 }
602 return
603 }
604
605 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
606
607 func Settimeofday(tv *Timeval) (err error) {
608 _, e1 := callsettimeofday(uintptr(unsafe.Pointer(tv)))
609 if e1 != 0 {
610 err = errnoErr(e1)
611 }
612 return
613 }
614
615 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
616
617 func Setuid(uid int) (err error) {
618 _, e1 := callsetuid(uid)
619 if e1 != 0 {
620 err = errnoErr(e1)
621 }
622 return
623 }
624
625 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
626
627 func Setgid(uid int) (err error) {
628 _, e1 := callsetgid(uid)
629 if e1 != 0 {
630 err = errnoErr(e1)
631 }
632 return
633 }
634
635 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
636
637 func Setpriority(which int, who int, prio int) (err error) {
638 _, e1 := callsetpriority(which, who, prio)
639 if e1 != 0 {
640 err = errnoErr(e1)
641 }
642 return
643 }
644
645 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
646
647 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
648 var _p0 *byte
649 _p0, err = BytePtrFromString(path)
650 if err != nil {
651 return
652 }
653 _, e1 := callstatx(dirfd, uintptr(unsafe.Pointer(_p0)), flags, mask, uintptr(unsafe.Pointer(stat)))
654 if e1 != 0 {
655 err = errnoErr(e1)
656 }
657 return
658 }
659
660 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
661
662 func Sync() {
663 callsync()
664 return
665 }
666
667 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
668
669 func Times(tms *Tms) (ticks uintptr, err error) {
670 r0, e1 := calltimes(uintptr(unsafe.Pointer(tms)))
671 ticks = uintptr(r0)
672 if e1 != 0 {
673 err = errnoErr(e1)
674 }
675 return
676 }
677
678 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
679
680 func Umask(mask int) (oldmask int) {
681 r0, _ := callumask(mask)
682 oldmask = int(r0)
683 return
684 }
685
686 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
687
688 func Uname(buf *Utsname) (err error) {
689 _, e1 := calluname(uintptr(unsafe.Pointer(buf)))
690 if e1 != 0 {
691 err = errnoErr(e1)
692 }
693 return
694 }
695
696 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
697
698 func Unlink(path string) (err error) {
699 var _p0 *byte
700 _p0, err = BytePtrFromString(path)
701 if err != nil {
702 return
703 }
704 _, e1 := callunlink(uintptr(unsafe.Pointer(_p0)))
705 if e1 != 0 {
706 err = errnoErr(e1)
707 }
708 return
709 }
710
711 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
712
713 func Unlinkat(dirfd int, path string, flags int) (err error) {
714 var _p0 *byte
715 _p0, err = BytePtrFromString(path)
716 if err != nil {
717 return
718 }
719 _, e1 := callunlinkat(dirfd, uintptr(unsafe.Pointer(_p0)), flags)
720 if e1 != 0 {
721 err = errnoErr(e1)
722 }
723 return
724 }
725
726 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
727
728 func Ustat(dev int, ubuf *Ustat_t) (err error) {
729 _, e1 := callustat(dev, uintptr(unsafe.Pointer(ubuf)))
730 if e1 != 0 {
731 err = errnoErr(e1)
732 }
733 return
734 }
735
736 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
737
738 func write(fd int, p []byte) (n int, err error) {
739 var _p0 *byte
740 if len(p) > 0 {
741 _p0 = &p[0]
742 }
743 r0, e1 := callwrite(fd, uintptr(unsafe.Pointer(_p0)), len(p))
744 n = int(r0)
745 if e1 != 0 {
746 err = errnoErr(e1)
747 }
748 return
749 }
750
751 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
752
753 func readlen(fd int, p *byte, np int) (n int, err error) {
754 r0, e1 := callread(fd, uintptr(unsafe.Pointer(p)), np)
755 n = int(r0)
756 if e1 != 0 {
757 err = errnoErr(e1)
758 }
759 return
760 }
761
762 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
763
764 func writelen(fd int, p *byte, np int) (n int, err error) {
765 r0, e1 := callwrite(fd, uintptr(unsafe.Pointer(p)), np)
766 n = int(r0)
767 if e1 != 0 {
768 err = errnoErr(e1)
769 }
770 return
771 }
772
773 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
774
775 func Dup2(oldfd int, newfd int) (err error) {
776 _, e1 := calldup2(oldfd, newfd)
777 if e1 != 0 {
778 err = errnoErr(e1)
779 }
780 return
781 }
782
783 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
784
785 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
786 _, e1 := callposix_fadvise64(fd, offset, length, advice)
787 if e1 != 0 {
788 err = errnoErr(e1)
789 }
790 return
791 }
792
793 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
794
795 func Fchown(fd int, uid int, gid int) (err error) {
796 _, e1 := callfchown(fd, uid, gid)
797 if e1 != 0 {
798 err = errnoErr(e1)
799 }
800 return
801 }
802
803 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
804
805 func Fstat(fd int, stat *Stat_t) (err error) {
806 _, e1 := callfstat(fd, uintptr(unsafe.Pointer(stat)))
807 if e1 != 0 {
808 err = errnoErr(e1)
809 }
810 return
811 }
812
813 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
814
815 func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
816 var _p0 *byte
817 _p0, err = BytePtrFromString(path)
818 if err != nil {
819 return
820 }
821 _, e1 := callfstatat(dirfd, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), flags)
822 if e1 != 0 {
823 err = errnoErr(e1)
824 }
825 return
826 }
827
828 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
829
830 func Fstatfs(fd int, buf *Statfs_t) (err error) {
831 _, e1 := callfstatfs(fd, uintptr(unsafe.Pointer(buf)))
832 if e1 != 0 {
833 err = errnoErr(e1)
834 }
835 return
836 }
837
838 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
839
840 func Ftruncate(fd int, length int64) (err error) {
841 _, e1 := callftruncate(fd, length)
842 if e1 != 0 {
843 err = errnoErr(e1)
844 }
845 return
846 }
847
848 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
849
850 func Getegid() (egid int) {
851 r0, _ := callgetegid()
852 egid = int(r0)
853 return
854 }
855
856 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
857
858 func Geteuid() (euid int) {
859 r0, _ := callgeteuid()
860 euid = int(r0)
861 return
862 }
863
864 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
865
866 func Getgid() (gid int) {
867 r0, _ := callgetgid()
868 gid = int(r0)
869 return
870 }
871
872 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
873
874 func Getuid() (uid int) {
875 r0, _ := callgetuid()
876 uid = int(r0)
877 return
878 }
879
880 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
881
882 func Lchown(path string, uid int, gid int) (err error) {
883 var _p0 *byte
884 _p0, err = BytePtrFromString(path)
885 if err != nil {
886 return
887 }
888 _, e1 := calllchown(uintptr(unsafe.Pointer(_p0)), uid, gid)
889 if e1 != 0 {
890 err = errnoErr(e1)
891 }
892 return
893 }
894
895 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
896
897 func Listen(s int, n int) (err error) {
898 _, e1 := calllisten(s, n)
899 if e1 != 0 {
900 err = errnoErr(e1)
901 }
902 return
903 }
904
905 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
906
907 func Lstat(path string, stat *Stat_t) (err error) {
908 var _p0 *byte
909 _p0, err = BytePtrFromString(path)
910 if err != nil {
911 return
912 }
913 _, e1 := calllstat(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)))
914 if e1 != 0 {
915 err = errnoErr(e1)
916 }
917 return
918 }
919
920 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
921
922 func Pause() (err error) {
923 _, e1 := callpause()
924 if e1 != 0 {
925 err = errnoErr(e1)
926 }
927 return
928 }
929
930 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
931
932 func Pread(fd int, p []byte, offset int64) (n int, err error) {
933 var _p0 *byte
934 if len(p) > 0 {
935 _p0 = &p[0]
936 }
937 r0, e1 := callpread64(fd, uintptr(unsafe.Pointer(_p0)), len(p), offset)
938 n = int(r0)
939 if e1 != 0 {
940 err = errnoErr(e1)
941 }
942 return
943 }
944
945 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
946
947 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
948 var _p0 *byte
949 if len(p) > 0 {
950 _p0 = &p[0]
951 }
952 r0, e1 := callpwrite64(fd, uintptr(unsafe.Pointer(_p0)), len(p), offset)
953 n = int(r0)
954 if e1 != 0 {
955 err = errnoErr(e1)
956 }
957 return
958 }
959
960 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
961
962 func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
963 r0, e1 := callpselect(nfd, uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
964 n = int(r0)
965 if e1 != 0 {
966 err = errnoErr(e1)
967 }
968 return
969 }
970
971 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
972
973 func Setregid(rgid int, egid int) (err error) {
974 _, e1 := callsetregid(rgid, egid)
975 if e1 != 0 {
976 err = errnoErr(e1)
977 }
978 return
979 }
980
981 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
982
983 func Setreuid(ruid int, euid int) (err error) {
984 _, e1 := callsetreuid(ruid, euid)
985 if e1 != 0 {
986 err = errnoErr(e1)
987 }
988 return
989 }
990
991 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
992
993 func Shutdown(fd int, how int) (err error) {
994 _, e1 := callshutdown(fd, how)
995 if e1 != 0 {
996 err = errnoErr(e1)
997 }
998 return
999 }
1000
1001 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1002
1003 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
1004 r0, e1 := callsplice(rfd, uintptr(unsafe.Pointer(roff)), wfd, uintptr(unsafe.Pointer(woff)), len, flags)
1005 n = int64(r0)
1006 if e1 != 0 {
1007 err = errnoErr(e1)
1008 }
1009 return
1010 }
1011
1012 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1013
1014 func Stat(path string, stat *Stat_t) (err error) {
1015 var _p0 *byte
1016 _p0, err = BytePtrFromString(path)
1017 if err != nil {
1018 return
1019 }
1020 _, e1 := callstat(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)))
1021 if e1 != 0 {
1022 err = errnoErr(e1)
1023 }
1024 return
1025 }
1026
1027 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1028
1029 func Statfs(path string, buf *Statfs_t) (err error) {
1030 var _p0 *byte
1031 _p0, err = BytePtrFromString(path)
1032 if err != nil {
1033 return
1034 }
1035 _, e1 := callstatfs(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)))
1036 if e1 != 0 {
1037 err = errnoErr(e1)
1038 }
1039 return
1040 }
1041
1042 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1043
1044 func Truncate(path string, length int64) (err error) {
1045 var _p0 *byte
1046 _p0, err = BytePtrFromString(path)
1047 if err != nil {
1048 return
1049 }
1050 _, e1 := calltruncate(uintptr(unsafe.Pointer(_p0)), length)
1051 if e1 != 0 {
1052 err = errnoErr(e1)
1053 }
1054 return
1055 }
1056
1057 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1058
1059 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
1060 _, e1 := callbind(s, uintptr(addr), uintptr(addrlen))
1061 if e1 != 0 {
1062 err = errnoErr(e1)
1063 }
1064 return
1065 }
1066
1067 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1068
1069 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
1070 _, e1 := callconnect(s, uintptr(addr), uintptr(addrlen))
1071 if e1 != 0 {
1072 err = errnoErr(e1)
1073 }
1074 return
1075 }
1076
1077 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1078
1079 func getgroups(n int, list *_Gid_t) (nn int, err error) {
1080 r0, e1 := callgetgroups(n, uintptr(unsafe.Pointer(list)))
1081 nn = int(r0)
1082 if e1 != 0 {
1083 err = errnoErr(e1)
1084 }
1085 return
1086 }
1087
1088 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1089
1090 func setgroups(n int, list *_Gid_t) (err error) {
1091 _, e1 := callsetgroups(n, uintptr(unsafe.Pointer(list)))
1092 if e1 != 0 {
1093 err = errnoErr(e1)
1094 }
1095 return
1096 }
1097
1098 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1099
1100 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
1101 _, e1 := callgetsockopt(s, level, name, uintptr(val), uintptr(unsafe.Pointer(vallen)))
1102 if e1 != 0 {
1103 err = errnoErr(e1)
1104 }
1105 return
1106 }
1107
1108 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1109
1110 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
1111 _, e1 := callsetsockopt(s, level, name, uintptr(val), vallen)
1112 if e1 != 0 {
1113 err = errnoErr(e1)
1114 }
1115 return
1116 }
1117
1118 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1119
1120 func socket(domain int, typ int, proto int) (fd int, err error) {
1121 r0, e1 := callsocket(domain, typ, proto)
1122 fd = int(r0)
1123 if e1 != 0 {
1124 err = errnoErr(e1)
1125 }
1126 return
1127 }
1128
1129 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1130
1131 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
1132 _, e1 := callsocketpair(domain, typ, proto, uintptr(unsafe.Pointer(fd)))
1133 if e1 != 0 {
1134 err = errnoErr(e1)
1135 }
1136 return
1137 }
1138
1139 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1140
1141 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
1142 _, e1 := callgetpeername(fd, uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
1143 if e1 != 0 {
1144 err = errnoErr(e1)
1145 }
1146 return
1147 }
1148
1149 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1150
1151 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
1152 _, e1 := callgetsockname(fd, uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
1153 if e1 != 0 {
1154 err = errnoErr(e1)
1155 }
1156 return
1157 }
1158
1159 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1160
1161 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
1162 var _p0 *byte
1163 if len(p) > 0 {
1164 _p0 = &p[0]
1165 }
1166 r0, e1 := callrecvfrom(fd, uintptr(unsafe.Pointer(_p0)), len(p), flags, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
1167 n = int(r0)
1168 if e1 != 0 {
1169 err = errnoErr(e1)
1170 }
1171 return
1172 }
1173
1174 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1175
1176 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
1177 var _p0 *byte
1178 if len(buf) > 0 {
1179 _p0 = &buf[0]
1180 }
1181 _, e1 := callsendto(s, uintptr(unsafe.Pointer(_p0)), len(buf), flags, uintptr(to), uintptr(addrlen))
1182 if e1 != 0 {
1183 err = errnoErr(e1)
1184 }
1185 return
1186 }
1187
1188 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1189
1190 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
1191 r0, e1 := callrecvmsg(s, uintptr(unsafe.Pointer(msg)), flags)
1192 n = int(r0)
1193 if e1 != 0 {
1194 err = errnoErr(e1)
1195 }
1196 return
1197 }
1198
1199 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1200
1201 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
1202 r0, e1 := callsendmsg(s, uintptr(unsafe.Pointer(msg)), flags)
1203 n = int(r0)
1204 if e1 != 0 {
1205 err = errnoErr(e1)
1206 }
1207 return
1208 }
1209
1210 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1211
1212 func munmap(addr uintptr, length uintptr) (err error) {
1213 _, e1 := callmunmap(addr, length)
1214 if e1 != 0 {
1215 err = errnoErr(e1)
1216 }
1217 return
1218 }
1219
1220 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1221
1222 func Madvise(b []byte, advice int) (err error) {
1223 var _p0 *byte
1224 if len(b) > 0 {
1225 _p0 = &b[0]
1226 }
1227 _, e1 := callmadvise(uintptr(unsafe.Pointer(_p0)), len(b), advice)
1228 if e1 != 0 {
1229 err = errnoErr(e1)
1230 }
1231 return
1232 }
1233
1234 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1235
1236 func Mprotect(b []byte, prot int) (err error) {
1237 var _p0 *byte
1238 if len(b) > 0 {
1239 _p0 = &b[0]
1240 }
1241 _, e1 := callmprotect(uintptr(unsafe.Pointer(_p0)), len(b), prot)
1242 if e1 != 0 {
1243 err = errnoErr(e1)
1244 }
1245 return
1246 }
1247
1248 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1249
1250 func Mlock(b []byte) (err error) {
1251 var _p0 *byte
1252 if len(b) > 0 {
1253 _p0 = &b[0]
1254 }
1255 _, e1 := callmlock(uintptr(unsafe.Pointer(_p0)), len(b))
1256 if e1 != 0 {
1257 err = errnoErr(e1)
1258 }
1259 return
1260 }
1261
1262 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1263
1264 func Mlockall(flags int) (err error) {
1265 _, e1 := callmlockall(flags)
1266 if e1 != 0 {
1267 err = errnoErr(e1)
1268 }
1269 return
1270 }
1271
1272 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1273
1274 func Msync(b []byte, flags int) (err error) {
1275 var _p0 *byte
1276 if len(b) > 0 {
1277 _p0 = &b[0]
1278 }
1279 _, e1 := callmsync(uintptr(unsafe.Pointer(_p0)), len(b), flags)
1280 if e1 != 0 {
1281 err = errnoErr(e1)
1282 }
1283 return
1284 }
1285
1286 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1287
1288 func Munlock(b []byte) (err error) {
1289 var _p0 *byte
1290 if len(b) > 0 {
1291 _p0 = &b[0]
1292 }
1293 _, e1 := callmunlock(uintptr(unsafe.Pointer(_p0)), len(b))
1294 if e1 != 0 {
1295 err = errnoErr(e1)
1296 }
1297 return
1298 }
1299
1300 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1301
1302 func Munlockall() (err error) {
1303 _, e1 := callmunlockall()
1304 if e1 != 0 {
1305 err = errnoErr(e1)
1306 }
1307 return
1308 }
1309
1310 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1311
1312 func pipe(p *[2]_C_int) (err error) {
1313 _, e1 := callpipe(uintptr(unsafe.Pointer(p)))
1314 if e1 != 0 {
1315 err = errnoErr(e1)
1316 }
1317 return
1318 }
1319
1320 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1321
1322 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
1323 r0, e1 := callpoll(uintptr(unsafe.Pointer(fds)), nfds, timeout)
1324 n = int(r0)
1325 if e1 != 0 {
1326 err = errnoErr(e1)
1327 }
1328 return
1329 }
1330
1331 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1332
1333 func gettimeofday(tv *Timeval, tzp *Timezone) (err error) {
1334 _, e1 := callgettimeofday(uintptr(unsafe.Pointer(tv)), uintptr(unsafe.Pointer(tzp)))
1335 if e1 != 0 {
1336 err = errnoErr(e1)
1337 }
1338 return
1339 }
1340
1341 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1342
1343 func Time(t *Time_t) (tt Time_t, err error) {
1344 r0, e1 := calltime(uintptr(unsafe.Pointer(t)))
1345 tt = Time_t(r0)
1346 if e1 != 0 {
1347 err = errnoErr(e1)
1348 }
1349 return
1350 }
1351
1352 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1353
1354 func Utime(path string, buf *Utimbuf) (err error) {
1355 var _p0 *byte
1356 _p0, err = BytePtrFromString(path)
1357 if err != nil {
1358 return
1359 }
1360 _, e1 := callutime(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)))
1361 if e1 != 0 {
1362 err = errnoErr(e1)
1363 }
1364 return
1365 }
1366
1367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1368
1369 func Getrlimit(resource int, rlim *Rlimit) (err error) {
1370 _, e1 := callgetrlimit(resource, uintptr(unsafe.Pointer(rlim)))
1371 if e1 != 0 {
1372 err = errnoErr(e1)
1373 }
1374 return
1375 }
1376
1377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1378
1379 func Setrlimit(resource int, rlim *Rlimit) (err error) {
1380 _, e1 := callsetrlimit(resource, uintptr(unsafe.Pointer(rlim)))
1381 if e1 != 0 {
1382 err = errnoErr(e1)
1383 }
1384 return
1385 }
1386
1387 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1388
1389 func Seek(fd int, offset int64, whence int) (off int64, err error) {
1390 r0, e1 := calllseek(fd, offset, whence)
1391 off = int64(r0)
1392 if e1 != 0 {
1393 err = errnoErr(e1)
1394 }
1395 return
1396 }
1397
1398 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1399
1400 func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
1401 r0, e1 := callmmap64(addr, length, prot, flags, fd, offset)
1402 xaddr = uintptr(r0)
1403 if e1 != 0 {
1404 err = errnoErr(e1)
1405 }
1406 return
1407 }
0 // mksyscall_aix_ppc64.pl -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build aix,ppc64
4 // +build !gccgo
5
6 package unix
7
8 import (
9 "unsafe"
10 )
11
12 //go:cgo_import_dynamic libc_utimes utimes "libc.a/shr_64.o"
13 //go:cgo_import_dynamic libc_utimensat utimensat "libc.a/shr_64.o"
14 //go:cgo_import_dynamic libc_getcwd getcwd "libc.a/shr_64.o"
15 //go:cgo_import_dynamic libc_accept accept "libc.a/shr_64.o"
16 //go:cgo_import_dynamic libc_getdirent getdirent "libc.a/shr_64.o"
17 //go:cgo_import_dynamic libc_wait4 wait4 "libc.a/shr_64.o"
18 //go:cgo_import_dynamic libc_ioctl ioctl "libc.a/shr_64.o"
19 //go:cgo_import_dynamic libc_fcntl fcntl "libc.a/shr_64.o"
20 //go:cgo_import_dynamic libc_acct acct "libc.a/shr_64.o"
21 //go:cgo_import_dynamic libc_chdir chdir "libc.a/shr_64.o"
22 //go:cgo_import_dynamic libc_chroot chroot "libc.a/shr_64.o"
23 //go:cgo_import_dynamic libc_close close "libc.a/shr_64.o"
24 //go:cgo_import_dynamic libc_dup dup "libc.a/shr_64.o"
25 //go:cgo_import_dynamic libc_exit exit "libc.a/shr_64.o"
26 //go:cgo_import_dynamic libc_faccessat faccessat "libc.a/shr_64.o"
27 //go:cgo_import_dynamic libc_fchdir fchdir "libc.a/shr_64.o"
28 //go:cgo_import_dynamic libc_fchmod fchmod "libc.a/shr_64.o"
29 //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.a/shr_64.o"
30 //go:cgo_import_dynamic libc_fchownat fchownat "libc.a/shr_64.o"
31 //go:cgo_import_dynamic libc_fdatasync fdatasync "libc.a/shr_64.o"
32 //go:cgo_import_dynamic libc_fsync fsync "libc.a/shr_64.o"
33 //go:cgo_import_dynamic libc_getpgid getpgid "libc.a/shr_64.o"
34 //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.a/shr_64.o"
35 //go:cgo_import_dynamic libc_getpid getpid "libc.a/shr_64.o"
36 //go:cgo_import_dynamic libc_getppid getppid "libc.a/shr_64.o"
37 //go:cgo_import_dynamic libc_getpriority getpriority "libc.a/shr_64.o"
38 //go:cgo_import_dynamic libc_getrusage getrusage "libc.a/shr_64.o"
39 //go:cgo_import_dynamic libc_getsid getsid "libc.a/shr_64.o"
40 //go:cgo_import_dynamic libc_kill kill "libc.a/shr_64.o"
41 //go:cgo_import_dynamic libc_syslog syslog "libc.a/shr_64.o"
42 //go:cgo_import_dynamic libc_mkdir mkdir "libc.a/shr_64.o"
43 //go:cgo_import_dynamic libc_mkdirat mkdirat "libc.a/shr_64.o"
44 //go:cgo_import_dynamic libc_mkfifo mkfifo "libc.a/shr_64.o"
45 //go:cgo_import_dynamic libc_mknod mknod "libc.a/shr_64.o"
46 //go:cgo_import_dynamic libc_mknodat mknodat "libc.a/shr_64.o"
47 //go:cgo_import_dynamic libc_nanosleep nanosleep "libc.a/shr_64.o"
48 //go:cgo_import_dynamic libc_open64 open64 "libc.a/shr_64.o"
49 //go:cgo_import_dynamic libc_openat openat "libc.a/shr_64.o"
50 //go:cgo_import_dynamic libc_read read "libc.a/shr_64.o"
51 //go:cgo_import_dynamic libc_readlink readlink "libc.a/shr_64.o"
52 //go:cgo_import_dynamic libc_renameat renameat "libc.a/shr_64.o"
53 //go:cgo_import_dynamic libc_setdomainname setdomainname "libc.a/shr_64.o"
54 //go:cgo_import_dynamic libc_sethostname sethostname "libc.a/shr_64.o"
55 //go:cgo_import_dynamic libc_setpgid setpgid "libc.a/shr_64.o"
56 //go:cgo_import_dynamic libc_setsid setsid "libc.a/shr_64.o"
57 //go:cgo_import_dynamic libc_settimeofday settimeofday "libc.a/shr_64.o"
58 //go:cgo_import_dynamic libc_setuid setuid "libc.a/shr_64.o"
59 //go:cgo_import_dynamic libc_setgid setgid "libc.a/shr_64.o"
60 //go:cgo_import_dynamic libc_setpriority setpriority "libc.a/shr_64.o"
61 //go:cgo_import_dynamic libc_statx statx "libc.a/shr_64.o"
62 //go:cgo_import_dynamic libc_sync sync "libc.a/shr_64.o"
63 //go:cgo_import_dynamic libc_times times "libc.a/shr_64.o"
64 //go:cgo_import_dynamic libc_umask umask "libc.a/shr_64.o"
65 //go:cgo_import_dynamic libc_uname uname "libc.a/shr_64.o"
66 //go:cgo_import_dynamic libc_unlink unlink "libc.a/shr_64.o"
67 //go:cgo_import_dynamic libc_unlinkat unlinkat "libc.a/shr_64.o"
68 //go:cgo_import_dynamic libc_ustat ustat "libc.a/shr_64.o"
69 //go:cgo_import_dynamic libc_write write "libc.a/shr_64.o"
70 //go:cgo_import_dynamic libc_dup2 dup2 "libc.a/shr_64.o"
71 //go:cgo_import_dynamic libc_posix_fadvise64 posix_fadvise64 "libc.a/shr_64.o"
72 //go:cgo_import_dynamic libc_fchown fchown "libc.a/shr_64.o"
73 //go:cgo_import_dynamic libc_fstat fstat "libc.a/shr_64.o"
74 //go:cgo_import_dynamic libc_fstatat fstatat "libc.a/shr_64.o"
75 //go:cgo_import_dynamic libc_fstatfs fstatfs "libc.a/shr_64.o"
76 //go:cgo_import_dynamic libc_ftruncate ftruncate "libc.a/shr_64.o"
77 //go:cgo_import_dynamic libc_getegid getegid "libc.a/shr_64.o"
78 //go:cgo_import_dynamic libc_geteuid geteuid "libc.a/shr_64.o"
79 //go:cgo_import_dynamic libc_getgid getgid "libc.a/shr_64.o"
80 //go:cgo_import_dynamic libc_getuid getuid "libc.a/shr_64.o"
81 //go:cgo_import_dynamic libc_lchown lchown "libc.a/shr_64.o"
82 //go:cgo_import_dynamic libc_listen listen "libc.a/shr_64.o"
83 //go:cgo_import_dynamic libc_lstat lstat "libc.a/shr_64.o"
84 //go:cgo_import_dynamic libc_pause pause "libc.a/shr_64.o"
85 //go:cgo_import_dynamic libc_pread64 pread64 "libc.a/shr_64.o"
86 //go:cgo_import_dynamic libc_pwrite64 pwrite64 "libc.a/shr_64.o"
87 //go:cgo_import_dynamic libc_pselect pselect "libc.a/shr_64.o"
88 //go:cgo_import_dynamic libc_setregid setregid "libc.a/shr_64.o"
89 //go:cgo_import_dynamic libc_setreuid setreuid "libc.a/shr_64.o"
90 //go:cgo_import_dynamic libc_shutdown shutdown "libc.a/shr_64.o"
91 //go:cgo_import_dynamic libc_splice splice "libc.a/shr_64.o"
92 //go:cgo_import_dynamic libc_stat stat "libc.a/shr_64.o"
93 //go:cgo_import_dynamic libc_statfs statfs "libc.a/shr_64.o"
94 //go:cgo_import_dynamic libc_truncate truncate "libc.a/shr_64.o"
95 //go:cgo_import_dynamic libc_bind bind "libc.a/shr_64.o"
96 //go:cgo_import_dynamic libc_connect connect "libc.a/shr_64.o"
97 //go:cgo_import_dynamic libc_getgroups getgroups "libc.a/shr_64.o"
98 //go:cgo_import_dynamic libc_setgroups setgroups "libc.a/shr_64.o"
99 //go:cgo_import_dynamic libc_getsockopt getsockopt "libc.a/shr_64.o"
100 //go:cgo_import_dynamic libc_setsockopt setsockopt "libc.a/shr_64.o"
101 //go:cgo_import_dynamic libc_socket socket "libc.a/shr_64.o"
102 //go:cgo_import_dynamic libc_socketpair socketpair "libc.a/shr_64.o"
103 //go:cgo_import_dynamic libc_getpeername getpeername "libc.a/shr_64.o"
104 //go:cgo_import_dynamic libc_getsockname getsockname "libc.a/shr_64.o"
105 //go:cgo_import_dynamic libc_recvfrom recvfrom "libc.a/shr_64.o"
106 //go:cgo_import_dynamic libc_sendto sendto "libc.a/shr_64.o"
107 //go:cgo_import_dynamic libc_recvmsg recvmsg "libc.a/shr_64.o"
108 //go:cgo_import_dynamic libc_sendmsg sendmsg "libc.a/shr_64.o"
109 //go:cgo_import_dynamic libc_munmap munmap "libc.a/shr_64.o"
110 //go:cgo_import_dynamic libc_madvise madvise "libc.a/shr_64.o"
111 //go:cgo_import_dynamic libc_mprotect mprotect "libc.a/shr_64.o"
112 //go:cgo_import_dynamic libc_mlock mlock "libc.a/shr_64.o"
113 //go:cgo_import_dynamic libc_mlockall mlockall "libc.a/shr_64.o"
114 //go:cgo_import_dynamic libc_msync msync "libc.a/shr_64.o"
115 //go:cgo_import_dynamic libc_munlock munlock "libc.a/shr_64.o"
116 //go:cgo_import_dynamic libc_munlockall munlockall "libc.a/shr_64.o"
117 //go:cgo_import_dynamic libc_pipe pipe "libc.a/shr_64.o"
118 //go:cgo_import_dynamic libc_poll poll "libc.a/shr_64.o"
119 //go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.a/shr_64.o"
120 //go:cgo_import_dynamic libc_time time "libc.a/shr_64.o"
121 //go:cgo_import_dynamic libc_utime utime "libc.a/shr_64.o"
122 //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.a/shr_64.o"
123 //go:cgo_import_dynamic libc_setrlimit setrlimit "libc.a/shr_64.o"
124 //go:cgo_import_dynamic libc_lseek lseek "libc.a/shr_64.o"
125 //go:cgo_import_dynamic libc_mmap64 mmap64 "libc.a/shr_64.o"
126
127 //go:linkname libc_utimes libc_utimes
128 //go:linkname libc_utimensat libc_utimensat
129 //go:linkname libc_getcwd libc_getcwd
130 //go:linkname libc_accept libc_accept
131 //go:linkname libc_getdirent libc_getdirent
132 //go:linkname libc_wait4 libc_wait4
133 //go:linkname libc_ioctl libc_ioctl
134 //go:linkname libc_fcntl libc_fcntl
135 //go:linkname libc_acct libc_acct
136 //go:linkname libc_chdir libc_chdir
137 //go:linkname libc_chroot libc_chroot
138 //go:linkname libc_close libc_close
139 //go:linkname libc_dup libc_dup
140 //go:linkname libc_exit libc_exit
141 //go:linkname libc_faccessat libc_faccessat
142 //go:linkname libc_fchdir libc_fchdir
143 //go:linkname libc_fchmod libc_fchmod
144 //go:linkname libc_fchmodat libc_fchmodat
145 //go:linkname libc_fchownat libc_fchownat
146 //go:linkname libc_fdatasync libc_fdatasync
147 //go:linkname libc_fsync libc_fsync
148 //go:linkname libc_getpgid libc_getpgid
149 //go:linkname libc_getpgrp libc_getpgrp
150 //go:linkname libc_getpid libc_getpid
151 //go:linkname libc_getppid libc_getppid
152 //go:linkname libc_getpriority libc_getpriority
153 //go:linkname libc_getrusage libc_getrusage
154 //go:linkname libc_getsid libc_getsid
155 //go:linkname libc_kill libc_kill
156 //go:linkname libc_syslog libc_syslog
157 //go:linkname libc_mkdir libc_mkdir
158 //go:linkname libc_mkdirat libc_mkdirat
159 //go:linkname libc_mkfifo libc_mkfifo
160 //go:linkname libc_mknod libc_mknod
161 //go:linkname libc_mknodat libc_mknodat
162 //go:linkname libc_nanosleep libc_nanosleep
163 //go:linkname libc_open64 libc_open64
164 //go:linkname libc_openat libc_openat
165 //go:linkname libc_read libc_read
166 //go:linkname libc_readlink libc_readlink
167 //go:linkname libc_renameat libc_renameat
168 //go:linkname libc_setdomainname libc_setdomainname
169 //go:linkname libc_sethostname libc_sethostname
170 //go:linkname libc_setpgid libc_setpgid
171 //go:linkname libc_setsid libc_setsid
172 //go:linkname libc_settimeofday libc_settimeofday
173 //go:linkname libc_setuid libc_setuid
174 //go:linkname libc_setgid libc_setgid
175 //go:linkname libc_setpriority libc_setpriority
176 //go:linkname libc_statx libc_statx
177 //go:linkname libc_sync libc_sync
178 //go:linkname libc_times libc_times
179 //go:linkname libc_umask libc_umask
180 //go:linkname libc_uname libc_uname
181 //go:linkname libc_unlink libc_unlink
182 //go:linkname libc_unlinkat libc_unlinkat
183 //go:linkname libc_ustat libc_ustat
184 //go:linkname libc_write libc_write
185 //go:linkname libc_dup2 libc_dup2
186 //go:linkname libc_posix_fadvise64 libc_posix_fadvise64
187 //go:linkname libc_fchown libc_fchown
188 //go:linkname libc_fstat libc_fstat
189 //go:linkname libc_fstatat libc_fstatat
190 //go:linkname libc_fstatfs libc_fstatfs
191 //go:linkname libc_ftruncate libc_ftruncate
192 //go:linkname libc_getegid libc_getegid
193 //go:linkname libc_geteuid libc_geteuid
194 //go:linkname libc_getgid libc_getgid
195 //go:linkname libc_getuid libc_getuid
196 //go:linkname libc_lchown libc_lchown
197 //go:linkname libc_listen libc_listen
198 //go:linkname libc_lstat libc_lstat
199 //go:linkname libc_pause libc_pause
200 //go:linkname libc_pread64 libc_pread64
201 //go:linkname libc_pwrite64 libc_pwrite64
202 //go:linkname libc_pselect libc_pselect
203 //go:linkname libc_setregid libc_setregid
204 //go:linkname libc_setreuid libc_setreuid
205 //go:linkname libc_shutdown libc_shutdown
206 //go:linkname libc_splice libc_splice
207 //go:linkname libc_stat libc_stat
208 //go:linkname libc_statfs libc_statfs
209 //go:linkname libc_truncate libc_truncate
210 //go:linkname libc_bind libc_bind
211 //go:linkname libc_connect libc_connect
212 //go:linkname libc_getgroups libc_getgroups
213 //go:linkname libc_setgroups libc_setgroups
214 //go:linkname libc_getsockopt libc_getsockopt
215 //go:linkname libc_setsockopt libc_setsockopt
216 //go:linkname libc_socket libc_socket
217 //go:linkname libc_socketpair libc_socketpair
218 //go:linkname libc_getpeername libc_getpeername
219 //go:linkname libc_getsockname libc_getsockname
220 //go:linkname libc_recvfrom libc_recvfrom
221 //go:linkname libc_sendto libc_sendto
222 //go:linkname libc_recvmsg libc_recvmsg
223 //go:linkname libc_sendmsg libc_sendmsg
224 //go:linkname libc_munmap libc_munmap
225 //go:linkname libc_madvise libc_madvise
226 //go:linkname libc_mprotect libc_mprotect
227 //go:linkname libc_mlock libc_mlock
228 //go:linkname libc_mlockall libc_mlockall
229 //go:linkname libc_msync libc_msync
230 //go:linkname libc_munlock libc_munlock
231 //go:linkname libc_munlockall libc_munlockall
232 //go:linkname libc_pipe libc_pipe
233 //go:linkname libc_poll libc_poll
234 //go:linkname libc_gettimeofday libc_gettimeofday
235 //go:linkname libc_time libc_time
236 //go:linkname libc_utime libc_utime
237 //go:linkname libc_getrlimit libc_getrlimit
238 //go:linkname libc_setrlimit libc_setrlimit
239 //go:linkname libc_lseek libc_lseek
240 //go:linkname libc_mmap64 libc_mmap64
241
242 type syscallFunc uintptr
243
244 var (
245 libc_utimes,
246 libc_utimensat,
247 libc_getcwd,
248 libc_accept,
249 libc_getdirent,
250 libc_wait4,
251 libc_ioctl,
252 libc_fcntl,
253 libc_acct,
254 libc_chdir,
255 libc_chroot,
256 libc_close,
257 libc_dup,
258 libc_exit,
259 libc_faccessat,
260 libc_fchdir,
261 libc_fchmod,
262 libc_fchmodat,
263 libc_fchownat,
264 libc_fdatasync,
265 libc_fsync,
266 libc_getpgid,
267 libc_getpgrp,
268 libc_getpid,
269 libc_getppid,
270 libc_getpriority,
271 libc_getrusage,
272 libc_getsid,
273 libc_kill,
274 libc_syslog,
275 libc_mkdir,
276 libc_mkdirat,
277 libc_mkfifo,
278 libc_mknod,
279 libc_mknodat,
280 libc_nanosleep,
281 libc_open64,
282 libc_openat,
283 libc_read,
284 libc_readlink,
285 libc_renameat,
286 libc_setdomainname,
287 libc_sethostname,
288 libc_setpgid,
289 libc_setsid,
290 libc_settimeofday,
291 libc_setuid,
292 libc_setgid,
293 libc_setpriority,
294 libc_statx,
295 libc_sync,
296 libc_times,
297 libc_umask,
298 libc_uname,
299 libc_unlink,
300 libc_unlinkat,
301 libc_ustat,
302 libc_write,
303 libc_dup2,
304 libc_posix_fadvise64,
305 libc_fchown,
306 libc_fstat,
307 libc_fstatat,
308 libc_fstatfs,
309 libc_ftruncate,
310 libc_getegid,
311 libc_geteuid,
312 libc_getgid,
313 libc_getuid,
314 libc_lchown,
315 libc_listen,
316 libc_lstat,
317 libc_pause,
318 libc_pread64,
319 libc_pwrite64,
320 libc_pselect,
321 libc_setregid,
322 libc_setreuid,
323 libc_shutdown,
324 libc_splice,
325 libc_stat,
326 libc_statfs,
327 libc_truncate,
328 libc_bind,
329 libc_connect,
330 libc_getgroups,
331 libc_setgroups,
332 libc_getsockopt,
333 libc_setsockopt,
334 libc_socket,
335 libc_socketpair,
336 libc_getpeername,
337 libc_getsockname,
338 libc_recvfrom,
339 libc_sendto,
340 libc_recvmsg,
341 libc_sendmsg,
342 libc_munmap,
343 libc_madvise,
344 libc_mprotect,
345 libc_mlock,
346 libc_mlockall,
347 libc_msync,
348 libc_munlock,
349 libc_munlockall,
350 libc_pipe,
351 libc_poll,
352 libc_gettimeofday,
353 libc_time,
354 libc_utime,
355 libc_getrlimit,
356 libc_setrlimit,
357 libc_lseek,
358 libc_mmap64 syscallFunc
359 )
360
361 // Implemented in runtime/syscall_aix.go.
362 func rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
363 func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
364
365 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
366
367 func callutimes(_p0 uintptr, times uintptr) (r1 uintptr, e1 Errno) {
368 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_utimes)), 2, _p0, times, 0, 0, 0, 0)
369 return
370 }
371
372 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
373
374 func callutimensat(dirfd int, _p0 uintptr, times uintptr, flag int) (r1 uintptr, e1 Errno) {
375 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_utimensat)), 4, uintptr(dirfd), _p0, times, uintptr(flag), 0, 0)
376 return
377 }
378
379 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
380
381 func callgetcwd(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
382 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getcwd)), 2, _p0, uintptr(_lenp0), 0, 0, 0, 0)
383 return
384 }
385
386 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
387
388 func callaccept(s int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {
389 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_accept)), 3, uintptr(s), rsa, addrlen, 0, 0, 0)
390 return
391 }
392
393 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
394
395 func callgetdirent(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
396 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getdirent)), 3, uintptr(fd), _p0, uintptr(_lenp0), 0, 0, 0)
397 return
398 }
399
400 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
401
402 func callwait4(pid int, status uintptr, options int, rusage uintptr) (r1 uintptr, e1 Errno) {
403 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_wait4)), 4, uintptr(pid), status, uintptr(options), rusage, 0, 0)
404 return
405 }
406
407 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
408
409 func callioctl(fd int, req int, arg uintptr) (r1 uintptr, e1 Errno) {
410 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_ioctl)), 3, uintptr(fd), uintptr(req), arg, 0, 0, 0)
411 return
412 }
413
414 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
415
416 func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
417 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fcntl)), 3, fd, uintptr(cmd), arg, 0, 0, 0)
418 return
419 }
420
421 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
422
423 func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
424 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_acct)), 1, _p0, 0, 0, 0, 0, 0)
425 return
426 }
427
428 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
429
430 func callchdir(_p0 uintptr) (r1 uintptr, e1 Errno) {
431 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_chdir)), 1, _p0, 0, 0, 0, 0, 0)
432 return
433 }
434
435 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
436
437 func callchroot(_p0 uintptr) (r1 uintptr, e1 Errno) {
438 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_chroot)), 1, _p0, 0, 0, 0, 0, 0)
439 return
440 }
441
442 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
443
444 func callclose(fd int) (r1 uintptr, e1 Errno) {
445 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_close)), 1, uintptr(fd), 0, 0, 0, 0, 0)
446 return
447 }
448
449 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
450
451 func calldup(oldfd int) (r1 uintptr, e1 Errno) {
452 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_dup)), 1, uintptr(oldfd), 0, 0, 0, 0, 0)
453 return
454 }
455
456 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
457
458 func callexit(code int) (r1 uintptr, e1 Errno) {
459 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_exit)), 1, uintptr(code), 0, 0, 0, 0, 0)
460 return
461 }
462
463 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
464
465 func callfaccessat(dirfd int, _p0 uintptr, mode uint32, flags int) (r1 uintptr, e1 Errno) {
466 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_faccessat)), 4, uintptr(dirfd), _p0, uintptr(mode), uintptr(flags), 0, 0)
467 return
468 }
469
470 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
471
472 func callfchdir(fd int) (r1 uintptr, e1 Errno) {
473 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0)
474 return
475 }
476
477 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
478
479 func callfchmod(fd int, mode uint32) (r1 uintptr, e1 Errno) {
480 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0)
481 return
482 }
483
484 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
485
486 func callfchmodat(dirfd int, _p0 uintptr, mode uint32, flags int) (r1 uintptr, e1 Errno) {
487 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fchmodat)), 4, uintptr(dirfd), _p0, uintptr(mode), uintptr(flags), 0, 0)
488 return
489 }
490
491 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
492
493 func callfchownat(dirfd int, _p0 uintptr, uid int, gid int, flags int) (r1 uintptr, e1 Errno) {
494 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fchownat)), 5, uintptr(dirfd), _p0, uintptr(uid), uintptr(gid), uintptr(flags), 0)
495 return
496 }
497
498 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
499
500 func callfdatasync(fd int) (r1 uintptr, e1 Errno) {
501 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fdatasync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
502 return
503 }
504
505 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
506
507 func callfsync(fd int) (r1 uintptr, e1 Errno) {
508 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
509 return
510 }
511
512 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
513
514 func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
515 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
516 return
517 }
518
519 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
520
521 func callgetpgrp() (r1 uintptr, e1 Errno) {
522 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getpgrp)), 0, 0, 0, 0, 0, 0, 0)
523 return
524 }
525
526 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
527
528 func callgetpid() (r1 uintptr, e1 Errno) {
529 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpid)), 0, 0, 0, 0, 0, 0, 0)
530 return
531 }
532
533 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
534
535 func callgetppid() (r1 uintptr, e1 Errno) {
536 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getppid)), 0, 0, 0, 0, 0, 0, 0)
537 return
538 }
539
540 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
541
542 func callgetpriority(which int, who int) (r1 uintptr, e1 Errno) {
543 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0)
544 return
545 }
546
547 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
548
549 func callgetrusage(who int, rusage uintptr) (r1 uintptr, e1 Errno) {
550 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getrusage)), 2, uintptr(who), rusage, 0, 0, 0, 0)
551 return
552 }
553
554 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
555
556 func callgetsid(pid int) (r1 uintptr, e1 Errno) {
557 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getsid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
558 return
559 }
560
561 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
562
563 func callkill(pid int, sig int) (r1 uintptr, e1 Errno) {
564 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_kill)), 2, uintptr(pid), uintptr(sig), 0, 0, 0, 0)
565 return
566 }
567
568 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
569
570 func callsyslog(typ int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
571 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_syslog)), 3, uintptr(typ), _p0, uintptr(_lenp0), 0, 0, 0)
572 return
573 }
574
575 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
576
577 func callmkdir(dirfd int, _p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) {
578 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mkdir)), 3, uintptr(dirfd), _p0, uintptr(mode), 0, 0, 0)
579 return
580 }
581
582 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
583
584 func callmkdirat(dirfd int, _p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) {
585 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mkdirat)), 3, uintptr(dirfd), _p0, uintptr(mode), 0, 0, 0)
586 return
587 }
588
589 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
590
591 func callmkfifo(_p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) {
592 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mkfifo)), 2, _p0, uintptr(mode), 0, 0, 0, 0)
593 return
594 }
595
596 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
597
598 func callmknod(_p0 uintptr, mode uint32, dev int) (r1 uintptr, e1 Errno) {
599 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mknod)), 3, _p0, uintptr(mode), uintptr(dev), 0, 0, 0)
600 return
601 }
602
603 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
604
605 func callmknodat(dirfd int, _p0 uintptr, mode uint32, dev int) (r1 uintptr, e1 Errno) {
606 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mknodat)), 4, uintptr(dirfd), _p0, uintptr(mode), uintptr(dev), 0, 0)
607 return
608 }
609
610 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
611
612 func callnanosleep(time uintptr, leftover uintptr) (r1 uintptr, e1 Errno) {
613 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_nanosleep)), 2, time, leftover, 0, 0, 0, 0)
614 return
615 }
616
617 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
618
619 func callopen64(_p0 uintptr, mode int, perm uint32) (r1 uintptr, e1 Errno) {
620 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_open64)), 3, _p0, uintptr(mode), uintptr(perm), 0, 0, 0)
621 return
622 }
623
624 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
625
626 func callopenat(dirfd int, _p0 uintptr, flags int, mode uint32) (r1 uintptr, e1 Errno) {
627 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_openat)), 4, uintptr(dirfd), _p0, uintptr(flags), uintptr(mode), 0, 0)
628 return
629 }
630
631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
632
633 func callread(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
634 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_read)), 3, uintptr(fd), _p0, uintptr(_lenp0), 0, 0, 0)
635 return
636 }
637
638 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
639
640 func callreadlink(_p0 uintptr, _p1 uintptr, _lenp1 int) (r1 uintptr, e1 Errno) {
641 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_readlink)), 3, _p0, _p1, uintptr(_lenp1), 0, 0, 0)
642 return
643 }
644
645 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
646
647 func callrenameat(olddirfd int, _p0 uintptr, newdirfd int, _p1 uintptr) (r1 uintptr, e1 Errno) {
648 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_renameat)), 4, uintptr(olddirfd), _p0, uintptr(newdirfd), _p1, 0, 0)
649 return
650 }
651
652 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
653
654 func callsetdomainname(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
655 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_setdomainname)), 2, _p0, uintptr(_lenp0), 0, 0, 0, 0)
656 return
657 }
658
659 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
660
661 func callsethostname(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
662 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_sethostname)), 2, _p0, uintptr(_lenp0), 0, 0, 0, 0)
663 return
664 }
665
666 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
667
668 func callsetpgid(pid int, pgid int) (r1 uintptr, e1 Errno) {
669 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0)
670 return
671 }
672
673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674
675 func callsetsid() (r1 uintptr, e1 Errno) {
676 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setsid)), 0, 0, 0, 0, 0, 0, 0)
677 return
678 }
679
680 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
681
682 func callsettimeofday(tv uintptr) (r1 uintptr, e1 Errno) {
683 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_settimeofday)), 1, tv, 0, 0, 0, 0, 0)
684 return
685 }
686
687 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
688
689 func callsetuid(uid int) (r1 uintptr, e1 Errno) {
690 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_setuid)), 1, uintptr(uid), 0, 0, 0, 0, 0)
691 return
692 }
693
694 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
695
696 func callsetgid(uid int) (r1 uintptr, e1 Errno) {
697 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_setgid)), 1, uintptr(uid), 0, 0, 0, 0, 0)
698 return
699 }
700
701 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
702
703 func callsetpriority(which int, who int, prio int) (r1 uintptr, e1 Errno) {
704 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_setpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0)
705 return
706 }
707
708 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
709
710 func callstatx(dirfd int, _p0 uintptr, flags int, mask int, stat uintptr) (r1 uintptr, e1 Errno) {
711 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_statx)), 5, uintptr(dirfd), _p0, uintptr(flags), uintptr(mask), stat, 0)
712 return
713 }
714
715 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
716
717 func callsync() (r1 uintptr, e1 Errno) {
718 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_sync)), 0, 0, 0, 0, 0, 0, 0)
719 return
720 }
721
722 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
723
724 func calltimes(tms uintptr) (r1 uintptr, e1 Errno) {
725 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_times)), 1, tms, 0, 0, 0, 0, 0)
726 return
727 }
728
729 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
730
731 func callumask(mask int) (r1 uintptr, e1 Errno) {
732 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_umask)), 1, uintptr(mask), 0, 0, 0, 0, 0)
733 return
734 }
735
736 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
737
738 func calluname(buf uintptr) (r1 uintptr, e1 Errno) {
739 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_uname)), 1, buf, 0, 0, 0, 0, 0)
740 return
741 }
742
743 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
744
745 func callunlink(_p0 uintptr) (r1 uintptr, e1 Errno) {
746 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_unlink)), 1, _p0, 0, 0, 0, 0, 0)
747 return
748 }
749
750 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
751
752 func callunlinkat(dirfd int, _p0 uintptr, flags int) (r1 uintptr, e1 Errno) {
753 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_unlinkat)), 3, uintptr(dirfd), _p0, uintptr(flags), 0, 0, 0)
754 return
755 }
756
757 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
758
759 func callustat(dev int, ubuf uintptr) (r1 uintptr, e1 Errno) {
760 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_ustat)), 2, uintptr(dev), ubuf, 0, 0, 0, 0)
761 return
762 }
763
764 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
765
766 func callwrite(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
767 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_write)), 3, uintptr(fd), _p0, uintptr(_lenp0), 0, 0, 0)
768 return
769 }
770
771 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
772
773 func calldup2(oldfd int, newfd int) (r1 uintptr, e1 Errno) {
774 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_dup2)), 2, uintptr(oldfd), uintptr(newfd), 0, 0, 0, 0)
775 return
776 }
777
778 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
779
780 func callposix_fadvise64(fd int, offset int64, length int64, advice int) (r1 uintptr, e1 Errno) {
781 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_posix_fadvise64)), 4, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
782 return
783 }
784
785 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
786
787 func callfchown(fd int, uid int, gid int) (r1 uintptr, e1 Errno) {
788 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0)
789 return
790 }
791
792 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
793
794 func callfstat(fd int, stat uintptr) (r1 uintptr, e1 Errno) {
795 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fstat)), 2, uintptr(fd), stat, 0, 0, 0, 0)
796 return
797 }
798
799 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
800
801 func callfstatat(dirfd int, _p0 uintptr, stat uintptr, flags int) (r1 uintptr, e1 Errno) {
802 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fstatat)), 4, uintptr(dirfd), _p0, stat, uintptr(flags), 0, 0)
803 return
804 }
805
806 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
807
808 func callfstatfs(fd int, buf uintptr) (r1 uintptr, e1 Errno) {
809 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fstatfs)), 2, uintptr(fd), buf, 0, 0, 0, 0)
810 return
811 }
812
813 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
814
815 func callftruncate(fd int, length int64) (r1 uintptr, e1 Errno) {
816 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_ftruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0)
817 return
818 }
819
820 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
821
822 func callgetegid() (r1 uintptr, e1 Errno) {
823 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getegid)), 0, 0, 0, 0, 0, 0, 0)
824 return
825 }
826
827 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
828
829 func callgeteuid() (r1 uintptr, e1 Errno) {
830 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_geteuid)), 0, 0, 0, 0, 0, 0, 0)
831 return
832 }
833
834 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
835
836 func callgetgid() (r1 uintptr, e1 Errno) {
837 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getgid)), 0, 0, 0, 0, 0, 0, 0)
838 return
839 }
840
841 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
842
843 func callgetuid() (r1 uintptr, e1 Errno) {
844 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getuid)), 0, 0, 0, 0, 0, 0, 0)
845 return
846 }
847
848 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
849
850 func calllchown(_p0 uintptr, uid int, gid int) (r1 uintptr, e1 Errno) {
851 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_lchown)), 3, _p0, uintptr(uid), uintptr(gid), 0, 0, 0)
852 return
853 }
854
855 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
856
857 func calllisten(s int, n int) (r1 uintptr, e1 Errno) {
858 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_listen)), 2, uintptr(s), uintptr(n), 0, 0, 0, 0)
859 return
860 }
861
862 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
863
864 func calllstat(_p0 uintptr, stat uintptr) (r1 uintptr, e1 Errno) {
865 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_lstat)), 2, _p0, stat, 0, 0, 0, 0)
866 return
867 }
868
869 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
870
871 func callpause() (r1 uintptr, e1 Errno) {
872 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_pause)), 0, 0, 0, 0, 0, 0, 0)
873 return
874 }
875
876 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
877
878 func callpread64(fd int, _p0 uintptr, _lenp0 int, offset int64) (r1 uintptr, e1 Errno) {
879 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_pread64)), 4, uintptr(fd), _p0, uintptr(_lenp0), uintptr(offset), 0, 0)
880 return
881 }
882
883 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
884
885 func callpwrite64(fd int, _p0 uintptr, _lenp0 int, offset int64) (r1 uintptr, e1 Errno) {
886 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_pwrite64)), 4, uintptr(fd), _p0, uintptr(_lenp0), uintptr(offset), 0, 0)
887 return
888 }
889
890 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
891
892 func callpselect(nfd int, r uintptr, w uintptr, e uintptr, timeout uintptr, sigmask uintptr) (r1 uintptr, e1 Errno) {
893 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_pselect)), 6, uintptr(nfd), r, w, e, timeout, sigmask)
894 return
895 }
896
897 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
898
899 func callsetregid(rgid int, egid int) (r1 uintptr, e1 Errno) {
900 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0)
901 return
902 }
903
904 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
905
906 func callsetreuid(ruid int, euid int) (r1 uintptr, e1 Errno) {
907 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0)
908 return
909 }
910
911 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
912
913 func callshutdown(fd int, how int) (r1 uintptr, e1 Errno) {
914 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_shutdown)), 2, uintptr(fd), uintptr(how), 0, 0, 0, 0)
915 return
916 }
917
918 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
919
920 func callsplice(rfd int, roff uintptr, wfd int, woff uintptr, len int, flags int) (r1 uintptr, e1 Errno) {
921 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_splice)), 6, uintptr(rfd), roff, uintptr(wfd), woff, uintptr(len), uintptr(flags))
922 return
923 }
924
925 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
926
927 func callstat(_p0 uintptr, stat uintptr) (r1 uintptr, e1 Errno) {
928 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_stat)), 2, _p0, stat, 0, 0, 0, 0)
929 return
930 }
931
932 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
933
934 func callstatfs(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) {
935 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_statfs)), 2, _p0, buf, 0, 0, 0, 0)
936 return
937 }
938
939 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
940
941 func calltruncate(_p0 uintptr, length int64) (r1 uintptr, e1 Errno) {
942 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_truncate)), 2, _p0, uintptr(length), 0, 0, 0, 0)
943 return
944 }
945
946 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
947
948 func callbind(s int, addr uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {
949 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_bind)), 3, uintptr(s), addr, addrlen, 0, 0, 0)
950 return
951 }
952
953 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
954
955 func callconnect(s int, addr uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {
956 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_connect)), 3, uintptr(s), addr, addrlen, 0, 0, 0)
957 return
958 }
959
960 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
961
962 func callgetgroups(n int, list uintptr) (r1 uintptr, e1 Errno) {
963 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getgroups)), 2, uintptr(n), list, 0, 0, 0, 0)
964 return
965 }
966
967 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
968
969 func callsetgroups(n int, list uintptr) (r1 uintptr, e1 Errno) {
970 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setgroups)), 2, uintptr(n), list, 0, 0, 0, 0)
971 return
972 }
973
974 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
975
976 func callgetsockopt(s int, level int, name int, val uintptr, vallen uintptr) (r1 uintptr, e1 Errno) {
977 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), val, vallen, 0)
978 return
979 }
980
981 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
982
983 func callsetsockopt(s int, level int, name int, val uintptr, vallen uintptr) (r1 uintptr, e1 Errno) {
984 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_setsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), val, vallen, 0)
985 return
986 }
987
988 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
989
990 func callsocket(domain int, typ int, proto int) (r1 uintptr, e1 Errno) {
991 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
992 return
993 }
994
995 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
996
997 func callsocketpair(domain int, typ int, proto int, fd uintptr) (r1 uintptr, e1 Errno) {
998 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_socketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), fd, 0, 0)
999 return
1000 }
1001
1002 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1003
1004 func callgetpeername(fd int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {
1005 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpeername)), 3, uintptr(fd), rsa, addrlen, 0, 0, 0)
1006 return
1007 }
1008
1009 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1010
1011 func callgetsockname(fd int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {
1012 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getsockname)), 3, uintptr(fd), rsa, addrlen, 0, 0, 0)
1013 return
1014 }
1015
1016 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1017
1018 func callrecvfrom(fd int, _p0 uintptr, _lenp0 int, flags int, from uintptr, fromlen uintptr) (r1 uintptr, e1 Errno) {
1019 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_recvfrom)), 6, uintptr(fd), _p0, uintptr(_lenp0), uintptr(flags), from, fromlen)
1020 return
1021 }
1022
1023 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1024
1025 func callsendto(s int, _p0 uintptr, _lenp0 int, flags int, to uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {
1026 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_sendto)), 6, uintptr(s), _p0, uintptr(_lenp0), uintptr(flags), to, addrlen)
1027 return
1028 }
1029
1030 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1031
1032 func callrecvmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {
1033 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_recvmsg)), 3, uintptr(s), msg, uintptr(flags), 0, 0, 0)
1034 return
1035 }
1036
1037 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1038
1039 func callsendmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {
1040 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_sendmsg)), 3, uintptr(s), msg, uintptr(flags), 0, 0, 0)
1041 return
1042 }
1043
1044 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1045
1046 func callmunmap(addr uintptr, length uintptr) (r1 uintptr, e1 Errno) {
1047 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_munmap)), 2, addr, length, 0, 0, 0, 0)
1048 return
1049 }
1050
1051 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1052
1053 func callmadvise(_p0 uintptr, _lenp0 int, advice int) (r1 uintptr, e1 Errno) {
1054 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_madvise)), 3, _p0, uintptr(_lenp0), uintptr(advice), 0, 0, 0)
1055 return
1056 }
1057
1058 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1059
1060 func callmprotect(_p0 uintptr, _lenp0 int, prot int) (r1 uintptr, e1 Errno) {
1061 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mprotect)), 3, _p0, uintptr(_lenp0), uintptr(prot), 0, 0, 0)
1062 return
1063 }
1064
1065 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1066
1067 func callmlock(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
1068 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mlock)), 2, _p0, uintptr(_lenp0), 0, 0, 0, 0)
1069 return
1070 }
1071
1072 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1073
1074 func callmlockall(flags int) (r1 uintptr, e1 Errno) {
1075 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mlockall)), 1, uintptr(flags), 0, 0, 0, 0, 0)
1076 return
1077 }
1078
1079 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1080
1081 func callmsync(_p0 uintptr, _lenp0 int, flags int) (r1 uintptr, e1 Errno) {
1082 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_msync)), 3, _p0, uintptr(_lenp0), uintptr(flags), 0, 0, 0)
1083 return
1084 }
1085
1086 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1087
1088 func callmunlock(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
1089 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_munlock)), 2, _p0, uintptr(_lenp0), 0, 0, 0, 0)
1090 return
1091 }
1092
1093 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1094
1095 func callmunlockall() (r1 uintptr, e1 Errno) {
1096 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_munlockall)), 0, 0, 0, 0, 0, 0, 0)
1097 return
1098 }
1099
1100 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1101
1102 func callpipe(p uintptr) (r1 uintptr, e1 Errno) {
1103 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_pipe)), 1, p, 0, 0, 0, 0, 0)
1104 return
1105 }
1106
1107 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1108
1109 func callpoll(fds uintptr, nfds int, timeout int) (r1 uintptr, e1 Errno) {
1110 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_poll)), 3, fds, uintptr(nfds), uintptr(timeout), 0, 0, 0)
1111 return
1112 }
1113
1114 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1115
1116 func callgettimeofday(tv uintptr, tzp uintptr) (r1 uintptr, e1 Errno) {
1117 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_gettimeofday)), 2, tv, tzp, 0, 0, 0, 0)
1118 return
1119 }
1120
1121 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1122
1123 func calltime(t uintptr) (r1 uintptr, e1 Errno) {
1124 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_time)), 1, t, 0, 0, 0, 0, 0)
1125 return
1126 }
1127
1128 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1129
1130 func callutime(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) {
1131 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_utime)), 2, _p0, buf, 0, 0, 0, 0)
1132 return
1133 }
1134
1135 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1136
1137 func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
1138 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getrlimit)), 2, uintptr(resource), rlim, 0, 0, 0, 0)
1139 return
1140 }
1141
1142 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1143
1144 func callsetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
1145 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setrlimit)), 2, uintptr(resource), rlim, 0, 0, 0, 0)
1146 return
1147 }
1148
1149 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1150
1151 func calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) {
1152 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_lseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)
1153 return
1154 }
1155
1156 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1157
1158 func callmmap64(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (r1 uintptr, e1 Errno) {
1159 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mmap64)), 6, addr, length, uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
1160 return
1161 }
0 // mksyscall_aix_ppc64.pl -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build aix,ppc64
4 // +build gccgo
5
6 package unix
7
8 /*
9 #include <stdint.h>
10 int utimes(uintptr_t, uintptr_t);
11 int utimensat(int, uintptr_t, uintptr_t, int);
12 int getcwd(uintptr_t, size_t);
13 int accept(int, uintptr_t, uintptr_t);
14 int getdirent(int, uintptr_t, size_t);
15 int wait4(int, uintptr_t, int, uintptr_t);
16 int ioctl(int, int, uintptr_t);
17 int fcntl(uintptr_t, int, uintptr_t);
18 int acct(uintptr_t);
19 int chdir(uintptr_t);
20 int chroot(uintptr_t);
21 int close(int);
22 int dup(int);
23 void exit(int);
24 int faccessat(int, uintptr_t, unsigned int, int);
25 int fchdir(int);
26 int fchmod(int, unsigned int);
27 int fchmodat(int, uintptr_t, unsigned int, int);
28 int fchownat(int, uintptr_t, int, int, int);
29 int fdatasync(int);
30 int fsync(int);
31 int getpgid(int);
32 int getpgrp();
33 int getpid();
34 int getppid();
35 int getpriority(int, int);
36 int getrusage(int, uintptr_t);
37 int getsid(int);
38 int kill(int, int);
39 int syslog(int, uintptr_t, size_t);
40 int mkdir(int, uintptr_t, unsigned int);
41 int mkdirat(int, uintptr_t, unsigned int);
42 int mkfifo(uintptr_t, unsigned int);
43 int mknod(uintptr_t, unsigned int, int);
44 int mknodat(int, uintptr_t, unsigned int, int);
45 int nanosleep(uintptr_t, uintptr_t);
46 int open64(uintptr_t, int, unsigned int);
47 int openat(int, uintptr_t, int, unsigned int);
48 int read(int, uintptr_t, size_t);
49 int readlink(uintptr_t, uintptr_t, size_t);
50 int renameat(int, uintptr_t, int, uintptr_t);
51 int setdomainname(uintptr_t, size_t);
52 int sethostname(uintptr_t, size_t);
53 int setpgid(int, int);
54 int setsid();
55 int settimeofday(uintptr_t);
56 int setuid(int);
57 int setgid(int);
58 int setpriority(int, int, int);
59 int statx(int, uintptr_t, int, int, uintptr_t);
60 int sync();
61 uintptr_t times(uintptr_t);
62 int umask(int);
63 int uname(uintptr_t);
64 int unlink(uintptr_t);
65 int unlinkat(int, uintptr_t, int);
66 int ustat(int, uintptr_t);
67 int write(int, uintptr_t, size_t);
68 int dup2(int, int);
69 int posix_fadvise64(int, long long, long long, int);
70 int fchown(int, int, int);
71 int fstat(int, uintptr_t);
72 int fstatat(int, uintptr_t, uintptr_t, int);
73 int fstatfs(int, uintptr_t);
74 int ftruncate(int, long long);
75 int getegid();
76 int geteuid();
77 int getgid();
78 int getuid();
79 int lchown(uintptr_t, int, int);
80 int listen(int, int);
81 int lstat(uintptr_t, uintptr_t);
82 int pause();
83 int pread64(int, uintptr_t, size_t, long long);
84 int pwrite64(int, uintptr_t, size_t, long long);
85 int pselect(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
86 int setregid(int, int);
87 int setreuid(int, int);
88 int shutdown(int, int);
89 long long splice(int, uintptr_t, int, uintptr_t, int, int);
90 int stat(uintptr_t, uintptr_t);
91 int statfs(uintptr_t, uintptr_t);
92 int truncate(uintptr_t, long long);
93 int bind(int, uintptr_t, uintptr_t);
94 int connect(int, uintptr_t, uintptr_t);
95 int getgroups(int, uintptr_t);
96 int setgroups(int, uintptr_t);
97 int getsockopt(int, int, int, uintptr_t, uintptr_t);
98 int setsockopt(int, int, int, uintptr_t, uintptr_t);
99 int socket(int, int, int);
100 int socketpair(int, int, int, uintptr_t);
101 int getpeername(int, uintptr_t, uintptr_t);
102 int getsockname(int, uintptr_t, uintptr_t);
103 int recvfrom(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);
104 int sendto(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);
105 int recvmsg(int, uintptr_t, int);
106 int sendmsg(int, uintptr_t, int);
107 int munmap(uintptr_t, uintptr_t);
108 int madvise(uintptr_t, size_t, int);
109 int mprotect(uintptr_t, size_t, int);
110 int mlock(uintptr_t, size_t);
111 int mlockall(int);
112 int msync(uintptr_t, size_t, int);
113 int munlock(uintptr_t, size_t);
114 int munlockall();
115 int pipe(uintptr_t);
116 int poll(uintptr_t, int, int);
117 int gettimeofday(uintptr_t, uintptr_t);
118 int time(uintptr_t);
119 int utime(uintptr_t, uintptr_t);
120 int getrlimit(int, uintptr_t);
121 int setrlimit(int, uintptr_t);
122 long long lseek(int, long long, int);
123 uintptr_t mmap64(uintptr_t, uintptr_t, int, int, int, long long);
124
125 */
126 import "C"
127 import (
128 "syscall"
129 )
130
131 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
132
133 func callutimes(_p0 uintptr, times uintptr) (r1 uintptr, e1 Errno) {
134 r1 = uintptr(C.utimes(C.uintptr_t(_p0), C.uintptr_t(times)))
135 e1 = syscall.GetErrno()
136 return
137 }
138
139 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
140
141 func callutimensat(dirfd int, _p0 uintptr, times uintptr, flag int) (r1 uintptr, e1 Errno) {
142 r1 = uintptr(C.utimensat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(times), C.int(flag)))
143 e1 = syscall.GetErrno()
144 return
145 }
146
147 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
148
149 func callgetcwd(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
150 r1 = uintptr(C.getcwd(C.uintptr_t(_p0), C.size_t(_lenp0)))
151 e1 = syscall.GetErrno()
152 return
153 }
154
155 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
156
157 func callaccept(s int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {
158 r1 = uintptr(C.accept(C.int(s), C.uintptr_t(rsa), C.uintptr_t(addrlen)))
159 e1 = syscall.GetErrno()
160 return
161 }
162
163 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
164
165 func callgetdirent(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
166 r1 = uintptr(C.getdirent(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0)))
167 e1 = syscall.GetErrno()
168 return
169 }
170
171 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
172
173 func callwait4(pid int, status uintptr, options int, rusage uintptr) (r1 uintptr, e1 Errno) {
174 r1 = uintptr(C.wait4(C.int(pid), C.uintptr_t(status), C.int(options), C.uintptr_t(rusage)))
175 e1 = syscall.GetErrno()
176 return
177 }
178
179 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
180
181 func callioctl(fd int, req int, arg uintptr) (r1 uintptr, e1 Errno) {
182 r1 = uintptr(C.ioctl(C.int(fd), C.int(req), C.uintptr_t(arg)))
183 e1 = syscall.GetErrno()
184 return
185 }
186
187 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
188
189 func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
190 r1 = uintptr(C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg)))
191 e1 = syscall.GetErrno()
192 return
193 }
194
195 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
196
197 func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
198 r1 = uintptr(C.acct(C.uintptr_t(_p0)))
199 e1 = syscall.GetErrno()
200 return
201 }
202
203 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
204
205 func callchdir(_p0 uintptr) (r1 uintptr, e1 Errno) {
206 r1 = uintptr(C.chdir(C.uintptr_t(_p0)))
207 e1 = syscall.GetErrno()
208 return
209 }
210
211 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
212
213 func callchroot(_p0 uintptr) (r1 uintptr, e1 Errno) {
214 r1 = uintptr(C.chroot(C.uintptr_t(_p0)))
215 e1 = syscall.GetErrno()
216 return
217 }
218
219 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
220
221 func callclose(fd int) (r1 uintptr, e1 Errno) {
222 r1 = uintptr(C.close(C.int(fd)))
223 e1 = syscall.GetErrno()
224 return
225 }
226
227 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
228
229 func calldup(oldfd int) (r1 uintptr, e1 Errno) {
230 r1 = uintptr(C.dup(C.int(oldfd)))
231 e1 = syscall.GetErrno()
232 return
233 }
234
235 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
236
237 func callexit(code int) (r1 uintptr, e1 Errno) {
238 r1 = uintptr(C.exit(C.int(code)))
239 e1 = syscall.GetErrno()
240 return
241 }
242
243 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
244
245 func callfaccessat(dirfd int, _p0 uintptr, mode uint32, flags int) (r1 uintptr, e1 Errno) {
246 r1 = uintptr(C.faccessat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags)))
247 e1 = syscall.GetErrno()
248 return
249 }
250
251 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
252
253 func callfchdir(fd int) (r1 uintptr, e1 Errno) {
254 r1 = uintptr(C.fchdir(C.int(fd)))
255 e1 = syscall.GetErrno()
256 return
257 }
258
259 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
260
261 func callfchmod(fd int, mode uint32) (r1 uintptr, e1 Errno) {
262 r1 = uintptr(C.fchmod(C.int(fd), C.uint(mode)))
263 e1 = syscall.GetErrno()
264 return
265 }
266
267 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
268
269 func callfchmodat(dirfd int, _p0 uintptr, mode uint32, flags int) (r1 uintptr, e1 Errno) {
270 r1 = uintptr(C.fchmodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags)))
271 e1 = syscall.GetErrno()
272 return
273 }
274
275 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
276
277 func callfchownat(dirfd int, _p0 uintptr, uid int, gid int, flags int) (r1 uintptr, e1 Errno) {
278 r1 = uintptr(C.fchownat(C.int(dirfd), C.uintptr_t(_p0), C.int(uid), C.int(gid), C.int(flags)))
279 e1 = syscall.GetErrno()
280 return
281 }
282
283 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
284
285 func callfdatasync(fd int) (r1 uintptr, e1 Errno) {
286 r1 = uintptr(C.fdatasync(C.int(fd)))
287 e1 = syscall.GetErrno()
288 return
289 }
290
291 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
292
293 func callfsync(fd int) (r1 uintptr, e1 Errno) {
294 r1 = uintptr(C.fsync(C.int(fd)))
295 e1 = syscall.GetErrno()
296 return
297 }
298
299 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
300
301 func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
302 r1 = uintptr(C.getpgid(C.int(pid)))
303 e1 = syscall.GetErrno()
304 return
305 }
306
307 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
308
309 func callgetpgrp() (r1 uintptr, e1 Errno) {
310 r1 = uintptr(C.getpgrp())
311 e1 = syscall.GetErrno()
312 return
313 }
314
315 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
316
317 func callgetpid() (r1 uintptr, e1 Errno) {
318 r1 = uintptr(C.getpid())
319 e1 = syscall.GetErrno()
320 return
321 }
322
323 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
324
325 func callgetppid() (r1 uintptr, e1 Errno) {
326 r1 = uintptr(C.getppid())
327 e1 = syscall.GetErrno()
328 return
329 }
330
331 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
332
333 func callgetpriority(which int, who int) (r1 uintptr, e1 Errno) {
334 r1 = uintptr(C.getpriority(C.int(which), C.int(who)))
335 e1 = syscall.GetErrno()
336 return
337 }
338
339 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
340
341 func callgetrusage(who int, rusage uintptr) (r1 uintptr, e1 Errno) {
342 r1 = uintptr(C.getrusage(C.int(who), C.uintptr_t(rusage)))
343 e1 = syscall.GetErrno()
344 return
345 }
346
347 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
348
349 func callgetsid(pid int) (r1 uintptr, e1 Errno) {
350 r1 = uintptr(C.getsid(C.int(pid)))
351 e1 = syscall.GetErrno()
352 return
353 }
354
355 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
356
357 func callkill(pid int, sig int) (r1 uintptr, e1 Errno) {
358 r1 = uintptr(C.kill(C.int(pid), C.int(sig)))
359 e1 = syscall.GetErrno()
360 return
361 }
362
363 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
364
365 func callsyslog(typ int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
366 r1 = uintptr(C.syslog(C.int(typ), C.uintptr_t(_p0), C.size_t(_lenp0)))
367 e1 = syscall.GetErrno()
368 return
369 }
370
371 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
372
373 func callmkdir(dirfd int, _p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) {
374 r1 = uintptr(C.mkdir(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode)))
375 e1 = syscall.GetErrno()
376 return
377 }
378
379 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
380
381 func callmkdirat(dirfd int, _p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) {
382 r1 = uintptr(C.mkdirat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode)))
383 e1 = syscall.GetErrno()
384 return
385 }
386
387 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
388
389 func callmkfifo(_p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) {
390 r1 = uintptr(C.mkfifo(C.uintptr_t(_p0), C.uint(mode)))
391 e1 = syscall.GetErrno()
392 return
393 }
394
395 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
396
397 func callmknod(_p0 uintptr, mode uint32, dev int) (r1 uintptr, e1 Errno) {
398 r1 = uintptr(C.mknod(C.uintptr_t(_p0), C.uint(mode), C.int(dev)))
399 e1 = syscall.GetErrno()
400 return
401 }
402
403 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
404
405 func callmknodat(dirfd int, _p0 uintptr, mode uint32, dev int) (r1 uintptr, e1 Errno) {
406 r1 = uintptr(C.mknodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(dev)))
407 e1 = syscall.GetErrno()
408 return
409 }
410
411 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
412
413 func callnanosleep(time uintptr, leftover uintptr) (r1 uintptr, e1 Errno) {
414 r1 = uintptr(C.nanosleep(C.uintptr_t(time), C.uintptr_t(leftover)))
415 e1 = syscall.GetErrno()
416 return
417 }
418
419 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
420
421 func callopen64(_p0 uintptr, mode int, perm uint32) (r1 uintptr, e1 Errno) {
422 r1 = uintptr(C.open64(C.uintptr_t(_p0), C.int(mode), C.uint(perm)))
423 e1 = syscall.GetErrno()
424 return
425 }
426
427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
428
429 func callopenat(dirfd int, _p0 uintptr, flags int, mode uint32) (r1 uintptr, e1 Errno) {
430 r1 = uintptr(C.openat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.uint(mode)))
431 e1 = syscall.GetErrno()
432 return
433 }
434
435 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
436
437 func callread(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
438 r1 = uintptr(C.read(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0)))
439 e1 = syscall.GetErrno()
440 return
441 }
442
443 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
444
445 func callreadlink(_p0 uintptr, _p1 uintptr, _lenp1 int) (r1 uintptr, e1 Errno) {
446 r1 = uintptr(C.readlink(C.uintptr_t(_p0), C.uintptr_t(_p1), C.size_t(_lenp1)))
447 e1 = syscall.GetErrno()
448 return
449 }
450
451 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
452
453 func callrenameat(olddirfd int, _p0 uintptr, newdirfd int, _p1 uintptr) (r1 uintptr, e1 Errno) {
454 r1 = uintptr(C.renameat(C.int(olddirfd), C.uintptr_t(_p0), C.int(newdirfd), C.uintptr_t(_p1)))
455 e1 = syscall.GetErrno()
456 return
457 }
458
459 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
460
461 func callsetdomainname(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
462 r1 = uintptr(C.setdomainname(C.uintptr_t(_p0), C.size_t(_lenp0)))
463 e1 = syscall.GetErrno()
464 return
465 }
466
467 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
468
469 func callsethostname(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
470 r1 = uintptr(C.sethostname(C.uintptr_t(_p0), C.size_t(_lenp0)))
471 e1 = syscall.GetErrno()
472 return
473 }
474
475 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
476
477 func callsetpgid(pid int, pgid int) (r1 uintptr, e1 Errno) {
478 r1 = uintptr(C.setpgid(C.int(pid), C.int(pgid)))
479 e1 = syscall.GetErrno()
480 return
481 }
482
483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
484
485 func callsetsid() (r1 uintptr, e1 Errno) {
486 r1 = uintptr(C.setsid())
487 e1 = syscall.GetErrno()
488 return
489 }
490
491 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
492
493 func callsettimeofday(tv uintptr) (r1 uintptr, e1 Errno) {
494 r1 = uintptr(C.settimeofday(C.uintptr_t(tv)))
495 e1 = syscall.GetErrno()
496 return
497 }
498
499 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
500
501 func callsetuid(uid int) (r1 uintptr, e1 Errno) {
502 r1 = uintptr(C.setuid(C.int(uid)))
503 e1 = syscall.GetErrno()
504 return
505 }
506
507 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
508
509 func callsetgid(uid int) (r1 uintptr, e1 Errno) {
510 r1 = uintptr(C.setgid(C.int(uid)))
511 e1 = syscall.GetErrno()
512 return
513 }
514
515 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
516
517 func callsetpriority(which int, who int, prio int) (r1 uintptr, e1 Errno) {
518 r1 = uintptr(C.setpriority(C.int(which), C.int(who), C.int(prio)))
519 e1 = syscall.GetErrno()
520 return
521 }
522
523 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
524
525 func callstatx(dirfd int, _p0 uintptr, flags int, mask int, stat uintptr) (r1 uintptr, e1 Errno) {
526 r1 = uintptr(C.statx(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.int(mask), C.uintptr_t(stat)))
527 e1 = syscall.GetErrno()
528 return
529 }
530
531 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
532
533 func callsync() (r1 uintptr, e1 Errno) {
534 r1 = uintptr(C.sync())
535 e1 = syscall.GetErrno()
536 return
537 }
538
539 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
540
541 func calltimes(tms uintptr) (r1 uintptr, e1 Errno) {
542 r1 = uintptr(C.times(C.uintptr_t(tms)))
543 e1 = syscall.GetErrno()
544 return
545 }
546
547 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
548
549 func callumask(mask int) (r1 uintptr, e1 Errno) {
550 r1 = uintptr(C.umask(C.int(mask)))
551 e1 = syscall.GetErrno()
552 return
553 }
554
555 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
556
557 func calluname(buf uintptr) (r1 uintptr, e1 Errno) {
558 r1 = uintptr(C.uname(C.uintptr_t(buf)))
559 e1 = syscall.GetErrno()
560 return
561 }
562
563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
564
565 func callunlink(_p0 uintptr) (r1 uintptr, e1 Errno) {
566 r1 = uintptr(C.unlink(C.uintptr_t(_p0)))
567 e1 = syscall.GetErrno()
568 return
569 }
570
571 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
572
573 func callunlinkat(dirfd int, _p0 uintptr, flags int) (r1 uintptr, e1 Errno) {
574 r1 = uintptr(C.unlinkat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags)))
575 e1 = syscall.GetErrno()
576 return
577 }
578
579 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
580
581 func callustat(dev int, ubuf uintptr) (r1 uintptr, e1 Errno) {
582 r1 = uintptr(C.ustat(C.int(dev), C.uintptr_t(ubuf)))
583 e1 = syscall.GetErrno()
584 return
585 }
586
587 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
588
589 func callwrite(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
590 r1 = uintptr(C.write(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0)))
591 e1 = syscall.GetErrno()
592 return
593 }
594
595 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
596
597 func calldup2(oldfd int, newfd int) (r1 uintptr, e1 Errno) {
598 r1 = uintptr(C.dup2(C.int(oldfd), C.int(newfd)))
599 e1 = syscall.GetErrno()
600 return
601 }
602
603 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
604
605 func callposix_fadvise64(fd int, offset int64, length int64, advice int) (r1 uintptr, e1 Errno) {
606 r1 = uintptr(C.posix_fadvise64(C.int(fd), C.longlong(offset), C.longlong(length), C.int(advice)))
607 e1 = syscall.GetErrno()
608 return
609 }
610
611 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
612
613 func callfchown(fd int, uid int, gid int) (r1 uintptr, e1 Errno) {
614 r1 = uintptr(C.fchown(C.int(fd), C.int(uid), C.int(gid)))
615 e1 = syscall.GetErrno()
616 return
617 }
618
619 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
620
621 func callfstat(fd int, stat uintptr) (r1 uintptr, e1 Errno) {
622 r1 = uintptr(C.fstat(C.int(fd), C.uintptr_t(stat)))
623 e1 = syscall.GetErrno()
624 return
625 }
626
627 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
628
629 func callfstatat(dirfd int, _p0 uintptr, stat uintptr, flags int) (r1 uintptr, e1 Errno) {
630 r1 = uintptr(C.fstatat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(stat), C.int(flags)))
631 e1 = syscall.GetErrno()
632 return
633 }
634
635 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
636
637 func callfstatfs(fd int, buf uintptr) (r1 uintptr, e1 Errno) {
638 r1 = uintptr(C.fstatfs(C.int(fd), C.uintptr_t(buf)))
639 e1 = syscall.GetErrno()
640 return
641 }
642
643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
644
645 func callftruncate(fd int, length int64) (r1 uintptr, e1 Errno) {
646 r1 = uintptr(C.ftruncate(C.int(fd), C.longlong(length)))
647 e1 = syscall.GetErrno()
648 return
649 }
650
651 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
652
653 func callgetegid() (r1 uintptr, e1 Errno) {
654 r1 = uintptr(C.getegid())
655 e1 = syscall.GetErrno()
656 return
657 }
658
659 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
660
661 func callgeteuid() (r1 uintptr, e1 Errno) {
662 r1 = uintptr(C.geteuid())
663 e1 = syscall.GetErrno()
664 return
665 }
666
667 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
668
669 func callgetgid() (r1 uintptr, e1 Errno) {
670 r1 = uintptr(C.getgid())
671 e1 = syscall.GetErrno()
672 return
673 }
674
675 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
676
677 func callgetuid() (r1 uintptr, e1 Errno) {
678 r1 = uintptr(C.getuid())
679 e1 = syscall.GetErrno()
680 return
681 }
682
683 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
684
685 func calllchown(_p0 uintptr, uid int, gid int) (r1 uintptr, e1 Errno) {
686 r1 = uintptr(C.lchown(C.uintptr_t(_p0), C.int(uid), C.int(gid)))
687 e1 = syscall.GetErrno()
688 return
689 }
690
691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
692
693 func calllisten(s int, n int) (r1 uintptr, e1 Errno) {
694 r1 = uintptr(C.listen(C.int(s), C.int(n)))
695 e1 = syscall.GetErrno()
696 return
697 }
698
699 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
700
701 func calllstat(_p0 uintptr, stat uintptr) (r1 uintptr, e1 Errno) {
702 r1 = uintptr(C.lstat(C.uintptr_t(_p0), C.uintptr_t(stat)))
703 e1 = syscall.GetErrno()
704 return
705 }
706
707 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
708
709 func callpause() (r1 uintptr, e1 Errno) {
710 r1 = uintptr(C.pause())
711 e1 = syscall.GetErrno()
712 return
713 }
714
715 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
716
717 func callpread64(fd int, _p0 uintptr, _lenp0 int, offset int64) (r1 uintptr, e1 Errno) {
718 r1 = uintptr(C.pread64(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0), C.longlong(offset)))
719 e1 = syscall.GetErrno()
720 return
721 }
722
723 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
724
725 func callpwrite64(fd int, _p0 uintptr, _lenp0 int, offset int64) (r1 uintptr, e1 Errno) {
726 r1 = uintptr(C.pwrite64(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0), C.longlong(offset)))
727 e1 = syscall.GetErrno()
728 return
729 }
730
731 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
732
733 func callpselect(nfd int, r uintptr, w uintptr, e uintptr, timeout uintptr, sigmask uintptr) (r1 uintptr, e1 Errno) {
734 r1 = uintptr(C.pselect(C.int(nfd), C.uintptr_t(r), C.uintptr_t(w), C.uintptr_t(e), C.uintptr_t(timeout), C.uintptr_t(sigmask)))
735 e1 = syscall.GetErrno()
736 return
737 }
738
739 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
740
741 func callsetregid(rgid int, egid int) (r1 uintptr, e1 Errno) {
742 r1 = uintptr(C.setregid(C.int(rgid), C.int(egid)))
743 e1 = syscall.GetErrno()
744 return
745 }
746
747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
748
749 func callsetreuid(ruid int, euid int) (r1 uintptr, e1 Errno) {
750 r1 = uintptr(C.setreuid(C.int(ruid), C.int(euid)))
751 e1 = syscall.GetErrno()
752 return
753 }
754
755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
756
757 func callshutdown(fd int, how int) (r1 uintptr, e1 Errno) {
758 r1 = uintptr(C.shutdown(C.int(fd), C.int(how)))
759 e1 = syscall.GetErrno()
760 return
761 }
762
763 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
764
765 func callsplice(rfd int, roff uintptr, wfd int, woff uintptr, len int, flags int) (r1 uintptr, e1 Errno) {
766 r1 = uintptr(C.splice(C.int(rfd), C.uintptr_t(roff), C.int(wfd), C.uintptr_t(woff), C.int(len), C.int(flags)))
767 e1 = syscall.GetErrno()
768 return
769 }
770
771 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
772
773 func callstat(_p0 uintptr, stat uintptr) (r1 uintptr, e1 Errno) {
774 r1 = uintptr(C.stat(C.uintptr_t(_p0), C.uintptr_t(stat)))
775 e1 = syscall.GetErrno()
776 return
777 }
778
779 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
780
781 func callstatfs(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) {
782 r1 = uintptr(C.statfs(C.uintptr_t(_p0), C.uintptr_t(buf)))
783 e1 = syscall.GetErrno()
784 return
785 }
786
787 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
788
789 func calltruncate(_p0 uintptr, length int64) (r1 uintptr, e1 Errno) {
790 r1 = uintptr(C.truncate(C.uintptr_t(_p0), C.longlong(length)))
791 e1 = syscall.GetErrno()
792 return
793 }
794
795 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
796
797 func callbind(s int, addr uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {
798 r1 = uintptr(C.bind(C.int(s), C.uintptr_t(addr), C.uintptr_t(addrlen)))
799 e1 = syscall.GetErrno()
800 return
801 }
802
803 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
804
805 func callconnect(s int, addr uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {
806 r1 = uintptr(C.connect(C.int(s), C.uintptr_t(addr), C.uintptr_t(addrlen)))
807 e1 = syscall.GetErrno()
808 return
809 }
810
811 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
812
813 func callgetgroups(n int, list uintptr) (r1 uintptr, e1 Errno) {
814 r1 = uintptr(C.getgroups(C.int(n), C.uintptr_t(list)))
815 e1 = syscall.GetErrno()
816 return
817 }
818
819 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
820
821 func callsetgroups(n int, list uintptr) (r1 uintptr, e1 Errno) {
822 r1 = uintptr(C.setgroups(C.int(n), C.uintptr_t(list)))
823 e1 = syscall.GetErrno()
824 return
825 }
826
827 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
828
829 func callgetsockopt(s int, level int, name int, val uintptr, vallen uintptr) (r1 uintptr, e1 Errno) {
830 r1 = uintptr(C.getsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(val), C.uintptr_t(vallen)))
831 e1 = syscall.GetErrno()
832 return
833 }
834
835 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
836
837 func callsetsockopt(s int, level int, name int, val uintptr, vallen uintptr) (r1 uintptr, e1 Errno) {
838 r1 = uintptr(C.setsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(val), C.uintptr_t(vallen)))
839 e1 = syscall.GetErrno()
840 return
841 }
842
843 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
844
845 func callsocket(domain int, typ int, proto int) (r1 uintptr, e1 Errno) {
846 r1 = uintptr(C.socket(C.int(domain), C.int(typ), C.int(proto)))
847 e1 = syscall.GetErrno()
848 return
849 }
850
851 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
852
853 func callsocketpair(domain int, typ int, proto int, fd uintptr) (r1 uintptr, e1 Errno) {
854 r1 = uintptr(C.socketpair(C.int(domain), C.int(typ), C.int(proto), C.uintptr_t(fd)))
855 e1 = syscall.GetErrno()
856 return
857 }
858
859 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
860
861 func callgetpeername(fd int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {
862 r1 = uintptr(C.getpeername(C.int(fd), C.uintptr_t(rsa), C.uintptr_t(addrlen)))
863 e1 = syscall.GetErrno()
864 return
865 }
866
867 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
868
869 func callgetsockname(fd int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {
870 r1 = uintptr(C.getsockname(C.int(fd), C.uintptr_t(rsa), C.uintptr_t(addrlen)))
871 e1 = syscall.GetErrno()
872 return
873 }
874
875 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
876
877 func callrecvfrom(fd int, _p0 uintptr, _lenp0 int, flags int, from uintptr, fromlen uintptr) (r1 uintptr, e1 Errno) {
878 r1 = uintptr(C.recvfrom(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0), C.int(flags), C.uintptr_t(from), C.uintptr_t(fromlen)))
879 e1 = syscall.GetErrno()
880 return
881 }
882
883 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
884
885 func callsendto(s int, _p0 uintptr, _lenp0 int, flags int, to uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {
886 r1 = uintptr(C.sendto(C.int(s), C.uintptr_t(_p0), C.size_t(_lenp0), C.int(flags), C.uintptr_t(to), C.uintptr_t(addrlen)))
887 e1 = syscall.GetErrno()
888 return
889 }
890
891 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
892
893 func callrecvmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {
894 r1 = uintptr(C.recvmsg(C.int(s), C.uintptr_t(msg), C.int(flags)))
895 e1 = syscall.GetErrno()
896 return
897 }
898
899 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
900
901 func callsendmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {
902 r1 = uintptr(C.sendmsg(C.int(s), C.uintptr_t(msg), C.int(flags)))
903 e1 = syscall.GetErrno()
904 return
905 }
906
907 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
908
909 func callmunmap(addr uintptr, length uintptr) (r1 uintptr, e1 Errno) {
910 r1 = uintptr(C.munmap(C.uintptr_t(addr), C.uintptr_t(length)))
911 e1 = syscall.GetErrno()
912 return
913 }
914
915 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
916
917 func callmadvise(_p0 uintptr, _lenp0 int, advice int) (r1 uintptr, e1 Errno) {
918 r1 = uintptr(C.madvise(C.uintptr_t(_p0), C.size_t(_lenp0), C.int(advice)))
919 e1 = syscall.GetErrno()
920 return
921 }
922
923 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
924
925 func callmprotect(_p0 uintptr, _lenp0 int, prot int) (r1 uintptr, e1 Errno) {
926 r1 = uintptr(C.mprotect(C.uintptr_t(_p0), C.size_t(_lenp0), C.int(prot)))
927 e1 = syscall.GetErrno()
928 return
929 }
930
931 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
932
933 func callmlock(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
934 r1 = uintptr(C.mlock(C.uintptr_t(_p0), C.size_t(_lenp0)))
935 e1 = syscall.GetErrno()
936 return
937 }
938
939 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
940
941 func callmlockall(flags int) (r1 uintptr, e1 Errno) {
942 r1 = uintptr(C.mlockall(C.int(flags)))
943 e1 = syscall.GetErrno()
944 return
945 }
946
947 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
948
949 func callmsync(_p0 uintptr, _lenp0 int, flags int) (r1 uintptr, e1 Errno) {
950 r1 = uintptr(C.msync(C.uintptr_t(_p0), C.size_t(_lenp0), C.int(flags)))
951 e1 = syscall.GetErrno()
952 return
953 }
954
955 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
956
957 func callmunlock(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {
958 r1 = uintptr(C.munlock(C.uintptr_t(_p0), C.size_t(_lenp0)))
959 e1 = syscall.GetErrno()
960 return
961 }
962
963 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
964
965 func callmunlockall() (r1 uintptr, e1 Errno) {
966 r1 = uintptr(C.munlockall())
967 e1 = syscall.GetErrno()
968 return
969 }
970
971 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
972
973 func callpipe(p uintptr) (r1 uintptr, e1 Errno) {
974 r1 = uintptr(C.pipe(C.uintptr_t(p)))
975 e1 = syscall.GetErrno()
976 return
977 }
978
979 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
980
981 func callpoll(fds uintptr, nfds int, timeout int) (r1 uintptr, e1 Errno) {
982 r1 = uintptr(C.poll(C.uintptr_t(fds), C.int(nfds), C.int(timeout)))
983 e1 = syscall.GetErrno()
984 return
985 }
986
987 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
988
989 func callgettimeofday(tv uintptr, tzp uintptr) (r1 uintptr, e1 Errno) {
990 r1 = uintptr(C.gettimeofday(C.uintptr_t(tv), C.uintptr_t(tzp)))
991 e1 = syscall.GetErrno()
992 return
993 }
994
995 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
996
997 func calltime(t uintptr) (r1 uintptr, e1 Errno) {
998 r1 = uintptr(C.time(C.uintptr_t(t)))
999 e1 = syscall.GetErrno()
1000 return
1001 }
1002
1003 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1004
1005 func callutime(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) {
1006 r1 = uintptr(C.utime(C.uintptr_t(_p0), C.uintptr_t(buf)))
1007 e1 = syscall.GetErrno()
1008 return
1009 }
1010
1011 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1012
1013 func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
1014 r1 = uintptr(C.getrlimit(C.int(resource), C.uintptr_t(rlim)))
1015 e1 = syscall.GetErrno()
1016 return
1017 }
1018
1019 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1020
1021 func callsetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
1022 r1 = uintptr(C.setrlimit(C.int(resource), C.uintptr_t(rlim)))
1023 e1 = syscall.GetErrno()
1024 return
1025 }
1026
1027 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1028
1029 func calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) {
1030 r1 = uintptr(C.lseek(C.int(fd), C.longlong(offset), C.int(whence)))
1031 e1 = syscall.GetErrno()
1032 return
1033 }
1034
1035 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1036
1037 func callmmap64(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (r1 uintptr, e1 Errno) {
1038 r1 = uintptr(C.mmap64(C.uintptr_t(addr), C.uintptr_t(length), C.int(prot), C.int(flags), C.int(fd), C.longlong(offset)))
1039 e1 = syscall.GetErrno()
1040 return
1041 }
0 // go run mksyscall.go -l32 -tags darwin,386,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build darwin,386,!go1.12
4
5 package unix
6
7 import (
8 "syscall"
9 "unsafe"
10 )
11
12 var _ syscall.Errno
13
14 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15
16 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
17 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
18 n = int(r0)
19 if e1 != 0 {
20 err = errnoErr(e1)
21 }
22 return
23 }
24
25 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
26
27 func setgroups(ngid int, gid *_Gid_t) (err error) {
28 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
29 if e1 != 0 {
30 err = errnoErr(e1)
31 }
32 return
33 }
34
35 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
36
37 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
38 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
39 wpid = int(r0)
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
49 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
50 fd = int(r0)
51 if e1 != 0 {
52 err = errnoErr(e1)
53 }
54 return
55 }
56
57 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
58
59 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
60 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
61 if e1 != 0 {
62 err = errnoErr(e1)
63 }
64 return
65 }
66
67 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
68
69 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
70 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
71 if e1 != 0 {
72 err = errnoErr(e1)
73 }
74 return
75 }
76
77 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
78
79 func socket(domain int, typ int, proto int) (fd int, err error) {
80 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
81 fd = int(r0)
82 if e1 != 0 {
83 err = errnoErr(e1)
84 }
85 return
86 }
87
88 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
89
90 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
91 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
92 if e1 != 0 {
93 err = errnoErr(e1)
94 }
95 return
96 }
97
98 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
99
100 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
101 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
102 if e1 != 0 {
103 err = errnoErr(e1)
104 }
105 return
106 }
107
108 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
109
110 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
111 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
112 if e1 != 0 {
113 err = errnoErr(e1)
114 }
115 return
116 }
117
118 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
119
120 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
121 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
122 if e1 != 0 {
123 err = errnoErr(e1)
124 }
125 return
126 }
127
128 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
129
130 func Shutdown(s int, how int) (err error) {
131 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
132 if e1 != 0 {
133 err = errnoErr(e1)
134 }
135 return
136 }
137
138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
139
140 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
141 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
142 if e1 != 0 {
143 err = errnoErr(e1)
144 }
145 return
146 }
147
148 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
149
150 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
151 var _p0 unsafe.Pointer
152 if len(p) > 0 {
153 _p0 = unsafe.Pointer(&p[0])
154 } else {
155 _p0 = unsafe.Pointer(&_zero)
156 }
157 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
158 n = int(r0)
159 if e1 != 0 {
160 err = errnoErr(e1)
161 }
162 return
163 }
164
165 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
166
167 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
168 var _p0 unsafe.Pointer
169 if len(buf) > 0 {
170 _p0 = unsafe.Pointer(&buf[0])
171 } else {
172 _p0 = unsafe.Pointer(&_zero)
173 }
174 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
175 if e1 != 0 {
176 err = errnoErr(e1)
177 }
178 return
179 }
180
181 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
182
183 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
184 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
185 n = int(r0)
186 if e1 != 0 {
187 err = errnoErr(e1)
188 }
189 return
190 }
191
192 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
193
194 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
195 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
196 n = int(r0)
197 if e1 != 0 {
198 err = errnoErr(e1)
199 }
200 return
201 }
202
203 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
204
205 func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
206 r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
207 n = int(r0)
208 if e1 != 0 {
209 err = errnoErr(e1)
210 }
211 return
212 }
213
214 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
215
216 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
217 var _p0 unsafe.Pointer
218 if len(mib) > 0 {
219 _p0 = unsafe.Pointer(&mib[0])
220 } else {
221 _p0 = unsafe.Pointer(&_zero)
222 }
223 _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
224 if e1 != 0 {
225 err = errnoErr(e1)
226 }
227 return
228 }
229
230 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
231
232 func utimes(path string, timeval *[2]Timeval) (err error) {
233 var _p0 *byte
234 _p0, err = BytePtrFromString(path)
235 if err != nil {
236 return
237 }
238 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
239 if e1 != 0 {
240 err = errnoErr(e1)
241 }
242 return
243 }
244
245 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
246
247 func futimes(fd int, timeval *[2]Timeval) (err error) {
248 _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
249 if e1 != 0 {
250 err = errnoErr(e1)
251 }
252 return
253 }
254
255 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
256
257 func fcntl(fd int, cmd int, arg int) (val int, err error) {
258 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
259 val = int(r0)
260 if e1 != 0 {
261 err = errnoErr(e1)
262 }
263 return
264 }
265
266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
279 func Madvise(b []byte, behav int) (err error) {
280 var _p0 unsafe.Pointer
281 if len(b) > 0 {
282 _p0 = unsafe.Pointer(&b[0])
283 } else {
284 _p0 = unsafe.Pointer(&_zero)
285 }
286 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
287 if e1 != 0 {
288 err = errnoErr(e1)
289 }
290 return
291 }
292
293 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
294
295 func Mlock(b []byte) (err error) {
296 var _p0 unsafe.Pointer
297 if len(b) > 0 {
298 _p0 = unsafe.Pointer(&b[0])
299 } else {
300 _p0 = unsafe.Pointer(&_zero)
301 }
302 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
303 if e1 != 0 {
304 err = errnoErr(e1)
305 }
306 return
307 }
308
309 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
310
311 func Mlockall(flags int) (err error) {
312 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
313 if e1 != 0 {
314 err = errnoErr(e1)
315 }
316 return
317 }
318
319 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
320
321 func Mprotect(b []byte, prot int) (err error) {
322 var _p0 unsafe.Pointer
323 if len(b) > 0 {
324 _p0 = unsafe.Pointer(&b[0])
325 } else {
326 _p0 = unsafe.Pointer(&_zero)
327 }
328 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
329 if e1 != 0 {
330 err = errnoErr(e1)
331 }
332 return
333 }
334
335 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
336
337 func Msync(b []byte, flags int) (err error) {
338 var _p0 unsafe.Pointer
339 if len(b) > 0 {
340 _p0 = unsafe.Pointer(&b[0])
341 } else {
342 _p0 = unsafe.Pointer(&_zero)
343 }
344 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
345 if e1 != 0 {
346 err = errnoErr(e1)
347 }
348 return
349 }
350
351 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
352
353 func Munlock(b []byte) (err error) {
354 var _p0 unsafe.Pointer
355 if len(b) > 0 {
356 _p0 = unsafe.Pointer(&b[0])
357 } else {
358 _p0 = unsafe.Pointer(&_zero)
359 }
360 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
361 if e1 != 0 {
362 err = errnoErr(e1)
363 }
364 return
365 }
366
367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
368
369 func Munlockall() (err error) {
370 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
371 if e1 != 0 {
372 err = errnoErr(e1)
373 }
374 return
375 }
376
377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
378
379 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
380 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
381 if e1 != 0 {
382 err = errnoErr(e1)
383 }
384 return
385 }
386
387 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
388
389 func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
390 _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
391 if e1 != 0 {
392 err = errnoErr(e1)
393 }
394 return
395 }
396
397 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
398
399 func pipe() (r int, w int, err error) {
400 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
401 r = int(r0)
402 w = int(r1)
403 if e1 != 0 {
404 err = errnoErr(e1)
405 }
406 return
407 }
408
409 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
410
411 func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
412 var _p0 *byte
413 _p0, err = BytePtrFromString(path)
414 if err != nil {
415 return
416 }
417 var _p1 *byte
418 _p1, err = BytePtrFromString(attr)
419 if err != nil {
420 return
421 }
422 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
423 sz = int(r0)
424 if e1 != 0 {
425 err = errnoErr(e1)
426 }
427 return
428 }
429
430 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
431
432 func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
433 var _p0 *byte
434 _p0, err = BytePtrFromString(attr)
435 if err != nil {
436 return
437 }
438 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
439 sz = int(r0)
440 if e1 != 0 {
441 err = errnoErr(e1)
442 }
443 return
444 }
445
446 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
447
448 func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
449 var _p0 *byte
450 _p0, err = BytePtrFromString(path)
451 if err != nil {
452 return
453 }
454 var _p1 *byte
455 _p1, err = BytePtrFromString(attr)
456 if err != nil {
457 return
458 }
459 _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
460 if e1 != 0 {
461 err = errnoErr(e1)
462 }
463 return
464 }
465
466 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
467
468 func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
469 var _p0 *byte
470 _p0, err = BytePtrFromString(attr)
471 if err != nil {
472 return
473 }
474 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
475 if e1 != 0 {
476 err = errnoErr(e1)
477 }
478 return
479 }
480
481 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
482
483 func removexattr(path string, attr string, options int) (err error) {
484 var _p0 *byte
485 _p0, err = BytePtrFromString(path)
486 if err != nil {
487 return
488 }
489 var _p1 *byte
490 _p1, err = BytePtrFromString(attr)
491 if err != nil {
492 return
493 }
494 _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
495 if e1 != 0 {
496 err = errnoErr(e1)
497 }
498 return
499 }
500
501 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
502
503 func fremovexattr(fd int, attr string, options int) (err error) {
504 var _p0 *byte
505 _p0, err = BytePtrFromString(attr)
506 if err != nil {
507 return
508 }
509 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
510 if e1 != 0 {
511 err = errnoErr(e1)
512 }
513 return
514 }
515
516 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
517
518 func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
519 var _p0 *byte
520 _p0, err = BytePtrFromString(path)
521 if err != nil {
522 return
523 }
524 r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
525 sz = int(r0)
526 if e1 != 0 {
527 err = errnoErr(e1)
528 }
529 return
530 }
531
532 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
533
534 func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
535 r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
536 sz = int(r0)
537 if e1 != 0 {
538 err = errnoErr(e1)
539 }
540 return
541 }
542
543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
544
545 func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
546 _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
547 if e1 != 0 {
548 err = errnoErr(e1)
549 }
550 return
551 }
552
553 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
554
555 func kill(pid int, signum int, posix int) (err error) {
556 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
557 if e1 != 0 {
558 err = errnoErr(e1)
559 }
560 return
561 }
562
563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
564
565 func ioctl(fd int, req uint, arg uintptr) (err error) {
566 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
567 if e1 != 0 {
568 err = errnoErr(e1)
569 }
570 return
571 }
572
573 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
574
575 func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
576 _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
577 if e1 != 0 {
578 err = errnoErr(e1)
579 }
580 return
581 }
582
583 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
584
585 func Access(path string, mode uint32) (err error) {
586 var _p0 *byte
587 _p0, err = BytePtrFromString(path)
588 if err != nil {
589 return
590 }
591 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
592 if e1 != 0 {
593 err = errnoErr(e1)
594 }
595 return
596 }
597
598 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
599
600 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
601 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
602 if e1 != 0 {
603 err = errnoErr(e1)
604 }
605 return
606 }
607
608 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
609
610 func Chdir(path string) (err error) {
611 var _p0 *byte
612 _p0, err = BytePtrFromString(path)
613 if err != nil {
614 return
615 }
616 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
617 if e1 != 0 {
618 err = errnoErr(e1)
619 }
620 return
621 }
622
623 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
624
625 func Chflags(path string, flags int) (err error) {
626 var _p0 *byte
627 _p0, err = BytePtrFromString(path)
628 if err != nil {
629 return
630 }
631 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
632 if e1 != 0 {
633 err = errnoErr(e1)
634 }
635 return
636 }
637
638 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
639
640 func Chmod(path string, mode uint32) (err error) {
641 var _p0 *byte
642 _p0, err = BytePtrFromString(path)
643 if err != nil {
644 return
645 }
646 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
647 if e1 != 0 {
648 err = errnoErr(e1)
649 }
650 return
651 }
652
653 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
654
655 func Chown(path string, uid int, gid int) (err error) {
656 var _p0 *byte
657 _p0, err = BytePtrFromString(path)
658 if err != nil {
659 return
660 }
661 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
662 if e1 != 0 {
663 err = errnoErr(e1)
664 }
665 return
666 }
667
668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
669
670 func Chroot(path string) (err error) {
671 var _p0 *byte
672 _p0, err = BytePtrFromString(path)
673 if err != nil {
674 return
675 }
676 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
677 if e1 != 0 {
678 err = errnoErr(e1)
679 }
680 return
681 }
682
683 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
684
685 func Close(fd int) (err error) {
686 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
687 if e1 != 0 {
688 err = errnoErr(e1)
689 }
690 return
691 }
692
693 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
694
695 func Dup(fd int) (nfd int, err error) {
696 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
697 nfd = int(r0)
698 if e1 != 0 {
699 err = errnoErr(e1)
700 }
701 return
702 }
703
704 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
705
706 func Dup2(from int, to int) (err error) {
707 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
708 if e1 != 0 {
709 err = errnoErr(e1)
710 }
711 return
712 }
713
714 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
715
716 func Exchangedata(path1 string, path2 string, options int) (err error) {
717 var _p0 *byte
718 _p0, err = BytePtrFromString(path1)
719 if err != nil {
720 return
721 }
722 var _p1 *byte
723 _p1, err = BytePtrFromString(path2)
724 if err != nil {
725 return
726 }
727 _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
728 if e1 != 0 {
729 err = errnoErr(e1)
730 }
731 return
732 }
733
734 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
735
736 func Exit(code int) {
737 Syscall(SYS_EXIT, uintptr(code), 0, 0)
738 return
739 }
740
741 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
742
743 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
744 var _p0 *byte
745 _p0, err = BytePtrFromString(path)
746 if err != nil {
747 return
748 }
749 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
750 if e1 != 0 {
751 err = errnoErr(e1)
752 }
753 return
754 }
755
756 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
757
758 func Fchdir(fd int) (err error) {
759 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
760 if e1 != 0 {
761 err = errnoErr(e1)
762 }
763 return
764 }
765
766 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
767
768 func Fchflags(fd int, flags int) (err error) {
769 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
770 if e1 != 0 {
771 err = errnoErr(e1)
772 }
773 return
774 }
775
776 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
777
778 func Fchmod(fd int, mode uint32) (err error) {
779 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
780 if e1 != 0 {
781 err = errnoErr(e1)
782 }
783 return
784 }
785
786 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
787
788 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
789 var _p0 *byte
790 _p0, err = BytePtrFromString(path)
791 if err != nil {
792 return
793 }
794 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
795 if e1 != 0 {
796 err = errnoErr(e1)
797 }
798 return
799 }
800
801 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
802
803 func Fchown(fd int, uid int, gid int) (err error) {
804 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
805 if e1 != 0 {
806 err = errnoErr(e1)
807 }
808 return
809 }
810
811 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
812
813 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
814 var _p0 *byte
815 _p0, err = BytePtrFromString(path)
816 if err != nil {
817 return
818 }
819 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
820 if e1 != 0 {
821 err = errnoErr(e1)
822 }
823 return
824 }
825
826 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
827
828 func Flock(fd int, how int) (err error) {
829 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
830 if e1 != 0 {
831 err = errnoErr(e1)
832 }
833 return
834 }
835
836 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
837
838 func Fpathconf(fd int, name int) (val int, err error) {
839 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
840 val = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func Fsync(fd int) (err error) {
850 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
851 if e1 != 0 {
852 err = errnoErr(e1)
853 }
854 return
855 }
856
857 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
858
859 func Ftruncate(fd int, length int64) (err error) {
860 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
861 if e1 != 0 {
862 err = errnoErr(e1)
863 }
864 return
865 }
866
867 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
868
869 func Getdtablesize() (size int) {
870 r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
871 size = int(r0)
872 return
873 }
874
875 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
876
877 func Getegid() (egid int) {
878 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
879 egid = int(r0)
880 return
881 }
882
883 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
884
885 func Geteuid() (uid int) {
886 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
887 uid = int(r0)
888 return
889 }
890
891 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
892
893 func Getgid() (gid int) {
894 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
895 gid = int(r0)
896 return
897 }
898
899 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
900
901 func Getpgid(pid int) (pgid int, err error) {
902 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
903 pgid = int(r0)
904 if e1 != 0 {
905 err = errnoErr(e1)
906 }
907 return
908 }
909
910 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
911
912 func Getpgrp() (pgrp int) {
913 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
914 pgrp = int(r0)
915 return
916 }
917
918 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
919
920 func Getpid() (pid int) {
921 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
922 pid = int(r0)
923 return
924 }
925
926 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
927
928 func Getppid() (ppid int) {
929 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
930 ppid = int(r0)
931 return
932 }
933
934 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
935
936 func Getpriority(which int, who int) (prio int, err error) {
937 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
938 prio = int(r0)
939 if e1 != 0 {
940 err = errnoErr(e1)
941 }
942 return
943 }
944
945 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
946
947 func Getrlimit(which int, lim *Rlimit) (err error) {
948 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
949 if e1 != 0 {
950 err = errnoErr(e1)
951 }
952 return
953 }
954
955 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
956
957 func Getrusage(who int, rusage *Rusage) (err error) {
958 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
959 if e1 != 0 {
960 err = errnoErr(e1)
961 }
962 return
963 }
964
965 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
966
967 func Getsid(pid int) (sid int, err error) {
968 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
969 sid = int(r0)
970 if e1 != 0 {
971 err = errnoErr(e1)
972 }
973 return
974 }
975
976 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
977
978 func Getuid() (uid int) {
979 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
980 uid = int(r0)
981 return
982 }
983
984 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
985
986 func Issetugid() (tainted bool) {
987 r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
988 tainted = bool(r0 != 0)
989 return
990 }
991
992 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
993
994 func Kqueue() (fd int, err error) {
995 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
996 fd = int(r0)
997 if e1 != 0 {
998 err = errnoErr(e1)
999 }
1000 return
1001 }
1002
1003 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1004
1005 func Lchown(path string, uid int, gid int) (err error) {
1006 var _p0 *byte
1007 _p0, err = BytePtrFromString(path)
1008 if err != nil {
1009 return
1010 }
1011 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
1012 if e1 != 0 {
1013 err = errnoErr(e1)
1014 }
1015 return
1016 }
1017
1018 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1019
1020 func Link(path string, link string) (err error) {
1021 var _p0 *byte
1022 _p0, err = BytePtrFromString(path)
1023 if err != nil {
1024 return
1025 }
1026 var _p1 *byte
1027 _p1, err = BytePtrFromString(link)
1028 if err != nil {
1029 return
1030 }
1031 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1032 if e1 != 0 {
1033 err = errnoErr(e1)
1034 }
1035 return
1036 }
1037
1038 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1039
1040 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
1041 var _p0 *byte
1042 _p0, err = BytePtrFromString(path)
1043 if err != nil {
1044 return
1045 }
1046 var _p1 *byte
1047 _p1, err = BytePtrFromString(link)
1048 if err != nil {
1049 return
1050 }
1051 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1052 if e1 != 0 {
1053 err = errnoErr(e1)
1054 }
1055 return
1056 }
1057
1058 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1059
1060 func Listen(s int, backlog int) (err error) {
1061 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
1062 if e1 != 0 {
1063 err = errnoErr(e1)
1064 }
1065 return
1066 }
1067
1068 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1069
1070 func Mkdir(path string, mode uint32) (err error) {
1071 var _p0 *byte
1072 _p0, err = BytePtrFromString(path)
1073 if err != nil {
1074 return
1075 }
1076 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1077 if e1 != 0 {
1078 err = errnoErr(e1)
1079 }
1080 return
1081 }
1082
1083 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1084
1085 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1086 var _p0 *byte
1087 _p0, err = BytePtrFromString(path)
1088 if err != nil {
1089 return
1090 }
1091 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1092 if e1 != 0 {
1093 err = errnoErr(e1)
1094 }
1095 return
1096 }
1097
1098 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1099
1100 func Mkfifo(path string, mode uint32) (err error) {
1101 var _p0 *byte
1102 _p0, err = BytePtrFromString(path)
1103 if err != nil {
1104 return
1105 }
1106 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1107 if e1 != 0 {
1108 err = errnoErr(e1)
1109 }
1110 return
1111 }
1112
1113 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1114
1115 func Mknod(path string, mode uint32, dev int) (err error) {
1116 var _p0 *byte
1117 _p0, err = BytePtrFromString(path)
1118 if err != nil {
1119 return
1120 }
1121 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1122 if e1 != 0 {
1123 err = errnoErr(e1)
1124 }
1125 return
1126 }
1127
1128 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1129
1130 func Open(path string, mode int, perm uint32) (fd int, err error) {
1131 var _p0 *byte
1132 _p0, err = BytePtrFromString(path)
1133 if err != nil {
1134 return
1135 }
1136 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1137 fd = int(r0)
1138 if e1 != 0 {
1139 err = errnoErr(e1)
1140 }
1141 return
1142 }
1143
1144 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1145
1146 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1147 var _p0 *byte
1148 _p0, err = BytePtrFromString(path)
1149 if err != nil {
1150 return
1151 }
1152 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
1153 fd = int(r0)
1154 if e1 != 0 {
1155 err = errnoErr(e1)
1156 }
1157 return
1158 }
1159
1160 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1161
1162 func Pathconf(path string, name int) (val int, err error) {
1163 var _p0 *byte
1164 _p0, err = BytePtrFromString(path)
1165 if err != nil {
1166 return
1167 }
1168 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1169 val = int(r0)
1170 if e1 != 0 {
1171 err = errnoErr(e1)
1172 }
1173 return
1174 }
1175
1176 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1177
1178 func Pread(fd int, p []byte, offset int64) (n int, err error) {
1179 var _p0 unsafe.Pointer
1180 if len(p) > 0 {
1181 _p0 = unsafe.Pointer(&p[0])
1182 } else {
1183 _p0 = unsafe.Pointer(&_zero)
1184 }
1185 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
1186 n = int(r0)
1187 if e1 != 0 {
1188 err = errnoErr(e1)
1189 }
1190 return
1191 }
1192
1193 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1194
1195 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
1196 var _p0 unsafe.Pointer
1197 if len(p) > 0 {
1198 _p0 = unsafe.Pointer(&p[0])
1199 } else {
1200 _p0 = unsafe.Pointer(&_zero)
1201 }
1202 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
1203 n = int(r0)
1204 if e1 != 0 {
1205 err = errnoErr(e1)
1206 }
1207 return
1208 }
1209
1210 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1211
1212 func read(fd int, p []byte) (n int, err error) {
1213 var _p0 unsafe.Pointer
1214 if len(p) > 0 {
1215 _p0 = unsafe.Pointer(&p[0])
1216 } else {
1217 _p0 = unsafe.Pointer(&_zero)
1218 }
1219 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1220 n = int(r0)
1221 if e1 != 0 {
1222 err = errnoErr(e1)
1223 }
1224 return
1225 }
1226
1227 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1228
1229 func Readlink(path string, buf []byte) (n int, err error) {
1230 var _p0 *byte
1231 _p0, err = BytePtrFromString(path)
1232 if err != nil {
1233 return
1234 }
1235 var _p1 unsafe.Pointer
1236 if len(buf) > 0 {
1237 _p1 = unsafe.Pointer(&buf[0])
1238 } else {
1239 _p1 = unsafe.Pointer(&_zero)
1240 }
1241 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1242 n = int(r0)
1243 if e1 != 0 {
1244 err = errnoErr(e1)
1245 }
1246 return
1247 }
1248
1249 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1250
1251 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1252 var _p0 *byte
1253 _p0, err = BytePtrFromString(path)
1254 if err != nil {
1255 return
1256 }
1257 var _p1 unsafe.Pointer
1258 if len(buf) > 0 {
1259 _p1 = unsafe.Pointer(&buf[0])
1260 } else {
1261 _p1 = unsafe.Pointer(&_zero)
1262 }
1263 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1264 n = int(r0)
1265 if e1 != 0 {
1266 err = errnoErr(e1)
1267 }
1268 return
1269 }
1270
1271 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1272
1273 func Rename(from string, to string) (err error) {
1274 var _p0 *byte
1275 _p0, err = BytePtrFromString(from)
1276 if err != nil {
1277 return
1278 }
1279 var _p1 *byte
1280 _p1, err = BytePtrFromString(to)
1281 if err != nil {
1282 return
1283 }
1284 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1285 if e1 != 0 {
1286 err = errnoErr(e1)
1287 }
1288 return
1289 }
1290
1291 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1292
1293 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1294 var _p0 *byte
1295 _p0, err = BytePtrFromString(from)
1296 if err != nil {
1297 return
1298 }
1299 var _p1 *byte
1300 _p1, err = BytePtrFromString(to)
1301 if err != nil {
1302 return
1303 }
1304 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1305 if e1 != 0 {
1306 err = errnoErr(e1)
1307 }
1308 return
1309 }
1310
1311 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1312
1313 func Revoke(path string) (err error) {
1314 var _p0 *byte
1315 _p0, err = BytePtrFromString(path)
1316 if err != nil {
1317 return
1318 }
1319 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1320 if e1 != 0 {
1321 err = errnoErr(e1)
1322 }
1323 return
1324 }
1325
1326 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1327
1328 func Rmdir(path string) (err error) {
1329 var _p0 *byte
1330 _p0, err = BytePtrFromString(path)
1331 if err != nil {
1332 return
1333 }
1334 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
1335 if e1 != 0 {
1336 err = errnoErr(e1)
1337 }
1338 return
1339 }
1340
1341 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1342
1343 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1344 r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
1345 newoffset = int64(int64(r1)<<32 | int64(r0))
1346 if e1 != 0 {
1347 err = errnoErr(e1)
1348 }
1349 return
1350 }
1351
1352 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1353
1354 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1355 _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1356 if e1 != 0 {
1357 err = errnoErr(e1)
1358 }
1359 return
1360 }
1361
1362 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1363
1364 func Setegid(egid int) (err error) {
1365 _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
1366 if e1 != 0 {
1367 err = errnoErr(e1)
1368 }
1369 return
1370 }
1371
1372 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1373
1374 func Seteuid(euid int) (err error) {
1375 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
1384 func Setgid(gid int) (err error) {
1385 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
1386 if e1 != 0 {
1387 err = errnoErr(e1)
1388 }
1389 return
1390 }
1391
1392 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1393
1394 func Setlogin(name string) (err error) {
1395 var _p0 *byte
1396 _p0, err = BytePtrFromString(name)
1397 if err != nil {
1398 return
1399 }
1400 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
1401 if e1 != 0 {
1402 err = errnoErr(e1)
1403 }
1404 return
1405 }
1406
1407 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1408
1409 func Setpgid(pid int, pgid int) (err error) {
1410 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
1411 if e1 != 0 {
1412 err = errnoErr(e1)
1413 }
1414 return
1415 }
1416
1417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1418
1419 func Setpriority(which int, who int, prio int) (err error) {
1420 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
1421 if e1 != 0 {
1422 err = errnoErr(e1)
1423 }
1424 return
1425 }
1426
1427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1428
1429 func Setprivexec(flag int) (err error) {
1430 _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
1431 if e1 != 0 {
1432 err = errnoErr(e1)
1433 }
1434 return
1435 }
1436
1437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1438
1439 func Setregid(rgid int, egid int) (err error) {
1440 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
1441 if e1 != 0 {
1442 err = errnoErr(e1)
1443 }
1444 return
1445 }
1446
1447 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1448
1449 func Setreuid(ruid int, euid int) (err error) {
1450 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
1451 if e1 != 0 {
1452 err = errnoErr(e1)
1453 }
1454 return
1455 }
1456
1457 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1458
1459 func Setrlimit(which int, lim *Rlimit) (err error) {
1460 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1461 if e1 != 0 {
1462 err = errnoErr(e1)
1463 }
1464 return
1465 }
1466
1467 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1468
1469 func Setsid() (pid int, err error) {
1470 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
1471 pid = int(r0)
1472 if e1 != 0 {
1473 err = errnoErr(e1)
1474 }
1475 return
1476 }
1477
1478 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1479
1480 func Settimeofday(tp *Timeval) (err error) {
1481 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1482 if e1 != 0 {
1483 err = errnoErr(e1)
1484 }
1485 return
1486 }
1487
1488 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1489
1490 func Setuid(uid int) (err error) {
1491 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
1492 if e1 != 0 {
1493 err = errnoErr(e1)
1494 }
1495 return
1496 }
1497
1498 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1499
1500 func Symlink(path string, link string) (err error) {
1501 var _p0 *byte
1502 _p0, err = BytePtrFromString(path)
1503 if err != nil {
1504 return
1505 }
1506 var _p1 *byte
1507 _p1, err = BytePtrFromString(link)
1508 if err != nil {
1509 return
1510 }
1511 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1512 if e1 != 0 {
1513 err = errnoErr(e1)
1514 }
1515 return
1516 }
1517
1518 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1519
1520 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
1521 var _p0 *byte
1522 _p0, err = BytePtrFromString(oldpath)
1523 if err != nil {
1524 return
1525 }
1526 var _p1 *byte
1527 _p1, err = BytePtrFromString(newpath)
1528 if err != nil {
1529 return
1530 }
1531 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1532 if e1 != 0 {
1533 err = errnoErr(e1)
1534 }
1535 return
1536 }
1537
1538 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1539
1540 func Sync() (err error) {
1541 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
1542 if e1 != 0 {
1543 err = errnoErr(e1)
1544 }
1545 return
1546 }
1547
1548 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1549
1550 func Truncate(path string, length int64) (err error) {
1551 var _p0 *byte
1552 _p0, err = BytePtrFromString(path)
1553 if err != nil {
1554 return
1555 }
1556 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
1557 if e1 != 0 {
1558 err = errnoErr(e1)
1559 }
1560 return
1561 }
1562
1563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1564
1565 func Umask(newmask int) (oldmask int) {
1566 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
1567 oldmask = int(r0)
1568 return
1569 }
1570
1571 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1572
1573 func Undelete(path string) (err error) {
1574 var _p0 *byte
1575 _p0, err = BytePtrFromString(path)
1576 if err != nil {
1577 return
1578 }
1579 _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1580 if e1 != 0 {
1581 err = errnoErr(e1)
1582 }
1583 return
1584 }
1585
1586 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1587
1588 func Unlink(path string) (err error) {
1589 var _p0 *byte
1590 _p0, err = BytePtrFromString(path)
1591 if err != nil {
1592 return
1593 }
1594 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1595 if e1 != 0 {
1596 err = errnoErr(e1)
1597 }
1598 return
1599 }
1600
1601 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1602
1603 func Unlinkat(dirfd int, path string, flags int) (err error) {
1604 var _p0 *byte
1605 _p0, err = BytePtrFromString(path)
1606 if err != nil {
1607 return
1608 }
1609 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
1610 if e1 != 0 {
1611 err = errnoErr(e1)
1612 }
1613 return
1614 }
1615
1616 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1617
1618 func Unmount(path string, flags int) (err error) {
1619 var _p0 *byte
1620 _p0, err = BytePtrFromString(path)
1621 if err != nil {
1622 return
1623 }
1624 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1625 if e1 != 0 {
1626 err = errnoErr(e1)
1627 }
1628 return
1629 }
1630
1631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1632
1633 func write(fd int, p []byte) (n int, err error) {
1634 var _p0 unsafe.Pointer
1635 if len(p) > 0 {
1636 _p0 = unsafe.Pointer(&p[0])
1637 } else {
1638 _p0 = unsafe.Pointer(&_zero)
1639 }
1640 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1641 n = int(r0)
1642 if e1 != 0 {
1643 err = errnoErr(e1)
1644 }
1645 return
1646 }
1647
1648 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1649
1650 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
1651 r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
1652 ret = uintptr(r0)
1653 if e1 != 0 {
1654 err = errnoErr(e1)
1655 }
1656 return
1657 }
1658
1659 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1660
1661 func munmap(addr uintptr, length uintptr) (err error) {
1662 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
1663 if e1 != 0 {
1664 err = errnoErr(e1)
1665 }
1666 return
1667 }
1668
1669 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1670
1671 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
1672 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1673 n = int(r0)
1674 if e1 != 0 {
1675 err = errnoErr(e1)
1676 }
1677 return
1678 }
1679
1680 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1681
1682 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
1683 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1684 n = int(r0)
1685 if e1 != 0 {
1686 err = errnoErr(e1)
1687 }
1688 return
1689 }
1690
1691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1692
1693 func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
1694 r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1695 sec = int32(r0)
1696 usec = int32(r1)
1697 if e1 != 0 {
1698 err = errnoErr(e1)
1699 }
1700 return
1701 }
1702
1703 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1704
1705 func Fstat(fd int, stat *Stat_t) (err error) {
1706 _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
1707 if e1 != 0 {
1708 err = errnoErr(e1)
1709 }
1710 return
1711 }
1712
1713 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1714
1715 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
1716 var _p0 *byte
1717 _p0, err = BytePtrFromString(path)
1718 if err != nil {
1719 return
1720 }
1721 _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
1722 if e1 != 0 {
1723 err = errnoErr(e1)
1724 }
1725 return
1726 }
1727
1728 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1729
1730 func Fstatfs(fd int, stat *Statfs_t) (err error) {
1731 _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
1732 if e1 != 0 {
1733 err = errnoErr(e1)
1734 }
1735 return
1736 }
1737
1738 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1739
1740 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
1741 var _p0 unsafe.Pointer
1742 if len(buf) > 0 {
1743 _p0 = unsafe.Pointer(&buf[0])
1744 } else {
1745 _p0 = unsafe.Pointer(&_zero)
1746 }
1747 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
1748 n = int(r0)
1749 if e1 != 0 {
1750 err = errnoErr(e1)
1751 }
1752 return
1753 }
1754
1755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1756
1757 func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
1758 r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(buf), uintptr(size), uintptr(flags))
1759 n = int(r0)
1760 if e1 != 0 {
1761 err = errnoErr(e1)
1762 }
1763 return
1764 }
1765
1766 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1767
1768 func Lstat(path string, stat *Stat_t) (err error) {
1769 var _p0 *byte
1770 _p0, err = BytePtrFromString(path)
1771 if err != nil {
1772 return
1773 }
1774 _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1775 if e1 != 0 {
1776 err = errnoErr(e1)
1777 }
1778 return
1779 }
1780
1781 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1782
1783 func Stat(path string, stat *Stat_t) (err error) {
1784 var _p0 *byte
1785 _p0, err = BytePtrFromString(path)
1786 if err != nil {
1787 return
1788 }
1789 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1790 if e1 != 0 {
1791 err = errnoErr(e1)
1792 }
1793 return
1794 }
1795
1796 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1797
1798 func Statfs(path string, stat *Statfs_t) (err error) {
1799 var _p0 *byte
1800 _p0, err = BytePtrFromString(path)
1801 if err != nil {
1802 return
1803 }
1804 _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1805 if e1 != 0 {
1806 err = errnoErr(e1)
1807 }
1808 return
1809 }
0 // mksyscall.pl -l32 -tags darwin,386 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
0 // go run mksyscall.go -l32 -tags darwin,386,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
3 // +build darwin,386
3 // +build darwin,386,go1.12
44
55 package unix
66
1414 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1515
1616 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
17 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
17 r0, _, e1 := syscall_rawSyscall(funcPC(libc_getgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
1818 n = int(r0)
1919 if e1 != 0 {
2020 err = errnoErr(e1)
2222 return
2323 }
2424
25 func libc_getgroups_trampoline()
26
27 //go:linkname libc_getgroups libc_getgroups
28 //go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib"
29
2530 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2631
2732 func setgroups(ngid int, gid *_Gid_t) (err error) {
28 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
29 if e1 != 0 {
30 err = errnoErr(e1)
31 }
32 return
33 }
33 _, _, e1 := syscall_rawSyscall(funcPC(libc_setgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
34 if e1 != 0 {
35 err = errnoErr(e1)
36 }
37 return
38 }
39
40 func libc_setgroups_trampoline()
41
42 //go:linkname libc_setgroups libc_setgroups
43 //go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib"
3444
3545 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
3646
3747 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
38 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
48 r0, _, e1 := syscall_syscall6(funcPC(libc_wait4_trampoline), uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
3949 wpid = int(r0)
4050 if e1 != 0 {
4151 err = errnoErr(e1)
4353 return
4454 }
4555
56 func libc_wait4_trampoline()
57
58 //go:linkname libc_wait4 libc_wait4
59 //go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib"
60
4661 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
4762
4863 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
49 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
64 r0, _, e1 := syscall_syscall(funcPC(libc_accept_trampoline), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
5065 fd = int(r0)
5166 if e1 != 0 {
5267 err = errnoErr(e1)
5469 return
5570 }
5671
72 func libc_accept_trampoline()
73
74 //go:linkname libc_accept libc_accept
75 //go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib"
76
5777 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5878
5979 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
60 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
61 if e1 != 0 {
62 err = errnoErr(e1)
63 }
64 return
65 }
80 _, _, e1 := syscall_syscall(funcPC(libc_bind_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
81 if e1 != 0 {
82 err = errnoErr(e1)
83 }
84 return
85 }
86
87 func libc_bind_trampoline()
88
89 //go:linkname libc_bind libc_bind
90 //go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib"
6691
6792 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6893
6994 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
70 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
71 if e1 != 0 {
72 err = errnoErr(e1)
73 }
74 return
75 }
95 _, _, e1 := syscall_syscall(funcPC(libc_connect_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
96 if e1 != 0 {
97 err = errnoErr(e1)
98 }
99 return
100 }
101
102 func libc_connect_trampoline()
103
104 //go:linkname libc_connect libc_connect
105 //go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib"
76106
77107 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
78108
79109 func socket(domain int, typ int, proto int) (fd int, err error) {
80 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
110 r0, _, e1 := syscall_rawSyscall(funcPC(libc_socket_trampoline), uintptr(domain), uintptr(typ), uintptr(proto))
81111 fd = int(r0)
82112 if e1 != 0 {
83113 err = errnoErr(e1)
85115 return
86116 }
87117
118 func libc_socket_trampoline()
119
120 //go:linkname libc_socket libc_socket
121 //go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib"
122
88123 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
89124
90125 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
91 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
92 if e1 != 0 {
93 err = errnoErr(e1)
94 }
95 return
96 }
126 _, _, e1 := syscall_syscall6(funcPC(libc_getsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
127 if e1 != 0 {
128 err = errnoErr(e1)
129 }
130 return
131 }
132
133 func libc_getsockopt_trampoline()
134
135 //go:linkname libc_getsockopt libc_getsockopt
136 //go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib"
97137
98138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
99139
100140 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
101 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
102 if e1 != 0 {
103 err = errnoErr(e1)
104 }
105 return
106 }
141 _, _, e1 := syscall_syscall6(funcPC(libc_setsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
142 if e1 != 0 {
143 err = errnoErr(e1)
144 }
145 return
146 }
147
148 func libc_setsockopt_trampoline()
149
150 //go:linkname libc_setsockopt libc_setsockopt
151 //go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib"
107152
108153 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
109154
110155 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
111 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
112 if e1 != 0 {
113 err = errnoErr(e1)
114 }
115 return
116 }
156 _, _, e1 := syscall_rawSyscall(funcPC(libc_getpeername_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
157 if e1 != 0 {
158 err = errnoErr(e1)
159 }
160 return
161 }
162
163 func libc_getpeername_trampoline()
164
165 //go:linkname libc_getpeername libc_getpeername
166 //go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib"
117167
118168 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
119169
120170 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
121 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
122 if e1 != 0 {
123 err = errnoErr(e1)
124 }
125 return
126 }
171 _, _, e1 := syscall_rawSyscall(funcPC(libc_getsockname_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
172 if e1 != 0 {
173 err = errnoErr(e1)
174 }
175 return
176 }
177
178 func libc_getsockname_trampoline()
179
180 //go:linkname libc_getsockname libc_getsockname
181 //go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib"
127182
128183 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
129184
130185 func Shutdown(s int, how int) (err error) {
131 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
132 if e1 != 0 {
133 err = errnoErr(e1)
134 }
135 return
136 }
186 _, _, e1 := syscall_syscall(funcPC(libc_shutdown_trampoline), uintptr(s), uintptr(how), 0)
187 if e1 != 0 {
188 err = errnoErr(e1)
189 }
190 return
191 }
192
193 func libc_shutdown_trampoline()
194
195 //go:linkname libc_shutdown libc_shutdown
196 //go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib"
137197
138198 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
139199
140200 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
141 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
142 if e1 != 0 {
143 err = errnoErr(e1)
144 }
145 return
146 }
201 _, _, e1 := syscall_rawSyscall6(funcPC(libc_socketpair_trampoline), uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
202 if e1 != 0 {
203 err = errnoErr(e1)
204 }
205 return
206 }
207
208 func libc_socketpair_trampoline()
209
210 //go:linkname libc_socketpair libc_socketpair
211 //go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib"
147212
148213 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
149214
154219 } else {
155220 _p0 = unsafe.Pointer(&_zero)
156221 }
157 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
222 r0, _, e1 := syscall_syscall6(funcPC(libc_recvfrom_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
158223 n = int(r0)
159224 if e1 != 0 {
160225 err = errnoErr(e1)
161226 }
162227 return
163228 }
229
230 func libc_recvfrom_trampoline()
231
232 //go:linkname libc_recvfrom libc_recvfrom
233 //go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib"
164234
165235 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
166236
171241 } else {
172242 _p0 = unsafe.Pointer(&_zero)
173243 }
174 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
175 if e1 != 0 {
176 err = errnoErr(e1)
177 }
178 return
179 }
244 _, _, e1 := syscall_syscall6(funcPC(libc_sendto_trampoline), uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
245 if e1 != 0 {
246 err = errnoErr(e1)
247 }
248 return
249 }
250
251 func libc_sendto_trampoline()
252
253 //go:linkname libc_sendto libc_sendto
254 //go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib"
180255
181256 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
182257
183258 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
184 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
259 r0, _, e1 := syscall_syscall(funcPC(libc_recvmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
185260 n = int(r0)
186261 if e1 != 0 {
187262 err = errnoErr(e1)
189264 return
190265 }
191266
267 func libc_recvmsg_trampoline()
268
269 //go:linkname libc_recvmsg libc_recvmsg
270 //go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib"
271
192272 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
193273
194274 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
195 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
275 r0, _, e1 := syscall_syscall(funcPC(libc_sendmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
196276 n = int(r0)
197277 if e1 != 0 {
198278 err = errnoErr(e1)
200280 return
201281 }
202282
283 func libc_sendmsg_trampoline()
284
285 //go:linkname libc_sendmsg libc_sendmsg
286 //go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib"
287
203288 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
204289
205290 func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
206 r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
291 r0, _, e1 := syscall_syscall6(funcPC(libc_kevent_trampoline), uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
207292 n = int(r0)
208293 if e1 != 0 {
209294 err = errnoErr(e1)
210295 }
211296 return
212297 }
298
299 func libc_kevent_trampoline()
300
301 //go:linkname libc_kevent libc_kevent
302 //go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib"
213303
214304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
215305
220310 } else {
221311 _p0 = unsafe.Pointer(&_zero)
222312 }
223 _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
224 if e1 != 0 {
225 err = errnoErr(e1)
226 }
227 return
228 }
313 _, _, e1 := syscall_syscall6(funcPC(libc___sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
314 if e1 != 0 {
315 err = errnoErr(e1)
316 }
317 return
318 }
319
320 func libc___sysctl_trampoline()
321
322 //go:linkname libc___sysctl libc___sysctl
323 //go:cgo_import_dynamic libc___sysctl __sysctl "/usr/lib/libSystem.B.dylib"
229324
230325 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
231326
235330 if err != nil {
236331 return
237332 }
238 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
239 if e1 != 0 {
240 err = errnoErr(e1)
241 }
242 return
243 }
333 _, _, e1 := syscall_syscall(funcPC(libc_utimes_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
334 if e1 != 0 {
335 err = errnoErr(e1)
336 }
337 return
338 }
339
340 func libc_utimes_trampoline()
341
342 //go:linkname libc_utimes libc_utimes
343 //go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib"
244344
245345 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
246346
247347 func futimes(fd int, timeval *[2]Timeval) (err error) {
248 _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
249 if e1 != 0 {
250 err = errnoErr(e1)
251 }
252 return
253 }
348 _, _, e1 := syscall_syscall(funcPC(libc_futimes_trampoline), uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
349 if e1 != 0 {
350 err = errnoErr(e1)
351 }
352 return
353 }
354
355 func libc_futimes_trampoline()
356
357 //go:linkname libc_futimes libc_futimes
358 //go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib"
254359
255360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
256361
257362 func fcntl(fd int, cmd int, arg int) (val int, err error) {
258 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
363 r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
259364 val = int(r0)
260365 if e1 != 0 {
261366 err = errnoErr(e1)
262367 }
263368 return
264369 }
370
371 func libc_fcntl_trampoline()
372
373 //go:linkname libc_fcntl libc_fcntl
374 //go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
375
376 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
377
378 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
379 r0, _, e1 := syscall_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
380 n = int(r0)
381 if e1 != 0 {
382 err = errnoErr(e1)
383 }
384 return
385 }
386
387 func libc_poll_trampoline()
388
389 //go:linkname libc_poll libc_poll
390 //go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib"
265391
266392 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267393
272398 } else {
273399 _p0 = unsafe.Pointer(&_zero)
274400 }
275 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
276 if e1 != 0 {
277 err = errnoErr(e1)
278 }
279 return
280 }
401 _, _, e1 := syscall_syscall(funcPC(libc_madvise_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(behav))
402 if e1 != 0 {
403 err = errnoErr(e1)
404 }
405 return
406 }
407
408 func libc_madvise_trampoline()
409
410 //go:linkname libc_madvise libc_madvise
411 //go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib"
281412
282413 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
283414
288419 } else {
289420 _p0 = unsafe.Pointer(&_zero)
290421 }
291 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
292 if e1 != 0 {
293 err = errnoErr(e1)
294 }
295 return
296 }
422 _, _, e1 := syscall_syscall(funcPC(libc_mlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
423 if e1 != 0 {
424 err = errnoErr(e1)
425 }
426 return
427 }
428
429 func libc_mlock_trampoline()
430
431 //go:linkname libc_mlock libc_mlock
432 //go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib"
297433
298434 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
299435
300436 func Mlockall(flags int) (err error) {
301 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
302 if e1 != 0 {
303 err = errnoErr(e1)
304 }
305 return
306 }
437 _, _, e1 := syscall_syscall(funcPC(libc_mlockall_trampoline), uintptr(flags), 0, 0)
438 if e1 != 0 {
439 err = errnoErr(e1)
440 }
441 return
442 }
443
444 func libc_mlockall_trampoline()
445
446 //go:linkname libc_mlockall libc_mlockall
447 //go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib"
307448
308449 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
309450
314455 } else {
315456 _p0 = unsafe.Pointer(&_zero)
316457 }
317 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
318 if e1 != 0 {
319 err = errnoErr(e1)
320 }
321 return
322 }
458 _, _, e1 := syscall_syscall(funcPC(libc_mprotect_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(prot))
459 if e1 != 0 {
460 err = errnoErr(e1)
461 }
462 return
463 }
464
465 func libc_mprotect_trampoline()
466
467 //go:linkname libc_mprotect libc_mprotect
468 //go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib"
323469
324470 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
325471
330476 } else {
331477 _p0 = unsafe.Pointer(&_zero)
332478 }
333 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
334 if e1 != 0 {
335 err = errnoErr(e1)
336 }
337 return
338 }
479 _, _, e1 := syscall_syscall(funcPC(libc_msync_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(flags))
480 if e1 != 0 {
481 err = errnoErr(e1)
482 }
483 return
484 }
485
486 func libc_msync_trampoline()
487
488 //go:linkname libc_msync libc_msync
489 //go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib"
339490
340491 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
341492
346497 } else {
347498 _p0 = unsafe.Pointer(&_zero)
348499 }
349 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
350 if e1 != 0 {
351 err = errnoErr(e1)
352 }
353 return
354 }
500 _, _, e1 := syscall_syscall(funcPC(libc_munlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
501 if e1 != 0 {
502 err = errnoErr(e1)
503 }
504 return
505 }
506
507 func libc_munlock_trampoline()
508
509 //go:linkname libc_munlock libc_munlock
510 //go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib"
355511
356512 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
357513
358514 func Munlockall() (err error) {
359 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
360 if e1 != 0 {
361 err = errnoErr(e1)
362 }
363 return
364 }
515 _, _, e1 := syscall_syscall(funcPC(libc_munlockall_trampoline), 0, 0, 0)
516 if e1 != 0 {
517 err = errnoErr(e1)
518 }
519 return
520 }
521
522 func libc_munlockall_trampoline()
523
524 //go:linkname libc_munlockall libc_munlockall
525 //go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib"
365526
366527 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
367528
368529 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
369 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
370 if e1 != 0 {
371 err = errnoErr(e1)
372 }
373 return
374 }
530 _, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
531 if e1 != 0 {
532 err = errnoErr(e1)
533 }
534 return
535 }
536
537 func libc_ptrace_trampoline()
538
539 //go:linkname libc_ptrace libc_ptrace
540 //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
541
542 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
543
544 func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
545 _, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
546 if e1 != 0 {
547 err = errnoErr(e1)
548 }
549 return
550 }
551
552 func libc_getattrlist_trampoline()
553
554 //go:linkname libc_getattrlist libc_getattrlist
555 //go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib"
375556
376557 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
377558
378559 func pipe() (r int, w int, err error) {
379 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
560 r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
380561 r = int(r0)
381562 w = int(r1)
382563 if e1 != 0 {
385566 return
386567 }
387568
569 func libc_pipe_trampoline()
570
571 //go:linkname libc_pipe libc_pipe
572 //go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib"
573
574 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
575
576 func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
577 var _p0 *byte
578 _p0, err = BytePtrFromString(path)
579 if err != nil {
580 return
581 }
582 var _p1 *byte
583 _p1, err = BytePtrFromString(attr)
584 if err != nil {
585 return
586 }
587 r0, _, e1 := syscall_syscall6(funcPC(libc_getxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
588 sz = int(r0)
589 if e1 != 0 {
590 err = errnoErr(e1)
591 }
592 return
593 }
594
595 func libc_getxattr_trampoline()
596
597 //go:linkname libc_getxattr libc_getxattr
598 //go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib"
599
600 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
601
602 func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
603 var _p0 *byte
604 _p0, err = BytePtrFromString(attr)
605 if err != nil {
606 return
607 }
608 r0, _, e1 := syscall_syscall6(funcPC(libc_fgetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
609 sz = int(r0)
610 if e1 != 0 {
611 err = errnoErr(e1)
612 }
613 return
614 }
615
616 func libc_fgetxattr_trampoline()
617
618 //go:linkname libc_fgetxattr libc_fgetxattr
619 //go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib"
620
621 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
622
623 func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
624 var _p0 *byte
625 _p0, err = BytePtrFromString(path)
626 if err != nil {
627 return
628 }
629 var _p1 *byte
630 _p1, err = BytePtrFromString(attr)
631 if err != nil {
632 return
633 }
634 _, _, e1 := syscall_syscall6(funcPC(libc_setxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
635 if e1 != 0 {
636 err = errnoErr(e1)
637 }
638 return
639 }
640
641 func libc_setxattr_trampoline()
642
643 //go:linkname libc_setxattr libc_setxattr
644 //go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib"
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
649 var _p0 *byte
650 _p0, err = BytePtrFromString(attr)
651 if err != nil {
652 return
653 }
654 _, _, e1 := syscall_syscall6(funcPC(libc_fsetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
655 if e1 != 0 {
656 err = errnoErr(e1)
657 }
658 return
659 }
660
661 func libc_fsetxattr_trampoline()
662
663 //go:linkname libc_fsetxattr libc_fsetxattr
664 //go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib"
665
666 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
667
668 func removexattr(path string, attr string, options int) (err error) {
669 var _p0 *byte
670 _p0, err = BytePtrFromString(path)
671 if err != nil {
672 return
673 }
674 var _p1 *byte
675 _p1, err = BytePtrFromString(attr)
676 if err != nil {
677 return
678 }
679 _, _, e1 := syscall_syscall(funcPC(libc_removexattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
680 if e1 != 0 {
681 err = errnoErr(e1)
682 }
683 return
684 }
685
686 func libc_removexattr_trampoline()
687
688 //go:linkname libc_removexattr libc_removexattr
689 //go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib"
690
691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
692
693 func fremovexattr(fd int, attr string, options int) (err error) {
694 var _p0 *byte
695 _p0, err = BytePtrFromString(attr)
696 if err != nil {
697 return
698 }
699 _, _, e1 := syscall_syscall(funcPC(libc_fremovexattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
700 if e1 != 0 {
701 err = errnoErr(e1)
702 }
703 return
704 }
705
706 func libc_fremovexattr_trampoline()
707
708 //go:linkname libc_fremovexattr libc_fremovexattr
709 //go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib"
710
711 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
712
713 func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
714 var _p0 *byte
715 _p0, err = BytePtrFromString(path)
716 if err != nil {
717 return
718 }
719 r0, _, e1 := syscall_syscall6(funcPC(libc_listxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
720 sz = int(r0)
721 if e1 != 0 {
722 err = errnoErr(e1)
723 }
724 return
725 }
726
727 func libc_listxattr_trampoline()
728
729 //go:linkname libc_listxattr libc_listxattr
730 //go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib"
731
732 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
733
734 func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
735 r0, _, e1 := syscall_syscall6(funcPC(libc_flistxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
736 sz = int(r0)
737 if e1 != 0 {
738 err = errnoErr(e1)
739 }
740 return
741 }
742
743 func libc_flistxattr_trampoline()
744
745 //go:linkname libc_flistxattr libc_flistxattr
746 //go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib"
747
748 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
749
750 func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
751 _, _, e1 := syscall_syscall6(funcPC(libc_setattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
752 if e1 != 0 {
753 err = errnoErr(e1)
754 }
755 return
756 }
757
758 func libc_setattrlist_trampoline()
759
760 //go:linkname libc_setattrlist libc_setattrlist
761 //go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
762
388763 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
389764
390765 func kill(pid int, signum int, posix int) (err error) {
391 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
392 if e1 != 0 {
393 err = errnoErr(e1)
394 }
395 return
396 }
766 _, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix))
767 if e1 != 0 {
768 err = errnoErr(e1)
769 }
770 return
771 }
772
773 func libc_kill_trampoline()
774
775 //go:linkname libc_kill libc_kill
776 //go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib"
397777
398778 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
399779
400780 func ioctl(fd int, req uint, arg uintptr) (err error) {
401 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
402 if e1 != 0 {
403 err = errnoErr(e1)
404 }
405 return
406 }
781 _, _, e1 := syscall_syscall(funcPC(libc_ioctl_trampoline), uintptr(fd), uintptr(req), uintptr(arg))
782 if e1 != 0 {
783 err = errnoErr(e1)
784 }
785 return
786 }
787
788 func libc_ioctl_trampoline()
789
790 //go:linkname libc_ioctl libc_ioctl
791 //go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
792
793 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
794
795 func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
796 _, _, e1 := syscall_syscall9(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
797 if e1 != 0 {
798 err = errnoErr(e1)
799 }
800 return
801 }
802
803 func libc_sendfile_trampoline()
804
805 //go:linkname libc_sendfile libc_sendfile
806 //go:cgo_import_dynamic libc_sendfile sendfile "/usr/lib/libSystem.B.dylib"
407807
408808 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
409809
413813 if err != nil {
414814 return
415815 }
416 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
417 if e1 != 0 {
418 err = errnoErr(e1)
419 }
420 return
421 }
816 _, _, e1 := syscall_syscall(funcPC(libc_access_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
817 if e1 != 0 {
818 err = errnoErr(e1)
819 }
820 return
821 }
822
823 func libc_access_trampoline()
824
825 //go:linkname libc_access libc_access
826 //go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib"
422827
423828 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
424829
425830 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
426 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
427 if e1 != 0 {
428 err = errnoErr(e1)
429 }
430 return
431 }
831 _, _, e1 := syscall_syscall(funcPC(libc_adjtime_trampoline), uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
832 if e1 != 0 {
833 err = errnoErr(e1)
834 }
835 return
836 }
837
838 func libc_adjtime_trampoline()
839
840 //go:linkname libc_adjtime libc_adjtime
841 //go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib"
432842
433843 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
434844
438848 if err != nil {
439849 return
440850 }
441 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
442 if e1 != 0 {
443 err = errnoErr(e1)
444 }
445 return
446 }
851 _, _, e1 := syscall_syscall(funcPC(libc_chdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
852 if e1 != 0 {
853 err = errnoErr(e1)
854 }
855 return
856 }
857
858 func libc_chdir_trampoline()
859
860 //go:linkname libc_chdir libc_chdir
861 //go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib"
447862
448863 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
449864
453868 if err != nil {
454869 return
455870 }
456 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
457 if e1 != 0 {
458 err = errnoErr(e1)
459 }
460 return
461 }
871 _, _, e1 := syscall_syscall(funcPC(libc_chflags_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
872 if e1 != 0 {
873 err = errnoErr(e1)
874 }
875 return
876 }
877
878 func libc_chflags_trampoline()
879
880 //go:linkname libc_chflags libc_chflags
881 //go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib"
462882
463883 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
464884
468888 if err != nil {
469889 return
470890 }
471 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
472 if e1 != 0 {
473 err = errnoErr(e1)
474 }
475 return
476 }
891 _, _, e1 := syscall_syscall(funcPC(libc_chmod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
892 if e1 != 0 {
893 err = errnoErr(e1)
894 }
895 return
896 }
897
898 func libc_chmod_trampoline()
899
900 //go:linkname libc_chmod libc_chmod
901 //go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib"
477902
478903 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
479904
483908 if err != nil {
484909 return
485910 }
486 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
487 if e1 != 0 {
488 err = errnoErr(e1)
489 }
490 return
491 }
911 _, _, e1 := syscall_syscall(funcPC(libc_chown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
912 if e1 != 0 {
913 err = errnoErr(e1)
914 }
915 return
916 }
917
918 func libc_chown_trampoline()
919
920 //go:linkname libc_chown libc_chown
921 //go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib"
492922
493923 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
494924
498928 if err != nil {
499929 return
500930 }
501 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
502 if e1 != 0 {
503 err = errnoErr(e1)
504 }
505 return
506 }
931 _, _, e1 := syscall_syscall(funcPC(libc_chroot_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
932 if e1 != 0 {
933 err = errnoErr(e1)
934 }
935 return
936 }
937
938 func libc_chroot_trampoline()
939
940 //go:linkname libc_chroot libc_chroot
941 //go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib"
507942
508943 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
509944
510945 func Close(fd int) (err error) {
511 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
512 if e1 != 0 {
513 err = errnoErr(e1)
514 }
515 return
516 }
946 _, _, e1 := syscall_syscall(funcPC(libc_close_trampoline), uintptr(fd), 0, 0)
947 if e1 != 0 {
948 err = errnoErr(e1)
949 }
950 return
951 }
952
953 func libc_close_trampoline()
954
955 //go:linkname libc_close libc_close
956 //go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib"
517957
518958 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
519959
520960 func Dup(fd int) (nfd int, err error) {
521 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
961 r0, _, e1 := syscall_syscall(funcPC(libc_dup_trampoline), uintptr(fd), 0, 0)
522962 nfd = int(r0)
523963 if e1 != 0 {
524964 err = errnoErr(e1)
526966 return
527967 }
528968
969 func libc_dup_trampoline()
970
971 //go:linkname libc_dup libc_dup
972 //go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib"
973
529974 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
530975
531976 func Dup2(from int, to int) (err error) {
532 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
533 if e1 != 0 {
534 err = errnoErr(e1)
535 }
536 return
537 }
977 _, _, e1 := syscall_syscall(funcPC(libc_dup2_trampoline), uintptr(from), uintptr(to), 0)
978 if e1 != 0 {
979 err = errnoErr(e1)
980 }
981 return
982 }
983
984 func libc_dup2_trampoline()
985
986 //go:linkname libc_dup2 libc_dup2
987 //go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib"
538988
539989 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
540990
549999 if err != nil {
5501000 return
5511001 }
552 _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
553 if e1 != 0 {
554 err = errnoErr(e1)
555 }
556 return
557 }
1002 _, _, e1 := syscall_syscall(funcPC(libc_exchangedata_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
1003 if e1 != 0 {
1004 err = errnoErr(e1)
1005 }
1006 return
1007 }
1008
1009 func libc_exchangedata_trampoline()
1010
1011 //go:linkname libc_exchangedata libc_exchangedata
1012 //go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib"
5581013
5591014 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5601015
5611016 func Exit(code int) {
562 Syscall(SYS_EXIT, uintptr(code), 0, 0)
563 return
564 }
1017 syscall_syscall(funcPC(libc_exit_trampoline), uintptr(code), 0, 0)
1018 return
1019 }
1020
1021 func libc_exit_trampoline()
1022
1023 //go:linkname libc_exit libc_exit
1024 //go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib"
5651025
5661026 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5671027
5711031 if err != nil {
5721032 return
5731033 }
574 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
575 if e1 != 0 {
576 err = errnoErr(e1)
577 }
578 return
579 }
1034 _, _, e1 := syscall_syscall6(funcPC(libc_faccessat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
1035 if e1 != 0 {
1036 err = errnoErr(e1)
1037 }
1038 return
1039 }
1040
1041 func libc_faccessat_trampoline()
1042
1043 //go:linkname libc_faccessat libc_faccessat
1044 //go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib"
5801045
5811046 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5821047
5831048 func Fchdir(fd int) (err error) {
584 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
585 if e1 != 0 {
586 err = errnoErr(e1)
587 }
588 return
589 }
1049 _, _, e1 := syscall_syscall(funcPC(libc_fchdir_trampoline), uintptr(fd), 0, 0)
1050 if e1 != 0 {
1051 err = errnoErr(e1)
1052 }
1053 return
1054 }
1055
1056 func libc_fchdir_trampoline()
1057
1058 //go:linkname libc_fchdir libc_fchdir
1059 //go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib"
5901060
5911061 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5921062
5931063 func Fchflags(fd int, flags int) (err error) {
594 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
595 if e1 != 0 {
596 err = errnoErr(e1)
597 }
598 return
599 }
1064 _, _, e1 := syscall_syscall(funcPC(libc_fchflags_trampoline), uintptr(fd), uintptr(flags), 0)
1065 if e1 != 0 {
1066 err = errnoErr(e1)
1067 }
1068 return
1069 }
1070
1071 func libc_fchflags_trampoline()
1072
1073 //go:linkname libc_fchflags libc_fchflags
1074 //go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib"
6001075
6011076 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6021077
6031078 func Fchmod(fd int, mode uint32) (err error) {
604 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
605 if e1 != 0 {
606 err = errnoErr(e1)
607 }
608 return
609 }
1079 _, _, e1 := syscall_syscall(funcPC(libc_fchmod_trampoline), uintptr(fd), uintptr(mode), 0)
1080 if e1 != 0 {
1081 err = errnoErr(e1)
1082 }
1083 return
1084 }
1085
1086 func libc_fchmod_trampoline()
1087
1088 //go:linkname libc_fchmod libc_fchmod
1089 //go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib"
6101090
6111091 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6121092
6161096 if err != nil {
6171097 return
6181098 }
619 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
620 if e1 != 0 {
621 err = errnoErr(e1)
622 }
623 return
624 }
1099 _, _, e1 := syscall_syscall6(funcPC(libc_fchmodat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 func libc_fchmodat_trampoline()
1107
1108 //go:linkname libc_fchmodat libc_fchmodat
1109 //go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib"
6251110
6261111 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6271112
6281113 func Fchown(fd int, uid int, gid int) (err error) {
629 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
630 if e1 != 0 {
631 err = errnoErr(e1)
632 }
633 return
634 }
1114 _, _, e1 := syscall_syscall(funcPC(libc_fchown_trampoline), uintptr(fd), uintptr(uid), uintptr(gid))
1115 if e1 != 0 {
1116 err = errnoErr(e1)
1117 }
1118 return
1119 }
1120
1121 func libc_fchown_trampoline()
1122
1123 //go:linkname libc_fchown libc_fchown
1124 //go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib"
6351125
6361126 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6371127
6411131 if err != nil {
6421132 return
6431133 }
644 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
645 if e1 != 0 {
646 err = errnoErr(e1)
647 }
648 return
649 }
1134 _, _, e1 := syscall_syscall6(funcPC(libc_fchownat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
1135 if e1 != 0 {
1136 err = errnoErr(e1)
1137 }
1138 return
1139 }
1140
1141 func libc_fchownat_trampoline()
1142
1143 //go:linkname libc_fchownat libc_fchownat
1144 //go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib"
6501145
6511146 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6521147
6531148 func Flock(fd int, how int) (err error) {
654 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
655 if e1 != 0 {
656 err = errnoErr(e1)
657 }
658 return
659 }
1149 _, _, e1 := syscall_syscall(funcPC(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
1150 if e1 != 0 {
1151 err = errnoErr(e1)
1152 }
1153 return
1154 }
1155
1156 func libc_flock_trampoline()
1157
1158 //go:linkname libc_flock libc_flock
1159 //go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib"
6601160
6611161 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6621162
6631163 func Fpathconf(fd int, name int) (val int, err error) {
664 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
1164 r0, _, e1 := syscall_syscall(funcPC(libc_fpathconf_trampoline), uintptr(fd), uintptr(name), 0)
6651165 val = int(r0)
6661166 if e1 != 0 {
6671167 err = errnoErr(e1)
6691169 return
6701170 }
6711171
1172 func libc_fpathconf_trampoline()
1173
1174 //go:linkname libc_fpathconf libc_fpathconf
1175 //go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib"
1176
1177 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1178
1179 func Fsync(fd int) (err error) {
1180 _, _, e1 := syscall_syscall(funcPC(libc_fsync_trampoline), uintptr(fd), 0, 0)
1181 if e1 != 0 {
1182 err = errnoErr(e1)
1183 }
1184 return
1185 }
1186
1187 func libc_fsync_trampoline()
1188
1189 //go:linkname libc_fsync libc_fsync
1190 //go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib"
1191
1192 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1193
1194 func Ftruncate(fd int, length int64) (err error) {
1195 _, _, e1 := syscall_syscall(funcPC(libc_ftruncate_trampoline), uintptr(fd), uintptr(length), uintptr(length>>32))
1196 if e1 != 0 {
1197 err = errnoErr(e1)
1198 }
1199 return
1200 }
1201
1202 func libc_ftruncate_trampoline()
1203
1204 //go:linkname libc_ftruncate libc_ftruncate
1205 //go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib"
1206
1207 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1208
1209 func Getdtablesize() (size int) {
1210 r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
1211 size = int(r0)
1212 return
1213 }
1214
1215 func libc_getdtablesize_trampoline()
1216
1217 //go:linkname libc_getdtablesize libc_getdtablesize
1218 //go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib"
1219
1220 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1221
1222 func Getegid() (egid int) {
1223 r0, _, _ := syscall_rawSyscall(funcPC(libc_getegid_trampoline), 0, 0, 0)
1224 egid = int(r0)
1225 return
1226 }
1227
1228 func libc_getegid_trampoline()
1229
1230 //go:linkname libc_getegid libc_getegid
1231 //go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib"
1232
1233 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1234
1235 func Geteuid() (uid int) {
1236 r0, _, _ := syscall_rawSyscall(funcPC(libc_geteuid_trampoline), 0, 0, 0)
1237 uid = int(r0)
1238 return
1239 }
1240
1241 func libc_geteuid_trampoline()
1242
1243 //go:linkname libc_geteuid libc_geteuid
1244 //go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib"
1245
1246 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1247
1248 func Getgid() (gid int) {
1249 r0, _, _ := syscall_rawSyscall(funcPC(libc_getgid_trampoline), 0, 0, 0)
1250 gid = int(r0)
1251 return
1252 }
1253
1254 func libc_getgid_trampoline()
1255
1256 //go:linkname libc_getgid libc_getgid
1257 //go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib"
1258
1259 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1260
1261 func Getpgid(pid int) (pgid int, err error) {
1262 r0, _, e1 := syscall_rawSyscall(funcPC(libc_getpgid_trampoline), uintptr(pid), 0, 0)
1263 pgid = int(r0)
1264 if e1 != 0 {
1265 err = errnoErr(e1)
1266 }
1267 return
1268 }
1269
1270 func libc_getpgid_trampoline()
1271
1272 //go:linkname libc_getpgid libc_getpgid
1273 //go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib"
1274
1275 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1276
1277 func Getpgrp() (pgrp int) {
1278 r0, _, _ := syscall_rawSyscall(funcPC(libc_getpgrp_trampoline), 0, 0, 0)
1279 pgrp = int(r0)
1280 return
1281 }
1282
1283 func libc_getpgrp_trampoline()
1284
1285 //go:linkname libc_getpgrp libc_getpgrp
1286 //go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib"
1287
1288 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1289
1290 func Getpid() (pid int) {
1291 r0, _, _ := syscall_rawSyscall(funcPC(libc_getpid_trampoline), 0, 0, 0)
1292 pid = int(r0)
1293 return
1294 }
1295
1296 func libc_getpid_trampoline()
1297
1298 //go:linkname libc_getpid libc_getpid
1299 //go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib"
1300
1301 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1302
1303 func Getppid() (ppid int) {
1304 r0, _, _ := syscall_rawSyscall(funcPC(libc_getppid_trampoline), 0, 0, 0)
1305 ppid = int(r0)
1306 return
1307 }
1308
1309 func libc_getppid_trampoline()
1310
1311 //go:linkname libc_getppid libc_getppid
1312 //go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib"
1313
1314 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1315
1316 func Getpriority(which int, who int) (prio int, err error) {
1317 r0, _, e1 := syscall_syscall(funcPC(libc_getpriority_trampoline), uintptr(which), uintptr(who), 0)
1318 prio = int(r0)
1319 if e1 != 0 {
1320 err = errnoErr(e1)
1321 }
1322 return
1323 }
1324
1325 func libc_getpriority_trampoline()
1326
1327 //go:linkname libc_getpriority libc_getpriority
1328 //go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib"
1329
1330 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1331
1332 func Getrlimit(which int, lim *Rlimit) (err error) {
1333 _, _, e1 := syscall_rawSyscall(funcPC(libc_getrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1334 if e1 != 0 {
1335 err = errnoErr(e1)
1336 }
1337 return
1338 }
1339
1340 func libc_getrlimit_trampoline()
1341
1342 //go:linkname libc_getrlimit libc_getrlimit
1343 //go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib"
1344
1345 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1346
1347 func Getrusage(who int, rusage *Rusage) (err error) {
1348 _, _, e1 := syscall_rawSyscall(funcPC(libc_getrusage_trampoline), uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
1349 if e1 != 0 {
1350 err = errnoErr(e1)
1351 }
1352 return
1353 }
1354
1355 func libc_getrusage_trampoline()
1356
1357 //go:linkname libc_getrusage libc_getrusage
1358 //go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib"
1359
1360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1361
1362 func Getsid(pid int) (sid int, err error) {
1363 r0, _, e1 := syscall_rawSyscall(funcPC(libc_getsid_trampoline), uintptr(pid), 0, 0)
1364 sid = int(r0)
1365 if e1 != 0 {
1366 err = errnoErr(e1)
1367 }
1368 return
1369 }
1370
1371 func libc_getsid_trampoline()
1372
1373 //go:linkname libc_getsid libc_getsid
1374 //go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib"
1375
1376 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1377
1378 func Getuid() (uid int) {
1379 r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
1380 uid = int(r0)
1381 return
1382 }
1383
1384 func libc_getuid_trampoline()
1385
1386 //go:linkname libc_getuid libc_getuid
1387 //go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib"
1388
1389 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1390
1391 func Issetugid() (tainted bool) {
1392 r0, _, _ := syscall_rawSyscall(funcPC(libc_issetugid_trampoline), 0, 0, 0)
1393 tainted = bool(r0 != 0)
1394 return
1395 }
1396
1397 func libc_issetugid_trampoline()
1398
1399 //go:linkname libc_issetugid libc_issetugid
1400 //go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib"
1401
1402 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1403
1404 func Kqueue() (fd int, err error) {
1405 r0, _, e1 := syscall_syscall(funcPC(libc_kqueue_trampoline), 0, 0, 0)
1406 fd = int(r0)
1407 if e1 != 0 {
1408 err = errnoErr(e1)
1409 }
1410 return
1411 }
1412
1413 func libc_kqueue_trampoline()
1414
1415 //go:linkname libc_kqueue libc_kqueue
1416 //go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib"
1417
1418 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1419
1420 func Lchown(path string, uid int, gid int) (err error) {
1421 var _p0 *byte
1422 _p0, err = BytePtrFromString(path)
1423 if err != nil {
1424 return
1425 }
1426 _, _, e1 := syscall_syscall(funcPC(libc_lchown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
1427 if e1 != 0 {
1428 err = errnoErr(e1)
1429 }
1430 return
1431 }
1432
1433 func libc_lchown_trampoline()
1434
1435 //go:linkname libc_lchown libc_lchown
1436 //go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib"
1437
1438 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1439
1440 func Link(path string, link string) (err error) {
1441 var _p0 *byte
1442 _p0, err = BytePtrFromString(path)
1443 if err != nil {
1444 return
1445 }
1446 var _p1 *byte
1447 _p1, err = BytePtrFromString(link)
1448 if err != nil {
1449 return
1450 }
1451 _, _, e1 := syscall_syscall(funcPC(libc_link_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1452 if e1 != 0 {
1453 err = errnoErr(e1)
1454 }
1455 return
1456 }
1457
1458 func libc_link_trampoline()
1459
1460 //go:linkname libc_link libc_link
1461 //go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib"
1462
1463 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1464
1465 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
1466 var _p0 *byte
1467 _p0, err = BytePtrFromString(path)
1468 if err != nil {
1469 return
1470 }
1471 var _p1 *byte
1472 _p1, err = BytePtrFromString(link)
1473 if err != nil {
1474 return
1475 }
1476 _, _, e1 := syscall_syscall6(funcPC(libc_linkat_trampoline), uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1477 if e1 != 0 {
1478 err = errnoErr(e1)
1479 }
1480 return
1481 }
1482
1483 func libc_linkat_trampoline()
1484
1485 //go:linkname libc_linkat libc_linkat
1486 //go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib"
1487
1488 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1489
1490 func Listen(s int, backlog int) (err error) {
1491 _, _, e1 := syscall_syscall(funcPC(libc_listen_trampoline), uintptr(s), uintptr(backlog), 0)
1492 if e1 != 0 {
1493 err = errnoErr(e1)
1494 }
1495 return
1496 }
1497
1498 func libc_listen_trampoline()
1499
1500 //go:linkname libc_listen libc_listen
1501 //go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib"
1502
1503 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1504
1505 func Mkdir(path string, mode uint32) (err error) {
1506 var _p0 *byte
1507 _p0, err = BytePtrFromString(path)
1508 if err != nil {
1509 return
1510 }
1511 _, _, e1 := syscall_syscall(funcPC(libc_mkdir_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1512 if e1 != 0 {
1513 err = errnoErr(e1)
1514 }
1515 return
1516 }
1517
1518 func libc_mkdir_trampoline()
1519
1520 //go:linkname libc_mkdir libc_mkdir
1521 //go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib"
1522
1523 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1524
1525 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1526 var _p0 *byte
1527 _p0, err = BytePtrFromString(path)
1528 if err != nil {
1529 return
1530 }
1531 _, _, e1 := syscall_syscall(funcPC(libc_mkdirat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1532 if e1 != 0 {
1533 err = errnoErr(e1)
1534 }
1535 return
1536 }
1537
1538 func libc_mkdirat_trampoline()
1539
1540 //go:linkname libc_mkdirat libc_mkdirat
1541 //go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib"
1542
1543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1544
1545 func Mkfifo(path string, mode uint32) (err error) {
1546 var _p0 *byte
1547 _p0, err = BytePtrFromString(path)
1548 if err != nil {
1549 return
1550 }
1551 _, _, e1 := syscall_syscall(funcPC(libc_mkfifo_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1552 if e1 != 0 {
1553 err = errnoErr(e1)
1554 }
1555 return
1556 }
1557
1558 func libc_mkfifo_trampoline()
1559
1560 //go:linkname libc_mkfifo libc_mkfifo
1561 //go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib"
1562
1563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1564
1565 func Mknod(path string, mode uint32, dev int) (err error) {
1566 var _p0 *byte
1567 _p0, err = BytePtrFromString(path)
1568 if err != nil {
1569 return
1570 }
1571 _, _, e1 := syscall_syscall(funcPC(libc_mknod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1572 if e1 != 0 {
1573 err = errnoErr(e1)
1574 }
1575 return
1576 }
1577
1578 func libc_mknod_trampoline()
1579
1580 //go:linkname libc_mknod libc_mknod
1581 //go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib"
1582
1583 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1584
1585 func Open(path string, mode int, perm uint32) (fd int, err error) {
1586 var _p0 *byte
1587 _p0, err = BytePtrFromString(path)
1588 if err != nil {
1589 return
1590 }
1591 r0, _, e1 := syscall_syscall(funcPC(libc_open_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1592 fd = int(r0)
1593 if e1 != 0 {
1594 err = errnoErr(e1)
1595 }
1596 return
1597 }
1598
1599 func libc_open_trampoline()
1600
1601 //go:linkname libc_open libc_open
1602 //go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib"
1603
1604 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1605
1606 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1607 var _p0 *byte
1608 _p0, err = BytePtrFromString(path)
1609 if err != nil {
1610 return
1611 }
1612 r0, _, e1 := syscall_syscall6(funcPC(libc_openat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
1613 fd = int(r0)
1614 if e1 != 0 {
1615 err = errnoErr(e1)
1616 }
1617 return
1618 }
1619
1620 func libc_openat_trampoline()
1621
1622 //go:linkname libc_openat libc_openat
1623 //go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib"
1624
1625 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1626
1627 func Pathconf(path string, name int) (val int, err error) {
1628 var _p0 *byte
1629 _p0, err = BytePtrFromString(path)
1630 if err != nil {
1631 return
1632 }
1633 r0, _, e1 := syscall_syscall(funcPC(libc_pathconf_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1634 val = int(r0)
1635 if e1 != 0 {
1636 err = errnoErr(e1)
1637 }
1638 return
1639 }
1640
1641 func libc_pathconf_trampoline()
1642
1643 //go:linkname libc_pathconf libc_pathconf
1644 //go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib"
1645
1646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1647
1648 func Pread(fd int, p []byte, offset int64) (n int, err error) {
1649 var _p0 unsafe.Pointer
1650 if len(p) > 0 {
1651 _p0 = unsafe.Pointer(&p[0])
1652 } else {
1653 _p0 = unsafe.Pointer(&_zero)
1654 }
1655 r0, _, e1 := syscall_syscall6(funcPC(libc_pread_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
1656 n = int(r0)
1657 if e1 != 0 {
1658 err = errnoErr(e1)
1659 }
1660 return
1661 }
1662
1663 func libc_pread_trampoline()
1664
1665 //go:linkname libc_pread libc_pread
1666 //go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib"
1667
1668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1669
1670 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
1671 var _p0 unsafe.Pointer
1672 if len(p) > 0 {
1673 _p0 = unsafe.Pointer(&p[0])
1674 } else {
1675 _p0 = unsafe.Pointer(&_zero)
1676 }
1677 r0, _, e1 := syscall_syscall6(funcPC(libc_pwrite_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
1678 n = int(r0)
1679 if e1 != 0 {
1680 err = errnoErr(e1)
1681 }
1682 return
1683 }
1684
1685 func libc_pwrite_trampoline()
1686
1687 //go:linkname libc_pwrite libc_pwrite
1688 //go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib"
1689
1690 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1691
1692 func read(fd int, p []byte) (n int, err error) {
1693 var _p0 unsafe.Pointer
1694 if len(p) > 0 {
1695 _p0 = unsafe.Pointer(&p[0])
1696 } else {
1697 _p0 = unsafe.Pointer(&_zero)
1698 }
1699 r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
1700 n = int(r0)
1701 if e1 != 0 {
1702 err = errnoErr(e1)
1703 }
1704 return
1705 }
1706
1707 func libc_read_trampoline()
1708
1709 //go:linkname libc_read libc_read
1710 //go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib"
1711
1712 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1713
1714 func Readlink(path string, buf []byte) (n int, err error) {
1715 var _p0 *byte
1716 _p0, err = BytePtrFromString(path)
1717 if err != nil {
1718 return
1719 }
1720 var _p1 unsafe.Pointer
1721 if len(buf) > 0 {
1722 _p1 = unsafe.Pointer(&buf[0])
1723 } else {
1724 _p1 = unsafe.Pointer(&_zero)
1725 }
1726 r0, _, e1 := syscall_syscall(funcPC(libc_readlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1727 n = int(r0)
1728 if e1 != 0 {
1729 err = errnoErr(e1)
1730 }
1731 return
1732 }
1733
1734 func libc_readlink_trampoline()
1735
1736 //go:linkname libc_readlink libc_readlink
1737 //go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib"
1738
1739 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1740
1741 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1742 var _p0 *byte
1743 _p0, err = BytePtrFromString(path)
1744 if err != nil {
1745 return
1746 }
1747 var _p1 unsafe.Pointer
1748 if len(buf) > 0 {
1749 _p1 = unsafe.Pointer(&buf[0])
1750 } else {
1751 _p1 = unsafe.Pointer(&_zero)
1752 }
1753 r0, _, e1 := syscall_syscall6(funcPC(libc_readlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1754 n = int(r0)
1755 if e1 != 0 {
1756 err = errnoErr(e1)
1757 }
1758 return
1759 }
1760
1761 func libc_readlinkat_trampoline()
1762
1763 //go:linkname libc_readlinkat libc_readlinkat
1764 //go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib"
1765
1766 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1767
1768 func Rename(from string, to string) (err error) {
1769 var _p0 *byte
1770 _p0, err = BytePtrFromString(from)
1771 if err != nil {
1772 return
1773 }
1774 var _p1 *byte
1775 _p1, err = BytePtrFromString(to)
1776 if err != nil {
1777 return
1778 }
1779 _, _, e1 := syscall_syscall(funcPC(libc_rename_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1780 if e1 != 0 {
1781 err = errnoErr(e1)
1782 }
1783 return
1784 }
1785
1786 func libc_rename_trampoline()
1787
1788 //go:linkname libc_rename libc_rename
1789 //go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib"
1790
1791 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1792
1793 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1794 var _p0 *byte
1795 _p0, err = BytePtrFromString(from)
1796 if err != nil {
1797 return
1798 }
1799 var _p1 *byte
1800 _p1, err = BytePtrFromString(to)
1801 if err != nil {
1802 return
1803 }
1804 _, _, e1 := syscall_syscall6(funcPC(libc_renameat_trampoline), uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1805 if e1 != 0 {
1806 err = errnoErr(e1)
1807 }
1808 return
1809 }
1810
1811 func libc_renameat_trampoline()
1812
1813 //go:linkname libc_renameat libc_renameat
1814 //go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib"
1815
1816 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1817
1818 func Revoke(path string) (err error) {
1819 var _p0 *byte
1820 _p0, err = BytePtrFromString(path)
1821 if err != nil {
1822 return
1823 }
1824 _, _, e1 := syscall_syscall(funcPC(libc_revoke_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1825 if e1 != 0 {
1826 err = errnoErr(e1)
1827 }
1828 return
1829 }
1830
1831 func libc_revoke_trampoline()
1832
1833 //go:linkname libc_revoke libc_revoke
1834 //go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib"
1835
1836 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1837
1838 func Rmdir(path string) (err error) {
1839 var _p0 *byte
1840 _p0, err = BytePtrFromString(path)
1841 if err != nil {
1842 return
1843 }
1844 _, _, e1 := syscall_syscall(funcPC(libc_rmdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1845 if e1 != 0 {
1846 err = errnoErr(e1)
1847 }
1848 return
1849 }
1850
1851 func libc_rmdir_trampoline()
1852
1853 //go:linkname libc_rmdir libc_rmdir
1854 //go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib"
1855
1856 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1857
1858 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1859 r0, r1, e1 := syscall_syscall6(funcPC(libc_lseek_trampoline), uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
1860 newoffset = int64(int64(r1)<<32 | int64(r0))
1861 if e1 != 0 {
1862 err = errnoErr(e1)
1863 }
1864 return
1865 }
1866
1867 func libc_lseek_trampoline()
1868
1869 //go:linkname libc_lseek libc_lseek
1870 //go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib"
1871
1872 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1873
1874 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1875 _, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1876 if e1 != 0 {
1877 err = errnoErr(e1)
1878 }
1879 return
1880 }
1881
1882 func libc_select_trampoline()
1883
1884 //go:linkname libc_select libc_select
1885 //go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib"
1886
1887 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1888
1889 func Setegid(egid int) (err error) {
1890 _, _, e1 := syscall_syscall(funcPC(libc_setegid_trampoline), uintptr(egid), 0, 0)
1891 if e1 != 0 {
1892 err = errnoErr(e1)
1893 }
1894 return
1895 }
1896
1897 func libc_setegid_trampoline()
1898
1899 //go:linkname libc_setegid libc_setegid
1900 //go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib"
1901
1902 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1903
1904 func Seteuid(euid int) (err error) {
1905 _, _, e1 := syscall_rawSyscall(funcPC(libc_seteuid_trampoline), uintptr(euid), 0, 0)
1906 if e1 != 0 {
1907 err = errnoErr(e1)
1908 }
1909 return
1910 }
1911
1912 func libc_seteuid_trampoline()
1913
1914 //go:linkname libc_seteuid libc_seteuid
1915 //go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib"
1916
1917 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1918
1919 func Setgid(gid int) (err error) {
1920 _, _, e1 := syscall_rawSyscall(funcPC(libc_setgid_trampoline), uintptr(gid), 0, 0)
1921 if e1 != 0 {
1922 err = errnoErr(e1)
1923 }
1924 return
1925 }
1926
1927 func libc_setgid_trampoline()
1928
1929 //go:linkname libc_setgid libc_setgid
1930 //go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib"
1931
1932 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1933
1934 func Setlogin(name string) (err error) {
1935 var _p0 *byte
1936 _p0, err = BytePtrFromString(name)
1937 if err != nil {
1938 return
1939 }
1940 _, _, e1 := syscall_syscall(funcPC(libc_setlogin_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1941 if e1 != 0 {
1942 err = errnoErr(e1)
1943 }
1944 return
1945 }
1946
1947 func libc_setlogin_trampoline()
1948
1949 //go:linkname libc_setlogin libc_setlogin
1950 //go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib"
1951
1952 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1953
1954 func Setpgid(pid int, pgid int) (err error) {
1955 _, _, e1 := syscall_rawSyscall(funcPC(libc_setpgid_trampoline), uintptr(pid), uintptr(pgid), 0)
1956 if e1 != 0 {
1957 err = errnoErr(e1)
1958 }
1959 return
1960 }
1961
1962 func libc_setpgid_trampoline()
1963
1964 //go:linkname libc_setpgid libc_setpgid
1965 //go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib"
1966
1967 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1968
1969 func Setpriority(which int, who int, prio int) (err error) {
1970 _, _, e1 := syscall_syscall(funcPC(libc_setpriority_trampoline), uintptr(which), uintptr(who), uintptr(prio))
1971 if e1 != 0 {
1972 err = errnoErr(e1)
1973 }
1974 return
1975 }
1976
1977 func libc_setpriority_trampoline()
1978
1979 //go:linkname libc_setpriority libc_setpriority
1980 //go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib"
1981
1982 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1983
1984 func Setprivexec(flag int) (err error) {
1985 _, _, e1 := syscall_syscall(funcPC(libc_setprivexec_trampoline), uintptr(flag), 0, 0)
1986 if e1 != 0 {
1987 err = errnoErr(e1)
1988 }
1989 return
1990 }
1991
1992 func libc_setprivexec_trampoline()
1993
1994 //go:linkname libc_setprivexec libc_setprivexec
1995 //go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib"
1996
1997 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1998
1999 func Setregid(rgid int, egid int) (err error) {
2000 _, _, e1 := syscall_rawSyscall(funcPC(libc_setregid_trampoline), uintptr(rgid), uintptr(egid), 0)
2001 if e1 != 0 {
2002 err = errnoErr(e1)
2003 }
2004 return
2005 }
2006
2007 func libc_setregid_trampoline()
2008
2009 //go:linkname libc_setregid libc_setregid
2010 //go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib"
2011
2012 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2013
2014 func Setreuid(ruid int, euid int) (err error) {
2015 _, _, e1 := syscall_rawSyscall(funcPC(libc_setreuid_trampoline), uintptr(ruid), uintptr(euid), 0)
2016 if e1 != 0 {
2017 err = errnoErr(e1)
2018 }
2019 return
2020 }
2021
2022 func libc_setreuid_trampoline()
2023
2024 //go:linkname libc_setreuid libc_setreuid
2025 //go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib"
2026
2027 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2028
2029 func Setrlimit(which int, lim *Rlimit) (err error) {
2030 _, _, e1 := syscall_rawSyscall(funcPC(libc_setrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
2031 if e1 != 0 {
2032 err = errnoErr(e1)
2033 }
2034 return
2035 }
2036
2037 func libc_setrlimit_trampoline()
2038
2039 //go:linkname libc_setrlimit libc_setrlimit
2040 //go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
2041
2042 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2043
2044 func Setsid() (pid int, err error) {
2045 r0, _, e1 := syscall_rawSyscall(funcPC(libc_setsid_trampoline), 0, 0, 0)
2046 pid = int(r0)
2047 if e1 != 0 {
2048 err = errnoErr(e1)
2049 }
2050 return
2051 }
2052
2053 func libc_setsid_trampoline()
2054
2055 //go:linkname libc_setsid libc_setsid
2056 //go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib"
2057
2058 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2059
2060 func Settimeofday(tp *Timeval) (err error) {
2061 _, _, e1 := syscall_rawSyscall(funcPC(libc_settimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
2062 if e1 != 0 {
2063 err = errnoErr(e1)
2064 }
2065 return
2066 }
2067
2068 func libc_settimeofday_trampoline()
2069
2070 //go:linkname libc_settimeofday libc_settimeofday
2071 //go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib"
2072
2073 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2074
2075 func Setuid(uid int) (err error) {
2076 _, _, e1 := syscall_rawSyscall(funcPC(libc_setuid_trampoline), uintptr(uid), 0, 0)
2077 if e1 != 0 {
2078 err = errnoErr(e1)
2079 }
2080 return
2081 }
2082
2083 func libc_setuid_trampoline()
2084
2085 //go:linkname libc_setuid libc_setuid
2086 //go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib"
2087
2088 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2089
2090 func Symlink(path string, link string) (err error) {
2091 var _p0 *byte
2092 _p0, err = BytePtrFromString(path)
2093 if err != nil {
2094 return
2095 }
2096 var _p1 *byte
2097 _p1, err = BytePtrFromString(link)
2098 if err != nil {
2099 return
2100 }
2101 _, _, e1 := syscall_syscall(funcPC(libc_symlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
2102 if e1 != 0 {
2103 err = errnoErr(e1)
2104 }
2105 return
2106 }
2107
2108 func libc_symlink_trampoline()
2109
2110 //go:linkname libc_symlink libc_symlink
2111 //go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib"
2112
2113 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2114
2115 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
2116 var _p0 *byte
2117 _p0, err = BytePtrFromString(oldpath)
2118 if err != nil {
2119 return
2120 }
2121 var _p1 *byte
2122 _p1, err = BytePtrFromString(newpath)
2123 if err != nil {
2124 return
2125 }
2126 _, _, e1 := syscall_syscall(funcPC(libc_symlinkat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
2127 if e1 != 0 {
2128 err = errnoErr(e1)
2129 }
2130 return
2131 }
2132
2133 func libc_symlinkat_trampoline()
2134
2135 //go:linkname libc_symlinkat libc_symlinkat
2136 //go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib"
2137
2138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2139
2140 func Sync() (err error) {
2141 _, _, e1 := syscall_syscall(funcPC(libc_sync_trampoline), 0, 0, 0)
2142 if e1 != 0 {
2143 err = errnoErr(e1)
2144 }
2145 return
2146 }
2147
2148 func libc_sync_trampoline()
2149
2150 //go:linkname libc_sync libc_sync
2151 //go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib"
2152
2153 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2154
2155 func Truncate(path string, length int64) (err error) {
2156 var _p0 *byte
2157 _p0, err = BytePtrFromString(path)
2158 if err != nil {
2159 return
2160 }
2161 _, _, e1 := syscall_syscall(funcPC(libc_truncate_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
2162 if e1 != 0 {
2163 err = errnoErr(e1)
2164 }
2165 return
2166 }
2167
2168 func libc_truncate_trampoline()
2169
2170 //go:linkname libc_truncate libc_truncate
2171 //go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib"
2172
2173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2174
2175 func Umask(newmask int) (oldmask int) {
2176 r0, _, _ := syscall_syscall(funcPC(libc_umask_trampoline), uintptr(newmask), 0, 0)
2177 oldmask = int(r0)
2178 return
2179 }
2180
2181 func libc_umask_trampoline()
2182
2183 //go:linkname libc_umask libc_umask
2184 //go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib"
2185
2186 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2187
2188 func Undelete(path string) (err error) {
2189 var _p0 *byte
2190 _p0, err = BytePtrFromString(path)
2191 if err != nil {
2192 return
2193 }
2194 _, _, e1 := syscall_syscall(funcPC(libc_undelete_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
2195 if e1 != 0 {
2196 err = errnoErr(e1)
2197 }
2198 return
2199 }
2200
2201 func libc_undelete_trampoline()
2202
2203 //go:linkname libc_undelete libc_undelete
2204 //go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib"
2205
2206 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2207
2208 func Unlink(path string) (err error) {
2209 var _p0 *byte
2210 _p0, err = BytePtrFromString(path)
2211 if err != nil {
2212 return
2213 }
2214 _, _, e1 := syscall_syscall(funcPC(libc_unlink_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
2215 if e1 != 0 {
2216 err = errnoErr(e1)
2217 }
2218 return
2219 }
2220
2221 func libc_unlink_trampoline()
2222
2223 //go:linkname libc_unlink libc_unlink
2224 //go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib"
2225
2226 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2227
2228 func Unlinkat(dirfd int, path string, flags int) (err error) {
2229 var _p0 *byte
2230 _p0, err = BytePtrFromString(path)
2231 if err != nil {
2232 return
2233 }
2234 _, _, e1 := syscall_syscall(funcPC(libc_unlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
2235 if e1 != 0 {
2236 err = errnoErr(e1)
2237 }
2238 return
2239 }
2240
2241 func libc_unlinkat_trampoline()
2242
2243 //go:linkname libc_unlinkat libc_unlinkat
2244 //go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib"
2245
2246 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2247
2248 func Unmount(path string, flags int) (err error) {
2249 var _p0 *byte
2250 _p0, err = BytePtrFromString(path)
2251 if err != nil {
2252 return
2253 }
2254 _, _, e1 := syscall_syscall(funcPC(libc_unmount_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
2255 if e1 != 0 {
2256 err = errnoErr(e1)
2257 }
2258 return
2259 }
2260
2261 func libc_unmount_trampoline()
2262
2263 //go:linkname libc_unmount libc_unmount
2264 //go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib"
2265
2266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2267
2268 func write(fd int, p []byte) (n int, err error) {
2269 var _p0 unsafe.Pointer
2270 if len(p) > 0 {
2271 _p0 = unsafe.Pointer(&p[0])
2272 } else {
2273 _p0 = unsafe.Pointer(&_zero)
2274 }
2275 r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
2276 n = int(r0)
2277 if e1 != 0 {
2278 err = errnoErr(e1)
2279 }
2280 return
2281 }
2282
2283 func libc_write_trampoline()
2284
2285 //go:linkname libc_write libc_write
2286 //go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib"
2287
2288 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2289
2290 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
2291 r0, _, e1 := syscall_syscall9(funcPC(libc_mmap_trampoline), uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
2292 ret = uintptr(r0)
2293 if e1 != 0 {
2294 err = errnoErr(e1)
2295 }
2296 return
2297 }
2298
2299 func libc_mmap_trampoline()
2300
2301 //go:linkname libc_mmap libc_mmap
2302 //go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib"
2303
2304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2305
2306 func munmap(addr uintptr, length uintptr) (err error) {
2307 _, _, e1 := syscall_syscall(funcPC(libc_munmap_trampoline), uintptr(addr), uintptr(length), 0)
2308 if e1 != 0 {
2309 err = errnoErr(e1)
2310 }
2311 return
2312 }
2313
2314 func libc_munmap_trampoline()
2315
2316 //go:linkname libc_munmap libc_munmap
2317 //go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib"
2318
2319 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2320
2321 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
2322 r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
2323 n = int(r0)
2324 if e1 != 0 {
2325 err = errnoErr(e1)
2326 }
2327 return
2328 }
2329
2330 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2331
2332 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
2333 r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
2334 n = int(r0)
2335 if e1 != 0 {
2336 err = errnoErr(e1)
2337 }
2338 return
2339 }
2340
2341 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2342
2343 func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
2344 r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
2345 sec = int32(r0)
2346 usec = int32(r1)
2347 if e1 != 0 {
2348 err = errnoErr(e1)
2349 }
2350 return
2351 }
2352
2353 func libc_gettimeofday_trampoline()
2354
2355 //go:linkname libc_gettimeofday libc_gettimeofday
2356 //go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
2357
6722358 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6732359
6742360 func Fstat(fd int, stat *Stat_t) (err error) {
675 _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
676 if e1 != 0 {
677 err = errnoErr(e1)
678 }
679 return
680 }
2361 _, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
2362 if e1 != 0 {
2363 err = errnoErr(e1)
2364 }
2365 return
2366 }
2367
2368 func libc_fstat64_trampoline()
2369
2370 //go:linkname libc_fstat64 libc_fstat64
2371 //go:cgo_import_dynamic libc_fstat64 fstat64 "/usr/lib/libSystem.B.dylib"
2372
2373 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2374
2375 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
2376 var _p0 *byte
2377 _p0, err = BytePtrFromString(path)
2378 if err != nil {
2379 return
2380 }
2381 _, _, e1 := syscall_syscall6(funcPC(libc_fstatat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
2382 if e1 != 0 {
2383 err = errnoErr(e1)
2384 }
2385 return
2386 }
2387
2388 func libc_fstatat64_trampoline()
2389
2390 //go:linkname libc_fstatat64 libc_fstatat64
2391 //go:cgo_import_dynamic libc_fstatat64 fstatat64 "/usr/lib/libSystem.B.dylib"
6812392
6822393 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6832394
6842395 func Fstatfs(fd int, stat *Statfs_t) (err error) {
685 _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
686 if e1 != 0 {
687 err = errnoErr(e1)
688 }
689 return
690 }
691
692 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
693
694 func Fsync(fd int) (err error) {
695 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
696 if e1 != 0 {
697 err = errnoErr(e1)
698 }
699 return
700 }
701
702 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
703
704 func Ftruncate(fd int, length int64) (err error) {
705 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
706 if e1 != 0 {
707 err = errnoErr(e1)
708 }
709 return
710 }
2396 _, _, e1 := syscall_syscall(funcPC(libc_fstatfs64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
2397 if e1 != 0 {
2398 err = errnoErr(e1)
2399 }
2400 return
2401 }
2402
2403 func libc_fstatfs64_trampoline()
2404
2405 //go:linkname libc_fstatfs64 libc_fstatfs64
2406 //go:cgo_import_dynamic libc_fstatfs64 fstatfs64 "/usr/lib/libSystem.B.dylib"
7112407
7122408 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7132409
7182414 } else {
7192415 _p0 = unsafe.Pointer(&_zero)
7202416 }
721 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
2417 r0, _, e1 := syscall_syscall6(funcPC(libc___getdirentries64_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
7222418 n = int(r0)
7232419 if e1 != 0 {
7242420 err = errnoErr(e1)
7262422 return
7272423 }
7282424
729 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
730
731 func Getdtablesize() (size int) {
732 r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
733 size = int(r0)
734 return
735 }
736
737 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
738
739 func Getegid() (egid int) {
740 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
741 egid = int(r0)
742 return
743 }
744
745 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
746
747 func Geteuid() (uid int) {
748 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
749 uid = int(r0)
750 return
751 }
752
753 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
754
755 func Getgid() (gid int) {
756 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
757 gid = int(r0)
758 return
759 }
760
761 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
762
763 func Getpgid(pid int) (pgid int, err error) {
764 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
765 pgid = int(r0)
766 if e1 != 0 {
767 err = errnoErr(e1)
768 }
769 return
770 }
771
772 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
773
774 func Getpgrp() (pgrp int) {
775 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
776 pgrp = int(r0)
777 return
778 }
779
780 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
781
782 func Getpid() (pid int) {
783 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
784 pid = int(r0)
785 return
786 }
787
788 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
789
790 func Getppid() (ppid int) {
791 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
792 ppid = int(r0)
793 return
794 }
795
796 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
797
798 func Getpriority(which int, who int) (prio int, err error) {
799 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
800 prio = int(r0)
801 if e1 != 0 {
802 err = errnoErr(e1)
803 }
804 return
805 }
806
807 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
808
809 func Getrlimit(which int, lim *Rlimit) (err error) {
810 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
811 if e1 != 0 {
812 err = errnoErr(e1)
813 }
814 return
815 }
816
817 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
818
819 func Getrusage(who int, rusage *Rusage) (err error) {
820 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
821 if e1 != 0 {
822 err = errnoErr(e1)
823 }
824 return
825 }
826
827 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
828
829 func Getsid(pid int) (sid int, err error) {
830 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
831 sid = int(r0)
832 if e1 != 0 {
833 err = errnoErr(e1)
834 }
835 return
836 }
837
838 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
839
840 func Getuid() (uid int) {
841 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
842 uid = int(r0)
843 return
844 }
845
846 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
847
848 func Issetugid() (tainted bool) {
849 r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
850 tainted = bool(r0 != 0)
851 return
852 }
853
854 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
855
856 func Kqueue() (fd int, err error) {
857 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
858 fd = int(r0)
859 if e1 != 0 {
860 err = errnoErr(e1)
861 }
862 return
863 }
864
865 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
866
867 func Lchown(path string, uid int, gid int) (err error) {
868 var _p0 *byte
869 _p0, err = BytePtrFromString(path)
870 if err != nil {
871 return
872 }
873 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
874 if e1 != 0 {
875 err = errnoErr(e1)
876 }
877 return
878 }
879
880 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
881
882 func Link(path string, link string) (err error) {
883 var _p0 *byte
884 _p0, err = BytePtrFromString(path)
885 if err != nil {
886 return
887 }
888 var _p1 *byte
889 _p1, err = BytePtrFromString(link)
890 if err != nil {
891 return
892 }
893 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
894 if e1 != 0 {
895 err = errnoErr(e1)
896 }
897 return
898 }
899
900 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
901
902 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
903 var _p0 *byte
904 _p0, err = BytePtrFromString(path)
905 if err != nil {
906 return
907 }
908 var _p1 *byte
909 _p1, err = BytePtrFromString(link)
910 if err != nil {
911 return
912 }
913 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
914 if e1 != 0 {
915 err = errnoErr(e1)
916 }
917 return
918 }
919
920 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
921
922 func Listen(s int, backlog int) (err error) {
923 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
924 if e1 != 0 {
925 err = errnoErr(e1)
926 }
927 return
928 }
2425 func libc___getdirentries64_trampoline()
2426
2427 //go:linkname libc___getdirentries64 libc___getdirentries64
2428 //go:cgo_import_dynamic libc___getdirentries64 __getdirentries64 "/usr/lib/libSystem.B.dylib"
2429
2430 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2431
2432 func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
2433 r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat64_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
2434 n = int(r0)
2435 if e1 != 0 {
2436 err = errnoErr(e1)
2437 }
2438 return
2439 }
2440
2441 func libc_getfsstat64_trampoline()
2442
2443 //go:linkname libc_getfsstat64 libc_getfsstat64
2444 //go:cgo_import_dynamic libc_getfsstat64 getfsstat64 "/usr/lib/libSystem.B.dylib"
9292445
9302446 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9312447
9352451 if err != nil {
9362452 return
9372453 }
938 _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
939 if e1 != 0 {
940 err = errnoErr(e1)
941 }
942 return
943 }
944
945 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
946
947 func Mkdir(path string, mode uint32) (err error) {
948 var _p0 *byte
949 _p0, err = BytePtrFromString(path)
950 if err != nil {
951 return
952 }
953 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
954 if e1 != 0 {
955 err = errnoErr(e1)
956 }
957 return
958 }
959
960 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
961
962 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
963 var _p0 *byte
964 _p0, err = BytePtrFromString(path)
965 if err != nil {
966 return
967 }
968 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
969 if e1 != 0 {
970 err = errnoErr(e1)
971 }
972 return
973 }
974
975 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
976
977 func Mkfifo(path string, mode uint32) (err error) {
978 var _p0 *byte
979 _p0, err = BytePtrFromString(path)
980 if err != nil {
981 return
982 }
983 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
984 if e1 != 0 {
985 err = errnoErr(e1)
986 }
987 return
988 }
989
990 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
991
992 func Mknod(path string, mode uint32, dev int) (err error) {
993 var _p0 *byte
994 _p0, err = BytePtrFromString(path)
995 if err != nil {
996 return
997 }
998 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
999 if e1 != 0 {
1000 err = errnoErr(e1)
1001 }
1002 return
1003 }
1004
1005 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1006
1007 func Open(path string, mode int, perm uint32) (fd int, err error) {
1008 var _p0 *byte
1009 _p0, err = BytePtrFromString(path)
1010 if err != nil {
1011 return
1012 }
1013 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1014 fd = int(r0)
1015 if e1 != 0 {
1016 err = errnoErr(e1)
1017 }
1018 return
1019 }
1020
1021 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1022
1023 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1024 var _p0 *byte
1025 _p0, err = BytePtrFromString(path)
1026 if err != nil {
1027 return
1028 }
1029 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
1030 fd = int(r0)
1031 if e1 != 0 {
1032 err = errnoErr(e1)
1033 }
1034 return
1035 }
1036
1037 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1038
1039 func Pathconf(path string, name int) (val int, err error) {
1040 var _p0 *byte
1041 _p0, err = BytePtrFromString(path)
1042 if err != nil {
1043 return
1044 }
1045 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1046 val = int(r0)
1047 if e1 != 0 {
1048 err = errnoErr(e1)
1049 }
1050 return
1051 }
1052
1053 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1054
1055 func Pread(fd int, p []byte, offset int64) (n int, err error) {
1056 var _p0 unsafe.Pointer
1057 if len(p) > 0 {
1058 _p0 = unsafe.Pointer(&p[0])
1059 } else {
1060 _p0 = unsafe.Pointer(&_zero)
1061 }
1062 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
1063 n = int(r0)
1064 if e1 != 0 {
1065 err = errnoErr(e1)
1066 }
1067 return
1068 }
1069
1070 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1071
1072 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
1073 var _p0 unsafe.Pointer
1074 if len(p) > 0 {
1075 _p0 = unsafe.Pointer(&p[0])
1076 } else {
1077 _p0 = unsafe.Pointer(&_zero)
1078 }
1079 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
1080 n = int(r0)
1081 if e1 != 0 {
1082 err = errnoErr(e1)
1083 }
1084 return
1085 }
1086
1087 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1088
1089 func read(fd int, p []byte) (n int, err error) {
1090 var _p0 unsafe.Pointer
1091 if len(p) > 0 {
1092 _p0 = unsafe.Pointer(&p[0])
1093 } else {
1094 _p0 = unsafe.Pointer(&_zero)
1095 }
1096 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1097 n = int(r0)
1098 if e1 != 0 {
1099 err = errnoErr(e1)
1100 }
1101 return
1102 }
1103
1104 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1105
1106 func Readlink(path string, buf []byte) (n int, err error) {
1107 var _p0 *byte
1108 _p0, err = BytePtrFromString(path)
1109 if err != nil {
1110 return
1111 }
1112 var _p1 unsafe.Pointer
1113 if len(buf) > 0 {
1114 _p1 = unsafe.Pointer(&buf[0])
1115 } else {
1116 _p1 = unsafe.Pointer(&_zero)
1117 }
1118 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1119 n = int(r0)
1120 if e1 != 0 {
1121 err = errnoErr(e1)
1122 }
1123 return
1124 }
1125
1126 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1127
1128 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1129 var _p0 *byte
1130 _p0, err = BytePtrFromString(path)
1131 if err != nil {
1132 return
1133 }
1134 var _p1 unsafe.Pointer
1135 if len(buf) > 0 {
1136 _p1 = unsafe.Pointer(&buf[0])
1137 } else {
1138 _p1 = unsafe.Pointer(&_zero)
1139 }
1140 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1141 n = int(r0)
1142 if e1 != 0 {
1143 err = errnoErr(e1)
1144 }
1145 return
1146 }
1147
1148 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1149
1150 func Rename(from string, to string) (err error) {
1151 var _p0 *byte
1152 _p0, err = BytePtrFromString(from)
1153 if err != nil {
1154 return
1155 }
1156 var _p1 *byte
1157 _p1, err = BytePtrFromString(to)
1158 if err != nil {
1159 return
1160 }
1161 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1162 if e1 != 0 {
1163 err = errnoErr(e1)
1164 }
1165 return
1166 }
1167
1168 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1169
1170 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1171 var _p0 *byte
1172 _p0, err = BytePtrFromString(from)
1173 if err != nil {
1174 return
1175 }
1176 var _p1 *byte
1177 _p1, err = BytePtrFromString(to)
1178 if err != nil {
1179 return
1180 }
1181 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1182 if e1 != 0 {
1183 err = errnoErr(e1)
1184 }
1185 return
1186 }
1187
1188 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1189
1190 func Revoke(path string) (err error) {
1191 var _p0 *byte
1192 _p0, err = BytePtrFromString(path)
1193 if err != nil {
1194 return
1195 }
1196 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1197 if e1 != 0 {
1198 err = errnoErr(e1)
1199 }
1200 return
1201 }
1202
1203 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1204
1205 func Rmdir(path string) (err error) {
1206 var _p0 *byte
1207 _p0, err = BytePtrFromString(path)
1208 if err != nil {
1209 return
1210 }
1211 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
1212 if e1 != 0 {
1213 err = errnoErr(e1)
1214 }
1215 return
1216 }
1217
1218 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1219
1220 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1221 r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
1222 newoffset = int64(int64(r1)<<32 | int64(r0))
1223 if e1 != 0 {
1224 err = errnoErr(e1)
1225 }
1226 return
1227 }
1228
1229 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1230
1231 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1232 _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1233 if e1 != 0 {
1234 err = errnoErr(e1)
1235 }
1236 return
1237 }
1238
1239 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1240
1241 func Setegid(egid int) (err error) {
1242 _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
1243 if e1 != 0 {
1244 err = errnoErr(e1)
1245 }
1246 return
1247 }
1248
1249 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1250
1251 func Seteuid(euid int) (err error) {
1252 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
1253 if e1 != 0 {
1254 err = errnoErr(e1)
1255 }
1256 return
1257 }
1258
1259 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1260
1261 func Setgid(gid int) (err error) {
1262 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
1263 if e1 != 0 {
1264 err = errnoErr(e1)
1265 }
1266 return
1267 }
1268
1269 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1270
1271 func Setlogin(name string) (err error) {
1272 var _p0 *byte
1273 _p0, err = BytePtrFromString(name)
1274 if err != nil {
1275 return
1276 }
1277 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
1278 if e1 != 0 {
1279 err = errnoErr(e1)
1280 }
1281 return
1282 }
1283
1284 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1285
1286 func Setpgid(pid int, pgid int) (err error) {
1287 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
1288 if e1 != 0 {
1289 err = errnoErr(e1)
1290 }
1291 return
1292 }
1293
1294 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1295
1296 func Setpriority(which int, who int, prio int) (err error) {
1297 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
1298 if e1 != 0 {
1299 err = errnoErr(e1)
1300 }
1301 return
1302 }
1303
1304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1305
1306 func Setprivexec(flag int) (err error) {
1307 _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
1308 if e1 != 0 {
1309 err = errnoErr(e1)
1310 }
1311 return
1312 }
1313
1314 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1315
1316 func Setregid(rgid int, egid int) (err error) {
1317 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
1318 if e1 != 0 {
1319 err = errnoErr(e1)
1320 }
1321 return
1322 }
1323
1324 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1325
1326 func Setreuid(ruid int, euid int) (err error) {
1327 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
1328 if e1 != 0 {
1329 err = errnoErr(e1)
1330 }
1331 return
1332 }
1333
1334 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1335
1336 func Setrlimit(which int, lim *Rlimit) (err error) {
1337 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1338 if e1 != 0 {
1339 err = errnoErr(e1)
1340 }
1341 return
1342 }
1343
1344 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1345
1346 func Setsid() (pid int, err error) {
1347 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
1348 pid = int(r0)
1349 if e1 != 0 {
1350 err = errnoErr(e1)
1351 }
1352 return
1353 }
1354
1355 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1356
1357 func Settimeofday(tp *Timeval) (err error) {
1358 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1359 if e1 != 0 {
1360 err = errnoErr(e1)
1361 }
1362 return
1363 }
1364
1365 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1366
1367 func Setuid(uid int) (err error) {
1368 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
1369 if e1 != 0 {
1370 err = errnoErr(e1)
1371 }
1372 return
1373 }
2454 _, _, e1 := syscall_syscall(funcPC(libc_lstat64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2455 if e1 != 0 {
2456 err = errnoErr(e1)
2457 }
2458 return
2459 }
2460
2461 func libc_lstat64_trampoline()
2462
2463 //go:linkname libc_lstat64 libc_lstat64
2464 //go:cgo_import_dynamic libc_lstat64 lstat64 "/usr/lib/libSystem.B.dylib"
13742465
13752466 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13762467
13802471 if err != nil {
13812472 return
13822473 }
1383 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1384 if e1 != 0 {
1385 err = errnoErr(e1)
1386 }
1387 return
1388 }
2474 _, _, e1 := syscall_syscall(funcPC(libc_stat64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2475 if e1 != 0 {
2476 err = errnoErr(e1)
2477 }
2478 return
2479 }
2480
2481 func libc_stat64_trampoline()
2482
2483 //go:linkname libc_stat64 libc_stat64
2484 //go:cgo_import_dynamic libc_stat64 stat64 "/usr/lib/libSystem.B.dylib"
13892485
13902486 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13912487
13952491 if err != nil {
13962492 return
13972493 }
1398 _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1399 if e1 != 0 {
1400 err = errnoErr(e1)
1401 }
1402 return
1403 }
1404
1405 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1406
1407 func Symlink(path string, link string) (err error) {
1408 var _p0 *byte
1409 _p0, err = BytePtrFromString(path)
1410 if err != nil {
1411 return
1412 }
1413 var _p1 *byte
1414 _p1, err = BytePtrFromString(link)
1415 if err != nil {
1416 return
1417 }
1418 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1419 if e1 != 0 {
1420 err = errnoErr(e1)
1421 }
1422 return
1423 }
1424
1425 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1426
1427 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
1428 var _p0 *byte
1429 _p0, err = BytePtrFromString(oldpath)
1430 if err != nil {
1431 return
1432 }
1433 var _p1 *byte
1434 _p1, err = BytePtrFromString(newpath)
1435 if err != nil {
1436 return
1437 }
1438 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1439 if e1 != 0 {
1440 err = errnoErr(e1)
1441 }
1442 return
1443 }
1444
1445 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1446
1447 func Sync() (err error) {
1448 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
1449 if e1 != 0 {
1450 err = errnoErr(e1)
1451 }
1452 return
1453 }
1454
1455 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1456
1457 func Truncate(path string, length int64) (err error) {
1458 var _p0 *byte
1459 _p0, err = BytePtrFromString(path)
1460 if err != nil {
1461 return
1462 }
1463 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
1464 if e1 != 0 {
1465 err = errnoErr(e1)
1466 }
1467 return
1468 }
1469
1470 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1471
1472 func Umask(newmask int) (oldmask int) {
1473 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
1474 oldmask = int(r0)
1475 return
1476 }
1477
1478 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1479
1480 func Undelete(path string) (err error) {
1481 var _p0 *byte
1482 _p0, err = BytePtrFromString(path)
1483 if err != nil {
1484 return
1485 }
1486 _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1487 if e1 != 0 {
1488 err = errnoErr(e1)
1489 }
1490 return
1491 }
1492
1493 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1494
1495 func Unlink(path string) (err error) {
1496 var _p0 *byte
1497 _p0, err = BytePtrFromString(path)
1498 if err != nil {
1499 return
1500 }
1501 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1502 if e1 != 0 {
1503 err = errnoErr(e1)
1504 }
1505 return
1506 }
1507
1508 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1509
1510 func Unlinkat(dirfd int, path string, flags int) (err error) {
1511 var _p0 *byte
1512 _p0, err = BytePtrFromString(path)
1513 if err != nil {
1514 return
1515 }
1516 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
1517 if e1 != 0 {
1518 err = errnoErr(e1)
1519 }
1520 return
1521 }
1522
1523 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1524
1525 func Unmount(path string, flags int) (err error) {
1526 var _p0 *byte
1527 _p0, err = BytePtrFromString(path)
1528 if err != nil {
1529 return
1530 }
1531 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1532 if e1 != 0 {
1533 err = errnoErr(e1)
1534 }
1535 return
1536 }
1537
1538 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1539
1540 func write(fd int, p []byte) (n int, err error) {
1541 var _p0 unsafe.Pointer
1542 if len(p) > 0 {
1543 _p0 = unsafe.Pointer(&p[0])
1544 } else {
1545 _p0 = unsafe.Pointer(&_zero)
1546 }
1547 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1548 n = int(r0)
1549 if e1 != 0 {
1550 err = errnoErr(e1)
1551 }
1552 return
1553 }
1554
1555 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1556
1557 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
1558 r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
1559 ret = uintptr(r0)
1560 if e1 != 0 {
1561 err = errnoErr(e1)
1562 }
1563 return
1564 }
1565
1566 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1567
1568 func munmap(addr uintptr, length uintptr) (err error) {
1569 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
1570 if e1 != 0 {
1571 err = errnoErr(e1)
1572 }
1573 return
1574 }
1575
1576 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1577
1578 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
1579 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1580 n = int(r0)
1581 if e1 != 0 {
1582 err = errnoErr(e1)
1583 }
1584 return
1585 }
1586
1587 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1588
1589 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
1590 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1591 n = int(r0)
1592 if e1 != 0 {
1593 err = errnoErr(e1)
1594 }
1595 return
1596 }
1597
1598 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1599
1600 func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
1601 r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1602 sec = int32(r0)
1603 usec = int32(r1)
1604 if e1 != 0 {
1605 err = errnoErr(e1)
1606 }
1607 return
1608 }
2494 _, _, e1 := syscall_syscall(funcPC(libc_statfs64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2495 if e1 != 0 {
2496 err = errnoErr(e1)
2497 }
2498 return
2499 }
2500
2501 func libc_statfs64_trampoline()
2502
2503 //go:linkname libc_statfs64 libc_statfs64
2504 //go:cgo_import_dynamic libc_statfs64 statfs64 "/usr/lib/libSystem.B.dylib"
0 // go run mkasm_darwin.go 386
1 // Code generated by the command above; DO NOT EDIT.
2
3 // +build go1.12
4
5 #include "textflag.h"
6 TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
7 JMP libc_getgroups(SB)
8 TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
9 JMP libc_setgroups(SB)
10 TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
11 JMP libc_wait4(SB)
12 TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
13 JMP libc_accept(SB)
14 TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
15 JMP libc_bind(SB)
16 TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
17 JMP libc_connect(SB)
18 TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
19 JMP libc_socket(SB)
20 TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
21 JMP libc_getsockopt(SB)
22 TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
23 JMP libc_setsockopt(SB)
24 TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
25 JMP libc_getpeername(SB)
26 TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
27 JMP libc_getsockname(SB)
28 TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
29 JMP libc_shutdown(SB)
30 TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
31 JMP libc_socketpair(SB)
32 TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
33 JMP libc_recvfrom(SB)
34 TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
35 JMP libc_sendto(SB)
36 TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
37 JMP libc_recvmsg(SB)
38 TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
39 JMP libc_sendmsg(SB)
40 TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
41 JMP libc_kevent(SB)
42 TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
43 JMP libc___sysctl(SB)
44 TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
45 JMP libc_utimes(SB)
46 TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
47 JMP libc_futimes(SB)
48 TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
49 JMP libc_fcntl(SB)
50 TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
51 JMP libc_poll(SB)
52 TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
53 JMP libc_madvise(SB)
54 TEXT ·libc_mlock_trampoline(SB),NOSPLIT,$0-0
55 JMP libc_mlock(SB)
56 TEXT ·libc_mlockall_trampoline(SB),NOSPLIT,$0-0
57 JMP libc_mlockall(SB)
58 TEXT ·libc_mprotect_trampoline(SB),NOSPLIT,$0-0
59 JMP libc_mprotect(SB)
60 TEXT ·libc_msync_trampoline(SB),NOSPLIT,$0-0
61 JMP libc_msync(SB)
62 TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
63 JMP libc_munlock(SB)
64 TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
65 JMP libc_munlockall(SB)
66 TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
67 JMP libc_ptrace(SB)
68 TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
69 JMP libc_getattrlist(SB)
70 TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
71 JMP libc_pipe(SB)
72 TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
73 JMP libc_getxattr(SB)
74 TEXT ·libc_fgetxattr_trampoline(SB),NOSPLIT,$0-0
75 JMP libc_fgetxattr(SB)
76 TEXT ·libc_setxattr_trampoline(SB),NOSPLIT,$0-0
77 JMP libc_setxattr(SB)
78 TEXT ·libc_fsetxattr_trampoline(SB),NOSPLIT,$0-0
79 JMP libc_fsetxattr(SB)
80 TEXT ·libc_removexattr_trampoline(SB),NOSPLIT,$0-0
81 JMP libc_removexattr(SB)
82 TEXT ·libc_fremovexattr_trampoline(SB),NOSPLIT,$0-0
83 JMP libc_fremovexattr(SB)
84 TEXT ·libc_listxattr_trampoline(SB),NOSPLIT,$0-0
85 JMP libc_listxattr(SB)
86 TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
87 JMP libc_flistxattr(SB)
88 TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
89 JMP libc_setattrlist(SB)
90 TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
91 JMP libc_kill(SB)
92 TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
93 JMP libc_ioctl(SB)
94 TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
95 JMP libc_sendfile(SB)
96 TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
97 JMP libc_access(SB)
98 TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
99 JMP libc_adjtime(SB)
100 TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
101 JMP libc_chdir(SB)
102 TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
103 JMP libc_chflags(SB)
104 TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
105 JMP libc_chmod(SB)
106 TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
107 JMP libc_chown(SB)
108 TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
109 JMP libc_chroot(SB)
110 TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
111 JMP libc_close(SB)
112 TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
113 JMP libc_dup(SB)
114 TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
115 JMP libc_dup2(SB)
116 TEXT ·libc_exchangedata_trampoline(SB),NOSPLIT,$0-0
117 JMP libc_exchangedata(SB)
118 TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
119 JMP libc_exit(SB)
120 TEXT ·libc_faccessat_trampoline(SB),NOSPLIT,$0-0
121 JMP libc_faccessat(SB)
122 TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
123 JMP libc_fchdir(SB)
124 TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
125 JMP libc_fchflags(SB)
126 TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
127 JMP libc_fchmod(SB)
128 TEXT ·libc_fchmodat_trampoline(SB),NOSPLIT,$0-0
129 JMP libc_fchmodat(SB)
130 TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
131 JMP libc_fchown(SB)
132 TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
133 JMP libc_fchownat(SB)
134 TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
135 JMP libc_flock(SB)
136 TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
137 JMP libc_fpathconf(SB)
138 TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
139 JMP libc_fsync(SB)
140 TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
141 JMP libc_ftruncate(SB)
142 TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
143 JMP libc_getdtablesize(SB)
144 TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
145 JMP libc_getegid(SB)
146 TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
147 JMP libc_geteuid(SB)
148 TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
149 JMP libc_getgid(SB)
150 TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
151 JMP libc_getpgid(SB)
152 TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
153 JMP libc_getpgrp(SB)
154 TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
155 JMP libc_getpid(SB)
156 TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
157 JMP libc_getppid(SB)
158 TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
159 JMP libc_getpriority(SB)
160 TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
161 JMP libc_getrlimit(SB)
162 TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
163 JMP libc_getrusage(SB)
164 TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
165 JMP libc_getsid(SB)
166 TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
167 JMP libc_getuid(SB)
168 TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
169 JMP libc_issetugid(SB)
170 TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
171 JMP libc_kqueue(SB)
172 TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
173 JMP libc_lchown(SB)
174 TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
175 JMP libc_link(SB)
176 TEXT ·libc_linkat_trampoline(SB),NOSPLIT,$0-0
177 JMP libc_linkat(SB)
178 TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
179 JMP libc_listen(SB)
180 TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
181 JMP libc_mkdir(SB)
182 TEXT ·libc_mkdirat_trampoline(SB),NOSPLIT,$0-0
183 JMP libc_mkdirat(SB)
184 TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
185 JMP libc_mkfifo(SB)
186 TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
187 JMP libc_mknod(SB)
188 TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
189 JMP libc_open(SB)
190 TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
191 JMP libc_openat(SB)
192 TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
193 JMP libc_pathconf(SB)
194 TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
195 JMP libc_pread(SB)
196 TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
197 JMP libc_pwrite(SB)
198 TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
199 JMP libc_read(SB)
200 TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
201 JMP libc_readlink(SB)
202 TEXT ·libc_readlinkat_trampoline(SB),NOSPLIT,$0-0
203 JMP libc_readlinkat(SB)
204 TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
205 JMP libc_rename(SB)
206 TEXT ·libc_renameat_trampoline(SB),NOSPLIT,$0-0
207 JMP libc_renameat(SB)
208 TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
209 JMP libc_revoke(SB)
210 TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
211 JMP libc_rmdir(SB)
212 TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
213 JMP libc_lseek(SB)
214 TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
215 JMP libc_select(SB)
216 TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
217 JMP libc_setegid(SB)
218 TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
219 JMP libc_seteuid(SB)
220 TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
221 JMP libc_setgid(SB)
222 TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
223 JMP libc_setlogin(SB)
224 TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
225 JMP libc_setpgid(SB)
226 TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
227 JMP libc_setpriority(SB)
228 TEXT ·libc_setprivexec_trampoline(SB),NOSPLIT,$0-0
229 JMP libc_setprivexec(SB)
230 TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
231 JMP libc_setregid(SB)
232 TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
233 JMP libc_setreuid(SB)
234 TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
235 JMP libc_setrlimit(SB)
236 TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
237 JMP libc_setsid(SB)
238 TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
239 JMP libc_settimeofday(SB)
240 TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
241 JMP libc_setuid(SB)
242 TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
243 JMP libc_symlink(SB)
244 TEXT ·libc_symlinkat_trampoline(SB),NOSPLIT,$0-0
245 JMP libc_symlinkat(SB)
246 TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
247 JMP libc_sync(SB)
248 TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
249 JMP libc_truncate(SB)
250 TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
251 JMP libc_umask(SB)
252 TEXT ·libc_undelete_trampoline(SB),NOSPLIT,$0-0
253 JMP libc_undelete(SB)
254 TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
255 JMP libc_unlink(SB)
256 TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
257 JMP libc_unlinkat(SB)
258 TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
259 JMP libc_unmount(SB)
260 TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
261 JMP libc_write(SB)
262 TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
263 JMP libc_mmap(SB)
264 TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
265 JMP libc_munmap(SB)
266 TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
267 JMP libc_gettimeofday(SB)
268 TEXT ·libc_fstat64_trampoline(SB),NOSPLIT,$0-0
269 JMP libc_fstat64(SB)
270 TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
271 JMP libc_fstatat64(SB)
272 TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
273 JMP libc_fstatfs64(SB)
274 TEXT ·libc___getdirentries64_trampoline(SB),NOSPLIT,$0-0
275 JMP libc___getdirentries64(SB)
276 TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
277 JMP libc_getfsstat64(SB)
278 TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
279 JMP libc_lstat64(SB)
280 TEXT ·libc_stat64_trampoline(SB),NOSPLIT,$0-0
281 JMP libc_stat64(SB)
282 TEXT ·libc_statfs64_trampoline(SB),NOSPLIT,$0-0
283 JMP libc_statfs64(SB)
0 // go run mksyscall.go -tags darwin,amd64,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build darwin,amd64,!go1.12
4
5 package unix
6
7 import (
8 "syscall"
9 "unsafe"
10 )
11
12 var _ syscall.Errno
13
14 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15
16 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
17 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
18 n = int(r0)
19 if e1 != 0 {
20 err = errnoErr(e1)
21 }
22 return
23 }
24
25 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
26
27 func setgroups(ngid int, gid *_Gid_t) (err error) {
28 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
29 if e1 != 0 {
30 err = errnoErr(e1)
31 }
32 return
33 }
34
35 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
36
37 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
38 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
39 wpid = int(r0)
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
49 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
50 fd = int(r0)
51 if e1 != 0 {
52 err = errnoErr(e1)
53 }
54 return
55 }
56
57 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
58
59 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
60 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
61 if e1 != 0 {
62 err = errnoErr(e1)
63 }
64 return
65 }
66
67 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
68
69 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
70 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
71 if e1 != 0 {
72 err = errnoErr(e1)
73 }
74 return
75 }
76
77 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
78
79 func socket(domain int, typ int, proto int) (fd int, err error) {
80 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
81 fd = int(r0)
82 if e1 != 0 {
83 err = errnoErr(e1)
84 }
85 return
86 }
87
88 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
89
90 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
91 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
92 if e1 != 0 {
93 err = errnoErr(e1)
94 }
95 return
96 }
97
98 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
99
100 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
101 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
102 if e1 != 0 {
103 err = errnoErr(e1)
104 }
105 return
106 }
107
108 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
109
110 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
111 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
112 if e1 != 0 {
113 err = errnoErr(e1)
114 }
115 return
116 }
117
118 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
119
120 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
121 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
122 if e1 != 0 {
123 err = errnoErr(e1)
124 }
125 return
126 }
127
128 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
129
130 func Shutdown(s int, how int) (err error) {
131 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
132 if e1 != 0 {
133 err = errnoErr(e1)
134 }
135 return
136 }
137
138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
139
140 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
141 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
142 if e1 != 0 {
143 err = errnoErr(e1)
144 }
145 return
146 }
147
148 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
149
150 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
151 var _p0 unsafe.Pointer
152 if len(p) > 0 {
153 _p0 = unsafe.Pointer(&p[0])
154 } else {
155 _p0 = unsafe.Pointer(&_zero)
156 }
157 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
158 n = int(r0)
159 if e1 != 0 {
160 err = errnoErr(e1)
161 }
162 return
163 }
164
165 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
166
167 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
168 var _p0 unsafe.Pointer
169 if len(buf) > 0 {
170 _p0 = unsafe.Pointer(&buf[0])
171 } else {
172 _p0 = unsafe.Pointer(&_zero)
173 }
174 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
175 if e1 != 0 {
176 err = errnoErr(e1)
177 }
178 return
179 }
180
181 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
182
183 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
184 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
185 n = int(r0)
186 if e1 != 0 {
187 err = errnoErr(e1)
188 }
189 return
190 }
191
192 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
193
194 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
195 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
196 n = int(r0)
197 if e1 != 0 {
198 err = errnoErr(e1)
199 }
200 return
201 }
202
203 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
204
205 func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
206 r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
207 n = int(r0)
208 if e1 != 0 {
209 err = errnoErr(e1)
210 }
211 return
212 }
213
214 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
215
216 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
217 var _p0 unsafe.Pointer
218 if len(mib) > 0 {
219 _p0 = unsafe.Pointer(&mib[0])
220 } else {
221 _p0 = unsafe.Pointer(&_zero)
222 }
223 _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
224 if e1 != 0 {
225 err = errnoErr(e1)
226 }
227 return
228 }
229
230 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
231
232 func utimes(path string, timeval *[2]Timeval) (err error) {
233 var _p0 *byte
234 _p0, err = BytePtrFromString(path)
235 if err != nil {
236 return
237 }
238 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
239 if e1 != 0 {
240 err = errnoErr(e1)
241 }
242 return
243 }
244
245 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
246
247 func futimes(fd int, timeval *[2]Timeval) (err error) {
248 _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
249 if e1 != 0 {
250 err = errnoErr(e1)
251 }
252 return
253 }
254
255 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
256
257 func fcntl(fd int, cmd int, arg int) (val int, err error) {
258 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
259 val = int(r0)
260 if e1 != 0 {
261 err = errnoErr(e1)
262 }
263 return
264 }
265
266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
279 func Madvise(b []byte, behav int) (err error) {
280 var _p0 unsafe.Pointer
281 if len(b) > 0 {
282 _p0 = unsafe.Pointer(&b[0])
283 } else {
284 _p0 = unsafe.Pointer(&_zero)
285 }
286 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
287 if e1 != 0 {
288 err = errnoErr(e1)
289 }
290 return
291 }
292
293 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
294
295 func Mlock(b []byte) (err error) {
296 var _p0 unsafe.Pointer
297 if len(b) > 0 {
298 _p0 = unsafe.Pointer(&b[0])
299 } else {
300 _p0 = unsafe.Pointer(&_zero)
301 }
302 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
303 if e1 != 0 {
304 err = errnoErr(e1)
305 }
306 return
307 }
308
309 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
310
311 func Mlockall(flags int) (err error) {
312 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
313 if e1 != 0 {
314 err = errnoErr(e1)
315 }
316 return
317 }
318
319 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
320
321 func Mprotect(b []byte, prot int) (err error) {
322 var _p0 unsafe.Pointer
323 if len(b) > 0 {
324 _p0 = unsafe.Pointer(&b[0])
325 } else {
326 _p0 = unsafe.Pointer(&_zero)
327 }
328 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
329 if e1 != 0 {
330 err = errnoErr(e1)
331 }
332 return
333 }
334
335 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
336
337 func Msync(b []byte, flags int) (err error) {
338 var _p0 unsafe.Pointer
339 if len(b) > 0 {
340 _p0 = unsafe.Pointer(&b[0])
341 } else {
342 _p0 = unsafe.Pointer(&_zero)
343 }
344 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
345 if e1 != 0 {
346 err = errnoErr(e1)
347 }
348 return
349 }
350
351 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
352
353 func Munlock(b []byte) (err error) {
354 var _p0 unsafe.Pointer
355 if len(b) > 0 {
356 _p0 = unsafe.Pointer(&b[0])
357 } else {
358 _p0 = unsafe.Pointer(&_zero)
359 }
360 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
361 if e1 != 0 {
362 err = errnoErr(e1)
363 }
364 return
365 }
366
367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
368
369 func Munlockall() (err error) {
370 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
371 if e1 != 0 {
372 err = errnoErr(e1)
373 }
374 return
375 }
376
377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
378
379 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
380 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
381 if e1 != 0 {
382 err = errnoErr(e1)
383 }
384 return
385 }
386
387 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
388
389 func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
390 _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
391 if e1 != 0 {
392 err = errnoErr(e1)
393 }
394 return
395 }
396
397 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
398
399 func pipe() (r int, w int, err error) {
400 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
401 r = int(r0)
402 w = int(r1)
403 if e1 != 0 {
404 err = errnoErr(e1)
405 }
406 return
407 }
408
409 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
410
411 func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
412 var _p0 *byte
413 _p0, err = BytePtrFromString(path)
414 if err != nil {
415 return
416 }
417 var _p1 *byte
418 _p1, err = BytePtrFromString(attr)
419 if err != nil {
420 return
421 }
422 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
423 sz = int(r0)
424 if e1 != 0 {
425 err = errnoErr(e1)
426 }
427 return
428 }
429
430 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
431
432 func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
433 var _p0 *byte
434 _p0, err = BytePtrFromString(attr)
435 if err != nil {
436 return
437 }
438 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
439 sz = int(r0)
440 if e1 != 0 {
441 err = errnoErr(e1)
442 }
443 return
444 }
445
446 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
447
448 func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
449 var _p0 *byte
450 _p0, err = BytePtrFromString(path)
451 if err != nil {
452 return
453 }
454 var _p1 *byte
455 _p1, err = BytePtrFromString(attr)
456 if err != nil {
457 return
458 }
459 _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
460 if e1 != 0 {
461 err = errnoErr(e1)
462 }
463 return
464 }
465
466 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
467
468 func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
469 var _p0 *byte
470 _p0, err = BytePtrFromString(attr)
471 if err != nil {
472 return
473 }
474 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
475 if e1 != 0 {
476 err = errnoErr(e1)
477 }
478 return
479 }
480
481 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
482
483 func removexattr(path string, attr string, options int) (err error) {
484 var _p0 *byte
485 _p0, err = BytePtrFromString(path)
486 if err != nil {
487 return
488 }
489 var _p1 *byte
490 _p1, err = BytePtrFromString(attr)
491 if err != nil {
492 return
493 }
494 _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
495 if e1 != 0 {
496 err = errnoErr(e1)
497 }
498 return
499 }
500
501 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
502
503 func fremovexattr(fd int, attr string, options int) (err error) {
504 var _p0 *byte
505 _p0, err = BytePtrFromString(attr)
506 if err != nil {
507 return
508 }
509 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
510 if e1 != 0 {
511 err = errnoErr(e1)
512 }
513 return
514 }
515
516 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
517
518 func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
519 var _p0 *byte
520 _p0, err = BytePtrFromString(path)
521 if err != nil {
522 return
523 }
524 r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
525 sz = int(r0)
526 if e1 != 0 {
527 err = errnoErr(e1)
528 }
529 return
530 }
531
532 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
533
534 func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
535 r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
536 sz = int(r0)
537 if e1 != 0 {
538 err = errnoErr(e1)
539 }
540 return
541 }
542
543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
544
545 func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
546 _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
547 if e1 != 0 {
548 err = errnoErr(e1)
549 }
550 return
551 }
552
553 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
554
555 func kill(pid int, signum int, posix int) (err error) {
556 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
557 if e1 != 0 {
558 err = errnoErr(e1)
559 }
560 return
561 }
562
563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
564
565 func ioctl(fd int, req uint, arg uintptr) (err error) {
566 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
567 if e1 != 0 {
568 err = errnoErr(e1)
569 }
570 return
571 }
572
573 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
574
575 func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
576 _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
577 if e1 != 0 {
578 err = errnoErr(e1)
579 }
580 return
581 }
582
583 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
584
585 func Access(path string, mode uint32) (err error) {
586 var _p0 *byte
587 _p0, err = BytePtrFromString(path)
588 if err != nil {
589 return
590 }
591 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
592 if e1 != 0 {
593 err = errnoErr(e1)
594 }
595 return
596 }
597
598 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
599
600 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
601 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
602 if e1 != 0 {
603 err = errnoErr(e1)
604 }
605 return
606 }
607
608 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
609
610 func Chdir(path string) (err error) {
611 var _p0 *byte
612 _p0, err = BytePtrFromString(path)
613 if err != nil {
614 return
615 }
616 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
617 if e1 != 0 {
618 err = errnoErr(e1)
619 }
620 return
621 }
622
623 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
624
625 func Chflags(path string, flags int) (err error) {
626 var _p0 *byte
627 _p0, err = BytePtrFromString(path)
628 if err != nil {
629 return
630 }
631 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
632 if e1 != 0 {
633 err = errnoErr(e1)
634 }
635 return
636 }
637
638 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
639
640 func Chmod(path string, mode uint32) (err error) {
641 var _p0 *byte
642 _p0, err = BytePtrFromString(path)
643 if err != nil {
644 return
645 }
646 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
647 if e1 != 0 {
648 err = errnoErr(e1)
649 }
650 return
651 }
652
653 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
654
655 func Chown(path string, uid int, gid int) (err error) {
656 var _p0 *byte
657 _p0, err = BytePtrFromString(path)
658 if err != nil {
659 return
660 }
661 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
662 if e1 != 0 {
663 err = errnoErr(e1)
664 }
665 return
666 }
667
668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
669
670 func Chroot(path string) (err error) {
671 var _p0 *byte
672 _p0, err = BytePtrFromString(path)
673 if err != nil {
674 return
675 }
676 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
677 if e1 != 0 {
678 err = errnoErr(e1)
679 }
680 return
681 }
682
683 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
684
685 func Close(fd int) (err error) {
686 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
687 if e1 != 0 {
688 err = errnoErr(e1)
689 }
690 return
691 }
692
693 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
694
695 func Dup(fd int) (nfd int, err error) {
696 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
697 nfd = int(r0)
698 if e1 != 0 {
699 err = errnoErr(e1)
700 }
701 return
702 }
703
704 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
705
706 func Dup2(from int, to int) (err error) {
707 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
708 if e1 != 0 {
709 err = errnoErr(e1)
710 }
711 return
712 }
713
714 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
715
716 func Exchangedata(path1 string, path2 string, options int) (err error) {
717 var _p0 *byte
718 _p0, err = BytePtrFromString(path1)
719 if err != nil {
720 return
721 }
722 var _p1 *byte
723 _p1, err = BytePtrFromString(path2)
724 if err != nil {
725 return
726 }
727 _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
728 if e1 != 0 {
729 err = errnoErr(e1)
730 }
731 return
732 }
733
734 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
735
736 func Exit(code int) {
737 Syscall(SYS_EXIT, uintptr(code), 0, 0)
738 return
739 }
740
741 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
742
743 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
744 var _p0 *byte
745 _p0, err = BytePtrFromString(path)
746 if err != nil {
747 return
748 }
749 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
750 if e1 != 0 {
751 err = errnoErr(e1)
752 }
753 return
754 }
755
756 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
757
758 func Fchdir(fd int) (err error) {
759 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
760 if e1 != 0 {
761 err = errnoErr(e1)
762 }
763 return
764 }
765
766 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
767
768 func Fchflags(fd int, flags int) (err error) {
769 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
770 if e1 != 0 {
771 err = errnoErr(e1)
772 }
773 return
774 }
775
776 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
777
778 func Fchmod(fd int, mode uint32) (err error) {
779 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
780 if e1 != 0 {
781 err = errnoErr(e1)
782 }
783 return
784 }
785
786 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
787
788 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
789 var _p0 *byte
790 _p0, err = BytePtrFromString(path)
791 if err != nil {
792 return
793 }
794 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
795 if e1 != 0 {
796 err = errnoErr(e1)
797 }
798 return
799 }
800
801 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
802
803 func Fchown(fd int, uid int, gid int) (err error) {
804 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
805 if e1 != 0 {
806 err = errnoErr(e1)
807 }
808 return
809 }
810
811 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
812
813 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
814 var _p0 *byte
815 _p0, err = BytePtrFromString(path)
816 if err != nil {
817 return
818 }
819 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
820 if e1 != 0 {
821 err = errnoErr(e1)
822 }
823 return
824 }
825
826 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
827
828 func Flock(fd int, how int) (err error) {
829 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
830 if e1 != 0 {
831 err = errnoErr(e1)
832 }
833 return
834 }
835
836 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
837
838 func Fpathconf(fd int, name int) (val int, err error) {
839 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
840 val = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func Fsync(fd int) (err error) {
850 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
851 if e1 != 0 {
852 err = errnoErr(e1)
853 }
854 return
855 }
856
857 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
858
859 func Ftruncate(fd int, length int64) (err error) {
860 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
861 if e1 != 0 {
862 err = errnoErr(e1)
863 }
864 return
865 }
866
867 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
868
869 func Getdtablesize() (size int) {
870 r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
871 size = int(r0)
872 return
873 }
874
875 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
876
877 func Getegid() (egid int) {
878 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
879 egid = int(r0)
880 return
881 }
882
883 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
884
885 func Geteuid() (uid int) {
886 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
887 uid = int(r0)
888 return
889 }
890
891 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
892
893 func Getgid() (gid int) {
894 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
895 gid = int(r0)
896 return
897 }
898
899 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
900
901 func Getpgid(pid int) (pgid int, err error) {
902 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
903 pgid = int(r0)
904 if e1 != 0 {
905 err = errnoErr(e1)
906 }
907 return
908 }
909
910 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
911
912 func Getpgrp() (pgrp int) {
913 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
914 pgrp = int(r0)
915 return
916 }
917
918 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
919
920 func Getpid() (pid int) {
921 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
922 pid = int(r0)
923 return
924 }
925
926 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
927
928 func Getppid() (ppid int) {
929 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
930 ppid = int(r0)
931 return
932 }
933
934 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
935
936 func Getpriority(which int, who int) (prio int, err error) {
937 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
938 prio = int(r0)
939 if e1 != 0 {
940 err = errnoErr(e1)
941 }
942 return
943 }
944
945 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
946
947 func Getrlimit(which int, lim *Rlimit) (err error) {
948 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
949 if e1 != 0 {
950 err = errnoErr(e1)
951 }
952 return
953 }
954
955 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
956
957 func Getrusage(who int, rusage *Rusage) (err error) {
958 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
959 if e1 != 0 {
960 err = errnoErr(e1)
961 }
962 return
963 }
964
965 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
966
967 func Getsid(pid int) (sid int, err error) {
968 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
969 sid = int(r0)
970 if e1 != 0 {
971 err = errnoErr(e1)
972 }
973 return
974 }
975
976 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
977
978 func Getuid() (uid int) {
979 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
980 uid = int(r0)
981 return
982 }
983
984 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
985
986 func Issetugid() (tainted bool) {
987 r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
988 tainted = bool(r0 != 0)
989 return
990 }
991
992 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
993
994 func Kqueue() (fd int, err error) {
995 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
996 fd = int(r0)
997 if e1 != 0 {
998 err = errnoErr(e1)
999 }
1000 return
1001 }
1002
1003 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1004
1005 func Lchown(path string, uid int, gid int) (err error) {
1006 var _p0 *byte
1007 _p0, err = BytePtrFromString(path)
1008 if err != nil {
1009 return
1010 }
1011 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
1012 if e1 != 0 {
1013 err = errnoErr(e1)
1014 }
1015 return
1016 }
1017
1018 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1019
1020 func Link(path string, link string) (err error) {
1021 var _p0 *byte
1022 _p0, err = BytePtrFromString(path)
1023 if err != nil {
1024 return
1025 }
1026 var _p1 *byte
1027 _p1, err = BytePtrFromString(link)
1028 if err != nil {
1029 return
1030 }
1031 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1032 if e1 != 0 {
1033 err = errnoErr(e1)
1034 }
1035 return
1036 }
1037
1038 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1039
1040 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
1041 var _p0 *byte
1042 _p0, err = BytePtrFromString(path)
1043 if err != nil {
1044 return
1045 }
1046 var _p1 *byte
1047 _p1, err = BytePtrFromString(link)
1048 if err != nil {
1049 return
1050 }
1051 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1052 if e1 != 0 {
1053 err = errnoErr(e1)
1054 }
1055 return
1056 }
1057
1058 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1059
1060 func Listen(s int, backlog int) (err error) {
1061 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
1062 if e1 != 0 {
1063 err = errnoErr(e1)
1064 }
1065 return
1066 }
1067
1068 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1069
1070 func Mkdir(path string, mode uint32) (err error) {
1071 var _p0 *byte
1072 _p0, err = BytePtrFromString(path)
1073 if err != nil {
1074 return
1075 }
1076 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1077 if e1 != 0 {
1078 err = errnoErr(e1)
1079 }
1080 return
1081 }
1082
1083 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1084
1085 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1086 var _p0 *byte
1087 _p0, err = BytePtrFromString(path)
1088 if err != nil {
1089 return
1090 }
1091 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1092 if e1 != 0 {
1093 err = errnoErr(e1)
1094 }
1095 return
1096 }
1097
1098 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1099
1100 func Mkfifo(path string, mode uint32) (err error) {
1101 var _p0 *byte
1102 _p0, err = BytePtrFromString(path)
1103 if err != nil {
1104 return
1105 }
1106 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1107 if e1 != 0 {
1108 err = errnoErr(e1)
1109 }
1110 return
1111 }
1112
1113 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1114
1115 func Mknod(path string, mode uint32, dev int) (err error) {
1116 var _p0 *byte
1117 _p0, err = BytePtrFromString(path)
1118 if err != nil {
1119 return
1120 }
1121 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1122 if e1 != 0 {
1123 err = errnoErr(e1)
1124 }
1125 return
1126 }
1127
1128 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1129
1130 func Open(path string, mode int, perm uint32) (fd int, err error) {
1131 var _p0 *byte
1132 _p0, err = BytePtrFromString(path)
1133 if err != nil {
1134 return
1135 }
1136 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1137 fd = int(r0)
1138 if e1 != 0 {
1139 err = errnoErr(e1)
1140 }
1141 return
1142 }
1143
1144 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1145
1146 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1147 var _p0 *byte
1148 _p0, err = BytePtrFromString(path)
1149 if err != nil {
1150 return
1151 }
1152 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
1153 fd = int(r0)
1154 if e1 != 0 {
1155 err = errnoErr(e1)
1156 }
1157 return
1158 }
1159
1160 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1161
1162 func Pathconf(path string, name int) (val int, err error) {
1163 var _p0 *byte
1164 _p0, err = BytePtrFromString(path)
1165 if err != nil {
1166 return
1167 }
1168 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1169 val = int(r0)
1170 if e1 != 0 {
1171 err = errnoErr(e1)
1172 }
1173 return
1174 }
1175
1176 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1177
1178 func Pread(fd int, p []byte, offset int64) (n int, err error) {
1179 var _p0 unsafe.Pointer
1180 if len(p) > 0 {
1181 _p0 = unsafe.Pointer(&p[0])
1182 } else {
1183 _p0 = unsafe.Pointer(&_zero)
1184 }
1185 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1186 n = int(r0)
1187 if e1 != 0 {
1188 err = errnoErr(e1)
1189 }
1190 return
1191 }
1192
1193 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1194
1195 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
1196 var _p0 unsafe.Pointer
1197 if len(p) > 0 {
1198 _p0 = unsafe.Pointer(&p[0])
1199 } else {
1200 _p0 = unsafe.Pointer(&_zero)
1201 }
1202 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1203 n = int(r0)
1204 if e1 != 0 {
1205 err = errnoErr(e1)
1206 }
1207 return
1208 }
1209
1210 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1211
1212 func read(fd int, p []byte) (n int, err error) {
1213 var _p0 unsafe.Pointer
1214 if len(p) > 0 {
1215 _p0 = unsafe.Pointer(&p[0])
1216 } else {
1217 _p0 = unsafe.Pointer(&_zero)
1218 }
1219 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1220 n = int(r0)
1221 if e1 != 0 {
1222 err = errnoErr(e1)
1223 }
1224 return
1225 }
1226
1227 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1228
1229 func Readlink(path string, buf []byte) (n int, err error) {
1230 var _p0 *byte
1231 _p0, err = BytePtrFromString(path)
1232 if err != nil {
1233 return
1234 }
1235 var _p1 unsafe.Pointer
1236 if len(buf) > 0 {
1237 _p1 = unsafe.Pointer(&buf[0])
1238 } else {
1239 _p1 = unsafe.Pointer(&_zero)
1240 }
1241 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1242 n = int(r0)
1243 if e1 != 0 {
1244 err = errnoErr(e1)
1245 }
1246 return
1247 }
1248
1249 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1250
1251 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1252 var _p0 *byte
1253 _p0, err = BytePtrFromString(path)
1254 if err != nil {
1255 return
1256 }
1257 var _p1 unsafe.Pointer
1258 if len(buf) > 0 {
1259 _p1 = unsafe.Pointer(&buf[0])
1260 } else {
1261 _p1 = unsafe.Pointer(&_zero)
1262 }
1263 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1264 n = int(r0)
1265 if e1 != 0 {
1266 err = errnoErr(e1)
1267 }
1268 return
1269 }
1270
1271 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1272
1273 func Rename(from string, to string) (err error) {
1274 var _p0 *byte
1275 _p0, err = BytePtrFromString(from)
1276 if err != nil {
1277 return
1278 }
1279 var _p1 *byte
1280 _p1, err = BytePtrFromString(to)
1281 if err != nil {
1282 return
1283 }
1284 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1285 if e1 != 0 {
1286 err = errnoErr(e1)
1287 }
1288 return
1289 }
1290
1291 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1292
1293 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1294 var _p0 *byte
1295 _p0, err = BytePtrFromString(from)
1296 if err != nil {
1297 return
1298 }
1299 var _p1 *byte
1300 _p1, err = BytePtrFromString(to)
1301 if err != nil {
1302 return
1303 }
1304 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1305 if e1 != 0 {
1306 err = errnoErr(e1)
1307 }
1308 return
1309 }
1310
1311 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1312
1313 func Revoke(path string) (err error) {
1314 var _p0 *byte
1315 _p0, err = BytePtrFromString(path)
1316 if err != nil {
1317 return
1318 }
1319 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1320 if e1 != 0 {
1321 err = errnoErr(e1)
1322 }
1323 return
1324 }
1325
1326 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1327
1328 func Rmdir(path string) (err error) {
1329 var _p0 *byte
1330 _p0, err = BytePtrFromString(path)
1331 if err != nil {
1332 return
1333 }
1334 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
1335 if e1 != 0 {
1336 err = errnoErr(e1)
1337 }
1338 return
1339 }
1340
1341 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1342
1343 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1344 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
1345 newoffset = int64(r0)
1346 if e1 != 0 {
1347 err = errnoErr(e1)
1348 }
1349 return
1350 }
1351
1352 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1353
1354 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1355 _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1356 if e1 != 0 {
1357 err = errnoErr(e1)
1358 }
1359 return
1360 }
1361
1362 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1363
1364 func Setegid(egid int) (err error) {
1365 _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
1366 if e1 != 0 {
1367 err = errnoErr(e1)
1368 }
1369 return
1370 }
1371
1372 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1373
1374 func Seteuid(euid int) (err error) {
1375 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
1384 func Setgid(gid int) (err error) {
1385 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
1386 if e1 != 0 {
1387 err = errnoErr(e1)
1388 }
1389 return
1390 }
1391
1392 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1393
1394 func Setlogin(name string) (err error) {
1395 var _p0 *byte
1396 _p0, err = BytePtrFromString(name)
1397 if err != nil {
1398 return
1399 }
1400 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
1401 if e1 != 0 {
1402 err = errnoErr(e1)
1403 }
1404 return
1405 }
1406
1407 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1408
1409 func Setpgid(pid int, pgid int) (err error) {
1410 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
1411 if e1 != 0 {
1412 err = errnoErr(e1)
1413 }
1414 return
1415 }
1416
1417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1418
1419 func Setpriority(which int, who int, prio int) (err error) {
1420 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
1421 if e1 != 0 {
1422 err = errnoErr(e1)
1423 }
1424 return
1425 }
1426
1427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1428
1429 func Setprivexec(flag int) (err error) {
1430 _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
1431 if e1 != 0 {
1432 err = errnoErr(e1)
1433 }
1434 return
1435 }
1436
1437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1438
1439 func Setregid(rgid int, egid int) (err error) {
1440 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
1441 if e1 != 0 {
1442 err = errnoErr(e1)
1443 }
1444 return
1445 }
1446
1447 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1448
1449 func Setreuid(ruid int, euid int) (err error) {
1450 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
1451 if e1 != 0 {
1452 err = errnoErr(e1)
1453 }
1454 return
1455 }
1456
1457 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1458
1459 func Setrlimit(which int, lim *Rlimit) (err error) {
1460 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1461 if e1 != 0 {
1462 err = errnoErr(e1)
1463 }
1464 return
1465 }
1466
1467 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1468
1469 func Setsid() (pid int, err error) {
1470 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
1471 pid = int(r0)
1472 if e1 != 0 {
1473 err = errnoErr(e1)
1474 }
1475 return
1476 }
1477
1478 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1479
1480 func Settimeofday(tp *Timeval) (err error) {
1481 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1482 if e1 != 0 {
1483 err = errnoErr(e1)
1484 }
1485 return
1486 }
1487
1488 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1489
1490 func Setuid(uid int) (err error) {
1491 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
1492 if e1 != 0 {
1493 err = errnoErr(e1)
1494 }
1495 return
1496 }
1497
1498 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1499
1500 func Symlink(path string, link string) (err error) {
1501 var _p0 *byte
1502 _p0, err = BytePtrFromString(path)
1503 if err != nil {
1504 return
1505 }
1506 var _p1 *byte
1507 _p1, err = BytePtrFromString(link)
1508 if err != nil {
1509 return
1510 }
1511 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1512 if e1 != 0 {
1513 err = errnoErr(e1)
1514 }
1515 return
1516 }
1517
1518 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1519
1520 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
1521 var _p0 *byte
1522 _p0, err = BytePtrFromString(oldpath)
1523 if err != nil {
1524 return
1525 }
1526 var _p1 *byte
1527 _p1, err = BytePtrFromString(newpath)
1528 if err != nil {
1529 return
1530 }
1531 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1532 if e1 != 0 {
1533 err = errnoErr(e1)
1534 }
1535 return
1536 }
1537
1538 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1539
1540 func Sync() (err error) {
1541 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
1542 if e1 != 0 {
1543 err = errnoErr(e1)
1544 }
1545 return
1546 }
1547
1548 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1549
1550 func Truncate(path string, length int64) (err error) {
1551 var _p0 *byte
1552 _p0, err = BytePtrFromString(path)
1553 if err != nil {
1554 return
1555 }
1556 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
1557 if e1 != 0 {
1558 err = errnoErr(e1)
1559 }
1560 return
1561 }
1562
1563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1564
1565 func Umask(newmask int) (oldmask int) {
1566 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
1567 oldmask = int(r0)
1568 return
1569 }
1570
1571 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1572
1573 func Undelete(path string) (err error) {
1574 var _p0 *byte
1575 _p0, err = BytePtrFromString(path)
1576 if err != nil {
1577 return
1578 }
1579 _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1580 if e1 != 0 {
1581 err = errnoErr(e1)
1582 }
1583 return
1584 }
1585
1586 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1587
1588 func Unlink(path string) (err error) {
1589 var _p0 *byte
1590 _p0, err = BytePtrFromString(path)
1591 if err != nil {
1592 return
1593 }
1594 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1595 if e1 != 0 {
1596 err = errnoErr(e1)
1597 }
1598 return
1599 }
1600
1601 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1602
1603 func Unlinkat(dirfd int, path string, flags int) (err error) {
1604 var _p0 *byte
1605 _p0, err = BytePtrFromString(path)
1606 if err != nil {
1607 return
1608 }
1609 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
1610 if e1 != 0 {
1611 err = errnoErr(e1)
1612 }
1613 return
1614 }
1615
1616 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1617
1618 func Unmount(path string, flags int) (err error) {
1619 var _p0 *byte
1620 _p0, err = BytePtrFromString(path)
1621 if err != nil {
1622 return
1623 }
1624 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1625 if e1 != 0 {
1626 err = errnoErr(e1)
1627 }
1628 return
1629 }
1630
1631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1632
1633 func write(fd int, p []byte) (n int, err error) {
1634 var _p0 unsafe.Pointer
1635 if len(p) > 0 {
1636 _p0 = unsafe.Pointer(&p[0])
1637 } else {
1638 _p0 = unsafe.Pointer(&_zero)
1639 }
1640 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1641 n = int(r0)
1642 if e1 != 0 {
1643 err = errnoErr(e1)
1644 }
1645 return
1646 }
1647
1648 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1649
1650 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
1651 r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
1652 ret = uintptr(r0)
1653 if e1 != 0 {
1654 err = errnoErr(e1)
1655 }
1656 return
1657 }
1658
1659 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1660
1661 func munmap(addr uintptr, length uintptr) (err error) {
1662 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
1663 if e1 != 0 {
1664 err = errnoErr(e1)
1665 }
1666 return
1667 }
1668
1669 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1670
1671 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
1672 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1673 n = int(r0)
1674 if e1 != 0 {
1675 err = errnoErr(e1)
1676 }
1677 return
1678 }
1679
1680 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1681
1682 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
1683 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1684 n = int(r0)
1685 if e1 != 0 {
1686 err = errnoErr(e1)
1687 }
1688 return
1689 }
1690
1691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1692
1693 func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
1694 r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1695 sec = int64(r0)
1696 usec = int32(r1)
1697 if e1 != 0 {
1698 err = errnoErr(e1)
1699 }
1700 return
1701 }
1702
1703 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1704
1705 func Fstat(fd int, stat *Stat_t) (err error) {
1706 _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
1707 if e1 != 0 {
1708 err = errnoErr(e1)
1709 }
1710 return
1711 }
1712
1713 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1714
1715 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
1716 var _p0 *byte
1717 _p0, err = BytePtrFromString(path)
1718 if err != nil {
1719 return
1720 }
1721 _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
1722 if e1 != 0 {
1723 err = errnoErr(e1)
1724 }
1725 return
1726 }
1727
1728 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1729
1730 func Fstatfs(fd int, stat *Statfs_t) (err error) {
1731 _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
1732 if e1 != 0 {
1733 err = errnoErr(e1)
1734 }
1735 return
1736 }
1737
1738 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1739
1740 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
1741 var _p0 unsafe.Pointer
1742 if len(buf) > 0 {
1743 _p0 = unsafe.Pointer(&buf[0])
1744 } else {
1745 _p0 = unsafe.Pointer(&_zero)
1746 }
1747 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
1748 n = int(r0)
1749 if e1 != 0 {
1750 err = errnoErr(e1)
1751 }
1752 return
1753 }
1754
1755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1756
1757 func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
1758 r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(buf), uintptr(size), uintptr(flags))
1759 n = int(r0)
1760 if e1 != 0 {
1761 err = errnoErr(e1)
1762 }
1763 return
1764 }
1765
1766 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1767
1768 func Lstat(path string, stat *Stat_t) (err error) {
1769 var _p0 *byte
1770 _p0, err = BytePtrFromString(path)
1771 if err != nil {
1772 return
1773 }
1774 _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1775 if e1 != 0 {
1776 err = errnoErr(e1)
1777 }
1778 return
1779 }
1780
1781 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1782
1783 func Stat(path string, stat *Stat_t) (err error) {
1784 var _p0 *byte
1785 _p0, err = BytePtrFromString(path)
1786 if err != nil {
1787 return
1788 }
1789 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1790 if e1 != 0 {
1791 err = errnoErr(e1)
1792 }
1793 return
1794 }
1795
1796 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1797
1798 func Statfs(path string, stat *Statfs_t) (err error) {
1799 var _p0 *byte
1800 _p0, err = BytePtrFromString(path)
1801 if err != nil {
1802 return
1803 }
1804 _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1805 if e1 != 0 {
1806 err = errnoErr(e1)
1807 }
1808 return
1809 }
0 // mksyscall.pl -tags darwin,amd64 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
0 // go run mksyscall.go -tags darwin,amd64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
3 // +build darwin,amd64
3 // +build darwin,amd64,go1.12
44
55 package unix
66
1414 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1515
1616 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
17 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
17 r0, _, e1 := syscall_rawSyscall(funcPC(libc_getgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
1818 n = int(r0)
1919 if e1 != 0 {
2020 err = errnoErr(e1)
2222 return
2323 }
2424
25 func libc_getgroups_trampoline()
26
27 //go:linkname libc_getgroups libc_getgroups
28 //go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib"
29
2530 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2631
2732 func setgroups(ngid int, gid *_Gid_t) (err error) {
28 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
29 if e1 != 0 {
30 err = errnoErr(e1)
31 }
32 return
33 }
33 _, _, e1 := syscall_rawSyscall(funcPC(libc_setgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
34 if e1 != 0 {
35 err = errnoErr(e1)
36 }
37 return
38 }
39
40 func libc_setgroups_trampoline()
41
42 //go:linkname libc_setgroups libc_setgroups
43 //go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib"
3444
3545 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
3646
3747 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
38 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
48 r0, _, e1 := syscall_syscall6(funcPC(libc_wait4_trampoline), uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
3949 wpid = int(r0)
4050 if e1 != 0 {
4151 err = errnoErr(e1)
4353 return
4454 }
4555
56 func libc_wait4_trampoline()
57
58 //go:linkname libc_wait4 libc_wait4
59 //go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib"
60
4661 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
4762
4863 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
49 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
64 r0, _, e1 := syscall_syscall(funcPC(libc_accept_trampoline), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
5065 fd = int(r0)
5166 if e1 != 0 {
5267 err = errnoErr(e1)
5469 return
5570 }
5671
72 func libc_accept_trampoline()
73
74 //go:linkname libc_accept libc_accept
75 //go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib"
76
5777 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5878
5979 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
60 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
61 if e1 != 0 {
62 err = errnoErr(e1)
63 }
64 return
65 }
80 _, _, e1 := syscall_syscall(funcPC(libc_bind_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
81 if e1 != 0 {
82 err = errnoErr(e1)
83 }
84 return
85 }
86
87 func libc_bind_trampoline()
88
89 //go:linkname libc_bind libc_bind
90 //go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib"
6691
6792 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6893
6994 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
70 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
71 if e1 != 0 {
72 err = errnoErr(e1)
73 }
74 return
75 }
95 _, _, e1 := syscall_syscall(funcPC(libc_connect_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
96 if e1 != 0 {
97 err = errnoErr(e1)
98 }
99 return
100 }
101
102 func libc_connect_trampoline()
103
104 //go:linkname libc_connect libc_connect
105 //go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib"
76106
77107 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
78108
79109 func socket(domain int, typ int, proto int) (fd int, err error) {
80 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
110 r0, _, e1 := syscall_rawSyscall(funcPC(libc_socket_trampoline), uintptr(domain), uintptr(typ), uintptr(proto))
81111 fd = int(r0)
82112 if e1 != 0 {
83113 err = errnoErr(e1)
85115 return
86116 }
87117
118 func libc_socket_trampoline()
119
120 //go:linkname libc_socket libc_socket
121 //go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib"
122
88123 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
89124
90125 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
91 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
92 if e1 != 0 {
93 err = errnoErr(e1)
94 }
95 return
96 }
126 _, _, e1 := syscall_syscall6(funcPC(libc_getsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
127 if e1 != 0 {
128 err = errnoErr(e1)
129 }
130 return
131 }
132
133 func libc_getsockopt_trampoline()
134
135 //go:linkname libc_getsockopt libc_getsockopt
136 //go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib"
97137
98138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
99139
100140 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
101 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
102 if e1 != 0 {
103 err = errnoErr(e1)
104 }
105 return
106 }
141 _, _, e1 := syscall_syscall6(funcPC(libc_setsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
142 if e1 != 0 {
143 err = errnoErr(e1)
144 }
145 return
146 }
147
148 func libc_setsockopt_trampoline()
149
150 //go:linkname libc_setsockopt libc_setsockopt
151 //go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib"
107152
108153 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
109154
110155 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
111 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
112 if e1 != 0 {
113 err = errnoErr(e1)
114 }
115 return
116 }
156 _, _, e1 := syscall_rawSyscall(funcPC(libc_getpeername_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
157 if e1 != 0 {
158 err = errnoErr(e1)
159 }
160 return
161 }
162
163 func libc_getpeername_trampoline()
164
165 //go:linkname libc_getpeername libc_getpeername
166 //go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib"
117167
118168 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
119169
120170 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
121 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
122 if e1 != 0 {
123 err = errnoErr(e1)
124 }
125 return
126 }
171 _, _, e1 := syscall_rawSyscall(funcPC(libc_getsockname_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
172 if e1 != 0 {
173 err = errnoErr(e1)
174 }
175 return
176 }
177
178 func libc_getsockname_trampoline()
179
180 //go:linkname libc_getsockname libc_getsockname
181 //go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib"
127182
128183 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
129184
130185 func Shutdown(s int, how int) (err error) {
131 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
132 if e1 != 0 {
133 err = errnoErr(e1)
134 }
135 return
136 }
186 _, _, e1 := syscall_syscall(funcPC(libc_shutdown_trampoline), uintptr(s), uintptr(how), 0)
187 if e1 != 0 {
188 err = errnoErr(e1)
189 }
190 return
191 }
192
193 func libc_shutdown_trampoline()
194
195 //go:linkname libc_shutdown libc_shutdown
196 //go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib"
137197
138198 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
139199
140200 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
141 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
142 if e1 != 0 {
143 err = errnoErr(e1)
144 }
145 return
146 }
201 _, _, e1 := syscall_rawSyscall6(funcPC(libc_socketpair_trampoline), uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
202 if e1 != 0 {
203 err = errnoErr(e1)
204 }
205 return
206 }
207
208 func libc_socketpair_trampoline()
209
210 //go:linkname libc_socketpair libc_socketpair
211 //go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib"
147212
148213 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
149214
154219 } else {
155220 _p0 = unsafe.Pointer(&_zero)
156221 }
157 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
222 r0, _, e1 := syscall_syscall6(funcPC(libc_recvfrom_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
158223 n = int(r0)
159224 if e1 != 0 {
160225 err = errnoErr(e1)
161226 }
162227 return
163228 }
229
230 func libc_recvfrom_trampoline()
231
232 //go:linkname libc_recvfrom libc_recvfrom
233 //go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib"
164234
165235 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
166236
171241 } else {
172242 _p0 = unsafe.Pointer(&_zero)
173243 }
174 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
175 if e1 != 0 {
176 err = errnoErr(e1)
177 }
178 return
179 }
244 _, _, e1 := syscall_syscall6(funcPC(libc_sendto_trampoline), uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
245 if e1 != 0 {
246 err = errnoErr(e1)
247 }
248 return
249 }
250
251 func libc_sendto_trampoline()
252
253 //go:linkname libc_sendto libc_sendto
254 //go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib"
180255
181256 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
182257
183258 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
184 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
259 r0, _, e1 := syscall_syscall(funcPC(libc_recvmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
185260 n = int(r0)
186261 if e1 != 0 {
187262 err = errnoErr(e1)
189264 return
190265 }
191266
267 func libc_recvmsg_trampoline()
268
269 //go:linkname libc_recvmsg libc_recvmsg
270 //go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib"
271
192272 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
193273
194274 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
195 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
275 r0, _, e1 := syscall_syscall(funcPC(libc_sendmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
196276 n = int(r0)
197277 if e1 != 0 {
198278 err = errnoErr(e1)
200280 return
201281 }
202282
283 func libc_sendmsg_trampoline()
284
285 //go:linkname libc_sendmsg libc_sendmsg
286 //go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib"
287
203288 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
204289
205290 func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
206 r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
291 r0, _, e1 := syscall_syscall6(funcPC(libc_kevent_trampoline), uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
207292 n = int(r0)
208293 if e1 != 0 {
209294 err = errnoErr(e1)
210295 }
211296 return
212297 }
298
299 func libc_kevent_trampoline()
300
301 //go:linkname libc_kevent libc_kevent
302 //go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib"
213303
214304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
215305
220310 } else {
221311 _p0 = unsafe.Pointer(&_zero)
222312 }
223 _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
224 if e1 != 0 {
225 err = errnoErr(e1)
226 }
227 return
228 }
313 _, _, e1 := syscall_syscall6(funcPC(libc___sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
314 if e1 != 0 {
315 err = errnoErr(e1)
316 }
317 return
318 }
319
320 func libc___sysctl_trampoline()
321
322 //go:linkname libc___sysctl libc___sysctl
323 //go:cgo_import_dynamic libc___sysctl __sysctl "/usr/lib/libSystem.B.dylib"
229324
230325 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
231326
235330 if err != nil {
236331 return
237332 }
238 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
239 if e1 != 0 {
240 err = errnoErr(e1)
241 }
242 return
243 }
333 _, _, e1 := syscall_syscall(funcPC(libc_utimes_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
334 if e1 != 0 {
335 err = errnoErr(e1)
336 }
337 return
338 }
339
340 func libc_utimes_trampoline()
341
342 //go:linkname libc_utimes libc_utimes
343 //go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib"
244344
245345 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
246346
247347 func futimes(fd int, timeval *[2]Timeval) (err error) {
248 _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
249 if e1 != 0 {
250 err = errnoErr(e1)
251 }
252 return
253 }
348 _, _, e1 := syscall_syscall(funcPC(libc_futimes_trampoline), uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
349 if e1 != 0 {
350 err = errnoErr(e1)
351 }
352 return
353 }
354
355 func libc_futimes_trampoline()
356
357 //go:linkname libc_futimes libc_futimes
358 //go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib"
254359
255360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
256361
257362 func fcntl(fd int, cmd int, arg int) (val int, err error) {
258 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
363 r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
259364 val = int(r0)
260365 if e1 != 0 {
261366 err = errnoErr(e1)
262367 }
263368 return
264369 }
370
371 func libc_fcntl_trampoline()
372
373 //go:linkname libc_fcntl libc_fcntl
374 //go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
375
376 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
377
378 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
379 r0, _, e1 := syscall_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
380 n = int(r0)
381 if e1 != 0 {
382 err = errnoErr(e1)
383 }
384 return
385 }
386
387 func libc_poll_trampoline()
388
389 //go:linkname libc_poll libc_poll
390 //go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib"
265391
266392 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267393
272398 } else {
273399 _p0 = unsafe.Pointer(&_zero)
274400 }
275 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
276 if e1 != 0 {
277 err = errnoErr(e1)
278 }
279 return
280 }
401 _, _, e1 := syscall_syscall(funcPC(libc_madvise_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(behav))
402 if e1 != 0 {
403 err = errnoErr(e1)
404 }
405 return
406 }
407
408 func libc_madvise_trampoline()
409
410 //go:linkname libc_madvise libc_madvise
411 //go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib"
281412
282413 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
283414
288419 } else {
289420 _p0 = unsafe.Pointer(&_zero)
290421 }
291 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
292 if e1 != 0 {
293 err = errnoErr(e1)
294 }
295 return
296 }
422 _, _, e1 := syscall_syscall(funcPC(libc_mlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
423 if e1 != 0 {
424 err = errnoErr(e1)
425 }
426 return
427 }
428
429 func libc_mlock_trampoline()
430
431 //go:linkname libc_mlock libc_mlock
432 //go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib"
297433
298434 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
299435
300436 func Mlockall(flags int) (err error) {
301 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
302 if e1 != 0 {
303 err = errnoErr(e1)
304 }
305 return
306 }
437 _, _, e1 := syscall_syscall(funcPC(libc_mlockall_trampoline), uintptr(flags), 0, 0)
438 if e1 != 0 {
439 err = errnoErr(e1)
440 }
441 return
442 }
443
444 func libc_mlockall_trampoline()
445
446 //go:linkname libc_mlockall libc_mlockall
447 //go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib"
307448
308449 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
309450
314455 } else {
315456 _p0 = unsafe.Pointer(&_zero)
316457 }
317 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
318 if e1 != 0 {
319 err = errnoErr(e1)
320 }
321 return
322 }
458 _, _, e1 := syscall_syscall(funcPC(libc_mprotect_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(prot))
459 if e1 != 0 {
460 err = errnoErr(e1)
461 }
462 return
463 }
464
465 func libc_mprotect_trampoline()
466
467 //go:linkname libc_mprotect libc_mprotect
468 //go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib"
323469
324470 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
325471
330476 } else {
331477 _p0 = unsafe.Pointer(&_zero)
332478 }
333 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
334 if e1 != 0 {
335 err = errnoErr(e1)
336 }
337 return
338 }
479 _, _, e1 := syscall_syscall(funcPC(libc_msync_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(flags))
480 if e1 != 0 {
481 err = errnoErr(e1)
482 }
483 return
484 }
485
486 func libc_msync_trampoline()
487
488 //go:linkname libc_msync libc_msync
489 //go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib"
339490
340491 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
341492
346497 } else {
347498 _p0 = unsafe.Pointer(&_zero)
348499 }
349 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
350 if e1 != 0 {
351 err = errnoErr(e1)
352 }
353 return
354 }
500 _, _, e1 := syscall_syscall(funcPC(libc_munlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
501 if e1 != 0 {
502 err = errnoErr(e1)
503 }
504 return
505 }
506
507 func libc_munlock_trampoline()
508
509 //go:linkname libc_munlock libc_munlock
510 //go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib"
355511
356512 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
357513
358514 func Munlockall() (err error) {
359 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
360 if e1 != 0 {
361 err = errnoErr(e1)
362 }
363 return
364 }
515 _, _, e1 := syscall_syscall(funcPC(libc_munlockall_trampoline), 0, 0, 0)
516 if e1 != 0 {
517 err = errnoErr(e1)
518 }
519 return
520 }
521
522 func libc_munlockall_trampoline()
523
524 //go:linkname libc_munlockall libc_munlockall
525 //go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib"
365526
366527 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
367528
368529 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
369 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
370 if e1 != 0 {
371 err = errnoErr(e1)
372 }
373 return
374 }
530 _, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
531 if e1 != 0 {
532 err = errnoErr(e1)
533 }
534 return
535 }
536
537 func libc_ptrace_trampoline()
538
539 //go:linkname libc_ptrace libc_ptrace
540 //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
541
542 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
543
544 func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
545 _, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
546 if e1 != 0 {
547 err = errnoErr(e1)
548 }
549 return
550 }
551
552 func libc_getattrlist_trampoline()
553
554 //go:linkname libc_getattrlist libc_getattrlist
555 //go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib"
375556
376557 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
377558
378559 func pipe() (r int, w int, err error) {
379 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
560 r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
380561 r = int(r0)
381562 w = int(r1)
382563 if e1 != 0 {
385566 return
386567 }
387568
569 func libc_pipe_trampoline()
570
571 //go:linkname libc_pipe libc_pipe
572 //go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib"
573
574 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
575
576 func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
577 var _p0 *byte
578 _p0, err = BytePtrFromString(path)
579 if err != nil {
580 return
581 }
582 var _p1 *byte
583 _p1, err = BytePtrFromString(attr)
584 if err != nil {
585 return
586 }
587 r0, _, e1 := syscall_syscall6(funcPC(libc_getxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
588 sz = int(r0)
589 if e1 != 0 {
590 err = errnoErr(e1)
591 }
592 return
593 }
594
595 func libc_getxattr_trampoline()
596
597 //go:linkname libc_getxattr libc_getxattr
598 //go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib"
599
600 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
601
602 func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
603 var _p0 *byte
604 _p0, err = BytePtrFromString(attr)
605 if err != nil {
606 return
607 }
608 r0, _, e1 := syscall_syscall6(funcPC(libc_fgetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
609 sz = int(r0)
610 if e1 != 0 {
611 err = errnoErr(e1)
612 }
613 return
614 }
615
616 func libc_fgetxattr_trampoline()
617
618 //go:linkname libc_fgetxattr libc_fgetxattr
619 //go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib"
620
621 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
622
623 func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
624 var _p0 *byte
625 _p0, err = BytePtrFromString(path)
626 if err != nil {
627 return
628 }
629 var _p1 *byte
630 _p1, err = BytePtrFromString(attr)
631 if err != nil {
632 return
633 }
634 _, _, e1 := syscall_syscall6(funcPC(libc_setxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
635 if e1 != 0 {
636 err = errnoErr(e1)
637 }
638 return
639 }
640
641 func libc_setxattr_trampoline()
642
643 //go:linkname libc_setxattr libc_setxattr
644 //go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib"
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
649 var _p0 *byte
650 _p0, err = BytePtrFromString(attr)
651 if err != nil {
652 return
653 }
654 _, _, e1 := syscall_syscall6(funcPC(libc_fsetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
655 if e1 != 0 {
656 err = errnoErr(e1)
657 }
658 return
659 }
660
661 func libc_fsetxattr_trampoline()
662
663 //go:linkname libc_fsetxattr libc_fsetxattr
664 //go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib"
665
666 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
667
668 func removexattr(path string, attr string, options int) (err error) {
669 var _p0 *byte
670 _p0, err = BytePtrFromString(path)
671 if err != nil {
672 return
673 }
674 var _p1 *byte
675 _p1, err = BytePtrFromString(attr)
676 if err != nil {
677 return
678 }
679 _, _, e1 := syscall_syscall(funcPC(libc_removexattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
680 if e1 != 0 {
681 err = errnoErr(e1)
682 }
683 return
684 }
685
686 func libc_removexattr_trampoline()
687
688 //go:linkname libc_removexattr libc_removexattr
689 //go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib"
690
691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
692
693 func fremovexattr(fd int, attr string, options int) (err error) {
694 var _p0 *byte
695 _p0, err = BytePtrFromString(attr)
696 if err != nil {
697 return
698 }
699 _, _, e1 := syscall_syscall(funcPC(libc_fremovexattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
700 if e1 != 0 {
701 err = errnoErr(e1)
702 }
703 return
704 }
705
706 func libc_fremovexattr_trampoline()
707
708 //go:linkname libc_fremovexattr libc_fremovexattr
709 //go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib"
710
711 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
712
713 func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
714 var _p0 *byte
715 _p0, err = BytePtrFromString(path)
716 if err != nil {
717 return
718 }
719 r0, _, e1 := syscall_syscall6(funcPC(libc_listxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
720 sz = int(r0)
721 if e1 != 0 {
722 err = errnoErr(e1)
723 }
724 return
725 }
726
727 func libc_listxattr_trampoline()
728
729 //go:linkname libc_listxattr libc_listxattr
730 //go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib"
731
732 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
733
734 func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
735 r0, _, e1 := syscall_syscall6(funcPC(libc_flistxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
736 sz = int(r0)
737 if e1 != 0 {
738 err = errnoErr(e1)
739 }
740 return
741 }
742
743 func libc_flistxattr_trampoline()
744
745 //go:linkname libc_flistxattr libc_flistxattr
746 //go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib"
747
748 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
749
750 func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
751 _, _, e1 := syscall_syscall6(funcPC(libc_setattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
752 if e1 != 0 {
753 err = errnoErr(e1)
754 }
755 return
756 }
757
758 func libc_setattrlist_trampoline()
759
760 //go:linkname libc_setattrlist libc_setattrlist
761 //go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
762
388763 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
389764
390765 func kill(pid int, signum int, posix int) (err error) {
391 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
392 if e1 != 0 {
393 err = errnoErr(e1)
394 }
395 return
396 }
766 _, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix))
767 if e1 != 0 {
768 err = errnoErr(e1)
769 }
770 return
771 }
772
773 func libc_kill_trampoline()
774
775 //go:linkname libc_kill libc_kill
776 //go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib"
397777
398778 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
399779
400780 func ioctl(fd int, req uint, arg uintptr) (err error) {
401 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
402 if e1 != 0 {
403 err = errnoErr(e1)
404 }
405 return
406 }
781 _, _, e1 := syscall_syscall(funcPC(libc_ioctl_trampoline), uintptr(fd), uintptr(req), uintptr(arg))
782 if e1 != 0 {
783 err = errnoErr(e1)
784 }
785 return
786 }
787
788 func libc_ioctl_trampoline()
789
790 //go:linkname libc_ioctl libc_ioctl
791 //go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
792
793 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
794
795 func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
796 _, _, e1 := syscall_syscall6(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
797 if e1 != 0 {
798 err = errnoErr(e1)
799 }
800 return
801 }
802
803 func libc_sendfile_trampoline()
804
805 //go:linkname libc_sendfile libc_sendfile
806 //go:cgo_import_dynamic libc_sendfile sendfile "/usr/lib/libSystem.B.dylib"
407807
408808 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
409809
413813 if err != nil {
414814 return
415815 }
416 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
417 if e1 != 0 {
418 err = errnoErr(e1)
419 }
420 return
421 }
816 _, _, e1 := syscall_syscall(funcPC(libc_access_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
817 if e1 != 0 {
818 err = errnoErr(e1)
819 }
820 return
821 }
822
823 func libc_access_trampoline()
824
825 //go:linkname libc_access libc_access
826 //go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib"
422827
423828 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
424829
425830 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
426 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
427 if e1 != 0 {
428 err = errnoErr(e1)
429 }
430 return
431 }
831 _, _, e1 := syscall_syscall(funcPC(libc_adjtime_trampoline), uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
832 if e1 != 0 {
833 err = errnoErr(e1)
834 }
835 return
836 }
837
838 func libc_adjtime_trampoline()
839
840 //go:linkname libc_adjtime libc_adjtime
841 //go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib"
432842
433843 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
434844
438848 if err != nil {
439849 return
440850 }
441 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
442 if e1 != 0 {
443 err = errnoErr(e1)
444 }
445 return
446 }
851 _, _, e1 := syscall_syscall(funcPC(libc_chdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
852 if e1 != 0 {
853 err = errnoErr(e1)
854 }
855 return
856 }
857
858 func libc_chdir_trampoline()
859
860 //go:linkname libc_chdir libc_chdir
861 //go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib"
447862
448863 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
449864
453868 if err != nil {
454869 return
455870 }
456 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
457 if e1 != 0 {
458 err = errnoErr(e1)
459 }
460 return
461 }
871 _, _, e1 := syscall_syscall(funcPC(libc_chflags_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
872 if e1 != 0 {
873 err = errnoErr(e1)
874 }
875 return
876 }
877
878 func libc_chflags_trampoline()
879
880 //go:linkname libc_chflags libc_chflags
881 //go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib"
462882
463883 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
464884
468888 if err != nil {
469889 return
470890 }
471 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
472 if e1 != 0 {
473 err = errnoErr(e1)
474 }
475 return
476 }
891 _, _, e1 := syscall_syscall(funcPC(libc_chmod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
892 if e1 != 0 {
893 err = errnoErr(e1)
894 }
895 return
896 }
897
898 func libc_chmod_trampoline()
899
900 //go:linkname libc_chmod libc_chmod
901 //go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib"
477902
478903 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
479904
483908 if err != nil {
484909 return
485910 }
486 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
487 if e1 != 0 {
488 err = errnoErr(e1)
489 }
490 return
491 }
911 _, _, e1 := syscall_syscall(funcPC(libc_chown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
912 if e1 != 0 {
913 err = errnoErr(e1)
914 }
915 return
916 }
917
918 func libc_chown_trampoline()
919
920 //go:linkname libc_chown libc_chown
921 //go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib"
492922
493923 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
494924
498928 if err != nil {
499929 return
500930 }
501 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
502 if e1 != 0 {
503 err = errnoErr(e1)
504 }
505 return
506 }
931 _, _, e1 := syscall_syscall(funcPC(libc_chroot_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
932 if e1 != 0 {
933 err = errnoErr(e1)
934 }
935 return
936 }
937
938 func libc_chroot_trampoline()
939
940 //go:linkname libc_chroot libc_chroot
941 //go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib"
507942
508943 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
509944
510945 func Close(fd int) (err error) {
511 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
512 if e1 != 0 {
513 err = errnoErr(e1)
514 }
515 return
516 }
946 _, _, e1 := syscall_syscall(funcPC(libc_close_trampoline), uintptr(fd), 0, 0)
947 if e1 != 0 {
948 err = errnoErr(e1)
949 }
950 return
951 }
952
953 func libc_close_trampoline()
954
955 //go:linkname libc_close libc_close
956 //go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib"
517957
518958 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
519959
520960 func Dup(fd int) (nfd int, err error) {
521 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
961 r0, _, e1 := syscall_syscall(funcPC(libc_dup_trampoline), uintptr(fd), 0, 0)
522962 nfd = int(r0)
523963 if e1 != 0 {
524964 err = errnoErr(e1)
526966 return
527967 }
528968
969 func libc_dup_trampoline()
970
971 //go:linkname libc_dup libc_dup
972 //go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib"
973
529974 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
530975
531976 func Dup2(from int, to int) (err error) {
532 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
533 if e1 != 0 {
534 err = errnoErr(e1)
535 }
536 return
537 }
977 _, _, e1 := syscall_syscall(funcPC(libc_dup2_trampoline), uintptr(from), uintptr(to), 0)
978 if e1 != 0 {
979 err = errnoErr(e1)
980 }
981 return
982 }
983
984 func libc_dup2_trampoline()
985
986 //go:linkname libc_dup2 libc_dup2
987 //go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib"
538988
539989 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
540990
549999 if err != nil {
5501000 return
5511001 }
552 _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
553 if e1 != 0 {
554 err = errnoErr(e1)
555 }
556 return
557 }
1002 _, _, e1 := syscall_syscall(funcPC(libc_exchangedata_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
1003 if e1 != 0 {
1004 err = errnoErr(e1)
1005 }
1006 return
1007 }
1008
1009 func libc_exchangedata_trampoline()
1010
1011 //go:linkname libc_exchangedata libc_exchangedata
1012 //go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib"
5581013
5591014 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5601015
5611016 func Exit(code int) {
562 Syscall(SYS_EXIT, uintptr(code), 0, 0)
563 return
564 }
1017 syscall_syscall(funcPC(libc_exit_trampoline), uintptr(code), 0, 0)
1018 return
1019 }
1020
1021 func libc_exit_trampoline()
1022
1023 //go:linkname libc_exit libc_exit
1024 //go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib"
5651025
5661026 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5671027
5711031 if err != nil {
5721032 return
5731033 }
574 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
575 if e1 != 0 {
576 err = errnoErr(e1)
577 }
578 return
579 }
1034 _, _, e1 := syscall_syscall6(funcPC(libc_faccessat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
1035 if e1 != 0 {
1036 err = errnoErr(e1)
1037 }
1038 return
1039 }
1040
1041 func libc_faccessat_trampoline()
1042
1043 //go:linkname libc_faccessat libc_faccessat
1044 //go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib"
5801045
5811046 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5821047
5831048 func Fchdir(fd int) (err error) {
584 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
585 if e1 != 0 {
586 err = errnoErr(e1)
587 }
588 return
589 }
1049 _, _, e1 := syscall_syscall(funcPC(libc_fchdir_trampoline), uintptr(fd), 0, 0)
1050 if e1 != 0 {
1051 err = errnoErr(e1)
1052 }
1053 return
1054 }
1055
1056 func libc_fchdir_trampoline()
1057
1058 //go:linkname libc_fchdir libc_fchdir
1059 //go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib"
5901060
5911061 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5921062
5931063 func Fchflags(fd int, flags int) (err error) {
594 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
595 if e1 != 0 {
596 err = errnoErr(e1)
597 }
598 return
599 }
1064 _, _, e1 := syscall_syscall(funcPC(libc_fchflags_trampoline), uintptr(fd), uintptr(flags), 0)
1065 if e1 != 0 {
1066 err = errnoErr(e1)
1067 }
1068 return
1069 }
1070
1071 func libc_fchflags_trampoline()
1072
1073 //go:linkname libc_fchflags libc_fchflags
1074 //go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib"
6001075
6011076 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6021077
6031078 func Fchmod(fd int, mode uint32) (err error) {
604 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
605 if e1 != 0 {
606 err = errnoErr(e1)
607 }
608 return
609 }
1079 _, _, e1 := syscall_syscall(funcPC(libc_fchmod_trampoline), uintptr(fd), uintptr(mode), 0)
1080 if e1 != 0 {
1081 err = errnoErr(e1)
1082 }
1083 return
1084 }
1085
1086 func libc_fchmod_trampoline()
1087
1088 //go:linkname libc_fchmod libc_fchmod
1089 //go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib"
6101090
6111091 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6121092
6161096 if err != nil {
6171097 return
6181098 }
619 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
620 if e1 != 0 {
621 err = errnoErr(e1)
622 }
623 return
624 }
1099 _, _, e1 := syscall_syscall6(funcPC(libc_fchmodat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 func libc_fchmodat_trampoline()
1107
1108 //go:linkname libc_fchmodat libc_fchmodat
1109 //go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib"
6251110
6261111 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6271112
6281113 func Fchown(fd int, uid int, gid int) (err error) {
629 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
630 if e1 != 0 {
631 err = errnoErr(e1)
632 }
633 return
634 }
1114 _, _, e1 := syscall_syscall(funcPC(libc_fchown_trampoline), uintptr(fd), uintptr(uid), uintptr(gid))
1115 if e1 != 0 {
1116 err = errnoErr(e1)
1117 }
1118 return
1119 }
1120
1121 func libc_fchown_trampoline()
1122
1123 //go:linkname libc_fchown libc_fchown
1124 //go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib"
6351125
6361126 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6371127
6411131 if err != nil {
6421132 return
6431133 }
644 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
645 if e1 != 0 {
646 err = errnoErr(e1)
647 }
648 return
649 }
1134 _, _, e1 := syscall_syscall6(funcPC(libc_fchownat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
1135 if e1 != 0 {
1136 err = errnoErr(e1)
1137 }
1138 return
1139 }
1140
1141 func libc_fchownat_trampoline()
1142
1143 //go:linkname libc_fchownat libc_fchownat
1144 //go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib"
6501145
6511146 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6521147
6531148 func Flock(fd int, how int) (err error) {
654 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
655 if e1 != 0 {
656 err = errnoErr(e1)
657 }
658 return
659 }
1149 _, _, e1 := syscall_syscall(funcPC(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
1150 if e1 != 0 {
1151 err = errnoErr(e1)
1152 }
1153 return
1154 }
1155
1156 func libc_flock_trampoline()
1157
1158 //go:linkname libc_flock libc_flock
1159 //go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib"
6601160
6611161 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6621162
6631163 func Fpathconf(fd int, name int) (val int, err error) {
664 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
1164 r0, _, e1 := syscall_syscall(funcPC(libc_fpathconf_trampoline), uintptr(fd), uintptr(name), 0)
6651165 val = int(r0)
6661166 if e1 != 0 {
6671167 err = errnoErr(e1)
6691169 return
6701170 }
6711171
1172 func libc_fpathconf_trampoline()
1173
1174 //go:linkname libc_fpathconf libc_fpathconf
1175 //go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib"
1176
1177 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1178
1179 func Fsync(fd int) (err error) {
1180 _, _, e1 := syscall_syscall(funcPC(libc_fsync_trampoline), uintptr(fd), 0, 0)
1181 if e1 != 0 {
1182 err = errnoErr(e1)
1183 }
1184 return
1185 }
1186
1187 func libc_fsync_trampoline()
1188
1189 //go:linkname libc_fsync libc_fsync
1190 //go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib"
1191
1192 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1193
1194 func Ftruncate(fd int, length int64) (err error) {
1195 _, _, e1 := syscall_syscall(funcPC(libc_ftruncate_trampoline), uintptr(fd), uintptr(length), 0)
1196 if e1 != 0 {
1197 err = errnoErr(e1)
1198 }
1199 return
1200 }
1201
1202 func libc_ftruncate_trampoline()
1203
1204 //go:linkname libc_ftruncate libc_ftruncate
1205 //go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib"
1206
1207 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1208
1209 func Getdtablesize() (size int) {
1210 r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
1211 size = int(r0)
1212 return
1213 }
1214
1215 func libc_getdtablesize_trampoline()
1216
1217 //go:linkname libc_getdtablesize libc_getdtablesize
1218 //go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib"
1219
1220 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1221
1222 func Getegid() (egid int) {
1223 r0, _, _ := syscall_rawSyscall(funcPC(libc_getegid_trampoline), 0, 0, 0)
1224 egid = int(r0)
1225 return
1226 }
1227
1228 func libc_getegid_trampoline()
1229
1230 //go:linkname libc_getegid libc_getegid
1231 //go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib"
1232
1233 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1234
1235 func Geteuid() (uid int) {
1236 r0, _, _ := syscall_rawSyscall(funcPC(libc_geteuid_trampoline), 0, 0, 0)
1237 uid = int(r0)
1238 return
1239 }
1240
1241 func libc_geteuid_trampoline()
1242
1243 //go:linkname libc_geteuid libc_geteuid
1244 //go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib"
1245
1246 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1247
1248 func Getgid() (gid int) {
1249 r0, _, _ := syscall_rawSyscall(funcPC(libc_getgid_trampoline), 0, 0, 0)
1250 gid = int(r0)
1251 return
1252 }
1253
1254 func libc_getgid_trampoline()
1255
1256 //go:linkname libc_getgid libc_getgid
1257 //go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib"
1258
1259 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1260
1261 func Getpgid(pid int) (pgid int, err error) {
1262 r0, _, e1 := syscall_rawSyscall(funcPC(libc_getpgid_trampoline), uintptr(pid), 0, 0)
1263 pgid = int(r0)
1264 if e1 != 0 {
1265 err = errnoErr(e1)
1266 }
1267 return
1268 }
1269
1270 func libc_getpgid_trampoline()
1271
1272 //go:linkname libc_getpgid libc_getpgid
1273 //go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib"
1274
1275 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1276
1277 func Getpgrp() (pgrp int) {
1278 r0, _, _ := syscall_rawSyscall(funcPC(libc_getpgrp_trampoline), 0, 0, 0)
1279 pgrp = int(r0)
1280 return
1281 }
1282
1283 func libc_getpgrp_trampoline()
1284
1285 //go:linkname libc_getpgrp libc_getpgrp
1286 //go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib"
1287
1288 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1289
1290 func Getpid() (pid int) {
1291 r0, _, _ := syscall_rawSyscall(funcPC(libc_getpid_trampoline), 0, 0, 0)
1292 pid = int(r0)
1293 return
1294 }
1295
1296 func libc_getpid_trampoline()
1297
1298 //go:linkname libc_getpid libc_getpid
1299 //go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib"
1300
1301 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1302
1303 func Getppid() (ppid int) {
1304 r0, _, _ := syscall_rawSyscall(funcPC(libc_getppid_trampoline), 0, 0, 0)
1305 ppid = int(r0)
1306 return
1307 }
1308
1309 func libc_getppid_trampoline()
1310
1311 //go:linkname libc_getppid libc_getppid
1312 //go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib"
1313
1314 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1315
1316 func Getpriority(which int, who int) (prio int, err error) {
1317 r0, _, e1 := syscall_syscall(funcPC(libc_getpriority_trampoline), uintptr(which), uintptr(who), 0)
1318 prio = int(r0)
1319 if e1 != 0 {
1320 err = errnoErr(e1)
1321 }
1322 return
1323 }
1324
1325 func libc_getpriority_trampoline()
1326
1327 //go:linkname libc_getpriority libc_getpriority
1328 //go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib"
1329
1330 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1331
1332 func Getrlimit(which int, lim *Rlimit) (err error) {
1333 _, _, e1 := syscall_rawSyscall(funcPC(libc_getrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1334 if e1 != 0 {
1335 err = errnoErr(e1)
1336 }
1337 return
1338 }
1339
1340 func libc_getrlimit_trampoline()
1341
1342 //go:linkname libc_getrlimit libc_getrlimit
1343 //go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib"
1344
1345 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1346
1347 func Getrusage(who int, rusage *Rusage) (err error) {
1348 _, _, e1 := syscall_rawSyscall(funcPC(libc_getrusage_trampoline), uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
1349 if e1 != 0 {
1350 err = errnoErr(e1)
1351 }
1352 return
1353 }
1354
1355 func libc_getrusage_trampoline()
1356
1357 //go:linkname libc_getrusage libc_getrusage
1358 //go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib"
1359
1360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1361
1362 func Getsid(pid int) (sid int, err error) {
1363 r0, _, e1 := syscall_rawSyscall(funcPC(libc_getsid_trampoline), uintptr(pid), 0, 0)
1364 sid = int(r0)
1365 if e1 != 0 {
1366 err = errnoErr(e1)
1367 }
1368 return
1369 }
1370
1371 func libc_getsid_trampoline()
1372
1373 //go:linkname libc_getsid libc_getsid
1374 //go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib"
1375
1376 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1377
1378 func Getuid() (uid int) {
1379 r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
1380 uid = int(r0)
1381 return
1382 }
1383
1384 func libc_getuid_trampoline()
1385
1386 //go:linkname libc_getuid libc_getuid
1387 //go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib"
1388
1389 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1390
1391 func Issetugid() (tainted bool) {
1392 r0, _, _ := syscall_rawSyscall(funcPC(libc_issetugid_trampoline), 0, 0, 0)
1393 tainted = bool(r0 != 0)
1394 return
1395 }
1396
1397 func libc_issetugid_trampoline()
1398
1399 //go:linkname libc_issetugid libc_issetugid
1400 //go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib"
1401
1402 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1403
1404 func Kqueue() (fd int, err error) {
1405 r0, _, e1 := syscall_syscall(funcPC(libc_kqueue_trampoline), 0, 0, 0)
1406 fd = int(r0)
1407 if e1 != 0 {
1408 err = errnoErr(e1)
1409 }
1410 return
1411 }
1412
1413 func libc_kqueue_trampoline()
1414
1415 //go:linkname libc_kqueue libc_kqueue
1416 //go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib"
1417
1418 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1419
1420 func Lchown(path string, uid int, gid int) (err error) {
1421 var _p0 *byte
1422 _p0, err = BytePtrFromString(path)
1423 if err != nil {
1424 return
1425 }
1426 _, _, e1 := syscall_syscall(funcPC(libc_lchown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
1427 if e1 != 0 {
1428 err = errnoErr(e1)
1429 }
1430 return
1431 }
1432
1433 func libc_lchown_trampoline()
1434
1435 //go:linkname libc_lchown libc_lchown
1436 //go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib"
1437
1438 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1439
1440 func Link(path string, link string) (err error) {
1441 var _p0 *byte
1442 _p0, err = BytePtrFromString(path)
1443 if err != nil {
1444 return
1445 }
1446 var _p1 *byte
1447 _p1, err = BytePtrFromString(link)
1448 if err != nil {
1449 return
1450 }
1451 _, _, e1 := syscall_syscall(funcPC(libc_link_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1452 if e1 != 0 {
1453 err = errnoErr(e1)
1454 }
1455 return
1456 }
1457
1458 func libc_link_trampoline()
1459
1460 //go:linkname libc_link libc_link
1461 //go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib"
1462
1463 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1464
1465 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
1466 var _p0 *byte
1467 _p0, err = BytePtrFromString(path)
1468 if err != nil {
1469 return
1470 }
1471 var _p1 *byte
1472 _p1, err = BytePtrFromString(link)
1473 if err != nil {
1474 return
1475 }
1476 _, _, e1 := syscall_syscall6(funcPC(libc_linkat_trampoline), uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1477 if e1 != 0 {
1478 err = errnoErr(e1)
1479 }
1480 return
1481 }
1482
1483 func libc_linkat_trampoline()
1484
1485 //go:linkname libc_linkat libc_linkat
1486 //go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib"
1487
1488 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1489
1490 func Listen(s int, backlog int) (err error) {
1491 _, _, e1 := syscall_syscall(funcPC(libc_listen_trampoline), uintptr(s), uintptr(backlog), 0)
1492 if e1 != 0 {
1493 err = errnoErr(e1)
1494 }
1495 return
1496 }
1497
1498 func libc_listen_trampoline()
1499
1500 //go:linkname libc_listen libc_listen
1501 //go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib"
1502
1503 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1504
1505 func Mkdir(path string, mode uint32) (err error) {
1506 var _p0 *byte
1507 _p0, err = BytePtrFromString(path)
1508 if err != nil {
1509 return
1510 }
1511 _, _, e1 := syscall_syscall(funcPC(libc_mkdir_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1512 if e1 != 0 {
1513 err = errnoErr(e1)
1514 }
1515 return
1516 }
1517
1518 func libc_mkdir_trampoline()
1519
1520 //go:linkname libc_mkdir libc_mkdir
1521 //go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib"
1522
1523 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1524
1525 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1526 var _p0 *byte
1527 _p0, err = BytePtrFromString(path)
1528 if err != nil {
1529 return
1530 }
1531 _, _, e1 := syscall_syscall(funcPC(libc_mkdirat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1532 if e1 != 0 {
1533 err = errnoErr(e1)
1534 }
1535 return
1536 }
1537
1538 func libc_mkdirat_trampoline()
1539
1540 //go:linkname libc_mkdirat libc_mkdirat
1541 //go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib"
1542
1543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1544
1545 func Mkfifo(path string, mode uint32) (err error) {
1546 var _p0 *byte
1547 _p0, err = BytePtrFromString(path)
1548 if err != nil {
1549 return
1550 }
1551 _, _, e1 := syscall_syscall(funcPC(libc_mkfifo_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1552 if e1 != 0 {
1553 err = errnoErr(e1)
1554 }
1555 return
1556 }
1557
1558 func libc_mkfifo_trampoline()
1559
1560 //go:linkname libc_mkfifo libc_mkfifo
1561 //go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib"
1562
1563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1564
1565 func Mknod(path string, mode uint32, dev int) (err error) {
1566 var _p0 *byte
1567 _p0, err = BytePtrFromString(path)
1568 if err != nil {
1569 return
1570 }
1571 _, _, e1 := syscall_syscall(funcPC(libc_mknod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1572 if e1 != 0 {
1573 err = errnoErr(e1)
1574 }
1575 return
1576 }
1577
1578 func libc_mknod_trampoline()
1579
1580 //go:linkname libc_mknod libc_mknod
1581 //go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib"
1582
1583 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1584
1585 func Open(path string, mode int, perm uint32) (fd int, err error) {
1586 var _p0 *byte
1587 _p0, err = BytePtrFromString(path)
1588 if err != nil {
1589 return
1590 }
1591 r0, _, e1 := syscall_syscall(funcPC(libc_open_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1592 fd = int(r0)
1593 if e1 != 0 {
1594 err = errnoErr(e1)
1595 }
1596 return
1597 }
1598
1599 func libc_open_trampoline()
1600
1601 //go:linkname libc_open libc_open
1602 //go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib"
1603
1604 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1605
1606 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1607 var _p0 *byte
1608 _p0, err = BytePtrFromString(path)
1609 if err != nil {
1610 return
1611 }
1612 r0, _, e1 := syscall_syscall6(funcPC(libc_openat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
1613 fd = int(r0)
1614 if e1 != 0 {
1615 err = errnoErr(e1)
1616 }
1617 return
1618 }
1619
1620 func libc_openat_trampoline()
1621
1622 //go:linkname libc_openat libc_openat
1623 //go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib"
1624
1625 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1626
1627 func Pathconf(path string, name int) (val int, err error) {
1628 var _p0 *byte
1629 _p0, err = BytePtrFromString(path)
1630 if err != nil {
1631 return
1632 }
1633 r0, _, e1 := syscall_syscall(funcPC(libc_pathconf_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1634 val = int(r0)
1635 if e1 != 0 {
1636 err = errnoErr(e1)
1637 }
1638 return
1639 }
1640
1641 func libc_pathconf_trampoline()
1642
1643 //go:linkname libc_pathconf libc_pathconf
1644 //go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib"
1645
1646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1647
1648 func Pread(fd int, p []byte, offset int64) (n int, err error) {
1649 var _p0 unsafe.Pointer
1650 if len(p) > 0 {
1651 _p0 = unsafe.Pointer(&p[0])
1652 } else {
1653 _p0 = unsafe.Pointer(&_zero)
1654 }
1655 r0, _, e1 := syscall_syscall6(funcPC(libc_pread_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1656 n = int(r0)
1657 if e1 != 0 {
1658 err = errnoErr(e1)
1659 }
1660 return
1661 }
1662
1663 func libc_pread_trampoline()
1664
1665 //go:linkname libc_pread libc_pread
1666 //go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib"
1667
1668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1669
1670 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
1671 var _p0 unsafe.Pointer
1672 if len(p) > 0 {
1673 _p0 = unsafe.Pointer(&p[0])
1674 } else {
1675 _p0 = unsafe.Pointer(&_zero)
1676 }
1677 r0, _, e1 := syscall_syscall6(funcPC(libc_pwrite_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1678 n = int(r0)
1679 if e1 != 0 {
1680 err = errnoErr(e1)
1681 }
1682 return
1683 }
1684
1685 func libc_pwrite_trampoline()
1686
1687 //go:linkname libc_pwrite libc_pwrite
1688 //go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib"
1689
1690 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1691
1692 func read(fd int, p []byte) (n int, err error) {
1693 var _p0 unsafe.Pointer
1694 if len(p) > 0 {
1695 _p0 = unsafe.Pointer(&p[0])
1696 } else {
1697 _p0 = unsafe.Pointer(&_zero)
1698 }
1699 r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
1700 n = int(r0)
1701 if e1 != 0 {
1702 err = errnoErr(e1)
1703 }
1704 return
1705 }
1706
1707 func libc_read_trampoline()
1708
1709 //go:linkname libc_read libc_read
1710 //go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib"
1711
1712 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1713
1714 func Readlink(path string, buf []byte) (n int, err error) {
1715 var _p0 *byte
1716 _p0, err = BytePtrFromString(path)
1717 if err != nil {
1718 return
1719 }
1720 var _p1 unsafe.Pointer
1721 if len(buf) > 0 {
1722 _p1 = unsafe.Pointer(&buf[0])
1723 } else {
1724 _p1 = unsafe.Pointer(&_zero)
1725 }
1726 r0, _, e1 := syscall_syscall(funcPC(libc_readlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1727 n = int(r0)
1728 if e1 != 0 {
1729 err = errnoErr(e1)
1730 }
1731 return
1732 }
1733
1734 func libc_readlink_trampoline()
1735
1736 //go:linkname libc_readlink libc_readlink
1737 //go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib"
1738
1739 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1740
1741 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1742 var _p0 *byte
1743 _p0, err = BytePtrFromString(path)
1744 if err != nil {
1745 return
1746 }
1747 var _p1 unsafe.Pointer
1748 if len(buf) > 0 {
1749 _p1 = unsafe.Pointer(&buf[0])
1750 } else {
1751 _p1 = unsafe.Pointer(&_zero)
1752 }
1753 r0, _, e1 := syscall_syscall6(funcPC(libc_readlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1754 n = int(r0)
1755 if e1 != 0 {
1756 err = errnoErr(e1)
1757 }
1758 return
1759 }
1760
1761 func libc_readlinkat_trampoline()
1762
1763 //go:linkname libc_readlinkat libc_readlinkat
1764 //go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib"
1765
1766 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1767
1768 func Rename(from string, to string) (err error) {
1769 var _p0 *byte
1770 _p0, err = BytePtrFromString(from)
1771 if err != nil {
1772 return
1773 }
1774 var _p1 *byte
1775 _p1, err = BytePtrFromString(to)
1776 if err != nil {
1777 return
1778 }
1779 _, _, e1 := syscall_syscall(funcPC(libc_rename_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1780 if e1 != 0 {
1781 err = errnoErr(e1)
1782 }
1783 return
1784 }
1785
1786 func libc_rename_trampoline()
1787
1788 //go:linkname libc_rename libc_rename
1789 //go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib"
1790
1791 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1792
1793 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1794 var _p0 *byte
1795 _p0, err = BytePtrFromString(from)
1796 if err != nil {
1797 return
1798 }
1799 var _p1 *byte
1800 _p1, err = BytePtrFromString(to)
1801 if err != nil {
1802 return
1803 }
1804 _, _, e1 := syscall_syscall6(funcPC(libc_renameat_trampoline), uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1805 if e1 != 0 {
1806 err = errnoErr(e1)
1807 }
1808 return
1809 }
1810
1811 func libc_renameat_trampoline()
1812
1813 //go:linkname libc_renameat libc_renameat
1814 //go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib"
1815
1816 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1817
1818 func Revoke(path string) (err error) {
1819 var _p0 *byte
1820 _p0, err = BytePtrFromString(path)
1821 if err != nil {
1822 return
1823 }
1824 _, _, e1 := syscall_syscall(funcPC(libc_revoke_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1825 if e1 != 0 {
1826 err = errnoErr(e1)
1827 }
1828 return
1829 }
1830
1831 func libc_revoke_trampoline()
1832
1833 //go:linkname libc_revoke libc_revoke
1834 //go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib"
1835
1836 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1837
1838 func Rmdir(path string) (err error) {
1839 var _p0 *byte
1840 _p0, err = BytePtrFromString(path)
1841 if err != nil {
1842 return
1843 }
1844 _, _, e1 := syscall_syscall(funcPC(libc_rmdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1845 if e1 != 0 {
1846 err = errnoErr(e1)
1847 }
1848 return
1849 }
1850
1851 func libc_rmdir_trampoline()
1852
1853 //go:linkname libc_rmdir libc_rmdir
1854 //go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib"
1855
1856 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1857
1858 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1859 r0, _, e1 := syscall_syscall(funcPC(libc_lseek_trampoline), uintptr(fd), uintptr(offset), uintptr(whence))
1860 newoffset = int64(r0)
1861 if e1 != 0 {
1862 err = errnoErr(e1)
1863 }
1864 return
1865 }
1866
1867 func libc_lseek_trampoline()
1868
1869 //go:linkname libc_lseek libc_lseek
1870 //go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib"
1871
1872 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1873
1874 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1875 _, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1876 if e1 != 0 {
1877 err = errnoErr(e1)
1878 }
1879 return
1880 }
1881
1882 func libc_select_trampoline()
1883
1884 //go:linkname libc_select libc_select
1885 //go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib"
1886
1887 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1888
1889 func Setegid(egid int) (err error) {
1890 _, _, e1 := syscall_syscall(funcPC(libc_setegid_trampoline), uintptr(egid), 0, 0)
1891 if e1 != 0 {
1892 err = errnoErr(e1)
1893 }
1894 return
1895 }
1896
1897 func libc_setegid_trampoline()
1898
1899 //go:linkname libc_setegid libc_setegid
1900 //go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib"
1901
1902 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1903
1904 func Seteuid(euid int) (err error) {
1905 _, _, e1 := syscall_rawSyscall(funcPC(libc_seteuid_trampoline), uintptr(euid), 0, 0)
1906 if e1 != 0 {
1907 err = errnoErr(e1)
1908 }
1909 return
1910 }
1911
1912 func libc_seteuid_trampoline()
1913
1914 //go:linkname libc_seteuid libc_seteuid
1915 //go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib"
1916
1917 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1918
1919 func Setgid(gid int) (err error) {
1920 _, _, e1 := syscall_rawSyscall(funcPC(libc_setgid_trampoline), uintptr(gid), 0, 0)
1921 if e1 != 0 {
1922 err = errnoErr(e1)
1923 }
1924 return
1925 }
1926
1927 func libc_setgid_trampoline()
1928
1929 //go:linkname libc_setgid libc_setgid
1930 //go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib"
1931
1932 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1933
1934 func Setlogin(name string) (err error) {
1935 var _p0 *byte
1936 _p0, err = BytePtrFromString(name)
1937 if err != nil {
1938 return
1939 }
1940 _, _, e1 := syscall_syscall(funcPC(libc_setlogin_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1941 if e1 != 0 {
1942 err = errnoErr(e1)
1943 }
1944 return
1945 }
1946
1947 func libc_setlogin_trampoline()
1948
1949 //go:linkname libc_setlogin libc_setlogin
1950 //go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib"
1951
1952 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1953
1954 func Setpgid(pid int, pgid int) (err error) {
1955 _, _, e1 := syscall_rawSyscall(funcPC(libc_setpgid_trampoline), uintptr(pid), uintptr(pgid), 0)
1956 if e1 != 0 {
1957 err = errnoErr(e1)
1958 }
1959 return
1960 }
1961
1962 func libc_setpgid_trampoline()
1963
1964 //go:linkname libc_setpgid libc_setpgid
1965 //go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib"
1966
1967 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1968
1969 func Setpriority(which int, who int, prio int) (err error) {
1970 _, _, e1 := syscall_syscall(funcPC(libc_setpriority_trampoline), uintptr(which), uintptr(who), uintptr(prio))
1971 if e1 != 0 {
1972 err = errnoErr(e1)
1973 }
1974 return
1975 }
1976
1977 func libc_setpriority_trampoline()
1978
1979 //go:linkname libc_setpriority libc_setpriority
1980 //go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib"
1981
1982 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1983
1984 func Setprivexec(flag int) (err error) {
1985 _, _, e1 := syscall_syscall(funcPC(libc_setprivexec_trampoline), uintptr(flag), 0, 0)
1986 if e1 != 0 {
1987 err = errnoErr(e1)
1988 }
1989 return
1990 }
1991
1992 func libc_setprivexec_trampoline()
1993
1994 //go:linkname libc_setprivexec libc_setprivexec
1995 //go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib"
1996
1997 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1998
1999 func Setregid(rgid int, egid int) (err error) {
2000 _, _, e1 := syscall_rawSyscall(funcPC(libc_setregid_trampoline), uintptr(rgid), uintptr(egid), 0)
2001 if e1 != 0 {
2002 err = errnoErr(e1)
2003 }
2004 return
2005 }
2006
2007 func libc_setregid_trampoline()
2008
2009 //go:linkname libc_setregid libc_setregid
2010 //go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib"
2011
2012 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2013
2014 func Setreuid(ruid int, euid int) (err error) {
2015 _, _, e1 := syscall_rawSyscall(funcPC(libc_setreuid_trampoline), uintptr(ruid), uintptr(euid), 0)
2016 if e1 != 0 {
2017 err = errnoErr(e1)
2018 }
2019 return
2020 }
2021
2022 func libc_setreuid_trampoline()
2023
2024 //go:linkname libc_setreuid libc_setreuid
2025 //go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib"
2026
2027 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2028
2029 func Setrlimit(which int, lim *Rlimit) (err error) {
2030 _, _, e1 := syscall_rawSyscall(funcPC(libc_setrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
2031 if e1 != 0 {
2032 err = errnoErr(e1)
2033 }
2034 return
2035 }
2036
2037 func libc_setrlimit_trampoline()
2038
2039 //go:linkname libc_setrlimit libc_setrlimit
2040 //go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
2041
2042 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2043
2044 func Setsid() (pid int, err error) {
2045 r0, _, e1 := syscall_rawSyscall(funcPC(libc_setsid_trampoline), 0, 0, 0)
2046 pid = int(r0)
2047 if e1 != 0 {
2048 err = errnoErr(e1)
2049 }
2050 return
2051 }
2052
2053 func libc_setsid_trampoline()
2054
2055 //go:linkname libc_setsid libc_setsid
2056 //go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib"
2057
2058 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2059
2060 func Settimeofday(tp *Timeval) (err error) {
2061 _, _, e1 := syscall_rawSyscall(funcPC(libc_settimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
2062 if e1 != 0 {
2063 err = errnoErr(e1)
2064 }
2065 return
2066 }
2067
2068 func libc_settimeofday_trampoline()
2069
2070 //go:linkname libc_settimeofday libc_settimeofday
2071 //go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib"
2072
2073 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2074
2075 func Setuid(uid int) (err error) {
2076 _, _, e1 := syscall_rawSyscall(funcPC(libc_setuid_trampoline), uintptr(uid), 0, 0)
2077 if e1 != 0 {
2078 err = errnoErr(e1)
2079 }
2080 return
2081 }
2082
2083 func libc_setuid_trampoline()
2084
2085 //go:linkname libc_setuid libc_setuid
2086 //go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib"
2087
2088 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2089
2090 func Symlink(path string, link string) (err error) {
2091 var _p0 *byte
2092 _p0, err = BytePtrFromString(path)
2093 if err != nil {
2094 return
2095 }
2096 var _p1 *byte
2097 _p1, err = BytePtrFromString(link)
2098 if err != nil {
2099 return
2100 }
2101 _, _, e1 := syscall_syscall(funcPC(libc_symlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
2102 if e1 != 0 {
2103 err = errnoErr(e1)
2104 }
2105 return
2106 }
2107
2108 func libc_symlink_trampoline()
2109
2110 //go:linkname libc_symlink libc_symlink
2111 //go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib"
2112
2113 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2114
2115 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
2116 var _p0 *byte
2117 _p0, err = BytePtrFromString(oldpath)
2118 if err != nil {
2119 return
2120 }
2121 var _p1 *byte
2122 _p1, err = BytePtrFromString(newpath)
2123 if err != nil {
2124 return
2125 }
2126 _, _, e1 := syscall_syscall(funcPC(libc_symlinkat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
2127 if e1 != 0 {
2128 err = errnoErr(e1)
2129 }
2130 return
2131 }
2132
2133 func libc_symlinkat_trampoline()
2134
2135 //go:linkname libc_symlinkat libc_symlinkat
2136 //go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib"
2137
2138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2139
2140 func Sync() (err error) {
2141 _, _, e1 := syscall_syscall(funcPC(libc_sync_trampoline), 0, 0, 0)
2142 if e1 != 0 {
2143 err = errnoErr(e1)
2144 }
2145 return
2146 }
2147
2148 func libc_sync_trampoline()
2149
2150 //go:linkname libc_sync libc_sync
2151 //go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib"
2152
2153 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2154
2155 func Truncate(path string, length int64) (err error) {
2156 var _p0 *byte
2157 _p0, err = BytePtrFromString(path)
2158 if err != nil {
2159 return
2160 }
2161 _, _, e1 := syscall_syscall(funcPC(libc_truncate_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
2162 if e1 != 0 {
2163 err = errnoErr(e1)
2164 }
2165 return
2166 }
2167
2168 func libc_truncate_trampoline()
2169
2170 //go:linkname libc_truncate libc_truncate
2171 //go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib"
2172
2173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2174
2175 func Umask(newmask int) (oldmask int) {
2176 r0, _, _ := syscall_syscall(funcPC(libc_umask_trampoline), uintptr(newmask), 0, 0)
2177 oldmask = int(r0)
2178 return
2179 }
2180
2181 func libc_umask_trampoline()
2182
2183 //go:linkname libc_umask libc_umask
2184 //go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib"
2185
2186 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2187
2188 func Undelete(path string) (err error) {
2189 var _p0 *byte
2190 _p0, err = BytePtrFromString(path)
2191 if err != nil {
2192 return
2193 }
2194 _, _, e1 := syscall_syscall(funcPC(libc_undelete_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
2195 if e1 != 0 {
2196 err = errnoErr(e1)
2197 }
2198 return
2199 }
2200
2201 func libc_undelete_trampoline()
2202
2203 //go:linkname libc_undelete libc_undelete
2204 //go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib"
2205
2206 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2207
2208 func Unlink(path string) (err error) {
2209 var _p0 *byte
2210 _p0, err = BytePtrFromString(path)
2211 if err != nil {
2212 return
2213 }
2214 _, _, e1 := syscall_syscall(funcPC(libc_unlink_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
2215 if e1 != 0 {
2216 err = errnoErr(e1)
2217 }
2218 return
2219 }
2220
2221 func libc_unlink_trampoline()
2222
2223 //go:linkname libc_unlink libc_unlink
2224 //go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib"
2225
2226 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2227
2228 func Unlinkat(dirfd int, path string, flags int) (err error) {
2229 var _p0 *byte
2230 _p0, err = BytePtrFromString(path)
2231 if err != nil {
2232 return
2233 }
2234 _, _, e1 := syscall_syscall(funcPC(libc_unlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
2235 if e1 != 0 {
2236 err = errnoErr(e1)
2237 }
2238 return
2239 }
2240
2241 func libc_unlinkat_trampoline()
2242
2243 //go:linkname libc_unlinkat libc_unlinkat
2244 //go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib"
2245
2246 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2247
2248 func Unmount(path string, flags int) (err error) {
2249 var _p0 *byte
2250 _p0, err = BytePtrFromString(path)
2251 if err != nil {
2252 return
2253 }
2254 _, _, e1 := syscall_syscall(funcPC(libc_unmount_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
2255 if e1 != 0 {
2256 err = errnoErr(e1)
2257 }
2258 return
2259 }
2260
2261 func libc_unmount_trampoline()
2262
2263 //go:linkname libc_unmount libc_unmount
2264 //go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib"
2265
2266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2267
2268 func write(fd int, p []byte) (n int, err error) {
2269 var _p0 unsafe.Pointer
2270 if len(p) > 0 {
2271 _p0 = unsafe.Pointer(&p[0])
2272 } else {
2273 _p0 = unsafe.Pointer(&_zero)
2274 }
2275 r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
2276 n = int(r0)
2277 if e1 != 0 {
2278 err = errnoErr(e1)
2279 }
2280 return
2281 }
2282
2283 func libc_write_trampoline()
2284
2285 //go:linkname libc_write libc_write
2286 //go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib"
2287
2288 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2289
2290 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
2291 r0, _, e1 := syscall_syscall6(funcPC(libc_mmap_trampoline), uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
2292 ret = uintptr(r0)
2293 if e1 != 0 {
2294 err = errnoErr(e1)
2295 }
2296 return
2297 }
2298
2299 func libc_mmap_trampoline()
2300
2301 //go:linkname libc_mmap libc_mmap
2302 //go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib"
2303
2304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2305
2306 func munmap(addr uintptr, length uintptr) (err error) {
2307 _, _, e1 := syscall_syscall(funcPC(libc_munmap_trampoline), uintptr(addr), uintptr(length), 0)
2308 if e1 != 0 {
2309 err = errnoErr(e1)
2310 }
2311 return
2312 }
2313
2314 func libc_munmap_trampoline()
2315
2316 //go:linkname libc_munmap libc_munmap
2317 //go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib"
2318
2319 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2320
2321 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
2322 r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
2323 n = int(r0)
2324 if e1 != 0 {
2325 err = errnoErr(e1)
2326 }
2327 return
2328 }
2329
2330 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2331
2332 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
2333 r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
2334 n = int(r0)
2335 if e1 != 0 {
2336 err = errnoErr(e1)
2337 }
2338 return
2339 }
2340
2341 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2342
2343 func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
2344 r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
2345 sec = int64(r0)
2346 usec = int32(r1)
2347 if e1 != 0 {
2348 err = errnoErr(e1)
2349 }
2350 return
2351 }
2352
2353 func libc_gettimeofday_trampoline()
2354
2355 //go:linkname libc_gettimeofday libc_gettimeofday
2356 //go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
2357
6722358 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6732359
6742360 func Fstat(fd int, stat *Stat_t) (err error) {
675 _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
676 if e1 != 0 {
677 err = errnoErr(e1)
678 }
679 return
680 }
2361 _, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
2362 if e1 != 0 {
2363 err = errnoErr(e1)
2364 }
2365 return
2366 }
2367
2368 func libc_fstat64_trampoline()
2369
2370 //go:linkname libc_fstat64 libc_fstat64
2371 //go:cgo_import_dynamic libc_fstat64 fstat64 "/usr/lib/libSystem.B.dylib"
2372
2373 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2374
2375 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
2376 var _p0 *byte
2377 _p0, err = BytePtrFromString(path)
2378 if err != nil {
2379 return
2380 }
2381 _, _, e1 := syscall_syscall6(funcPC(libc_fstatat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
2382 if e1 != 0 {
2383 err = errnoErr(e1)
2384 }
2385 return
2386 }
2387
2388 func libc_fstatat64_trampoline()
2389
2390 //go:linkname libc_fstatat64 libc_fstatat64
2391 //go:cgo_import_dynamic libc_fstatat64 fstatat64 "/usr/lib/libSystem.B.dylib"
6812392
6822393 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6832394
6842395 func Fstatfs(fd int, stat *Statfs_t) (err error) {
685 _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
686 if e1 != 0 {
687 err = errnoErr(e1)
688 }
689 return
690 }
691
692 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
693
694 func Fsync(fd int) (err error) {
695 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
696 if e1 != 0 {
697 err = errnoErr(e1)
698 }
699 return
700 }
701
702 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
703
704 func Ftruncate(fd int, length int64) (err error) {
705 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
706 if e1 != 0 {
707 err = errnoErr(e1)
708 }
709 return
710 }
2396 _, _, e1 := syscall_syscall(funcPC(libc_fstatfs64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
2397 if e1 != 0 {
2398 err = errnoErr(e1)
2399 }
2400 return
2401 }
2402
2403 func libc_fstatfs64_trampoline()
2404
2405 //go:linkname libc_fstatfs64 libc_fstatfs64
2406 //go:cgo_import_dynamic libc_fstatfs64 fstatfs64 "/usr/lib/libSystem.B.dylib"
7112407
7122408 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7132409
7182414 } else {
7192415 _p0 = unsafe.Pointer(&_zero)
7202416 }
721 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
2417 r0, _, e1 := syscall_syscall6(funcPC(libc___getdirentries64_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
7222418 n = int(r0)
7232419 if e1 != 0 {
7242420 err = errnoErr(e1)
7262422 return
7272423 }
7282424
729 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
730
731 func Getdtablesize() (size int) {
732 r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
733 size = int(r0)
734 return
735 }
736
737 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
738
739 func Getegid() (egid int) {
740 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
741 egid = int(r0)
742 return
743 }
744
745 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
746
747 func Geteuid() (uid int) {
748 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
749 uid = int(r0)
750 return
751 }
752
753 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
754
755 func Getgid() (gid int) {
756 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
757 gid = int(r0)
758 return
759 }
760
761 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
762
763 func Getpgid(pid int) (pgid int, err error) {
764 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
765 pgid = int(r0)
766 if e1 != 0 {
767 err = errnoErr(e1)
768 }
769 return
770 }
771
772 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
773
774 func Getpgrp() (pgrp int) {
775 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
776 pgrp = int(r0)
777 return
778 }
779
780 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
781
782 func Getpid() (pid int) {
783 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
784 pid = int(r0)
785 return
786 }
787
788 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
789
790 func Getppid() (ppid int) {
791 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
792 ppid = int(r0)
793 return
794 }
795
796 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
797
798 func Getpriority(which int, who int) (prio int, err error) {
799 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
800 prio = int(r0)
801 if e1 != 0 {
802 err = errnoErr(e1)
803 }
804 return
805 }
806
807 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
808
809 func Getrlimit(which int, lim *Rlimit) (err error) {
810 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
811 if e1 != 0 {
812 err = errnoErr(e1)
813 }
814 return
815 }
816
817 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
818
819 func Getrusage(who int, rusage *Rusage) (err error) {
820 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
821 if e1 != 0 {
822 err = errnoErr(e1)
823 }
824 return
825 }
826
827 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
828
829 func Getsid(pid int) (sid int, err error) {
830 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
831 sid = int(r0)
832 if e1 != 0 {
833 err = errnoErr(e1)
834 }
835 return
836 }
837
838 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
839
840 func Getuid() (uid int) {
841 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
842 uid = int(r0)
843 return
844 }
845
846 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
847
848 func Issetugid() (tainted bool) {
849 r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
850 tainted = bool(r0 != 0)
851 return
852 }
853
854 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
855
856 func Kqueue() (fd int, err error) {
857 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
858 fd = int(r0)
859 if e1 != 0 {
860 err = errnoErr(e1)
861 }
862 return
863 }
864
865 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
866
867 func Lchown(path string, uid int, gid int) (err error) {
868 var _p0 *byte
869 _p0, err = BytePtrFromString(path)
870 if err != nil {
871 return
872 }
873 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
874 if e1 != 0 {
875 err = errnoErr(e1)
876 }
877 return
878 }
879
880 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
881
882 func Link(path string, link string) (err error) {
883 var _p0 *byte
884 _p0, err = BytePtrFromString(path)
885 if err != nil {
886 return
887 }
888 var _p1 *byte
889 _p1, err = BytePtrFromString(link)
890 if err != nil {
891 return
892 }
893 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
894 if e1 != 0 {
895 err = errnoErr(e1)
896 }
897 return
898 }
899
900 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
901
902 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
903 var _p0 *byte
904 _p0, err = BytePtrFromString(path)
905 if err != nil {
906 return
907 }
908 var _p1 *byte
909 _p1, err = BytePtrFromString(link)
910 if err != nil {
911 return
912 }
913 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
914 if e1 != 0 {
915 err = errnoErr(e1)
916 }
917 return
918 }
919
920 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
921
922 func Listen(s int, backlog int) (err error) {
923 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
924 if e1 != 0 {
925 err = errnoErr(e1)
926 }
927 return
928 }
2425 func libc___getdirentries64_trampoline()
2426
2427 //go:linkname libc___getdirentries64 libc___getdirentries64
2428 //go:cgo_import_dynamic libc___getdirentries64 __getdirentries64 "/usr/lib/libSystem.B.dylib"
2429
2430 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2431
2432 func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
2433 r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat64_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
2434 n = int(r0)
2435 if e1 != 0 {
2436 err = errnoErr(e1)
2437 }
2438 return
2439 }
2440
2441 func libc_getfsstat64_trampoline()
2442
2443 //go:linkname libc_getfsstat64 libc_getfsstat64
2444 //go:cgo_import_dynamic libc_getfsstat64 getfsstat64 "/usr/lib/libSystem.B.dylib"
9292445
9302446 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9312447
9352451 if err != nil {
9362452 return
9372453 }
938 _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
939 if e1 != 0 {
940 err = errnoErr(e1)
941 }
942 return
943 }
944
945 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
946
947 func Mkdir(path string, mode uint32) (err error) {
948 var _p0 *byte
949 _p0, err = BytePtrFromString(path)
950 if err != nil {
951 return
952 }
953 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
954 if e1 != 0 {
955 err = errnoErr(e1)
956 }
957 return
958 }
959
960 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
961
962 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
963 var _p0 *byte
964 _p0, err = BytePtrFromString(path)
965 if err != nil {
966 return
967 }
968 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
969 if e1 != 0 {
970 err = errnoErr(e1)
971 }
972 return
973 }
974
975 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
976
977 func Mkfifo(path string, mode uint32) (err error) {
978 var _p0 *byte
979 _p0, err = BytePtrFromString(path)
980 if err != nil {
981 return
982 }
983 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
984 if e1 != 0 {
985 err = errnoErr(e1)
986 }
987 return
988 }
989
990 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
991
992 func Mknod(path string, mode uint32, dev int) (err error) {
993 var _p0 *byte
994 _p0, err = BytePtrFromString(path)
995 if err != nil {
996 return
997 }
998 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
999 if e1 != 0 {
1000 err = errnoErr(e1)
1001 }
1002 return
1003 }
1004
1005 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1006
1007 func Open(path string, mode int, perm uint32) (fd int, err error) {
1008 var _p0 *byte
1009 _p0, err = BytePtrFromString(path)
1010 if err != nil {
1011 return
1012 }
1013 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1014 fd = int(r0)
1015 if e1 != 0 {
1016 err = errnoErr(e1)
1017 }
1018 return
1019 }
1020
1021 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1022
1023 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1024 var _p0 *byte
1025 _p0, err = BytePtrFromString(path)
1026 if err != nil {
1027 return
1028 }
1029 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
1030 fd = int(r0)
1031 if e1 != 0 {
1032 err = errnoErr(e1)
1033 }
1034 return
1035 }
1036
1037 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1038
1039 func Pathconf(path string, name int) (val int, err error) {
1040 var _p0 *byte
1041 _p0, err = BytePtrFromString(path)
1042 if err != nil {
1043 return
1044 }
1045 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1046 val = int(r0)
1047 if e1 != 0 {
1048 err = errnoErr(e1)
1049 }
1050 return
1051 }
1052
1053 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1054
1055 func Pread(fd int, p []byte, offset int64) (n int, err error) {
1056 var _p0 unsafe.Pointer
1057 if len(p) > 0 {
1058 _p0 = unsafe.Pointer(&p[0])
1059 } else {
1060 _p0 = unsafe.Pointer(&_zero)
1061 }
1062 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1063 n = int(r0)
1064 if e1 != 0 {
1065 err = errnoErr(e1)
1066 }
1067 return
1068 }
1069
1070 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1071
1072 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
1073 var _p0 unsafe.Pointer
1074 if len(p) > 0 {
1075 _p0 = unsafe.Pointer(&p[0])
1076 } else {
1077 _p0 = unsafe.Pointer(&_zero)
1078 }
1079 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1080 n = int(r0)
1081 if e1 != 0 {
1082 err = errnoErr(e1)
1083 }
1084 return
1085 }
1086
1087 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1088
1089 func read(fd int, p []byte) (n int, err error) {
1090 var _p0 unsafe.Pointer
1091 if len(p) > 0 {
1092 _p0 = unsafe.Pointer(&p[0])
1093 } else {
1094 _p0 = unsafe.Pointer(&_zero)
1095 }
1096 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1097 n = int(r0)
1098 if e1 != 0 {
1099 err = errnoErr(e1)
1100 }
1101 return
1102 }
1103
1104 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1105
1106 func Readlink(path string, buf []byte) (n int, err error) {
1107 var _p0 *byte
1108 _p0, err = BytePtrFromString(path)
1109 if err != nil {
1110 return
1111 }
1112 var _p1 unsafe.Pointer
1113 if len(buf) > 0 {
1114 _p1 = unsafe.Pointer(&buf[0])
1115 } else {
1116 _p1 = unsafe.Pointer(&_zero)
1117 }
1118 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1119 n = int(r0)
1120 if e1 != 0 {
1121 err = errnoErr(e1)
1122 }
1123 return
1124 }
1125
1126 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1127
1128 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1129 var _p0 *byte
1130 _p0, err = BytePtrFromString(path)
1131 if err != nil {
1132 return
1133 }
1134 var _p1 unsafe.Pointer
1135 if len(buf) > 0 {
1136 _p1 = unsafe.Pointer(&buf[0])
1137 } else {
1138 _p1 = unsafe.Pointer(&_zero)
1139 }
1140 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1141 n = int(r0)
1142 if e1 != 0 {
1143 err = errnoErr(e1)
1144 }
1145 return
1146 }
1147
1148 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1149
1150 func Rename(from string, to string) (err error) {
1151 var _p0 *byte
1152 _p0, err = BytePtrFromString(from)
1153 if err != nil {
1154 return
1155 }
1156 var _p1 *byte
1157 _p1, err = BytePtrFromString(to)
1158 if err != nil {
1159 return
1160 }
1161 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1162 if e1 != 0 {
1163 err = errnoErr(e1)
1164 }
1165 return
1166 }
1167
1168 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1169
1170 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1171 var _p0 *byte
1172 _p0, err = BytePtrFromString(from)
1173 if err != nil {
1174 return
1175 }
1176 var _p1 *byte
1177 _p1, err = BytePtrFromString(to)
1178 if err != nil {
1179 return
1180 }
1181 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1182 if e1 != 0 {
1183 err = errnoErr(e1)
1184 }
1185 return
1186 }
1187
1188 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1189
1190 func Revoke(path string) (err error) {
1191 var _p0 *byte
1192 _p0, err = BytePtrFromString(path)
1193 if err != nil {
1194 return
1195 }
1196 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1197 if e1 != 0 {
1198 err = errnoErr(e1)
1199 }
1200 return
1201 }
1202
1203 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1204
1205 func Rmdir(path string) (err error) {
1206 var _p0 *byte
1207 _p0, err = BytePtrFromString(path)
1208 if err != nil {
1209 return
1210 }
1211 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
1212 if e1 != 0 {
1213 err = errnoErr(e1)
1214 }
1215 return
1216 }
1217
1218 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1219
1220 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1221 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
1222 newoffset = int64(r0)
1223 if e1 != 0 {
1224 err = errnoErr(e1)
1225 }
1226 return
1227 }
1228
1229 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1230
1231 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1232 _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1233 if e1 != 0 {
1234 err = errnoErr(e1)
1235 }
1236 return
1237 }
1238
1239 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1240
1241 func Setegid(egid int) (err error) {
1242 _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
1243 if e1 != 0 {
1244 err = errnoErr(e1)
1245 }
1246 return
1247 }
1248
1249 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1250
1251 func Seteuid(euid int) (err error) {
1252 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
1253 if e1 != 0 {
1254 err = errnoErr(e1)
1255 }
1256 return
1257 }
1258
1259 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1260
1261 func Setgid(gid int) (err error) {
1262 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
1263 if e1 != 0 {
1264 err = errnoErr(e1)
1265 }
1266 return
1267 }
1268
1269 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1270
1271 func Setlogin(name string) (err error) {
1272 var _p0 *byte
1273 _p0, err = BytePtrFromString(name)
1274 if err != nil {
1275 return
1276 }
1277 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
1278 if e1 != 0 {
1279 err = errnoErr(e1)
1280 }
1281 return
1282 }
1283
1284 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1285
1286 func Setpgid(pid int, pgid int) (err error) {
1287 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
1288 if e1 != 0 {
1289 err = errnoErr(e1)
1290 }
1291 return
1292 }
1293
1294 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1295
1296 func Setpriority(which int, who int, prio int) (err error) {
1297 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
1298 if e1 != 0 {
1299 err = errnoErr(e1)
1300 }
1301 return
1302 }
1303
1304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1305
1306 func Setprivexec(flag int) (err error) {
1307 _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
1308 if e1 != 0 {
1309 err = errnoErr(e1)
1310 }
1311 return
1312 }
1313
1314 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1315
1316 func Setregid(rgid int, egid int) (err error) {
1317 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
1318 if e1 != 0 {
1319 err = errnoErr(e1)
1320 }
1321 return
1322 }
1323
1324 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1325
1326 func Setreuid(ruid int, euid int) (err error) {
1327 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
1328 if e1 != 0 {
1329 err = errnoErr(e1)
1330 }
1331 return
1332 }
1333
1334 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1335
1336 func Setrlimit(which int, lim *Rlimit) (err error) {
1337 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1338 if e1 != 0 {
1339 err = errnoErr(e1)
1340 }
1341 return
1342 }
1343
1344 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1345
1346 func Setsid() (pid int, err error) {
1347 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
1348 pid = int(r0)
1349 if e1 != 0 {
1350 err = errnoErr(e1)
1351 }
1352 return
1353 }
1354
1355 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1356
1357 func Settimeofday(tp *Timeval) (err error) {
1358 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1359 if e1 != 0 {
1360 err = errnoErr(e1)
1361 }
1362 return
1363 }
1364
1365 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1366
1367 func Setuid(uid int) (err error) {
1368 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
1369 if e1 != 0 {
1370 err = errnoErr(e1)
1371 }
1372 return
1373 }
2454 _, _, e1 := syscall_syscall(funcPC(libc_lstat64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2455 if e1 != 0 {
2456 err = errnoErr(e1)
2457 }
2458 return
2459 }
2460
2461 func libc_lstat64_trampoline()
2462
2463 //go:linkname libc_lstat64 libc_lstat64
2464 //go:cgo_import_dynamic libc_lstat64 lstat64 "/usr/lib/libSystem.B.dylib"
13742465
13752466 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13762467
13802471 if err != nil {
13812472 return
13822473 }
1383 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1384 if e1 != 0 {
1385 err = errnoErr(e1)
1386 }
1387 return
1388 }
2474 _, _, e1 := syscall_syscall(funcPC(libc_stat64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2475 if e1 != 0 {
2476 err = errnoErr(e1)
2477 }
2478 return
2479 }
2480
2481 func libc_stat64_trampoline()
2482
2483 //go:linkname libc_stat64 libc_stat64
2484 //go:cgo_import_dynamic libc_stat64 stat64 "/usr/lib/libSystem.B.dylib"
13892485
13902486 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13912487
13952491 if err != nil {
13962492 return
13972493 }
1398 _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1399 if e1 != 0 {
1400 err = errnoErr(e1)
1401 }
1402 return
1403 }
1404
1405 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1406
1407 func Symlink(path string, link string) (err error) {
1408 var _p0 *byte
1409 _p0, err = BytePtrFromString(path)
1410 if err != nil {
1411 return
1412 }
1413 var _p1 *byte
1414 _p1, err = BytePtrFromString(link)
1415 if err != nil {
1416 return
1417 }
1418 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1419 if e1 != 0 {
1420 err = errnoErr(e1)
1421 }
1422 return
1423 }
1424
1425 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1426
1427 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
1428 var _p0 *byte
1429 _p0, err = BytePtrFromString(oldpath)
1430 if err != nil {
1431 return
1432 }
1433 var _p1 *byte
1434 _p1, err = BytePtrFromString(newpath)
1435 if err != nil {
1436 return
1437 }
1438 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1439 if e1 != 0 {
1440 err = errnoErr(e1)
1441 }
1442 return
1443 }
1444
1445 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1446
1447 func Sync() (err error) {
1448 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
1449 if e1 != 0 {
1450 err = errnoErr(e1)
1451 }
1452 return
1453 }
1454
1455 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1456
1457 func Truncate(path string, length int64) (err error) {
1458 var _p0 *byte
1459 _p0, err = BytePtrFromString(path)
1460 if err != nil {
1461 return
1462 }
1463 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
1464 if e1 != 0 {
1465 err = errnoErr(e1)
1466 }
1467 return
1468 }
1469
1470 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1471
1472 func Umask(newmask int) (oldmask int) {
1473 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
1474 oldmask = int(r0)
1475 return
1476 }
1477
1478 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1479
1480 func Undelete(path string) (err error) {
1481 var _p0 *byte
1482 _p0, err = BytePtrFromString(path)
1483 if err != nil {
1484 return
1485 }
1486 _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1487 if e1 != 0 {
1488 err = errnoErr(e1)
1489 }
1490 return
1491 }
1492
1493 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1494
1495 func Unlink(path string) (err error) {
1496 var _p0 *byte
1497 _p0, err = BytePtrFromString(path)
1498 if err != nil {
1499 return
1500 }
1501 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1502 if e1 != 0 {
1503 err = errnoErr(e1)
1504 }
1505 return
1506 }
1507
1508 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1509
1510 func Unlinkat(dirfd int, path string, flags int) (err error) {
1511 var _p0 *byte
1512 _p0, err = BytePtrFromString(path)
1513 if err != nil {
1514 return
1515 }
1516 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
1517 if e1 != 0 {
1518 err = errnoErr(e1)
1519 }
1520 return
1521 }
1522
1523 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1524
1525 func Unmount(path string, flags int) (err error) {
1526 var _p0 *byte
1527 _p0, err = BytePtrFromString(path)
1528 if err != nil {
1529 return
1530 }
1531 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1532 if e1 != 0 {
1533 err = errnoErr(e1)
1534 }
1535 return
1536 }
1537
1538 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1539
1540 func write(fd int, p []byte) (n int, err error) {
1541 var _p0 unsafe.Pointer
1542 if len(p) > 0 {
1543 _p0 = unsafe.Pointer(&p[0])
1544 } else {
1545 _p0 = unsafe.Pointer(&_zero)
1546 }
1547 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1548 n = int(r0)
1549 if e1 != 0 {
1550 err = errnoErr(e1)
1551 }
1552 return
1553 }
1554
1555 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1556
1557 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
1558 r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
1559 ret = uintptr(r0)
1560 if e1 != 0 {
1561 err = errnoErr(e1)
1562 }
1563 return
1564 }
1565
1566 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1567
1568 func munmap(addr uintptr, length uintptr) (err error) {
1569 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
1570 if e1 != 0 {
1571 err = errnoErr(e1)
1572 }
1573 return
1574 }
1575
1576 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1577
1578 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
1579 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1580 n = int(r0)
1581 if e1 != 0 {
1582 err = errnoErr(e1)
1583 }
1584 return
1585 }
1586
1587 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1588
1589 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
1590 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1591 n = int(r0)
1592 if e1 != 0 {
1593 err = errnoErr(e1)
1594 }
1595 return
1596 }
1597
1598 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1599
1600 func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
1601 r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1602 sec = int64(r0)
1603 usec = int32(r1)
1604 if e1 != 0 {
1605 err = errnoErr(e1)
1606 }
1607 return
1608 }
2494 _, _, e1 := syscall_syscall(funcPC(libc_statfs64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2495 if e1 != 0 {
2496 err = errnoErr(e1)
2497 }
2498 return
2499 }
2500
2501 func libc_statfs64_trampoline()
2502
2503 //go:linkname libc_statfs64 libc_statfs64
2504 //go:cgo_import_dynamic libc_statfs64 statfs64 "/usr/lib/libSystem.B.dylib"
0 // go run mkasm_darwin.go amd64
1 // Code generated by the command above; DO NOT EDIT.
2
3 // +build go1.12
4
5 #include "textflag.h"
6 TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
7 JMP libc_getgroups(SB)
8 TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
9 JMP libc_setgroups(SB)
10 TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
11 JMP libc_wait4(SB)
12 TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
13 JMP libc_accept(SB)
14 TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
15 JMP libc_bind(SB)
16 TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
17 JMP libc_connect(SB)
18 TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
19 JMP libc_socket(SB)
20 TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
21 JMP libc_getsockopt(SB)
22 TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
23 JMP libc_setsockopt(SB)
24 TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
25 JMP libc_getpeername(SB)
26 TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
27 JMP libc_getsockname(SB)
28 TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
29 JMP libc_shutdown(SB)
30 TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
31 JMP libc_socketpair(SB)
32 TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
33 JMP libc_recvfrom(SB)
34 TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
35 JMP libc_sendto(SB)
36 TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
37 JMP libc_recvmsg(SB)
38 TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
39 JMP libc_sendmsg(SB)
40 TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
41 JMP libc_kevent(SB)
42 TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
43 JMP libc___sysctl(SB)
44 TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
45 JMP libc_utimes(SB)
46 TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
47 JMP libc_futimes(SB)
48 TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
49 JMP libc_fcntl(SB)
50 TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
51 JMP libc_poll(SB)
52 TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
53 JMP libc_madvise(SB)
54 TEXT ·libc_mlock_trampoline(SB),NOSPLIT,$0-0
55 JMP libc_mlock(SB)
56 TEXT ·libc_mlockall_trampoline(SB),NOSPLIT,$0-0
57 JMP libc_mlockall(SB)
58 TEXT ·libc_mprotect_trampoline(SB),NOSPLIT,$0-0
59 JMP libc_mprotect(SB)
60 TEXT ·libc_msync_trampoline(SB),NOSPLIT,$0-0
61 JMP libc_msync(SB)
62 TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
63 JMP libc_munlock(SB)
64 TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
65 JMP libc_munlockall(SB)
66 TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
67 JMP libc_ptrace(SB)
68 TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
69 JMP libc_getattrlist(SB)
70 TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
71 JMP libc_pipe(SB)
72 TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
73 JMP libc_getxattr(SB)
74 TEXT ·libc_fgetxattr_trampoline(SB),NOSPLIT,$0-0
75 JMP libc_fgetxattr(SB)
76 TEXT ·libc_setxattr_trampoline(SB),NOSPLIT,$0-0
77 JMP libc_setxattr(SB)
78 TEXT ·libc_fsetxattr_trampoline(SB),NOSPLIT,$0-0
79 JMP libc_fsetxattr(SB)
80 TEXT ·libc_removexattr_trampoline(SB),NOSPLIT,$0-0
81 JMP libc_removexattr(SB)
82 TEXT ·libc_fremovexattr_trampoline(SB),NOSPLIT,$0-0
83 JMP libc_fremovexattr(SB)
84 TEXT ·libc_listxattr_trampoline(SB),NOSPLIT,$0-0
85 JMP libc_listxattr(SB)
86 TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
87 JMP libc_flistxattr(SB)
88 TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
89 JMP libc_setattrlist(SB)
90 TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
91 JMP libc_kill(SB)
92 TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
93 JMP libc_ioctl(SB)
94 TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
95 JMP libc_sendfile(SB)
96 TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
97 JMP libc_access(SB)
98 TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
99 JMP libc_adjtime(SB)
100 TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
101 JMP libc_chdir(SB)
102 TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
103 JMP libc_chflags(SB)
104 TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
105 JMP libc_chmod(SB)
106 TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
107 JMP libc_chown(SB)
108 TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
109 JMP libc_chroot(SB)
110 TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
111 JMP libc_close(SB)
112 TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
113 JMP libc_dup(SB)
114 TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
115 JMP libc_dup2(SB)
116 TEXT ·libc_exchangedata_trampoline(SB),NOSPLIT,$0-0
117 JMP libc_exchangedata(SB)
118 TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
119 JMP libc_exit(SB)
120 TEXT ·libc_faccessat_trampoline(SB),NOSPLIT,$0-0
121 JMP libc_faccessat(SB)
122 TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
123 JMP libc_fchdir(SB)
124 TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
125 JMP libc_fchflags(SB)
126 TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
127 JMP libc_fchmod(SB)
128 TEXT ·libc_fchmodat_trampoline(SB),NOSPLIT,$0-0
129 JMP libc_fchmodat(SB)
130 TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
131 JMP libc_fchown(SB)
132 TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
133 JMP libc_fchownat(SB)
134 TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
135 JMP libc_flock(SB)
136 TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
137 JMP libc_fpathconf(SB)
138 TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
139 JMP libc_fsync(SB)
140 TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
141 JMP libc_ftruncate(SB)
142 TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
143 JMP libc_getdtablesize(SB)
144 TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
145 JMP libc_getegid(SB)
146 TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
147 JMP libc_geteuid(SB)
148 TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
149 JMP libc_getgid(SB)
150 TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
151 JMP libc_getpgid(SB)
152 TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
153 JMP libc_getpgrp(SB)
154 TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
155 JMP libc_getpid(SB)
156 TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
157 JMP libc_getppid(SB)
158 TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
159 JMP libc_getpriority(SB)
160 TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
161 JMP libc_getrlimit(SB)
162 TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
163 JMP libc_getrusage(SB)
164 TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
165 JMP libc_getsid(SB)
166 TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
167 JMP libc_getuid(SB)
168 TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
169 JMP libc_issetugid(SB)
170 TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
171 JMP libc_kqueue(SB)
172 TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
173 JMP libc_lchown(SB)
174 TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
175 JMP libc_link(SB)
176 TEXT ·libc_linkat_trampoline(SB),NOSPLIT,$0-0
177 JMP libc_linkat(SB)
178 TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
179 JMP libc_listen(SB)
180 TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
181 JMP libc_mkdir(SB)
182 TEXT ·libc_mkdirat_trampoline(SB),NOSPLIT,$0-0
183 JMP libc_mkdirat(SB)
184 TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
185 JMP libc_mkfifo(SB)
186 TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
187 JMP libc_mknod(SB)
188 TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
189 JMP libc_open(SB)
190 TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
191 JMP libc_openat(SB)
192 TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
193 JMP libc_pathconf(SB)
194 TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
195 JMP libc_pread(SB)
196 TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
197 JMP libc_pwrite(SB)
198 TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
199 JMP libc_read(SB)
200 TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
201 JMP libc_readlink(SB)
202 TEXT ·libc_readlinkat_trampoline(SB),NOSPLIT,$0-0
203 JMP libc_readlinkat(SB)
204 TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
205 JMP libc_rename(SB)
206 TEXT ·libc_renameat_trampoline(SB),NOSPLIT,$0-0
207 JMP libc_renameat(SB)
208 TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
209 JMP libc_revoke(SB)
210 TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
211 JMP libc_rmdir(SB)
212 TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
213 JMP libc_lseek(SB)
214 TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
215 JMP libc_select(SB)
216 TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
217 JMP libc_setegid(SB)
218 TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
219 JMP libc_seteuid(SB)
220 TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
221 JMP libc_setgid(SB)
222 TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
223 JMP libc_setlogin(SB)
224 TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
225 JMP libc_setpgid(SB)
226 TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
227 JMP libc_setpriority(SB)
228 TEXT ·libc_setprivexec_trampoline(SB),NOSPLIT,$0-0
229 JMP libc_setprivexec(SB)
230 TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
231 JMP libc_setregid(SB)
232 TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
233 JMP libc_setreuid(SB)
234 TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
235 JMP libc_setrlimit(SB)
236 TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
237 JMP libc_setsid(SB)
238 TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
239 JMP libc_settimeofday(SB)
240 TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
241 JMP libc_setuid(SB)
242 TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
243 JMP libc_symlink(SB)
244 TEXT ·libc_symlinkat_trampoline(SB),NOSPLIT,$0-0
245 JMP libc_symlinkat(SB)
246 TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
247 JMP libc_sync(SB)
248 TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
249 JMP libc_truncate(SB)
250 TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
251 JMP libc_umask(SB)
252 TEXT ·libc_undelete_trampoline(SB),NOSPLIT,$0-0
253 JMP libc_undelete(SB)
254 TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
255 JMP libc_unlink(SB)
256 TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
257 JMP libc_unlinkat(SB)
258 TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
259 JMP libc_unmount(SB)
260 TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
261 JMP libc_write(SB)
262 TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
263 JMP libc_mmap(SB)
264 TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
265 JMP libc_munmap(SB)
266 TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
267 JMP libc_gettimeofday(SB)
268 TEXT ·libc_fstat64_trampoline(SB),NOSPLIT,$0-0
269 JMP libc_fstat64(SB)
270 TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
271 JMP libc_fstatat64(SB)
272 TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
273 JMP libc_fstatfs64(SB)
274 TEXT ·libc___getdirentries64_trampoline(SB),NOSPLIT,$0-0
275 JMP libc___getdirentries64(SB)
276 TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
277 JMP libc_getfsstat64(SB)
278 TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
279 JMP libc_lstat64(SB)
280 TEXT ·libc_stat64_trampoline(SB),NOSPLIT,$0-0
281 JMP libc_stat64(SB)
282 TEXT ·libc_statfs64_trampoline(SB),NOSPLIT,$0-0
283 JMP libc_statfs64(SB)
0 // go run mksyscall.go -l32 -tags darwin,arm,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build darwin,arm,!go1.12
4
5 package unix
6
7 import (
8 "syscall"
9 "unsafe"
10 )
11
12 var _ syscall.Errno
13
14 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15
16 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
17 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
18 n = int(r0)
19 if e1 != 0 {
20 err = errnoErr(e1)
21 }
22 return
23 }
24
25 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
26
27 func setgroups(ngid int, gid *_Gid_t) (err error) {
28 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
29 if e1 != 0 {
30 err = errnoErr(e1)
31 }
32 return
33 }
34
35 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
36
37 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
38 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
39 wpid = int(r0)
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
49 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
50 fd = int(r0)
51 if e1 != 0 {
52 err = errnoErr(e1)
53 }
54 return
55 }
56
57 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
58
59 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
60 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
61 if e1 != 0 {
62 err = errnoErr(e1)
63 }
64 return
65 }
66
67 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
68
69 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
70 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
71 if e1 != 0 {
72 err = errnoErr(e1)
73 }
74 return
75 }
76
77 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
78
79 func socket(domain int, typ int, proto int) (fd int, err error) {
80 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
81 fd = int(r0)
82 if e1 != 0 {
83 err = errnoErr(e1)
84 }
85 return
86 }
87
88 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
89
90 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
91 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
92 if e1 != 0 {
93 err = errnoErr(e1)
94 }
95 return
96 }
97
98 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
99
100 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
101 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
102 if e1 != 0 {
103 err = errnoErr(e1)
104 }
105 return
106 }
107
108 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
109
110 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
111 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
112 if e1 != 0 {
113 err = errnoErr(e1)
114 }
115 return
116 }
117
118 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
119
120 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
121 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
122 if e1 != 0 {
123 err = errnoErr(e1)
124 }
125 return
126 }
127
128 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
129
130 func Shutdown(s int, how int) (err error) {
131 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
132 if e1 != 0 {
133 err = errnoErr(e1)
134 }
135 return
136 }
137
138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
139
140 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
141 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
142 if e1 != 0 {
143 err = errnoErr(e1)
144 }
145 return
146 }
147
148 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
149
150 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
151 var _p0 unsafe.Pointer
152 if len(p) > 0 {
153 _p0 = unsafe.Pointer(&p[0])
154 } else {
155 _p0 = unsafe.Pointer(&_zero)
156 }
157 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
158 n = int(r0)
159 if e1 != 0 {
160 err = errnoErr(e1)
161 }
162 return
163 }
164
165 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
166
167 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
168 var _p0 unsafe.Pointer
169 if len(buf) > 0 {
170 _p0 = unsafe.Pointer(&buf[0])
171 } else {
172 _p0 = unsafe.Pointer(&_zero)
173 }
174 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
175 if e1 != 0 {
176 err = errnoErr(e1)
177 }
178 return
179 }
180
181 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
182
183 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
184 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
185 n = int(r0)
186 if e1 != 0 {
187 err = errnoErr(e1)
188 }
189 return
190 }
191
192 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
193
194 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
195 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
196 n = int(r0)
197 if e1 != 0 {
198 err = errnoErr(e1)
199 }
200 return
201 }
202
203 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
204
205 func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
206 r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
207 n = int(r0)
208 if e1 != 0 {
209 err = errnoErr(e1)
210 }
211 return
212 }
213
214 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
215
216 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
217 var _p0 unsafe.Pointer
218 if len(mib) > 0 {
219 _p0 = unsafe.Pointer(&mib[0])
220 } else {
221 _p0 = unsafe.Pointer(&_zero)
222 }
223 _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
224 if e1 != 0 {
225 err = errnoErr(e1)
226 }
227 return
228 }
229
230 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
231
232 func utimes(path string, timeval *[2]Timeval) (err error) {
233 var _p0 *byte
234 _p0, err = BytePtrFromString(path)
235 if err != nil {
236 return
237 }
238 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
239 if e1 != 0 {
240 err = errnoErr(e1)
241 }
242 return
243 }
244
245 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
246
247 func futimes(fd int, timeval *[2]Timeval) (err error) {
248 _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
249 if e1 != 0 {
250 err = errnoErr(e1)
251 }
252 return
253 }
254
255 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
256
257 func fcntl(fd int, cmd int, arg int) (val int, err error) {
258 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
259 val = int(r0)
260 if e1 != 0 {
261 err = errnoErr(e1)
262 }
263 return
264 }
265
266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
279 func Madvise(b []byte, behav int) (err error) {
280 var _p0 unsafe.Pointer
281 if len(b) > 0 {
282 _p0 = unsafe.Pointer(&b[0])
283 } else {
284 _p0 = unsafe.Pointer(&_zero)
285 }
286 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
287 if e1 != 0 {
288 err = errnoErr(e1)
289 }
290 return
291 }
292
293 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
294
295 func Mlock(b []byte) (err error) {
296 var _p0 unsafe.Pointer
297 if len(b) > 0 {
298 _p0 = unsafe.Pointer(&b[0])
299 } else {
300 _p0 = unsafe.Pointer(&_zero)
301 }
302 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
303 if e1 != 0 {
304 err = errnoErr(e1)
305 }
306 return
307 }
308
309 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
310
311 func Mlockall(flags int) (err error) {
312 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
313 if e1 != 0 {
314 err = errnoErr(e1)
315 }
316 return
317 }
318
319 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
320
321 func Mprotect(b []byte, prot int) (err error) {
322 var _p0 unsafe.Pointer
323 if len(b) > 0 {
324 _p0 = unsafe.Pointer(&b[0])
325 } else {
326 _p0 = unsafe.Pointer(&_zero)
327 }
328 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
329 if e1 != 0 {
330 err = errnoErr(e1)
331 }
332 return
333 }
334
335 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
336
337 func Msync(b []byte, flags int) (err error) {
338 var _p0 unsafe.Pointer
339 if len(b) > 0 {
340 _p0 = unsafe.Pointer(&b[0])
341 } else {
342 _p0 = unsafe.Pointer(&_zero)
343 }
344 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
345 if e1 != 0 {
346 err = errnoErr(e1)
347 }
348 return
349 }
350
351 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
352
353 func Munlock(b []byte) (err error) {
354 var _p0 unsafe.Pointer
355 if len(b) > 0 {
356 _p0 = unsafe.Pointer(&b[0])
357 } else {
358 _p0 = unsafe.Pointer(&_zero)
359 }
360 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
361 if e1 != 0 {
362 err = errnoErr(e1)
363 }
364 return
365 }
366
367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
368
369 func Munlockall() (err error) {
370 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
371 if e1 != 0 {
372 err = errnoErr(e1)
373 }
374 return
375 }
376
377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
378
379 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
380 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
381 if e1 != 0 {
382 err = errnoErr(e1)
383 }
384 return
385 }
386
387 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
388
389 func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
390 _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
391 if e1 != 0 {
392 err = errnoErr(e1)
393 }
394 return
395 }
396
397 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
398
399 func pipe() (r int, w int, err error) {
400 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
401 r = int(r0)
402 w = int(r1)
403 if e1 != 0 {
404 err = errnoErr(e1)
405 }
406 return
407 }
408
409 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
410
411 func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
412 var _p0 *byte
413 _p0, err = BytePtrFromString(path)
414 if err != nil {
415 return
416 }
417 var _p1 *byte
418 _p1, err = BytePtrFromString(attr)
419 if err != nil {
420 return
421 }
422 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
423 sz = int(r0)
424 if e1 != 0 {
425 err = errnoErr(e1)
426 }
427 return
428 }
429
430 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
431
432 func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
433 var _p0 *byte
434 _p0, err = BytePtrFromString(attr)
435 if err != nil {
436 return
437 }
438 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
439 sz = int(r0)
440 if e1 != 0 {
441 err = errnoErr(e1)
442 }
443 return
444 }
445
446 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
447
448 func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
449 var _p0 *byte
450 _p0, err = BytePtrFromString(path)
451 if err != nil {
452 return
453 }
454 var _p1 *byte
455 _p1, err = BytePtrFromString(attr)
456 if err != nil {
457 return
458 }
459 _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
460 if e1 != 0 {
461 err = errnoErr(e1)
462 }
463 return
464 }
465
466 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
467
468 func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
469 var _p0 *byte
470 _p0, err = BytePtrFromString(attr)
471 if err != nil {
472 return
473 }
474 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
475 if e1 != 0 {
476 err = errnoErr(e1)
477 }
478 return
479 }
480
481 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
482
483 func removexattr(path string, attr string, options int) (err error) {
484 var _p0 *byte
485 _p0, err = BytePtrFromString(path)
486 if err != nil {
487 return
488 }
489 var _p1 *byte
490 _p1, err = BytePtrFromString(attr)
491 if err != nil {
492 return
493 }
494 _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
495 if e1 != 0 {
496 err = errnoErr(e1)
497 }
498 return
499 }
500
501 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
502
503 func fremovexattr(fd int, attr string, options int) (err error) {
504 var _p0 *byte
505 _p0, err = BytePtrFromString(attr)
506 if err != nil {
507 return
508 }
509 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
510 if e1 != 0 {
511 err = errnoErr(e1)
512 }
513 return
514 }
515
516 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
517
518 func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
519 var _p0 *byte
520 _p0, err = BytePtrFromString(path)
521 if err != nil {
522 return
523 }
524 r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
525 sz = int(r0)
526 if e1 != 0 {
527 err = errnoErr(e1)
528 }
529 return
530 }
531
532 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
533
534 func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
535 r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
536 sz = int(r0)
537 if e1 != 0 {
538 err = errnoErr(e1)
539 }
540 return
541 }
542
543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
544
545 func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
546 _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
547 if e1 != 0 {
548 err = errnoErr(e1)
549 }
550 return
551 }
552
553 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
554
555 func kill(pid int, signum int, posix int) (err error) {
556 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
557 if e1 != 0 {
558 err = errnoErr(e1)
559 }
560 return
561 }
562
563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
564
565 func ioctl(fd int, req uint, arg uintptr) (err error) {
566 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
567 if e1 != 0 {
568 err = errnoErr(e1)
569 }
570 return
571 }
572
573 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
574
575 func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
576 _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
577 if e1 != 0 {
578 err = errnoErr(e1)
579 }
580 return
581 }
582
583 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
584
585 func Access(path string, mode uint32) (err error) {
586 var _p0 *byte
587 _p0, err = BytePtrFromString(path)
588 if err != nil {
589 return
590 }
591 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
592 if e1 != 0 {
593 err = errnoErr(e1)
594 }
595 return
596 }
597
598 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
599
600 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
601 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
602 if e1 != 0 {
603 err = errnoErr(e1)
604 }
605 return
606 }
607
608 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
609
610 func Chdir(path string) (err error) {
611 var _p0 *byte
612 _p0, err = BytePtrFromString(path)
613 if err != nil {
614 return
615 }
616 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
617 if e1 != 0 {
618 err = errnoErr(e1)
619 }
620 return
621 }
622
623 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
624
625 func Chflags(path string, flags int) (err error) {
626 var _p0 *byte
627 _p0, err = BytePtrFromString(path)
628 if err != nil {
629 return
630 }
631 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
632 if e1 != 0 {
633 err = errnoErr(e1)
634 }
635 return
636 }
637
638 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
639
640 func Chmod(path string, mode uint32) (err error) {
641 var _p0 *byte
642 _p0, err = BytePtrFromString(path)
643 if err != nil {
644 return
645 }
646 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
647 if e1 != 0 {
648 err = errnoErr(e1)
649 }
650 return
651 }
652
653 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
654
655 func Chown(path string, uid int, gid int) (err error) {
656 var _p0 *byte
657 _p0, err = BytePtrFromString(path)
658 if err != nil {
659 return
660 }
661 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
662 if e1 != 0 {
663 err = errnoErr(e1)
664 }
665 return
666 }
667
668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
669
670 func Chroot(path string) (err error) {
671 var _p0 *byte
672 _p0, err = BytePtrFromString(path)
673 if err != nil {
674 return
675 }
676 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
677 if e1 != 0 {
678 err = errnoErr(e1)
679 }
680 return
681 }
682
683 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
684
685 func Close(fd int) (err error) {
686 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
687 if e1 != 0 {
688 err = errnoErr(e1)
689 }
690 return
691 }
692
693 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
694
695 func Dup(fd int) (nfd int, err error) {
696 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
697 nfd = int(r0)
698 if e1 != 0 {
699 err = errnoErr(e1)
700 }
701 return
702 }
703
704 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
705
706 func Dup2(from int, to int) (err error) {
707 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
708 if e1 != 0 {
709 err = errnoErr(e1)
710 }
711 return
712 }
713
714 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
715
716 func Exchangedata(path1 string, path2 string, options int) (err error) {
717 var _p0 *byte
718 _p0, err = BytePtrFromString(path1)
719 if err != nil {
720 return
721 }
722 var _p1 *byte
723 _p1, err = BytePtrFromString(path2)
724 if err != nil {
725 return
726 }
727 _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
728 if e1 != 0 {
729 err = errnoErr(e1)
730 }
731 return
732 }
733
734 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
735
736 func Exit(code int) {
737 Syscall(SYS_EXIT, uintptr(code), 0, 0)
738 return
739 }
740
741 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
742
743 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
744 var _p0 *byte
745 _p0, err = BytePtrFromString(path)
746 if err != nil {
747 return
748 }
749 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
750 if e1 != 0 {
751 err = errnoErr(e1)
752 }
753 return
754 }
755
756 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
757
758 func Fchdir(fd int) (err error) {
759 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
760 if e1 != 0 {
761 err = errnoErr(e1)
762 }
763 return
764 }
765
766 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
767
768 func Fchflags(fd int, flags int) (err error) {
769 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
770 if e1 != 0 {
771 err = errnoErr(e1)
772 }
773 return
774 }
775
776 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
777
778 func Fchmod(fd int, mode uint32) (err error) {
779 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
780 if e1 != 0 {
781 err = errnoErr(e1)
782 }
783 return
784 }
785
786 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
787
788 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
789 var _p0 *byte
790 _p0, err = BytePtrFromString(path)
791 if err != nil {
792 return
793 }
794 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
795 if e1 != 0 {
796 err = errnoErr(e1)
797 }
798 return
799 }
800
801 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
802
803 func Fchown(fd int, uid int, gid int) (err error) {
804 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
805 if e1 != 0 {
806 err = errnoErr(e1)
807 }
808 return
809 }
810
811 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
812
813 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
814 var _p0 *byte
815 _p0, err = BytePtrFromString(path)
816 if err != nil {
817 return
818 }
819 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
820 if e1 != 0 {
821 err = errnoErr(e1)
822 }
823 return
824 }
825
826 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
827
828 func Flock(fd int, how int) (err error) {
829 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
830 if e1 != 0 {
831 err = errnoErr(e1)
832 }
833 return
834 }
835
836 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
837
838 func Fpathconf(fd int, name int) (val int, err error) {
839 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
840 val = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func Fsync(fd int) (err error) {
850 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
851 if e1 != 0 {
852 err = errnoErr(e1)
853 }
854 return
855 }
856
857 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
858
859 func Ftruncate(fd int, length int64) (err error) {
860 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
861 if e1 != 0 {
862 err = errnoErr(e1)
863 }
864 return
865 }
866
867 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
868
869 func Getdtablesize() (size int) {
870 r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
871 size = int(r0)
872 return
873 }
874
875 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
876
877 func Getegid() (egid int) {
878 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
879 egid = int(r0)
880 return
881 }
882
883 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
884
885 func Geteuid() (uid int) {
886 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
887 uid = int(r0)
888 return
889 }
890
891 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
892
893 func Getgid() (gid int) {
894 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
895 gid = int(r0)
896 return
897 }
898
899 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
900
901 func Getpgid(pid int) (pgid int, err error) {
902 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
903 pgid = int(r0)
904 if e1 != 0 {
905 err = errnoErr(e1)
906 }
907 return
908 }
909
910 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
911
912 func Getpgrp() (pgrp int) {
913 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
914 pgrp = int(r0)
915 return
916 }
917
918 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
919
920 func Getpid() (pid int) {
921 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
922 pid = int(r0)
923 return
924 }
925
926 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
927
928 func Getppid() (ppid int) {
929 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
930 ppid = int(r0)
931 return
932 }
933
934 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
935
936 func Getpriority(which int, who int) (prio int, err error) {
937 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
938 prio = int(r0)
939 if e1 != 0 {
940 err = errnoErr(e1)
941 }
942 return
943 }
944
945 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
946
947 func Getrlimit(which int, lim *Rlimit) (err error) {
948 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
949 if e1 != 0 {
950 err = errnoErr(e1)
951 }
952 return
953 }
954
955 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
956
957 func Getrusage(who int, rusage *Rusage) (err error) {
958 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
959 if e1 != 0 {
960 err = errnoErr(e1)
961 }
962 return
963 }
964
965 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
966
967 func Getsid(pid int) (sid int, err error) {
968 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
969 sid = int(r0)
970 if e1 != 0 {
971 err = errnoErr(e1)
972 }
973 return
974 }
975
976 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
977
978 func Getuid() (uid int) {
979 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
980 uid = int(r0)
981 return
982 }
983
984 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
985
986 func Issetugid() (tainted bool) {
987 r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
988 tainted = bool(r0 != 0)
989 return
990 }
991
992 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
993
994 func Kqueue() (fd int, err error) {
995 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
996 fd = int(r0)
997 if e1 != 0 {
998 err = errnoErr(e1)
999 }
1000 return
1001 }
1002
1003 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1004
1005 func Lchown(path string, uid int, gid int) (err error) {
1006 var _p0 *byte
1007 _p0, err = BytePtrFromString(path)
1008 if err != nil {
1009 return
1010 }
1011 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
1012 if e1 != 0 {
1013 err = errnoErr(e1)
1014 }
1015 return
1016 }
1017
1018 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1019
1020 func Link(path string, link string) (err error) {
1021 var _p0 *byte
1022 _p0, err = BytePtrFromString(path)
1023 if err != nil {
1024 return
1025 }
1026 var _p1 *byte
1027 _p1, err = BytePtrFromString(link)
1028 if err != nil {
1029 return
1030 }
1031 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1032 if e1 != 0 {
1033 err = errnoErr(e1)
1034 }
1035 return
1036 }
1037
1038 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1039
1040 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
1041 var _p0 *byte
1042 _p0, err = BytePtrFromString(path)
1043 if err != nil {
1044 return
1045 }
1046 var _p1 *byte
1047 _p1, err = BytePtrFromString(link)
1048 if err != nil {
1049 return
1050 }
1051 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1052 if e1 != 0 {
1053 err = errnoErr(e1)
1054 }
1055 return
1056 }
1057
1058 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1059
1060 func Listen(s int, backlog int) (err error) {
1061 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
1062 if e1 != 0 {
1063 err = errnoErr(e1)
1064 }
1065 return
1066 }
1067
1068 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1069
1070 func Mkdir(path string, mode uint32) (err error) {
1071 var _p0 *byte
1072 _p0, err = BytePtrFromString(path)
1073 if err != nil {
1074 return
1075 }
1076 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1077 if e1 != 0 {
1078 err = errnoErr(e1)
1079 }
1080 return
1081 }
1082
1083 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1084
1085 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1086 var _p0 *byte
1087 _p0, err = BytePtrFromString(path)
1088 if err != nil {
1089 return
1090 }
1091 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1092 if e1 != 0 {
1093 err = errnoErr(e1)
1094 }
1095 return
1096 }
1097
1098 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1099
1100 func Mkfifo(path string, mode uint32) (err error) {
1101 var _p0 *byte
1102 _p0, err = BytePtrFromString(path)
1103 if err != nil {
1104 return
1105 }
1106 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1107 if e1 != 0 {
1108 err = errnoErr(e1)
1109 }
1110 return
1111 }
1112
1113 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1114
1115 func Mknod(path string, mode uint32, dev int) (err error) {
1116 var _p0 *byte
1117 _p0, err = BytePtrFromString(path)
1118 if err != nil {
1119 return
1120 }
1121 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1122 if e1 != 0 {
1123 err = errnoErr(e1)
1124 }
1125 return
1126 }
1127
1128 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1129
1130 func Open(path string, mode int, perm uint32) (fd int, err error) {
1131 var _p0 *byte
1132 _p0, err = BytePtrFromString(path)
1133 if err != nil {
1134 return
1135 }
1136 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1137 fd = int(r0)
1138 if e1 != 0 {
1139 err = errnoErr(e1)
1140 }
1141 return
1142 }
1143
1144 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1145
1146 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1147 var _p0 *byte
1148 _p0, err = BytePtrFromString(path)
1149 if err != nil {
1150 return
1151 }
1152 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
1153 fd = int(r0)
1154 if e1 != 0 {
1155 err = errnoErr(e1)
1156 }
1157 return
1158 }
1159
1160 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1161
1162 func Pathconf(path string, name int) (val int, err error) {
1163 var _p0 *byte
1164 _p0, err = BytePtrFromString(path)
1165 if err != nil {
1166 return
1167 }
1168 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1169 val = int(r0)
1170 if e1 != 0 {
1171 err = errnoErr(e1)
1172 }
1173 return
1174 }
1175
1176 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1177
1178 func Pread(fd int, p []byte, offset int64) (n int, err error) {
1179 var _p0 unsafe.Pointer
1180 if len(p) > 0 {
1181 _p0 = unsafe.Pointer(&p[0])
1182 } else {
1183 _p0 = unsafe.Pointer(&_zero)
1184 }
1185 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
1186 n = int(r0)
1187 if e1 != 0 {
1188 err = errnoErr(e1)
1189 }
1190 return
1191 }
1192
1193 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1194
1195 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
1196 var _p0 unsafe.Pointer
1197 if len(p) > 0 {
1198 _p0 = unsafe.Pointer(&p[0])
1199 } else {
1200 _p0 = unsafe.Pointer(&_zero)
1201 }
1202 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
1203 n = int(r0)
1204 if e1 != 0 {
1205 err = errnoErr(e1)
1206 }
1207 return
1208 }
1209
1210 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1211
1212 func read(fd int, p []byte) (n int, err error) {
1213 var _p0 unsafe.Pointer
1214 if len(p) > 0 {
1215 _p0 = unsafe.Pointer(&p[0])
1216 } else {
1217 _p0 = unsafe.Pointer(&_zero)
1218 }
1219 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1220 n = int(r0)
1221 if e1 != 0 {
1222 err = errnoErr(e1)
1223 }
1224 return
1225 }
1226
1227 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1228
1229 func Readlink(path string, buf []byte) (n int, err error) {
1230 var _p0 *byte
1231 _p0, err = BytePtrFromString(path)
1232 if err != nil {
1233 return
1234 }
1235 var _p1 unsafe.Pointer
1236 if len(buf) > 0 {
1237 _p1 = unsafe.Pointer(&buf[0])
1238 } else {
1239 _p1 = unsafe.Pointer(&_zero)
1240 }
1241 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1242 n = int(r0)
1243 if e1 != 0 {
1244 err = errnoErr(e1)
1245 }
1246 return
1247 }
1248
1249 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1250
1251 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1252 var _p0 *byte
1253 _p0, err = BytePtrFromString(path)
1254 if err != nil {
1255 return
1256 }
1257 var _p1 unsafe.Pointer
1258 if len(buf) > 0 {
1259 _p1 = unsafe.Pointer(&buf[0])
1260 } else {
1261 _p1 = unsafe.Pointer(&_zero)
1262 }
1263 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1264 n = int(r0)
1265 if e1 != 0 {
1266 err = errnoErr(e1)
1267 }
1268 return
1269 }
1270
1271 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1272
1273 func Rename(from string, to string) (err error) {
1274 var _p0 *byte
1275 _p0, err = BytePtrFromString(from)
1276 if err != nil {
1277 return
1278 }
1279 var _p1 *byte
1280 _p1, err = BytePtrFromString(to)
1281 if err != nil {
1282 return
1283 }
1284 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1285 if e1 != 0 {
1286 err = errnoErr(e1)
1287 }
1288 return
1289 }
1290
1291 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1292
1293 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1294 var _p0 *byte
1295 _p0, err = BytePtrFromString(from)
1296 if err != nil {
1297 return
1298 }
1299 var _p1 *byte
1300 _p1, err = BytePtrFromString(to)
1301 if err != nil {
1302 return
1303 }
1304 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1305 if e1 != 0 {
1306 err = errnoErr(e1)
1307 }
1308 return
1309 }
1310
1311 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1312
1313 func Revoke(path string) (err error) {
1314 var _p0 *byte
1315 _p0, err = BytePtrFromString(path)
1316 if err != nil {
1317 return
1318 }
1319 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1320 if e1 != 0 {
1321 err = errnoErr(e1)
1322 }
1323 return
1324 }
1325
1326 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1327
1328 func Rmdir(path string) (err error) {
1329 var _p0 *byte
1330 _p0, err = BytePtrFromString(path)
1331 if err != nil {
1332 return
1333 }
1334 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
1335 if e1 != 0 {
1336 err = errnoErr(e1)
1337 }
1338 return
1339 }
1340
1341 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1342
1343 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1344 r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
1345 newoffset = int64(int64(r1)<<32 | int64(r0))
1346 if e1 != 0 {
1347 err = errnoErr(e1)
1348 }
1349 return
1350 }
1351
1352 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1353
1354 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1355 _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1356 if e1 != 0 {
1357 err = errnoErr(e1)
1358 }
1359 return
1360 }
1361
1362 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1363
1364 func Setegid(egid int) (err error) {
1365 _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
1366 if e1 != 0 {
1367 err = errnoErr(e1)
1368 }
1369 return
1370 }
1371
1372 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1373
1374 func Seteuid(euid int) (err error) {
1375 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
1384 func Setgid(gid int) (err error) {
1385 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
1386 if e1 != 0 {
1387 err = errnoErr(e1)
1388 }
1389 return
1390 }
1391
1392 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1393
1394 func Setlogin(name string) (err error) {
1395 var _p0 *byte
1396 _p0, err = BytePtrFromString(name)
1397 if err != nil {
1398 return
1399 }
1400 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
1401 if e1 != 0 {
1402 err = errnoErr(e1)
1403 }
1404 return
1405 }
1406
1407 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1408
1409 func Setpgid(pid int, pgid int) (err error) {
1410 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
1411 if e1 != 0 {
1412 err = errnoErr(e1)
1413 }
1414 return
1415 }
1416
1417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1418
1419 func Setpriority(which int, who int, prio int) (err error) {
1420 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
1421 if e1 != 0 {
1422 err = errnoErr(e1)
1423 }
1424 return
1425 }
1426
1427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1428
1429 func Setprivexec(flag int) (err error) {
1430 _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
1431 if e1 != 0 {
1432 err = errnoErr(e1)
1433 }
1434 return
1435 }
1436
1437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1438
1439 func Setregid(rgid int, egid int) (err error) {
1440 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
1441 if e1 != 0 {
1442 err = errnoErr(e1)
1443 }
1444 return
1445 }
1446
1447 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1448
1449 func Setreuid(ruid int, euid int) (err error) {
1450 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
1451 if e1 != 0 {
1452 err = errnoErr(e1)
1453 }
1454 return
1455 }
1456
1457 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1458
1459 func Setrlimit(which int, lim *Rlimit) (err error) {
1460 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1461 if e1 != 0 {
1462 err = errnoErr(e1)
1463 }
1464 return
1465 }
1466
1467 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1468
1469 func Setsid() (pid int, err error) {
1470 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
1471 pid = int(r0)
1472 if e1 != 0 {
1473 err = errnoErr(e1)
1474 }
1475 return
1476 }
1477
1478 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1479
1480 func Settimeofday(tp *Timeval) (err error) {
1481 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1482 if e1 != 0 {
1483 err = errnoErr(e1)
1484 }
1485 return
1486 }
1487
1488 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1489
1490 func Setuid(uid int) (err error) {
1491 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
1492 if e1 != 0 {
1493 err = errnoErr(e1)
1494 }
1495 return
1496 }
1497
1498 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1499
1500 func Symlink(path string, link string) (err error) {
1501 var _p0 *byte
1502 _p0, err = BytePtrFromString(path)
1503 if err != nil {
1504 return
1505 }
1506 var _p1 *byte
1507 _p1, err = BytePtrFromString(link)
1508 if err != nil {
1509 return
1510 }
1511 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1512 if e1 != 0 {
1513 err = errnoErr(e1)
1514 }
1515 return
1516 }
1517
1518 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1519
1520 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
1521 var _p0 *byte
1522 _p0, err = BytePtrFromString(oldpath)
1523 if err != nil {
1524 return
1525 }
1526 var _p1 *byte
1527 _p1, err = BytePtrFromString(newpath)
1528 if err != nil {
1529 return
1530 }
1531 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1532 if e1 != 0 {
1533 err = errnoErr(e1)
1534 }
1535 return
1536 }
1537
1538 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1539
1540 func Sync() (err error) {
1541 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
1542 if e1 != 0 {
1543 err = errnoErr(e1)
1544 }
1545 return
1546 }
1547
1548 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1549
1550 func Truncate(path string, length int64) (err error) {
1551 var _p0 *byte
1552 _p0, err = BytePtrFromString(path)
1553 if err != nil {
1554 return
1555 }
1556 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
1557 if e1 != 0 {
1558 err = errnoErr(e1)
1559 }
1560 return
1561 }
1562
1563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1564
1565 func Umask(newmask int) (oldmask int) {
1566 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
1567 oldmask = int(r0)
1568 return
1569 }
1570
1571 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1572
1573 func Undelete(path string) (err error) {
1574 var _p0 *byte
1575 _p0, err = BytePtrFromString(path)
1576 if err != nil {
1577 return
1578 }
1579 _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1580 if e1 != 0 {
1581 err = errnoErr(e1)
1582 }
1583 return
1584 }
1585
1586 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1587
1588 func Unlink(path string) (err error) {
1589 var _p0 *byte
1590 _p0, err = BytePtrFromString(path)
1591 if err != nil {
1592 return
1593 }
1594 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1595 if e1 != 0 {
1596 err = errnoErr(e1)
1597 }
1598 return
1599 }
1600
1601 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1602
1603 func Unlinkat(dirfd int, path string, flags int) (err error) {
1604 var _p0 *byte
1605 _p0, err = BytePtrFromString(path)
1606 if err != nil {
1607 return
1608 }
1609 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
1610 if e1 != 0 {
1611 err = errnoErr(e1)
1612 }
1613 return
1614 }
1615
1616 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1617
1618 func Unmount(path string, flags int) (err error) {
1619 var _p0 *byte
1620 _p0, err = BytePtrFromString(path)
1621 if err != nil {
1622 return
1623 }
1624 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1625 if e1 != 0 {
1626 err = errnoErr(e1)
1627 }
1628 return
1629 }
1630
1631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1632
1633 func write(fd int, p []byte) (n int, err error) {
1634 var _p0 unsafe.Pointer
1635 if len(p) > 0 {
1636 _p0 = unsafe.Pointer(&p[0])
1637 } else {
1638 _p0 = unsafe.Pointer(&_zero)
1639 }
1640 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1641 n = int(r0)
1642 if e1 != 0 {
1643 err = errnoErr(e1)
1644 }
1645 return
1646 }
1647
1648 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1649
1650 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
1651 r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
1652 ret = uintptr(r0)
1653 if e1 != 0 {
1654 err = errnoErr(e1)
1655 }
1656 return
1657 }
1658
1659 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1660
1661 func munmap(addr uintptr, length uintptr) (err error) {
1662 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
1663 if e1 != 0 {
1664 err = errnoErr(e1)
1665 }
1666 return
1667 }
1668
1669 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1670
1671 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
1672 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1673 n = int(r0)
1674 if e1 != 0 {
1675 err = errnoErr(e1)
1676 }
1677 return
1678 }
1679
1680 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1681
1682 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
1683 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1684 n = int(r0)
1685 if e1 != 0 {
1686 err = errnoErr(e1)
1687 }
1688 return
1689 }
1690
1691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1692
1693 func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
1694 r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1695 sec = int32(r0)
1696 usec = int32(r1)
1697 if e1 != 0 {
1698 err = errnoErr(e1)
1699 }
1700 return
1701 }
1702
1703 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1704
1705 func Fstat(fd int, stat *Stat_t) (err error) {
1706 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
1707 if e1 != 0 {
1708 err = errnoErr(e1)
1709 }
1710 return
1711 }
1712
1713 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1714
1715 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
1716 var _p0 *byte
1717 _p0, err = BytePtrFromString(path)
1718 if err != nil {
1719 return
1720 }
1721 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
1722 if e1 != 0 {
1723 err = errnoErr(e1)
1724 }
1725 return
1726 }
1727
1728 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1729
1730 func Fstatfs(fd int, stat *Statfs_t) (err error) {
1731 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
1732 if e1 != 0 {
1733 err = errnoErr(e1)
1734 }
1735 return
1736 }
1737
1738 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1739
1740 func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
1741 r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(buf), uintptr(size), uintptr(flags))
1742 n = int(r0)
1743 if e1 != 0 {
1744 err = errnoErr(e1)
1745 }
1746 return
1747 }
1748
1749 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1750
1751 func Lstat(path string, stat *Stat_t) (err error) {
1752 var _p0 *byte
1753 _p0, err = BytePtrFromString(path)
1754 if err != nil {
1755 return
1756 }
1757 _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1758 if e1 != 0 {
1759 err = errnoErr(e1)
1760 }
1761 return
1762 }
1763
1764 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1765
1766 func Stat(path string, stat *Stat_t) (err error) {
1767 var _p0 *byte
1768 _p0, err = BytePtrFromString(path)
1769 if err != nil {
1770 return
1771 }
1772 _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1773 if e1 != 0 {
1774 err = errnoErr(e1)
1775 }
1776 return
1777 }
1778
1779 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1780
1781 func Statfs(path string, stat *Statfs_t) (err error) {
1782 var _p0 *byte
1783 _p0, err = BytePtrFromString(path)
1784 if err != nil {
1785 return
1786 }
1787 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1788 if e1 != 0 {
1789 err = errnoErr(e1)
1790 }
1791 return
1792 }
0 // mksyscall.pl -tags darwin,arm syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go
0 // go run mksyscall.go -l32 -tags darwin,arm,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
3 // +build darwin,arm
3 // +build darwin,arm,go1.12
44
55 package unix
66
1414 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1515
1616 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
17 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
17 r0, _, e1 := syscall_rawSyscall(funcPC(libc_getgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
1818 n = int(r0)
1919 if e1 != 0 {
2020 err = errnoErr(e1)
2222 return
2323 }
2424
25 func libc_getgroups_trampoline()
26
27 //go:linkname libc_getgroups libc_getgroups
28 //go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib"
29
2530 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2631
2732 func setgroups(ngid int, gid *_Gid_t) (err error) {
28 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
29 if e1 != 0 {
30 err = errnoErr(e1)
31 }
32 return
33 }
33 _, _, e1 := syscall_rawSyscall(funcPC(libc_setgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
34 if e1 != 0 {
35 err = errnoErr(e1)
36 }
37 return
38 }
39
40 func libc_setgroups_trampoline()
41
42 //go:linkname libc_setgroups libc_setgroups
43 //go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib"
3444
3545 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
3646
3747 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
38 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
48 r0, _, e1 := syscall_syscall6(funcPC(libc_wait4_trampoline), uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
3949 wpid = int(r0)
4050 if e1 != 0 {
4151 err = errnoErr(e1)
4353 return
4454 }
4555
56 func libc_wait4_trampoline()
57
58 //go:linkname libc_wait4 libc_wait4
59 //go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib"
60
4661 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
4762
4863 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
49 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
64 r0, _, e1 := syscall_syscall(funcPC(libc_accept_trampoline), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
5065 fd = int(r0)
5166 if e1 != 0 {
5267 err = errnoErr(e1)
5469 return
5570 }
5671
72 func libc_accept_trampoline()
73
74 //go:linkname libc_accept libc_accept
75 //go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib"
76
5777 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5878
5979 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
60 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
61 if e1 != 0 {
62 err = errnoErr(e1)
63 }
64 return
65 }
80 _, _, e1 := syscall_syscall(funcPC(libc_bind_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
81 if e1 != 0 {
82 err = errnoErr(e1)
83 }
84 return
85 }
86
87 func libc_bind_trampoline()
88
89 //go:linkname libc_bind libc_bind
90 //go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib"
6691
6792 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6893
6994 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
70 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
71 if e1 != 0 {
72 err = errnoErr(e1)
73 }
74 return
75 }
95 _, _, e1 := syscall_syscall(funcPC(libc_connect_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
96 if e1 != 0 {
97 err = errnoErr(e1)
98 }
99 return
100 }
101
102 func libc_connect_trampoline()
103
104 //go:linkname libc_connect libc_connect
105 //go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib"
76106
77107 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
78108
79109 func socket(domain int, typ int, proto int) (fd int, err error) {
80 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
110 r0, _, e1 := syscall_rawSyscall(funcPC(libc_socket_trampoline), uintptr(domain), uintptr(typ), uintptr(proto))
81111 fd = int(r0)
82112 if e1 != 0 {
83113 err = errnoErr(e1)
85115 return
86116 }
87117
118 func libc_socket_trampoline()
119
120 //go:linkname libc_socket libc_socket
121 //go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib"
122
88123 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
89124
90125 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
91 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
92 if e1 != 0 {
93 err = errnoErr(e1)
94 }
95 return
96 }
126 _, _, e1 := syscall_syscall6(funcPC(libc_getsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
127 if e1 != 0 {
128 err = errnoErr(e1)
129 }
130 return
131 }
132
133 func libc_getsockopt_trampoline()
134
135 //go:linkname libc_getsockopt libc_getsockopt
136 //go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib"
97137
98138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
99139
100140 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
101 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
102 if e1 != 0 {
103 err = errnoErr(e1)
104 }
105 return
106 }
141 _, _, e1 := syscall_syscall6(funcPC(libc_setsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
142 if e1 != 0 {
143 err = errnoErr(e1)
144 }
145 return
146 }
147
148 func libc_setsockopt_trampoline()
149
150 //go:linkname libc_setsockopt libc_setsockopt
151 //go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib"
107152
108153 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
109154
110155 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
111 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
112 if e1 != 0 {
113 err = errnoErr(e1)
114 }
115 return
116 }
156 _, _, e1 := syscall_rawSyscall(funcPC(libc_getpeername_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
157 if e1 != 0 {
158 err = errnoErr(e1)
159 }
160 return
161 }
162
163 func libc_getpeername_trampoline()
164
165 //go:linkname libc_getpeername libc_getpeername
166 //go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib"
117167
118168 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
119169
120170 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
121 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
122 if e1 != 0 {
123 err = errnoErr(e1)
124 }
125 return
126 }
171 _, _, e1 := syscall_rawSyscall(funcPC(libc_getsockname_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
172 if e1 != 0 {
173 err = errnoErr(e1)
174 }
175 return
176 }
177
178 func libc_getsockname_trampoline()
179
180 //go:linkname libc_getsockname libc_getsockname
181 //go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib"
127182
128183 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
129184
130185 func Shutdown(s int, how int) (err error) {
131 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
132 if e1 != 0 {
133 err = errnoErr(e1)
134 }
135 return
136 }
186 _, _, e1 := syscall_syscall(funcPC(libc_shutdown_trampoline), uintptr(s), uintptr(how), 0)
187 if e1 != 0 {
188 err = errnoErr(e1)
189 }
190 return
191 }
192
193 func libc_shutdown_trampoline()
194
195 //go:linkname libc_shutdown libc_shutdown
196 //go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib"
137197
138198 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
139199
140200 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
141 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
142 if e1 != 0 {
143 err = errnoErr(e1)
144 }
145 return
146 }
201 _, _, e1 := syscall_rawSyscall6(funcPC(libc_socketpair_trampoline), uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
202 if e1 != 0 {
203 err = errnoErr(e1)
204 }
205 return
206 }
207
208 func libc_socketpair_trampoline()
209
210 //go:linkname libc_socketpair libc_socketpair
211 //go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib"
147212
148213 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
149214
154219 } else {
155220 _p0 = unsafe.Pointer(&_zero)
156221 }
157 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
222 r0, _, e1 := syscall_syscall6(funcPC(libc_recvfrom_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
158223 n = int(r0)
159224 if e1 != 0 {
160225 err = errnoErr(e1)
161226 }
162227 return
163228 }
229
230 func libc_recvfrom_trampoline()
231
232 //go:linkname libc_recvfrom libc_recvfrom
233 //go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib"
164234
165235 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
166236
171241 } else {
172242 _p0 = unsafe.Pointer(&_zero)
173243 }
174 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
175 if e1 != 0 {
176 err = errnoErr(e1)
177 }
178 return
179 }
244 _, _, e1 := syscall_syscall6(funcPC(libc_sendto_trampoline), uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
245 if e1 != 0 {
246 err = errnoErr(e1)
247 }
248 return
249 }
250
251 func libc_sendto_trampoline()
252
253 //go:linkname libc_sendto libc_sendto
254 //go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib"
180255
181256 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
182257
183258 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
184 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
259 r0, _, e1 := syscall_syscall(funcPC(libc_recvmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
185260 n = int(r0)
186261 if e1 != 0 {
187262 err = errnoErr(e1)
189264 return
190265 }
191266
267 func libc_recvmsg_trampoline()
268
269 //go:linkname libc_recvmsg libc_recvmsg
270 //go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib"
271
192272 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
193273
194274 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
195 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
275 r0, _, e1 := syscall_syscall(funcPC(libc_sendmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
196276 n = int(r0)
197277 if e1 != 0 {
198278 err = errnoErr(e1)
200280 return
201281 }
202282
283 func libc_sendmsg_trampoline()
284
285 //go:linkname libc_sendmsg libc_sendmsg
286 //go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib"
287
203288 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
204289
205290 func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
206 r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
291 r0, _, e1 := syscall_syscall6(funcPC(libc_kevent_trampoline), uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
207292 n = int(r0)
208293 if e1 != 0 {
209294 err = errnoErr(e1)
210295 }
211296 return
212297 }
298
299 func libc_kevent_trampoline()
300
301 //go:linkname libc_kevent libc_kevent
302 //go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib"
213303
214304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
215305
220310 } else {
221311 _p0 = unsafe.Pointer(&_zero)
222312 }
223 _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
224 if e1 != 0 {
225 err = errnoErr(e1)
226 }
227 return
228 }
313 _, _, e1 := syscall_syscall6(funcPC(libc___sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
314 if e1 != 0 {
315 err = errnoErr(e1)
316 }
317 return
318 }
319
320 func libc___sysctl_trampoline()
321
322 //go:linkname libc___sysctl libc___sysctl
323 //go:cgo_import_dynamic libc___sysctl __sysctl "/usr/lib/libSystem.B.dylib"
229324
230325 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
231326
235330 if err != nil {
236331 return
237332 }
238 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
239 if e1 != 0 {
240 err = errnoErr(e1)
241 }
242 return
243 }
333 _, _, e1 := syscall_syscall(funcPC(libc_utimes_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
334 if e1 != 0 {
335 err = errnoErr(e1)
336 }
337 return
338 }
339
340 func libc_utimes_trampoline()
341
342 //go:linkname libc_utimes libc_utimes
343 //go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib"
244344
245345 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
246346
247347 func futimes(fd int, timeval *[2]Timeval) (err error) {
248 _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
249 if e1 != 0 {
250 err = errnoErr(e1)
251 }
252 return
253 }
348 _, _, e1 := syscall_syscall(funcPC(libc_futimes_trampoline), uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
349 if e1 != 0 {
350 err = errnoErr(e1)
351 }
352 return
353 }
354
355 func libc_futimes_trampoline()
356
357 //go:linkname libc_futimes libc_futimes
358 //go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib"
254359
255360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
256361
257362 func fcntl(fd int, cmd int, arg int) (val int, err error) {
258 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
363 r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
259364 val = int(r0)
260365 if e1 != 0 {
261366 err = errnoErr(e1)
262367 }
263368 return
264369 }
370
371 func libc_fcntl_trampoline()
372
373 //go:linkname libc_fcntl libc_fcntl
374 //go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
375
376 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
377
378 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
379 r0, _, e1 := syscall_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
380 n = int(r0)
381 if e1 != 0 {
382 err = errnoErr(e1)
383 }
384 return
385 }
386
387 func libc_poll_trampoline()
388
389 //go:linkname libc_poll libc_poll
390 //go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib"
265391
266392 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267393
272398 } else {
273399 _p0 = unsafe.Pointer(&_zero)
274400 }
275 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
276 if e1 != 0 {
277 err = errnoErr(e1)
278 }
279 return
280 }
401 _, _, e1 := syscall_syscall(funcPC(libc_madvise_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(behav))
402 if e1 != 0 {
403 err = errnoErr(e1)
404 }
405 return
406 }
407
408 func libc_madvise_trampoline()
409
410 //go:linkname libc_madvise libc_madvise
411 //go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib"
281412
282413 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
283414
288419 } else {
289420 _p0 = unsafe.Pointer(&_zero)
290421 }
291 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
292 if e1 != 0 {
293 err = errnoErr(e1)
294 }
295 return
296 }
422 _, _, e1 := syscall_syscall(funcPC(libc_mlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
423 if e1 != 0 {
424 err = errnoErr(e1)
425 }
426 return
427 }
428
429 func libc_mlock_trampoline()
430
431 //go:linkname libc_mlock libc_mlock
432 //go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib"
297433
298434 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
299435
300436 func Mlockall(flags int) (err error) {
301 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
302 if e1 != 0 {
303 err = errnoErr(e1)
304 }
305 return
306 }
437 _, _, e1 := syscall_syscall(funcPC(libc_mlockall_trampoline), uintptr(flags), 0, 0)
438 if e1 != 0 {
439 err = errnoErr(e1)
440 }
441 return
442 }
443
444 func libc_mlockall_trampoline()
445
446 //go:linkname libc_mlockall libc_mlockall
447 //go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib"
307448
308449 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
309450
314455 } else {
315456 _p0 = unsafe.Pointer(&_zero)
316457 }
317 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
318 if e1 != 0 {
319 err = errnoErr(e1)
320 }
321 return
322 }
458 _, _, e1 := syscall_syscall(funcPC(libc_mprotect_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(prot))
459 if e1 != 0 {
460 err = errnoErr(e1)
461 }
462 return
463 }
464
465 func libc_mprotect_trampoline()
466
467 //go:linkname libc_mprotect libc_mprotect
468 //go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib"
323469
324470 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
325471
330476 } else {
331477 _p0 = unsafe.Pointer(&_zero)
332478 }
333 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
334 if e1 != 0 {
335 err = errnoErr(e1)
336 }
337 return
338 }
479 _, _, e1 := syscall_syscall(funcPC(libc_msync_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(flags))
480 if e1 != 0 {
481 err = errnoErr(e1)
482 }
483 return
484 }
485
486 func libc_msync_trampoline()
487
488 //go:linkname libc_msync libc_msync
489 //go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib"
339490
340491 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
341492
346497 } else {
347498 _p0 = unsafe.Pointer(&_zero)
348499 }
349 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
350 if e1 != 0 {
351 err = errnoErr(e1)
352 }
353 return
354 }
500 _, _, e1 := syscall_syscall(funcPC(libc_munlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
501 if e1 != 0 {
502 err = errnoErr(e1)
503 }
504 return
505 }
506
507 func libc_munlock_trampoline()
508
509 //go:linkname libc_munlock libc_munlock
510 //go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib"
355511
356512 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
357513
358514 func Munlockall() (err error) {
359 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
360 if e1 != 0 {
361 err = errnoErr(e1)
362 }
363 return
364 }
515 _, _, e1 := syscall_syscall(funcPC(libc_munlockall_trampoline), 0, 0, 0)
516 if e1 != 0 {
517 err = errnoErr(e1)
518 }
519 return
520 }
521
522 func libc_munlockall_trampoline()
523
524 //go:linkname libc_munlockall libc_munlockall
525 //go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib"
365526
366527 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
367528
368529 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
369 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
370 if e1 != 0 {
371 err = errnoErr(e1)
372 }
373 return
374 }
530 _, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
531 if e1 != 0 {
532 err = errnoErr(e1)
533 }
534 return
535 }
536
537 func libc_ptrace_trampoline()
538
539 //go:linkname libc_ptrace libc_ptrace
540 //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
541
542 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
543
544 func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
545 _, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
546 if e1 != 0 {
547 err = errnoErr(e1)
548 }
549 return
550 }
551
552 func libc_getattrlist_trampoline()
553
554 //go:linkname libc_getattrlist libc_getattrlist
555 //go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib"
375556
376557 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
377558
378559 func pipe() (r int, w int, err error) {
379 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
560 r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
380561 r = int(r0)
381562 w = int(r1)
382563 if e1 != 0 {
385566 return
386567 }
387568
569 func libc_pipe_trampoline()
570
571 //go:linkname libc_pipe libc_pipe
572 //go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib"
573
574 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
575
576 func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
577 var _p0 *byte
578 _p0, err = BytePtrFromString(path)
579 if err != nil {
580 return
581 }
582 var _p1 *byte
583 _p1, err = BytePtrFromString(attr)
584 if err != nil {
585 return
586 }
587 r0, _, e1 := syscall_syscall6(funcPC(libc_getxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
588 sz = int(r0)
589 if e1 != 0 {
590 err = errnoErr(e1)
591 }
592 return
593 }
594
595 func libc_getxattr_trampoline()
596
597 //go:linkname libc_getxattr libc_getxattr
598 //go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib"
599
600 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
601
602 func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
603 var _p0 *byte
604 _p0, err = BytePtrFromString(attr)
605 if err != nil {
606 return
607 }
608 r0, _, e1 := syscall_syscall6(funcPC(libc_fgetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
609 sz = int(r0)
610 if e1 != 0 {
611 err = errnoErr(e1)
612 }
613 return
614 }
615
616 func libc_fgetxattr_trampoline()
617
618 //go:linkname libc_fgetxattr libc_fgetxattr
619 //go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib"
620
621 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
622
623 func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
624 var _p0 *byte
625 _p0, err = BytePtrFromString(path)
626 if err != nil {
627 return
628 }
629 var _p1 *byte
630 _p1, err = BytePtrFromString(attr)
631 if err != nil {
632 return
633 }
634 _, _, e1 := syscall_syscall6(funcPC(libc_setxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
635 if e1 != 0 {
636 err = errnoErr(e1)
637 }
638 return
639 }
640
641 func libc_setxattr_trampoline()
642
643 //go:linkname libc_setxattr libc_setxattr
644 //go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib"
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
649 var _p0 *byte
650 _p0, err = BytePtrFromString(attr)
651 if err != nil {
652 return
653 }
654 _, _, e1 := syscall_syscall6(funcPC(libc_fsetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
655 if e1 != 0 {
656 err = errnoErr(e1)
657 }
658 return
659 }
660
661 func libc_fsetxattr_trampoline()
662
663 //go:linkname libc_fsetxattr libc_fsetxattr
664 //go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib"
665
666 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
667
668 func removexattr(path string, attr string, options int) (err error) {
669 var _p0 *byte
670 _p0, err = BytePtrFromString(path)
671 if err != nil {
672 return
673 }
674 var _p1 *byte
675 _p1, err = BytePtrFromString(attr)
676 if err != nil {
677 return
678 }
679 _, _, e1 := syscall_syscall(funcPC(libc_removexattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
680 if e1 != 0 {
681 err = errnoErr(e1)
682 }
683 return
684 }
685
686 func libc_removexattr_trampoline()
687
688 //go:linkname libc_removexattr libc_removexattr
689 //go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib"
690
691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
692
693 func fremovexattr(fd int, attr string, options int) (err error) {
694 var _p0 *byte
695 _p0, err = BytePtrFromString(attr)
696 if err != nil {
697 return
698 }
699 _, _, e1 := syscall_syscall(funcPC(libc_fremovexattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
700 if e1 != 0 {
701 err = errnoErr(e1)
702 }
703 return
704 }
705
706 func libc_fremovexattr_trampoline()
707
708 //go:linkname libc_fremovexattr libc_fremovexattr
709 //go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib"
710
711 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
712
713 func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
714 var _p0 *byte
715 _p0, err = BytePtrFromString(path)
716 if err != nil {
717 return
718 }
719 r0, _, e1 := syscall_syscall6(funcPC(libc_listxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
720 sz = int(r0)
721 if e1 != 0 {
722 err = errnoErr(e1)
723 }
724 return
725 }
726
727 func libc_listxattr_trampoline()
728
729 //go:linkname libc_listxattr libc_listxattr
730 //go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib"
731
732 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
733
734 func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
735 r0, _, e1 := syscall_syscall6(funcPC(libc_flistxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
736 sz = int(r0)
737 if e1 != 0 {
738 err = errnoErr(e1)
739 }
740 return
741 }
742
743 func libc_flistxattr_trampoline()
744
745 //go:linkname libc_flistxattr libc_flistxattr
746 //go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib"
747
748 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
749
750 func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
751 _, _, e1 := syscall_syscall6(funcPC(libc_setattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
752 if e1 != 0 {
753 err = errnoErr(e1)
754 }
755 return
756 }
757
758 func libc_setattrlist_trampoline()
759
760 //go:linkname libc_setattrlist libc_setattrlist
761 //go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
762
388763 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
389764
390765 func kill(pid int, signum int, posix int) (err error) {
391 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
392 if e1 != 0 {
393 err = errnoErr(e1)
394 }
395 return
396 }
766 _, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix))
767 if e1 != 0 {
768 err = errnoErr(e1)
769 }
770 return
771 }
772
773 func libc_kill_trampoline()
774
775 //go:linkname libc_kill libc_kill
776 //go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib"
397777
398778 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
399779
400780 func ioctl(fd int, req uint, arg uintptr) (err error) {
401 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
402 if e1 != 0 {
403 err = errnoErr(e1)
404 }
405 return
406 }
781 _, _, e1 := syscall_syscall(funcPC(libc_ioctl_trampoline), uintptr(fd), uintptr(req), uintptr(arg))
782 if e1 != 0 {
783 err = errnoErr(e1)
784 }
785 return
786 }
787
788 func libc_ioctl_trampoline()
789
790 //go:linkname libc_ioctl libc_ioctl
791 //go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
792
793 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
794
795 func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
796 _, _, e1 := syscall_syscall9(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
797 if e1 != 0 {
798 err = errnoErr(e1)
799 }
800 return
801 }
802
803 func libc_sendfile_trampoline()
804
805 //go:linkname libc_sendfile libc_sendfile
806 //go:cgo_import_dynamic libc_sendfile sendfile "/usr/lib/libSystem.B.dylib"
407807
408808 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
409809
413813 if err != nil {
414814 return
415815 }
416 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
417 if e1 != 0 {
418 err = errnoErr(e1)
419 }
420 return
421 }
816 _, _, e1 := syscall_syscall(funcPC(libc_access_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
817 if e1 != 0 {
818 err = errnoErr(e1)
819 }
820 return
821 }
822
823 func libc_access_trampoline()
824
825 //go:linkname libc_access libc_access
826 //go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib"
422827
423828 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
424829
425830 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
426 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
427 if e1 != 0 {
428 err = errnoErr(e1)
429 }
430 return
431 }
831 _, _, e1 := syscall_syscall(funcPC(libc_adjtime_trampoline), uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
832 if e1 != 0 {
833 err = errnoErr(e1)
834 }
835 return
836 }
837
838 func libc_adjtime_trampoline()
839
840 //go:linkname libc_adjtime libc_adjtime
841 //go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib"
432842
433843 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
434844
438848 if err != nil {
439849 return
440850 }
441 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
442 if e1 != 0 {
443 err = errnoErr(e1)
444 }
445 return
446 }
851 _, _, e1 := syscall_syscall(funcPC(libc_chdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
852 if e1 != 0 {
853 err = errnoErr(e1)
854 }
855 return
856 }
857
858 func libc_chdir_trampoline()
859
860 //go:linkname libc_chdir libc_chdir
861 //go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib"
447862
448863 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
449864
453868 if err != nil {
454869 return
455870 }
456 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
457 if e1 != 0 {
458 err = errnoErr(e1)
459 }
460 return
461 }
871 _, _, e1 := syscall_syscall(funcPC(libc_chflags_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
872 if e1 != 0 {
873 err = errnoErr(e1)
874 }
875 return
876 }
877
878 func libc_chflags_trampoline()
879
880 //go:linkname libc_chflags libc_chflags
881 //go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib"
462882
463883 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
464884
468888 if err != nil {
469889 return
470890 }
471 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
472 if e1 != 0 {
473 err = errnoErr(e1)
474 }
475 return
476 }
891 _, _, e1 := syscall_syscall(funcPC(libc_chmod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
892 if e1 != 0 {
893 err = errnoErr(e1)
894 }
895 return
896 }
897
898 func libc_chmod_trampoline()
899
900 //go:linkname libc_chmod libc_chmod
901 //go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib"
477902
478903 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
479904
483908 if err != nil {
484909 return
485910 }
486 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
487 if e1 != 0 {
488 err = errnoErr(e1)
489 }
490 return
491 }
911 _, _, e1 := syscall_syscall(funcPC(libc_chown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
912 if e1 != 0 {
913 err = errnoErr(e1)
914 }
915 return
916 }
917
918 func libc_chown_trampoline()
919
920 //go:linkname libc_chown libc_chown
921 //go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib"
492922
493923 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
494924
498928 if err != nil {
499929 return
500930 }
501 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
502 if e1 != 0 {
503 err = errnoErr(e1)
504 }
505 return
506 }
931 _, _, e1 := syscall_syscall(funcPC(libc_chroot_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
932 if e1 != 0 {
933 err = errnoErr(e1)
934 }
935 return
936 }
937
938 func libc_chroot_trampoline()
939
940 //go:linkname libc_chroot libc_chroot
941 //go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib"
507942
508943 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
509944
510945 func Close(fd int) (err error) {
511 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
512 if e1 != 0 {
513 err = errnoErr(e1)
514 }
515 return
516 }
946 _, _, e1 := syscall_syscall(funcPC(libc_close_trampoline), uintptr(fd), 0, 0)
947 if e1 != 0 {
948 err = errnoErr(e1)
949 }
950 return
951 }
952
953 func libc_close_trampoline()
954
955 //go:linkname libc_close libc_close
956 //go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib"
517957
518958 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
519959
520960 func Dup(fd int) (nfd int, err error) {
521 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
961 r0, _, e1 := syscall_syscall(funcPC(libc_dup_trampoline), uintptr(fd), 0, 0)
522962 nfd = int(r0)
523963 if e1 != 0 {
524964 err = errnoErr(e1)
526966 return
527967 }
528968
969 func libc_dup_trampoline()
970
971 //go:linkname libc_dup libc_dup
972 //go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib"
973
529974 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
530975
531976 func Dup2(from int, to int) (err error) {
532 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
533 if e1 != 0 {
534 err = errnoErr(e1)
535 }
536 return
537 }
977 _, _, e1 := syscall_syscall(funcPC(libc_dup2_trampoline), uintptr(from), uintptr(to), 0)
978 if e1 != 0 {
979 err = errnoErr(e1)
980 }
981 return
982 }
983
984 func libc_dup2_trampoline()
985
986 //go:linkname libc_dup2 libc_dup2
987 //go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib"
538988
539989 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
540990
549999 if err != nil {
5501000 return
5511001 }
552 _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
553 if e1 != 0 {
554 err = errnoErr(e1)
555 }
556 return
557 }
1002 _, _, e1 := syscall_syscall(funcPC(libc_exchangedata_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
1003 if e1 != 0 {
1004 err = errnoErr(e1)
1005 }
1006 return
1007 }
1008
1009 func libc_exchangedata_trampoline()
1010
1011 //go:linkname libc_exchangedata libc_exchangedata
1012 //go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib"
5581013
5591014 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5601015
5611016 func Exit(code int) {
562 Syscall(SYS_EXIT, uintptr(code), 0, 0)
563 return
564 }
1017 syscall_syscall(funcPC(libc_exit_trampoline), uintptr(code), 0, 0)
1018 return
1019 }
1020
1021 func libc_exit_trampoline()
1022
1023 //go:linkname libc_exit libc_exit
1024 //go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib"
5651025
5661026 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5671027
5711031 if err != nil {
5721032 return
5731033 }
574 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
575 if e1 != 0 {
576 err = errnoErr(e1)
577 }
578 return
579 }
1034 _, _, e1 := syscall_syscall6(funcPC(libc_faccessat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
1035 if e1 != 0 {
1036 err = errnoErr(e1)
1037 }
1038 return
1039 }
1040
1041 func libc_faccessat_trampoline()
1042
1043 //go:linkname libc_faccessat libc_faccessat
1044 //go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib"
5801045
5811046 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5821047
5831048 func Fchdir(fd int) (err error) {
584 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
585 if e1 != 0 {
586 err = errnoErr(e1)
587 }
588 return
589 }
1049 _, _, e1 := syscall_syscall(funcPC(libc_fchdir_trampoline), uintptr(fd), 0, 0)
1050 if e1 != 0 {
1051 err = errnoErr(e1)
1052 }
1053 return
1054 }
1055
1056 func libc_fchdir_trampoline()
1057
1058 //go:linkname libc_fchdir libc_fchdir
1059 //go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib"
5901060
5911061 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5921062
5931063 func Fchflags(fd int, flags int) (err error) {
594 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
595 if e1 != 0 {
596 err = errnoErr(e1)
597 }
598 return
599 }
1064 _, _, e1 := syscall_syscall(funcPC(libc_fchflags_trampoline), uintptr(fd), uintptr(flags), 0)
1065 if e1 != 0 {
1066 err = errnoErr(e1)
1067 }
1068 return
1069 }
1070
1071 func libc_fchflags_trampoline()
1072
1073 //go:linkname libc_fchflags libc_fchflags
1074 //go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib"
6001075
6011076 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6021077
6031078 func Fchmod(fd int, mode uint32) (err error) {
604 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
605 if e1 != 0 {
606 err = errnoErr(e1)
607 }
608 return
609 }
1079 _, _, e1 := syscall_syscall(funcPC(libc_fchmod_trampoline), uintptr(fd), uintptr(mode), 0)
1080 if e1 != 0 {
1081 err = errnoErr(e1)
1082 }
1083 return
1084 }
1085
1086 func libc_fchmod_trampoline()
1087
1088 //go:linkname libc_fchmod libc_fchmod
1089 //go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib"
6101090
6111091 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6121092
6161096 if err != nil {
6171097 return
6181098 }
619 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
620 if e1 != 0 {
621 err = errnoErr(e1)
622 }
623 return
624 }
1099 _, _, e1 := syscall_syscall6(funcPC(libc_fchmodat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 func libc_fchmodat_trampoline()
1107
1108 //go:linkname libc_fchmodat libc_fchmodat
1109 //go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib"
6251110
6261111 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6271112
6281113 func Fchown(fd int, uid int, gid int) (err error) {
629 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
630 if e1 != 0 {
631 err = errnoErr(e1)
632 }
633 return
634 }
1114 _, _, e1 := syscall_syscall(funcPC(libc_fchown_trampoline), uintptr(fd), uintptr(uid), uintptr(gid))
1115 if e1 != 0 {
1116 err = errnoErr(e1)
1117 }
1118 return
1119 }
1120
1121 func libc_fchown_trampoline()
1122
1123 //go:linkname libc_fchown libc_fchown
1124 //go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib"
6351125
6361126 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6371127
6411131 if err != nil {
6421132 return
6431133 }
644 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
645 if e1 != 0 {
646 err = errnoErr(e1)
647 }
648 return
649 }
1134 _, _, e1 := syscall_syscall6(funcPC(libc_fchownat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
1135 if e1 != 0 {
1136 err = errnoErr(e1)
1137 }
1138 return
1139 }
1140
1141 func libc_fchownat_trampoline()
1142
1143 //go:linkname libc_fchownat libc_fchownat
1144 //go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib"
6501145
6511146 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6521147
6531148 func Flock(fd int, how int) (err error) {
654 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
655 if e1 != 0 {
656 err = errnoErr(e1)
657 }
658 return
659 }
1149 _, _, e1 := syscall_syscall(funcPC(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
1150 if e1 != 0 {
1151 err = errnoErr(e1)
1152 }
1153 return
1154 }
1155
1156 func libc_flock_trampoline()
1157
1158 //go:linkname libc_flock libc_flock
1159 //go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib"
6601160
6611161 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6621162
6631163 func Fpathconf(fd int, name int) (val int, err error) {
664 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
1164 r0, _, e1 := syscall_syscall(funcPC(libc_fpathconf_trampoline), uintptr(fd), uintptr(name), 0)
6651165 val = int(r0)
6661166 if e1 != 0 {
6671167 err = errnoErr(e1)
6691169 return
6701170 }
6711171
672 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
673
674 func Fstat(fd int, stat *Stat_t) (err error) {
675 _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
676 if e1 != 0 {
677 err = errnoErr(e1)
678 }
679 return
680 }
681
682 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
683
684 func Fstatfs(fd int, stat *Statfs_t) (err error) {
685 _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
686 if e1 != 0 {
687 err = errnoErr(e1)
688 }
689 return
690 }
1172 func libc_fpathconf_trampoline()
1173
1174 //go:linkname libc_fpathconf libc_fpathconf
1175 //go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib"
6911176
6921177 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6931178
6941179 func Fsync(fd int) (err error) {
695 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
696 if e1 != 0 {
697 err = errnoErr(e1)
698 }
699 return
700 }
1180 _, _, e1 := syscall_syscall(funcPC(libc_fsync_trampoline), uintptr(fd), 0, 0)
1181 if e1 != 0 {
1182 err = errnoErr(e1)
1183 }
1184 return
1185 }
1186
1187 func libc_fsync_trampoline()
1188
1189 //go:linkname libc_fsync libc_fsync
1190 //go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib"
7011191
7021192 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7031193
7041194 func Ftruncate(fd int, length int64) (err error) {
705 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
706 if e1 != 0 {
707 err = errnoErr(e1)
708 }
709 return
710 }
711
712 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
713
714 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
715 var _p0 unsafe.Pointer
716 if len(buf) > 0 {
717 _p0 = unsafe.Pointer(&buf[0])
718 } else {
719 _p0 = unsafe.Pointer(&_zero)
720 }
721 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
722 n = int(r0)
723 if e1 != 0 {
724 err = errnoErr(e1)
725 }
726 return
727 }
1195 _, _, e1 := syscall_syscall(funcPC(libc_ftruncate_trampoline), uintptr(fd), uintptr(length), uintptr(length>>32))
1196 if e1 != 0 {
1197 err = errnoErr(e1)
1198 }
1199 return
1200 }
1201
1202 func libc_ftruncate_trampoline()
1203
1204 //go:linkname libc_ftruncate libc_ftruncate
1205 //go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib"
7281206
7291207 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7301208
7311209 func Getdtablesize() (size int) {
732 r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
1210 r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
7331211 size = int(r0)
7341212 return
7351213 }
7361214
1215 func libc_getdtablesize_trampoline()
1216
1217 //go:linkname libc_getdtablesize libc_getdtablesize
1218 //go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib"
1219
7371220 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7381221
7391222 func Getegid() (egid int) {
740 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
1223 r0, _, _ := syscall_rawSyscall(funcPC(libc_getegid_trampoline), 0, 0, 0)
7411224 egid = int(r0)
7421225 return
7431226 }
7441227
1228 func libc_getegid_trampoline()
1229
1230 //go:linkname libc_getegid libc_getegid
1231 //go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib"
1232
7451233 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7461234
7471235 func Geteuid() (uid int) {
748 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
1236 r0, _, _ := syscall_rawSyscall(funcPC(libc_geteuid_trampoline), 0, 0, 0)
7491237 uid = int(r0)
7501238 return
7511239 }
7521240
1241 func libc_geteuid_trampoline()
1242
1243 //go:linkname libc_geteuid libc_geteuid
1244 //go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib"
1245
7531246 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7541247
7551248 func Getgid() (gid int) {
756 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
1249 r0, _, _ := syscall_rawSyscall(funcPC(libc_getgid_trampoline), 0, 0, 0)
7571250 gid = int(r0)
7581251 return
7591252 }
7601253
1254 func libc_getgid_trampoline()
1255
1256 //go:linkname libc_getgid libc_getgid
1257 //go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib"
1258
7611259 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7621260
7631261 func Getpgid(pid int) (pgid int, err error) {
764 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
1262 r0, _, e1 := syscall_rawSyscall(funcPC(libc_getpgid_trampoline), uintptr(pid), 0, 0)
7651263 pgid = int(r0)
7661264 if e1 != 0 {
7671265 err = errnoErr(e1)
7691267 return
7701268 }
7711269
1270 func libc_getpgid_trampoline()
1271
1272 //go:linkname libc_getpgid libc_getpgid
1273 //go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib"
1274
7721275 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7731276
7741277 func Getpgrp() (pgrp int) {
775 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
1278 r0, _, _ := syscall_rawSyscall(funcPC(libc_getpgrp_trampoline), 0, 0, 0)
7761279 pgrp = int(r0)
7771280 return
7781281 }
7791282
1283 func libc_getpgrp_trampoline()
1284
1285 //go:linkname libc_getpgrp libc_getpgrp
1286 //go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib"
1287
7801288 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7811289
7821290 func Getpid() (pid int) {
783 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
1291 r0, _, _ := syscall_rawSyscall(funcPC(libc_getpid_trampoline), 0, 0, 0)
7841292 pid = int(r0)
7851293 return
7861294 }
7871295
1296 func libc_getpid_trampoline()
1297
1298 //go:linkname libc_getpid libc_getpid
1299 //go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib"
1300
7881301 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7891302
7901303 func Getppid() (ppid int) {
791 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
1304 r0, _, _ := syscall_rawSyscall(funcPC(libc_getppid_trampoline), 0, 0, 0)
7921305 ppid = int(r0)
7931306 return
7941307 }
7951308
1309 func libc_getppid_trampoline()
1310
1311 //go:linkname libc_getppid libc_getppid
1312 //go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib"
1313
7961314 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7971315
7981316 func Getpriority(which int, who int) (prio int, err error) {
799 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
1317 r0, _, e1 := syscall_syscall(funcPC(libc_getpriority_trampoline), uintptr(which), uintptr(who), 0)
8001318 prio = int(r0)
8011319 if e1 != 0 {
8021320 err = errnoErr(e1)
8041322 return
8051323 }
8061324
1325 func libc_getpriority_trampoline()
1326
1327 //go:linkname libc_getpriority libc_getpriority
1328 //go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib"
1329
8071330 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8081331
8091332 func Getrlimit(which int, lim *Rlimit) (err error) {
810 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
811 if e1 != 0 {
812 err = errnoErr(e1)
813 }
814 return
815 }
1333 _, _, e1 := syscall_rawSyscall(funcPC(libc_getrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1334 if e1 != 0 {
1335 err = errnoErr(e1)
1336 }
1337 return
1338 }
1339
1340 func libc_getrlimit_trampoline()
1341
1342 //go:linkname libc_getrlimit libc_getrlimit
1343 //go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib"
8161344
8171345 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8181346
8191347 func Getrusage(who int, rusage *Rusage) (err error) {
820 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
821 if e1 != 0 {
822 err = errnoErr(e1)
823 }
824 return
825 }
1348 _, _, e1 := syscall_rawSyscall(funcPC(libc_getrusage_trampoline), uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
1349 if e1 != 0 {
1350 err = errnoErr(e1)
1351 }
1352 return
1353 }
1354
1355 func libc_getrusage_trampoline()
1356
1357 //go:linkname libc_getrusage libc_getrusage
1358 //go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib"
8261359
8271360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8281361
8291362 func Getsid(pid int) (sid int, err error) {
830 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
1363 r0, _, e1 := syscall_rawSyscall(funcPC(libc_getsid_trampoline), uintptr(pid), 0, 0)
8311364 sid = int(r0)
8321365 if e1 != 0 {
8331366 err = errnoErr(e1)
8351368 return
8361369 }
8371370
1371 func libc_getsid_trampoline()
1372
1373 //go:linkname libc_getsid libc_getsid
1374 //go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib"
1375
8381376 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8391377
8401378 func Getuid() (uid int) {
841 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
1379 r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
8421380 uid = int(r0)
8431381 return
8441382 }
8451383
1384 func libc_getuid_trampoline()
1385
1386 //go:linkname libc_getuid libc_getuid
1387 //go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib"
1388
8461389 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8471390
8481391 func Issetugid() (tainted bool) {
849 r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
1392 r0, _, _ := syscall_rawSyscall(funcPC(libc_issetugid_trampoline), 0, 0, 0)
8501393 tainted = bool(r0 != 0)
8511394 return
8521395 }
8531396
1397 func libc_issetugid_trampoline()
1398
1399 //go:linkname libc_issetugid libc_issetugid
1400 //go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib"
1401
8541402 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8551403
8561404 func Kqueue() (fd int, err error) {
857 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
1405 r0, _, e1 := syscall_syscall(funcPC(libc_kqueue_trampoline), 0, 0, 0)
8581406 fd = int(r0)
8591407 if e1 != 0 {
8601408 err = errnoErr(e1)
8621410 return
8631411 }
8641412
1413 func libc_kqueue_trampoline()
1414
1415 //go:linkname libc_kqueue libc_kqueue
1416 //go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib"
1417
8651418 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8661419
8671420 func Lchown(path string, uid int, gid int) (err error) {
8701423 if err != nil {
8711424 return
8721425 }
873 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
874 if e1 != 0 {
875 err = errnoErr(e1)
876 }
877 return
878 }
1426 _, _, e1 := syscall_syscall(funcPC(libc_lchown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
1427 if e1 != 0 {
1428 err = errnoErr(e1)
1429 }
1430 return
1431 }
1432
1433 func libc_lchown_trampoline()
1434
1435 //go:linkname libc_lchown libc_lchown
1436 //go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib"
8791437
8801438 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8811439
8901448 if err != nil {
8911449 return
8921450 }
893 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
894 if e1 != 0 {
895 err = errnoErr(e1)
896 }
897 return
898 }
1451 _, _, e1 := syscall_syscall(funcPC(libc_link_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1452 if e1 != 0 {
1453 err = errnoErr(e1)
1454 }
1455 return
1456 }
1457
1458 func libc_link_trampoline()
1459
1460 //go:linkname libc_link libc_link
1461 //go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib"
8991462
9001463 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9011464
9101473 if err != nil {
9111474 return
9121475 }
913 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
914 if e1 != 0 {
915 err = errnoErr(e1)
916 }
917 return
918 }
1476 _, _, e1 := syscall_syscall6(funcPC(libc_linkat_trampoline), uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1477 if e1 != 0 {
1478 err = errnoErr(e1)
1479 }
1480 return
1481 }
1482
1483 func libc_linkat_trampoline()
1484
1485 //go:linkname libc_linkat libc_linkat
1486 //go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib"
9191487
9201488 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9211489
9221490 func Listen(s int, backlog int) (err error) {
923 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
924 if e1 != 0 {
925 err = errnoErr(e1)
926 }
927 return
928 }
929
930 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
931
932 func Lstat(path string, stat *Stat_t) (err error) {
933 var _p0 *byte
934 _p0, err = BytePtrFromString(path)
935 if err != nil {
936 return
937 }
938 _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
939 if e1 != 0 {
940 err = errnoErr(e1)
941 }
942 return
943 }
1491 _, _, e1 := syscall_syscall(funcPC(libc_listen_trampoline), uintptr(s), uintptr(backlog), 0)
1492 if e1 != 0 {
1493 err = errnoErr(e1)
1494 }
1495 return
1496 }
1497
1498 func libc_listen_trampoline()
1499
1500 //go:linkname libc_listen libc_listen
1501 //go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib"
9441502
9451503 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9461504
9501508 if err != nil {
9511509 return
9521510 }
953 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
954 if e1 != 0 {
955 err = errnoErr(e1)
956 }
957 return
958 }
1511 _, _, e1 := syscall_syscall(funcPC(libc_mkdir_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1512 if e1 != 0 {
1513 err = errnoErr(e1)
1514 }
1515 return
1516 }
1517
1518 func libc_mkdir_trampoline()
1519
1520 //go:linkname libc_mkdir libc_mkdir
1521 //go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib"
9591522
9601523 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9611524
9651528 if err != nil {
9661529 return
9671530 }
968 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
969 if e1 != 0 {
970 err = errnoErr(e1)
971 }
972 return
973 }
1531 _, _, e1 := syscall_syscall(funcPC(libc_mkdirat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1532 if e1 != 0 {
1533 err = errnoErr(e1)
1534 }
1535 return
1536 }
1537
1538 func libc_mkdirat_trampoline()
1539
1540 //go:linkname libc_mkdirat libc_mkdirat
1541 //go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib"
9741542
9751543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9761544
9801548 if err != nil {
9811549 return
9821550 }
983 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
984 if e1 != 0 {
985 err = errnoErr(e1)
986 }
987 return
988 }
1551 _, _, e1 := syscall_syscall(funcPC(libc_mkfifo_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1552 if e1 != 0 {
1553 err = errnoErr(e1)
1554 }
1555 return
1556 }
1557
1558 func libc_mkfifo_trampoline()
1559
1560 //go:linkname libc_mkfifo libc_mkfifo
1561 //go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib"
9891562
9901563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9911564
9951568 if err != nil {
9961569 return
9971570 }
998 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
999 if e1 != 0 {
1000 err = errnoErr(e1)
1001 }
1002 return
1003 }
1571 _, _, e1 := syscall_syscall(funcPC(libc_mknod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1572 if e1 != 0 {
1573 err = errnoErr(e1)
1574 }
1575 return
1576 }
1577
1578 func libc_mknod_trampoline()
1579
1580 //go:linkname libc_mknod libc_mknod
1581 //go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib"
10041582
10051583 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10061584
10101588 if err != nil {
10111589 return
10121590 }
1013 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1591 r0, _, e1 := syscall_syscall(funcPC(libc_open_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
10141592 fd = int(r0)
10151593 if e1 != 0 {
10161594 err = errnoErr(e1)
10181596 return
10191597 }
10201598
1599 func libc_open_trampoline()
1600
1601 //go:linkname libc_open libc_open
1602 //go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib"
1603
10211604 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10221605
10231606 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
10261609 if err != nil {
10271610 return
10281611 }
1029 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
1612 r0, _, e1 := syscall_syscall6(funcPC(libc_openat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
10301613 fd = int(r0)
10311614 if e1 != 0 {
10321615 err = errnoErr(e1)
10341617 return
10351618 }
10361619
1620 func libc_openat_trampoline()
1621
1622 //go:linkname libc_openat libc_openat
1623 //go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib"
1624
10371625 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10381626
10391627 func Pathconf(path string, name int) (val int, err error) {
10421630 if err != nil {
10431631 return
10441632 }
1045 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1633 r0, _, e1 := syscall_syscall(funcPC(libc_pathconf_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
10461634 val = int(r0)
10471635 if e1 != 0 {
10481636 err = errnoErr(e1)
10491637 }
10501638 return
10511639 }
1640
1641 func libc_pathconf_trampoline()
1642
1643 //go:linkname libc_pathconf libc_pathconf
1644 //go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib"
10521645
10531646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10541647
10591652 } else {
10601653 _p0 = unsafe.Pointer(&_zero)
10611654 }
1062 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
1655 r0, _, e1 := syscall_syscall6(funcPC(libc_pread_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
10631656 n = int(r0)
10641657 if e1 != 0 {
10651658 err = errnoErr(e1)
10661659 }
10671660 return
10681661 }
1662
1663 func libc_pread_trampoline()
1664
1665 //go:linkname libc_pread libc_pread
1666 //go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib"
10691667
10701668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10711669
10761674 } else {
10771675 _p0 = unsafe.Pointer(&_zero)
10781676 }
1079 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
1677 r0, _, e1 := syscall_syscall6(funcPC(libc_pwrite_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
10801678 n = int(r0)
10811679 if e1 != 0 {
10821680 err = errnoErr(e1)
10831681 }
10841682 return
10851683 }
1684
1685 func libc_pwrite_trampoline()
1686
1687 //go:linkname libc_pwrite libc_pwrite
1688 //go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib"
10861689
10871690 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10881691
10931696 } else {
10941697 _p0 = unsafe.Pointer(&_zero)
10951698 }
1096 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1699 r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
10971700 n = int(r0)
10981701 if e1 != 0 {
10991702 err = errnoErr(e1)
11001703 }
11011704 return
11021705 }
1706
1707 func libc_read_trampoline()
1708
1709 //go:linkname libc_read libc_read
1710 //go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib"
11031711
11041712 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11051713
11151723 } else {
11161724 _p1 = unsafe.Pointer(&_zero)
11171725 }
1118 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1726 r0, _, e1 := syscall_syscall(funcPC(libc_readlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
11191727 n = int(r0)
11201728 if e1 != 0 {
11211729 err = errnoErr(e1)
11221730 }
11231731 return
11241732 }
1733
1734 func libc_readlink_trampoline()
1735
1736 //go:linkname libc_readlink libc_readlink
1737 //go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib"
11251738
11261739 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11271740
11371750 } else {
11381751 _p1 = unsafe.Pointer(&_zero)
11391752 }
1140 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1753 r0, _, e1 := syscall_syscall6(funcPC(libc_readlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
11411754 n = int(r0)
11421755 if e1 != 0 {
11431756 err = errnoErr(e1)
11441757 }
11451758 return
11461759 }
1760
1761 func libc_readlinkat_trampoline()
1762
1763 //go:linkname libc_readlinkat libc_readlinkat
1764 //go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib"
11471765
11481766 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11491767
11581776 if err != nil {
11591777 return
11601778 }
1161 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1162 if e1 != 0 {
1163 err = errnoErr(e1)
1164 }
1165 return
1166 }
1779 _, _, e1 := syscall_syscall(funcPC(libc_rename_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1780 if e1 != 0 {
1781 err = errnoErr(e1)
1782 }
1783 return
1784 }
1785
1786 func libc_rename_trampoline()
1787
1788 //go:linkname libc_rename libc_rename
1789 //go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib"
11671790
11681791 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11691792
11781801 if err != nil {
11791802 return
11801803 }
1181 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1182 if e1 != 0 {
1183 err = errnoErr(e1)
1184 }
1185 return
1186 }
1804 _, _, e1 := syscall_syscall6(funcPC(libc_renameat_trampoline), uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1805 if e1 != 0 {
1806 err = errnoErr(e1)
1807 }
1808 return
1809 }
1810
1811 func libc_renameat_trampoline()
1812
1813 //go:linkname libc_renameat libc_renameat
1814 //go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib"
11871815
11881816 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11891817
11931821 if err != nil {
11941822 return
11951823 }
1196 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1197 if e1 != 0 {
1198 err = errnoErr(e1)
1199 }
1200 return
1201 }
1824 _, _, e1 := syscall_syscall(funcPC(libc_revoke_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1825 if e1 != 0 {
1826 err = errnoErr(e1)
1827 }
1828 return
1829 }
1830
1831 func libc_revoke_trampoline()
1832
1833 //go:linkname libc_revoke libc_revoke
1834 //go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib"
12021835
12031836 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12041837
12081841 if err != nil {
12091842 return
12101843 }
1211 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
1212 if e1 != 0 {
1213 err = errnoErr(e1)
1214 }
1215 return
1216 }
1844 _, _, e1 := syscall_syscall(funcPC(libc_rmdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1845 if e1 != 0 {
1846 err = errnoErr(e1)
1847 }
1848 return
1849 }
1850
1851 func libc_rmdir_trampoline()
1852
1853 //go:linkname libc_rmdir libc_rmdir
1854 //go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib"
12171855
12181856 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12191857
12201858 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1221 r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
1859 r0, r1, e1 := syscall_syscall6(funcPC(libc_lseek_trampoline), uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
12221860 newoffset = int64(int64(r1)<<32 | int64(r0))
12231861 if e1 != 0 {
12241862 err = errnoErr(e1)
12261864 return
12271865 }
12281866
1867 func libc_lseek_trampoline()
1868
1869 //go:linkname libc_lseek libc_lseek
1870 //go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib"
1871
12291872 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12301873
12311874 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1232 _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1233 if e1 != 0 {
1234 err = errnoErr(e1)
1235 }
1236 return
1237 }
1875 _, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1876 if e1 != 0 {
1877 err = errnoErr(e1)
1878 }
1879 return
1880 }
1881
1882 func libc_select_trampoline()
1883
1884 //go:linkname libc_select libc_select
1885 //go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib"
12381886
12391887 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12401888
12411889 func Setegid(egid int) (err error) {
1242 _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
1243 if e1 != 0 {
1244 err = errnoErr(e1)
1245 }
1246 return
1247 }
1890 _, _, e1 := syscall_syscall(funcPC(libc_setegid_trampoline), uintptr(egid), 0, 0)
1891 if e1 != 0 {
1892 err = errnoErr(e1)
1893 }
1894 return
1895 }
1896
1897 func libc_setegid_trampoline()
1898
1899 //go:linkname libc_setegid libc_setegid
1900 //go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib"
12481901
12491902 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12501903
12511904 func Seteuid(euid int) (err error) {
1252 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
1253 if e1 != 0 {
1254 err = errnoErr(e1)
1255 }
1256 return
1257 }
1905 _, _, e1 := syscall_rawSyscall(funcPC(libc_seteuid_trampoline), uintptr(euid), 0, 0)
1906 if e1 != 0 {
1907 err = errnoErr(e1)
1908 }
1909 return
1910 }
1911
1912 func libc_seteuid_trampoline()
1913
1914 //go:linkname libc_seteuid libc_seteuid
1915 //go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib"
12581916
12591917 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12601918
12611919 func Setgid(gid int) (err error) {
1262 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
1263 if e1 != 0 {
1264 err = errnoErr(e1)
1265 }
1266 return
1267 }
1920 _, _, e1 := syscall_rawSyscall(funcPC(libc_setgid_trampoline), uintptr(gid), 0, 0)
1921 if e1 != 0 {
1922 err = errnoErr(e1)
1923 }
1924 return
1925 }
1926
1927 func libc_setgid_trampoline()
1928
1929 //go:linkname libc_setgid libc_setgid
1930 //go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib"
12681931
12691932 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12701933
12741937 if err != nil {
12751938 return
12761939 }
1277 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
1278 if e1 != 0 {
1279 err = errnoErr(e1)
1280 }
1281 return
1282 }
1940 _, _, e1 := syscall_syscall(funcPC(libc_setlogin_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1941 if e1 != 0 {
1942 err = errnoErr(e1)
1943 }
1944 return
1945 }
1946
1947 func libc_setlogin_trampoline()
1948
1949 //go:linkname libc_setlogin libc_setlogin
1950 //go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib"
12831951
12841952 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12851953
12861954 func Setpgid(pid int, pgid int) (err error) {
1287 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
1288 if e1 != 0 {
1289 err = errnoErr(e1)
1290 }
1291 return
1292 }
1955 _, _, e1 := syscall_rawSyscall(funcPC(libc_setpgid_trampoline), uintptr(pid), uintptr(pgid), 0)
1956 if e1 != 0 {
1957 err = errnoErr(e1)
1958 }
1959 return
1960 }
1961
1962 func libc_setpgid_trampoline()
1963
1964 //go:linkname libc_setpgid libc_setpgid
1965 //go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib"
12931966
12941967 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12951968
12961969 func Setpriority(which int, who int, prio int) (err error) {
1297 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
1298 if e1 != 0 {
1299 err = errnoErr(e1)
1300 }
1301 return
1302 }
1970 _, _, e1 := syscall_syscall(funcPC(libc_setpriority_trampoline), uintptr(which), uintptr(who), uintptr(prio))
1971 if e1 != 0 {
1972 err = errnoErr(e1)
1973 }
1974 return
1975 }
1976
1977 func libc_setpriority_trampoline()
1978
1979 //go:linkname libc_setpriority libc_setpriority
1980 //go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib"
13031981
13041982 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13051983
13061984 func Setprivexec(flag int) (err error) {
1307 _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
1308 if e1 != 0 {
1309 err = errnoErr(e1)
1310 }
1311 return
1312 }
1985 _, _, e1 := syscall_syscall(funcPC(libc_setprivexec_trampoline), uintptr(flag), 0, 0)
1986 if e1 != 0 {
1987 err = errnoErr(e1)
1988 }
1989 return
1990 }
1991
1992 func libc_setprivexec_trampoline()
1993
1994 //go:linkname libc_setprivexec libc_setprivexec
1995 //go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib"
13131996
13141997 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13151998
13161999 func Setregid(rgid int, egid int) (err error) {
1317 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
1318 if e1 != 0 {
1319 err = errnoErr(e1)
1320 }
1321 return
1322 }
2000 _, _, e1 := syscall_rawSyscall(funcPC(libc_setregid_trampoline), uintptr(rgid), uintptr(egid), 0)
2001 if e1 != 0 {
2002 err = errnoErr(e1)
2003 }
2004 return
2005 }
2006
2007 func libc_setregid_trampoline()
2008
2009 //go:linkname libc_setregid libc_setregid
2010 //go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib"
13232011
13242012 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13252013
13262014 func Setreuid(ruid int, euid int) (err error) {
1327 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
1328 if e1 != 0 {
1329 err = errnoErr(e1)
1330 }
1331 return
1332 }
2015 _, _, e1 := syscall_rawSyscall(funcPC(libc_setreuid_trampoline), uintptr(ruid), uintptr(euid), 0)
2016 if e1 != 0 {
2017 err = errnoErr(e1)
2018 }
2019 return
2020 }
2021
2022 func libc_setreuid_trampoline()
2023
2024 //go:linkname libc_setreuid libc_setreuid
2025 //go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib"
13332026
13342027 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13352028
13362029 func Setrlimit(which int, lim *Rlimit) (err error) {
1337 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1338 if e1 != 0 {
1339 err = errnoErr(e1)
1340 }
1341 return
1342 }
2030 _, _, e1 := syscall_rawSyscall(funcPC(libc_setrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
2031 if e1 != 0 {
2032 err = errnoErr(e1)
2033 }
2034 return
2035 }
2036
2037 func libc_setrlimit_trampoline()
2038
2039 //go:linkname libc_setrlimit libc_setrlimit
2040 //go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
13432041
13442042 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13452043
13462044 func Setsid() (pid int, err error) {
1347 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
2045 r0, _, e1 := syscall_rawSyscall(funcPC(libc_setsid_trampoline), 0, 0, 0)
13482046 pid = int(r0)
13492047 if e1 != 0 {
13502048 err = errnoErr(e1)
13522050 return
13532051 }
13542052
2053 func libc_setsid_trampoline()
2054
2055 //go:linkname libc_setsid libc_setsid
2056 //go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib"
2057
13552058 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13562059
13572060 func Settimeofday(tp *Timeval) (err error) {
1358 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1359 if e1 != 0 {
1360 err = errnoErr(e1)
1361 }
1362 return
1363 }
2061 _, _, e1 := syscall_rawSyscall(funcPC(libc_settimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
2062 if e1 != 0 {
2063 err = errnoErr(e1)
2064 }
2065 return
2066 }
2067
2068 func libc_settimeofday_trampoline()
2069
2070 //go:linkname libc_settimeofday libc_settimeofday
2071 //go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib"
13642072
13652073 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13662074
13672075 func Setuid(uid int) (err error) {
1368 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
1369 if e1 != 0 {
1370 err = errnoErr(e1)
1371 }
1372 return
1373 }
1374
1375 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1376
1377 func Stat(path string, stat *Stat_t) (err error) {
1378 var _p0 *byte
1379 _p0, err = BytePtrFromString(path)
1380 if err != nil {
1381 return
1382 }
1383 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1384 if e1 != 0 {
1385 err = errnoErr(e1)
1386 }
1387 return
1388 }
1389
1390 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1391
1392 func Statfs(path string, stat *Statfs_t) (err error) {
1393 var _p0 *byte
1394 _p0, err = BytePtrFromString(path)
1395 if err != nil {
1396 return
1397 }
1398 _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1399 if e1 != 0 {
1400 err = errnoErr(e1)
1401 }
1402 return
1403 }
2076 _, _, e1 := syscall_rawSyscall(funcPC(libc_setuid_trampoline), uintptr(uid), 0, 0)
2077 if e1 != 0 {
2078 err = errnoErr(e1)
2079 }
2080 return
2081 }
2082
2083 func libc_setuid_trampoline()
2084
2085 //go:linkname libc_setuid libc_setuid
2086 //go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib"
14042087
14052088 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14062089
14152098 if err != nil {
14162099 return
14172100 }
1418 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1419 if e1 != 0 {
1420 err = errnoErr(e1)
1421 }
1422 return
1423 }
2101 _, _, e1 := syscall_syscall(funcPC(libc_symlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
2102 if e1 != 0 {
2103 err = errnoErr(e1)
2104 }
2105 return
2106 }
2107
2108 func libc_symlink_trampoline()
2109
2110 //go:linkname libc_symlink libc_symlink
2111 //go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib"
14242112
14252113 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14262114
14352123 if err != nil {
14362124 return
14372125 }
1438 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1439 if e1 != 0 {
1440 err = errnoErr(e1)
1441 }
1442 return
1443 }
2126 _, _, e1 := syscall_syscall(funcPC(libc_symlinkat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
2127 if e1 != 0 {
2128 err = errnoErr(e1)
2129 }
2130 return
2131 }
2132
2133 func libc_symlinkat_trampoline()
2134
2135 //go:linkname libc_symlinkat libc_symlinkat
2136 //go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib"
14442137
14452138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14462139
14472140 func Sync() (err error) {
1448 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
1449 if e1 != 0 {
1450 err = errnoErr(e1)
1451 }
1452 return
1453 }
2141 _, _, e1 := syscall_syscall(funcPC(libc_sync_trampoline), 0, 0, 0)
2142 if e1 != 0 {
2143 err = errnoErr(e1)
2144 }
2145 return
2146 }
2147
2148 func libc_sync_trampoline()
2149
2150 //go:linkname libc_sync libc_sync
2151 //go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib"
14542152
14552153 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14562154
14602158 if err != nil {
14612159 return
14622160 }
1463 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
1464 if e1 != 0 {
1465 err = errnoErr(e1)
1466 }
1467 return
1468 }
2161 _, _, e1 := syscall_syscall(funcPC(libc_truncate_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
2162 if e1 != 0 {
2163 err = errnoErr(e1)
2164 }
2165 return
2166 }
2167
2168 func libc_truncate_trampoline()
2169
2170 //go:linkname libc_truncate libc_truncate
2171 //go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib"
14692172
14702173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14712174
14722175 func Umask(newmask int) (oldmask int) {
1473 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
2176 r0, _, _ := syscall_syscall(funcPC(libc_umask_trampoline), uintptr(newmask), 0, 0)
14742177 oldmask = int(r0)
14752178 return
14762179 }
14772180
2181 func libc_umask_trampoline()
2182
2183 //go:linkname libc_umask libc_umask
2184 //go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib"
2185
14782186 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14792187
14802188 func Undelete(path string) (err error) {
14832191 if err != nil {
14842192 return
14852193 }
1486 _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1487 if e1 != 0 {
1488 err = errnoErr(e1)
1489 }
1490 return
1491 }
2194 _, _, e1 := syscall_syscall(funcPC(libc_undelete_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
2195 if e1 != 0 {
2196 err = errnoErr(e1)
2197 }
2198 return
2199 }
2200
2201 func libc_undelete_trampoline()
2202
2203 //go:linkname libc_undelete libc_undelete
2204 //go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib"
14922205
14932206 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14942207
14982211 if err != nil {
14992212 return
15002213 }
1501 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1502 if e1 != 0 {
1503 err = errnoErr(e1)
1504 }
1505 return
1506 }
2214 _, _, e1 := syscall_syscall(funcPC(libc_unlink_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
2215 if e1 != 0 {
2216 err = errnoErr(e1)
2217 }
2218 return
2219 }
2220
2221 func libc_unlink_trampoline()
2222
2223 //go:linkname libc_unlink libc_unlink
2224 //go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib"
15072225
15082226 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15092227
15132231 if err != nil {
15142232 return
15152233 }
1516 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
1517 if e1 != 0 {
1518 err = errnoErr(e1)
1519 }
1520 return
1521 }
2234 _, _, e1 := syscall_syscall(funcPC(libc_unlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
2235 if e1 != 0 {
2236 err = errnoErr(e1)
2237 }
2238 return
2239 }
2240
2241 func libc_unlinkat_trampoline()
2242
2243 //go:linkname libc_unlinkat libc_unlinkat
2244 //go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib"
15222245
15232246 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15242247
15282251 if err != nil {
15292252 return
15302253 }
1531 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1532 if e1 != 0 {
1533 err = errnoErr(e1)
1534 }
1535 return
1536 }
2254 _, _, e1 := syscall_syscall(funcPC(libc_unmount_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
2255 if e1 != 0 {
2256 err = errnoErr(e1)
2257 }
2258 return
2259 }
2260
2261 func libc_unmount_trampoline()
2262
2263 //go:linkname libc_unmount libc_unmount
2264 //go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib"
15372265
15382266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15392267
15442272 } else {
15452273 _p0 = unsafe.Pointer(&_zero)
15462274 }
1547 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
2275 r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
15482276 n = int(r0)
15492277 if e1 != 0 {
15502278 err = errnoErr(e1)
15522280 return
15532281 }
15542282
2283 func libc_write_trampoline()
2284
2285 //go:linkname libc_write libc_write
2286 //go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib"
2287
15552288 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15562289
15572290 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
1558 r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
2291 r0, _, e1 := syscall_syscall9(funcPC(libc_mmap_trampoline), uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
15592292 ret = uintptr(r0)
15602293 if e1 != 0 {
15612294 err = errnoErr(e1)
15632296 return
15642297 }
15652298
2299 func libc_mmap_trampoline()
2300
2301 //go:linkname libc_mmap libc_mmap
2302 //go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib"
2303
15662304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15672305
15682306 func munmap(addr uintptr, length uintptr) (err error) {
1569 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
1570 if e1 != 0 {
1571 err = errnoErr(e1)
1572 }
1573 return
1574 }
2307 _, _, e1 := syscall_syscall(funcPC(libc_munmap_trampoline), uintptr(addr), uintptr(length), 0)
2308 if e1 != 0 {
2309 err = errnoErr(e1)
2310 }
2311 return
2312 }
2313
2314 func libc_munmap_trampoline()
2315
2316 //go:linkname libc_munmap libc_munmap
2317 //go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib"
15752318
15762319 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15772320
15782321 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
1579 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
2322 r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
15802323 n = int(r0)
15812324 if e1 != 0 {
15822325 err = errnoErr(e1)
15872330 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15882331
15892332 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
1590 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
2333 r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
15912334 n = int(r0)
15922335 if e1 != 0 {
15932336 err = errnoErr(e1)
15982341 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15992342
16002343 func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
1601 r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
2344 r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
16022345 sec = int32(r0)
16032346 usec = int32(r1)
16042347 if e1 != 0 {
16062349 }
16072350 return
16082351 }
2352
2353 func libc_gettimeofday_trampoline()
2354
2355 //go:linkname libc_gettimeofday libc_gettimeofday
2356 //go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
2357
2358 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2359
2360 func Fstat(fd int, stat *Stat_t) (err error) {
2361 _, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
2362 if e1 != 0 {
2363 err = errnoErr(e1)
2364 }
2365 return
2366 }
2367
2368 func libc_fstat_trampoline()
2369
2370 //go:linkname libc_fstat libc_fstat
2371 //go:cgo_import_dynamic libc_fstat fstat "/usr/lib/libSystem.B.dylib"
2372
2373 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2374
2375 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
2376 var _p0 *byte
2377 _p0, err = BytePtrFromString(path)
2378 if err != nil {
2379 return
2380 }
2381 _, _, e1 := syscall_syscall6(funcPC(libc_fstatat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
2382 if e1 != 0 {
2383 err = errnoErr(e1)
2384 }
2385 return
2386 }
2387
2388 func libc_fstatat_trampoline()
2389
2390 //go:linkname libc_fstatat libc_fstatat
2391 //go:cgo_import_dynamic libc_fstatat fstatat "/usr/lib/libSystem.B.dylib"
2392
2393 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2394
2395 func Fstatfs(fd int, stat *Statfs_t) (err error) {
2396 _, _, e1 := syscall_syscall(funcPC(libc_fstatfs_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
2397 if e1 != 0 {
2398 err = errnoErr(e1)
2399 }
2400 return
2401 }
2402
2403 func libc_fstatfs_trampoline()
2404
2405 //go:linkname libc_fstatfs libc_fstatfs
2406 //go:cgo_import_dynamic libc_fstatfs fstatfs "/usr/lib/libSystem.B.dylib"
2407
2408 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2409
2410 func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
2411 r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
2412 n = int(r0)
2413 if e1 != 0 {
2414 err = errnoErr(e1)
2415 }
2416 return
2417 }
2418
2419 func libc_getfsstat_trampoline()
2420
2421 //go:linkname libc_getfsstat libc_getfsstat
2422 //go:cgo_import_dynamic libc_getfsstat getfsstat "/usr/lib/libSystem.B.dylib"
2423
2424 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2425
2426 func Lstat(path string, stat *Stat_t) (err error) {
2427 var _p0 *byte
2428 _p0, err = BytePtrFromString(path)
2429 if err != nil {
2430 return
2431 }
2432 _, _, e1 := syscall_syscall(funcPC(libc_lstat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2433 if e1 != 0 {
2434 err = errnoErr(e1)
2435 }
2436 return
2437 }
2438
2439 func libc_lstat_trampoline()
2440
2441 //go:linkname libc_lstat libc_lstat
2442 //go:cgo_import_dynamic libc_lstat lstat "/usr/lib/libSystem.B.dylib"
2443
2444 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2445
2446 func Stat(path string, stat *Stat_t) (err error) {
2447 var _p0 *byte
2448 _p0, err = BytePtrFromString(path)
2449 if err != nil {
2450 return
2451 }
2452 _, _, e1 := syscall_syscall(funcPC(libc_stat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2453 if e1 != 0 {
2454 err = errnoErr(e1)
2455 }
2456 return
2457 }
2458
2459 func libc_stat_trampoline()
2460
2461 //go:linkname libc_stat libc_stat
2462 //go:cgo_import_dynamic libc_stat stat "/usr/lib/libSystem.B.dylib"
2463
2464 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2465
2466 func Statfs(path string, stat *Statfs_t) (err error) {
2467 var _p0 *byte
2468 _p0, err = BytePtrFromString(path)
2469 if err != nil {
2470 return
2471 }
2472 _, _, e1 := syscall_syscall(funcPC(libc_statfs_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2473 if e1 != 0 {
2474 err = errnoErr(e1)
2475 }
2476 return
2477 }
2478
2479 func libc_statfs_trampoline()
2480
2481 //go:linkname libc_statfs libc_statfs
2482 //go:cgo_import_dynamic libc_statfs statfs "/usr/lib/libSystem.B.dylib"
0 // go run mkasm_darwin.go arm
1 // Code generated by the command above; DO NOT EDIT.
2
3 // +build go1.12
4
5 #include "textflag.h"
6 TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
7 JMP libc_getgroups(SB)
8 TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
9 JMP libc_setgroups(SB)
10 TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
11 JMP libc_wait4(SB)
12 TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
13 JMP libc_accept(SB)
14 TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
15 JMP libc_bind(SB)
16 TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
17 JMP libc_connect(SB)
18 TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
19 JMP libc_socket(SB)
20 TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
21 JMP libc_getsockopt(SB)
22 TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
23 JMP libc_setsockopt(SB)
24 TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
25 JMP libc_getpeername(SB)
26 TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
27 JMP libc_getsockname(SB)
28 TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
29 JMP libc_shutdown(SB)
30 TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
31 JMP libc_socketpair(SB)
32 TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
33 JMP libc_recvfrom(SB)
34 TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
35 JMP libc_sendto(SB)
36 TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
37 JMP libc_recvmsg(SB)
38 TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
39 JMP libc_sendmsg(SB)
40 TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
41 JMP libc_kevent(SB)
42 TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
43 JMP libc___sysctl(SB)
44 TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
45 JMP libc_utimes(SB)
46 TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
47 JMP libc_futimes(SB)
48 TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
49 JMP libc_fcntl(SB)
50 TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
51 JMP libc_poll(SB)
52 TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
53 JMP libc_madvise(SB)
54 TEXT ·libc_mlock_trampoline(SB),NOSPLIT,$0-0
55 JMP libc_mlock(SB)
56 TEXT ·libc_mlockall_trampoline(SB),NOSPLIT,$0-0
57 JMP libc_mlockall(SB)
58 TEXT ·libc_mprotect_trampoline(SB),NOSPLIT,$0-0
59 JMP libc_mprotect(SB)
60 TEXT ·libc_msync_trampoline(SB),NOSPLIT,$0-0
61 JMP libc_msync(SB)
62 TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
63 JMP libc_munlock(SB)
64 TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
65 JMP libc_munlockall(SB)
66 TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
67 JMP libc_ptrace(SB)
68 TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
69 JMP libc_getattrlist(SB)
70 TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
71 JMP libc_pipe(SB)
72 TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
73 JMP libc_getxattr(SB)
74 TEXT ·libc_fgetxattr_trampoline(SB),NOSPLIT,$0-0
75 JMP libc_fgetxattr(SB)
76 TEXT ·libc_setxattr_trampoline(SB),NOSPLIT,$0-0
77 JMP libc_setxattr(SB)
78 TEXT ·libc_fsetxattr_trampoline(SB),NOSPLIT,$0-0
79 JMP libc_fsetxattr(SB)
80 TEXT ·libc_removexattr_trampoline(SB),NOSPLIT,$0-0
81 JMP libc_removexattr(SB)
82 TEXT ·libc_fremovexattr_trampoline(SB),NOSPLIT,$0-0
83 JMP libc_fremovexattr(SB)
84 TEXT ·libc_listxattr_trampoline(SB),NOSPLIT,$0-0
85 JMP libc_listxattr(SB)
86 TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
87 JMP libc_flistxattr(SB)
88 TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
89 JMP libc_setattrlist(SB)
90 TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
91 JMP libc_kill(SB)
92 TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
93 JMP libc_ioctl(SB)
94 TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
95 JMP libc_sendfile(SB)
96 TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
97 JMP libc_access(SB)
98 TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
99 JMP libc_adjtime(SB)
100 TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
101 JMP libc_chdir(SB)
102 TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
103 JMP libc_chflags(SB)
104 TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
105 JMP libc_chmod(SB)
106 TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
107 JMP libc_chown(SB)
108 TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
109 JMP libc_chroot(SB)
110 TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
111 JMP libc_close(SB)
112 TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
113 JMP libc_dup(SB)
114 TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
115 JMP libc_dup2(SB)
116 TEXT ·libc_exchangedata_trampoline(SB),NOSPLIT,$0-0
117 JMP libc_exchangedata(SB)
118 TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
119 JMP libc_exit(SB)
120 TEXT ·libc_faccessat_trampoline(SB),NOSPLIT,$0-0
121 JMP libc_faccessat(SB)
122 TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
123 JMP libc_fchdir(SB)
124 TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
125 JMP libc_fchflags(SB)
126 TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
127 JMP libc_fchmod(SB)
128 TEXT ·libc_fchmodat_trampoline(SB),NOSPLIT,$0-0
129 JMP libc_fchmodat(SB)
130 TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
131 JMP libc_fchown(SB)
132 TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
133 JMP libc_fchownat(SB)
134 TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
135 JMP libc_flock(SB)
136 TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
137 JMP libc_fpathconf(SB)
138 TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
139 JMP libc_fsync(SB)
140 TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
141 JMP libc_ftruncate(SB)
142 TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
143 JMP libc_getdtablesize(SB)
144 TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
145 JMP libc_getegid(SB)
146 TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
147 JMP libc_geteuid(SB)
148 TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
149 JMP libc_getgid(SB)
150 TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
151 JMP libc_getpgid(SB)
152 TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
153 JMP libc_getpgrp(SB)
154 TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
155 JMP libc_getpid(SB)
156 TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
157 JMP libc_getppid(SB)
158 TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
159 JMP libc_getpriority(SB)
160 TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
161 JMP libc_getrlimit(SB)
162 TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
163 JMP libc_getrusage(SB)
164 TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
165 JMP libc_getsid(SB)
166 TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
167 JMP libc_getuid(SB)
168 TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
169 JMP libc_issetugid(SB)
170 TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
171 JMP libc_kqueue(SB)
172 TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
173 JMP libc_lchown(SB)
174 TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
175 JMP libc_link(SB)
176 TEXT ·libc_linkat_trampoline(SB),NOSPLIT,$0-0
177 JMP libc_linkat(SB)
178 TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
179 JMP libc_listen(SB)
180 TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
181 JMP libc_mkdir(SB)
182 TEXT ·libc_mkdirat_trampoline(SB),NOSPLIT,$0-0
183 JMP libc_mkdirat(SB)
184 TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
185 JMP libc_mkfifo(SB)
186 TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
187 JMP libc_mknod(SB)
188 TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
189 JMP libc_open(SB)
190 TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
191 JMP libc_openat(SB)
192 TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
193 JMP libc_pathconf(SB)
194 TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
195 JMP libc_pread(SB)
196 TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
197 JMP libc_pwrite(SB)
198 TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
199 JMP libc_read(SB)
200 TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
201 JMP libc_readlink(SB)
202 TEXT ·libc_readlinkat_trampoline(SB),NOSPLIT,$0-0
203 JMP libc_readlinkat(SB)
204 TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
205 JMP libc_rename(SB)
206 TEXT ·libc_renameat_trampoline(SB),NOSPLIT,$0-0
207 JMP libc_renameat(SB)
208 TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
209 JMP libc_revoke(SB)
210 TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
211 JMP libc_rmdir(SB)
212 TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
213 JMP libc_lseek(SB)
214 TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
215 JMP libc_select(SB)
216 TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
217 JMP libc_setegid(SB)
218 TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
219 JMP libc_seteuid(SB)
220 TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
221 JMP libc_setgid(SB)
222 TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
223 JMP libc_setlogin(SB)
224 TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
225 JMP libc_setpgid(SB)
226 TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
227 JMP libc_setpriority(SB)
228 TEXT ·libc_setprivexec_trampoline(SB),NOSPLIT,$0-0
229 JMP libc_setprivexec(SB)
230 TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
231 JMP libc_setregid(SB)
232 TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
233 JMP libc_setreuid(SB)
234 TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
235 JMP libc_setrlimit(SB)
236 TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
237 JMP libc_setsid(SB)
238 TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
239 JMP libc_settimeofday(SB)
240 TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
241 JMP libc_setuid(SB)
242 TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
243 JMP libc_symlink(SB)
244 TEXT ·libc_symlinkat_trampoline(SB),NOSPLIT,$0-0
245 JMP libc_symlinkat(SB)
246 TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
247 JMP libc_sync(SB)
248 TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
249 JMP libc_truncate(SB)
250 TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
251 JMP libc_umask(SB)
252 TEXT ·libc_undelete_trampoline(SB),NOSPLIT,$0-0
253 JMP libc_undelete(SB)
254 TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
255 JMP libc_unlink(SB)
256 TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
257 JMP libc_unlinkat(SB)
258 TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
259 JMP libc_unmount(SB)
260 TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
261 JMP libc_write(SB)
262 TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
263 JMP libc_mmap(SB)
264 TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
265 JMP libc_munmap(SB)
266 TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
267 JMP libc_gettimeofday(SB)
268 TEXT ·libc_fstat_trampoline(SB),NOSPLIT,$0-0
269 JMP libc_fstat(SB)
270 TEXT ·libc_fstatat_trampoline(SB),NOSPLIT,$0-0
271 JMP libc_fstatat(SB)
272 TEXT ·libc_fstatfs_trampoline(SB),NOSPLIT,$0-0
273 JMP libc_fstatfs(SB)
274 TEXT ·libc_getfsstat_trampoline(SB),NOSPLIT,$0-0
275 JMP libc_getfsstat(SB)
276 TEXT ·libc_lstat_trampoline(SB),NOSPLIT,$0-0
277 JMP libc_lstat(SB)
278 TEXT ·libc_stat_trampoline(SB),NOSPLIT,$0-0
279 JMP libc_stat(SB)
280 TEXT ·libc_statfs_trampoline(SB),NOSPLIT,$0-0
281 JMP libc_statfs(SB)
0 // go run mksyscall.go -tags darwin,arm64,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build darwin,arm64,!go1.12
4
5 package unix
6
7 import (
8 "syscall"
9 "unsafe"
10 )
11
12 var _ syscall.Errno
13
14 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15
16 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
17 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
18 n = int(r0)
19 if e1 != 0 {
20 err = errnoErr(e1)
21 }
22 return
23 }
24
25 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
26
27 func setgroups(ngid int, gid *_Gid_t) (err error) {
28 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
29 if e1 != 0 {
30 err = errnoErr(e1)
31 }
32 return
33 }
34
35 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
36
37 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
38 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
39 wpid = int(r0)
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
49 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
50 fd = int(r0)
51 if e1 != 0 {
52 err = errnoErr(e1)
53 }
54 return
55 }
56
57 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
58
59 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
60 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
61 if e1 != 0 {
62 err = errnoErr(e1)
63 }
64 return
65 }
66
67 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
68
69 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
70 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
71 if e1 != 0 {
72 err = errnoErr(e1)
73 }
74 return
75 }
76
77 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
78
79 func socket(domain int, typ int, proto int) (fd int, err error) {
80 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
81 fd = int(r0)
82 if e1 != 0 {
83 err = errnoErr(e1)
84 }
85 return
86 }
87
88 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
89
90 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
91 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
92 if e1 != 0 {
93 err = errnoErr(e1)
94 }
95 return
96 }
97
98 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
99
100 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
101 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
102 if e1 != 0 {
103 err = errnoErr(e1)
104 }
105 return
106 }
107
108 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
109
110 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
111 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
112 if e1 != 0 {
113 err = errnoErr(e1)
114 }
115 return
116 }
117
118 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
119
120 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
121 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
122 if e1 != 0 {
123 err = errnoErr(e1)
124 }
125 return
126 }
127
128 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
129
130 func Shutdown(s int, how int) (err error) {
131 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
132 if e1 != 0 {
133 err = errnoErr(e1)
134 }
135 return
136 }
137
138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
139
140 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
141 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
142 if e1 != 0 {
143 err = errnoErr(e1)
144 }
145 return
146 }
147
148 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
149
150 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
151 var _p0 unsafe.Pointer
152 if len(p) > 0 {
153 _p0 = unsafe.Pointer(&p[0])
154 } else {
155 _p0 = unsafe.Pointer(&_zero)
156 }
157 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
158 n = int(r0)
159 if e1 != 0 {
160 err = errnoErr(e1)
161 }
162 return
163 }
164
165 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
166
167 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
168 var _p0 unsafe.Pointer
169 if len(buf) > 0 {
170 _p0 = unsafe.Pointer(&buf[0])
171 } else {
172 _p0 = unsafe.Pointer(&_zero)
173 }
174 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
175 if e1 != 0 {
176 err = errnoErr(e1)
177 }
178 return
179 }
180
181 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
182
183 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
184 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
185 n = int(r0)
186 if e1 != 0 {
187 err = errnoErr(e1)
188 }
189 return
190 }
191
192 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
193
194 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
195 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
196 n = int(r0)
197 if e1 != 0 {
198 err = errnoErr(e1)
199 }
200 return
201 }
202
203 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
204
205 func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
206 r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
207 n = int(r0)
208 if e1 != 0 {
209 err = errnoErr(e1)
210 }
211 return
212 }
213
214 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
215
216 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
217 var _p0 unsafe.Pointer
218 if len(mib) > 0 {
219 _p0 = unsafe.Pointer(&mib[0])
220 } else {
221 _p0 = unsafe.Pointer(&_zero)
222 }
223 _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
224 if e1 != 0 {
225 err = errnoErr(e1)
226 }
227 return
228 }
229
230 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
231
232 func utimes(path string, timeval *[2]Timeval) (err error) {
233 var _p0 *byte
234 _p0, err = BytePtrFromString(path)
235 if err != nil {
236 return
237 }
238 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
239 if e1 != 0 {
240 err = errnoErr(e1)
241 }
242 return
243 }
244
245 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
246
247 func futimes(fd int, timeval *[2]Timeval) (err error) {
248 _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
249 if e1 != 0 {
250 err = errnoErr(e1)
251 }
252 return
253 }
254
255 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
256
257 func fcntl(fd int, cmd int, arg int) (val int, err error) {
258 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
259 val = int(r0)
260 if e1 != 0 {
261 err = errnoErr(e1)
262 }
263 return
264 }
265
266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
279 func Madvise(b []byte, behav int) (err error) {
280 var _p0 unsafe.Pointer
281 if len(b) > 0 {
282 _p0 = unsafe.Pointer(&b[0])
283 } else {
284 _p0 = unsafe.Pointer(&_zero)
285 }
286 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
287 if e1 != 0 {
288 err = errnoErr(e1)
289 }
290 return
291 }
292
293 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
294
295 func Mlock(b []byte) (err error) {
296 var _p0 unsafe.Pointer
297 if len(b) > 0 {
298 _p0 = unsafe.Pointer(&b[0])
299 } else {
300 _p0 = unsafe.Pointer(&_zero)
301 }
302 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
303 if e1 != 0 {
304 err = errnoErr(e1)
305 }
306 return
307 }
308
309 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
310
311 func Mlockall(flags int) (err error) {
312 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
313 if e1 != 0 {
314 err = errnoErr(e1)
315 }
316 return
317 }
318
319 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
320
321 func Mprotect(b []byte, prot int) (err error) {
322 var _p0 unsafe.Pointer
323 if len(b) > 0 {
324 _p0 = unsafe.Pointer(&b[0])
325 } else {
326 _p0 = unsafe.Pointer(&_zero)
327 }
328 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
329 if e1 != 0 {
330 err = errnoErr(e1)
331 }
332 return
333 }
334
335 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
336
337 func Msync(b []byte, flags int) (err error) {
338 var _p0 unsafe.Pointer
339 if len(b) > 0 {
340 _p0 = unsafe.Pointer(&b[0])
341 } else {
342 _p0 = unsafe.Pointer(&_zero)
343 }
344 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
345 if e1 != 0 {
346 err = errnoErr(e1)
347 }
348 return
349 }
350
351 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
352
353 func Munlock(b []byte) (err error) {
354 var _p0 unsafe.Pointer
355 if len(b) > 0 {
356 _p0 = unsafe.Pointer(&b[0])
357 } else {
358 _p0 = unsafe.Pointer(&_zero)
359 }
360 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
361 if e1 != 0 {
362 err = errnoErr(e1)
363 }
364 return
365 }
366
367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
368
369 func Munlockall() (err error) {
370 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
371 if e1 != 0 {
372 err = errnoErr(e1)
373 }
374 return
375 }
376
377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
378
379 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
380 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
381 if e1 != 0 {
382 err = errnoErr(e1)
383 }
384 return
385 }
386
387 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
388
389 func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
390 _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
391 if e1 != 0 {
392 err = errnoErr(e1)
393 }
394 return
395 }
396
397 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
398
399 func pipe() (r int, w int, err error) {
400 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
401 r = int(r0)
402 w = int(r1)
403 if e1 != 0 {
404 err = errnoErr(e1)
405 }
406 return
407 }
408
409 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
410
411 func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
412 var _p0 *byte
413 _p0, err = BytePtrFromString(path)
414 if err != nil {
415 return
416 }
417 var _p1 *byte
418 _p1, err = BytePtrFromString(attr)
419 if err != nil {
420 return
421 }
422 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
423 sz = int(r0)
424 if e1 != 0 {
425 err = errnoErr(e1)
426 }
427 return
428 }
429
430 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
431
432 func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
433 var _p0 *byte
434 _p0, err = BytePtrFromString(attr)
435 if err != nil {
436 return
437 }
438 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
439 sz = int(r0)
440 if e1 != 0 {
441 err = errnoErr(e1)
442 }
443 return
444 }
445
446 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
447
448 func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
449 var _p0 *byte
450 _p0, err = BytePtrFromString(path)
451 if err != nil {
452 return
453 }
454 var _p1 *byte
455 _p1, err = BytePtrFromString(attr)
456 if err != nil {
457 return
458 }
459 _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
460 if e1 != 0 {
461 err = errnoErr(e1)
462 }
463 return
464 }
465
466 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
467
468 func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
469 var _p0 *byte
470 _p0, err = BytePtrFromString(attr)
471 if err != nil {
472 return
473 }
474 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
475 if e1 != 0 {
476 err = errnoErr(e1)
477 }
478 return
479 }
480
481 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
482
483 func removexattr(path string, attr string, options int) (err error) {
484 var _p0 *byte
485 _p0, err = BytePtrFromString(path)
486 if err != nil {
487 return
488 }
489 var _p1 *byte
490 _p1, err = BytePtrFromString(attr)
491 if err != nil {
492 return
493 }
494 _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
495 if e1 != 0 {
496 err = errnoErr(e1)
497 }
498 return
499 }
500
501 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
502
503 func fremovexattr(fd int, attr string, options int) (err error) {
504 var _p0 *byte
505 _p0, err = BytePtrFromString(attr)
506 if err != nil {
507 return
508 }
509 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
510 if e1 != 0 {
511 err = errnoErr(e1)
512 }
513 return
514 }
515
516 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
517
518 func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
519 var _p0 *byte
520 _p0, err = BytePtrFromString(path)
521 if err != nil {
522 return
523 }
524 r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
525 sz = int(r0)
526 if e1 != 0 {
527 err = errnoErr(e1)
528 }
529 return
530 }
531
532 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
533
534 func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
535 r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
536 sz = int(r0)
537 if e1 != 0 {
538 err = errnoErr(e1)
539 }
540 return
541 }
542
543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
544
545 func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
546 _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
547 if e1 != 0 {
548 err = errnoErr(e1)
549 }
550 return
551 }
552
553 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
554
555 func kill(pid int, signum int, posix int) (err error) {
556 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
557 if e1 != 0 {
558 err = errnoErr(e1)
559 }
560 return
561 }
562
563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
564
565 func ioctl(fd int, req uint, arg uintptr) (err error) {
566 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
567 if e1 != 0 {
568 err = errnoErr(e1)
569 }
570 return
571 }
572
573 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
574
575 func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
576 _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
577 if e1 != 0 {
578 err = errnoErr(e1)
579 }
580 return
581 }
582
583 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
584
585 func Access(path string, mode uint32) (err error) {
586 var _p0 *byte
587 _p0, err = BytePtrFromString(path)
588 if err != nil {
589 return
590 }
591 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
592 if e1 != 0 {
593 err = errnoErr(e1)
594 }
595 return
596 }
597
598 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
599
600 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
601 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
602 if e1 != 0 {
603 err = errnoErr(e1)
604 }
605 return
606 }
607
608 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
609
610 func Chdir(path string) (err error) {
611 var _p0 *byte
612 _p0, err = BytePtrFromString(path)
613 if err != nil {
614 return
615 }
616 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
617 if e1 != 0 {
618 err = errnoErr(e1)
619 }
620 return
621 }
622
623 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
624
625 func Chflags(path string, flags int) (err error) {
626 var _p0 *byte
627 _p0, err = BytePtrFromString(path)
628 if err != nil {
629 return
630 }
631 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
632 if e1 != 0 {
633 err = errnoErr(e1)
634 }
635 return
636 }
637
638 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
639
640 func Chmod(path string, mode uint32) (err error) {
641 var _p0 *byte
642 _p0, err = BytePtrFromString(path)
643 if err != nil {
644 return
645 }
646 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
647 if e1 != 0 {
648 err = errnoErr(e1)
649 }
650 return
651 }
652
653 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
654
655 func Chown(path string, uid int, gid int) (err error) {
656 var _p0 *byte
657 _p0, err = BytePtrFromString(path)
658 if err != nil {
659 return
660 }
661 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
662 if e1 != 0 {
663 err = errnoErr(e1)
664 }
665 return
666 }
667
668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
669
670 func Chroot(path string) (err error) {
671 var _p0 *byte
672 _p0, err = BytePtrFromString(path)
673 if err != nil {
674 return
675 }
676 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
677 if e1 != 0 {
678 err = errnoErr(e1)
679 }
680 return
681 }
682
683 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
684
685 func Close(fd int) (err error) {
686 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
687 if e1 != 0 {
688 err = errnoErr(e1)
689 }
690 return
691 }
692
693 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
694
695 func Dup(fd int) (nfd int, err error) {
696 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
697 nfd = int(r0)
698 if e1 != 0 {
699 err = errnoErr(e1)
700 }
701 return
702 }
703
704 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
705
706 func Dup2(from int, to int) (err error) {
707 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
708 if e1 != 0 {
709 err = errnoErr(e1)
710 }
711 return
712 }
713
714 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
715
716 func Exchangedata(path1 string, path2 string, options int) (err error) {
717 var _p0 *byte
718 _p0, err = BytePtrFromString(path1)
719 if err != nil {
720 return
721 }
722 var _p1 *byte
723 _p1, err = BytePtrFromString(path2)
724 if err != nil {
725 return
726 }
727 _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
728 if e1 != 0 {
729 err = errnoErr(e1)
730 }
731 return
732 }
733
734 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
735
736 func Exit(code int) {
737 Syscall(SYS_EXIT, uintptr(code), 0, 0)
738 return
739 }
740
741 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
742
743 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
744 var _p0 *byte
745 _p0, err = BytePtrFromString(path)
746 if err != nil {
747 return
748 }
749 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
750 if e1 != 0 {
751 err = errnoErr(e1)
752 }
753 return
754 }
755
756 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
757
758 func Fchdir(fd int) (err error) {
759 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
760 if e1 != 0 {
761 err = errnoErr(e1)
762 }
763 return
764 }
765
766 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
767
768 func Fchflags(fd int, flags int) (err error) {
769 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
770 if e1 != 0 {
771 err = errnoErr(e1)
772 }
773 return
774 }
775
776 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
777
778 func Fchmod(fd int, mode uint32) (err error) {
779 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
780 if e1 != 0 {
781 err = errnoErr(e1)
782 }
783 return
784 }
785
786 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
787
788 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
789 var _p0 *byte
790 _p0, err = BytePtrFromString(path)
791 if err != nil {
792 return
793 }
794 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
795 if e1 != 0 {
796 err = errnoErr(e1)
797 }
798 return
799 }
800
801 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
802
803 func Fchown(fd int, uid int, gid int) (err error) {
804 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
805 if e1 != 0 {
806 err = errnoErr(e1)
807 }
808 return
809 }
810
811 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
812
813 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
814 var _p0 *byte
815 _p0, err = BytePtrFromString(path)
816 if err != nil {
817 return
818 }
819 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
820 if e1 != 0 {
821 err = errnoErr(e1)
822 }
823 return
824 }
825
826 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
827
828 func Flock(fd int, how int) (err error) {
829 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
830 if e1 != 0 {
831 err = errnoErr(e1)
832 }
833 return
834 }
835
836 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
837
838 func Fpathconf(fd int, name int) (val int, err error) {
839 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
840 val = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func Fsync(fd int) (err error) {
850 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
851 if e1 != 0 {
852 err = errnoErr(e1)
853 }
854 return
855 }
856
857 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
858
859 func Ftruncate(fd int, length int64) (err error) {
860 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
861 if e1 != 0 {
862 err = errnoErr(e1)
863 }
864 return
865 }
866
867 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
868
869 func Getdtablesize() (size int) {
870 r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
871 size = int(r0)
872 return
873 }
874
875 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
876
877 func Getegid() (egid int) {
878 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
879 egid = int(r0)
880 return
881 }
882
883 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
884
885 func Geteuid() (uid int) {
886 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
887 uid = int(r0)
888 return
889 }
890
891 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
892
893 func Getgid() (gid int) {
894 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
895 gid = int(r0)
896 return
897 }
898
899 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
900
901 func Getpgid(pid int) (pgid int, err error) {
902 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
903 pgid = int(r0)
904 if e1 != 0 {
905 err = errnoErr(e1)
906 }
907 return
908 }
909
910 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
911
912 func Getpgrp() (pgrp int) {
913 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
914 pgrp = int(r0)
915 return
916 }
917
918 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
919
920 func Getpid() (pid int) {
921 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
922 pid = int(r0)
923 return
924 }
925
926 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
927
928 func Getppid() (ppid int) {
929 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
930 ppid = int(r0)
931 return
932 }
933
934 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
935
936 func Getpriority(which int, who int) (prio int, err error) {
937 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
938 prio = int(r0)
939 if e1 != 0 {
940 err = errnoErr(e1)
941 }
942 return
943 }
944
945 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
946
947 func Getrlimit(which int, lim *Rlimit) (err error) {
948 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
949 if e1 != 0 {
950 err = errnoErr(e1)
951 }
952 return
953 }
954
955 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
956
957 func Getrusage(who int, rusage *Rusage) (err error) {
958 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
959 if e1 != 0 {
960 err = errnoErr(e1)
961 }
962 return
963 }
964
965 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
966
967 func Getsid(pid int) (sid int, err error) {
968 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
969 sid = int(r0)
970 if e1 != 0 {
971 err = errnoErr(e1)
972 }
973 return
974 }
975
976 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
977
978 func Getuid() (uid int) {
979 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
980 uid = int(r0)
981 return
982 }
983
984 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
985
986 func Issetugid() (tainted bool) {
987 r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
988 tainted = bool(r0 != 0)
989 return
990 }
991
992 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
993
994 func Kqueue() (fd int, err error) {
995 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
996 fd = int(r0)
997 if e1 != 0 {
998 err = errnoErr(e1)
999 }
1000 return
1001 }
1002
1003 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1004
1005 func Lchown(path string, uid int, gid int) (err error) {
1006 var _p0 *byte
1007 _p0, err = BytePtrFromString(path)
1008 if err != nil {
1009 return
1010 }
1011 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
1012 if e1 != 0 {
1013 err = errnoErr(e1)
1014 }
1015 return
1016 }
1017
1018 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1019
1020 func Link(path string, link string) (err error) {
1021 var _p0 *byte
1022 _p0, err = BytePtrFromString(path)
1023 if err != nil {
1024 return
1025 }
1026 var _p1 *byte
1027 _p1, err = BytePtrFromString(link)
1028 if err != nil {
1029 return
1030 }
1031 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1032 if e1 != 0 {
1033 err = errnoErr(e1)
1034 }
1035 return
1036 }
1037
1038 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1039
1040 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
1041 var _p0 *byte
1042 _p0, err = BytePtrFromString(path)
1043 if err != nil {
1044 return
1045 }
1046 var _p1 *byte
1047 _p1, err = BytePtrFromString(link)
1048 if err != nil {
1049 return
1050 }
1051 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1052 if e1 != 0 {
1053 err = errnoErr(e1)
1054 }
1055 return
1056 }
1057
1058 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1059
1060 func Listen(s int, backlog int) (err error) {
1061 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
1062 if e1 != 0 {
1063 err = errnoErr(e1)
1064 }
1065 return
1066 }
1067
1068 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1069
1070 func Mkdir(path string, mode uint32) (err error) {
1071 var _p0 *byte
1072 _p0, err = BytePtrFromString(path)
1073 if err != nil {
1074 return
1075 }
1076 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1077 if e1 != 0 {
1078 err = errnoErr(e1)
1079 }
1080 return
1081 }
1082
1083 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1084
1085 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1086 var _p0 *byte
1087 _p0, err = BytePtrFromString(path)
1088 if err != nil {
1089 return
1090 }
1091 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1092 if e1 != 0 {
1093 err = errnoErr(e1)
1094 }
1095 return
1096 }
1097
1098 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1099
1100 func Mkfifo(path string, mode uint32) (err error) {
1101 var _p0 *byte
1102 _p0, err = BytePtrFromString(path)
1103 if err != nil {
1104 return
1105 }
1106 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1107 if e1 != 0 {
1108 err = errnoErr(e1)
1109 }
1110 return
1111 }
1112
1113 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1114
1115 func Mknod(path string, mode uint32, dev int) (err error) {
1116 var _p0 *byte
1117 _p0, err = BytePtrFromString(path)
1118 if err != nil {
1119 return
1120 }
1121 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1122 if e1 != 0 {
1123 err = errnoErr(e1)
1124 }
1125 return
1126 }
1127
1128 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1129
1130 func Open(path string, mode int, perm uint32) (fd int, err error) {
1131 var _p0 *byte
1132 _p0, err = BytePtrFromString(path)
1133 if err != nil {
1134 return
1135 }
1136 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1137 fd = int(r0)
1138 if e1 != 0 {
1139 err = errnoErr(e1)
1140 }
1141 return
1142 }
1143
1144 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1145
1146 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1147 var _p0 *byte
1148 _p0, err = BytePtrFromString(path)
1149 if err != nil {
1150 return
1151 }
1152 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
1153 fd = int(r0)
1154 if e1 != 0 {
1155 err = errnoErr(e1)
1156 }
1157 return
1158 }
1159
1160 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1161
1162 func Pathconf(path string, name int) (val int, err error) {
1163 var _p0 *byte
1164 _p0, err = BytePtrFromString(path)
1165 if err != nil {
1166 return
1167 }
1168 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1169 val = int(r0)
1170 if e1 != 0 {
1171 err = errnoErr(e1)
1172 }
1173 return
1174 }
1175
1176 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1177
1178 func Pread(fd int, p []byte, offset int64) (n int, err error) {
1179 var _p0 unsafe.Pointer
1180 if len(p) > 0 {
1181 _p0 = unsafe.Pointer(&p[0])
1182 } else {
1183 _p0 = unsafe.Pointer(&_zero)
1184 }
1185 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1186 n = int(r0)
1187 if e1 != 0 {
1188 err = errnoErr(e1)
1189 }
1190 return
1191 }
1192
1193 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1194
1195 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
1196 var _p0 unsafe.Pointer
1197 if len(p) > 0 {
1198 _p0 = unsafe.Pointer(&p[0])
1199 } else {
1200 _p0 = unsafe.Pointer(&_zero)
1201 }
1202 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1203 n = int(r0)
1204 if e1 != 0 {
1205 err = errnoErr(e1)
1206 }
1207 return
1208 }
1209
1210 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1211
1212 func read(fd int, p []byte) (n int, err error) {
1213 var _p0 unsafe.Pointer
1214 if len(p) > 0 {
1215 _p0 = unsafe.Pointer(&p[0])
1216 } else {
1217 _p0 = unsafe.Pointer(&_zero)
1218 }
1219 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1220 n = int(r0)
1221 if e1 != 0 {
1222 err = errnoErr(e1)
1223 }
1224 return
1225 }
1226
1227 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1228
1229 func Readlink(path string, buf []byte) (n int, err error) {
1230 var _p0 *byte
1231 _p0, err = BytePtrFromString(path)
1232 if err != nil {
1233 return
1234 }
1235 var _p1 unsafe.Pointer
1236 if len(buf) > 0 {
1237 _p1 = unsafe.Pointer(&buf[0])
1238 } else {
1239 _p1 = unsafe.Pointer(&_zero)
1240 }
1241 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1242 n = int(r0)
1243 if e1 != 0 {
1244 err = errnoErr(e1)
1245 }
1246 return
1247 }
1248
1249 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1250
1251 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1252 var _p0 *byte
1253 _p0, err = BytePtrFromString(path)
1254 if err != nil {
1255 return
1256 }
1257 var _p1 unsafe.Pointer
1258 if len(buf) > 0 {
1259 _p1 = unsafe.Pointer(&buf[0])
1260 } else {
1261 _p1 = unsafe.Pointer(&_zero)
1262 }
1263 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1264 n = int(r0)
1265 if e1 != 0 {
1266 err = errnoErr(e1)
1267 }
1268 return
1269 }
1270
1271 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1272
1273 func Rename(from string, to string) (err error) {
1274 var _p0 *byte
1275 _p0, err = BytePtrFromString(from)
1276 if err != nil {
1277 return
1278 }
1279 var _p1 *byte
1280 _p1, err = BytePtrFromString(to)
1281 if err != nil {
1282 return
1283 }
1284 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1285 if e1 != 0 {
1286 err = errnoErr(e1)
1287 }
1288 return
1289 }
1290
1291 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1292
1293 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1294 var _p0 *byte
1295 _p0, err = BytePtrFromString(from)
1296 if err != nil {
1297 return
1298 }
1299 var _p1 *byte
1300 _p1, err = BytePtrFromString(to)
1301 if err != nil {
1302 return
1303 }
1304 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1305 if e1 != 0 {
1306 err = errnoErr(e1)
1307 }
1308 return
1309 }
1310
1311 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1312
1313 func Revoke(path string) (err error) {
1314 var _p0 *byte
1315 _p0, err = BytePtrFromString(path)
1316 if err != nil {
1317 return
1318 }
1319 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1320 if e1 != 0 {
1321 err = errnoErr(e1)
1322 }
1323 return
1324 }
1325
1326 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1327
1328 func Rmdir(path string) (err error) {
1329 var _p0 *byte
1330 _p0, err = BytePtrFromString(path)
1331 if err != nil {
1332 return
1333 }
1334 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
1335 if e1 != 0 {
1336 err = errnoErr(e1)
1337 }
1338 return
1339 }
1340
1341 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1342
1343 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1344 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
1345 newoffset = int64(r0)
1346 if e1 != 0 {
1347 err = errnoErr(e1)
1348 }
1349 return
1350 }
1351
1352 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1353
1354 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1355 _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1356 if e1 != 0 {
1357 err = errnoErr(e1)
1358 }
1359 return
1360 }
1361
1362 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1363
1364 func Setegid(egid int) (err error) {
1365 _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
1366 if e1 != 0 {
1367 err = errnoErr(e1)
1368 }
1369 return
1370 }
1371
1372 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1373
1374 func Seteuid(euid int) (err error) {
1375 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
1384 func Setgid(gid int) (err error) {
1385 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
1386 if e1 != 0 {
1387 err = errnoErr(e1)
1388 }
1389 return
1390 }
1391
1392 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1393
1394 func Setlogin(name string) (err error) {
1395 var _p0 *byte
1396 _p0, err = BytePtrFromString(name)
1397 if err != nil {
1398 return
1399 }
1400 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
1401 if e1 != 0 {
1402 err = errnoErr(e1)
1403 }
1404 return
1405 }
1406
1407 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1408
1409 func Setpgid(pid int, pgid int) (err error) {
1410 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
1411 if e1 != 0 {
1412 err = errnoErr(e1)
1413 }
1414 return
1415 }
1416
1417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1418
1419 func Setpriority(which int, who int, prio int) (err error) {
1420 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
1421 if e1 != 0 {
1422 err = errnoErr(e1)
1423 }
1424 return
1425 }
1426
1427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1428
1429 func Setprivexec(flag int) (err error) {
1430 _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
1431 if e1 != 0 {
1432 err = errnoErr(e1)
1433 }
1434 return
1435 }
1436
1437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1438
1439 func Setregid(rgid int, egid int) (err error) {
1440 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
1441 if e1 != 0 {
1442 err = errnoErr(e1)
1443 }
1444 return
1445 }
1446
1447 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1448
1449 func Setreuid(ruid int, euid int) (err error) {
1450 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
1451 if e1 != 0 {
1452 err = errnoErr(e1)
1453 }
1454 return
1455 }
1456
1457 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1458
1459 func Setrlimit(which int, lim *Rlimit) (err error) {
1460 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1461 if e1 != 0 {
1462 err = errnoErr(e1)
1463 }
1464 return
1465 }
1466
1467 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1468
1469 func Setsid() (pid int, err error) {
1470 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
1471 pid = int(r0)
1472 if e1 != 0 {
1473 err = errnoErr(e1)
1474 }
1475 return
1476 }
1477
1478 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1479
1480 func Settimeofday(tp *Timeval) (err error) {
1481 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1482 if e1 != 0 {
1483 err = errnoErr(e1)
1484 }
1485 return
1486 }
1487
1488 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1489
1490 func Setuid(uid int) (err error) {
1491 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
1492 if e1 != 0 {
1493 err = errnoErr(e1)
1494 }
1495 return
1496 }
1497
1498 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1499
1500 func Symlink(path string, link string) (err error) {
1501 var _p0 *byte
1502 _p0, err = BytePtrFromString(path)
1503 if err != nil {
1504 return
1505 }
1506 var _p1 *byte
1507 _p1, err = BytePtrFromString(link)
1508 if err != nil {
1509 return
1510 }
1511 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1512 if e1 != 0 {
1513 err = errnoErr(e1)
1514 }
1515 return
1516 }
1517
1518 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1519
1520 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
1521 var _p0 *byte
1522 _p0, err = BytePtrFromString(oldpath)
1523 if err != nil {
1524 return
1525 }
1526 var _p1 *byte
1527 _p1, err = BytePtrFromString(newpath)
1528 if err != nil {
1529 return
1530 }
1531 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1532 if e1 != 0 {
1533 err = errnoErr(e1)
1534 }
1535 return
1536 }
1537
1538 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1539
1540 func Sync() (err error) {
1541 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
1542 if e1 != 0 {
1543 err = errnoErr(e1)
1544 }
1545 return
1546 }
1547
1548 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1549
1550 func Truncate(path string, length int64) (err error) {
1551 var _p0 *byte
1552 _p0, err = BytePtrFromString(path)
1553 if err != nil {
1554 return
1555 }
1556 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
1557 if e1 != 0 {
1558 err = errnoErr(e1)
1559 }
1560 return
1561 }
1562
1563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1564
1565 func Umask(newmask int) (oldmask int) {
1566 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
1567 oldmask = int(r0)
1568 return
1569 }
1570
1571 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1572
1573 func Undelete(path string) (err error) {
1574 var _p0 *byte
1575 _p0, err = BytePtrFromString(path)
1576 if err != nil {
1577 return
1578 }
1579 _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1580 if e1 != 0 {
1581 err = errnoErr(e1)
1582 }
1583 return
1584 }
1585
1586 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1587
1588 func Unlink(path string) (err error) {
1589 var _p0 *byte
1590 _p0, err = BytePtrFromString(path)
1591 if err != nil {
1592 return
1593 }
1594 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1595 if e1 != 0 {
1596 err = errnoErr(e1)
1597 }
1598 return
1599 }
1600
1601 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1602
1603 func Unlinkat(dirfd int, path string, flags int) (err error) {
1604 var _p0 *byte
1605 _p0, err = BytePtrFromString(path)
1606 if err != nil {
1607 return
1608 }
1609 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
1610 if e1 != 0 {
1611 err = errnoErr(e1)
1612 }
1613 return
1614 }
1615
1616 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1617
1618 func Unmount(path string, flags int) (err error) {
1619 var _p0 *byte
1620 _p0, err = BytePtrFromString(path)
1621 if err != nil {
1622 return
1623 }
1624 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1625 if e1 != 0 {
1626 err = errnoErr(e1)
1627 }
1628 return
1629 }
1630
1631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1632
1633 func write(fd int, p []byte) (n int, err error) {
1634 var _p0 unsafe.Pointer
1635 if len(p) > 0 {
1636 _p0 = unsafe.Pointer(&p[0])
1637 } else {
1638 _p0 = unsafe.Pointer(&_zero)
1639 }
1640 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1641 n = int(r0)
1642 if e1 != 0 {
1643 err = errnoErr(e1)
1644 }
1645 return
1646 }
1647
1648 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1649
1650 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
1651 r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
1652 ret = uintptr(r0)
1653 if e1 != 0 {
1654 err = errnoErr(e1)
1655 }
1656 return
1657 }
1658
1659 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1660
1661 func munmap(addr uintptr, length uintptr) (err error) {
1662 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
1663 if e1 != 0 {
1664 err = errnoErr(e1)
1665 }
1666 return
1667 }
1668
1669 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1670
1671 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
1672 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1673 n = int(r0)
1674 if e1 != 0 {
1675 err = errnoErr(e1)
1676 }
1677 return
1678 }
1679
1680 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1681
1682 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
1683 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1684 n = int(r0)
1685 if e1 != 0 {
1686 err = errnoErr(e1)
1687 }
1688 return
1689 }
1690
1691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1692
1693 func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
1694 r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1695 sec = int64(r0)
1696 usec = int32(r1)
1697 if e1 != 0 {
1698 err = errnoErr(e1)
1699 }
1700 return
1701 }
1702
1703 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1704
1705 func Fstat(fd int, stat *Stat_t) (err error) {
1706 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
1707 if e1 != 0 {
1708 err = errnoErr(e1)
1709 }
1710 return
1711 }
1712
1713 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1714
1715 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
1716 var _p0 *byte
1717 _p0, err = BytePtrFromString(path)
1718 if err != nil {
1719 return
1720 }
1721 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
1722 if e1 != 0 {
1723 err = errnoErr(e1)
1724 }
1725 return
1726 }
1727
1728 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1729
1730 func Fstatfs(fd int, stat *Statfs_t) (err error) {
1731 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
1732 if e1 != 0 {
1733 err = errnoErr(e1)
1734 }
1735 return
1736 }
1737
1738 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1739
1740 func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
1741 r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(buf), uintptr(size), uintptr(flags))
1742 n = int(r0)
1743 if e1 != 0 {
1744 err = errnoErr(e1)
1745 }
1746 return
1747 }
1748
1749 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1750
1751 func Lstat(path string, stat *Stat_t) (err error) {
1752 var _p0 *byte
1753 _p0, err = BytePtrFromString(path)
1754 if err != nil {
1755 return
1756 }
1757 _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1758 if e1 != 0 {
1759 err = errnoErr(e1)
1760 }
1761 return
1762 }
1763
1764 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1765
1766 func Stat(path string, stat *Stat_t) (err error) {
1767 var _p0 *byte
1768 _p0, err = BytePtrFromString(path)
1769 if err != nil {
1770 return
1771 }
1772 _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1773 if e1 != 0 {
1774 err = errnoErr(e1)
1775 }
1776 return
1777 }
1778
1779 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1780
1781 func Statfs(path string, stat *Statfs_t) (err error) {
1782 var _p0 *byte
1783 _p0, err = BytePtrFromString(path)
1784 if err != nil {
1785 return
1786 }
1787 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1788 if e1 != 0 {
1789 err = errnoErr(e1)
1790 }
1791 return
1792 }
0 // mksyscall.pl -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
0 // go run mksyscall.go -tags darwin,arm64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
3 // +build darwin,arm64
3 // +build darwin,arm64,go1.12
44
55 package unix
66
1414 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1515
1616 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
17 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
17 r0, _, e1 := syscall_rawSyscall(funcPC(libc_getgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
1818 n = int(r0)
1919 if e1 != 0 {
2020 err = errnoErr(e1)
2222 return
2323 }
2424
25 func libc_getgroups_trampoline()
26
27 //go:linkname libc_getgroups libc_getgroups
28 //go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib"
29
2530 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2631
2732 func setgroups(ngid int, gid *_Gid_t) (err error) {
28 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
29 if e1 != 0 {
30 err = errnoErr(e1)
31 }
32 return
33 }
33 _, _, e1 := syscall_rawSyscall(funcPC(libc_setgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
34 if e1 != 0 {
35 err = errnoErr(e1)
36 }
37 return
38 }
39
40 func libc_setgroups_trampoline()
41
42 //go:linkname libc_setgroups libc_setgroups
43 //go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib"
3444
3545 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
3646
3747 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
38 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
48 r0, _, e1 := syscall_syscall6(funcPC(libc_wait4_trampoline), uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
3949 wpid = int(r0)
4050 if e1 != 0 {
4151 err = errnoErr(e1)
4353 return
4454 }
4555
56 func libc_wait4_trampoline()
57
58 //go:linkname libc_wait4 libc_wait4
59 //go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib"
60
4661 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
4762
4863 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
49 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
64 r0, _, e1 := syscall_syscall(funcPC(libc_accept_trampoline), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
5065 fd = int(r0)
5166 if e1 != 0 {
5267 err = errnoErr(e1)
5469 return
5570 }
5671
72 func libc_accept_trampoline()
73
74 //go:linkname libc_accept libc_accept
75 //go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib"
76
5777 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5878
5979 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
60 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
61 if e1 != 0 {
62 err = errnoErr(e1)
63 }
64 return
65 }
80 _, _, e1 := syscall_syscall(funcPC(libc_bind_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
81 if e1 != 0 {
82 err = errnoErr(e1)
83 }
84 return
85 }
86
87 func libc_bind_trampoline()
88
89 //go:linkname libc_bind libc_bind
90 //go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib"
6691
6792 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6893
6994 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
70 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
71 if e1 != 0 {
72 err = errnoErr(e1)
73 }
74 return
75 }
95 _, _, e1 := syscall_syscall(funcPC(libc_connect_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
96 if e1 != 0 {
97 err = errnoErr(e1)
98 }
99 return
100 }
101
102 func libc_connect_trampoline()
103
104 //go:linkname libc_connect libc_connect
105 //go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib"
76106
77107 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
78108
79109 func socket(domain int, typ int, proto int) (fd int, err error) {
80 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
110 r0, _, e1 := syscall_rawSyscall(funcPC(libc_socket_trampoline), uintptr(domain), uintptr(typ), uintptr(proto))
81111 fd = int(r0)
82112 if e1 != 0 {
83113 err = errnoErr(e1)
85115 return
86116 }
87117
118 func libc_socket_trampoline()
119
120 //go:linkname libc_socket libc_socket
121 //go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib"
122
88123 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
89124
90125 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
91 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
92 if e1 != 0 {
93 err = errnoErr(e1)
94 }
95 return
96 }
126 _, _, e1 := syscall_syscall6(funcPC(libc_getsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
127 if e1 != 0 {
128 err = errnoErr(e1)
129 }
130 return
131 }
132
133 func libc_getsockopt_trampoline()
134
135 //go:linkname libc_getsockopt libc_getsockopt
136 //go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib"
97137
98138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
99139
100140 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
101 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
102 if e1 != 0 {
103 err = errnoErr(e1)
104 }
105 return
106 }
141 _, _, e1 := syscall_syscall6(funcPC(libc_setsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
142 if e1 != 0 {
143 err = errnoErr(e1)
144 }
145 return
146 }
147
148 func libc_setsockopt_trampoline()
149
150 //go:linkname libc_setsockopt libc_setsockopt
151 //go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib"
107152
108153 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
109154
110155 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
111 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
112 if e1 != 0 {
113 err = errnoErr(e1)
114 }
115 return
116 }
156 _, _, e1 := syscall_rawSyscall(funcPC(libc_getpeername_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
157 if e1 != 0 {
158 err = errnoErr(e1)
159 }
160 return
161 }
162
163 func libc_getpeername_trampoline()
164
165 //go:linkname libc_getpeername libc_getpeername
166 //go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib"
117167
118168 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
119169
120170 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
121 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
122 if e1 != 0 {
123 err = errnoErr(e1)
124 }
125 return
126 }
171 _, _, e1 := syscall_rawSyscall(funcPC(libc_getsockname_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
172 if e1 != 0 {
173 err = errnoErr(e1)
174 }
175 return
176 }
177
178 func libc_getsockname_trampoline()
179
180 //go:linkname libc_getsockname libc_getsockname
181 //go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib"
127182
128183 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
129184
130185 func Shutdown(s int, how int) (err error) {
131 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
132 if e1 != 0 {
133 err = errnoErr(e1)
134 }
135 return
136 }
186 _, _, e1 := syscall_syscall(funcPC(libc_shutdown_trampoline), uintptr(s), uintptr(how), 0)
187 if e1 != 0 {
188 err = errnoErr(e1)
189 }
190 return
191 }
192
193 func libc_shutdown_trampoline()
194
195 //go:linkname libc_shutdown libc_shutdown
196 //go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib"
137197
138198 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
139199
140200 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
141 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
142 if e1 != 0 {
143 err = errnoErr(e1)
144 }
145 return
146 }
201 _, _, e1 := syscall_rawSyscall6(funcPC(libc_socketpair_trampoline), uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
202 if e1 != 0 {
203 err = errnoErr(e1)
204 }
205 return
206 }
207
208 func libc_socketpair_trampoline()
209
210 //go:linkname libc_socketpair libc_socketpair
211 //go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib"
147212
148213 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
149214
154219 } else {
155220 _p0 = unsafe.Pointer(&_zero)
156221 }
157 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
222 r0, _, e1 := syscall_syscall6(funcPC(libc_recvfrom_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
158223 n = int(r0)
159224 if e1 != 0 {
160225 err = errnoErr(e1)
161226 }
162227 return
163228 }
229
230 func libc_recvfrom_trampoline()
231
232 //go:linkname libc_recvfrom libc_recvfrom
233 //go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib"
164234
165235 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
166236
171241 } else {
172242 _p0 = unsafe.Pointer(&_zero)
173243 }
174 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
175 if e1 != 0 {
176 err = errnoErr(e1)
177 }
178 return
179 }
244 _, _, e1 := syscall_syscall6(funcPC(libc_sendto_trampoline), uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
245 if e1 != 0 {
246 err = errnoErr(e1)
247 }
248 return
249 }
250
251 func libc_sendto_trampoline()
252
253 //go:linkname libc_sendto libc_sendto
254 //go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib"
180255
181256 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
182257
183258 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
184 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
259 r0, _, e1 := syscall_syscall(funcPC(libc_recvmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
185260 n = int(r0)
186261 if e1 != 0 {
187262 err = errnoErr(e1)
189264 return
190265 }
191266
267 func libc_recvmsg_trampoline()
268
269 //go:linkname libc_recvmsg libc_recvmsg
270 //go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib"
271
192272 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
193273
194274 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
195 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
275 r0, _, e1 := syscall_syscall(funcPC(libc_sendmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
196276 n = int(r0)
197277 if e1 != 0 {
198278 err = errnoErr(e1)
200280 return
201281 }
202282
283 func libc_sendmsg_trampoline()
284
285 //go:linkname libc_sendmsg libc_sendmsg
286 //go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib"
287
203288 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
204289
205290 func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
206 r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
291 r0, _, e1 := syscall_syscall6(funcPC(libc_kevent_trampoline), uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
207292 n = int(r0)
208293 if e1 != 0 {
209294 err = errnoErr(e1)
210295 }
211296 return
212297 }
298
299 func libc_kevent_trampoline()
300
301 //go:linkname libc_kevent libc_kevent
302 //go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib"
213303
214304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
215305
220310 } else {
221311 _p0 = unsafe.Pointer(&_zero)
222312 }
223 _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
224 if e1 != 0 {
225 err = errnoErr(e1)
226 }
227 return
228 }
313 _, _, e1 := syscall_syscall6(funcPC(libc___sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
314 if e1 != 0 {
315 err = errnoErr(e1)
316 }
317 return
318 }
319
320 func libc___sysctl_trampoline()
321
322 //go:linkname libc___sysctl libc___sysctl
323 //go:cgo_import_dynamic libc___sysctl __sysctl "/usr/lib/libSystem.B.dylib"
229324
230325 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
231326
235330 if err != nil {
236331 return
237332 }
238 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
239 if e1 != 0 {
240 err = errnoErr(e1)
241 }
242 return
243 }
333 _, _, e1 := syscall_syscall(funcPC(libc_utimes_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
334 if e1 != 0 {
335 err = errnoErr(e1)
336 }
337 return
338 }
339
340 func libc_utimes_trampoline()
341
342 //go:linkname libc_utimes libc_utimes
343 //go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib"
244344
245345 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
246346
247347 func futimes(fd int, timeval *[2]Timeval) (err error) {
248 _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
249 if e1 != 0 {
250 err = errnoErr(e1)
251 }
252 return
253 }
348 _, _, e1 := syscall_syscall(funcPC(libc_futimes_trampoline), uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
349 if e1 != 0 {
350 err = errnoErr(e1)
351 }
352 return
353 }
354
355 func libc_futimes_trampoline()
356
357 //go:linkname libc_futimes libc_futimes
358 //go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib"
254359
255360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
256361
257362 func fcntl(fd int, cmd int, arg int) (val int, err error) {
258 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
363 r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
259364 val = int(r0)
260365 if e1 != 0 {
261366 err = errnoErr(e1)
262367 }
263368 return
264369 }
370
371 func libc_fcntl_trampoline()
372
373 //go:linkname libc_fcntl libc_fcntl
374 //go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
375
376 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
377
378 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
379 r0, _, e1 := syscall_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
380 n = int(r0)
381 if e1 != 0 {
382 err = errnoErr(e1)
383 }
384 return
385 }
386
387 func libc_poll_trampoline()
388
389 //go:linkname libc_poll libc_poll
390 //go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib"
265391
266392 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267393
272398 } else {
273399 _p0 = unsafe.Pointer(&_zero)
274400 }
275 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
276 if e1 != 0 {
277 err = errnoErr(e1)
278 }
279 return
280 }
401 _, _, e1 := syscall_syscall(funcPC(libc_madvise_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(behav))
402 if e1 != 0 {
403 err = errnoErr(e1)
404 }
405 return
406 }
407
408 func libc_madvise_trampoline()
409
410 //go:linkname libc_madvise libc_madvise
411 //go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib"
281412
282413 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
283414
288419 } else {
289420 _p0 = unsafe.Pointer(&_zero)
290421 }
291 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
292 if e1 != 0 {
293 err = errnoErr(e1)
294 }
295 return
296 }
422 _, _, e1 := syscall_syscall(funcPC(libc_mlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
423 if e1 != 0 {
424 err = errnoErr(e1)
425 }
426 return
427 }
428
429 func libc_mlock_trampoline()
430
431 //go:linkname libc_mlock libc_mlock
432 //go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib"
297433
298434 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
299435
300436 func Mlockall(flags int) (err error) {
301 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
302 if e1 != 0 {
303 err = errnoErr(e1)
304 }
305 return
306 }
437 _, _, e1 := syscall_syscall(funcPC(libc_mlockall_trampoline), uintptr(flags), 0, 0)
438 if e1 != 0 {
439 err = errnoErr(e1)
440 }
441 return
442 }
443
444 func libc_mlockall_trampoline()
445
446 //go:linkname libc_mlockall libc_mlockall
447 //go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib"
307448
308449 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
309450
314455 } else {
315456 _p0 = unsafe.Pointer(&_zero)
316457 }
317 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
318 if e1 != 0 {
319 err = errnoErr(e1)
320 }
321 return
322 }
458 _, _, e1 := syscall_syscall(funcPC(libc_mprotect_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(prot))
459 if e1 != 0 {
460 err = errnoErr(e1)
461 }
462 return
463 }
464
465 func libc_mprotect_trampoline()
466
467 //go:linkname libc_mprotect libc_mprotect
468 //go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib"
323469
324470 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
325471
330476 } else {
331477 _p0 = unsafe.Pointer(&_zero)
332478 }
333 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
334 if e1 != 0 {
335 err = errnoErr(e1)
336 }
337 return
338 }
479 _, _, e1 := syscall_syscall(funcPC(libc_msync_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(flags))
480 if e1 != 0 {
481 err = errnoErr(e1)
482 }
483 return
484 }
485
486 func libc_msync_trampoline()
487
488 //go:linkname libc_msync libc_msync
489 //go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib"
339490
340491 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
341492
346497 } else {
347498 _p0 = unsafe.Pointer(&_zero)
348499 }
349 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
350 if e1 != 0 {
351 err = errnoErr(e1)
352 }
353 return
354 }
500 _, _, e1 := syscall_syscall(funcPC(libc_munlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
501 if e1 != 0 {
502 err = errnoErr(e1)
503 }
504 return
505 }
506
507 func libc_munlock_trampoline()
508
509 //go:linkname libc_munlock libc_munlock
510 //go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib"
355511
356512 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
357513
358514 func Munlockall() (err error) {
359 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
360 if e1 != 0 {
361 err = errnoErr(e1)
362 }
363 return
364 }
515 _, _, e1 := syscall_syscall(funcPC(libc_munlockall_trampoline), 0, 0, 0)
516 if e1 != 0 {
517 err = errnoErr(e1)
518 }
519 return
520 }
521
522 func libc_munlockall_trampoline()
523
524 //go:linkname libc_munlockall libc_munlockall
525 //go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib"
365526
366527 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
367528
368529 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
369 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
370 if e1 != 0 {
371 err = errnoErr(e1)
372 }
373 return
374 }
530 _, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
531 if e1 != 0 {
532 err = errnoErr(e1)
533 }
534 return
535 }
536
537 func libc_ptrace_trampoline()
538
539 //go:linkname libc_ptrace libc_ptrace
540 //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
541
542 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
543
544 func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
545 _, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
546 if e1 != 0 {
547 err = errnoErr(e1)
548 }
549 return
550 }
551
552 func libc_getattrlist_trampoline()
553
554 //go:linkname libc_getattrlist libc_getattrlist
555 //go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib"
375556
376557 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
377558
378559 func pipe() (r int, w int, err error) {
379 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
560 r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
380561 r = int(r0)
381562 w = int(r1)
382563 if e1 != 0 {
385566 return
386567 }
387568
569 func libc_pipe_trampoline()
570
571 //go:linkname libc_pipe libc_pipe
572 //go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib"
573
574 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
575
576 func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
577 var _p0 *byte
578 _p0, err = BytePtrFromString(path)
579 if err != nil {
580 return
581 }
582 var _p1 *byte
583 _p1, err = BytePtrFromString(attr)
584 if err != nil {
585 return
586 }
587 r0, _, e1 := syscall_syscall6(funcPC(libc_getxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
588 sz = int(r0)
589 if e1 != 0 {
590 err = errnoErr(e1)
591 }
592 return
593 }
594
595 func libc_getxattr_trampoline()
596
597 //go:linkname libc_getxattr libc_getxattr
598 //go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib"
599
600 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
601
602 func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
603 var _p0 *byte
604 _p0, err = BytePtrFromString(attr)
605 if err != nil {
606 return
607 }
608 r0, _, e1 := syscall_syscall6(funcPC(libc_fgetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
609 sz = int(r0)
610 if e1 != 0 {
611 err = errnoErr(e1)
612 }
613 return
614 }
615
616 func libc_fgetxattr_trampoline()
617
618 //go:linkname libc_fgetxattr libc_fgetxattr
619 //go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib"
620
621 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
622
623 func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
624 var _p0 *byte
625 _p0, err = BytePtrFromString(path)
626 if err != nil {
627 return
628 }
629 var _p1 *byte
630 _p1, err = BytePtrFromString(attr)
631 if err != nil {
632 return
633 }
634 _, _, e1 := syscall_syscall6(funcPC(libc_setxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
635 if e1 != 0 {
636 err = errnoErr(e1)
637 }
638 return
639 }
640
641 func libc_setxattr_trampoline()
642
643 //go:linkname libc_setxattr libc_setxattr
644 //go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib"
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
649 var _p0 *byte
650 _p0, err = BytePtrFromString(attr)
651 if err != nil {
652 return
653 }
654 _, _, e1 := syscall_syscall6(funcPC(libc_fsetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
655 if e1 != 0 {
656 err = errnoErr(e1)
657 }
658 return
659 }
660
661 func libc_fsetxattr_trampoline()
662
663 //go:linkname libc_fsetxattr libc_fsetxattr
664 //go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib"
665
666 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
667
668 func removexattr(path string, attr string, options int) (err error) {
669 var _p0 *byte
670 _p0, err = BytePtrFromString(path)
671 if err != nil {
672 return
673 }
674 var _p1 *byte
675 _p1, err = BytePtrFromString(attr)
676 if err != nil {
677 return
678 }
679 _, _, e1 := syscall_syscall(funcPC(libc_removexattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
680 if e1 != 0 {
681 err = errnoErr(e1)
682 }
683 return
684 }
685
686 func libc_removexattr_trampoline()
687
688 //go:linkname libc_removexattr libc_removexattr
689 //go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib"
690
691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
692
693 func fremovexattr(fd int, attr string, options int) (err error) {
694 var _p0 *byte
695 _p0, err = BytePtrFromString(attr)
696 if err != nil {
697 return
698 }
699 _, _, e1 := syscall_syscall(funcPC(libc_fremovexattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
700 if e1 != 0 {
701 err = errnoErr(e1)
702 }
703 return
704 }
705
706 func libc_fremovexattr_trampoline()
707
708 //go:linkname libc_fremovexattr libc_fremovexattr
709 //go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib"
710
711 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
712
713 func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
714 var _p0 *byte
715 _p0, err = BytePtrFromString(path)
716 if err != nil {
717 return
718 }
719 r0, _, e1 := syscall_syscall6(funcPC(libc_listxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
720 sz = int(r0)
721 if e1 != 0 {
722 err = errnoErr(e1)
723 }
724 return
725 }
726
727 func libc_listxattr_trampoline()
728
729 //go:linkname libc_listxattr libc_listxattr
730 //go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib"
731
732 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
733
734 func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
735 r0, _, e1 := syscall_syscall6(funcPC(libc_flistxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
736 sz = int(r0)
737 if e1 != 0 {
738 err = errnoErr(e1)
739 }
740 return
741 }
742
743 func libc_flistxattr_trampoline()
744
745 //go:linkname libc_flistxattr libc_flistxattr
746 //go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib"
747
748 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
749
750 func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
751 _, _, e1 := syscall_syscall6(funcPC(libc_setattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
752 if e1 != 0 {
753 err = errnoErr(e1)
754 }
755 return
756 }
757
758 func libc_setattrlist_trampoline()
759
760 //go:linkname libc_setattrlist libc_setattrlist
761 //go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
762
388763 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
389764
390765 func kill(pid int, signum int, posix int) (err error) {
391 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
392 if e1 != 0 {
393 err = errnoErr(e1)
394 }
395 return
396 }
766 _, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix))
767 if e1 != 0 {
768 err = errnoErr(e1)
769 }
770 return
771 }
772
773 func libc_kill_trampoline()
774
775 //go:linkname libc_kill libc_kill
776 //go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib"
397777
398778 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
399779
400780 func ioctl(fd int, req uint, arg uintptr) (err error) {
401 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
402 if e1 != 0 {
403 err = errnoErr(e1)
404 }
405 return
406 }
781 _, _, e1 := syscall_syscall(funcPC(libc_ioctl_trampoline), uintptr(fd), uintptr(req), uintptr(arg))
782 if e1 != 0 {
783 err = errnoErr(e1)
784 }
785 return
786 }
787
788 func libc_ioctl_trampoline()
789
790 //go:linkname libc_ioctl libc_ioctl
791 //go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
792
793 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
794
795 func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
796 _, _, e1 := syscall_syscall6(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
797 if e1 != 0 {
798 err = errnoErr(e1)
799 }
800 return
801 }
802
803 func libc_sendfile_trampoline()
804
805 //go:linkname libc_sendfile libc_sendfile
806 //go:cgo_import_dynamic libc_sendfile sendfile "/usr/lib/libSystem.B.dylib"
407807
408808 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
409809
413813 if err != nil {
414814 return
415815 }
416 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
417 if e1 != 0 {
418 err = errnoErr(e1)
419 }
420 return
421 }
816 _, _, e1 := syscall_syscall(funcPC(libc_access_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
817 if e1 != 0 {
818 err = errnoErr(e1)
819 }
820 return
821 }
822
823 func libc_access_trampoline()
824
825 //go:linkname libc_access libc_access
826 //go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib"
422827
423828 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
424829
425830 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
426 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
427 if e1 != 0 {
428 err = errnoErr(e1)
429 }
430 return
431 }
831 _, _, e1 := syscall_syscall(funcPC(libc_adjtime_trampoline), uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
832 if e1 != 0 {
833 err = errnoErr(e1)
834 }
835 return
836 }
837
838 func libc_adjtime_trampoline()
839
840 //go:linkname libc_adjtime libc_adjtime
841 //go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib"
432842
433843 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
434844
438848 if err != nil {
439849 return
440850 }
441 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
442 if e1 != 0 {
443 err = errnoErr(e1)
444 }
445 return
446 }
851 _, _, e1 := syscall_syscall(funcPC(libc_chdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
852 if e1 != 0 {
853 err = errnoErr(e1)
854 }
855 return
856 }
857
858 func libc_chdir_trampoline()
859
860 //go:linkname libc_chdir libc_chdir
861 //go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib"
447862
448863 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
449864
453868 if err != nil {
454869 return
455870 }
456 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
457 if e1 != 0 {
458 err = errnoErr(e1)
459 }
460 return
461 }
871 _, _, e1 := syscall_syscall(funcPC(libc_chflags_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
872 if e1 != 0 {
873 err = errnoErr(e1)
874 }
875 return
876 }
877
878 func libc_chflags_trampoline()
879
880 //go:linkname libc_chflags libc_chflags
881 //go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib"
462882
463883 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
464884
468888 if err != nil {
469889 return
470890 }
471 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
472 if e1 != 0 {
473 err = errnoErr(e1)
474 }
475 return
476 }
891 _, _, e1 := syscall_syscall(funcPC(libc_chmod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
892 if e1 != 0 {
893 err = errnoErr(e1)
894 }
895 return
896 }
897
898 func libc_chmod_trampoline()
899
900 //go:linkname libc_chmod libc_chmod
901 //go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib"
477902
478903 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
479904
483908 if err != nil {
484909 return
485910 }
486 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
487 if e1 != 0 {
488 err = errnoErr(e1)
489 }
490 return
491 }
911 _, _, e1 := syscall_syscall(funcPC(libc_chown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
912 if e1 != 0 {
913 err = errnoErr(e1)
914 }
915 return
916 }
917
918 func libc_chown_trampoline()
919
920 //go:linkname libc_chown libc_chown
921 //go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib"
492922
493923 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
494924
498928 if err != nil {
499929 return
500930 }
501 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
502 if e1 != 0 {
503 err = errnoErr(e1)
504 }
505 return
506 }
931 _, _, e1 := syscall_syscall(funcPC(libc_chroot_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
932 if e1 != 0 {
933 err = errnoErr(e1)
934 }
935 return
936 }
937
938 func libc_chroot_trampoline()
939
940 //go:linkname libc_chroot libc_chroot
941 //go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib"
507942
508943 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
509944
510945 func Close(fd int) (err error) {
511 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
512 if e1 != 0 {
513 err = errnoErr(e1)
514 }
515 return
516 }
946 _, _, e1 := syscall_syscall(funcPC(libc_close_trampoline), uintptr(fd), 0, 0)
947 if e1 != 0 {
948 err = errnoErr(e1)
949 }
950 return
951 }
952
953 func libc_close_trampoline()
954
955 //go:linkname libc_close libc_close
956 //go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib"
517957
518958 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
519959
520960 func Dup(fd int) (nfd int, err error) {
521 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
961 r0, _, e1 := syscall_syscall(funcPC(libc_dup_trampoline), uintptr(fd), 0, 0)
522962 nfd = int(r0)
523963 if e1 != 0 {
524964 err = errnoErr(e1)
526966 return
527967 }
528968
969 func libc_dup_trampoline()
970
971 //go:linkname libc_dup libc_dup
972 //go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib"
973
529974 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
530975
531976 func Dup2(from int, to int) (err error) {
532 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
533 if e1 != 0 {
534 err = errnoErr(e1)
535 }
536 return
537 }
977 _, _, e1 := syscall_syscall(funcPC(libc_dup2_trampoline), uintptr(from), uintptr(to), 0)
978 if e1 != 0 {
979 err = errnoErr(e1)
980 }
981 return
982 }
983
984 func libc_dup2_trampoline()
985
986 //go:linkname libc_dup2 libc_dup2
987 //go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib"
538988
539989 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
540990
549999 if err != nil {
5501000 return
5511001 }
552 _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
553 if e1 != 0 {
554 err = errnoErr(e1)
555 }
556 return
557 }
1002 _, _, e1 := syscall_syscall(funcPC(libc_exchangedata_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
1003 if e1 != 0 {
1004 err = errnoErr(e1)
1005 }
1006 return
1007 }
1008
1009 func libc_exchangedata_trampoline()
1010
1011 //go:linkname libc_exchangedata libc_exchangedata
1012 //go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib"
5581013
5591014 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5601015
5611016 func Exit(code int) {
562 Syscall(SYS_EXIT, uintptr(code), 0, 0)
563 return
564 }
1017 syscall_syscall(funcPC(libc_exit_trampoline), uintptr(code), 0, 0)
1018 return
1019 }
1020
1021 func libc_exit_trampoline()
1022
1023 //go:linkname libc_exit libc_exit
1024 //go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib"
5651025
5661026 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5671027
5711031 if err != nil {
5721032 return
5731033 }
574 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
575 if e1 != 0 {
576 err = errnoErr(e1)
577 }
578 return
579 }
1034 _, _, e1 := syscall_syscall6(funcPC(libc_faccessat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
1035 if e1 != 0 {
1036 err = errnoErr(e1)
1037 }
1038 return
1039 }
1040
1041 func libc_faccessat_trampoline()
1042
1043 //go:linkname libc_faccessat libc_faccessat
1044 //go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib"
5801045
5811046 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5821047
5831048 func Fchdir(fd int) (err error) {
584 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
585 if e1 != 0 {
586 err = errnoErr(e1)
587 }
588 return
589 }
1049 _, _, e1 := syscall_syscall(funcPC(libc_fchdir_trampoline), uintptr(fd), 0, 0)
1050 if e1 != 0 {
1051 err = errnoErr(e1)
1052 }
1053 return
1054 }
1055
1056 func libc_fchdir_trampoline()
1057
1058 //go:linkname libc_fchdir libc_fchdir
1059 //go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib"
5901060
5911061 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
5921062
5931063 func Fchflags(fd int, flags int) (err error) {
594 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
595 if e1 != 0 {
596 err = errnoErr(e1)
597 }
598 return
599 }
1064 _, _, e1 := syscall_syscall(funcPC(libc_fchflags_trampoline), uintptr(fd), uintptr(flags), 0)
1065 if e1 != 0 {
1066 err = errnoErr(e1)
1067 }
1068 return
1069 }
1070
1071 func libc_fchflags_trampoline()
1072
1073 //go:linkname libc_fchflags libc_fchflags
1074 //go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib"
6001075
6011076 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6021077
6031078 func Fchmod(fd int, mode uint32) (err error) {
604 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
605 if e1 != 0 {
606 err = errnoErr(e1)
607 }
608 return
609 }
1079 _, _, e1 := syscall_syscall(funcPC(libc_fchmod_trampoline), uintptr(fd), uintptr(mode), 0)
1080 if e1 != 0 {
1081 err = errnoErr(e1)
1082 }
1083 return
1084 }
1085
1086 func libc_fchmod_trampoline()
1087
1088 //go:linkname libc_fchmod libc_fchmod
1089 //go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib"
6101090
6111091 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6121092
6161096 if err != nil {
6171097 return
6181098 }
619 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
620 if e1 != 0 {
621 err = errnoErr(e1)
622 }
623 return
624 }
1099 _, _, e1 := syscall_syscall6(funcPC(libc_fchmodat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 func libc_fchmodat_trampoline()
1107
1108 //go:linkname libc_fchmodat libc_fchmodat
1109 //go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib"
6251110
6261111 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6271112
6281113 func Fchown(fd int, uid int, gid int) (err error) {
629 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
630 if e1 != 0 {
631 err = errnoErr(e1)
632 }
633 return
634 }
1114 _, _, e1 := syscall_syscall(funcPC(libc_fchown_trampoline), uintptr(fd), uintptr(uid), uintptr(gid))
1115 if e1 != 0 {
1116 err = errnoErr(e1)
1117 }
1118 return
1119 }
1120
1121 func libc_fchown_trampoline()
1122
1123 //go:linkname libc_fchown libc_fchown
1124 //go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib"
6351125
6361126 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6371127
6411131 if err != nil {
6421132 return
6431133 }
644 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
645 if e1 != 0 {
646 err = errnoErr(e1)
647 }
648 return
649 }
1134 _, _, e1 := syscall_syscall6(funcPC(libc_fchownat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
1135 if e1 != 0 {
1136 err = errnoErr(e1)
1137 }
1138 return
1139 }
1140
1141 func libc_fchownat_trampoline()
1142
1143 //go:linkname libc_fchownat libc_fchownat
1144 //go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib"
6501145
6511146 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6521147
6531148 func Flock(fd int, how int) (err error) {
654 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
655 if e1 != 0 {
656 err = errnoErr(e1)
657 }
658 return
659 }
1149 _, _, e1 := syscall_syscall(funcPC(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
1150 if e1 != 0 {
1151 err = errnoErr(e1)
1152 }
1153 return
1154 }
1155
1156 func libc_flock_trampoline()
1157
1158 //go:linkname libc_flock libc_flock
1159 //go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib"
6601160
6611161 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6621162
6631163 func Fpathconf(fd int, name int) (val int, err error) {
664 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
1164 r0, _, e1 := syscall_syscall(funcPC(libc_fpathconf_trampoline), uintptr(fd), uintptr(name), 0)
6651165 val = int(r0)
6661166 if e1 != 0 {
6671167 err = errnoErr(e1)
6691169 return
6701170 }
6711171
672 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
673
674 func Fstat(fd int, stat *Stat_t) (err error) {
675 _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
676 if e1 != 0 {
677 err = errnoErr(e1)
678 }
679 return
680 }
681
682 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
683
684 func Fstatfs(fd int, stat *Statfs_t) (err error) {
685 _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
686 if e1 != 0 {
687 err = errnoErr(e1)
688 }
689 return
690 }
1172 func libc_fpathconf_trampoline()
1173
1174 //go:linkname libc_fpathconf libc_fpathconf
1175 //go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib"
6911176
6921177 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
6931178
6941179 func Fsync(fd int) (err error) {
695 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
696 if e1 != 0 {
697 err = errnoErr(e1)
698 }
699 return
700 }
1180 _, _, e1 := syscall_syscall(funcPC(libc_fsync_trampoline), uintptr(fd), 0, 0)
1181 if e1 != 0 {
1182 err = errnoErr(e1)
1183 }
1184 return
1185 }
1186
1187 func libc_fsync_trampoline()
1188
1189 //go:linkname libc_fsync libc_fsync
1190 //go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib"
7011191
7021192 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7031193
7041194 func Ftruncate(fd int, length int64) (err error) {
705 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
706 if e1 != 0 {
707 err = errnoErr(e1)
708 }
709 return
710 }
711
712 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
713
714 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
715 var _p0 unsafe.Pointer
716 if len(buf) > 0 {
717 _p0 = unsafe.Pointer(&buf[0])
718 } else {
719 _p0 = unsafe.Pointer(&_zero)
720 }
721 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
722 n = int(r0)
723 if e1 != 0 {
724 err = errnoErr(e1)
725 }
726 return
727 }
1195 _, _, e1 := syscall_syscall(funcPC(libc_ftruncate_trampoline), uintptr(fd), uintptr(length), 0)
1196 if e1 != 0 {
1197 err = errnoErr(e1)
1198 }
1199 return
1200 }
1201
1202 func libc_ftruncate_trampoline()
1203
1204 //go:linkname libc_ftruncate libc_ftruncate
1205 //go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib"
7281206
7291207 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7301208
7311209 func Getdtablesize() (size int) {
732 r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
1210 r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
7331211 size = int(r0)
7341212 return
7351213 }
7361214
1215 func libc_getdtablesize_trampoline()
1216
1217 //go:linkname libc_getdtablesize libc_getdtablesize
1218 //go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib"
1219
7371220 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7381221
7391222 func Getegid() (egid int) {
740 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
1223 r0, _, _ := syscall_rawSyscall(funcPC(libc_getegid_trampoline), 0, 0, 0)
7411224 egid = int(r0)
7421225 return
7431226 }
7441227
1228 func libc_getegid_trampoline()
1229
1230 //go:linkname libc_getegid libc_getegid
1231 //go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib"
1232
7451233 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7461234
7471235 func Geteuid() (uid int) {
748 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
1236 r0, _, _ := syscall_rawSyscall(funcPC(libc_geteuid_trampoline), 0, 0, 0)
7491237 uid = int(r0)
7501238 return
7511239 }
7521240
1241 func libc_geteuid_trampoline()
1242
1243 //go:linkname libc_geteuid libc_geteuid
1244 //go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib"
1245
7531246 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7541247
7551248 func Getgid() (gid int) {
756 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
1249 r0, _, _ := syscall_rawSyscall(funcPC(libc_getgid_trampoline), 0, 0, 0)
7571250 gid = int(r0)
7581251 return
7591252 }
7601253
1254 func libc_getgid_trampoline()
1255
1256 //go:linkname libc_getgid libc_getgid
1257 //go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib"
1258
7611259 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7621260
7631261 func Getpgid(pid int) (pgid int, err error) {
764 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
1262 r0, _, e1 := syscall_rawSyscall(funcPC(libc_getpgid_trampoline), uintptr(pid), 0, 0)
7651263 pgid = int(r0)
7661264 if e1 != 0 {
7671265 err = errnoErr(e1)
7691267 return
7701268 }
7711269
1270 func libc_getpgid_trampoline()
1271
1272 //go:linkname libc_getpgid libc_getpgid
1273 //go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib"
1274
7721275 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7731276
7741277 func Getpgrp() (pgrp int) {
775 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
1278 r0, _, _ := syscall_rawSyscall(funcPC(libc_getpgrp_trampoline), 0, 0, 0)
7761279 pgrp = int(r0)
7771280 return
7781281 }
7791282
1283 func libc_getpgrp_trampoline()
1284
1285 //go:linkname libc_getpgrp libc_getpgrp
1286 //go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib"
1287
7801288 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7811289
7821290 func Getpid() (pid int) {
783 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
1291 r0, _, _ := syscall_rawSyscall(funcPC(libc_getpid_trampoline), 0, 0, 0)
7841292 pid = int(r0)
7851293 return
7861294 }
7871295
1296 func libc_getpid_trampoline()
1297
1298 //go:linkname libc_getpid libc_getpid
1299 //go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib"
1300
7881301 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7891302
7901303 func Getppid() (ppid int) {
791 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
1304 r0, _, _ := syscall_rawSyscall(funcPC(libc_getppid_trampoline), 0, 0, 0)
7921305 ppid = int(r0)
7931306 return
7941307 }
7951308
1309 func libc_getppid_trampoline()
1310
1311 //go:linkname libc_getppid libc_getppid
1312 //go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib"
1313
7961314 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7971315
7981316 func Getpriority(which int, who int) (prio int, err error) {
799 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
1317 r0, _, e1 := syscall_syscall(funcPC(libc_getpriority_trampoline), uintptr(which), uintptr(who), 0)
8001318 prio = int(r0)
8011319 if e1 != 0 {
8021320 err = errnoErr(e1)
8041322 return
8051323 }
8061324
1325 func libc_getpriority_trampoline()
1326
1327 //go:linkname libc_getpriority libc_getpriority
1328 //go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib"
1329
8071330 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8081331
8091332 func Getrlimit(which int, lim *Rlimit) (err error) {
810 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
811 if e1 != 0 {
812 err = errnoErr(e1)
813 }
814 return
815 }
1333 _, _, e1 := syscall_rawSyscall(funcPC(libc_getrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1334 if e1 != 0 {
1335 err = errnoErr(e1)
1336 }
1337 return
1338 }
1339
1340 func libc_getrlimit_trampoline()
1341
1342 //go:linkname libc_getrlimit libc_getrlimit
1343 //go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib"
8161344
8171345 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8181346
8191347 func Getrusage(who int, rusage *Rusage) (err error) {
820 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
821 if e1 != 0 {
822 err = errnoErr(e1)
823 }
824 return
825 }
1348 _, _, e1 := syscall_rawSyscall(funcPC(libc_getrusage_trampoline), uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
1349 if e1 != 0 {
1350 err = errnoErr(e1)
1351 }
1352 return
1353 }
1354
1355 func libc_getrusage_trampoline()
1356
1357 //go:linkname libc_getrusage libc_getrusage
1358 //go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib"
8261359
8271360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8281361
8291362 func Getsid(pid int) (sid int, err error) {
830 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
1363 r0, _, e1 := syscall_rawSyscall(funcPC(libc_getsid_trampoline), uintptr(pid), 0, 0)
8311364 sid = int(r0)
8321365 if e1 != 0 {
8331366 err = errnoErr(e1)
8351368 return
8361369 }
8371370
1371 func libc_getsid_trampoline()
1372
1373 //go:linkname libc_getsid libc_getsid
1374 //go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib"
1375
8381376 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8391377
8401378 func Getuid() (uid int) {
841 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
1379 r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
8421380 uid = int(r0)
8431381 return
8441382 }
8451383
1384 func libc_getuid_trampoline()
1385
1386 //go:linkname libc_getuid libc_getuid
1387 //go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib"
1388
8461389 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8471390
8481391 func Issetugid() (tainted bool) {
849 r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
1392 r0, _, _ := syscall_rawSyscall(funcPC(libc_issetugid_trampoline), 0, 0, 0)
8501393 tainted = bool(r0 != 0)
8511394 return
8521395 }
8531396
1397 func libc_issetugid_trampoline()
1398
1399 //go:linkname libc_issetugid libc_issetugid
1400 //go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib"
1401
8541402 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8551403
8561404 func Kqueue() (fd int, err error) {
857 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
1405 r0, _, e1 := syscall_syscall(funcPC(libc_kqueue_trampoline), 0, 0, 0)
8581406 fd = int(r0)
8591407 if e1 != 0 {
8601408 err = errnoErr(e1)
8621410 return
8631411 }
8641412
1413 func libc_kqueue_trampoline()
1414
1415 //go:linkname libc_kqueue libc_kqueue
1416 //go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib"
1417
8651418 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8661419
8671420 func Lchown(path string, uid int, gid int) (err error) {
8701423 if err != nil {
8711424 return
8721425 }
873 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
874 if e1 != 0 {
875 err = errnoErr(e1)
876 }
877 return
878 }
1426 _, _, e1 := syscall_syscall(funcPC(libc_lchown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
1427 if e1 != 0 {
1428 err = errnoErr(e1)
1429 }
1430 return
1431 }
1432
1433 func libc_lchown_trampoline()
1434
1435 //go:linkname libc_lchown libc_lchown
1436 //go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib"
8791437
8801438 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8811439
8901448 if err != nil {
8911449 return
8921450 }
893 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
894 if e1 != 0 {
895 err = errnoErr(e1)
896 }
897 return
898 }
1451 _, _, e1 := syscall_syscall(funcPC(libc_link_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1452 if e1 != 0 {
1453 err = errnoErr(e1)
1454 }
1455 return
1456 }
1457
1458 func libc_link_trampoline()
1459
1460 //go:linkname libc_link libc_link
1461 //go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib"
8991462
9001463 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9011464
9101473 if err != nil {
9111474 return
9121475 }
913 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
914 if e1 != 0 {
915 err = errnoErr(e1)
916 }
917 return
918 }
1476 _, _, e1 := syscall_syscall6(funcPC(libc_linkat_trampoline), uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1477 if e1 != 0 {
1478 err = errnoErr(e1)
1479 }
1480 return
1481 }
1482
1483 func libc_linkat_trampoline()
1484
1485 //go:linkname libc_linkat libc_linkat
1486 //go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib"
9191487
9201488 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9211489
9221490 func Listen(s int, backlog int) (err error) {
923 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
924 if e1 != 0 {
925 err = errnoErr(e1)
926 }
927 return
928 }
929
930 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
931
932 func Lstat(path string, stat *Stat_t) (err error) {
933 var _p0 *byte
934 _p0, err = BytePtrFromString(path)
935 if err != nil {
936 return
937 }
938 _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
939 if e1 != 0 {
940 err = errnoErr(e1)
941 }
942 return
943 }
1491 _, _, e1 := syscall_syscall(funcPC(libc_listen_trampoline), uintptr(s), uintptr(backlog), 0)
1492 if e1 != 0 {
1493 err = errnoErr(e1)
1494 }
1495 return
1496 }
1497
1498 func libc_listen_trampoline()
1499
1500 //go:linkname libc_listen libc_listen
1501 //go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib"
9441502
9451503 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9461504
9501508 if err != nil {
9511509 return
9521510 }
953 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
954 if e1 != 0 {
955 err = errnoErr(e1)
956 }
957 return
958 }
1511 _, _, e1 := syscall_syscall(funcPC(libc_mkdir_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1512 if e1 != 0 {
1513 err = errnoErr(e1)
1514 }
1515 return
1516 }
1517
1518 func libc_mkdir_trampoline()
1519
1520 //go:linkname libc_mkdir libc_mkdir
1521 //go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib"
9591522
9601523 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9611524
9651528 if err != nil {
9661529 return
9671530 }
968 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
969 if e1 != 0 {
970 err = errnoErr(e1)
971 }
972 return
973 }
1531 _, _, e1 := syscall_syscall(funcPC(libc_mkdirat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1532 if e1 != 0 {
1533 err = errnoErr(e1)
1534 }
1535 return
1536 }
1537
1538 func libc_mkdirat_trampoline()
1539
1540 //go:linkname libc_mkdirat libc_mkdirat
1541 //go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib"
9741542
9751543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9761544
9801548 if err != nil {
9811549 return
9821550 }
983 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
984 if e1 != 0 {
985 err = errnoErr(e1)
986 }
987 return
988 }
1551 _, _, e1 := syscall_syscall(funcPC(libc_mkfifo_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1552 if e1 != 0 {
1553 err = errnoErr(e1)
1554 }
1555 return
1556 }
1557
1558 func libc_mkfifo_trampoline()
1559
1560 //go:linkname libc_mkfifo libc_mkfifo
1561 //go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib"
9891562
9901563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9911564
9951568 if err != nil {
9961569 return
9971570 }
998 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
999 if e1 != 0 {
1000 err = errnoErr(e1)
1001 }
1002 return
1003 }
1571 _, _, e1 := syscall_syscall(funcPC(libc_mknod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1572 if e1 != 0 {
1573 err = errnoErr(e1)
1574 }
1575 return
1576 }
1577
1578 func libc_mknod_trampoline()
1579
1580 //go:linkname libc_mknod libc_mknod
1581 //go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib"
10041582
10051583 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10061584
10101588 if err != nil {
10111589 return
10121590 }
1013 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1591 r0, _, e1 := syscall_syscall(funcPC(libc_open_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
10141592 fd = int(r0)
10151593 if e1 != 0 {
10161594 err = errnoErr(e1)
10181596 return
10191597 }
10201598
1599 func libc_open_trampoline()
1600
1601 //go:linkname libc_open libc_open
1602 //go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib"
1603
10211604 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10221605
10231606 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
10261609 if err != nil {
10271610 return
10281611 }
1029 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
1612 r0, _, e1 := syscall_syscall6(funcPC(libc_openat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
10301613 fd = int(r0)
10311614 if e1 != 0 {
10321615 err = errnoErr(e1)
10341617 return
10351618 }
10361619
1620 func libc_openat_trampoline()
1621
1622 //go:linkname libc_openat libc_openat
1623 //go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib"
1624
10371625 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10381626
10391627 func Pathconf(path string, name int) (val int, err error) {
10421630 if err != nil {
10431631 return
10441632 }
1045 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1633 r0, _, e1 := syscall_syscall(funcPC(libc_pathconf_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
10461634 val = int(r0)
10471635 if e1 != 0 {
10481636 err = errnoErr(e1)
10491637 }
10501638 return
10511639 }
1640
1641 func libc_pathconf_trampoline()
1642
1643 //go:linkname libc_pathconf libc_pathconf
1644 //go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib"
10521645
10531646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10541647
10591652 } else {
10601653 _p0 = unsafe.Pointer(&_zero)
10611654 }
1062 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1655 r0, _, e1 := syscall_syscall6(funcPC(libc_pread_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
10631656 n = int(r0)
10641657 if e1 != 0 {
10651658 err = errnoErr(e1)
10661659 }
10671660 return
10681661 }
1662
1663 func libc_pread_trampoline()
1664
1665 //go:linkname libc_pread libc_pread
1666 //go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib"
10691667
10701668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10711669
10761674 } else {
10771675 _p0 = unsafe.Pointer(&_zero)
10781676 }
1079 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1677 r0, _, e1 := syscall_syscall6(funcPC(libc_pwrite_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
10801678 n = int(r0)
10811679 if e1 != 0 {
10821680 err = errnoErr(e1)
10831681 }
10841682 return
10851683 }
1684
1685 func libc_pwrite_trampoline()
1686
1687 //go:linkname libc_pwrite libc_pwrite
1688 //go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib"
10861689
10871690 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10881691
10931696 } else {
10941697 _p0 = unsafe.Pointer(&_zero)
10951698 }
1096 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1699 r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
10971700 n = int(r0)
10981701 if e1 != 0 {
10991702 err = errnoErr(e1)
11001703 }
11011704 return
11021705 }
1706
1707 func libc_read_trampoline()
1708
1709 //go:linkname libc_read libc_read
1710 //go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib"
11031711
11041712 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11051713
11151723 } else {
11161724 _p1 = unsafe.Pointer(&_zero)
11171725 }
1118 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1726 r0, _, e1 := syscall_syscall(funcPC(libc_readlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
11191727 n = int(r0)
11201728 if e1 != 0 {
11211729 err = errnoErr(e1)
11221730 }
11231731 return
11241732 }
1733
1734 func libc_readlink_trampoline()
1735
1736 //go:linkname libc_readlink libc_readlink
1737 //go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib"
11251738
11261739 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11271740
11371750 } else {
11381751 _p1 = unsafe.Pointer(&_zero)
11391752 }
1140 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1753 r0, _, e1 := syscall_syscall6(funcPC(libc_readlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
11411754 n = int(r0)
11421755 if e1 != 0 {
11431756 err = errnoErr(e1)
11441757 }
11451758 return
11461759 }
1760
1761 func libc_readlinkat_trampoline()
1762
1763 //go:linkname libc_readlinkat libc_readlinkat
1764 //go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib"
11471765
11481766 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11491767
11581776 if err != nil {
11591777 return
11601778 }
1161 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1162 if e1 != 0 {
1163 err = errnoErr(e1)
1164 }
1165 return
1166 }
1779 _, _, e1 := syscall_syscall(funcPC(libc_rename_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1780 if e1 != 0 {
1781 err = errnoErr(e1)
1782 }
1783 return
1784 }
1785
1786 func libc_rename_trampoline()
1787
1788 //go:linkname libc_rename libc_rename
1789 //go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib"
11671790
11681791 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11691792
11781801 if err != nil {
11791802 return
11801803 }
1181 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1182 if e1 != 0 {
1183 err = errnoErr(e1)
1184 }
1185 return
1186 }
1804 _, _, e1 := syscall_syscall6(funcPC(libc_renameat_trampoline), uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1805 if e1 != 0 {
1806 err = errnoErr(e1)
1807 }
1808 return
1809 }
1810
1811 func libc_renameat_trampoline()
1812
1813 //go:linkname libc_renameat libc_renameat
1814 //go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib"
11871815
11881816 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11891817
11931821 if err != nil {
11941822 return
11951823 }
1196 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1197 if e1 != 0 {
1198 err = errnoErr(e1)
1199 }
1200 return
1201 }
1824 _, _, e1 := syscall_syscall(funcPC(libc_revoke_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1825 if e1 != 0 {
1826 err = errnoErr(e1)
1827 }
1828 return
1829 }
1830
1831 func libc_revoke_trampoline()
1832
1833 //go:linkname libc_revoke libc_revoke
1834 //go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib"
12021835
12031836 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12041837
12081841 if err != nil {
12091842 return
12101843 }
1211 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
1212 if e1 != 0 {
1213 err = errnoErr(e1)
1214 }
1215 return
1216 }
1844 _, _, e1 := syscall_syscall(funcPC(libc_rmdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1845 if e1 != 0 {
1846 err = errnoErr(e1)
1847 }
1848 return
1849 }
1850
1851 func libc_rmdir_trampoline()
1852
1853 //go:linkname libc_rmdir libc_rmdir
1854 //go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib"
12171855
12181856 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12191857
12201858 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1221 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
1859 r0, _, e1 := syscall_syscall(funcPC(libc_lseek_trampoline), uintptr(fd), uintptr(offset), uintptr(whence))
12221860 newoffset = int64(r0)
12231861 if e1 != 0 {
12241862 err = errnoErr(e1)
12261864 return
12271865 }
12281866
1867 func libc_lseek_trampoline()
1868
1869 //go:linkname libc_lseek libc_lseek
1870 //go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib"
1871
12291872 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12301873
12311874 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1232 _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1233 if e1 != 0 {
1234 err = errnoErr(e1)
1235 }
1236 return
1237 }
1875 _, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1876 if e1 != 0 {
1877 err = errnoErr(e1)
1878 }
1879 return
1880 }
1881
1882 func libc_select_trampoline()
1883
1884 //go:linkname libc_select libc_select
1885 //go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib"
12381886
12391887 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12401888
12411889 func Setegid(egid int) (err error) {
1242 _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
1243 if e1 != 0 {
1244 err = errnoErr(e1)
1245 }
1246 return
1247 }
1890 _, _, e1 := syscall_syscall(funcPC(libc_setegid_trampoline), uintptr(egid), 0, 0)
1891 if e1 != 0 {
1892 err = errnoErr(e1)
1893 }
1894 return
1895 }
1896
1897 func libc_setegid_trampoline()
1898
1899 //go:linkname libc_setegid libc_setegid
1900 //go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib"
12481901
12491902 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12501903
12511904 func Seteuid(euid int) (err error) {
1252 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
1253 if e1 != 0 {
1254 err = errnoErr(e1)
1255 }
1256 return
1257 }
1905 _, _, e1 := syscall_rawSyscall(funcPC(libc_seteuid_trampoline), uintptr(euid), 0, 0)
1906 if e1 != 0 {
1907 err = errnoErr(e1)
1908 }
1909 return
1910 }
1911
1912 func libc_seteuid_trampoline()
1913
1914 //go:linkname libc_seteuid libc_seteuid
1915 //go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib"
12581916
12591917 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12601918
12611919 func Setgid(gid int) (err error) {
1262 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
1263 if e1 != 0 {
1264 err = errnoErr(e1)
1265 }
1266 return
1267 }
1920 _, _, e1 := syscall_rawSyscall(funcPC(libc_setgid_trampoline), uintptr(gid), 0, 0)
1921 if e1 != 0 {
1922 err = errnoErr(e1)
1923 }
1924 return
1925 }
1926
1927 func libc_setgid_trampoline()
1928
1929 //go:linkname libc_setgid libc_setgid
1930 //go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib"
12681931
12691932 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12701933
12741937 if err != nil {
12751938 return
12761939 }
1277 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
1278 if e1 != 0 {
1279 err = errnoErr(e1)
1280 }
1281 return
1282 }
1940 _, _, e1 := syscall_syscall(funcPC(libc_setlogin_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
1941 if e1 != 0 {
1942 err = errnoErr(e1)
1943 }
1944 return
1945 }
1946
1947 func libc_setlogin_trampoline()
1948
1949 //go:linkname libc_setlogin libc_setlogin
1950 //go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib"
12831951
12841952 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12851953
12861954 func Setpgid(pid int, pgid int) (err error) {
1287 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
1288 if e1 != 0 {
1289 err = errnoErr(e1)
1290 }
1291 return
1292 }
1955 _, _, e1 := syscall_rawSyscall(funcPC(libc_setpgid_trampoline), uintptr(pid), uintptr(pgid), 0)
1956 if e1 != 0 {
1957 err = errnoErr(e1)
1958 }
1959 return
1960 }
1961
1962 func libc_setpgid_trampoline()
1963
1964 //go:linkname libc_setpgid libc_setpgid
1965 //go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib"
12931966
12941967 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12951968
12961969 func Setpriority(which int, who int, prio int) (err error) {
1297 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
1298 if e1 != 0 {
1299 err = errnoErr(e1)
1300 }
1301 return
1302 }
1970 _, _, e1 := syscall_syscall(funcPC(libc_setpriority_trampoline), uintptr(which), uintptr(who), uintptr(prio))
1971 if e1 != 0 {
1972 err = errnoErr(e1)
1973 }
1974 return
1975 }
1976
1977 func libc_setpriority_trampoline()
1978
1979 //go:linkname libc_setpriority libc_setpriority
1980 //go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib"
13031981
13041982 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13051983
13061984 func Setprivexec(flag int) (err error) {
1307 _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
1308 if e1 != 0 {
1309 err = errnoErr(e1)
1310 }
1311 return
1312 }
1985 _, _, e1 := syscall_syscall(funcPC(libc_setprivexec_trampoline), uintptr(flag), 0, 0)
1986 if e1 != 0 {
1987 err = errnoErr(e1)
1988 }
1989 return
1990 }
1991
1992 func libc_setprivexec_trampoline()
1993
1994 //go:linkname libc_setprivexec libc_setprivexec
1995 //go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib"
13131996
13141997 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13151998
13161999 func Setregid(rgid int, egid int) (err error) {
1317 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
1318 if e1 != 0 {
1319 err = errnoErr(e1)
1320 }
1321 return
1322 }
2000 _, _, e1 := syscall_rawSyscall(funcPC(libc_setregid_trampoline), uintptr(rgid), uintptr(egid), 0)
2001 if e1 != 0 {
2002 err = errnoErr(e1)
2003 }
2004 return
2005 }
2006
2007 func libc_setregid_trampoline()
2008
2009 //go:linkname libc_setregid libc_setregid
2010 //go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib"
13232011
13242012 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13252013
13262014 func Setreuid(ruid int, euid int) (err error) {
1327 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
1328 if e1 != 0 {
1329 err = errnoErr(e1)
1330 }
1331 return
1332 }
2015 _, _, e1 := syscall_rawSyscall(funcPC(libc_setreuid_trampoline), uintptr(ruid), uintptr(euid), 0)
2016 if e1 != 0 {
2017 err = errnoErr(e1)
2018 }
2019 return
2020 }
2021
2022 func libc_setreuid_trampoline()
2023
2024 //go:linkname libc_setreuid libc_setreuid
2025 //go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib"
13332026
13342027 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13352028
13362029 func Setrlimit(which int, lim *Rlimit) (err error) {
1337 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1338 if e1 != 0 {
1339 err = errnoErr(e1)
1340 }
1341 return
1342 }
2030 _, _, e1 := syscall_rawSyscall(funcPC(libc_setrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
2031 if e1 != 0 {
2032 err = errnoErr(e1)
2033 }
2034 return
2035 }
2036
2037 func libc_setrlimit_trampoline()
2038
2039 //go:linkname libc_setrlimit libc_setrlimit
2040 //go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
13432041
13442042 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13452043
13462044 func Setsid() (pid int, err error) {
1347 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
2045 r0, _, e1 := syscall_rawSyscall(funcPC(libc_setsid_trampoline), 0, 0, 0)
13482046 pid = int(r0)
13492047 if e1 != 0 {
13502048 err = errnoErr(e1)
13522050 return
13532051 }
13542052
2053 func libc_setsid_trampoline()
2054
2055 //go:linkname libc_setsid libc_setsid
2056 //go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib"
2057
13552058 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13562059
13572060 func Settimeofday(tp *Timeval) (err error) {
1358 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1359 if e1 != 0 {
1360 err = errnoErr(e1)
1361 }
1362 return
1363 }
2061 _, _, e1 := syscall_rawSyscall(funcPC(libc_settimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
2062 if e1 != 0 {
2063 err = errnoErr(e1)
2064 }
2065 return
2066 }
2067
2068 func libc_settimeofday_trampoline()
2069
2070 //go:linkname libc_settimeofday libc_settimeofday
2071 //go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib"
13642072
13652073 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13662074
13672075 func Setuid(uid int) (err error) {
1368 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
1369 if e1 != 0 {
1370 err = errnoErr(e1)
1371 }
1372 return
1373 }
1374
1375 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1376
1377 func Stat(path string, stat *Stat_t) (err error) {
1378 var _p0 *byte
1379 _p0, err = BytePtrFromString(path)
1380 if err != nil {
1381 return
1382 }
1383 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1384 if e1 != 0 {
1385 err = errnoErr(e1)
1386 }
1387 return
1388 }
1389
1390 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1391
1392 func Statfs(path string, stat *Statfs_t) (err error) {
1393 var _p0 *byte
1394 _p0, err = BytePtrFromString(path)
1395 if err != nil {
1396 return
1397 }
1398 _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1399 if e1 != 0 {
1400 err = errnoErr(e1)
1401 }
1402 return
1403 }
2076 _, _, e1 := syscall_rawSyscall(funcPC(libc_setuid_trampoline), uintptr(uid), 0, 0)
2077 if e1 != 0 {
2078 err = errnoErr(e1)
2079 }
2080 return
2081 }
2082
2083 func libc_setuid_trampoline()
2084
2085 //go:linkname libc_setuid libc_setuid
2086 //go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib"
14042087
14052088 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14062089
14152098 if err != nil {
14162099 return
14172100 }
1418 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1419 if e1 != 0 {
1420 err = errnoErr(e1)
1421 }
1422 return
1423 }
2101 _, _, e1 := syscall_syscall(funcPC(libc_symlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
2102 if e1 != 0 {
2103 err = errnoErr(e1)
2104 }
2105 return
2106 }
2107
2108 func libc_symlink_trampoline()
2109
2110 //go:linkname libc_symlink libc_symlink
2111 //go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib"
14242112
14252113 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14262114
14352123 if err != nil {
14362124 return
14372125 }
1438 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1439 if e1 != 0 {
1440 err = errnoErr(e1)
1441 }
1442 return
1443 }
2126 _, _, e1 := syscall_syscall(funcPC(libc_symlinkat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
2127 if e1 != 0 {
2128 err = errnoErr(e1)
2129 }
2130 return
2131 }
2132
2133 func libc_symlinkat_trampoline()
2134
2135 //go:linkname libc_symlinkat libc_symlinkat
2136 //go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib"
14442137
14452138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14462139
14472140 func Sync() (err error) {
1448 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
1449 if e1 != 0 {
1450 err = errnoErr(e1)
1451 }
1452 return
1453 }
2141 _, _, e1 := syscall_syscall(funcPC(libc_sync_trampoline), 0, 0, 0)
2142 if e1 != 0 {
2143 err = errnoErr(e1)
2144 }
2145 return
2146 }
2147
2148 func libc_sync_trampoline()
2149
2150 //go:linkname libc_sync libc_sync
2151 //go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib"
14542152
14552153 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14562154
14602158 if err != nil {
14612159 return
14622160 }
1463 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
1464 if e1 != 0 {
1465 err = errnoErr(e1)
1466 }
1467 return
1468 }
2161 _, _, e1 := syscall_syscall(funcPC(libc_truncate_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
2162 if e1 != 0 {
2163 err = errnoErr(e1)
2164 }
2165 return
2166 }
2167
2168 func libc_truncate_trampoline()
2169
2170 //go:linkname libc_truncate libc_truncate
2171 //go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib"
14692172
14702173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14712174
14722175 func Umask(newmask int) (oldmask int) {
1473 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
2176 r0, _, _ := syscall_syscall(funcPC(libc_umask_trampoline), uintptr(newmask), 0, 0)
14742177 oldmask = int(r0)
14752178 return
14762179 }
14772180
2181 func libc_umask_trampoline()
2182
2183 //go:linkname libc_umask libc_umask
2184 //go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib"
2185
14782186 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14792187
14802188 func Undelete(path string) (err error) {
14832191 if err != nil {
14842192 return
14852193 }
1486 _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1487 if e1 != 0 {
1488 err = errnoErr(e1)
1489 }
1490 return
1491 }
2194 _, _, e1 := syscall_syscall(funcPC(libc_undelete_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
2195 if e1 != 0 {
2196 err = errnoErr(e1)
2197 }
2198 return
2199 }
2200
2201 func libc_undelete_trampoline()
2202
2203 //go:linkname libc_undelete libc_undelete
2204 //go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib"
14922205
14932206 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14942207
14982211 if err != nil {
14992212 return
15002213 }
1501 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1502 if e1 != 0 {
1503 err = errnoErr(e1)
1504 }
1505 return
1506 }
2214 _, _, e1 := syscall_syscall(funcPC(libc_unlink_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
2215 if e1 != 0 {
2216 err = errnoErr(e1)
2217 }
2218 return
2219 }
2220
2221 func libc_unlink_trampoline()
2222
2223 //go:linkname libc_unlink libc_unlink
2224 //go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib"
15072225
15082226 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15092227
15132231 if err != nil {
15142232 return
15152233 }
1516 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
1517 if e1 != 0 {
1518 err = errnoErr(e1)
1519 }
1520 return
1521 }
2234 _, _, e1 := syscall_syscall(funcPC(libc_unlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
2235 if e1 != 0 {
2236 err = errnoErr(e1)
2237 }
2238 return
2239 }
2240
2241 func libc_unlinkat_trampoline()
2242
2243 //go:linkname libc_unlinkat libc_unlinkat
2244 //go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib"
15222245
15232246 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15242247
15282251 if err != nil {
15292252 return
15302253 }
1531 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1532 if e1 != 0 {
1533 err = errnoErr(e1)
1534 }
1535 return
1536 }
2254 _, _, e1 := syscall_syscall(funcPC(libc_unmount_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
2255 if e1 != 0 {
2256 err = errnoErr(e1)
2257 }
2258 return
2259 }
2260
2261 func libc_unmount_trampoline()
2262
2263 //go:linkname libc_unmount libc_unmount
2264 //go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib"
15372265
15382266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15392267
15442272 } else {
15452273 _p0 = unsafe.Pointer(&_zero)
15462274 }
1547 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
2275 r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
15482276 n = int(r0)
15492277 if e1 != 0 {
15502278 err = errnoErr(e1)
15522280 return
15532281 }
15542282
2283 func libc_write_trampoline()
2284
2285 //go:linkname libc_write libc_write
2286 //go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib"
2287
15552288 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15562289
15572290 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
1558 r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
2291 r0, _, e1 := syscall_syscall6(funcPC(libc_mmap_trampoline), uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
15592292 ret = uintptr(r0)
15602293 if e1 != 0 {
15612294 err = errnoErr(e1)
15632296 return
15642297 }
15652298
2299 func libc_mmap_trampoline()
2300
2301 //go:linkname libc_mmap libc_mmap
2302 //go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib"
2303
15662304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15672305
15682306 func munmap(addr uintptr, length uintptr) (err error) {
1569 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
1570 if e1 != 0 {
1571 err = errnoErr(e1)
1572 }
1573 return
1574 }
2307 _, _, e1 := syscall_syscall(funcPC(libc_munmap_trampoline), uintptr(addr), uintptr(length), 0)
2308 if e1 != 0 {
2309 err = errnoErr(e1)
2310 }
2311 return
2312 }
2313
2314 func libc_munmap_trampoline()
2315
2316 //go:linkname libc_munmap libc_munmap
2317 //go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib"
15752318
15762319 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15772320
15782321 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
1579 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
2322 r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
15802323 n = int(r0)
15812324 if e1 != 0 {
15822325 err = errnoErr(e1)
15872330 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15882331
15892332 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
1590 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
2333 r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
15912334 n = int(r0)
15922335 if e1 != 0 {
15932336 err = errnoErr(e1)
15982341 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15992342
16002343 func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
1601 r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
2344 r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
16022345 sec = int64(r0)
16032346 usec = int32(r1)
16042347 if e1 != 0 {
16062349 }
16072350 return
16082351 }
2352
2353 func libc_gettimeofday_trampoline()
2354
2355 //go:linkname libc_gettimeofday libc_gettimeofday
2356 //go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
2357
2358 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2359
2360 func Fstat(fd int, stat *Stat_t) (err error) {
2361 _, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
2362 if e1 != 0 {
2363 err = errnoErr(e1)
2364 }
2365 return
2366 }
2367
2368 func libc_fstat_trampoline()
2369
2370 //go:linkname libc_fstat libc_fstat
2371 //go:cgo_import_dynamic libc_fstat fstat "/usr/lib/libSystem.B.dylib"
2372
2373 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2374
2375 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
2376 var _p0 *byte
2377 _p0, err = BytePtrFromString(path)
2378 if err != nil {
2379 return
2380 }
2381 _, _, e1 := syscall_syscall6(funcPC(libc_fstatat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
2382 if e1 != 0 {
2383 err = errnoErr(e1)
2384 }
2385 return
2386 }
2387
2388 func libc_fstatat_trampoline()
2389
2390 //go:linkname libc_fstatat libc_fstatat
2391 //go:cgo_import_dynamic libc_fstatat fstatat "/usr/lib/libSystem.B.dylib"
2392
2393 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2394
2395 func Fstatfs(fd int, stat *Statfs_t) (err error) {
2396 _, _, e1 := syscall_syscall(funcPC(libc_fstatfs_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
2397 if e1 != 0 {
2398 err = errnoErr(e1)
2399 }
2400 return
2401 }
2402
2403 func libc_fstatfs_trampoline()
2404
2405 //go:linkname libc_fstatfs libc_fstatfs
2406 //go:cgo_import_dynamic libc_fstatfs fstatfs "/usr/lib/libSystem.B.dylib"
2407
2408 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2409
2410 func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
2411 r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
2412 n = int(r0)
2413 if e1 != 0 {
2414 err = errnoErr(e1)
2415 }
2416 return
2417 }
2418
2419 func libc_getfsstat_trampoline()
2420
2421 //go:linkname libc_getfsstat libc_getfsstat
2422 //go:cgo_import_dynamic libc_getfsstat getfsstat "/usr/lib/libSystem.B.dylib"
2423
2424 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2425
2426 func Lstat(path string, stat *Stat_t) (err error) {
2427 var _p0 *byte
2428 _p0, err = BytePtrFromString(path)
2429 if err != nil {
2430 return
2431 }
2432 _, _, e1 := syscall_syscall(funcPC(libc_lstat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2433 if e1 != 0 {
2434 err = errnoErr(e1)
2435 }
2436 return
2437 }
2438
2439 func libc_lstat_trampoline()
2440
2441 //go:linkname libc_lstat libc_lstat
2442 //go:cgo_import_dynamic libc_lstat lstat "/usr/lib/libSystem.B.dylib"
2443
2444 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2445
2446 func Stat(path string, stat *Stat_t) (err error) {
2447 var _p0 *byte
2448 _p0, err = BytePtrFromString(path)
2449 if err != nil {
2450 return
2451 }
2452 _, _, e1 := syscall_syscall(funcPC(libc_stat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2453 if e1 != 0 {
2454 err = errnoErr(e1)
2455 }
2456 return
2457 }
2458
2459 func libc_stat_trampoline()
2460
2461 //go:linkname libc_stat libc_stat
2462 //go:cgo_import_dynamic libc_stat stat "/usr/lib/libSystem.B.dylib"
2463
2464 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2465
2466 func Statfs(path string, stat *Statfs_t) (err error) {
2467 var _p0 *byte
2468 _p0, err = BytePtrFromString(path)
2469 if err != nil {
2470 return
2471 }
2472 _, _, e1 := syscall_syscall(funcPC(libc_statfs_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2473 if e1 != 0 {
2474 err = errnoErr(e1)
2475 }
2476 return
2477 }
2478
2479 func libc_statfs_trampoline()
2480
2481 //go:linkname libc_statfs libc_statfs
2482 //go:cgo_import_dynamic libc_statfs statfs "/usr/lib/libSystem.B.dylib"
0 // go run mkasm_darwin.go arm64
1 // Code generated by the command above; DO NOT EDIT.
2
3 // +build go1.12
4
5 #include "textflag.h"
6 TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
7 JMP libc_getgroups(SB)
8 TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
9 JMP libc_setgroups(SB)
10 TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
11 JMP libc_wait4(SB)
12 TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
13 JMP libc_accept(SB)
14 TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
15 JMP libc_bind(SB)
16 TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
17 JMP libc_connect(SB)
18 TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
19 JMP libc_socket(SB)
20 TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
21 JMP libc_getsockopt(SB)
22 TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
23 JMP libc_setsockopt(SB)
24 TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
25 JMP libc_getpeername(SB)
26 TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
27 JMP libc_getsockname(SB)
28 TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
29 JMP libc_shutdown(SB)
30 TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
31 JMP libc_socketpair(SB)
32 TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
33 JMP libc_recvfrom(SB)
34 TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
35 JMP libc_sendto(SB)
36 TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
37 JMP libc_recvmsg(SB)
38 TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
39 JMP libc_sendmsg(SB)
40 TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
41 JMP libc_kevent(SB)
42 TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
43 JMP libc___sysctl(SB)
44 TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
45 JMP libc_utimes(SB)
46 TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
47 JMP libc_futimes(SB)
48 TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
49 JMP libc_fcntl(SB)
50 TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
51 JMP libc_poll(SB)
52 TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
53 JMP libc_madvise(SB)
54 TEXT ·libc_mlock_trampoline(SB),NOSPLIT,$0-0
55 JMP libc_mlock(SB)
56 TEXT ·libc_mlockall_trampoline(SB),NOSPLIT,$0-0
57 JMP libc_mlockall(SB)
58 TEXT ·libc_mprotect_trampoline(SB),NOSPLIT,$0-0
59 JMP libc_mprotect(SB)
60 TEXT ·libc_msync_trampoline(SB),NOSPLIT,$0-0
61 JMP libc_msync(SB)
62 TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
63 JMP libc_munlock(SB)
64 TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
65 JMP libc_munlockall(SB)
66 TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
67 JMP libc_ptrace(SB)
68 TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
69 JMP libc_getattrlist(SB)
70 TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
71 JMP libc_pipe(SB)
72 TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
73 JMP libc_getxattr(SB)
74 TEXT ·libc_fgetxattr_trampoline(SB),NOSPLIT,$0-0
75 JMP libc_fgetxattr(SB)
76 TEXT ·libc_setxattr_trampoline(SB),NOSPLIT,$0-0
77 JMP libc_setxattr(SB)
78 TEXT ·libc_fsetxattr_trampoline(SB),NOSPLIT,$0-0
79 JMP libc_fsetxattr(SB)
80 TEXT ·libc_removexattr_trampoline(SB),NOSPLIT,$0-0
81 JMP libc_removexattr(SB)
82 TEXT ·libc_fremovexattr_trampoline(SB),NOSPLIT,$0-0
83 JMP libc_fremovexattr(SB)
84 TEXT ·libc_listxattr_trampoline(SB),NOSPLIT,$0-0
85 JMP libc_listxattr(SB)
86 TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
87 JMP libc_flistxattr(SB)
88 TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
89 JMP libc_setattrlist(SB)
90 TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
91 JMP libc_kill(SB)
92 TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
93 JMP libc_ioctl(SB)
94 TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
95 JMP libc_sendfile(SB)
96 TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
97 JMP libc_access(SB)
98 TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
99 JMP libc_adjtime(SB)
100 TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
101 JMP libc_chdir(SB)
102 TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
103 JMP libc_chflags(SB)
104 TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
105 JMP libc_chmod(SB)
106 TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
107 JMP libc_chown(SB)
108 TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
109 JMP libc_chroot(SB)
110 TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
111 JMP libc_close(SB)
112 TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
113 JMP libc_dup(SB)
114 TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
115 JMP libc_dup2(SB)
116 TEXT ·libc_exchangedata_trampoline(SB),NOSPLIT,$0-0
117 JMP libc_exchangedata(SB)
118 TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
119 JMP libc_exit(SB)
120 TEXT ·libc_faccessat_trampoline(SB),NOSPLIT,$0-0
121 JMP libc_faccessat(SB)
122 TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
123 JMP libc_fchdir(SB)
124 TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
125 JMP libc_fchflags(SB)
126 TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
127 JMP libc_fchmod(SB)
128 TEXT ·libc_fchmodat_trampoline(SB),NOSPLIT,$0-0
129 JMP libc_fchmodat(SB)
130 TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
131 JMP libc_fchown(SB)
132 TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
133 JMP libc_fchownat(SB)
134 TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
135 JMP libc_flock(SB)
136 TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
137 JMP libc_fpathconf(SB)
138 TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
139 JMP libc_fsync(SB)
140 TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
141 JMP libc_ftruncate(SB)
142 TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
143 JMP libc_getdtablesize(SB)
144 TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
145 JMP libc_getegid(SB)
146 TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
147 JMP libc_geteuid(SB)
148 TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
149 JMP libc_getgid(SB)
150 TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
151 JMP libc_getpgid(SB)
152 TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
153 JMP libc_getpgrp(SB)
154 TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
155 JMP libc_getpid(SB)
156 TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
157 JMP libc_getppid(SB)
158 TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
159 JMP libc_getpriority(SB)
160 TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
161 JMP libc_getrlimit(SB)
162 TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
163 JMP libc_getrusage(SB)
164 TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
165 JMP libc_getsid(SB)
166 TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
167 JMP libc_getuid(SB)
168 TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
169 JMP libc_issetugid(SB)
170 TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
171 JMP libc_kqueue(SB)
172 TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
173 JMP libc_lchown(SB)
174 TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
175 JMP libc_link(SB)
176 TEXT ·libc_linkat_trampoline(SB),NOSPLIT,$0-0
177 JMP libc_linkat(SB)
178 TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
179 JMP libc_listen(SB)
180 TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
181 JMP libc_mkdir(SB)
182 TEXT ·libc_mkdirat_trampoline(SB),NOSPLIT,$0-0
183 JMP libc_mkdirat(SB)
184 TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
185 JMP libc_mkfifo(SB)
186 TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
187 JMP libc_mknod(SB)
188 TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
189 JMP libc_open(SB)
190 TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
191 JMP libc_openat(SB)
192 TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
193 JMP libc_pathconf(SB)
194 TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
195 JMP libc_pread(SB)
196 TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
197 JMP libc_pwrite(SB)
198 TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
199 JMP libc_read(SB)
200 TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
201 JMP libc_readlink(SB)
202 TEXT ·libc_readlinkat_trampoline(SB),NOSPLIT,$0-0
203 JMP libc_readlinkat(SB)
204 TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
205 JMP libc_rename(SB)
206 TEXT ·libc_renameat_trampoline(SB),NOSPLIT,$0-0
207 JMP libc_renameat(SB)
208 TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
209 JMP libc_revoke(SB)
210 TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
211 JMP libc_rmdir(SB)
212 TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
213 JMP libc_lseek(SB)
214 TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
215 JMP libc_select(SB)
216 TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
217 JMP libc_setegid(SB)
218 TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
219 JMP libc_seteuid(SB)
220 TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
221 JMP libc_setgid(SB)
222 TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
223 JMP libc_setlogin(SB)
224 TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
225 JMP libc_setpgid(SB)
226 TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
227 JMP libc_setpriority(SB)
228 TEXT ·libc_setprivexec_trampoline(SB),NOSPLIT,$0-0
229 JMP libc_setprivexec(SB)
230 TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
231 JMP libc_setregid(SB)
232 TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
233 JMP libc_setreuid(SB)
234 TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
235 JMP libc_setrlimit(SB)
236 TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
237 JMP libc_setsid(SB)
238 TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
239 JMP libc_settimeofday(SB)
240 TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
241 JMP libc_setuid(SB)
242 TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
243 JMP libc_symlink(SB)
244 TEXT ·libc_symlinkat_trampoline(SB),NOSPLIT,$0-0
245 JMP libc_symlinkat(SB)
246 TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
247 JMP libc_sync(SB)
248 TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
249 JMP libc_truncate(SB)
250 TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
251 JMP libc_umask(SB)
252 TEXT ·libc_undelete_trampoline(SB),NOSPLIT,$0-0
253 JMP libc_undelete(SB)
254 TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
255 JMP libc_unlink(SB)
256 TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
257 JMP libc_unlinkat(SB)
258 TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
259 JMP libc_unmount(SB)
260 TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
261 JMP libc_write(SB)
262 TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
263 JMP libc_mmap(SB)
264 TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
265 JMP libc_munmap(SB)
266 TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
267 JMP libc_gettimeofday(SB)
268 TEXT ·libc_fstat_trampoline(SB),NOSPLIT,$0-0
269 JMP libc_fstat(SB)
270 TEXT ·libc_fstatat_trampoline(SB),NOSPLIT,$0-0
271 JMP libc_fstatat(SB)
272 TEXT ·libc_fstatfs_trampoline(SB),NOSPLIT,$0-0
273 JMP libc_fstatfs(SB)
274 TEXT ·libc_getfsstat_trampoline(SB),NOSPLIT,$0-0
275 JMP libc_getfsstat(SB)
276 TEXT ·libc_lstat_trampoline(SB),NOSPLIT,$0-0
277 JMP libc_lstat(SB)
278 TEXT ·libc_stat_trampoline(SB),NOSPLIT,$0-0
279 JMP libc_stat(SB)
280 TEXT ·libc_statfs_trampoline(SB),NOSPLIT,$0-0
281 JMP libc_statfs(SB)
0 // mksyscall.pl -dragonfly -tags dragonfly,amd64 syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
0 // go run mksyscall.go -dragonfly -tags dragonfly,amd64 syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build dragonfly,amd64
265265
266266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
268279 func Madvise(b []byte, behav int) (err error) {
269280 var _p0 unsafe.Pointer
270281 if len(b) > 0 {
411422
412423 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
413424
425 func Getcwd(buf []byte) (n int, err error) {
426 var _p0 unsafe.Pointer
427 if len(buf) > 0 {
428 _p0 = unsafe.Pointer(&buf[0])
429 } else {
430 _p0 = unsafe.Pointer(&_zero)
431 }
432 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
433 n = int(r0)
434 if e1 != 0 {
435 err = errnoErr(e1)
436 }
437 return
438 }
439
440 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
441
442 func ioctl(fd int, req uint, arg uintptr) (err error) {
443 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
444 if e1 != 0 {
445 err = errnoErr(e1)
446 }
447 return
448 }
449
450 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
451
414452 func Access(path string, mode uint32) (err error) {
415453 var _p0 *byte
416454 _p0, err = BytePtrFromString(path)
549587
550588 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
551589
590 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
591 var _p0 *byte
592 _p0, err = BytePtrFromString(path)
593 if err != nil {
594 return
595 }
596 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
597 if e1 != 0 {
598 err = errnoErr(e1)
599 }
600 return
601 }
602
603 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
604
552605 func Fchdir(fd int) (err error) {
553606 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
554607 if e1 != 0 {
579632
580633 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
581634
635 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
636 var _p0 *byte
637 _p0, err = BytePtrFromString(path)
638 if err != nil {
639 return
640 }
641 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
642 if e1 != 0 {
643 err = errnoErr(e1)
644 }
645 return
646 }
647
648 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
649
582650 func Fchown(fd int, uid int, gid int) (err error) {
583651 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
652 if e1 != 0 {
653 err = errnoErr(e1)
654 }
655 return
656 }
657
658 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
659
660 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
661 var _p0 *byte
662 _p0, err = BytePtrFromString(path)
663 if err != nil {
664 return
665 }
666 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
584667 if e1 != 0 {
585668 err = errnoErr(e1)
586669 }
612695
613696 func Fstat(fd int, stat *Stat_t) (err error) {
614697 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
698 if e1 != 0 {
699 err = errnoErr(e1)
700 }
701 return
702 }
703
704 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
705
706 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
707 var _p0 *byte
708 _p0, err = BytePtrFromString(path)
709 if err != nil {
710 return
711 }
712 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
615713 if e1 != 0 {
616714 err = errnoErr(e1)
617715 }
858956
859957 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
860958
959 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
960 var _p0 *byte
961 _p0, err = BytePtrFromString(path)
962 if err != nil {
963 return
964 }
965 var _p1 *byte
966 _p1, err = BytePtrFromString(link)
967 if err != nil {
968 return
969 }
970 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
971 if e1 != 0 {
972 err = errnoErr(e1)
973 }
974 return
975 }
976
977 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
978
861979 func Listen(s int, backlog int) (err error) {
862980 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
863981 if e1 != 0 {
8981016
8991017 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9001018
1019 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1020 var _p0 *byte
1021 _p0, err = BytePtrFromString(path)
1022 if err != nil {
1023 return
1024 }
1025 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1026 if e1 != 0 {
1027 err = errnoErr(e1)
1028 }
1029 return
1030 }
1031
1032 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1033
9011034 func Mkfifo(path string, mode uint32) (err error) {
9021035 var _p0 *byte
9031036 _p0, err = BytePtrFromString(path)
9201053 return
9211054 }
9221055 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1056 if e1 != 0 {
1057 err = errnoErr(e1)
1058 }
1059 return
1060 }
1061
1062 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1063
1064 func Mknodat(fd int, path string, mode uint32, dev int) (err error) {
1065 var _p0 *byte
1066 _p0, err = BytePtrFromString(path)
1067 if err != nil {
1068 return
1069 }
1070 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
9231071 if e1 != 0 {
9241072 err = errnoErr(e1)
9251073 }
9451093 return
9461094 }
9471095 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1096 fd = int(r0)
1097 if e1 != 0 {
1098 err = errnoErr(e1)
1099 }
1100 return
1101 }
1102
1103 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1104
1105 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1106 var _p0 *byte
1107 _p0, err = BytePtrFromString(path)
1108 if err != nil {
1109 return
1110 }
1111 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
9481112 fd = int(r0)
9491113 if e1 != 0 {
9501114 err = errnoErr(e1)
10291193
10301194 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10311195
1196 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1197 var _p0 *byte
1198 _p0, err = BytePtrFromString(from)
1199 if err != nil {
1200 return
1201 }
1202 var _p1 *byte
1203 _p1, err = BytePtrFromString(to)
1204 if err != nil {
1205 return
1206 }
1207 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1208 if e1 != 0 {
1209 err = errnoErr(e1)
1210 }
1211 return
1212 }
1213
1214 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1215
10321216 func Revoke(path string) (err error) {
10331217 var _p0 *byte
10341218 _p0, err = BytePtrFromString(path)
12761460
12771461 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12781462
1463 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
1464 var _p0 *byte
1465 _p0, err = BytePtrFromString(oldpath)
1466 if err != nil {
1467 return
1468 }
1469 var _p1 *byte
1470 _p1, err = BytePtrFromString(newpath)
1471 if err != nil {
1472 return
1473 }
1474 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1475 if e1 != 0 {
1476 err = errnoErr(e1)
1477 }
1478 return
1479 }
1480
1481 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1482
12791483 func Sync() (err error) {
12801484 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
12811485 if e1 != 0 {
13311535 return
13321536 }
13331537 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1538 if e1 != 0 {
1539 err = errnoErr(e1)
1540 }
1541 return
1542 }
1543
1544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1545
1546 func Unlinkat(dirfd int, path string, flags int) (err error) {
1547 var _p0 *byte
1548 _p0, err = BytePtrFromString(path)
1549 if err != nil {
1550 return
1551 }
1552 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
13341553 if e1 != 0 {
13351554 err = errnoErr(e1)
13361555 }
0 // mksyscall.pl -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go
0 // go run mksyscall.go -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build freebsd,386
265265
266266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
268279 func Madvise(b []byte, behav int) (err error) {
269280 var _p0 unsafe.Pointer
270281 if len(b) > 0 {
365376
366377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
367378
368 func pipe() (r int, w int, err error) {
369 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
370 r = int(r0)
371 w = int(r1)
372 if e1 != 0 {
373 err = errnoErr(e1)
374 }
375 return
376 }
377
378 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
379
380 func ioctl(fd int, req uint, arg uintptr) (err error) {
381 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
382 if e1 != 0 {
383 err = errnoErr(e1)
384 }
385 return
386 }
387
388 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
389
390 func Access(path string, mode uint32) (err error) {
391 var _p0 *byte
392 _p0, err = BytePtrFromString(path)
393 if err != nil {
394 return
395 }
396 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
397 if e1 != 0 {
398 err = errnoErr(e1)
399 }
400 return
401 }
402
403 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
404
405 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
406 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
407 if e1 != 0 {
408 err = errnoErr(e1)
409 }
410 return
411 }
412
413 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
414
415 func CapEnter() (err error) {
416 _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)
417 if e1 != 0 {
418 err = errnoErr(e1)
419 }
420 return
421 }
422
423 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
424
425 func capRightsGet(version int, fd int, rightsp *CapRights) (err error) {
426 _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))
427 if e1 != 0 {
428 err = errnoErr(e1)
429 }
430 return
431 }
432
433 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
434
435 func capRightsLimit(fd int, rightsp *CapRights) (err error) {
436 _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)
437 if e1 != 0 {
438 err = errnoErr(e1)
439 }
440 return
441 }
442
443 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
444
445 func Chdir(path string) (err error) {
446 var _p0 *byte
447 _p0, err = BytePtrFromString(path)
448 if err != nil {
449 return
450 }
451 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
452 if e1 != 0 {
453 err = errnoErr(e1)
454 }
455 return
456 }
457
458 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
459
460 func Chflags(path string, flags int) (err error) {
461 var _p0 *byte
462 _p0, err = BytePtrFromString(path)
463 if err != nil {
464 return
465 }
466 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
467 if e1 != 0 {
468 err = errnoErr(e1)
469 }
470 return
471 }
472
473 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
474
475 func Chmod(path string, mode uint32) (err error) {
476 var _p0 *byte
477 _p0, err = BytePtrFromString(path)
478 if err != nil {
479 return
480 }
481 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
482 if e1 != 0 {
483 err = errnoErr(e1)
484 }
485 return
486 }
487
488 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
489
490 func Chown(path string, uid int, gid int) (err error) {
491 var _p0 *byte
492 _p0, err = BytePtrFromString(path)
493 if err != nil {
494 return
495 }
496 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
497 if e1 != 0 {
498 err = errnoErr(e1)
499 }
500 return
501 }
502
503 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
504
505 func Chroot(path string) (err error) {
506 var _p0 *byte
507 _p0, err = BytePtrFromString(path)
508 if err != nil {
509 return
510 }
511 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
512 if e1 != 0 {
513 err = errnoErr(e1)
514 }
515 return
516 }
517
518 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
519
520 func Close(fd int) (err error) {
521 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
522 if e1 != 0 {
523 err = errnoErr(e1)
524 }
525 return
526 }
527
528 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
529
530 func Dup(fd int) (nfd int, err error) {
531 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
532 nfd = int(r0)
533 if e1 != 0 {
534 err = errnoErr(e1)
535 }
536 return
537 }
538
539 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
540
541 func Dup2(from int, to int) (err error) {
542 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
543 if e1 != 0 {
544 err = errnoErr(e1)
545 }
546 return
547 }
548
549 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
550
551 func Exit(code int) {
552 Syscall(SYS_EXIT, uintptr(code), 0, 0)
553 return
554 }
555
556 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
557
558 func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
559 var _p0 *byte
560 _p0, err = BytePtrFromString(attrname)
561 if err != nil {
562 return
563 }
564 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
565 ret = int(r0)
566 if e1 != 0 {
567 err = errnoErr(e1)
568 }
569 return
570 }
571
572 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
573
574 func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
575 var _p0 *byte
576 _p0, err = BytePtrFromString(attrname)
577 if err != nil {
578 return
579 }
580 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
581 ret = int(r0)
582 if e1 != 0 {
583 err = errnoErr(e1)
584 }
585 return
586 }
587
588 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
589
590 func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
591 var _p0 *byte
592 _p0, err = BytePtrFromString(attrname)
593 if err != nil {
594 return
595 }
596 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
597 if e1 != 0 {
598 err = errnoErr(e1)
599 }
600 return
601 }
602
603 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
604
605 func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
606 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
607 ret = int(r0)
608 if e1 != 0 {
609 err = errnoErr(e1)
610 }
611 return
612 }
613
614 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
615
616 func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
617 var _p0 *byte
618 _p0, err = BytePtrFromString(file)
619 if err != nil {
620 return
621 }
622 var _p1 *byte
623 _p1, err = BytePtrFromString(attrname)
624 if err != nil {
625 return
626 }
627 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
628 ret = int(r0)
629 if e1 != 0 {
630 err = errnoErr(e1)
631 }
632 return
633 }
634
635 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
636
637 func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
638 var _p0 *byte
639 _p0, err = BytePtrFromString(file)
640 if err != nil {
641 return
642 }
643 var _p1 *byte
644 _p1, err = BytePtrFromString(attrname)
645 if err != nil {
646 return
647 }
648 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
649 ret = int(r0)
650 if e1 != 0 {
651 err = errnoErr(e1)
652 }
653 return
654 }
655
656 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
657
658 func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
659 var _p0 *byte
660 _p0, err = BytePtrFromString(file)
661 if err != nil {
662 return
663 }
664 var _p1 *byte
665 _p1, err = BytePtrFromString(attrname)
666 if err != nil {
667 return
668 }
669 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
670 if e1 != 0 {
671 err = errnoErr(e1)
672 }
673 return
674 }
675
676 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
677
678 func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
679 var _p0 *byte
680 _p0, err = BytePtrFromString(file)
681 if err != nil {
682 return
683 }
684 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
685 ret = int(r0)
686 if e1 != 0 {
687 err = errnoErr(e1)
688 }
689 return
690 }
691
692 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
693
694 func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
695 var _p0 *byte
696 _p0, err = BytePtrFromString(link)
697 if err != nil {
698 return
699 }
700 var _p1 *byte
701 _p1, err = BytePtrFromString(attrname)
702 if err != nil {
703 return
704 }
705 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
706 ret = int(r0)
707 if e1 != 0 {
708 err = errnoErr(e1)
709 }
710 return
711 }
712
713 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
714
715 func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
716 var _p0 *byte
717 _p0, err = BytePtrFromString(link)
718 if err != nil {
719 return
720 }
721 var _p1 *byte
722 _p1, err = BytePtrFromString(attrname)
723 if err != nil {
724 return
725 }
726 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
727 ret = int(r0)
728 if e1 != 0 {
729 err = errnoErr(e1)
730 }
731 return
732 }
733
734 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
735
736 func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
737 var _p0 *byte
738 _p0, err = BytePtrFromString(link)
739 if err != nil {
740 return
741 }
742 var _p1 *byte
743 _p1, err = BytePtrFromString(attrname)
744 if err != nil {
745 return
746 }
747 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
748 if e1 != 0 {
749 err = errnoErr(e1)
750 }
751 return
752 }
753
754 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
755
756 func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
757 var _p0 *byte
758 _p0, err = BytePtrFromString(link)
759 if err != nil {
760 return
761 }
762 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
763 ret = int(r0)
764 if e1 != 0 {
765 err = errnoErr(e1)
766 }
767 return
768 }
769
770 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
771
772 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
773 _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))
774 if e1 != 0 {
775 err = errnoErr(e1)
776 }
777 return
778 }
779
780 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
781
782 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
783 var _p0 *byte
784 _p0, err = BytePtrFromString(path)
785 if err != nil {
786 return
787 }
788 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
789 if e1 != 0 {
790 err = errnoErr(e1)
791 }
792 return
793 }
794
795 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
796
797 func Fchdir(fd int) (err error) {
798 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
799 if e1 != 0 {
800 err = errnoErr(e1)
801 }
802 return
803 }
804
805 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
806
807 func Fchflags(fd int, flags int) (err error) {
808 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
809 if e1 != 0 {
810 err = errnoErr(e1)
811 }
812 return
813 }
814
815 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
816
817 func Fchmod(fd int, mode uint32) (err error) {
818 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
819 if e1 != 0 {
820 err = errnoErr(e1)
821 }
822 return
823 }
824
825 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
826
827 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
828 var _p0 *byte
829 _p0, err = BytePtrFromString(path)
830 if err != nil {
831 return
832 }
833 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
834 if e1 != 0 {
835 err = errnoErr(e1)
836 }
837 return
838 }
839
840 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
841
842 func Fchown(fd int, uid int, gid int) (err error) {
843 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
844 if e1 != 0 {
845 err = errnoErr(e1)
846 }
847 return
848 }
849
850 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
851
852 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
853 var _p0 *byte
854 _p0, err = BytePtrFromString(path)
855 if err != nil {
856 return
857 }
858 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
859 if e1 != 0 {
860 err = errnoErr(e1)
861 }
862 return
863 }
864
865 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
866
867 func Flock(fd int, how int) (err error) {
868 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
869 if e1 != 0 {
870 err = errnoErr(e1)
871 }
872 return
873 }
874
875 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
876
877 func Fpathconf(fd int, name int) (val int, err error) {
878 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
879 val = int(r0)
880 if e1 != 0 {
881 err = errnoErr(e1)
882 }
883 return
884 }
885
886 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
887
888 func Fstat(fd int, stat *Stat_t) (err error) {
889 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
890 if e1 != 0 {
891 err = errnoErr(e1)
892 }
893 return
894 }
895
896 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
897
898 func Fstatfs(fd int, stat *Statfs_t) (err error) {
899 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
900 if e1 != 0 {
901 err = errnoErr(e1)
902 }
903 return
904 }
905
906 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
907
908 func Fsync(fd int) (err error) {
909 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
910 if e1 != 0 {
911 err = errnoErr(e1)
912 }
913 return
914 }
915
916 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
917
918 func Ftruncate(fd int, length int64) (err error) {
919 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
920 if e1 != 0 {
921 err = errnoErr(e1)
922 }
923 return
924 }
925
926 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
927
928 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
379 func pipe2(p *[2]_C_int, flags int) (err error) {
380 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
381 if e1 != 0 {
382 err = errnoErr(e1)
383 }
384 return
385 }
386
387 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
388
389 func Getcwd(buf []byte) (n int, err error) {
929390 var _p0 unsafe.Pointer
930391 if len(buf) > 0 {
931392 _p0 = unsafe.Pointer(&buf[0])
932393 } else {
933394 _p0 = unsafe.Pointer(&_zero)
934395 }
396 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
397 n = int(r0)
398 if e1 != 0 {
399 err = errnoErr(e1)
400 }
401 return
402 }
403
404 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
405
406 func ioctl(fd int, req uint, arg uintptr) (err error) {
407 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
408 if e1 != 0 {
409 err = errnoErr(e1)
410 }
411 return
412 }
413
414 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
415
416 func Access(path string, mode uint32) (err error) {
417 var _p0 *byte
418 _p0, err = BytePtrFromString(path)
419 if err != nil {
420 return
421 }
422 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
423 if e1 != 0 {
424 err = errnoErr(e1)
425 }
426 return
427 }
428
429 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
430
431 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
432 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
433 if e1 != 0 {
434 err = errnoErr(e1)
435 }
436 return
437 }
438
439 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
440
441 func CapEnter() (err error) {
442 _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)
443 if e1 != 0 {
444 err = errnoErr(e1)
445 }
446 return
447 }
448
449 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
450
451 func capRightsGet(version int, fd int, rightsp *CapRights) (err error) {
452 _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))
453 if e1 != 0 {
454 err = errnoErr(e1)
455 }
456 return
457 }
458
459 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
460
461 func capRightsLimit(fd int, rightsp *CapRights) (err error) {
462 _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)
463 if e1 != 0 {
464 err = errnoErr(e1)
465 }
466 return
467 }
468
469 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
470
471 func Chdir(path string) (err error) {
472 var _p0 *byte
473 _p0, err = BytePtrFromString(path)
474 if err != nil {
475 return
476 }
477 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
478 if e1 != 0 {
479 err = errnoErr(e1)
480 }
481 return
482 }
483
484 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
485
486 func Chflags(path string, flags int) (err error) {
487 var _p0 *byte
488 _p0, err = BytePtrFromString(path)
489 if err != nil {
490 return
491 }
492 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
493 if e1 != 0 {
494 err = errnoErr(e1)
495 }
496 return
497 }
498
499 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
500
501 func Chmod(path string, mode uint32) (err error) {
502 var _p0 *byte
503 _p0, err = BytePtrFromString(path)
504 if err != nil {
505 return
506 }
507 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
508 if e1 != 0 {
509 err = errnoErr(e1)
510 }
511 return
512 }
513
514 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
515
516 func Chown(path string, uid int, gid int) (err error) {
517 var _p0 *byte
518 _p0, err = BytePtrFromString(path)
519 if err != nil {
520 return
521 }
522 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
523 if e1 != 0 {
524 err = errnoErr(e1)
525 }
526 return
527 }
528
529 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
530
531 func Chroot(path string) (err error) {
532 var _p0 *byte
533 _p0, err = BytePtrFromString(path)
534 if err != nil {
535 return
536 }
537 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
538 if e1 != 0 {
539 err = errnoErr(e1)
540 }
541 return
542 }
543
544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545
546 func Close(fd int) (err error) {
547 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
548 if e1 != 0 {
549 err = errnoErr(e1)
550 }
551 return
552 }
553
554 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
555
556 func Dup(fd int) (nfd int, err error) {
557 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
558 nfd = int(r0)
559 if e1 != 0 {
560 err = errnoErr(e1)
561 }
562 return
563 }
564
565 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
566
567 func Dup2(from int, to int) (err error) {
568 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
569 if e1 != 0 {
570 err = errnoErr(e1)
571 }
572 return
573 }
574
575 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
576
577 func Exit(code int) {
578 Syscall(SYS_EXIT, uintptr(code), 0, 0)
579 return
580 }
581
582 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
583
584 func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
585 var _p0 *byte
586 _p0, err = BytePtrFromString(attrname)
587 if err != nil {
588 return
589 }
590 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
591 ret = int(r0)
592 if e1 != 0 {
593 err = errnoErr(e1)
594 }
595 return
596 }
597
598 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
599
600 func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
601 var _p0 *byte
602 _p0, err = BytePtrFromString(attrname)
603 if err != nil {
604 return
605 }
606 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
607 ret = int(r0)
608 if e1 != 0 {
609 err = errnoErr(e1)
610 }
611 return
612 }
613
614 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
615
616 func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
617 var _p0 *byte
618 _p0, err = BytePtrFromString(attrname)
619 if err != nil {
620 return
621 }
622 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
623 if e1 != 0 {
624 err = errnoErr(e1)
625 }
626 return
627 }
628
629 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
630
631 func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
632 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
633 ret = int(r0)
634 if e1 != 0 {
635 err = errnoErr(e1)
636 }
637 return
638 }
639
640 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
641
642 func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
643 var _p0 *byte
644 _p0, err = BytePtrFromString(file)
645 if err != nil {
646 return
647 }
648 var _p1 *byte
649 _p1, err = BytePtrFromString(attrname)
650 if err != nil {
651 return
652 }
653 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
654 ret = int(r0)
655 if e1 != 0 {
656 err = errnoErr(e1)
657 }
658 return
659 }
660
661 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
662
663 func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
664 var _p0 *byte
665 _p0, err = BytePtrFromString(file)
666 if err != nil {
667 return
668 }
669 var _p1 *byte
670 _p1, err = BytePtrFromString(attrname)
671 if err != nil {
672 return
673 }
674 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
675 ret = int(r0)
676 if e1 != 0 {
677 err = errnoErr(e1)
678 }
679 return
680 }
681
682 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
683
684 func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
685 var _p0 *byte
686 _p0, err = BytePtrFromString(file)
687 if err != nil {
688 return
689 }
690 var _p1 *byte
691 _p1, err = BytePtrFromString(attrname)
692 if err != nil {
693 return
694 }
695 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
696 if e1 != 0 {
697 err = errnoErr(e1)
698 }
699 return
700 }
701
702 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
703
704 func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
705 var _p0 *byte
706 _p0, err = BytePtrFromString(file)
707 if err != nil {
708 return
709 }
710 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
711 ret = int(r0)
712 if e1 != 0 {
713 err = errnoErr(e1)
714 }
715 return
716 }
717
718 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
719
720 func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
721 var _p0 *byte
722 _p0, err = BytePtrFromString(link)
723 if err != nil {
724 return
725 }
726 var _p1 *byte
727 _p1, err = BytePtrFromString(attrname)
728 if err != nil {
729 return
730 }
731 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
732 ret = int(r0)
733 if e1 != 0 {
734 err = errnoErr(e1)
735 }
736 return
737 }
738
739 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
740
741 func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
742 var _p0 *byte
743 _p0, err = BytePtrFromString(link)
744 if err != nil {
745 return
746 }
747 var _p1 *byte
748 _p1, err = BytePtrFromString(attrname)
749 if err != nil {
750 return
751 }
752 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
753 ret = int(r0)
754 if e1 != 0 {
755 err = errnoErr(e1)
756 }
757 return
758 }
759
760 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
761
762 func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
763 var _p0 *byte
764 _p0, err = BytePtrFromString(link)
765 if err != nil {
766 return
767 }
768 var _p1 *byte
769 _p1, err = BytePtrFromString(attrname)
770 if err != nil {
771 return
772 }
773 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
774 if e1 != 0 {
775 err = errnoErr(e1)
776 }
777 return
778 }
779
780 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
781
782 func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
783 var _p0 *byte
784 _p0, err = BytePtrFromString(link)
785 if err != nil {
786 return
787 }
788 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
789 ret = int(r0)
790 if e1 != 0 {
791 err = errnoErr(e1)
792 }
793 return
794 }
795
796 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
797
798 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
799 _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))
800 if e1 != 0 {
801 err = errnoErr(e1)
802 }
803 return
804 }
805
806 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
807
808 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
809 var _p0 *byte
810 _p0, err = BytePtrFromString(path)
811 if err != nil {
812 return
813 }
814 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
815 if e1 != 0 {
816 err = errnoErr(e1)
817 }
818 return
819 }
820
821 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
822
823 func Fchdir(fd int) (err error) {
824 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
825 if e1 != 0 {
826 err = errnoErr(e1)
827 }
828 return
829 }
830
831 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
832
833 func Fchflags(fd int, flags int) (err error) {
834 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
835 if e1 != 0 {
836 err = errnoErr(e1)
837 }
838 return
839 }
840
841 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
842
843 func Fchmod(fd int, mode uint32) (err error) {
844 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
845 if e1 != 0 {
846 err = errnoErr(e1)
847 }
848 return
849 }
850
851 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
852
853 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
854 var _p0 *byte
855 _p0, err = BytePtrFromString(path)
856 if err != nil {
857 return
858 }
859 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
860 if e1 != 0 {
861 err = errnoErr(e1)
862 }
863 return
864 }
865
866 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
867
868 func Fchown(fd int, uid int, gid int) (err error) {
869 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
870 if e1 != 0 {
871 err = errnoErr(e1)
872 }
873 return
874 }
875
876 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
877
878 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
879 var _p0 *byte
880 _p0, err = BytePtrFromString(path)
881 if err != nil {
882 return
883 }
884 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
885 if e1 != 0 {
886 err = errnoErr(e1)
887 }
888 return
889 }
890
891 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
892
893 func Flock(fd int, how int) (err error) {
894 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
895 if e1 != 0 {
896 err = errnoErr(e1)
897 }
898 return
899 }
900
901 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
902
903 func Fpathconf(fd int, name int) (val int, err error) {
904 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
905 val = int(r0)
906 if e1 != 0 {
907 err = errnoErr(e1)
908 }
909 return
910 }
911
912 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
913
914 func fstat(fd int, stat *stat_freebsd11_t) (err error) {
915 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
916 if e1 != 0 {
917 err = errnoErr(e1)
918 }
919 return
920 }
921
922 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
923
924 func fstat_freebsd12(fd int, stat *Stat_t) (err error) {
925 _, _, e1 := Syscall(SYS_FSTAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
926 if e1 != 0 {
927 err = errnoErr(e1)
928 }
929 return
930 }
931
932 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
933
934 func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error) {
935 var _p0 *byte
936 _p0, err = BytePtrFromString(path)
937 if err != nil {
938 return
939 }
940 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
941 if e1 != 0 {
942 err = errnoErr(e1)
943 }
944 return
945 }
946
947 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
948
949 func fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error) {
950 var _p0 *byte
951 _p0, err = BytePtrFromString(path)
952 if err != nil {
953 return
954 }
955 _, _, e1 := Syscall6(SYS_FSTATAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
956 if e1 != 0 {
957 err = errnoErr(e1)
958 }
959 return
960 }
961
962 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
963
964 func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
965 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
966 if e1 != 0 {
967 err = errnoErr(e1)
968 }
969 return
970 }
971
972 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
973
974 func fstatfs_freebsd12(fd int, stat *Statfs_t) (err error) {
975 _, _, e1 := Syscall(SYS_FSTATFS_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
976 if e1 != 0 {
977 err = errnoErr(e1)
978 }
979 return
980 }
981
982 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
983
984 func Fsync(fd int) (err error) {
985 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
986 if e1 != 0 {
987 err = errnoErr(e1)
988 }
989 return
990 }
991
992 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
993
994 func Ftruncate(fd int, length int64) (err error) {
995 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
996 if e1 != 0 {
997 err = errnoErr(e1)
998 }
999 return
1000 }
1001
1002 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1003
1004 func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
1005 var _p0 unsafe.Pointer
1006 if len(buf) > 0 {
1007 _p0 = unsafe.Pointer(&buf[0])
1008 } else {
1009 _p0 = unsafe.Pointer(&_zero)
1010 }
9351011 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
1012 n = int(r0)
1013 if e1 != 0 {
1014 err = errnoErr(e1)
1015 }
1016 return
1017 }
1018
1019 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1020
1021 func getdirentries_freebsd12(fd int, buf []byte, basep *uintptr) (n int, err error) {
1022 var _p0 unsafe.Pointer
1023 if len(buf) > 0 {
1024 _p0 = unsafe.Pointer(&buf[0])
1025 } else {
1026 _p0 = unsafe.Pointer(&_zero)
1027 }
1028 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES_FREEBSD12, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
9361029 n = int(r0)
9371030 if e1 != 0 {
9381031 err = errnoErr(e1)
11631256
11641257 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11651258
1166 func Lstat(path string, stat *Stat_t) (err error) {
1259 func lstat(path string, stat *stat_freebsd11_t) (err error) {
11671260 var _p0 *byte
11681261 _p0, err = BytePtrFromString(path)
11691262 if err != nil {
12231316
12241317 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12251318
1226 func Mknod(path string, mode uint32, dev int) (err error) {
1319 func mknod(path string, mode uint32, dev int) (err error) {
12271320 var _p0 *byte
12281321 _p0, err = BytePtrFromString(path)
12291322 if err != nil {
12301323 return
12311324 }
12321325 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1326 if e1 != 0 {
1327 err = errnoErr(e1)
1328 }
1329 return
1330 }
1331
1332 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1333
1334 func mknodat(fd int, path string, mode uint32, dev int) (err error) {
1335 var _p0 *byte
1336 _p0, err = BytePtrFromString(path)
1337 if err != nil {
1338 return
1339 }
1340 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
1341 if e1 != 0 {
1342 err = errnoErr(e1)
1343 }
1344 return
1345 }
1346
1347 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1348
1349 func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error) {
1350 var _p0 *byte
1351 _p0, err = BytePtrFromString(path)
1352 if err != nil {
1353 return
1354 }
1355 _, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
12331356 if e1 != 0 {
12341357 err = errnoErr(e1)
12351358 }
16281751
16291752 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16301753
1631 func Stat(path string, stat *Stat_t) (err error) {
1754 func stat(path string, stat *stat_freebsd11_t) (err error) {
16321755 var _p0 *byte
16331756 _p0, err = BytePtrFromString(path)
16341757 if err != nil {
16431766
16441767 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16451768
1646 func Statfs(path string, stat *Statfs_t) (err error) {
1769 func statfs(path string, stat *statfs_freebsd11_t) (err error) {
16471770 var _p0 *byte
16481771 _p0, err = BytePtrFromString(path)
16491772 if err != nil {
16501773 return
16511774 }
16521775 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1776 if e1 != 0 {
1777 err = errnoErr(e1)
1778 }
1779 return
1780 }
1781
1782 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1783
1784 func statfs_freebsd12(path string, stat *Statfs_t) (err error) {
1785 var _p0 *byte
1786 _p0, err = BytePtrFromString(path)
1787 if err != nil {
1788 return
1789 }
1790 _, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
16531791 if e1 != 0 {
16541792 err = errnoErr(e1)
16551793 }
0 // mksyscall.pl -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
0 // go run mksyscall.go -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build freebsd,amd64
265265
266266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
268279 func Madvise(b []byte, behav int) (err error) {
269280 var _p0 unsafe.Pointer
270281 if len(b) > 0 {
365376
366377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
367378
368 func pipe() (r int, w int, err error) {
369 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
370 r = int(r0)
371 w = int(r1)
372 if e1 != 0 {
373 err = errnoErr(e1)
374 }
375 return
376 }
377
378 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
379
380 func ioctl(fd int, req uint, arg uintptr) (err error) {
381 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
382 if e1 != 0 {
383 err = errnoErr(e1)
384 }
385 return
386 }
387
388 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
389
390 func Access(path string, mode uint32) (err error) {
391 var _p0 *byte
392 _p0, err = BytePtrFromString(path)
393 if err != nil {
394 return
395 }
396 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
397 if e1 != 0 {
398 err = errnoErr(e1)
399 }
400 return
401 }
402
403 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
404
405 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
406 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
407 if e1 != 0 {
408 err = errnoErr(e1)
409 }
410 return
411 }
412
413 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
414
415 func CapEnter() (err error) {
416 _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)
417 if e1 != 0 {
418 err = errnoErr(e1)
419 }
420 return
421 }
422
423 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
424
425 func capRightsGet(version int, fd int, rightsp *CapRights) (err error) {
426 _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))
427 if e1 != 0 {
428 err = errnoErr(e1)
429 }
430 return
431 }
432
433 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
434
435 func capRightsLimit(fd int, rightsp *CapRights) (err error) {
436 _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)
437 if e1 != 0 {
438 err = errnoErr(e1)
439 }
440 return
441 }
442
443 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
444
445 func Chdir(path string) (err error) {
446 var _p0 *byte
447 _p0, err = BytePtrFromString(path)
448 if err != nil {
449 return
450 }
451 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
452 if e1 != 0 {
453 err = errnoErr(e1)
454 }
455 return
456 }
457
458 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
459
460 func Chflags(path string, flags int) (err error) {
461 var _p0 *byte
462 _p0, err = BytePtrFromString(path)
463 if err != nil {
464 return
465 }
466 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
467 if e1 != 0 {
468 err = errnoErr(e1)
469 }
470 return
471 }
472
473 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
474
475 func Chmod(path string, mode uint32) (err error) {
476 var _p0 *byte
477 _p0, err = BytePtrFromString(path)
478 if err != nil {
479 return
480 }
481 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
482 if e1 != 0 {
483 err = errnoErr(e1)
484 }
485 return
486 }
487
488 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
489
490 func Chown(path string, uid int, gid int) (err error) {
491 var _p0 *byte
492 _p0, err = BytePtrFromString(path)
493 if err != nil {
494 return
495 }
496 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
497 if e1 != 0 {
498 err = errnoErr(e1)
499 }
500 return
501 }
502
503 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
504
505 func Chroot(path string) (err error) {
506 var _p0 *byte
507 _p0, err = BytePtrFromString(path)
508 if err != nil {
509 return
510 }
511 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
512 if e1 != 0 {
513 err = errnoErr(e1)
514 }
515 return
516 }
517
518 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
519
520 func Close(fd int) (err error) {
521 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
522 if e1 != 0 {
523 err = errnoErr(e1)
524 }
525 return
526 }
527
528 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
529
530 func Dup(fd int) (nfd int, err error) {
531 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
532 nfd = int(r0)
533 if e1 != 0 {
534 err = errnoErr(e1)
535 }
536 return
537 }
538
539 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
540
541 func Dup2(from int, to int) (err error) {
542 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
543 if e1 != 0 {
544 err = errnoErr(e1)
545 }
546 return
547 }
548
549 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
550
551 func Exit(code int) {
552 Syscall(SYS_EXIT, uintptr(code), 0, 0)
553 return
554 }
555
556 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
557
558 func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
559 var _p0 *byte
560 _p0, err = BytePtrFromString(attrname)
561 if err != nil {
562 return
563 }
564 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
565 ret = int(r0)
566 if e1 != 0 {
567 err = errnoErr(e1)
568 }
569 return
570 }
571
572 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
573
574 func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
575 var _p0 *byte
576 _p0, err = BytePtrFromString(attrname)
577 if err != nil {
578 return
579 }
580 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
581 ret = int(r0)
582 if e1 != 0 {
583 err = errnoErr(e1)
584 }
585 return
586 }
587
588 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
589
590 func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
591 var _p0 *byte
592 _p0, err = BytePtrFromString(attrname)
593 if err != nil {
594 return
595 }
596 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
597 if e1 != 0 {
598 err = errnoErr(e1)
599 }
600 return
601 }
602
603 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
604
605 func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
606 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
607 ret = int(r0)
608 if e1 != 0 {
609 err = errnoErr(e1)
610 }
611 return
612 }
613
614 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
615
616 func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
617 var _p0 *byte
618 _p0, err = BytePtrFromString(file)
619 if err != nil {
620 return
621 }
622 var _p1 *byte
623 _p1, err = BytePtrFromString(attrname)
624 if err != nil {
625 return
626 }
627 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
628 ret = int(r0)
629 if e1 != 0 {
630 err = errnoErr(e1)
631 }
632 return
633 }
634
635 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
636
637 func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
638 var _p0 *byte
639 _p0, err = BytePtrFromString(file)
640 if err != nil {
641 return
642 }
643 var _p1 *byte
644 _p1, err = BytePtrFromString(attrname)
645 if err != nil {
646 return
647 }
648 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
649 ret = int(r0)
650 if e1 != 0 {
651 err = errnoErr(e1)
652 }
653 return
654 }
655
656 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
657
658 func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
659 var _p0 *byte
660 _p0, err = BytePtrFromString(file)
661 if err != nil {
662 return
663 }
664 var _p1 *byte
665 _p1, err = BytePtrFromString(attrname)
666 if err != nil {
667 return
668 }
669 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
670 if e1 != 0 {
671 err = errnoErr(e1)
672 }
673 return
674 }
675
676 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
677
678 func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
679 var _p0 *byte
680 _p0, err = BytePtrFromString(file)
681 if err != nil {
682 return
683 }
684 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
685 ret = int(r0)
686 if e1 != 0 {
687 err = errnoErr(e1)
688 }
689 return
690 }
691
692 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
693
694 func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
695 var _p0 *byte
696 _p0, err = BytePtrFromString(link)
697 if err != nil {
698 return
699 }
700 var _p1 *byte
701 _p1, err = BytePtrFromString(attrname)
702 if err != nil {
703 return
704 }
705 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
706 ret = int(r0)
707 if e1 != 0 {
708 err = errnoErr(e1)
709 }
710 return
711 }
712
713 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
714
715 func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
716 var _p0 *byte
717 _p0, err = BytePtrFromString(link)
718 if err != nil {
719 return
720 }
721 var _p1 *byte
722 _p1, err = BytePtrFromString(attrname)
723 if err != nil {
724 return
725 }
726 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
727 ret = int(r0)
728 if e1 != 0 {
729 err = errnoErr(e1)
730 }
731 return
732 }
733
734 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
735
736 func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
737 var _p0 *byte
738 _p0, err = BytePtrFromString(link)
739 if err != nil {
740 return
741 }
742 var _p1 *byte
743 _p1, err = BytePtrFromString(attrname)
744 if err != nil {
745 return
746 }
747 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
748 if e1 != 0 {
749 err = errnoErr(e1)
750 }
751 return
752 }
753
754 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
755
756 func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
757 var _p0 *byte
758 _p0, err = BytePtrFromString(link)
759 if err != nil {
760 return
761 }
762 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
763 ret = int(r0)
764 if e1 != 0 {
765 err = errnoErr(e1)
766 }
767 return
768 }
769
770 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
771
772 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
773 _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
774 if e1 != 0 {
775 err = errnoErr(e1)
776 }
777 return
778 }
779
780 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
781
782 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
783 var _p0 *byte
784 _p0, err = BytePtrFromString(path)
785 if err != nil {
786 return
787 }
788 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
789 if e1 != 0 {
790 err = errnoErr(e1)
791 }
792 return
793 }
794
795 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
796
797 func Fchdir(fd int) (err error) {
798 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
799 if e1 != 0 {
800 err = errnoErr(e1)
801 }
802 return
803 }
804
805 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
806
807 func Fchflags(fd int, flags int) (err error) {
808 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
809 if e1 != 0 {
810 err = errnoErr(e1)
811 }
812 return
813 }
814
815 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
816
817 func Fchmod(fd int, mode uint32) (err error) {
818 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
819 if e1 != 0 {
820 err = errnoErr(e1)
821 }
822 return
823 }
824
825 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
826
827 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
828 var _p0 *byte
829 _p0, err = BytePtrFromString(path)
830 if err != nil {
831 return
832 }
833 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
834 if e1 != 0 {
835 err = errnoErr(e1)
836 }
837 return
838 }
839
840 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
841
842 func Fchown(fd int, uid int, gid int) (err error) {
843 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
844 if e1 != 0 {
845 err = errnoErr(e1)
846 }
847 return
848 }
849
850 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
851
852 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
853 var _p0 *byte
854 _p0, err = BytePtrFromString(path)
855 if err != nil {
856 return
857 }
858 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
859 if e1 != 0 {
860 err = errnoErr(e1)
861 }
862 return
863 }
864
865 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
866
867 func Flock(fd int, how int) (err error) {
868 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
869 if e1 != 0 {
870 err = errnoErr(e1)
871 }
872 return
873 }
874
875 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
876
877 func Fpathconf(fd int, name int) (val int, err error) {
878 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
879 val = int(r0)
880 if e1 != 0 {
881 err = errnoErr(e1)
882 }
883 return
884 }
885
886 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
887
888 func Fstat(fd int, stat *Stat_t) (err error) {
889 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
890 if e1 != 0 {
891 err = errnoErr(e1)
892 }
893 return
894 }
895
896 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
897
898 func Fstatfs(fd int, stat *Statfs_t) (err error) {
899 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
900 if e1 != 0 {
901 err = errnoErr(e1)
902 }
903 return
904 }
905
906 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
907
908 func Fsync(fd int) (err error) {
909 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
910 if e1 != 0 {
911 err = errnoErr(e1)
912 }
913 return
914 }
915
916 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
917
918 func Ftruncate(fd int, length int64) (err error) {
919 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
920 if e1 != 0 {
921 err = errnoErr(e1)
922 }
923 return
924 }
925
926 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
927
928 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
379 func pipe2(p *[2]_C_int, flags int) (err error) {
380 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
381 if e1 != 0 {
382 err = errnoErr(e1)
383 }
384 return
385 }
386
387 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
388
389 func Getcwd(buf []byte) (n int, err error) {
929390 var _p0 unsafe.Pointer
930391 if len(buf) > 0 {
931392 _p0 = unsafe.Pointer(&buf[0])
932393 } else {
933394 _p0 = unsafe.Pointer(&_zero)
934395 }
396 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
397 n = int(r0)
398 if e1 != 0 {
399 err = errnoErr(e1)
400 }
401 return
402 }
403
404 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
405
406 func ioctl(fd int, req uint, arg uintptr) (err error) {
407 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
408 if e1 != 0 {
409 err = errnoErr(e1)
410 }
411 return
412 }
413
414 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
415
416 func Access(path string, mode uint32) (err error) {
417 var _p0 *byte
418 _p0, err = BytePtrFromString(path)
419 if err != nil {
420 return
421 }
422 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
423 if e1 != 0 {
424 err = errnoErr(e1)
425 }
426 return
427 }
428
429 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
430
431 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
432 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
433 if e1 != 0 {
434 err = errnoErr(e1)
435 }
436 return
437 }
438
439 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
440
441 func CapEnter() (err error) {
442 _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)
443 if e1 != 0 {
444 err = errnoErr(e1)
445 }
446 return
447 }
448
449 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
450
451 func capRightsGet(version int, fd int, rightsp *CapRights) (err error) {
452 _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))
453 if e1 != 0 {
454 err = errnoErr(e1)
455 }
456 return
457 }
458
459 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
460
461 func capRightsLimit(fd int, rightsp *CapRights) (err error) {
462 _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)
463 if e1 != 0 {
464 err = errnoErr(e1)
465 }
466 return
467 }
468
469 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
470
471 func Chdir(path string) (err error) {
472 var _p0 *byte
473 _p0, err = BytePtrFromString(path)
474 if err != nil {
475 return
476 }
477 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
478 if e1 != 0 {
479 err = errnoErr(e1)
480 }
481 return
482 }
483
484 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
485
486 func Chflags(path string, flags int) (err error) {
487 var _p0 *byte
488 _p0, err = BytePtrFromString(path)
489 if err != nil {
490 return
491 }
492 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
493 if e1 != 0 {
494 err = errnoErr(e1)
495 }
496 return
497 }
498
499 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
500
501 func Chmod(path string, mode uint32) (err error) {
502 var _p0 *byte
503 _p0, err = BytePtrFromString(path)
504 if err != nil {
505 return
506 }
507 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
508 if e1 != 0 {
509 err = errnoErr(e1)
510 }
511 return
512 }
513
514 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
515
516 func Chown(path string, uid int, gid int) (err error) {
517 var _p0 *byte
518 _p0, err = BytePtrFromString(path)
519 if err != nil {
520 return
521 }
522 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
523 if e1 != 0 {
524 err = errnoErr(e1)
525 }
526 return
527 }
528
529 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
530
531 func Chroot(path string) (err error) {
532 var _p0 *byte
533 _p0, err = BytePtrFromString(path)
534 if err != nil {
535 return
536 }
537 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
538 if e1 != 0 {
539 err = errnoErr(e1)
540 }
541 return
542 }
543
544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545
546 func Close(fd int) (err error) {
547 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
548 if e1 != 0 {
549 err = errnoErr(e1)
550 }
551 return
552 }
553
554 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
555
556 func Dup(fd int) (nfd int, err error) {
557 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
558 nfd = int(r0)
559 if e1 != 0 {
560 err = errnoErr(e1)
561 }
562 return
563 }
564
565 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
566
567 func Dup2(from int, to int) (err error) {
568 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
569 if e1 != 0 {
570 err = errnoErr(e1)
571 }
572 return
573 }
574
575 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
576
577 func Exit(code int) {
578 Syscall(SYS_EXIT, uintptr(code), 0, 0)
579 return
580 }
581
582 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
583
584 func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
585 var _p0 *byte
586 _p0, err = BytePtrFromString(attrname)
587 if err != nil {
588 return
589 }
590 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
591 ret = int(r0)
592 if e1 != 0 {
593 err = errnoErr(e1)
594 }
595 return
596 }
597
598 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
599
600 func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
601 var _p0 *byte
602 _p0, err = BytePtrFromString(attrname)
603 if err != nil {
604 return
605 }
606 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
607 ret = int(r0)
608 if e1 != 0 {
609 err = errnoErr(e1)
610 }
611 return
612 }
613
614 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
615
616 func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
617 var _p0 *byte
618 _p0, err = BytePtrFromString(attrname)
619 if err != nil {
620 return
621 }
622 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
623 if e1 != 0 {
624 err = errnoErr(e1)
625 }
626 return
627 }
628
629 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
630
631 func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
632 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
633 ret = int(r0)
634 if e1 != 0 {
635 err = errnoErr(e1)
636 }
637 return
638 }
639
640 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
641
642 func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
643 var _p0 *byte
644 _p0, err = BytePtrFromString(file)
645 if err != nil {
646 return
647 }
648 var _p1 *byte
649 _p1, err = BytePtrFromString(attrname)
650 if err != nil {
651 return
652 }
653 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
654 ret = int(r0)
655 if e1 != 0 {
656 err = errnoErr(e1)
657 }
658 return
659 }
660
661 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
662
663 func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
664 var _p0 *byte
665 _p0, err = BytePtrFromString(file)
666 if err != nil {
667 return
668 }
669 var _p1 *byte
670 _p1, err = BytePtrFromString(attrname)
671 if err != nil {
672 return
673 }
674 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
675 ret = int(r0)
676 if e1 != 0 {
677 err = errnoErr(e1)
678 }
679 return
680 }
681
682 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
683
684 func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
685 var _p0 *byte
686 _p0, err = BytePtrFromString(file)
687 if err != nil {
688 return
689 }
690 var _p1 *byte
691 _p1, err = BytePtrFromString(attrname)
692 if err != nil {
693 return
694 }
695 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
696 if e1 != 0 {
697 err = errnoErr(e1)
698 }
699 return
700 }
701
702 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
703
704 func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
705 var _p0 *byte
706 _p0, err = BytePtrFromString(file)
707 if err != nil {
708 return
709 }
710 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
711 ret = int(r0)
712 if e1 != 0 {
713 err = errnoErr(e1)
714 }
715 return
716 }
717
718 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
719
720 func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
721 var _p0 *byte
722 _p0, err = BytePtrFromString(link)
723 if err != nil {
724 return
725 }
726 var _p1 *byte
727 _p1, err = BytePtrFromString(attrname)
728 if err != nil {
729 return
730 }
731 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
732 ret = int(r0)
733 if e1 != 0 {
734 err = errnoErr(e1)
735 }
736 return
737 }
738
739 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
740
741 func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
742 var _p0 *byte
743 _p0, err = BytePtrFromString(link)
744 if err != nil {
745 return
746 }
747 var _p1 *byte
748 _p1, err = BytePtrFromString(attrname)
749 if err != nil {
750 return
751 }
752 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
753 ret = int(r0)
754 if e1 != 0 {
755 err = errnoErr(e1)
756 }
757 return
758 }
759
760 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
761
762 func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
763 var _p0 *byte
764 _p0, err = BytePtrFromString(link)
765 if err != nil {
766 return
767 }
768 var _p1 *byte
769 _p1, err = BytePtrFromString(attrname)
770 if err != nil {
771 return
772 }
773 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
774 if e1 != 0 {
775 err = errnoErr(e1)
776 }
777 return
778 }
779
780 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
781
782 func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
783 var _p0 *byte
784 _p0, err = BytePtrFromString(link)
785 if err != nil {
786 return
787 }
788 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
789 ret = int(r0)
790 if e1 != 0 {
791 err = errnoErr(e1)
792 }
793 return
794 }
795
796 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
797
798 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
799 _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
800 if e1 != 0 {
801 err = errnoErr(e1)
802 }
803 return
804 }
805
806 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
807
808 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
809 var _p0 *byte
810 _p0, err = BytePtrFromString(path)
811 if err != nil {
812 return
813 }
814 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
815 if e1 != 0 {
816 err = errnoErr(e1)
817 }
818 return
819 }
820
821 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
822
823 func Fchdir(fd int) (err error) {
824 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
825 if e1 != 0 {
826 err = errnoErr(e1)
827 }
828 return
829 }
830
831 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
832
833 func Fchflags(fd int, flags int) (err error) {
834 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
835 if e1 != 0 {
836 err = errnoErr(e1)
837 }
838 return
839 }
840
841 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
842
843 func Fchmod(fd int, mode uint32) (err error) {
844 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
845 if e1 != 0 {
846 err = errnoErr(e1)
847 }
848 return
849 }
850
851 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
852
853 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
854 var _p0 *byte
855 _p0, err = BytePtrFromString(path)
856 if err != nil {
857 return
858 }
859 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
860 if e1 != 0 {
861 err = errnoErr(e1)
862 }
863 return
864 }
865
866 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
867
868 func Fchown(fd int, uid int, gid int) (err error) {
869 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
870 if e1 != 0 {
871 err = errnoErr(e1)
872 }
873 return
874 }
875
876 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
877
878 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
879 var _p0 *byte
880 _p0, err = BytePtrFromString(path)
881 if err != nil {
882 return
883 }
884 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
885 if e1 != 0 {
886 err = errnoErr(e1)
887 }
888 return
889 }
890
891 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
892
893 func Flock(fd int, how int) (err error) {
894 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
895 if e1 != 0 {
896 err = errnoErr(e1)
897 }
898 return
899 }
900
901 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
902
903 func Fpathconf(fd int, name int) (val int, err error) {
904 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
905 val = int(r0)
906 if e1 != 0 {
907 err = errnoErr(e1)
908 }
909 return
910 }
911
912 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
913
914 func fstat(fd int, stat *stat_freebsd11_t) (err error) {
915 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
916 if e1 != 0 {
917 err = errnoErr(e1)
918 }
919 return
920 }
921
922 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
923
924 func fstat_freebsd12(fd int, stat *Stat_t) (err error) {
925 _, _, e1 := Syscall(SYS_FSTAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
926 if e1 != 0 {
927 err = errnoErr(e1)
928 }
929 return
930 }
931
932 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
933
934 func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error) {
935 var _p0 *byte
936 _p0, err = BytePtrFromString(path)
937 if err != nil {
938 return
939 }
940 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
941 if e1 != 0 {
942 err = errnoErr(e1)
943 }
944 return
945 }
946
947 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
948
949 func fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error) {
950 var _p0 *byte
951 _p0, err = BytePtrFromString(path)
952 if err != nil {
953 return
954 }
955 _, _, e1 := Syscall6(SYS_FSTATAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
956 if e1 != 0 {
957 err = errnoErr(e1)
958 }
959 return
960 }
961
962 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
963
964 func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
965 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
966 if e1 != 0 {
967 err = errnoErr(e1)
968 }
969 return
970 }
971
972 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
973
974 func fstatfs_freebsd12(fd int, stat *Statfs_t) (err error) {
975 _, _, e1 := Syscall(SYS_FSTATFS_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
976 if e1 != 0 {
977 err = errnoErr(e1)
978 }
979 return
980 }
981
982 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
983
984 func Fsync(fd int) (err error) {
985 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
986 if e1 != 0 {
987 err = errnoErr(e1)
988 }
989 return
990 }
991
992 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
993
994 func Ftruncate(fd int, length int64) (err error) {
995 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
996 if e1 != 0 {
997 err = errnoErr(e1)
998 }
999 return
1000 }
1001
1002 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1003
1004 func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
1005 var _p0 unsafe.Pointer
1006 if len(buf) > 0 {
1007 _p0 = unsafe.Pointer(&buf[0])
1008 } else {
1009 _p0 = unsafe.Pointer(&_zero)
1010 }
9351011 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
1012 n = int(r0)
1013 if e1 != 0 {
1014 err = errnoErr(e1)
1015 }
1016 return
1017 }
1018
1019 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1020
1021 func getdirentries_freebsd12(fd int, buf []byte, basep *uintptr) (n int, err error) {
1022 var _p0 unsafe.Pointer
1023 if len(buf) > 0 {
1024 _p0 = unsafe.Pointer(&buf[0])
1025 } else {
1026 _p0 = unsafe.Pointer(&_zero)
1027 }
1028 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES_FREEBSD12, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
9361029 n = int(r0)
9371030 if e1 != 0 {
9381031 err = errnoErr(e1)
11631256
11641257 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11651258
1166 func Lstat(path string, stat *Stat_t) (err error) {
1259 func lstat(path string, stat *stat_freebsd11_t) (err error) {
11671260 var _p0 *byte
11681261 _p0, err = BytePtrFromString(path)
11691262 if err != nil {
12231316
12241317 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12251318
1226 func Mknod(path string, mode uint32, dev int) (err error) {
1319 func mknod(path string, mode uint32, dev int) (err error) {
12271320 var _p0 *byte
12281321 _p0, err = BytePtrFromString(path)
12291322 if err != nil {
12301323 return
12311324 }
12321325 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1326 if e1 != 0 {
1327 err = errnoErr(e1)
1328 }
1329 return
1330 }
1331
1332 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1333
1334 func mknodat(fd int, path string, mode uint32, dev int) (err error) {
1335 var _p0 *byte
1336 _p0, err = BytePtrFromString(path)
1337 if err != nil {
1338 return
1339 }
1340 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
1341 if e1 != 0 {
1342 err = errnoErr(e1)
1343 }
1344 return
1345 }
1346
1347 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1348
1349 func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error) {
1350 var _p0 *byte
1351 _p0, err = BytePtrFromString(path)
1352 if err != nil {
1353 return
1354 }
1355 _, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
12331356 if e1 != 0 {
12341357 err = errnoErr(e1)
12351358 }
16281751
16291752 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16301753
1631 func Stat(path string, stat *Stat_t) (err error) {
1754 func stat(path string, stat *stat_freebsd11_t) (err error) {
16321755 var _p0 *byte
16331756 _p0, err = BytePtrFromString(path)
16341757 if err != nil {
16431766
16441767 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16451768
1646 func Statfs(path string, stat *Statfs_t) (err error) {
1769 func statfs(path string, stat *statfs_freebsd11_t) (err error) {
16471770 var _p0 *byte
16481771 _p0, err = BytePtrFromString(path)
16491772 if err != nil {
16501773 return
16511774 }
16521775 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1776 if e1 != 0 {
1777 err = errnoErr(e1)
1778 }
1779 return
1780 }
1781
1782 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1783
1784 func statfs_freebsd12(path string, stat *Statfs_t) (err error) {
1785 var _p0 *byte
1786 _p0, err = BytePtrFromString(path)
1787 if err != nil {
1788 return
1789 }
1790 _, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
16531791 if e1 != 0 {
16541792 err = errnoErr(e1)
16551793 }
0 // mksyscall.pl -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go
0 // go run mksyscall.go -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build freebsd,arm
265265
266266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
268279 func Madvise(b []byte, behav int) (err error) {
269280 var _p0 unsafe.Pointer
270281 if len(b) > 0 {
365376
366377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
367378
368 func pipe() (r int, w int, err error) {
369 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
370 r = int(r0)
371 w = int(r1)
372 if e1 != 0 {
373 err = errnoErr(e1)
374 }
375 return
376 }
377
378 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
379
380 func ioctl(fd int, req uint, arg uintptr) (err error) {
381 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
382 if e1 != 0 {
383 err = errnoErr(e1)
384 }
385 return
386 }
387
388 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
389
390 func Access(path string, mode uint32) (err error) {
391 var _p0 *byte
392 _p0, err = BytePtrFromString(path)
393 if err != nil {
394 return
395 }
396 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
397 if e1 != 0 {
398 err = errnoErr(e1)
399 }
400 return
401 }
402
403 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
404
405 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
406 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
407 if e1 != 0 {
408 err = errnoErr(e1)
409 }
410 return
411 }
412
413 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
414
415 func CapEnter() (err error) {
416 _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)
417 if e1 != 0 {
418 err = errnoErr(e1)
419 }
420 return
421 }
422
423 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
424
425 func capRightsGet(version int, fd int, rightsp *CapRights) (err error) {
426 _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))
427 if e1 != 0 {
428 err = errnoErr(e1)
429 }
430 return
431 }
432
433 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
434
435 func capRightsLimit(fd int, rightsp *CapRights) (err error) {
436 _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)
437 if e1 != 0 {
438 err = errnoErr(e1)
439 }
440 return
441 }
442
443 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
444
445 func Chdir(path string) (err error) {
446 var _p0 *byte
447 _p0, err = BytePtrFromString(path)
448 if err != nil {
449 return
450 }
451 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
452 if e1 != 0 {
453 err = errnoErr(e1)
454 }
455 return
456 }
457
458 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
459
460 func Chflags(path string, flags int) (err error) {
461 var _p0 *byte
462 _p0, err = BytePtrFromString(path)
463 if err != nil {
464 return
465 }
466 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
467 if e1 != 0 {
468 err = errnoErr(e1)
469 }
470 return
471 }
472
473 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
474
475 func Chmod(path string, mode uint32) (err error) {
476 var _p0 *byte
477 _p0, err = BytePtrFromString(path)
478 if err != nil {
479 return
480 }
481 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
482 if e1 != 0 {
483 err = errnoErr(e1)
484 }
485 return
486 }
487
488 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
489
490 func Chown(path string, uid int, gid int) (err error) {
491 var _p0 *byte
492 _p0, err = BytePtrFromString(path)
493 if err != nil {
494 return
495 }
496 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
497 if e1 != 0 {
498 err = errnoErr(e1)
499 }
500 return
501 }
502
503 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
504
505 func Chroot(path string) (err error) {
506 var _p0 *byte
507 _p0, err = BytePtrFromString(path)
508 if err != nil {
509 return
510 }
511 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
512 if e1 != 0 {
513 err = errnoErr(e1)
514 }
515 return
516 }
517
518 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
519
520 func Close(fd int) (err error) {
521 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
522 if e1 != 0 {
523 err = errnoErr(e1)
524 }
525 return
526 }
527
528 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
529
530 func Dup(fd int) (nfd int, err error) {
531 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
532 nfd = int(r0)
533 if e1 != 0 {
534 err = errnoErr(e1)
535 }
536 return
537 }
538
539 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
540
541 func Dup2(from int, to int) (err error) {
542 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
543 if e1 != 0 {
544 err = errnoErr(e1)
545 }
546 return
547 }
548
549 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
550
551 func Exit(code int) {
552 Syscall(SYS_EXIT, uintptr(code), 0, 0)
553 return
554 }
555
556 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
557
558 func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
559 var _p0 *byte
560 _p0, err = BytePtrFromString(attrname)
561 if err != nil {
562 return
563 }
564 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
565 ret = int(r0)
566 if e1 != 0 {
567 err = errnoErr(e1)
568 }
569 return
570 }
571
572 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
573
574 func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
575 var _p0 *byte
576 _p0, err = BytePtrFromString(attrname)
577 if err != nil {
578 return
579 }
580 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
581 ret = int(r0)
582 if e1 != 0 {
583 err = errnoErr(e1)
584 }
585 return
586 }
587
588 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
589
590 func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
591 var _p0 *byte
592 _p0, err = BytePtrFromString(attrname)
593 if err != nil {
594 return
595 }
596 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
597 if e1 != 0 {
598 err = errnoErr(e1)
599 }
600 return
601 }
602
603 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
604
605 func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
606 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
607 ret = int(r0)
608 if e1 != 0 {
609 err = errnoErr(e1)
610 }
611 return
612 }
613
614 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
615
616 func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
617 var _p0 *byte
618 _p0, err = BytePtrFromString(file)
619 if err != nil {
620 return
621 }
622 var _p1 *byte
623 _p1, err = BytePtrFromString(attrname)
624 if err != nil {
625 return
626 }
627 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
628 ret = int(r0)
629 if e1 != 0 {
630 err = errnoErr(e1)
631 }
632 return
633 }
634
635 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
636
637 func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
638 var _p0 *byte
639 _p0, err = BytePtrFromString(file)
640 if err != nil {
641 return
642 }
643 var _p1 *byte
644 _p1, err = BytePtrFromString(attrname)
645 if err != nil {
646 return
647 }
648 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
649 ret = int(r0)
650 if e1 != 0 {
651 err = errnoErr(e1)
652 }
653 return
654 }
655
656 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
657
658 func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
659 var _p0 *byte
660 _p0, err = BytePtrFromString(file)
661 if err != nil {
662 return
663 }
664 var _p1 *byte
665 _p1, err = BytePtrFromString(attrname)
666 if err != nil {
667 return
668 }
669 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
670 if e1 != 0 {
671 err = errnoErr(e1)
672 }
673 return
674 }
675
676 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
677
678 func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
679 var _p0 *byte
680 _p0, err = BytePtrFromString(file)
681 if err != nil {
682 return
683 }
684 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
685 ret = int(r0)
686 if e1 != 0 {
687 err = errnoErr(e1)
688 }
689 return
690 }
691
692 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
693
694 func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
695 var _p0 *byte
696 _p0, err = BytePtrFromString(link)
697 if err != nil {
698 return
699 }
700 var _p1 *byte
701 _p1, err = BytePtrFromString(attrname)
702 if err != nil {
703 return
704 }
705 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
706 ret = int(r0)
707 if e1 != 0 {
708 err = errnoErr(e1)
709 }
710 return
711 }
712
713 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
714
715 func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
716 var _p0 *byte
717 _p0, err = BytePtrFromString(link)
718 if err != nil {
719 return
720 }
721 var _p1 *byte
722 _p1, err = BytePtrFromString(attrname)
723 if err != nil {
724 return
725 }
726 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
727 ret = int(r0)
728 if e1 != 0 {
729 err = errnoErr(e1)
730 }
731 return
732 }
733
734 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
735
736 func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
737 var _p0 *byte
738 _p0, err = BytePtrFromString(link)
739 if err != nil {
740 return
741 }
742 var _p1 *byte
743 _p1, err = BytePtrFromString(attrname)
744 if err != nil {
745 return
746 }
747 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
748 if e1 != 0 {
749 err = errnoErr(e1)
750 }
751 return
752 }
753
754 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
755
756 func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
757 var _p0 *byte
758 _p0, err = BytePtrFromString(link)
759 if err != nil {
760 return
761 }
762 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
763 ret = int(r0)
764 if e1 != 0 {
765 err = errnoErr(e1)
766 }
767 return
768 }
769
770 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
771
772 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
773 _, _, e1 := Syscall9(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice), 0, 0)
774 if e1 != 0 {
775 err = errnoErr(e1)
776 }
777 return
778 }
779
780 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
781
782 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
783 var _p0 *byte
784 _p0, err = BytePtrFromString(path)
785 if err != nil {
786 return
787 }
788 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
789 if e1 != 0 {
790 err = errnoErr(e1)
791 }
792 return
793 }
794
795 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
796
797 func Fchdir(fd int) (err error) {
798 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
799 if e1 != 0 {
800 err = errnoErr(e1)
801 }
802 return
803 }
804
805 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
806
807 func Fchflags(fd int, flags int) (err error) {
808 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
809 if e1 != 0 {
810 err = errnoErr(e1)
811 }
812 return
813 }
814
815 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
816
817 func Fchmod(fd int, mode uint32) (err error) {
818 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
819 if e1 != 0 {
820 err = errnoErr(e1)
821 }
822 return
823 }
824
825 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
826
827 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
828 var _p0 *byte
829 _p0, err = BytePtrFromString(path)
830 if err != nil {
831 return
832 }
833 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
834 if e1 != 0 {
835 err = errnoErr(e1)
836 }
837 return
838 }
839
840 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
841
842 func Fchown(fd int, uid int, gid int) (err error) {
843 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
844 if e1 != 0 {
845 err = errnoErr(e1)
846 }
847 return
848 }
849
850 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
851
852 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
853 var _p0 *byte
854 _p0, err = BytePtrFromString(path)
855 if err != nil {
856 return
857 }
858 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
859 if e1 != 0 {
860 err = errnoErr(e1)
861 }
862 return
863 }
864
865 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
866
867 func Flock(fd int, how int) (err error) {
868 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
869 if e1 != 0 {
870 err = errnoErr(e1)
871 }
872 return
873 }
874
875 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
876
877 func Fpathconf(fd int, name int) (val int, err error) {
878 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
879 val = int(r0)
880 if e1 != 0 {
881 err = errnoErr(e1)
882 }
883 return
884 }
885
886 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
887
888 func Fstat(fd int, stat *Stat_t) (err error) {
889 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
890 if e1 != 0 {
891 err = errnoErr(e1)
892 }
893 return
894 }
895
896 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
897
898 func Fstatfs(fd int, stat *Statfs_t) (err error) {
899 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
900 if e1 != 0 {
901 err = errnoErr(e1)
902 }
903 return
904 }
905
906 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
907
908 func Fsync(fd int) (err error) {
909 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
910 if e1 != 0 {
911 err = errnoErr(e1)
912 }
913 return
914 }
915
916 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
917
918 func Ftruncate(fd int, length int64) (err error) {
919 _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
920 if e1 != 0 {
921 err = errnoErr(e1)
922 }
923 return
924 }
925
926 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
927
928 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
379 func pipe2(p *[2]_C_int, flags int) (err error) {
380 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
381 if e1 != 0 {
382 err = errnoErr(e1)
383 }
384 return
385 }
386
387 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
388
389 func Getcwd(buf []byte) (n int, err error) {
929390 var _p0 unsafe.Pointer
930391 if len(buf) > 0 {
931392 _p0 = unsafe.Pointer(&buf[0])
932393 } else {
933394 _p0 = unsafe.Pointer(&_zero)
934395 }
396 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
397 n = int(r0)
398 if e1 != 0 {
399 err = errnoErr(e1)
400 }
401 return
402 }
403
404 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
405
406 func ioctl(fd int, req uint, arg uintptr) (err error) {
407 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
408 if e1 != 0 {
409 err = errnoErr(e1)
410 }
411 return
412 }
413
414 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
415
416 func Access(path string, mode uint32) (err error) {
417 var _p0 *byte
418 _p0, err = BytePtrFromString(path)
419 if err != nil {
420 return
421 }
422 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
423 if e1 != 0 {
424 err = errnoErr(e1)
425 }
426 return
427 }
428
429 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
430
431 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
432 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
433 if e1 != 0 {
434 err = errnoErr(e1)
435 }
436 return
437 }
438
439 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
440
441 func CapEnter() (err error) {
442 _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)
443 if e1 != 0 {
444 err = errnoErr(e1)
445 }
446 return
447 }
448
449 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
450
451 func capRightsGet(version int, fd int, rightsp *CapRights) (err error) {
452 _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))
453 if e1 != 0 {
454 err = errnoErr(e1)
455 }
456 return
457 }
458
459 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
460
461 func capRightsLimit(fd int, rightsp *CapRights) (err error) {
462 _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)
463 if e1 != 0 {
464 err = errnoErr(e1)
465 }
466 return
467 }
468
469 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
470
471 func Chdir(path string) (err error) {
472 var _p0 *byte
473 _p0, err = BytePtrFromString(path)
474 if err != nil {
475 return
476 }
477 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
478 if e1 != 0 {
479 err = errnoErr(e1)
480 }
481 return
482 }
483
484 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
485
486 func Chflags(path string, flags int) (err error) {
487 var _p0 *byte
488 _p0, err = BytePtrFromString(path)
489 if err != nil {
490 return
491 }
492 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
493 if e1 != 0 {
494 err = errnoErr(e1)
495 }
496 return
497 }
498
499 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
500
501 func Chmod(path string, mode uint32) (err error) {
502 var _p0 *byte
503 _p0, err = BytePtrFromString(path)
504 if err != nil {
505 return
506 }
507 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
508 if e1 != 0 {
509 err = errnoErr(e1)
510 }
511 return
512 }
513
514 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
515
516 func Chown(path string, uid int, gid int) (err error) {
517 var _p0 *byte
518 _p0, err = BytePtrFromString(path)
519 if err != nil {
520 return
521 }
522 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
523 if e1 != 0 {
524 err = errnoErr(e1)
525 }
526 return
527 }
528
529 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
530
531 func Chroot(path string) (err error) {
532 var _p0 *byte
533 _p0, err = BytePtrFromString(path)
534 if err != nil {
535 return
536 }
537 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
538 if e1 != 0 {
539 err = errnoErr(e1)
540 }
541 return
542 }
543
544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545
546 func Close(fd int) (err error) {
547 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
548 if e1 != 0 {
549 err = errnoErr(e1)
550 }
551 return
552 }
553
554 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
555
556 func Dup(fd int) (nfd int, err error) {
557 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
558 nfd = int(r0)
559 if e1 != 0 {
560 err = errnoErr(e1)
561 }
562 return
563 }
564
565 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
566
567 func Dup2(from int, to int) (err error) {
568 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
569 if e1 != 0 {
570 err = errnoErr(e1)
571 }
572 return
573 }
574
575 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
576
577 func Exit(code int) {
578 Syscall(SYS_EXIT, uintptr(code), 0, 0)
579 return
580 }
581
582 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
583
584 func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
585 var _p0 *byte
586 _p0, err = BytePtrFromString(attrname)
587 if err != nil {
588 return
589 }
590 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
591 ret = int(r0)
592 if e1 != 0 {
593 err = errnoErr(e1)
594 }
595 return
596 }
597
598 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
599
600 func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
601 var _p0 *byte
602 _p0, err = BytePtrFromString(attrname)
603 if err != nil {
604 return
605 }
606 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
607 ret = int(r0)
608 if e1 != 0 {
609 err = errnoErr(e1)
610 }
611 return
612 }
613
614 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
615
616 func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
617 var _p0 *byte
618 _p0, err = BytePtrFromString(attrname)
619 if err != nil {
620 return
621 }
622 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
623 if e1 != 0 {
624 err = errnoErr(e1)
625 }
626 return
627 }
628
629 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
630
631 func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
632 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
633 ret = int(r0)
634 if e1 != 0 {
635 err = errnoErr(e1)
636 }
637 return
638 }
639
640 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
641
642 func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
643 var _p0 *byte
644 _p0, err = BytePtrFromString(file)
645 if err != nil {
646 return
647 }
648 var _p1 *byte
649 _p1, err = BytePtrFromString(attrname)
650 if err != nil {
651 return
652 }
653 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
654 ret = int(r0)
655 if e1 != 0 {
656 err = errnoErr(e1)
657 }
658 return
659 }
660
661 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
662
663 func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
664 var _p0 *byte
665 _p0, err = BytePtrFromString(file)
666 if err != nil {
667 return
668 }
669 var _p1 *byte
670 _p1, err = BytePtrFromString(attrname)
671 if err != nil {
672 return
673 }
674 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
675 ret = int(r0)
676 if e1 != 0 {
677 err = errnoErr(e1)
678 }
679 return
680 }
681
682 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
683
684 func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
685 var _p0 *byte
686 _p0, err = BytePtrFromString(file)
687 if err != nil {
688 return
689 }
690 var _p1 *byte
691 _p1, err = BytePtrFromString(attrname)
692 if err != nil {
693 return
694 }
695 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
696 if e1 != 0 {
697 err = errnoErr(e1)
698 }
699 return
700 }
701
702 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
703
704 func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
705 var _p0 *byte
706 _p0, err = BytePtrFromString(file)
707 if err != nil {
708 return
709 }
710 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
711 ret = int(r0)
712 if e1 != 0 {
713 err = errnoErr(e1)
714 }
715 return
716 }
717
718 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
719
720 func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
721 var _p0 *byte
722 _p0, err = BytePtrFromString(link)
723 if err != nil {
724 return
725 }
726 var _p1 *byte
727 _p1, err = BytePtrFromString(attrname)
728 if err != nil {
729 return
730 }
731 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
732 ret = int(r0)
733 if e1 != 0 {
734 err = errnoErr(e1)
735 }
736 return
737 }
738
739 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
740
741 func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
742 var _p0 *byte
743 _p0, err = BytePtrFromString(link)
744 if err != nil {
745 return
746 }
747 var _p1 *byte
748 _p1, err = BytePtrFromString(attrname)
749 if err != nil {
750 return
751 }
752 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
753 ret = int(r0)
754 if e1 != 0 {
755 err = errnoErr(e1)
756 }
757 return
758 }
759
760 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
761
762 func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
763 var _p0 *byte
764 _p0, err = BytePtrFromString(link)
765 if err != nil {
766 return
767 }
768 var _p1 *byte
769 _p1, err = BytePtrFromString(attrname)
770 if err != nil {
771 return
772 }
773 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
774 if e1 != 0 {
775 err = errnoErr(e1)
776 }
777 return
778 }
779
780 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
781
782 func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
783 var _p0 *byte
784 _p0, err = BytePtrFromString(link)
785 if err != nil {
786 return
787 }
788 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
789 ret = int(r0)
790 if e1 != 0 {
791 err = errnoErr(e1)
792 }
793 return
794 }
795
796 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
797
798 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
799 _, _, e1 := Syscall9(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice), 0, 0)
800 if e1 != 0 {
801 err = errnoErr(e1)
802 }
803 return
804 }
805
806 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
807
808 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
809 var _p0 *byte
810 _p0, err = BytePtrFromString(path)
811 if err != nil {
812 return
813 }
814 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
815 if e1 != 0 {
816 err = errnoErr(e1)
817 }
818 return
819 }
820
821 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
822
823 func Fchdir(fd int) (err error) {
824 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
825 if e1 != 0 {
826 err = errnoErr(e1)
827 }
828 return
829 }
830
831 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
832
833 func Fchflags(fd int, flags int) (err error) {
834 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
835 if e1 != 0 {
836 err = errnoErr(e1)
837 }
838 return
839 }
840
841 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
842
843 func Fchmod(fd int, mode uint32) (err error) {
844 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
845 if e1 != 0 {
846 err = errnoErr(e1)
847 }
848 return
849 }
850
851 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
852
853 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
854 var _p0 *byte
855 _p0, err = BytePtrFromString(path)
856 if err != nil {
857 return
858 }
859 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
860 if e1 != 0 {
861 err = errnoErr(e1)
862 }
863 return
864 }
865
866 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
867
868 func Fchown(fd int, uid int, gid int) (err error) {
869 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
870 if e1 != 0 {
871 err = errnoErr(e1)
872 }
873 return
874 }
875
876 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
877
878 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
879 var _p0 *byte
880 _p0, err = BytePtrFromString(path)
881 if err != nil {
882 return
883 }
884 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
885 if e1 != 0 {
886 err = errnoErr(e1)
887 }
888 return
889 }
890
891 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
892
893 func Flock(fd int, how int) (err error) {
894 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
895 if e1 != 0 {
896 err = errnoErr(e1)
897 }
898 return
899 }
900
901 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
902
903 func Fpathconf(fd int, name int) (val int, err error) {
904 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
905 val = int(r0)
906 if e1 != 0 {
907 err = errnoErr(e1)
908 }
909 return
910 }
911
912 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
913
914 func fstat(fd int, stat *stat_freebsd11_t) (err error) {
915 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
916 if e1 != 0 {
917 err = errnoErr(e1)
918 }
919 return
920 }
921
922 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
923
924 func fstat_freebsd12(fd int, stat *Stat_t) (err error) {
925 _, _, e1 := Syscall(SYS_FSTAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
926 if e1 != 0 {
927 err = errnoErr(e1)
928 }
929 return
930 }
931
932 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
933
934 func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error) {
935 var _p0 *byte
936 _p0, err = BytePtrFromString(path)
937 if err != nil {
938 return
939 }
940 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
941 if e1 != 0 {
942 err = errnoErr(e1)
943 }
944 return
945 }
946
947 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
948
949 func fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error) {
950 var _p0 *byte
951 _p0, err = BytePtrFromString(path)
952 if err != nil {
953 return
954 }
955 _, _, e1 := Syscall6(SYS_FSTATAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
956 if e1 != 0 {
957 err = errnoErr(e1)
958 }
959 return
960 }
961
962 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
963
964 func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
965 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
966 if e1 != 0 {
967 err = errnoErr(e1)
968 }
969 return
970 }
971
972 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
973
974 func fstatfs_freebsd12(fd int, stat *Statfs_t) (err error) {
975 _, _, e1 := Syscall(SYS_FSTATFS_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
976 if e1 != 0 {
977 err = errnoErr(e1)
978 }
979 return
980 }
981
982 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
983
984 func Fsync(fd int) (err error) {
985 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
986 if e1 != 0 {
987 err = errnoErr(e1)
988 }
989 return
990 }
991
992 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
993
994 func Ftruncate(fd int, length int64) (err error) {
995 _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
996 if e1 != 0 {
997 err = errnoErr(e1)
998 }
999 return
1000 }
1001
1002 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1003
1004 func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
1005 var _p0 unsafe.Pointer
1006 if len(buf) > 0 {
1007 _p0 = unsafe.Pointer(&buf[0])
1008 } else {
1009 _p0 = unsafe.Pointer(&_zero)
1010 }
9351011 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
1012 n = int(r0)
1013 if e1 != 0 {
1014 err = errnoErr(e1)
1015 }
1016 return
1017 }
1018
1019 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1020
1021 func getdirentries_freebsd12(fd int, buf []byte, basep *uintptr) (n int, err error) {
1022 var _p0 unsafe.Pointer
1023 if len(buf) > 0 {
1024 _p0 = unsafe.Pointer(&buf[0])
1025 } else {
1026 _p0 = unsafe.Pointer(&_zero)
1027 }
1028 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES_FREEBSD12, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
9361029 n = int(r0)
9371030 if e1 != 0 {
9381031 err = errnoErr(e1)
11631256
11641257 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11651258
1166 func Lstat(path string, stat *Stat_t) (err error) {
1259 func lstat(path string, stat *stat_freebsd11_t) (err error) {
11671260 var _p0 *byte
11681261 _p0, err = BytePtrFromString(path)
11691262 if err != nil {
12231316
12241317 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12251318
1226 func Mknod(path string, mode uint32, dev int) (err error) {
1319 func mknod(path string, mode uint32, dev int) (err error) {
12271320 var _p0 *byte
12281321 _p0, err = BytePtrFromString(path)
12291322 if err != nil {
12301323 return
12311324 }
12321325 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1326 if e1 != 0 {
1327 err = errnoErr(e1)
1328 }
1329 return
1330 }
1331
1332 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1333
1334 func mknodat(fd int, path string, mode uint32, dev int) (err error) {
1335 var _p0 *byte
1336 _p0, err = BytePtrFromString(path)
1337 if err != nil {
1338 return
1339 }
1340 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
1341 if e1 != 0 {
1342 err = errnoErr(e1)
1343 }
1344 return
1345 }
1346
1347 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1348
1349 func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error) {
1350 var _p0 *byte
1351 _p0, err = BytePtrFromString(path)
1352 if err != nil {
1353 return
1354 }
1355 _, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
12331356 if e1 != 0 {
12341357 err = errnoErr(e1)
12351358 }
16281751
16291752 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16301753
1631 func Stat(path string, stat *Stat_t) (err error) {
1754 func stat(path string, stat *stat_freebsd11_t) (err error) {
16321755 var _p0 *byte
16331756 _p0, err = BytePtrFromString(path)
16341757 if err != nil {
16431766
16441767 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16451768
1646 func Statfs(path string, stat *Statfs_t) (err error) {
1769 func statfs(path string, stat *statfs_freebsd11_t) (err error) {
16471770 var _p0 *byte
16481771 _p0, err = BytePtrFromString(path)
16491772 if err != nil {
16501773 return
16511774 }
16521775 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1776 if e1 != 0 {
1777 err = errnoErr(e1)
1778 }
1779 return
1780 }
1781
1782 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1783
1784 func statfs_freebsd12(path string, stat *Statfs_t) (err error) {
1785 var _p0 *byte
1786 _p0, err = BytePtrFromString(path)
1787 if err != nil {
1788 return
1789 }
1790 _, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
16531791 if e1 != 0 {
16541792 err = errnoErr(e1)
16551793 }
0 // go run mksyscall.go -tags freebsd,arm64 -- syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm64.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build freebsd,arm64
4
5 package unix
6
7 import (
8 "syscall"
9 "unsafe"
10 )
11
12 var _ syscall.Errno
13
14 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15
16 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
17 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
18 n = int(r0)
19 if e1 != 0 {
20 err = errnoErr(e1)
21 }
22 return
23 }
24
25 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
26
27 func setgroups(ngid int, gid *_Gid_t) (err error) {
28 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
29 if e1 != 0 {
30 err = errnoErr(e1)
31 }
32 return
33 }
34
35 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
36
37 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
38 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
39 wpid = int(r0)
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
49 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
50 fd = int(r0)
51 if e1 != 0 {
52 err = errnoErr(e1)
53 }
54 return
55 }
56
57 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
58
59 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
60 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
61 if e1 != 0 {
62 err = errnoErr(e1)
63 }
64 return
65 }
66
67 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
68
69 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
70 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
71 if e1 != 0 {
72 err = errnoErr(e1)
73 }
74 return
75 }
76
77 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
78
79 func socket(domain int, typ int, proto int) (fd int, err error) {
80 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
81 fd = int(r0)
82 if e1 != 0 {
83 err = errnoErr(e1)
84 }
85 return
86 }
87
88 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
89
90 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
91 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
92 if e1 != 0 {
93 err = errnoErr(e1)
94 }
95 return
96 }
97
98 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
99
100 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
101 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
102 if e1 != 0 {
103 err = errnoErr(e1)
104 }
105 return
106 }
107
108 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
109
110 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
111 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
112 if e1 != 0 {
113 err = errnoErr(e1)
114 }
115 return
116 }
117
118 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
119
120 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
121 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
122 if e1 != 0 {
123 err = errnoErr(e1)
124 }
125 return
126 }
127
128 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
129
130 func Shutdown(s int, how int) (err error) {
131 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
132 if e1 != 0 {
133 err = errnoErr(e1)
134 }
135 return
136 }
137
138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
139
140 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
141 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
142 if e1 != 0 {
143 err = errnoErr(e1)
144 }
145 return
146 }
147
148 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
149
150 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
151 var _p0 unsafe.Pointer
152 if len(p) > 0 {
153 _p0 = unsafe.Pointer(&p[0])
154 } else {
155 _p0 = unsafe.Pointer(&_zero)
156 }
157 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
158 n = int(r0)
159 if e1 != 0 {
160 err = errnoErr(e1)
161 }
162 return
163 }
164
165 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
166
167 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
168 var _p0 unsafe.Pointer
169 if len(buf) > 0 {
170 _p0 = unsafe.Pointer(&buf[0])
171 } else {
172 _p0 = unsafe.Pointer(&_zero)
173 }
174 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
175 if e1 != 0 {
176 err = errnoErr(e1)
177 }
178 return
179 }
180
181 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
182
183 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
184 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
185 n = int(r0)
186 if e1 != 0 {
187 err = errnoErr(e1)
188 }
189 return
190 }
191
192 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
193
194 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
195 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
196 n = int(r0)
197 if e1 != 0 {
198 err = errnoErr(e1)
199 }
200 return
201 }
202
203 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
204
205 func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
206 r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
207 n = int(r0)
208 if e1 != 0 {
209 err = errnoErr(e1)
210 }
211 return
212 }
213
214 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
215
216 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
217 var _p0 unsafe.Pointer
218 if len(mib) > 0 {
219 _p0 = unsafe.Pointer(&mib[0])
220 } else {
221 _p0 = unsafe.Pointer(&_zero)
222 }
223 _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
224 if e1 != 0 {
225 err = errnoErr(e1)
226 }
227 return
228 }
229
230 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
231
232 func utimes(path string, timeval *[2]Timeval) (err error) {
233 var _p0 *byte
234 _p0, err = BytePtrFromString(path)
235 if err != nil {
236 return
237 }
238 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
239 if e1 != 0 {
240 err = errnoErr(e1)
241 }
242 return
243 }
244
245 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
246
247 func futimes(fd int, timeval *[2]Timeval) (err error) {
248 _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
249 if e1 != 0 {
250 err = errnoErr(e1)
251 }
252 return
253 }
254
255 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
256
257 func fcntl(fd int, cmd int, arg int) (val int, err error) {
258 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
259 val = int(r0)
260 if e1 != 0 {
261 err = errnoErr(e1)
262 }
263 return
264 }
265
266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
279 func Madvise(b []byte, behav int) (err error) {
280 var _p0 unsafe.Pointer
281 if len(b) > 0 {
282 _p0 = unsafe.Pointer(&b[0])
283 } else {
284 _p0 = unsafe.Pointer(&_zero)
285 }
286 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
287 if e1 != 0 {
288 err = errnoErr(e1)
289 }
290 return
291 }
292
293 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
294
295 func Mlock(b []byte) (err error) {
296 var _p0 unsafe.Pointer
297 if len(b) > 0 {
298 _p0 = unsafe.Pointer(&b[0])
299 } else {
300 _p0 = unsafe.Pointer(&_zero)
301 }
302 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
303 if e1 != 0 {
304 err = errnoErr(e1)
305 }
306 return
307 }
308
309 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
310
311 func Mlockall(flags int) (err error) {
312 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
313 if e1 != 0 {
314 err = errnoErr(e1)
315 }
316 return
317 }
318
319 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
320
321 func Mprotect(b []byte, prot int) (err error) {
322 var _p0 unsafe.Pointer
323 if len(b) > 0 {
324 _p0 = unsafe.Pointer(&b[0])
325 } else {
326 _p0 = unsafe.Pointer(&_zero)
327 }
328 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
329 if e1 != 0 {
330 err = errnoErr(e1)
331 }
332 return
333 }
334
335 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
336
337 func Msync(b []byte, flags int) (err error) {
338 var _p0 unsafe.Pointer
339 if len(b) > 0 {
340 _p0 = unsafe.Pointer(&b[0])
341 } else {
342 _p0 = unsafe.Pointer(&_zero)
343 }
344 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
345 if e1 != 0 {
346 err = errnoErr(e1)
347 }
348 return
349 }
350
351 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
352
353 func Munlock(b []byte) (err error) {
354 var _p0 unsafe.Pointer
355 if len(b) > 0 {
356 _p0 = unsafe.Pointer(&b[0])
357 } else {
358 _p0 = unsafe.Pointer(&_zero)
359 }
360 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
361 if e1 != 0 {
362 err = errnoErr(e1)
363 }
364 return
365 }
366
367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
368
369 func Munlockall() (err error) {
370 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
371 if e1 != 0 {
372 err = errnoErr(e1)
373 }
374 return
375 }
376
377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
378
379 func pipe2(p *[2]_C_int, flags int) (err error) {
380 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
381 if e1 != 0 {
382 err = errnoErr(e1)
383 }
384 return
385 }
386
387 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
388
389 func Getcwd(buf []byte) (n int, err error) {
390 var _p0 unsafe.Pointer
391 if len(buf) > 0 {
392 _p0 = unsafe.Pointer(&buf[0])
393 } else {
394 _p0 = unsafe.Pointer(&_zero)
395 }
396 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
397 n = int(r0)
398 if e1 != 0 {
399 err = errnoErr(e1)
400 }
401 return
402 }
403
404 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
405
406 func ioctl(fd int, req uint, arg uintptr) (err error) {
407 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
408 if e1 != 0 {
409 err = errnoErr(e1)
410 }
411 return
412 }
413
414 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
415
416 func Access(path string, mode uint32) (err error) {
417 var _p0 *byte
418 _p0, err = BytePtrFromString(path)
419 if err != nil {
420 return
421 }
422 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
423 if e1 != 0 {
424 err = errnoErr(e1)
425 }
426 return
427 }
428
429 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
430
431 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
432 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
433 if e1 != 0 {
434 err = errnoErr(e1)
435 }
436 return
437 }
438
439 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
440
441 func CapEnter() (err error) {
442 _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)
443 if e1 != 0 {
444 err = errnoErr(e1)
445 }
446 return
447 }
448
449 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
450
451 func capRightsGet(version int, fd int, rightsp *CapRights) (err error) {
452 _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))
453 if e1 != 0 {
454 err = errnoErr(e1)
455 }
456 return
457 }
458
459 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
460
461 func capRightsLimit(fd int, rightsp *CapRights) (err error) {
462 _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)
463 if e1 != 0 {
464 err = errnoErr(e1)
465 }
466 return
467 }
468
469 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
470
471 func Chdir(path string) (err error) {
472 var _p0 *byte
473 _p0, err = BytePtrFromString(path)
474 if err != nil {
475 return
476 }
477 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
478 if e1 != 0 {
479 err = errnoErr(e1)
480 }
481 return
482 }
483
484 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
485
486 func Chflags(path string, flags int) (err error) {
487 var _p0 *byte
488 _p0, err = BytePtrFromString(path)
489 if err != nil {
490 return
491 }
492 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
493 if e1 != 0 {
494 err = errnoErr(e1)
495 }
496 return
497 }
498
499 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
500
501 func Chmod(path string, mode uint32) (err error) {
502 var _p0 *byte
503 _p0, err = BytePtrFromString(path)
504 if err != nil {
505 return
506 }
507 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
508 if e1 != 0 {
509 err = errnoErr(e1)
510 }
511 return
512 }
513
514 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
515
516 func Chown(path string, uid int, gid int) (err error) {
517 var _p0 *byte
518 _p0, err = BytePtrFromString(path)
519 if err != nil {
520 return
521 }
522 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
523 if e1 != 0 {
524 err = errnoErr(e1)
525 }
526 return
527 }
528
529 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
530
531 func Chroot(path string) (err error) {
532 var _p0 *byte
533 _p0, err = BytePtrFromString(path)
534 if err != nil {
535 return
536 }
537 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
538 if e1 != 0 {
539 err = errnoErr(e1)
540 }
541 return
542 }
543
544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545
546 func Close(fd int) (err error) {
547 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
548 if e1 != 0 {
549 err = errnoErr(e1)
550 }
551 return
552 }
553
554 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
555
556 func Dup(fd int) (nfd int, err error) {
557 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
558 nfd = int(r0)
559 if e1 != 0 {
560 err = errnoErr(e1)
561 }
562 return
563 }
564
565 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
566
567 func Dup2(from int, to int) (err error) {
568 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
569 if e1 != 0 {
570 err = errnoErr(e1)
571 }
572 return
573 }
574
575 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
576
577 func Exit(code int) {
578 Syscall(SYS_EXIT, uintptr(code), 0, 0)
579 return
580 }
581
582 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
583
584 func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
585 var _p0 *byte
586 _p0, err = BytePtrFromString(attrname)
587 if err != nil {
588 return
589 }
590 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
591 ret = int(r0)
592 if e1 != 0 {
593 err = errnoErr(e1)
594 }
595 return
596 }
597
598 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
599
600 func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
601 var _p0 *byte
602 _p0, err = BytePtrFromString(attrname)
603 if err != nil {
604 return
605 }
606 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
607 ret = int(r0)
608 if e1 != 0 {
609 err = errnoErr(e1)
610 }
611 return
612 }
613
614 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
615
616 func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
617 var _p0 *byte
618 _p0, err = BytePtrFromString(attrname)
619 if err != nil {
620 return
621 }
622 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
623 if e1 != 0 {
624 err = errnoErr(e1)
625 }
626 return
627 }
628
629 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
630
631 func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
632 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
633 ret = int(r0)
634 if e1 != 0 {
635 err = errnoErr(e1)
636 }
637 return
638 }
639
640 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
641
642 func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
643 var _p0 *byte
644 _p0, err = BytePtrFromString(file)
645 if err != nil {
646 return
647 }
648 var _p1 *byte
649 _p1, err = BytePtrFromString(attrname)
650 if err != nil {
651 return
652 }
653 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
654 ret = int(r0)
655 if e1 != 0 {
656 err = errnoErr(e1)
657 }
658 return
659 }
660
661 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
662
663 func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
664 var _p0 *byte
665 _p0, err = BytePtrFromString(file)
666 if err != nil {
667 return
668 }
669 var _p1 *byte
670 _p1, err = BytePtrFromString(attrname)
671 if err != nil {
672 return
673 }
674 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
675 ret = int(r0)
676 if e1 != 0 {
677 err = errnoErr(e1)
678 }
679 return
680 }
681
682 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
683
684 func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
685 var _p0 *byte
686 _p0, err = BytePtrFromString(file)
687 if err != nil {
688 return
689 }
690 var _p1 *byte
691 _p1, err = BytePtrFromString(attrname)
692 if err != nil {
693 return
694 }
695 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
696 if e1 != 0 {
697 err = errnoErr(e1)
698 }
699 return
700 }
701
702 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
703
704 func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
705 var _p0 *byte
706 _p0, err = BytePtrFromString(file)
707 if err != nil {
708 return
709 }
710 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
711 ret = int(r0)
712 if e1 != 0 {
713 err = errnoErr(e1)
714 }
715 return
716 }
717
718 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
719
720 func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
721 var _p0 *byte
722 _p0, err = BytePtrFromString(link)
723 if err != nil {
724 return
725 }
726 var _p1 *byte
727 _p1, err = BytePtrFromString(attrname)
728 if err != nil {
729 return
730 }
731 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
732 ret = int(r0)
733 if e1 != 0 {
734 err = errnoErr(e1)
735 }
736 return
737 }
738
739 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
740
741 func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
742 var _p0 *byte
743 _p0, err = BytePtrFromString(link)
744 if err != nil {
745 return
746 }
747 var _p1 *byte
748 _p1, err = BytePtrFromString(attrname)
749 if err != nil {
750 return
751 }
752 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
753 ret = int(r0)
754 if e1 != 0 {
755 err = errnoErr(e1)
756 }
757 return
758 }
759
760 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
761
762 func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
763 var _p0 *byte
764 _p0, err = BytePtrFromString(link)
765 if err != nil {
766 return
767 }
768 var _p1 *byte
769 _p1, err = BytePtrFromString(attrname)
770 if err != nil {
771 return
772 }
773 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
774 if e1 != 0 {
775 err = errnoErr(e1)
776 }
777 return
778 }
779
780 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
781
782 func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
783 var _p0 *byte
784 _p0, err = BytePtrFromString(link)
785 if err != nil {
786 return
787 }
788 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
789 ret = int(r0)
790 if e1 != 0 {
791 err = errnoErr(e1)
792 }
793 return
794 }
795
796 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
797
798 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
799 _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
800 if e1 != 0 {
801 err = errnoErr(e1)
802 }
803 return
804 }
805
806 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
807
808 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
809 var _p0 *byte
810 _p0, err = BytePtrFromString(path)
811 if err != nil {
812 return
813 }
814 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
815 if e1 != 0 {
816 err = errnoErr(e1)
817 }
818 return
819 }
820
821 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
822
823 func Fchdir(fd int) (err error) {
824 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
825 if e1 != 0 {
826 err = errnoErr(e1)
827 }
828 return
829 }
830
831 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
832
833 func Fchflags(fd int, flags int) (err error) {
834 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
835 if e1 != 0 {
836 err = errnoErr(e1)
837 }
838 return
839 }
840
841 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
842
843 func Fchmod(fd int, mode uint32) (err error) {
844 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
845 if e1 != 0 {
846 err = errnoErr(e1)
847 }
848 return
849 }
850
851 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
852
853 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
854 var _p0 *byte
855 _p0, err = BytePtrFromString(path)
856 if err != nil {
857 return
858 }
859 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
860 if e1 != 0 {
861 err = errnoErr(e1)
862 }
863 return
864 }
865
866 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
867
868 func Fchown(fd int, uid int, gid int) (err error) {
869 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
870 if e1 != 0 {
871 err = errnoErr(e1)
872 }
873 return
874 }
875
876 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
877
878 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
879 var _p0 *byte
880 _p0, err = BytePtrFromString(path)
881 if err != nil {
882 return
883 }
884 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
885 if e1 != 0 {
886 err = errnoErr(e1)
887 }
888 return
889 }
890
891 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
892
893 func Flock(fd int, how int) (err error) {
894 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
895 if e1 != 0 {
896 err = errnoErr(e1)
897 }
898 return
899 }
900
901 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
902
903 func Fpathconf(fd int, name int) (val int, err error) {
904 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
905 val = int(r0)
906 if e1 != 0 {
907 err = errnoErr(e1)
908 }
909 return
910 }
911
912 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
913
914 func fstat(fd int, stat *stat_freebsd11_t) (err error) {
915 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
916 if e1 != 0 {
917 err = errnoErr(e1)
918 }
919 return
920 }
921
922 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
923
924 func fstat_freebsd12(fd int, stat *Stat_t) (err error) {
925 _, _, e1 := Syscall(SYS_FSTAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
926 if e1 != 0 {
927 err = errnoErr(e1)
928 }
929 return
930 }
931
932 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
933
934 func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error) {
935 var _p0 *byte
936 _p0, err = BytePtrFromString(path)
937 if err != nil {
938 return
939 }
940 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
941 if e1 != 0 {
942 err = errnoErr(e1)
943 }
944 return
945 }
946
947 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
948
949 func fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error) {
950 var _p0 *byte
951 _p0, err = BytePtrFromString(path)
952 if err != nil {
953 return
954 }
955 _, _, e1 := Syscall6(SYS_FSTATAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
956 if e1 != 0 {
957 err = errnoErr(e1)
958 }
959 return
960 }
961
962 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
963
964 func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
965 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
966 if e1 != 0 {
967 err = errnoErr(e1)
968 }
969 return
970 }
971
972 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
973
974 func fstatfs_freebsd12(fd int, stat *Statfs_t) (err error) {
975 _, _, e1 := Syscall(SYS_FSTATFS_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
976 if e1 != 0 {
977 err = errnoErr(e1)
978 }
979 return
980 }
981
982 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
983
984 func Fsync(fd int) (err error) {
985 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
986 if e1 != 0 {
987 err = errnoErr(e1)
988 }
989 return
990 }
991
992 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
993
994 func Ftruncate(fd int, length int64) (err error) {
995 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
996 if e1 != 0 {
997 err = errnoErr(e1)
998 }
999 return
1000 }
1001
1002 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1003
1004 func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
1005 var _p0 unsafe.Pointer
1006 if len(buf) > 0 {
1007 _p0 = unsafe.Pointer(&buf[0])
1008 } else {
1009 _p0 = unsafe.Pointer(&_zero)
1010 }
1011 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
1012 n = int(r0)
1013 if e1 != 0 {
1014 err = errnoErr(e1)
1015 }
1016 return
1017 }
1018
1019 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1020
1021 func getdirentries_freebsd12(fd int, buf []byte, basep *uintptr) (n int, err error) {
1022 var _p0 unsafe.Pointer
1023 if len(buf) > 0 {
1024 _p0 = unsafe.Pointer(&buf[0])
1025 } else {
1026 _p0 = unsafe.Pointer(&_zero)
1027 }
1028 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES_FREEBSD12, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
1029 n = int(r0)
1030 if e1 != 0 {
1031 err = errnoErr(e1)
1032 }
1033 return
1034 }
1035
1036 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1037
1038 func Getdtablesize() (size int) {
1039 r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
1040 size = int(r0)
1041 return
1042 }
1043
1044 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1045
1046 func Getegid() (egid int) {
1047 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
1048 egid = int(r0)
1049 return
1050 }
1051
1052 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1053
1054 func Geteuid() (uid int) {
1055 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
1056 uid = int(r0)
1057 return
1058 }
1059
1060 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1061
1062 func Getgid() (gid int) {
1063 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
1064 gid = int(r0)
1065 return
1066 }
1067
1068 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1069
1070 func Getpgid(pid int) (pgid int, err error) {
1071 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
1072 pgid = int(r0)
1073 if e1 != 0 {
1074 err = errnoErr(e1)
1075 }
1076 return
1077 }
1078
1079 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1080
1081 func Getpgrp() (pgrp int) {
1082 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
1083 pgrp = int(r0)
1084 return
1085 }
1086
1087 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1088
1089 func Getpid() (pid int) {
1090 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
1091 pid = int(r0)
1092 return
1093 }
1094
1095 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1096
1097 func Getppid() (ppid int) {
1098 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
1099 ppid = int(r0)
1100 return
1101 }
1102
1103 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1104
1105 func Getpriority(which int, who int) (prio int, err error) {
1106 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
1107 prio = int(r0)
1108 if e1 != 0 {
1109 err = errnoErr(e1)
1110 }
1111 return
1112 }
1113
1114 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1115
1116 func Getrlimit(which int, lim *Rlimit) (err error) {
1117 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1118 if e1 != 0 {
1119 err = errnoErr(e1)
1120 }
1121 return
1122 }
1123
1124 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1125
1126 func Getrusage(who int, rusage *Rusage) (err error) {
1127 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
1128 if e1 != 0 {
1129 err = errnoErr(e1)
1130 }
1131 return
1132 }
1133
1134 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1135
1136 func Getsid(pid int) (sid int, err error) {
1137 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
1138 sid = int(r0)
1139 if e1 != 0 {
1140 err = errnoErr(e1)
1141 }
1142 return
1143 }
1144
1145 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1146
1147 func Gettimeofday(tv *Timeval) (err error) {
1148 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
1149 if e1 != 0 {
1150 err = errnoErr(e1)
1151 }
1152 return
1153 }
1154
1155 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1156
1157 func Getuid() (uid int) {
1158 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
1159 uid = int(r0)
1160 return
1161 }
1162
1163 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1164
1165 func Issetugid() (tainted bool) {
1166 r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
1167 tainted = bool(r0 != 0)
1168 return
1169 }
1170
1171 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1172
1173 func Kill(pid int, signum syscall.Signal) (err error) {
1174 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
1175 if e1 != 0 {
1176 err = errnoErr(e1)
1177 }
1178 return
1179 }
1180
1181 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1182
1183 func Kqueue() (fd int, err error) {
1184 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
1185 fd = int(r0)
1186 if e1 != 0 {
1187 err = errnoErr(e1)
1188 }
1189 return
1190 }
1191
1192 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1193
1194 func Lchown(path string, uid int, gid int) (err error) {
1195 var _p0 *byte
1196 _p0, err = BytePtrFromString(path)
1197 if err != nil {
1198 return
1199 }
1200 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
1201 if e1 != 0 {
1202 err = errnoErr(e1)
1203 }
1204 return
1205 }
1206
1207 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1208
1209 func Link(path string, link string) (err error) {
1210 var _p0 *byte
1211 _p0, err = BytePtrFromString(path)
1212 if err != nil {
1213 return
1214 }
1215 var _p1 *byte
1216 _p1, err = BytePtrFromString(link)
1217 if err != nil {
1218 return
1219 }
1220 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1221 if e1 != 0 {
1222 err = errnoErr(e1)
1223 }
1224 return
1225 }
1226
1227 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1228
1229 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
1230 var _p0 *byte
1231 _p0, err = BytePtrFromString(path)
1232 if err != nil {
1233 return
1234 }
1235 var _p1 *byte
1236 _p1, err = BytePtrFromString(link)
1237 if err != nil {
1238 return
1239 }
1240 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1241 if e1 != 0 {
1242 err = errnoErr(e1)
1243 }
1244 return
1245 }
1246
1247 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1248
1249 func Listen(s int, backlog int) (err error) {
1250 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
1251 if e1 != 0 {
1252 err = errnoErr(e1)
1253 }
1254 return
1255 }
1256
1257 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1258
1259 func lstat(path string, stat *stat_freebsd11_t) (err error) {
1260 var _p0 *byte
1261 _p0, err = BytePtrFromString(path)
1262 if err != nil {
1263 return
1264 }
1265 _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1266 if e1 != 0 {
1267 err = errnoErr(e1)
1268 }
1269 return
1270 }
1271
1272 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1273
1274 func Mkdir(path string, mode uint32) (err error) {
1275 var _p0 *byte
1276 _p0, err = BytePtrFromString(path)
1277 if err != nil {
1278 return
1279 }
1280 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1281 if e1 != 0 {
1282 err = errnoErr(e1)
1283 }
1284 return
1285 }
1286
1287 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1288
1289 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1290 var _p0 *byte
1291 _p0, err = BytePtrFromString(path)
1292 if err != nil {
1293 return
1294 }
1295 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1296 if e1 != 0 {
1297 err = errnoErr(e1)
1298 }
1299 return
1300 }
1301
1302 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1303
1304 func Mkfifo(path string, mode uint32) (err error) {
1305 var _p0 *byte
1306 _p0, err = BytePtrFromString(path)
1307 if err != nil {
1308 return
1309 }
1310 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1311 if e1 != 0 {
1312 err = errnoErr(e1)
1313 }
1314 return
1315 }
1316
1317 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1318
1319 func mknod(path string, mode uint32, dev int) (err error) {
1320 var _p0 *byte
1321 _p0, err = BytePtrFromString(path)
1322 if err != nil {
1323 return
1324 }
1325 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1326 if e1 != 0 {
1327 err = errnoErr(e1)
1328 }
1329 return
1330 }
1331
1332 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1333
1334 func mknodat(fd int, path string, mode uint32, dev int) (err error) {
1335 var _p0 *byte
1336 _p0, err = BytePtrFromString(path)
1337 if err != nil {
1338 return
1339 }
1340 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
1341 if e1 != 0 {
1342 err = errnoErr(e1)
1343 }
1344 return
1345 }
1346
1347 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1348
1349 func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error) {
1350 var _p0 *byte
1351 _p0, err = BytePtrFromString(path)
1352 if err != nil {
1353 return
1354 }
1355 _, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
1356 if e1 != 0 {
1357 err = errnoErr(e1)
1358 }
1359 return
1360 }
1361
1362 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1363
1364 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
1365 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1366 if e1 != 0 {
1367 err = errnoErr(e1)
1368 }
1369 return
1370 }
1371
1372 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1373
1374 func Open(path string, mode int, perm uint32) (fd int, err error) {
1375 var _p0 *byte
1376 _p0, err = BytePtrFromString(path)
1377 if err != nil {
1378 return
1379 }
1380 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1381 fd = int(r0)
1382 if e1 != 0 {
1383 err = errnoErr(e1)
1384 }
1385 return
1386 }
1387
1388 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1389
1390 func Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) {
1391 var _p0 *byte
1392 _p0, err = BytePtrFromString(path)
1393 if err != nil {
1394 return
1395 }
1396 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
1397 fd = int(r0)
1398 if e1 != 0 {
1399 err = errnoErr(e1)
1400 }
1401 return
1402 }
1403
1404 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1405
1406 func Pathconf(path string, name int) (val int, err error) {
1407 var _p0 *byte
1408 _p0, err = BytePtrFromString(path)
1409 if err != nil {
1410 return
1411 }
1412 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1413 val = int(r0)
1414 if e1 != 0 {
1415 err = errnoErr(e1)
1416 }
1417 return
1418 }
1419
1420 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1421
1422 func Pread(fd int, p []byte, offset int64) (n int, err error) {
1423 var _p0 unsafe.Pointer
1424 if len(p) > 0 {
1425 _p0 = unsafe.Pointer(&p[0])
1426 } else {
1427 _p0 = unsafe.Pointer(&_zero)
1428 }
1429 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1430 n = int(r0)
1431 if e1 != 0 {
1432 err = errnoErr(e1)
1433 }
1434 return
1435 }
1436
1437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1438
1439 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
1440 var _p0 unsafe.Pointer
1441 if len(p) > 0 {
1442 _p0 = unsafe.Pointer(&p[0])
1443 } else {
1444 _p0 = unsafe.Pointer(&_zero)
1445 }
1446 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1447 n = int(r0)
1448 if e1 != 0 {
1449 err = errnoErr(e1)
1450 }
1451 return
1452 }
1453
1454 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1455
1456 func read(fd int, p []byte) (n int, err error) {
1457 var _p0 unsafe.Pointer
1458 if len(p) > 0 {
1459 _p0 = unsafe.Pointer(&p[0])
1460 } else {
1461 _p0 = unsafe.Pointer(&_zero)
1462 }
1463 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1464 n = int(r0)
1465 if e1 != 0 {
1466 err = errnoErr(e1)
1467 }
1468 return
1469 }
1470
1471 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1472
1473 func Readlink(path string, buf []byte) (n int, err error) {
1474 var _p0 *byte
1475 _p0, err = BytePtrFromString(path)
1476 if err != nil {
1477 return
1478 }
1479 var _p1 unsafe.Pointer
1480 if len(buf) > 0 {
1481 _p1 = unsafe.Pointer(&buf[0])
1482 } else {
1483 _p1 = unsafe.Pointer(&_zero)
1484 }
1485 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1486 n = int(r0)
1487 if e1 != 0 {
1488 err = errnoErr(e1)
1489 }
1490 return
1491 }
1492
1493 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1494
1495 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1496 var _p0 *byte
1497 _p0, err = BytePtrFromString(path)
1498 if err != nil {
1499 return
1500 }
1501 var _p1 unsafe.Pointer
1502 if len(buf) > 0 {
1503 _p1 = unsafe.Pointer(&buf[0])
1504 } else {
1505 _p1 = unsafe.Pointer(&_zero)
1506 }
1507 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1508 n = int(r0)
1509 if e1 != 0 {
1510 err = errnoErr(e1)
1511 }
1512 return
1513 }
1514
1515 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1516
1517 func Rename(from string, to string) (err error) {
1518 var _p0 *byte
1519 _p0, err = BytePtrFromString(from)
1520 if err != nil {
1521 return
1522 }
1523 var _p1 *byte
1524 _p1, err = BytePtrFromString(to)
1525 if err != nil {
1526 return
1527 }
1528 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1529 if e1 != 0 {
1530 err = errnoErr(e1)
1531 }
1532 return
1533 }
1534
1535 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1536
1537 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1538 var _p0 *byte
1539 _p0, err = BytePtrFromString(from)
1540 if err != nil {
1541 return
1542 }
1543 var _p1 *byte
1544 _p1, err = BytePtrFromString(to)
1545 if err != nil {
1546 return
1547 }
1548 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1549 if e1 != 0 {
1550 err = errnoErr(e1)
1551 }
1552 return
1553 }
1554
1555 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1556
1557 func Revoke(path string) (err error) {
1558 var _p0 *byte
1559 _p0, err = BytePtrFromString(path)
1560 if err != nil {
1561 return
1562 }
1563 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1564 if e1 != 0 {
1565 err = errnoErr(e1)
1566 }
1567 return
1568 }
1569
1570 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1571
1572 func Rmdir(path string) (err error) {
1573 var _p0 *byte
1574 _p0, err = BytePtrFromString(path)
1575 if err != nil {
1576 return
1577 }
1578 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
1579 if e1 != 0 {
1580 err = errnoErr(e1)
1581 }
1582 return
1583 }
1584
1585 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1586
1587 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1588 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
1589 newoffset = int64(r0)
1590 if e1 != 0 {
1591 err = errnoErr(e1)
1592 }
1593 return
1594 }
1595
1596 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1597
1598 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1599 _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1600 if e1 != 0 {
1601 err = errnoErr(e1)
1602 }
1603 return
1604 }
1605
1606 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1607
1608 func Setegid(egid int) (err error) {
1609 _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
1610 if e1 != 0 {
1611 err = errnoErr(e1)
1612 }
1613 return
1614 }
1615
1616 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1617
1618 func Seteuid(euid int) (err error) {
1619 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
1620 if e1 != 0 {
1621 err = errnoErr(e1)
1622 }
1623 return
1624 }
1625
1626 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1627
1628 func Setgid(gid int) (err error) {
1629 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
1630 if e1 != 0 {
1631 err = errnoErr(e1)
1632 }
1633 return
1634 }
1635
1636 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1637
1638 func Setlogin(name string) (err error) {
1639 var _p0 *byte
1640 _p0, err = BytePtrFromString(name)
1641 if err != nil {
1642 return
1643 }
1644 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
1645 if e1 != 0 {
1646 err = errnoErr(e1)
1647 }
1648 return
1649 }
1650
1651 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1652
1653 func Setpgid(pid int, pgid int) (err error) {
1654 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
1655 if e1 != 0 {
1656 err = errnoErr(e1)
1657 }
1658 return
1659 }
1660
1661 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1662
1663 func Setpriority(which int, who int, prio int) (err error) {
1664 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
1665 if e1 != 0 {
1666 err = errnoErr(e1)
1667 }
1668 return
1669 }
1670
1671 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1672
1673 func Setregid(rgid int, egid int) (err error) {
1674 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
1675 if e1 != 0 {
1676 err = errnoErr(e1)
1677 }
1678 return
1679 }
1680
1681 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1682
1683 func Setreuid(ruid int, euid int) (err error) {
1684 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
1685 if e1 != 0 {
1686 err = errnoErr(e1)
1687 }
1688 return
1689 }
1690
1691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1692
1693 func Setresgid(rgid int, egid int, sgid int) (err error) {
1694 _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
1695 if e1 != 0 {
1696 err = errnoErr(e1)
1697 }
1698 return
1699 }
1700
1701 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1702
1703 func Setresuid(ruid int, euid int, suid int) (err error) {
1704 _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
1705 if e1 != 0 {
1706 err = errnoErr(e1)
1707 }
1708 return
1709 }
1710
1711 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1712
1713 func Setrlimit(which int, lim *Rlimit) (err error) {
1714 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1715 if e1 != 0 {
1716 err = errnoErr(e1)
1717 }
1718 return
1719 }
1720
1721 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1722
1723 func Setsid() (pid int, err error) {
1724 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
1725 pid = int(r0)
1726 if e1 != 0 {
1727 err = errnoErr(e1)
1728 }
1729 return
1730 }
1731
1732 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1733
1734 func Settimeofday(tp *Timeval) (err error) {
1735 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1736 if e1 != 0 {
1737 err = errnoErr(e1)
1738 }
1739 return
1740 }
1741
1742 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1743
1744 func Setuid(uid int) (err error) {
1745 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
1746 if e1 != 0 {
1747 err = errnoErr(e1)
1748 }
1749 return
1750 }
1751
1752 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1753
1754 func stat(path string, stat *stat_freebsd11_t) (err error) {
1755 var _p0 *byte
1756 _p0, err = BytePtrFromString(path)
1757 if err != nil {
1758 return
1759 }
1760 _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1761 if e1 != 0 {
1762 err = errnoErr(e1)
1763 }
1764 return
1765 }
1766
1767 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1768
1769 func statfs(path string, stat *statfs_freebsd11_t) (err error) {
1770 var _p0 *byte
1771 _p0, err = BytePtrFromString(path)
1772 if err != nil {
1773 return
1774 }
1775 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1776 if e1 != 0 {
1777 err = errnoErr(e1)
1778 }
1779 return
1780 }
1781
1782 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1783
1784 func statfs_freebsd12(path string, stat *Statfs_t) (err error) {
1785 var _p0 *byte
1786 _p0, err = BytePtrFromString(path)
1787 if err != nil {
1788 return
1789 }
1790 _, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1791 if e1 != 0 {
1792 err = errnoErr(e1)
1793 }
1794 return
1795 }
1796
1797 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1798
1799 func Symlink(path string, link string) (err error) {
1800 var _p0 *byte
1801 _p0, err = BytePtrFromString(path)
1802 if err != nil {
1803 return
1804 }
1805 var _p1 *byte
1806 _p1, err = BytePtrFromString(link)
1807 if err != nil {
1808 return
1809 }
1810 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1811 if e1 != 0 {
1812 err = errnoErr(e1)
1813 }
1814 return
1815 }
1816
1817 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1818
1819 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
1820 var _p0 *byte
1821 _p0, err = BytePtrFromString(oldpath)
1822 if err != nil {
1823 return
1824 }
1825 var _p1 *byte
1826 _p1, err = BytePtrFromString(newpath)
1827 if err != nil {
1828 return
1829 }
1830 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1831 if e1 != 0 {
1832 err = errnoErr(e1)
1833 }
1834 return
1835 }
1836
1837 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1838
1839 func Sync() (err error) {
1840 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
1841 if e1 != 0 {
1842 err = errnoErr(e1)
1843 }
1844 return
1845 }
1846
1847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1848
1849 func Truncate(path string, length int64) (err error) {
1850 var _p0 *byte
1851 _p0, err = BytePtrFromString(path)
1852 if err != nil {
1853 return
1854 }
1855 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
1856 if e1 != 0 {
1857 err = errnoErr(e1)
1858 }
1859 return
1860 }
1861
1862 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1863
1864 func Umask(newmask int) (oldmask int) {
1865 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
1866 oldmask = int(r0)
1867 return
1868 }
1869
1870 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1871
1872 func Undelete(path string) (err error) {
1873 var _p0 *byte
1874 _p0, err = BytePtrFromString(path)
1875 if err != nil {
1876 return
1877 }
1878 _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1879 if e1 != 0 {
1880 err = errnoErr(e1)
1881 }
1882 return
1883 }
1884
1885 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1886
1887 func Unlink(path string) (err error) {
1888 var _p0 *byte
1889 _p0, err = BytePtrFromString(path)
1890 if err != nil {
1891 return
1892 }
1893 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1894 if e1 != 0 {
1895 err = errnoErr(e1)
1896 }
1897 return
1898 }
1899
1900 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1901
1902 func Unlinkat(dirfd int, path string, flags int) (err error) {
1903 var _p0 *byte
1904 _p0, err = BytePtrFromString(path)
1905 if err != nil {
1906 return
1907 }
1908 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
1909 if e1 != 0 {
1910 err = errnoErr(e1)
1911 }
1912 return
1913 }
1914
1915 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1916
1917 func Unmount(path string, flags int) (err error) {
1918 var _p0 *byte
1919 _p0, err = BytePtrFromString(path)
1920 if err != nil {
1921 return
1922 }
1923 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1924 if e1 != 0 {
1925 err = errnoErr(e1)
1926 }
1927 return
1928 }
1929
1930 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1931
1932 func write(fd int, p []byte) (n int, err error) {
1933 var _p0 unsafe.Pointer
1934 if len(p) > 0 {
1935 _p0 = unsafe.Pointer(&p[0])
1936 } else {
1937 _p0 = unsafe.Pointer(&_zero)
1938 }
1939 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1940 n = int(r0)
1941 if e1 != 0 {
1942 err = errnoErr(e1)
1943 }
1944 return
1945 }
1946
1947 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1948
1949 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
1950 r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
1951 ret = uintptr(r0)
1952 if e1 != 0 {
1953 err = errnoErr(e1)
1954 }
1955 return
1956 }
1957
1958 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1959
1960 func munmap(addr uintptr, length uintptr) (err error) {
1961 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
1962 if e1 != 0 {
1963 err = errnoErr(e1)
1964 }
1965 return
1966 }
1967
1968 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1969
1970 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
1971 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1972 n = int(r0)
1973 if e1 != 0 {
1974 err = errnoErr(e1)
1975 }
1976 return
1977 }
1978
1979 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1980
1981 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
1982 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1983 n = int(r0)
1984 if e1 != 0 {
1985 err = errnoErr(e1)
1986 }
1987 return
1988 }
1989
1990 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1991
1992 func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
1993 r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
1994 nfd = int(r0)
1995 if e1 != 0 {
1996 err = errnoErr(e1)
1997 }
1998 return
1999 }
2000
2001 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2002
2003 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
2004 var _p0 *byte
2005 _p0, err = BytePtrFromString(path)
2006 if err != nil {
2007 return
2008 }
2009 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
2010 if e1 != 0 {
2011 err = errnoErr(e1)
2012 }
2013 return
2014 }
0 // mksyscall.pl -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go
0 // go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build linux,386
142142
143143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
144144
145 func utimes(path string, times *[2]Timeval) (err error) {
146 var _p0 *byte
147 _p0, err = BytePtrFromString(path)
148 if err != nil {
149 return
150 }
151 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
152 if e1 != 0 {
153 err = errnoErr(e1)
154 }
155 return
156 }
157
158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
159
160145 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
161146 var _p0 *byte
162147 _p0, err = BytePtrFromString(path)
164149 return
165150 }
166151 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
167 if e1 != 0 {
168 err = errnoErr(e1)
169 }
170 return
171 }
172
173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
174
175 func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
176 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
177152 if e1 != 0 {
178153 err = errnoErr(e1)
179154 }
441416
442417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
443418
419 func ClockGetres(clockid int32, res *Timespec) (err error) {
420 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
421 if e1 != 0 {
422 err = errnoErr(e1)
423 }
424 return
425 }
426
427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
428
444429 func ClockGettime(clockid int32, time *Timespec) (err error) {
445430 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
431 if e1 != 0 {
432 err = errnoErr(e1)
433 }
434 return
435 }
436
437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
438
439 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
440 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
446441 if e1 != 0 {
447442 err = errnoErr(e1)
448443 }
472467
473468 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
474469
470 func DeleteModule(name string, flags int) (err error) {
471 var _p0 *byte
472 _p0, err = BytePtrFromString(name)
473 if err != nil {
474 return
475 }
476 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
477 if e1 != 0 {
478 err = errnoErr(e1)
479 }
480 return
481 }
482
483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
484
475485 func Dup(oldfd int) (fd int, err error) {
476486 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
477487 fd = int(r0)
493503
494504 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
495505
496 func EpollCreate(size int) (fd int, err error) {
497 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
498 fd = int(r0)
499 if e1 != 0 {
500 err = errnoErr(e1)
501 }
502 return
503 }
504
505 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
506
507506 func EpollCreate1(flag int) (fd int, err error) {
508507 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
509508 fd = int(r0)
537536 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
538537
539538 func Exit(code int) {
540 Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
541 return
542 }
543
544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545
546 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
547 var _p0 *byte
548 _p0, err = BytePtrFromString(path)
549 if err != nil {
550 return
551 }
552 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
553 if e1 != 0 {
554 err = errnoErr(e1)
555 }
539 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
556540 return
557541 }
558542
624608
625609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
626610
611 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
612 var _p0 *byte
613 _p0, err = BytePtrFromString(attr)
614 if err != nil {
615 return
616 }
617 var _p1 unsafe.Pointer
618 if len(dest) > 0 {
619 _p1 = unsafe.Pointer(&dest[0])
620 } else {
621 _p1 = unsafe.Pointer(&_zero)
622 }
623 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
624 sz = int(r0)
625 if e1 != 0 {
626 err = errnoErr(e1)
627 }
628 return
629 }
630
631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
632
633 func FinitModule(fd int, params string, flags int) (err error) {
634 var _p0 *byte
635 _p0, err = BytePtrFromString(params)
636 if err != nil {
637 return
638 }
639 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
640 if e1 != 0 {
641 err = errnoErr(e1)
642 }
643 return
644 }
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func Flistxattr(fd int, dest []byte) (sz int, err error) {
649 var _p0 unsafe.Pointer
650 if len(dest) > 0 {
651 _p0 = unsafe.Pointer(&dest[0])
652 } else {
653 _p0 = unsafe.Pointer(&_zero)
654 }
655 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
656 sz = int(r0)
657 if e1 != 0 {
658 err = errnoErr(e1)
659 }
660 return
661 }
662
663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
664
627665 func Flock(fd int, how int) (err error) {
628666 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
667 if e1 != 0 {
668 err = errnoErr(e1)
669 }
670 return
671 }
672
673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674
675 func Fremovexattr(fd int, attr string) (err error) {
676 var _p0 *byte
677 _p0, err = BytePtrFromString(attr)
678 if err != nil {
679 return
680 }
681 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
682 if e1 != 0 {
683 err = errnoErr(e1)
684 }
685 return
686 }
687
688 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
689
690 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
691 var _p0 *byte
692 _p0, err = BytePtrFromString(attr)
693 if err != nil {
694 return
695 }
696 var _p1 unsafe.Pointer
697 if len(dest) > 0 {
698 _p1 = unsafe.Pointer(&dest[0])
699 } else {
700 _p1 = unsafe.Pointer(&_zero)
701 }
702 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
629703 if e1 != 0 {
630704 err = errnoErr(e1)
631705 }
673747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674748
675749 func Getpid() (pid int) {
676 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
750 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
677751 pid = int(r0)
678752 return
679753 }
681755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
682756
683757 func Getppid() (ppid int) {
684 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
758 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
685759 ppid = int(r0)
686760 return
687761 }
738812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
739813
740814 func Gettid() (tid int) {
741 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
815 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
742816 tid = int(r0)
743817 return
744818 }
764838 }
765839 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
766840 sz = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func InitModule(moduleImage []byte, params string) (err error) {
850 var _p0 unsafe.Pointer
851 if len(moduleImage) > 0 {
852 _p0 = unsafe.Pointer(&moduleImage[0])
853 } else {
854 _p0 = unsafe.Pointer(&_zero)
855 }
856 var _p1 *byte
857 _p1, err = BytePtrFromString(params)
858 if err != nil {
859 return
860 }
861 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
767862 if e1 != 0 {
768863 err = errnoErr(e1)
769864 }
9541049
9551050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9561051
1052 func MemfdCreate(name string, flags int) (fd int, err error) {
1053 var _p0 *byte
1054 _p0, err = BytePtrFromString(name)
1055 if err != nil {
1056 return
1057 }
1058 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1059 fd = int(r0)
1060 if e1 != 0 {
1061 err = errnoErr(e1)
1062 }
1063 return
1064 }
1065
1066 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1067
9571068 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
9581069 var _p0 *byte
9591070 _p0, err = BytePtrFromString(path)
9861097
9871098 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
9881099 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1107
1108 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
1109 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
1110 fd = int(r0)
9891111 if e1 != 0 {
9901112 err = errnoErr(e1)
9911113 }
10821204
10831205 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10841206
1085 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1207 func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
10861208 var _p0 *byte
10871209 _p0, err = BytePtrFromString(oldpath)
10881210 if err != nil {
10931215 if err != nil {
10941216 return
10951217 }
1096 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1218 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
10971219 if e1 != 0 {
10981220 err = errnoErr(e1)
10991221 }
12371359
12381360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12391361
1362 func Signalfd(fd int, mask *Sigset_t, flags int) {
1363 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
1364 return
1365 }
1366
1367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1368
1369 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
1370 var _p0 *byte
1371 _p0, err = BytePtrFromString(path)
1372 if err != nil {
1373 return
1374 }
1375 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
12401384 func Sync() {
1241 Syscall(SYS_SYNC, 0, 0, 0)
1385 SyscallNoError(SYS_SYNC, 0, 0, 0)
12421386 return
12431387 }
12441388
12971441 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12981442
12991443 func Umask(mask int) (oldmask int) {
1300 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
1444 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
13011445 oldmask = int(r0)
13021446 return
13031447 }
13311475
13321476 func Unshare(flags int) (err error) {
13331477 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
1334 if e1 != 0 {
1335 err = errnoErr(e1)
1336 }
1337 return
1338 }
1339
1340 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1341
1342 func Ustat(dev int, ubuf *Ustat_t) (err error) {
1343 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
13441478 if e1 != 0 {
13451479 err = errnoErr(e1)
13461480 }
15081642
15091643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15101644
1645 func faccessat(dirfd int, path string, mode uint32) (err error) {
1646 var _p0 *byte
1647 _p0, err = BytePtrFromString(path)
1648 if err != nil {
1649 return
1650 }
1651 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1652 if e1 != 0 {
1653 err = errnoErr(e1)
1654 }
1655 return
1656 }
1657
1658 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1659
15111660 func pipe(p *[2]_C_int) (err error) {
15121661 _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
15131662 if e1 != 0 {
15381687
15391688 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15401689
1690 func EpollCreate(size int) (fd int, err error) {
1691 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
1692 fd = int(r0)
1693 if e1 != 0 {
1694 err = errnoErr(e1)
1695 }
1696 return
1697 }
1698
1699 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1700
1701 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
1702 var _p0 unsafe.Pointer
1703 if len(events) > 0 {
1704 _p0 = unsafe.Pointer(&events[0])
1705 } else {
1706 _p0 = unsafe.Pointer(&_zero)
1707 }
1708 r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
1709 n = int(r0)
1710 if e1 != 0 {
1711 err = errnoErr(e1)
1712 }
1713 return
1714 }
1715
1716 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1717
15411718 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
15421719 _, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))
15431720 if e1 != 0 {
15681745
15691746 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15701747
1748 func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
1749 var _p0 *byte
1750 _p0, err = BytePtrFromString(path)
1751 if err != nil {
1752 return
1753 }
1754 _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
1755 if e1 != 0 {
1756 err = errnoErr(e1)
1757 }
1758 return
1759 }
1760
1761 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1762
15711763 func Ftruncate(fd int, length int64) (err error) {
15721764 _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32))
15731765 if e1 != 0 {
15791771 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15801772
15811773 func Getegid() (egid int) {
1582 r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0)
1774 r0, _ := RawSyscallNoError(SYS_GETEGID32, 0, 0, 0)
15831775 egid = int(r0)
15841776 return
15851777 }
15871779 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15881780
15891781 func Geteuid() (euid int) {
1590 r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0)
1782 r0, _ := RawSyscallNoError(SYS_GETEUID32, 0, 0, 0)
15911783 euid = int(r0)
15921784 return
15931785 }
15951787 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15961788
15971789 func Getgid() (gid int) {
1598 r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0)
1790 r0, _ := RawSyscallNoError(SYS_GETGID32, 0, 0, 0)
15991791 gid = int(r0)
16001792 return
16011793 }
16031795 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16041796
16051797 func Getuid() (uid int) {
1606 r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0)
1798 r0, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0)
16071799 uid = int(r0)
16081800 return
16091801 }
17051897
17061898 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
17071899
1900 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1901 var _p0 *byte
1902 _p0, err = BytePtrFromString(oldpath)
1903 if err != nil {
1904 return
1905 }
1906 var _p1 *byte
1907 _p1, err = BytePtrFromString(newpath)
1908 if err != nil {
1909 return
1910 }
1911 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1912 if e1 != 0 {
1913 err = errnoErr(e1)
1914 }
1915 return
1916 }
1917
1918 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1919
17081920 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
17091921 r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
17101922 written = int(r0)
18272039
18282040 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
18292041
2042 func Ustat(dev int, ubuf *Ustat_t) (err error) {
2043 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
2044 if e1 != 0 {
2045 err = errnoErr(e1)
2046 }
2047 return
2048 }
2049
2050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2051
18302052 func getgroups(n int, list *_Gid_t) (nn int, err error) {
18312053 r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
18322054 nn = int(r0)
18702092
18712093 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
18722094
1873 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
1874 var _p0 unsafe.Pointer
1875 if len(events) > 0 {
1876 _p0 = unsafe.Pointer(&events[0])
1877 } else {
1878 _p0 = unsafe.Pointer(&_zero)
1879 }
1880 r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
1881 n = int(r0)
1882 if e1 != 0 {
1883 err = errnoErr(e1)
1884 }
1885 return
1886 }
1887
1888 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1889
18902095 func Pause() (err error) {
18912096 _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
18922097 if e1 != 0 {
19092114
19102115 func setrlimit(resource int, rlim *rlimit32) (err error) {
19112116 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
2117 if e1 != 0 {
2118 err = errnoErr(e1)
2119 }
2120 return
2121 }
2122
2123 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2124
2125 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
2126 var _p0 *byte
2127 _p0, err = BytePtrFromString(path)
2128 if err != nil {
2129 return
2130 }
2131 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
19122132 if e1 != 0 {
19132133 err = errnoErr(e1)
19142134 }
19532173
19542174 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
19552175
2176 func utimes(path string, times *[2]Timeval) (err error) {
2177 var _p0 *byte
2178 _p0, err = BytePtrFromString(path)
2179 if err != nil {
2180 return
2181 }
2182 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
2183 if e1 != 0 {
2184 err = errnoErr(e1)
2185 }
2186 return
2187 }
2188
2189 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2190
19562191 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
19572192 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
19582193 n = int(r0)
0 // mksyscall.pl -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go
0 // go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build linux,amd64
142142
143143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
144144
145 func utimes(path string, times *[2]Timeval) (err error) {
146 var _p0 *byte
147 _p0, err = BytePtrFromString(path)
148 if err != nil {
149 return
150 }
151 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
152 if e1 != 0 {
153 err = errnoErr(e1)
154 }
155 return
156 }
157
158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
159
160145 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
161146 var _p0 *byte
162147 _p0, err = BytePtrFromString(path)
164149 return
165150 }
166151 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
167 if e1 != 0 {
168 err = errnoErr(e1)
169 }
170 return
171 }
172
173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
174
175 func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
176 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
177152 if e1 != 0 {
178153 err = errnoErr(e1)
179154 }
441416
442417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
443418
419 func ClockGetres(clockid int32, res *Timespec) (err error) {
420 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
421 if e1 != 0 {
422 err = errnoErr(e1)
423 }
424 return
425 }
426
427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
428
444429 func ClockGettime(clockid int32, time *Timespec) (err error) {
445430 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
431 if e1 != 0 {
432 err = errnoErr(e1)
433 }
434 return
435 }
436
437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
438
439 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
440 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
446441 if e1 != 0 {
447442 err = errnoErr(e1)
448443 }
472467
473468 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
474469
470 func DeleteModule(name string, flags int) (err error) {
471 var _p0 *byte
472 _p0, err = BytePtrFromString(name)
473 if err != nil {
474 return
475 }
476 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
477 if e1 != 0 {
478 err = errnoErr(e1)
479 }
480 return
481 }
482
483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
484
475485 func Dup(oldfd int) (fd int, err error) {
476486 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
477487 fd = int(r0)
493503
494504 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
495505
496 func EpollCreate(size int) (fd int, err error) {
497 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
498 fd = int(r0)
499 if e1 != 0 {
500 err = errnoErr(e1)
501 }
502 return
503 }
504
505 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
506
507506 func EpollCreate1(flag int) (fd int, err error) {
508507 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
509508 fd = int(r0)
537536 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
538537
539538 func Exit(code int) {
540 Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
541 return
542 }
543
544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545
546 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
547 var _p0 *byte
548 _p0, err = BytePtrFromString(path)
549 if err != nil {
550 return
551 }
552 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
553 if e1 != 0 {
554 err = errnoErr(e1)
555 }
539 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
556540 return
557541 }
558542
624608
625609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
626610
611 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
612 var _p0 *byte
613 _p0, err = BytePtrFromString(attr)
614 if err != nil {
615 return
616 }
617 var _p1 unsafe.Pointer
618 if len(dest) > 0 {
619 _p1 = unsafe.Pointer(&dest[0])
620 } else {
621 _p1 = unsafe.Pointer(&_zero)
622 }
623 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
624 sz = int(r0)
625 if e1 != 0 {
626 err = errnoErr(e1)
627 }
628 return
629 }
630
631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
632
633 func FinitModule(fd int, params string, flags int) (err error) {
634 var _p0 *byte
635 _p0, err = BytePtrFromString(params)
636 if err != nil {
637 return
638 }
639 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
640 if e1 != 0 {
641 err = errnoErr(e1)
642 }
643 return
644 }
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func Flistxattr(fd int, dest []byte) (sz int, err error) {
649 var _p0 unsafe.Pointer
650 if len(dest) > 0 {
651 _p0 = unsafe.Pointer(&dest[0])
652 } else {
653 _p0 = unsafe.Pointer(&_zero)
654 }
655 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
656 sz = int(r0)
657 if e1 != 0 {
658 err = errnoErr(e1)
659 }
660 return
661 }
662
663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
664
627665 func Flock(fd int, how int) (err error) {
628666 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
667 if e1 != 0 {
668 err = errnoErr(e1)
669 }
670 return
671 }
672
673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674
675 func Fremovexattr(fd int, attr string) (err error) {
676 var _p0 *byte
677 _p0, err = BytePtrFromString(attr)
678 if err != nil {
679 return
680 }
681 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
682 if e1 != 0 {
683 err = errnoErr(e1)
684 }
685 return
686 }
687
688 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
689
690 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
691 var _p0 *byte
692 _p0, err = BytePtrFromString(attr)
693 if err != nil {
694 return
695 }
696 var _p1 unsafe.Pointer
697 if len(dest) > 0 {
698 _p1 = unsafe.Pointer(&dest[0])
699 } else {
700 _p1 = unsafe.Pointer(&_zero)
701 }
702 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
629703 if e1 != 0 {
630704 err = errnoErr(e1)
631705 }
673747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674748
675749 func Getpid() (pid int) {
676 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
750 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
677751 pid = int(r0)
678752 return
679753 }
681755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
682756
683757 func Getppid() (ppid int) {
684 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
758 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
685759 ppid = int(r0)
686760 return
687761 }
738812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
739813
740814 func Gettid() (tid int) {
741 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
815 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
742816 tid = int(r0)
743817 return
744818 }
764838 }
765839 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
766840 sz = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func InitModule(moduleImage []byte, params string) (err error) {
850 var _p0 unsafe.Pointer
851 if len(moduleImage) > 0 {
852 _p0 = unsafe.Pointer(&moduleImage[0])
853 } else {
854 _p0 = unsafe.Pointer(&_zero)
855 }
856 var _p1 *byte
857 _p1, err = BytePtrFromString(params)
858 if err != nil {
859 return
860 }
861 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
767862 if e1 != 0 {
768863 err = errnoErr(e1)
769864 }
9541049
9551050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9561051
1052 func MemfdCreate(name string, flags int) (fd int, err error) {
1053 var _p0 *byte
1054 _p0, err = BytePtrFromString(name)
1055 if err != nil {
1056 return
1057 }
1058 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1059 fd = int(r0)
1060 if e1 != 0 {
1061 err = errnoErr(e1)
1062 }
1063 return
1064 }
1065
1066 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1067
9571068 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
9581069 var _p0 *byte
9591070 _p0, err = BytePtrFromString(path)
9861097
9871098 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
9881099 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1107
1108 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
1109 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
1110 fd = int(r0)
9891111 if e1 != 0 {
9901112 err = errnoErr(e1)
9911113 }
10821204
10831205 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10841206
1085 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1207 func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
10861208 var _p0 *byte
10871209 _p0, err = BytePtrFromString(oldpath)
10881210 if err != nil {
10931215 if err != nil {
10941216 return
10951217 }
1096 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1218 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
10971219 if e1 != 0 {
10981220 err = errnoErr(e1)
10991221 }
12371359
12381360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12391361
1362 func Signalfd(fd int, mask *Sigset_t, flags int) {
1363 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
1364 return
1365 }
1366
1367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1368
1369 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
1370 var _p0 *byte
1371 _p0, err = BytePtrFromString(path)
1372 if err != nil {
1373 return
1374 }
1375 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
12401384 func Sync() {
1241 Syscall(SYS_SYNC, 0, 0, 0)
1385 SyscallNoError(SYS_SYNC, 0, 0, 0)
12421386 return
12431387 }
12441388
12971441 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12981442
12991443 func Umask(mask int) (oldmask int) {
1300 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
1444 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
13011445 oldmask = int(r0)
13021446 return
13031447 }
13311475
13321476 func Unshare(flags int) (err error) {
13331477 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
1334 if e1 != 0 {
1335 err = errnoErr(e1)
1336 }
1337 return
1338 }
1339
1340 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1341
1342 func Ustat(dev int, ubuf *Ustat_t) (err error) {
1343 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
13441478 if e1 != 0 {
13451479 err = errnoErr(e1)
13461480 }
15081642
15091643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15101644
1645 func faccessat(dirfd int, path string, mode uint32) (err error) {
1646 var _p0 *byte
1647 _p0, err = BytePtrFromString(path)
1648 if err != nil {
1649 return
1650 }
1651 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1652 if e1 != 0 {
1653 err = errnoErr(e1)
1654 }
1655 return
1656 }
1657
1658 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1659
15111660 func Dup2(oldfd int, newfd int) (err error) {
15121661 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
1662 if e1 != 0 {
1663 err = errnoErr(e1)
1664 }
1665 return
1666 }
1667
1668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1669
1670 func EpollCreate(size int) (fd int, err error) {
1671 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
1672 fd = int(r0)
15131673 if e1 != 0 {
15141674 err = errnoErr(e1)
15151675 }
15651725
15661726 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15671727
1728 func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
1729 var _p0 *byte
1730 _p0, err = BytePtrFromString(path)
1731 if err != nil {
1732 return
1733 }
1734 _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
1735 if e1 != 0 {
1736 err = errnoErr(e1)
1737 }
1738 return
1739 }
1740
1741 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1742
15681743 func Fstatfs(fd int, buf *Statfs_t) (err error) {
15691744 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
15701745 if e1 != 0 {
15861761 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15871762
15881763 func Getegid() (egid int) {
1589 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
1764 r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
15901765 egid = int(r0)
15911766 return
15921767 }
15941769 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15951770
15961771 func Geteuid() (euid int) {
1597 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
1772 r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
15981773 euid = int(r0)
15991774 return
16001775 }
16021777 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16031778
16041779 func Getgid() (gid int) {
1605 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
1780 r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
16061781 gid = int(r0)
16071782 return
16081783 }
16201795 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16211796
16221797 func Getuid() (uid int) {
1623 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
1798 r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
16241799 uid = int(r0)
16251800 return
16261801 }
16271802
16281803 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16291804
1630 func InotifyInit() (fd int, err error) {
1805 func inotifyInit() (fd int, err error) {
16311806 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
16321807 fd = int(r0)
16331808 if e1 != 0 {
16751850
16761851 func Listen(s int, n int) (err error) {
16771852 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
1678 if e1 != 0 {
1679 err = errnoErr(e1)
1680 }
1681 return
1682 }
1683
1684 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1685
1686 func Lstat(path string, stat *Stat_t) (err error) {
1687 var _p0 *byte
1688 _p0, err = BytePtrFromString(path)
1689 if err != nil {
1690 return
1691 }
1692 _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
16931853 if e1 != 0 {
16941854 err = errnoErr(e1)
16951855 }
17421902
17431903 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
17441904
1905 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1906 var _p0 *byte
1907 _p0, err = BytePtrFromString(oldpath)
1908 if err != nil {
1909 return
1910 }
1911 var _p1 *byte
1912 _p1, err = BytePtrFromString(newpath)
1913 if err != nil {
1914 return
1915 }
1916 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1917 if e1 != 0 {
1918 err = errnoErr(e1)
1919 }
1920 return
1921 }
1922
1923 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1924
17451925 func Seek(fd int, offset int64, whence int) (off int64, err error) {
17461926 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
17471927 off = int64(r0)
17531933
17541934 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
17551935
1756 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
1757 r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1758 n = int(r0)
1759 if e1 != 0 {
1760 err = errnoErr(e1)
1761 }
1762 return
1763 }
1764
1765 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1766
17671936 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
17681937 r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
17691938 written = int(r0)
18662035
18672036 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
18682037
1869 func Stat(path string, stat *Stat_t) (err error) {
1870 var _p0 *byte
1871 _p0, err = BytePtrFromString(path)
1872 if err != nil {
1873 return
1874 }
1875 _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1876 if e1 != 0 {
1877 err = errnoErr(e1)
1878 }
1879 return
1880 }
1881
1882 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1883
18842038 func Statfs(path string, buf *Statfs_t) (err error) {
18852039 var _p0 *byte
18862040 _p0, err = BytePtrFromString(path)
19132067 return
19142068 }
19152069 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
2070 if e1 != 0 {
2071 err = errnoErr(e1)
2072 }
2073 return
2074 }
2075
2076 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2077
2078 func Ustat(dev int, ubuf *Ustat_t) (err error) {
2079 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
19162080 if e1 != 0 {
19172081 err = errnoErr(e1)
19182082 }
21112275
21122276 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
21132277
2278 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
2279 var _p0 *byte
2280 _p0, err = BytePtrFromString(path)
2281 if err != nil {
2282 return
2283 }
2284 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
2285 if e1 != 0 {
2286 err = errnoErr(e1)
2287 }
2288 return
2289 }
2290
2291 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2292
21142293 func Utime(path string, buf *Utimbuf) (err error) {
21152294 var _p0 *byte
21162295 _p0, err = BytePtrFromString(path)
21182297 return
21192298 }
21202299 _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
2300 if e1 != 0 {
2301 err = errnoErr(e1)
2302 }
2303 return
2304 }
2305
2306 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2307
2308 func utimes(path string, times *[2]Timeval) (err error) {
2309 var _p0 *byte
2310 _p0, err = BytePtrFromString(path)
2311 if err != nil {
2312 return
2313 }
2314 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
21212315 if e1 != 0 {
21222316 err = errnoErr(e1)
21232317 }
21542348 }
21552349 return
21562350 }
2351
2352 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2353
2354 func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
2355 var _p0 *byte
2356 _p0, err = BytePtrFromString(cmdline)
2357 if err != nil {
2358 return
2359 }
2360 _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
2361 if e1 != 0 {
2362 err = errnoErr(e1)
2363 }
2364 return
2365 }
0 // mksyscall.pl -l32 -arm -tags linux,arm syscall_linux.go syscall_linux_arm.go
0 // go run mksyscall.go -l32 -arm -tags linux,arm syscall_linux.go syscall_linux_arm.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build linux,arm
142142
143143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
144144
145 func utimes(path string, times *[2]Timeval) (err error) {
146 var _p0 *byte
147 _p0, err = BytePtrFromString(path)
148 if err != nil {
149 return
150 }
151 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
152 if e1 != 0 {
153 err = errnoErr(e1)
154 }
155 return
156 }
157
158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
159
160145 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
161146 var _p0 *byte
162147 _p0, err = BytePtrFromString(path)
164149 return
165150 }
166151 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
167 if e1 != 0 {
168 err = errnoErr(e1)
169 }
170 return
171 }
172
173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
174
175 func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
176 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
177152 if e1 != 0 {
178153 err = errnoErr(e1)
179154 }
441416
442417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
443418
419 func ClockGetres(clockid int32, res *Timespec) (err error) {
420 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
421 if e1 != 0 {
422 err = errnoErr(e1)
423 }
424 return
425 }
426
427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
428
444429 func ClockGettime(clockid int32, time *Timespec) (err error) {
445430 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
431 if e1 != 0 {
432 err = errnoErr(e1)
433 }
434 return
435 }
436
437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
438
439 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
440 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
446441 if e1 != 0 {
447442 err = errnoErr(e1)
448443 }
472467
473468 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
474469
470 func DeleteModule(name string, flags int) (err error) {
471 var _p0 *byte
472 _p0, err = BytePtrFromString(name)
473 if err != nil {
474 return
475 }
476 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
477 if e1 != 0 {
478 err = errnoErr(e1)
479 }
480 return
481 }
482
483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
484
475485 func Dup(oldfd int) (fd int, err error) {
476486 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
477487 fd = int(r0)
493503
494504 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
495505
496 func EpollCreate(size int) (fd int, err error) {
497 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
498 fd = int(r0)
499 if e1 != 0 {
500 err = errnoErr(e1)
501 }
502 return
503 }
504
505 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
506
507506 func EpollCreate1(flag int) (fd int, err error) {
508507 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
509508 fd = int(r0)
537536 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
538537
539538 func Exit(code int) {
540 Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
541 return
542 }
543
544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545
546 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
547 var _p0 *byte
548 _p0, err = BytePtrFromString(path)
549 if err != nil {
550 return
551 }
552 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
553 if e1 != 0 {
554 err = errnoErr(e1)
555 }
539 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
556540 return
557541 }
558542
624608
625609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
626610
611 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
612 var _p0 *byte
613 _p0, err = BytePtrFromString(attr)
614 if err != nil {
615 return
616 }
617 var _p1 unsafe.Pointer
618 if len(dest) > 0 {
619 _p1 = unsafe.Pointer(&dest[0])
620 } else {
621 _p1 = unsafe.Pointer(&_zero)
622 }
623 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
624 sz = int(r0)
625 if e1 != 0 {
626 err = errnoErr(e1)
627 }
628 return
629 }
630
631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
632
633 func FinitModule(fd int, params string, flags int) (err error) {
634 var _p0 *byte
635 _p0, err = BytePtrFromString(params)
636 if err != nil {
637 return
638 }
639 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
640 if e1 != 0 {
641 err = errnoErr(e1)
642 }
643 return
644 }
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func Flistxattr(fd int, dest []byte) (sz int, err error) {
649 var _p0 unsafe.Pointer
650 if len(dest) > 0 {
651 _p0 = unsafe.Pointer(&dest[0])
652 } else {
653 _p0 = unsafe.Pointer(&_zero)
654 }
655 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
656 sz = int(r0)
657 if e1 != 0 {
658 err = errnoErr(e1)
659 }
660 return
661 }
662
663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
664
627665 func Flock(fd int, how int) (err error) {
628666 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
667 if e1 != 0 {
668 err = errnoErr(e1)
669 }
670 return
671 }
672
673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674
675 func Fremovexattr(fd int, attr string) (err error) {
676 var _p0 *byte
677 _p0, err = BytePtrFromString(attr)
678 if err != nil {
679 return
680 }
681 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
682 if e1 != 0 {
683 err = errnoErr(e1)
684 }
685 return
686 }
687
688 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
689
690 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
691 var _p0 *byte
692 _p0, err = BytePtrFromString(attr)
693 if err != nil {
694 return
695 }
696 var _p1 unsafe.Pointer
697 if len(dest) > 0 {
698 _p1 = unsafe.Pointer(&dest[0])
699 } else {
700 _p1 = unsafe.Pointer(&_zero)
701 }
702 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
629703 if e1 != 0 {
630704 err = errnoErr(e1)
631705 }
673747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674748
675749 func Getpid() (pid int) {
676 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
750 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
677751 pid = int(r0)
678752 return
679753 }
681755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
682756
683757 func Getppid() (ppid int) {
684 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
758 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
685759 ppid = int(r0)
686760 return
687761 }
738812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
739813
740814 func Gettid() (tid int) {
741 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
815 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
742816 tid = int(r0)
743817 return
744818 }
764838 }
765839 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
766840 sz = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func InitModule(moduleImage []byte, params string) (err error) {
850 var _p0 unsafe.Pointer
851 if len(moduleImage) > 0 {
852 _p0 = unsafe.Pointer(&moduleImage[0])
853 } else {
854 _p0 = unsafe.Pointer(&_zero)
855 }
856 var _p1 *byte
857 _p1, err = BytePtrFromString(params)
858 if err != nil {
859 return
860 }
861 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
767862 if e1 != 0 {
768863 err = errnoErr(e1)
769864 }
9541049
9551050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9561051
1052 func MemfdCreate(name string, flags int) (fd int, err error) {
1053 var _p0 *byte
1054 _p0, err = BytePtrFromString(name)
1055 if err != nil {
1056 return
1057 }
1058 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1059 fd = int(r0)
1060 if e1 != 0 {
1061 err = errnoErr(e1)
1062 }
1063 return
1064 }
1065
1066 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1067
9571068 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
9581069 var _p0 *byte
9591070 _p0, err = BytePtrFromString(path)
9861097
9871098 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
9881099 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1107
1108 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
1109 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
1110 fd = int(r0)
9891111 if e1 != 0 {
9901112 err = errnoErr(e1)
9911113 }
10821204
10831205 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10841206
1085 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1207 func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
10861208 var _p0 *byte
10871209 _p0, err = BytePtrFromString(oldpath)
10881210 if err != nil {
10931215 if err != nil {
10941216 return
10951217 }
1096 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1218 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
10971219 if e1 != 0 {
10981220 err = errnoErr(e1)
10991221 }
12371359
12381360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12391361
1362 func Signalfd(fd int, mask *Sigset_t, flags int) {
1363 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
1364 return
1365 }
1366
1367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1368
1369 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
1370 var _p0 *byte
1371 _p0, err = BytePtrFromString(path)
1372 if err != nil {
1373 return
1374 }
1375 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
12401384 func Sync() {
1241 Syscall(SYS_SYNC, 0, 0, 0)
1385 SyscallNoError(SYS_SYNC, 0, 0, 0)
12421386 return
12431387 }
12441388
12971441 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12981442
12991443 func Umask(mask int) (oldmask int) {
1300 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
1444 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
13011445 oldmask = int(r0)
13021446 return
13031447 }
13311475
13321476 func Unshare(flags int) (err error) {
13331477 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
1334 if e1 != 0 {
1335 err = errnoErr(e1)
1336 }
1337 return
1338 }
1339
1340 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1341
1342 func Ustat(dev int, ubuf *Ustat_t) (err error) {
1343 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
13441478 if e1 != 0 {
13451479 err = errnoErr(e1)
13461480 }
15081642
15091643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15101644
1645 func faccessat(dirfd int, path string, mode uint32) (err error) {
1646 var _p0 *byte
1647 _p0, err = BytePtrFromString(path)
1648 if err != nil {
1649 return
1650 }
1651 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1652 if e1 != 0 {
1653 err = errnoErr(e1)
1654 }
1655 return
1656 }
1657
1658 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1659
15111660 func pipe2(p *[2]_C_int, flags int) (err error) {
15121661 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
15131662 if e1 != 0 {
17071856
17081857 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
17091858
1710 func Fchown(fd int, uid int, gid int) (err error) {
1711 _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))
1712 if e1 != 0 {
1713 err = errnoErr(e1)
1714 }
1715 return
1716 }
1717
1718 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1719
1720 func Fstat(fd int, stat *Stat_t) (err error) {
1721 _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
1722 if e1 != 0 {
1723 err = errnoErr(e1)
1724 }
1725 return
1726 }
1727
1728 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1729
1730 func Getegid() (egid int) {
1731 r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0)
1732 egid = int(r0)
1733 return
1734 }
1735
1736 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1737
1738 func Geteuid() (euid int) {
1739 r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0)
1740 euid = int(r0)
1741 return
1742 }
1743
1744 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1745
1746 func Getgid() (gid int) {
1747 r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0)
1748 gid = int(r0)
1749 return
1750 }
1751
1752 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1753
1754 func Getuid() (uid int) {
1755 r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0)
1756 uid = int(r0)
1757 return
1758 }
1759
1760 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1761
1762 func InotifyInit() (fd int, err error) {
1763 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
1859 func EpollCreate(size int) (fd int, err error) {
1860 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
17641861 fd = int(r0)
1765 if e1 != 0 {
1766 err = errnoErr(e1)
1767 }
1768 return
1769 }
1770
1771 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1772
1773 func Lchown(path string, uid int, gid int) (err error) {
1774 var _p0 *byte
1775 _p0, err = BytePtrFromString(path)
1776 if err != nil {
1777 return
1778 }
1779 _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
1780 if e1 != 0 {
1781 err = errnoErr(e1)
1782 }
1783 return
1784 }
1785
1786 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1787
1788 func Listen(s int, n int) (err error) {
1789 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
1790 if e1 != 0 {
1791 err = errnoErr(e1)
1792 }
1793 return
1794 }
1795
1796 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1797
1798 func Lstat(path string, stat *Stat_t) (err error) {
1799 var _p0 *byte
1800 _p0, err = BytePtrFromString(path)
1801 if err != nil {
1802 return
1803 }
1804 _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1805 if e1 != 0 {
1806 err = errnoErr(e1)
1807 }
1808 return
1809 }
1810
1811 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1812
1813 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
1814 r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
1815 written = int(r0)
1816 if e1 != 0 {
1817 err = errnoErr(e1)
1818 }
1819 return
1820 }
1821
1822 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1823
1824 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
1825 r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1826 n = int(r0)
1827 if e1 != 0 {
1828 err = errnoErr(e1)
1829 }
1830 return
1831 }
1832
1833 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1834
1835 func Setfsgid(gid int) (err error) {
1836 _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
1837 if e1 != 0 {
1838 err = errnoErr(e1)
1839 }
1840 return
1841 }
1842
1843 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1844
1845 func Setfsuid(uid int) (err error) {
1846 _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
1847 if e1 != 0 {
1848 err = errnoErr(e1)
1849 }
1850 return
1851 }
1852
1853 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1854
1855 func Setregid(rgid int, egid int) (err error) {
1856 _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
1857 if e1 != 0 {
1858 err = errnoErr(e1)
1859 }
1860 return
1861 }
1862
1863 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1864
1865 func Setresgid(rgid int, egid int, sgid int) (err error) {
1866 _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
1867 if e1 != 0 {
1868 err = errnoErr(e1)
1869 }
1870 return
1871 }
1872
1873 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1874
1875 func Setresuid(ruid int, euid int, suid int) (err error) {
1876 _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
1877 if e1 != 0 {
1878 err = errnoErr(e1)
1879 }
1880 return
1881 }
1882
1883 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1884
1885 func Setreuid(ruid int, euid int) (err error) {
1886 _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
1887 if e1 != 0 {
1888 err = errnoErr(e1)
1889 }
1890 return
1891 }
1892
1893 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1894
1895 func Shutdown(fd int, how int) (err error) {
1896 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
1897 if e1 != 0 {
1898 err = errnoErr(e1)
1899 }
1900 return
1901 }
1902
1903 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1904
1905 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
1906 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
1907 n = int(r0)
1908 if e1 != 0 {
1909 err = errnoErr(e1)
1910 }
1911 return
1912 }
1913
1914 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1915
1916 func Stat(path string, stat *Stat_t) (err error) {
1917 var _p0 *byte
1918 _p0, err = BytePtrFromString(path)
1919 if err != nil {
1920 return
1921 }
1922 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1923 if e1 != 0 {
1924 err = errnoErr(e1)
1925 }
1926 return
1927 }
1928
1929 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1930
1931 func Gettimeofday(tv *Timeval) (err error) {
1932 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
19331862 if e1 != 0 {
19341863 err = errnoErr(e1)
19351864 }
19551884
19561885 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
19571886
1887 func Fchown(fd int, uid int, gid int) (err error) {
1888 _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))
1889 if e1 != 0 {
1890 err = errnoErr(e1)
1891 }
1892 return
1893 }
1894
1895 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1896
1897 func Fstat(fd int, stat *Stat_t) (err error) {
1898 _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
1899 if e1 != 0 {
1900 err = errnoErr(e1)
1901 }
1902 return
1903 }
1904
1905 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1906
1907 func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
1908 var _p0 *byte
1909 _p0, err = BytePtrFromString(path)
1910 if err != nil {
1911 return
1912 }
1913 _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
1914 if e1 != 0 {
1915 err = errnoErr(e1)
1916 }
1917 return
1918 }
1919
1920 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1921
1922 func Getegid() (egid int) {
1923 r0, _ := RawSyscallNoError(SYS_GETEGID32, 0, 0, 0)
1924 egid = int(r0)
1925 return
1926 }
1927
1928 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1929
1930 func Geteuid() (euid int) {
1931 r0, _ := RawSyscallNoError(SYS_GETEUID32, 0, 0, 0)
1932 euid = int(r0)
1933 return
1934 }
1935
1936 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1937
1938 func Getgid() (gid int) {
1939 r0, _ := RawSyscallNoError(SYS_GETGID32, 0, 0, 0)
1940 gid = int(r0)
1941 return
1942 }
1943
1944 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1945
1946 func Getuid() (uid int) {
1947 r0, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0)
1948 uid = int(r0)
1949 return
1950 }
1951
1952 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1953
1954 func InotifyInit() (fd int, err error) {
1955 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
1956 fd = int(r0)
1957 if e1 != 0 {
1958 err = errnoErr(e1)
1959 }
1960 return
1961 }
1962
1963 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1964
1965 func Lchown(path string, uid int, gid int) (err error) {
1966 var _p0 *byte
1967 _p0, err = BytePtrFromString(path)
1968 if err != nil {
1969 return
1970 }
1971 _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
1972 if e1 != 0 {
1973 err = errnoErr(e1)
1974 }
1975 return
1976 }
1977
1978 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1979
1980 func Listen(s int, n int) (err error) {
1981 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
1982 if e1 != 0 {
1983 err = errnoErr(e1)
1984 }
1985 return
1986 }
1987
1988 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1989
1990 func Lstat(path string, stat *Stat_t) (err error) {
1991 var _p0 *byte
1992 _p0, err = BytePtrFromString(path)
1993 if err != nil {
1994 return
1995 }
1996 _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1997 if e1 != 0 {
1998 err = errnoErr(e1)
1999 }
2000 return
2001 }
2002
2003 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2004
19582005 func Pause() (err error) {
19592006 _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
2007 if e1 != 0 {
2008 err = errnoErr(e1)
2009 }
2010 return
2011 }
2012
2013 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2014
2015 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
2016 var _p0 *byte
2017 _p0, err = BytePtrFromString(oldpath)
2018 if err != nil {
2019 return
2020 }
2021 var _p1 *byte
2022 _p1, err = BytePtrFromString(newpath)
2023 if err != nil {
2024 return
2025 }
2026 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
2027 if e1 != 0 {
2028 err = errnoErr(e1)
2029 }
2030 return
2031 }
2032
2033 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2034
2035 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
2036 r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
2037 written = int(r0)
2038 if e1 != 0 {
2039 err = errnoErr(e1)
2040 }
2041 return
2042 }
2043
2044 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2045
2046 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
2047 r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
2048 n = int(r0)
2049 if e1 != 0 {
2050 err = errnoErr(e1)
2051 }
2052 return
2053 }
2054
2055 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2056
2057 func Setfsgid(gid int) (err error) {
2058 _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
2059 if e1 != 0 {
2060 err = errnoErr(e1)
2061 }
2062 return
2063 }
2064
2065 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2066
2067 func Setfsuid(uid int) (err error) {
2068 _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
2069 if e1 != 0 {
2070 err = errnoErr(e1)
2071 }
2072 return
2073 }
2074
2075 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2076
2077 func Setregid(rgid int, egid int) (err error) {
2078 _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
2079 if e1 != 0 {
2080 err = errnoErr(e1)
2081 }
2082 return
2083 }
2084
2085 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2086
2087 func Setresgid(rgid int, egid int, sgid int) (err error) {
2088 _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
2089 if e1 != 0 {
2090 err = errnoErr(e1)
2091 }
2092 return
2093 }
2094
2095 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2096
2097 func Setresuid(ruid int, euid int, suid int) (err error) {
2098 _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
2099 if e1 != 0 {
2100 err = errnoErr(e1)
2101 }
2102 return
2103 }
2104
2105 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2106
2107 func Setreuid(ruid int, euid int) (err error) {
2108 _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
2109 if e1 != 0 {
2110 err = errnoErr(e1)
2111 }
2112 return
2113 }
2114
2115 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2116
2117 func Shutdown(fd int, how int) (err error) {
2118 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
2119 if e1 != 0 {
2120 err = errnoErr(e1)
2121 }
2122 return
2123 }
2124
2125 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2126
2127 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
2128 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
2129 n = int(r0)
2130 if e1 != 0 {
2131 err = errnoErr(e1)
2132 }
2133 return
2134 }
2135
2136 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2137
2138 func Stat(path string, stat *Stat_t) (err error) {
2139 var _p0 *byte
2140 _p0, err = BytePtrFromString(path)
2141 if err != nil {
2142 return
2143 }
2144 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2145 if e1 != 0 {
2146 err = errnoErr(e1)
2147 }
2148 return
2149 }
2150
2151 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2152
2153 func Ustat(dev int, ubuf *Ustat_t) (err error) {
2154 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
2155 if e1 != 0 {
2156 err = errnoErr(e1)
2157 }
2158 return
2159 }
2160
2161 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2162
2163 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
2164 var _p0 *byte
2165 _p0, err = BytePtrFromString(path)
2166 if err != nil {
2167 return
2168 }
2169 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
2170 if e1 != 0 {
2171 err = errnoErr(e1)
2172 }
2173 return
2174 }
2175
2176 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2177
2178 func Gettimeofday(tv *Timeval) (err error) {
2179 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
2180 if e1 != 0 {
2181 err = errnoErr(e1)
2182 }
2183 return
2184 }
2185
2186 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2187
2188 func utimes(path string, times *[2]Timeval) (err error) {
2189 var _p0 *byte
2190 _p0, err = BytePtrFromString(path)
2191 if err != nil {
2192 return
2193 }
2194 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
19602195 if e1 != 0 {
19612196 err = errnoErr(e1)
19622197 }
20632298 }
20642299 return
20652300 }
2301
2302 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2303
2304 func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) {
2305 _, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32))
2306 if e1 != 0 {
2307 err = errnoErr(e1)
2308 }
2309 return
2310 }
0 // mksyscall.pl -tags linux,arm64 syscall_linux.go syscall_linux_arm64.go
0 // go run mksyscall.go -tags linux,arm64 syscall_linux.go syscall_linux_arm64.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build linux,arm64
142142
143143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
144144
145 func utimes(path string, times *[2]Timeval) (err error) {
146 var _p0 *byte
147 _p0, err = BytePtrFromString(path)
148 if err != nil {
149 return
150 }
151 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
152 if e1 != 0 {
153 err = errnoErr(e1)
154 }
155 return
156 }
157
158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
159
160145 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
161146 var _p0 *byte
162147 _p0, err = BytePtrFromString(path)
164149 return
165150 }
166151 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
167 if e1 != 0 {
168 err = errnoErr(e1)
169 }
170 return
171 }
172
173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
174
175 func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
176 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
177152 if e1 != 0 {
178153 err = errnoErr(e1)
179154 }
441416
442417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
443418
419 func ClockGetres(clockid int32, res *Timespec) (err error) {
420 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
421 if e1 != 0 {
422 err = errnoErr(e1)
423 }
424 return
425 }
426
427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
428
444429 func ClockGettime(clockid int32, time *Timespec) (err error) {
445430 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
431 if e1 != 0 {
432 err = errnoErr(e1)
433 }
434 return
435 }
436
437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
438
439 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
440 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
446441 if e1 != 0 {
447442 err = errnoErr(e1)
448443 }
472467
473468 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
474469
470 func DeleteModule(name string, flags int) (err error) {
471 var _p0 *byte
472 _p0, err = BytePtrFromString(name)
473 if err != nil {
474 return
475 }
476 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
477 if e1 != 0 {
478 err = errnoErr(e1)
479 }
480 return
481 }
482
483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
484
475485 func Dup(oldfd int) (fd int, err error) {
476486 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
477487 fd = int(r0)
493503
494504 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
495505
496 func EpollCreate(size int) (fd int, err error) {
497 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
498 fd = int(r0)
499 if e1 != 0 {
500 err = errnoErr(e1)
501 }
502 return
503 }
504
505 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
506
507506 func EpollCreate1(flag int) (fd int, err error) {
508507 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
509508 fd = int(r0)
537536 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
538537
539538 func Exit(code int) {
540 Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
541 return
542 }
543
544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545
546 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
547 var _p0 *byte
548 _p0, err = BytePtrFromString(path)
549 if err != nil {
550 return
551 }
552 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
553 if e1 != 0 {
554 err = errnoErr(e1)
555 }
539 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
556540 return
557541 }
558542
624608
625609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
626610
611 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
612 var _p0 *byte
613 _p0, err = BytePtrFromString(attr)
614 if err != nil {
615 return
616 }
617 var _p1 unsafe.Pointer
618 if len(dest) > 0 {
619 _p1 = unsafe.Pointer(&dest[0])
620 } else {
621 _p1 = unsafe.Pointer(&_zero)
622 }
623 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
624 sz = int(r0)
625 if e1 != 0 {
626 err = errnoErr(e1)
627 }
628 return
629 }
630
631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
632
633 func FinitModule(fd int, params string, flags int) (err error) {
634 var _p0 *byte
635 _p0, err = BytePtrFromString(params)
636 if err != nil {
637 return
638 }
639 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
640 if e1 != 0 {
641 err = errnoErr(e1)
642 }
643 return
644 }
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func Flistxattr(fd int, dest []byte) (sz int, err error) {
649 var _p0 unsafe.Pointer
650 if len(dest) > 0 {
651 _p0 = unsafe.Pointer(&dest[0])
652 } else {
653 _p0 = unsafe.Pointer(&_zero)
654 }
655 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
656 sz = int(r0)
657 if e1 != 0 {
658 err = errnoErr(e1)
659 }
660 return
661 }
662
663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
664
627665 func Flock(fd int, how int) (err error) {
628666 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
667 if e1 != 0 {
668 err = errnoErr(e1)
669 }
670 return
671 }
672
673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674
675 func Fremovexattr(fd int, attr string) (err error) {
676 var _p0 *byte
677 _p0, err = BytePtrFromString(attr)
678 if err != nil {
679 return
680 }
681 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
682 if e1 != 0 {
683 err = errnoErr(e1)
684 }
685 return
686 }
687
688 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
689
690 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
691 var _p0 *byte
692 _p0, err = BytePtrFromString(attr)
693 if err != nil {
694 return
695 }
696 var _p1 unsafe.Pointer
697 if len(dest) > 0 {
698 _p1 = unsafe.Pointer(&dest[0])
699 } else {
700 _p1 = unsafe.Pointer(&_zero)
701 }
702 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
629703 if e1 != 0 {
630704 err = errnoErr(e1)
631705 }
673747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674748
675749 func Getpid() (pid int) {
676 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
750 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
677751 pid = int(r0)
678752 return
679753 }
681755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
682756
683757 func Getppid() (ppid int) {
684 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
758 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
685759 ppid = int(r0)
686760 return
687761 }
738812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
739813
740814 func Gettid() (tid int) {
741 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
815 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
742816 tid = int(r0)
743817 return
744818 }
764838 }
765839 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
766840 sz = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func InitModule(moduleImage []byte, params string) (err error) {
850 var _p0 unsafe.Pointer
851 if len(moduleImage) > 0 {
852 _p0 = unsafe.Pointer(&moduleImage[0])
853 } else {
854 _p0 = unsafe.Pointer(&_zero)
855 }
856 var _p1 *byte
857 _p1, err = BytePtrFromString(params)
858 if err != nil {
859 return
860 }
861 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
767862 if e1 != 0 {
768863 err = errnoErr(e1)
769864 }
9541049
9551050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9561051
1052 func MemfdCreate(name string, flags int) (fd int, err error) {
1053 var _p0 *byte
1054 _p0, err = BytePtrFromString(name)
1055 if err != nil {
1056 return
1057 }
1058 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1059 fd = int(r0)
1060 if e1 != 0 {
1061 err = errnoErr(e1)
1062 }
1063 return
1064 }
1065
1066 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1067
9571068 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
9581069 var _p0 *byte
9591070 _p0, err = BytePtrFromString(path)
9861097
9871098 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
9881099 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1107
1108 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
1109 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
1110 fd = int(r0)
9891111 if e1 != 0 {
9901112 err = errnoErr(e1)
9911113 }
10821204
10831205 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10841206
1085 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1207 func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
10861208 var _p0 *byte
10871209 _p0, err = BytePtrFromString(oldpath)
10881210 if err != nil {
10931215 if err != nil {
10941216 return
10951217 }
1096 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1218 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
10971219 if e1 != 0 {
10981220 err = errnoErr(e1)
10991221 }
12371359
12381360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12391361
1362 func Signalfd(fd int, mask *Sigset_t, flags int) {
1363 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
1364 return
1365 }
1366
1367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1368
1369 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
1370 var _p0 *byte
1371 _p0, err = BytePtrFromString(path)
1372 if err != nil {
1373 return
1374 }
1375 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
12401384 func Sync() {
1241 Syscall(SYS_SYNC, 0, 0, 0)
1385 SyscallNoError(SYS_SYNC, 0, 0, 0)
12421386 return
12431387 }
12441388
12971441 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12981442
12991443 func Umask(mask int) (oldmask int) {
1300 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
1444 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
13011445 oldmask = int(r0)
13021446 return
13031447 }
13311475
13321476 func Unshare(flags int) (err error) {
13331477 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
1334 if e1 != 0 {
1335 err = errnoErr(e1)
1336 }
1337 return
1338 }
1339
1340 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1341
1342 func Ustat(dev int, ubuf *Ustat_t) (err error) {
1343 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
13441478 if e1 != 0 {
13451479 err = errnoErr(e1)
13461480 }
15081642
15091643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15101644
1645 func faccessat(dirfd int, path string, mode uint32) (err error) {
1646 var _p0 *byte
1647 _p0, err = BytePtrFromString(path)
1648 if err != nil {
1649 return
1650 }
1651 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1652 if e1 != 0 {
1653 err = errnoErr(e1)
1654 }
1655 return
1656 }
1657
1658 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1659
15111660 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
15121661 var _p0 unsafe.Pointer
15131662 if len(events) > 0 {
15251674
15261675 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15271676
1677 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
1678 _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
1679 if e1 != 0 {
1680 err = errnoErr(e1)
1681 }
1682 return
1683 }
1684
1685 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1686
15281687 func Fchown(fd int, uid int, gid int) (err error) {
15291688 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
15301689 if e1 != 0 {
15811740 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15821741
15831742 func Getegid() (egid int) {
1584 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
1743 r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
15851744 egid = int(r0)
15861745 return
15871746 }
15891748 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15901749
15911750 func Geteuid() (euid int) {
1592 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
1751 r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
15931752 euid = int(r0)
15941753 return
15951754 }
15971756 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15981757
15991758 func Getgid() (gid int) {
1600 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
1759 r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
16011760 gid = int(r0)
16021761 return
16031762 }
16151774 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16161775
16171776 func Getuid() (uid int) {
1618 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
1777 r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
16191778 uid = int(r0)
16201779 return
16211780 }
16661825
16671826 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16681827
1828 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1829 var _p0 *byte
1830 _p0, err = BytePtrFromString(oldpath)
1831 if err != nil {
1832 return
1833 }
1834 var _p1 *byte
1835 _p1, err = BytePtrFromString(newpath)
1836 if err != nil {
1837 return
1838 }
1839 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1840 if e1 != 0 {
1841 err = errnoErr(e1)
1842 }
1843 return
1844 }
1845
1846 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1847
16691848 func Seek(fd int, offset int64, whence int) (off int64, err error) {
16701849 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
16711850 off = int64(r0)
0 // mksyscall.pl -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go
0 // go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build linux,mips
142142
143143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
144144
145 func utimes(path string, times *[2]Timeval) (err error) {
146 var _p0 *byte
147 _p0, err = BytePtrFromString(path)
148 if err != nil {
149 return
150 }
151 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
152 if e1 != 0 {
153 err = errnoErr(e1)
154 }
155 return
156 }
157
158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
159
160145 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
161146 var _p0 *byte
162147 _p0, err = BytePtrFromString(path)
164149 return
165150 }
166151 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
167 if e1 != 0 {
168 err = errnoErr(e1)
169 }
170 return
171 }
172
173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
174
175 func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
176 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
177152 if e1 != 0 {
178153 err = errnoErr(e1)
179154 }
441416
442417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
443418
419 func ClockGetres(clockid int32, res *Timespec) (err error) {
420 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
421 if e1 != 0 {
422 err = errnoErr(e1)
423 }
424 return
425 }
426
427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
428
444429 func ClockGettime(clockid int32, time *Timespec) (err error) {
445430 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
431 if e1 != 0 {
432 err = errnoErr(e1)
433 }
434 return
435 }
436
437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
438
439 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
440 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
446441 if e1 != 0 {
447442 err = errnoErr(e1)
448443 }
472467
473468 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
474469
470 func DeleteModule(name string, flags int) (err error) {
471 var _p0 *byte
472 _p0, err = BytePtrFromString(name)
473 if err != nil {
474 return
475 }
476 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
477 if e1 != 0 {
478 err = errnoErr(e1)
479 }
480 return
481 }
482
483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
484
475485 func Dup(oldfd int) (fd int, err error) {
476486 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
477487 fd = int(r0)
493503
494504 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
495505
496 func EpollCreate(size int) (fd int, err error) {
497 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
498 fd = int(r0)
499 if e1 != 0 {
500 err = errnoErr(e1)
501 }
502 return
503 }
504
505 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
506
507506 func EpollCreate1(flag int) (fd int, err error) {
508507 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
509508 fd = int(r0)
537536 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
538537
539538 func Exit(code int) {
540 Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
541 return
542 }
543
544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545
546 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
547 var _p0 *byte
548 _p0, err = BytePtrFromString(path)
549 if err != nil {
550 return
551 }
552 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
553 if e1 != 0 {
554 err = errnoErr(e1)
555 }
539 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
556540 return
557541 }
558542
624608
625609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
626610
611 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
612 var _p0 *byte
613 _p0, err = BytePtrFromString(attr)
614 if err != nil {
615 return
616 }
617 var _p1 unsafe.Pointer
618 if len(dest) > 0 {
619 _p1 = unsafe.Pointer(&dest[0])
620 } else {
621 _p1 = unsafe.Pointer(&_zero)
622 }
623 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
624 sz = int(r0)
625 if e1 != 0 {
626 err = errnoErr(e1)
627 }
628 return
629 }
630
631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
632
633 func FinitModule(fd int, params string, flags int) (err error) {
634 var _p0 *byte
635 _p0, err = BytePtrFromString(params)
636 if err != nil {
637 return
638 }
639 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
640 if e1 != 0 {
641 err = errnoErr(e1)
642 }
643 return
644 }
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func Flistxattr(fd int, dest []byte) (sz int, err error) {
649 var _p0 unsafe.Pointer
650 if len(dest) > 0 {
651 _p0 = unsafe.Pointer(&dest[0])
652 } else {
653 _p0 = unsafe.Pointer(&_zero)
654 }
655 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
656 sz = int(r0)
657 if e1 != 0 {
658 err = errnoErr(e1)
659 }
660 return
661 }
662
663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
664
627665 func Flock(fd int, how int) (err error) {
628666 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
667 if e1 != 0 {
668 err = errnoErr(e1)
669 }
670 return
671 }
672
673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674
675 func Fremovexattr(fd int, attr string) (err error) {
676 var _p0 *byte
677 _p0, err = BytePtrFromString(attr)
678 if err != nil {
679 return
680 }
681 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
682 if e1 != 0 {
683 err = errnoErr(e1)
684 }
685 return
686 }
687
688 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
689
690 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
691 var _p0 *byte
692 _p0, err = BytePtrFromString(attr)
693 if err != nil {
694 return
695 }
696 var _p1 unsafe.Pointer
697 if len(dest) > 0 {
698 _p1 = unsafe.Pointer(&dest[0])
699 } else {
700 _p1 = unsafe.Pointer(&_zero)
701 }
702 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
629703 if e1 != 0 {
630704 err = errnoErr(e1)
631705 }
673747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674748
675749 func Getpid() (pid int) {
676 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
750 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
677751 pid = int(r0)
678752 return
679753 }
681755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
682756
683757 func Getppid() (ppid int) {
684 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
758 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
685759 ppid = int(r0)
686760 return
687761 }
738812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
739813
740814 func Gettid() (tid int) {
741 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
815 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
742816 tid = int(r0)
743817 return
744818 }
764838 }
765839 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
766840 sz = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func InitModule(moduleImage []byte, params string) (err error) {
850 var _p0 unsafe.Pointer
851 if len(moduleImage) > 0 {
852 _p0 = unsafe.Pointer(&moduleImage[0])
853 } else {
854 _p0 = unsafe.Pointer(&_zero)
855 }
856 var _p1 *byte
857 _p1, err = BytePtrFromString(params)
858 if err != nil {
859 return
860 }
861 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
767862 if e1 != 0 {
768863 err = errnoErr(e1)
769864 }
9541049
9551050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9561051
1052 func MemfdCreate(name string, flags int) (fd int, err error) {
1053 var _p0 *byte
1054 _p0, err = BytePtrFromString(name)
1055 if err != nil {
1056 return
1057 }
1058 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1059 fd = int(r0)
1060 if e1 != 0 {
1061 err = errnoErr(e1)
1062 }
1063 return
1064 }
1065
1066 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1067
9571068 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
9581069 var _p0 *byte
9591070 _p0, err = BytePtrFromString(path)
9861097
9871098 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
9881099 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1107
1108 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
1109 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
1110 fd = int(r0)
9891111 if e1 != 0 {
9901112 err = errnoErr(e1)
9911113 }
10821204
10831205 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10841206
1085 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1207 func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
10861208 var _p0 *byte
10871209 _p0, err = BytePtrFromString(oldpath)
10881210 if err != nil {
10931215 if err != nil {
10941216 return
10951217 }
1096 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1218 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
10971219 if e1 != 0 {
10981220 err = errnoErr(e1)
10991221 }
12371359
12381360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12391361
1362 func Signalfd(fd int, mask *Sigset_t, flags int) {
1363 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
1364 return
1365 }
1366
1367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1368
1369 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
1370 var _p0 *byte
1371 _p0, err = BytePtrFromString(path)
1372 if err != nil {
1373 return
1374 }
1375 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
12401384 func Sync() {
1241 Syscall(SYS_SYNC, 0, 0, 0)
1385 SyscallNoError(SYS_SYNC, 0, 0, 0)
12421386 return
12431387 }
12441388
12971441 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12981442
12991443 func Umask(mask int) (oldmask int) {
1300 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
1444 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
13011445 oldmask = int(r0)
13021446 return
13031447 }
13311475
13321476 func Unshare(flags int) (err error) {
13331477 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
1334 if e1 != 0 {
1335 err = errnoErr(e1)
1336 }
1337 return
1338 }
1339
1340 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1341
1342 func Ustat(dev int, ubuf *Ustat_t) (err error) {
1343 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
13441478 if e1 != 0 {
13451479 err = errnoErr(e1)
13461480 }
15081642
15091643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15101644
1645 func faccessat(dirfd int, path string, mode uint32) (err error) {
1646 var _p0 *byte
1647 _p0, err = BytePtrFromString(path)
1648 if err != nil {
1649 return
1650 }
1651 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1652 if e1 != 0 {
1653 err = errnoErr(e1)
1654 }
1655 return
1656 }
1657
1658 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1659
15111660 func Dup2(oldfd int, newfd int) (err error) {
15121661 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
15131662 if e1 != 0 {
15181667
15191668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15201669
1670 func EpollCreate(size int) (fd int, err error) {
1671 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
1672 fd = int(r0)
1673 if e1 != 0 {
1674 err = errnoErr(e1)
1675 }
1676 return
1677 }
1678
1679 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1680
1681 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
1682 var _p0 unsafe.Pointer
1683 if len(events) > 0 {
1684 _p0 = unsafe.Pointer(&events[0])
1685 } else {
1686 _p0 = unsafe.Pointer(&_zero)
1687 }
1688 r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
1689 n = int(r0)
1690 if e1 != 0 {
1691 err = errnoErr(e1)
1692 }
1693 return
1694 }
1695
1696 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1697
1698 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
1699 _, _, e1 := Syscall9(SYS_FADVISE64, uintptr(fd), 0, uintptr(offset>>32), uintptr(offset), uintptr(length>>32), uintptr(length), uintptr(advice), 0, 0)
1700 if e1 != 0 {
1701 err = errnoErr(e1)
1702 }
1703 return
1704 }
1705
1706 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1707
15211708 func Fchown(fd int, uid int, gid int) (err error) {
15221709 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
15231710 if e1 != 0 {
15391726 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15401727
15411728 func Getegid() (egid int) {
1542 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
1729 r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
15431730 egid = int(r0)
15441731 return
15451732 }
15471734 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15481735
15491736 func Geteuid() (euid int) {
1550 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
1737 r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
15511738 euid = int(r0)
15521739 return
15531740 }
15551742 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15561743
15571744 func Getgid() (gid int) {
1558 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
1745 r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
15591746 gid = int(r0)
15601747 return
15611748 }
15631750 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15641751
15651752 func Getuid() (uid int) {
1566 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
1753 r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
15671754 uid = int(r0)
15681755 return
15691756 }
16291816
16301817 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16311818
1819 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1820 var _p0 *byte
1821 _p0, err = BytePtrFromString(oldpath)
1822 if err != nil {
1823 return
1824 }
1825 var _p1 *byte
1826 _p1, err = BytePtrFromString(newpath)
1827 if err != nil {
1828 return
1829 }
1830 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1831 if e1 != 0 {
1832 err = errnoErr(e1)
1833 }
1834 return
1835 }
1836
1837 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1838
16321839 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
16331840 r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
16341841 n = int(r0)
17211928
17221929 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
17231930
1724 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
1725 r0, r1, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
1726 n = int64(int64(r0)<<32 | int64(r1))
1931 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
1932 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
1933 n = int(r0)
17271934 if e1 != 0 {
17281935 err = errnoErr(e1)
17291936 }
17491956 return
17501957 }
17511958 _, _, e1 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length>>32), uintptr(length), 0, 0)
1959 if e1 != 0 {
1960 err = errnoErr(e1)
1961 }
1962 return
1963 }
1964
1965 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1966
1967 func Ustat(dev int, ubuf *Ustat_t) (err error) {
1968 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
17521969 if e1 != 0 {
17531970 err = errnoErr(e1)
17541971 }
19672184
19682185 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
19692186
2187 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
2188 var _p0 *byte
2189 _p0, err = BytePtrFromString(path)
2190 if err != nil {
2191 return
2192 }
2193 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
2194 if e1 != 0 {
2195 err = errnoErr(e1)
2196 }
2197 return
2198 }
2199
2200 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2201
19702202 func Gettimeofday(tv *Timeval) (err error) {
19712203 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
19722204 if e1 != 0 {
19882220
19892221 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
19902222
2223 func Utime(path string, buf *Utimbuf) (err error) {
2224 var _p0 *byte
2225 _p0, err = BytePtrFromString(path)
2226 if err != nil {
2227 return
2228 }
2229 _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
2230 if e1 != 0 {
2231 err = errnoErr(e1)
2232 }
2233 return
2234 }
2235
2236 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2237
2238 func utimes(path string, times *[2]Timeval) (err error) {
2239 var _p0 *byte
2240 _p0, err = BytePtrFromString(path)
2241 if err != nil {
2242 return
2243 }
2244 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
2245 if e1 != 0 {
2246 err = errnoErr(e1)
2247 }
2248 return
2249 }
2250
2251 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2252
19912253 func Lstat(path string, stat *Stat_t) (err error) {
19922254 var _p0 *byte
19932255 _p0, err = BytePtrFromString(path)
20132275
20142276 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
20152277
2278 func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
2279 var _p0 *byte
2280 _p0, err = BytePtrFromString(path)
2281 if err != nil {
2282 return
2283 }
2284 _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
2285 if e1 != 0 {
2286 err = errnoErr(e1)
2287 }
2288 return
2289 }
2290
2291 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2292
20162293 func Stat(path string, stat *Stat_t) (err error) {
20172294 var _p0 *byte
20182295 _p0, err = BytePtrFromString(path)
20202297 return
20212298 }
20222299 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2023 if e1 != 0 {
2024 err = errnoErr(e1)
2025 }
2026 return
2027 }
2028
2029 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2030
2031 func Utime(path string, buf *Utimbuf) (err error) {
2032 var _p0 *byte
2033 _p0, err = BytePtrFromString(path)
2034 if err != nil {
2035 return
2036 }
2037 _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
2038 if e1 != 0 {
2039 err = errnoErr(e1)
2040 }
2041 return
2042 }
2043
2044 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2045
2046 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
2047 var _p0 unsafe.Pointer
2048 if len(events) > 0 {
2049 _p0 = unsafe.Pointer(&events[0])
2050 } else {
2051 _p0 = unsafe.Pointer(&_zero)
2052 }
2053 r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
2054 n = int(r0)
20552300 if e1 != 0 {
20562301 err = errnoErr(e1)
20572302 }
20722317
20732318 func pipe2(p *[2]_C_int, flags int) (err error) {
20742319 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
2320 if e1 != 0 {
2321 err = errnoErr(e1)
2322 }
2323 return
2324 }
2325
2326 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2327
2328 func pipe() (p1 int, p2 int, err error) {
2329 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
2330 p1 = int(r0)
2331 p2 = int(r1)
20752332 if e1 != 0 {
20762333 err = errnoErr(e1)
20772334 }
0 // mksyscall.pl -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go
0 // go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build linux,mips64
142142
143143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
144144
145 func utimes(path string, times *[2]Timeval) (err error) {
146 var _p0 *byte
147 _p0, err = BytePtrFromString(path)
148 if err != nil {
149 return
150 }
151 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
152 if e1 != 0 {
153 err = errnoErr(e1)
154 }
155 return
156 }
157
158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
159
160145 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
161146 var _p0 *byte
162147 _p0, err = BytePtrFromString(path)
164149 return
165150 }
166151 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
167 if e1 != 0 {
168 err = errnoErr(e1)
169 }
170 return
171 }
172
173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
174
175 func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
176 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
177152 if e1 != 0 {
178153 err = errnoErr(e1)
179154 }
441416
442417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
443418
419 func ClockGetres(clockid int32, res *Timespec) (err error) {
420 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
421 if e1 != 0 {
422 err = errnoErr(e1)
423 }
424 return
425 }
426
427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
428
444429 func ClockGettime(clockid int32, time *Timespec) (err error) {
445430 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
431 if e1 != 0 {
432 err = errnoErr(e1)
433 }
434 return
435 }
436
437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
438
439 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
440 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
446441 if e1 != 0 {
447442 err = errnoErr(e1)
448443 }
472467
473468 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
474469
470 func DeleteModule(name string, flags int) (err error) {
471 var _p0 *byte
472 _p0, err = BytePtrFromString(name)
473 if err != nil {
474 return
475 }
476 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
477 if e1 != 0 {
478 err = errnoErr(e1)
479 }
480 return
481 }
482
483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
484
475485 func Dup(oldfd int) (fd int, err error) {
476486 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
477487 fd = int(r0)
493503
494504 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
495505
496 func EpollCreate(size int) (fd int, err error) {
497 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
498 fd = int(r0)
499 if e1 != 0 {
500 err = errnoErr(e1)
501 }
502 return
503 }
504
505 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
506
507506 func EpollCreate1(flag int) (fd int, err error) {
508507 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
509508 fd = int(r0)
537536 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
538537
539538 func Exit(code int) {
540 Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
541 return
542 }
543
544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545
546 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
547 var _p0 *byte
548 _p0, err = BytePtrFromString(path)
549 if err != nil {
550 return
551 }
552 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
553 if e1 != 0 {
554 err = errnoErr(e1)
555 }
539 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
556540 return
557541 }
558542
624608
625609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
626610
611 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
612 var _p0 *byte
613 _p0, err = BytePtrFromString(attr)
614 if err != nil {
615 return
616 }
617 var _p1 unsafe.Pointer
618 if len(dest) > 0 {
619 _p1 = unsafe.Pointer(&dest[0])
620 } else {
621 _p1 = unsafe.Pointer(&_zero)
622 }
623 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
624 sz = int(r0)
625 if e1 != 0 {
626 err = errnoErr(e1)
627 }
628 return
629 }
630
631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
632
633 func FinitModule(fd int, params string, flags int) (err error) {
634 var _p0 *byte
635 _p0, err = BytePtrFromString(params)
636 if err != nil {
637 return
638 }
639 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
640 if e1 != 0 {
641 err = errnoErr(e1)
642 }
643 return
644 }
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func Flistxattr(fd int, dest []byte) (sz int, err error) {
649 var _p0 unsafe.Pointer
650 if len(dest) > 0 {
651 _p0 = unsafe.Pointer(&dest[0])
652 } else {
653 _p0 = unsafe.Pointer(&_zero)
654 }
655 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
656 sz = int(r0)
657 if e1 != 0 {
658 err = errnoErr(e1)
659 }
660 return
661 }
662
663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
664
627665 func Flock(fd int, how int) (err error) {
628666 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
667 if e1 != 0 {
668 err = errnoErr(e1)
669 }
670 return
671 }
672
673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674
675 func Fremovexattr(fd int, attr string) (err error) {
676 var _p0 *byte
677 _p0, err = BytePtrFromString(attr)
678 if err != nil {
679 return
680 }
681 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
682 if e1 != 0 {
683 err = errnoErr(e1)
684 }
685 return
686 }
687
688 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
689
690 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
691 var _p0 *byte
692 _p0, err = BytePtrFromString(attr)
693 if err != nil {
694 return
695 }
696 var _p1 unsafe.Pointer
697 if len(dest) > 0 {
698 _p1 = unsafe.Pointer(&dest[0])
699 } else {
700 _p1 = unsafe.Pointer(&_zero)
701 }
702 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
629703 if e1 != 0 {
630704 err = errnoErr(e1)
631705 }
673747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674748
675749 func Getpid() (pid int) {
676 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
750 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
677751 pid = int(r0)
678752 return
679753 }
681755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
682756
683757 func Getppid() (ppid int) {
684 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
758 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
685759 ppid = int(r0)
686760 return
687761 }
738812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
739813
740814 func Gettid() (tid int) {
741 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
815 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
742816 tid = int(r0)
743817 return
744818 }
764838 }
765839 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
766840 sz = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func InitModule(moduleImage []byte, params string) (err error) {
850 var _p0 unsafe.Pointer
851 if len(moduleImage) > 0 {
852 _p0 = unsafe.Pointer(&moduleImage[0])
853 } else {
854 _p0 = unsafe.Pointer(&_zero)
855 }
856 var _p1 *byte
857 _p1, err = BytePtrFromString(params)
858 if err != nil {
859 return
860 }
861 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
767862 if e1 != 0 {
768863 err = errnoErr(e1)
769864 }
9541049
9551050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9561051
1052 func MemfdCreate(name string, flags int) (fd int, err error) {
1053 var _p0 *byte
1054 _p0, err = BytePtrFromString(name)
1055 if err != nil {
1056 return
1057 }
1058 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1059 fd = int(r0)
1060 if e1 != 0 {
1061 err = errnoErr(e1)
1062 }
1063 return
1064 }
1065
1066 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1067
9571068 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
9581069 var _p0 *byte
9591070 _p0, err = BytePtrFromString(path)
9861097
9871098 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
9881099 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1107
1108 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
1109 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
1110 fd = int(r0)
9891111 if e1 != 0 {
9901112 err = errnoErr(e1)
9911113 }
10821204
10831205 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10841206
1085 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1207 func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
10861208 var _p0 *byte
10871209 _p0, err = BytePtrFromString(oldpath)
10881210 if err != nil {
10931215 if err != nil {
10941216 return
10951217 }
1096 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1218 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
10971219 if e1 != 0 {
10981220 err = errnoErr(e1)
10991221 }
12371359
12381360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12391361
1362 func Signalfd(fd int, mask *Sigset_t, flags int) {
1363 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
1364 return
1365 }
1366
1367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1368
1369 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
1370 var _p0 *byte
1371 _p0, err = BytePtrFromString(path)
1372 if err != nil {
1373 return
1374 }
1375 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
12401384 func Sync() {
1241 Syscall(SYS_SYNC, 0, 0, 0)
1385 SyscallNoError(SYS_SYNC, 0, 0, 0)
12421386 return
12431387 }
12441388
12971441 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12981442
12991443 func Umask(mask int) (oldmask int) {
1300 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
1444 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
13011445 oldmask = int(r0)
13021446 return
13031447 }
13311475
13321476 func Unshare(flags int) (err error) {
13331477 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
1334 if e1 != 0 {
1335 err = errnoErr(e1)
1336 }
1337 return
1338 }
1339
1340 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1341
1342 func Ustat(dev int, ubuf *Ustat_t) (err error) {
1343 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
13441478 if e1 != 0 {
13451479 err = errnoErr(e1)
13461480 }
15081642
15091643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15101644
1645 func faccessat(dirfd int, path string, mode uint32) (err error) {
1646 var _p0 *byte
1647 _p0, err = BytePtrFromString(path)
1648 if err != nil {
1649 return
1650 }
1651 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1652 if e1 != 0 {
1653 err = errnoErr(e1)
1654 }
1655 return
1656 }
1657
1658 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1659
15111660 func Dup2(oldfd int, newfd int) (err error) {
15121661 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
1662 if e1 != 0 {
1663 err = errnoErr(e1)
1664 }
1665 return
1666 }
1667
1668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1669
1670 func EpollCreate(size int) (fd int, err error) {
1671 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
1672 fd = int(r0)
15131673 if e1 != 0 {
15141674 err = errnoErr(e1)
15151675 }
15351695
15361696 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15371697
1698 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
1699 _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
1700 if e1 != 0 {
1701 err = errnoErr(e1)
1702 }
1703 return
1704 }
1705
1706 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1707
15381708 func Fchown(fd int, uid int, gid int) (err error) {
15391709 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
15401710 if e1 != 0 {
15661736 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15671737
15681738 func Getegid() (egid int) {
1569 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
1739 r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
15701740 egid = int(r0)
15711741 return
15721742 }
15741744 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15751745
15761746 func Geteuid() (euid int) {
1577 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
1747 r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
15781748 euid = int(r0)
15791749 return
15801750 }
15821752 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15831753
15841754 func Getgid() (gid int) {
1585 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
1755 r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
15861756 gid = int(r0)
15871757 return
15881758 }
16001770 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16011771
16021772 func Getuid() (uid int) {
1603 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
1773 r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
16041774 uid = int(r0)
16051775 return
16061776 }
16761846
16771847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16781848
1849 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1850 var _p0 *byte
1851 _p0, err = BytePtrFromString(oldpath)
1852 if err != nil {
1853 return
1854 }
1855 var _p1 *byte
1856 _p1, err = BytePtrFromString(newpath)
1857 if err != nil {
1858 return
1859 }
1860 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1861 if e1 != 0 {
1862 err = errnoErr(e1)
1863 }
1864 return
1865 }
1866
1867 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1868
16791869 func Seek(fd int, offset int64, whence int) (off int64, err error) {
16801870 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
16811871 off = int64(r0)
18212011 return
18222012 }
18232013 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
2014 if e1 != 0 {
2015 err = errnoErr(e1)
2016 }
2017 return
2018 }
2019
2020 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2021
2022 func Ustat(dev int, ubuf *Ustat_t) (err error) {
2023 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
18242024 if e1 != 0 {
18252025 err = errnoErr(e1)
18262026 }
20192219
20202220 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
20212221
2222 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
2223 var _p0 *byte
2224 _p0, err = BytePtrFromString(path)
2225 if err != nil {
2226 return
2227 }
2228 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
2229 if e1 != 0 {
2230 err = errnoErr(e1)
2231 }
2232 return
2233 }
2234
2235 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2236
20222237 func Gettimeofday(tv *Timeval) (err error) {
20232238 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
20242239 if e1 != 0 {
20442259
20452260 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
20462261
2262 func utimes(path string, times *[2]Timeval) (err error) {
2263 var _p0 *byte
2264 _p0, err = BytePtrFromString(path)
2265 if err != nil {
2266 return
2267 }
2268 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
2269 if e1 != 0 {
2270 err = errnoErr(e1)
2271 }
2272 return
2273 }
2274
2275 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2276
20472277 func pipe2(p *[2]_C_int, flags int) (err error) {
20482278 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
20492279 if e1 != 0 {
20562286
20572287 func fstat(fd int, st *stat_t) (err error) {
20582288 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0)
2289 if e1 != 0 {
2290 err = errnoErr(e1)
2291 }
2292 return
2293 }
2294
2295 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2296
2297 func fstatat(dirfd int, path string, st *stat_t, flags int) (err error) {
2298 var _p0 *byte
2299 _p0, err = BytePtrFromString(path)
2300 if err != nil {
2301 return
2302 }
2303 _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), uintptr(flags), 0, 0)
20592304 if e1 != 0 {
20602305 err = errnoErr(e1)
20612306 }
0 // mksyscall.pl -tags linux,mips64le syscall_linux.go syscall_linux_mips64x.go
0 // go run mksyscall.go -tags linux,mips64le syscall_linux.go syscall_linux_mips64x.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build linux,mips64le
142142
143143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
144144
145 func utimes(path string, times *[2]Timeval) (err error) {
146 var _p0 *byte
147 _p0, err = BytePtrFromString(path)
148 if err != nil {
149 return
150 }
151 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
152 if e1 != 0 {
153 err = errnoErr(e1)
154 }
155 return
156 }
157
158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
159
160145 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
161146 var _p0 *byte
162147 _p0, err = BytePtrFromString(path)
164149 return
165150 }
166151 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
167 if e1 != 0 {
168 err = errnoErr(e1)
169 }
170 return
171 }
172
173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
174
175 func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
176 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
177152 if e1 != 0 {
178153 err = errnoErr(e1)
179154 }
441416
442417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
443418
419 func ClockGetres(clockid int32, res *Timespec) (err error) {
420 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
421 if e1 != 0 {
422 err = errnoErr(e1)
423 }
424 return
425 }
426
427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
428
444429 func ClockGettime(clockid int32, time *Timespec) (err error) {
445430 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
431 if e1 != 0 {
432 err = errnoErr(e1)
433 }
434 return
435 }
436
437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
438
439 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
440 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
446441 if e1 != 0 {
447442 err = errnoErr(e1)
448443 }
472467
473468 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
474469
470 func DeleteModule(name string, flags int) (err error) {
471 var _p0 *byte
472 _p0, err = BytePtrFromString(name)
473 if err != nil {
474 return
475 }
476 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
477 if e1 != 0 {
478 err = errnoErr(e1)
479 }
480 return
481 }
482
483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
484
475485 func Dup(oldfd int) (fd int, err error) {
476486 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
477487 fd = int(r0)
493503
494504 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
495505
496 func EpollCreate(size int) (fd int, err error) {
497 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
498 fd = int(r0)
499 if e1 != 0 {
500 err = errnoErr(e1)
501 }
502 return
503 }
504
505 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
506
507506 func EpollCreate1(flag int) (fd int, err error) {
508507 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
509508 fd = int(r0)
537536 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
538537
539538 func Exit(code int) {
540 Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
541 return
542 }
543
544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545
546 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
547 var _p0 *byte
548 _p0, err = BytePtrFromString(path)
549 if err != nil {
550 return
551 }
552 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
553 if e1 != 0 {
554 err = errnoErr(e1)
555 }
539 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
556540 return
557541 }
558542
624608
625609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
626610
611 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
612 var _p0 *byte
613 _p0, err = BytePtrFromString(attr)
614 if err != nil {
615 return
616 }
617 var _p1 unsafe.Pointer
618 if len(dest) > 0 {
619 _p1 = unsafe.Pointer(&dest[0])
620 } else {
621 _p1 = unsafe.Pointer(&_zero)
622 }
623 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
624 sz = int(r0)
625 if e1 != 0 {
626 err = errnoErr(e1)
627 }
628 return
629 }
630
631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
632
633 func FinitModule(fd int, params string, flags int) (err error) {
634 var _p0 *byte
635 _p0, err = BytePtrFromString(params)
636 if err != nil {
637 return
638 }
639 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
640 if e1 != 0 {
641 err = errnoErr(e1)
642 }
643 return
644 }
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func Flistxattr(fd int, dest []byte) (sz int, err error) {
649 var _p0 unsafe.Pointer
650 if len(dest) > 0 {
651 _p0 = unsafe.Pointer(&dest[0])
652 } else {
653 _p0 = unsafe.Pointer(&_zero)
654 }
655 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
656 sz = int(r0)
657 if e1 != 0 {
658 err = errnoErr(e1)
659 }
660 return
661 }
662
663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
664
627665 func Flock(fd int, how int) (err error) {
628666 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
667 if e1 != 0 {
668 err = errnoErr(e1)
669 }
670 return
671 }
672
673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674
675 func Fremovexattr(fd int, attr string) (err error) {
676 var _p0 *byte
677 _p0, err = BytePtrFromString(attr)
678 if err != nil {
679 return
680 }
681 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
682 if e1 != 0 {
683 err = errnoErr(e1)
684 }
685 return
686 }
687
688 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
689
690 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
691 var _p0 *byte
692 _p0, err = BytePtrFromString(attr)
693 if err != nil {
694 return
695 }
696 var _p1 unsafe.Pointer
697 if len(dest) > 0 {
698 _p1 = unsafe.Pointer(&dest[0])
699 } else {
700 _p1 = unsafe.Pointer(&_zero)
701 }
702 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
629703 if e1 != 0 {
630704 err = errnoErr(e1)
631705 }
673747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674748
675749 func Getpid() (pid int) {
676 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
750 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
677751 pid = int(r0)
678752 return
679753 }
681755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
682756
683757 func Getppid() (ppid int) {
684 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
758 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
685759 ppid = int(r0)
686760 return
687761 }
738812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
739813
740814 func Gettid() (tid int) {
741 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
815 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
742816 tid = int(r0)
743817 return
744818 }
764838 }
765839 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
766840 sz = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func InitModule(moduleImage []byte, params string) (err error) {
850 var _p0 unsafe.Pointer
851 if len(moduleImage) > 0 {
852 _p0 = unsafe.Pointer(&moduleImage[0])
853 } else {
854 _p0 = unsafe.Pointer(&_zero)
855 }
856 var _p1 *byte
857 _p1, err = BytePtrFromString(params)
858 if err != nil {
859 return
860 }
861 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
767862 if e1 != 0 {
768863 err = errnoErr(e1)
769864 }
9541049
9551050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9561051
1052 func MemfdCreate(name string, flags int) (fd int, err error) {
1053 var _p0 *byte
1054 _p0, err = BytePtrFromString(name)
1055 if err != nil {
1056 return
1057 }
1058 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1059 fd = int(r0)
1060 if e1 != 0 {
1061 err = errnoErr(e1)
1062 }
1063 return
1064 }
1065
1066 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1067
9571068 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
9581069 var _p0 *byte
9591070 _p0, err = BytePtrFromString(path)
9861097
9871098 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
9881099 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1107
1108 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
1109 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
1110 fd = int(r0)
9891111 if e1 != 0 {
9901112 err = errnoErr(e1)
9911113 }
10821204
10831205 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10841206
1085 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1207 func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
10861208 var _p0 *byte
10871209 _p0, err = BytePtrFromString(oldpath)
10881210 if err != nil {
10931215 if err != nil {
10941216 return
10951217 }
1096 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1218 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
10971219 if e1 != 0 {
10981220 err = errnoErr(e1)
10991221 }
12371359
12381360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12391361
1362 func Signalfd(fd int, mask *Sigset_t, flags int) {
1363 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
1364 return
1365 }
1366
1367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1368
1369 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
1370 var _p0 *byte
1371 _p0, err = BytePtrFromString(path)
1372 if err != nil {
1373 return
1374 }
1375 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
12401384 func Sync() {
1241 Syscall(SYS_SYNC, 0, 0, 0)
1385 SyscallNoError(SYS_SYNC, 0, 0, 0)
12421386 return
12431387 }
12441388
12971441 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12981442
12991443 func Umask(mask int) (oldmask int) {
1300 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
1444 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
13011445 oldmask = int(r0)
13021446 return
13031447 }
13311475
13321476 func Unshare(flags int) (err error) {
13331477 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
1334 if e1 != 0 {
1335 err = errnoErr(e1)
1336 }
1337 return
1338 }
1339
1340 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1341
1342 func Ustat(dev int, ubuf *Ustat_t) (err error) {
1343 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
13441478 if e1 != 0 {
13451479 err = errnoErr(e1)
13461480 }
15081642
15091643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15101644
1645 func faccessat(dirfd int, path string, mode uint32) (err error) {
1646 var _p0 *byte
1647 _p0, err = BytePtrFromString(path)
1648 if err != nil {
1649 return
1650 }
1651 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1652 if e1 != 0 {
1653 err = errnoErr(e1)
1654 }
1655 return
1656 }
1657
1658 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1659
15111660 func Dup2(oldfd int, newfd int) (err error) {
15121661 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
1662 if e1 != 0 {
1663 err = errnoErr(e1)
1664 }
1665 return
1666 }
1667
1668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1669
1670 func EpollCreate(size int) (fd int, err error) {
1671 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
1672 fd = int(r0)
15131673 if e1 != 0 {
15141674 err = errnoErr(e1)
15151675 }
15351695
15361696 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15371697
1698 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
1699 _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
1700 if e1 != 0 {
1701 err = errnoErr(e1)
1702 }
1703 return
1704 }
1705
1706 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1707
15381708 func Fchown(fd int, uid int, gid int) (err error) {
15391709 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
15401710 if e1 != 0 {
15661736 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15671737
15681738 func Getegid() (egid int) {
1569 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
1739 r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
15701740 egid = int(r0)
15711741 return
15721742 }
15741744 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15751745
15761746 func Geteuid() (euid int) {
1577 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
1747 r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
15781748 euid = int(r0)
15791749 return
15801750 }
15821752 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15831753
15841754 func Getgid() (gid int) {
1585 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
1755 r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
15861756 gid = int(r0)
15871757 return
15881758 }
16001770 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16011771
16021772 func Getuid() (uid int) {
1603 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
1773 r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
16041774 uid = int(r0)
16051775 return
16061776 }
16761846
16771847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16781848
1849 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1850 var _p0 *byte
1851 _p0, err = BytePtrFromString(oldpath)
1852 if err != nil {
1853 return
1854 }
1855 var _p1 *byte
1856 _p1, err = BytePtrFromString(newpath)
1857 if err != nil {
1858 return
1859 }
1860 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1861 if e1 != 0 {
1862 err = errnoErr(e1)
1863 }
1864 return
1865 }
1866
1867 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1868
16791869 func Seek(fd int, offset int64, whence int) (off int64, err error) {
16801870 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
16811871 off = int64(r0)
18212011 return
18222012 }
18232013 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
2014 if e1 != 0 {
2015 err = errnoErr(e1)
2016 }
2017 return
2018 }
2019
2020 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2021
2022 func Ustat(dev int, ubuf *Ustat_t) (err error) {
2023 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
18242024 if e1 != 0 {
18252025 err = errnoErr(e1)
18262026 }
20192219
20202220 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
20212221
2222 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
2223 var _p0 *byte
2224 _p0, err = BytePtrFromString(path)
2225 if err != nil {
2226 return
2227 }
2228 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
2229 if e1 != 0 {
2230 err = errnoErr(e1)
2231 }
2232 return
2233 }
2234
2235 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2236
20222237 func Gettimeofday(tv *Timeval) (err error) {
20232238 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
20242239 if e1 != 0 {
20442259
20452260 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
20462261
2262 func utimes(path string, times *[2]Timeval) (err error) {
2263 var _p0 *byte
2264 _p0, err = BytePtrFromString(path)
2265 if err != nil {
2266 return
2267 }
2268 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
2269 if e1 != 0 {
2270 err = errnoErr(e1)
2271 }
2272 return
2273 }
2274
2275 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2276
20472277 func pipe2(p *[2]_C_int, flags int) (err error) {
20482278 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
20492279 if e1 != 0 {
20562286
20572287 func fstat(fd int, st *stat_t) (err error) {
20582288 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0)
2289 if e1 != 0 {
2290 err = errnoErr(e1)
2291 }
2292 return
2293 }
2294
2295 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2296
2297 func fstatat(dirfd int, path string, st *stat_t, flags int) (err error) {
2298 var _p0 *byte
2299 _p0, err = BytePtrFromString(path)
2300 if err != nil {
2301 return
2302 }
2303 _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), uintptr(flags), 0, 0)
20592304 if e1 != 0 {
20602305 err = errnoErr(e1)
20612306 }
0 // mksyscall.pl -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go
0 // go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build linux,mipsle
142142
143143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
144144
145 func utimes(path string, times *[2]Timeval) (err error) {
146 var _p0 *byte
147 _p0, err = BytePtrFromString(path)
148 if err != nil {
149 return
150 }
151 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
152 if e1 != 0 {
153 err = errnoErr(e1)
154 }
155 return
156 }
157
158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
159
160145 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
161146 var _p0 *byte
162147 _p0, err = BytePtrFromString(path)
164149 return
165150 }
166151 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
167 if e1 != 0 {
168 err = errnoErr(e1)
169 }
170 return
171 }
172
173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
174
175 func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
176 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
177152 if e1 != 0 {
178153 err = errnoErr(e1)
179154 }
441416
442417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
443418
419 func ClockGetres(clockid int32, res *Timespec) (err error) {
420 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
421 if e1 != 0 {
422 err = errnoErr(e1)
423 }
424 return
425 }
426
427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
428
444429 func ClockGettime(clockid int32, time *Timespec) (err error) {
445430 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
431 if e1 != 0 {
432 err = errnoErr(e1)
433 }
434 return
435 }
436
437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
438
439 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
440 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
446441 if e1 != 0 {
447442 err = errnoErr(e1)
448443 }
472467
473468 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
474469
470 func DeleteModule(name string, flags int) (err error) {
471 var _p0 *byte
472 _p0, err = BytePtrFromString(name)
473 if err != nil {
474 return
475 }
476 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
477 if e1 != 0 {
478 err = errnoErr(e1)
479 }
480 return
481 }
482
483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
484
475485 func Dup(oldfd int) (fd int, err error) {
476486 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
477487 fd = int(r0)
493503
494504 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
495505
496 func EpollCreate(size int) (fd int, err error) {
497 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
498 fd = int(r0)
499 if e1 != 0 {
500 err = errnoErr(e1)
501 }
502 return
503 }
504
505 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
506
507506 func EpollCreate1(flag int) (fd int, err error) {
508507 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
509508 fd = int(r0)
537536 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
538537
539538 func Exit(code int) {
540 Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
541 return
542 }
543
544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545
546 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
547 var _p0 *byte
548 _p0, err = BytePtrFromString(path)
549 if err != nil {
550 return
551 }
552 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
553 if e1 != 0 {
554 err = errnoErr(e1)
555 }
539 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
556540 return
557541 }
558542
624608
625609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
626610
611 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
612 var _p0 *byte
613 _p0, err = BytePtrFromString(attr)
614 if err != nil {
615 return
616 }
617 var _p1 unsafe.Pointer
618 if len(dest) > 0 {
619 _p1 = unsafe.Pointer(&dest[0])
620 } else {
621 _p1 = unsafe.Pointer(&_zero)
622 }
623 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
624 sz = int(r0)
625 if e1 != 0 {
626 err = errnoErr(e1)
627 }
628 return
629 }
630
631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
632
633 func FinitModule(fd int, params string, flags int) (err error) {
634 var _p0 *byte
635 _p0, err = BytePtrFromString(params)
636 if err != nil {
637 return
638 }
639 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
640 if e1 != 0 {
641 err = errnoErr(e1)
642 }
643 return
644 }
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func Flistxattr(fd int, dest []byte) (sz int, err error) {
649 var _p0 unsafe.Pointer
650 if len(dest) > 0 {
651 _p0 = unsafe.Pointer(&dest[0])
652 } else {
653 _p0 = unsafe.Pointer(&_zero)
654 }
655 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
656 sz = int(r0)
657 if e1 != 0 {
658 err = errnoErr(e1)
659 }
660 return
661 }
662
663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
664
627665 func Flock(fd int, how int) (err error) {
628666 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
667 if e1 != 0 {
668 err = errnoErr(e1)
669 }
670 return
671 }
672
673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674
675 func Fremovexattr(fd int, attr string) (err error) {
676 var _p0 *byte
677 _p0, err = BytePtrFromString(attr)
678 if err != nil {
679 return
680 }
681 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
682 if e1 != 0 {
683 err = errnoErr(e1)
684 }
685 return
686 }
687
688 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
689
690 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
691 var _p0 *byte
692 _p0, err = BytePtrFromString(attr)
693 if err != nil {
694 return
695 }
696 var _p1 unsafe.Pointer
697 if len(dest) > 0 {
698 _p1 = unsafe.Pointer(&dest[0])
699 } else {
700 _p1 = unsafe.Pointer(&_zero)
701 }
702 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
629703 if e1 != 0 {
630704 err = errnoErr(e1)
631705 }
673747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674748
675749 func Getpid() (pid int) {
676 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
750 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
677751 pid = int(r0)
678752 return
679753 }
681755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
682756
683757 func Getppid() (ppid int) {
684 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
758 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
685759 ppid = int(r0)
686760 return
687761 }
738812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
739813
740814 func Gettid() (tid int) {
741 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
815 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
742816 tid = int(r0)
743817 return
744818 }
764838 }
765839 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
766840 sz = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func InitModule(moduleImage []byte, params string) (err error) {
850 var _p0 unsafe.Pointer
851 if len(moduleImage) > 0 {
852 _p0 = unsafe.Pointer(&moduleImage[0])
853 } else {
854 _p0 = unsafe.Pointer(&_zero)
855 }
856 var _p1 *byte
857 _p1, err = BytePtrFromString(params)
858 if err != nil {
859 return
860 }
861 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
767862 if e1 != 0 {
768863 err = errnoErr(e1)
769864 }
9541049
9551050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9561051
1052 func MemfdCreate(name string, flags int) (fd int, err error) {
1053 var _p0 *byte
1054 _p0, err = BytePtrFromString(name)
1055 if err != nil {
1056 return
1057 }
1058 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1059 fd = int(r0)
1060 if e1 != 0 {
1061 err = errnoErr(e1)
1062 }
1063 return
1064 }
1065
1066 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1067
9571068 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
9581069 var _p0 *byte
9591070 _p0, err = BytePtrFromString(path)
9861097
9871098 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
9881099 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1107
1108 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
1109 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
1110 fd = int(r0)
9891111 if e1 != 0 {
9901112 err = errnoErr(e1)
9911113 }
10821204
10831205 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10841206
1085 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1207 func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
10861208 var _p0 *byte
10871209 _p0, err = BytePtrFromString(oldpath)
10881210 if err != nil {
10931215 if err != nil {
10941216 return
10951217 }
1096 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1218 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
10971219 if e1 != 0 {
10981220 err = errnoErr(e1)
10991221 }
12371359
12381360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12391361
1362 func Signalfd(fd int, mask *Sigset_t, flags int) {
1363 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
1364 return
1365 }
1366
1367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1368
1369 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
1370 var _p0 *byte
1371 _p0, err = BytePtrFromString(path)
1372 if err != nil {
1373 return
1374 }
1375 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
12401384 func Sync() {
1241 Syscall(SYS_SYNC, 0, 0, 0)
1385 SyscallNoError(SYS_SYNC, 0, 0, 0)
12421386 return
12431387 }
12441388
12971441 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12981442
12991443 func Umask(mask int) (oldmask int) {
1300 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
1444 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
13011445 oldmask = int(r0)
13021446 return
13031447 }
13311475
13321476 func Unshare(flags int) (err error) {
13331477 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
1334 if e1 != 0 {
1335 err = errnoErr(e1)
1336 }
1337 return
1338 }
1339
1340 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1341
1342 func Ustat(dev int, ubuf *Ustat_t) (err error) {
1343 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
13441478 if e1 != 0 {
13451479 err = errnoErr(e1)
13461480 }
15081642
15091643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15101644
1645 func faccessat(dirfd int, path string, mode uint32) (err error) {
1646 var _p0 *byte
1647 _p0, err = BytePtrFromString(path)
1648 if err != nil {
1649 return
1650 }
1651 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1652 if e1 != 0 {
1653 err = errnoErr(e1)
1654 }
1655 return
1656 }
1657
1658 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1659
15111660 func Dup2(oldfd int, newfd int) (err error) {
15121661 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
15131662 if e1 != 0 {
15181667
15191668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15201669
1670 func EpollCreate(size int) (fd int, err error) {
1671 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
1672 fd = int(r0)
1673 if e1 != 0 {
1674 err = errnoErr(e1)
1675 }
1676 return
1677 }
1678
1679 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1680
1681 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
1682 var _p0 unsafe.Pointer
1683 if len(events) > 0 {
1684 _p0 = unsafe.Pointer(&events[0])
1685 } else {
1686 _p0 = unsafe.Pointer(&_zero)
1687 }
1688 r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
1689 n = int(r0)
1690 if e1 != 0 {
1691 err = errnoErr(e1)
1692 }
1693 return
1694 }
1695
1696 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1697
1698 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
1699 _, _, e1 := Syscall9(SYS_FADVISE64, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice), 0, 0)
1700 if e1 != 0 {
1701 err = errnoErr(e1)
1702 }
1703 return
1704 }
1705
1706 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1707
15211708 func Fchown(fd int, uid int, gid int) (err error) {
15221709 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
15231710 if e1 != 0 {
15391726 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15401727
15411728 func Getegid() (egid int) {
1542 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
1729 r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
15431730 egid = int(r0)
15441731 return
15451732 }
15471734 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15481735
15491736 func Geteuid() (euid int) {
1550 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
1737 r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
15511738 euid = int(r0)
15521739 return
15531740 }
15551742 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15561743
15571744 func Getgid() (gid int) {
1558 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
1745 r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
15591746 gid = int(r0)
15601747 return
15611748 }
15631750 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15641751
15651752 func Getuid() (uid int) {
1566 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
1753 r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
15671754 uid = int(r0)
15681755 return
15691756 }
16291816
16301817 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16311818
1819 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1820 var _p0 *byte
1821 _p0, err = BytePtrFromString(oldpath)
1822 if err != nil {
1823 return
1824 }
1825 var _p1 *byte
1826 _p1, err = BytePtrFromString(newpath)
1827 if err != nil {
1828 return
1829 }
1830 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1831 if e1 != 0 {
1832 err = errnoErr(e1)
1833 }
1834 return
1835 }
1836
1837 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1838
16321839 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
16331840 r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
16341841 n = int(r0)
17211928
17221929 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
17231930
1724 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
1725 r0, r1, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
1726 n = int64(int64(r1)<<32 | int64(r0))
1931 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
1932 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
1933 n = int(r0)
17271934 if e1 != 0 {
17281935 err = errnoErr(e1)
17291936 }
17491956 return
17501957 }
17511958 _, _, e1 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
1959 if e1 != 0 {
1960 err = errnoErr(e1)
1961 }
1962 return
1963 }
1964
1965 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1966
1967 func Ustat(dev int, ubuf *Ustat_t) (err error) {
1968 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
17521969 if e1 != 0 {
17531970 err = errnoErr(e1)
17541971 }
19672184
19682185 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
19692186
2187 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
2188 var _p0 *byte
2189 _p0, err = BytePtrFromString(path)
2190 if err != nil {
2191 return
2192 }
2193 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
2194 if e1 != 0 {
2195 err = errnoErr(e1)
2196 }
2197 return
2198 }
2199
2200 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2201
19702202 func Gettimeofday(tv *Timeval) (err error) {
19712203 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
19722204 if e1 != 0 {
19882220
19892221 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
19902222
2223 func Utime(path string, buf *Utimbuf) (err error) {
2224 var _p0 *byte
2225 _p0, err = BytePtrFromString(path)
2226 if err != nil {
2227 return
2228 }
2229 _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
2230 if e1 != 0 {
2231 err = errnoErr(e1)
2232 }
2233 return
2234 }
2235
2236 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2237
2238 func utimes(path string, times *[2]Timeval) (err error) {
2239 var _p0 *byte
2240 _p0, err = BytePtrFromString(path)
2241 if err != nil {
2242 return
2243 }
2244 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
2245 if e1 != 0 {
2246 err = errnoErr(e1)
2247 }
2248 return
2249 }
2250
2251 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2252
19912253 func Lstat(path string, stat *Stat_t) (err error) {
19922254 var _p0 *byte
19932255 _p0, err = BytePtrFromString(path)
20132275
20142276 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
20152277
2278 func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
2279 var _p0 *byte
2280 _p0, err = BytePtrFromString(path)
2281 if err != nil {
2282 return
2283 }
2284 _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
2285 if e1 != 0 {
2286 err = errnoErr(e1)
2287 }
2288 return
2289 }
2290
2291 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2292
20162293 func Stat(path string, stat *Stat_t) (err error) {
20172294 var _p0 *byte
20182295 _p0, err = BytePtrFromString(path)
20202297 return
20212298 }
20222299 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2023 if e1 != 0 {
2024 err = errnoErr(e1)
2025 }
2026 return
2027 }
2028
2029 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2030
2031 func Utime(path string, buf *Utimbuf) (err error) {
2032 var _p0 *byte
2033 _p0, err = BytePtrFromString(path)
2034 if err != nil {
2035 return
2036 }
2037 _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
2038 if e1 != 0 {
2039 err = errnoErr(e1)
2040 }
2041 return
2042 }
2043
2044 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2045
2046 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
2047 var _p0 unsafe.Pointer
2048 if len(events) > 0 {
2049 _p0 = unsafe.Pointer(&events[0])
2050 } else {
2051 _p0 = unsafe.Pointer(&_zero)
2052 }
2053 r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
2054 n = int(r0)
20552300 if e1 != 0 {
20562301 err = errnoErr(e1)
20572302 }
20722317
20732318 func pipe2(p *[2]_C_int, flags int) (err error) {
20742319 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
2320 if e1 != 0 {
2321 err = errnoErr(e1)
2322 }
2323 return
2324 }
2325
2326 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2327
2328 func pipe() (p1 int, p2 int, err error) {
2329 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
2330 p1 = int(r0)
2331 p2 = int(r1)
20752332 if e1 != 0 {
20762333 err = errnoErr(e1)
20772334 }
0 // mksyscall.pl -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go
0 // go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build linux,ppc64
142142
143143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
144144
145 func utimes(path string, times *[2]Timeval) (err error) {
146 var _p0 *byte
147 _p0, err = BytePtrFromString(path)
148 if err != nil {
149 return
150 }
151 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
152 if e1 != 0 {
153 err = errnoErr(e1)
154 }
155 return
156 }
157
158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
159
160145 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
161146 var _p0 *byte
162147 _p0, err = BytePtrFromString(path)
164149 return
165150 }
166151 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
167 if e1 != 0 {
168 err = errnoErr(e1)
169 }
170 return
171 }
172
173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
174
175 func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
176 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
177152 if e1 != 0 {
178153 err = errnoErr(e1)
179154 }
441416
442417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
443418
419 func ClockGetres(clockid int32, res *Timespec) (err error) {
420 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
421 if e1 != 0 {
422 err = errnoErr(e1)
423 }
424 return
425 }
426
427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
428
444429 func ClockGettime(clockid int32, time *Timespec) (err error) {
445430 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
431 if e1 != 0 {
432 err = errnoErr(e1)
433 }
434 return
435 }
436
437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
438
439 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
440 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
446441 if e1 != 0 {
447442 err = errnoErr(e1)
448443 }
472467
473468 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
474469
470 func DeleteModule(name string, flags int) (err error) {
471 var _p0 *byte
472 _p0, err = BytePtrFromString(name)
473 if err != nil {
474 return
475 }
476 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
477 if e1 != 0 {
478 err = errnoErr(e1)
479 }
480 return
481 }
482
483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
484
475485 func Dup(oldfd int) (fd int, err error) {
476486 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
477487 fd = int(r0)
493503
494504 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
495505
496 func EpollCreate(size int) (fd int, err error) {
497 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
498 fd = int(r0)
499 if e1 != 0 {
500 err = errnoErr(e1)
501 }
502 return
503 }
504
505 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
506
507506 func EpollCreate1(flag int) (fd int, err error) {
508507 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
509508 fd = int(r0)
537536 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
538537
539538 func Exit(code int) {
540 Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
541 return
542 }
543
544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545
546 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
547 var _p0 *byte
548 _p0, err = BytePtrFromString(path)
549 if err != nil {
550 return
551 }
552 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
553 if e1 != 0 {
554 err = errnoErr(e1)
555 }
539 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
556540 return
557541 }
558542
624608
625609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
626610
611 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
612 var _p0 *byte
613 _p0, err = BytePtrFromString(attr)
614 if err != nil {
615 return
616 }
617 var _p1 unsafe.Pointer
618 if len(dest) > 0 {
619 _p1 = unsafe.Pointer(&dest[0])
620 } else {
621 _p1 = unsafe.Pointer(&_zero)
622 }
623 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
624 sz = int(r0)
625 if e1 != 0 {
626 err = errnoErr(e1)
627 }
628 return
629 }
630
631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
632
633 func FinitModule(fd int, params string, flags int) (err error) {
634 var _p0 *byte
635 _p0, err = BytePtrFromString(params)
636 if err != nil {
637 return
638 }
639 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
640 if e1 != 0 {
641 err = errnoErr(e1)
642 }
643 return
644 }
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func Flistxattr(fd int, dest []byte) (sz int, err error) {
649 var _p0 unsafe.Pointer
650 if len(dest) > 0 {
651 _p0 = unsafe.Pointer(&dest[0])
652 } else {
653 _p0 = unsafe.Pointer(&_zero)
654 }
655 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
656 sz = int(r0)
657 if e1 != 0 {
658 err = errnoErr(e1)
659 }
660 return
661 }
662
663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
664
627665 func Flock(fd int, how int) (err error) {
628666 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
667 if e1 != 0 {
668 err = errnoErr(e1)
669 }
670 return
671 }
672
673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674
675 func Fremovexattr(fd int, attr string) (err error) {
676 var _p0 *byte
677 _p0, err = BytePtrFromString(attr)
678 if err != nil {
679 return
680 }
681 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
682 if e1 != 0 {
683 err = errnoErr(e1)
684 }
685 return
686 }
687
688 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
689
690 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
691 var _p0 *byte
692 _p0, err = BytePtrFromString(attr)
693 if err != nil {
694 return
695 }
696 var _p1 unsafe.Pointer
697 if len(dest) > 0 {
698 _p1 = unsafe.Pointer(&dest[0])
699 } else {
700 _p1 = unsafe.Pointer(&_zero)
701 }
702 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
629703 if e1 != 0 {
630704 err = errnoErr(e1)
631705 }
673747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674748
675749 func Getpid() (pid int) {
676 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
750 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
677751 pid = int(r0)
678752 return
679753 }
681755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
682756
683757 func Getppid() (ppid int) {
684 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
758 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
685759 ppid = int(r0)
686760 return
687761 }
738812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
739813
740814 func Gettid() (tid int) {
741 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
815 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
742816 tid = int(r0)
743817 return
744818 }
764838 }
765839 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
766840 sz = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func InitModule(moduleImage []byte, params string) (err error) {
850 var _p0 unsafe.Pointer
851 if len(moduleImage) > 0 {
852 _p0 = unsafe.Pointer(&moduleImage[0])
853 } else {
854 _p0 = unsafe.Pointer(&_zero)
855 }
856 var _p1 *byte
857 _p1, err = BytePtrFromString(params)
858 if err != nil {
859 return
860 }
861 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
767862 if e1 != 0 {
768863 err = errnoErr(e1)
769864 }
9541049
9551050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9561051
1052 func MemfdCreate(name string, flags int) (fd int, err error) {
1053 var _p0 *byte
1054 _p0, err = BytePtrFromString(name)
1055 if err != nil {
1056 return
1057 }
1058 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1059 fd = int(r0)
1060 if e1 != 0 {
1061 err = errnoErr(e1)
1062 }
1063 return
1064 }
1065
1066 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1067
9571068 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
9581069 var _p0 *byte
9591070 _p0, err = BytePtrFromString(path)
9861097
9871098 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
9881099 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1107
1108 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
1109 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
1110 fd = int(r0)
9891111 if e1 != 0 {
9901112 err = errnoErr(e1)
9911113 }
10821204
10831205 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10841206
1085 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1207 func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
10861208 var _p0 *byte
10871209 _p0, err = BytePtrFromString(oldpath)
10881210 if err != nil {
10931215 if err != nil {
10941216 return
10951217 }
1096 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1218 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
10971219 if e1 != 0 {
10981220 err = errnoErr(e1)
10991221 }
12371359
12381360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12391361
1362 func Signalfd(fd int, mask *Sigset_t, flags int) {
1363 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
1364 return
1365 }
1366
1367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1368
1369 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
1370 var _p0 *byte
1371 _p0, err = BytePtrFromString(path)
1372 if err != nil {
1373 return
1374 }
1375 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
12401384 func Sync() {
1241 Syscall(SYS_SYNC, 0, 0, 0)
1385 SyscallNoError(SYS_SYNC, 0, 0, 0)
12421386 return
12431387 }
12441388
12971441 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12981442
12991443 func Umask(mask int) (oldmask int) {
1300 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
1444 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
13011445 oldmask = int(r0)
13021446 return
13031447 }
13311475
13321476 func Unshare(flags int) (err error) {
13331477 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
1334 if e1 != 0 {
1335 err = errnoErr(e1)
1336 }
1337 return
1338 }
1339
1340 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1341
1342 func Ustat(dev int, ubuf *Ustat_t) (err error) {
1343 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
13441478 if e1 != 0 {
13451479 err = errnoErr(e1)
13461480 }
15081642
15091643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15101644
1645 func faccessat(dirfd int, path string, mode uint32) (err error) {
1646 var _p0 *byte
1647 _p0, err = BytePtrFromString(path)
1648 if err != nil {
1649 return
1650 }
1651 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1652 if e1 != 0 {
1653 err = errnoErr(e1)
1654 }
1655 return
1656 }
1657
1658 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1659
1660 func Dup2(oldfd int, newfd int) (err error) {
1661 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
1662 if e1 != 0 {
1663 err = errnoErr(e1)
1664 }
1665 return
1666 }
1667
1668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1669
1670 func EpollCreate(size int) (fd int, err error) {
1671 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
1672 fd = int(r0)
1673 if e1 != 0 {
1674 err = errnoErr(e1)
1675 }
1676 return
1677 }
1678
1679 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1680
15111681 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
15121682 var _p0 unsafe.Pointer
15131683 if len(events) > 0 {
15251695
15261696 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15271697
1528 func Dup2(oldfd int, newfd int) (err error) {
1529 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
1698 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
1699 _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
15301700 if e1 != 0 {
15311701 err = errnoErr(e1)
15321702 }
15551725
15561726 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15571727
1728 func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
1729 var _p0 *byte
1730 _p0, err = BytePtrFromString(path)
1731 if err != nil {
1732 return
1733 }
1734 _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
1735 if e1 != 0 {
1736 err = errnoErr(e1)
1737 }
1738 return
1739 }
1740
1741 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1742
15581743 func Fstatfs(fd int, buf *Statfs_t) (err error) {
15591744 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
15601745 if e1 != 0 {
15761761 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15771762
15781763 func Getegid() (egid int) {
1579 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
1764 r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
15801765 egid = int(r0)
15811766 return
15821767 }
15841769 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15851770
15861771 func Geteuid() (euid int) {
1587 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
1772 r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
15881773 euid = int(r0)
15891774 return
15901775 }
15921777 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15931778
15941779 func Getgid() (gid int) {
1595 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
1780 r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
15961781 gid = int(r0)
15971782 return
15981783 }
16101795 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16111796
16121797 func Getuid() (uid int) {
1613 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
1798 r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
16141799 uid = int(r0)
16151800 return
16161801 }
17321917
17331918 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
17341919
1920 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1921 var _p0 *byte
1922 _p0, err = BytePtrFromString(oldpath)
1923 if err != nil {
1924 return
1925 }
1926 var _p1 *byte
1927 _p1, err = BytePtrFromString(newpath)
1928 if err != nil {
1929 return
1930 }
1931 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1932 if e1 != 0 {
1933 err = errnoErr(e1)
1934 }
1935 return
1936 }
1937
1938 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1939
17351940 func Seek(fd int, offset int64, whence int) (off int64, err error) {
17361941 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
17371942 off = int64(r0)
18862091
18872092 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
18882093
1889 func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
1890 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
1891 if e1 != 0 {
1892 err = errnoErr(e1)
1893 }
1894 return
1895 }
1896
1897 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1898
18992094 func Truncate(path string, length int64) (err error) {
19002095 var _p0 *byte
19012096 _p0, err = BytePtrFromString(path)
19032098 return
19042099 }
19052100 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
2101 if e1 != 0 {
2102 err = errnoErr(e1)
2103 }
2104 return
2105 }
2106
2107 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2108
2109 func Ustat(dev int, ubuf *Ustat_t) (err error) {
2110 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
19062111 if e1 != 0 {
19072112 err = errnoErr(e1)
19082113 }
21012306
21022307 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
21032308
2309 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
2310 var _p0 *byte
2311 _p0, err = BytePtrFromString(path)
2312 if err != nil {
2313 return
2314 }
2315 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
2316 if e1 != 0 {
2317 err = errnoErr(e1)
2318 }
2319 return
2320 }
2321
2322 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2323
21042324 func Gettimeofday(tv *Timeval) (err error) {
21052325 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
21062326 if e1 != 0 {
21372357
21382358 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
21392359
2360 func utimes(path string, times *[2]Timeval) (err error) {
2361 var _p0 *byte
2362 _p0, err = BytePtrFromString(path)
2363 if err != nil {
2364 return
2365 }
2366 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
2367 if e1 != 0 {
2368 err = errnoErr(e1)
2369 }
2370 return
2371 }
2372
2373 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2374
21402375 func pipe(p *[2]_C_int) (err error) {
21412376 _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
21422377 if e1 != 0 {
21652400 }
21662401 return
21672402 }
2403
2404 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2405
2406 func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
2407 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
2408 if e1 != 0 {
2409 err = errnoErr(e1)
2410 }
2411 return
2412 }
2413
2414 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2415
2416 func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
2417 var _p0 *byte
2418 _p0, err = BytePtrFromString(cmdline)
2419 if err != nil {
2420 return
2421 }
2422 _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
2423 if e1 != 0 {
2424 err = errnoErr(e1)
2425 }
2426 return
2427 }
0 // mksyscall.pl -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go
0 // go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build linux,ppc64le
142142
143143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
144144
145 func utimes(path string, times *[2]Timeval) (err error) {
146 var _p0 *byte
147 _p0, err = BytePtrFromString(path)
148 if err != nil {
149 return
150 }
151 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
152 if e1 != 0 {
153 err = errnoErr(e1)
154 }
155 return
156 }
157
158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
159
160145 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
161146 var _p0 *byte
162147 _p0, err = BytePtrFromString(path)
164149 return
165150 }
166151 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
167 if e1 != 0 {
168 err = errnoErr(e1)
169 }
170 return
171 }
172
173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
174
175 func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
176 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
177152 if e1 != 0 {
178153 err = errnoErr(e1)
179154 }
441416
442417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
443418
419 func ClockGetres(clockid int32, res *Timespec) (err error) {
420 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
421 if e1 != 0 {
422 err = errnoErr(e1)
423 }
424 return
425 }
426
427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
428
444429 func ClockGettime(clockid int32, time *Timespec) (err error) {
445430 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
431 if e1 != 0 {
432 err = errnoErr(e1)
433 }
434 return
435 }
436
437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
438
439 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
440 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
446441 if e1 != 0 {
447442 err = errnoErr(e1)
448443 }
472467
473468 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
474469
470 func DeleteModule(name string, flags int) (err error) {
471 var _p0 *byte
472 _p0, err = BytePtrFromString(name)
473 if err != nil {
474 return
475 }
476 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
477 if e1 != 0 {
478 err = errnoErr(e1)
479 }
480 return
481 }
482
483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
484
475485 func Dup(oldfd int) (fd int, err error) {
476486 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
477487 fd = int(r0)
493503
494504 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
495505
496 func EpollCreate(size int) (fd int, err error) {
497 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
498 fd = int(r0)
499 if e1 != 0 {
500 err = errnoErr(e1)
501 }
502 return
503 }
504
505 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
506
507506 func EpollCreate1(flag int) (fd int, err error) {
508507 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
509508 fd = int(r0)
537536 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
538537
539538 func Exit(code int) {
540 Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
541 return
542 }
543
544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545
546 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
547 var _p0 *byte
548 _p0, err = BytePtrFromString(path)
549 if err != nil {
550 return
551 }
552 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
553 if e1 != 0 {
554 err = errnoErr(e1)
555 }
539 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
556540 return
557541 }
558542
624608
625609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
626610
611 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
612 var _p0 *byte
613 _p0, err = BytePtrFromString(attr)
614 if err != nil {
615 return
616 }
617 var _p1 unsafe.Pointer
618 if len(dest) > 0 {
619 _p1 = unsafe.Pointer(&dest[0])
620 } else {
621 _p1 = unsafe.Pointer(&_zero)
622 }
623 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
624 sz = int(r0)
625 if e1 != 0 {
626 err = errnoErr(e1)
627 }
628 return
629 }
630
631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
632
633 func FinitModule(fd int, params string, flags int) (err error) {
634 var _p0 *byte
635 _p0, err = BytePtrFromString(params)
636 if err != nil {
637 return
638 }
639 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
640 if e1 != 0 {
641 err = errnoErr(e1)
642 }
643 return
644 }
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func Flistxattr(fd int, dest []byte) (sz int, err error) {
649 var _p0 unsafe.Pointer
650 if len(dest) > 0 {
651 _p0 = unsafe.Pointer(&dest[0])
652 } else {
653 _p0 = unsafe.Pointer(&_zero)
654 }
655 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
656 sz = int(r0)
657 if e1 != 0 {
658 err = errnoErr(e1)
659 }
660 return
661 }
662
663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
664
627665 func Flock(fd int, how int) (err error) {
628666 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
667 if e1 != 0 {
668 err = errnoErr(e1)
669 }
670 return
671 }
672
673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674
675 func Fremovexattr(fd int, attr string) (err error) {
676 var _p0 *byte
677 _p0, err = BytePtrFromString(attr)
678 if err != nil {
679 return
680 }
681 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
682 if e1 != 0 {
683 err = errnoErr(e1)
684 }
685 return
686 }
687
688 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
689
690 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
691 var _p0 *byte
692 _p0, err = BytePtrFromString(attr)
693 if err != nil {
694 return
695 }
696 var _p1 unsafe.Pointer
697 if len(dest) > 0 {
698 _p1 = unsafe.Pointer(&dest[0])
699 } else {
700 _p1 = unsafe.Pointer(&_zero)
701 }
702 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
629703 if e1 != 0 {
630704 err = errnoErr(e1)
631705 }
673747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674748
675749 func Getpid() (pid int) {
676 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
750 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
677751 pid = int(r0)
678752 return
679753 }
681755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
682756
683757 func Getppid() (ppid int) {
684 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
758 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
685759 ppid = int(r0)
686760 return
687761 }
738812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
739813
740814 func Gettid() (tid int) {
741 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
815 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
742816 tid = int(r0)
743817 return
744818 }
764838 }
765839 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
766840 sz = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func InitModule(moduleImage []byte, params string) (err error) {
850 var _p0 unsafe.Pointer
851 if len(moduleImage) > 0 {
852 _p0 = unsafe.Pointer(&moduleImage[0])
853 } else {
854 _p0 = unsafe.Pointer(&_zero)
855 }
856 var _p1 *byte
857 _p1, err = BytePtrFromString(params)
858 if err != nil {
859 return
860 }
861 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
767862 if e1 != 0 {
768863 err = errnoErr(e1)
769864 }
9541049
9551050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9561051
1052 func MemfdCreate(name string, flags int) (fd int, err error) {
1053 var _p0 *byte
1054 _p0, err = BytePtrFromString(name)
1055 if err != nil {
1056 return
1057 }
1058 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1059 fd = int(r0)
1060 if e1 != 0 {
1061 err = errnoErr(e1)
1062 }
1063 return
1064 }
1065
1066 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1067
9571068 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
9581069 var _p0 *byte
9591070 _p0, err = BytePtrFromString(path)
9861097
9871098 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
9881099 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1107
1108 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
1109 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
1110 fd = int(r0)
9891111 if e1 != 0 {
9901112 err = errnoErr(e1)
9911113 }
10821204
10831205 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10841206
1085 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1207 func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
10861208 var _p0 *byte
10871209 _p0, err = BytePtrFromString(oldpath)
10881210 if err != nil {
10931215 if err != nil {
10941216 return
10951217 }
1096 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1218 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
10971219 if e1 != 0 {
10981220 err = errnoErr(e1)
10991221 }
12371359
12381360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12391361
1362 func Signalfd(fd int, mask *Sigset_t, flags int) {
1363 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
1364 return
1365 }
1366
1367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1368
1369 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
1370 var _p0 *byte
1371 _p0, err = BytePtrFromString(path)
1372 if err != nil {
1373 return
1374 }
1375 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
12401384 func Sync() {
1241 Syscall(SYS_SYNC, 0, 0, 0)
1385 SyscallNoError(SYS_SYNC, 0, 0, 0)
12421386 return
12431387 }
12441388
12971441 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12981442
12991443 func Umask(mask int) (oldmask int) {
1300 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
1444 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
13011445 oldmask = int(r0)
13021446 return
13031447 }
13311475
13321476 func Unshare(flags int) (err error) {
13331477 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
1334 if e1 != 0 {
1335 err = errnoErr(e1)
1336 }
1337 return
1338 }
1339
1340 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1341
1342 func Ustat(dev int, ubuf *Ustat_t) (err error) {
1343 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
13441478 if e1 != 0 {
13451479 err = errnoErr(e1)
13461480 }
15081642
15091643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15101644
1645 func faccessat(dirfd int, path string, mode uint32) (err error) {
1646 var _p0 *byte
1647 _p0, err = BytePtrFromString(path)
1648 if err != nil {
1649 return
1650 }
1651 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1652 if e1 != 0 {
1653 err = errnoErr(e1)
1654 }
1655 return
1656 }
1657
1658 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1659
1660 func Dup2(oldfd int, newfd int) (err error) {
1661 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
1662 if e1 != 0 {
1663 err = errnoErr(e1)
1664 }
1665 return
1666 }
1667
1668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1669
1670 func EpollCreate(size int) (fd int, err error) {
1671 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
1672 fd = int(r0)
1673 if e1 != 0 {
1674 err = errnoErr(e1)
1675 }
1676 return
1677 }
1678
1679 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1680
15111681 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
15121682 var _p0 unsafe.Pointer
15131683 if len(events) > 0 {
15251695
15261696 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15271697
1528 func Dup2(oldfd int, newfd int) (err error) {
1529 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
1698 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
1699 _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
15301700 if e1 != 0 {
15311701 err = errnoErr(e1)
15321702 }
15551725
15561726 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15571727
1728 func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
1729 var _p0 *byte
1730 _p0, err = BytePtrFromString(path)
1731 if err != nil {
1732 return
1733 }
1734 _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
1735 if e1 != 0 {
1736 err = errnoErr(e1)
1737 }
1738 return
1739 }
1740
1741 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1742
15581743 func Fstatfs(fd int, buf *Statfs_t) (err error) {
15591744 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
15601745 if e1 != 0 {
15761761 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15771762
15781763 func Getegid() (egid int) {
1579 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
1764 r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
15801765 egid = int(r0)
15811766 return
15821767 }
15841769 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15851770
15861771 func Geteuid() (euid int) {
1587 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
1772 r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
15881773 euid = int(r0)
15891774 return
15901775 }
15921777 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15931778
15941779 func Getgid() (gid int) {
1595 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
1780 r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
15961781 gid = int(r0)
15971782 return
15981783 }
16101795 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16111796
16121797 func Getuid() (uid int) {
1613 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
1798 r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
16141799 uid = int(r0)
16151800 return
16161801 }
17321917
17331918 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
17341919
1920 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1921 var _p0 *byte
1922 _p0, err = BytePtrFromString(oldpath)
1923 if err != nil {
1924 return
1925 }
1926 var _p1 *byte
1927 _p1, err = BytePtrFromString(newpath)
1928 if err != nil {
1929 return
1930 }
1931 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1932 if e1 != 0 {
1933 err = errnoErr(e1)
1934 }
1935 return
1936 }
1937
1938 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1939
17351940 func Seek(fd int, offset int64, whence int) (off int64, err error) {
17361941 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
17371942 off = int64(r0)
18862091
18872092 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
18882093
1889 func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
1890 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
1891 if e1 != 0 {
1892 err = errnoErr(e1)
1893 }
1894 return
1895 }
1896
1897 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1898
18992094 func Truncate(path string, length int64) (err error) {
19002095 var _p0 *byte
19012096 _p0, err = BytePtrFromString(path)
19032098 return
19042099 }
19052100 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
2101 if e1 != 0 {
2102 err = errnoErr(e1)
2103 }
2104 return
2105 }
2106
2107 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2108
2109 func Ustat(dev int, ubuf *Ustat_t) (err error) {
2110 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
19062111 if e1 != 0 {
19072112 err = errnoErr(e1)
19082113 }
21012306
21022307 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
21032308
2309 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
2310 var _p0 *byte
2311 _p0, err = BytePtrFromString(path)
2312 if err != nil {
2313 return
2314 }
2315 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
2316 if e1 != 0 {
2317 err = errnoErr(e1)
2318 }
2319 return
2320 }
2321
2322 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2323
21042324 func Gettimeofday(tv *Timeval) (err error) {
21052325 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
21062326 if e1 != 0 {
21372357
21382358 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
21392359
2360 func utimes(path string, times *[2]Timeval) (err error) {
2361 var _p0 *byte
2362 _p0, err = BytePtrFromString(path)
2363 if err != nil {
2364 return
2365 }
2366 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
2367 if e1 != 0 {
2368 err = errnoErr(e1)
2369 }
2370 return
2371 }
2372
2373 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2374
21402375 func pipe(p *[2]_C_int) (err error) {
21412376 _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
21422377 if e1 != 0 {
21652400 }
21662401 return
21672402 }
2403
2404 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2405
2406 func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
2407 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
2408 if e1 != 0 {
2409 err = errnoErr(e1)
2410 }
2411 return
2412 }
2413
2414 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2415
2416 func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
2417 var _p0 *byte
2418 _p0, err = BytePtrFromString(cmdline)
2419 if err != nil {
2420 return
2421 }
2422 _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
2423 if e1 != 0 {
2424 err = errnoErr(e1)
2425 }
2426 return
2427 }
0 // go run mksyscall.go -tags linux,riscv64 syscall_linux.go syscall_linux_riscv64.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build linux,riscv64
4
5 package unix
6
7 import (
8 "syscall"
9 "unsafe"
10 )
11
12 var _ syscall.Errno
13
14 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15
16 func fchmodat(dirfd int, path string, mode uint32) (err error) {
17 var _p0 *byte
18 _p0, err = BytePtrFromString(path)
19 if err != nil {
20 return
21 }
22 _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
23 if e1 != 0 {
24 err = errnoErr(e1)
25 }
26 return
27 }
28
29 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
30
31 func ioctl(fd int, req uint, arg uintptr) (err error) {
32 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
33 if e1 != 0 {
34 err = errnoErr(e1)
35 }
36 return
37 }
38
39 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
40
41 func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
42 var _p0 *byte
43 _p0, err = BytePtrFromString(oldpath)
44 if err != nil {
45 return
46 }
47 var _p1 *byte
48 _p1, err = BytePtrFromString(newpath)
49 if err != nil {
50 return
51 }
52 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
53 if e1 != 0 {
54 err = errnoErr(e1)
55 }
56 return
57 }
58
59 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
60
61 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
62 var _p0 *byte
63 _p0, err = BytePtrFromString(path)
64 if err != nil {
65 return
66 }
67 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
68 fd = int(r0)
69 if e1 != 0 {
70 err = errnoErr(e1)
71 }
72 return
73 }
74
75 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
76
77 func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
78 r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
79 n = int(r0)
80 if e1 != 0 {
81 err = errnoErr(e1)
82 }
83 return
84 }
85
86 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
87
88 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
89 var _p0 *byte
90 _p0, err = BytePtrFromString(path)
91 if err != nil {
92 return
93 }
94 var _p1 unsafe.Pointer
95 if len(buf) > 0 {
96 _p1 = unsafe.Pointer(&buf[0])
97 } else {
98 _p1 = unsafe.Pointer(&_zero)
99 }
100 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
101 n = int(r0)
102 if e1 != 0 {
103 err = errnoErr(e1)
104 }
105 return
106 }
107
108 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
109
110 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
111 var _p0 *byte
112 _p0, err = BytePtrFromString(oldpath)
113 if err != nil {
114 return
115 }
116 var _p1 *byte
117 _p1, err = BytePtrFromString(newpath)
118 if err != nil {
119 return
120 }
121 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
122 if e1 != 0 {
123 err = errnoErr(e1)
124 }
125 return
126 }
127
128 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
129
130 func Unlinkat(dirfd int, path string, flags int) (err error) {
131 var _p0 *byte
132 _p0, err = BytePtrFromString(path)
133 if err != nil {
134 return
135 }
136 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
137 if e1 != 0 {
138 err = errnoErr(e1)
139 }
140 return
141 }
142
143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
144
145 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
146 var _p0 *byte
147 _p0, err = BytePtrFromString(path)
148 if err != nil {
149 return
150 }
151 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
152 if e1 != 0 {
153 err = errnoErr(e1)
154 }
155 return
156 }
157
158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
159
160 func Getcwd(buf []byte) (n int, err error) {
161 var _p0 unsafe.Pointer
162 if len(buf) > 0 {
163 _p0 = unsafe.Pointer(&buf[0])
164 } else {
165 _p0 = unsafe.Pointer(&_zero)
166 }
167 r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
168 n = int(r0)
169 if e1 != 0 {
170 err = errnoErr(e1)
171 }
172 return
173 }
174
175 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
176
177 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
178 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
179 wpid = int(r0)
180 if e1 != 0 {
181 err = errnoErr(e1)
182 }
183 return
184 }
185
186 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
187
188 func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
189 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
190 ret = int(r0)
191 if e1 != 0 {
192 err = errnoErr(e1)
193 }
194 return
195 }
196
197 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
198
199 func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
200 var _p0 unsafe.Pointer
201 if len(buf) > 0 {
202 _p0 = unsafe.Pointer(&buf[0])
203 } else {
204 _p0 = unsafe.Pointer(&_zero)
205 }
206 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
207 ret = int(r0)
208 if e1 != 0 {
209 err = errnoErr(e1)
210 }
211 return
212 }
213
214 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
215
216 func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
217 var _p0 *byte
218 _p0, err = BytePtrFromString(arg2)
219 if err != nil {
220 return
221 }
222 r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
223 ret = int(r0)
224 if e1 != 0 {
225 err = errnoErr(e1)
226 }
227 return
228 }
229
230 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
231
232 func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
233 var _p0 *byte
234 _p0, err = BytePtrFromString(arg3)
235 if err != nil {
236 return
237 }
238 var _p1 *byte
239 _p1, err = BytePtrFromString(arg4)
240 if err != nil {
241 return
242 }
243 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
244 ret = int(r0)
245 if e1 != 0 {
246 err = errnoErr(e1)
247 }
248 return
249 }
250
251 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
252
253 func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
254 var _p0 unsafe.Pointer
255 if len(payload) > 0 {
256 _p0 = unsafe.Pointer(&payload[0])
257 } else {
258 _p0 = unsafe.Pointer(&_zero)
259 }
260 _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
261 if e1 != 0 {
262 err = errnoErr(e1)
263 }
264 return
265 }
266
267 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
268
269 func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
270 var _p0 unsafe.Pointer
271 if len(buf) > 0 {
272 _p0 = unsafe.Pointer(&buf[0])
273 } else {
274 _p0 = unsafe.Pointer(&_zero)
275 }
276 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
277 ret = int(r0)
278 if e1 != 0 {
279 err = errnoErr(e1)
280 }
281 return
282 }
283
284 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
285
286 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
287 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
288 if e1 != 0 {
289 err = errnoErr(e1)
290 }
291 return
292 }
293
294 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
295
296 func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
297 var _p0 *byte
298 _p0, err = BytePtrFromString(arg)
299 if err != nil {
300 return
301 }
302 _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
303 if e1 != 0 {
304 err = errnoErr(e1)
305 }
306 return
307 }
308
309 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
310
311 func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
312 var _p0 *byte
313 _p0, err = BytePtrFromString(source)
314 if err != nil {
315 return
316 }
317 var _p1 *byte
318 _p1, err = BytePtrFromString(target)
319 if err != nil {
320 return
321 }
322 var _p2 *byte
323 _p2, err = BytePtrFromString(fstype)
324 if err != nil {
325 return
326 }
327 _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
328 if e1 != 0 {
329 err = errnoErr(e1)
330 }
331 return
332 }
333
334 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
335
336 func Acct(path string) (err error) {
337 var _p0 *byte
338 _p0, err = BytePtrFromString(path)
339 if err != nil {
340 return
341 }
342 _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
343 if e1 != 0 {
344 err = errnoErr(e1)
345 }
346 return
347 }
348
349 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
350
351 func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
352 var _p0 *byte
353 _p0, err = BytePtrFromString(keyType)
354 if err != nil {
355 return
356 }
357 var _p1 *byte
358 _p1, err = BytePtrFromString(description)
359 if err != nil {
360 return
361 }
362 var _p2 unsafe.Pointer
363 if len(payload) > 0 {
364 _p2 = unsafe.Pointer(&payload[0])
365 } else {
366 _p2 = unsafe.Pointer(&_zero)
367 }
368 r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
369 id = int(r0)
370 if e1 != 0 {
371 err = errnoErr(e1)
372 }
373 return
374 }
375
376 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
377
378 func Adjtimex(buf *Timex) (state int, err error) {
379 r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
380 state = int(r0)
381 if e1 != 0 {
382 err = errnoErr(e1)
383 }
384 return
385 }
386
387 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
388
389 func Chdir(path string) (err error) {
390 var _p0 *byte
391 _p0, err = BytePtrFromString(path)
392 if err != nil {
393 return
394 }
395 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
396 if e1 != 0 {
397 err = errnoErr(e1)
398 }
399 return
400 }
401
402 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
403
404 func Chroot(path string) (err error) {
405 var _p0 *byte
406 _p0, err = BytePtrFromString(path)
407 if err != nil {
408 return
409 }
410 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
411 if e1 != 0 {
412 err = errnoErr(e1)
413 }
414 return
415 }
416
417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
418
419 func ClockGetres(clockid int32, res *Timespec) (err error) {
420 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
421 if e1 != 0 {
422 err = errnoErr(e1)
423 }
424 return
425 }
426
427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
428
429 func ClockGettime(clockid int32, time *Timespec) (err error) {
430 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
431 if e1 != 0 {
432 err = errnoErr(e1)
433 }
434 return
435 }
436
437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
438
439 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
440 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
441 if e1 != 0 {
442 err = errnoErr(e1)
443 }
444 return
445 }
446
447 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
448
449 func Close(fd int) (err error) {
450 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
451 if e1 != 0 {
452 err = errnoErr(e1)
453 }
454 return
455 }
456
457 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
458
459 func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
460 r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
461 n = int(r0)
462 if e1 != 0 {
463 err = errnoErr(e1)
464 }
465 return
466 }
467
468 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
469
470 func DeleteModule(name string, flags int) (err error) {
471 var _p0 *byte
472 _p0, err = BytePtrFromString(name)
473 if err != nil {
474 return
475 }
476 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
477 if e1 != 0 {
478 err = errnoErr(e1)
479 }
480 return
481 }
482
483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
484
485 func Dup(oldfd int) (fd int, err error) {
486 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
487 fd = int(r0)
488 if e1 != 0 {
489 err = errnoErr(e1)
490 }
491 return
492 }
493
494 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
495
496 func Dup3(oldfd int, newfd int, flags int) (err error) {
497 _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
498 if e1 != 0 {
499 err = errnoErr(e1)
500 }
501 return
502 }
503
504 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
505
506 func EpollCreate1(flag int) (fd int, err error) {
507 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
508 fd = int(r0)
509 if e1 != 0 {
510 err = errnoErr(e1)
511 }
512 return
513 }
514
515 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
516
517 func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
518 _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
519 if e1 != 0 {
520 err = errnoErr(e1)
521 }
522 return
523 }
524
525 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
526
527 func Eventfd(initval uint, flags int) (fd int, err error) {
528 r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
529 fd = int(r0)
530 if e1 != 0 {
531 err = errnoErr(e1)
532 }
533 return
534 }
535
536 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
537
538 func Exit(code int) {
539 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
540 return
541 }
542
543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
544
545 func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
546 _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
547 if e1 != 0 {
548 err = errnoErr(e1)
549 }
550 return
551 }
552
553 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
554
555 func Fchdir(fd int) (err error) {
556 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
557 if e1 != 0 {
558 err = errnoErr(e1)
559 }
560 return
561 }
562
563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
564
565 func Fchmod(fd int, mode uint32) (err error) {
566 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
567 if e1 != 0 {
568 err = errnoErr(e1)
569 }
570 return
571 }
572
573 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
574
575 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
576 var _p0 *byte
577 _p0, err = BytePtrFromString(path)
578 if err != nil {
579 return
580 }
581 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
582 if e1 != 0 {
583 err = errnoErr(e1)
584 }
585 return
586 }
587
588 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
589
590 func fcntl(fd int, cmd int, arg int) (val int, err error) {
591 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
592 val = int(r0)
593 if e1 != 0 {
594 err = errnoErr(e1)
595 }
596 return
597 }
598
599 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
600
601 func Fdatasync(fd int) (err error) {
602 _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
603 if e1 != 0 {
604 err = errnoErr(e1)
605 }
606 return
607 }
608
609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
610
611 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
612 var _p0 *byte
613 _p0, err = BytePtrFromString(attr)
614 if err != nil {
615 return
616 }
617 var _p1 unsafe.Pointer
618 if len(dest) > 0 {
619 _p1 = unsafe.Pointer(&dest[0])
620 } else {
621 _p1 = unsafe.Pointer(&_zero)
622 }
623 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
624 sz = int(r0)
625 if e1 != 0 {
626 err = errnoErr(e1)
627 }
628 return
629 }
630
631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
632
633 func FinitModule(fd int, params string, flags int) (err error) {
634 var _p0 *byte
635 _p0, err = BytePtrFromString(params)
636 if err != nil {
637 return
638 }
639 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
640 if e1 != 0 {
641 err = errnoErr(e1)
642 }
643 return
644 }
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func Flistxattr(fd int, dest []byte) (sz int, err error) {
649 var _p0 unsafe.Pointer
650 if len(dest) > 0 {
651 _p0 = unsafe.Pointer(&dest[0])
652 } else {
653 _p0 = unsafe.Pointer(&_zero)
654 }
655 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
656 sz = int(r0)
657 if e1 != 0 {
658 err = errnoErr(e1)
659 }
660 return
661 }
662
663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
664
665 func Flock(fd int, how int) (err error) {
666 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
667 if e1 != 0 {
668 err = errnoErr(e1)
669 }
670 return
671 }
672
673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674
675 func Fremovexattr(fd int, attr string) (err error) {
676 var _p0 *byte
677 _p0, err = BytePtrFromString(attr)
678 if err != nil {
679 return
680 }
681 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
682 if e1 != 0 {
683 err = errnoErr(e1)
684 }
685 return
686 }
687
688 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
689
690 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
691 var _p0 *byte
692 _p0, err = BytePtrFromString(attr)
693 if err != nil {
694 return
695 }
696 var _p1 unsafe.Pointer
697 if len(dest) > 0 {
698 _p1 = unsafe.Pointer(&dest[0])
699 } else {
700 _p1 = unsafe.Pointer(&_zero)
701 }
702 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
703 if e1 != 0 {
704 err = errnoErr(e1)
705 }
706 return
707 }
708
709 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
710
711 func Fsync(fd int) (err error) {
712 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
713 if e1 != 0 {
714 err = errnoErr(e1)
715 }
716 return
717 }
718
719 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
720
721 func Getdents(fd int, buf []byte) (n int, err error) {
722 var _p0 unsafe.Pointer
723 if len(buf) > 0 {
724 _p0 = unsafe.Pointer(&buf[0])
725 } else {
726 _p0 = unsafe.Pointer(&_zero)
727 }
728 r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
729 n = int(r0)
730 if e1 != 0 {
731 err = errnoErr(e1)
732 }
733 return
734 }
735
736 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
737
738 func Getpgid(pid int) (pgid int, err error) {
739 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
740 pgid = int(r0)
741 if e1 != 0 {
742 err = errnoErr(e1)
743 }
744 return
745 }
746
747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
748
749 func Getpid() (pid int) {
750 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
751 pid = int(r0)
752 return
753 }
754
755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
756
757 func Getppid() (ppid int) {
758 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
759 ppid = int(r0)
760 return
761 }
762
763 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
764
765 func Getpriority(which int, who int) (prio int, err error) {
766 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
767 prio = int(r0)
768 if e1 != 0 {
769 err = errnoErr(e1)
770 }
771 return
772 }
773
774 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
775
776 func Getrandom(buf []byte, flags int) (n int, err error) {
777 var _p0 unsafe.Pointer
778 if len(buf) > 0 {
779 _p0 = unsafe.Pointer(&buf[0])
780 } else {
781 _p0 = unsafe.Pointer(&_zero)
782 }
783 r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
784 n = int(r0)
785 if e1 != 0 {
786 err = errnoErr(e1)
787 }
788 return
789 }
790
791 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
792
793 func Getrusage(who int, rusage *Rusage) (err error) {
794 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
795 if e1 != 0 {
796 err = errnoErr(e1)
797 }
798 return
799 }
800
801 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
802
803 func Getsid(pid int) (sid int, err error) {
804 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
805 sid = int(r0)
806 if e1 != 0 {
807 err = errnoErr(e1)
808 }
809 return
810 }
811
812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
813
814 func Gettid() (tid int) {
815 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
816 tid = int(r0)
817 return
818 }
819
820 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
821
822 func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
823 var _p0 *byte
824 _p0, err = BytePtrFromString(path)
825 if err != nil {
826 return
827 }
828 var _p1 *byte
829 _p1, err = BytePtrFromString(attr)
830 if err != nil {
831 return
832 }
833 var _p2 unsafe.Pointer
834 if len(dest) > 0 {
835 _p2 = unsafe.Pointer(&dest[0])
836 } else {
837 _p2 = unsafe.Pointer(&_zero)
838 }
839 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
840 sz = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func InitModule(moduleImage []byte, params string) (err error) {
850 var _p0 unsafe.Pointer
851 if len(moduleImage) > 0 {
852 _p0 = unsafe.Pointer(&moduleImage[0])
853 } else {
854 _p0 = unsafe.Pointer(&_zero)
855 }
856 var _p1 *byte
857 _p1, err = BytePtrFromString(params)
858 if err != nil {
859 return
860 }
861 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
862 if e1 != 0 {
863 err = errnoErr(e1)
864 }
865 return
866 }
867
868 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
869
870 func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
871 var _p0 *byte
872 _p0, err = BytePtrFromString(pathname)
873 if err != nil {
874 return
875 }
876 r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
877 watchdesc = int(r0)
878 if e1 != 0 {
879 err = errnoErr(e1)
880 }
881 return
882 }
883
884 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
885
886 func InotifyInit1(flags int) (fd int, err error) {
887 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
888 fd = int(r0)
889 if e1 != 0 {
890 err = errnoErr(e1)
891 }
892 return
893 }
894
895 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
896
897 func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
898 r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
899 success = int(r0)
900 if e1 != 0 {
901 err = errnoErr(e1)
902 }
903 return
904 }
905
906 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
907
908 func Kill(pid int, sig syscall.Signal) (err error) {
909 _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
910 if e1 != 0 {
911 err = errnoErr(e1)
912 }
913 return
914 }
915
916 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
917
918 func Klogctl(typ int, buf []byte) (n int, err error) {
919 var _p0 unsafe.Pointer
920 if len(buf) > 0 {
921 _p0 = unsafe.Pointer(&buf[0])
922 } else {
923 _p0 = unsafe.Pointer(&_zero)
924 }
925 r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
926 n = int(r0)
927 if e1 != 0 {
928 err = errnoErr(e1)
929 }
930 return
931 }
932
933 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
934
935 func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
936 var _p0 *byte
937 _p0, err = BytePtrFromString(path)
938 if err != nil {
939 return
940 }
941 var _p1 *byte
942 _p1, err = BytePtrFromString(attr)
943 if err != nil {
944 return
945 }
946 var _p2 unsafe.Pointer
947 if len(dest) > 0 {
948 _p2 = unsafe.Pointer(&dest[0])
949 } else {
950 _p2 = unsafe.Pointer(&_zero)
951 }
952 r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
953 sz = int(r0)
954 if e1 != 0 {
955 err = errnoErr(e1)
956 }
957 return
958 }
959
960 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
961
962 func Listxattr(path string, dest []byte) (sz int, err error) {
963 var _p0 *byte
964 _p0, err = BytePtrFromString(path)
965 if err != nil {
966 return
967 }
968 var _p1 unsafe.Pointer
969 if len(dest) > 0 {
970 _p1 = unsafe.Pointer(&dest[0])
971 } else {
972 _p1 = unsafe.Pointer(&_zero)
973 }
974 r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
975 sz = int(r0)
976 if e1 != 0 {
977 err = errnoErr(e1)
978 }
979 return
980 }
981
982 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
983
984 func Llistxattr(path string, dest []byte) (sz int, err error) {
985 var _p0 *byte
986 _p0, err = BytePtrFromString(path)
987 if err != nil {
988 return
989 }
990 var _p1 unsafe.Pointer
991 if len(dest) > 0 {
992 _p1 = unsafe.Pointer(&dest[0])
993 } else {
994 _p1 = unsafe.Pointer(&_zero)
995 }
996 r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
997 sz = int(r0)
998 if e1 != 0 {
999 err = errnoErr(e1)
1000 }
1001 return
1002 }
1003
1004 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1005
1006 func Lremovexattr(path string, attr string) (err error) {
1007 var _p0 *byte
1008 _p0, err = BytePtrFromString(path)
1009 if err != nil {
1010 return
1011 }
1012 var _p1 *byte
1013 _p1, err = BytePtrFromString(attr)
1014 if err != nil {
1015 return
1016 }
1017 _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1018 if e1 != 0 {
1019 err = errnoErr(e1)
1020 }
1021 return
1022 }
1023
1024 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1025
1026 func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
1027 var _p0 *byte
1028 _p0, err = BytePtrFromString(path)
1029 if err != nil {
1030 return
1031 }
1032 var _p1 *byte
1033 _p1, err = BytePtrFromString(attr)
1034 if err != nil {
1035 return
1036 }
1037 var _p2 unsafe.Pointer
1038 if len(data) > 0 {
1039 _p2 = unsafe.Pointer(&data[0])
1040 } else {
1041 _p2 = unsafe.Pointer(&_zero)
1042 }
1043 _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
1044 if e1 != 0 {
1045 err = errnoErr(e1)
1046 }
1047 return
1048 }
1049
1050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1051
1052 func MemfdCreate(name string, flags int) (fd int, err error) {
1053 var _p0 *byte
1054 _p0, err = BytePtrFromString(name)
1055 if err != nil {
1056 return
1057 }
1058 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1059 fd = int(r0)
1060 if e1 != 0 {
1061 err = errnoErr(e1)
1062 }
1063 return
1064 }
1065
1066 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1067
1068 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1069 var _p0 *byte
1070 _p0, err = BytePtrFromString(path)
1071 if err != nil {
1072 return
1073 }
1074 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1075 if e1 != 0 {
1076 err = errnoErr(e1)
1077 }
1078 return
1079 }
1080
1081 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1082
1083 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
1084 var _p0 *byte
1085 _p0, err = BytePtrFromString(path)
1086 if err != nil {
1087 return
1088 }
1089 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
1090 if e1 != 0 {
1091 err = errnoErr(e1)
1092 }
1093 return
1094 }
1095
1096 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1097
1098 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
1099 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1107
1108 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
1109 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
1110 fd = int(r0)
1111 if e1 != 0 {
1112 err = errnoErr(e1)
1113 }
1114 return
1115 }
1116
1117 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1118
1119 func PivotRoot(newroot string, putold string) (err error) {
1120 var _p0 *byte
1121 _p0, err = BytePtrFromString(newroot)
1122 if err != nil {
1123 return
1124 }
1125 var _p1 *byte
1126 _p1, err = BytePtrFromString(putold)
1127 if err != nil {
1128 return
1129 }
1130 _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1131 if e1 != 0 {
1132 err = errnoErr(e1)
1133 }
1134 return
1135 }
1136
1137 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1138
1139 func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
1140 _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
1141 if e1 != 0 {
1142 err = errnoErr(e1)
1143 }
1144 return
1145 }
1146
1147 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1148
1149 func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
1150 _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
1151 if e1 != 0 {
1152 err = errnoErr(e1)
1153 }
1154 return
1155 }
1156
1157 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1158
1159 func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
1160 r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
1161 n = int(r0)
1162 if e1 != 0 {
1163 err = errnoErr(e1)
1164 }
1165 return
1166 }
1167
1168 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1169
1170 func read(fd int, p []byte) (n int, err error) {
1171 var _p0 unsafe.Pointer
1172 if len(p) > 0 {
1173 _p0 = unsafe.Pointer(&p[0])
1174 } else {
1175 _p0 = unsafe.Pointer(&_zero)
1176 }
1177 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1178 n = int(r0)
1179 if e1 != 0 {
1180 err = errnoErr(e1)
1181 }
1182 return
1183 }
1184
1185 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1186
1187 func Removexattr(path string, attr string) (err error) {
1188 var _p0 *byte
1189 _p0, err = BytePtrFromString(path)
1190 if err != nil {
1191 return
1192 }
1193 var _p1 *byte
1194 _p1, err = BytePtrFromString(attr)
1195 if err != nil {
1196 return
1197 }
1198 _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1199 if e1 != 0 {
1200 err = errnoErr(e1)
1201 }
1202 return
1203 }
1204
1205 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1206
1207 func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
1208 var _p0 *byte
1209 _p0, err = BytePtrFromString(oldpath)
1210 if err != nil {
1211 return
1212 }
1213 var _p1 *byte
1214 _p1, err = BytePtrFromString(newpath)
1215 if err != nil {
1216 return
1217 }
1218 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1219 if e1 != 0 {
1220 err = errnoErr(e1)
1221 }
1222 return
1223 }
1224
1225 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1226
1227 func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
1228 var _p0 *byte
1229 _p0, err = BytePtrFromString(keyType)
1230 if err != nil {
1231 return
1232 }
1233 var _p1 *byte
1234 _p1, err = BytePtrFromString(description)
1235 if err != nil {
1236 return
1237 }
1238 var _p2 *byte
1239 _p2, err = BytePtrFromString(callback)
1240 if err != nil {
1241 return
1242 }
1243 r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
1244 id = int(r0)
1245 if e1 != 0 {
1246 err = errnoErr(e1)
1247 }
1248 return
1249 }
1250
1251 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1252
1253 func Setdomainname(p []byte) (err error) {
1254 var _p0 unsafe.Pointer
1255 if len(p) > 0 {
1256 _p0 = unsafe.Pointer(&p[0])
1257 } else {
1258 _p0 = unsafe.Pointer(&_zero)
1259 }
1260 _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
1261 if e1 != 0 {
1262 err = errnoErr(e1)
1263 }
1264 return
1265 }
1266
1267 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1268
1269 func Sethostname(p []byte) (err error) {
1270 var _p0 unsafe.Pointer
1271 if len(p) > 0 {
1272 _p0 = unsafe.Pointer(&p[0])
1273 } else {
1274 _p0 = unsafe.Pointer(&_zero)
1275 }
1276 _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
1277 if e1 != 0 {
1278 err = errnoErr(e1)
1279 }
1280 return
1281 }
1282
1283 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1284
1285 func Setpgid(pid int, pgid int) (err error) {
1286 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
1287 if e1 != 0 {
1288 err = errnoErr(e1)
1289 }
1290 return
1291 }
1292
1293 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1294
1295 func Setsid() (pid int, err error) {
1296 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
1297 pid = int(r0)
1298 if e1 != 0 {
1299 err = errnoErr(e1)
1300 }
1301 return
1302 }
1303
1304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1305
1306 func Settimeofday(tv *Timeval) (err error) {
1307 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
1308 if e1 != 0 {
1309 err = errnoErr(e1)
1310 }
1311 return
1312 }
1313
1314 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1315
1316 func Setns(fd int, nstype int) (err error) {
1317 _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
1318 if e1 != 0 {
1319 err = errnoErr(e1)
1320 }
1321 return
1322 }
1323
1324 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1325
1326 func Setpriority(which int, who int, prio int) (err error) {
1327 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
1328 if e1 != 0 {
1329 err = errnoErr(e1)
1330 }
1331 return
1332 }
1333
1334 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1335
1336 func Setxattr(path string, attr string, data []byte, flags int) (err error) {
1337 var _p0 *byte
1338 _p0, err = BytePtrFromString(path)
1339 if err != nil {
1340 return
1341 }
1342 var _p1 *byte
1343 _p1, err = BytePtrFromString(attr)
1344 if err != nil {
1345 return
1346 }
1347 var _p2 unsafe.Pointer
1348 if len(data) > 0 {
1349 _p2 = unsafe.Pointer(&data[0])
1350 } else {
1351 _p2 = unsafe.Pointer(&_zero)
1352 }
1353 _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
1354 if e1 != 0 {
1355 err = errnoErr(e1)
1356 }
1357 return
1358 }
1359
1360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1361
1362 func Signalfd(fd int, mask *Sigset_t, flags int) {
1363 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
1364 return
1365 }
1366
1367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1368
1369 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
1370 var _p0 *byte
1371 _p0, err = BytePtrFromString(path)
1372 if err != nil {
1373 return
1374 }
1375 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
1384 func Sync() {
1385 SyscallNoError(SYS_SYNC, 0, 0, 0)
1386 return
1387 }
1388
1389 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1390
1391 func Syncfs(fd int) (err error) {
1392 _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
1393 if e1 != 0 {
1394 err = errnoErr(e1)
1395 }
1396 return
1397 }
1398
1399 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1400
1401 func Sysinfo(info *Sysinfo_t) (err error) {
1402 _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
1403 if e1 != 0 {
1404 err = errnoErr(e1)
1405 }
1406 return
1407 }
1408
1409 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1410
1411 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
1412 r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
1413 n = int64(r0)
1414 if e1 != 0 {
1415 err = errnoErr(e1)
1416 }
1417 return
1418 }
1419
1420 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1421
1422 func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
1423 _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
1424 if e1 != 0 {
1425 err = errnoErr(e1)
1426 }
1427 return
1428 }
1429
1430 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1431
1432 func Times(tms *Tms) (ticks uintptr, err error) {
1433 r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
1434 ticks = uintptr(r0)
1435 if e1 != 0 {
1436 err = errnoErr(e1)
1437 }
1438 return
1439 }
1440
1441 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1442
1443 func Umask(mask int) (oldmask int) {
1444 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
1445 oldmask = int(r0)
1446 return
1447 }
1448
1449 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1450
1451 func Uname(buf *Utsname) (err error) {
1452 _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
1453 if e1 != 0 {
1454 err = errnoErr(e1)
1455 }
1456 return
1457 }
1458
1459 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1460
1461 func Unmount(target string, flags int) (err error) {
1462 var _p0 *byte
1463 _p0, err = BytePtrFromString(target)
1464 if err != nil {
1465 return
1466 }
1467 _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1468 if e1 != 0 {
1469 err = errnoErr(e1)
1470 }
1471 return
1472 }
1473
1474 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1475
1476 func Unshare(flags int) (err error) {
1477 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
1478 if e1 != 0 {
1479 err = errnoErr(e1)
1480 }
1481 return
1482 }
1483
1484 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1485
1486 func write(fd int, p []byte) (n int, err error) {
1487 var _p0 unsafe.Pointer
1488 if len(p) > 0 {
1489 _p0 = unsafe.Pointer(&p[0])
1490 } else {
1491 _p0 = unsafe.Pointer(&_zero)
1492 }
1493 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1494 n = int(r0)
1495 if e1 != 0 {
1496 err = errnoErr(e1)
1497 }
1498 return
1499 }
1500
1501 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1502
1503 func exitThread(code int) (err error) {
1504 _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
1505 if e1 != 0 {
1506 err = errnoErr(e1)
1507 }
1508 return
1509 }
1510
1511 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1512
1513 func readlen(fd int, p *byte, np int) (n int, err error) {
1514 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
1515 n = int(r0)
1516 if e1 != 0 {
1517 err = errnoErr(e1)
1518 }
1519 return
1520 }
1521
1522 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1523
1524 func writelen(fd int, p *byte, np int) (n int, err error) {
1525 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
1526 n = int(r0)
1527 if e1 != 0 {
1528 err = errnoErr(e1)
1529 }
1530 return
1531 }
1532
1533 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1534
1535 func munmap(addr uintptr, length uintptr) (err error) {
1536 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
1537 if e1 != 0 {
1538 err = errnoErr(e1)
1539 }
1540 return
1541 }
1542
1543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1544
1545 func Madvise(b []byte, advice int) (err error) {
1546 var _p0 unsafe.Pointer
1547 if len(b) > 0 {
1548 _p0 = unsafe.Pointer(&b[0])
1549 } else {
1550 _p0 = unsafe.Pointer(&_zero)
1551 }
1552 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
1553 if e1 != 0 {
1554 err = errnoErr(e1)
1555 }
1556 return
1557 }
1558
1559 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1560
1561 func Mprotect(b []byte, prot int) (err error) {
1562 var _p0 unsafe.Pointer
1563 if len(b) > 0 {
1564 _p0 = unsafe.Pointer(&b[0])
1565 } else {
1566 _p0 = unsafe.Pointer(&_zero)
1567 }
1568 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
1569 if e1 != 0 {
1570 err = errnoErr(e1)
1571 }
1572 return
1573 }
1574
1575 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1576
1577 func Mlock(b []byte) (err error) {
1578 var _p0 unsafe.Pointer
1579 if len(b) > 0 {
1580 _p0 = unsafe.Pointer(&b[0])
1581 } else {
1582 _p0 = unsafe.Pointer(&_zero)
1583 }
1584 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
1585 if e1 != 0 {
1586 err = errnoErr(e1)
1587 }
1588 return
1589 }
1590
1591 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1592
1593 func Mlockall(flags int) (err error) {
1594 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
1595 if e1 != 0 {
1596 err = errnoErr(e1)
1597 }
1598 return
1599 }
1600
1601 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1602
1603 func Msync(b []byte, flags int) (err error) {
1604 var _p0 unsafe.Pointer
1605 if len(b) > 0 {
1606 _p0 = unsafe.Pointer(&b[0])
1607 } else {
1608 _p0 = unsafe.Pointer(&_zero)
1609 }
1610 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
1611 if e1 != 0 {
1612 err = errnoErr(e1)
1613 }
1614 return
1615 }
1616
1617 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1618
1619 func Munlock(b []byte) (err error) {
1620 var _p0 unsafe.Pointer
1621 if len(b) > 0 {
1622 _p0 = unsafe.Pointer(&b[0])
1623 } else {
1624 _p0 = unsafe.Pointer(&_zero)
1625 }
1626 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
1627 if e1 != 0 {
1628 err = errnoErr(e1)
1629 }
1630 return
1631 }
1632
1633 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1634
1635 func Munlockall() (err error) {
1636 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
1637 if e1 != 0 {
1638 err = errnoErr(e1)
1639 }
1640 return
1641 }
1642
1643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1644
1645 func faccessat(dirfd int, path string, mode uint32) (err error) {
1646 var _p0 *byte
1647 _p0, err = BytePtrFromString(path)
1648 if err != nil {
1649 return
1650 }
1651 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1652 if e1 != 0 {
1653 err = errnoErr(e1)
1654 }
1655 return
1656 }
1657
1658 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1659
1660 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
1661 var _p0 unsafe.Pointer
1662 if len(events) > 0 {
1663 _p0 = unsafe.Pointer(&events[0])
1664 } else {
1665 _p0 = unsafe.Pointer(&_zero)
1666 }
1667 r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
1668 n = int(r0)
1669 if e1 != 0 {
1670 err = errnoErr(e1)
1671 }
1672 return
1673 }
1674
1675 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1676
1677 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
1678 _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
1679 if e1 != 0 {
1680 err = errnoErr(e1)
1681 }
1682 return
1683 }
1684
1685 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1686
1687 func Fchown(fd int, uid int, gid int) (err error) {
1688 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
1689 if e1 != 0 {
1690 err = errnoErr(e1)
1691 }
1692 return
1693 }
1694
1695 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1696
1697 func Fstat(fd int, stat *Stat_t) (err error) {
1698 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
1699 if e1 != 0 {
1700 err = errnoErr(e1)
1701 }
1702 return
1703 }
1704
1705 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1706
1707 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
1708 var _p0 *byte
1709 _p0, err = BytePtrFromString(path)
1710 if err != nil {
1711 return
1712 }
1713 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
1714 if e1 != 0 {
1715 err = errnoErr(e1)
1716 }
1717 return
1718 }
1719
1720 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1721
1722 func Fstatfs(fd int, buf *Statfs_t) (err error) {
1723 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
1724 if e1 != 0 {
1725 err = errnoErr(e1)
1726 }
1727 return
1728 }
1729
1730 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1731
1732 func Ftruncate(fd int, length int64) (err error) {
1733 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
1734 if e1 != 0 {
1735 err = errnoErr(e1)
1736 }
1737 return
1738 }
1739
1740 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1741
1742 func Getegid() (egid int) {
1743 r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
1744 egid = int(r0)
1745 return
1746 }
1747
1748 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1749
1750 func Geteuid() (euid int) {
1751 r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
1752 euid = int(r0)
1753 return
1754 }
1755
1756 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1757
1758 func Getgid() (gid int) {
1759 r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
1760 gid = int(r0)
1761 return
1762 }
1763
1764 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1765
1766 func Getrlimit(resource int, rlim *Rlimit) (err error) {
1767 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
1768 if e1 != 0 {
1769 err = errnoErr(e1)
1770 }
1771 return
1772 }
1773
1774 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1775
1776 func Getuid() (uid int) {
1777 r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
1778 uid = int(r0)
1779 return
1780 }
1781
1782 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1783
1784 func Listen(s int, n int) (err error) {
1785 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
1786 if e1 != 0 {
1787 err = errnoErr(e1)
1788 }
1789 return
1790 }
1791
1792 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1793
1794 func Pread(fd int, p []byte, offset int64) (n int, err error) {
1795 var _p0 unsafe.Pointer
1796 if len(p) > 0 {
1797 _p0 = unsafe.Pointer(&p[0])
1798 } else {
1799 _p0 = unsafe.Pointer(&_zero)
1800 }
1801 r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1802 n = int(r0)
1803 if e1 != 0 {
1804 err = errnoErr(e1)
1805 }
1806 return
1807 }
1808
1809 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1810
1811 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
1812 var _p0 unsafe.Pointer
1813 if len(p) > 0 {
1814 _p0 = unsafe.Pointer(&p[0])
1815 } else {
1816 _p0 = unsafe.Pointer(&_zero)
1817 }
1818 r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1819 n = int(r0)
1820 if e1 != 0 {
1821 err = errnoErr(e1)
1822 }
1823 return
1824 }
1825
1826 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1827
1828 func Seek(fd int, offset int64, whence int) (off int64, err error) {
1829 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
1830 off = int64(r0)
1831 if e1 != 0 {
1832 err = errnoErr(e1)
1833 }
1834 return
1835 }
1836
1837 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1838
1839 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
1840 r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
1841 written = int(r0)
1842 if e1 != 0 {
1843 err = errnoErr(e1)
1844 }
1845 return
1846 }
1847
1848 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1849
1850 func Setfsgid(gid int) (err error) {
1851 _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
1852 if e1 != 0 {
1853 err = errnoErr(e1)
1854 }
1855 return
1856 }
1857
1858 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1859
1860 func Setfsuid(uid int) (err error) {
1861 _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
1862 if e1 != 0 {
1863 err = errnoErr(e1)
1864 }
1865 return
1866 }
1867
1868 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1869
1870 func Setregid(rgid int, egid int) (err error) {
1871 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
1872 if e1 != 0 {
1873 err = errnoErr(e1)
1874 }
1875 return
1876 }
1877
1878 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1879
1880 func Setresgid(rgid int, egid int, sgid int) (err error) {
1881 _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
1882 if e1 != 0 {
1883 err = errnoErr(e1)
1884 }
1885 return
1886 }
1887
1888 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1889
1890 func Setresuid(ruid int, euid int, suid int) (err error) {
1891 _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
1892 if e1 != 0 {
1893 err = errnoErr(e1)
1894 }
1895 return
1896 }
1897
1898 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1899
1900 func Setrlimit(resource int, rlim *Rlimit) (err error) {
1901 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
1902 if e1 != 0 {
1903 err = errnoErr(e1)
1904 }
1905 return
1906 }
1907
1908 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1909
1910 func Setreuid(ruid int, euid int) (err error) {
1911 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
1912 if e1 != 0 {
1913 err = errnoErr(e1)
1914 }
1915 return
1916 }
1917
1918 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1919
1920 func Shutdown(fd int, how int) (err error) {
1921 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
1922 if e1 != 0 {
1923 err = errnoErr(e1)
1924 }
1925 return
1926 }
1927
1928 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1929
1930 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
1931 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
1932 n = int64(r0)
1933 if e1 != 0 {
1934 err = errnoErr(e1)
1935 }
1936 return
1937 }
1938
1939 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1940
1941 func Statfs(path string, buf *Statfs_t) (err error) {
1942 var _p0 *byte
1943 _p0, err = BytePtrFromString(path)
1944 if err != nil {
1945 return
1946 }
1947 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
1948 if e1 != 0 {
1949 err = errnoErr(e1)
1950 }
1951 return
1952 }
1953
1954 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1955
1956 func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
1957 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
1958 if e1 != 0 {
1959 err = errnoErr(e1)
1960 }
1961 return
1962 }
1963
1964 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1965
1966 func Truncate(path string, length int64) (err error) {
1967 var _p0 *byte
1968 _p0, err = BytePtrFromString(path)
1969 if err != nil {
1970 return
1971 }
1972 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
1973 if e1 != 0 {
1974 err = errnoErr(e1)
1975 }
1976 return
1977 }
1978
1979 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1980
1981 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
1982 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
1983 fd = int(r0)
1984 if e1 != 0 {
1985 err = errnoErr(e1)
1986 }
1987 return
1988 }
1989
1990 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1991
1992 func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
1993 r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
1994 fd = int(r0)
1995 if e1 != 0 {
1996 err = errnoErr(e1)
1997 }
1998 return
1999 }
2000
2001 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2002
2003 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
2004 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
2005 if e1 != 0 {
2006 err = errnoErr(e1)
2007 }
2008 return
2009 }
2010
2011 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2012
2013 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
2014 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
2015 if e1 != 0 {
2016 err = errnoErr(e1)
2017 }
2018 return
2019 }
2020
2021 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2022
2023 func getgroups(n int, list *_Gid_t) (nn int, err error) {
2024 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
2025 nn = int(r0)
2026 if e1 != 0 {
2027 err = errnoErr(e1)
2028 }
2029 return
2030 }
2031
2032 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2033
2034 func setgroups(n int, list *_Gid_t) (err error) {
2035 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
2036 if e1 != 0 {
2037 err = errnoErr(e1)
2038 }
2039 return
2040 }
2041
2042 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2043
2044 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
2045 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
2046 if e1 != 0 {
2047 err = errnoErr(e1)
2048 }
2049 return
2050 }
2051
2052 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2053
2054 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
2055 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
2056 if e1 != 0 {
2057 err = errnoErr(e1)
2058 }
2059 return
2060 }
2061
2062 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2063
2064 func socket(domain int, typ int, proto int) (fd int, err error) {
2065 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
2066 fd = int(r0)
2067 if e1 != 0 {
2068 err = errnoErr(e1)
2069 }
2070 return
2071 }
2072
2073 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2074
2075 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
2076 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
2077 if e1 != 0 {
2078 err = errnoErr(e1)
2079 }
2080 return
2081 }
2082
2083 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2084
2085 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
2086 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
2087 if e1 != 0 {
2088 err = errnoErr(e1)
2089 }
2090 return
2091 }
2092
2093 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2094
2095 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
2096 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
2097 if e1 != 0 {
2098 err = errnoErr(e1)
2099 }
2100 return
2101 }
2102
2103 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2104
2105 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
2106 var _p0 unsafe.Pointer
2107 if len(p) > 0 {
2108 _p0 = unsafe.Pointer(&p[0])
2109 } else {
2110 _p0 = unsafe.Pointer(&_zero)
2111 }
2112 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
2113 n = int(r0)
2114 if e1 != 0 {
2115 err = errnoErr(e1)
2116 }
2117 return
2118 }
2119
2120 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2121
2122 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
2123 var _p0 unsafe.Pointer
2124 if len(buf) > 0 {
2125 _p0 = unsafe.Pointer(&buf[0])
2126 } else {
2127 _p0 = unsafe.Pointer(&_zero)
2128 }
2129 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
2130 if e1 != 0 {
2131 err = errnoErr(e1)
2132 }
2133 return
2134 }
2135
2136 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2137
2138 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
2139 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
2140 n = int(r0)
2141 if e1 != 0 {
2142 err = errnoErr(e1)
2143 }
2144 return
2145 }
2146
2147 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2148
2149 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
2150 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
2151 n = int(r0)
2152 if e1 != 0 {
2153 err = errnoErr(e1)
2154 }
2155 return
2156 }
2157
2158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2159
2160 func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
2161 r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
2162 xaddr = uintptr(r0)
2163 if e1 != 0 {
2164 err = errnoErr(e1)
2165 }
2166 return
2167 }
2168
2169 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2170
2171 func Gettimeofday(tv *Timeval) (err error) {
2172 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
2173 if e1 != 0 {
2174 err = errnoErr(e1)
2175 }
2176 return
2177 }
2178
2179 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2180
2181 func pipe2(p *[2]_C_int, flags int) (err error) {
2182 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
2183 if e1 != 0 {
2184 err = errnoErr(e1)
2185 }
2186 return
2187 }
0 // mksyscall.pl -tags linux,s390x syscall_linux.go syscall_linux_s390x.go
0 // go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build linux,s390x
142142
143143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
144144
145 func utimes(path string, times *[2]Timeval) (err error) {
146 var _p0 *byte
147 _p0, err = BytePtrFromString(path)
148 if err != nil {
149 return
150 }
151 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
152 if e1 != 0 {
153 err = errnoErr(e1)
154 }
155 return
156 }
157
158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
159
160145 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
161146 var _p0 *byte
162147 _p0, err = BytePtrFromString(path)
164149 return
165150 }
166151 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
167 if e1 != 0 {
168 err = errnoErr(e1)
169 }
170 return
171 }
172
173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
174
175 func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
176 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
177152 if e1 != 0 {
178153 err = errnoErr(e1)
179154 }
441416
442417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
443418
419 func ClockGetres(clockid int32, res *Timespec) (err error) {
420 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
421 if e1 != 0 {
422 err = errnoErr(e1)
423 }
424 return
425 }
426
427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
428
444429 func ClockGettime(clockid int32, time *Timespec) (err error) {
445430 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
431 if e1 != 0 {
432 err = errnoErr(e1)
433 }
434 return
435 }
436
437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
438
439 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
440 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
446441 if e1 != 0 {
447442 err = errnoErr(e1)
448443 }
472467
473468 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
474469
470 func DeleteModule(name string, flags int) (err error) {
471 var _p0 *byte
472 _p0, err = BytePtrFromString(name)
473 if err != nil {
474 return
475 }
476 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
477 if e1 != 0 {
478 err = errnoErr(e1)
479 }
480 return
481 }
482
483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
484
475485 func Dup(oldfd int) (fd int, err error) {
476486 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
477487 fd = int(r0)
493503
494504 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
495505
496 func EpollCreate(size int) (fd int, err error) {
497 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
498 fd = int(r0)
499 if e1 != 0 {
500 err = errnoErr(e1)
501 }
502 return
503 }
504
505 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
506
507506 func EpollCreate1(flag int) (fd int, err error) {
508507 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
509508 fd = int(r0)
537536 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
538537
539538 func Exit(code int) {
540 Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
541 return
542 }
543
544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545
546 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
547 var _p0 *byte
548 _p0, err = BytePtrFromString(path)
549 if err != nil {
550 return
551 }
552 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
553 if e1 != 0 {
554 err = errnoErr(e1)
555 }
539 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
556540 return
557541 }
558542
624608
625609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
626610
611 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
612 var _p0 *byte
613 _p0, err = BytePtrFromString(attr)
614 if err != nil {
615 return
616 }
617 var _p1 unsafe.Pointer
618 if len(dest) > 0 {
619 _p1 = unsafe.Pointer(&dest[0])
620 } else {
621 _p1 = unsafe.Pointer(&_zero)
622 }
623 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
624 sz = int(r0)
625 if e1 != 0 {
626 err = errnoErr(e1)
627 }
628 return
629 }
630
631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
632
633 func FinitModule(fd int, params string, flags int) (err error) {
634 var _p0 *byte
635 _p0, err = BytePtrFromString(params)
636 if err != nil {
637 return
638 }
639 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
640 if e1 != 0 {
641 err = errnoErr(e1)
642 }
643 return
644 }
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func Flistxattr(fd int, dest []byte) (sz int, err error) {
649 var _p0 unsafe.Pointer
650 if len(dest) > 0 {
651 _p0 = unsafe.Pointer(&dest[0])
652 } else {
653 _p0 = unsafe.Pointer(&_zero)
654 }
655 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
656 sz = int(r0)
657 if e1 != 0 {
658 err = errnoErr(e1)
659 }
660 return
661 }
662
663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
664
627665 func Flock(fd int, how int) (err error) {
628666 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
667 if e1 != 0 {
668 err = errnoErr(e1)
669 }
670 return
671 }
672
673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674
675 func Fremovexattr(fd int, attr string) (err error) {
676 var _p0 *byte
677 _p0, err = BytePtrFromString(attr)
678 if err != nil {
679 return
680 }
681 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
682 if e1 != 0 {
683 err = errnoErr(e1)
684 }
685 return
686 }
687
688 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
689
690 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
691 var _p0 *byte
692 _p0, err = BytePtrFromString(attr)
693 if err != nil {
694 return
695 }
696 var _p1 unsafe.Pointer
697 if len(dest) > 0 {
698 _p1 = unsafe.Pointer(&dest[0])
699 } else {
700 _p1 = unsafe.Pointer(&_zero)
701 }
702 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
629703 if e1 != 0 {
630704 err = errnoErr(e1)
631705 }
673747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674748
675749 func Getpid() (pid int) {
676 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
750 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
677751 pid = int(r0)
678752 return
679753 }
681755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
682756
683757 func Getppid() (ppid int) {
684 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
758 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
685759 ppid = int(r0)
686760 return
687761 }
738812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
739813
740814 func Gettid() (tid int) {
741 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
815 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
742816 tid = int(r0)
743817 return
744818 }
764838 }
765839 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
766840 sz = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func InitModule(moduleImage []byte, params string) (err error) {
850 var _p0 unsafe.Pointer
851 if len(moduleImage) > 0 {
852 _p0 = unsafe.Pointer(&moduleImage[0])
853 } else {
854 _p0 = unsafe.Pointer(&_zero)
855 }
856 var _p1 *byte
857 _p1, err = BytePtrFromString(params)
858 if err != nil {
859 return
860 }
861 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
767862 if e1 != 0 {
768863 err = errnoErr(e1)
769864 }
9541049
9551050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9561051
1052 func MemfdCreate(name string, flags int) (fd int, err error) {
1053 var _p0 *byte
1054 _p0, err = BytePtrFromString(name)
1055 if err != nil {
1056 return
1057 }
1058 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1059 fd = int(r0)
1060 if e1 != 0 {
1061 err = errnoErr(e1)
1062 }
1063 return
1064 }
1065
1066 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1067
9571068 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
9581069 var _p0 *byte
9591070 _p0, err = BytePtrFromString(path)
9861097
9871098 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
9881099 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1100 if e1 != 0 {
1101 err = errnoErr(e1)
1102 }
1103 return
1104 }
1105
1106 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1107
1108 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
1109 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
1110 fd = int(r0)
9891111 if e1 != 0 {
9901112 err = errnoErr(e1)
9911113 }
10821204
10831205 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10841206
1085 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1207 func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
10861208 var _p0 *byte
10871209 _p0, err = BytePtrFromString(oldpath)
10881210 if err != nil {
10931215 if err != nil {
10941216 return
10951217 }
1096 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1218 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
10971219 if e1 != 0 {
10981220 err = errnoErr(e1)
10991221 }
12371359
12381360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12391361
1362 func Signalfd(fd int, mask *Sigset_t, flags int) {
1363 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
1364 return
1365 }
1366
1367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1368
1369 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
1370 var _p0 *byte
1371 _p0, err = BytePtrFromString(path)
1372 if err != nil {
1373 return
1374 }
1375 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
12401384 func Sync() {
1241 Syscall(SYS_SYNC, 0, 0, 0)
1385 SyscallNoError(SYS_SYNC, 0, 0, 0)
12421386 return
12431387 }
12441388
12971441 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12981442
12991443 func Umask(mask int) (oldmask int) {
1300 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
1444 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
13011445 oldmask = int(r0)
13021446 return
13031447 }
13311475
13321476 func Unshare(flags int) (err error) {
13331477 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
1334 if e1 != 0 {
1335 err = errnoErr(e1)
1336 }
1337 return
1338 }
1339
1340 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1341
1342 func Ustat(dev int, ubuf *Ustat_t) (err error) {
1343 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
13441478 if e1 != 0 {
13451479 err = errnoErr(e1)
13461480 }
15081642
15091643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15101644
1645 func faccessat(dirfd int, path string, mode uint32) (err error) {
1646 var _p0 *byte
1647 _p0, err = BytePtrFromString(path)
1648 if err != nil {
1649 return
1650 }
1651 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1652 if e1 != 0 {
1653 err = errnoErr(e1)
1654 }
1655 return
1656 }
1657
1658 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1659
15111660 func Dup2(oldfd int, newfd int) (err error) {
15121661 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
1662 if e1 != 0 {
1663 err = errnoErr(e1)
1664 }
1665 return
1666 }
1667
1668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1669
1670 func EpollCreate(size int) (fd int, err error) {
1671 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
1672 fd = int(r0)
15131673 if e1 != 0 {
15141674 err = errnoErr(e1)
15151675 }
15651725
15661726 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15671727
1728 func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
1729 var _p0 *byte
1730 _p0, err = BytePtrFromString(path)
1731 if err != nil {
1732 return
1733 }
1734 _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
1735 if e1 != 0 {
1736 err = errnoErr(e1)
1737 }
1738 return
1739 }
1740
1741 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1742
15681743 func Fstatfs(fd int, buf *Statfs_t) (err error) {
15691744 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
15701745 if e1 != 0 {
15861761 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15871762
15881763 func Getegid() (egid int) {
1589 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
1764 r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
15901765 egid = int(r0)
15911766 return
15921767 }
15941769 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15951770
15961771 func Geteuid() (euid int) {
1597 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
1772 r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
15981773 euid = int(r0)
15991774 return
16001775 }
16021777 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16031778
16041779 func Getgid() (gid int) {
1605 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
1780 r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
16061781 gid = int(r0)
16071782 return
16081783 }
16201795 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16211796
16221797 func Getuid() (uid int) {
1623 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
1798 r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
16241799 uid = int(r0)
16251800 return
16261801 }
17121887
17131888 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
17141889
1890 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1891 var _p0 *byte
1892 _p0, err = BytePtrFromString(oldpath)
1893 if err != nil {
1894 return
1895 }
1896 var _p1 *byte
1897 _p1, err = BytePtrFromString(newpath)
1898 if err != nil {
1899 return
1900 }
1901 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1902 if e1 != 0 {
1903 err = errnoErr(e1)
1904 }
1905 return
1906 }
1907
1908 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1909
17151910 func Seek(fd int, offset int64, whence int) (off int64, err error) {
17161911 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
17171912 off = int64(r0)
18812076
18822077 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
18832078
2079 func Ustat(dev int, ubuf *Ustat_t) (err error) {
2080 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
2081 if e1 != 0 {
2082 err = errnoErr(e1)
2083 }
2084 return
2085 }
2086
2087 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2088
18842089 func getgroups(n int, list *_Gid_t) (nn int, err error) {
18852090 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
18862091 nn = int(r0)
19022107
19032108 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
19042109
2110 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
2111 var _p0 *byte
2112 _p0, err = BytePtrFromString(path)
2113 if err != nil {
2114 return
2115 }
2116 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
2117 if e1 != 0 {
2118 err = errnoErr(e1)
2119 }
2120 return
2121 }
2122
2123 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2124
19052125 func Gettimeofday(tv *Timeval) (err error) {
19062126 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
19072127 if e1 != 0 {
19192139 return
19202140 }
19212141 _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
2142 if e1 != 0 {
2143 err = errnoErr(e1)
2144 }
2145 return
2146 }
2147
2148 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2149
2150 func utimes(path string, times *[2]Timeval) (err error) {
2151 var _p0 *byte
2152 _p0, err = BytePtrFromString(path)
2153 if err != nil {
2154 return
2155 }
2156 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
19222157 if e1 != 0 {
19232158 err = errnoErr(e1)
19242159 }
19452180 }
19462181 return
19472182 }
2183
2184 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2185
2186 func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
2187 var _p0 *byte
2188 _p0, err = BytePtrFromString(cmdline)
2189 if err != nil {
2190 return
2191 }
2192 _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
2193 if e1 != 0 {
2194 err = errnoErr(e1)
2195 }
2196 return
2197 }
0 // mksyscall.pl -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go
0 // go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build linux,sparc64
1313
1414 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1515
16 func fchmodat(dirfd int, path string, mode uint32) (err error) {
17 var _p0 *byte
18 _p0, err = BytePtrFromString(path)
19 if err != nil {
20 return
21 }
22 _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
23 if e1 != 0 {
24 err = errnoErr(e1)
25 }
26 return
27 }
28
29 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
30
31 func ioctl(fd int, req uint, arg uintptr) (err error) {
32 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
33 if e1 != 0 {
34 err = errnoErr(e1)
35 }
36 return
37 }
38
39 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
40
1641 func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
1742 var _p0 *byte
1843 _p0, err = BytePtrFromString(oldpath)
117142
118143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
119144
120 func utimes(path string, times *[2]Timeval) (err error) {
121 var _p0 *byte
122 _p0, err = BytePtrFromString(path)
123 if err != nil {
124 return
125 }
126 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
127 if e1 != 0 {
128 err = errnoErr(e1)
129 }
130 return
131 }
132
133 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
134
135145 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
136146 var _p0 *byte
137147 _p0, err = BytePtrFromString(path)
139149 return
140150 }
141151 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
142 if e1 != 0 {
143 err = errnoErr(e1)
144 }
145 return
146 }
147
148 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
149
150 func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
151 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
152152 if e1 != 0 {
153153 err = errnoErr(e1)
154154 }
185185
186186 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
187187
188 func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
189 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
190 ret = int(r0)
191 if e1 != 0 {
192 err = errnoErr(e1)
193 }
194 return
195 }
196
197 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
198
199 func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
200 var _p0 unsafe.Pointer
201 if len(buf) > 0 {
202 _p0 = unsafe.Pointer(&buf[0])
203 } else {
204 _p0 = unsafe.Pointer(&_zero)
205 }
206 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
207 ret = int(r0)
208 if e1 != 0 {
209 err = errnoErr(e1)
210 }
211 return
212 }
213
214 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
215
216 func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
217 var _p0 *byte
218 _p0, err = BytePtrFromString(arg2)
219 if err != nil {
220 return
221 }
222 r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
223 ret = int(r0)
224 if e1 != 0 {
225 err = errnoErr(e1)
226 }
227 return
228 }
229
230 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
231
232 func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
233 var _p0 *byte
234 _p0, err = BytePtrFromString(arg3)
235 if err != nil {
236 return
237 }
238 var _p1 *byte
239 _p1, err = BytePtrFromString(arg4)
240 if err != nil {
241 return
242 }
243 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
244 ret = int(r0)
245 if e1 != 0 {
246 err = errnoErr(e1)
247 }
248 return
249 }
250
251 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
252
253 func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
254 var _p0 unsafe.Pointer
255 if len(payload) > 0 {
256 _p0 = unsafe.Pointer(&payload[0])
257 } else {
258 _p0 = unsafe.Pointer(&_zero)
259 }
260 _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
261 if e1 != 0 {
262 err = errnoErr(e1)
263 }
264 return
265 }
266
267 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
268
269 func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
270 var _p0 unsafe.Pointer
271 if len(buf) > 0 {
272 _p0 = unsafe.Pointer(&buf[0])
273 } else {
274 _p0 = unsafe.Pointer(&_zero)
275 }
276 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
277 ret = int(r0)
278 if e1 != 0 {
279 err = errnoErr(e1)
280 }
281 return
282 }
283
284 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
285
188286 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
189287 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
190288 if e1 != 0 {
242340 return
243341 }
244342 _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
343 if e1 != 0 {
344 err = errnoErr(e1)
345 }
346 return
347 }
348
349 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
350
351 func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
352 var _p0 *byte
353 _p0, err = BytePtrFromString(keyType)
354 if err != nil {
355 return
356 }
357 var _p1 *byte
358 _p1, err = BytePtrFromString(description)
359 if err != nil {
360 return
361 }
362 var _p2 unsafe.Pointer
363 if len(payload) > 0 {
364 _p2 = unsafe.Pointer(&payload[0])
365 } else {
366 _p2 = unsafe.Pointer(&_zero)
367 }
368 r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
369 id = int(r0)
245370 if e1 != 0 {
246371 err = errnoErr(e1)
247372 }
291416
292417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
293418
419 func ClockGetres(clockid int32, res *Timespec) (err error) {
420 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
421 if e1 != 0 {
422 err = errnoErr(e1)
423 }
424 return
425 }
426
427 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
428
294429 func ClockGettime(clockid int32, time *Timespec) (err error) {
295430 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
431 if e1 != 0 {
432 err = errnoErr(e1)
433 }
434 return
435 }
436
437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
438
439 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
440 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
296441 if e1 != 0 {
297442 err = errnoErr(e1)
298443 }
322467
323468 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
324469
470 func DeleteModule(name string, flags int) (err error) {
471 var _p0 *byte
472 _p0, err = BytePtrFromString(name)
473 if err != nil {
474 return
475 }
476 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
477 if e1 != 0 {
478 err = errnoErr(e1)
479 }
480 return
481 }
482
483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
484
325485 func Dup(oldfd int) (fd int, err error) {
326486 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
327487 fd = int(r0)
343503
344504 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
345505
346 func EpollCreate(size int) (fd int, err error) {
347 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
348 fd = int(r0)
349 if e1 != 0 {
350 err = errnoErr(e1)
351 }
352 return
353 }
354
355 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
356
357506 func EpollCreate1(flag int) (fd int, err error) {
358507 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
359508 fd = int(r0)
375524
376525 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
377526
527 func Eventfd(initval uint, flags int) (fd int, err error) {
528 r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
529 fd = int(r0)
530 if e1 != 0 {
531 err = errnoErr(e1)
532 }
533 return
534 }
535
536 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
537
378538 func Exit(code int) {
379 Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
380 return
381 }
382
383 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
384
385 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
386 var _p0 *byte
387 _p0, err = BytePtrFromString(path)
388 if err != nil {
389 return
390 }
391 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
392 if e1 != 0 {
393 err = errnoErr(e1)
394 }
539 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
395540 return
396541 }
397542
419564
420565 func Fchmod(fd int, mode uint32) (err error) {
421566 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
422 if e1 != 0 {
423 err = errnoErr(e1)
424 }
425 return
426 }
427
428 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
429
430 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
431 var _p0 *byte
432 _p0, err = BytePtrFromString(path)
433 if err != nil {
434 return
435 }
436 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
437567 if e1 != 0 {
438568 err = errnoErr(e1)
439569 }
478608
479609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
480610
611 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
612 var _p0 *byte
613 _p0, err = BytePtrFromString(attr)
614 if err != nil {
615 return
616 }
617 var _p1 unsafe.Pointer
618 if len(dest) > 0 {
619 _p1 = unsafe.Pointer(&dest[0])
620 } else {
621 _p1 = unsafe.Pointer(&_zero)
622 }
623 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
624 sz = int(r0)
625 if e1 != 0 {
626 err = errnoErr(e1)
627 }
628 return
629 }
630
631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
632
633 func FinitModule(fd int, params string, flags int) (err error) {
634 var _p0 *byte
635 _p0, err = BytePtrFromString(params)
636 if err != nil {
637 return
638 }
639 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
640 if e1 != 0 {
641 err = errnoErr(e1)
642 }
643 return
644 }
645
646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
647
648 func Flistxattr(fd int, dest []byte) (sz int, err error) {
649 var _p0 unsafe.Pointer
650 if len(dest) > 0 {
651 _p0 = unsafe.Pointer(&dest[0])
652 } else {
653 _p0 = unsafe.Pointer(&_zero)
654 }
655 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
656 sz = int(r0)
657 if e1 != 0 {
658 err = errnoErr(e1)
659 }
660 return
661 }
662
663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
664
481665 func Flock(fd int, how int) (err error) {
482666 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
667 if e1 != 0 {
668 err = errnoErr(e1)
669 }
670 return
671 }
672
673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
674
675 func Fremovexattr(fd int, attr string) (err error) {
676 var _p0 *byte
677 _p0, err = BytePtrFromString(attr)
678 if err != nil {
679 return
680 }
681 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
682 if e1 != 0 {
683 err = errnoErr(e1)
684 }
685 return
686 }
687
688 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
689
690 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
691 var _p0 *byte
692 _p0, err = BytePtrFromString(attr)
693 if err != nil {
694 return
695 }
696 var _p1 unsafe.Pointer
697 if len(dest) > 0 {
698 _p1 = unsafe.Pointer(&dest[0])
699 } else {
700 _p1 = unsafe.Pointer(&_zero)
701 }
702 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
483703 if e1 != 0 {
484704 err = errnoErr(e1)
485705 }
527747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
528748
529749 func Getpid() (pid int) {
530 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
750 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
531751 pid = int(r0)
532752 return
533753 }
535755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
536756
537757 func Getppid() (ppid int) {
538 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
758 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
539759 ppid = int(r0)
540760 return
541761 }
592812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
593813
594814 func Gettid() (tid int) {
595 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
815 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
596816 tid = int(r0)
597817 return
598818 }
618838 }
619839 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
620840 sz = int(r0)
841 if e1 != 0 {
842 err = errnoErr(e1)
843 }
844 return
845 }
846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
849 func InitModule(moduleImage []byte, params string) (err error) {
850 var _p0 unsafe.Pointer
851 if len(moduleImage) > 0 {
852 _p0 = unsafe.Pointer(&moduleImage[0])
853 } else {
854 _p0 = unsafe.Pointer(&_zero)
855 }
856 var _p1 *byte
857 _p1, err = BytePtrFromString(params)
858 if err != nil {
859 return
860 }
861 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
621862 if e1 != 0 {
622863 err = errnoErr(e1)
623864 }
691932
692933 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
693934
935 func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
936 var _p0 *byte
937 _p0, err = BytePtrFromString(path)
938 if err != nil {
939 return
940 }
941 var _p1 *byte
942 _p1, err = BytePtrFromString(attr)
943 if err != nil {
944 return
945 }
946 var _p2 unsafe.Pointer
947 if len(dest) > 0 {
948 _p2 = unsafe.Pointer(&dest[0])
949 } else {
950 _p2 = unsafe.Pointer(&_zero)
951 }
952 r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
953 sz = int(r0)
954 if e1 != 0 {
955 err = errnoErr(e1)
956 }
957 return
958 }
959
960 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
961
694962 func Listxattr(path string, dest []byte) (sz int, err error) {
695963 var _p0 *byte
696964 _p0, err = BytePtrFromString(path)
713981
714982 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
715983
984 func Llistxattr(path string, dest []byte) (sz int, err error) {
985 var _p0 *byte
986 _p0, err = BytePtrFromString(path)
987 if err != nil {
988 return
989 }
990 var _p1 unsafe.Pointer
991 if len(dest) > 0 {
992 _p1 = unsafe.Pointer(&dest[0])
993 } else {
994 _p1 = unsafe.Pointer(&_zero)
995 }
996 r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
997 sz = int(r0)
998 if e1 != 0 {
999 err = errnoErr(e1)
1000 }
1001 return
1002 }
1003
1004 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1005
1006 func Lremovexattr(path string, attr string) (err error) {
1007 var _p0 *byte
1008 _p0, err = BytePtrFromString(path)
1009 if err != nil {
1010 return
1011 }
1012 var _p1 *byte
1013 _p1, err = BytePtrFromString(attr)
1014 if err != nil {
1015 return
1016 }
1017 _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1018 if e1 != 0 {
1019 err = errnoErr(e1)
1020 }
1021 return
1022 }
1023
1024 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1025
1026 func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
1027 var _p0 *byte
1028 _p0, err = BytePtrFromString(path)
1029 if err != nil {
1030 return
1031 }
1032 var _p1 *byte
1033 _p1, err = BytePtrFromString(attr)
1034 if err != nil {
1035 return
1036 }
1037 var _p2 unsafe.Pointer
1038 if len(data) > 0 {
1039 _p2 = unsafe.Pointer(&data[0])
1040 } else {
1041 _p2 = unsafe.Pointer(&_zero)
1042 }
1043 _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
1044 if e1 != 0 {
1045 err = errnoErr(e1)
1046 }
1047 return
1048 }
1049
1050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1051
1052 func MemfdCreate(name string, flags int) (fd int, err error) {
1053 var _p0 *byte
1054 _p0, err = BytePtrFromString(name)
1055 if err != nil {
1056 return
1057 }
1058 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1059 fd = int(r0)
1060 if e1 != 0 {
1061 err = errnoErr(e1)
1062 }
1063 return
1064 }
1065
1066 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1067
7161068 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
7171069 var _p0 *byte
7181070 _p0, err = BytePtrFromString(path)
7531105
7541106 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7551107
1108 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
1109 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
1110 fd = int(r0)
1111 if e1 != 0 {
1112 err = errnoErr(e1)
1113 }
1114 return
1115 }
1116
1117 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1118
7561119 func PivotRoot(newroot string, putold string) (err error) {
7571120 var _p0 *byte
7581121 _p0, err = BytePtrFromString(newroot)
7851148
7861149 func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
7871150 _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
1151 if e1 != 0 {
1152 err = errnoErr(e1)
1153 }
1154 return
1155 }
1156
1157 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1158
1159 func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
1160 r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
1161 n = int(r0)
7881162 if e1 != 0 {
7891163 err = errnoErr(e1)
7901164 }
8301204
8311205 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8321206
833 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1207 func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
8341208 var _p0 *byte
8351209 _p0, err = BytePtrFromString(oldpath)
8361210 if err != nil {
8411215 if err != nil {
8421216 return
8431217 }
844 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1218 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1219 if e1 != 0 {
1220 err = errnoErr(e1)
1221 }
1222 return
1223 }
1224
1225 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1226
1227 func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
1228 var _p0 *byte
1229 _p0, err = BytePtrFromString(keyType)
1230 if err != nil {
1231 return
1232 }
1233 var _p1 *byte
1234 _p1, err = BytePtrFromString(description)
1235 if err != nil {
1236 return
1237 }
1238 var _p2 *byte
1239 _p2, err = BytePtrFromString(callback)
1240 if err != nil {
1241 return
1242 }
1243 r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
1244 id = int(r0)
8451245 if e1 != 0 {
8461246 err = errnoErr(e1)
8471247 }
9591359
9601360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9611361
1362 func Signalfd(fd int, mask *Sigset_t, flags int) {
1363 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
1364 return
1365 }
1366
1367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1368
1369 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
1370 var _p0 *byte
1371 _p0, err = BytePtrFromString(path)
1372 if err != nil {
1373 return
1374 }
1375 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
1376 if e1 != 0 {
1377 err = errnoErr(e1)
1378 }
1379 return
1380 }
1381
1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1383
9621384 func Sync() {
963 Syscall(SYS_SYNC, 0, 0, 0)
1385 SyscallNoError(SYS_SYNC, 0, 0, 0)
1386 return
1387 }
1388
1389 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1390
1391 func Syncfs(fd int) (err error) {
1392 _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
1393 if e1 != 0 {
1394 err = errnoErr(e1)
1395 }
9641396 return
9651397 }
9661398
10091441 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10101442
10111443 func Umask(mask int) (oldmask int) {
1012 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
1444 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
10131445 oldmask = int(r0)
10141446 return
10151447 }
10431475
10441476 func Unshare(flags int) (err error) {
10451477 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
1046 if e1 != 0 {
1047 err = errnoErr(e1)
1048 }
1049 return
1050 }
1051
1052 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1053
1054 func Ustat(dev int, ubuf *Ustat_t) (err error) {
1055 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
10561478 if e1 != 0 {
10571479 err = errnoErr(e1)
10581480 }
11681590
11691591 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11701592
1593 func Mlockall(flags int) (err error) {
1594 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
1595 if e1 != 0 {
1596 err = errnoErr(e1)
1597 }
1598 return
1599 }
1600
1601 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1602
1603 func Msync(b []byte, flags int) (err error) {
1604 var _p0 unsafe.Pointer
1605 if len(b) > 0 {
1606 _p0 = unsafe.Pointer(&b[0])
1607 } else {
1608 _p0 = unsafe.Pointer(&_zero)
1609 }
1610 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
1611 if e1 != 0 {
1612 err = errnoErr(e1)
1613 }
1614 return
1615 }
1616
1617 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1618
11711619 func Munlock(b []byte) (err error) {
11721620 var _p0 unsafe.Pointer
11731621 if len(b) > 0 {
11841632
11851633 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11861634
1187 func Mlockall(flags int) (err error) {
1188 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
1189 if e1 != 0 {
1190 err = errnoErr(e1)
1191 }
1192 return
1193 }
1194
1195 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1196
11971635 func Munlockall() (err error) {
11981636 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
1637 if e1 != 0 {
1638 err = errnoErr(e1)
1639 }
1640 return
1641 }
1642
1643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1644
1645 func faccessat(dirfd int, path string, mode uint32) (err error) {
1646 var _p0 *byte
1647 _p0, err = BytePtrFromString(path)
1648 if err != nil {
1649 return
1650 }
1651 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
11991652 if e1 != 0 {
12001653 err = errnoErr(e1)
12011654 }
12211674
12221675 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12231676
1677 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
1678 _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
1679 if e1 != 0 {
1680 err = errnoErr(e1)
1681 }
1682 return
1683 }
1684
1685 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1686
12241687 func Dup2(oldfd int, newfd int) (err error) {
12251688 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
12261689 if e1 != 0 {
12511714
12521715 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12531716
1717 func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
1718 var _p0 *byte
1719 _p0, err = BytePtrFromString(path)
1720 if err != nil {
1721 return
1722 }
1723 _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
1724 if e1 != 0 {
1725 err = errnoErr(e1)
1726 }
1727 return
1728 }
1729
1730 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1731
12541732 func Fstatfs(fd int, buf *Statfs_t) (err error) {
12551733 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
12561734 if e1 != 0 {
12721750 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12731751
12741752 func Getegid() (egid int) {
1275 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
1753 r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
12761754 egid = int(r0)
12771755 return
12781756 }
12801758 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12811759
12821760 func Geteuid() (euid int) {
1283 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
1761 r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
12841762 euid = int(r0)
12851763 return
12861764 }
12881766 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12891767
12901768 func Getgid() (gid int) {
1291 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
1769 r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
12921770 gid = int(r0)
12931771 return
12941772 }
13061784 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13071785
13081786 func Getuid() (uid int) {
1309 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
1787 r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
13101788 uid = int(r0)
13111789 return
13121790 }
14081886
14091887 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14101888
1889 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
1890 var _p0 *byte
1891 _p0, err = BytePtrFromString(oldpath)
1892 if err != nil {
1893 return
1894 }
1895 var _p1 *byte
1896 _p1, err = BytePtrFromString(newpath)
1897 if err != nil {
1898 return
1899 }
1900 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1901 if e1 != 0 {
1902 err = errnoErr(e1)
1903 }
1904 return
1905 }
1906
1907 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1908
14111909 func Seek(fd int, offset int64, whence int) (off int64, err error) {
14121910 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
14131911 off = int64(r0)
17772275
17782276 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
17792277
2278 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
2279 var _p0 *byte
2280 _p0, err = BytePtrFromString(path)
2281 if err != nil {
2282 return
2283 }
2284 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
2285 if e1 != 0 {
2286 err = errnoErr(e1)
2287 }
2288 return
2289 }
2290
2291 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2292
17802293 func Gettimeofday(tv *Timeval) (err error) {
17812294 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
17822295 if e1 != 0 {
17942307 return
17952308 }
17962309 _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
2310 if e1 != 0 {
2311 err = errnoErr(e1)
2312 }
2313 return
2314 }
2315
2316 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2317
2318 func utimes(path string, times *[2]Timeval) (err error) {
2319 var _p0 *byte
2320 _p0, err = BytePtrFromString(path)
2321 if err != nil {
2322 return
2323 }
2324 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
17972325 if e1 != 0 {
17982326 err = errnoErr(e1)
17992327 }
0 // mksyscall.pl -l32 -netbsd -tags netbsd,386 syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go
0 // go run mksyscall.go -l32 -netbsd -tags netbsd,386 syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build netbsd,386
265265
266266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
268279 func Madvise(b []byte, behav int) (err error) {
269280 var _p0 unsafe.Pointer
270281 if len(b) > 0 {
394405
395406 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
396407
408 func Getcwd(buf []byte) (n int, err error) {
409 var _p0 unsafe.Pointer
410 if len(buf) > 0 {
411 _p0 = unsafe.Pointer(&buf[0])
412 } else {
413 _p0 = unsafe.Pointer(&_zero)
414 }
415 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
416 n = int(r0)
417 if e1 != 0 {
418 err = errnoErr(e1)
419 }
420 return
421 }
422
423 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
424
425 func ioctl(fd int, req uint, arg uintptr) (err error) {
426 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
427 if e1 != 0 {
428 err = errnoErr(e1)
429 }
430 return
431 }
432
433 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
434
397435 func Access(path string, mode uint32) (err error) {
398436 var _p0 *byte
399437 _p0, err = BytePtrFromString(path)
532570
533571 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
534572
573 func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
574 var _p0 *byte
575 _p0, err = BytePtrFromString(attrname)
576 if err != nil {
577 return
578 }
579 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
580 ret = int(r0)
581 if e1 != 0 {
582 err = errnoErr(e1)
583 }
584 return
585 }
586
587 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
588
589 func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
590 var _p0 *byte
591 _p0, err = BytePtrFromString(attrname)
592 if err != nil {
593 return
594 }
595 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
596 ret = int(r0)
597 if e1 != 0 {
598 err = errnoErr(e1)
599 }
600 return
601 }
602
603 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
604
605 func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
606 var _p0 *byte
607 _p0, err = BytePtrFromString(attrname)
608 if err != nil {
609 return
610 }
611 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
612 if e1 != 0 {
613 err = errnoErr(e1)
614 }
615 return
616 }
617
618 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
619
620 func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
621 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
622 ret = int(r0)
623 if e1 != 0 {
624 err = errnoErr(e1)
625 }
626 return
627 }
628
629 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
630
631 func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
632 var _p0 *byte
633 _p0, err = BytePtrFromString(file)
634 if err != nil {
635 return
636 }
637 var _p1 *byte
638 _p1, err = BytePtrFromString(attrname)
639 if err != nil {
640 return
641 }
642 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
643 ret = int(r0)
644 if e1 != 0 {
645 err = errnoErr(e1)
646 }
647 return
648 }
649
650 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
651
652 func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
653 var _p0 *byte
654 _p0, err = BytePtrFromString(file)
655 if err != nil {
656 return
657 }
658 var _p1 *byte
659 _p1, err = BytePtrFromString(attrname)
660 if err != nil {
661 return
662 }
663 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
664 ret = int(r0)
665 if e1 != 0 {
666 err = errnoErr(e1)
667 }
668 return
669 }
670
671 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
672
673 func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
674 var _p0 *byte
675 _p0, err = BytePtrFromString(file)
676 if err != nil {
677 return
678 }
679 var _p1 *byte
680 _p1, err = BytePtrFromString(attrname)
681 if err != nil {
682 return
683 }
684 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
685 if e1 != 0 {
686 err = errnoErr(e1)
687 }
688 return
689 }
690
691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
692
693 func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
694 var _p0 *byte
695 _p0, err = BytePtrFromString(file)
696 if err != nil {
697 return
698 }
699 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
700 ret = int(r0)
701 if e1 != 0 {
702 err = errnoErr(e1)
703 }
704 return
705 }
706
707 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
708
709 func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
710 var _p0 *byte
711 _p0, err = BytePtrFromString(link)
712 if err != nil {
713 return
714 }
715 var _p1 *byte
716 _p1, err = BytePtrFromString(attrname)
717 if err != nil {
718 return
719 }
720 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
721 ret = int(r0)
722 if e1 != 0 {
723 err = errnoErr(e1)
724 }
725 return
726 }
727
728 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
729
730 func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
731 var _p0 *byte
732 _p0, err = BytePtrFromString(link)
733 if err != nil {
734 return
735 }
736 var _p1 *byte
737 _p1, err = BytePtrFromString(attrname)
738 if err != nil {
739 return
740 }
741 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
742 ret = int(r0)
743 if e1 != 0 {
744 err = errnoErr(e1)
745 }
746 return
747 }
748
749 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
750
751 func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
752 var _p0 *byte
753 _p0, err = BytePtrFromString(link)
754 if err != nil {
755 return
756 }
757 var _p1 *byte
758 _p1, err = BytePtrFromString(attrname)
759 if err != nil {
760 return
761 }
762 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
763 if e1 != 0 {
764 err = errnoErr(e1)
765 }
766 return
767 }
768
769 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
770
771 func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
772 var _p0 *byte
773 _p0, err = BytePtrFromString(link)
774 if err != nil {
775 return
776 }
777 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
778 ret = int(r0)
779 if e1 != 0 {
780 err = errnoErr(e1)
781 }
782 return
783 }
784
785 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
786
787 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
788 var _p0 *byte
789 _p0, err = BytePtrFromString(path)
790 if err != nil {
791 return
792 }
793 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
794 if e1 != 0 {
795 err = errnoErr(e1)
796 }
797 return
798 }
799
800 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
801
802 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
803 _, _, e1 := Syscall9(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), 0, uintptr(length), uintptr(length>>32), uintptr(advice), 0)
804 if e1 != 0 {
805 err = errnoErr(e1)
806 }
807 return
808 }
809
810 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
811
535812 func Fchdir(fd int) (err error) {
536813 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
537814 if e1 != 0 {
562839
563840 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
564841
842 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
843 var _p0 *byte
844 _p0, err = BytePtrFromString(path)
845 if err != nil {
846 return
847 }
848 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
849 if e1 != 0 {
850 err = errnoErr(e1)
851 }
852 return
853 }
854
855 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
856
565857 func Fchown(fd int, uid int, gid int) (err error) {
566858 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
859 if e1 != 0 {
860 err = errnoErr(e1)
861 }
862 return
863 }
864
865 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
866
867 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
868 var _p0 *byte
869 _p0, err = BytePtrFromString(path)
870 if err != nil {
871 return
872 }
873 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
567874 if e1 != 0 {
568875 err = errnoErr(e1)
569876 }
603910
604911 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
605912
913 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
914 var _p0 *byte
915 _p0, err = BytePtrFromString(path)
916 if err != nil {
917 return
918 }
919 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
920 if e1 != 0 {
921 err = errnoErr(e1)
922 }
923 return
924 }
925
926 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
927
606928 func Fsync(fd int) (err error) {
607929 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
608930 if e1 != 0 {
8061128
8071129 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8081130
1131 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
1132 var _p0 *byte
1133 _p0, err = BytePtrFromString(path)
1134 if err != nil {
1135 return
1136 }
1137 var _p1 *byte
1138 _p1, err = BytePtrFromString(link)
1139 if err != nil {
1140 return
1141 }
1142 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1143 if e1 != 0 {
1144 err = errnoErr(e1)
1145 }
1146 return
1147 }
1148
1149 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1150
8091151 func Listen(s int, backlog int) (err error) {
8101152 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
8111153 if e1 != 0 {
8461188
8471189 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8481190
1191 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1192 var _p0 *byte
1193 _p0, err = BytePtrFromString(path)
1194 if err != nil {
1195 return
1196 }
1197 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1198 if e1 != 0 {
1199 err = errnoErr(e1)
1200 }
1201 return
1202 }
1203
1204 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1205
8491206 func Mkfifo(path string, mode uint32) (err error) {
8501207 var _p0 *byte
8511208 _p0, err = BytePtrFromString(path)
8611218
8621219 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8631220
1221 func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
1222 var _p0 *byte
1223 _p0, err = BytePtrFromString(path)
1224 if err != nil {
1225 return
1226 }
1227 _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1228 if e1 != 0 {
1229 err = errnoErr(e1)
1230 }
1231 return
1232 }
1233
1234 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1235
8641236 func Mknod(path string, mode uint32, dev int) (err error) {
8651237 var _p0 *byte
8661238 _p0, err = BytePtrFromString(path)
8681240 return
8691241 }
8701242 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1243 if e1 != 0 {
1244 err = errnoErr(e1)
1245 }
1246 return
1247 }
1248
1249 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1250
1251 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
1252 var _p0 *byte
1253 _p0, err = BytePtrFromString(path)
1254 if err != nil {
1255 return
1256 }
1257 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
8711258 if e1 != 0 {
8721259 err = errnoErr(e1)
8731260 }
8931280 return
8941281 }
8951282 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1283 fd = int(r0)
1284 if e1 != 0 {
1285 err = errnoErr(e1)
1286 }
1287 return
1288 }
1289
1290 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1291
1292 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1293 var _p0 *byte
1294 _p0, err = BytePtrFromString(path)
1295 if err != nil {
1296 return
1297 }
1298 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
8961299 fd = int(r0)
8971300 if e1 != 0 {
8981301 err = errnoErr(e1)
9911394
9921395 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9931396
1397 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1398 var _p0 *byte
1399 _p0, err = BytePtrFromString(path)
1400 if err != nil {
1401 return
1402 }
1403 var _p1 unsafe.Pointer
1404 if len(buf) > 0 {
1405 _p1 = unsafe.Pointer(&buf[0])
1406 } else {
1407 _p1 = unsafe.Pointer(&_zero)
1408 }
1409 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1410 n = int(r0)
1411 if e1 != 0 {
1412 err = errnoErr(e1)
1413 }
1414 return
1415 }
1416
1417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1418
9941419 func Rename(from string, to string) (err error) {
9951420 var _p0 *byte
9961421 _p0, err = BytePtrFromString(from)
10031428 return
10041429 }
10051430 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1431 if e1 != 0 {
1432 err = errnoErr(e1)
1433 }
1434 return
1435 }
1436
1437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1438
1439 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1440 var _p0 *byte
1441 _p0, err = BytePtrFromString(from)
1442 if err != nil {
1443 return
1444 }
1445 var _p1 *byte
1446 _p1, err = BytePtrFromString(to)
1447 if err != nil {
1448 return
1449 }
1450 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
10061451 if e1 != 0 {
10071452 err = errnoErr(e1)
10081453 }
12081653
12091654 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12101655
1656 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
1657 var _p0 *byte
1658 _p0, err = BytePtrFromString(oldpath)
1659 if err != nil {
1660 return
1661 }
1662 var _p1 *byte
1663 _p1, err = BytePtrFromString(newpath)
1664 if err != nil {
1665 return
1666 }
1667 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1668 if e1 != 0 {
1669 err = errnoErr(e1)
1670 }
1671 return
1672 }
1673
1674 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1675
12111676 func Sync() (err error) {
12121677 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
12131678 if e1 != 0 {
12481713 return
12491714 }
12501715 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1716 if e1 != 0 {
1717 err = errnoErr(e1)
1718 }
1719 return
1720 }
1721
1722 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1723
1724 func Unlinkat(dirfd int, path string, flags int) (err error) {
1725 var _p0 *byte
1726 _p0, err = BytePtrFromString(path)
1727 if err != nil {
1728 return
1729 }
1730 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
12511731 if e1 != 0 {
12521732 err = errnoErr(e1)
12531733 }
0 // mksyscall.pl -netbsd -tags netbsd,amd64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go
0 // go run mksyscall.go -netbsd -tags netbsd,amd64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build netbsd,amd64
265265
266266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
268279 func Madvise(b []byte, behav int) (err error) {
269280 var _p0 unsafe.Pointer
270281 if len(b) > 0 {
394405
395406 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
396407
408 func Getcwd(buf []byte) (n int, err error) {
409 var _p0 unsafe.Pointer
410 if len(buf) > 0 {
411 _p0 = unsafe.Pointer(&buf[0])
412 } else {
413 _p0 = unsafe.Pointer(&_zero)
414 }
415 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
416 n = int(r0)
417 if e1 != 0 {
418 err = errnoErr(e1)
419 }
420 return
421 }
422
423 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
424
425 func ioctl(fd int, req uint, arg uintptr) (err error) {
426 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
427 if e1 != 0 {
428 err = errnoErr(e1)
429 }
430 return
431 }
432
433 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
434
397435 func Access(path string, mode uint32) (err error) {
398436 var _p0 *byte
399437 _p0, err = BytePtrFromString(path)
532570
533571 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
534572
573 func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
574 var _p0 *byte
575 _p0, err = BytePtrFromString(attrname)
576 if err != nil {
577 return
578 }
579 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
580 ret = int(r0)
581 if e1 != 0 {
582 err = errnoErr(e1)
583 }
584 return
585 }
586
587 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
588
589 func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
590 var _p0 *byte
591 _p0, err = BytePtrFromString(attrname)
592 if err != nil {
593 return
594 }
595 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
596 ret = int(r0)
597 if e1 != 0 {
598 err = errnoErr(e1)
599 }
600 return
601 }
602
603 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
604
605 func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
606 var _p0 *byte
607 _p0, err = BytePtrFromString(attrname)
608 if err != nil {
609 return
610 }
611 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
612 if e1 != 0 {
613 err = errnoErr(e1)
614 }
615 return
616 }
617
618 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
619
620 func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
621 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
622 ret = int(r0)
623 if e1 != 0 {
624 err = errnoErr(e1)
625 }
626 return
627 }
628
629 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
630
631 func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
632 var _p0 *byte
633 _p0, err = BytePtrFromString(file)
634 if err != nil {
635 return
636 }
637 var _p1 *byte
638 _p1, err = BytePtrFromString(attrname)
639 if err != nil {
640 return
641 }
642 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
643 ret = int(r0)
644 if e1 != 0 {
645 err = errnoErr(e1)
646 }
647 return
648 }
649
650 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
651
652 func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
653 var _p0 *byte
654 _p0, err = BytePtrFromString(file)
655 if err != nil {
656 return
657 }
658 var _p1 *byte
659 _p1, err = BytePtrFromString(attrname)
660 if err != nil {
661 return
662 }
663 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
664 ret = int(r0)
665 if e1 != 0 {
666 err = errnoErr(e1)
667 }
668 return
669 }
670
671 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
672
673 func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
674 var _p0 *byte
675 _p0, err = BytePtrFromString(file)
676 if err != nil {
677 return
678 }
679 var _p1 *byte
680 _p1, err = BytePtrFromString(attrname)
681 if err != nil {
682 return
683 }
684 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
685 if e1 != 0 {
686 err = errnoErr(e1)
687 }
688 return
689 }
690
691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
692
693 func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
694 var _p0 *byte
695 _p0, err = BytePtrFromString(file)
696 if err != nil {
697 return
698 }
699 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
700 ret = int(r0)
701 if e1 != 0 {
702 err = errnoErr(e1)
703 }
704 return
705 }
706
707 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
708
709 func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
710 var _p0 *byte
711 _p0, err = BytePtrFromString(link)
712 if err != nil {
713 return
714 }
715 var _p1 *byte
716 _p1, err = BytePtrFromString(attrname)
717 if err != nil {
718 return
719 }
720 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
721 ret = int(r0)
722 if e1 != 0 {
723 err = errnoErr(e1)
724 }
725 return
726 }
727
728 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
729
730 func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
731 var _p0 *byte
732 _p0, err = BytePtrFromString(link)
733 if err != nil {
734 return
735 }
736 var _p1 *byte
737 _p1, err = BytePtrFromString(attrname)
738 if err != nil {
739 return
740 }
741 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
742 ret = int(r0)
743 if e1 != 0 {
744 err = errnoErr(e1)
745 }
746 return
747 }
748
749 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
750
751 func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
752 var _p0 *byte
753 _p0, err = BytePtrFromString(link)
754 if err != nil {
755 return
756 }
757 var _p1 *byte
758 _p1, err = BytePtrFromString(attrname)
759 if err != nil {
760 return
761 }
762 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
763 if e1 != 0 {
764 err = errnoErr(e1)
765 }
766 return
767 }
768
769 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
770
771 func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
772 var _p0 *byte
773 _p0, err = BytePtrFromString(link)
774 if err != nil {
775 return
776 }
777 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
778 ret = int(r0)
779 if e1 != 0 {
780 err = errnoErr(e1)
781 }
782 return
783 }
784
785 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
786
787 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
788 var _p0 *byte
789 _p0, err = BytePtrFromString(path)
790 if err != nil {
791 return
792 }
793 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
794 if e1 != 0 {
795 err = errnoErr(e1)
796 }
797 return
798 }
799
800 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
801
802 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
803 _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), 0, uintptr(length), uintptr(advice))
804 if e1 != 0 {
805 err = errnoErr(e1)
806 }
807 return
808 }
809
810 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
811
535812 func Fchdir(fd int) (err error) {
536813 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
537814 if e1 != 0 {
562839
563840 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
564841
842 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
843 var _p0 *byte
844 _p0, err = BytePtrFromString(path)
845 if err != nil {
846 return
847 }
848 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
849 if e1 != 0 {
850 err = errnoErr(e1)
851 }
852 return
853 }
854
855 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
856
565857 func Fchown(fd int, uid int, gid int) (err error) {
566858 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
859 if e1 != 0 {
860 err = errnoErr(e1)
861 }
862 return
863 }
864
865 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
866
867 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
868 var _p0 *byte
869 _p0, err = BytePtrFromString(path)
870 if err != nil {
871 return
872 }
873 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
567874 if e1 != 0 {
568875 err = errnoErr(e1)
569876 }
603910
604911 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
605912
913 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
914 var _p0 *byte
915 _p0, err = BytePtrFromString(path)
916 if err != nil {
917 return
918 }
919 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
920 if e1 != 0 {
921 err = errnoErr(e1)
922 }
923 return
924 }
925
926 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
927
606928 func Fsync(fd int) (err error) {
607929 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
608930 if e1 != 0 {
8061128
8071129 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8081130
1131 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
1132 var _p0 *byte
1133 _p0, err = BytePtrFromString(path)
1134 if err != nil {
1135 return
1136 }
1137 var _p1 *byte
1138 _p1, err = BytePtrFromString(link)
1139 if err != nil {
1140 return
1141 }
1142 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1143 if e1 != 0 {
1144 err = errnoErr(e1)
1145 }
1146 return
1147 }
1148
1149 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1150
8091151 func Listen(s int, backlog int) (err error) {
8101152 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
8111153 if e1 != 0 {
8461188
8471189 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8481190
1191 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1192 var _p0 *byte
1193 _p0, err = BytePtrFromString(path)
1194 if err != nil {
1195 return
1196 }
1197 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1198 if e1 != 0 {
1199 err = errnoErr(e1)
1200 }
1201 return
1202 }
1203
1204 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1205
8491206 func Mkfifo(path string, mode uint32) (err error) {
8501207 var _p0 *byte
8511208 _p0, err = BytePtrFromString(path)
8611218
8621219 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8631220
1221 func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
1222 var _p0 *byte
1223 _p0, err = BytePtrFromString(path)
1224 if err != nil {
1225 return
1226 }
1227 _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1228 if e1 != 0 {
1229 err = errnoErr(e1)
1230 }
1231 return
1232 }
1233
1234 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1235
8641236 func Mknod(path string, mode uint32, dev int) (err error) {
8651237 var _p0 *byte
8661238 _p0, err = BytePtrFromString(path)
8681240 return
8691241 }
8701242 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1243 if e1 != 0 {
1244 err = errnoErr(e1)
1245 }
1246 return
1247 }
1248
1249 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1250
1251 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
1252 var _p0 *byte
1253 _p0, err = BytePtrFromString(path)
1254 if err != nil {
1255 return
1256 }
1257 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
8711258 if e1 != 0 {
8721259 err = errnoErr(e1)
8731260 }
8931280 return
8941281 }
8951282 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1283 fd = int(r0)
1284 if e1 != 0 {
1285 err = errnoErr(e1)
1286 }
1287 return
1288 }
1289
1290 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1291
1292 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1293 var _p0 *byte
1294 _p0, err = BytePtrFromString(path)
1295 if err != nil {
1296 return
1297 }
1298 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
8961299 fd = int(r0)
8971300 if e1 != 0 {
8981301 err = errnoErr(e1)
9911394
9921395 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9931396
1397 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1398 var _p0 *byte
1399 _p0, err = BytePtrFromString(path)
1400 if err != nil {
1401 return
1402 }
1403 var _p1 unsafe.Pointer
1404 if len(buf) > 0 {
1405 _p1 = unsafe.Pointer(&buf[0])
1406 } else {
1407 _p1 = unsafe.Pointer(&_zero)
1408 }
1409 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1410 n = int(r0)
1411 if e1 != 0 {
1412 err = errnoErr(e1)
1413 }
1414 return
1415 }
1416
1417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1418
9941419 func Rename(from string, to string) (err error) {
9951420 var _p0 *byte
9961421 _p0, err = BytePtrFromString(from)
10031428 return
10041429 }
10051430 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1431 if e1 != 0 {
1432 err = errnoErr(e1)
1433 }
1434 return
1435 }
1436
1437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1438
1439 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1440 var _p0 *byte
1441 _p0, err = BytePtrFromString(from)
1442 if err != nil {
1443 return
1444 }
1445 var _p1 *byte
1446 _p1, err = BytePtrFromString(to)
1447 if err != nil {
1448 return
1449 }
1450 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
10061451 if e1 != 0 {
10071452 err = errnoErr(e1)
10081453 }
12081653
12091654 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12101655
1656 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
1657 var _p0 *byte
1658 _p0, err = BytePtrFromString(oldpath)
1659 if err != nil {
1660 return
1661 }
1662 var _p1 *byte
1663 _p1, err = BytePtrFromString(newpath)
1664 if err != nil {
1665 return
1666 }
1667 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1668 if e1 != 0 {
1669 err = errnoErr(e1)
1670 }
1671 return
1672 }
1673
1674 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1675
12111676 func Sync() (err error) {
12121677 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
12131678 if e1 != 0 {
12481713 return
12491714 }
12501715 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1716 if e1 != 0 {
1717 err = errnoErr(e1)
1718 }
1719 return
1720 }
1721
1722 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1723
1724 func Unlinkat(dirfd int, path string, flags int) (err error) {
1725 var _p0 *byte
1726 _p0, err = BytePtrFromString(path)
1727 if err != nil {
1728 return
1729 }
1730 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
12511731 if e1 != 0 {
12521732 err = errnoErr(e1)
12531733 }
0 // mksyscall.pl -l32 -netbsd -arm -tags netbsd,arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go
0 // go run mksyscall.go -l32 -netbsd -arm -tags netbsd,arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build netbsd,arm
265265
266266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
268279 func Madvise(b []byte, behav int) (err error) {
269280 var _p0 unsafe.Pointer
270281 if len(b) > 0 {
394405
395406 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
396407
408 func Getcwd(buf []byte) (n int, err error) {
409 var _p0 unsafe.Pointer
410 if len(buf) > 0 {
411 _p0 = unsafe.Pointer(&buf[0])
412 } else {
413 _p0 = unsafe.Pointer(&_zero)
414 }
415 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
416 n = int(r0)
417 if e1 != 0 {
418 err = errnoErr(e1)
419 }
420 return
421 }
422
423 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
424
425 func ioctl(fd int, req uint, arg uintptr) (err error) {
426 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
427 if e1 != 0 {
428 err = errnoErr(e1)
429 }
430 return
431 }
432
433 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
434
397435 func Access(path string, mode uint32) (err error) {
398436 var _p0 *byte
399437 _p0, err = BytePtrFromString(path)
532570
533571 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
534572
573 func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
574 var _p0 *byte
575 _p0, err = BytePtrFromString(attrname)
576 if err != nil {
577 return
578 }
579 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
580 ret = int(r0)
581 if e1 != 0 {
582 err = errnoErr(e1)
583 }
584 return
585 }
586
587 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
588
589 func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
590 var _p0 *byte
591 _p0, err = BytePtrFromString(attrname)
592 if err != nil {
593 return
594 }
595 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
596 ret = int(r0)
597 if e1 != 0 {
598 err = errnoErr(e1)
599 }
600 return
601 }
602
603 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
604
605 func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
606 var _p0 *byte
607 _p0, err = BytePtrFromString(attrname)
608 if err != nil {
609 return
610 }
611 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
612 if e1 != 0 {
613 err = errnoErr(e1)
614 }
615 return
616 }
617
618 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
619
620 func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
621 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
622 ret = int(r0)
623 if e1 != 0 {
624 err = errnoErr(e1)
625 }
626 return
627 }
628
629 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
630
631 func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
632 var _p0 *byte
633 _p0, err = BytePtrFromString(file)
634 if err != nil {
635 return
636 }
637 var _p1 *byte
638 _p1, err = BytePtrFromString(attrname)
639 if err != nil {
640 return
641 }
642 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
643 ret = int(r0)
644 if e1 != 0 {
645 err = errnoErr(e1)
646 }
647 return
648 }
649
650 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
651
652 func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
653 var _p0 *byte
654 _p0, err = BytePtrFromString(file)
655 if err != nil {
656 return
657 }
658 var _p1 *byte
659 _p1, err = BytePtrFromString(attrname)
660 if err != nil {
661 return
662 }
663 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
664 ret = int(r0)
665 if e1 != 0 {
666 err = errnoErr(e1)
667 }
668 return
669 }
670
671 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
672
673 func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
674 var _p0 *byte
675 _p0, err = BytePtrFromString(file)
676 if err != nil {
677 return
678 }
679 var _p1 *byte
680 _p1, err = BytePtrFromString(attrname)
681 if err != nil {
682 return
683 }
684 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
685 if e1 != 0 {
686 err = errnoErr(e1)
687 }
688 return
689 }
690
691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
692
693 func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
694 var _p0 *byte
695 _p0, err = BytePtrFromString(file)
696 if err != nil {
697 return
698 }
699 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
700 ret = int(r0)
701 if e1 != 0 {
702 err = errnoErr(e1)
703 }
704 return
705 }
706
707 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
708
709 func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
710 var _p0 *byte
711 _p0, err = BytePtrFromString(link)
712 if err != nil {
713 return
714 }
715 var _p1 *byte
716 _p1, err = BytePtrFromString(attrname)
717 if err != nil {
718 return
719 }
720 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
721 ret = int(r0)
722 if e1 != 0 {
723 err = errnoErr(e1)
724 }
725 return
726 }
727
728 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
729
730 func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
731 var _p0 *byte
732 _p0, err = BytePtrFromString(link)
733 if err != nil {
734 return
735 }
736 var _p1 *byte
737 _p1, err = BytePtrFromString(attrname)
738 if err != nil {
739 return
740 }
741 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
742 ret = int(r0)
743 if e1 != 0 {
744 err = errnoErr(e1)
745 }
746 return
747 }
748
749 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
750
751 func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
752 var _p0 *byte
753 _p0, err = BytePtrFromString(link)
754 if err != nil {
755 return
756 }
757 var _p1 *byte
758 _p1, err = BytePtrFromString(attrname)
759 if err != nil {
760 return
761 }
762 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
763 if e1 != 0 {
764 err = errnoErr(e1)
765 }
766 return
767 }
768
769 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
770
771 func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
772 var _p0 *byte
773 _p0, err = BytePtrFromString(link)
774 if err != nil {
775 return
776 }
777 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
778 ret = int(r0)
779 if e1 != 0 {
780 err = errnoErr(e1)
781 }
782 return
783 }
784
785 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
786
787 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
788 var _p0 *byte
789 _p0, err = BytePtrFromString(path)
790 if err != nil {
791 return
792 }
793 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
794 if e1 != 0 {
795 err = errnoErr(e1)
796 }
797 return
798 }
799
800 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
801
802 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
803 _, _, e1 := Syscall9(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), 0, uintptr(length), uintptr(length>>32), uintptr(advice), 0)
804 if e1 != 0 {
805 err = errnoErr(e1)
806 }
807 return
808 }
809
810 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
811
535812 func Fchdir(fd int) (err error) {
536813 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
537814 if e1 != 0 {
562839
563840 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
564841
842 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
843 var _p0 *byte
844 _p0, err = BytePtrFromString(path)
845 if err != nil {
846 return
847 }
848 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
849 if e1 != 0 {
850 err = errnoErr(e1)
851 }
852 return
853 }
854
855 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
856
565857 func Fchown(fd int, uid int, gid int) (err error) {
566858 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
859 if e1 != 0 {
860 err = errnoErr(e1)
861 }
862 return
863 }
864
865 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
866
867 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
868 var _p0 *byte
869 _p0, err = BytePtrFromString(path)
870 if err != nil {
871 return
872 }
873 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
567874 if e1 != 0 {
568875 err = errnoErr(e1)
569876 }
603910
604911 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
605912
913 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
914 var _p0 *byte
915 _p0, err = BytePtrFromString(path)
916 if err != nil {
917 return
918 }
919 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
920 if e1 != 0 {
921 err = errnoErr(e1)
922 }
923 return
924 }
925
926 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
927
606928 func Fsync(fd int) (err error) {
607929 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
608930 if e1 != 0 {
8061128
8071129 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8081130
1131 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
1132 var _p0 *byte
1133 _p0, err = BytePtrFromString(path)
1134 if err != nil {
1135 return
1136 }
1137 var _p1 *byte
1138 _p1, err = BytePtrFromString(link)
1139 if err != nil {
1140 return
1141 }
1142 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1143 if e1 != 0 {
1144 err = errnoErr(e1)
1145 }
1146 return
1147 }
1148
1149 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1150
8091151 func Listen(s int, backlog int) (err error) {
8101152 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
8111153 if e1 != 0 {
8461188
8471189 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8481190
1191 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1192 var _p0 *byte
1193 _p0, err = BytePtrFromString(path)
1194 if err != nil {
1195 return
1196 }
1197 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1198 if e1 != 0 {
1199 err = errnoErr(e1)
1200 }
1201 return
1202 }
1203
1204 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1205
8491206 func Mkfifo(path string, mode uint32) (err error) {
8501207 var _p0 *byte
8511208 _p0, err = BytePtrFromString(path)
8611218
8621219 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8631220
1221 func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
1222 var _p0 *byte
1223 _p0, err = BytePtrFromString(path)
1224 if err != nil {
1225 return
1226 }
1227 _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1228 if e1 != 0 {
1229 err = errnoErr(e1)
1230 }
1231 return
1232 }
1233
1234 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1235
8641236 func Mknod(path string, mode uint32, dev int) (err error) {
8651237 var _p0 *byte
8661238 _p0, err = BytePtrFromString(path)
8681240 return
8691241 }
8701242 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1243 if e1 != 0 {
1244 err = errnoErr(e1)
1245 }
1246 return
1247 }
1248
1249 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1250
1251 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
1252 var _p0 *byte
1253 _p0, err = BytePtrFromString(path)
1254 if err != nil {
1255 return
1256 }
1257 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
8711258 if e1 != 0 {
8721259 err = errnoErr(e1)
8731260 }
8931280 return
8941281 }
8951282 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1283 fd = int(r0)
1284 if e1 != 0 {
1285 err = errnoErr(e1)
1286 }
1287 return
1288 }
1289
1290 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1291
1292 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1293 var _p0 *byte
1294 _p0, err = BytePtrFromString(path)
1295 if err != nil {
1296 return
1297 }
1298 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
8961299 fd = int(r0)
8971300 if e1 != 0 {
8981301 err = errnoErr(e1)
9911394
9921395 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9931396
1397 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1398 var _p0 *byte
1399 _p0, err = BytePtrFromString(path)
1400 if err != nil {
1401 return
1402 }
1403 var _p1 unsafe.Pointer
1404 if len(buf) > 0 {
1405 _p1 = unsafe.Pointer(&buf[0])
1406 } else {
1407 _p1 = unsafe.Pointer(&_zero)
1408 }
1409 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1410 n = int(r0)
1411 if e1 != 0 {
1412 err = errnoErr(e1)
1413 }
1414 return
1415 }
1416
1417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1418
9941419 func Rename(from string, to string) (err error) {
9951420 var _p0 *byte
9961421 _p0, err = BytePtrFromString(from)
10031428 return
10041429 }
10051430 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1431 if e1 != 0 {
1432 err = errnoErr(e1)
1433 }
1434 return
1435 }
1436
1437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1438
1439 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1440 var _p0 *byte
1441 _p0, err = BytePtrFromString(from)
1442 if err != nil {
1443 return
1444 }
1445 var _p1 *byte
1446 _p1, err = BytePtrFromString(to)
1447 if err != nil {
1448 return
1449 }
1450 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
10061451 if e1 != 0 {
10071452 err = errnoErr(e1)
10081453 }
12081653
12091654 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12101655
1656 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
1657 var _p0 *byte
1658 _p0, err = BytePtrFromString(oldpath)
1659 if err != nil {
1660 return
1661 }
1662 var _p1 *byte
1663 _p1, err = BytePtrFromString(newpath)
1664 if err != nil {
1665 return
1666 }
1667 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1668 if e1 != 0 {
1669 err = errnoErr(e1)
1670 }
1671 return
1672 }
1673
1674 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1675
12111676 func Sync() (err error) {
12121677 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
12131678 if e1 != 0 {
12481713 return
12491714 }
12501715 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1716 if e1 != 0 {
1717 err = errnoErr(e1)
1718 }
1719 return
1720 }
1721
1722 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1723
1724 func Unlinkat(dirfd int, path string, flags int) (err error) {
1725 var _p0 *byte
1726 _p0, err = BytePtrFromString(path)
1727 if err != nil {
1728 return
1729 }
1730 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
12511731 if e1 != 0 {
12521732 err = errnoErr(e1)
12531733 }
0 // go run mksyscall.go -netbsd -tags netbsd,arm64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm64.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build netbsd,arm64
4
5 package unix
6
7 import (
8 "syscall"
9 "unsafe"
10 )
11
12 var _ syscall.Errno
13
14 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15
16 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
17 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
18 n = int(r0)
19 if e1 != 0 {
20 err = errnoErr(e1)
21 }
22 return
23 }
24
25 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
26
27 func setgroups(ngid int, gid *_Gid_t) (err error) {
28 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
29 if e1 != 0 {
30 err = errnoErr(e1)
31 }
32 return
33 }
34
35 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
36
37 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
38 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
39 wpid = int(r0)
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
49 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
50 fd = int(r0)
51 if e1 != 0 {
52 err = errnoErr(e1)
53 }
54 return
55 }
56
57 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
58
59 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
60 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
61 if e1 != 0 {
62 err = errnoErr(e1)
63 }
64 return
65 }
66
67 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
68
69 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
70 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
71 if e1 != 0 {
72 err = errnoErr(e1)
73 }
74 return
75 }
76
77 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
78
79 func socket(domain int, typ int, proto int) (fd int, err error) {
80 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
81 fd = int(r0)
82 if e1 != 0 {
83 err = errnoErr(e1)
84 }
85 return
86 }
87
88 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
89
90 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
91 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
92 if e1 != 0 {
93 err = errnoErr(e1)
94 }
95 return
96 }
97
98 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
99
100 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
101 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
102 if e1 != 0 {
103 err = errnoErr(e1)
104 }
105 return
106 }
107
108 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
109
110 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
111 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
112 if e1 != 0 {
113 err = errnoErr(e1)
114 }
115 return
116 }
117
118 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
119
120 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
121 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
122 if e1 != 0 {
123 err = errnoErr(e1)
124 }
125 return
126 }
127
128 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
129
130 func Shutdown(s int, how int) (err error) {
131 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
132 if e1 != 0 {
133 err = errnoErr(e1)
134 }
135 return
136 }
137
138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
139
140 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
141 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
142 if e1 != 0 {
143 err = errnoErr(e1)
144 }
145 return
146 }
147
148 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
149
150 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
151 var _p0 unsafe.Pointer
152 if len(p) > 0 {
153 _p0 = unsafe.Pointer(&p[0])
154 } else {
155 _p0 = unsafe.Pointer(&_zero)
156 }
157 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
158 n = int(r0)
159 if e1 != 0 {
160 err = errnoErr(e1)
161 }
162 return
163 }
164
165 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
166
167 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
168 var _p0 unsafe.Pointer
169 if len(buf) > 0 {
170 _p0 = unsafe.Pointer(&buf[0])
171 } else {
172 _p0 = unsafe.Pointer(&_zero)
173 }
174 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
175 if e1 != 0 {
176 err = errnoErr(e1)
177 }
178 return
179 }
180
181 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
182
183 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
184 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
185 n = int(r0)
186 if e1 != 0 {
187 err = errnoErr(e1)
188 }
189 return
190 }
191
192 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
193
194 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
195 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
196 n = int(r0)
197 if e1 != 0 {
198 err = errnoErr(e1)
199 }
200 return
201 }
202
203 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
204
205 func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
206 r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
207 n = int(r0)
208 if e1 != 0 {
209 err = errnoErr(e1)
210 }
211 return
212 }
213
214 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
215
216 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
217 var _p0 unsafe.Pointer
218 if len(mib) > 0 {
219 _p0 = unsafe.Pointer(&mib[0])
220 } else {
221 _p0 = unsafe.Pointer(&_zero)
222 }
223 _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
224 if e1 != 0 {
225 err = errnoErr(e1)
226 }
227 return
228 }
229
230 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
231
232 func utimes(path string, timeval *[2]Timeval) (err error) {
233 var _p0 *byte
234 _p0, err = BytePtrFromString(path)
235 if err != nil {
236 return
237 }
238 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
239 if e1 != 0 {
240 err = errnoErr(e1)
241 }
242 return
243 }
244
245 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
246
247 func futimes(fd int, timeval *[2]Timeval) (err error) {
248 _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
249 if e1 != 0 {
250 err = errnoErr(e1)
251 }
252 return
253 }
254
255 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
256
257 func fcntl(fd int, cmd int, arg int) (val int, err error) {
258 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
259 val = int(r0)
260 if e1 != 0 {
261 err = errnoErr(e1)
262 }
263 return
264 }
265
266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
279 func Madvise(b []byte, behav int) (err error) {
280 var _p0 unsafe.Pointer
281 if len(b) > 0 {
282 _p0 = unsafe.Pointer(&b[0])
283 } else {
284 _p0 = unsafe.Pointer(&_zero)
285 }
286 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
287 if e1 != 0 {
288 err = errnoErr(e1)
289 }
290 return
291 }
292
293 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
294
295 func Mlock(b []byte) (err error) {
296 var _p0 unsafe.Pointer
297 if len(b) > 0 {
298 _p0 = unsafe.Pointer(&b[0])
299 } else {
300 _p0 = unsafe.Pointer(&_zero)
301 }
302 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
303 if e1 != 0 {
304 err = errnoErr(e1)
305 }
306 return
307 }
308
309 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
310
311 func Mlockall(flags int) (err error) {
312 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
313 if e1 != 0 {
314 err = errnoErr(e1)
315 }
316 return
317 }
318
319 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
320
321 func Mprotect(b []byte, prot int) (err error) {
322 var _p0 unsafe.Pointer
323 if len(b) > 0 {
324 _p0 = unsafe.Pointer(&b[0])
325 } else {
326 _p0 = unsafe.Pointer(&_zero)
327 }
328 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
329 if e1 != 0 {
330 err = errnoErr(e1)
331 }
332 return
333 }
334
335 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
336
337 func Msync(b []byte, flags int) (err error) {
338 var _p0 unsafe.Pointer
339 if len(b) > 0 {
340 _p0 = unsafe.Pointer(&b[0])
341 } else {
342 _p0 = unsafe.Pointer(&_zero)
343 }
344 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
345 if e1 != 0 {
346 err = errnoErr(e1)
347 }
348 return
349 }
350
351 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
352
353 func Munlock(b []byte) (err error) {
354 var _p0 unsafe.Pointer
355 if len(b) > 0 {
356 _p0 = unsafe.Pointer(&b[0])
357 } else {
358 _p0 = unsafe.Pointer(&_zero)
359 }
360 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
361 if e1 != 0 {
362 err = errnoErr(e1)
363 }
364 return
365 }
366
367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
368
369 func Munlockall() (err error) {
370 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
371 if e1 != 0 {
372 err = errnoErr(e1)
373 }
374 return
375 }
376
377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
378
379 func pipe() (fd1 int, fd2 int, err error) {
380 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
381 fd1 = int(r0)
382 fd2 = int(r1)
383 if e1 != 0 {
384 err = errnoErr(e1)
385 }
386 return
387 }
388
389 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
390
391 func getdents(fd int, buf []byte) (n int, err error) {
392 var _p0 unsafe.Pointer
393 if len(buf) > 0 {
394 _p0 = unsafe.Pointer(&buf[0])
395 } else {
396 _p0 = unsafe.Pointer(&_zero)
397 }
398 r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
399 n = int(r0)
400 if e1 != 0 {
401 err = errnoErr(e1)
402 }
403 return
404 }
405
406 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
407
408 func Getcwd(buf []byte) (n int, err error) {
409 var _p0 unsafe.Pointer
410 if len(buf) > 0 {
411 _p0 = unsafe.Pointer(&buf[0])
412 } else {
413 _p0 = unsafe.Pointer(&_zero)
414 }
415 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
416 n = int(r0)
417 if e1 != 0 {
418 err = errnoErr(e1)
419 }
420 return
421 }
422
423 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
424
425 func ioctl(fd int, req uint, arg uintptr) (err error) {
426 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
427 if e1 != 0 {
428 err = errnoErr(e1)
429 }
430 return
431 }
432
433 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
434
435 func Access(path string, mode uint32) (err error) {
436 var _p0 *byte
437 _p0, err = BytePtrFromString(path)
438 if err != nil {
439 return
440 }
441 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
442 if e1 != 0 {
443 err = errnoErr(e1)
444 }
445 return
446 }
447
448 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
449
450 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
451 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
452 if e1 != 0 {
453 err = errnoErr(e1)
454 }
455 return
456 }
457
458 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
459
460 func Chdir(path string) (err error) {
461 var _p0 *byte
462 _p0, err = BytePtrFromString(path)
463 if err != nil {
464 return
465 }
466 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
467 if e1 != 0 {
468 err = errnoErr(e1)
469 }
470 return
471 }
472
473 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
474
475 func Chflags(path string, flags int) (err error) {
476 var _p0 *byte
477 _p0, err = BytePtrFromString(path)
478 if err != nil {
479 return
480 }
481 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
482 if e1 != 0 {
483 err = errnoErr(e1)
484 }
485 return
486 }
487
488 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
489
490 func Chmod(path string, mode uint32) (err error) {
491 var _p0 *byte
492 _p0, err = BytePtrFromString(path)
493 if err != nil {
494 return
495 }
496 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
497 if e1 != 0 {
498 err = errnoErr(e1)
499 }
500 return
501 }
502
503 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
504
505 func Chown(path string, uid int, gid int) (err error) {
506 var _p0 *byte
507 _p0, err = BytePtrFromString(path)
508 if err != nil {
509 return
510 }
511 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
512 if e1 != 0 {
513 err = errnoErr(e1)
514 }
515 return
516 }
517
518 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
519
520 func Chroot(path string) (err error) {
521 var _p0 *byte
522 _p0, err = BytePtrFromString(path)
523 if err != nil {
524 return
525 }
526 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
527 if e1 != 0 {
528 err = errnoErr(e1)
529 }
530 return
531 }
532
533 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
534
535 func Close(fd int) (err error) {
536 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
537 if e1 != 0 {
538 err = errnoErr(e1)
539 }
540 return
541 }
542
543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
544
545 func Dup(fd int) (nfd int, err error) {
546 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
547 nfd = int(r0)
548 if e1 != 0 {
549 err = errnoErr(e1)
550 }
551 return
552 }
553
554 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
555
556 func Dup2(from int, to int) (err error) {
557 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
558 if e1 != 0 {
559 err = errnoErr(e1)
560 }
561 return
562 }
563
564 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
565
566 func Exit(code int) {
567 Syscall(SYS_EXIT, uintptr(code), 0, 0)
568 return
569 }
570
571 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
572
573 func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
574 var _p0 *byte
575 _p0, err = BytePtrFromString(attrname)
576 if err != nil {
577 return
578 }
579 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
580 ret = int(r0)
581 if e1 != 0 {
582 err = errnoErr(e1)
583 }
584 return
585 }
586
587 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
588
589 func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
590 var _p0 *byte
591 _p0, err = BytePtrFromString(attrname)
592 if err != nil {
593 return
594 }
595 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
596 ret = int(r0)
597 if e1 != 0 {
598 err = errnoErr(e1)
599 }
600 return
601 }
602
603 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
604
605 func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
606 var _p0 *byte
607 _p0, err = BytePtrFromString(attrname)
608 if err != nil {
609 return
610 }
611 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
612 if e1 != 0 {
613 err = errnoErr(e1)
614 }
615 return
616 }
617
618 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
619
620 func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
621 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
622 ret = int(r0)
623 if e1 != 0 {
624 err = errnoErr(e1)
625 }
626 return
627 }
628
629 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
630
631 func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
632 var _p0 *byte
633 _p0, err = BytePtrFromString(file)
634 if err != nil {
635 return
636 }
637 var _p1 *byte
638 _p1, err = BytePtrFromString(attrname)
639 if err != nil {
640 return
641 }
642 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
643 ret = int(r0)
644 if e1 != 0 {
645 err = errnoErr(e1)
646 }
647 return
648 }
649
650 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
651
652 func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
653 var _p0 *byte
654 _p0, err = BytePtrFromString(file)
655 if err != nil {
656 return
657 }
658 var _p1 *byte
659 _p1, err = BytePtrFromString(attrname)
660 if err != nil {
661 return
662 }
663 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
664 ret = int(r0)
665 if e1 != 0 {
666 err = errnoErr(e1)
667 }
668 return
669 }
670
671 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
672
673 func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
674 var _p0 *byte
675 _p0, err = BytePtrFromString(file)
676 if err != nil {
677 return
678 }
679 var _p1 *byte
680 _p1, err = BytePtrFromString(attrname)
681 if err != nil {
682 return
683 }
684 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
685 if e1 != 0 {
686 err = errnoErr(e1)
687 }
688 return
689 }
690
691 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
692
693 func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
694 var _p0 *byte
695 _p0, err = BytePtrFromString(file)
696 if err != nil {
697 return
698 }
699 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
700 ret = int(r0)
701 if e1 != 0 {
702 err = errnoErr(e1)
703 }
704 return
705 }
706
707 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
708
709 func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
710 var _p0 *byte
711 _p0, err = BytePtrFromString(link)
712 if err != nil {
713 return
714 }
715 var _p1 *byte
716 _p1, err = BytePtrFromString(attrname)
717 if err != nil {
718 return
719 }
720 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
721 ret = int(r0)
722 if e1 != 0 {
723 err = errnoErr(e1)
724 }
725 return
726 }
727
728 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
729
730 func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
731 var _p0 *byte
732 _p0, err = BytePtrFromString(link)
733 if err != nil {
734 return
735 }
736 var _p1 *byte
737 _p1, err = BytePtrFromString(attrname)
738 if err != nil {
739 return
740 }
741 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
742 ret = int(r0)
743 if e1 != 0 {
744 err = errnoErr(e1)
745 }
746 return
747 }
748
749 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
750
751 func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
752 var _p0 *byte
753 _p0, err = BytePtrFromString(link)
754 if err != nil {
755 return
756 }
757 var _p1 *byte
758 _p1, err = BytePtrFromString(attrname)
759 if err != nil {
760 return
761 }
762 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
763 if e1 != 0 {
764 err = errnoErr(e1)
765 }
766 return
767 }
768
769 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
770
771 func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
772 var _p0 *byte
773 _p0, err = BytePtrFromString(link)
774 if err != nil {
775 return
776 }
777 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
778 ret = int(r0)
779 if e1 != 0 {
780 err = errnoErr(e1)
781 }
782 return
783 }
784
785 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
786
787 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
788 var _p0 *byte
789 _p0, err = BytePtrFromString(path)
790 if err != nil {
791 return
792 }
793 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
794 if e1 != 0 {
795 err = errnoErr(e1)
796 }
797 return
798 }
799
800 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
801
802 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
803 _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), 0, uintptr(length), uintptr(advice))
804 if e1 != 0 {
805 err = errnoErr(e1)
806 }
807 return
808 }
809
810 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
811
812 func Fchdir(fd int) (err error) {
813 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
814 if e1 != 0 {
815 err = errnoErr(e1)
816 }
817 return
818 }
819
820 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
821
822 func Fchflags(fd int, flags int) (err error) {
823 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
824 if e1 != 0 {
825 err = errnoErr(e1)
826 }
827 return
828 }
829
830 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
831
832 func Fchmod(fd int, mode uint32) (err error) {
833 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
834 if e1 != 0 {
835 err = errnoErr(e1)
836 }
837 return
838 }
839
840 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
841
842 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
843 var _p0 *byte
844 _p0, err = BytePtrFromString(path)
845 if err != nil {
846 return
847 }
848 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
849 if e1 != 0 {
850 err = errnoErr(e1)
851 }
852 return
853 }
854
855 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
856
857 func Fchown(fd int, uid int, gid int) (err error) {
858 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
859 if e1 != 0 {
860 err = errnoErr(e1)
861 }
862 return
863 }
864
865 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
866
867 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
868 var _p0 *byte
869 _p0, err = BytePtrFromString(path)
870 if err != nil {
871 return
872 }
873 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
874 if e1 != 0 {
875 err = errnoErr(e1)
876 }
877 return
878 }
879
880 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
881
882 func Flock(fd int, how int) (err error) {
883 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
884 if e1 != 0 {
885 err = errnoErr(e1)
886 }
887 return
888 }
889
890 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
891
892 func Fpathconf(fd int, name int) (val int, err error) {
893 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
894 val = int(r0)
895 if e1 != 0 {
896 err = errnoErr(e1)
897 }
898 return
899 }
900
901 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
902
903 func Fstat(fd int, stat *Stat_t) (err error) {
904 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
905 if e1 != 0 {
906 err = errnoErr(e1)
907 }
908 return
909 }
910
911 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
912
913 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
914 var _p0 *byte
915 _p0, err = BytePtrFromString(path)
916 if err != nil {
917 return
918 }
919 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
920 if e1 != 0 {
921 err = errnoErr(e1)
922 }
923 return
924 }
925
926 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
927
928 func Fsync(fd int) (err error) {
929 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
930 if e1 != 0 {
931 err = errnoErr(e1)
932 }
933 return
934 }
935
936 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
937
938 func Ftruncate(fd int, length int64) (err error) {
939 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
940 if e1 != 0 {
941 err = errnoErr(e1)
942 }
943 return
944 }
945
946 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
947
948 func Getegid() (egid int) {
949 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
950 egid = int(r0)
951 return
952 }
953
954 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
955
956 func Geteuid() (uid int) {
957 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
958 uid = int(r0)
959 return
960 }
961
962 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
963
964 func Getgid() (gid int) {
965 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
966 gid = int(r0)
967 return
968 }
969
970 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
971
972 func Getpgid(pid int) (pgid int, err error) {
973 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
974 pgid = int(r0)
975 if e1 != 0 {
976 err = errnoErr(e1)
977 }
978 return
979 }
980
981 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
982
983 func Getpgrp() (pgrp int) {
984 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
985 pgrp = int(r0)
986 return
987 }
988
989 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
990
991 func Getpid() (pid int) {
992 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
993 pid = int(r0)
994 return
995 }
996
997 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
998
999 func Getppid() (ppid int) {
1000 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
1001 ppid = int(r0)
1002 return
1003 }
1004
1005 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1006
1007 func Getpriority(which int, who int) (prio int, err error) {
1008 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
1009 prio = int(r0)
1010 if e1 != 0 {
1011 err = errnoErr(e1)
1012 }
1013 return
1014 }
1015
1016 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1017
1018 func Getrlimit(which int, lim *Rlimit) (err error) {
1019 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1020 if e1 != 0 {
1021 err = errnoErr(e1)
1022 }
1023 return
1024 }
1025
1026 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1027
1028 func Getrusage(who int, rusage *Rusage) (err error) {
1029 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
1030 if e1 != 0 {
1031 err = errnoErr(e1)
1032 }
1033 return
1034 }
1035
1036 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1037
1038 func Getsid(pid int) (sid int, err error) {
1039 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
1040 sid = int(r0)
1041 if e1 != 0 {
1042 err = errnoErr(e1)
1043 }
1044 return
1045 }
1046
1047 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1048
1049 func Gettimeofday(tv *Timeval) (err error) {
1050 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
1051 if e1 != 0 {
1052 err = errnoErr(e1)
1053 }
1054 return
1055 }
1056
1057 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1058
1059 func Getuid() (uid int) {
1060 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
1061 uid = int(r0)
1062 return
1063 }
1064
1065 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1066
1067 func Issetugid() (tainted bool) {
1068 r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
1069 tainted = bool(r0 != 0)
1070 return
1071 }
1072
1073 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1074
1075 func Kill(pid int, signum syscall.Signal) (err error) {
1076 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
1077 if e1 != 0 {
1078 err = errnoErr(e1)
1079 }
1080 return
1081 }
1082
1083 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1084
1085 func Kqueue() (fd int, err error) {
1086 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
1087 fd = int(r0)
1088 if e1 != 0 {
1089 err = errnoErr(e1)
1090 }
1091 return
1092 }
1093
1094 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1095
1096 func Lchown(path string, uid int, gid int) (err error) {
1097 var _p0 *byte
1098 _p0, err = BytePtrFromString(path)
1099 if err != nil {
1100 return
1101 }
1102 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
1103 if e1 != 0 {
1104 err = errnoErr(e1)
1105 }
1106 return
1107 }
1108
1109 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1110
1111 func Link(path string, link string) (err error) {
1112 var _p0 *byte
1113 _p0, err = BytePtrFromString(path)
1114 if err != nil {
1115 return
1116 }
1117 var _p1 *byte
1118 _p1, err = BytePtrFromString(link)
1119 if err != nil {
1120 return
1121 }
1122 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1123 if e1 != 0 {
1124 err = errnoErr(e1)
1125 }
1126 return
1127 }
1128
1129 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1130
1131 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
1132 var _p0 *byte
1133 _p0, err = BytePtrFromString(path)
1134 if err != nil {
1135 return
1136 }
1137 var _p1 *byte
1138 _p1, err = BytePtrFromString(link)
1139 if err != nil {
1140 return
1141 }
1142 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1143 if e1 != 0 {
1144 err = errnoErr(e1)
1145 }
1146 return
1147 }
1148
1149 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1150
1151 func Listen(s int, backlog int) (err error) {
1152 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
1153 if e1 != 0 {
1154 err = errnoErr(e1)
1155 }
1156 return
1157 }
1158
1159 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1160
1161 func Lstat(path string, stat *Stat_t) (err error) {
1162 var _p0 *byte
1163 _p0, err = BytePtrFromString(path)
1164 if err != nil {
1165 return
1166 }
1167 _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1168 if e1 != 0 {
1169 err = errnoErr(e1)
1170 }
1171 return
1172 }
1173
1174 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1175
1176 func Mkdir(path string, mode uint32) (err error) {
1177 var _p0 *byte
1178 _p0, err = BytePtrFromString(path)
1179 if err != nil {
1180 return
1181 }
1182 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1183 if e1 != 0 {
1184 err = errnoErr(e1)
1185 }
1186 return
1187 }
1188
1189 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1190
1191 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1192 var _p0 *byte
1193 _p0, err = BytePtrFromString(path)
1194 if err != nil {
1195 return
1196 }
1197 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1198 if e1 != 0 {
1199 err = errnoErr(e1)
1200 }
1201 return
1202 }
1203
1204 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1205
1206 func Mkfifo(path string, mode uint32) (err error) {
1207 var _p0 *byte
1208 _p0, err = BytePtrFromString(path)
1209 if err != nil {
1210 return
1211 }
1212 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1213 if e1 != 0 {
1214 err = errnoErr(e1)
1215 }
1216 return
1217 }
1218
1219 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1220
1221 func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
1222 var _p0 *byte
1223 _p0, err = BytePtrFromString(path)
1224 if err != nil {
1225 return
1226 }
1227 _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1228 if e1 != 0 {
1229 err = errnoErr(e1)
1230 }
1231 return
1232 }
1233
1234 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1235
1236 func Mknod(path string, mode uint32, dev int) (err error) {
1237 var _p0 *byte
1238 _p0, err = BytePtrFromString(path)
1239 if err != nil {
1240 return
1241 }
1242 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1243 if e1 != 0 {
1244 err = errnoErr(e1)
1245 }
1246 return
1247 }
1248
1249 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1250
1251 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
1252 var _p0 *byte
1253 _p0, err = BytePtrFromString(path)
1254 if err != nil {
1255 return
1256 }
1257 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
1258 if e1 != 0 {
1259 err = errnoErr(e1)
1260 }
1261 return
1262 }
1263
1264 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1265
1266 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
1267 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1268 if e1 != 0 {
1269 err = errnoErr(e1)
1270 }
1271 return
1272 }
1273
1274 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1275
1276 func Open(path string, mode int, perm uint32) (fd int, err error) {
1277 var _p0 *byte
1278 _p0, err = BytePtrFromString(path)
1279 if err != nil {
1280 return
1281 }
1282 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1283 fd = int(r0)
1284 if e1 != 0 {
1285 err = errnoErr(e1)
1286 }
1287 return
1288 }
1289
1290 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1291
1292 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1293 var _p0 *byte
1294 _p0, err = BytePtrFromString(path)
1295 if err != nil {
1296 return
1297 }
1298 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
1299 fd = int(r0)
1300 if e1 != 0 {
1301 err = errnoErr(e1)
1302 }
1303 return
1304 }
1305
1306 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1307
1308 func Pathconf(path string, name int) (val int, err error) {
1309 var _p0 *byte
1310 _p0, err = BytePtrFromString(path)
1311 if err != nil {
1312 return
1313 }
1314 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1315 val = int(r0)
1316 if e1 != 0 {
1317 err = errnoErr(e1)
1318 }
1319 return
1320 }
1321
1322 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1323
1324 func Pread(fd int, p []byte, offset int64) (n int, err error) {
1325 var _p0 unsafe.Pointer
1326 if len(p) > 0 {
1327 _p0 = unsafe.Pointer(&p[0])
1328 } else {
1329 _p0 = unsafe.Pointer(&_zero)
1330 }
1331 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
1332 n = int(r0)
1333 if e1 != 0 {
1334 err = errnoErr(e1)
1335 }
1336 return
1337 }
1338
1339 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1340
1341 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
1342 var _p0 unsafe.Pointer
1343 if len(p) > 0 {
1344 _p0 = unsafe.Pointer(&p[0])
1345 } else {
1346 _p0 = unsafe.Pointer(&_zero)
1347 }
1348 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
1349 n = int(r0)
1350 if e1 != 0 {
1351 err = errnoErr(e1)
1352 }
1353 return
1354 }
1355
1356 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1357
1358 func read(fd int, p []byte) (n int, err error) {
1359 var _p0 unsafe.Pointer
1360 if len(p) > 0 {
1361 _p0 = unsafe.Pointer(&p[0])
1362 } else {
1363 _p0 = unsafe.Pointer(&_zero)
1364 }
1365 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1366 n = int(r0)
1367 if e1 != 0 {
1368 err = errnoErr(e1)
1369 }
1370 return
1371 }
1372
1373 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1374
1375 func Readlink(path string, buf []byte) (n int, err error) {
1376 var _p0 *byte
1377 _p0, err = BytePtrFromString(path)
1378 if err != nil {
1379 return
1380 }
1381 var _p1 unsafe.Pointer
1382 if len(buf) > 0 {
1383 _p1 = unsafe.Pointer(&buf[0])
1384 } else {
1385 _p1 = unsafe.Pointer(&_zero)
1386 }
1387 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1388 n = int(r0)
1389 if e1 != 0 {
1390 err = errnoErr(e1)
1391 }
1392 return
1393 }
1394
1395 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1396
1397 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1398 var _p0 *byte
1399 _p0, err = BytePtrFromString(path)
1400 if err != nil {
1401 return
1402 }
1403 var _p1 unsafe.Pointer
1404 if len(buf) > 0 {
1405 _p1 = unsafe.Pointer(&buf[0])
1406 } else {
1407 _p1 = unsafe.Pointer(&_zero)
1408 }
1409 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1410 n = int(r0)
1411 if e1 != 0 {
1412 err = errnoErr(e1)
1413 }
1414 return
1415 }
1416
1417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1418
1419 func Rename(from string, to string) (err error) {
1420 var _p0 *byte
1421 _p0, err = BytePtrFromString(from)
1422 if err != nil {
1423 return
1424 }
1425 var _p1 *byte
1426 _p1, err = BytePtrFromString(to)
1427 if err != nil {
1428 return
1429 }
1430 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1431 if e1 != 0 {
1432 err = errnoErr(e1)
1433 }
1434 return
1435 }
1436
1437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1438
1439 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1440 var _p0 *byte
1441 _p0, err = BytePtrFromString(from)
1442 if err != nil {
1443 return
1444 }
1445 var _p1 *byte
1446 _p1, err = BytePtrFromString(to)
1447 if err != nil {
1448 return
1449 }
1450 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1451 if e1 != 0 {
1452 err = errnoErr(e1)
1453 }
1454 return
1455 }
1456
1457 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1458
1459 func Revoke(path string) (err error) {
1460 var _p0 *byte
1461 _p0, err = BytePtrFromString(path)
1462 if err != nil {
1463 return
1464 }
1465 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
1466 if e1 != 0 {
1467 err = errnoErr(e1)
1468 }
1469 return
1470 }
1471
1472 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1473
1474 func Rmdir(path string) (err error) {
1475 var _p0 *byte
1476 _p0, err = BytePtrFromString(path)
1477 if err != nil {
1478 return
1479 }
1480 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
1481 if e1 != 0 {
1482 err = errnoErr(e1)
1483 }
1484 return
1485 }
1486
1487 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1488
1489 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1490 r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
1491 newoffset = int64(r0)
1492 if e1 != 0 {
1493 err = errnoErr(e1)
1494 }
1495 return
1496 }
1497
1498 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1499
1500 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1501 _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1502 if e1 != 0 {
1503 err = errnoErr(e1)
1504 }
1505 return
1506 }
1507
1508 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1509
1510 func Setegid(egid int) (err error) {
1511 _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
1512 if e1 != 0 {
1513 err = errnoErr(e1)
1514 }
1515 return
1516 }
1517
1518 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1519
1520 func Seteuid(euid int) (err error) {
1521 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
1522 if e1 != 0 {
1523 err = errnoErr(e1)
1524 }
1525 return
1526 }
1527
1528 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1529
1530 func Setgid(gid int) (err error) {
1531 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
1532 if e1 != 0 {
1533 err = errnoErr(e1)
1534 }
1535 return
1536 }
1537
1538 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1539
1540 func Setpgid(pid int, pgid int) (err error) {
1541 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
1542 if e1 != 0 {
1543 err = errnoErr(e1)
1544 }
1545 return
1546 }
1547
1548 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1549
1550 func Setpriority(which int, who int, prio int) (err error) {
1551 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
1552 if e1 != 0 {
1553 err = errnoErr(e1)
1554 }
1555 return
1556 }
1557
1558 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1559
1560 func Setregid(rgid int, egid int) (err error) {
1561 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
1562 if e1 != 0 {
1563 err = errnoErr(e1)
1564 }
1565 return
1566 }
1567
1568 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1569
1570 func Setreuid(ruid int, euid int) (err error) {
1571 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
1572 if e1 != 0 {
1573 err = errnoErr(e1)
1574 }
1575 return
1576 }
1577
1578 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1579
1580 func Setrlimit(which int, lim *Rlimit) (err error) {
1581 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1582 if e1 != 0 {
1583 err = errnoErr(e1)
1584 }
1585 return
1586 }
1587
1588 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1589
1590 func Setsid() (pid int, err error) {
1591 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
1592 pid = int(r0)
1593 if e1 != 0 {
1594 err = errnoErr(e1)
1595 }
1596 return
1597 }
1598
1599 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1600
1601 func Settimeofday(tp *Timeval) (err error) {
1602 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
1603 if e1 != 0 {
1604 err = errnoErr(e1)
1605 }
1606 return
1607 }
1608
1609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1610
1611 func Setuid(uid int) (err error) {
1612 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
1613 if e1 != 0 {
1614 err = errnoErr(e1)
1615 }
1616 return
1617 }
1618
1619 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1620
1621 func Stat(path string, stat *Stat_t) (err error) {
1622 var _p0 *byte
1623 _p0, err = BytePtrFromString(path)
1624 if err != nil {
1625 return
1626 }
1627 _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1628 if e1 != 0 {
1629 err = errnoErr(e1)
1630 }
1631 return
1632 }
1633
1634 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1635
1636 func Symlink(path string, link string) (err error) {
1637 var _p0 *byte
1638 _p0, err = BytePtrFromString(path)
1639 if err != nil {
1640 return
1641 }
1642 var _p1 *byte
1643 _p1, err = BytePtrFromString(link)
1644 if err != nil {
1645 return
1646 }
1647 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1648 if e1 != 0 {
1649 err = errnoErr(e1)
1650 }
1651 return
1652 }
1653
1654 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1655
1656 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
1657 var _p0 *byte
1658 _p0, err = BytePtrFromString(oldpath)
1659 if err != nil {
1660 return
1661 }
1662 var _p1 *byte
1663 _p1, err = BytePtrFromString(newpath)
1664 if err != nil {
1665 return
1666 }
1667 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1668 if e1 != 0 {
1669 err = errnoErr(e1)
1670 }
1671 return
1672 }
1673
1674 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1675
1676 func Sync() (err error) {
1677 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
1678 if e1 != 0 {
1679 err = errnoErr(e1)
1680 }
1681 return
1682 }
1683
1684 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1685
1686 func Truncate(path string, length int64) (err error) {
1687 var _p0 *byte
1688 _p0, err = BytePtrFromString(path)
1689 if err != nil {
1690 return
1691 }
1692 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
1693 if e1 != 0 {
1694 err = errnoErr(e1)
1695 }
1696 return
1697 }
1698
1699 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1700
1701 func Umask(newmask int) (oldmask int) {
1702 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
1703 oldmask = int(r0)
1704 return
1705 }
1706
1707 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1708
1709 func Unlink(path string) (err error) {
1710 var _p0 *byte
1711 _p0, err = BytePtrFromString(path)
1712 if err != nil {
1713 return
1714 }
1715 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1716 if e1 != 0 {
1717 err = errnoErr(e1)
1718 }
1719 return
1720 }
1721
1722 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1723
1724 func Unlinkat(dirfd int, path string, flags int) (err error) {
1725 var _p0 *byte
1726 _p0, err = BytePtrFromString(path)
1727 if err != nil {
1728 return
1729 }
1730 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
1731 if e1 != 0 {
1732 err = errnoErr(e1)
1733 }
1734 return
1735 }
1736
1737 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1738
1739 func Unmount(path string, flags int) (err error) {
1740 var _p0 *byte
1741 _p0, err = BytePtrFromString(path)
1742 if err != nil {
1743 return
1744 }
1745 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
1746 if e1 != 0 {
1747 err = errnoErr(e1)
1748 }
1749 return
1750 }
1751
1752 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1753
1754 func write(fd int, p []byte) (n int, err error) {
1755 var _p0 unsafe.Pointer
1756 if len(p) > 0 {
1757 _p0 = unsafe.Pointer(&p[0])
1758 } else {
1759 _p0 = unsafe.Pointer(&_zero)
1760 }
1761 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1762 n = int(r0)
1763 if e1 != 0 {
1764 err = errnoErr(e1)
1765 }
1766 return
1767 }
1768
1769 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1770
1771 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
1772 r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
1773 ret = uintptr(r0)
1774 if e1 != 0 {
1775 err = errnoErr(e1)
1776 }
1777 return
1778 }
1779
1780 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1781
1782 func munmap(addr uintptr, length uintptr) (err error) {
1783 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
1784 if e1 != 0 {
1785 err = errnoErr(e1)
1786 }
1787 return
1788 }
1789
1790 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1791
1792 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
1793 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1794 n = int(r0)
1795 if e1 != 0 {
1796 err = errnoErr(e1)
1797 }
1798 return
1799 }
1800
1801 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1802
1803 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
1804 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
1805 n = int(r0)
1806 if e1 != 0 {
1807 err = errnoErr(e1)
1808 }
1809 return
1810 }
1811
1812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1813
1814 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
1815 var _p0 *byte
1816 _p0, err = BytePtrFromString(path)
1817 if err != nil {
1818 return
1819 }
1820 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
1821 if e1 != 0 {
1822 err = errnoErr(e1)
1823 }
1824 return
1825 }
0 // mksyscall.pl -l32 -openbsd -tags openbsd,386 syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go
0 // go run mksyscall.go -l32 -openbsd -tags openbsd,386 syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build openbsd,386
265265
266266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
268279 func Madvise(b []byte, behav int) (err error) {
269280 var _p0 unsafe.Pointer
270281 if len(b) > 0 {
392403
393404 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
394405
406 func Getcwd(buf []byte) (n int, err error) {
407 var _p0 unsafe.Pointer
408 if len(buf) > 0 {
409 _p0 = unsafe.Pointer(&buf[0])
410 } else {
411 _p0 = unsafe.Pointer(&_zero)
412 }
413 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
414 n = int(r0)
415 if e1 != 0 {
416 err = errnoErr(e1)
417 }
418 return
419 }
420
421 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
422
423 func ioctl(fd int, req uint, arg uintptr) (err error) {
424 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
425 if e1 != 0 {
426 err = errnoErr(e1)
427 }
428 return
429 }
430
431 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
432
433 func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
434 r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
435 n = int(r0)
436 if e1 != 0 {
437 err = errnoErr(e1)
438 }
439 return
440 }
441
442 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
443
395444 func Access(path string, mode uint32) (err error) {
396445 var _p0 *byte
397446 _p0, err = BytePtrFromString(path)
530579
531580 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
532581
582 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
583 var _p0 *byte
584 _p0, err = BytePtrFromString(path)
585 if err != nil {
586 return
587 }
588 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
589 if e1 != 0 {
590 err = errnoErr(e1)
591 }
592 return
593 }
594
595 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
596
533597 func Fchdir(fd int) (err error) {
534598 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
535599 if e1 != 0 {
560624
561625 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
562626
627 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
628 var _p0 *byte
629 _p0, err = BytePtrFromString(path)
630 if err != nil {
631 return
632 }
633 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
634 if e1 != 0 {
635 err = errnoErr(e1)
636 }
637 return
638 }
639
640 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
641
563642 func Fchown(fd int, uid int, gid int) (err error) {
564643 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
644 if e1 != 0 {
645 err = errnoErr(e1)
646 }
647 return
648 }
649
650 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
651
652 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
653 var _p0 *byte
654 _p0, err = BytePtrFromString(path)
655 if err != nil {
656 return
657 }
658 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
565659 if e1 != 0 {
566660 err = errnoErr(e1)
567661 }
601695
602696 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
603697
698 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
699 var _p0 *byte
700 _p0, err = BytePtrFromString(path)
701 if err != nil {
702 return
703 }
704 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
705 if e1 != 0 {
706 err = errnoErr(e1)
707 }
708 return
709 }
710
711 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
712
604713 func Fstatfs(fd int, stat *Statfs_t) (err error) {
605714 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
606715 if e1 != 0 {
711820
712821 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
713822
823 func Getrtable() (rtable int, err error) {
824 r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
825 rtable = int(r0)
826 if e1 != 0 {
827 err = errnoErr(e1)
828 }
829 return
830 }
831
832 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
833
714834 func Getrusage(who int, rusage *Rusage) (err error) {
715835 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
716836 if e1 != 0 {
814934
815935 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
816936
937 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
938 var _p0 *byte
939 _p0, err = BytePtrFromString(path)
940 if err != nil {
941 return
942 }
943 var _p1 *byte
944 _p1, err = BytePtrFromString(link)
945 if err != nil {
946 return
947 }
948 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
949 if e1 != 0 {
950 err = errnoErr(e1)
951 }
952 return
953 }
954
955 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
956
817957 func Listen(s int, backlog int) (err error) {
818958 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
819959 if e1 != 0 {
854994
855995 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
856996
997 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
998 var _p0 *byte
999 _p0, err = BytePtrFromString(path)
1000 if err != nil {
1001 return
1002 }
1003 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1004 if e1 != 0 {
1005 err = errnoErr(e1)
1006 }
1007 return
1008 }
1009
1010 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1011
8571012 func Mkfifo(path string, mode uint32) (err error) {
8581013 var _p0 *byte
8591014 _p0, err = BytePtrFromString(path)
8691024
8701025 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8711026
1027 func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
1028 var _p0 *byte
1029 _p0, err = BytePtrFromString(path)
1030 if err != nil {
1031 return
1032 }
1033 _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1034 if e1 != 0 {
1035 err = errnoErr(e1)
1036 }
1037 return
1038 }
1039
1040 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1041
8721042 func Mknod(path string, mode uint32, dev int) (err error) {
8731043 var _p0 *byte
8741044 _p0, err = BytePtrFromString(path)
8761046 return
8771047 }
8781048 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1049 if e1 != 0 {
1050 err = errnoErr(e1)
1051 }
1052 return
1053 }
1054
1055 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1056
1057 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
1058 var _p0 *byte
1059 _p0, err = BytePtrFromString(path)
1060 if err != nil {
1061 return
1062 }
1063 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
8791064 if e1 != 0 {
8801065 err = errnoErr(e1)
8811066 }
9011086 return
9021087 }
9031088 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1089 fd = int(r0)
1090 if e1 != 0 {
1091 err = errnoErr(e1)
1092 }
1093 return
1094 }
1095
1096 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1097
1098 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1099 var _p0 *byte
1100 _p0, err = BytePtrFromString(path)
1101 if err != nil {
1102 return
1103 }
1104 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
9041105 fd = int(r0)
9051106 if e1 != 0 {
9061107 err = errnoErr(e1)
9991200
10001201 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10011202
1203 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1204 var _p0 *byte
1205 _p0, err = BytePtrFromString(path)
1206 if err != nil {
1207 return
1208 }
1209 var _p1 unsafe.Pointer
1210 if len(buf) > 0 {
1211 _p1 = unsafe.Pointer(&buf[0])
1212 } else {
1213 _p1 = unsafe.Pointer(&_zero)
1214 }
1215 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1216 n = int(r0)
1217 if e1 != 0 {
1218 err = errnoErr(e1)
1219 }
1220 return
1221 }
1222
1223 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1224
10021225 func Rename(from string, to string) (err error) {
10031226 var _p0 *byte
10041227 _p0, err = BytePtrFromString(from)
10111234 return
10121235 }
10131236 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1237 if e1 != 0 {
1238 err = errnoErr(e1)
1239 }
1240 return
1241 }
1242
1243 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1244
1245 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1246 var _p0 *byte
1247 _p0, err = BytePtrFromString(from)
1248 if err != nil {
1249 return
1250 }
1251 var _p1 *byte
1252 _p1, err = BytePtrFromString(to)
1253 if err != nil {
1254 return
1255 }
1256 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
10141257 if e1 != 0 {
10151258 err = errnoErr(e1)
10161259 }
11851428
11861429 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11871430
1431 func Setrtable(rtable int) (err error) {
1432 _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
1433 if e1 != 0 {
1434 err = errnoErr(e1)
1435 }
1436 return
1437 }
1438
1439 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1440
11881441 func Setsid() (pid int, err error) {
11891442 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
11901443 pid = int(r0)
12661519
12671520 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12681521
1522 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
1523 var _p0 *byte
1524 _p0, err = BytePtrFromString(oldpath)
1525 if err != nil {
1526 return
1527 }
1528 var _p1 *byte
1529 _p1, err = BytePtrFromString(newpath)
1530 if err != nil {
1531 return
1532 }
1533 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1534 if e1 != 0 {
1535 err = errnoErr(e1)
1536 }
1537 return
1538 }
1539
1540 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1541
12691542 func Sync() (err error) {
12701543 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
12711544 if e1 != 0 {
13061579 return
13071580 }
13081581 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1582 if e1 != 0 {
1583 err = errnoErr(e1)
1584 }
1585 return
1586 }
1587
1588 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1589
1590 func Unlinkat(dirfd int, path string, flags int) (err error) {
1591 var _p0 *byte
1592 _p0, err = BytePtrFromString(path)
1593 if err != nil {
1594 return
1595 }
1596 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
13091597 if e1 != 0 {
13101598 err = errnoErr(e1)
13111599 }
0 // mksyscall.pl -openbsd -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
0 // go run mksyscall.go -openbsd -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build openbsd,amd64
265265
266266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
268279 func Madvise(b []byte, behav int) (err error) {
269280 var _p0 unsafe.Pointer
270281 if len(b) > 0 {
392403
393404 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
394405
406 func Getcwd(buf []byte) (n int, err error) {
407 var _p0 unsafe.Pointer
408 if len(buf) > 0 {
409 _p0 = unsafe.Pointer(&buf[0])
410 } else {
411 _p0 = unsafe.Pointer(&_zero)
412 }
413 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
414 n = int(r0)
415 if e1 != 0 {
416 err = errnoErr(e1)
417 }
418 return
419 }
420
421 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
422
423 func ioctl(fd int, req uint, arg uintptr) (err error) {
424 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
425 if e1 != 0 {
426 err = errnoErr(e1)
427 }
428 return
429 }
430
431 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
432
433 func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
434 r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
435 n = int(r0)
436 if e1 != 0 {
437 err = errnoErr(e1)
438 }
439 return
440 }
441
442 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
443
395444 func Access(path string, mode uint32) (err error) {
396445 var _p0 *byte
397446 _p0, err = BytePtrFromString(path)
530579
531580 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
532581
582 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
583 var _p0 *byte
584 _p0, err = BytePtrFromString(path)
585 if err != nil {
586 return
587 }
588 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
589 if e1 != 0 {
590 err = errnoErr(e1)
591 }
592 return
593 }
594
595 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
596
533597 func Fchdir(fd int) (err error) {
534598 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
535599 if e1 != 0 {
560624
561625 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
562626
627 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
628 var _p0 *byte
629 _p0, err = BytePtrFromString(path)
630 if err != nil {
631 return
632 }
633 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
634 if e1 != 0 {
635 err = errnoErr(e1)
636 }
637 return
638 }
639
640 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
641
563642 func Fchown(fd int, uid int, gid int) (err error) {
564643 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
644 if e1 != 0 {
645 err = errnoErr(e1)
646 }
647 return
648 }
649
650 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
651
652 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
653 var _p0 *byte
654 _p0, err = BytePtrFromString(path)
655 if err != nil {
656 return
657 }
658 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
565659 if e1 != 0 {
566660 err = errnoErr(e1)
567661 }
601695
602696 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
603697
698 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
699 var _p0 *byte
700 _p0, err = BytePtrFromString(path)
701 if err != nil {
702 return
703 }
704 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
705 if e1 != 0 {
706 err = errnoErr(e1)
707 }
708 return
709 }
710
711 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
712
604713 func Fstatfs(fd int, stat *Statfs_t) (err error) {
605714 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
606715 if e1 != 0 {
711820
712821 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
713822
823 func Getrtable() (rtable int, err error) {
824 r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
825 rtable = int(r0)
826 if e1 != 0 {
827 err = errnoErr(e1)
828 }
829 return
830 }
831
832 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
833
714834 func Getrusage(who int, rusage *Rusage) (err error) {
715835 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
716836 if e1 != 0 {
814934
815935 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
816936
937 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
938 var _p0 *byte
939 _p0, err = BytePtrFromString(path)
940 if err != nil {
941 return
942 }
943 var _p1 *byte
944 _p1, err = BytePtrFromString(link)
945 if err != nil {
946 return
947 }
948 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
949 if e1 != 0 {
950 err = errnoErr(e1)
951 }
952 return
953 }
954
955 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
956
817957 func Listen(s int, backlog int) (err error) {
818958 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
819959 if e1 != 0 {
854994
855995 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
856996
997 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
998 var _p0 *byte
999 _p0, err = BytePtrFromString(path)
1000 if err != nil {
1001 return
1002 }
1003 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1004 if e1 != 0 {
1005 err = errnoErr(e1)
1006 }
1007 return
1008 }
1009
1010 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1011
8571012 func Mkfifo(path string, mode uint32) (err error) {
8581013 var _p0 *byte
8591014 _p0, err = BytePtrFromString(path)
8691024
8701025 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8711026
1027 func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
1028 var _p0 *byte
1029 _p0, err = BytePtrFromString(path)
1030 if err != nil {
1031 return
1032 }
1033 _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1034 if e1 != 0 {
1035 err = errnoErr(e1)
1036 }
1037 return
1038 }
1039
1040 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1041
8721042 func Mknod(path string, mode uint32, dev int) (err error) {
8731043 var _p0 *byte
8741044 _p0, err = BytePtrFromString(path)
8761046 return
8771047 }
8781048 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1049 if e1 != 0 {
1050 err = errnoErr(e1)
1051 }
1052 return
1053 }
1054
1055 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1056
1057 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
1058 var _p0 *byte
1059 _p0, err = BytePtrFromString(path)
1060 if err != nil {
1061 return
1062 }
1063 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
8791064 if e1 != 0 {
8801065 err = errnoErr(e1)
8811066 }
9011086 return
9021087 }
9031088 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1089 fd = int(r0)
1090 if e1 != 0 {
1091 err = errnoErr(e1)
1092 }
1093 return
1094 }
1095
1096 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1097
1098 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1099 var _p0 *byte
1100 _p0, err = BytePtrFromString(path)
1101 if err != nil {
1102 return
1103 }
1104 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
9041105 fd = int(r0)
9051106 if e1 != 0 {
9061107 err = errnoErr(e1)
9991200
10001201 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10011202
1203 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1204 var _p0 *byte
1205 _p0, err = BytePtrFromString(path)
1206 if err != nil {
1207 return
1208 }
1209 var _p1 unsafe.Pointer
1210 if len(buf) > 0 {
1211 _p1 = unsafe.Pointer(&buf[0])
1212 } else {
1213 _p1 = unsafe.Pointer(&_zero)
1214 }
1215 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1216 n = int(r0)
1217 if e1 != 0 {
1218 err = errnoErr(e1)
1219 }
1220 return
1221 }
1222
1223 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1224
10021225 func Rename(from string, to string) (err error) {
10031226 var _p0 *byte
10041227 _p0, err = BytePtrFromString(from)
10111234 return
10121235 }
10131236 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1237 if e1 != 0 {
1238 err = errnoErr(e1)
1239 }
1240 return
1241 }
1242
1243 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1244
1245 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1246 var _p0 *byte
1247 _p0, err = BytePtrFromString(from)
1248 if err != nil {
1249 return
1250 }
1251 var _p1 *byte
1252 _p1, err = BytePtrFromString(to)
1253 if err != nil {
1254 return
1255 }
1256 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
10141257 if e1 != 0 {
10151258 err = errnoErr(e1)
10161259 }
11851428
11861429 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11871430
1431 func Setrtable(rtable int) (err error) {
1432 _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
1433 if e1 != 0 {
1434 err = errnoErr(e1)
1435 }
1436 return
1437 }
1438
1439 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1440
11881441 func Setsid() (pid int, err error) {
11891442 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
11901443 pid = int(r0)
12661519
12671520 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12681521
1522 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
1523 var _p0 *byte
1524 _p0, err = BytePtrFromString(oldpath)
1525 if err != nil {
1526 return
1527 }
1528 var _p1 *byte
1529 _p1, err = BytePtrFromString(newpath)
1530 if err != nil {
1531 return
1532 }
1533 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1534 if e1 != 0 {
1535 err = errnoErr(e1)
1536 }
1537 return
1538 }
1539
1540 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1541
12691542 func Sync() (err error) {
12701543 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
12711544 if e1 != 0 {
13061579 return
13071580 }
13081581 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1582 if e1 != 0 {
1583 err = errnoErr(e1)
1584 }
1585 return
1586 }
1587
1588 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1589
1590 func Unlinkat(dirfd int, path string, flags int) (err error) {
1591 var _p0 *byte
1592 _p0, err = BytePtrFromString(path)
1593 if err != nil {
1594 return
1595 }
1596 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
13091597 if e1 != 0 {
13101598 err = errnoErr(e1)
13111599 }
0 // mksyscall.pl -l32 -openbsd -arm -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go
0 // go run mksyscall.go -l32 -openbsd -arm -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build openbsd,arm
265265
266266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
267267
268 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
269 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
270 n = int(r0)
271 if e1 != 0 {
272 err = errnoErr(e1)
273 }
274 return
275 }
276
277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
278
268279 func Madvise(b []byte, behav int) (err error) {
269280 var _p0 unsafe.Pointer
270281 if len(b) > 0 {
392403
393404 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
394405
406 func Getcwd(buf []byte) (n int, err error) {
407 var _p0 unsafe.Pointer
408 if len(buf) > 0 {
409 _p0 = unsafe.Pointer(&buf[0])
410 } else {
411 _p0 = unsafe.Pointer(&_zero)
412 }
413 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
414 n = int(r0)
415 if e1 != 0 {
416 err = errnoErr(e1)
417 }
418 return
419 }
420
421 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
422
423 func ioctl(fd int, req uint, arg uintptr) (err error) {
424 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
425 if e1 != 0 {
426 err = errnoErr(e1)
427 }
428 return
429 }
430
431 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
432
433 func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
434 r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
435 n = int(r0)
436 if e1 != 0 {
437 err = errnoErr(e1)
438 }
439 return
440 }
441
442 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
443
395444 func Access(path string, mode uint32) (err error) {
396445 var _p0 *byte
397446 _p0, err = BytePtrFromString(path)
530579
531580 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
532581
582 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
583 var _p0 *byte
584 _p0, err = BytePtrFromString(path)
585 if err != nil {
586 return
587 }
588 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
589 if e1 != 0 {
590 err = errnoErr(e1)
591 }
592 return
593 }
594
595 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
596
533597 func Fchdir(fd int) (err error) {
534598 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
535599 if e1 != 0 {
560624
561625 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
562626
627 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
628 var _p0 *byte
629 _p0, err = BytePtrFromString(path)
630 if err != nil {
631 return
632 }
633 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
634 if e1 != 0 {
635 err = errnoErr(e1)
636 }
637 return
638 }
639
640 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
641
563642 func Fchown(fd int, uid int, gid int) (err error) {
564643 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
644 if e1 != 0 {
645 err = errnoErr(e1)
646 }
647 return
648 }
649
650 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
651
652 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
653 var _p0 *byte
654 _p0, err = BytePtrFromString(path)
655 if err != nil {
656 return
657 }
658 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
565659 if e1 != 0 {
566660 err = errnoErr(e1)
567661 }
601695
602696 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
603697
698 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
699 var _p0 *byte
700 _p0, err = BytePtrFromString(path)
701 if err != nil {
702 return
703 }
704 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
705 if e1 != 0 {
706 err = errnoErr(e1)
707 }
708 return
709 }
710
711 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
712
604713 func Fstatfs(fd int, stat *Statfs_t) (err error) {
605714 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
606715 if e1 != 0 {
711820
712821 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
713822
823 func Getrtable() (rtable int, err error) {
824 r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
825 rtable = int(r0)
826 if e1 != 0 {
827 err = errnoErr(e1)
828 }
829 return
830 }
831
832 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
833
714834 func Getrusage(who int, rusage *Rusage) (err error) {
715835 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
716836 if e1 != 0 {
814934
815935 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
816936
937 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
938 var _p0 *byte
939 _p0, err = BytePtrFromString(path)
940 if err != nil {
941 return
942 }
943 var _p1 *byte
944 _p1, err = BytePtrFromString(link)
945 if err != nil {
946 return
947 }
948 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
949 if e1 != 0 {
950 err = errnoErr(e1)
951 }
952 return
953 }
954
955 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
956
817957 func Listen(s int, backlog int) (err error) {
818958 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
819959 if e1 != 0 {
854994
855995 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
856996
997 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
998 var _p0 *byte
999 _p0, err = BytePtrFromString(path)
1000 if err != nil {
1001 return
1002 }
1003 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1004 if e1 != 0 {
1005 err = errnoErr(e1)
1006 }
1007 return
1008 }
1009
1010 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1011
8571012 func Mkfifo(path string, mode uint32) (err error) {
8581013 var _p0 *byte
8591014 _p0, err = BytePtrFromString(path)
8691024
8701025 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8711026
1027 func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
1028 var _p0 *byte
1029 _p0, err = BytePtrFromString(path)
1030 if err != nil {
1031 return
1032 }
1033 _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1034 if e1 != 0 {
1035 err = errnoErr(e1)
1036 }
1037 return
1038 }
1039
1040 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1041
8721042 func Mknod(path string, mode uint32, dev int) (err error) {
8731043 var _p0 *byte
8741044 _p0, err = BytePtrFromString(path)
8761046 return
8771047 }
8781048 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1049 if e1 != 0 {
1050 err = errnoErr(e1)
1051 }
1052 return
1053 }
1054
1055 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1056
1057 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
1058 var _p0 *byte
1059 _p0, err = BytePtrFromString(path)
1060 if err != nil {
1061 return
1062 }
1063 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
8791064 if e1 != 0 {
8801065 err = errnoErr(e1)
8811066 }
9011086 return
9021087 }
9031088 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1089 fd = int(r0)
1090 if e1 != 0 {
1091 err = errnoErr(e1)
1092 }
1093 return
1094 }
1095
1096 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1097
1098 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1099 var _p0 *byte
1100 _p0, err = BytePtrFromString(path)
1101 if err != nil {
1102 return
1103 }
1104 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
9041105 fd = int(r0)
9051106 if e1 != 0 {
9061107 err = errnoErr(e1)
9991200
10001201 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10011202
1203 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1204 var _p0 *byte
1205 _p0, err = BytePtrFromString(path)
1206 if err != nil {
1207 return
1208 }
1209 var _p1 unsafe.Pointer
1210 if len(buf) > 0 {
1211 _p1 = unsafe.Pointer(&buf[0])
1212 } else {
1213 _p1 = unsafe.Pointer(&_zero)
1214 }
1215 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1216 n = int(r0)
1217 if e1 != 0 {
1218 err = errnoErr(e1)
1219 }
1220 return
1221 }
1222
1223 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1224
10021225 func Rename(from string, to string) (err error) {
10031226 var _p0 *byte
10041227 _p0, err = BytePtrFromString(from)
10111234 return
10121235 }
10131236 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1237 if e1 != 0 {
1238 err = errnoErr(e1)
1239 }
1240 return
1241 }
1242
1243 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1244
1245 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1246 var _p0 *byte
1247 _p0, err = BytePtrFromString(from)
1248 if err != nil {
1249 return
1250 }
1251 var _p1 *byte
1252 _p1, err = BytePtrFromString(to)
1253 if err != nil {
1254 return
1255 }
1256 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
10141257 if e1 != 0 {
10151258 err = errnoErr(e1)
10161259 }
11851428
11861429 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11871430
1431 func Setrtable(rtable int) (err error) {
1432 _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
1433 if e1 != 0 {
1434 err = errnoErr(e1)
1435 }
1436 return
1437 }
1438
1439 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1440
11881441 func Setsid() (pid int, err error) {
11891442 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
11901443 pid = int(r0)
12661519
12671520 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12681521
1522 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
1523 var _p0 *byte
1524 _p0, err = BytePtrFromString(oldpath)
1525 if err != nil {
1526 return
1527 }
1528 var _p1 *byte
1529 _p1, err = BytePtrFromString(newpath)
1530 if err != nil {
1531 return
1532 }
1533 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
1534 if e1 != 0 {
1535 err = errnoErr(e1)
1536 }
1537 return
1538 }
1539
1540 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1541
12691542 func Sync() (err error) {
12701543 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
12711544 if e1 != 0 {
13061579 return
13071580 }
13081581 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
1582 if e1 != 0 {
1583 err = errnoErr(e1)
1584 }
1585 return
1586 }
1587
1588 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1589
1590 func Unlinkat(dirfd int, path string, flags int) (err error) {
1591 var _p0 *byte
1592 _p0, err = BytePtrFromString(path)
1593 if err != nil {
1594 return
1595 }
1596 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
13091597 if e1 != 0 {
13101598 err = errnoErr(e1)
13111599 }
2828 //go:cgo_import_dynamic libc___major __major "libc.so"
2929 //go:cgo_import_dynamic libc___minor __minor "libc.so"
3030 //go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
31 //go:cgo_import_dynamic libc_poll poll "libc.so"
3132 //go:cgo_import_dynamic libc_access access "libc.so"
3233 //go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
3334 //go:cgo_import_dynamic libc_chdir chdir "libc.so"
3940 //go:cgo_import_dynamic libc_dup dup "libc.so"
4041 //go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
4142 //go:cgo_import_dynamic libc_exit exit "libc.so"
43 //go:cgo_import_dynamic libc_faccessat faccessat "libc.so"
4244 //go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
4345 //go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
4446 //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
4850 //go:cgo_import_dynamic libc_flock flock "libc.so"
4951 //go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
5052 //go:cgo_import_dynamic libc_fstat fstat "libc.so"
53 //go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
5154 //go:cgo_import_dynamic libc_fstatvfs fstatvfs "libc.so"
5255 //go:cgo_import_dynamic libc_getdents getdents "libc.so"
5356 //go:cgo_import_dynamic libc_getgid getgid "libc.so"
9396 //go:cgo_import_dynamic libc_renameat renameat "libc.so"
9497 //go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
9598 //go:cgo_import_dynamic libc_lseek lseek "libc.so"
99 //go:cgo_import_dynamic libc_select select "libc.so"
96100 //go:cgo_import_dynamic libc_setegid setegid "libc.so"
97101 //go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
98102 //go:cgo_import_dynamic libc_setgid setgid "libc.so"
124128 //go:cgo_import_dynamic libc___xnet_connect __xnet_connect "libsocket.so"
125129 //go:cgo_import_dynamic libc_mmap mmap "libc.so"
126130 //go:cgo_import_dynamic libc_munmap munmap "libc.so"
131 //go:cgo_import_dynamic libc_sendfile sendfile "libsendfile.so"
127132 //go:cgo_import_dynamic libc___xnet_sendto __xnet_sendto "libsocket.so"
128133 //go:cgo_import_dynamic libc___xnet_socket __xnet_socket "libsocket.so"
129134 //go:cgo_import_dynamic libc___xnet_socketpair __xnet_socketpair "libsocket.so"
152157 //go:linkname proc__major libc___major
153158 //go:linkname proc__minor libc___minor
154159 //go:linkname procioctl libc_ioctl
160 //go:linkname procpoll libc_poll
155161 //go:linkname procAccess libc_access
156162 //go:linkname procAdjtime libc_adjtime
157163 //go:linkname procChdir libc_chdir
163169 //go:linkname procDup libc_dup
164170 //go:linkname procDup2 libc_dup2
165171 //go:linkname procExit libc_exit
172 //go:linkname procFaccessat libc_faccessat
166173 //go:linkname procFchdir libc_fchdir
167174 //go:linkname procFchmod libc_fchmod
168175 //go:linkname procFchmodat libc_fchmodat
172179 //go:linkname procFlock libc_flock
173180 //go:linkname procFpathconf libc_fpathconf
174181 //go:linkname procFstat libc_fstat
182 //go:linkname procFstatat libc_fstatat
175183 //go:linkname procFstatvfs libc_fstatvfs
176184 //go:linkname procGetdents libc_getdents
177185 //go:linkname procGetgid libc_getgid
217225 //go:linkname procRenameat libc_renameat
218226 //go:linkname procRmdir libc_rmdir
219227 //go:linkname proclseek libc_lseek
228 //go:linkname procSelect libc_select
220229 //go:linkname procSetegid libc_setegid
221230 //go:linkname procSeteuid libc_seteuid
222231 //go:linkname procSetgid libc_setgid
248257 //go:linkname proc__xnet_connect libc___xnet_connect
249258 //go:linkname procmmap libc_mmap
250259 //go:linkname procmunmap libc_munmap
260 //go:linkname procsendfile libc_sendfile
251261 //go:linkname proc__xnet_sendto libc___xnet_sendto
252262 //go:linkname proc__xnet_socket libc___xnet_socket
253263 //go:linkname proc__xnet_socketpair libc___xnet_socketpair
277287 proc__major,
278288 proc__minor,
279289 procioctl,
290 procpoll,
280291 procAccess,
281292 procAdjtime,
282293 procChdir,
288299 procDup,
289300 procDup2,
290301 procExit,
302 procFaccessat,
291303 procFchdir,
292304 procFchmod,
293305 procFchmodat,
297309 procFlock,
298310 procFpathconf,
299311 procFstat,
312 procFstatat,
300313 procFstatvfs,
301314 procGetdents,
302315 procGetgid,
342355 procRenameat,
343356 procRmdir,
344357 proclseek,
358 procSelect,
345359 procSetegid,
346360 procSeteuid,
347361 procSetgid,
373387 proc__xnet_connect,
374388 procmmap,
375389 procmunmap,
390 procsendfile,
376391 proc__xnet_sendto,
377392 proc__xnet_socket,
378393 proc__xnet_socketpair,
383398 procrecvfrom syscallFunc
384399 )
385400
401 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
402
386403 func pipe(p *[2]_C_int) (n int, err error) {
387404 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe)), 1, uintptr(unsafe.Pointer(p)), 0, 0, 0, 0, 0)
388405 n = int(r0)
392409 return
393410 }
394411
412 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
413
395414 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
396415 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
397416 if e1 != 0 {
400419 return
401420 }
402421
422 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
423
403424 func Getcwd(buf []byte) (n int, err error) {
404425 var _p0 *byte
405426 if len(buf) > 0 {
412433 }
413434 return
414435 }
436
437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
415438
416439 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
417440 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
422445 return
423446 }
424447
448 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
449
425450 func setgroups(ngid int, gid *_Gid_t) (err error) {
426451 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procsetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
427452 if e1 != 0 {
429454 }
430455 return
431456 }
457
458 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
432459
433460 func wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error) {
434461 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwait4)), 4, uintptr(pid), uintptr(unsafe.Pointer(statusp)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
439466 return
440467 }
441468
469 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
470
442471 func gethostname(buf []byte) (n int, err error) {
443472 var _p0 *byte
444473 if len(buf) > 0 {
452481 return
453482 }
454483
484 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
485
455486 func utimes(path string, times *[2]Timeval) (err error) {
456487 var _p0 *byte
457488 _p0, err = BytePtrFromString(path)
465496 return
466497 }
467498
499 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
500
468501 func utimensat(fd int, path string, times *[2]Timespec, flag int) (err error) {
469502 var _p0 *byte
470503 _p0, err = BytePtrFromString(path)
477510 }
478511 return
479512 }
513
514 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
480515
481516 func fcntl(fd int, cmd int, arg int) (val int, err error) {
482517 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)
487522 return
488523 }
489524
525 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
526
490527 func futimesat(fildes int, path *byte, times *[2]Timeval) (err error) {
491528 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfutimesat)), 3, uintptr(fildes), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)), 0, 0, 0)
492529 if e1 != 0 {
494531 }
495532 return
496533 }
534
535 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
497536
498537 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
499538 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept)), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
504543 return
505544 }
506545
546 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
547
507548 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
508549 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_recvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
509550 n = int(r0)
513554 return
514555 }
515556
557 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
558
516559 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
517560 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
518561 n = int(r0)
522565 return
523566 }
524567
568 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
569
525570 func acct(path *byte) (err error) {
526571 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procacct)), 1, uintptr(unsafe.Pointer(path)), 0, 0, 0, 0, 0)
527572 if e1 != 0 {
529574 }
530575 return
531576 }
577
578 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
532579
533580 func __makedev(version int, major uint, minor uint) (val uint64) {
534581 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__makedev)), 3, uintptr(version), uintptr(major), uintptr(minor), 0, 0, 0)
536583 return
537584 }
538585
586 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
587
539588 func __major(version int, dev uint64) (val uint) {
540589 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__major)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0)
541590 val = uint(r0)
542591 return
543592 }
544593
594 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
595
545596 func __minor(version int, dev uint64) (val uint) {
546597 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__minor)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0)
547598 val = uint(r0)
548599 return
549600 }
550601
602 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
603
551604 func ioctl(fd int, req uint, arg uintptr) (err error) {
552605 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
553606 if e1 != 0 {
556609 return
557610 }
558611
612 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
613
614 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
615 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpoll)), 3, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout), 0, 0, 0)
616 n = int(r0)
617 if e1 != 0 {
618 err = e1
619 }
620 return
621 }
622
623 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
624
559625 func Access(path string, mode uint32) (err error) {
560626 var _p0 *byte
561627 _p0, err = BytePtrFromString(path)
568634 }
569635 return
570636 }
637
638 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
571639
572640 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
573641 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAdjtime)), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 0)
577645 return
578646 }
579647
648 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
649
580650 func Chdir(path string) (err error) {
581651 var _p0 *byte
582652 _p0, err = BytePtrFromString(path)
590660 return
591661 }
592662
663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
664
593665 func Chmod(path string, mode uint32) (err error) {
594666 var _p0 *byte
595667 _p0, err = BytePtrFromString(path)
603675 return
604676 }
605677
678 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
679
606680 func Chown(path string, uid int, gid int) (err error) {
607681 var _p0 *byte
608682 _p0, err = BytePtrFromString(path)
616690 return
617691 }
618692
693 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
694
619695 func Chroot(path string) (err error) {
620696 var _p0 *byte
621697 _p0, err = BytePtrFromString(path)
628704 }
629705 return
630706 }
707
708 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
631709
632710 func Close(fd int) (err error) {
633711 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClose)), 1, uintptr(fd), 0, 0, 0, 0, 0)
637715 return
638716 }
639717
718 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
719
640720 func Creat(path string, mode uint32) (fd int, err error) {
641721 var _p0 *byte
642722 _p0, err = BytePtrFromString(path)
650730 }
651731 return
652732 }
733
734 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
653735
654736 func Dup(fd int) (nfd int, err error) {
655737 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup)), 1, uintptr(fd), 0, 0, 0, 0, 0)
660742 return
661743 }
662744
745 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
746
663747 func Dup2(oldfd int, newfd int) (err error) {
664748 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup2)), 2, uintptr(oldfd), uintptr(newfd), 0, 0, 0, 0)
665749 if e1 != 0 {
668752 return
669753 }
670754
755 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
756
671757 func Exit(code int) {
672758 sysvicall6(uintptr(unsafe.Pointer(&procExit)), 1, uintptr(code), 0, 0, 0, 0, 0)
673759 return
674760 }
675761
762 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
763
764 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
765 var _p0 *byte
766 _p0, err = BytePtrFromString(path)
767 if err != nil {
768 return
769 }
770 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFaccessat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
771 if e1 != 0 {
772 err = e1
773 }
774 return
775 }
776
777 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
778
676779 func Fchdir(fd int) (err error) {
677780 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0)
678781 if e1 != 0 {
681784 return
682785 }
683786
787 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
788
684789 func Fchmod(fd int, mode uint32) (err error) {
685790 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0)
686791 if e1 != 0 {
689794 return
690795 }
691796
797 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
798
692799 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
693800 var _p0 *byte
694801 _p0, err = BytePtrFromString(path)
701808 }
702809 return
703810 }
811
812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
704813
705814 func Fchown(fd int, uid int, gid int) (err error) {
706815 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0)
710819 return
711820 }
712821
822 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
823
713824 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
714825 var _p0 *byte
715826 _p0, err = BytePtrFromString(path)
722833 }
723834 return
724835 }
836
837 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
725838
726839 func Fdatasync(fd int) (err error) {
727840 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFdatasync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
731844 return
732845 }
733846
847 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
848
734849 func Flock(fd int, how int) (err error) {
735850 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFlock)), 2, uintptr(fd), uintptr(how), 0, 0, 0, 0)
736851 if e1 != 0 {
738853 }
739854 return
740855 }
856
857 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
741858
742859 func Fpathconf(fd int, name int) (val int, err error) {
743860 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0)
748865 return
749866 }
750867
868 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
869
751870 func Fstat(fd int, stat *Stat_t) (err error) {
752871 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstat)), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
753872 if e1 != 0 {
756875 return
757876 }
758877
878 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
879
880 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
881 var _p0 *byte
882 _p0, err = BytePtrFromString(path)
883 if err != nil {
884 return
885 }
886 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
887 if e1 != 0 {
888 err = e1
889 }
890 return
891 }
892
893 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
894
759895 func Fstatvfs(fd int, vfsstat *Statvfs_t) (err error) {
760896 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatvfs)), 2, uintptr(fd), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0)
761897 if e1 != 0 {
764900 return
765901 }
766902
903 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
904
767905 func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) {
768906 var _p0 *byte
769907 if len(buf) > 0 {
776914 }
777915 return
778916 }
917
918 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
779919
780920 func Getgid() (gid int) {
781921 r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetgid)), 0, 0, 0, 0, 0, 0, 0)
783923 return
784924 }
785925
926 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
927
786928 func Getpid() (pid int) {
787929 r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpid)), 0, 0, 0, 0, 0, 0, 0)
788930 pid = int(r0)
789931 return
790932 }
791933
934 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
935
792936 func Getpgid(pid int) (pgid int, err error) {
793937 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
794938 pgid = int(r0)
798942 return
799943 }
800944
945 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
946
801947 func Getpgrp() (pgid int, err error) {
802948 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgrp)), 0, 0, 0, 0, 0, 0, 0)
803949 pgid = int(r0)
807953 return
808954 }
809955
956 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
957
810958 func Geteuid() (euid int) {
811959 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGeteuid)), 0, 0, 0, 0, 0, 0, 0)
812960 euid = int(r0)
813961 return
814962 }
815963
964 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
965
816966 func Getegid() (egid int) {
817967 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetegid)), 0, 0, 0, 0, 0, 0, 0)
818968 egid = int(r0)
819969 return
820970 }
821971
972 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
973
822974 func Getppid() (ppid int) {
823975 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetppid)), 0, 0, 0, 0, 0, 0, 0)
824976 ppid = int(r0)
825977 return
826978 }
827979
980 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
981
828982 func Getpriority(which int, who int) (n int, err error) {
829983 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0)
830984 n = int(r0)
834988 return
835989 }
836990
991 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
992
837993 func Getrlimit(which int, lim *Rlimit) (err error) {
838994 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
839995 if e1 != 0 {
842998 return
843999 }
8441000
1001 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1002
8451003 func Getrusage(who int, rusage *Rusage) (err error) {
8461004 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrusage)), 2, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0, 0, 0, 0)
8471005 if e1 != 0 {
8501008 return
8511009 }
8521010
1011 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1012
8531013 func Gettimeofday(tv *Timeval) (err error) {
8541014 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0)
8551015 if e1 != 0 {
8571017 }
8581018 return
8591019 }
1020
1021 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8601022
8611023 func Getuid() (uid int) {
8621024 r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetuid)), 0, 0, 0, 0, 0, 0, 0)
8641026 return
8651027 }
8661028
1029 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1030
8671031 func Kill(pid int, signum syscall.Signal) (err error) {
8681032 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procKill)), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0)
8691033 if e1 != 0 {
8721036 return
8731037 }
8741038
1039 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1040
8751041 func Lchown(path string, uid int, gid int) (err error) {
8761042 var _p0 *byte
8771043 _p0, err = BytePtrFromString(path)
8841050 }
8851051 return
8861052 }
1053
1054 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
8871055
8881056 func Link(path string, link string) (err error) {
8891057 var _p0 *byte
9031071 return
9041072 }
9051073
1074 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1075
9061076 func Listen(s int, backlog int) (err error) {
9071077 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_llisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)
9081078 if e1 != 0 {
9111081 return
9121082 }
9131083
1084 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1085
9141086 func Lstat(path string, stat *Stat_t) (err error) {
9151087 var _p0 *byte
9161088 _p0, err = BytePtrFromString(path)
9231095 }
9241096 return
9251097 }
1098
1099 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
9261100
9271101 func Madvise(b []byte, advice int) (err error) {
9281102 var _p0 *byte
9361110 return
9371111 }
9381112
1113 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1114
9391115 func Mkdir(path string, mode uint32) (err error) {
9401116 var _p0 *byte
9411117 _p0, err = BytePtrFromString(path)
9491125 return
9501126 }
9511127
1128 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1129
9521130 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
9531131 var _p0 *byte
9541132 _p0, err = BytePtrFromString(path)
9621140 return
9631141 }
9641142
1143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1144
9651145 func Mkfifo(path string, mode uint32) (err error) {
9661146 var _p0 *byte
9671147 _p0, err = BytePtrFromString(path)
9751155 return
9761156 }
9771157
1158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1159
9781160 func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
9791161 var _p0 *byte
9801162 _p0, err = BytePtrFromString(path)
9881170 return
9891171 }
9901172
1173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1174
9911175 func Mknod(path string, mode uint32, dev int) (err error) {
9921176 var _p0 *byte
9931177 _p0, err = BytePtrFromString(path)
10011185 return
10021186 }
10031187
1188 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1189
10041190 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
10051191 var _p0 *byte
10061192 _p0, err = BytePtrFromString(path)
10131199 }
10141200 return
10151201 }
1202
1203 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
10161204
10171205 func Mlock(b []byte) (err error) {
10181206 var _p0 *byte
10261214 return
10271215 }
10281216
1217 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1218
10291219 func Mlockall(flags int) (err error) {
10301220 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlockall)), 1, uintptr(flags), 0, 0, 0, 0, 0)
10311221 if e1 != 0 {
10341224 return
10351225 }
10361226
1227 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1228
10371229 func Mprotect(b []byte, prot int) (err error) {
10381230 var _p0 *byte
10391231 if len(b) > 0 {
10461238 return
10471239 }
10481240
1241 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1242
10491243 func Msync(b []byte, flags int) (err error) {
10501244 var _p0 *byte
10511245 if len(b) > 0 {
10581252 return
10591253 }
10601254
1255 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1256
10611257 func Munlock(b []byte) (err error) {
10621258 var _p0 *byte
10631259 if len(b) > 0 {
10701266 return
10711267 }
10721268
1269 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1270
10731271 func Munlockall() (err error) {
10741272 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlockall)), 0, 0, 0, 0, 0, 0, 0)
10751273 if e1 != 0 {
10781276 return
10791277 }
10801278
1279 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1280
10811281 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
10821282 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procNanosleep)), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0)
10831283 if e1 != 0 {
10861286 return
10871287 }
10881288
1289 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1290
10891291 func Open(path string, mode int, perm uint32) (fd int, err error) {
10901292 var _p0 *byte
10911293 _p0, err = BytePtrFromString(path)
11001302 return
11011303 }
11021304
1305 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1306
11031307 func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
11041308 var _p0 *byte
11051309 _p0, err = BytePtrFromString(path)
11141318 return
11151319 }
11161320
1321 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1322
11171323 func Pathconf(path string, name int) (val int, err error) {
11181324 var _p0 *byte
11191325 _p0, err = BytePtrFromString(path)
11281334 return
11291335 }
11301336
1337 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1338
11311339 func Pause() (err error) {
11321340 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPause)), 0, 0, 0, 0, 0, 0, 0)
11331341 if e1 != 0 {
11361344 return
11371345 }
11381346
1347 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1348
11391349 func Pread(fd int, p []byte, offset int64) (n int, err error) {
11401350 var _p0 *byte
11411351 if len(p) > 0 {
11491359 return
11501360 }
11511361
1362 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1363
11521364 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
11531365 var _p0 *byte
11541366 if len(p) > 0 {
11621374 return
11631375 }
11641376
1377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1378
11651379 func read(fd int, p []byte) (n int, err error) {
11661380 var _p0 *byte
11671381 if len(p) > 0 {
11741388 }
11751389 return
11761390 }
1391
1392 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11771393
11781394 func Readlink(path string, buf []byte) (n int, err error) {
11791395 var _p0 *byte
11931409 return
11941410 }
11951411
1412 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1413
11961414 func Rename(from string, to string) (err error) {
11971415 var _p0 *byte
11981416 _p0, err = BytePtrFromString(from)
12111429 return
12121430 }
12131431
1432 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1433
12141434 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
12151435 var _p0 *byte
12161436 _p0, err = BytePtrFromString(oldpath)
12291449 return
12301450 }
12311451
1452 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1453
12321454 func Rmdir(path string) (err error) {
12331455 var _p0 *byte
12341456 _p0, err = BytePtrFromString(path)
12411463 }
12421464 return
12431465 }
1466
1467 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12441468
12451469 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
12461470 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proclseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)
12511475 return
12521476 }
12531477
1478 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1479
1480 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
1481 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSelect)), 5, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1482 if e1 != 0 {
1483 err = e1
1484 }
1485 return
1486 }
1487
1488 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1489
12541490 func Setegid(egid int) (err error) {
12551491 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetegid)), 1, uintptr(egid), 0, 0, 0, 0, 0)
12561492 if e1 != 0 {
12591495 return
12601496 }
12611497
1498 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1499
12621500 func Seteuid(euid int) (err error) {
12631501 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSeteuid)), 1, uintptr(euid), 0, 0, 0, 0, 0)
12641502 if e1 != 0 {
12671505 return
12681506 }
12691507
1508 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1509
12701510 func Setgid(gid int) (err error) {
12711511 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetgid)), 1, uintptr(gid), 0, 0, 0, 0, 0)
12721512 if e1 != 0 {
12751515 return
12761516 }
12771517
1518 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1519
12781520 func Sethostname(p []byte) (err error) {
12791521 var _p0 *byte
12801522 if len(p) > 0 {
12871529 return
12881530 }
12891531
1532 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1533
12901534 func Setpgid(pid int, pgid int) (err error) {
12911535 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0)
12921536 if e1 != 0 {
12951539 return
12961540 }
12971541
1542 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1543
12981544 func Setpriority(which int, who int, prio int) (err error) {
12991545 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSetpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0)
13001546 if e1 != 0 {
13031549 return
13041550 }
13051551
1552 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1553
13061554 func Setregid(rgid int, egid int) (err error) {
13071555 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0)
13081556 if e1 != 0 {
13111559 return
13121560 }
13131561
1562 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1563
13141564 func Setreuid(ruid int, euid int) (err error) {
13151565 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0)
13161566 if e1 != 0 {
13191569 return
13201570 }
13211571
1572 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1573
13221574 func Setrlimit(which int, lim *Rlimit) (err error) {
13231575 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
13241576 if e1 != 0 {
13261578 }
13271579 return
13281580 }
1581
1582 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13291583
13301584 func Setsid() (pid int, err error) {
13311585 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 0, 0, 0)
13361590 return
13371591 }
13381592
1593 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1594
13391595 func Setuid(uid int) (err error) {
13401596 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetuid)), 1, uintptr(uid), 0, 0, 0, 0, 0)
13411597 if e1 != 0 {
13441600 return
13451601 }
13461602
1603 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1604
13471605 func Shutdown(s int, how int) (err error) {
13481606 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procshutdown)), 2, uintptr(s), uintptr(how), 0, 0, 0, 0)
13491607 if e1 != 0 {
13521610 return
13531611 }
13541612
1613 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1614
13551615 func Stat(path string, stat *Stat_t) (err error) {
13561616 var _p0 *byte
13571617 _p0, err = BytePtrFromString(path)
13651625 return
13661626 }
13671627
1628 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1629
13681630 func Statvfs(path string, vfsstat *Statvfs_t) (err error) {
13691631 var _p0 *byte
13701632 _p0, err = BytePtrFromString(path)
13771639 }
13781640 return
13791641 }
1642
1643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
13801644
13811645 func Symlink(path string, link string) (err error) {
13821646 var _p0 *byte
13961660 return
13971661 }
13981662
1663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1664
13991665 func Sync() (err error) {
14001666 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSync)), 0, 0, 0, 0, 0, 0, 0)
14011667 if e1 != 0 {
14031669 }
14041670 return
14051671 }
1672
1673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14061674
14071675 func Times(tms *Tms) (ticks uintptr, err error) {
14081676 r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procTimes)), 1, uintptr(unsafe.Pointer(tms)), 0, 0, 0, 0, 0)
14131681 return
14141682 }
14151683
1684 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1685
14161686 func Truncate(path string, length int64) (err error) {
14171687 var _p0 *byte
14181688 _p0, err = BytePtrFromString(path)
14251695 }
14261696 return
14271697 }
1698
1699 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14281700
14291701 func Fsync(fd int) (err error) {
14301702 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
14341706 return
14351707 }
14361708
1709 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1710
14371711 func Ftruncate(fd int, length int64) (err error) {
14381712 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFtruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0)
14391713 if e1 != 0 {
14411715 }
14421716 return
14431717 }
1718
1719 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14441720
14451721 func Umask(mask int) (oldmask int) {
14461722 r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procUmask)), 1, uintptr(mask), 0, 0, 0, 0, 0)
14481724 return
14491725 }
14501726
1727 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1728
14511729 func Uname(buf *Utsname) (err error) {
14521730 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procUname)), 1, uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0, 0)
14531731 if e1 != 0 {
14561734 return
14571735 }
14581736
1737 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1738
14591739 func Unmount(target string, flags int) (err error) {
14601740 var _p0 *byte
14611741 _p0, err = BytePtrFromString(target)
14691749 return
14701750 }
14711751
1752 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1753
14721754 func Unlink(path string) (err error) {
14731755 var _p0 *byte
14741756 _p0, err = BytePtrFromString(path)
14821764 return
14831765 }
14841766
1767 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1768
14851769 func Unlinkat(dirfd int, path string, flags int) (err error) {
14861770 var _p0 *byte
14871771 _p0, err = BytePtrFromString(path)
14941778 }
14951779 return
14961780 }
1781
1782 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
14971783
14981784 func Ustat(dev int, ubuf *Ustat_t) (err error) {
14991785 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUstat)), 2, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0, 0, 0, 0)
15031789 return
15041790 }
15051791
1792 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1793
15061794 func Utime(path string, buf *Utimbuf) (err error) {
15071795 var _p0 *byte
15081796 _p0, err = BytePtrFromString(path)
15151803 }
15161804 return
15171805 }
1806
1807 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15181808
15191809 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
15201810 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_bind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
15241814 return
15251815 }
15261816
1817 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1818
15271819 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
15281820 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_connect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
15291821 if e1 != 0 {
15311823 }
15321824 return
15331825 }
1826
1827 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15341828
15351829 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
15361830 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmmap)), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
15411835 return
15421836 }
15431837
1838 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1839
15441840 func munmap(addr uintptr, length uintptr) (err error) {
15451841 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmunmap)), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0)
15461842 if e1 != 0 {
15491845 return
15501846 }
15511847
1848 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1849
1850 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
1851 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsendfile)), 4, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
1852 written = int(r0)
1853 if e1 != 0 {
1854 err = e1
1855 }
1856 return
1857 }
1858
1859 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1860
15521861 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
15531862 var _p0 *byte
15541863 if len(buf) > 0 {
15601869 }
15611870 return
15621871 }
1872
1873 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
15631874
15641875 func socket(domain int, typ int, proto int) (fd int, err error) {
15651876 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
15701881 return
15711882 }
15721883
1884 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1885
15731886 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
15741887 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
15751888 if e1 != 0 {
15781891 return
15791892 }
15801893
1894 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1895
15811896 func write(fd int, p []byte) (n int, err error) {
15821897 var _p0 *byte
15831898 if len(p) > 0 {
15911906 return
15921907 }
15931908
1909 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1910
15941911 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
15951912 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_getsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
15961913 if e1 != 0 {
15991916 return
16001917 }
16011918
1919 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1920
16021921 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
16031922 _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetpeername)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
16041923 if e1 != 0 {
16071926 return
16081927 }
16091928
1929 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1930
16101931 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
16111932 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsetsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
16121933 if e1 != 0 {
16151936 return
16161937 }
16171938
1939 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1940
16181941 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
16191942 var _p0 *byte
16201943 if len(p) > 0 {
00 // mksysctl_openbsd.pl
1 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
1 // Code generated by the command above; DO NOT EDIT.
22
33 package unix
44
00 // mksysctl_openbsd.pl
1 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
1 // Code generated by the command above; DO NOT EDIT.
2
3 // +build amd64,openbsd
24
35 package unix
46
1315 {"ddb.max_line", []_C_int{9, 3}},
1416 {"ddb.max_width", []_C_int{9, 2}},
1517 {"ddb.panic", []_C_int{9, 5}},
18 {"ddb.profile", []_C_int{9, 9}},
1619 {"ddb.radix", []_C_int{9, 1}},
1720 {"ddb.tab_stop_width", []_C_int{9, 4}},
1821 {"ddb.trigger", []_C_int{9, 8}},
2831 {"hw.ncpu", []_C_int{6, 3}},
2932 {"hw.ncpufound", []_C_int{6, 21}},
3033 {"hw.pagesize", []_C_int{6, 7}},
34 {"hw.perfpolicy", []_C_int{6, 23}},
3135 {"hw.physmem", []_C_int{6, 19}},
3236 {"hw.product", []_C_int{6, 15}},
3337 {"hw.serialno", []_C_int{6, 17}},
3640 {"hw.uuid", []_C_int{6, 18}},
3741 {"hw.vendor", []_C_int{6, 14}},
3842 {"hw.version", []_C_int{6, 16}},
39 {"kern.arandom", []_C_int{1, 37}},
43 {"kern.allowkmem", []_C_int{1, 52}},
4044 {"kern.argmax", []_C_int{1, 8}},
4145 {"kern.boottime", []_C_int{1, 21}},
4246 {"kern.bufcachepercent", []_C_int{1, 72}},
4549 {"kern.consdev", []_C_int{1, 75}},
4650 {"kern.cp_time", []_C_int{1, 40}},
4751 {"kern.cp_time2", []_C_int{1, 71}},
48 {"kern.cryptodevallowsoft", []_C_int{1, 53}},
52 {"kern.dnsjackport", []_C_int{1, 13}},
4953 {"kern.domainname", []_C_int{1, 22}},
5054 {"kern.file", []_C_int{1, 73}},
5155 {"kern.forkstat", []_C_int{1, 42}},
5256 {"kern.fscale", []_C_int{1, 46}},
5357 {"kern.fsync", []_C_int{1, 33}},
58 {"kern.global_ptrace", []_C_int{1, 81}},
5459 {"kern.hostid", []_C_int{1, 11}},
5560 {"kern.hostname", []_C_int{1, 10}},
5661 {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}},
8388 {"kern.pool_debug", []_C_int{1, 77}},
8489 {"kern.posix1version", []_C_int{1, 17}},
8590 {"kern.proc", []_C_int{1, 66}},
86 {"kern.random", []_C_int{1, 31}},
8791 {"kern.rawpartition", []_C_int{1, 24}},
8892 {"kern.saved_ids", []_C_int{1, 20}},
8993 {"kern.securelevel", []_C_int{1, 9}},
101105 {"kern.timecounter.hardware", []_C_int{1, 69, 3}},
102106 {"kern.timecounter.tick", []_C_int{1, 69, 1}},
103107 {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}},
104 {"kern.tty.maxptys", []_C_int{1, 44, 6}},
105 {"kern.tty.nptys", []_C_int{1, 44, 7}},
106108 {"kern.tty.tk_cancc", []_C_int{1, 44, 4}},
107109 {"kern.tty.tk_nin", []_C_int{1, 44, 1}},
108110 {"kern.tty.tk_nout", []_C_int{1, 44, 2}},
109111 {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}},
110112 {"kern.tty.ttyinfo", []_C_int{1, 44, 5}},
111113 {"kern.ttycount", []_C_int{1, 57}},
112 {"kern.userasymcrypto", []_C_int{1, 60}},
113 {"kern.usercrypto", []_C_int{1, 52}},
114 {"kern.usermount", []_C_int{1, 30}},
115114 {"kern.version", []_C_int{1, 4}},
116 {"kern.vnode", []_C_int{1, 13}},
117115 {"kern.watchdog.auto", []_C_int{1, 64, 2}},
118116 {"kern.watchdog.period", []_C_int{1, 64, 1}},
117 {"kern.wxabort", []_C_int{1, 74}},
119118 {"net.bpf.bufsize", []_C_int{4, 31, 1}},
120119 {"net.bpf.maxbufsize", []_C_int{4, 31, 2}},
121120 {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}},
143142 {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}},
144143 {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}},
145144 {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}},
145 {"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}},
146146 {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}},
147 {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}},
147148 {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}},
148149 {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}},
149150 {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}},
152153 {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}},
153154 {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}},
154155 {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}},
156 {"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}},
155157 {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}},
156158 {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}},
159 {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}},
157160 {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}},
158161 {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}},
159162 {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}},
172175 {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}},
173176 {"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}},
174177 {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}},
175 {"net.inet.pim.stats", []_C_int{4, 2, 103, 1}},
176178 {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}},
177179 {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}},
178180 {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}},
186188 {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}},
187189 {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}},
188190 {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}},
191 {"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}},
189192 {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}},
190193 {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}},
191194 {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}},
193196 {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}},
194197 {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}},
195198 {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}},
199 {"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}},
200 {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}},
196201 {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}},
197202 {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}},
198203 {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}},
204 {"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}},
199205 {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}},
200206 {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}},
201207 {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}},
208214 {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}},
209215 {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}},
210216 {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}},
211 {"net.inet6.icmp6.nd6_prune", []_C_int{4, 24, 30, 6}},
212217 {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}},
213 {"net.inet6.icmp6.nd6_useloopback", []_C_int{4, 24, 30, 11}},
214 {"net.inet6.icmp6.nodeinfo", []_C_int{4, 24, 30, 13}},
215 {"net.inet6.icmp6.rediraccept", []_C_int{4, 24, 30, 2}},
216218 {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}},
217 {"net.inet6.ip6.accept_rtadv", []_C_int{4, 24, 17, 12}},
218219 {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}},
219220 {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}},
220221 {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}},
227228 {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}},
228229 {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}},
229230 {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}},
230 {"net.inet6.ip6.maxifdefrouters", []_C_int{4, 24, 17, 47}},
231 {"net.inet6.ip6.maxifprefixes", []_C_int{4, 24, 17, 46}},
232231 {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}},
232 {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}},
233 {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}},
233234 {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}},
234235 {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}},
235236 {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}},
236237 {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}},
237238 {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}},
238239 {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}},
239 {"net.inet6.ip6.rr_prune", []_C_int{4, 24, 17, 22}},
240 {"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}},
240241 {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}},
241242 {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}},
242243 {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}},
243 {"net.inet6.ip6.v6only", []_C_int{4, 24, 17, 24}},
244244 {"net.key.sadb_dump", []_C_int{4, 30, 1}},
245245 {"net.key.spd_dump", []_C_int{4, 30, 2}},
246246 {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}},
00 // mksysctl_openbsd.pl
1 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
1 // Code generated by the command above; DO NOT EDIT.
22
33 package unix
44
0 // mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/syscall.h
1 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
0 // go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/sys/syscall.h
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build 386,darwin
44
120120 SYS_CSOPS = 169
121121 SYS_CSOPS_AUDITTOKEN = 170
122122 SYS_WAITID = 173
123 SYS_KDEBUG_TYPEFILTER = 177
124 SYS_KDEBUG_TRACE_STRING = 178
123125 SYS_KDEBUG_TRACE64 = 179
124126 SYS_KDEBUG_TRACE = 180
125127 SYS_SETGID = 181
126128 SYS_SETEGID = 182
127129 SYS_SETEUID = 183
128130 SYS_SIGRETURN = 184
129 SYS_CHUD = 185
131 SYS_THREAD_SELFCOUNTS = 186
130132 SYS_FDATASYNC = 187
131133 SYS_STAT = 188
132134 SYS_FSTAT = 189
277279 SYS_KQUEUE = 362
278280 SYS_KEVENT = 363
279281 SYS_LCHOWN = 364
280 SYS_STACK_SNAPSHOT = 365
281282 SYS_BSDTHREAD_REGISTER = 366
282283 SYS_WORKQ_OPEN = 367
283284 SYS_WORKQ_KERNRETURN = 368
286287 SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
287288 SYS_THREAD_SELFID = 372
288289 SYS_LEDGER = 373
290 SYS_KEVENT_QOS = 374
291 SYS_KEVENT_ID = 375
289292 SYS___MAC_EXECVE = 380
290293 SYS___MAC_SYSCALL = 381
291294 SYS___MAC_GET_FILE = 382
297300 SYS___MAC_GET_FD = 388
298301 SYS___MAC_SET_FD = 389
299302 SYS___MAC_GET_PID = 390
300 SYS___MAC_GET_LCID = 391
301 SYS___MAC_GET_LCTX = 392
302 SYS___MAC_SET_LCTX = 393
303 SYS_SETLCID = 394
304 SYS_GETLCID = 395
303 SYS_PSELECT = 394
304 SYS_PSELECT_NOCANCEL = 395
305305 SYS_READ_NOCANCEL = 396
306306 SYS_WRITE_NOCANCEL = 397
307307 SYS_OPEN_NOCANCEL = 398
350350 SYS_GUARDED_CLOSE_NP = 442
351351 SYS_GUARDED_KQUEUE_NP = 443
352352 SYS_CHANGE_FDGUARD_NP = 444
353 SYS_USRCTL = 445
353354 SYS_PROC_RLIMIT_CONTROL = 446
354355 SYS_CONNECTX = 447
355356 SYS_DISCONNECTX = 448
366367 SYS_COALITION_INFO = 459
367368 SYS_NECP_MATCH_POLICY = 460
368369 SYS_GETATTRLISTBULK = 461
370 SYS_CLONEFILEAT = 462
369371 SYS_OPENAT = 463
370372 SYS_OPENAT_NOCANCEL = 464
371373 SYS_RENAMEAT = 465
391393 SYS_GUARDED_WRITE_NP = 485
392394 SYS_GUARDED_PWRITE_NP = 486
393395 SYS_GUARDED_WRITEV_NP = 487
394 SYS_RENAME_EXT = 488
396 SYS_RENAMEATX_NP = 488
395397 SYS_MREMAP_ENCRYPTED = 489
396 SYS_MAXSYSCALL = 490
398 SYS_NETAGENT_TRIGGER = 490
399 SYS_STACK_SNAPSHOT_WITH_CONFIG = 491
400 SYS_MICROSTACKSHOT = 492
401 SYS_GRAB_PGO_DATA = 493
402 SYS_PERSONA = 494
403 SYS_WORK_INTERVAL_CTL = 499
404 SYS_GETENTROPY = 500
405 SYS_NECP_OPEN = 501
406 SYS_NECP_CLIENT_ACTION = 502
407 SYS___NEXUS_OPEN = 503
408 SYS___NEXUS_REGISTER = 504
409 SYS___NEXUS_DEREGISTER = 505
410 SYS___NEXUS_CREATE = 506
411 SYS___NEXUS_DESTROY = 507
412 SYS___NEXUS_GET_OPT = 508
413 SYS___NEXUS_SET_OPT = 509
414 SYS___CHANNEL_OPEN = 510
415 SYS___CHANNEL_GET_INFO = 511
416 SYS___CHANNEL_SYNC = 512
417 SYS___CHANNEL_GET_OPT = 513
418 SYS___CHANNEL_SET_OPT = 514
419 SYS_ULOCK_WAIT = 515
420 SYS_ULOCK_WAKE = 516
421 SYS_FCLONEFILEAT = 517
422 SYS_FS_SNAPSHOT = 518
423 SYS_TERMINATE_WITH_PAYLOAD = 520
424 SYS_ABORT_WITH_PAYLOAD = 521
425 SYS_NECP_SESSION_OPEN = 522
426 SYS_NECP_SESSION_ACTION = 523
427 SYS_SETATTRLISTAT = 524
428 SYS_NET_QOS_GUIDELINE = 525
429 SYS_FMOUNT = 526
430 SYS_NTP_ADJTIME = 527
431 SYS_NTP_GETTIME = 528
432 SYS_OS_FAULT_WITH_PAYLOAD = 529
433 SYS_MAXSYSCALL = 530
434 SYS_INVALID = 63
397435 )
0 // mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/syscall.h
1 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
0 // go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/sys/syscall.h
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build amd64,darwin
44
120120 SYS_CSOPS = 169
121121 SYS_CSOPS_AUDITTOKEN = 170
122122 SYS_WAITID = 173
123 SYS_KDEBUG_TYPEFILTER = 177
124 SYS_KDEBUG_TRACE_STRING = 178
123125 SYS_KDEBUG_TRACE64 = 179
124126 SYS_KDEBUG_TRACE = 180
125127 SYS_SETGID = 181
126128 SYS_SETEGID = 182
127129 SYS_SETEUID = 183
128130 SYS_SIGRETURN = 184
129 SYS_CHUD = 185
131 SYS_THREAD_SELFCOUNTS = 186
130132 SYS_FDATASYNC = 187
131133 SYS_STAT = 188
132134 SYS_FSTAT = 189
277279 SYS_KQUEUE = 362
278280 SYS_KEVENT = 363
279281 SYS_LCHOWN = 364
280 SYS_STACK_SNAPSHOT = 365
281282 SYS_BSDTHREAD_REGISTER = 366
282283 SYS_WORKQ_OPEN = 367
283284 SYS_WORKQ_KERNRETURN = 368
286287 SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
287288 SYS_THREAD_SELFID = 372
288289 SYS_LEDGER = 373
290 SYS_KEVENT_QOS = 374
291 SYS_KEVENT_ID = 375
289292 SYS___MAC_EXECVE = 380
290293 SYS___MAC_SYSCALL = 381
291294 SYS___MAC_GET_FILE = 382
297300 SYS___MAC_GET_FD = 388
298301 SYS___MAC_SET_FD = 389
299302 SYS___MAC_GET_PID = 390
300 SYS___MAC_GET_LCID = 391
301 SYS___MAC_GET_LCTX = 392
302 SYS___MAC_SET_LCTX = 393
303 SYS_SETLCID = 394
304 SYS_GETLCID = 395
303 SYS_PSELECT = 394
304 SYS_PSELECT_NOCANCEL = 395
305305 SYS_READ_NOCANCEL = 396
306306 SYS_WRITE_NOCANCEL = 397
307307 SYS_OPEN_NOCANCEL = 398
350350 SYS_GUARDED_CLOSE_NP = 442
351351 SYS_GUARDED_KQUEUE_NP = 443
352352 SYS_CHANGE_FDGUARD_NP = 444
353 SYS_USRCTL = 445
353354 SYS_PROC_RLIMIT_CONTROL = 446
354355 SYS_CONNECTX = 447
355356 SYS_DISCONNECTX = 448
366367 SYS_COALITION_INFO = 459
367368 SYS_NECP_MATCH_POLICY = 460
368369 SYS_GETATTRLISTBULK = 461
370 SYS_CLONEFILEAT = 462
369371 SYS_OPENAT = 463
370372 SYS_OPENAT_NOCANCEL = 464
371373 SYS_RENAMEAT = 465
391393 SYS_GUARDED_WRITE_NP = 485
392394 SYS_GUARDED_PWRITE_NP = 486
393395 SYS_GUARDED_WRITEV_NP = 487
394 SYS_RENAME_EXT = 488
396 SYS_RENAMEATX_NP = 488
395397 SYS_MREMAP_ENCRYPTED = 489
396 SYS_MAXSYSCALL = 490
398 SYS_NETAGENT_TRIGGER = 490
399 SYS_STACK_SNAPSHOT_WITH_CONFIG = 491
400 SYS_MICROSTACKSHOT = 492
401 SYS_GRAB_PGO_DATA = 493
402 SYS_PERSONA = 494
403 SYS_WORK_INTERVAL_CTL = 499
404 SYS_GETENTROPY = 500
405 SYS_NECP_OPEN = 501
406 SYS_NECP_CLIENT_ACTION = 502
407 SYS___NEXUS_OPEN = 503
408 SYS___NEXUS_REGISTER = 504
409 SYS___NEXUS_DEREGISTER = 505
410 SYS___NEXUS_CREATE = 506
411 SYS___NEXUS_DESTROY = 507
412 SYS___NEXUS_GET_OPT = 508
413 SYS___NEXUS_SET_OPT = 509
414 SYS___CHANNEL_OPEN = 510
415 SYS___CHANNEL_GET_INFO = 511
416 SYS___CHANNEL_SYNC = 512
417 SYS___CHANNEL_GET_OPT = 513
418 SYS___CHANNEL_SET_OPT = 514
419 SYS_ULOCK_WAIT = 515
420 SYS_ULOCK_WAKE = 516
421 SYS_FCLONEFILEAT = 517
422 SYS_FS_SNAPSHOT = 518
423 SYS_TERMINATE_WITH_PAYLOAD = 520
424 SYS_ABORT_WITH_PAYLOAD = 521
425 SYS_NECP_SESSION_OPEN = 522
426 SYS_NECP_SESSION_ACTION = 523
427 SYS_SETATTRLISTAT = 524
428 SYS_NET_QOS_GUIDELINE = 525
429 SYS_FMOUNT = 526
430 SYS_NTP_ADJTIME = 527
431 SYS_NTP_GETTIME = 528
432 SYS_OS_FAULT_WITH_PAYLOAD = 529
433 SYS_MAXSYSCALL = 530
434 SYS_INVALID = 63
397435 )
0 // mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/sys/syscall.h
0 // go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build arm,darwin
128128 SYS_SETEGID = 182
129129 SYS_SETEUID = 183
130130 SYS_SIGRETURN = 184
131 SYS_THREAD_SELFCOUNTS = 186
131132 SYS_FDATASYNC = 187
132133 SYS_STAT = 188
133134 SYS_FSTAT = 189
287288 SYS_THREAD_SELFID = 372
288289 SYS_LEDGER = 373
289290 SYS_KEVENT_QOS = 374
291 SYS_KEVENT_ID = 375
290292 SYS___MAC_EXECVE = 380
291293 SYS___MAC_SYSCALL = 381
292294 SYS___MAC_GET_FILE = 382
420422 SYS_FS_SNAPSHOT = 518
421423 SYS_TERMINATE_WITH_PAYLOAD = 520
422424 SYS_ABORT_WITH_PAYLOAD = 521
423 SYS_MAXSYSCALL = 522
425 SYS_NECP_SESSION_OPEN = 522
426 SYS_NECP_SESSION_ACTION = 523
427 SYS_SETATTRLISTAT = 524
428 SYS_NET_QOS_GUIDELINE = 525
429 SYS_FMOUNT = 526
430 SYS_NTP_ADJTIME = 527
431 SYS_NTP_GETTIME = 528
432 SYS_OS_FAULT_WITH_PAYLOAD = 529
433 SYS_MAXSYSCALL = 530
424434 SYS_INVALID = 63
425435 )
0 // mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/sys/syscall.h
0 // go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build arm64,darwin
128128 SYS_SETEGID = 182
129129 SYS_SETEUID = 183
130130 SYS_SIGRETURN = 184
131 SYS_THREAD_SELFCOUNTS = 186
131132 SYS_FDATASYNC = 187
132133 SYS_STAT = 188
133134 SYS_FSTAT = 189
287288 SYS_THREAD_SELFID = 372
288289 SYS_LEDGER = 373
289290 SYS_KEVENT_QOS = 374
291 SYS_KEVENT_ID = 375
290292 SYS___MAC_EXECVE = 380
291293 SYS___MAC_SYSCALL = 381
292294 SYS___MAC_GET_FILE = 382
420422 SYS_FS_SNAPSHOT = 518
421423 SYS_TERMINATE_WITH_PAYLOAD = 520
422424 SYS_ABORT_WITH_PAYLOAD = 521
423 SYS_MAXSYSCALL = 522
425 SYS_NECP_SESSION_OPEN = 522
426 SYS_NECP_SESSION_ACTION = 523
427 SYS_SETATTRLISTAT = 524
428 SYS_NET_QOS_GUIDELINE = 525
429 SYS_FMOUNT = 526
430 SYS_NTP_ADJTIME = 527
431 SYS_NTP_GETTIME = 528
432 SYS_OS_FAULT_WITH_PAYLOAD = 529
433 SYS_MAXSYSCALL = 530
424434 SYS_INVALID = 63
425435 )
0 // mksysnum_dragonfly.pl
0 // go run mksysnum.go https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build amd64,dragonfly
1212 SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); }
1313 SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
1414 SYS_CLOSE = 6 // { int close(int fd); }
15 SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, \
15 SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, struct rusage *rusage); } wait4 wait_args int
1616 SYS_LINK = 9 // { int link(char *path, char *link); }
1717 SYS_UNLINK = 10 // { int unlink(char *path); }
1818 SYS_CHDIR = 12 // { int chdir(char *path); }
2121 SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
2222 SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
2323 SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
24 SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, \
24 SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, int flags); }
2525 SYS_GETPID = 20 // { pid_t getpid(void); }
26 SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, \
26 SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); }
2727 SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
2828 SYS_SETUID = 23 // { int setuid(uid_t uid); }
2929 SYS_GETUID = 24 // { uid_t getuid(void); }
3030 SYS_GETEUID = 25 // { uid_t geteuid(void); }
31 SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, \
31 SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, int data); }
3232 SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); }
3333 SYS_SENDMSG = 28 // { int sendmsg(int s, caddr_t msg, int flags); }
34 SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, \
34 SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, int flags, caddr_t from, int *fromlenaddr); }
3535 SYS_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); }
3636 SYS_GETPEERNAME = 31 // { int getpeername(int fdes, caddr_t asa, int *alen); }
3737 SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, caddr_t asa, int *alen); }
4444 SYS_DUP = 41 // { int dup(int fd); }
4545 SYS_PIPE = 42 // { int pipe(void); }
4646 SYS_GETEGID = 43 // { gid_t getegid(void); }
47 SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
48 SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, \
47 SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }
48 SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); }
4949 SYS_GETGID = 47 // { gid_t getgid(void); }
5050 SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); }
5151 SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
6666 SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
6767 SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); }
6868 SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
69 SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
69 SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, char *vec); }
7070 SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
7171 SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); }
7272 SYS_GETPGRP = 81 // { int getpgrp(void); }
7373 SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
74 SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, \
74 SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }
7575 SYS_SWAPON = 85 // { int swapon(char *name); }
7676 SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); }
7777 SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
7878 SYS_DUP2 = 90 // { int dup2(int from, int to); }
7979 SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
80 SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
80 SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
8181 SYS_FSYNC = 95 // { int fsync(int fd); }
8282 SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); }
8383 SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); }
8484 SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); }
8585 SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
8686 SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); }
87 SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
87 SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); }
8888 SYS_LISTEN = 106 // { int listen(int s, int backlog); }
89 SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
89 SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }
9090 SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); }
91 SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
91 SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); }
9292 SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
93 SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
94 SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
93 SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); }
94 SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }
9595 SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
9696 SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
9797 SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
9999 SYS_RENAME = 128 // { int rename(char *from, char *to); }
100100 SYS_FLOCK = 131 // { int flock(int fd, int how); }
101101 SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
102 SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
102 SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); }
103103 SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
104 SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, \
104 SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }
105105 SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
106106 SYS_RMDIR = 137 // { int rmdir(char *path); }
107107 SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); }
108 SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
108 SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }
109109 SYS_SETSID = 147 // { int setsid(void); }
110 SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
110 SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); }
111111 SYS_STATFS = 157 // { int statfs(char *path, struct statfs *buf); }
112112 SYS_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); }
113113 SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); }
115115 SYS_SETDOMAINNAME = 163 // { int setdomainname(char *domainname, int len); }
116116 SYS_UNAME = 164 // { int uname(struct utsname *name); }
117117 SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
118 SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
119 SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, \
120 SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, \
118 SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }
119 SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, size_t nbyte, int flags, off_t offset); }
120 SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, size_t nbyte, int flags, off_t offset); }
121121 SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
122122 SYS_SETGID = 181 // { int setgid(gid_t gid); }
123123 SYS_SETEGID = 182 // { int setegid(gid_t egid); }
124124 SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
125125 SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
126126 SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
127 SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
128 SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
129 SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, \
127 SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
128 SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
129 SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, int pad, off_t pos); }
130130 // SYS_NOSYS = 198; // { int nosys(void); } __syscall __syscall_args int
131 SYS_LSEEK = 199 // { off_t lseek(int fd, int pad, off_t offset, \
131 SYS_LSEEK = 199 // { off_t lseek(int fd, int pad, off_t offset, int whence); }
132132 SYS_TRUNCATE = 200 // { int truncate(char *path, int pad, off_t length); }
133133 SYS_FTRUNCATE = 201 // { int ftruncate(int fd, int pad, off_t length); }
134 SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, \
134 SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int
135135 SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
136136 SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
137137 SYS_UNDELETE = 205 // { int undelete(char *path); }
138138 SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
139139 SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
140 SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
141 SYS___SEMCTL = 220 // { int __semctl(int semid, int semnum, int cmd, \
140 SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, int timeout); }
141 SYS___SEMCTL = 220 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); }
142142 SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); }
143 SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, \
144 SYS_MSGCTL = 224 // { int msgctl(int msqid, int cmd, \
143 SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, u_int nsops); }
144 SYS_MSGCTL = 224 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); }
145145 SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); }
146 SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, \
147 SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, \
148 SYS_SHMAT = 228 // { caddr_t shmat(int shmid, const void *shmaddr, \
149 SYS_SHMCTL = 229 // { int shmctl(int shmid, int cmd, \
146 SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
147 SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
148 SYS_SHMAT = 228 // { caddr_t shmat(int shmid, const void *shmaddr, int shmflg); }
149 SYS_SHMCTL = 229 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); }
150150 SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); }
151151 SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); }
152 SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
153 SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, \
154 SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
155 SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
152 SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }
153 SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }
154 SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }
155 SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
156156 SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); }
157157 SYS_RFORK = 251 // { int rfork(int flags); }
158 SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, \
158 SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, int timeout); }
159159 SYS_ISSETUGID = 253 // { int issetugid(void); }
160160 SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
161161 SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
162162 SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
163 SYS_EXTPREADV = 289 // { ssize_t extpreadv(int fd, struct iovec *iovp, \
164 SYS_EXTPWRITEV = 290 // { ssize_t extpwritev(int fd, struct iovec *iovp,\
163 SYS_EXTPREADV = 289 // { ssize_t extpreadv(int fd, struct iovec *iovp, u_int iovcnt, int flags, off_t offset); }
164 SYS_EXTPWRITEV = 290 // { ssize_t extpwritev(int fd, struct iovec *iovp,u_int iovcnt, int flags, off_t offset); }
165165 SYS_FHSTATFS = 297 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
166166 SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
167167 SYS_MODNEXT = 300 // { int modnext(int modid); }
199199 SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
200200 SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, void *data); }
201201 SYS_JAIL = 338 // { int jail(struct jail *jail); }
202 SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, const sigset_t *set, \
202 SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, const sigset_t *set, sigset_t *oset); }
203203 SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
204 SYS_SIGACTION = 342 // { int sigaction(int sig, const struct sigaction *act, \
204 SYS_SIGACTION = 342 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }
205205 SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
206206 SYS_SIGRETURN = 344 // { int sigreturn(ucontext_t *sigcntxp); }
207 SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set,\
208 SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set,\
209 SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
210 SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
211 SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, \
212 SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, \
213 SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
207 SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set,siginfo_t *info, const struct timespec *timeout); }
208 SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set,siginfo_t *info); }
209 SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); }
210 SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); }
211 SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); }
212 SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); }
213 SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, acl_type_t type); }
214214 SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }
215 SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
216 SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, \
217 SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
218 SYS_EXTATTR_SET_FILE = 356 // { int extattr_set_file(const char *path, \
219 SYS_EXTATTR_GET_FILE = 357 // { int extattr_get_file(const char *path, \
220 SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
215 SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }
216 SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }
217 SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
218 SYS_EXTATTR_SET_FILE = 356 // { int extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
219 SYS_EXTATTR_GET_FILE = 357 // { int extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
220 SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
221221 SYS_AIO_WAITCOMPLETE = 359 // { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
222222 SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
223223 SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
224224 SYS_KQUEUE = 362 // { int kqueue(void); }
225 SYS_KEVENT = 363 // { int kevent(int fd, \
225 SYS_KEVENT = 363 // { int kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
226226 SYS_KENV = 390 // { int kenv(int what, const char *name, char *value, int len); }
227227 SYS_LCHFLAGS = 391 // { int lchflags(char *path, int flags); }
228228 SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
229 SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, \
229 SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
230230 SYS_VARSYM_SET = 450 // { int varsym_set(int level, const char *name, const char *data); }
231231 SYS_VARSYM_GET = 451 // { int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
232232 SYS_VARSYM_LIST = 452 // { int varsym_list(int level, char *buf, int maxsize, int *marker); }
244244 SYS_FSTAT = 476 // { int fstat(int fd, struct stat *sb); }
245245 SYS_LSTAT = 477 // { int lstat(const char *path, struct stat *ub); }
246246 SYS_FHSTAT = 478 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
247 SYS_GETDIRENTRIES = 479 // { int getdirentries(int fd, char *buf, u_int count, \
247 SYS_GETDIRENTRIES = 479 // { int getdirentries(int fd, char *buf, u_int count, long *basep); }
248248 SYS_GETDENTS = 480 // { int getdents(int fd, char *buf, size_t count); }
249 SYS_USCHED_SET = 481 // { int usched_set(pid_t pid, int cmd, void *data, \
249 SYS_USCHED_SET = 481 // { int usched_set(pid_t pid, int cmd, void *data, int bytes); }
250250 SYS_EXTACCEPT = 482 // { int extaccept(int s, int flags, caddr_t name, int *anamelen); }
251251 SYS_EXTCONNECT = 483 // { int extconnect(int s, int flags, caddr_t name, int namelen); }
252252 SYS_MCONTROL = 485 // { int mcontrol(void *addr, size_t len, int behav, off_t value); }
253253 SYS_VMSPACE_CREATE = 486 // { int vmspace_create(void *id, int type, void *data); }
254254 SYS_VMSPACE_DESTROY = 487 // { int vmspace_destroy(void *id); }
255 SYS_VMSPACE_CTL = 488 // { int vmspace_ctl(void *id, int cmd, \
256 SYS_VMSPACE_MMAP = 489 // { int vmspace_mmap(void *id, void *addr, size_t len, \
257 SYS_VMSPACE_MUNMAP = 490 // { int vmspace_munmap(void *id, void *addr, \
258 SYS_VMSPACE_MCONTROL = 491 // { int vmspace_mcontrol(void *id, void *addr, \
259 SYS_VMSPACE_PREAD = 492 // { ssize_t vmspace_pread(void *id, void *buf, \
260 SYS_VMSPACE_PWRITE = 493 // { ssize_t vmspace_pwrite(void *id, const void *buf, \
255 SYS_VMSPACE_CTL = 488 // { int vmspace_ctl(void *id, int cmd, struct trapframe *tframe, struct vextframe *vframe); }
256 SYS_VMSPACE_MMAP = 489 // { int vmspace_mmap(void *id, void *addr, size_t len, int prot, int flags, int fd, off_t offset); }
257 SYS_VMSPACE_MUNMAP = 490 // { int vmspace_munmap(void *id, void *addr, size_t len); }
258 SYS_VMSPACE_MCONTROL = 491 // { int vmspace_mcontrol(void *id, void *addr, size_t len, int behav, off_t value); }
259 SYS_VMSPACE_PREAD = 492 // { ssize_t vmspace_pread(void *id, void *buf, size_t nbyte, int flags, off_t offset); }
260 SYS_VMSPACE_PWRITE = 493 // { ssize_t vmspace_pwrite(void *id, const void *buf, size_t nbyte, int flags, off_t offset); }
261261 SYS_EXTEXIT = 494 // { void extexit(int how, int status, void *addr); }
262262 SYS_LWP_CREATE = 495 // { int lwp_create(struct lwp_params *params); }
263263 SYS_LWP_GETTID = 496 // { lwpid_t lwp_gettid(void); }
264264 SYS_LWP_KILL = 497 // { int lwp_kill(pid_t pid, lwpid_t tid, int signum); }
265265 SYS_LWP_RTPRIO = 498 // { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }
266 SYS_PSELECT = 499 // { int pselect(int nd, fd_set *in, fd_set *ou, \
266 SYS_PSELECT = 499 // { int pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sigmask); }
267267 SYS_STATVFS = 500 // { int statvfs(const char *path, struct statvfs *buf); }
268268 SYS_FSTATVFS = 501 // { int fstatvfs(int fd, struct statvfs *buf); }
269269 SYS_FHSTATVFS = 502 // { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); }
270 SYS_GETVFSSTAT = 503 // { int getvfsstat(struct statfs *buf, \
270 SYS_GETVFSSTAT = 503 // { int getvfsstat(struct statfs *buf, struct statvfs *vbuf, long vbufsize, int flags); }
271271 SYS_OPENAT = 504 // { int openat(int fd, char *path, int flags, int mode); }
272 SYS_FSTATAT = 505 // { int fstatat(int fd, char *path, \
273 SYS_FCHMODAT = 506 // { int fchmodat(int fd, char *path, int mode, \
274 SYS_FCHOWNAT = 507 // { int fchownat(int fd, char *path, int uid, int gid, \
272 SYS_FSTATAT = 505 // { int fstatat(int fd, char *path, struct stat *sb, int flags); }
273 SYS_FCHMODAT = 506 // { int fchmodat(int fd, char *path, int mode, int flags); }
274 SYS_FCHOWNAT = 507 // { int fchownat(int fd, char *path, int uid, int gid, int flags); }
275275 SYS_UNLINKAT = 508 // { int unlinkat(int fd, char *path, int flags); }
276 SYS_FACCESSAT = 509 // { int faccessat(int fd, char *path, int amode, \
277 SYS_MQ_OPEN = 510 // { mqd_t mq_open(const char * name, int oflag, \
276 SYS_FACCESSAT = 509 // { int faccessat(int fd, char *path, int amode, int flags); }
277 SYS_MQ_OPEN = 510 // { mqd_t mq_open(const char * name, int oflag, mode_t mode, struct mq_attr *attr); }
278278 SYS_MQ_CLOSE = 511 // { int mq_close(mqd_t mqdes); }
279279 SYS_MQ_UNLINK = 512 // { int mq_unlink(const char *name); }
280 SYS_MQ_GETATTR = 513 // { int mq_getattr(mqd_t mqdes, \
281 SYS_MQ_SETATTR = 514 // { int mq_setattr(mqd_t mqdes, \
282 SYS_MQ_NOTIFY = 515 // { int mq_notify(mqd_t mqdes, \
283 SYS_MQ_SEND = 516 // { int mq_send(mqd_t mqdes, const char *msg_ptr, \
284 SYS_MQ_RECEIVE = 517 // { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \
285 SYS_MQ_TIMEDSEND = 518 // { int mq_timedsend(mqd_t mqdes, \
286 SYS_MQ_TIMEDRECEIVE = 519 // { ssize_t mq_timedreceive(mqd_t mqdes, \
280 SYS_MQ_GETATTR = 513 // { int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat); }
281 SYS_MQ_SETATTR = 514 // { int mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat); }
282 SYS_MQ_NOTIFY = 515 // { int mq_notify(mqd_t mqdes, const struct sigevent *notification); }
283 SYS_MQ_SEND = 516 // { int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio); }
284 SYS_MQ_RECEIVE = 517 // { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio); }
285 SYS_MQ_TIMEDSEND = 518 // { int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }
286 SYS_MQ_TIMEDRECEIVE = 519 // { ssize_t mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
287287 SYS_IOPRIO_SET = 520 // { int ioprio_set(int which, int who, int prio); }
288288 SYS_IOPRIO_GET = 521 // { int ioprio_get(int which, int who); }
289289 SYS_CHROOT_KERNEL = 522 // { int chroot_kernel(char *path); }
290 SYS_RENAMEAT = 523 // { int renameat(int oldfd, char *old, int newfd, \
290 SYS_RENAMEAT = 523 // { int renameat(int oldfd, char *old, int newfd, char *new); }
291291 SYS_MKDIRAT = 524 // { int mkdirat(int fd, char *path, mode_t mode); }
292292 SYS_MKFIFOAT = 525 // { int mkfifoat(int fd, char *path, mode_t mode); }
293 SYS_MKNODAT = 526 // { int mknodat(int fd, char *path, mode_t mode, \
294 SYS_READLINKAT = 527 // { int readlinkat(int fd, char *path, char *buf, \
293 SYS_MKNODAT = 526 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
294 SYS_READLINKAT = 527 // { int readlinkat(int fd, char *path, char *buf, size_t bufsize); }
295295 SYS_SYMLINKAT = 528 // { int symlinkat(char *path1, int fd, char *path2); }
296296 SYS_SWAPOFF = 529 // { int swapoff(char *name); }
297 SYS_VQUOTACTL = 530 // { int vquotactl(const char *path, \
298 SYS_LINKAT = 531 // { int linkat(int fd1, char *path1, int fd2, \
297 SYS_VQUOTACTL = 530 // { int vquotactl(const char *path, struct plistref *pref); }
298 SYS_LINKAT = 531 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flags); }
299299 SYS_EACCESS = 532 // { int eaccess(char *path, int flags); }
300300 SYS_LPATHCONF = 533 // { int lpathconf(char *path, int name); }
301301 SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
307307 SYS_FUTIMENS = 540 // { int futimens(int fd, const struct timespec *ts); }
308308 SYS_ACCEPT4 = 541 // { int accept4(int s, caddr_t name, int *anamelen, int flags); }
309309 SYS_LWP_SETNAME = 542 // { int lwp_setname(lwpid_t tid, const char *name); }
310 SYS_PPOLL = 543 // { int ppoll(struct pollfd *fds, u_int nfds, \
310 SYS_PPOLL = 543 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *sigmask); }
311311 SYS_LWP_SETAFFINITY = 544 // { int lwp_setaffinity(pid_t pid, lwpid_t tid, const cpumask_t *mask); }
312312 SYS_LWP_GETAFFINITY = 545 // { int lwp_getaffinity(pid_t pid, lwpid_t tid, cpumask_t *mask); }
313313 SYS_LWP_CREATE2 = 546 // { int lwp_create2(struct lwp_params *params, const cpumask_t *mask); }
0 // mksysnum_freebsd.pl
0 // go run mksysnum.go https://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build 386,freebsd
66
77 const (
88 // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
9 SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
10 SYS_FORK = 2 // { int fork(void); }
11 SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
12 SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
13 SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
14 SYS_CLOSE = 6 // { int close(int fd); }
15 SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
16 SYS_LINK = 9 // { int link(char *path, char *link); }
17 SYS_UNLINK = 10 // { int unlink(char *path); }
18 SYS_CHDIR = 12 // { int chdir(char *path); }
19 SYS_FCHDIR = 13 // { int fchdir(int fd); }
20 SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
21 SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
22 SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
23 SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
24 SYS_GETPID = 20 // { pid_t getpid(void); }
25 SYS_MOUNT = 21 // { int mount(char *type, char *path, \
26 SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
27 SYS_SETUID = 23 // { int setuid(uid_t uid); }
28 SYS_GETUID = 24 // { uid_t getuid(void); }
29 SYS_GETEUID = 25 // { uid_t geteuid(void); }
30 SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
31 SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
32 SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
33 SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
34 SYS_ACCEPT = 30 // { int accept(int s, \
35 SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
36 SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
37 SYS_ACCESS = 33 // { int access(char *path, int amode); }
38 SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
39 SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
40 SYS_SYNC = 36 // { int sync(void); }
41 SYS_KILL = 37 // { int kill(int pid, int signum); }
42 SYS_GETPPID = 39 // { pid_t getppid(void); }
43 SYS_DUP = 41 // { int dup(u_int fd); }
44 SYS_PIPE = 42 // { int pipe(void); }
45 SYS_GETEGID = 43 // { gid_t getegid(void); }
46 SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
47 SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
48 SYS_GETGID = 47 // { gid_t getgid(void); }
49 SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
50 SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
51 SYS_ACCT = 51 // { int acct(char *path); }
52 SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
53 SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
54 SYS_REBOOT = 55 // { int reboot(int opt); }
55 SYS_REVOKE = 56 // { int revoke(char *path); }
56 SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
57 SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
58 SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
59 SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
60 SYS_CHROOT = 61 // { int chroot(char *path); }
61 SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
62 SYS_VFORK = 66 // { int vfork(void); }
63 SYS_SBRK = 69 // { int sbrk(int incr); }
64 SYS_SSTK = 70 // { int sstk(int incr); }
65 SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
66 SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
67 SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
68 SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
69 SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
70 SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
71 SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
72 SYS_GETPGRP = 81 // { int getpgrp(void); }
73 SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
74 SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
75 SYS_SWAPON = 85 // { int swapon(char *name); }
76 SYS_GETITIMER = 86 // { int getitimer(u_int which, \
77 SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
78 SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
79 SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
80 SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
81 SYS_FSYNC = 95 // { int fsync(int fd); }
82 SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
83 SYS_SOCKET = 97 // { int socket(int domain, int type, \
84 SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
85 SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
86 SYS_BIND = 104 // { int bind(int s, caddr_t name, \
87 SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
88 SYS_LISTEN = 106 // { int listen(int s, int backlog); }
89 SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
90 SYS_GETRUSAGE = 117 // { int getrusage(int who, \
91 SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
92 SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
93 SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
94 SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
95 SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
96 SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
97 SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
98 SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
99 SYS_RENAME = 128 // { int rename(char *from, char *to); }
100 SYS_FLOCK = 131 // { int flock(int fd, int how); }
101 SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
102 SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
103 SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
104 SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
105 SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
106 SYS_RMDIR = 137 // { int rmdir(char *path); }
107 SYS_UTIMES = 138 // { int utimes(char *path, \
108 SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
109 SYS_SETSID = 147 // { int setsid(void); }
110 SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
111 SYS_LGETFH = 160 // { int lgetfh(char *fname, \
112 SYS_GETFH = 161 // { int getfh(char *fname, \
113 SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
114 SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
115 SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \
116 SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \
117 SYS_SETFIB = 175 // { int setfib(int fibnum); }
118 SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
119 SYS_SETGID = 181 // { int setgid(gid_t gid); }
120 SYS_SETEGID = 182 // { int setegid(gid_t egid); }
121 SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
122 SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
123 SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
124 SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
125 SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
126 SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
127 SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
128 SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
129 SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
130 SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \
131 SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \
132 SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \
133 SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \
134 SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
135 SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
136 SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
137 SYS_UNDELETE = 205 // { int undelete(char *path); }
138 SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
139 SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
140 SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
141 SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
142 SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
143 SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
144 SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
145 SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
146 SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
147 SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
148 SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
149 SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
150 SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
151 SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
152 SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
153 SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
154 SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
155 SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
156 SYS_RFORK = 251 // { int rfork(int flags); }
157 SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
158 SYS_ISSETUGID = 253 // { int issetugid(void); }
159 SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
160 SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
161 SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
162 SYS_LUTIMES = 276 // { int lutimes(char *path, \
163 SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
164 SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
165 SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
166 SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
167 SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
168 SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
169 SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
170 SYS_MODNEXT = 300 // { int modnext(int modid); }
171 SYS_MODSTAT = 301 // { int modstat(int modid, \
172 SYS_MODFNEXT = 302 // { int modfnext(int modid); }
173 SYS_MODFIND = 303 // { int modfind(const char *name); }
174 SYS_KLDLOAD = 304 // { int kldload(const char *file); }
175 SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
176 SYS_KLDFIND = 306 // { int kldfind(const char *file); }
177 SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
178 SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
179 SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
180 SYS_GETSID = 310 // { int getsid(pid_t pid); }
181 SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
182 SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
183 SYS_YIELD = 321 // { int yield(void); }
184 SYS_MLOCKALL = 324 // { int mlockall(int how); }
185 SYS_MUNLOCKALL = 325 // { int munlockall(void); }
186 SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
187 SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
188 SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
189 SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
190 SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
191 SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
192 SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
193 SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
194 SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
195 SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
196 SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
197 SYS_JAIL = 338 // { int jail(struct jail *jail); }
198 SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
199 SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
200 SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
201 SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
202 SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
203 SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
204 SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
205 SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
206 SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
207 SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
208 SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
209 SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
210 SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
211 SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
212 SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
213 SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
214 SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
215 SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
216 SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
217 SYS_KQUEUE = 362 // { int kqueue(void); }
218 SYS_KEVENT = 363 // { int kevent(int fd, \
219 SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
220 SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
221 SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
222 SYS___SETUGID = 374 // { int __setugid(int flag); }
223 SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
224 SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
225 SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
226 SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
227 SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
228 SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
229 SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
230 SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
231 SYS_KENV = 390 // { int kenv(int what, const char *name, \
232 SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
233 SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
234 SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
235 SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
236 SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
237 SYS_STATFS = 396 // { int statfs(char *path, \
238 SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
239 SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
240 SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
241 SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
242 SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
243 SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
244 SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
245 SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
246 SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
247 SYS_SIGACTION = 416 // { int sigaction(int sig, \
248 SYS_SIGRETURN = 417 // { int sigreturn( \
249 SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
250 SYS_SETCONTEXT = 422 // { int setcontext( \
251 SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
252 SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
253 SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
254 SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
255 SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
256 SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
257 SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
258 SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
259 SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
260 SYS_THR_SELF = 432 // { int thr_self(long *id); }
261 SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
262 SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
263 SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
264 SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
265 SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
266 SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
267 SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
268 SYS_THR_SUSPEND = 442 // { int thr_suspend( \
269 SYS_THR_WAKE = 443 // { int thr_wake(long id); }
270 SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
271 SYS_AUDIT = 445 // { int audit(const void *record, \
272 SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
273 SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
274 SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
275 SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
276 SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
277 SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
278 SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
279 SYS_AUDITCTL = 453 // { int auditctl(char *path); }
280 SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
281 SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
282 SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
283 SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
284 SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
285 SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
286 SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
287 SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
288 SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
289 SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
290 SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
291 SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
292 SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
293 SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
294 SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
295 SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
296 SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
297 SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
298 SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
299 SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
300 SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
301 SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
302 SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
303 SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
304 SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
305 SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
306 SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
307 SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
308 SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
309 SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
310 SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
311 SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
312 SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
313 SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
314 SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
315 SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
316 SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
317 SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
318 SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
319 SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
320 SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
321 SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, \
322 SYS_CAP_ENTER = 516 // { int cap_enter(void); }
323 SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
324 SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
325 SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
326 SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
327 SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
328 SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
329 SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
330 SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
331 SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
332 SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
333 SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
334 SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
335 SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
336 SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
337 SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
338 SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, \
339 SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, \
340 SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, \
341 SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, \
342 SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, \
343 SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
344 SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
345 SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
346 SYS_ACCEPT4 = 541 // { int accept4(int s, \
347 SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
348 SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
349 SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \
350 SYS_FUTIMENS = 546 // { int futimens(int fd, \
351 SYS_UTIMENSAT = 547 // { int utimensat(int fd, \
9 SYS_EXIT = 1 // { void sys_exit(int rval); } exit sys_exit_args void
10 SYS_FORK = 2 // { int fork(void); }
11 SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); }
12 SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); }
13 SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
14 SYS_CLOSE = 6 // { int close(int fd); }
15 SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, struct rusage *rusage); }
16 SYS_LINK = 9 // { int link(char *path, char *link); }
17 SYS_UNLINK = 10 // { int unlink(char *path); }
18 SYS_CHDIR = 12 // { int chdir(char *path); }
19 SYS_FCHDIR = 13 // { int fchdir(int fd); }
20 SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
21 SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
22 SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
23 SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
24 SYS_GETPID = 20 // { pid_t getpid(void); }
25 SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); }
26 SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
27 SYS_SETUID = 23 // { int setuid(uid_t uid); }
28 SYS_GETUID = 24 // { uid_t getuid(void); }
29 SYS_GETEUID = 25 // { uid_t geteuid(void); }
30 SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, int data); }
31 SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); }
32 SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, int flags); }
33 SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, int flags, struct sockaddr * __restrict from, __socklen_t * __restrict fromlenaddr); }
34 SYS_ACCEPT = 30 // { int accept(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen); }
35 SYS_GETPEERNAME = 31 // { int getpeername(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }
36 SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }
37 SYS_ACCESS = 33 // { int access(char *path, int amode); }
38 SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
39 SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
40 SYS_SYNC = 36 // { int sync(void); }
41 SYS_KILL = 37 // { int kill(int pid, int signum); }
42 SYS_GETPPID = 39 // { pid_t getppid(void); }
43 SYS_DUP = 41 // { int dup(u_int fd); }
44 SYS_PIPE = 42 // { int pipe(void); }
45 SYS_GETEGID = 43 // { gid_t getegid(void); }
46 SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }
47 SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); }
48 SYS_GETGID = 47 // { gid_t getgid(void); }
49 SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); }
50 SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
51 SYS_ACCT = 51 // { int acct(char *path); }
52 SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); }
53 SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); }
54 SYS_REBOOT = 55 // { int reboot(int opt); }
55 SYS_REVOKE = 56 // { int revoke(char *path); }
56 SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
57 SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, size_t count); }
58 SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
59 SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
60 SYS_CHROOT = 61 // { int chroot(char *path); }
61 SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
62 SYS_VFORK = 66 // { int vfork(void); }
63 SYS_SBRK = 69 // { int sbrk(int incr); }
64 SYS_SSTK = 70 // { int sstk(int incr); }
65 SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise ovadvise_args int
66 SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
67 SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, int prot); }
68 SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
69 SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, char *vec); }
70 SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
71 SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); }
72 SYS_GETPGRP = 81 // { int getpgrp(void); }
73 SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
74 SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }
75 SYS_SWAPON = 85 // { int swapon(char *name); }
76 SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); }
77 SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
78 SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
79 SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
80 SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
81 SYS_FSYNC = 95 // { int fsync(int fd); }
82 SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); }
83 SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); }
84 SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); }
85 SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
86 SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); }
87 SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); }
88 SYS_LISTEN = 106 // { int listen(int s, int backlog); }
89 SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }
90 SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); }
91 SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); }
92 SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
93 SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); }
94 SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }
95 SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
96 SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
97 SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
98 SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
99 SYS_RENAME = 128 // { int rename(char *from, char *to); }
100 SYS_FLOCK = 131 // { int flock(int fd, int how); }
101 SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
102 SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); }
103 SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
104 SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }
105 SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
106 SYS_RMDIR = 137 // { int rmdir(char *path); }
107 SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); }
108 SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }
109 SYS_SETSID = 147 // { int setsid(void); }
110 SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); }
111 SYS_NLM_SYSCALL = 154 // { int nlm_syscall(int debug_level, int grace_period, int addr_count, char **addrs); }
112 SYS_NFSSVC = 155 // { int nfssvc(int flag, caddr_t argp); }
113 SYS_LGETFH = 160 // { int lgetfh(char *fname, struct fhandle *fhp); }
114 SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); }
115 SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
116 SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }
117 SYS_SEMSYS = 169 // { int semsys(int which, int a2, int a3, int a4, int a5); }
118 SYS_MSGSYS = 170 // { int msgsys(int which, int a2, int a3, int a4, int a5, int a6); }
119 SYS_SHMSYS = 171 // { int shmsys(int which, int a2, int a3, int a4); }
120 SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }
121 SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }
122 SYS_SETFIB = 175 // { int setfib(int fibnum); }
123 SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
124 SYS_SETGID = 181 // { int setgid(gid_t gid); }
125 SYS_SETEGID = 182 // { int setegid(gid_t egid); }
126 SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
127 SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
128 SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
129 SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
130 SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
131 SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
132 SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
133 SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
134 SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, u_int count, long *basep); }
135 SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, size_t len, int prot, int flags, int fd, int pad, off_t pos); }
136 SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, off_t offset, int whence); }
137 SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, off_t length); }
138 SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, off_t length); }
139 SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int
140 SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
141 SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
142 SYS_UNDELETE = 205 // { int undelete(char *path); }
143 SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
144 SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
145 SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, int timeout); }
146 SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); }
147 SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }
148 SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); }
149 SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
150 SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
151 SYS_SHMAT = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }
152 SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); }
153 SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); }
154 SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }
155 SYS_CLOCK_SETTIME = 233 // { int clock_settime( clockid_t clock_id, const struct timespec *tp); }
156 SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }
157 SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }
158 SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
159 SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }
160 SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct itimerspec *value); }
161 SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
162 SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
163 SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
164 SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( struct ffclock_estimate *cest); }
165 SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( struct ffclock_estimate *cest); }
166 SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,int which, clockid_t *clock_id); }
167 SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
168 SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); }
169 SYS_RFORK = 251 // { int rfork(int flags); }
170 SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, int timeout); }
171 SYS_ISSETUGID = 253 // { int issetugid(void); }
172 SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
173 SYS_AIO_READ = 255 // { int aio_read(struct aiocb *aiocbp); }
174 SYS_AIO_WRITE = 256 // { int aio_write(struct aiocb *aiocbp); }
175 SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
176 SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, size_t count); }
177 SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
178 SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
179 SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
180 SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
181 SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
182 SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
183 SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
184 SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
185 SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
186 SYS_MODNEXT = 300 // { int modnext(int modid); }
187 SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat *stat); }
188 SYS_MODFNEXT = 302 // { int modfnext(int modid); }
189 SYS_MODFIND = 303 // { int modfind(const char *name); }
190 SYS_KLDLOAD = 304 // { int kldload(const char *file); }
191 SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
192 SYS_KLDFIND = 306 // { int kldfind(const char *file); }
193 SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
194 SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); }
195 SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
196 SYS_GETSID = 310 // { int getsid(pid_t pid); }
197 SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
198 SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
199 SYS_AIO_RETURN = 314 // { int aio_return(struct aiocb *aiocbp); }
200 SYS_AIO_SUSPEND = 315 // { int aio_suspend( struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
201 SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
202 SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); }
203 SYS_OAIO_READ = 318 // { int oaio_read(struct oaiocb *aiocbp); }
204 SYS_OAIO_WRITE = 319 // { int oaio_write(struct oaiocb *aiocbp); }
205 SYS_OLIO_LISTIO = 320 // { int olio_listio(int mode, struct oaiocb * const *acb_list, int nent, struct osigevent *sig); }
206 SYS_YIELD = 321 // { int yield(void); }
207 SYS_MLOCKALL = 324 // { int mlockall(int how); }
208 SYS_MUNLOCKALL = 325 // { int munlockall(void); }
209 SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
210 SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
211 SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
212 SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
213 SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
214 SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
215 SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
216 SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
217 SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
218 SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
219 SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, void *data); }
220 SYS_JAIL = 338 // { int jail(struct jail *jail); }
221 SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, const sigset_t *set, sigset_t *oset); }
222 SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
223 SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
224 SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout); }
225 SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, siginfo_t *info); }
226 SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); }
227 SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); }
228 SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); }
229 SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); }
230 SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, acl_type_t type); }
231 SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }
232 SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }
233 SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }
234 SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
235 SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
236 SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
237 SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
238 SYS_AIO_WAITCOMPLETE = 359 // { int aio_waitcomplete( struct aiocb **aiocbp, struct timespec *timeout); }
239 SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
240 SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
241 SYS_KQUEUE = 362 // { int kqueue(void); }
242 SYS_KEVENT = 363 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
243 SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
244 SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
245 SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
246 SYS___SETUGID = 374 // { int __setugid(int flag); }
247 SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
248 SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, unsigned int iovcnt, int flags); }
249 SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
250 SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
251 SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, struct mac *mac_p); }
252 SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, struct mac *mac_p); }
253 SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, struct mac *mac_p); }
254 SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, struct mac *mac_p); }
255 SYS_KENV = 390 // { int kenv(int what, const char *name, char *value, int len); }
256 SYS_LCHFLAGS = 391 // { int lchflags(const char *path, u_long flags); }
257 SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
258 SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
259 SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, int call, void *arg); }
260 SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, long bufsize, int flags); }
261 SYS_STATFS = 396 // { int statfs(char *path, struct statfs *buf); }
262 SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
263 SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
264 SYS_KSEM_CLOSE = 400 // { int ksem_close(semid_t id); }
265 SYS_KSEM_POST = 401 // { int ksem_post(semid_t id); }
266 SYS_KSEM_WAIT = 402 // { int ksem_wait(semid_t id); }
267 SYS_KSEM_TRYWAIT = 403 // { int ksem_trywait(semid_t id); }
268 SYS_KSEM_INIT = 404 // { int ksem_init(semid_t *idp, unsigned int value); }
269 SYS_KSEM_OPEN = 405 // { int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode, unsigned int value); }
270 SYS_KSEM_UNLINK = 406 // { int ksem_unlink(const char *name); }
271 SYS_KSEM_GETVALUE = 407 // { int ksem_getvalue(semid_t id, int *val); }
272 SYS_KSEM_DESTROY = 408 // { int ksem_destroy(semid_t id); }
273 SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }
274 SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }
275 SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }
276 SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
277 SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
278 SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( const char *path, int attrnamespace, const char *attrname); }
279 SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }
280 SYS_SIGACTION = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }
281 SYS_SIGRETURN = 417 // { int sigreturn( const struct __ucontext *sigcntxp); }
282 SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
283 SYS_SETCONTEXT = 422 // { int setcontext( const struct __ucontext *ucp); }
284 SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }
285 SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
286 SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }
287 SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, acl_type_t type, struct acl *aclp); }
288 SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, acl_type_t type); }
289 SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, acl_type_t type, struct acl *aclp); }
290 SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, int *sig); }
291 SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, int flags); }
292 SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
293 SYS_THR_SELF = 432 // { int thr_self(long *id); }
294 SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
295 SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
296 SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
297 SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
298 SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
299 SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( const char *path, int attrnamespace, void *data, size_t nbytes); }
300 SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( const char *path, int attrnamespace, void *data, size_t nbytes); }
301 SYS_KSEM_TIMEDWAIT = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }
302 SYS_THR_SUSPEND = 442 // { int thr_suspend( const struct timespec *timeout); }
303 SYS_THR_WAKE = 443 // { int thr_wake(long id); }
304 SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
305 SYS_AUDIT = 445 // { int audit(const void *record, u_int length); }
306 SYS_AUDITON = 446 // { int auditon(int cmd, void *data, u_int length); }
307 SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
308 SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
309 SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
310 SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
311 SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
312 SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
313 SYS_AUDITCTL = 453 // { int auditctl(char *path); }
314 SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }
315 SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, int param_size); }
316 SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
317 SYS_KMQ_OPEN = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }
318 SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
319 SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
320 SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len,unsigned msg_prio, const struct timespec *abs_timeout);}
321 SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
322 SYS_KMQ_UNLINK = 462 // { int kmq_unlink(const char *path); }
323 SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
324 SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
325 SYS_AIO_FSYNC = 465 // { int aio_fsync(int op, struct aiocb *aiocbp); }
326 SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, lwpid_t lwpid, struct rtprio *rtp); }
327 SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
328 SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
329 SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
330 SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr * from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
331 SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }
332 SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }
333 SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }
334 SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, int whence); }
335 SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
336 SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
337 SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
338 SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, mode_t mode); }
339 SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
340 SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
341 SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, cpusetid_t setid); }
342 SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); }
343 SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *mask); }
344 SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *mask); }
345 SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, int flag); }
346 SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }
347 SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }
348 SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, char **envv); }
349 SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
350 SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, struct timeval *times); }
351 SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }
352 SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
353 SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
354 SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
355 SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }
356 SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, size_t bufsize); }
357 SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }
358 SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, char *path2); }
359 SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
360 SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
361 SYS_GSSD_SYSCALL = 505 // { int gssd_syscall(char *path); }
362 SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, unsigned int iovcnt, int flags); }
363 SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, unsigned int iovcnt, int flags); }
364 SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
365 SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
366 SYS___SEMCTL = 510 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); }
367 SYS_MSGCTL = 511 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); }
368 SYS_SHMCTL = 512 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); }
369 SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
370 SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, int fd, cap_rights_t *rightsp); }
371 SYS_CAP_ENTER = 516 // { int cap_enter(void); }
372 SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
373 SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
374 SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
375 SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
376 SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sm); }
377 SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, size_t namelen); }
378 SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
379 SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
380 SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
381 SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
382 SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
383 SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
384 SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, off_t offset, off_t len); }
385 SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, off_t len, int advice); }
386 SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); }
387 SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, cap_rights_t *rightsp); }
388 SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, const u_long *cmds, size_t ncmds); }
389 SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, u_long *cmds, size_t maxcmds); }
390 SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, uint32_t fcntlrights); }
391 SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, uint32_t *fcntlrightsp); }
392 SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, int namelen); }
393 SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, int namelen); }
394 SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, u_long flags, int atflag); }
395 SYS_ACCEPT4 = 541 // { int accept4(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen, int flags); }
396 SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
397 SYS_AIO_MLOCK = 543 // { int aio_mlock(struct aiocb *aiocbp); }
398 SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, int com, void *data); }
399 SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }
400 SYS_FUTIMENS = 546 // { int futimens(int fd, struct timespec *times); }
401 SYS_UTIMENSAT = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }
352402 )
0 // mksysnum_freebsd.pl
0 // go run mksysnum.go https://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build amd64,freebsd
66
77 const (
88 // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
9 SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
10 SYS_FORK = 2 // { int fork(void); }
11 SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
12 SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
13 SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
14 SYS_CLOSE = 6 // { int close(int fd); }
15 SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
16 SYS_LINK = 9 // { int link(char *path, char *link); }
17 SYS_UNLINK = 10 // { int unlink(char *path); }
18 SYS_CHDIR = 12 // { int chdir(char *path); }
19 SYS_FCHDIR = 13 // { int fchdir(int fd); }
20 SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
21 SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
22 SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
23 SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
24 SYS_GETPID = 20 // { pid_t getpid(void); }
25 SYS_MOUNT = 21 // { int mount(char *type, char *path, \
26 SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
27 SYS_SETUID = 23 // { int setuid(uid_t uid); }
28 SYS_GETUID = 24 // { uid_t getuid(void); }
29 SYS_GETEUID = 25 // { uid_t geteuid(void); }
30 SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
31 SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
32 SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
33 SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
34 SYS_ACCEPT = 30 // { int accept(int s, \
35 SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
36 SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
37 SYS_ACCESS = 33 // { int access(char *path, int amode); }
38 SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
39 SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
40 SYS_SYNC = 36 // { int sync(void); }
41 SYS_KILL = 37 // { int kill(int pid, int signum); }
42 SYS_GETPPID = 39 // { pid_t getppid(void); }
43 SYS_DUP = 41 // { int dup(u_int fd); }
44 SYS_PIPE = 42 // { int pipe(void); }
45 SYS_GETEGID = 43 // { gid_t getegid(void); }
46 SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
47 SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
48 SYS_GETGID = 47 // { gid_t getgid(void); }
49 SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
50 SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
51 SYS_ACCT = 51 // { int acct(char *path); }
52 SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
53 SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
54 SYS_REBOOT = 55 // { int reboot(int opt); }
55 SYS_REVOKE = 56 // { int revoke(char *path); }
56 SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
57 SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
58 SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
59 SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
60 SYS_CHROOT = 61 // { int chroot(char *path); }
61 SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
62 SYS_VFORK = 66 // { int vfork(void); }
63 SYS_SBRK = 69 // { int sbrk(int incr); }
64 SYS_SSTK = 70 // { int sstk(int incr); }
65 SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
66 SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
67 SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
68 SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
69 SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
70 SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
71 SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
72 SYS_GETPGRP = 81 // { int getpgrp(void); }
73 SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
74 SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
75 SYS_SWAPON = 85 // { int swapon(char *name); }
76 SYS_GETITIMER = 86 // { int getitimer(u_int which, \
77 SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
78 SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
79 SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
80 SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
81 SYS_FSYNC = 95 // { int fsync(int fd); }
82 SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
83 SYS_SOCKET = 97 // { int socket(int domain, int type, \
84 SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
85 SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
86 SYS_BIND = 104 // { int bind(int s, caddr_t name, \
87 SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
88 SYS_LISTEN = 106 // { int listen(int s, int backlog); }
89 SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
90 SYS_GETRUSAGE = 117 // { int getrusage(int who, \
91 SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
92 SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
93 SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
94 SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
95 SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
96 SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
97 SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
98 SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
99 SYS_RENAME = 128 // { int rename(char *from, char *to); }
100 SYS_FLOCK = 131 // { int flock(int fd, int how); }
101 SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
102 SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
103 SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
104 SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
105 SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
106 SYS_RMDIR = 137 // { int rmdir(char *path); }
107 SYS_UTIMES = 138 // { int utimes(char *path, \
108 SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
109 SYS_SETSID = 147 // { int setsid(void); }
110 SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
111 SYS_LGETFH = 160 // { int lgetfh(char *fname, \
112 SYS_GETFH = 161 // { int getfh(char *fname, \
113 SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
114 SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
115 SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \
116 SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \
117 SYS_SETFIB = 175 // { int setfib(int fibnum); }
118 SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
119 SYS_SETGID = 181 // { int setgid(gid_t gid); }
120 SYS_SETEGID = 182 // { int setegid(gid_t egid); }
121 SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
122 SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
123 SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
124 SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
125 SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
126 SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
127 SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
128 SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
129 SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
130 SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \
131 SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \
132 SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \
133 SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \
134 SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
135 SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
136 SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
137 SYS_UNDELETE = 205 // { int undelete(char *path); }
138 SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
139 SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
140 SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
141 SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
142 SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
143 SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
144 SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
145 SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
146 SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
147 SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
148 SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
149 SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
150 SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
151 SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
152 SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
153 SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
154 SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
155 SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
156 SYS_RFORK = 251 // { int rfork(int flags); }
157 SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
158 SYS_ISSETUGID = 253 // { int issetugid(void); }
159 SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
160 SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
161 SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
162 SYS_LUTIMES = 276 // { int lutimes(char *path, \
163 SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
164 SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
165 SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
166 SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
167 SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
168 SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
169 SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
170 SYS_MODNEXT = 300 // { int modnext(int modid); }
171 SYS_MODSTAT = 301 // { int modstat(int modid, \
172 SYS_MODFNEXT = 302 // { int modfnext(int modid); }
173 SYS_MODFIND = 303 // { int modfind(const char *name); }
174 SYS_KLDLOAD = 304 // { int kldload(const char *file); }
175 SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
176 SYS_KLDFIND = 306 // { int kldfind(const char *file); }
177 SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
178 SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
179 SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
180 SYS_GETSID = 310 // { int getsid(pid_t pid); }
181 SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
182 SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
183 SYS_YIELD = 321 // { int yield(void); }
184 SYS_MLOCKALL = 324 // { int mlockall(int how); }
185 SYS_MUNLOCKALL = 325 // { int munlockall(void); }
186 SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
187 SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
188 SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
189 SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
190 SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
191 SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
192 SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
193 SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
194 SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
195 SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
196 SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
197 SYS_JAIL = 338 // { int jail(struct jail *jail); }
198 SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
199 SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
200 SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
201 SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
202 SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
203 SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
204 SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
205 SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
206 SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
207 SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
208 SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
209 SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
210 SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
211 SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
212 SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
213 SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
214 SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
215 SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
216 SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
217 SYS_KQUEUE = 362 // { int kqueue(void); }
218 SYS_KEVENT = 363 // { int kevent(int fd, \
219 SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
220 SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
221 SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
222 SYS___SETUGID = 374 // { int __setugid(int flag); }
223 SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
224 SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
225 SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
226 SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
227 SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
228 SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
229 SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
230 SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
231 SYS_KENV = 390 // { int kenv(int what, const char *name, \
232 SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
233 SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
234 SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
235 SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
236 SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
237 SYS_STATFS = 396 // { int statfs(char *path, \
238 SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
239 SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
240 SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
241 SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
242 SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
243 SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
244 SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
245 SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
246 SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
247 SYS_SIGACTION = 416 // { int sigaction(int sig, \
248 SYS_SIGRETURN = 417 // { int sigreturn( \
249 SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
250 SYS_SETCONTEXT = 422 // { int setcontext( \
251 SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
252 SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
253 SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
254 SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
255 SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
256 SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
257 SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
258 SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
259 SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
260 SYS_THR_SELF = 432 // { int thr_self(long *id); }
261 SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
262 SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
263 SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
264 SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
265 SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
266 SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
267 SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
268 SYS_THR_SUSPEND = 442 // { int thr_suspend( \
269 SYS_THR_WAKE = 443 // { int thr_wake(long id); }
270 SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
271 SYS_AUDIT = 445 // { int audit(const void *record, \
272 SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
273 SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
274 SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
275 SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
276 SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
277 SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
278 SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
279 SYS_AUDITCTL = 453 // { int auditctl(char *path); }
280 SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
281 SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
282 SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
283 SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
284 SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
285 SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
286 SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
287 SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
288 SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
289 SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
290 SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
291 SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
292 SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
293 SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
294 SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
295 SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
296 SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
297 SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
298 SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
299 SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
300 SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
301 SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
302 SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
303 SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
304 SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
305 SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
306 SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
307 SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
308 SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
309 SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
310 SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
311 SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
312 SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
313 SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
314 SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
315 SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
316 SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
317 SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
318 SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
319 SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
320 SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
321 SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, \
322 SYS_CAP_ENTER = 516 // { int cap_enter(void); }
323 SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
324 SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
325 SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
326 SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
327 SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
328 SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
329 SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
330 SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
331 SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
332 SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
333 SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
334 SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
335 SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
336 SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
337 SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
338 SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, \
339 SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, \
340 SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, \
341 SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, \
342 SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, \
343 SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
344 SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
345 SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
346 SYS_ACCEPT4 = 541 // { int accept4(int s, \
347 SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
348 SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
349 SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \
350 SYS_FUTIMENS = 546 // { int futimens(int fd, \
351 SYS_UTIMENSAT = 547 // { int utimensat(int fd, \
9 SYS_EXIT = 1 // { void sys_exit(int rval); } exit sys_exit_args void
10 SYS_FORK = 2 // { int fork(void); }
11 SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); }
12 SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); }
13 SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
14 SYS_CLOSE = 6 // { int close(int fd); }
15 SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, struct rusage *rusage); }
16 SYS_LINK = 9 // { int link(char *path, char *link); }
17 SYS_UNLINK = 10 // { int unlink(char *path); }
18 SYS_CHDIR = 12 // { int chdir(char *path); }
19 SYS_FCHDIR = 13 // { int fchdir(int fd); }
20 SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
21 SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
22 SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
23 SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
24 SYS_GETPID = 20 // { pid_t getpid(void); }
25 SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); }
26 SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
27 SYS_SETUID = 23 // { int setuid(uid_t uid); }
28 SYS_GETUID = 24 // { uid_t getuid(void); }
29 SYS_GETEUID = 25 // { uid_t geteuid(void); }
30 SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, int data); }
31 SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); }
32 SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, int flags); }
33 SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, int flags, struct sockaddr * __restrict from, __socklen_t * __restrict fromlenaddr); }
34 SYS_ACCEPT = 30 // { int accept(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen); }
35 SYS_GETPEERNAME = 31 // { int getpeername(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }
36 SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }
37 SYS_ACCESS = 33 // { int access(char *path, int amode); }
38 SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
39 SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
40 SYS_SYNC = 36 // { int sync(void); }
41 SYS_KILL = 37 // { int kill(int pid, int signum); }
42 SYS_GETPPID = 39 // { pid_t getppid(void); }
43 SYS_DUP = 41 // { int dup(u_int fd); }
44 SYS_PIPE = 42 // { int pipe(void); }
45 SYS_GETEGID = 43 // { gid_t getegid(void); }
46 SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }
47 SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); }
48 SYS_GETGID = 47 // { gid_t getgid(void); }
49 SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); }
50 SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
51 SYS_ACCT = 51 // { int acct(char *path); }
52 SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); }
53 SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); }
54 SYS_REBOOT = 55 // { int reboot(int opt); }
55 SYS_REVOKE = 56 // { int revoke(char *path); }
56 SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
57 SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, size_t count); }
58 SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
59 SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
60 SYS_CHROOT = 61 // { int chroot(char *path); }
61 SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
62 SYS_VFORK = 66 // { int vfork(void); }
63 SYS_SBRK = 69 // { int sbrk(int incr); }
64 SYS_SSTK = 70 // { int sstk(int incr); }
65 SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise ovadvise_args int
66 SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
67 SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, int prot); }
68 SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
69 SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, char *vec); }
70 SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
71 SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); }
72 SYS_GETPGRP = 81 // { int getpgrp(void); }
73 SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
74 SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }
75 SYS_SWAPON = 85 // { int swapon(char *name); }
76 SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); }
77 SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
78 SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
79 SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
80 SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
81 SYS_FSYNC = 95 // { int fsync(int fd); }
82 SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); }
83 SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); }
84 SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); }
85 SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
86 SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); }
87 SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); }
88 SYS_LISTEN = 106 // { int listen(int s, int backlog); }
89 SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }
90 SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); }
91 SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); }
92 SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
93 SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); }
94 SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }
95 SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
96 SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
97 SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
98 SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
99 SYS_RENAME = 128 // { int rename(char *from, char *to); }
100 SYS_FLOCK = 131 // { int flock(int fd, int how); }
101 SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
102 SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); }
103 SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
104 SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }
105 SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
106 SYS_RMDIR = 137 // { int rmdir(char *path); }
107 SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); }
108 SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }
109 SYS_SETSID = 147 // { int setsid(void); }
110 SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); }
111 SYS_NLM_SYSCALL = 154 // { int nlm_syscall(int debug_level, int grace_period, int addr_count, char **addrs); }
112 SYS_NFSSVC = 155 // { int nfssvc(int flag, caddr_t argp); }
113 SYS_LGETFH = 160 // { int lgetfh(char *fname, struct fhandle *fhp); }
114 SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); }
115 SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
116 SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }
117 SYS_SEMSYS = 169 // { int semsys(int which, int a2, int a3, int a4, int a5); }
118 SYS_MSGSYS = 170 // { int msgsys(int which, int a2, int a3, int a4, int a5, int a6); }
119 SYS_SHMSYS = 171 // { int shmsys(int which, int a2, int a3, int a4); }
120 SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }
121 SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }
122 SYS_SETFIB = 175 // { int setfib(int fibnum); }
123 SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
124 SYS_SETGID = 181 // { int setgid(gid_t gid); }
125 SYS_SETEGID = 182 // { int setegid(gid_t egid); }
126 SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
127 SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
128 SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
129 SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
130 SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
131 SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
132 SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
133 SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
134 SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, u_int count, long *basep); }
135 SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, size_t len, int prot, int flags, int fd, int pad, off_t pos); }
136 SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, off_t offset, int whence); }
137 SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, off_t length); }
138 SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, off_t length); }
139 SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int
140 SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
141 SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
142 SYS_UNDELETE = 205 // { int undelete(char *path); }
143 SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
144 SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
145 SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, int timeout); }
146 SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); }
147 SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }
148 SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); }
149 SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
150 SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
151 SYS_SHMAT = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }
152 SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); }
153 SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); }
154 SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }
155 SYS_CLOCK_SETTIME = 233 // { int clock_settime( clockid_t clock_id, const struct timespec *tp); }
156 SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }
157 SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }
158 SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
159 SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }
160 SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct itimerspec *value); }
161 SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
162 SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
163 SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
164 SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( struct ffclock_estimate *cest); }
165 SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( struct ffclock_estimate *cest); }
166 SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,int which, clockid_t *clock_id); }
167 SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
168 SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); }
169 SYS_RFORK = 251 // { int rfork(int flags); }
170 SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, int timeout); }
171 SYS_ISSETUGID = 253 // { int issetugid(void); }
172 SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
173 SYS_AIO_READ = 255 // { int aio_read(struct aiocb *aiocbp); }
174 SYS_AIO_WRITE = 256 // { int aio_write(struct aiocb *aiocbp); }
175 SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
176 SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, size_t count); }
177 SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
178 SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
179 SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
180 SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
181 SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
182 SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
183 SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
184 SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
185 SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
186 SYS_MODNEXT = 300 // { int modnext(int modid); }
187 SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat *stat); }
188 SYS_MODFNEXT = 302 // { int modfnext(int modid); }
189 SYS_MODFIND = 303 // { int modfind(const char *name); }
190 SYS_KLDLOAD = 304 // { int kldload(const char *file); }
191 SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
192 SYS_KLDFIND = 306 // { int kldfind(const char *file); }
193 SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
194 SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); }
195 SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
196 SYS_GETSID = 310 // { int getsid(pid_t pid); }
197 SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
198 SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
199 SYS_AIO_RETURN = 314 // { int aio_return(struct aiocb *aiocbp); }
200 SYS_AIO_SUSPEND = 315 // { int aio_suspend( struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
201 SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
202 SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); }
203 SYS_OAIO_READ = 318 // { int oaio_read(struct oaiocb *aiocbp); }
204 SYS_OAIO_WRITE = 319 // { int oaio_write(struct oaiocb *aiocbp); }
205 SYS_OLIO_LISTIO = 320 // { int olio_listio(int mode, struct oaiocb * const *acb_list, int nent, struct osigevent *sig); }
206 SYS_YIELD = 321 // { int yield(void); }
207 SYS_MLOCKALL = 324 // { int mlockall(int how); }
208 SYS_MUNLOCKALL = 325 // { int munlockall(void); }
209 SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
210 SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
211 SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
212 SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
213 SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
214 SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
215 SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
216 SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
217 SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
218 SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
219 SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, void *data); }
220 SYS_JAIL = 338 // { int jail(struct jail *jail); }
221 SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, const sigset_t *set, sigset_t *oset); }
222 SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
223 SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
224 SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout); }
225 SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, siginfo_t *info); }
226 SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); }
227 SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); }
228 SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); }
229 SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); }
230 SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, acl_type_t type); }
231 SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }
232 SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }
233 SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }
234 SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
235 SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
236 SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
237 SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
238 SYS_AIO_WAITCOMPLETE = 359 // { int aio_waitcomplete( struct aiocb **aiocbp, struct timespec *timeout); }
239 SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
240 SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
241 SYS_KQUEUE = 362 // { int kqueue(void); }
242 SYS_KEVENT = 363 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
243 SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
244 SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
245 SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
246 SYS___SETUGID = 374 // { int __setugid(int flag); }
247 SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
248 SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, unsigned int iovcnt, int flags); }
249 SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
250 SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
251 SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, struct mac *mac_p); }
252 SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, struct mac *mac_p); }
253 SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, struct mac *mac_p); }
254 SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, struct mac *mac_p); }
255 SYS_KENV = 390 // { int kenv(int what, const char *name, char *value, int len); }
256 SYS_LCHFLAGS = 391 // { int lchflags(const char *path, u_long flags); }
257 SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
258 SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
259 SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, int call, void *arg); }
260 SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, long bufsize, int flags); }
261 SYS_STATFS = 396 // { int statfs(char *path, struct statfs *buf); }
262 SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
263 SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
264 SYS_KSEM_CLOSE = 400 // { int ksem_close(semid_t id); }
265 SYS_KSEM_POST = 401 // { int ksem_post(semid_t id); }
266 SYS_KSEM_WAIT = 402 // { int ksem_wait(semid_t id); }
267 SYS_KSEM_TRYWAIT = 403 // { int ksem_trywait(semid_t id); }
268 SYS_KSEM_INIT = 404 // { int ksem_init(semid_t *idp, unsigned int value); }
269 SYS_KSEM_OPEN = 405 // { int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode, unsigned int value); }
270 SYS_KSEM_UNLINK = 406 // { int ksem_unlink(const char *name); }
271 SYS_KSEM_GETVALUE = 407 // { int ksem_getvalue(semid_t id, int *val); }
272 SYS_KSEM_DESTROY = 408 // { int ksem_destroy(semid_t id); }
273 SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }
274 SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }
275 SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }
276 SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
277 SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
278 SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( const char *path, int attrnamespace, const char *attrname); }
279 SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }
280 SYS_SIGACTION = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }
281 SYS_SIGRETURN = 417 // { int sigreturn( const struct __ucontext *sigcntxp); }
282 SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
283 SYS_SETCONTEXT = 422 // { int setcontext( const struct __ucontext *ucp); }
284 SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }
285 SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
286 SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }
287 SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, acl_type_t type, struct acl *aclp); }
288 SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, acl_type_t type); }
289 SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, acl_type_t type, struct acl *aclp); }
290 SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, int *sig); }
291 SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, int flags); }
292 SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
293 SYS_THR_SELF = 432 // { int thr_self(long *id); }
294 SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
295 SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
296 SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
297 SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
298 SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
299 SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( const char *path, int attrnamespace, void *data, size_t nbytes); }
300 SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( const char *path, int attrnamespace, void *data, size_t nbytes); }
301 SYS_KSEM_TIMEDWAIT = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }
302 SYS_THR_SUSPEND = 442 // { int thr_suspend( const struct timespec *timeout); }
303 SYS_THR_WAKE = 443 // { int thr_wake(long id); }
304 SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
305 SYS_AUDIT = 445 // { int audit(const void *record, u_int length); }
306 SYS_AUDITON = 446 // { int auditon(int cmd, void *data, u_int length); }
307 SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
308 SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
309 SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
310 SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
311 SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
312 SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
313 SYS_AUDITCTL = 453 // { int auditctl(char *path); }
314 SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }
315 SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, int param_size); }
316 SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
317 SYS_KMQ_OPEN = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }
318 SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
319 SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
320 SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len,unsigned msg_prio, const struct timespec *abs_timeout);}
321 SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
322 SYS_KMQ_UNLINK = 462 // { int kmq_unlink(const char *path); }
323 SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
324 SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
325 SYS_AIO_FSYNC = 465 // { int aio_fsync(int op, struct aiocb *aiocbp); }
326 SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, lwpid_t lwpid, struct rtprio *rtp); }
327 SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
328 SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
329 SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
330 SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr * from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
331 SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }
332 SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }
333 SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }
334 SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, int whence); }
335 SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
336 SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
337 SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
338 SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, mode_t mode); }
339 SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
340 SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
341 SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, cpusetid_t setid); }
342 SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); }
343 SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *mask); }
344 SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *mask); }
345 SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, int flag); }
346 SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }
347 SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }
348 SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, char **envv); }
349 SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
350 SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, struct timeval *times); }
351 SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }
352 SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
353 SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
354 SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
355 SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }
356 SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, size_t bufsize); }
357 SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }
358 SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, char *path2); }
359 SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
360 SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
361 SYS_GSSD_SYSCALL = 505 // { int gssd_syscall(char *path); }
362 SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, unsigned int iovcnt, int flags); }
363 SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, unsigned int iovcnt, int flags); }
364 SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
365 SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
366 SYS___SEMCTL = 510 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); }
367 SYS_MSGCTL = 511 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); }
368 SYS_SHMCTL = 512 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); }
369 SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
370 SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, int fd, cap_rights_t *rightsp); }
371 SYS_CAP_ENTER = 516 // { int cap_enter(void); }
372 SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
373 SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
374 SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
375 SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
376 SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sm); }
377 SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, size_t namelen); }
378 SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
379 SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
380 SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
381 SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
382 SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
383 SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
384 SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, off_t offset, off_t len); }
385 SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, off_t len, int advice); }
386 SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); }
387 SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, cap_rights_t *rightsp); }
388 SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, const u_long *cmds, size_t ncmds); }
389 SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, u_long *cmds, size_t maxcmds); }
390 SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, uint32_t fcntlrights); }
391 SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, uint32_t *fcntlrightsp); }
392 SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, int namelen); }
393 SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, int namelen); }
394 SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, u_long flags, int atflag); }
395 SYS_ACCEPT4 = 541 // { int accept4(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen, int flags); }
396 SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
397 SYS_AIO_MLOCK = 543 // { int aio_mlock(struct aiocb *aiocbp); }
398 SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, int com, void *data); }
399 SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }
400 SYS_FUTIMENS = 546 // { int futimens(int fd, struct timespec *times); }
401 SYS_UTIMENSAT = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }
352402 )
0 // mksysnum_freebsd.pl
0 // go run mksysnum.go https://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build arm,freebsd
66
77 const (
88 // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
9 SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
10 SYS_FORK = 2 // { int fork(void); }
11 SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
12 SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
13 SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
14 SYS_CLOSE = 6 // { int close(int fd); }
15 SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
16 SYS_LINK = 9 // { int link(char *path, char *link); }
17 SYS_UNLINK = 10 // { int unlink(char *path); }
18 SYS_CHDIR = 12 // { int chdir(char *path); }
19 SYS_FCHDIR = 13 // { int fchdir(int fd); }
20 SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
21 SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
22 SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
23 SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
24 SYS_GETPID = 20 // { pid_t getpid(void); }
25 SYS_MOUNT = 21 // { int mount(char *type, char *path, \
26 SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
27 SYS_SETUID = 23 // { int setuid(uid_t uid); }
28 SYS_GETUID = 24 // { uid_t getuid(void); }
29 SYS_GETEUID = 25 // { uid_t geteuid(void); }
30 SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
31 SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
32 SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
33 SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
34 SYS_ACCEPT = 30 // { int accept(int s, \
35 SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
36 SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
37 SYS_ACCESS = 33 // { int access(char *path, int amode); }
38 SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
39 SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
40 SYS_SYNC = 36 // { int sync(void); }
41 SYS_KILL = 37 // { int kill(int pid, int signum); }
42 SYS_GETPPID = 39 // { pid_t getppid(void); }
43 SYS_DUP = 41 // { int dup(u_int fd); }
44 SYS_PIPE = 42 // { int pipe(void); }
45 SYS_GETEGID = 43 // { gid_t getegid(void); }
46 SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
47 SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
48 SYS_GETGID = 47 // { gid_t getgid(void); }
49 SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
50 SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
51 SYS_ACCT = 51 // { int acct(char *path); }
52 SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
53 SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
54 SYS_REBOOT = 55 // { int reboot(int opt); }
55 SYS_REVOKE = 56 // { int revoke(char *path); }
56 SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
57 SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
58 SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
59 SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
60 SYS_CHROOT = 61 // { int chroot(char *path); }
61 SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
62 SYS_VFORK = 66 // { int vfork(void); }
63 SYS_SBRK = 69 // { int sbrk(int incr); }
64 SYS_SSTK = 70 // { int sstk(int incr); }
65 SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
66 SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
67 SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
68 SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
69 SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
70 SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
71 SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
72 SYS_GETPGRP = 81 // { int getpgrp(void); }
73 SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
74 SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
75 SYS_SWAPON = 85 // { int swapon(char *name); }
76 SYS_GETITIMER = 86 // { int getitimer(u_int which, \
77 SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
78 SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
79 SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
80 SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
81 SYS_FSYNC = 95 // { int fsync(int fd); }
82 SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
83 SYS_SOCKET = 97 // { int socket(int domain, int type, \
84 SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
85 SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
86 SYS_BIND = 104 // { int bind(int s, caddr_t name, \
87 SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
88 SYS_LISTEN = 106 // { int listen(int s, int backlog); }
89 SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
90 SYS_GETRUSAGE = 117 // { int getrusage(int who, \
91 SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
92 SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
93 SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
94 SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
95 SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
96 SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
97 SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
98 SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
99 SYS_RENAME = 128 // { int rename(char *from, char *to); }
100 SYS_FLOCK = 131 // { int flock(int fd, int how); }
101 SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
102 SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
103 SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
104 SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
105 SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
106 SYS_RMDIR = 137 // { int rmdir(char *path); }
107 SYS_UTIMES = 138 // { int utimes(char *path, \
108 SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
109 SYS_SETSID = 147 // { int setsid(void); }
110 SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
111 SYS_LGETFH = 160 // { int lgetfh(char *fname, \
112 SYS_GETFH = 161 // { int getfh(char *fname, \
113 SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
114 SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
115 SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \
116 SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \
117 SYS_SETFIB = 175 // { int setfib(int fibnum); }
118 SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
119 SYS_SETGID = 181 // { int setgid(gid_t gid); }
120 SYS_SETEGID = 182 // { int setegid(gid_t egid); }
121 SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
122 SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
123 SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
124 SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
125 SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
126 SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
127 SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
128 SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
129 SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
130 SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \
131 SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \
132 SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \
133 SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \
134 SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
135 SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
136 SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
137 SYS_UNDELETE = 205 // { int undelete(char *path); }
138 SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
139 SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
140 SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
141 SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
142 SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
143 SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
144 SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
145 SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
146 SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
147 SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
148 SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
149 SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
150 SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
151 SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
152 SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
153 SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
154 SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
155 SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
156 SYS_RFORK = 251 // { int rfork(int flags); }
157 SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
158 SYS_ISSETUGID = 253 // { int issetugid(void); }
159 SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
160 SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
161 SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
162 SYS_LUTIMES = 276 // { int lutimes(char *path, \
163 SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
164 SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
165 SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
166 SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
167 SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
168 SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
169 SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
170 SYS_MODNEXT = 300 // { int modnext(int modid); }
171 SYS_MODSTAT = 301 // { int modstat(int modid, \
172 SYS_MODFNEXT = 302 // { int modfnext(int modid); }
173 SYS_MODFIND = 303 // { int modfind(const char *name); }
174 SYS_KLDLOAD = 304 // { int kldload(const char *file); }
175 SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
176 SYS_KLDFIND = 306 // { int kldfind(const char *file); }
177 SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
178 SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
179 SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
180 SYS_GETSID = 310 // { int getsid(pid_t pid); }
181 SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
182 SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
183 SYS_YIELD = 321 // { int yield(void); }
184 SYS_MLOCKALL = 324 // { int mlockall(int how); }
185 SYS_MUNLOCKALL = 325 // { int munlockall(void); }
186 SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
187 SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
188 SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
189 SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
190 SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
191 SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
192 SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
193 SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
194 SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
195 SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
196 SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
197 SYS_JAIL = 338 // { int jail(struct jail *jail); }
198 SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
199 SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
200 SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
201 SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
202 SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
203 SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
204 SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
205 SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
206 SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
207 SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
208 SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
209 SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
210 SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
211 SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
212 SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
213 SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
214 SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
215 SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
216 SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
217 SYS_KQUEUE = 362 // { int kqueue(void); }
218 SYS_KEVENT = 363 // { int kevent(int fd, \
219 SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
220 SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
221 SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
222 SYS___SETUGID = 374 // { int __setugid(int flag); }
223 SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
224 SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
225 SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
226 SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
227 SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
228 SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
229 SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
230 SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
231 SYS_KENV = 390 // { int kenv(int what, const char *name, \
232 SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
233 SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
234 SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
235 SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
236 SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
237 SYS_STATFS = 396 // { int statfs(char *path, \
238 SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
239 SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
240 SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
241 SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
242 SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
243 SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
244 SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
245 SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
246 SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
247 SYS_SIGACTION = 416 // { int sigaction(int sig, \
248 SYS_SIGRETURN = 417 // { int sigreturn( \
249 SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
250 SYS_SETCONTEXT = 422 // { int setcontext( \
251 SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
252 SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
253 SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
254 SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
255 SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
256 SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
257 SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
258 SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
259 SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
260 SYS_THR_SELF = 432 // { int thr_self(long *id); }
261 SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
262 SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
263 SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
264 SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
265 SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
266 SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
267 SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
268 SYS_THR_SUSPEND = 442 // { int thr_suspend( \
269 SYS_THR_WAKE = 443 // { int thr_wake(long id); }
270 SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
271 SYS_AUDIT = 445 // { int audit(const void *record, \
272 SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
273 SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
274 SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
275 SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
276 SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
277 SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
278 SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
279 SYS_AUDITCTL = 453 // { int auditctl(char *path); }
280 SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
281 SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
282 SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
283 SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
284 SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
285 SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
286 SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
287 SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
288 SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
289 SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
290 SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
291 SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
292 SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
293 SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
294 SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
295 SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
296 SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
297 SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
298 SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
299 SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
300 SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
301 SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
302 SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
303 SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
304 SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
305 SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
306 SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
307 SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
308 SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
309 SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
310 SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
311 SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
312 SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
313 SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
314 SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
315 SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
316 SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
317 SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
318 SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
319 SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
320 SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
321 SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, \
322 SYS_CAP_ENTER = 516 // { int cap_enter(void); }
323 SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
324 SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
325 SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
326 SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
327 SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
328 SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
329 SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
330 SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
331 SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
332 SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
333 SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
334 SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
335 SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
336 SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
337 SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
338 SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, \
339 SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, \
340 SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, \
341 SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, \
342 SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, \
343 SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
344 SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
345 SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
346 SYS_ACCEPT4 = 541 // { int accept4(int s, \
347 SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
348 SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
349 SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \
350 SYS_FUTIMENS = 546 // { int futimens(int fd, \
351 SYS_UTIMENSAT = 547 // { int utimensat(int fd, \
9 SYS_EXIT = 1 // { void sys_exit(int rval); } exit sys_exit_args void
10 SYS_FORK = 2 // { int fork(void); }
11 SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); }
12 SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); }
13 SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
14 SYS_CLOSE = 6 // { int close(int fd); }
15 SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, struct rusage *rusage); }
16 SYS_LINK = 9 // { int link(char *path, char *link); }
17 SYS_UNLINK = 10 // { int unlink(char *path); }
18 SYS_CHDIR = 12 // { int chdir(char *path); }
19 SYS_FCHDIR = 13 // { int fchdir(int fd); }
20 SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
21 SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
22 SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
23 SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
24 SYS_GETPID = 20 // { pid_t getpid(void); }
25 SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); }
26 SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
27 SYS_SETUID = 23 // { int setuid(uid_t uid); }
28 SYS_GETUID = 24 // { uid_t getuid(void); }
29 SYS_GETEUID = 25 // { uid_t geteuid(void); }
30 SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, int data); }
31 SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); }
32 SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, int flags); }
33 SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, int flags, struct sockaddr * __restrict from, __socklen_t * __restrict fromlenaddr); }
34 SYS_ACCEPT = 30 // { int accept(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen); }
35 SYS_GETPEERNAME = 31 // { int getpeername(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }
36 SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }
37 SYS_ACCESS = 33 // { int access(char *path, int amode); }
38 SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
39 SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
40 SYS_SYNC = 36 // { int sync(void); }
41 SYS_KILL = 37 // { int kill(int pid, int signum); }
42 SYS_GETPPID = 39 // { pid_t getppid(void); }
43 SYS_DUP = 41 // { int dup(u_int fd); }
44 SYS_PIPE = 42 // { int pipe(void); }
45 SYS_GETEGID = 43 // { gid_t getegid(void); }
46 SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }
47 SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); }
48 SYS_GETGID = 47 // { gid_t getgid(void); }
49 SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); }
50 SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
51 SYS_ACCT = 51 // { int acct(char *path); }
52 SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); }
53 SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); }
54 SYS_REBOOT = 55 // { int reboot(int opt); }
55 SYS_REVOKE = 56 // { int revoke(char *path); }
56 SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
57 SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, size_t count); }
58 SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
59 SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
60 SYS_CHROOT = 61 // { int chroot(char *path); }
61 SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
62 SYS_VFORK = 66 // { int vfork(void); }
63 SYS_SBRK = 69 // { int sbrk(int incr); }
64 SYS_SSTK = 70 // { int sstk(int incr); }
65 SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise ovadvise_args int
66 SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
67 SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, int prot); }
68 SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
69 SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, char *vec); }
70 SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
71 SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); }
72 SYS_GETPGRP = 81 // { int getpgrp(void); }
73 SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
74 SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }
75 SYS_SWAPON = 85 // { int swapon(char *name); }
76 SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); }
77 SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
78 SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
79 SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
80 SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
81 SYS_FSYNC = 95 // { int fsync(int fd); }
82 SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); }
83 SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); }
84 SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); }
85 SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
86 SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); }
87 SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); }
88 SYS_LISTEN = 106 // { int listen(int s, int backlog); }
89 SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }
90 SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); }
91 SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); }
92 SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
93 SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); }
94 SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }
95 SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
96 SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
97 SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
98 SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
99 SYS_RENAME = 128 // { int rename(char *from, char *to); }
100 SYS_FLOCK = 131 // { int flock(int fd, int how); }
101 SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
102 SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); }
103 SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
104 SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }
105 SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
106 SYS_RMDIR = 137 // { int rmdir(char *path); }
107 SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); }
108 SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }
109 SYS_SETSID = 147 // { int setsid(void); }
110 SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); }
111 SYS_NLM_SYSCALL = 154 // { int nlm_syscall(int debug_level, int grace_period, int addr_count, char **addrs); }
112 SYS_NFSSVC = 155 // { int nfssvc(int flag, caddr_t argp); }
113 SYS_LGETFH = 160 // { int lgetfh(char *fname, struct fhandle *fhp); }
114 SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); }
115 SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
116 SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }
117 SYS_SEMSYS = 169 // { int semsys(int which, int a2, int a3, int a4, int a5); }
118 SYS_MSGSYS = 170 // { int msgsys(int which, int a2, int a3, int a4, int a5, int a6); }
119 SYS_SHMSYS = 171 // { int shmsys(int which, int a2, int a3, int a4); }
120 SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }
121 SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }
122 SYS_SETFIB = 175 // { int setfib(int fibnum); }
123 SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
124 SYS_SETGID = 181 // { int setgid(gid_t gid); }
125 SYS_SETEGID = 182 // { int setegid(gid_t egid); }
126 SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
127 SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
128 SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
129 SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
130 SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
131 SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
132 SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
133 SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
134 SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, u_int count, long *basep); }
135 SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, size_t len, int prot, int flags, int fd, int pad, off_t pos); }
136 SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, off_t offset, int whence); }
137 SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, off_t length); }
138 SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, off_t length); }
139 SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int
140 SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
141 SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
142 SYS_UNDELETE = 205 // { int undelete(char *path); }
143 SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
144 SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
145 SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, int timeout); }
146 SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); }
147 SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }
148 SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); }
149 SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
150 SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
151 SYS_SHMAT = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }
152 SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); }
153 SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); }
154 SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }
155 SYS_CLOCK_SETTIME = 233 // { int clock_settime( clockid_t clock_id, const struct timespec *tp); }
156 SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }
157 SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }
158 SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
159 SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }
160 SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct itimerspec *value); }
161 SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
162 SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
163 SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
164 SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( struct ffclock_estimate *cest); }
165 SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( struct ffclock_estimate *cest); }
166 SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,int which, clockid_t *clock_id); }
167 SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
168 SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); }
169 SYS_RFORK = 251 // { int rfork(int flags); }
170 SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, int timeout); }
171 SYS_ISSETUGID = 253 // { int issetugid(void); }
172 SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
173 SYS_AIO_READ = 255 // { int aio_read(struct aiocb *aiocbp); }
174 SYS_AIO_WRITE = 256 // { int aio_write(struct aiocb *aiocbp); }
175 SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
176 SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, size_t count); }
177 SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
178 SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
179 SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
180 SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
181 SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
182 SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
183 SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
184 SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
185 SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
186 SYS_MODNEXT = 300 // { int modnext(int modid); }
187 SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat *stat); }
188 SYS_MODFNEXT = 302 // { int modfnext(int modid); }
189 SYS_MODFIND = 303 // { int modfind(const char *name); }
190 SYS_KLDLOAD = 304 // { int kldload(const char *file); }
191 SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
192 SYS_KLDFIND = 306 // { int kldfind(const char *file); }
193 SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
194 SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); }
195 SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
196 SYS_GETSID = 310 // { int getsid(pid_t pid); }
197 SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
198 SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
199 SYS_AIO_RETURN = 314 // { int aio_return(struct aiocb *aiocbp); }
200 SYS_AIO_SUSPEND = 315 // { int aio_suspend( struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
201 SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
202 SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); }
203 SYS_OAIO_READ = 318 // { int oaio_read(struct oaiocb *aiocbp); }
204 SYS_OAIO_WRITE = 319 // { int oaio_write(struct oaiocb *aiocbp); }
205 SYS_OLIO_LISTIO = 320 // { int olio_listio(int mode, struct oaiocb * const *acb_list, int nent, struct osigevent *sig); }
206 SYS_YIELD = 321 // { int yield(void); }
207 SYS_MLOCKALL = 324 // { int mlockall(int how); }
208 SYS_MUNLOCKALL = 325 // { int munlockall(void); }
209 SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
210 SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
211 SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
212 SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
213 SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
214 SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
215 SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
216 SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
217 SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
218 SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
219 SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, void *data); }
220 SYS_JAIL = 338 // { int jail(struct jail *jail); }
221 SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, const sigset_t *set, sigset_t *oset); }
222 SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
223 SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
224 SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout); }
225 SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, siginfo_t *info); }
226 SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); }
227 SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); }
228 SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); }
229 SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); }
230 SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, acl_type_t type); }
231 SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }
232 SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }
233 SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }
234 SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
235 SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
236 SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
237 SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
238 SYS_AIO_WAITCOMPLETE = 359 // { int aio_waitcomplete( struct aiocb **aiocbp, struct timespec *timeout); }
239 SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
240 SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
241 SYS_KQUEUE = 362 // { int kqueue(void); }
242 SYS_KEVENT = 363 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
243 SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
244 SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
245 SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
246 SYS___SETUGID = 374 // { int __setugid(int flag); }
247 SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
248 SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, unsigned int iovcnt, int flags); }
249 SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
250 SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
251 SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, struct mac *mac_p); }
252 SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, struct mac *mac_p); }
253 SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, struct mac *mac_p); }
254 SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, struct mac *mac_p); }
255 SYS_KENV = 390 // { int kenv(int what, const char *name, char *value, int len); }
256 SYS_LCHFLAGS = 391 // { int lchflags(const char *path, u_long flags); }
257 SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
258 SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
259 SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, int call, void *arg); }
260 SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, long bufsize, int flags); }
261 SYS_STATFS = 396 // { int statfs(char *path, struct statfs *buf); }
262 SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
263 SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
264 SYS_KSEM_CLOSE = 400 // { int ksem_close(semid_t id); }
265 SYS_KSEM_POST = 401 // { int ksem_post(semid_t id); }
266 SYS_KSEM_WAIT = 402 // { int ksem_wait(semid_t id); }
267 SYS_KSEM_TRYWAIT = 403 // { int ksem_trywait(semid_t id); }
268 SYS_KSEM_INIT = 404 // { int ksem_init(semid_t *idp, unsigned int value); }
269 SYS_KSEM_OPEN = 405 // { int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode, unsigned int value); }
270 SYS_KSEM_UNLINK = 406 // { int ksem_unlink(const char *name); }
271 SYS_KSEM_GETVALUE = 407 // { int ksem_getvalue(semid_t id, int *val); }
272 SYS_KSEM_DESTROY = 408 // { int ksem_destroy(semid_t id); }
273 SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }
274 SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }
275 SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }
276 SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
277 SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
278 SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( const char *path, int attrnamespace, const char *attrname); }
279 SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }
280 SYS_SIGACTION = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }
281 SYS_SIGRETURN = 417 // { int sigreturn( const struct __ucontext *sigcntxp); }
282 SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
283 SYS_SETCONTEXT = 422 // { int setcontext( const struct __ucontext *ucp); }
284 SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }
285 SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
286 SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }
287 SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, acl_type_t type, struct acl *aclp); }
288 SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, acl_type_t type); }
289 SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, acl_type_t type, struct acl *aclp); }
290 SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, int *sig); }
291 SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, int flags); }
292 SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
293 SYS_THR_SELF = 432 // { int thr_self(long *id); }
294 SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
295 SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
296 SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
297 SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
298 SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
299 SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( const char *path, int attrnamespace, void *data, size_t nbytes); }
300 SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( const char *path, int attrnamespace, void *data, size_t nbytes); }
301 SYS_KSEM_TIMEDWAIT = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }
302 SYS_THR_SUSPEND = 442 // { int thr_suspend( const struct timespec *timeout); }
303 SYS_THR_WAKE = 443 // { int thr_wake(long id); }
304 SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
305 SYS_AUDIT = 445 // { int audit(const void *record, u_int length); }
306 SYS_AUDITON = 446 // { int auditon(int cmd, void *data, u_int length); }
307 SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
308 SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
309 SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
310 SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
311 SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
312 SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
313 SYS_AUDITCTL = 453 // { int auditctl(char *path); }
314 SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }
315 SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, int param_size); }
316 SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
317 SYS_KMQ_OPEN = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }
318 SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
319 SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
320 SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len,unsigned msg_prio, const struct timespec *abs_timeout);}
321 SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
322 SYS_KMQ_UNLINK = 462 // { int kmq_unlink(const char *path); }
323 SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
324 SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
325 SYS_AIO_FSYNC = 465 // { int aio_fsync(int op, struct aiocb *aiocbp); }
326 SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, lwpid_t lwpid, struct rtprio *rtp); }
327 SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
328 SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
329 SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
330 SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr * from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
331 SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }
332 SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }
333 SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }
334 SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, int whence); }
335 SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
336 SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
337 SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
338 SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, mode_t mode); }
339 SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
340 SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
341 SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, cpusetid_t setid); }
342 SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); }
343 SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *mask); }
344 SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *mask); }
345 SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, int flag); }
346 SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }
347 SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }
348 SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, char **envv); }
349 SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
350 SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, struct timeval *times); }
351 SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }
352 SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
353 SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
354 SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
355 SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }
356 SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, size_t bufsize); }
357 SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }
358 SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, char *path2); }
359 SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
360 SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
361 SYS_GSSD_SYSCALL = 505 // { int gssd_syscall(char *path); }
362 SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, unsigned int iovcnt, int flags); }
363 SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, unsigned int iovcnt, int flags); }
364 SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
365 SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
366 SYS___SEMCTL = 510 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); }
367 SYS_MSGCTL = 511 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); }
368 SYS_SHMCTL = 512 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); }
369 SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
370 SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, int fd, cap_rights_t *rightsp); }
371 SYS_CAP_ENTER = 516 // { int cap_enter(void); }
372 SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
373 SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
374 SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
375 SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
376 SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sm); }
377 SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, size_t namelen); }
378 SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
379 SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
380 SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
381 SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
382 SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
383 SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }
384 SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, off_t offset, off_t len); }
385 SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, off_t len, int advice); }
386 SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); }
387 SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, cap_rights_t *rightsp); }
388 SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, const u_long *cmds, size_t ncmds); }
389 SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, u_long *cmds, size_t maxcmds); }
390 SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, uint32_t fcntlrights); }
391 SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, uint32_t *fcntlrightsp); }
392 SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, int namelen); }
393 SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, int namelen); }
394 SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, u_long flags, int atflag); }
395 SYS_ACCEPT4 = 541 // { int accept4(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen, int flags); }
396 SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
397 SYS_AIO_MLOCK = 543 // { int aio_mlock(struct aiocb *aiocbp); }
398 SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, int com, void *data); }
399 SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }
400 SYS_FUTIMENS = 546 // { int futimens(int fd, struct timespec *times); }
401 SYS_UTIMENSAT = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }
352402 )
0 // mksysnum_freebsd.pl
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build arm64,freebsd
4
5 package unix
6
7 const (
8 // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
9 SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
10 SYS_FORK = 2 // { int fork(void); }
11 SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
12 SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
13 SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
14 SYS_CLOSE = 6 // { int close(int fd); }
15 SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
16 SYS_LINK = 9 // { int link(char *path, char *link); }
17 SYS_UNLINK = 10 // { int unlink(char *path); }
18 SYS_CHDIR = 12 // { int chdir(char *path); }
19 SYS_FCHDIR = 13 // { int fchdir(int fd); }
20 SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
21 SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
22 SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
23 SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
24 SYS_GETPID = 20 // { pid_t getpid(void); }
25 SYS_MOUNT = 21 // { int mount(char *type, char *path, \
26 SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
27 SYS_SETUID = 23 // { int setuid(uid_t uid); }
28 SYS_GETUID = 24 // { uid_t getuid(void); }
29 SYS_GETEUID = 25 // { uid_t geteuid(void); }
30 SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
31 SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
32 SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
33 SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
34 SYS_ACCEPT = 30 // { int accept(int s, \
35 SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
36 SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
37 SYS_ACCESS = 33 // { int access(char *path, int amode); }
38 SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
39 SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
40 SYS_SYNC = 36 // { int sync(void); }
41 SYS_KILL = 37 // { int kill(int pid, int signum); }
42 SYS_GETPPID = 39 // { pid_t getppid(void); }
43 SYS_DUP = 41 // { int dup(u_int fd); }
44 SYS_GETEGID = 43 // { gid_t getegid(void); }
45 SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
46 SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
47 SYS_GETGID = 47 // { gid_t getgid(void); }
48 SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
49 SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
50 SYS_ACCT = 51 // { int acct(char *path); }
51 SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
52 SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
53 SYS_REBOOT = 55 // { int reboot(int opt); }
54 SYS_REVOKE = 56 // { int revoke(char *path); }
55 SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
56 SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
57 SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
58 SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
59 SYS_CHROOT = 61 // { int chroot(char *path); }
60 SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
61 SYS_VFORK = 66 // { int vfork(void); }
62 SYS_SBRK = 69 // { int sbrk(int incr); }
63 SYS_SSTK = 70 // { int sstk(int incr); }
64 SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
65 SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
66 SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
67 SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
68 SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
69 SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
70 SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
71 SYS_GETPGRP = 81 // { int getpgrp(void); }
72 SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
73 SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
74 SYS_SWAPON = 85 // { int swapon(char *name); }
75 SYS_GETITIMER = 86 // { int getitimer(u_int which, \
76 SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
77 SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
78 SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
79 SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
80 SYS_FSYNC = 95 // { int fsync(int fd); }
81 SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
82 SYS_SOCKET = 97 // { int socket(int domain, int type, \
83 SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
84 SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
85 SYS_BIND = 104 // { int bind(int s, caddr_t name, \
86 SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
87 SYS_LISTEN = 106 // { int listen(int s, int backlog); }
88 SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
89 SYS_GETRUSAGE = 117 // { int getrusage(int who, \
90 SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
91 SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
92 SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
93 SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
94 SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
95 SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
96 SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
97 SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
98 SYS_RENAME = 128 // { int rename(char *from, char *to); }
99 SYS_FLOCK = 131 // { int flock(int fd, int how); }
100 SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
101 SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
102 SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
103 SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
104 SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
105 SYS_RMDIR = 137 // { int rmdir(char *path); }
106 SYS_UTIMES = 138 // { int utimes(char *path, \
107 SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
108 SYS_SETSID = 147 // { int setsid(void); }
109 SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
110 SYS_NLM_SYSCALL = 154 // { int nlm_syscall(int debug_level, int grace_period, int addr_count, char **addrs); }
111 SYS_NFSSVC = 155 // { int nfssvc(int flag, caddr_t argp); }
112 SYS_LGETFH = 160 // { int lgetfh(char *fname, \
113 SYS_GETFH = 161 // { int getfh(char *fname, \
114 SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
115 SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
116 SYS_SEMSYS = 169 // { int semsys(int which, int a2, int a3, \
117 SYS_MSGSYS = 170 // { int msgsys(int which, int a2, int a3, \
118 SYS_SHMSYS = 171 // { int shmsys(int which, int a2, int a3, \
119 SYS_SETFIB = 175 // { int setfib(int fibnum); }
120 SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
121 SYS_SETGID = 181 // { int setgid(gid_t gid); }
122 SYS_SETEGID = 182 // { int setegid(gid_t egid); }
123 SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
124 SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
125 SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
126 SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
127 SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
128 SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
129 SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
130 SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
131 SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
132 SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
133 SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
134 SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
135 SYS_UNDELETE = 205 // { int undelete(char *path); }
136 SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
137 SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
138 SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
139 SYS_SEMGET = 221 // { int semget(key_t key, int nsems, \
140 SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, \
141 SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); }
142 SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, \
143 SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, \
144 SYS_SHMAT = 228 // { int shmat(int shmid, const void *shmaddr, \
145 SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); }
146 SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, \
147 SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
148 SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
149 SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
150 SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
151 SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
152 SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
153 SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
154 SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
155 SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
156 SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
157 SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
158 SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
159 SYS_CLOCK_NANOSLEEP = 244 // { int clock_nanosleep(clockid_t clock_id, \
160 SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
161 SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
162 SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
163 SYS_RFORK = 251 // { int rfork(int flags); }
164 SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
165 SYS_ISSETUGID = 253 // { int issetugid(void); }
166 SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
167 SYS_AIO_READ = 255 // { int aio_read(struct aiocb *aiocbp); }
168 SYS_AIO_WRITE = 256 // { int aio_write(struct aiocb *aiocbp); }
169 SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, \
170 SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
171 SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
172 SYS_LUTIMES = 276 // { int lutimes(char *path, \
173 SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
174 SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
175 SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
176 SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
177 SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
178 SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
179 SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
180 SYS_MODNEXT = 300 // { int modnext(int modid); }
181 SYS_MODSTAT = 301 // { int modstat(int modid, \
182 SYS_MODFNEXT = 302 // { int modfnext(int modid); }
183 SYS_MODFIND = 303 // { int modfind(const char *name); }
184 SYS_KLDLOAD = 304 // { int kldload(const char *file); }
185 SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
186 SYS_KLDFIND = 306 // { int kldfind(const char *file); }
187 SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
188 SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
189 SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
190 SYS_GETSID = 310 // { int getsid(pid_t pid); }
191 SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
192 SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
193 SYS_AIO_RETURN = 314 // { ssize_t aio_return(struct aiocb *aiocbp); }
194 SYS_AIO_SUSPEND = 315 // { int aio_suspend( \
195 SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, \
196 SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); }
197 SYS_YIELD = 321 // { int yield(void); }
198 SYS_MLOCKALL = 324 // { int mlockall(int how); }
199 SYS_MUNLOCKALL = 325 // { int munlockall(void); }
200 SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
201 SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
202 SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
203 SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
204 SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
205 SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
206 SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
207 SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
208 SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
209 SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
210 SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
211 SYS_JAIL = 338 // { int jail(struct jail *jail); }
212 SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
213 SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
214 SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
215 SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
216 SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
217 SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
218 SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
219 SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
220 SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
221 SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
222 SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
223 SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
224 SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
225 SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
226 SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
227 SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
228 SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
229 SYS_AIO_WAITCOMPLETE = 359 // { ssize_t aio_waitcomplete( \
230 SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
231 SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
232 SYS_KQUEUE = 362 // { int kqueue(void); }
233 SYS_KEVENT = 363 // { int kevent(int fd, \
234 SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
235 SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
236 SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
237 SYS___SETUGID = 374 // { int __setugid(int flag); }
238 SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
239 SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
240 SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
241 SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
242 SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
243 SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
244 SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
245 SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
246 SYS_KENV = 390 // { int kenv(int what, const char *name, \
247 SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
248 SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
249 SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
250 SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
251 SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
252 SYS_STATFS = 396 // { int statfs(char *path, \
253 SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
254 SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
255 SYS_KSEM_CLOSE = 400 // { int ksem_close(semid_t id); }
256 SYS_KSEM_POST = 401 // { int ksem_post(semid_t id); }
257 SYS_KSEM_WAIT = 402 // { int ksem_wait(semid_t id); }
258 SYS_KSEM_TRYWAIT = 403 // { int ksem_trywait(semid_t id); }
259 SYS_KSEM_INIT = 404 // { int ksem_init(semid_t *idp, \
260 SYS_KSEM_OPEN = 405 // { int ksem_open(semid_t *idp, \
261 SYS_KSEM_UNLINK = 406 // { int ksem_unlink(const char *name); }
262 SYS_KSEM_GETVALUE = 407 // { int ksem_getvalue(semid_t id, int *val); }
263 SYS_KSEM_DESTROY = 408 // { int ksem_destroy(semid_t id); }
264 SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
265 SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
266 SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
267 SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
268 SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
269 SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
270 SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
271 SYS_SIGACTION = 416 // { int sigaction(int sig, \
272 SYS_SIGRETURN = 417 // { int sigreturn( \
273 SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
274 SYS_SETCONTEXT = 422 // { int setcontext( \
275 SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
276 SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
277 SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
278 SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
279 SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
280 SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
281 SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
282 SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
283 SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
284 SYS_THR_SELF = 432 // { int thr_self(long *id); }
285 SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
286 SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
287 SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
288 SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
289 SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
290 SYS_KSEM_TIMEDWAIT = 441 // { int ksem_timedwait(semid_t id, \
291 SYS_THR_SUSPEND = 442 // { int thr_suspend( \
292 SYS_THR_WAKE = 443 // { int thr_wake(long id); }
293 SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
294 SYS_AUDIT = 445 // { int audit(const void *record, \
295 SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
296 SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
297 SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
298 SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
299 SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
300 SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
301 SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
302 SYS_AUDITCTL = 453 // { int auditctl(char *path); }
303 SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
304 SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
305 SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
306 SYS_KMQ_OPEN = 457 // { int kmq_open(const char *path, int flags, \
307 SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, \
308 SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, \
309 SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, \
310 SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, \
311 SYS_KMQ_UNLINK = 462 // { int kmq_unlink(const char *path); }
312 SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
313 SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
314 SYS_AIO_FSYNC = 465 // { int aio_fsync(int op, struct aiocb *aiocbp); }
315 SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
316 SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
317 SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \
318 SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \
319 SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \
320 SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
321 SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
322 SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
323 SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
324 SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
325 SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
326 SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
327 SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
328 SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
329 SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
330 SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
331 SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
332 SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
333 SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
334 SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
335 SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
336 SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
337 SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
338 SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
339 SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
340 SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
341 SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
342 SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
343 SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
344 SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
345 SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
346 SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
347 SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
348 SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
349 SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
350 SYS_GSSD_SYSCALL = 505 // { int gssd_syscall(char *path); }
351 SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
352 SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
353 SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
354 SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
355 SYS___SEMCTL = 510 // { int __semctl(int semid, int semnum, \
356 SYS_MSGCTL = 511 // { int msgctl(int msqid, int cmd, \
357 SYS_SHMCTL = 512 // { int shmctl(int shmid, int cmd, \
358 SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
359 SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, \
360 SYS_CAP_ENTER = 516 // { int cap_enter(void); }
361 SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
362 SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
363 SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
364 SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
365 SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
366 SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
367 SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
368 SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
369 SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
370 SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
371 SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
372 SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
373 SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
374 SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
375 SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
376 SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, \
377 SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, \
378 SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, \
379 SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, \
380 SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, \
381 SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
382 SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
383 SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
384 SYS_ACCEPT4 = 541 // { int accept4(int s, \
385 SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
386 SYS_AIO_MLOCK = 543 // { int aio_mlock(struct aiocb *aiocbp); }
387 SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
388 SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \
389 SYS_FUTIMENS = 546 // { int futimens(int fd, \
390 SYS_UTIMENSAT = 547 // { int utimensat(int fd, \
391 SYS_NUMA_GETAFFINITY = 548 // { int numa_getaffinity(cpuwhich_t which, \
392 SYS_NUMA_SETAFFINITY = 549 // { int numa_setaffinity(cpuwhich_t which, \
393 SYS_FDATASYNC = 550 // { int fdatasync(int fd); }
394 )
0 // linux/mksysnum.pl -Wall -Werror -static -I/tmp/include -m32 /tmp/include/asm/unistd.h
0 // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -m32 /tmp/include/asm/unistd.h
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build 386,linux
386386 SYS_PKEY_FREE = 382
387387 SYS_STATX = 383
388388 SYS_ARCH_PRCTL = 384
389 SYS_IO_PGETEVENTS = 385
390 SYS_RSEQ = 386
389391 )
0 // linux/mksysnum.pl -Wall -Werror -static -I/tmp/include -m64 /tmp/include/asm/unistd.h
0 // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -m64 /tmp/include/asm/unistd.h
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build amd64,linux
338338 SYS_PKEY_ALLOC = 330
339339 SYS_PKEY_FREE = 331
340340 SYS_STATX = 332
341 SYS_IO_PGETEVENTS = 333
342 SYS_RSEQ = 334
341343 )
0 // linux/mksysnum.pl -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
0 // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build arm,linux
358358 SYS_PKEY_ALLOC = 395
359359 SYS_PKEY_FREE = 396
360360 SYS_STATX = 397
361 SYS_RSEQ = 398
362 SYS_IO_PGETEVENTS = 399
361363 )
0 // linux/mksysnum.pl -Wall -Werror -static -I/tmp/include -fsigned-char /tmp/include/asm/unistd.h
0 // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -fsigned-char /tmp/include/asm/unistd.h
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build arm64,linux
282282 SYS_PKEY_ALLOC = 289
283283 SYS_PKEY_FREE = 290
284284 SYS_STATX = 291
285 SYS_IO_PGETEVENTS = 292
286 SYS_RSEQ = 293
285287 )
0 // linux/mksysnum.pl -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
0 // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build mips,linux
371371 SYS_PKEY_ALLOC = 4364
372372 SYS_PKEY_FREE = 4365
373373 SYS_STATX = 4366
374 SYS_RSEQ = 4367
375 SYS_IO_PGETEVENTS = 4368
374376 )
0 // linux/mksysnum.pl -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
0 // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build mips64,linux
331331 SYS_PKEY_ALLOC = 5324
332332 SYS_PKEY_FREE = 5325
333333 SYS_STATX = 5326
334 SYS_RSEQ = 5327
335 SYS_IO_PGETEVENTS = 5328
334336 )
0 // linux/mksysnum.pl -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
0 // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build mips64le,linux
331331 SYS_PKEY_ALLOC = 5324
332332 SYS_PKEY_FREE = 5325
333333 SYS_STATX = 5326
334 SYS_RSEQ = 5327
335 SYS_IO_PGETEVENTS = 5328
334336 )
0 // linux/mksysnum.pl -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
0 // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build mipsle,linux
371371 SYS_PKEY_ALLOC = 4364
372372 SYS_PKEY_FREE = 4365
373373 SYS_STATX = 4366
374 SYS_RSEQ = 4367
375 SYS_IO_PGETEVENTS = 4368
374376 )
0 // linux/mksysnum.pl -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
0 // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build ppc64,linux
366366 SYS_PWRITEV2 = 381
367367 SYS_KEXEC_FILE_LOAD = 382
368368 SYS_STATX = 383
369 SYS_PKEY_ALLOC = 384
370 SYS_PKEY_FREE = 385
371 SYS_PKEY_MPROTECT = 386
372 SYS_RSEQ = 387
373 SYS_IO_PGETEVENTS = 388
369374 )
0 // linux/mksysnum.pl -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
0 // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build ppc64le,linux
366366 SYS_PWRITEV2 = 381
367367 SYS_KEXEC_FILE_LOAD = 382
368368 SYS_STATX = 383
369 SYS_PKEY_ALLOC = 384
370 SYS_PKEY_FREE = 385
371 SYS_PKEY_MPROTECT = 386
372 SYS_RSEQ = 387
373 SYS_IO_PGETEVENTS = 388
369374 )
0 // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build riscv64,linux
4
5 package unix
6
7 const (
8 SYS_IO_SETUP = 0
9 SYS_IO_DESTROY = 1
10 SYS_IO_SUBMIT = 2
11 SYS_IO_CANCEL = 3
12 SYS_IO_GETEVENTS = 4
13 SYS_SETXATTR = 5
14 SYS_LSETXATTR = 6
15 SYS_FSETXATTR = 7
16 SYS_GETXATTR = 8
17 SYS_LGETXATTR = 9
18 SYS_FGETXATTR = 10
19 SYS_LISTXATTR = 11
20 SYS_LLISTXATTR = 12
21 SYS_FLISTXATTR = 13
22 SYS_REMOVEXATTR = 14
23 SYS_LREMOVEXATTR = 15
24 SYS_FREMOVEXATTR = 16
25 SYS_GETCWD = 17
26 SYS_LOOKUP_DCOOKIE = 18
27 SYS_EVENTFD2 = 19
28 SYS_EPOLL_CREATE1 = 20
29 SYS_EPOLL_CTL = 21
30 SYS_EPOLL_PWAIT = 22
31 SYS_DUP = 23
32 SYS_DUP3 = 24
33 SYS_FCNTL = 25
34 SYS_INOTIFY_INIT1 = 26
35 SYS_INOTIFY_ADD_WATCH = 27
36 SYS_INOTIFY_RM_WATCH = 28
37 SYS_IOCTL = 29
38 SYS_IOPRIO_SET = 30
39 SYS_IOPRIO_GET = 31
40 SYS_FLOCK = 32
41 SYS_MKNODAT = 33
42 SYS_MKDIRAT = 34
43 SYS_UNLINKAT = 35
44 SYS_SYMLINKAT = 36
45 SYS_LINKAT = 37
46 SYS_UMOUNT2 = 39
47 SYS_MOUNT = 40
48 SYS_PIVOT_ROOT = 41
49 SYS_NFSSERVCTL = 42
50 SYS_STATFS = 43
51 SYS_FSTATFS = 44
52 SYS_TRUNCATE = 45
53 SYS_FTRUNCATE = 46
54 SYS_FALLOCATE = 47
55 SYS_FACCESSAT = 48
56 SYS_CHDIR = 49
57 SYS_FCHDIR = 50
58 SYS_CHROOT = 51
59 SYS_FCHMOD = 52
60 SYS_FCHMODAT = 53
61 SYS_FCHOWNAT = 54
62 SYS_FCHOWN = 55
63 SYS_OPENAT = 56
64 SYS_CLOSE = 57
65 SYS_VHANGUP = 58
66 SYS_PIPE2 = 59
67 SYS_QUOTACTL = 60
68 SYS_GETDENTS64 = 61
69 SYS_LSEEK = 62
70 SYS_READ = 63
71 SYS_WRITE = 64
72 SYS_READV = 65
73 SYS_WRITEV = 66
74 SYS_PREAD64 = 67
75 SYS_PWRITE64 = 68
76 SYS_PREADV = 69
77 SYS_PWRITEV = 70
78 SYS_SENDFILE = 71
79 SYS_PSELECT6 = 72
80 SYS_PPOLL = 73
81 SYS_SIGNALFD4 = 74
82 SYS_VMSPLICE = 75
83 SYS_SPLICE = 76
84 SYS_TEE = 77
85 SYS_READLINKAT = 78
86 SYS_FSTATAT = 79
87 SYS_FSTAT = 80
88 SYS_SYNC = 81
89 SYS_FSYNC = 82
90 SYS_FDATASYNC = 83
91 SYS_SYNC_FILE_RANGE = 84
92 SYS_TIMERFD_CREATE = 85
93 SYS_TIMERFD_SETTIME = 86
94 SYS_TIMERFD_GETTIME = 87
95 SYS_UTIMENSAT = 88
96 SYS_ACCT = 89
97 SYS_CAPGET = 90
98 SYS_CAPSET = 91
99 SYS_PERSONALITY = 92
100 SYS_EXIT = 93
101 SYS_EXIT_GROUP = 94
102 SYS_WAITID = 95
103 SYS_SET_TID_ADDRESS = 96
104 SYS_UNSHARE = 97
105 SYS_FUTEX = 98
106 SYS_SET_ROBUST_LIST = 99
107 SYS_GET_ROBUST_LIST = 100
108 SYS_NANOSLEEP = 101
109 SYS_GETITIMER = 102
110 SYS_SETITIMER = 103
111 SYS_KEXEC_LOAD = 104
112 SYS_INIT_MODULE = 105
113 SYS_DELETE_MODULE = 106
114 SYS_TIMER_CREATE = 107
115 SYS_TIMER_GETTIME = 108
116 SYS_TIMER_GETOVERRUN = 109
117 SYS_TIMER_SETTIME = 110
118 SYS_TIMER_DELETE = 111
119 SYS_CLOCK_SETTIME = 112
120 SYS_CLOCK_GETTIME = 113
121 SYS_CLOCK_GETRES = 114
122 SYS_CLOCK_NANOSLEEP = 115
123 SYS_SYSLOG = 116
124 SYS_PTRACE = 117
125 SYS_SCHED_SETPARAM = 118
126 SYS_SCHED_SETSCHEDULER = 119
127 SYS_SCHED_GETSCHEDULER = 120
128 SYS_SCHED_GETPARAM = 121
129 SYS_SCHED_SETAFFINITY = 122
130 SYS_SCHED_GETAFFINITY = 123
131 SYS_SCHED_YIELD = 124
132 SYS_SCHED_GET_PRIORITY_MAX = 125
133 SYS_SCHED_GET_PRIORITY_MIN = 126
134 SYS_SCHED_RR_GET_INTERVAL = 127
135 SYS_RESTART_SYSCALL = 128
136 SYS_KILL = 129
137 SYS_TKILL = 130
138 SYS_TGKILL = 131
139 SYS_SIGALTSTACK = 132
140 SYS_RT_SIGSUSPEND = 133
141 SYS_RT_SIGACTION = 134
142 SYS_RT_SIGPROCMASK = 135
143 SYS_RT_SIGPENDING = 136
144 SYS_RT_SIGTIMEDWAIT = 137
145 SYS_RT_SIGQUEUEINFO = 138
146 SYS_RT_SIGRETURN = 139
147 SYS_SETPRIORITY = 140
148 SYS_GETPRIORITY = 141
149 SYS_REBOOT = 142
150 SYS_SETREGID = 143
151 SYS_SETGID = 144
152 SYS_SETREUID = 145
153 SYS_SETUID = 146
154 SYS_SETRESUID = 147
155 SYS_GETRESUID = 148
156 SYS_SETRESGID = 149
157 SYS_GETRESGID = 150
158 SYS_SETFSUID = 151
159 SYS_SETFSGID = 152
160 SYS_TIMES = 153
161 SYS_SETPGID = 154
162 SYS_GETPGID = 155
163 SYS_GETSID = 156
164 SYS_SETSID = 157
165 SYS_GETGROUPS = 158
166 SYS_SETGROUPS = 159
167 SYS_UNAME = 160
168 SYS_SETHOSTNAME = 161
169 SYS_SETDOMAINNAME = 162
170 SYS_GETRLIMIT = 163
171 SYS_SETRLIMIT = 164
172 SYS_GETRUSAGE = 165
173 SYS_UMASK = 166
174 SYS_PRCTL = 167
175 SYS_GETCPU = 168
176 SYS_GETTIMEOFDAY = 169
177 SYS_SETTIMEOFDAY = 170
178 SYS_ADJTIMEX = 171
179 SYS_GETPID = 172
180 SYS_GETPPID = 173
181 SYS_GETUID = 174
182 SYS_GETEUID = 175
183 SYS_GETGID = 176
184 SYS_GETEGID = 177
185 SYS_GETTID = 178
186 SYS_SYSINFO = 179
187 SYS_MQ_OPEN = 180
188 SYS_MQ_UNLINK = 181
189 SYS_MQ_TIMEDSEND = 182
190 SYS_MQ_TIMEDRECEIVE = 183
191 SYS_MQ_NOTIFY = 184
192 SYS_MQ_GETSETATTR = 185
193 SYS_MSGGET = 186
194 SYS_MSGCTL = 187
195 SYS_MSGRCV = 188
196 SYS_MSGSND = 189
197 SYS_SEMGET = 190
198 SYS_SEMCTL = 191
199 SYS_SEMTIMEDOP = 192
200 SYS_SEMOP = 193
201 SYS_SHMGET = 194
202 SYS_SHMCTL = 195
203 SYS_SHMAT = 196
204 SYS_SHMDT = 197
205 SYS_SOCKET = 198
206 SYS_SOCKETPAIR = 199
207 SYS_BIND = 200
208 SYS_LISTEN = 201
209 SYS_ACCEPT = 202
210 SYS_CONNECT = 203
211 SYS_GETSOCKNAME = 204
212 SYS_GETPEERNAME = 205
213 SYS_SENDTO = 206
214 SYS_RECVFROM = 207
215 SYS_SETSOCKOPT = 208
216 SYS_GETSOCKOPT = 209
217 SYS_SHUTDOWN = 210
218 SYS_SENDMSG = 211
219 SYS_RECVMSG = 212
220 SYS_READAHEAD = 213
221 SYS_BRK = 214
222 SYS_MUNMAP = 215
223 SYS_MREMAP = 216
224 SYS_ADD_KEY = 217
225 SYS_REQUEST_KEY = 218
226 SYS_KEYCTL = 219
227 SYS_CLONE = 220
228 SYS_EXECVE = 221
229 SYS_MMAP = 222
230 SYS_FADVISE64 = 223
231 SYS_SWAPON = 224
232 SYS_SWAPOFF = 225
233 SYS_MPROTECT = 226
234 SYS_MSYNC = 227
235 SYS_MLOCK = 228
236 SYS_MUNLOCK = 229
237 SYS_MLOCKALL = 230
238 SYS_MUNLOCKALL = 231
239 SYS_MINCORE = 232
240 SYS_MADVISE = 233
241 SYS_REMAP_FILE_PAGES = 234
242 SYS_MBIND = 235
243 SYS_GET_MEMPOLICY = 236
244 SYS_SET_MEMPOLICY = 237
245 SYS_MIGRATE_PAGES = 238
246 SYS_MOVE_PAGES = 239
247 SYS_RT_TGSIGQUEUEINFO = 240
248 SYS_PERF_EVENT_OPEN = 241
249 SYS_ACCEPT4 = 242
250 SYS_RECVMMSG = 243
251 SYS_ARCH_SPECIFIC_SYSCALL = 244
252 SYS_WAIT4 = 260
253 SYS_PRLIMIT64 = 261
254 SYS_FANOTIFY_INIT = 262
255 SYS_FANOTIFY_MARK = 263
256 SYS_NAME_TO_HANDLE_AT = 264
257 SYS_OPEN_BY_HANDLE_AT = 265
258 SYS_CLOCK_ADJTIME = 266
259 SYS_SYNCFS = 267
260 SYS_SETNS = 268
261 SYS_SENDMMSG = 269
262 SYS_PROCESS_VM_READV = 270
263 SYS_PROCESS_VM_WRITEV = 271
264 SYS_KCMP = 272
265 SYS_FINIT_MODULE = 273
266 SYS_SCHED_SETATTR = 274
267 SYS_SCHED_GETATTR = 275
268 SYS_RENAMEAT2 = 276
269 SYS_SECCOMP = 277
270 SYS_GETRANDOM = 278
271 SYS_MEMFD_CREATE = 279
272 SYS_BPF = 280
273 SYS_EXECVEAT = 281
274 SYS_USERFAULTFD = 282
275 SYS_MEMBARRIER = 283
276 SYS_MLOCK2 = 284
277 SYS_COPY_FILE_RANGE = 285
278 SYS_PREADV2 = 286
279 SYS_PWRITEV2 = 287
280 SYS_PKEY_MPROTECT = 288
281 SYS_PKEY_ALLOC = 289
282 SYS_PKEY_FREE = 290
283 SYS_STATX = 291
284 SYS_IO_PGETEVENTS = 292
285 SYS_RSEQ = 293
286 )
0 // linux/mksysnum.pl -Wall -Werror -static -I/tmp/include -fsigned-char /tmp/include/asm/unistd.h
0 // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -fsigned-char /tmp/include/asm/unistd.h
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build s390x,linux
108108 SYS_PERSONALITY = 136
109109 SYS_AFS_SYSCALL = 137
110110 SYS_GETDENTS = 141
111 SYS_SELECT = 142
111112 SYS_FLOCK = 143
112113 SYS_MSYNC = 144
113114 SYS_READV = 145
150151 SYS_GETPMSG = 188
151152 SYS_PUTPMSG = 189
152153 SYS_VFORK = 190
154 SYS_GETRLIMIT = 191
155 SYS_LCHOWN = 198
156 SYS_GETUID = 199
157 SYS_GETGID = 200
158 SYS_GETEUID = 201
159 SYS_GETEGID = 202
160 SYS_SETREUID = 203
161 SYS_SETREGID = 204
162 SYS_GETGROUPS = 205
163 SYS_SETGROUPS = 206
164 SYS_FCHOWN = 207
165 SYS_SETRESUID = 208
166 SYS_GETRESUID = 209
167 SYS_SETRESGID = 210
168 SYS_GETRESGID = 211
169 SYS_CHOWN = 212
170 SYS_SETUID = 213
171 SYS_SETGID = 214
172 SYS_SETFSUID = 215
173 SYS_SETFSGID = 216
153174 SYS_PIVOT_ROOT = 217
154175 SYS_MINCORE = 218
155176 SYS_MADVISE = 219
221242 SYS_MKNODAT = 290
222243 SYS_FCHOWNAT = 291
223244 SYS_FUTIMESAT = 292
245 SYS_NEWFSTATAT = 293
224246 SYS_UNLINKAT = 294
225247 SYS_RENAMEAT = 295
226248 SYS_LINKAT = 296
307329 SYS_PWRITEV2 = 377
308330 SYS_S390_GUARDED_STORAGE = 378
309331 SYS_STATX = 379
310 SYS_SELECT = 142
311 SYS_GETRLIMIT = 191
312 SYS_LCHOWN = 198
313 SYS_GETUID = 199
314 SYS_GETGID = 200
315 SYS_GETEUID = 201
316 SYS_GETEGID = 202
317 SYS_SETREUID = 203
318 SYS_SETREGID = 204
319 SYS_GETGROUPS = 205
320 SYS_SETGROUPS = 206
321 SYS_FCHOWN = 207
322 SYS_SETRESUID = 208
323 SYS_GETRESUID = 209
324 SYS_SETRESGID = 210
325 SYS_GETRESGID = 211
326 SYS_CHOWN = 212
327 SYS_SETUID = 213
328 SYS_SETGID = 214
329 SYS_SETFSUID = 215
330 SYS_SETFSGID = 216
331 SYS_NEWFSTATAT = 293
332 SYS_S390_STHYI = 380
333 SYS_KEXEC_FILE_LOAD = 381
334 SYS_IO_PGETEVENTS = 382
335 SYS_RSEQ = 383
332336 )
0 // mksysnum_linux.pl -Ilinux/usr/include -m64 -D__arch64__ linux/usr/include/asm/unistd.h
1 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
0 // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build sparc64,linux
44
344344 SYS_COPY_FILE_RANGE = 357
345345 SYS_PREADV2 = 358
346346 SYS_PWRITEV2 = 359
347 SYS_STATX = 360
348 SYS_IO_PGETEVENTS = 361
347349 )
0 // mksysnum_netbsd.pl
1 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
0 // go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build 386,netbsd
44
0 // mksysnum_netbsd.pl
1 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
0 // go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build amd64,netbsd
44
0 // mksysnum_netbsd.pl
1 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
0 // go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build arm,netbsd
44
0 // mksysnum_netbsd.pl
1 // Code generated by the command above; DO NOT EDIT.
2
3 // +build arm64,netbsd
4
5 package unix
6
7 const (
8 SYS_EXIT = 1 // { void|sys||exit(int rval); }
9 SYS_FORK = 2 // { int|sys||fork(void); }
10 SYS_READ = 3 // { ssize_t|sys||read(int fd, void *buf, size_t nbyte); }
11 SYS_WRITE = 4 // { ssize_t|sys||write(int fd, const void *buf, size_t nbyte); }
12 SYS_OPEN = 5 // { int|sys||open(const char *path, int flags, ... mode_t mode); }
13 SYS_CLOSE = 6 // { int|sys||close(int fd); }
14 SYS_LINK = 9 // { int|sys||link(const char *path, const char *link); }
15 SYS_UNLINK = 10 // { int|sys||unlink(const char *path); }
16 SYS_CHDIR = 12 // { int|sys||chdir(const char *path); }
17 SYS_FCHDIR = 13 // { int|sys||fchdir(int fd); }
18 SYS_CHMOD = 15 // { int|sys||chmod(const char *path, mode_t mode); }
19 SYS_CHOWN = 16 // { int|sys||chown(const char *path, uid_t uid, gid_t gid); }
20 SYS_BREAK = 17 // { int|sys||obreak(char *nsize); }
21 SYS_GETPID = 20 // { pid_t|sys||getpid_with_ppid(void); }
22 SYS_UNMOUNT = 22 // { int|sys||unmount(const char *path, int flags); }
23 SYS_SETUID = 23 // { int|sys||setuid(uid_t uid); }
24 SYS_GETUID = 24 // { uid_t|sys||getuid_with_euid(void); }
25 SYS_GETEUID = 25 // { uid_t|sys||geteuid(void); }
26 SYS_PTRACE = 26 // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); }
27 SYS_RECVMSG = 27 // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); }
28 SYS_SENDMSG = 28 // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); }
29 SYS_RECVFROM = 29 // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
30 SYS_ACCEPT = 30 // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); }
31 SYS_GETPEERNAME = 31 // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
32 SYS_GETSOCKNAME = 32 // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
33 SYS_ACCESS = 33 // { int|sys||access(const char *path, int flags); }
34 SYS_CHFLAGS = 34 // { int|sys||chflags(const char *path, u_long flags); }
35 SYS_FCHFLAGS = 35 // { int|sys||fchflags(int fd, u_long flags); }
36 SYS_SYNC = 36 // { void|sys||sync(void); }
37 SYS_KILL = 37 // { int|sys||kill(pid_t pid, int signum); }
38 SYS_GETPPID = 39 // { pid_t|sys||getppid(void); }
39 SYS_DUP = 41 // { int|sys||dup(int fd); }
40 SYS_PIPE = 42 // { int|sys||pipe(void); }
41 SYS_GETEGID = 43 // { gid_t|sys||getegid(void); }
42 SYS_PROFIL = 44 // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); }
43 SYS_KTRACE = 45 // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); }
44 SYS_GETGID = 47 // { gid_t|sys||getgid_with_egid(void); }
45 SYS___GETLOGIN = 49 // { int|sys||__getlogin(char *namebuf, size_t namelen); }
46 SYS___SETLOGIN = 50 // { int|sys||__setlogin(const char *namebuf); }
47 SYS_ACCT = 51 // { int|sys||acct(const char *path); }
48 SYS_IOCTL = 54 // { int|sys||ioctl(int fd, u_long com, ... void *data); }
49 SYS_REVOKE = 56 // { int|sys||revoke(const char *path); }
50 SYS_SYMLINK = 57 // { int|sys||symlink(const char *path, const char *link); }
51 SYS_READLINK = 58 // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); }
52 SYS_EXECVE = 59 // { int|sys||execve(const char *path, char * const *argp, char * const *envp); }
53 SYS_UMASK = 60 // { mode_t|sys||umask(mode_t newmask); }
54 SYS_CHROOT = 61 // { int|sys||chroot(const char *path); }
55 SYS_VFORK = 66 // { int|sys||vfork(void); }
56 SYS_SBRK = 69 // { int|sys||sbrk(intptr_t incr); }
57 SYS_SSTK = 70 // { int|sys||sstk(int incr); }
58 SYS_VADVISE = 72 // { int|sys||ovadvise(int anom); }
59 SYS_MUNMAP = 73 // { int|sys||munmap(void *addr, size_t len); }
60 SYS_MPROTECT = 74 // { int|sys||mprotect(void *addr, size_t len, int prot); }
61 SYS_MADVISE = 75 // { int|sys||madvise(void *addr, size_t len, int behav); }
62 SYS_MINCORE = 78 // { int|sys||mincore(void *addr, size_t len, char *vec); }
63 SYS_GETGROUPS = 79 // { int|sys||getgroups(int gidsetsize, gid_t *gidset); }
64 SYS_SETGROUPS = 80 // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); }
65 SYS_GETPGRP = 81 // { int|sys||getpgrp(void); }
66 SYS_SETPGID = 82 // { int|sys||setpgid(pid_t pid, pid_t pgid); }
67 SYS_DUP2 = 90 // { int|sys||dup2(int from, int to); }
68 SYS_FCNTL = 92 // { int|sys||fcntl(int fd, int cmd, ... void *arg); }
69 SYS_FSYNC = 95 // { int|sys||fsync(int fd); }
70 SYS_SETPRIORITY = 96 // { int|sys||setpriority(int which, id_t who, int prio); }
71 SYS_CONNECT = 98 // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); }
72 SYS_GETPRIORITY = 100 // { int|sys||getpriority(int which, id_t who); }
73 SYS_BIND = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); }
74 SYS_SETSOCKOPT = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
75 SYS_LISTEN = 106 // { int|sys||listen(int s, int backlog); }
76 SYS_GETSOCKOPT = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
77 SYS_READV = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); }
78 SYS_WRITEV = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); }
79 SYS_FCHOWN = 123 // { int|sys||fchown(int fd, uid_t uid, gid_t gid); }
80 SYS_FCHMOD = 124 // { int|sys||fchmod(int fd, mode_t mode); }
81 SYS_SETREUID = 126 // { int|sys||setreuid(uid_t ruid, uid_t euid); }
82 SYS_SETREGID = 127 // { int|sys||setregid(gid_t rgid, gid_t egid); }
83 SYS_RENAME = 128 // { int|sys||rename(const char *from, const char *to); }
84 SYS_FLOCK = 131 // { int|sys||flock(int fd, int how); }
85 SYS_MKFIFO = 132 // { int|sys||mkfifo(const char *path, mode_t mode); }
86 SYS_SENDTO = 133 // { ssize_t|sys||sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
87 SYS_SHUTDOWN = 134 // { int|sys||shutdown(int s, int how); }
88 SYS_SOCKETPAIR = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); }
89 SYS_MKDIR = 136 // { int|sys||mkdir(const char *path, mode_t mode); }
90 SYS_RMDIR = 137 // { int|sys||rmdir(const char *path); }
91 SYS_SETSID = 147 // { int|sys||setsid(void); }
92 SYS_SYSARCH = 165 // { int|sys||sysarch(int op, void *parms); }
93 SYS_PREAD = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); }
94 SYS_PWRITE = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); }
95 SYS_NTP_ADJTIME = 176 // { int|sys||ntp_adjtime(struct timex *tp); }
96 SYS_SETGID = 181 // { int|sys||setgid(gid_t gid); }
97 SYS_SETEGID = 182 // { int|sys||setegid(gid_t egid); }
98 SYS_SETEUID = 183 // { int|sys||seteuid(uid_t euid); }
99 SYS_PATHCONF = 191 // { long|sys||pathconf(const char *path, int name); }
100 SYS_FPATHCONF = 192 // { long|sys||fpathconf(int fd, int name); }
101 SYS_GETRLIMIT = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); }
102 SYS_SETRLIMIT = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); }
103 SYS_MMAP = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); }
104 SYS_LSEEK = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); }
105 SYS_TRUNCATE = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); }
106 SYS_FTRUNCATE = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); }
107 SYS___SYSCTL = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); }
108 SYS_MLOCK = 203 // { int|sys||mlock(const void *addr, size_t len); }
109 SYS_MUNLOCK = 204 // { int|sys||munlock(const void *addr, size_t len); }
110 SYS_UNDELETE = 205 // { int|sys||undelete(const char *path); }
111 SYS_GETPGID = 207 // { pid_t|sys||getpgid(pid_t pid); }
112 SYS_REBOOT = 208 // { int|sys||reboot(int opt, char *bootstr); }
113 SYS_POLL = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); }
114 SYS_SEMGET = 221 // { int|sys||semget(key_t key, int nsems, int semflg); }
115 SYS_SEMOP = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); }
116 SYS_SEMCONFIG = 223 // { int|sys||semconfig(int flag); }
117 SYS_MSGGET = 225 // { int|sys||msgget(key_t key, int msgflg); }
118 SYS_MSGSND = 226 // { int|sys||msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
119 SYS_MSGRCV = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
120 SYS_SHMAT = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); }
121 SYS_SHMDT = 230 // { int|sys||shmdt(const void *shmaddr); }
122 SYS_SHMGET = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); }
123 SYS_TIMER_CREATE = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); }
124 SYS_TIMER_DELETE = 236 // { int|sys||timer_delete(timer_t timerid); }
125 SYS_TIMER_GETOVERRUN = 239 // { int|sys||timer_getoverrun(timer_t timerid); }
126 SYS_FDATASYNC = 241 // { int|sys||fdatasync(int fd); }
127 SYS_MLOCKALL = 242 // { int|sys||mlockall(int flags); }
128 SYS_MUNLOCKALL = 243 // { int|sys||munlockall(void); }
129 SYS_SIGQUEUEINFO = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); }
130 SYS_MODCTL = 246 // { int|sys||modctl(int cmd, void *arg); }
131 SYS___POSIX_RENAME = 270 // { int|sys||__posix_rename(const char *from, const char *to); }
132 SYS_SWAPCTL = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); }
133 SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); }
134 SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); }
135 SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); }
136 SYS_MSYNC = 277 // { int|sys|13|msync(void *addr, size_t len, int flags); }
137 SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); }
138 SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); }
139 SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); }
140 SYS_GETSID = 286 // { pid_t|sys||getsid(pid_t pid); }
141 SYS___CLONE = 287 // { pid_t|sys||__clone(int flags, void *stack); }
142 SYS_FKTRACE = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); }
143 SYS_PREADV = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }
144 SYS_PWRITEV = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }
145 SYS___GETCWD = 296 // { int|sys||__getcwd(char *bufp, size_t length); }
146 SYS_FCHROOT = 297 // { int|sys||fchroot(int fd); }
147 SYS_LCHFLAGS = 304 // { int|sys||lchflags(const char *path, u_long flags); }
148 SYS_ISSETUGID = 305 // { int|sys||issetugid(void); }
149 SYS_UTRACE = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); }
150 SYS_GETCONTEXT = 307 // { int|sys||getcontext(struct __ucontext *ucp); }
151 SYS_SETCONTEXT = 308 // { int|sys||setcontext(const struct __ucontext *ucp); }
152 SYS__LWP_CREATE = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); }
153 SYS__LWP_EXIT = 310 // { int|sys||_lwp_exit(void); }
154 SYS__LWP_SELF = 311 // { lwpid_t|sys||_lwp_self(void); }
155 SYS__LWP_WAIT = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); }
156 SYS__LWP_SUSPEND = 313 // { int|sys||_lwp_suspend(lwpid_t target); }
157 SYS__LWP_CONTINUE = 314 // { int|sys||_lwp_continue(lwpid_t target); }
158 SYS__LWP_WAKEUP = 315 // { int|sys||_lwp_wakeup(lwpid_t target); }
159 SYS__LWP_GETPRIVATE = 316 // { void *|sys||_lwp_getprivate(void); }
160 SYS__LWP_SETPRIVATE = 317 // { void|sys||_lwp_setprivate(void *ptr); }
161 SYS__LWP_KILL = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); }
162 SYS__LWP_DETACH = 319 // { int|sys||_lwp_detach(lwpid_t target); }
163 SYS__LWP_UNPARK = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); }
164 SYS__LWP_UNPARK_ALL = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); }
165 SYS__LWP_SETNAME = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); }
166 SYS__LWP_GETNAME = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); }
167 SYS__LWP_CTL = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); }
168 SYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); }
169 SYS_PMC_GET_INFO = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); }
170 SYS_PMC_CONTROL = 342 // { int|sys||pmc_control(int ctr, int op, void *args); }
171 SYS_RASCTL = 343 // { int|sys||rasctl(void *addr, size_t len, int op); }
172 SYS_KQUEUE = 344 // { int|sys||kqueue(void); }
173 SYS__SCHED_SETPARAM = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); }
174 SYS__SCHED_GETPARAM = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); }
175 SYS__SCHED_SETAFFINITY = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); }
176 SYS__SCHED_GETAFFINITY = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); }
177 SYS_SCHED_YIELD = 350 // { int|sys||sched_yield(void); }
178 SYS_FSYNC_RANGE = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); }
179 SYS_UUIDGEN = 355 // { int|sys||uuidgen(struct uuid *store, int count); }
180 SYS_GETVFSSTAT = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); }
181 SYS_STATVFS1 = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); }
182 SYS_FSTATVFS1 = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); }
183 SYS_EXTATTRCTL = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
184 SYS_EXTATTR_SET_FILE = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
185 SYS_EXTATTR_GET_FILE = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
186 SYS_EXTATTR_DELETE_FILE = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
187 SYS_EXTATTR_SET_FD = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
188 SYS_EXTATTR_GET_FD = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
189 SYS_EXTATTR_DELETE_FD = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
190 SYS_EXTATTR_SET_LINK = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
191 SYS_EXTATTR_GET_LINK = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
192 SYS_EXTATTR_DELETE_LINK = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }
193 SYS_EXTATTR_LIST_FD = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
194 SYS_EXTATTR_LIST_FILE = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }
195 SYS_EXTATTR_LIST_LINK = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }
196 SYS_SETXATTR = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); }
197 SYS_LSETXATTR = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); }
198 SYS_FSETXATTR = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); }
199 SYS_GETXATTR = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); }
200 SYS_LGETXATTR = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); }
201 SYS_FGETXATTR = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); }
202 SYS_LISTXATTR = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); }
203 SYS_LLISTXATTR = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); }
204 SYS_FLISTXATTR = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); }
205 SYS_REMOVEXATTR = 384 // { int|sys||removexattr(const char *path, const char *name); }
206 SYS_LREMOVEXATTR = 385 // { int|sys||lremovexattr(const char *path, const char *name); }
207 SYS_FREMOVEXATTR = 386 // { int|sys||fremovexattr(int fd, const char *name); }
208 SYS_GETDENTS = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); }
209 SYS_SOCKET = 394 // { int|sys|30|socket(int domain, int type, int protocol); }
210 SYS_GETFH = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); }
211 SYS_MOUNT = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); }
212 SYS_MREMAP = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); }
213 SYS_PSET_CREATE = 412 // { int|sys||pset_create(psetid_t *psid); }
214 SYS_PSET_DESTROY = 413 // { int|sys||pset_destroy(psetid_t psid); }
215 SYS_PSET_ASSIGN = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); }
216 SYS__PSET_BIND = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); }
217 SYS_POSIX_FADVISE = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); }
218 SYS_SELECT = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
219 SYS_GETTIMEOFDAY = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); }
220 SYS_SETTIMEOFDAY = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); }
221 SYS_UTIMES = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); }
222 SYS_ADJTIME = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); }
223 SYS_FUTIMES = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); }
224 SYS_LUTIMES = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); }
225 SYS_SETITIMER = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
226 SYS_GETITIMER = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); }
227 SYS_CLOCK_GETTIME = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); }
228 SYS_CLOCK_SETTIME = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); }
229 SYS_CLOCK_GETRES = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); }
230 SYS_NANOSLEEP = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
231 SYS___SIGTIMEDWAIT = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); }
232 SYS__LWP_PARK = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); }
233 SYS_KEVENT = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); }
234 SYS_PSELECT = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
235 SYS_POLLTS = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
236 SYS_STAT = 439 // { int|sys|50|stat(const char *path, struct stat *ub); }
237 SYS_FSTAT = 440 // { int|sys|50|fstat(int fd, struct stat *sb); }
238 SYS_LSTAT = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); }
239 SYS___SEMCTL = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); }
240 SYS_SHMCTL = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); }
241 SYS_MSGCTL = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); }
242 SYS_GETRUSAGE = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); }
243 SYS_TIMER_SETTIME = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }
244 SYS_TIMER_GETTIME = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); }
245 SYS_NTP_GETTIME = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); }
246 SYS_WAIT4 = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
247 SYS_MKNOD = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); }
248 SYS_FHSTAT = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); }
249 SYS_PIPE2 = 453 // { int|sys||pipe2(int *fildes, int flags); }
250 SYS_DUP3 = 454 // { int|sys||dup3(int from, int to, int flags); }
251 SYS_KQUEUE1 = 455 // { int|sys||kqueue1(int flags); }
252 SYS_PACCEPT = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); }
253 SYS_LINKAT = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); }
254 SYS_RENAMEAT = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); }
255 SYS_MKFIFOAT = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); }
256 SYS_MKNODAT = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); }
257 SYS_MKDIRAT = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); }
258 SYS_FACCESSAT = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); }
259 SYS_FCHMODAT = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); }
260 SYS_FCHOWNAT = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); }
261 SYS_FEXECVE = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); }
262 SYS_FSTATAT = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); }
263 SYS_UTIMENSAT = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); }
264 SYS_OPENAT = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); }
265 SYS_READLINKAT = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); }
266 SYS_SYMLINKAT = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); }
267 SYS_UNLINKAT = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); }
268 SYS_FUTIMENS = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); }
269 SYS___QUOTACTL = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); }
270 SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); }
271 SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); }
272 SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); }
273 )
0 // mksysnum_openbsd.pl
1 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
0 // go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build 386,openbsd
44
88 SYS_EXIT = 1 // { void sys_exit(int rval); }
99 SYS_FORK = 2 // { int sys_fork(void); }
1010 SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
11 SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \
12 SYS_OPEN = 5 // { int sys_open(const char *path, \
11 SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }
12 SYS_OPEN = 5 // { int sys_open(const char *path, int flags, ... mode_t mode); }
1313 SYS_CLOSE = 6 // { int sys_close(int fd); }
14 SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \
14 SYS_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); }
15 SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); }
1516 SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
1617 SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
17 SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \
18 SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
1819 SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
1920 SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
20 SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \
21 SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }
2122 SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
22 SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \
23 SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, gid_t gid); }
2324 SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
2425 SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
25 SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \
26 SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); }
2627 SYS_GETPID = 20 // { pid_t sys_getpid(void); }
27 SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \
28 SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); }
2829 SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
2930 SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
3031 SYS_GETUID = 24 // { uid_t sys_getuid(void); }
3132 SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
32 SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \
33 SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \
34 SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, \
35 SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \
36 SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, \
37 SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, \
38 SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, \
39 SYS_ACCESS = 33 // { int sys_access(const char *path, int flags); }
33 SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }
34 SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }
35 SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }
36 SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
37 SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }
38 SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
39 SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
40 SYS_ACCESS = 33 // { int sys_access(const char *path, int amode); }
4041 SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
4142 SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
4243 SYS_SYNC = 36 // { void sys_sync(void); }
43 SYS_KILL = 37 // { int sys_kill(int pid, int signum); }
4444 SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
4545 SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
4646 SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
4747 SYS_DUP = 41 // { int sys_dup(int fd); }
48 SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \
48 SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }
4949 SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
50 SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \
51 SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \
52 SYS_SIGACTION = 46 // { int sys_sigaction(int signum, \
50 SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }
51 SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }
52 SYS_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }
5353 SYS_GETGID = 47 // { gid_t sys_getgid(void); }
5454 SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
55 SYS_GETLOGIN = 49 // { int sys_getlogin(char *namebuf, u_int namelen); }
5655 SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
5756 SYS_ACCT = 51 // { int sys_acct(const char *path); }
5857 SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
5958 SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
60 SYS_IOCTL = 54 // { int sys_ioctl(int fd, \
59 SYS_IOCTL = 54 // { int sys_ioctl(int fd, u_long com, ... void *data); }
6160 SYS_REBOOT = 55 // { int sys_reboot(int opt); }
6261 SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
63 SYS_SYMLINK = 57 // { int sys_symlink(const char *path, \
64 SYS_READLINK = 58 // { int sys_readlink(const char *path, char *buf, \
65 SYS_EXECVE = 59 // { int sys_execve(const char *path, \
62 SYS_SYMLINK = 57 // { int sys_symlink(const char *path, const char *link); }
63 SYS_READLINK = 58 // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }
64 SYS_EXECVE = 59 // { int sys_execve(const char *path, char * const *argp, char * const *envp); }
6665 SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
6766 SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
68 SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \
69 SYS_STATFS = 63 // { int sys_statfs(const char *path, \
67 SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }
68 SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); }
7069 SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
71 SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \
70 SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }
7271 SYS_VFORK = 66 // { int sys_vfork(void); }
73 SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \
74 SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \
75 SYS_SETITIMER = 69 // { int sys_setitimer(int which, \
76 SYS_GETITIMER = 70 // { int sys_getitimer(int which, \
77 SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \
78 SYS_KEVENT = 72 // { int sys_kevent(int fd, \
72 SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }
73 SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }
74 SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
75 SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); }
76 SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
77 SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
7978 SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
80 SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \
81 SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \
82 SYS_UTIMES = 76 // { int sys_utimes(const char *path, \
83 SYS_FUTIMES = 77 // { int sys_futimes(int fd, \
84 SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \
85 SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \
86 SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \
79 SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, int prot); }
80 SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, int behav); }
81 SYS_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); }
82 SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); }
83 SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, char *vec); }
84 SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, gid_t *gidset); }
85 SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }
8786 SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
88 SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, int pgid); }
89 SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \
90 SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \
91 SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \
92 SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \
93 SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \
87 SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, pid_t pgid); }
88 SYS_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }
89 SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }
90 SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); }
91 SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }
92 SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }
93 SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }
94 SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }
9495 SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
95 SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \
96 SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
9697 SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
97 SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \
98 SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }
99 SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }
98100 SYS_FSYNC = 95 // { int sys_fsync(int fd); }
99101 SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
100102 SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
101 SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \
103 SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }
102104 SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
103105 SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
106 SYS_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); }
107 SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); }
104108 SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
105 SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \
106 SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \
109 SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }
110 SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
107111 SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
108 SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \
109 SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \
112 SYS_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }
113 SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); }
114 SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
115 SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
110116 SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
111 SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \
112 SYS_READV = 120 // { ssize_t sys_readv(int fd, \
113 SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \
117 SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }
118 SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); }
119 SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
120 SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }
121 SYS_READV = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }
122 SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }
123 SYS_KILL = 122 // { int sys_kill(int pid, int signum); }
114124 SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
115125 SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
116126 SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
118128 SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
119129 SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
120130 SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
121 SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, \
131 SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
122132 SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
123 SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \
133 SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }
124134 SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
125135 SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
126 SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \
136 SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }
137 SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }
127138 SYS_SETSID = 147 // { int sys_setsid(void); }
128 SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \
139 SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }
129140 SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
130141 SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
131142 SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
132 SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, \
133 SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, \
143 SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }
144 SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }
134145 SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
135146 SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
136147 SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
137148 SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
138149 SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
139150 SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
140 SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, \
141 SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, \
142 SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, \
143 SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \
144 SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \
151 SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }
152 SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }
153 SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
154 SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }
155 SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, off_t length); }
145156 SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
146 SYS___SYSCTL = 202 // { int sys___sysctl(const int *name, u_int namelen, \
157 SYS_SYSCTL = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
147158 SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
148159 SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
149160 SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
150 SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \
161 SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }
151162 SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
152163 SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
153 SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \
154 SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
155 SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \
164 SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
165 SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
166 SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }
156167 SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
157 SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \
158 SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \
168 SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }
169 SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }
159170 SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
160171 SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
161172 SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
162173 SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
163174 SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
164175 SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
165 SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \
166 SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \
176 SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
177 SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
167178 SYS_KQUEUE = 269 // { int sys_kqueue(void); }
168179 SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
169180 SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
170 SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \
171 SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, \
172 SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, \
173 SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, \
174 SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, \
181 SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
182 SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }
183 SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
184 SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
185 SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
175186 SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
176 SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \
187 SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }
177188 SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
178 SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \
179 SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \
180 SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \
181 SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \
182 SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \
189 SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }
190 SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }
191 SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }
192 SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }
193 SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }
183194 SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
184195 SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
185 SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \
196 SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }
186197 SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
187 SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \
198 SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }
188199 SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
189 SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \
200 SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }
190201 SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
191202 SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
192 SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \
193 SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \
194 SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \
195 SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \
196 SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \
197 SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \
198 SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, \
199 SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, \
200 SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, \
201 SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \
202 SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \
203 SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \
203 SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }
204 SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }
205 SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }
206 SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }
207 SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }
208 SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }
209 SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }
210 SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }
211 SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }
212 SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }
213 SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }
214 SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }
204215 SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
205216 SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
206217 )
0 // mksysnum_openbsd.pl
1 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
0 // go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build amd64,openbsd
44
88 SYS_EXIT = 1 // { void sys_exit(int rval); }
99 SYS_FORK = 2 // { int sys_fork(void); }
1010 SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
11 SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \
12 SYS_OPEN = 5 // { int sys_open(const char *path, \
11 SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }
12 SYS_OPEN = 5 // { int sys_open(const char *path, int flags, ... mode_t mode); }
1313 SYS_CLOSE = 6 // { int sys_close(int fd); }
14 SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \
14 SYS_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); }
15 SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); }
1516 SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
1617 SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
17 SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \
18 SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
1819 SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
1920 SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
20 SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \
21 SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }
2122 SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
22 SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \
23 SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, gid_t gid); }
2324 SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
2425 SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
25 SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \
26 SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); }
2627 SYS_GETPID = 20 // { pid_t sys_getpid(void); }
27 SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \
28 SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); }
2829 SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
2930 SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
3031 SYS_GETUID = 24 // { uid_t sys_getuid(void); }
3132 SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
32 SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \
33 SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \
34 SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, \
35 SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \
36 SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, \
37 SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, \
38 SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, \
39 SYS_ACCESS = 33 // { int sys_access(const char *path, int flags); }
33 SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }
34 SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }
35 SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }
36 SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
37 SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }
38 SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
39 SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
40 SYS_ACCESS = 33 // { int sys_access(const char *path, int amode); }
4041 SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
4142 SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
4243 SYS_SYNC = 36 // { void sys_sync(void); }
43 SYS_KILL = 37 // { int sys_kill(int pid, int signum); }
4444 SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
4545 SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
4646 SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
4747 SYS_DUP = 41 // { int sys_dup(int fd); }
48 SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \
48 SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }
4949 SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
50 SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \
51 SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \
52 SYS_SIGACTION = 46 // { int sys_sigaction(int signum, \
50 SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }
51 SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }
52 SYS_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }
5353 SYS_GETGID = 47 // { gid_t sys_getgid(void); }
5454 SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
55 SYS_GETLOGIN = 49 // { int sys_getlogin(char *namebuf, u_int namelen); }
5655 SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
5756 SYS_ACCT = 51 // { int sys_acct(const char *path); }
5857 SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
5958 SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
60 SYS_IOCTL = 54 // { int sys_ioctl(int fd, \
59 SYS_IOCTL = 54 // { int sys_ioctl(int fd, u_long com, ... void *data); }
6160 SYS_REBOOT = 55 // { int sys_reboot(int opt); }
6261 SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
63 SYS_SYMLINK = 57 // { int sys_symlink(const char *path, \
64 SYS_READLINK = 58 // { int sys_readlink(const char *path, char *buf, \
65 SYS_EXECVE = 59 // { int sys_execve(const char *path, \
62 SYS_SYMLINK = 57 // { int sys_symlink(const char *path, const char *link); }
63 SYS_READLINK = 58 // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }
64 SYS_EXECVE = 59 // { int sys_execve(const char *path, char * const *argp, char * const *envp); }
6665 SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
6766 SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
68 SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \
69 SYS_STATFS = 63 // { int sys_statfs(const char *path, \
67 SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }
68 SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); }
7069 SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
71 SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \
70 SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }
7271 SYS_VFORK = 66 // { int sys_vfork(void); }
73 SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \
74 SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \
75 SYS_SETITIMER = 69 // { int sys_setitimer(int which, \
76 SYS_GETITIMER = 70 // { int sys_getitimer(int which, \
77 SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \
78 SYS_KEVENT = 72 // { int sys_kevent(int fd, \
72 SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }
73 SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }
74 SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
75 SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); }
76 SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
77 SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
7978 SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
80 SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \
81 SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \
82 SYS_UTIMES = 76 // { int sys_utimes(const char *path, \
83 SYS_FUTIMES = 77 // { int sys_futimes(int fd, \
84 SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \
85 SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \
86 SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \
79 SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, int prot); }
80 SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, int behav); }
81 SYS_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); }
82 SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); }
83 SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, char *vec); }
84 SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, gid_t *gidset); }
85 SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }
8786 SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
88 SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, int pgid); }
89 SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \
90 SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \
91 SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \
92 SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \
93 SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \
87 SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, pid_t pgid); }
88 SYS_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }
89 SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }
90 SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); }
91 SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }
92 SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }
93 SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }
94 SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }
9495 SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
95 SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \
96 SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
9697 SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
97 SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \
98 SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }
99 SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }
98100 SYS_FSYNC = 95 // { int sys_fsync(int fd); }
99101 SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
100102 SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
101 SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \
103 SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }
102104 SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
103105 SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
106 SYS_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); }
107 SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); }
104108 SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
105 SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \
106 SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \
109 SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }
110 SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
107111 SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
108 SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \
109 SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \
112 SYS_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }
113 SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); }
114 SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
115 SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
110116 SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
111 SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \
112 SYS_READV = 120 // { ssize_t sys_readv(int fd, \
113 SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \
117 SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }
118 SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); }
119 SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
120 SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }
121 SYS_READV = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }
122 SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }
123 SYS_KILL = 122 // { int sys_kill(int pid, int signum); }
114124 SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
115125 SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
116126 SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
118128 SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
119129 SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
120130 SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
121 SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, \
131 SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
122132 SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
123 SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \
133 SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }
124134 SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
125135 SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
126 SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \
136 SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }
137 SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }
127138 SYS_SETSID = 147 // { int sys_setsid(void); }
128 SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \
139 SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }
129140 SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
130141 SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
131142 SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
132 SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, \
133 SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, \
143 SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }
144 SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }
134145 SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
135146 SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
136147 SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
137148 SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
138149 SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
139150 SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
140 SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, \
141 SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, \
142 SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, \
143 SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \
144 SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \
151 SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }
152 SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }
153 SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
154 SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }
155 SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, off_t length); }
145156 SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
146 SYS___SYSCTL = 202 // { int sys___sysctl(const int *name, u_int namelen, \
157 SYS_SYSCTL = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
147158 SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
148159 SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
149160 SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
150 SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \
161 SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }
151162 SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
152163 SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
153 SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \
154 SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
155 SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \
164 SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
165 SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
166 SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }
156167 SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
157 SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \
158 SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \
168 SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }
169 SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }
159170 SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
160171 SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
161172 SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
162173 SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
163174 SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
164175 SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
165 SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \
166 SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \
176 SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
177 SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
167178 SYS_KQUEUE = 269 // { int sys_kqueue(void); }
168179 SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
169180 SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
170 SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \
171 SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, \
172 SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, \
173 SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, \
174 SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, \
181 SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
182 SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }
183 SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
184 SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
185 SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
175186 SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
176 SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \
187 SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }
177188 SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
178 SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \
179 SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \
180 SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \
181 SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \
182 SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \
189 SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }
190 SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }
191 SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }
192 SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }
193 SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }
183194 SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
184195 SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
185 SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \
196 SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }
186197 SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
187 SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \
198 SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }
188199 SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
189 SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \
200 SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }
190201 SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
191202 SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
192 SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \
193 SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \
194 SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \
195 SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \
196 SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \
197 SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \
198 SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, \
199 SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, \
200 SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, \
201 SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \
202 SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \
203 SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \
203 SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }
204 SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }
205 SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }
206 SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }
207 SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }
208 SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }
209 SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }
210 SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }
211 SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }
212 SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }
213 SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }
214 SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }
204215 SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
205216 SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
206217 )
0 // mksysnum_openbsd.pl
1 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
0 // go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build arm,openbsd
44
88 SYS_EXIT = 1 // { void sys_exit(int rval); }
99 SYS_FORK = 2 // { int sys_fork(void); }
1010 SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
11 SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \
12 SYS_OPEN = 5 // { int sys_open(const char *path, \
11 SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }
12 SYS_OPEN = 5 // { int sys_open(const char *path, int flags, ... mode_t mode); }
1313 SYS_CLOSE = 6 // { int sys_close(int fd); }
1414 SYS_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); }
15 SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \
15 SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); }
1616 SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
1717 SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
18 SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \
18 SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
1919 SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
2020 SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
21 SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \
21 SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }
2222 SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
23 SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \
23 SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, gid_t gid); }
2424 SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
2525 SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
26 SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \
26 SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); }
2727 SYS_GETPID = 20 // { pid_t sys_getpid(void); }
28 SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \
28 SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); }
2929 SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
3030 SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
3131 SYS_GETUID = 24 // { uid_t sys_getuid(void); }
3232 SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
33 SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \
34 SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \
35 SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, \
36 SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \
37 SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, \
38 SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, \
39 SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, \
33 SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }
34 SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }
35 SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }
36 SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
37 SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }
38 SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
39 SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
4040 SYS_ACCESS = 33 // { int sys_access(const char *path, int amode); }
4141 SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
4242 SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
4545 SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
4646 SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
4747 SYS_DUP = 41 // { int sys_dup(int fd); }
48 SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \
48 SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }
4949 SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
50 SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \
51 SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \
52 SYS_SIGACTION = 46 // { int sys_sigaction(int signum, \
50 SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }
51 SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }
52 SYS_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }
5353 SYS_GETGID = 47 // { gid_t sys_getgid(void); }
5454 SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
55 SYS_GETLOGIN = 49 // { int sys_getlogin(char *namebuf, u_int namelen); }
5655 SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
5756 SYS_ACCT = 51 // { int sys_acct(const char *path); }
5857 SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
5958 SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
60 SYS_IOCTL = 54 // { int sys_ioctl(int fd, \
59 SYS_IOCTL = 54 // { int sys_ioctl(int fd, u_long com, ... void *data); }
6160 SYS_REBOOT = 55 // { int sys_reboot(int opt); }
6261 SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
63 SYS_SYMLINK = 57 // { int sys_symlink(const char *path, \
64 SYS_READLINK = 58 // { ssize_t sys_readlink(const char *path, \
65 SYS_EXECVE = 59 // { int sys_execve(const char *path, \
62 SYS_SYMLINK = 57 // { int sys_symlink(const char *path, const char *link); }
63 SYS_READLINK = 58 // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }
64 SYS_EXECVE = 59 // { int sys_execve(const char *path, char * const *argp, char * const *envp); }
6665 SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
6766 SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
68 SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \
69 SYS_STATFS = 63 // { int sys_statfs(const char *path, \
67 SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }
68 SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); }
7069 SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
71 SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \
70 SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }
7271 SYS_VFORK = 66 // { int sys_vfork(void); }
73 SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \
74 SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \
75 SYS_SETITIMER = 69 // { int sys_setitimer(int which, \
76 SYS_GETITIMER = 70 // { int sys_getitimer(int which, \
77 SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \
78 SYS_KEVENT = 72 // { int sys_kevent(int fd, \
72 SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }
73 SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }
74 SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
75 SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); }
76 SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
77 SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
7978 SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
80 SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \
81 SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \
82 SYS_UTIMES = 76 // { int sys_utimes(const char *path, \
83 SYS_FUTIMES = 77 // { int sys_futimes(int fd, \
84 SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \
85 SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \
86 SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \
79 SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, int prot); }
80 SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, int behav); }
81 SYS_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); }
82 SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); }
83 SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, char *vec); }
84 SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, gid_t *gidset); }
85 SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }
8786 SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
8887 SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, pid_t pgid); }
89 SYS_SENDSYSLOG = 83 // { int sys_sendsyslog(const void *buf, size_t nbyte); }
90 SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \
91 SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \
92 SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \
93 SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \
94 SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \
88 SYS_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }
89 SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }
90 SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); }
91 SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }
92 SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }
93 SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }
94 SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }
9595 SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
96 SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \
96 SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
9797 SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
98 SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, \
99 SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \
98 SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }
99 SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }
100100 SYS_FSYNC = 95 // { int sys_fsync(int fd); }
101101 SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
102102 SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
103 SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \
103 SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }
104104 SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
105105 SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
106106 SYS_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); }
107107 SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); }
108108 SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
109 SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \
110 SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \
109 SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }
110 SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
111111 SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
112 SYS_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, \
113 SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \
114 SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \
112 SYS_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }
113 SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); }
114 SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
115 SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
115116 SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
116 SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \
117 SYS_READV = 120 // { ssize_t sys_readv(int fd, \
118 SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \
117 SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }
118 SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); }
119 SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
120 SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }
121 SYS_READV = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }
122 SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }
119123 SYS_KILL = 122 // { int sys_kill(int pid, int signum); }
120124 SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
121125 SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
124128 SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
125129 SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
126130 SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
127 SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, \
131 SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
128132 SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
129 SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \
133 SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }
130134 SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
131135 SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
132 SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \
136 SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }
137 SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }
133138 SYS_SETSID = 147 // { int sys_setsid(void); }
134 SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \
139 SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }
135140 SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
136141 SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
137142 SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
138 SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, \
139 SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, \
143 SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }
144 SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }
140145 SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
141146 SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
142147 SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
143148 SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
144149 SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
145150 SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
146 SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, \
147 SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, \
148 SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, \
149 SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \
150 SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \
151 SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }
152 SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }
153 SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
154 SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }
155 SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, off_t length); }
151156 SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
152 SYS___SYSCTL = 202 // { int sys___sysctl(const int *name, u_int namelen, \
157 SYS_SYSCTL = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
153158 SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
154159 SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
155160 SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
156 SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \
161 SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }
157162 SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
158163 SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
159 SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \
160 SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
161 SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \
164 SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
165 SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
166 SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }
162167 SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
163 SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \
164 SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \
168 SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }
169 SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }
165170 SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
166171 SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
167172 SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
168173 SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
169174 SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
170175 SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
171 SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \
172 SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \
176 SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
177 SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
173178 SYS_KQUEUE = 269 // { int sys_kqueue(void); }
174179 SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
175180 SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
176 SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \
177 SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, \
178 SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, \
179 SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, \
180 SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, \
181 SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
182 SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }
183 SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
184 SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
185 SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
181186 SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
182 SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \
187 SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }
183188 SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
184 SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \
185 SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \
186 SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \
187 SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \
188 SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \
189 SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }
190 SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }
191 SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }
192 SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }
193 SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }
189194 SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
190195 SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
191 SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \
196 SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }
192197 SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
193 SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \
198 SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }
194199 SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
195 SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \
200 SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }
196201 SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
197202 SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
198 SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \
199 SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \
200 SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \
201 SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \
202 SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \
203 SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \
204 SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, \
205 SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, \
206 SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, \
207 SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \
208 SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \
209 SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \
203 SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }
204 SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }
205 SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }
206 SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }
207 SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }
208 SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }
209 SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }
210 SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }
211 SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }
212 SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }
213 SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }
214 SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }
210215 SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
211216 SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
212217 )
+0
-13
vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go less more
0 // Copyright 2014 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build amd64,solaris
5
6 package unix
7
8 // TODO(aram): remove these before Go 1.3.
9 const (
10 SYS_EXECVE = 59
11 SYS_FCNTL = 62
12 )
0 // cgo -godefs types_aix.go | go run mkpost.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build ppc,aix
4
5 package unix
6
7 const (
8 SizeofPtr = 0x4
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x4
12 SizeofLongLong = 0x8
13 PathMax = 0x3ff
14 )
15
16 type (
17 _C_short int16
18 _C_int int32
19 _C_long int32
20 _C_long_long int64
21 )
22
23 type off64 int64
24 type off int32
25 type Mode_t uint32
26
27 type Timespec struct {
28 Sec int32
29 Nsec int32
30 }
31
32 type StTimespec struct {
33 Sec int32
34 Nsec int32
35 }
36
37 type Timeval struct {
38 Sec int32
39 Usec int32
40 }
41
42 type Timeval32 struct {
43 Sec int32
44 Usec int32
45 }
46
47 type Timex struct{}
48
49 type Time_t int32
50
51 type Tms struct{}
52
53 type Utimbuf struct {
54 Actime int32
55 Modtime int32
56 }
57
58 type Timezone struct {
59 Minuteswest int32
60 Dsttime int32
61 }
62
63 type Rusage struct {
64 Utime Timeval
65 Stime Timeval
66 Maxrss int32
67 Ixrss int32
68 Idrss int32
69 Isrss int32
70 Minflt int32
71 Majflt int32
72 Nswap int32
73 Inblock int32
74 Oublock int32
75 Msgsnd int32
76 Msgrcv int32
77 Nsignals int32
78 Nvcsw int32
79 Nivcsw int32
80 }
81
82 type Rlimit struct {
83 Cur uint64
84 Max uint64
85 }
86
87 type Pid_t int32
88
89 type _Gid_t uint32
90
91 type dev_t uint32
92
93 type Stat_t struct {
94 Dev uint32
95 Ino uint32
96 Mode uint32
97 Nlink int16
98 Flag uint16
99 Uid uint32
100 Gid uint32
101 Rdev uint32
102 Size int32
103 Atim StTimespec
104 Mtim StTimespec
105 Ctim StTimespec
106 Blksize int32
107 Blocks int32
108 Vfstype int32
109 Vfs uint32
110 Type uint32
111 Gen uint32
112 Reserved [9]uint32
113 }
114
115 type StatxTimestamp struct{}
116
117 type Statx_t struct{}
118
119 type Dirent struct {
120 Offset uint32
121 Ino uint32
122 Reclen uint16
123 Namlen uint16
124 Name [256]uint8
125 }
126
127 type RawSockaddrInet4 struct {
128 Len uint8
129 Family uint8
130 Port uint16
131 Addr [4]byte /* in_addr */
132 Zero [8]uint8
133 }
134
135 type RawSockaddrInet6 struct {
136 Len uint8
137 Family uint8
138 Port uint16
139 Flowinfo uint32
140 Addr [16]byte /* in6_addr */
141 Scope_id uint32
142 }
143
144 type RawSockaddrUnix struct {
145 Len uint8
146 Family uint8
147 Path [1023]uint8
148 }
149
150 type RawSockaddr struct {
151 Len uint8
152 Family uint8
153 Data [14]uint8
154 }
155
156 type RawSockaddrAny struct {
157 Addr RawSockaddr
158 Pad [1012]uint8
159 }
160
161 type _Socklen uint32
162
163 type Cmsghdr struct {
164 Len uint32
165 Level int32
166 Type int32
167 }
168
169 type ICMPv6Filter struct {
170 Filt [8]uint32
171 }
172
173 type Iovec struct {
174 Base *byte
175 Len uint32
176 }
177
178 type IPMreq struct {
179 Multiaddr [4]byte /* in_addr */
180 Interface [4]byte /* in_addr */
181 }
182
183 type IPv6Mreq struct {
184 Multiaddr [16]byte /* in6_addr */
185 Interface uint32
186 }
187
188 type IPv6MTUInfo struct {
189 Addr RawSockaddrInet6
190 Mtu uint32
191 }
192
193 type Linger struct {
194 Onoff int32
195 Linger int32
196 }
197
198 type Msghdr struct {
199 Name *byte
200 Namelen uint32
201 Iov *Iovec
202 Iovlen int32
203 Control *byte
204 Controllen uint32
205 Flags int32
206 }
207
208 const (
209 SizeofSockaddrInet4 = 0x10
210 SizeofSockaddrInet6 = 0x1c
211 SizeofSockaddrAny = 0x404
212 SizeofSockaddrUnix = 0x401
213 SizeofLinger = 0x8
214 SizeofIPMreq = 0x8
215 SizeofIPv6Mreq = 0x14
216 SizeofIPv6MTUInfo = 0x20
217 SizeofMsghdr = 0x1c
218 SizeofCmsghdr = 0xc
219 SizeofICMPv6Filter = 0x20
220 )
221
222 const (
223 SizeofIfMsghdr = 0x10
224 )
225
226 type IfMsgHdr struct {
227 Msglen uint16
228 Version uint8
229 Type uint8
230 Addrs int32
231 Flags int32
232 Index uint16
233 Addrlen uint8
234 _ [1]byte
235 }
236
237 type FdSet struct {
238 Bits [2048]int32
239 }
240
241 type Utsname struct {
242 Sysname [32]byte
243 Nodename [32]byte
244 Release [32]byte
245 Version [32]byte
246 Machine [32]byte
247 }
248
249 type Ustat_t struct{}
250
251 type Sigset_t struct {
252 Losigs uint32
253 Hisigs uint32
254 }
255
256 const (
257 AT_FDCWD = -0x2
258 AT_REMOVEDIR = 0x1
259 AT_SYMLINK_NOFOLLOW = 0x1
260 )
261
262 type Termios struct {
263 Iflag uint32
264 Oflag uint32
265 Cflag uint32
266 Lflag uint32
267 Cc [16]uint8
268 }
269
270 type Termio struct {
271 Iflag uint16
272 Oflag uint16
273 Cflag uint16
274 Lflag uint16
275 Line uint8
276 Cc [8]uint8
277 _ [1]byte
278 }
279
280 type Winsize struct {
281 Row uint16
282 Col uint16
283 Xpixel uint16
284 Ypixel uint16
285 }
286
287 type PollFd struct {
288 Fd int32
289 Events uint16
290 Revents uint16
291 }
292
293 const (
294 POLLERR = 0x4000
295 POLLHUP = 0x2000
296 POLLIN = 0x1
297 POLLNVAL = 0x8000
298 POLLOUT = 0x2
299 POLLPRI = 0x4
300 POLLRDBAND = 0x20
301 POLLRDNORM = 0x10
302 POLLWRBAND = 0x40
303 POLLWRNORM = 0x2
304 )
305
306 type Flock_t struct {
307 Type int16
308 Whence int16
309 Sysid uint32
310 Pid int32
311 Vfs int32
312 Start int64
313 Len int64
314 }
315
316 type Fsid_t struct {
317 Val [2]uint32
318 }
319 type Fsid64_t struct {
320 Val [2]uint64
321 }
322
323 type Statfs_t struct {
324 Version int32
325 Type int32
326 Bsize uint32
327 Blocks uint32
328 Bfree uint32
329 Bavail uint32
330 Files uint32
331 Ffree uint32
332 Fsid Fsid_t
333 Vfstype int32
334 Fsize uint32
335 Vfsnumber int32
336 Vfsoff int32
337 Vfslen int32
338 Vfsvers int32
339 Fname [32]uint8
340 Fpack [32]uint8
341 Name_max int32
342 }
343
344 const RNDGETENTCNT = 0x80045200
0 // cgo -godefs types_aix.go | go run mkpost.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build ppc64,aix
4
5 package unix
6
7 const (
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
13 PathMax = 0x3ff
14 )
15
16 type (
17 _C_short int16
18 _C_int int32
19 _C_long int64
20 _C_long_long int64
21 )
22
23 type off64 int64
24 type off int64
25 type Mode_t uint32
26
27 type Timespec struct {
28 Sec int64
29 Nsec int64
30 }
31
32 type StTimespec struct {
33 Sec int64
34 Nsec int32
35 _ [4]byte
36 }
37
38 type Timeval struct {
39 Sec int64
40 Usec int32
41 _ [4]byte
42 }
43
44 type Timeval32 struct {
45 Sec int32
46 Usec int32
47 }
48
49 type Timex struct{}
50
51 type Time_t int64
52
53 type Tms struct{}
54
55 type Utimbuf struct {
56 Actime int64
57 Modtime int64
58 }
59
60 type Timezone struct {
61 Minuteswest int32
62 Dsttime int32
63 }
64
65 type Rusage struct {
66 Utime Timeval
67 Stime Timeval
68 Maxrss int64
69 Ixrss int64
70 Idrss int64
71 Isrss int64
72 Minflt int64
73 Majflt int64
74 Nswap int64
75 Inblock int64
76 Oublock int64
77 Msgsnd int64
78 Msgrcv int64
79 Nsignals int64
80 Nvcsw int64
81 Nivcsw int64
82 }
83
84 type Rlimit struct {
85 Cur uint64
86 Max uint64
87 }
88
89 type Pid_t int32
90
91 type _Gid_t uint32
92
93 type dev_t uint64
94
95 type Stat_t struct {
96 Dev uint64
97 Ino uint64
98 Mode uint32
99 Nlink int16
100 Flag uint16
101 Uid uint32
102 Gid uint32
103 Rdev uint64
104 Ssize int32
105 _ [4]byte
106 Atim StTimespec
107 Mtim StTimespec
108 Ctim StTimespec
109 Blksize int64
110 Blocks int64
111 Vfstype int32
112 Vfs uint32
113 Type uint32
114 Gen uint32
115 Reserved [9]uint32
116 Padto_ll uint32
117 Size int64
118 }
119
120 type StatxTimestamp struct{}
121
122 type Statx_t struct{}
123
124 type Dirent struct {
125 Offset uint64
126 Ino uint64
127 Reclen uint16
128 Namlen uint16
129 Name [256]uint8
130 _ [4]byte
131 }
132
133 type RawSockaddrInet4 struct {
134 Len uint8
135 Family uint8
136 Port uint16
137 Addr [4]byte /* in_addr */
138 Zero [8]uint8
139 }
140
141 type RawSockaddrInet6 struct {
142 Len uint8
143 Family uint8
144 Port uint16
145 Flowinfo uint32
146 Addr [16]byte /* in6_addr */
147 Scope_id uint32
148 }
149
150 type RawSockaddrUnix struct {
151 Len uint8
152 Family uint8
153 Path [1023]uint8
154 }
155
156 type RawSockaddr struct {
157 Len uint8
158 Family uint8
159 Data [14]uint8
160 }
161
162 type RawSockaddrAny struct {
163 Addr RawSockaddr
164 Pad [1012]uint8
165 }
166
167 type _Socklen uint32
168
169 type Cmsghdr struct {
170 Len uint32
171 Level int32
172 Type int32
173 }
174
175 type ICMPv6Filter struct {
176 Filt [8]uint32
177 }
178
179 type Iovec struct {
180 Base *byte
181 Len uint64
182 }
183
184 type IPMreq struct {
185 Multiaddr [4]byte /* in_addr */
186 Interface [4]byte /* in_addr */
187 }
188
189 type IPv6Mreq struct {
190 Multiaddr [16]byte /* in6_addr */
191 Interface uint32
192 }
193
194 type IPv6MTUInfo struct {
195 Addr RawSockaddrInet6
196 Mtu uint32
197 }
198
199 type Linger struct {
200 Onoff int32
201 Linger int32
202 }
203
204 type Msghdr struct {
205 Name *byte
206 Namelen uint32
207 _ [4]byte
208 Iov *Iovec
209 Iovlen int32
210 _ [4]byte
211 Control *byte
212 Controllen uint32
213 Flags int32
214 }
215
216 const (
217 SizeofSockaddrInet4 = 0x10
218 SizeofSockaddrInet6 = 0x1c
219 SizeofSockaddrAny = 0x404
220 SizeofSockaddrUnix = 0x401
221 SizeofLinger = 0x8
222 SizeofIPMreq = 0x8
223 SizeofIPv6Mreq = 0x14
224 SizeofIPv6MTUInfo = 0x20
225 SizeofMsghdr = 0x30
226 SizeofCmsghdr = 0xc
227 SizeofICMPv6Filter = 0x20
228 )
229
230 const (
231 SizeofIfMsghdr = 0x10
232 )
233
234 type IfMsgHdr struct {
235 Msglen uint16
236 Version uint8
237 Type uint8
238 Addrs int32
239 Flags int32
240 Index uint16
241 Addrlen uint8
242 _ [1]byte
243 }
244
245 type FdSet struct {
246 Bits [1024]int64
247 }
248
249 type Utsname struct {
250 Sysname [32]byte
251 Nodename [32]byte
252 Release [32]byte
253 Version [32]byte
254 Machine [32]byte
255 }
256
257 type Ustat_t struct{}
258
259 type Sigset_t struct {
260 Set [4]uint64
261 }
262
263 const (
264 AT_FDCWD = -0x2
265 AT_REMOVEDIR = 0x1
266 AT_SYMLINK_NOFOLLOW = 0x1
267 )
268
269 type Termios struct {
270 Iflag uint32
271 Oflag uint32
272 Cflag uint32
273 Lflag uint32
274 Cc [16]uint8
275 }
276
277 type Termio struct {
278 Iflag uint16
279 Oflag uint16
280 Cflag uint16
281 Lflag uint16
282 Line uint8
283 Cc [8]uint8
284 _ [1]byte
285 }
286
287 type Winsize struct {
288 Row uint16
289 Col uint16
290 Xpixel uint16
291 Ypixel uint16
292 }
293
294 type PollFd struct {
295 Fd int32
296 Events uint16
297 Revents uint16
298 }
299
300 const (
301 POLLERR = 0x4000
302 POLLHUP = 0x2000
303 POLLIN = 0x1
304 POLLNVAL = 0x8000
305 POLLOUT = 0x2
306 POLLPRI = 0x4
307 POLLRDBAND = 0x20
308 POLLRDNORM = 0x10
309 POLLWRBAND = 0x40
310 POLLWRNORM = 0x2
311 )
312
313 type Flock_t struct {
314 Type int16
315 Whence int16
316 Sysid uint32
317 Pid int32
318 Vfs int32
319 Start int64
320 Len int64
321 }
322
323 type Fsid_t struct {
324 Val [2]uint32
325 }
326 type Fsid64_t struct {
327 Val [2]uint64
328 }
329
330 type Statfs_t struct {
331 Version int32
332 Type int32
333 Bsize uint64
334 Blocks uint64
335 Bfree uint64
336 Bavail uint64
337 Files uint64
338 Ffree uint64
339 Fsid Fsid64_t
340 Vfstype int32
341 _ [4]byte
342 Fsize uint64
343 Vfsnumber int32
344 Vfsoff int32
345 Vfslen int32
346 Vfsvers int32
347 Fname [32]uint8
348 Fpack [32]uint8
349 Name_max int32
350 _ [4]byte
351 }
352
353 const RNDGETENTCNT = 0x80045200
55 package unix
66
77 const (
8 sizeofPtr = 0x4
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x4
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x4
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x4
12 SizeofLongLong = 0x8
1313 )
1414
1515 type (
135135 }
136136
137137 type Dirent struct {
138 Ino uint64
139 Seekoff uint64
140 Reclen uint16
141 Namlen uint16
142 Type uint8
143 Name [1024]int8
144 Pad_cgo_0 [3]byte
138 Ino uint64
139 Seekoff uint64
140 Reclen uint16
141 Namlen uint16
142 Type uint8
143 Name [1024]int8
144 _ [3]byte
145145 }
146146
147147 type RawSockaddrInet4 struct {
294294 )
295295
296296 type IfMsghdr struct {
297 Msglen uint16
298 Version uint8
299 Type uint8
300 Addrs int32
301 Flags int32
302 Index uint16
303 Pad_cgo_0 [2]byte
304 Data IfData
297 Msglen uint16
298 Version uint8
299 Type uint8
300 Addrs int32
301 Flags int32
302 Index uint16
303 _ [2]byte
304 Data IfData
305305 }
306306
307307 type IfData struct {
337337 }
338338
339339 type IfaMsghdr struct {
340 Msglen uint16
341 Version uint8
342 Type uint8
343 Addrs int32
344 Flags int32
345 Index uint16
346 Pad_cgo_0 [2]byte
347 Metric int32
340 Msglen uint16
341 Version uint8
342 Type uint8
343 Addrs int32
344 Flags int32
345 Index uint16
346 _ [2]byte
347 Metric int32
348348 }
349349
350350 type IfmaMsghdr struct {
351 Msglen uint16
352 Version uint8
353 Type uint8
354 Addrs int32
355 Flags int32
356 Index uint16
357 Pad_cgo_0 [2]byte
351 Msglen uint16
352 Version uint8
353 Type uint8
354 Addrs int32
355 Flags int32
356 Index uint16
357 _ [2]byte
358358 }
359359
360360 type IfmaMsghdr2 struct {
361 Msglen uint16
362 Version uint8
363 Type uint8
364 Addrs int32
365 Flags int32
366 Index uint16
367 Pad_cgo_0 [2]byte
368 Refcount int32
361 Msglen uint16
362 Version uint8
363 Type uint8
364 Addrs int32
365 Flags int32
366 Index uint16
367 _ [2]byte
368 Refcount int32
369369 }
370370
371371 type RtMsghdr struct {
372 Msglen uint16
373 Version uint8
374 Type uint8
375 Index uint16
376 Pad_cgo_0 [2]byte
377 Flags int32
378 Addrs int32
379 Pid int32
380 Seq int32
381 Errno int32
382 Use int32
383 Inits uint32
384 Rmx RtMetrics
372 Msglen uint16
373 Version uint8
374 Type uint8
375 Index uint16
376 _ [2]byte
377 Flags int32
378 Addrs int32
379 Pid int32
380 Seq int32
381 Errno int32
382 Use int32
383 Inits uint32
384 Rmx RtMetrics
385385 }
386386
387387 type RtMetrics struct {
429429 }
430430
431431 type BpfHdr struct {
432 Tstamp Timeval
433 Caplen uint32
434 Datalen uint32
435 Hdrlen uint16
436 Pad_cgo_0 [2]byte
432 Tstamp Timeval
433 Caplen uint32
434 Datalen uint32
435 Hdrlen uint16
436 _ [2]byte
437437 }
438438
439439 type Termios struct {
459459 AT_SYMLINK_FOLLOW = 0x40
460460 AT_SYMLINK_NOFOLLOW = 0x20
461461 )
462
463 type PollFd struct {
464 Fd int32
465 Events int16
466 Revents int16
467 }
468
469 const (
470 POLLERR = 0x8
471 POLLHUP = 0x10
472 POLLIN = 0x1
473 POLLNVAL = 0x20
474 POLLOUT = 0x4
475 POLLPRI = 0x2
476 POLLRDBAND = 0x80
477 POLLRDNORM = 0x40
478 POLLWRBAND = 0x100
479 POLLWRNORM = 0x4
480 )
481
482 type Utsname struct {
483 Sysname [256]byte
484 Nodename [256]byte
485 Release [256]byte
486 Version [256]byte
487 Machine [256]byte
488 }
55 package unix
66
77 const (
8 sizeofPtr = 0x8
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x8
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
1313 )
1414
1515 type (
2525 }
2626
2727 type Timeval struct {
28 Sec int64
29 Usec int32
30 Pad_cgo_0 [4]byte
28 Sec int64
29 Usec int32
30 _ [4]byte
3131 }
3232
3333 type Timeval32 struct {
6969 Uid uint32
7070 Gid uint32
7171 Rdev int32
72 Pad_cgo_0 [4]byte
72 _ [4]byte
7373 Atimespec Timespec
7474 Mtimespec Timespec
7575 Ctimespec Timespec
119119 }
120120
121121 type Radvisory_t struct {
122 Offset int64
123 Count int32
124 Pad_cgo_0 [4]byte
122 Offset int64
123 Count int32
124 _ [4]byte
125125 }
126126
127127 type Fbootstraptransfer_t struct {
131131 }
132132
133133 type Log2phys_t struct {
134 Flags uint32
135 Pad_cgo_0 [8]byte
136 Pad_cgo_1 [8]byte
134 Flags uint32
135 _ [8]byte
136 _ [8]byte
137137 }
138138
139139 type Fsid struct {
141141 }
142142
143143 type Dirent struct {
144 Ino uint64
145 Seekoff uint64
146 Reclen uint16
147 Namlen uint16
148 Type uint8
149 Name [1024]int8
150 Pad_cgo_0 [3]byte
144 Ino uint64
145 Seekoff uint64
146 Reclen uint16
147 Namlen uint16
148 Type uint8
149 Name [1024]int8
150 _ [3]byte
151151 }
152152
153153 type RawSockaddrInet4 struct {
220220 type Msghdr struct {
221221 Name *byte
222222 Namelen uint32
223 Pad_cgo_0 [4]byte
223 _ [4]byte
224224 Iov *Iovec
225225 Iovlen int32
226 Pad_cgo_1 [4]byte
226 _ [4]byte
227227 Control *byte
228228 Controllen uint32
229229 Flags int32
302302 )
303303
304304 type IfMsghdr struct {
305 Msglen uint16
306 Version uint8
307 Type uint8
308 Addrs int32
309 Flags int32
310 Index uint16
311 Pad_cgo_0 [2]byte
312 Data IfData
305 Msglen uint16
306 Version uint8
307 Type uint8
308 Addrs int32
309 Flags int32
310 Index uint16
311 _ [2]byte
312 Data IfData
313313 }
314314
315315 type IfData struct {
345345 }
346346
347347 type IfaMsghdr struct {
348 Msglen uint16
349 Version uint8
350 Type uint8
351 Addrs int32
352 Flags int32
353 Index uint16
354 Pad_cgo_0 [2]byte
355 Metric int32
348 Msglen uint16
349 Version uint8
350 Type uint8
351 Addrs int32
352 Flags int32
353 Index uint16
354 _ [2]byte
355 Metric int32
356356 }
357357
358358 type IfmaMsghdr struct {
359 Msglen uint16
360 Version uint8
361 Type uint8
362 Addrs int32
363 Flags int32
364 Index uint16
365 Pad_cgo_0 [2]byte
359 Msglen uint16
360 Version uint8
361 Type uint8
362 Addrs int32
363 Flags int32
364 Index uint16
365 _ [2]byte
366366 }
367367
368368 type IfmaMsghdr2 struct {
369 Msglen uint16
370 Version uint8
371 Type uint8
372 Addrs int32
373 Flags int32
374 Index uint16
375 Pad_cgo_0 [2]byte
376 Refcount int32
369 Msglen uint16
370 Version uint8
371 Type uint8
372 Addrs int32
373 Flags int32
374 Index uint16
375 _ [2]byte
376 Refcount int32
377377 }
378378
379379 type RtMsghdr struct {
380 Msglen uint16
381 Version uint8
382 Type uint8
383 Index uint16
384 Pad_cgo_0 [2]byte
385 Flags int32
386 Addrs int32
387 Pid int32
388 Seq int32
389 Errno int32
390 Use int32
391 Inits uint32
392 Rmx RtMetrics
380 Msglen uint16
381 Version uint8
382 Type uint8
383 Index uint16
384 _ [2]byte
385 Flags int32
386 Addrs int32
387 Pid int32
388 Seq int32
389 Errno int32
390 Use int32
391 Inits uint32
392 Rmx RtMetrics
393393 }
394394
395395 type RtMetrics struct {
425425 }
426426
427427 type BpfProgram struct {
428 Len uint32
429 Pad_cgo_0 [4]byte
430 Insns *BpfInsn
428 Len uint32
429 _ [4]byte
430 Insns *BpfInsn
431431 }
432432
433433 type BpfInsn struct {
438438 }
439439
440440 type BpfHdr struct {
441 Tstamp Timeval32
442 Caplen uint32
443 Datalen uint32
444 Hdrlen uint16
445 Pad_cgo_0 [2]byte
441 Tstamp Timeval32
442 Caplen uint32
443 Datalen uint32
444 Hdrlen uint16
445 _ [2]byte
446446 }
447447
448448 type Termios struct {
449 Iflag uint64
450 Oflag uint64
451 Cflag uint64
452 Lflag uint64
453 Cc [20]uint8
454 Pad_cgo_0 [4]byte
455 Ispeed uint64
456 Ospeed uint64
449 Iflag uint64
450 Oflag uint64
451 Cflag uint64
452 Lflag uint64
453 Cc [20]uint8
454 _ [4]byte
455 Ispeed uint64
456 Ospeed uint64
457457 }
458458
459459 type Winsize struct {
469469 AT_SYMLINK_FOLLOW = 0x40
470470 AT_SYMLINK_NOFOLLOW = 0x20
471471 )
472
473 type PollFd struct {
474 Fd int32
475 Events int16
476 Revents int16
477 }
478
479 const (
480 POLLERR = 0x8
481 POLLHUP = 0x10
482 POLLIN = 0x1
483 POLLNVAL = 0x20
484 POLLOUT = 0x4
485 POLLPRI = 0x2
486 POLLRDBAND = 0x80
487 POLLRDNORM = 0x40
488 POLLWRBAND = 0x100
489 POLLWRNORM = 0x4
490 )
491
492 type Utsname struct {
493 Sysname [256]byte
494 Nodename [256]byte
495 Release [256]byte
496 Version [256]byte
497 Machine [256]byte
498 }
66 package unix
77
88 const (
9 sizeofPtr = 0x4
10 sizeofShort = 0x2
11 sizeofInt = 0x4
12 sizeofLong = 0x4
13 sizeofLongLong = 0x8
9 SizeofPtr = 0x4
10 SizeofShort = 0x2
11 SizeofInt = 0x4
12 SizeofLong = 0x4
13 SizeofLongLong = 0x8
1414 )
1515
1616 type (
136136 }
137137
138138 type Dirent struct {
139 Ino uint64
140 Seekoff uint64
141 Reclen uint16
142 Namlen uint16
143 Type uint8
144 Name [1024]int8
145 Pad_cgo_0 [3]byte
139 Ino uint64
140 Seekoff uint64
141 Reclen uint16
142 Namlen uint16
143 Type uint8
144 Name [1024]int8
145 _ [3]byte
146146 }
147147
148148 type RawSockaddrInet4 struct {
295295 )
296296
297297 type IfMsghdr struct {
298 Msglen uint16
299 Version uint8
300 Type uint8
301 Addrs int32
302 Flags int32
303 Index uint16
304 Pad_cgo_0 [2]byte
305 Data IfData
298 Msglen uint16
299 Version uint8
300 Type uint8
301 Addrs int32
302 Flags int32
303 Index uint16
304 _ [2]byte
305 Data IfData
306306 }
307307
308308 type IfData struct {
338338 }
339339
340340 type IfaMsghdr struct {
341 Msglen uint16
342 Version uint8
343 Type uint8
344 Addrs int32
345 Flags int32
346 Index uint16
347 Pad_cgo_0 [2]byte
348 Metric int32
341 Msglen uint16
342 Version uint8
343 Type uint8
344 Addrs int32
345 Flags int32
346 Index uint16
347 _ [2]byte
348 Metric int32
349349 }
350350
351351 type IfmaMsghdr struct {
352 Msglen uint16
353 Version uint8
354 Type uint8
355 Addrs int32
356 Flags int32
357 Index uint16
358 Pad_cgo_0 [2]byte
352 Msglen uint16
353 Version uint8
354 Type uint8
355 Addrs int32
356 Flags int32
357 Index uint16
358 _ [2]byte
359359 }
360360
361361 type IfmaMsghdr2 struct {
362 Msglen uint16
363 Version uint8
364 Type uint8
365 Addrs int32
366 Flags int32
367 Index uint16
368 Pad_cgo_0 [2]byte
369 Refcount int32
362 Msglen uint16
363 Version uint8
364 Type uint8
365 Addrs int32
366 Flags int32
367 Index uint16
368 _ [2]byte
369 Refcount int32
370370 }
371371
372372 type RtMsghdr struct {
373 Msglen uint16
374 Version uint8
375 Type uint8
376 Index uint16
377 Pad_cgo_0 [2]byte
378 Flags int32
379 Addrs int32
380 Pid int32
381 Seq int32
382 Errno int32
383 Use int32
384 Inits uint32
385 Rmx RtMetrics
373 Msglen uint16
374 Version uint8
375 Type uint8
376 Index uint16
377 _ [2]byte
378 Flags int32
379 Addrs int32
380 Pid int32
381 Seq int32
382 Errno int32
383 Use int32
384 Inits uint32
385 Rmx RtMetrics
386386 }
387387
388388 type RtMetrics struct {
430430 }
431431
432432 type BpfHdr struct {
433 Tstamp Timeval
434 Caplen uint32
435 Datalen uint32
436 Hdrlen uint16
437 Pad_cgo_0 [2]byte
433 Tstamp Timeval
434 Caplen uint32
435 Datalen uint32
436 Hdrlen uint16
437 _ [2]byte
438438 }
439439
440440 type Termios struct {
460460 AT_SYMLINK_FOLLOW = 0x40
461461 AT_SYMLINK_NOFOLLOW = 0x20
462462 )
463
464 type PollFd struct {
465 Fd int32
466 Events int16
467 Revents int16
468 }
469
470 const (
471 POLLERR = 0x8
472 POLLHUP = 0x10
473 POLLIN = 0x1
474 POLLNVAL = 0x20
475 POLLOUT = 0x4
476 POLLPRI = 0x2
477 POLLRDBAND = 0x80
478 POLLRDNORM = 0x40
479 POLLWRBAND = 0x100
480 POLLWRNORM = 0x4
481 )
482
483 type Utsname struct {
484 Sysname [256]byte
485 Nodename [256]byte
486 Release [256]byte
487 Version [256]byte
488 Machine [256]byte
489 }
0 // cgo -godefs types_darwin.go | go run mkpost.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
03 // +build arm64,darwin
1 // Created by cgo -godefs - DO NOT EDIT
2 // cgo -godefs types_darwin.go
34
45 package unix
56
67 const (
7 sizeofPtr = 0x8
8 sizeofShort = 0x2
9 sizeofInt = 0x4
10 sizeofLong = 0x8
11 sizeofLongLong = 0x8
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
1213 )
1314
1415 type (
2425 }
2526
2627 type Timeval struct {
27 Sec int64
28 Usec int32
29 Pad_cgo_0 [4]byte
28 Sec int64
29 Usec int32
30 _ [4]byte
3031 }
3132
3233 type Timeval32 struct {
6869 Uid uint32
6970 Gid uint32
7071 Rdev int32
71 Pad_cgo_0 [4]byte
72 _ [4]byte
7273 Atimespec Timespec
7374 Mtimespec Timespec
7475 Ctimespec Timespec
118119 }
119120
120121 type Radvisory_t struct {
121 Offset int64
122 Count int32
123 Pad_cgo_0 [4]byte
122 Offset int64
123 Count int32
124 _ [4]byte
124125 }
125126
126127 type Fbootstraptransfer_t struct {
130131 }
131132
132133 type Log2phys_t struct {
133 Flags uint32
134 Pad_cgo_0 [8]byte
135 Pad_cgo_1 [8]byte
134 Flags uint32
135 _ [8]byte
136 _ [8]byte
136137 }
137138
138139 type Fsid struct {
140141 }
141142
142143 type Dirent struct {
143 Ino uint64
144 Seekoff uint64
145 Reclen uint16
146 Namlen uint16
147 Type uint8
148 Name [1024]int8
149 Pad_cgo_0 [3]byte
144 Ino uint64
145 Seekoff uint64
146 Reclen uint16
147 Namlen uint16
148 Type uint8
149 Name [1024]int8
150 _ [3]byte
150151 }
151152
152153 type RawSockaddrInet4 struct {
219220 type Msghdr struct {
220221 Name *byte
221222 Namelen uint32
222 Pad_cgo_0 [4]byte
223 _ [4]byte
223224 Iov *Iovec
224225 Iovlen int32
225 Pad_cgo_1 [4]byte
226 _ [4]byte
226227 Control *byte
227228 Controllen uint32
228229 Flags int32
301302 )
302303
303304 type IfMsghdr struct {
304 Msglen uint16
305 Version uint8
306 Type uint8
307 Addrs int32
308 Flags int32
309 Index uint16
310 Pad_cgo_0 [2]byte
311 Data IfData
305 Msglen uint16
306 Version uint8
307 Type uint8
308 Addrs int32
309 Flags int32
310 Index uint16
311 _ [2]byte
312 Data IfData
312313 }
313314
314315 type IfData struct {
344345 }
345346
346347 type IfaMsghdr struct {
347 Msglen uint16
348 Version uint8
349 Type uint8
350 Addrs int32
351 Flags int32
352 Index uint16
353 Pad_cgo_0 [2]byte
354 Metric int32
348 Msglen uint16
349 Version uint8
350 Type uint8
351 Addrs int32
352 Flags int32
353 Index uint16
354 _ [2]byte
355 Metric int32
355356 }
356357
357358 type IfmaMsghdr struct {
358 Msglen uint16
359 Version uint8
360 Type uint8
361 Addrs int32
362 Flags int32
363 Index uint16
364 Pad_cgo_0 [2]byte
359 Msglen uint16
360 Version uint8
361 Type uint8
362 Addrs int32
363 Flags int32
364 Index uint16
365 _ [2]byte
365366 }
366367
367368 type IfmaMsghdr2 struct {
368 Msglen uint16
369 Version uint8
370 Type uint8
371 Addrs int32
372 Flags int32
373 Index uint16
374 Pad_cgo_0 [2]byte
375 Refcount int32
369 Msglen uint16
370 Version uint8
371 Type uint8
372 Addrs int32
373 Flags int32
374 Index uint16
375 _ [2]byte
376 Refcount int32
376377 }
377378
378379 type RtMsghdr struct {
379 Msglen uint16
380 Version uint8
381 Type uint8
382 Index uint16
383 Pad_cgo_0 [2]byte
384 Flags int32
385 Addrs int32
386 Pid int32
387 Seq int32
388 Errno int32
389 Use int32
390 Inits uint32
391 Rmx RtMetrics
380 Msglen uint16
381 Version uint8
382 Type uint8
383 Index uint16
384 _ [2]byte
385 Flags int32
386 Addrs int32
387 Pid int32
388 Seq int32
389 Errno int32
390 Use int32
391 Inits uint32
392 Rmx RtMetrics
392393 }
393394
394395 type RtMetrics struct {
424425 }
425426
426427 type BpfProgram struct {
427 Len uint32
428 Pad_cgo_0 [4]byte
429 Insns *BpfInsn
428 Len uint32
429 _ [4]byte
430 Insns *BpfInsn
430431 }
431432
432433 type BpfInsn struct {
437438 }
438439
439440 type BpfHdr struct {
440 Tstamp Timeval32
441 Caplen uint32
442 Datalen uint32
443 Hdrlen uint16
444 Pad_cgo_0 [2]byte
441 Tstamp Timeval32
442 Caplen uint32
443 Datalen uint32
444 Hdrlen uint16
445 _ [2]byte
445446 }
446447
447448 type Termios struct {
448 Iflag uint64
449 Oflag uint64
450 Cflag uint64
451 Lflag uint64
452 Cc [20]uint8
453 Pad_cgo_0 [4]byte
454 Ispeed uint64
455 Ospeed uint64
449 Iflag uint64
450 Oflag uint64
451 Cflag uint64
452 Lflag uint64
453 Cc [20]uint8
454 _ [4]byte
455 Ispeed uint64
456 Ospeed uint64
456457 }
457458
458459 type Winsize struct {
468469 AT_SYMLINK_FOLLOW = 0x40
469470 AT_SYMLINK_NOFOLLOW = 0x20
470471 )
472
473 type PollFd struct {
474 Fd int32
475 Events int16
476 Revents int16
477 }
478
479 const (
480 POLLERR = 0x8
481 POLLHUP = 0x10
482 POLLIN = 0x1
483 POLLNVAL = 0x20
484 POLLOUT = 0x4
485 POLLPRI = 0x2
486 POLLRDBAND = 0x80
487 POLLRDNORM = 0x40
488 POLLWRBAND = 0x100
489 POLLWRNORM = 0x4
490 )
491
492 type Utsname struct {
493 Sysname [256]byte
494 Nodename [256]byte
495 Release [256]byte
496 Version [256]byte
497 Machine [256]byte
498 }
55 package unix
66
77 const (
8 sizeofPtr = 0x8
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x8
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
1313 )
1414
1515 type (
5454 }
5555
5656 type _Gid_t uint32
57
58 const (
59 S_IFMT = 0xf000
60 S_IFIFO = 0x1000
61 S_IFCHR = 0x2000
62 S_IFDIR = 0x4000
63 S_IFBLK = 0x6000
64 S_IFREG = 0x8000
65 S_IFLNK = 0xa000
66 S_IFSOCK = 0xc000
67 S_ISUID = 0x800
68 S_ISGID = 0x400
69 S_ISVTX = 0x200
70 S_IRUSR = 0x100
71 S_IWUSR = 0x80
72 S_IXUSR = 0x40
73 )
7457
7558 type Stat_t struct {
7659 Ino uint64
10790 Owner uint32
10891 Type int32
10992 Flags int32
110 Pad_cgo_0 [4]byte
93 _ [4]byte
11194 Syncwrites int64
11295 Asyncwrites int64
11396 Fstypename [16]int8
117100 Spares1 int16
118101 Mntfromname [80]int8
119102 Spares2 int16
120 Pad_cgo_1 [4]byte
103 _ [4]byte
121104 Spare [2]int64
122105 }
123106
141124 type Fsid struct {
142125 Val [2]int32
143126 }
127
128 const (
129 PathMax = 0x400
130 )
144131
145132 type RawSockaddrInet4 struct {
146133 Len uint8
214201 type Msghdr struct {
215202 Name *byte
216203 Namelen uint32
217 Pad_cgo_0 [4]byte
204 _ [4]byte
218205 Iov *Iovec
219206 Iovlen int32
220 Pad_cgo_1 [4]byte
207 _ [4]byte
221208 Control *byte
222209 Controllen uint32
223210 Flags int32
289276 )
290277
291278 type IfMsghdr struct {
292 Msglen uint16
293 Version uint8
294 Type uint8
295 Addrs int32
296 Flags int32
297 Index uint16
298 Pad_cgo_0 [2]byte
299 Data IfData
279 Msglen uint16
280 Version uint8
281 Type uint8
282 Addrs int32
283 Flags int32
284 Index uint16
285 _ [2]byte
286 Data IfData
300287 }
301288
302289 type IfData struct {
306293 Hdrlen uint8
307294 Recvquota uint8
308295 Xmitquota uint8
309 Pad_cgo_0 [2]byte
296 _ [2]byte
310297 Mtu uint64
311298 Metric uint64
312299 Link_state uint64
328315 }
329316
330317 type IfaMsghdr struct {
331 Msglen uint16
332 Version uint8
333 Type uint8
334 Addrs int32
335 Flags int32
336 Index uint16
337 Pad_cgo_0 [2]byte
338 Metric int32
318 Msglen uint16
319 Version uint8
320 Type uint8
321 Addrs int32
322 Flags int32
323 Index uint16
324 _ [2]byte
325 Metric int32
339326 }
340327
341328 type IfmaMsghdr struct {
342 Msglen uint16
343 Version uint8
344 Type uint8
345 Addrs int32
346 Flags int32
347 Index uint16
348 Pad_cgo_0 [2]byte
329 Msglen uint16
330 Version uint8
331 Type uint8
332 Addrs int32
333 Flags int32
334 Index uint16
335 _ [2]byte
349336 }
350337
351338 type IfAnnounceMsghdr struct {
358345 }
359346
360347 type RtMsghdr struct {
361 Msglen uint16
362 Version uint8
363 Type uint8
364 Index uint16
365 Pad_cgo_0 [2]byte
366 Flags int32
367 Addrs int32
368 Pid int32
369 Seq int32
370 Errno int32
371 Use int32
372 Inits uint64
373 Rmx RtMetrics
348 Msglen uint16
349 Version uint8
350 Type uint8
351 Index uint16
352 _ [2]byte
353 Flags int32
354 Addrs int32
355 Pid int32
356 Seq int32
357 Errno int32
358 Use int32
359 Inits uint64
360 Rmx RtMetrics
374361 }
375362
376363 type RtMetrics struct {
386373 Hopcount uint64
387374 Mssopt uint16
388375 Pad uint16
389 Pad_cgo_0 [4]byte
376 _ [4]byte
390377 Msl uint64
391378 Iwmaxsegs uint64
392379 Iwcapsegs uint64
411398 }
412399
413400 type BpfProgram struct {
414 Len uint32
415 Pad_cgo_0 [4]byte
416 Insns *BpfInsn
401 Len uint32
402 _ [4]byte
403 Insns *BpfInsn
417404 }
418405
419406 type BpfInsn struct {
424411 }
425412
426413 type BpfHdr struct {
427 Tstamp Timeval
428 Caplen uint32
429 Datalen uint32
430 Hdrlen uint16
431 Pad_cgo_0 [6]byte
414 Tstamp Timeval
415 Caplen uint32
416 Datalen uint32
417 Hdrlen uint16
418 _ [6]byte
432419 }
433420
434421 type Termios struct {
441428 Ospeed uint32
442429 }
443430
431 type Winsize struct {
432 Row uint16
433 Col uint16
434 Xpixel uint16
435 Ypixel uint16
436 }
437
444438 const (
445439 AT_FDCWD = 0xfffafdcd
446440 AT_SYMLINK_NOFOLLOW = 0x1
447441 )
442
443 type PollFd struct {
444 Fd int32
445 Events int16
446 Revents int16
447 }
448
449 const (
450 POLLERR = 0x8
451 POLLHUP = 0x10
452 POLLIN = 0x1
453 POLLNVAL = 0x20
454 POLLOUT = 0x4
455 POLLPRI = 0x2
456 POLLRDBAND = 0x80
457 POLLRDNORM = 0x40
458 POLLWRBAND = 0x100
459 POLLWRNORM = 0x4
460 )
461
462 type Utsname struct {
463 Sysname [32]byte
464 Nodename [32]byte
465 Release [32]byte
466 Version [32]byte
467 Machine [32]byte
468 }
55 package unix
66
77 const (
8 sizeofPtr = 0x4
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x4
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x4
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x4
12 SizeofLongLong = 0x8
1313 )
1414
1515 type (
5656 type _Gid_t uint32
5757
5858 const (
59 S_IFMT = 0xf000
60 S_IFIFO = 0x1000
61 S_IFCHR = 0x2000
62 S_IFDIR = 0x4000
63 S_IFBLK = 0x6000
64 S_IFREG = 0x8000
65 S_IFLNK = 0xa000
66 S_IFSOCK = 0xc000
67 S_ISUID = 0x800
68 S_ISGID = 0x400
69 S_ISVTX = 0x200
70 S_IRUSR = 0x100
71 S_IWUSR = 0x80
72 S_IXUSR = 0x40
59 _statfsVersion = 0x20140518
60 _dirblksiz = 0x400
7361 )
7462
7563 type Stat_t struct {
76 Dev uint32
77 Ino uint32
78 Mode uint16
79 Nlink uint16
80 Uid uint32
81 Gid uint32
82 Rdev uint32
83 Atimespec Timespec
84 Mtimespec Timespec
85 Ctimespec Timespec
86 Size int64
87 Blocks int64
88 Blksize int32
89 Flags uint32
90 Gen uint32
91 Lspare int32
92 Birthtimespec Timespec
93 Pad_cgo_0 [8]byte
64 Dev uint64
65 Ino uint64
66 Nlink uint64
67 Mode uint16
68 _0 int16
69 Uid uint32
70 Gid uint32
71 _1 int32
72 Rdev uint64
73 Atim_ext int32
74 Atim Timespec
75 Mtim_ext int32
76 Mtim Timespec
77 Ctim_ext int32
78 Ctim Timespec
79 Btim_ext int32
80 Birthtim Timespec
81 Size int64
82 Blocks int64
83 Blksize int32
84 Flags uint32
85 Gen uint64
86 Spare [10]uint64
87 }
88
89 type stat_freebsd11_t struct {
90 Dev uint32
91 Ino uint32
92 Mode uint16
93 Nlink uint16
94 Uid uint32
95 Gid uint32
96 Rdev uint32
97 Atim Timespec
98 Mtim Timespec
99 Ctim Timespec
100 Size int64
101 Blocks int64
102 Blksize int32
103 Flags uint32
104 Gen uint32
105 Lspare int32
106 Birthtim Timespec
107 _ [8]byte
94108 }
95109
96110 type Statfs_t struct {
111 Version uint32
112 Type uint32
113 Flags uint64
114 Bsize uint64
115 Iosize uint64
116 Blocks uint64
117 Bfree uint64
118 Bavail int64
119 Files uint64
120 Ffree int64
121 Syncwrites uint64
122 Asyncwrites uint64
123 Syncreads uint64
124 Asyncreads uint64
125 Spare [10]uint64
126 Namemax uint32
127 Owner uint32
128 Fsid Fsid
129 Charspare [80]int8
130 Fstypename [16]int8
131 Mntfromname [1024]int8
132 Mntonname [1024]int8
133 }
134
135 type statfs_freebsd11_t struct {
97136 Version uint32
98137 Type uint32
99138 Flags uint64
128167 }
129168
130169 type Dirent struct {
170 Fileno uint64
171 Off int64
172 Reclen uint16
173 Type uint8
174 Pad0 uint8
175 Namlen uint16
176 Pad1 uint16
177 Name [256]int8
178 }
179
180 type dirent_freebsd11 struct {
131181 Fileno uint32
132182 Reclen uint16
133183 Type uint8
138188 type Fsid struct {
139189 Val [2]int32
140190 }
191
192 const (
193 PathMax = 0x400
194 )
141195
142196 const (
143197 FADV_NORMAL = 0x0
284338 }
285339
286340 type FdSet struct {
287 X__fds_bits [32]uint32
341 Bits [32]uint32
288342 }
289343
290344 const (
300354 )
301355
302356 type ifMsghdr struct {
303 Msglen uint16
304 Version uint8
305 Type uint8
306 Addrs int32
307 Flags int32
308 Index uint16
309 Pad_cgo_0 [2]byte
310 Data ifData
357 Msglen uint16
358 Version uint8
359 Type uint8
360 Addrs int32
361 Flags int32
362 Index uint16
363 _ [2]byte
364 Data ifData
311365 }
312366
313367 type IfMsghdr struct {
314 Msglen uint16
315 Version uint8
316 Type uint8
317 Addrs int32
318 Flags int32
319 Index uint16
320 Pad_cgo_0 [2]byte
321 Data IfData
368 Msglen uint16
369 Version uint8
370 Type uint8
371 Addrs int32
372 Flags int32
373 Index uint16
374 _ [2]byte
375 Data IfData
322376 }
323377
324378 type ifData struct {
325 Type uint8
326 Physical uint8
327 Addrlen uint8
328 Hdrlen uint8
329 Link_state uint8
330 Vhid uint8
331 Datalen uint16
332 Mtu uint32
333 Metric uint32
334 Baudrate uint64
335 Ipackets uint64
336 Ierrors uint64
337 Opackets uint64
338 Oerrors uint64
339 Collisions uint64
340 Ibytes uint64
341 Obytes uint64
342 Imcasts uint64
343 Omcasts uint64
344 Iqdrops uint64
345 Oqdrops uint64
346 Noproto uint64
347 Hwassist uint64
348 X__ifi_epoch [8]byte
349 X__ifi_lastchange [16]byte
379 Type uint8
380 Physical uint8
381 Addrlen uint8
382 Hdrlen uint8
383 Link_state uint8
384 Vhid uint8
385 Datalen uint16
386 Mtu uint32
387 Metric uint32
388 Baudrate uint64
389 Ipackets uint64
390 Ierrors uint64
391 Opackets uint64
392 Oerrors uint64
393 Collisions uint64
394 Ibytes uint64
395 Obytes uint64
396 Imcasts uint64
397 Omcasts uint64
398 Iqdrops uint64
399 Oqdrops uint64
400 Noproto uint64
401 Hwassist uint64
402 _ [8]byte
403 _ [16]byte
350404 }
351405
352406 type IfData struct {
378432 }
379433
380434 type IfaMsghdr struct {
381 Msglen uint16
382 Version uint8
383 Type uint8
384 Addrs int32
385 Flags int32
386 Index uint16
387 Pad_cgo_0 [2]byte
388 Metric int32
435 Msglen uint16
436 Version uint8
437 Type uint8
438 Addrs int32
439 Flags int32
440 Index uint16
441 _ [2]byte
442 Metric int32
389443 }
390444
391445 type IfmaMsghdr struct {
392 Msglen uint16
393 Version uint8
394 Type uint8
395 Addrs int32
396 Flags int32
397 Index uint16
398 Pad_cgo_0 [2]byte
446 Msglen uint16
447 Version uint8
448 Type uint8
449 Addrs int32
450 Flags int32
451 Index uint16
452 _ [2]byte
399453 }
400454
401455 type IfAnnounceMsghdr struct {
408462 }
409463
410464 type RtMsghdr struct {
411 Msglen uint16
412 Version uint8
413 Type uint8
414 Index uint16
415 Pad_cgo_0 [2]byte
416 Flags int32
417 Addrs int32
418 Pid int32
419 Seq int32
420 Errno int32
421 Fmask int32
422 Inits uint32
423 Rmx RtMetrics
465 Msglen uint16
466 Version uint8
467 Type uint8
468 Index uint16
469 _ [2]byte
470 Flags int32
471 Addrs int32
472 Pid int32
473 Seq int32
474 Errno int32
475 Fmask int32
476 Inits uint32
477 Rmx RtMetrics
424478 }
425479
426480 type RtMetrics struct {
477531 }
478532
479533 type BpfHdr struct {
480 Tstamp Timeval
481 Caplen uint32
482 Datalen uint32
483 Hdrlen uint16
484 Pad_cgo_0 [2]byte
534 Tstamp Timeval
535 Caplen uint32
536 Datalen uint32
537 Hdrlen uint16
538 _ [2]byte
485539 }
486540
487541 type BpfZbufHeader struct {
488542 Kernel_gen uint32
489543 Kernel_len uint32
490544 User_gen uint32
491 X_bzh_pad [5]uint32
545 _ [5]uint32
492546 }
493547
494548 type Termios struct {
515569 AT_SYMLINK_NOFOLLOW = 0x200
516570 )
517571
572 type PollFd struct {
573 Fd int32
574 Events int16
575 Revents int16
576 }
577
578 const (
579 POLLERR = 0x8
580 POLLHUP = 0x10
581 POLLIN = 0x1
582 POLLINIGNEOF = 0x2000
583 POLLNVAL = 0x20
584 POLLOUT = 0x4
585 POLLPRI = 0x2
586 POLLRDBAND = 0x80
587 POLLRDNORM = 0x40
588 POLLWRBAND = 0x100
589 POLLWRNORM = 0x4
590 )
591
518592 type CapRights struct {
519593 Rights [2]uint64
520594 }
595
596 type Utsname struct {
597 Sysname [256]byte
598 Nodename [256]byte
599 Release [256]byte
600 Version [256]byte
601 Machine [256]byte
602 }
55 package unix
66
77 const (
8 sizeofPtr = 0x8
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x8
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
1313 )
1414
1515 type (
5656 type _Gid_t uint32
5757
5858 const (
59 S_IFMT = 0xf000
60 S_IFIFO = 0x1000
61 S_IFCHR = 0x2000
62 S_IFDIR = 0x4000
63 S_IFBLK = 0x6000
64 S_IFREG = 0x8000
65 S_IFLNK = 0xa000
66 S_IFSOCK = 0xc000
67 S_ISUID = 0x800
68 S_ISGID = 0x400
69 S_ISVTX = 0x200
70 S_IRUSR = 0x100
71 S_IWUSR = 0x80
72 S_IXUSR = 0x40
59 _statfsVersion = 0x20140518
60 _dirblksiz = 0x400
7361 )
7462
7563 type Stat_t struct {
76 Dev uint32
77 Ino uint32
78 Mode uint16
79 Nlink uint16
80 Uid uint32
81 Gid uint32
82 Rdev uint32
83 Atimespec Timespec
84 Mtimespec Timespec
85 Ctimespec Timespec
86 Size int64
87 Blocks int64
88 Blksize int32
89 Flags uint32
90 Gen uint32
91 Lspare int32
92 Birthtimespec Timespec
64 Dev uint64
65 Ino uint64
66 Nlink uint64
67 Mode uint16
68 _0 int16
69 Uid uint32
70 Gid uint32
71 _1 int32
72 Rdev uint64
73 Atim Timespec
74 Mtim Timespec
75 Ctim Timespec
76 Birthtim Timespec
77 Size int64
78 Blocks int64
79 Blksize int32
80 Flags uint32
81 Gen uint64
82 Spare [10]uint64
83 }
84
85 type stat_freebsd11_t struct {
86 Dev uint32
87 Ino uint32
88 Mode uint16
89 Nlink uint16
90 Uid uint32
91 Gid uint32
92 Rdev uint32
93 Atim Timespec
94 Mtim Timespec
95 Ctim Timespec
96 Size int64
97 Blocks int64
98 Blksize int32
99 Flags uint32
100 Gen uint32
101 Lspare int32
102 Birthtim Timespec
93103 }
94104
95105 type Statfs_t struct {
106 Version uint32
107 Type uint32
108 Flags uint64
109 Bsize uint64
110 Iosize uint64
111 Blocks uint64
112 Bfree uint64
113 Bavail int64
114 Files uint64
115 Ffree int64
116 Syncwrites uint64
117 Asyncwrites uint64
118 Syncreads uint64
119 Asyncreads uint64
120 Spare [10]uint64
121 Namemax uint32
122 Owner uint32
123 Fsid Fsid
124 Charspare [80]int8
125 Fstypename [16]int8
126 Mntfromname [1024]int8
127 Mntonname [1024]int8
128 }
129
130 type statfs_freebsd11_t struct {
96131 Version uint32
97132 Type uint32
98133 Flags uint64
118153 }
119154
120155 type Flock_t struct {
121 Start int64
122 Len int64
123 Pid int32
124 Type int16
125 Whence int16
126 Sysid int32
127 Pad_cgo_0 [4]byte
156 Start int64
157 Len int64
158 Pid int32
159 Type int16
160 Whence int16
161 Sysid int32
162 _ [4]byte
128163 }
129164
130165 type Dirent struct {
166 Fileno uint64
167 Off int64
168 Reclen uint16
169 Type uint8
170 Pad0 uint8
171 Namlen uint16
172 Pad1 uint16
173 Name [256]int8
174 }
175
176 type dirent_freebsd11 struct {
131177 Fileno uint32
132178 Reclen uint16
133179 Type uint8
138184 type Fsid struct {
139185 Val [2]int32
140186 }
187
188 const (
189 PathMax = 0x400
190 )
141191
142192 const (
143193 FADV_NORMAL = 0x0
224274 type Msghdr struct {
225275 Name *byte
226276 Namelen uint32
227 Pad_cgo_0 [4]byte
277 _ [4]byte
228278 Iov *Iovec
229279 Iovlen int32
230 Pad_cgo_1 [4]byte
280 _ [4]byte
231281 Control *byte
232282 Controllen uint32
233283 Flags int32
286336 }
287337
288338 type FdSet struct {
289 X__fds_bits [16]uint64
339 Bits [16]uint64
290340 }
291341
292342 const (
302352 )
303353
304354 type ifMsghdr struct {
305 Msglen uint16
306 Version uint8
307 Type uint8
308 Addrs int32
309 Flags int32
310 Index uint16
311 Pad_cgo_0 [2]byte
312 Data ifData
355 Msglen uint16
356 Version uint8
357 Type uint8
358 Addrs int32
359 Flags int32
360 Index uint16
361 _ [2]byte
362 Data ifData
313363 }
314364
315365 type IfMsghdr struct {
316 Msglen uint16
317 Version uint8
318 Type uint8
319 Addrs int32
320 Flags int32
321 Index uint16
322 Pad_cgo_0 [2]byte
323 Data IfData
366 Msglen uint16
367 Version uint8
368 Type uint8
369 Addrs int32
370 Flags int32
371 Index uint16
372 _ [2]byte
373 Data IfData
324374 }
325375
326376 type ifData struct {
327 Type uint8
328 Physical uint8
329 Addrlen uint8
330 Hdrlen uint8
331 Link_state uint8
332 Vhid uint8
333 Datalen uint16
334 Mtu uint32
335 Metric uint32
336 Baudrate uint64
337 Ipackets uint64
338 Ierrors uint64
339 Opackets uint64
340 Oerrors uint64
341 Collisions uint64
342 Ibytes uint64
343 Obytes uint64
344 Imcasts uint64
345 Omcasts uint64
346 Iqdrops uint64
347 Oqdrops uint64
348 Noproto uint64
349 Hwassist uint64
350 X__ifi_epoch [8]byte
351 X__ifi_lastchange [16]byte
377 Type uint8
378 Physical uint8
379 Addrlen uint8
380 Hdrlen uint8
381 Link_state uint8
382 Vhid uint8
383 Datalen uint16
384 Mtu uint32
385 Metric uint32
386 Baudrate uint64
387 Ipackets uint64
388 Ierrors uint64
389 Opackets uint64
390 Oerrors uint64
391 Collisions uint64
392 Ibytes uint64
393 Obytes uint64
394 Imcasts uint64
395 Omcasts uint64
396 Iqdrops uint64
397 Oqdrops uint64
398 Noproto uint64
399 Hwassist uint64
400 _ [8]byte
401 _ [16]byte
352402 }
353403
354404 type IfData struct {
380430 }
381431
382432 type IfaMsghdr struct {
383 Msglen uint16
384 Version uint8
385 Type uint8
386 Addrs int32
387 Flags int32
388 Index uint16
389 Pad_cgo_0 [2]byte
390 Metric int32
433 Msglen uint16
434 Version uint8
435 Type uint8
436 Addrs int32
437 Flags int32
438 Index uint16
439 _ [2]byte
440 Metric int32
391441 }
392442
393443 type IfmaMsghdr struct {
394 Msglen uint16
395 Version uint8
396 Type uint8
397 Addrs int32
398 Flags int32
399 Index uint16
400 Pad_cgo_0 [2]byte
444 Msglen uint16
445 Version uint8
446 Type uint8
447 Addrs int32
448 Flags int32
449 Index uint16
450 _ [2]byte
401451 }
402452
403453 type IfAnnounceMsghdr struct {
410460 }
411461
412462 type RtMsghdr struct {
413 Msglen uint16
414 Version uint8
415 Type uint8
416 Index uint16
417 Pad_cgo_0 [2]byte
418 Flags int32
419 Addrs int32
420 Pid int32
421 Seq int32
422 Errno int32
423 Fmask int32
424 Inits uint64
425 Rmx RtMetrics
463 Msglen uint16
464 Version uint8
465 Type uint8
466 Index uint16
467 _ [2]byte
468 Flags int32
469 Addrs int32
470 Pid int32
471 Seq int32
472 Errno int32
473 Fmask int32
474 Inits uint64
475 Rmx RtMetrics
426476 }
427477
428478 type RtMetrics struct {
467517 }
468518
469519 type BpfProgram struct {
470 Len uint32
471 Pad_cgo_0 [4]byte
472 Insns *BpfInsn
520 Len uint32
521 _ [4]byte
522 Insns *BpfInsn
473523 }
474524
475525 type BpfInsn struct {
480530 }
481531
482532 type BpfHdr struct {
483 Tstamp Timeval
484 Caplen uint32
485 Datalen uint32
486 Hdrlen uint16
487 Pad_cgo_0 [6]byte
533 Tstamp Timeval
534 Caplen uint32
535 Datalen uint32
536 Hdrlen uint16
537 _ [6]byte
488538 }
489539
490540 type BpfZbufHeader struct {
491541 Kernel_gen uint32
492542 Kernel_len uint32
493543 User_gen uint32
494 X_bzh_pad [5]uint32
544 _ [5]uint32
495545 }
496546
497547 type Termios struct {
518568 AT_SYMLINK_NOFOLLOW = 0x200
519569 )
520570
571 type PollFd struct {
572 Fd int32
573 Events int16
574 Revents int16
575 }
576
577 const (
578 POLLERR = 0x8
579 POLLHUP = 0x10
580 POLLIN = 0x1
581 POLLINIGNEOF = 0x2000
582 POLLNVAL = 0x20
583 POLLOUT = 0x4
584 POLLPRI = 0x2
585 POLLRDBAND = 0x80
586 POLLRDNORM = 0x40
587 POLLWRBAND = 0x100
588 POLLWRNORM = 0x4
589 )
590
521591 type CapRights struct {
522592 Rights [2]uint64
523593 }
594
595 type Utsname struct {
596 Sysname [256]byte
597 Nodename [256]byte
598 Release [256]byte
599 Version [256]byte
600 Machine [256]byte
601 }
55 package unix
66
77 const (
8 sizeofPtr = 0x4
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x4
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x4
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x4
12 SizeofLongLong = 0x8
1313 )
1414
1515 type (
2020 )
2121
2222 type Timespec struct {
23 Sec int64
24 Nsec int32
25 Pad_cgo_0 [4]byte
23 Sec int64
24 Nsec int32
25 _ [4]byte
2626 }
2727
2828 type Timeval struct {
29 Sec int64
30 Usec int32
31 Pad_cgo_0 [4]byte
29 Sec int64
30 Usec int32
31 _ [4]byte
3232 }
3333
3434 type Rusage struct {
5858 type _Gid_t uint32
5959
6060 const (
61 S_IFMT = 0xf000
62 S_IFIFO = 0x1000
63 S_IFCHR = 0x2000
64 S_IFDIR = 0x4000
65 S_IFBLK = 0x6000
66 S_IFREG = 0x8000
67 S_IFLNK = 0xa000
68 S_IFSOCK = 0xc000
69 S_ISUID = 0x800
70 S_ISGID = 0x400
71 S_ISVTX = 0x200
72 S_IRUSR = 0x100
73 S_IWUSR = 0x80
74 S_IXUSR = 0x40
61 _statfsVersion = 0x20140518
62 _dirblksiz = 0x400
7563 )
7664
7765 type Stat_t struct {
78 Dev uint32
79 Ino uint32
80 Mode uint16
81 Nlink uint16
82 Uid uint32
83 Gid uint32
84 Rdev uint32
85 Atimespec Timespec
86 Mtimespec Timespec
87 Ctimespec Timespec
88 Size int64
89 Blocks int64
90 Blksize int32
91 Flags uint32
92 Gen uint32
93 Lspare int32
94 Birthtimespec Timespec
66 Dev uint64
67 Ino uint64
68 Nlink uint64
69 Mode uint16
70 _0 int16
71 Uid uint32
72 Gid uint32
73 _1 int32
74 Rdev uint64
75 Atim Timespec
76 Mtim Timespec
77 Ctim Timespec
78 Birthtim Timespec
79 Size int64
80 Blocks int64
81 Blksize int32
82 Flags uint32
83 Gen uint64
84 Spare [10]uint64
85 }
86
87 type stat_freebsd11_t struct {
88 Dev uint32
89 Ino uint32
90 Mode uint16
91 Nlink uint16
92 Uid uint32
93 Gid uint32
94 Rdev uint32
95 Atim Timespec
96 Mtim Timespec
97 Ctim Timespec
98 Size int64
99 Blocks int64
100 Blksize int32
101 Flags uint32
102 Gen uint32
103 Lspare int32
104 Birthtim Timespec
95105 }
96106
97107 type Statfs_t struct {
108 Version uint32
109 Type uint32
110 Flags uint64
111 Bsize uint64
112 Iosize uint64
113 Blocks uint64
114 Bfree uint64
115 Bavail int64
116 Files uint64
117 Ffree int64
118 Syncwrites uint64
119 Asyncwrites uint64
120 Syncreads uint64
121 Asyncreads uint64
122 Spare [10]uint64
123 Namemax uint32
124 Owner uint32
125 Fsid Fsid
126 Charspare [80]int8
127 Fstypename [16]int8
128 Mntfromname [1024]int8
129 Mntonname [1024]int8
130 }
131
132 type statfs_freebsd11_t struct {
98133 Version uint32
99134 Type uint32
100135 Flags uint64
120155 }
121156
122157 type Flock_t struct {
123 Start int64
124 Len int64
125 Pid int32
126 Type int16
127 Whence int16
128 Sysid int32
129 Pad_cgo_0 [4]byte
158 Start int64
159 Len int64
160 Pid int32
161 Type int16
162 Whence int16
163 Sysid int32
164 _ [4]byte
130165 }
131166
132167 type Dirent struct {
168 Fileno uint64
169 Off int64
170 Reclen uint16
171 Type uint8
172 Pad0 uint8
173 Namlen uint16
174 Pad1 uint16
175 Name [256]int8
176 }
177
178 type dirent_freebsd11 struct {
133179 Fileno uint32
134180 Reclen uint16
135181 Type uint8
140186 type Fsid struct {
141187 Val [2]int32
142188 }
189
190 const (
191 PathMax = 0x400
192 )
143193
144194 const (
145195 FADV_NORMAL = 0x0
286336 }
287337
288338 type FdSet struct {
289 X__fds_bits [32]uint32
339 Bits [32]uint32
290340 }
291341
292342 const (
302352 )
303353
304354 type ifMsghdr struct {
305 Msglen uint16
306 Version uint8
307 Type uint8
308 Addrs int32
309 Flags int32
310 Index uint16
311 Pad_cgo_0 [2]byte
312 Data ifData
355 Msglen uint16
356 Version uint8
357 Type uint8
358 Addrs int32
359 Flags int32
360 Index uint16
361 _ [2]byte
362 Data ifData
313363 }
314364
315365 type IfMsghdr struct {
316 Msglen uint16
317 Version uint8
318 Type uint8
319 Addrs int32
320 Flags int32
321 Index uint16
322 Pad_cgo_0 [2]byte
323 Data IfData
366 Msglen uint16
367 Version uint8
368 Type uint8
369 Addrs int32
370 Flags int32
371 Index uint16
372 _ [2]byte
373 Data IfData
324374 }
325375
326376 type ifData struct {
327 Type uint8
328 Physical uint8
329 Addrlen uint8
330 Hdrlen uint8
331 Link_state uint8
332 Vhid uint8
333 Datalen uint16
334 Mtu uint32
335 Metric uint32
336 Baudrate uint64
337 Ipackets uint64
338 Ierrors uint64
339 Opackets uint64
340 Oerrors uint64
341 Collisions uint64
342 Ibytes uint64
343 Obytes uint64
344 Imcasts uint64
345 Omcasts uint64
346 Iqdrops uint64
347 Oqdrops uint64
348 Noproto uint64
349 Hwassist uint64
350 X__ifi_epoch [8]byte
351 X__ifi_lastchange [16]byte
377 Type uint8
378 Physical uint8
379 Addrlen uint8
380 Hdrlen uint8
381 Link_state uint8
382 Vhid uint8
383 Datalen uint16
384 Mtu uint32
385 Metric uint32
386 Baudrate uint64
387 Ipackets uint64
388 Ierrors uint64
389 Opackets uint64
390 Oerrors uint64
391 Collisions uint64
392 Ibytes uint64
393 Obytes uint64
394 Imcasts uint64
395 Omcasts uint64
396 Iqdrops uint64
397 Oqdrops uint64
398 Noproto uint64
399 Hwassist uint64
400 _ [8]byte
401 _ [16]byte
352402 }
353403
354404 type IfData struct {
375425 Iqdrops uint32
376426 Noproto uint32
377427 Hwassist uint32
378 Pad_cgo_0 [4]byte
428 _ [4]byte
379429 Epoch int64
380430 Lastchange Timeval
381431 }
382432
383433 type IfaMsghdr struct {
384 Msglen uint16
385 Version uint8
386 Type uint8
387 Addrs int32
388 Flags int32
389 Index uint16
390 Pad_cgo_0 [2]byte
391 Metric int32
434 Msglen uint16
435 Version uint8
436 Type uint8
437 Addrs int32
438 Flags int32
439 Index uint16
440 _ [2]byte
441 Metric int32
392442 }
393443
394444 type IfmaMsghdr struct {
395 Msglen uint16
396 Version uint8
397 Type uint8
398 Addrs int32
399 Flags int32
400 Index uint16
401 Pad_cgo_0 [2]byte
445 Msglen uint16
446 Version uint8
447 Type uint8
448 Addrs int32
449 Flags int32
450 Index uint16
451 _ [2]byte
402452 }
403453
404454 type IfAnnounceMsghdr struct {
411461 }
412462
413463 type RtMsghdr struct {
414 Msglen uint16
415 Version uint8
416 Type uint8
417 Index uint16
418 Pad_cgo_0 [2]byte
419 Flags int32
420 Addrs int32
421 Pid int32
422 Seq int32
423 Errno int32
424 Fmask int32
425 Inits uint32
426 Rmx RtMetrics
464 Msglen uint16
465 Version uint8
466 Type uint8
467 Index uint16
468 _ [2]byte
469 Flags int32
470 Addrs int32
471 Pid int32
472 Seq int32
473 Errno int32
474 Fmask int32
475 Inits uint32
476 Rmx RtMetrics
427477 }
428478
429479 type RtMetrics struct {
480530 }
481531
482532 type BpfHdr struct {
483 Tstamp Timeval
484 Caplen uint32
485 Datalen uint32
486 Hdrlen uint16
487 Pad_cgo_0 [6]byte
533 Tstamp Timeval
534 Caplen uint32
535 Datalen uint32
536 Hdrlen uint16
537 _ [6]byte
488538 }
489539
490540 type BpfZbufHeader struct {
491541 Kernel_gen uint32
492542 Kernel_len uint32
493543 User_gen uint32
494 X_bzh_pad [5]uint32
544 _ [5]uint32
495545 }
496546
497547 type Termios struct {
518568 AT_SYMLINK_NOFOLLOW = 0x200
519569 )
520570
571 type PollFd struct {
572 Fd int32
573 Events int16
574 Revents int16
575 }
576
577 const (
578 POLLERR = 0x8
579 POLLHUP = 0x10
580 POLLIN = 0x1
581 POLLINIGNEOF = 0x2000
582 POLLNVAL = 0x20
583 POLLOUT = 0x4
584 POLLPRI = 0x2
585 POLLRDBAND = 0x80
586 POLLRDNORM = 0x40
587 POLLWRBAND = 0x100
588 POLLWRNORM = 0x4
589 )
590
521591 type CapRights struct {
522592 Rights [2]uint64
523593 }
594
595 type Utsname struct {
596 Sysname [256]byte
597 Nodename [256]byte
598 Release [256]byte
599 Version [256]byte
600 Machine [256]byte
601 }
0 // cgo -godefs types_freebsd.go | go run mkpost.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build arm64,freebsd
4
5 package unix
6
7 const (
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
13 )
14
15 type (
16 _C_short int16
17 _C_int int32
18 _C_long int64
19 _C_long_long int64
20 )
21
22 type Timespec struct {
23 Sec int64
24 Nsec int64
25 }
26
27 type Timeval struct {
28 Sec int64
29 Usec int64
30 }
31
32 type Rusage struct {
33 Utime Timeval
34 Stime Timeval
35 Maxrss int64
36 Ixrss int64
37 Idrss int64
38 Isrss int64
39 Minflt int64
40 Majflt int64
41 Nswap int64
42 Inblock int64
43 Oublock int64
44 Msgsnd int64
45 Msgrcv int64
46 Nsignals int64
47 Nvcsw int64
48 Nivcsw int64
49 }
50
51 type Rlimit struct {
52 Cur int64
53 Max int64
54 }
55
56 type _Gid_t uint32
57
58 const (
59 _statfsVersion = 0x20140518
60 _dirblksiz = 0x400
61 )
62
63 type Stat_t struct {
64 Dev uint64
65 Ino uint64
66 Nlink uint64
67 Mode uint16
68 _0 int16
69 Uid uint32
70 Gid uint32
71 _1 int32
72 Rdev uint64
73 Atim Timespec
74 Mtim Timespec
75 Ctim Timespec
76 Birthtim Timespec
77 Size int64
78 Blocks int64
79 Blksize int32
80 Flags uint32
81 Gen uint64
82 Spare [10]uint64
83 }
84
85 type stat_freebsd11_t struct {
86 Dev uint32
87 Ino uint32
88 Mode uint16
89 Nlink uint16
90 Uid uint32
91 Gid uint32
92 Rdev uint32
93 Atim Timespec
94 Mtim Timespec
95 Ctim Timespec
96 Size int64
97 Blocks int64
98 Blksize int32
99 Flags uint32
100 Gen uint32
101 Lspare int32
102 Birthtim Timespec
103 }
104
105 type Statfs_t struct {
106 Version uint32
107 Type uint32
108 Flags uint64
109 Bsize uint64
110 Iosize uint64
111 Blocks uint64
112 Bfree uint64
113 Bavail int64
114 Files uint64
115 Ffree int64
116 Syncwrites uint64
117 Asyncwrites uint64
118 Syncreads uint64
119 Asyncreads uint64
120 Spare [10]uint64
121 Namemax uint32
122 Owner uint32
123 Fsid Fsid
124 Charspare [80]int8
125 Fstypename [16]int8
126 Mntfromname [1024]int8
127 Mntonname [1024]int8
128 }
129
130 type statfs_freebsd11_t struct {
131 Version uint32
132 Type uint32
133 Flags uint64
134 Bsize uint64
135 Iosize uint64
136 Blocks uint64
137 Bfree uint64
138 Bavail int64
139 Files uint64
140 Ffree int64
141 Syncwrites uint64
142 Asyncwrites uint64
143 Syncreads uint64
144 Asyncreads uint64
145 Spare [10]uint64
146 Namemax uint32
147 Owner uint32
148 Fsid Fsid
149 Charspare [80]int8
150 Fstypename [16]int8
151 Mntfromname [88]int8
152 Mntonname [88]int8
153 }
154
155 type Flock_t struct {
156 Start int64
157 Len int64
158 Pid int32
159 Type int16
160 Whence int16
161 Sysid int32
162 _ [4]byte
163 }
164
165 type Dirent struct {
166 Fileno uint64
167 Off int64
168 Reclen uint16
169 Type uint8
170 Pad0 uint8
171 Namlen uint16
172 Pad1 uint16
173 Name [256]int8
174 }
175
176 type dirent_freebsd11 struct {
177 Fileno uint32
178 Reclen uint16
179 Type uint8
180 Namlen uint8
181 Name [256]int8
182 }
183
184 type Fsid struct {
185 Val [2]int32
186 }
187
188 const (
189 PathMax = 0x400
190 )
191
192 const (
193 FADV_NORMAL = 0x0
194 FADV_RANDOM = 0x1
195 FADV_SEQUENTIAL = 0x2
196 FADV_WILLNEED = 0x3
197 FADV_DONTNEED = 0x4
198 FADV_NOREUSE = 0x5
199 )
200
201 type RawSockaddrInet4 struct {
202 Len uint8
203 Family uint8
204 Port uint16
205 Addr [4]byte /* in_addr */
206 Zero [8]int8
207 }
208
209 type RawSockaddrInet6 struct {
210 Len uint8
211 Family uint8
212 Port uint16
213 Flowinfo uint32
214 Addr [16]byte /* in6_addr */
215 Scope_id uint32
216 }
217
218 type RawSockaddrUnix struct {
219 Len uint8
220 Family uint8
221 Path [104]int8
222 }
223
224 type RawSockaddrDatalink struct {
225 Len uint8
226 Family uint8
227 Index uint16
228 Type uint8
229 Nlen uint8
230 Alen uint8
231 Slen uint8
232 Data [46]int8
233 }
234
235 type RawSockaddr struct {
236 Len uint8
237 Family uint8
238 Data [14]int8
239 }
240
241 type RawSockaddrAny struct {
242 Addr RawSockaddr
243 Pad [92]int8
244 }
245
246 type _Socklen uint32
247
248 type Linger struct {
249 Onoff int32
250 Linger int32
251 }
252
253 type Iovec struct {
254 Base *byte
255 Len uint64
256 }
257
258 type IPMreq struct {
259 Multiaddr [4]byte /* in_addr */
260 Interface [4]byte /* in_addr */
261 }
262
263 type IPMreqn struct {
264 Multiaddr [4]byte /* in_addr */
265 Address [4]byte /* in_addr */
266 Ifindex int32
267 }
268
269 type IPv6Mreq struct {
270 Multiaddr [16]byte /* in6_addr */
271 Interface uint32
272 }
273
274 type Msghdr struct {
275 Name *byte
276 Namelen uint32
277 _ [4]byte
278 Iov *Iovec
279 Iovlen int32
280 _ [4]byte
281 Control *byte
282 Controllen uint32
283 Flags int32
284 }
285
286 type Cmsghdr struct {
287 Len uint32
288 Level int32
289 Type int32
290 }
291
292 type Inet6Pktinfo struct {
293 Addr [16]byte /* in6_addr */
294 Ifindex uint32
295 }
296
297 type IPv6MTUInfo struct {
298 Addr RawSockaddrInet6
299 Mtu uint32
300 }
301
302 type ICMPv6Filter struct {
303 Filt [8]uint32
304 }
305
306 const (
307 SizeofSockaddrInet4 = 0x10
308 SizeofSockaddrInet6 = 0x1c
309 SizeofSockaddrAny = 0x6c
310 SizeofSockaddrUnix = 0x6a
311 SizeofSockaddrDatalink = 0x36
312 SizeofLinger = 0x8
313 SizeofIPMreq = 0x8
314 SizeofIPMreqn = 0xc
315 SizeofIPv6Mreq = 0x14
316 SizeofMsghdr = 0x30
317 SizeofCmsghdr = 0xc
318 SizeofInet6Pktinfo = 0x14
319 SizeofIPv6MTUInfo = 0x20
320 SizeofICMPv6Filter = 0x20
321 )
322
323 const (
324 PTRACE_TRACEME = 0x0
325 PTRACE_CONT = 0x7
326 PTRACE_KILL = 0x8
327 )
328
329 type Kevent_t struct {
330 Ident uint64
331 Filter int16
332 Flags uint16
333 Fflags uint32
334 Data int64
335 Udata *byte
336 }
337
338 type FdSet struct {
339 Bits [16]uint64
340 }
341
342 const (
343 sizeofIfMsghdr = 0xa8
344 SizeofIfMsghdr = 0xa8
345 sizeofIfData = 0x98
346 SizeofIfData = 0x98
347 SizeofIfaMsghdr = 0x14
348 SizeofIfmaMsghdr = 0x10
349 SizeofIfAnnounceMsghdr = 0x18
350 SizeofRtMsghdr = 0x98
351 SizeofRtMetrics = 0x70
352 )
353
354 type ifMsghdr struct {
355 Msglen uint16
356 Version uint8
357 Type uint8
358 Addrs int32
359 Flags int32
360 Index uint16
361 _ [2]byte
362 Data ifData
363 }
364
365 type IfMsghdr struct {
366 Msglen uint16
367 Version uint8
368 Type uint8
369 Addrs int32
370 Flags int32
371 Index uint16
372 _ [2]byte
373 Data IfData
374 }
375
376 type ifData struct {
377 Type uint8
378 Physical uint8
379 Addrlen uint8
380 Hdrlen uint8
381 Link_state uint8
382 Vhid uint8
383 Datalen uint16
384 Mtu uint32
385 Metric uint32
386 Baudrate uint64
387 Ipackets uint64
388 Ierrors uint64
389 Opackets uint64
390 Oerrors uint64
391 Collisions uint64
392 Ibytes uint64
393 Obytes uint64
394 Imcasts uint64
395 Omcasts uint64
396 Iqdrops uint64
397 Oqdrops uint64
398 Noproto uint64
399 Hwassist uint64
400 _ [8]byte
401 _ [16]byte
402 }
403
404 type IfData struct {
405 Type uint8
406 Physical uint8
407 Addrlen uint8
408 Hdrlen uint8
409 Link_state uint8
410 Spare_char1 uint8
411 Spare_char2 uint8
412 Datalen uint8
413 Mtu uint64
414 Metric uint64
415 Baudrate uint64
416 Ipackets uint64
417 Ierrors uint64
418 Opackets uint64
419 Oerrors uint64
420 Collisions uint64
421 Ibytes uint64
422 Obytes uint64
423 Imcasts uint64
424 Omcasts uint64
425 Iqdrops uint64
426 Noproto uint64
427 Hwassist uint64
428 Epoch int64
429 Lastchange Timeval
430 }
431
432 type IfaMsghdr struct {
433 Msglen uint16
434 Version uint8
435 Type uint8
436 Addrs int32
437 Flags int32
438 Index uint16
439 _ [2]byte
440 Metric int32
441 }
442
443 type IfmaMsghdr struct {
444 Msglen uint16
445 Version uint8
446 Type uint8
447 Addrs int32
448 Flags int32
449 Index uint16
450 _ [2]byte
451 }
452
453 type IfAnnounceMsghdr struct {
454 Msglen uint16
455 Version uint8
456 Type uint8
457 Index uint16
458 Name [16]int8
459 What uint16
460 }
461
462 type RtMsghdr struct {
463 Msglen uint16
464 Version uint8
465 Type uint8
466 Index uint16
467 _ [2]byte
468 Flags int32
469 Addrs int32
470 Pid int32
471 Seq int32
472 Errno int32
473 Fmask int32
474 Inits uint64
475 Rmx RtMetrics
476 }
477
478 type RtMetrics struct {
479 Locks uint64
480 Mtu uint64
481 Hopcount uint64
482 Expire uint64
483 Recvpipe uint64
484 Sendpipe uint64
485 Ssthresh uint64
486 Rtt uint64
487 Rttvar uint64
488 Pksent uint64
489 Weight uint64
490 Filler [3]uint64
491 }
492
493 const (
494 SizeofBpfVersion = 0x4
495 SizeofBpfStat = 0x8
496 SizeofBpfZbuf = 0x18
497 SizeofBpfProgram = 0x10
498 SizeofBpfInsn = 0x8
499 SizeofBpfHdr = 0x20
500 SizeofBpfZbufHeader = 0x20
501 )
502
503 type BpfVersion struct {
504 Major uint16
505 Minor uint16
506 }
507
508 type BpfStat struct {
509 Recv uint32
510 Drop uint32
511 }
512
513 type BpfZbuf struct {
514 Bufa *byte
515 Bufb *byte
516 Buflen uint64
517 }
518
519 type BpfProgram struct {
520 Len uint32
521 _ [4]byte
522 Insns *BpfInsn
523 }
524
525 type BpfInsn struct {
526 Code uint16
527 Jt uint8
528 Jf uint8
529 K uint32
530 }
531
532 type BpfHdr struct {
533 Tstamp Timeval
534 Caplen uint32
535 Datalen uint32
536 Hdrlen uint16
537 _ [6]byte
538 }
539
540 type BpfZbufHeader struct {
541 Kernel_gen uint32
542 Kernel_len uint32
543 User_gen uint32
544 _ [5]uint32
545 }
546
547 type Termios struct {
548 Iflag uint32
549 Oflag uint32
550 Cflag uint32
551 Lflag uint32
552 Cc [20]uint8
553 Ispeed uint32
554 Ospeed uint32
555 }
556
557 type Winsize struct {
558 Row uint16
559 Col uint16
560 Xpixel uint16
561 Ypixel uint16
562 }
563
564 const (
565 AT_FDCWD = -0x64
566 AT_REMOVEDIR = 0x800
567 AT_SYMLINK_FOLLOW = 0x400
568 AT_SYMLINK_NOFOLLOW = 0x200
569 )
570
571 type PollFd struct {
572 Fd int32
573 Events int16
574 Revents int16
575 }
576
577 const (
578 POLLERR = 0x8
579 POLLHUP = 0x10
580 POLLIN = 0x1
581 POLLINIGNEOF = 0x2000
582 POLLNVAL = 0x20
583 POLLOUT = 0x4
584 POLLPRI = 0x2
585 POLLRDBAND = 0x80
586 POLLRDNORM = 0x40
587 POLLWRBAND = 0x100
588 POLLWRNORM = 0x4
589 )
590
591 type CapRights struct {
592 Rights [2]uint64
593 }
594
595 type Utsname struct {
596 Sysname [256]byte
597 Nodename [256]byte
598 Release [256]byte
599 Version [256]byte
600 Machine [256]byte
601 }
55 package unix
66
77 const (
8 sizeofPtr = 0x4
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x4
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x4
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x4
12 SizeofLongLong = 0x8
1313 PathMax = 0x1000
1414 )
1515
5151 Errcnt int32
5252 Stbcnt int32
5353 Tai int32
54 Pad_cgo_0 [44]byte
54 _ [44]byte
5555 }
5656
5757 type Time_t int32
9595 type _Gid_t uint32
9696
9797 type Stat_t struct {
98 Dev uint64
99 X__pad1 uint16
100 Pad_cgo_0 [2]byte
101 X__st_ino uint32
102 Mode uint32
103 Nlink uint32
104 Uid uint32
105 Gid uint32
106 Rdev uint64
107 X__pad2 uint16
108 Pad_cgo_1 [2]byte
109 Size int64
110 Blksize int32
111 Blocks int64
112 Atim Timespec
113 Mtim Timespec
114 Ctim Timespec
115 Ino uint64
116 }
117
118 type Statfs_t struct {
119 Type int32
120 Bsize int32
121 Blocks uint64
122 Bfree uint64
123 Bavail uint64
124 Files uint64
125 Ffree uint64
126 Fsid Fsid
127 Namelen int32
128 Frsize int32
129 Flags int32
130 Spare [4]int32
98 Dev uint64
99 _ uint16
100 _ uint32
101 Mode uint32
102 Nlink uint32
103 Uid uint32
104 Gid uint32
105 Rdev uint64
106 _ uint16
107 Size int64
108 Blksize int32
109 Blocks int64
110 Atim Timespec
111 Mtim Timespec
112 Ctim Timespec
113 Ino uint64
114 }
115
116 type StatxTimestamp struct {
117 Sec int64
118 Nsec uint32
119 _ int32
120 }
121
122 type Statx_t struct {
123 Mask uint32
124 Blksize uint32
125 Attributes uint64
126 Nlink uint32
127 Uid uint32
128 Gid uint32
129 Mode uint16
130 _ [1]uint16
131 Ino uint64
132 Size uint64
133 Blocks uint64
134 Attributes_mask uint64
135 Atime StatxTimestamp
136 Btime StatxTimestamp
137 Ctime StatxTimestamp
138 Mtime StatxTimestamp
139 Rdev_major uint32
140 Rdev_minor uint32
141 Dev_major uint32
142 Dev_minor uint32
143 _ [14]uint64
131144 }
132145
133146 type Dirent struct {
134 Ino uint64
135 Off int64
136 Reclen uint16
137 Type uint8
138 Name [256]int8
139 Pad_cgo_0 [1]byte
147 Ino uint64
148 Off int64
149 Reclen uint16
150 Type uint8
151 Name [256]int8
152 _ [1]byte
140153 }
141154
142155 type Fsid struct {
143 X__val [2]int32
156 Val [2]int32
144157 }
145158
146159 type Flock_t struct {
223236 Channel uint16
224237 }
225238
239 type RawSockaddrL2 struct {
240 Family uint16
241 Psm uint16
242 Bdaddr [6]uint8
243 Cid uint16
244 Bdaddr_type uint8
245 _ [1]byte
246 }
247
248 type RawSockaddrRFCOMM struct {
249 Family uint16
250 Bdaddr [6]uint8
251 Channel uint8
252 _ [1]byte
253 }
254
226255 type RawSockaddrCAN struct {
227 Family uint16
228 Pad_cgo_0 [2]byte
229 Ifindex int32
230 Addr [8]byte
256 Family uint16
257 Ifindex int32
258 Addr [8]byte
231259 }
232260
233261 type RawSockaddrALG struct {
245273 Cid uint32
246274 Zero [4]uint8
247275 }
276
277 type RawSockaddrXDP struct {
278 Family uint16
279 Flags uint16
280 Ifindex uint32
281 Queue_id uint32
282 Shared_umem_fd uint32
283 }
284
285 type RawSockaddrPPPoX [0x1e]byte
248286
249287 type RawSockaddr struct {
250288 Family uint16
340378 Probes uint8
341379 Backoff uint8
342380 Options uint8
343 Pad_cgo_0 [2]byte
344381 Rto uint32
345382 Ato uint32
346383 Snd_mss uint32
375412 SizeofSockaddrLinklayer = 0x14
376413 SizeofSockaddrNetlink = 0xc
377414 SizeofSockaddrHCI = 0x6
415 SizeofSockaddrL2 = 0xe
416 SizeofSockaddrRFCOMM = 0xa
378417 SizeofSockaddrCAN = 0x10
379418 SizeofSockaddrALG = 0x58
380419 SizeofSockaddrVM = 0x10
420 SizeofSockaddrXDP = 0x10
421 SizeofSockaddrPPPoX = 0x1e
381422 SizeofLinger = 0x8
382423 SizeofIovec = 0x8
383424 SizeofIPMreq = 0x8
395436 )
396437
397438 const (
398 IFA_UNSPEC = 0x0
399 IFA_ADDRESS = 0x1
400 IFA_LOCAL = 0x2
401 IFA_LABEL = 0x3
402 IFA_BROADCAST = 0x4
403 IFA_ANYCAST = 0x5
404 IFA_CACHEINFO = 0x6
405 IFA_MULTICAST = 0x7
406 IFLA_UNSPEC = 0x0
407 IFLA_ADDRESS = 0x1
408 IFLA_BROADCAST = 0x2
409 IFLA_IFNAME = 0x3
410 IFLA_MTU = 0x4
411 IFLA_LINK = 0x5
412 IFLA_QDISC = 0x6
413 IFLA_STATS = 0x7
414 IFLA_COST = 0x8
415 IFLA_PRIORITY = 0x9
416 IFLA_MASTER = 0xa
417 IFLA_WIRELESS = 0xb
418 IFLA_PROTINFO = 0xc
419 IFLA_TXQLEN = 0xd
420 IFLA_MAP = 0xe
421 IFLA_WEIGHT = 0xf
422 IFLA_OPERSTATE = 0x10
423 IFLA_LINKMODE = 0x11
424 IFLA_LINKINFO = 0x12
425 IFLA_NET_NS_PID = 0x13
426 IFLA_IFALIAS = 0x14
427 IFLA_MAX = 0x2c
428 RT_SCOPE_UNIVERSE = 0x0
429 RT_SCOPE_SITE = 0xc8
430 RT_SCOPE_LINK = 0xfd
431 RT_SCOPE_HOST = 0xfe
432 RT_SCOPE_NOWHERE = 0xff
433 RT_TABLE_UNSPEC = 0x0
434 RT_TABLE_COMPAT = 0xfc
435 RT_TABLE_DEFAULT = 0xfd
436 RT_TABLE_MAIN = 0xfe
437 RT_TABLE_LOCAL = 0xff
438 RT_TABLE_MAX = 0xffffffff
439 RTA_UNSPEC = 0x0
440 RTA_DST = 0x1
441 RTA_SRC = 0x2
442 RTA_IIF = 0x3
443 RTA_OIF = 0x4
444 RTA_GATEWAY = 0x5
445 RTA_PRIORITY = 0x6
446 RTA_PREFSRC = 0x7
447 RTA_METRICS = 0x8
448 RTA_MULTIPATH = 0x9
449 RTA_FLOW = 0xb
450 RTA_CACHEINFO = 0xc
451 RTA_TABLE = 0xf
452 RTN_UNSPEC = 0x0
453 RTN_UNICAST = 0x1
454 RTN_LOCAL = 0x2
455 RTN_BROADCAST = 0x3
456 RTN_ANYCAST = 0x4
457 RTN_MULTICAST = 0x5
458 RTN_BLACKHOLE = 0x6
459 RTN_UNREACHABLE = 0x7
460 RTN_PROHIBIT = 0x8
461 RTN_THROW = 0x9
462 RTN_NAT = 0xa
463 RTN_XRESOLVE = 0xb
464 RTNLGRP_NONE = 0x0
465 RTNLGRP_LINK = 0x1
466 RTNLGRP_NOTIFY = 0x2
467 RTNLGRP_NEIGH = 0x3
468 RTNLGRP_TC = 0x4
469 RTNLGRP_IPV4_IFADDR = 0x5
470 RTNLGRP_IPV4_MROUTE = 0x6
471 RTNLGRP_IPV4_ROUTE = 0x7
472 RTNLGRP_IPV4_RULE = 0x8
473 RTNLGRP_IPV6_IFADDR = 0x9
474 RTNLGRP_IPV6_MROUTE = 0xa
475 RTNLGRP_IPV6_ROUTE = 0xb
476 RTNLGRP_IPV6_IFINFO = 0xc
477 RTNLGRP_IPV6_PREFIX = 0x12
478 RTNLGRP_IPV6_RULE = 0x13
479 RTNLGRP_ND_USEROPT = 0x14
480 SizeofNlMsghdr = 0x10
481 SizeofNlMsgerr = 0x14
482 SizeofRtGenmsg = 0x1
483 SizeofNlAttr = 0x4
484 SizeofRtAttr = 0x4
485 SizeofIfInfomsg = 0x10
486 SizeofIfAddrmsg = 0x8
487 SizeofRtMsg = 0xc
488 SizeofRtNexthop = 0x8
439 IFA_UNSPEC = 0x0
440 IFA_ADDRESS = 0x1
441 IFA_LOCAL = 0x2
442 IFA_LABEL = 0x3
443 IFA_BROADCAST = 0x4
444 IFA_ANYCAST = 0x5
445 IFA_CACHEINFO = 0x6
446 IFA_MULTICAST = 0x7
447 IFLA_UNSPEC = 0x0
448 IFLA_ADDRESS = 0x1
449 IFLA_BROADCAST = 0x2
450 IFLA_IFNAME = 0x3
451 IFLA_INFO_KIND = 0x1
452 IFLA_MTU = 0x4
453 IFLA_LINK = 0x5
454 IFLA_QDISC = 0x6
455 IFLA_STATS = 0x7
456 IFLA_COST = 0x8
457 IFLA_PRIORITY = 0x9
458 IFLA_MASTER = 0xa
459 IFLA_WIRELESS = 0xb
460 IFLA_PROTINFO = 0xc
461 IFLA_TXQLEN = 0xd
462 IFLA_MAP = 0xe
463 IFLA_WEIGHT = 0xf
464 IFLA_OPERSTATE = 0x10
465 IFLA_LINKMODE = 0x11
466 IFLA_LINKINFO = 0x12
467 IFLA_NET_NS_PID = 0x13
468 IFLA_IFALIAS = 0x14
469 IFLA_NUM_VF = 0x15
470 IFLA_VFINFO_LIST = 0x16
471 IFLA_STATS64 = 0x17
472 IFLA_VF_PORTS = 0x18
473 IFLA_PORT_SELF = 0x19
474 IFLA_AF_SPEC = 0x1a
475 IFLA_GROUP = 0x1b
476 IFLA_NET_NS_FD = 0x1c
477 IFLA_EXT_MASK = 0x1d
478 IFLA_PROMISCUITY = 0x1e
479 IFLA_NUM_TX_QUEUES = 0x1f
480 IFLA_NUM_RX_QUEUES = 0x20
481 IFLA_CARRIER = 0x21
482 IFLA_PHYS_PORT_ID = 0x22
483 IFLA_CARRIER_CHANGES = 0x23
484 IFLA_PHYS_SWITCH_ID = 0x24
485 IFLA_LINK_NETNSID = 0x25
486 IFLA_PHYS_PORT_NAME = 0x26
487 IFLA_PROTO_DOWN = 0x27
488 IFLA_GSO_MAX_SEGS = 0x28
489 IFLA_GSO_MAX_SIZE = 0x29
490 IFLA_PAD = 0x2a
491 IFLA_XDP = 0x2b
492 IFLA_EVENT = 0x2c
493 IFLA_NEW_NETNSID = 0x2d
494 IFLA_IF_NETNSID = 0x2e
495 IFLA_MAX = 0x33
496 RT_SCOPE_UNIVERSE = 0x0
497 RT_SCOPE_SITE = 0xc8
498 RT_SCOPE_LINK = 0xfd
499 RT_SCOPE_HOST = 0xfe
500 RT_SCOPE_NOWHERE = 0xff
501 RT_TABLE_UNSPEC = 0x0
502 RT_TABLE_COMPAT = 0xfc
503 RT_TABLE_DEFAULT = 0xfd
504 RT_TABLE_MAIN = 0xfe
505 RT_TABLE_LOCAL = 0xff
506 RT_TABLE_MAX = 0xffffffff
507 RTA_UNSPEC = 0x0
508 RTA_DST = 0x1
509 RTA_SRC = 0x2
510 RTA_IIF = 0x3
511 RTA_OIF = 0x4
512 RTA_GATEWAY = 0x5
513 RTA_PRIORITY = 0x6
514 RTA_PREFSRC = 0x7
515 RTA_METRICS = 0x8
516 RTA_MULTIPATH = 0x9
517 RTA_FLOW = 0xb
518 RTA_CACHEINFO = 0xc
519 RTA_TABLE = 0xf
520 RTA_MARK = 0x10
521 RTA_MFC_STATS = 0x11
522 RTA_VIA = 0x12
523 RTA_NEWDST = 0x13
524 RTA_PREF = 0x14
525 RTA_ENCAP_TYPE = 0x15
526 RTA_ENCAP = 0x16
527 RTA_EXPIRES = 0x17
528 RTA_PAD = 0x18
529 RTA_UID = 0x19
530 RTA_TTL_PROPAGATE = 0x1a
531 RTA_IP_PROTO = 0x1b
532 RTA_SPORT = 0x1c
533 RTA_DPORT = 0x1d
534 RTN_UNSPEC = 0x0
535 RTN_UNICAST = 0x1
536 RTN_LOCAL = 0x2
537 RTN_BROADCAST = 0x3
538 RTN_ANYCAST = 0x4
539 RTN_MULTICAST = 0x5
540 RTN_BLACKHOLE = 0x6
541 RTN_UNREACHABLE = 0x7
542 RTN_PROHIBIT = 0x8
543 RTN_THROW = 0x9
544 RTN_NAT = 0xa
545 RTN_XRESOLVE = 0xb
546 RTNLGRP_NONE = 0x0
547 RTNLGRP_LINK = 0x1
548 RTNLGRP_NOTIFY = 0x2
549 RTNLGRP_NEIGH = 0x3
550 RTNLGRP_TC = 0x4
551 RTNLGRP_IPV4_IFADDR = 0x5
552 RTNLGRP_IPV4_MROUTE = 0x6
553 RTNLGRP_IPV4_ROUTE = 0x7
554 RTNLGRP_IPV4_RULE = 0x8
555 RTNLGRP_IPV6_IFADDR = 0x9
556 RTNLGRP_IPV6_MROUTE = 0xa
557 RTNLGRP_IPV6_ROUTE = 0xb
558 RTNLGRP_IPV6_IFINFO = 0xc
559 RTNLGRP_IPV6_PREFIX = 0x12
560 RTNLGRP_IPV6_RULE = 0x13
561 RTNLGRP_ND_USEROPT = 0x14
562 SizeofNlMsghdr = 0x10
563 SizeofNlMsgerr = 0x14
564 SizeofRtGenmsg = 0x1
565 SizeofNlAttr = 0x4
566 SizeofRtAttr = 0x4
567 SizeofIfInfomsg = 0x10
568 SizeofIfAddrmsg = 0x8
569 SizeofRtMsg = 0xc
570 SizeofRtNexthop = 0x8
489571 )
490572
491573 type NlMsghdr struct {
516598 }
517599
518600 type IfInfomsg struct {
519 Family uint8
520 X__ifi_pad uint8
521 Type uint16
522 Index int32
523 Flags uint32
524 Change uint32
601 Family uint8
602 _ uint8
603 Type uint16
604 Index int32
605 Flags uint32
606 Change uint32
525607 }
526608
527609 type IfAddrmsg struct {
564646 }
565647
566648 type SockFprog struct {
567 Len uint16
568 Pad_cgo_0 [2]byte
569 Filter *SockFilter
649 Len uint16
650 Filter *SockFilter
570651 }
571652
572653 type InotifyEvent struct {
616697 Totalhigh uint32
617698 Freehigh uint32
618699 Unit uint32
619 X_f [8]int8
700 _ [8]int8
620701 }
621702
622703 type Utsname struct {
623 Sysname [65]int8
624 Nodename [65]int8
625 Release [65]int8
626 Version [65]int8
627 Machine [65]int8
628 Domainname [65]int8
704 Sysname [65]byte
705 Nodename [65]byte
706 Release [65]byte
707 Version [65]byte
708 Machine [65]byte
709 Domainname [65]byte
629710 }
630711
631712 type Ustat_t struct {
642723 }
643724
644725 const (
645 AT_FDCWD = -0x64
646 AT_REMOVEDIR = 0x200
726 AT_EMPTY_PATH = 0x1000
727 AT_FDCWD = -0x64
728 AT_NO_AUTOMOUNT = 0x800
729 AT_REMOVEDIR = 0x200
730
731 AT_STATX_SYNC_AS_STAT = 0x0
732 AT_STATX_FORCE_SYNC = 0x2000
733 AT_STATX_DONT_SYNC = 0x4000
734
647735 AT_SYMLINK_FOLLOW = 0x400
648736 AT_SYMLINK_NOFOLLOW = 0x100
737
738 AT_EACCESS = 0x200
649739 )
650740
651741 type PollFd struct {
665755 )
666756
667757 type Sigset_t struct {
668 X__val [32]uint32
758 Val [32]uint32
759 }
760
761 type SignalfdSiginfo struct {
762 Signo uint32
763 Errno int32
764 Code int32
765 Pid uint32
766 Uid uint32
767 Fd int32
768 Tid uint32
769 Band uint32
770 Overrun uint32
771 Trapno uint32
772 Status int32
773 Int int32
774 Ptr uint64
775 Utime uint64
776 Stime uint64
777 Addr uint64
778 _ [48]uint8
669779 }
670780
671781 const RNDGETENTCNT = 0x80045200
692802
693803 type Taskstats struct {
694804 Version uint16
695 Pad_cgo_0 [2]byte
696805 Ac_exitcode uint32
697806 Ac_flag uint8
698807 Ac_nice uint8
699 Pad_cgo_1 [6]byte
808 _ [4]byte
700809 Cpu_count uint64
701810 Cpu_delay_total uint64
702811 Blkio_count uint64
708817 Ac_comm [32]int8
709818 Ac_sched uint8
710819 Ac_pad [3]uint8
711 Pad_cgo_2 [4]byte
820 _ [4]byte
712821 Ac_uid uint32
713822 Ac_gid uint32
714823 Ac_pid uint32
715824 Ac_ppid uint32
716825 Ac_btime uint32
717 Pad_cgo_3 [4]byte
826 _ [4]byte
718827 Ac_etime uint64
719828 Ac_utime uint64
720829 Ac_stime uint64
738847 Cpu_scaled_run_real_total uint64
739848 Freepages_count uint64
740849 Freepages_delay_total uint64
850 Thrashing_count uint64
851 Thrashing_delay_total uint64
741852 }
742853
743854 const (
756867 TASKSTATS_CMD_ATTR_TGID = 0x2
757868 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
758869 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
870 )
871
872 type CGroupStats struct {
873 Sleeping uint64
874 Running uint64
875 Stopped uint64
876 Uninterruptible uint64
877 Io_wait uint64
878 }
879
880 const (
881 CGROUPSTATS_CMD_UNSPEC = 0x3
882 CGROUPSTATS_CMD_GET = 0x4
883 CGROUPSTATS_CMD_NEW = 0x5
884 CGROUPSTATS_TYPE_UNSPEC = 0x0
885 CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
886 CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
887 CGROUPSTATS_CMD_ATTR_FD = 0x1
759888 )
760889
761890 type Genlmsghdr struct {
790919 CTRL_ATTR_MCAST_GRP_NAME = 0x1
791920 CTRL_ATTR_MCAST_GRP_ID = 0x2
792921 )
922
923 type cpuMask uint32
924
925 const (
926 _CPU_SETSIZE = 0x400
927 _NCPUBITS = 0x20
928 )
929
930 const (
931 BDADDR_BREDR = 0x0
932 BDADDR_LE_PUBLIC = 0x1
933 BDADDR_LE_RANDOM = 0x2
934 )
935
936 type PerfEventAttr struct {
937 Type uint32
938 Size uint32
939 Config uint64
940 Sample uint64
941 Sample_type uint64
942 Read_format uint64
943 Bits uint64
944 Wakeup uint32
945 Bp_type uint32
946 Ext1 uint64
947 Ext2 uint64
948 Branch_sample_type uint64
949 Sample_regs_user uint64
950 Sample_stack_user uint32
951 Clockid int32
952 Sample_regs_intr uint64
953 Aux_watermark uint32
954 _ uint32
955 }
956
957 type PerfEventMmapPage struct {
958 Version uint32
959 Compat_version uint32
960 Lock uint32
961 Index uint32
962 Offset int64
963 Time_enabled uint64
964 Time_running uint64
965 Capabilities uint64
966 Pmc_width uint16
967 Time_shift uint16
968 Time_mult uint32
969 Time_offset uint64
970 Time_zero uint64
971 Size uint32
972 _ [948]uint8
973 Data_head uint64
974 Data_tail uint64
975 Data_offset uint64
976 Data_size uint64
977 Aux_head uint64
978 Aux_tail uint64
979 Aux_offset uint64
980 Aux_size uint64
981 }
982
983 const (
984 PerfBitDisabled uint64 = CBitFieldMaskBit0
985 PerfBitInherit = CBitFieldMaskBit1
986 PerfBitPinned = CBitFieldMaskBit2
987 PerfBitExclusive = CBitFieldMaskBit3
988 PerfBitExcludeUser = CBitFieldMaskBit4
989 PerfBitExcludeKernel = CBitFieldMaskBit5
990 PerfBitExcludeHv = CBitFieldMaskBit6
991 PerfBitExcludeIdle = CBitFieldMaskBit7
992 PerfBitMmap = CBitFieldMaskBit8
993 PerfBitComm = CBitFieldMaskBit9
994 PerfBitFreq = CBitFieldMaskBit10
995 PerfBitInheritStat = CBitFieldMaskBit11
996 PerfBitEnableOnExec = CBitFieldMaskBit12
997 PerfBitTask = CBitFieldMaskBit13
998 PerfBitWatermark = CBitFieldMaskBit14
999 PerfBitPreciseIPBit1 = CBitFieldMaskBit15
1000 PerfBitPreciseIPBit2 = CBitFieldMaskBit16
1001 PerfBitMmapData = CBitFieldMaskBit17
1002 PerfBitSampleIDAll = CBitFieldMaskBit18
1003 PerfBitExcludeHost = CBitFieldMaskBit19
1004 PerfBitExcludeGuest = CBitFieldMaskBit20
1005 PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
1006 PerfBitExcludeCallchainUser = CBitFieldMaskBit22
1007 PerfBitMmap2 = CBitFieldMaskBit23
1008 PerfBitCommExec = CBitFieldMaskBit24
1009 PerfBitUseClockID = CBitFieldMaskBit25
1010 PerfBitContextSwitch = CBitFieldMaskBit26
1011 )
1012
1013 const (
1014 PERF_TYPE_HARDWARE = 0x0
1015 PERF_TYPE_SOFTWARE = 0x1
1016 PERF_TYPE_TRACEPOINT = 0x2
1017 PERF_TYPE_HW_CACHE = 0x3
1018 PERF_TYPE_RAW = 0x4
1019 PERF_TYPE_BREAKPOINT = 0x5
1020
1021 PERF_COUNT_HW_CPU_CYCLES = 0x0
1022 PERF_COUNT_HW_INSTRUCTIONS = 0x1
1023 PERF_COUNT_HW_CACHE_REFERENCES = 0x2
1024 PERF_COUNT_HW_CACHE_MISSES = 0x3
1025 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
1026 PERF_COUNT_HW_BRANCH_MISSES = 0x5
1027 PERF_COUNT_HW_BUS_CYCLES = 0x6
1028 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
1029 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
1030 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
1031
1032 PERF_COUNT_HW_CACHE_L1D = 0x0
1033 PERF_COUNT_HW_CACHE_L1I = 0x1
1034 PERF_COUNT_HW_CACHE_LL = 0x2
1035 PERF_COUNT_HW_CACHE_DTLB = 0x3
1036 PERF_COUNT_HW_CACHE_ITLB = 0x4
1037 PERF_COUNT_HW_CACHE_BPU = 0x5
1038 PERF_COUNT_HW_CACHE_NODE = 0x6
1039
1040 PERF_COUNT_HW_CACHE_OP_READ = 0x0
1041 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
1042 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
1043
1044 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
1045 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
1046
1047 PERF_COUNT_SW_CPU_CLOCK = 0x0
1048 PERF_COUNT_SW_TASK_CLOCK = 0x1
1049 PERF_COUNT_SW_PAGE_FAULTS = 0x2
1050 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
1051 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
1052 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
1053 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
1054 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
1055 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
1056 PERF_COUNT_SW_DUMMY = 0x9
1057
1058 PERF_SAMPLE_IP = 0x1
1059 PERF_SAMPLE_TID = 0x2
1060 PERF_SAMPLE_TIME = 0x4
1061 PERF_SAMPLE_ADDR = 0x8
1062 PERF_SAMPLE_READ = 0x10
1063 PERF_SAMPLE_CALLCHAIN = 0x20
1064 PERF_SAMPLE_ID = 0x40
1065 PERF_SAMPLE_CPU = 0x80
1066 PERF_SAMPLE_PERIOD = 0x100
1067 PERF_SAMPLE_STREAM_ID = 0x200
1068 PERF_SAMPLE_RAW = 0x400
1069 PERF_SAMPLE_BRANCH_STACK = 0x800
1070
1071 PERF_SAMPLE_BRANCH_USER = 0x1
1072 PERF_SAMPLE_BRANCH_KERNEL = 0x2
1073 PERF_SAMPLE_BRANCH_HV = 0x4
1074 PERF_SAMPLE_BRANCH_ANY = 0x8
1075 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
1076 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
1077 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
1078
1079 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
1080 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
1081 PERF_FORMAT_ID = 0x4
1082 PERF_FORMAT_GROUP = 0x8
1083
1084 PERF_RECORD_MMAP = 0x1
1085 PERF_RECORD_LOST = 0x2
1086 PERF_RECORD_COMM = 0x3
1087 PERF_RECORD_EXIT = 0x4
1088 PERF_RECORD_THROTTLE = 0x5
1089 PERF_RECORD_UNTHROTTLE = 0x6
1090 PERF_RECORD_FORK = 0x7
1091 PERF_RECORD_READ = 0x8
1092 PERF_RECORD_SAMPLE = 0x9
1093
1094 PERF_CONTEXT_HV = -0x20
1095 PERF_CONTEXT_KERNEL = -0x80
1096 PERF_CONTEXT_USER = -0x200
1097
1098 PERF_CONTEXT_GUEST = -0x800
1099 PERF_CONTEXT_GUEST_KERNEL = -0x880
1100 PERF_CONTEXT_GUEST_USER = -0xa00
1101
1102 PERF_FLAG_FD_NO_GROUP = 0x1
1103 PERF_FLAG_FD_OUTPUT = 0x2
1104 PERF_FLAG_PID_CGROUP = 0x4
1105 )
1106
1107 const (
1108 CBitFieldMaskBit0 = 0x1
1109 CBitFieldMaskBit1 = 0x2
1110 CBitFieldMaskBit2 = 0x4
1111 CBitFieldMaskBit3 = 0x8
1112 CBitFieldMaskBit4 = 0x10
1113 CBitFieldMaskBit5 = 0x20
1114 CBitFieldMaskBit6 = 0x40
1115 CBitFieldMaskBit7 = 0x80
1116 CBitFieldMaskBit8 = 0x100
1117 CBitFieldMaskBit9 = 0x200
1118 CBitFieldMaskBit10 = 0x400
1119 CBitFieldMaskBit11 = 0x800
1120 CBitFieldMaskBit12 = 0x1000
1121 CBitFieldMaskBit13 = 0x2000
1122 CBitFieldMaskBit14 = 0x4000
1123 CBitFieldMaskBit15 = 0x8000
1124 CBitFieldMaskBit16 = 0x10000
1125 CBitFieldMaskBit17 = 0x20000
1126 CBitFieldMaskBit18 = 0x40000
1127 CBitFieldMaskBit19 = 0x80000
1128 CBitFieldMaskBit20 = 0x100000
1129 CBitFieldMaskBit21 = 0x200000
1130 CBitFieldMaskBit22 = 0x400000
1131 CBitFieldMaskBit23 = 0x800000
1132 CBitFieldMaskBit24 = 0x1000000
1133 CBitFieldMaskBit25 = 0x2000000
1134 CBitFieldMaskBit26 = 0x4000000
1135 CBitFieldMaskBit27 = 0x8000000
1136 CBitFieldMaskBit28 = 0x10000000
1137 CBitFieldMaskBit29 = 0x20000000
1138 CBitFieldMaskBit30 = 0x40000000
1139 CBitFieldMaskBit31 = 0x80000000
1140 CBitFieldMaskBit32 = 0x100000000
1141 CBitFieldMaskBit33 = 0x200000000
1142 CBitFieldMaskBit34 = 0x400000000
1143 CBitFieldMaskBit35 = 0x800000000
1144 CBitFieldMaskBit36 = 0x1000000000
1145 CBitFieldMaskBit37 = 0x2000000000
1146 CBitFieldMaskBit38 = 0x4000000000
1147 CBitFieldMaskBit39 = 0x8000000000
1148 CBitFieldMaskBit40 = 0x10000000000
1149 CBitFieldMaskBit41 = 0x20000000000
1150 CBitFieldMaskBit42 = 0x40000000000
1151 CBitFieldMaskBit43 = 0x80000000000
1152 CBitFieldMaskBit44 = 0x100000000000
1153 CBitFieldMaskBit45 = 0x200000000000
1154 CBitFieldMaskBit46 = 0x400000000000
1155 CBitFieldMaskBit47 = 0x800000000000
1156 CBitFieldMaskBit48 = 0x1000000000000
1157 CBitFieldMaskBit49 = 0x2000000000000
1158 CBitFieldMaskBit50 = 0x4000000000000
1159 CBitFieldMaskBit51 = 0x8000000000000
1160 CBitFieldMaskBit52 = 0x10000000000000
1161 CBitFieldMaskBit53 = 0x20000000000000
1162 CBitFieldMaskBit54 = 0x40000000000000
1163 CBitFieldMaskBit55 = 0x80000000000000
1164 CBitFieldMaskBit56 = 0x100000000000000
1165 CBitFieldMaskBit57 = 0x200000000000000
1166 CBitFieldMaskBit58 = 0x400000000000000
1167 CBitFieldMaskBit59 = 0x800000000000000
1168 CBitFieldMaskBit60 = 0x1000000000000000
1169 CBitFieldMaskBit61 = 0x2000000000000000
1170 CBitFieldMaskBit62 = 0x4000000000000000
1171 CBitFieldMaskBit63 = 0x8000000000000000
1172 )
1173
1174 type SockaddrStorage struct {
1175 Family uint16
1176 _ [122]int8
1177 _ uint32
1178 }
1179
1180 type TCPMD5Sig struct {
1181 Addr SockaddrStorage
1182 Flags uint8
1183 Prefixlen uint8
1184 Keylen uint16
1185 _ uint32
1186 Key [80]uint8
1187 }
1188
1189 type HDDriveCmdHdr struct {
1190 Command uint8
1191 Number uint8
1192 Feature uint8
1193 Count uint8
1194 }
1195
1196 type HDGeometry struct {
1197 Heads uint8
1198 Sectors uint8
1199 Cylinders uint16
1200 Start uint32
1201 }
1202
1203 type HDDriveID struct {
1204 Config uint16
1205 Cyls uint16
1206 Reserved2 uint16
1207 Heads uint16
1208 Track_bytes uint16
1209 Sector_bytes uint16
1210 Sectors uint16
1211 Vendor0 uint16
1212 Vendor1 uint16
1213 Vendor2 uint16
1214 Serial_no [20]uint8
1215 Buf_type uint16
1216 Buf_size uint16
1217 Ecc_bytes uint16
1218 Fw_rev [8]uint8
1219 Model [40]uint8
1220 Max_multsect uint8
1221 Vendor3 uint8
1222 Dword_io uint16
1223 Vendor4 uint8
1224 Capability uint8
1225 Reserved50 uint16
1226 Vendor5 uint8
1227 TPIO uint8
1228 Vendor6 uint8
1229 TDMA uint8
1230 Field_valid uint16
1231 Cur_cyls uint16
1232 Cur_heads uint16
1233 Cur_sectors uint16
1234 Cur_capacity0 uint16
1235 Cur_capacity1 uint16
1236 Multsect uint8
1237 Multsect_valid uint8
1238 Lba_capacity uint32
1239 Dma_1word uint16
1240 Dma_mword uint16
1241 Eide_pio_modes uint16
1242 Eide_dma_min uint16
1243 Eide_dma_time uint16
1244 Eide_pio uint16
1245 Eide_pio_iordy uint16
1246 Words69_70 [2]uint16
1247 Words71_74 [4]uint16
1248 Queue_depth uint16
1249 Words76_79 [4]uint16
1250 Major_rev_num uint16
1251 Minor_rev_num uint16
1252 Command_set_1 uint16
1253 Command_set_2 uint16
1254 Cfsse uint16
1255 Cfs_enable_1 uint16
1256 Cfs_enable_2 uint16
1257 Csf_default uint16
1258 Dma_ultra uint16
1259 Trseuc uint16
1260 TrsEuc uint16
1261 CurAPMvalues uint16
1262 Mprc uint16
1263 Hw_config uint16
1264 Acoustic uint16
1265 Msrqs uint16
1266 Sxfert uint16
1267 Sal uint16
1268 Spg uint32
1269 Lba_capacity_2 uint64
1270 Words104_125 [22]uint16
1271 Last_lun uint16
1272 Word127 uint16
1273 Dlf uint16
1274 Csfo uint16
1275 Words130_155 [26]uint16
1276 Word156 uint16
1277 Words157_159 [3]uint16
1278 Cfa_power uint16
1279 Words161_175 [15]uint16
1280 Words176_205 [30]uint16
1281 Words206_254 [49]uint16
1282 Integrity_word uint16
1283 }
1284
1285 type Statfs_t struct {
1286 Type int32
1287 Bsize int32
1288 Blocks uint64
1289 Bfree uint64
1290 Bavail uint64
1291 Files uint64
1292 Ffree uint64
1293 Fsid Fsid
1294 Namelen int32
1295 Frsize int32
1296 Flags int32
1297 Spare [4]int32
1298 }
1299
1300 const (
1301 ST_MANDLOCK = 0x40
1302 ST_NOATIME = 0x400
1303 ST_NODEV = 0x4
1304 ST_NODIRATIME = 0x800
1305 ST_NOEXEC = 0x8
1306 ST_NOSUID = 0x2
1307 ST_RDONLY = 0x1
1308 ST_RELATIME = 0x1000
1309 ST_SYNCHRONOUS = 0x10
1310 )
1311
1312 type TpacketHdr struct {
1313 Status uint32
1314 Len uint32
1315 Snaplen uint32
1316 Mac uint16
1317 Net uint16
1318 Sec uint32
1319 Usec uint32
1320 }
1321
1322 type Tpacket2Hdr struct {
1323 Status uint32
1324 Len uint32
1325 Snaplen uint32
1326 Mac uint16
1327 Net uint16
1328 Sec uint32
1329 Nsec uint32
1330 Vlan_tci uint16
1331 Vlan_tpid uint16
1332 _ [4]uint8
1333 }
1334
1335 type Tpacket3Hdr struct {
1336 Next_offset uint32
1337 Sec uint32
1338 Nsec uint32
1339 Snaplen uint32
1340 Len uint32
1341 Status uint32
1342 Mac uint16
1343 Net uint16
1344 Hv1 TpacketHdrVariant1
1345 _ [8]uint8
1346 }
1347
1348 type TpacketHdrVariant1 struct {
1349 Rxhash uint32
1350 Vlan_tci uint32
1351 Vlan_tpid uint16
1352 _ uint16
1353 }
1354
1355 type TpacketBlockDesc struct {
1356 Version uint32
1357 To_priv uint32
1358 Hdr [40]byte
1359 }
1360
1361 type TpacketReq struct {
1362 Block_size uint32
1363 Block_nr uint32
1364 Frame_size uint32
1365 Frame_nr uint32
1366 }
1367
1368 type TpacketReq3 struct {
1369 Block_size uint32
1370 Block_nr uint32
1371 Frame_size uint32
1372 Frame_nr uint32
1373 Retire_blk_tov uint32
1374 Sizeof_priv uint32
1375 Feature_req_word uint32
1376 }
1377
1378 type TpacketStats struct {
1379 Packets uint32
1380 Drops uint32
1381 }
1382
1383 type TpacketStatsV3 struct {
1384 Packets uint32
1385 Drops uint32
1386 Freeze_q_cnt uint32
1387 }
1388
1389 type TpacketAuxdata struct {
1390 Status uint32
1391 Len uint32
1392 Snaplen uint32
1393 Mac uint16
1394 Net uint16
1395 Vlan_tci uint16
1396 Vlan_tpid uint16
1397 }
1398
1399 const (
1400 TPACKET_V1 = 0x0
1401 TPACKET_V2 = 0x1
1402 TPACKET_V3 = 0x2
1403 )
1404
1405 const (
1406 SizeofTpacketHdr = 0x18
1407 SizeofTpacket2Hdr = 0x20
1408 SizeofTpacket3Hdr = 0x30
1409 )
1410
1411 const (
1412 NF_INET_PRE_ROUTING = 0x0
1413 NF_INET_LOCAL_IN = 0x1
1414 NF_INET_FORWARD = 0x2
1415 NF_INET_LOCAL_OUT = 0x3
1416 NF_INET_POST_ROUTING = 0x4
1417 NF_INET_NUMHOOKS = 0x5
1418 )
1419
1420 const (
1421 NF_NETDEV_INGRESS = 0x0
1422 NF_NETDEV_NUMHOOKS = 0x1
1423 )
1424
1425 const (
1426 NFPROTO_UNSPEC = 0x0
1427 NFPROTO_INET = 0x1
1428 NFPROTO_IPV4 = 0x2
1429 NFPROTO_ARP = 0x3
1430 NFPROTO_NETDEV = 0x5
1431 NFPROTO_BRIDGE = 0x7
1432 NFPROTO_IPV6 = 0xa
1433 NFPROTO_DECNET = 0xc
1434 NFPROTO_NUMPROTO = 0xd
1435 )
1436
1437 type Nfgenmsg struct {
1438 Nfgen_family uint8
1439 Version uint8
1440 Res_id uint16
1441 }
1442
1443 const (
1444 NFNL_BATCH_UNSPEC = 0x0
1445 NFNL_BATCH_GENID = 0x1
1446 )
1447
1448 const (
1449 NFT_REG_VERDICT = 0x0
1450 NFT_REG_1 = 0x1
1451 NFT_REG_2 = 0x2
1452 NFT_REG_3 = 0x3
1453 NFT_REG_4 = 0x4
1454 NFT_REG32_00 = 0x8
1455 NFT_REG32_01 = 0x9
1456 NFT_REG32_02 = 0xa
1457 NFT_REG32_03 = 0xb
1458 NFT_REG32_04 = 0xc
1459 NFT_REG32_05 = 0xd
1460 NFT_REG32_06 = 0xe
1461 NFT_REG32_07 = 0xf
1462 NFT_REG32_08 = 0x10
1463 NFT_REG32_09 = 0x11
1464 NFT_REG32_10 = 0x12
1465 NFT_REG32_11 = 0x13
1466 NFT_REG32_12 = 0x14
1467 NFT_REG32_13 = 0x15
1468 NFT_REG32_14 = 0x16
1469 NFT_REG32_15 = 0x17
1470 NFT_CONTINUE = -0x1
1471 NFT_BREAK = -0x2
1472 NFT_JUMP = -0x3
1473 NFT_GOTO = -0x4
1474 NFT_RETURN = -0x5
1475 NFT_MSG_NEWTABLE = 0x0
1476 NFT_MSG_GETTABLE = 0x1
1477 NFT_MSG_DELTABLE = 0x2
1478 NFT_MSG_NEWCHAIN = 0x3
1479 NFT_MSG_GETCHAIN = 0x4
1480 NFT_MSG_DELCHAIN = 0x5
1481 NFT_MSG_NEWRULE = 0x6
1482 NFT_MSG_GETRULE = 0x7
1483 NFT_MSG_DELRULE = 0x8
1484 NFT_MSG_NEWSET = 0x9
1485 NFT_MSG_GETSET = 0xa
1486 NFT_MSG_DELSET = 0xb
1487 NFT_MSG_NEWSETELEM = 0xc
1488 NFT_MSG_GETSETELEM = 0xd
1489 NFT_MSG_DELSETELEM = 0xe
1490 NFT_MSG_NEWGEN = 0xf
1491 NFT_MSG_GETGEN = 0x10
1492 NFT_MSG_TRACE = 0x11
1493 NFT_MSG_NEWOBJ = 0x12
1494 NFT_MSG_GETOBJ = 0x13
1495 NFT_MSG_DELOBJ = 0x14
1496 NFT_MSG_GETOBJ_RESET = 0x15
1497 NFT_MSG_MAX = 0x19
1498 NFTA_LIST_UNPEC = 0x0
1499 NFTA_LIST_ELEM = 0x1
1500 NFTA_HOOK_UNSPEC = 0x0
1501 NFTA_HOOK_HOOKNUM = 0x1
1502 NFTA_HOOK_PRIORITY = 0x2
1503 NFTA_HOOK_DEV = 0x3
1504 NFT_TABLE_F_DORMANT = 0x1
1505 NFTA_TABLE_UNSPEC = 0x0
1506 NFTA_TABLE_NAME = 0x1
1507 NFTA_TABLE_FLAGS = 0x2
1508 NFTA_TABLE_USE = 0x3
1509 NFTA_CHAIN_UNSPEC = 0x0
1510 NFTA_CHAIN_TABLE = 0x1
1511 NFTA_CHAIN_HANDLE = 0x2
1512 NFTA_CHAIN_NAME = 0x3
1513 NFTA_CHAIN_HOOK = 0x4
1514 NFTA_CHAIN_POLICY = 0x5
1515 NFTA_CHAIN_USE = 0x6
1516 NFTA_CHAIN_TYPE = 0x7
1517 NFTA_CHAIN_COUNTERS = 0x8
1518 NFTA_CHAIN_PAD = 0x9
1519 NFTA_RULE_UNSPEC = 0x0
1520 NFTA_RULE_TABLE = 0x1
1521 NFTA_RULE_CHAIN = 0x2
1522 NFTA_RULE_HANDLE = 0x3
1523 NFTA_RULE_EXPRESSIONS = 0x4
1524 NFTA_RULE_COMPAT = 0x5
1525 NFTA_RULE_POSITION = 0x6
1526 NFTA_RULE_USERDATA = 0x7
1527 NFTA_RULE_PAD = 0x8
1528 NFTA_RULE_ID = 0x9
1529 NFT_RULE_COMPAT_F_INV = 0x2
1530 NFT_RULE_COMPAT_F_MASK = 0x2
1531 NFTA_RULE_COMPAT_UNSPEC = 0x0
1532 NFTA_RULE_COMPAT_PROTO = 0x1
1533 NFTA_RULE_COMPAT_FLAGS = 0x2
1534 NFT_SET_ANONYMOUS = 0x1
1535 NFT_SET_CONSTANT = 0x2
1536 NFT_SET_INTERVAL = 0x4
1537 NFT_SET_MAP = 0x8
1538 NFT_SET_TIMEOUT = 0x10
1539 NFT_SET_EVAL = 0x20
1540 NFT_SET_OBJECT = 0x40
1541 NFT_SET_POL_PERFORMANCE = 0x0
1542 NFT_SET_POL_MEMORY = 0x1
1543 NFTA_SET_DESC_UNSPEC = 0x0
1544 NFTA_SET_DESC_SIZE = 0x1
1545 NFTA_SET_UNSPEC = 0x0
1546 NFTA_SET_TABLE = 0x1
1547 NFTA_SET_NAME = 0x2
1548 NFTA_SET_FLAGS = 0x3
1549 NFTA_SET_KEY_TYPE = 0x4
1550 NFTA_SET_KEY_LEN = 0x5
1551 NFTA_SET_DATA_TYPE = 0x6
1552 NFTA_SET_DATA_LEN = 0x7
1553 NFTA_SET_POLICY = 0x8
1554 NFTA_SET_DESC = 0x9
1555 NFTA_SET_ID = 0xa
1556 NFTA_SET_TIMEOUT = 0xb
1557 NFTA_SET_GC_INTERVAL = 0xc
1558 NFTA_SET_USERDATA = 0xd
1559 NFTA_SET_PAD = 0xe
1560 NFTA_SET_OBJ_TYPE = 0xf
1561 NFT_SET_ELEM_INTERVAL_END = 0x1
1562 NFTA_SET_ELEM_UNSPEC = 0x0
1563 NFTA_SET_ELEM_KEY = 0x1
1564 NFTA_SET_ELEM_DATA = 0x2
1565 NFTA_SET_ELEM_FLAGS = 0x3
1566 NFTA_SET_ELEM_TIMEOUT = 0x4
1567 NFTA_SET_ELEM_EXPIRATION = 0x5
1568 NFTA_SET_ELEM_USERDATA = 0x6
1569 NFTA_SET_ELEM_EXPR = 0x7
1570 NFTA_SET_ELEM_PAD = 0x8
1571 NFTA_SET_ELEM_OBJREF = 0x9
1572 NFTA_SET_ELEM_LIST_UNSPEC = 0x0
1573 NFTA_SET_ELEM_LIST_TABLE = 0x1
1574 NFTA_SET_ELEM_LIST_SET = 0x2
1575 NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
1576 NFTA_SET_ELEM_LIST_SET_ID = 0x4
1577 NFT_DATA_VALUE = 0x0
1578 NFT_DATA_VERDICT = 0xffffff00
1579 NFTA_DATA_UNSPEC = 0x0
1580 NFTA_DATA_VALUE = 0x1
1581 NFTA_DATA_VERDICT = 0x2
1582 NFTA_VERDICT_UNSPEC = 0x0
1583 NFTA_VERDICT_CODE = 0x1
1584 NFTA_VERDICT_CHAIN = 0x2
1585 NFTA_EXPR_UNSPEC = 0x0
1586 NFTA_EXPR_NAME = 0x1
1587 NFTA_EXPR_DATA = 0x2
1588 NFTA_IMMEDIATE_UNSPEC = 0x0
1589 NFTA_IMMEDIATE_DREG = 0x1
1590 NFTA_IMMEDIATE_DATA = 0x2
1591 NFTA_BITWISE_UNSPEC = 0x0
1592 NFTA_BITWISE_SREG = 0x1
1593 NFTA_BITWISE_DREG = 0x2
1594 NFTA_BITWISE_LEN = 0x3
1595 NFTA_BITWISE_MASK = 0x4
1596 NFTA_BITWISE_XOR = 0x5
1597 NFT_BYTEORDER_NTOH = 0x0
1598 NFT_BYTEORDER_HTON = 0x1
1599 NFTA_BYTEORDER_UNSPEC = 0x0
1600 NFTA_BYTEORDER_SREG = 0x1
1601 NFTA_BYTEORDER_DREG = 0x2
1602 NFTA_BYTEORDER_OP = 0x3
1603 NFTA_BYTEORDER_LEN = 0x4
1604 NFTA_BYTEORDER_SIZE = 0x5
1605 NFT_CMP_EQ = 0x0
1606 NFT_CMP_NEQ = 0x1
1607 NFT_CMP_LT = 0x2
1608 NFT_CMP_LTE = 0x3
1609 NFT_CMP_GT = 0x4
1610 NFT_CMP_GTE = 0x5
1611 NFTA_CMP_UNSPEC = 0x0
1612 NFTA_CMP_SREG = 0x1
1613 NFTA_CMP_OP = 0x2
1614 NFTA_CMP_DATA = 0x3
1615 NFT_RANGE_EQ = 0x0
1616 NFT_RANGE_NEQ = 0x1
1617 NFTA_RANGE_UNSPEC = 0x0
1618 NFTA_RANGE_SREG = 0x1
1619 NFTA_RANGE_OP = 0x2
1620 NFTA_RANGE_FROM_DATA = 0x3
1621 NFTA_RANGE_TO_DATA = 0x4
1622 NFT_LOOKUP_F_INV = 0x1
1623 NFTA_LOOKUP_UNSPEC = 0x0
1624 NFTA_LOOKUP_SET = 0x1
1625 NFTA_LOOKUP_SREG = 0x2
1626 NFTA_LOOKUP_DREG = 0x3
1627 NFTA_LOOKUP_SET_ID = 0x4
1628 NFTA_LOOKUP_FLAGS = 0x5
1629 NFT_DYNSET_OP_ADD = 0x0
1630 NFT_DYNSET_OP_UPDATE = 0x1
1631 NFT_DYNSET_F_INV = 0x1
1632 NFTA_DYNSET_UNSPEC = 0x0
1633 NFTA_DYNSET_SET_NAME = 0x1
1634 NFTA_DYNSET_SET_ID = 0x2
1635 NFTA_DYNSET_OP = 0x3
1636 NFTA_DYNSET_SREG_KEY = 0x4
1637 NFTA_DYNSET_SREG_DATA = 0x5
1638 NFTA_DYNSET_TIMEOUT = 0x6
1639 NFTA_DYNSET_EXPR = 0x7
1640 NFTA_DYNSET_PAD = 0x8
1641 NFTA_DYNSET_FLAGS = 0x9
1642 NFT_PAYLOAD_LL_HEADER = 0x0
1643 NFT_PAYLOAD_NETWORK_HEADER = 0x1
1644 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
1645 NFT_PAYLOAD_CSUM_NONE = 0x0
1646 NFT_PAYLOAD_CSUM_INET = 0x1
1647 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
1648 NFTA_PAYLOAD_UNSPEC = 0x0
1649 NFTA_PAYLOAD_DREG = 0x1
1650 NFTA_PAYLOAD_BASE = 0x2
1651 NFTA_PAYLOAD_OFFSET = 0x3
1652 NFTA_PAYLOAD_LEN = 0x4
1653 NFTA_PAYLOAD_SREG = 0x5
1654 NFTA_PAYLOAD_CSUM_TYPE = 0x6
1655 NFTA_PAYLOAD_CSUM_OFFSET = 0x7
1656 NFTA_PAYLOAD_CSUM_FLAGS = 0x8
1657 NFT_EXTHDR_F_PRESENT = 0x1
1658 NFT_EXTHDR_OP_IPV6 = 0x0
1659 NFT_EXTHDR_OP_TCPOPT = 0x1
1660 NFTA_EXTHDR_UNSPEC = 0x0
1661 NFTA_EXTHDR_DREG = 0x1
1662 NFTA_EXTHDR_TYPE = 0x2
1663 NFTA_EXTHDR_OFFSET = 0x3
1664 NFTA_EXTHDR_LEN = 0x4
1665 NFTA_EXTHDR_FLAGS = 0x5
1666 NFTA_EXTHDR_OP = 0x6
1667 NFTA_EXTHDR_SREG = 0x7
1668 NFT_META_LEN = 0x0
1669 NFT_META_PROTOCOL = 0x1
1670 NFT_META_PRIORITY = 0x2
1671 NFT_META_MARK = 0x3
1672 NFT_META_IIF = 0x4
1673 NFT_META_OIF = 0x5
1674 NFT_META_IIFNAME = 0x6
1675 NFT_META_OIFNAME = 0x7
1676 NFT_META_IIFTYPE = 0x8
1677 NFT_META_OIFTYPE = 0x9
1678 NFT_META_SKUID = 0xa
1679 NFT_META_SKGID = 0xb
1680 NFT_META_NFTRACE = 0xc
1681 NFT_META_RTCLASSID = 0xd
1682 NFT_META_SECMARK = 0xe
1683 NFT_META_NFPROTO = 0xf
1684 NFT_META_L4PROTO = 0x10
1685 NFT_META_BRI_IIFNAME = 0x11
1686 NFT_META_BRI_OIFNAME = 0x12
1687 NFT_META_PKTTYPE = 0x13
1688 NFT_META_CPU = 0x14
1689 NFT_META_IIFGROUP = 0x15
1690 NFT_META_OIFGROUP = 0x16
1691 NFT_META_CGROUP = 0x17
1692 NFT_META_PRANDOM = 0x18
1693 NFT_RT_CLASSID = 0x0
1694 NFT_RT_NEXTHOP4 = 0x1
1695 NFT_RT_NEXTHOP6 = 0x2
1696 NFT_RT_TCPMSS = 0x3
1697 NFT_HASH_JENKINS = 0x0
1698 NFT_HASH_SYM = 0x1
1699 NFTA_HASH_UNSPEC = 0x0
1700 NFTA_HASH_SREG = 0x1
1701 NFTA_HASH_DREG = 0x2
1702 NFTA_HASH_LEN = 0x3
1703 NFTA_HASH_MODULUS = 0x4
1704 NFTA_HASH_SEED = 0x5
1705 NFTA_HASH_OFFSET = 0x6
1706 NFTA_HASH_TYPE = 0x7
1707 NFTA_META_UNSPEC = 0x0
1708 NFTA_META_DREG = 0x1
1709 NFTA_META_KEY = 0x2
1710 NFTA_META_SREG = 0x3
1711 NFTA_RT_UNSPEC = 0x0
1712 NFTA_RT_DREG = 0x1
1713 NFTA_RT_KEY = 0x2
1714 NFT_CT_STATE = 0x0
1715 NFT_CT_DIRECTION = 0x1
1716 NFT_CT_STATUS = 0x2
1717 NFT_CT_MARK = 0x3
1718 NFT_CT_SECMARK = 0x4
1719 NFT_CT_EXPIRATION = 0x5
1720 NFT_CT_HELPER = 0x6
1721 NFT_CT_L3PROTOCOL = 0x7
1722 NFT_CT_SRC = 0x8
1723 NFT_CT_DST = 0x9
1724 NFT_CT_PROTOCOL = 0xa
1725 NFT_CT_PROTO_SRC = 0xb
1726 NFT_CT_PROTO_DST = 0xc
1727 NFT_CT_LABELS = 0xd
1728 NFT_CT_PKTS = 0xe
1729 NFT_CT_BYTES = 0xf
1730 NFT_CT_AVGPKT = 0x10
1731 NFT_CT_ZONE = 0x11
1732 NFT_CT_EVENTMASK = 0x12
1733 NFTA_CT_UNSPEC = 0x0
1734 NFTA_CT_DREG = 0x1
1735 NFTA_CT_KEY = 0x2
1736 NFTA_CT_DIRECTION = 0x3
1737 NFTA_CT_SREG = 0x4
1738 NFT_LIMIT_PKTS = 0x0
1739 NFT_LIMIT_PKT_BYTES = 0x1
1740 NFT_LIMIT_F_INV = 0x1
1741 NFTA_LIMIT_UNSPEC = 0x0
1742 NFTA_LIMIT_RATE = 0x1
1743 NFTA_LIMIT_UNIT = 0x2
1744 NFTA_LIMIT_BURST = 0x3
1745 NFTA_LIMIT_TYPE = 0x4
1746 NFTA_LIMIT_FLAGS = 0x5
1747 NFTA_LIMIT_PAD = 0x6
1748 NFTA_COUNTER_UNSPEC = 0x0
1749 NFTA_COUNTER_BYTES = 0x1
1750 NFTA_COUNTER_PACKETS = 0x2
1751 NFTA_COUNTER_PAD = 0x3
1752 NFTA_LOG_UNSPEC = 0x0
1753 NFTA_LOG_GROUP = 0x1
1754 NFTA_LOG_PREFIX = 0x2
1755 NFTA_LOG_SNAPLEN = 0x3
1756 NFTA_LOG_QTHRESHOLD = 0x4
1757 NFTA_LOG_LEVEL = 0x5
1758 NFTA_LOG_FLAGS = 0x6
1759 NFTA_QUEUE_UNSPEC = 0x0
1760 NFTA_QUEUE_NUM = 0x1
1761 NFTA_QUEUE_TOTAL = 0x2
1762 NFTA_QUEUE_FLAGS = 0x3
1763 NFTA_QUEUE_SREG_QNUM = 0x4
1764 NFT_QUOTA_F_INV = 0x1
1765 NFT_QUOTA_F_DEPLETED = 0x2
1766 NFTA_QUOTA_UNSPEC = 0x0
1767 NFTA_QUOTA_BYTES = 0x1
1768 NFTA_QUOTA_FLAGS = 0x2
1769 NFTA_QUOTA_PAD = 0x3
1770 NFTA_QUOTA_CONSUMED = 0x4
1771 NFT_REJECT_ICMP_UNREACH = 0x0
1772 NFT_REJECT_TCP_RST = 0x1
1773 NFT_REJECT_ICMPX_UNREACH = 0x2
1774 NFT_REJECT_ICMPX_NO_ROUTE = 0x0
1775 NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
1776 NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
1777 NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
1778 NFTA_REJECT_UNSPEC = 0x0
1779 NFTA_REJECT_TYPE = 0x1
1780 NFTA_REJECT_ICMP_CODE = 0x2
1781 NFT_NAT_SNAT = 0x0
1782 NFT_NAT_DNAT = 0x1
1783 NFTA_NAT_UNSPEC = 0x0
1784 NFTA_NAT_TYPE = 0x1
1785 NFTA_NAT_FAMILY = 0x2
1786 NFTA_NAT_REG_ADDR_MIN = 0x3
1787 NFTA_NAT_REG_ADDR_MAX = 0x4
1788 NFTA_NAT_REG_PROTO_MIN = 0x5
1789 NFTA_NAT_REG_PROTO_MAX = 0x6
1790 NFTA_NAT_FLAGS = 0x7
1791 NFTA_MASQ_UNSPEC = 0x0
1792 NFTA_MASQ_FLAGS = 0x1
1793 NFTA_MASQ_REG_PROTO_MIN = 0x2
1794 NFTA_MASQ_REG_PROTO_MAX = 0x3
1795 NFTA_REDIR_UNSPEC = 0x0
1796 NFTA_REDIR_REG_PROTO_MIN = 0x1
1797 NFTA_REDIR_REG_PROTO_MAX = 0x2
1798 NFTA_REDIR_FLAGS = 0x3
1799 NFTA_DUP_UNSPEC = 0x0
1800 NFTA_DUP_SREG_ADDR = 0x1
1801 NFTA_DUP_SREG_DEV = 0x2
1802 NFTA_FWD_UNSPEC = 0x0
1803 NFTA_FWD_SREG_DEV = 0x1
1804 NFTA_OBJREF_UNSPEC = 0x0
1805 NFTA_OBJREF_IMM_TYPE = 0x1
1806 NFTA_OBJREF_IMM_NAME = 0x2
1807 NFTA_OBJREF_SET_SREG = 0x3
1808 NFTA_OBJREF_SET_NAME = 0x4
1809 NFTA_OBJREF_SET_ID = 0x5
1810 NFTA_GEN_UNSPEC = 0x0
1811 NFTA_GEN_ID = 0x1
1812 NFTA_GEN_PROC_PID = 0x2
1813 NFTA_GEN_PROC_NAME = 0x3
1814 NFTA_FIB_UNSPEC = 0x0
1815 NFTA_FIB_DREG = 0x1
1816 NFTA_FIB_RESULT = 0x2
1817 NFTA_FIB_FLAGS = 0x3
1818 NFT_FIB_RESULT_UNSPEC = 0x0
1819 NFT_FIB_RESULT_OIF = 0x1
1820 NFT_FIB_RESULT_OIFNAME = 0x2
1821 NFT_FIB_RESULT_ADDRTYPE = 0x3
1822 NFTA_FIB_F_SADDR = 0x1
1823 NFTA_FIB_F_DADDR = 0x2
1824 NFTA_FIB_F_MARK = 0x4
1825 NFTA_FIB_F_IIF = 0x8
1826 NFTA_FIB_F_OIF = 0x10
1827 NFTA_FIB_F_PRESENT = 0x20
1828 NFTA_CT_HELPER_UNSPEC = 0x0
1829 NFTA_CT_HELPER_NAME = 0x1
1830 NFTA_CT_HELPER_L3PROTO = 0x2
1831 NFTA_CT_HELPER_L4PROTO = 0x3
1832 NFTA_OBJ_UNSPEC = 0x0
1833 NFTA_OBJ_TABLE = 0x1
1834 NFTA_OBJ_NAME = 0x2
1835 NFTA_OBJ_TYPE = 0x3
1836 NFTA_OBJ_DATA = 0x4
1837 NFTA_OBJ_USE = 0x5
1838 NFTA_TRACE_UNSPEC = 0x0
1839 NFTA_TRACE_TABLE = 0x1
1840 NFTA_TRACE_CHAIN = 0x2
1841 NFTA_TRACE_RULE_HANDLE = 0x3
1842 NFTA_TRACE_TYPE = 0x4
1843 NFTA_TRACE_VERDICT = 0x5
1844 NFTA_TRACE_ID = 0x6
1845 NFTA_TRACE_LL_HEADER = 0x7
1846 NFTA_TRACE_NETWORK_HEADER = 0x8
1847 NFTA_TRACE_TRANSPORT_HEADER = 0x9
1848 NFTA_TRACE_IIF = 0xa
1849 NFTA_TRACE_IIFTYPE = 0xb
1850 NFTA_TRACE_OIF = 0xc
1851 NFTA_TRACE_OIFTYPE = 0xd
1852 NFTA_TRACE_MARK = 0xe
1853 NFTA_TRACE_NFPROTO = 0xf
1854 NFTA_TRACE_POLICY = 0x10
1855 NFTA_TRACE_PAD = 0x11
1856 NFT_TRACETYPE_UNSPEC = 0x0
1857 NFT_TRACETYPE_POLICY = 0x1
1858 NFT_TRACETYPE_RETURN = 0x2
1859 NFT_TRACETYPE_RULE = 0x3
1860 NFTA_NG_UNSPEC = 0x0
1861 NFTA_NG_DREG = 0x1
1862 NFTA_NG_MODULUS = 0x2
1863 NFTA_NG_TYPE = 0x3
1864 NFTA_NG_OFFSET = 0x4
1865 NFT_NG_INCREMENTAL = 0x0
1866 NFT_NG_RANDOM = 0x1
1867 )
1868
1869 type RTCTime struct {
1870 Sec int32
1871 Min int32
1872 Hour int32
1873 Mday int32
1874 Mon int32
1875 Year int32
1876 Wday int32
1877 Yday int32
1878 Isdst int32
1879 }
1880
1881 type RTCWkAlrm struct {
1882 Enabled uint8
1883 Pending uint8
1884 Time RTCTime
1885 }
1886
1887 type RTCPLLInfo struct {
1888 Ctrl int32
1889 Value int32
1890 Max int32
1891 Min int32
1892 Posmult int32
1893 Negmult int32
1894 Clock int32
1895 }
1896
1897 type BlkpgIoctlArg struct {
1898 Op int32
1899 Flags int32
1900 Datalen int32
1901 Data *byte
1902 }
1903
1904 type BlkpgPartition struct {
1905 Start int64
1906 Length int64
1907 Pno int32
1908 Devname [64]uint8
1909 Volname [64]uint8
1910 }
1911
1912 const (
1913 BLKPG = 0x1269
1914 BLKPG_ADD_PARTITION = 0x1
1915 BLKPG_DEL_PARTITION = 0x2
1916 BLKPG_RESIZE_PARTITION = 0x3
1917 )
1918
1919 const (
1920 NETNSA_NONE = 0x0
1921 NETNSA_NSID = 0x1
1922 NETNSA_PID = 0x2
1923 NETNSA_FD = 0x3
1924 )
1925
1926 type XDPRingOffset struct {
1927 Producer uint64
1928 Consumer uint64
1929 Desc uint64
1930 }
1931
1932 type XDPMmapOffsets struct {
1933 Rx XDPRingOffset
1934 Tx XDPRingOffset
1935 Fr XDPRingOffset
1936 Cr XDPRingOffset
1937 }
1938
1939 type XDPUmemReg struct {
1940 Addr uint64
1941 Len uint64
1942 Size uint32
1943 Headroom uint32
1944 }
1945
1946 type XDPStatistics struct {
1947 Rx_dropped uint64
1948 Rx_invalid_descs uint64
1949 Tx_invalid_descs uint64
1950 }
1951
1952 type XDPDesc struct {
1953 Addr uint64
1954 Len uint32
1955 Options uint32
1956 }
1957
1958 const (
1959 NCSI_CMD_UNSPEC = 0x0
1960 NCSI_CMD_PKG_INFO = 0x1
1961 NCSI_CMD_SET_INTERFACE = 0x2
1962 NCSI_CMD_CLEAR_INTERFACE = 0x3
1963 NCSI_ATTR_UNSPEC = 0x0
1964 NCSI_ATTR_IFINDEX = 0x1
1965 NCSI_ATTR_PACKAGE_LIST = 0x2
1966 NCSI_ATTR_PACKAGE_ID = 0x3
1967 NCSI_ATTR_CHANNEL_ID = 0x4
1968 NCSI_PKG_ATTR_UNSPEC = 0x0
1969 NCSI_PKG_ATTR = 0x1
1970 NCSI_PKG_ATTR_ID = 0x2
1971 NCSI_PKG_ATTR_FORCED = 0x3
1972 NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
1973 NCSI_CHANNEL_ATTR_UNSPEC = 0x0
1974 NCSI_CHANNEL_ATTR = 0x1
1975 NCSI_CHANNEL_ATTR_ID = 0x2
1976 NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
1977 NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
1978 NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
1979 NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
1980 NCSI_CHANNEL_ATTR_ACTIVE = 0x7
1981 NCSI_CHANNEL_ATTR_FORCED = 0x8
1982 NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
1983 NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
1984 )
1985
1986 const (
1987 SOF_TIMESTAMPING_TX_HARDWARE = 0x1
1988 SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
1989 SOF_TIMESTAMPING_RX_HARDWARE = 0x4
1990 SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
1991 SOF_TIMESTAMPING_SOFTWARE = 0x10
1992 SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
1993 SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
1994 SOF_TIMESTAMPING_OPT_ID = 0x80
1995 SOF_TIMESTAMPING_TX_SCHED = 0x100
1996 SOF_TIMESTAMPING_TX_ACK = 0x200
1997 SOF_TIMESTAMPING_OPT_CMSG = 0x400
1998 SOF_TIMESTAMPING_OPT_TSONLY = 0x800
1999 SOF_TIMESTAMPING_OPT_STATS = 0x1000
2000 SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
2001 SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
2002
2003 SOF_TIMESTAMPING_LAST = 0x4000
2004 SOF_TIMESTAMPING_MASK = 0x7fff
2005 )
55 package unix
66
77 const (
8 sizeofPtr = 0x8
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x8
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
1313 PathMax = 0x1000
1414 )
1515
3232
3333 type Timex struct {
3434 Modes uint32
35 Pad_cgo_0 [4]byte
3635 Offset int64
3736 Freq int64
3837 Maxerror int64
3938 Esterror int64
4039 Status int32
41 Pad_cgo_1 [4]byte
4240 Constant int64
4341 Precision int64
4442 Tolerance int64
4745 Ppsfreq int64
4846 Jitter int64
4947 Shift int32
50 Pad_cgo_2 [4]byte
5148 Stabil int64
5249 Jitcnt int64
5350 Calcnt int64
5451 Errcnt int64
5552 Stbcnt int64
5653 Tai int32
57 Pad_cgo_3 [44]byte
54 _ [44]byte
5855 }
5956
6057 type Time_t int64
104101 Mode uint32
105102 Uid uint32
106103 Gid uint32
107 X__pad0 int32
104 _ int32
108105 Rdev uint64
109106 Size int64
110107 Blksize int64
115112 _ [3]int64
116113 }
117114
118 type Statfs_t struct {
119 Type int64
120 Bsize int64
121 Blocks uint64
122 Bfree uint64
123 Bavail uint64
124 Files uint64
125 Ffree uint64
126 Fsid Fsid
127 Namelen int64
128 Frsize int64
129 Flags int64
130 Spare [4]int64
115 type StatxTimestamp struct {
116 Sec int64
117 Nsec uint32
118 _ int32
119 }
120
121 type Statx_t struct {
122 Mask uint32
123 Blksize uint32
124 Attributes uint64
125 Nlink uint32
126 Uid uint32
127 Gid uint32
128 Mode uint16
129 _ [1]uint16
130 Ino uint64
131 Size uint64
132 Blocks uint64
133 Attributes_mask uint64
134 Atime StatxTimestamp
135 Btime StatxTimestamp
136 Ctime StatxTimestamp
137 Mtime StatxTimestamp
138 Rdev_major uint32
139 Rdev_minor uint32
140 Dev_major uint32
141 Dev_minor uint32
142 _ [14]uint64
131143 }
132144
133145 type Dirent struct {
134 Ino uint64
135 Off int64
136 Reclen uint16
137 Type uint8
138 Name [256]int8
139 Pad_cgo_0 [5]byte
146 Ino uint64
147 Off int64
148 Reclen uint16
149 Type uint8
150 Name [256]int8
151 _ [5]byte
140152 }
141153
142154 type Fsid struct {
143 X__val [2]int32
155 Val [2]int32
144156 }
145157
146158 type Flock_t struct {
147 Type int16
148 Whence int16
149 Pad_cgo_0 [4]byte
150 Start int64
151 Len int64
152 Pid int32
153 Pad_cgo_1 [4]byte
159 Type int16
160 Whence int16
161 Start int64
162 Len int64
163 Pid int32
164 _ [4]byte
154165 }
155166
156167 type FscryptPolicy struct {
225236 Channel uint16
226237 }
227238
239 type RawSockaddrL2 struct {
240 Family uint16
241 Psm uint16
242 Bdaddr [6]uint8
243 Cid uint16
244 Bdaddr_type uint8
245 _ [1]byte
246 }
247
248 type RawSockaddrRFCOMM struct {
249 Family uint16
250 Bdaddr [6]uint8
251 Channel uint8
252 _ [1]byte
253 }
254
228255 type RawSockaddrCAN struct {
229 Family uint16
230 Pad_cgo_0 [2]byte
231 Ifindex int32
232 Addr [8]byte
256 Family uint16
257 Ifindex int32
258 Addr [8]byte
233259 }
234260
235261 type RawSockaddrALG struct {
248274 Zero [4]uint8
249275 }
250276
277 type RawSockaddrXDP struct {
278 Family uint16
279 Flags uint16
280 Ifindex uint32
281 Queue_id uint32
282 Shared_umem_fd uint32
283 }
284
285 type RawSockaddrPPPoX [0x1e]byte
286
251287 type RawSockaddr struct {
252288 Family uint16
253289 Data [14]int8
296332 type Msghdr struct {
297333 Name *byte
298334 Namelen uint32
299 Pad_cgo_0 [4]byte
300335 Iov *Iovec
301336 Iovlen uint64
302337 Control *byte
303338 Controllen uint64
304339 Flags int32
305 Pad_cgo_1 [4]byte
340 _ [4]byte
306341 }
307342
308343 type Cmsghdr struct {
344379 Probes uint8
345380 Backoff uint8
346381 Options uint8
347 Pad_cgo_0 [2]byte
348382 Rto uint32
349383 Ato uint32
350384 Snd_mss uint32
379413 SizeofSockaddrLinklayer = 0x14
380414 SizeofSockaddrNetlink = 0xc
381415 SizeofSockaddrHCI = 0x6
416 SizeofSockaddrL2 = 0xe
417 SizeofSockaddrRFCOMM = 0xa
382418 SizeofSockaddrCAN = 0x10
383419 SizeofSockaddrALG = 0x58
384420 SizeofSockaddrVM = 0x10
421 SizeofSockaddrXDP = 0x10
422 SizeofSockaddrPPPoX = 0x1e
385423 SizeofLinger = 0x8
386424 SizeofIovec = 0x10
387425 SizeofIPMreq = 0x8
399437 )
400438
401439 const (
402 IFA_UNSPEC = 0x0
403 IFA_ADDRESS = 0x1
404 IFA_LOCAL = 0x2
405 IFA_LABEL = 0x3
406 IFA_BROADCAST = 0x4
407 IFA_ANYCAST = 0x5
408 IFA_CACHEINFO = 0x6
409 IFA_MULTICAST = 0x7
410 IFLA_UNSPEC = 0x0
411 IFLA_ADDRESS = 0x1
412 IFLA_BROADCAST = 0x2
413 IFLA_IFNAME = 0x3
414 IFLA_MTU = 0x4
415 IFLA_LINK = 0x5
416 IFLA_QDISC = 0x6
417 IFLA_STATS = 0x7
418 IFLA_COST = 0x8
419 IFLA_PRIORITY = 0x9
420 IFLA_MASTER = 0xa
421 IFLA_WIRELESS = 0xb
422 IFLA_PROTINFO = 0xc
423 IFLA_TXQLEN = 0xd
424 IFLA_MAP = 0xe
425 IFLA_WEIGHT = 0xf
426 IFLA_OPERSTATE = 0x10
427 IFLA_LINKMODE = 0x11
428 IFLA_LINKINFO = 0x12
429 IFLA_NET_NS_PID = 0x13
430 IFLA_IFALIAS = 0x14
431 IFLA_MAX = 0x2c
432 RT_SCOPE_UNIVERSE = 0x0
433 RT_SCOPE_SITE = 0xc8
434 RT_SCOPE_LINK = 0xfd
435 RT_SCOPE_HOST = 0xfe
436 RT_SCOPE_NOWHERE = 0xff
437 RT_TABLE_UNSPEC = 0x0
438 RT_TABLE_COMPAT = 0xfc
439 RT_TABLE_DEFAULT = 0xfd
440 RT_TABLE_MAIN = 0xfe
441 RT_TABLE_LOCAL = 0xff
442 RT_TABLE_MAX = 0xffffffff
443 RTA_UNSPEC = 0x0
444 RTA_DST = 0x1
445 RTA_SRC = 0x2
446 RTA_IIF = 0x3
447 RTA_OIF = 0x4
448 RTA_GATEWAY = 0x5
449 RTA_PRIORITY = 0x6
450 RTA_PREFSRC = 0x7
451 RTA_METRICS = 0x8
452 RTA_MULTIPATH = 0x9
453 RTA_FLOW = 0xb
454 RTA_CACHEINFO = 0xc
455 RTA_TABLE = 0xf
456 RTN_UNSPEC = 0x0
457 RTN_UNICAST = 0x1
458 RTN_LOCAL = 0x2
459 RTN_BROADCAST = 0x3
460 RTN_ANYCAST = 0x4
461 RTN_MULTICAST = 0x5
462 RTN_BLACKHOLE = 0x6
463 RTN_UNREACHABLE = 0x7
464 RTN_PROHIBIT = 0x8
465 RTN_THROW = 0x9
466 RTN_NAT = 0xa
467 RTN_XRESOLVE = 0xb
468 RTNLGRP_NONE = 0x0
469 RTNLGRP_LINK = 0x1
470 RTNLGRP_NOTIFY = 0x2
471 RTNLGRP_NEIGH = 0x3
472 RTNLGRP_TC = 0x4
473 RTNLGRP_IPV4_IFADDR = 0x5
474 RTNLGRP_IPV4_MROUTE = 0x6
475 RTNLGRP_IPV4_ROUTE = 0x7
476 RTNLGRP_IPV4_RULE = 0x8
477 RTNLGRP_IPV6_IFADDR = 0x9
478 RTNLGRP_IPV6_MROUTE = 0xa
479 RTNLGRP_IPV6_ROUTE = 0xb
480 RTNLGRP_IPV6_IFINFO = 0xc
481 RTNLGRP_IPV6_PREFIX = 0x12
482 RTNLGRP_IPV6_RULE = 0x13
483 RTNLGRP_ND_USEROPT = 0x14
484 SizeofNlMsghdr = 0x10
485 SizeofNlMsgerr = 0x14
486 SizeofRtGenmsg = 0x1
487 SizeofNlAttr = 0x4
488 SizeofRtAttr = 0x4
489 SizeofIfInfomsg = 0x10
490 SizeofIfAddrmsg = 0x8
491 SizeofRtMsg = 0xc
492 SizeofRtNexthop = 0x8
440 IFA_UNSPEC = 0x0
441 IFA_ADDRESS = 0x1
442 IFA_LOCAL = 0x2
443 IFA_LABEL = 0x3
444 IFA_BROADCAST = 0x4
445 IFA_ANYCAST = 0x5
446 IFA_CACHEINFO = 0x6
447 IFA_MULTICAST = 0x7
448 IFLA_UNSPEC = 0x0
449 IFLA_ADDRESS = 0x1
450 IFLA_BROADCAST = 0x2
451 IFLA_IFNAME = 0x3
452 IFLA_INFO_KIND = 0x1
453 IFLA_MTU = 0x4
454 IFLA_LINK = 0x5
455 IFLA_QDISC = 0x6
456 IFLA_STATS = 0x7
457 IFLA_COST = 0x8
458 IFLA_PRIORITY = 0x9
459 IFLA_MASTER = 0xa
460 IFLA_WIRELESS = 0xb
461 IFLA_PROTINFO = 0xc
462 IFLA_TXQLEN = 0xd
463 IFLA_MAP = 0xe
464 IFLA_WEIGHT = 0xf
465 IFLA_OPERSTATE = 0x10
466 IFLA_LINKMODE = 0x11
467 IFLA_LINKINFO = 0x12
468 IFLA_NET_NS_PID = 0x13
469 IFLA_IFALIAS = 0x14
470 IFLA_NUM_VF = 0x15
471 IFLA_VFINFO_LIST = 0x16
472 IFLA_STATS64 = 0x17
473 IFLA_VF_PORTS = 0x18
474 IFLA_PORT_SELF = 0x19
475 IFLA_AF_SPEC = 0x1a
476 IFLA_GROUP = 0x1b
477 IFLA_NET_NS_FD = 0x1c
478 IFLA_EXT_MASK = 0x1d
479 IFLA_PROMISCUITY = 0x1e
480 IFLA_NUM_TX_QUEUES = 0x1f
481 IFLA_NUM_RX_QUEUES = 0x20
482 IFLA_CARRIER = 0x21
483 IFLA_PHYS_PORT_ID = 0x22
484 IFLA_CARRIER_CHANGES = 0x23
485 IFLA_PHYS_SWITCH_ID = 0x24
486 IFLA_LINK_NETNSID = 0x25
487 IFLA_PHYS_PORT_NAME = 0x26
488 IFLA_PROTO_DOWN = 0x27
489 IFLA_GSO_MAX_SEGS = 0x28
490 IFLA_GSO_MAX_SIZE = 0x29
491 IFLA_PAD = 0x2a
492 IFLA_XDP = 0x2b
493 IFLA_EVENT = 0x2c
494 IFLA_NEW_NETNSID = 0x2d
495 IFLA_IF_NETNSID = 0x2e
496 IFLA_MAX = 0x33
497 RT_SCOPE_UNIVERSE = 0x0
498 RT_SCOPE_SITE = 0xc8
499 RT_SCOPE_LINK = 0xfd
500 RT_SCOPE_HOST = 0xfe
501 RT_SCOPE_NOWHERE = 0xff
502 RT_TABLE_UNSPEC = 0x0
503 RT_TABLE_COMPAT = 0xfc
504 RT_TABLE_DEFAULT = 0xfd
505 RT_TABLE_MAIN = 0xfe
506 RT_TABLE_LOCAL = 0xff
507 RT_TABLE_MAX = 0xffffffff
508 RTA_UNSPEC = 0x0
509 RTA_DST = 0x1
510 RTA_SRC = 0x2
511 RTA_IIF = 0x3
512 RTA_OIF = 0x4
513 RTA_GATEWAY = 0x5
514 RTA_PRIORITY = 0x6
515 RTA_PREFSRC = 0x7
516 RTA_METRICS = 0x8
517 RTA_MULTIPATH = 0x9
518 RTA_FLOW = 0xb
519 RTA_CACHEINFO = 0xc
520 RTA_TABLE = 0xf
521 RTA_MARK = 0x10
522 RTA_MFC_STATS = 0x11
523 RTA_VIA = 0x12
524 RTA_NEWDST = 0x13
525 RTA_PREF = 0x14
526 RTA_ENCAP_TYPE = 0x15
527 RTA_ENCAP = 0x16
528 RTA_EXPIRES = 0x17
529 RTA_PAD = 0x18
530 RTA_UID = 0x19
531 RTA_TTL_PROPAGATE = 0x1a
532 RTA_IP_PROTO = 0x1b
533 RTA_SPORT = 0x1c
534 RTA_DPORT = 0x1d
535 RTN_UNSPEC = 0x0
536 RTN_UNICAST = 0x1
537 RTN_LOCAL = 0x2
538 RTN_BROADCAST = 0x3
539 RTN_ANYCAST = 0x4
540 RTN_MULTICAST = 0x5
541 RTN_BLACKHOLE = 0x6
542 RTN_UNREACHABLE = 0x7
543 RTN_PROHIBIT = 0x8
544 RTN_THROW = 0x9
545 RTN_NAT = 0xa
546 RTN_XRESOLVE = 0xb
547 RTNLGRP_NONE = 0x0
548 RTNLGRP_LINK = 0x1
549 RTNLGRP_NOTIFY = 0x2
550 RTNLGRP_NEIGH = 0x3
551 RTNLGRP_TC = 0x4
552 RTNLGRP_IPV4_IFADDR = 0x5
553 RTNLGRP_IPV4_MROUTE = 0x6
554 RTNLGRP_IPV4_ROUTE = 0x7
555 RTNLGRP_IPV4_RULE = 0x8
556 RTNLGRP_IPV6_IFADDR = 0x9
557 RTNLGRP_IPV6_MROUTE = 0xa
558 RTNLGRP_IPV6_ROUTE = 0xb
559 RTNLGRP_IPV6_IFINFO = 0xc
560 RTNLGRP_IPV6_PREFIX = 0x12
561 RTNLGRP_IPV6_RULE = 0x13
562 RTNLGRP_ND_USEROPT = 0x14
563 SizeofNlMsghdr = 0x10
564 SizeofNlMsgerr = 0x14
565 SizeofRtGenmsg = 0x1
566 SizeofNlAttr = 0x4
567 SizeofRtAttr = 0x4
568 SizeofIfInfomsg = 0x10
569 SizeofIfAddrmsg = 0x8
570 SizeofRtMsg = 0xc
571 SizeofRtNexthop = 0x8
493572 )
494573
495574 type NlMsghdr struct {
520599 }
521600
522601 type IfInfomsg struct {
523 Family uint8
524 X__ifi_pad uint8
525 Type uint16
526 Index int32
527 Flags uint32
528 Change uint32
602 Family uint8
603 _ uint8
604 Type uint16
605 Index int32
606 Flags uint32
607 Change uint32
529608 }
530609
531610 type IfAddrmsg struct {
568647 }
569648
570649 type SockFprog struct {
571 Len uint16
572 Pad_cgo_0 [6]byte
573 Filter *SockFilter
650 Len uint16
651 Filter *SockFilter
574652 }
575653
576654 type InotifyEvent struct {
627705 Freeswap uint64
628706 Procs uint16
629707 Pad uint16
630 Pad_cgo_0 [4]byte
631708 Totalhigh uint64
632709 Freehigh uint64
633710 Unit uint32
634 X_f [0]int8
635 Pad_cgo_1 [4]byte
711 _ [0]int8
712 _ [4]byte
636713 }
637714
638715 type Utsname struct {
639 Sysname [65]int8
640 Nodename [65]int8
641 Release [65]int8
642 Version [65]int8
643 Machine [65]int8
644 Domainname [65]int8
716 Sysname [65]byte
717 Nodename [65]byte
718 Release [65]byte
719 Version [65]byte
720 Machine [65]byte
721 Domainname [65]byte
645722 }
646723
647724 type Ustat_t struct {
648 Tfree int32
649 Pad_cgo_0 [4]byte
650 Tinode uint64
651 Fname [6]int8
652 Fpack [6]int8
653 Pad_cgo_1 [4]byte
725 Tfree int32
726 Tinode uint64
727 Fname [6]int8
728 Fpack [6]int8
729 _ [4]byte
654730 }
655731
656732 type EpollEvent struct {
660736 }
661737
662738 const (
663 AT_FDCWD = -0x64
664 AT_REMOVEDIR = 0x200
739 AT_EMPTY_PATH = 0x1000
740 AT_FDCWD = -0x64
741 AT_NO_AUTOMOUNT = 0x800
742 AT_REMOVEDIR = 0x200
743
744 AT_STATX_SYNC_AS_STAT = 0x0
745 AT_STATX_FORCE_SYNC = 0x2000
746 AT_STATX_DONT_SYNC = 0x4000
747
665748 AT_SYMLINK_FOLLOW = 0x400
666749 AT_SYMLINK_NOFOLLOW = 0x100
750
751 AT_EACCESS = 0x200
667752 )
668753
669754 type PollFd struct {
683768 )
684769
685770 type Sigset_t struct {
686 X__val [16]uint64
771 Val [16]uint64
772 }
773
774 type SignalfdSiginfo struct {
775 Signo uint32
776 Errno int32
777 Code int32
778 Pid uint32
779 Uid uint32
780 Fd int32
781 Tid uint32
782 Band uint32
783 Overrun uint32
784 Trapno uint32
785 Status int32
786 Int int32
787 Ptr uint64
788 Utime uint64
789 Stime uint64
790 Addr uint64
791 _ [48]uint8
687792 }
688793
689794 const RNDGETENTCNT = 0x80045200
710815
711816 type Taskstats struct {
712817 Version uint16
713 Pad_cgo_0 [2]byte
714818 Ac_exitcode uint32
715819 Ac_flag uint8
716820 Ac_nice uint8
717 Pad_cgo_1 [6]byte
718821 Cpu_count uint64
719822 Cpu_delay_total uint64
720823 Blkio_count uint64
726829 Ac_comm [32]int8
727830 Ac_sched uint8
728831 Ac_pad [3]uint8
729 Pad_cgo_2 [4]byte
832 _ [4]byte
730833 Ac_uid uint32
731834 Ac_gid uint32
732835 Ac_pid uint32
733836 Ac_ppid uint32
734837 Ac_btime uint32
735 Pad_cgo_3 [4]byte
736838 Ac_etime uint64
737839 Ac_utime uint64
738840 Ac_stime uint64
756858 Cpu_scaled_run_real_total uint64
757859 Freepages_count uint64
758860 Freepages_delay_total uint64
861 Thrashing_count uint64
862 Thrashing_delay_total uint64
759863 }
760864
761865 const (
774878 TASKSTATS_CMD_ATTR_TGID = 0x2
775879 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
776880 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
881 )
882
883 type CGroupStats struct {
884 Sleeping uint64
885 Running uint64
886 Stopped uint64
887 Uninterruptible uint64
888 Io_wait uint64
889 }
890
891 const (
892 CGROUPSTATS_CMD_UNSPEC = 0x3
893 CGROUPSTATS_CMD_GET = 0x4
894 CGROUPSTATS_CMD_NEW = 0x5
895 CGROUPSTATS_TYPE_UNSPEC = 0x0
896 CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
897 CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
898 CGROUPSTATS_CMD_ATTR_FD = 0x1
777899 )
778900
779901 type Genlmsghdr struct {
808930 CTRL_ATTR_MCAST_GRP_NAME = 0x1
809931 CTRL_ATTR_MCAST_GRP_ID = 0x2
810932 )
933
934 type cpuMask uint64
935
936 const (
937 _CPU_SETSIZE = 0x400
938 _NCPUBITS = 0x40
939 )
940
941 const (
942 BDADDR_BREDR = 0x0
943 BDADDR_LE_PUBLIC = 0x1
944 BDADDR_LE_RANDOM = 0x2
945 )
946
947 type PerfEventAttr struct {
948 Type uint32
949 Size uint32
950 Config uint64
951 Sample uint64
952 Sample_type uint64
953 Read_format uint64
954 Bits uint64
955 Wakeup uint32
956 Bp_type uint32
957 Ext1 uint64
958 Ext2 uint64
959 Branch_sample_type uint64
960 Sample_regs_user uint64
961 Sample_stack_user uint32
962 Clockid int32
963 Sample_regs_intr uint64
964 Aux_watermark uint32
965 _ uint32
966 }
967
968 type PerfEventMmapPage struct {
969 Version uint32
970 Compat_version uint32
971 Lock uint32
972 Index uint32
973 Offset int64
974 Time_enabled uint64
975 Time_running uint64
976 Capabilities uint64
977 Pmc_width uint16
978 Time_shift uint16
979 Time_mult uint32
980 Time_offset uint64
981 Time_zero uint64
982 Size uint32
983 _ [948]uint8
984 Data_head uint64
985 Data_tail uint64
986 Data_offset uint64
987 Data_size uint64
988 Aux_head uint64
989 Aux_tail uint64
990 Aux_offset uint64
991 Aux_size uint64
992 }
993
994 const (
995 PerfBitDisabled uint64 = CBitFieldMaskBit0
996 PerfBitInherit = CBitFieldMaskBit1
997 PerfBitPinned = CBitFieldMaskBit2
998 PerfBitExclusive = CBitFieldMaskBit3
999 PerfBitExcludeUser = CBitFieldMaskBit4
1000 PerfBitExcludeKernel = CBitFieldMaskBit5
1001 PerfBitExcludeHv = CBitFieldMaskBit6
1002 PerfBitExcludeIdle = CBitFieldMaskBit7
1003 PerfBitMmap = CBitFieldMaskBit8
1004 PerfBitComm = CBitFieldMaskBit9
1005 PerfBitFreq = CBitFieldMaskBit10
1006 PerfBitInheritStat = CBitFieldMaskBit11
1007 PerfBitEnableOnExec = CBitFieldMaskBit12
1008 PerfBitTask = CBitFieldMaskBit13
1009 PerfBitWatermark = CBitFieldMaskBit14
1010 PerfBitPreciseIPBit1 = CBitFieldMaskBit15
1011 PerfBitPreciseIPBit2 = CBitFieldMaskBit16
1012 PerfBitMmapData = CBitFieldMaskBit17
1013 PerfBitSampleIDAll = CBitFieldMaskBit18
1014 PerfBitExcludeHost = CBitFieldMaskBit19
1015 PerfBitExcludeGuest = CBitFieldMaskBit20
1016 PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
1017 PerfBitExcludeCallchainUser = CBitFieldMaskBit22
1018 PerfBitMmap2 = CBitFieldMaskBit23
1019 PerfBitCommExec = CBitFieldMaskBit24
1020 PerfBitUseClockID = CBitFieldMaskBit25
1021 PerfBitContextSwitch = CBitFieldMaskBit26
1022 )
1023
1024 const (
1025 PERF_TYPE_HARDWARE = 0x0
1026 PERF_TYPE_SOFTWARE = 0x1
1027 PERF_TYPE_TRACEPOINT = 0x2
1028 PERF_TYPE_HW_CACHE = 0x3
1029 PERF_TYPE_RAW = 0x4
1030 PERF_TYPE_BREAKPOINT = 0x5
1031
1032 PERF_COUNT_HW_CPU_CYCLES = 0x0
1033 PERF_COUNT_HW_INSTRUCTIONS = 0x1
1034 PERF_COUNT_HW_CACHE_REFERENCES = 0x2
1035 PERF_COUNT_HW_CACHE_MISSES = 0x3
1036 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
1037 PERF_COUNT_HW_BRANCH_MISSES = 0x5
1038 PERF_COUNT_HW_BUS_CYCLES = 0x6
1039 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
1040 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
1041 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
1042
1043 PERF_COUNT_HW_CACHE_L1D = 0x0
1044 PERF_COUNT_HW_CACHE_L1I = 0x1
1045 PERF_COUNT_HW_CACHE_LL = 0x2
1046 PERF_COUNT_HW_CACHE_DTLB = 0x3
1047 PERF_COUNT_HW_CACHE_ITLB = 0x4
1048 PERF_COUNT_HW_CACHE_BPU = 0x5
1049 PERF_COUNT_HW_CACHE_NODE = 0x6
1050
1051 PERF_COUNT_HW_CACHE_OP_READ = 0x0
1052 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
1053 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
1054
1055 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
1056 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
1057
1058 PERF_COUNT_SW_CPU_CLOCK = 0x0
1059 PERF_COUNT_SW_TASK_CLOCK = 0x1
1060 PERF_COUNT_SW_PAGE_FAULTS = 0x2
1061 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
1062 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
1063 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
1064 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
1065 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
1066 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
1067 PERF_COUNT_SW_DUMMY = 0x9
1068
1069 PERF_SAMPLE_IP = 0x1
1070 PERF_SAMPLE_TID = 0x2
1071 PERF_SAMPLE_TIME = 0x4
1072 PERF_SAMPLE_ADDR = 0x8
1073 PERF_SAMPLE_READ = 0x10
1074 PERF_SAMPLE_CALLCHAIN = 0x20
1075 PERF_SAMPLE_ID = 0x40
1076 PERF_SAMPLE_CPU = 0x80
1077 PERF_SAMPLE_PERIOD = 0x100
1078 PERF_SAMPLE_STREAM_ID = 0x200
1079 PERF_SAMPLE_RAW = 0x400
1080 PERF_SAMPLE_BRANCH_STACK = 0x800
1081
1082 PERF_SAMPLE_BRANCH_USER = 0x1
1083 PERF_SAMPLE_BRANCH_KERNEL = 0x2
1084 PERF_SAMPLE_BRANCH_HV = 0x4
1085 PERF_SAMPLE_BRANCH_ANY = 0x8
1086 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
1087 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
1088 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
1089
1090 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
1091 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
1092 PERF_FORMAT_ID = 0x4
1093 PERF_FORMAT_GROUP = 0x8
1094
1095 PERF_RECORD_MMAP = 0x1
1096 PERF_RECORD_LOST = 0x2
1097 PERF_RECORD_COMM = 0x3
1098 PERF_RECORD_EXIT = 0x4
1099 PERF_RECORD_THROTTLE = 0x5
1100 PERF_RECORD_UNTHROTTLE = 0x6
1101 PERF_RECORD_FORK = 0x7
1102 PERF_RECORD_READ = 0x8
1103 PERF_RECORD_SAMPLE = 0x9
1104
1105 PERF_CONTEXT_HV = -0x20
1106 PERF_CONTEXT_KERNEL = -0x80
1107 PERF_CONTEXT_USER = -0x200
1108
1109 PERF_CONTEXT_GUEST = -0x800
1110 PERF_CONTEXT_GUEST_KERNEL = -0x880
1111 PERF_CONTEXT_GUEST_USER = -0xa00
1112
1113 PERF_FLAG_FD_NO_GROUP = 0x1
1114 PERF_FLAG_FD_OUTPUT = 0x2
1115 PERF_FLAG_PID_CGROUP = 0x4
1116 )
1117
1118 const (
1119 CBitFieldMaskBit0 = 0x1
1120 CBitFieldMaskBit1 = 0x2
1121 CBitFieldMaskBit2 = 0x4
1122 CBitFieldMaskBit3 = 0x8
1123 CBitFieldMaskBit4 = 0x10
1124 CBitFieldMaskBit5 = 0x20
1125 CBitFieldMaskBit6 = 0x40
1126 CBitFieldMaskBit7 = 0x80
1127 CBitFieldMaskBit8 = 0x100
1128 CBitFieldMaskBit9 = 0x200
1129 CBitFieldMaskBit10 = 0x400
1130 CBitFieldMaskBit11 = 0x800
1131 CBitFieldMaskBit12 = 0x1000
1132 CBitFieldMaskBit13 = 0x2000
1133 CBitFieldMaskBit14 = 0x4000
1134 CBitFieldMaskBit15 = 0x8000
1135 CBitFieldMaskBit16 = 0x10000
1136 CBitFieldMaskBit17 = 0x20000
1137 CBitFieldMaskBit18 = 0x40000
1138 CBitFieldMaskBit19 = 0x80000
1139 CBitFieldMaskBit20 = 0x100000
1140 CBitFieldMaskBit21 = 0x200000
1141 CBitFieldMaskBit22 = 0x400000
1142 CBitFieldMaskBit23 = 0x800000
1143 CBitFieldMaskBit24 = 0x1000000
1144 CBitFieldMaskBit25 = 0x2000000
1145 CBitFieldMaskBit26 = 0x4000000
1146 CBitFieldMaskBit27 = 0x8000000
1147 CBitFieldMaskBit28 = 0x10000000
1148 CBitFieldMaskBit29 = 0x20000000
1149 CBitFieldMaskBit30 = 0x40000000
1150 CBitFieldMaskBit31 = 0x80000000
1151 CBitFieldMaskBit32 = 0x100000000
1152 CBitFieldMaskBit33 = 0x200000000
1153 CBitFieldMaskBit34 = 0x400000000
1154 CBitFieldMaskBit35 = 0x800000000
1155 CBitFieldMaskBit36 = 0x1000000000
1156 CBitFieldMaskBit37 = 0x2000000000
1157 CBitFieldMaskBit38 = 0x4000000000
1158 CBitFieldMaskBit39 = 0x8000000000
1159 CBitFieldMaskBit40 = 0x10000000000
1160 CBitFieldMaskBit41 = 0x20000000000
1161 CBitFieldMaskBit42 = 0x40000000000
1162 CBitFieldMaskBit43 = 0x80000000000
1163 CBitFieldMaskBit44 = 0x100000000000
1164 CBitFieldMaskBit45 = 0x200000000000
1165 CBitFieldMaskBit46 = 0x400000000000
1166 CBitFieldMaskBit47 = 0x800000000000
1167 CBitFieldMaskBit48 = 0x1000000000000
1168 CBitFieldMaskBit49 = 0x2000000000000
1169 CBitFieldMaskBit50 = 0x4000000000000
1170 CBitFieldMaskBit51 = 0x8000000000000
1171 CBitFieldMaskBit52 = 0x10000000000000
1172 CBitFieldMaskBit53 = 0x20000000000000
1173 CBitFieldMaskBit54 = 0x40000000000000
1174 CBitFieldMaskBit55 = 0x80000000000000
1175 CBitFieldMaskBit56 = 0x100000000000000
1176 CBitFieldMaskBit57 = 0x200000000000000
1177 CBitFieldMaskBit58 = 0x400000000000000
1178 CBitFieldMaskBit59 = 0x800000000000000
1179 CBitFieldMaskBit60 = 0x1000000000000000
1180 CBitFieldMaskBit61 = 0x2000000000000000
1181 CBitFieldMaskBit62 = 0x4000000000000000
1182 CBitFieldMaskBit63 = 0x8000000000000000
1183 )
1184
1185 type SockaddrStorage struct {
1186 Family uint16
1187 _ [118]int8
1188 _ uint64
1189 }
1190
1191 type TCPMD5Sig struct {
1192 Addr SockaddrStorage
1193 Flags uint8
1194 Prefixlen uint8
1195 Keylen uint16
1196 _ uint32
1197 Key [80]uint8
1198 }
1199
1200 type HDDriveCmdHdr struct {
1201 Command uint8
1202 Number uint8
1203 Feature uint8
1204 Count uint8
1205 }
1206
1207 type HDGeometry struct {
1208 Heads uint8
1209 Sectors uint8
1210 Cylinders uint16
1211 Start uint64
1212 }
1213
1214 type HDDriveID struct {
1215 Config uint16
1216 Cyls uint16
1217 Reserved2 uint16
1218 Heads uint16
1219 Track_bytes uint16
1220 Sector_bytes uint16
1221 Sectors uint16
1222 Vendor0 uint16
1223 Vendor1 uint16
1224 Vendor2 uint16
1225 Serial_no [20]uint8
1226 Buf_type uint16
1227 Buf_size uint16
1228 Ecc_bytes uint16
1229 Fw_rev [8]uint8
1230 Model [40]uint8
1231 Max_multsect uint8
1232 Vendor3 uint8
1233 Dword_io uint16
1234 Vendor4 uint8
1235 Capability uint8
1236 Reserved50 uint16
1237 Vendor5 uint8
1238 TPIO uint8
1239 Vendor6 uint8
1240 TDMA uint8
1241 Field_valid uint16
1242 Cur_cyls uint16
1243 Cur_heads uint16
1244 Cur_sectors uint16
1245 Cur_capacity0 uint16
1246 Cur_capacity1 uint16
1247 Multsect uint8
1248 Multsect_valid uint8
1249 Lba_capacity uint32
1250 Dma_1word uint16
1251 Dma_mword uint16
1252 Eide_pio_modes uint16
1253 Eide_dma_min uint16
1254 Eide_dma_time uint16
1255 Eide_pio uint16
1256 Eide_pio_iordy uint16
1257 Words69_70 [2]uint16
1258 Words71_74 [4]uint16
1259 Queue_depth uint16
1260 Words76_79 [4]uint16
1261 Major_rev_num uint16
1262 Minor_rev_num uint16
1263 Command_set_1 uint16
1264 Command_set_2 uint16
1265 Cfsse uint16
1266 Cfs_enable_1 uint16
1267 Cfs_enable_2 uint16
1268 Csf_default uint16
1269 Dma_ultra uint16
1270 Trseuc uint16
1271 TrsEuc uint16
1272 CurAPMvalues uint16
1273 Mprc uint16
1274 Hw_config uint16
1275 Acoustic uint16
1276 Msrqs uint16
1277 Sxfert uint16
1278 Sal uint16
1279 Spg uint32
1280 Lba_capacity_2 uint64
1281 Words104_125 [22]uint16
1282 Last_lun uint16
1283 Word127 uint16
1284 Dlf uint16
1285 Csfo uint16
1286 Words130_155 [26]uint16
1287 Word156 uint16
1288 Words157_159 [3]uint16
1289 Cfa_power uint16
1290 Words161_175 [15]uint16
1291 Words176_205 [30]uint16
1292 Words206_254 [49]uint16
1293 Integrity_word uint16
1294 }
1295
1296 type Statfs_t struct {
1297 Type int64
1298 Bsize int64
1299 Blocks uint64
1300 Bfree uint64
1301 Bavail uint64
1302 Files uint64
1303 Ffree uint64
1304 Fsid Fsid
1305 Namelen int64
1306 Frsize int64
1307 Flags int64
1308 Spare [4]int64
1309 }
1310
1311 const (
1312 ST_MANDLOCK = 0x40
1313 ST_NOATIME = 0x400
1314 ST_NODEV = 0x4
1315 ST_NODIRATIME = 0x800
1316 ST_NOEXEC = 0x8
1317 ST_NOSUID = 0x2
1318 ST_RDONLY = 0x1
1319 ST_RELATIME = 0x1000
1320 ST_SYNCHRONOUS = 0x10
1321 )
1322
1323 type TpacketHdr struct {
1324 Status uint64
1325 Len uint32
1326 Snaplen uint32
1327 Mac uint16
1328 Net uint16
1329 Sec uint32
1330 Usec uint32
1331 _ [4]byte
1332 }
1333
1334 type Tpacket2Hdr struct {
1335 Status uint32
1336 Len uint32
1337 Snaplen uint32
1338 Mac uint16
1339 Net uint16
1340 Sec uint32
1341 Nsec uint32
1342 Vlan_tci uint16
1343 Vlan_tpid uint16
1344 _ [4]uint8
1345 }
1346
1347 type Tpacket3Hdr struct {
1348 Next_offset uint32
1349 Sec uint32
1350 Nsec uint32
1351 Snaplen uint32
1352 Len uint32
1353 Status uint32
1354 Mac uint16
1355 Net uint16
1356 Hv1 TpacketHdrVariant1
1357 _ [8]uint8
1358 }
1359
1360 type TpacketHdrVariant1 struct {
1361 Rxhash uint32
1362 Vlan_tci uint32
1363 Vlan_tpid uint16
1364 _ uint16
1365 }
1366
1367 type TpacketBlockDesc struct {
1368 Version uint32
1369 To_priv uint32
1370 Hdr [40]byte
1371 }
1372
1373 type TpacketReq struct {
1374 Block_size uint32
1375 Block_nr uint32
1376 Frame_size uint32
1377 Frame_nr uint32
1378 }
1379
1380 type TpacketReq3 struct {
1381 Block_size uint32
1382 Block_nr uint32
1383 Frame_size uint32
1384 Frame_nr uint32
1385 Retire_blk_tov uint32
1386 Sizeof_priv uint32
1387 Feature_req_word uint32
1388 }
1389
1390 type TpacketStats struct {
1391 Packets uint32
1392 Drops uint32
1393 }
1394
1395 type TpacketStatsV3 struct {
1396 Packets uint32
1397 Drops uint32
1398 Freeze_q_cnt uint32
1399 }
1400
1401 type TpacketAuxdata struct {
1402 Status uint32
1403 Len uint32
1404 Snaplen uint32
1405 Mac uint16
1406 Net uint16
1407 Vlan_tci uint16
1408 Vlan_tpid uint16
1409 }
1410
1411 const (
1412 TPACKET_V1 = 0x0
1413 TPACKET_V2 = 0x1
1414 TPACKET_V3 = 0x2
1415 )
1416
1417 const (
1418 SizeofTpacketHdr = 0x20
1419 SizeofTpacket2Hdr = 0x20
1420 SizeofTpacket3Hdr = 0x30
1421 )
1422
1423 const (
1424 NF_INET_PRE_ROUTING = 0x0
1425 NF_INET_LOCAL_IN = 0x1
1426 NF_INET_FORWARD = 0x2
1427 NF_INET_LOCAL_OUT = 0x3
1428 NF_INET_POST_ROUTING = 0x4
1429 NF_INET_NUMHOOKS = 0x5
1430 )
1431
1432 const (
1433 NF_NETDEV_INGRESS = 0x0
1434 NF_NETDEV_NUMHOOKS = 0x1
1435 )
1436
1437 const (
1438 NFPROTO_UNSPEC = 0x0
1439 NFPROTO_INET = 0x1
1440 NFPROTO_IPV4 = 0x2
1441 NFPROTO_ARP = 0x3
1442 NFPROTO_NETDEV = 0x5
1443 NFPROTO_BRIDGE = 0x7
1444 NFPROTO_IPV6 = 0xa
1445 NFPROTO_DECNET = 0xc
1446 NFPROTO_NUMPROTO = 0xd
1447 )
1448
1449 type Nfgenmsg struct {
1450 Nfgen_family uint8
1451 Version uint8
1452 Res_id uint16
1453 }
1454
1455 const (
1456 NFNL_BATCH_UNSPEC = 0x0
1457 NFNL_BATCH_GENID = 0x1
1458 )
1459
1460 const (
1461 NFT_REG_VERDICT = 0x0
1462 NFT_REG_1 = 0x1
1463 NFT_REG_2 = 0x2
1464 NFT_REG_3 = 0x3
1465 NFT_REG_4 = 0x4
1466 NFT_REG32_00 = 0x8
1467 NFT_REG32_01 = 0x9
1468 NFT_REG32_02 = 0xa
1469 NFT_REG32_03 = 0xb
1470 NFT_REG32_04 = 0xc
1471 NFT_REG32_05 = 0xd
1472 NFT_REG32_06 = 0xe
1473 NFT_REG32_07 = 0xf
1474 NFT_REG32_08 = 0x10
1475 NFT_REG32_09 = 0x11
1476 NFT_REG32_10 = 0x12
1477 NFT_REG32_11 = 0x13
1478 NFT_REG32_12 = 0x14
1479 NFT_REG32_13 = 0x15
1480 NFT_REG32_14 = 0x16
1481 NFT_REG32_15 = 0x17
1482 NFT_CONTINUE = -0x1
1483 NFT_BREAK = -0x2
1484 NFT_JUMP = -0x3
1485 NFT_GOTO = -0x4
1486 NFT_RETURN = -0x5
1487 NFT_MSG_NEWTABLE = 0x0
1488 NFT_MSG_GETTABLE = 0x1
1489 NFT_MSG_DELTABLE = 0x2
1490 NFT_MSG_NEWCHAIN = 0x3
1491 NFT_MSG_GETCHAIN = 0x4
1492 NFT_MSG_DELCHAIN = 0x5
1493 NFT_MSG_NEWRULE = 0x6
1494 NFT_MSG_GETRULE = 0x7
1495 NFT_MSG_DELRULE = 0x8
1496 NFT_MSG_NEWSET = 0x9
1497 NFT_MSG_GETSET = 0xa
1498 NFT_MSG_DELSET = 0xb
1499 NFT_MSG_NEWSETELEM = 0xc
1500 NFT_MSG_GETSETELEM = 0xd
1501 NFT_MSG_DELSETELEM = 0xe
1502 NFT_MSG_NEWGEN = 0xf
1503 NFT_MSG_GETGEN = 0x10
1504 NFT_MSG_TRACE = 0x11
1505 NFT_MSG_NEWOBJ = 0x12
1506 NFT_MSG_GETOBJ = 0x13
1507 NFT_MSG_DELOBJ = 0x14
1508 NFT_MSG_GETOBJ_RESET = 0x15
1509 NFT_MSG_MAX = 0x19
1510 NFTA_LIST_UNPEC = 0x0
1511 NFTA_LIST_ELEM = 0x1
1512 NFTA_HOOK_UNSPEC = 0x0
1513 NFTA_HOOK_HOOKNUM = 0x1
1514 NFTA_HOOK_PRIORITY = 0x2
1515 NFTA_HOOK_DEV = 0x3
1516 NFT_TABLE_F_DORMANT = 0x1
1517 NFTA_TABLE_UNSPEC = 0x0
1518 NFTA_TABLE_NAME = 0x1
1519 NFTA_TABLE_FLAGS = 0x2
1520 NFTA_TABLE_USE = 0x3
1521 NFTA_CHAIN_UNSPEC = 0x0
1522 NFTA_CHAIN_TABLE = 0x1
1523 NFTA_CHAIN_HANDLE = 0x2
1524 NFTA_CHAIN_NAME = 0x3
1525 NFTA_CHAIN_HOOK = 0x4
1526 NFTA_CHAIN_POLICY = 0x5
1527 NFTA_CHAIN_USE = 0x6
1528 NFTA_CHAIN_TYPE = 0x7
1529 NFTA_CHAIN_COUNTERS = 0x8
1530 NFTA_CHAIN_PAD = 0x9
1531 NFTA_RULE_UNSPEC = 0x0
1532 NFTA_RULE_TABLE = 0x1
1533 NFTA_RULE_CHAIN = 0x2
1534 NFTA_RULE_HANDLE = 0x3
1535 NFTA_RULE_EXPRESSIONS = 0x4
1536 NFTA_RULE_COMPAT = 0x5
1537 NFTA_RULE_POSITION = 0x6
1538 NFTA_RULE_USERDATA = 0x7
1539 NFTA_RULE_PAD = 0x8
1540 NFTA_RULE_ID = 0x9
1541 NFT_RULE_COMPAT_F_INV = 0x2
1542 NFT_RULE_COMPAT_F_MASK = 0x2
1543 NFTA_RULE_COMPAT_UNSPEC = 0x0
1544 NFTA_RULE_COMPAT_PROTO = 0x1
1545 NFTA_RULE_COMPAT_FLAGS = 0x2
1546 NFT_SET_ANONYMOUS = 0x1
1547 NFT_SET_CONSTANT = 0x2
1548 NFT_SET_INTERVAL = 0x4
1549 NFT_SET_MAP = 0x8
1550 NFT_SET_TIMEOUT = 0x10
1551 NFT_SET_EVAL = 0x20
1552 NFT_SET_OBJECT = 0x40
1553 NFT_SET_POL_PERFORMANCE = 0x0
1554 NFT_SET_POL_MEMORY = 0x1
1555 NFTA_SET_DESC_UNSPEC = 0x0
1556 NFTA_SET_DESC_SIZE = 0x1
1557 NFTA_SET_UNSPEC = 0x0
1558 NFTA_SET_TABLE = 0x1
1559 NFTA_SET_NAME = 0x2
1560 NFTA_SET_FLAGS = 0x3
1561 NFTA_SET_KEY_TYPE = 0x4
1562 NFTA_SET_KEY_LEN = 0x5
1563 NFTA_SET_DATA_TYPE = 0x6
1564 NFTA_SET_DATA_LEN = 0x7
1565 NFTA_SET_POLICY = 0x8
1566 NFTA_SET_DESC = 0x9
1567 NFTA_SET_ID = 0xa
1568 NFTA_SET_TIMEOUT = 0xb
1569 NFTA_SET_GC_INTERVAL = 0xc
1570 NFTA_SET_USERDATA = 0xd
1571 NFTA_SET_PAD = 0xe
1572 NFTA_SET_OBJ_TYPE = 0xf
1573 NFT_SET_ELEM_INTERVAL_END = 0x1
1574 NFTA_SET_ELEM_UNSPEC = 0x0
1575 NFTA_SET_ELEM_KEY = 0x1
1576 NFTA_SET_ELEM_DATA = 0x2
1577 NFTA_SET_ELEM_FLAGS = 0x3
1578 NFTA_SET_ELEM_TIMEOUT = 0x4
1579 NFTA_SET_ELEM_EXPIRATION = 0x5
1580 NFTA_SET_ELEM_USERDATA = 0x6
1581 NFTA_SET_ELEM_EXPR = 0x7
1582 NFTA_SET_ELEM_PAD = 0x8
1583 NFTA_SET_ELEM_OBJREF = 0x9
1584 NFTA_SET_ELEM_LIST_UNSPEC = 0x0
1585 NFTA_SET_ELEM_LIST_TABLE = 0x1
1586 NFTA_SET_ELEM_LIST_SET = 0x2
1587 NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
1588 NFTA_SET_ELEM_LIST_SET_ID = 0x4
1589 NFT_DATA_VALUE = 0x0
1590 NFT_DATA_VERDICT = 0xffffff00
1591 NFTA_DATA_UNSPEC = 0x0
1592 NFTA_DATA_VALUE = 0x1
1593 NFTA_DATA_VERDICT = 0x2
1594 NFTA_VERDICT_UNSPEC = 0x0
1595 NFTA_VERDICT_CODE = 0x1
1596 NFTA_VERDICT_CHAIN = 0x2
1597 NFTA_EXPR_UNSPEC = 0x0
1598 NFTA_EXPR_NAME = 0x1
1599 NFTA_EXPR_DATA = 0x2
1600 NFTA_IMMEDIATE_UNSPEC = 0x0
1601 NFTA_IMMEDIATE_DREG = 0x1
1602 NFTA_IMMEDIATE_DATA = 0x2
1603 NFTA_BITWISE_UNSPEC = 0x0
1604 NFTA_BITWISE_SREG = 0x1
1605 NFTA_BITWISE_DREG = 0x2
1606 NFTA_BITWISE_LEN = 0x3
1607 NFTA_BITWISE_MASK = 0x4
1608 NFTA_BITWISE_XOR = 0x5
1609 NFT_BYTEORDER_NTOH = 0x0
1610 NFT_BYTEORDER_HTON = 0x1
1611 NFTA_BYTEORDER_UNSPEC = 0x0
1612 NFTA_BYTEORDER_SREG = 0x1
1613 NFTA_BYTEORDER_DREG = 0x2
1614 NFTA_BYTEORDER_OP = 0x3
1615 NFTA_BYTEORDER_LEN = 0x4
1616 NFTA_BYTEORDER_SIZE = 0x5
1617 NFT_CMP_EQ = 0x0
1618 NFT_CMP_NEQ = 0x1
1619 NFT_CMP_LT = 0x2
1620 NFT_CMP_LTE = 0x3
1621 NFT_CMP_GT = 0x4
1622 NFT_CMP_GTE = 0x5
1623 NFTA_CMP_UNSPEC = 0x0
1624 NFTA_CMP_SREG = 0x1
1625 NFTA_CMP_OP = 0x2
1626 NFTA_CMP_DATA = 0x3
1627 NFT_RANGE_EQ = 0x0
1628 NFT_RANGE_NEQ = 0x1
1629 NFTA_RANGE_UNSPEC = 0x0
1630 NFTA_RANGE_SREG = 0x1
1631 NFTA_RANGE_OP = 0x2
1632 NFTA_RANGE_FROM_DATA = 0x3
1633 NFTA_RANGE_TO_DATA = 0x4
1634 NFT_LOOKUP_F_INV = 0x1
1635 NFTA_LOOKUP_UNSPEC = 0x0
1636 NFTA_LOOKUP_SET = 0x1
1637 NFTA_LOOKUP_SREG = 0x2
1638 NFTA_LOOKUP_DREG = 0x3
1639 NFTA_LOOKUP_SET_ID = 0x4
1640 NFTA_LOOKUP_FLAGS = 0x5
1641 NFT_DYNSET_OP_ADD = 0x0
1642 NFT_DYNSET_OP_UPDATE = 0x1
1643 NFT_DYNSET_F_INV = 0x1
1644 NFTA_DYNSET_UNSPEC = 0x0
1645 NFTA_DYNSET_SET_NAME = 0x1
1646 NFTA_DYNSET_SET_ID = 0x2
1647 NFTA_DYNSET_OP = 0x3
1648 NFTA_DYNSET_SREG_KEY = 0x4
1649 NFTA_DYNSET_SREG_DATA = 0x5
1650 NFTA_DYNSET_TIMEOUT = 0x6
1651 NFTA_DYNSET_EXPR = 0x7
1652 NFTA_DYNSET_PAD = 0x8
1653 NFTA_DYNSET_FLAGS = 0x9
1654 NFT_PAYLOAD_LL_HEADER = 0x0
1655 NFT_PAYLOAD_NETWORK_HEADER = 0x1
1656 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
1657 NFT_PAYLOAD_CSUM_NONE = 0x0
1658 NFT_PAYLOAD_CSUM_INET = 0x1
1659 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
1660 NFTA_PAYLOAD_UNSPEC = 0x0
1661 NFTA_PAYLOAD_DREG = 0x1
1662 NFTA_PAYLOAD_BASE = 0x2
1663 NFTA_PAYLOAD_OFFSET = 0x3
1664 NFTA_PAYLOAD_LEN = 0x4
1665 NFTA_PAYLOAD_SREG = 0x5
1666 NFTA_PAYLOAD_CSUM_TYPE = 0x6
1667 NFTA_PAYLOAD_CSUM_OFFSET = 0x7
1668 NFTA_PAYLOAD_CSUM_FLAGS = 0x8
1669 NFT_EXTHDR_F_PRESENT = 0x1
1670 NFT_EXTHDR_OP_IPV6 = 0x0
1671 NFT_EXTHDR_OP_TCPOPT = 0x1
1672 NFTA_EXTHDR_UNSPEC = 0x0
1673 NFTA_EXTHDR_DREG = 0x1
1674 NFTA_EXTHDR_TYPE = 0x2
1675 NFTA_EXTHDR_OFFSET = 0x3
1676 NFTA_EXTHDR_LEN = 0x4
1677 NFTA_EXTHDR_FLAGS = 0x5
1678 NFTA_EXTHDR_OP = 0x6
1679 NFTA_EXTHDR_SREG = 0x7
1680 NFT_META_LEN = 0x0
1681 NFT_META_PROTOCOL = 0x1
1682 NFT_META_PRIORITY = 0x2
1683 NFT_META_MARK = 0x3
1684 NFT_META_IIF = 0x4
1685 NFT_META_OIF = 0x5
1686 NFT_META_IIFNAME = 0x6
1687 NFT_META_OIFNAME = 0x7
1688 NFT_META_IIFTYPE = 0x8
1689 NFT_META_OIFTYPE = 0x9
1690 NFT_META_SKUID = 0xa
1691 NFT_META_SKGID = 0xb
1692 NFT_META_NFTRACE = 0xc
1693 NFT_META_RTCLASSID = 0xd
1694 NFT_META_SECMARK = 0xe
1695 NFT_META_NFPROTO = 0xf
1696 NFT_META_L4PROTO = 0x10
1697 NFT_META_BRI_IIFNAME = 0x11
1698 NFT_META_BRI_OIFNAME = 0x12
1699 NFT_META_PKTTYPE = 0x13
1700 NFT_META_CPU = 0x14
1701 NFT_META_IIFGROUP = 0x15
1702 NFT_META_OIFGROUP = 0x16
1703 NFT_META_CGROUP = 0x17
1704 NFT_META_PRANDOM = 0x18
1705 NFT_RT_CLASSID = 0x0
1706 NFT_RT_NEXTHOP4 = 0x1
1707 NFT_RT_NEXTHOP6 = 0x2
1708 NFT_RT_TCPMSS = 0x3
1709 NFT_HASH_JENKINS = 0x0
1710 NFT_HASH_SYM = 0x1
1711 NFTA_HASH_UNSPEC = 0x0
1712 NFTA_HASH_SREG = 0x1
1713 NFTA_HASH_DREG = 0x2
1714 NFTA_HASH_LEN = 0x3
1715 NFTA_HASH_MODULUS = 0x4
1716 NFTA_HASH_SEED = 0x5
1717 NFTA_HASH_OFFSET = 0x6
1718 NFTA_HASH_TYPE = 0x7
1719 NFTA_META_UNSPEC = 0x0
1720 NFTA_META_DREG = 0x1
1721 NFTA_META_KEY = 0x2
1722 NFTA_META_SREG = 0x3
1723 NFTA_RT_UNSPEC = 0x0
1724 NFTA_RT_DREG = 0x1
1725 NFTA_RT_KEY = 0x2
1726 NFT_CT_STATE = 0x0
1727 NFT_CT_DIRECTION = 0x1
1728 NFT_CT_STATUS = 0x2
1729 NFT_CT_MARK = 0x3
1730 NFT_CT_SECMARK = 0x4
1731 NFT_CT_EXPIRATION = 0x5
1732 NFT_CT_HELPER = 0x6
1733 NFT_CT_L3PROTOCOL = 0x7
1734 NFT_CT_SRC = 0x8
1735 NFT_CT_DST = 0x9
1736 NFT_CT_PROTOCOL = 0xa
1737 NFT_CT_PROTO_SRC = 0xb
1738 NFT_CT_PROTO_DST = 0xc
1739 NFT_CT_LABELS = 0xd
1740 NFT_CT_PKTS = 0xe
1741 NFT_CT_BYTES = 0xf
1742 NFT_CT_AVGPKT = 0x10
1743 NFT_CT_ZONE = 0x11
1744 NFT_CT_EVENTMASK = 0x12
1745 NFTA_CT_UNSPEC = 0x0
1746 NFTA_CT_DREG = 0x1
1747 NFTA_CT_KEY = 0x2
1748 NFTA_CT_DIRECTION = 0x3
1749 NFTA_CT_SREG = 0x4
1750 NFT_LIMIT_PKTS = 0x0
1751 NFT_LIMIT_PKT_BYTES = 0x1
1752 NFT_LIMIT_F_INV = 0x1
1753 NFTA_LIMIT_UNSPEC = 0x0
1754 NFTA_LIMIT_RATE = 0x1
1755 NFTA_LIMIT_UNIT = 0x2
1756 NFTA_LIMIT_BURST = 0x3
1757 NFTA_LIMIT_TYPE = 0x4
1758 NFTA_LIMIT_FLAGS = 0x5
1759 NFTA_LIMIT_PAD = 0x6
1760 NFTA_COUNTER_UNSPEC = 0x0
1761 NFTA_COUNTER_BYTES = 0x1
1762 NFTA_COUNTER_PACKETS = 0x2
1763 NFTA_COUNTER_PAD = 0x3
1764 NFTA_LOG_UNSPEC = 0x0
1765 NFTA_LOG_GROUP = 0x1
1766 NFTA_LOG_PREFIX = 0x2
1767 NFTA_LOG_SNAPLEN = 0x3
1768 NFTA_LOG_QTHRESHOLD = 0x4
1769 NFTA_LOG_LEVEL = 0x5
1770 NFTA_LOG_FLAGS = 0x6
1771 NFTA_QUEUE_UNSPEC = 0x0
1772 NFTA_QUEUE_NUM = 0x1
1773 NFTA_QUEUE_TOTAL = 0x2
1774 NFTA_QUEUE_FLAGS = 0x3
1775 NFTA_QUEUE_SREG_QNUM = 0x4
1776 NFT_QUOTA_F_INV = 0x1
1777 NFT_QUOTA_F_DEPLETED = 0x2
1778 NFTA_QUOTA_UNSPEC = 0x0
1779 NFTA_QUOTA_BYTES = 0x1
1780 NFTA_QUOTA_FLAGS = 0x2
1781 NFTA_QUOTA_PAD = 0x3
1782 NFTA_QUOTA_CONSUMED = 0x4
1783 NFT_REJECT_ICMP_UNREACH = 0x0
1784 NFT_REJECT_TCP_RST = 0x1
1785 NFT_REJECT_ICMPX_UNREACH = 0x2
1786 NFT_REJECT_ICMPX_NO_ROUTE = 0x0
1787 NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
1788 NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
1789 NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
1790 NFTA_REJECT_UNSPEC = 0x0
1791 NFTA_REJECT_TYPE = 0x1
1792 NFTA_REJECT_ICMP_CODE = 0x2
1793 NFT_NAT_SNAT = 0x0
1794 NFT_NAT_DNAT = 0x1
1795 NFTA_NAT_UNSPEC = 0x0
1796 NFTA_NAT_TYPE = 0x1
1797 NFTA_NAT_FAMILY = 0x2
1798 NFTA_NAT_REG_ADDR_MIN = 0x3
1799 NFTA_NAT_REG_ADDR_MAX = 0x4
1800 NFTA_NAT_REG_PROTO_MIN = 0x5
1801 NFTA_NAT_REG_PROTO_MAX = 0x6
1802 NFTA_NAT_FLAGS = 0x7
1803 NFTA_MASQ_UNSPEC = 0x0
1804 NFTA_MASQ_FLAGS = 0x1
1805 NFTA_MASQ_REG_PROTO_MIN = 0x2
1806 NFTA_MASQ_REG_PROTO_MAX = 0x3
1807 NFTA_REDIR_UNSPEC = 0x0
1808 NFTA_REDIR_REG_PROTO_MIN = 0x1
1809 NFTA_REDIR_REG_PROTO_MAX = 0x2
1810 NFTA_REDIR_FLAGS = 0x3
1811 NFTA_DUP_UNSPEC = 0x0
1812 NFTA_DUP_SREG_ADDR = 0x1
1813 NFTA_DUP_SREG_DEV = 0x2
1814 NFTA_FWD_UNSPEC = 0x0
1815 NFTA_FWD_SREG_DEV = 0x1
1816 NFTA_OBJREF_UNSPEC = 0x0
1817 NFTA_OBJREF_IMM_TYPE = 0x1
1818 NFTA_OBJREF_IMM_NAME = 0x2
1819 NFTA_OBJREF_SET_SREG = 0x3
1820 NFTA_OBJREF_SET_NAME = 0x4
1821 NFTA_OBJREF_SET_ID = 0x5
1822 NFTA_GEN_UNSPEC = 0x0
1823 NFTA_GEN_ID = 0x1
1824 NFTA_GEN_PROC_PID = 0x2
1825 NFTA_GEN_PROC_NAME = 0x3
1826 NFTA_FIB_UNSPEC = 0x0
1827 NFTA_FIB_DREG = 0x1
1828 NFTA_FIB_RESULT = 0x2
1829 NFTA_FIB_FLAGS = 0x3
1830 NFT_FIB_RESULT_UNSPEC = 0x0
1831 NFT_FIB_RESULT_OIF = 0x1
1832 NFT_FIB_RESULT_OIFNAME = 0x2
1833 NFT_FIB_RESULT_ADDRTYPE = 0x3
1834 NFTA_FIB_F_SADDR = 0x1
1835 NFTA_FIB_F_DADDR = 0x2
1836 NFTA_FIB_F_MARK = 0x4
1837 NFTA_FIB_F_IIF = 0x8
1838 NFTA_FIB_F_OIF = 0x10
1839 NFTA_FIB_F_PRESENT = 0x20
1840 NFTA_CT_HELPER_UNSPEC = 0x0
1841 NFTA_CT_HELPER_NAME = 0x1
1842 NFTA_CT_HELPER_L3PROTO = 0x2
1843 NFTA_CT_HELPER_L4PROTO = 0x3
1844 NFTA_OBJ_UNSPEC = 0x0
1845 NFTA_OBJ_TABLE = 0x1
1846 NFTA_OBJ_NAME = 0x2
1847 NFTA_OBJ_TYPE = 0x3
1848 NFTA_OBJ_DATA = 0x4
1849 NFTA_OBJ_USE = 0x5
1850 NFTA_TRACE_UNSPEC = 0x0
1851 NFTA_TRACE_TABLE = 0x1
1852 NFTA_TRACE_CHAIN = 0x2
1853 NFTA_TRACE_RULE_HANDLE = 0x3
1854 NFTA_TRACE_TYPE = 0x4
1855 NFTA_TRACE_VERDICT = 0x5
1856 NFTA_TRACE_ID = 0x6
1857 NFTA_TRACE_LL_HEADER = 0x7
1858 NFTA_TRACE_NETWORK_HEADER = 0x8
1859 NFTA_TRACE_TRANSPORT_HEADER = 0x9
1860 NFTA_TRACE_IIF = 0xa
1861 NFTA_TRACE_IIFTYPE = 0xb
1862 NFTA_TRACE_OIF = 0xc
1863 NFTA_TRACE_OIFTYPE = 0xd
1864 NFTA_TRACE_MARK = 0xe
1865 NFTA_TRACE_NFPROTO = 0xf
1866 NFTA_TRACE_POLICY = 0x10
1867 NFTA_TRACE_PAD = 0x11
1868 NFT_TRACETYPE_UNSPEC = 0x0
1869 NFT_TRACETYPE_POLICY = 0x1
1870 NFT_TRACETYPE_RETURN = 0x2
1871 NFT_TRACETYPE_RULE = 0x3
1872 NFTA_NG_UNSPEC = 0x0
1873 NFTA_NG_DREG = 0x1
1874 NFTA_NG_MODULUS = 0x2
1875 NFTA_NG_TYPE = 0x3
1876 NFTA_NG_OFFSET = 0x4
1877 NFT_NG_INCREMENTAL = 0x0
1878 NFT_NG_RANDOM = 0x1
1879 )
1880
1881 type RTCTime struct {
1882 Sec int32
1883 Min int32
1884 Hour int32
1885 Mday int32
1886 Mon int32
1887 Year int32
1888 Wday int32
1889 Yday int32
1890 Isdst int32
1891 }
1892
1893 type RTCWkAlrm struct {
1894 Enabled uint8
1895 Pending uint8
1896 Time RTCTime
1897 }
1898
1899 type RTCPLLInfo struct {
1900 Ctrl int32
1901 Value int32
1902 Max int32
1903 Min int32
1904 Posmult int32
1905 Negmult int32
1906 Clock int64
1907 }
1908
1909 type BlkpgIoctlArg struct {
1910 Op int32
1911 Flags int32
1912 Datalen int32
1913 Data *byte
1914 }
1915
1916 type BlkpgPartition struct {
1917 Start int64
1918 Length int64
1919 Pno int32
1920 Devname [64]uint8
1921 Volname [64]uint8
1922 _ [4]byte
1923 }
1924
1925 const (
1926 BLKPG = 0x1269
1927 BLKPG_ADD_PARTITION = 0x1
1928 BLKPG_DEL_PARTITION = 0x2
1929 BLKPG_RESIZE_PARTITION = 0x3
1930 )
1931
1932 const (
1933 NETNSA_NONE = 0x0
1934 NETNSA_NSID = 0x1
1935 NETNSA_PID = 0x2
1936 NETNSA_FD = 0x3
1937 )
1938
1939 type XDPRingOffset struct {
1940 Producer uint64
1941 Consumer uint64
1942 Desc uint64
1943 }
1944
1945 type XDPMmapOffsets struct {
1946 Rx XDPRingOffset
1947 Tx XDPRingOffset
1948 Fr XDPRingOffset
1949 Cr XDPRingOffset
1950 }
1951
1952 type XDPUmemReg struct {
1953 Addr uint64
1954 Len uint64
1955 Size uint32
1956 Headroom uint32
1957 }
1958
1959 type XDPStatistics struct {
1960 Rx_dropped uint64
1961 Rx_invalid_descs uint64
1962 Tx_invalid_descs uint64
1963 }
1964
1965 type XDPDesc struct {
1966 Addr uint64
1967 Len uint32
1968 Options uint32
1969 }
1970
1971 const (
1972 NCSI_CMD_UNSPEC = 0x0
1973 NCSI_CMD_PKG_INFO = 0x1
1974 NCSI_CMD_SET_INTERFACE = 0x2
1975 NCSI_CMD_CLEAR_INTERFACE = 0x3
1976 NCSI_ATTR_UNSPEC = 0x0
1977 NCSI_ATTR_IFINDEX = 0x1
1978 NCSI_ATTR_PACKAGE_LIST = 0x2
1979 NCSI_ATTR_PACKAGE_ID = 0x3
1980 NCSI_ATTR_CHANNEL_ID = 0x4
1981 NCSI_PKG_ATTR_UNSPEC = 0x0
1982 NCSI_PKG_ATTR = 0x1
1983 NCSI_PKG_ATTR_ID = 0x2
1984 NCSI_PKG_ATTR_FORCED = 0x3
1985 NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
1986 NCSI_CHANNEL_ATTR_UNSPEC = 0x0
1987 NCSI_CHANNEL_ATTR = 0x1
1988 NCSI_CHANNEL_ATTR_ID = 0x2
1989 NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
1990 NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
1991 NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
1992 NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
1993 NCSI_CHANNEL_ATTR_ACTIVE = 0x7
1994 NCSI_CHANNEL_ATTR_FORCED = 0x8
1995 NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
1996 NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
1997 )
1998
1999 const (
2000 SOF_TIMESTAMPING_TX_HARDWARE = 0x1
2001 SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
2002 SOF_TIMESTAMPING_RX_HARDWARE = 0x4
2003 SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
2004 SOF_TIMESTAMPING_SOFTWARE = 0x10
2005 SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
2006 SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
2007 SOF_TIMESTAMPING_OPT_ID = 0x80
2008 SOF_TIMESTAMPING_TX_SCHED = 0x100
2009 SOF_TIMESTAMPING_TX_ACK = 0x200
2010 SOF_TIMESTAMPING_OPT_CMSG = 0x400
2011 SOF_TIMESTAMPING_OPT_TSONLY = 0x800
2012 SOF_TIMESTAMPING_OPT_STATS = 0x1000
2013 SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
2014 SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
2015
2016 SOF_TIMESTAMPING_LAST = 0x4000
2017 SOF_TIMESTAMPING_MASK = 0x7fff
2018 )
55 package unix
66
77 const (
8 sizeofPtr = 0x4
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x4
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x4
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x4
12 SizeofLongLong = 0x8
1313 PathMax = 0x1000
1414 )
1515
5151 Errcnt int32
5252 Stbcnt int32
5353 Tai int32
54 Pad_cgo_0 [44]byte
54 _ [44]byte
5555 }
5656
5757 type Time_t int32
9595 type _Gid_t uint32
9696
9797 type Stat_t struct {
98 Dev uint64
99 X__pad1 uint16
100 Pad_cgo_0 [2]byte
101 X__st_ino uint32
102 Mode uint32
103 Nlink uint32
104 Uid uint32
105 Gid uint32
106 Rdev uint64
107 X__pad2 uint16
108 Pad_cgo_1 [6]byte
109 Size int64
110 Blksize int32
111 Pad_cgo_2 [4]byte
112 Blocks int64
113 Atim Timespec
114 Mtim Timespec
115 Ctim Timespec
116 Ino uint64
117 }
118
119 type Statfs_t struct {
120 Type int32
121 Bsize int32
122 Blocks uint64
123 Bfree uint64
124 Bavail uint64
125 Files uint64
126 Ffree uint64
127 Fsid Fsid
128 Namelen int32
129 Frsize int32
130 Flags int32
131 Spare [4]int32
132 Pad_cgo_0 [4]byte
98 Dev uint64
99 _ uint16
100 _ uint32
101 Mode uint32
102 Nlink uint32
103 Uid uint32
104 Gid uint32
105 Rdev uint64
106 _ uint16
107 _ [4]byte
108 Size int64
109 Blksize int32
110 _ [4]byte
111 Blocks int64
112 Atim Timespec
113 Mtim Timespec
114 Ctim Timespec
115 Ino uint64
116 }
117
118 type StatxTimestamp struct {
119 Sec int64
120 Nsec uint32
121 _ int32
122 }
123
124 type Statx_t struct {
125 Mask uint32
126 Blksize uint32
127 Attributes uint64
128 Nlink uint32
129 Uid uint32
130 Gid uint32
131 Mode uint16
132 _ [1]uint16
133 Ino uint64
134 Size uint64
135 Blocks uint64
136 Attributes_mask uint64
137 Atime StatxTimestamp
138 Btime StatxTimestamp
139 Ctime StatxTimestamp
140 Mtime StatxTimestamp
141 Rdev_major uint32
142 Rdev_minor uint32
143 Dev_major uint32
144 Dev_minor uint32
145 _ [14]uint64
133146 }
134147
135148 type Dirent struct {
136 Ino uint64
137 Off int64
138 Reclen uint16
139 Type uint8
140 Name [256]uint8
141 Pad_cgo_0 [5]byte
149 Ino uint64
150 Off int64
151 Reclen uint16
152 Type uint8
153 Name [256]uint8
154 _ [5]byte
142155 }
143156
144157 type Fsid struct {
145 X__val [2]int32
158 Val [2]int32
146159 }
147160
148161 type Flock_t struct {
149 Type int16
150 Whence int16
151 Pad_cgo_0 [4]byte
152 Start int64
153 Len int64
154 Pid int32
155 Pad_cgo_1 [4]byte
162 Type int16
163 Whence int16
164 _ [4]byte
165 Start int64
166 Len int64
167 Pid int32
168 _ [4]byte
156169 }
157170
158171 type FscryptPolicy struct {
227240 Channel uint16
228241 }
229242
243 type RawSockaddrL2 struct {
244 Family uint16
245 Psm uint16
246 Bdaddr [6]uint8
247 Cid uint16
248 Bdaddr_type uint8
249 _ [1]byte
250 }
251
252 type RawSockaddrRFCOMM struct {
253 Family uint16
254 Bdaddr [6]uint8
255 Channel uint8
256 _ [1]byte
257 }
258
230259 type RawSockaddrCAN struct {
231 Family uint16
232 Pad_cgo_0 [2]byte
233 Ifindex int32
234 Addr [8]byte
260 Family uint16
261 Ifindex int32
262 Addr [8]byte
235263 }
236264
237265 type RawSockaddrALG struct {
249277 Cid uint32
250278 Zero [4]uint8
251279 }
280
281 type RawSockaddrXDP struct {
282 Family uint16
283 Flags uint16
284 Ifindex uint32
285 Queue_id uint32
286 Shared_umem_fd uint32
287 }
288
289 type RawSockaddrPPPoX [0x1e]byte
252290
253291 type RawSockaddr struct {
254292 Family uint16
344382 Probes uint8
345383 Backoff uint8
346384 Options uint8
347 Pad_cgo_0 [2]byte
348385 Rto uint32
349386 Ato uint32
350387 Snd_mss uint32
379416 SizeofSockaddrLinklayer = 0x14
380417 SizeofSockaddrNetlink = 0xc
381418 SizeofSockaddrHCI = 0x6
419 SizeofSockaddrL2 = 0xe
420 SizeofSockaddrRFCOMM = 0xa
382421 SizeofSockaddrCAN = 0x10
383422 SizeofSockaddrALG = 0x58
384423 SizeofSockaddrVM = 0x10
424 SizeofSockaddrXDP = 0x10
425 SizeofSockaddrPPPoX = 0x1e
385426 SizeofLinger = 0x8
386427 SizeofIovec = 0x8
387428 SizeofIPMreq = 0x8
399440 )
400441
401442 const (
402 IFA_UNSPEC = 0x0
403 IFA_ADDRESS = 0x1
404 IFA_LOCAL = 0x2
405 IFA_LABEL = 0x3
406 IFA_BROADCAST = 0x4
407 IFA_ANYCAST = 0x5
408 IFA_CACHEINFO = 0x6
409 IFA_MULTICAST = 0x7
410 IFLA_UNSPEC = 0x0
411 IFLA_ADDRESS = 0x1
412 IFLA_BROADCAST = 0x2
413 IFLA_IFNAME = 0x3
414 IFLA_MTU = 0x4
415 IFLA_LINK = 0x5
416 IFLA_QDISC = 0x6
417 IFLA_STATS = 0x7
418 IFLA_COST = 0x8
419 IFLA_PRIORITY = 0x9
420 IFLA_MASTER = 0xa
421 IFLA_WIRELESS = 0xb
422 IFLA_PROTINFO = 0xc
423 IFLA_TXQLEN = 0xd
424 IFLA_MAP = 0xe
425 IFLA_WEIGHT = 0xf
426 IFLA_OPERSTATE = 0x10
427 IFLA_LINKMODE = 0x11
428 IFLA_LINKINFO = 0x12
429 IFLA_NET_NS_PID = 0x13
430 IFLA_IFALIAS = 0x14
431 IFLA_MAX = 0x2c
432 RT_SCOPE_UNIVERSE = 0x0
433 RT_SCOPE_SITE = 0xc8
434 RT_SCOPE_LINK = 0xfd
435 RT_SCOPE_HOST = 0xfe
436 RT_SCOPE_NOWHERE = 0xff
437 RT_TABLE_UNSPEC = 0x0
438 RT_TABLE_COMPAT = 0xfc
439 RT_TABLE_DEFAULT = 0xfd
440 RT_TABLE_MAIN = 0xfe
441 RT_TABLE_LOCAL = 0xff
442 RT_TABLE_MAX = 0xffffffff
443 RTA_UNSPEC = 0x0
444 RTA_DST = 0x1
445 RTA_SRC = 0x2
446 RTA_IIF = 0x3
447 RTA_OIF = 0x4
448 RTA_GATEWAY = 0x5
449 RTA_PRIORITY = 0x6
450 RTA_PREFSRC = 0x7
451 RTA_METRICS = 0x8
452 RTA_MULTIPATH = 0x9
453 RTA_FLOW = 0xb
454 RTA_CACHEINFO = 0xc
455 RTA_TABLE = 0xf
456 RTN_UNSPEC = 0x0
457 RTN_UNICAST = 0x1
458 RTN_LOCAL = 0x2
459 RTN_BROADCAST = 0x3
460 RTN_ANYCAST = 0x4
461 RTN_MULTICAST = 0x5
462 RTN_BLACKHOLE = 0x6
463 RTN_UNREACHABLE = 0x7
464 RTN_PROHIBIT = 0x8
465 RTN_THROW = 0x9
466 RTN_NAT = 0xa
467 RTN_XRESOLVE = 0xb
468 RTNLGRP_NONE = 0x0
469 RTNLGRP_LINK = 0x1
470 RTNLGRP_NOTIFY = 0x2
471 RTNLGRP_NEIGH = 0x3
472 RTNLGRP_TC = 0x4
473 RTNLGRP_IPV4_IFADDR = 0x5
474 RTNLGRP_IPV4_MROUTE = 0x6
475 RTNLGRP_IPV4_ROUTE = 0x7
476 RTNLGRP_IPV4_RULE = 0x8
477 RTNLGRP_IPV6_IFADDR = 0x9
478 RTNLGRP_IPV6_MROUTE = 0xa
479 RTNLGRP_IPV6_ROUTE = 0xb
480 RTNLGRP_IPV6_IFINFO = 0xc
481 RTNLGRP_IPV6_PREFIX = 0x12
482 RTNLGRP_IPV6_RULE = 0x13
483 RTNLGRP_ND_USEROPT = 0x14
484 SizeofNlMsghdr = 0x10
485 SizeofNlMsgerr = 0x14
486 SizeofRtGenmsg = 0x1
487 SizeofNlAttr = 0x4
488 SizeofRtAttr = 0x4
489 SizeofIfInfomsg = 0x10
490 SizeofIfAddrmsg = 0x8
491 SizeofRtMsg = 0xc
492 SizeofRtNexthop = 0x8
443 IFA_UNSPEC = 0x0
444 IFA_ADDRESS = 0x1
445 IFA_LOCAL = 0x2
446 IFA_LABEL = 0x3
447 IFA_BROADCAST = 0x4
448 IFA_ANYCAST = 0x5
449 IFA_CACHEINFO = 0x6
450 IFA_MULTICAST = 0x7
451 IFLA_UNSPEC = 0x0
452 IFLA_ADDRESS = 0x1
453 IFLA_BROADCAST = 0x2
454 IFLA_IFNAME = 0x3
455 IFLA_INFO_KIND = 0x1
456 IFLA_MTU = 0x4
457 IFLA_LINK = 0x5
458 IFLA_QDISC = 0x6
459 IFLA_STATS = 0x7
460 IFLA_COST = 0x8
461 IFLA_PRIORITY = 0x9
462 IFLA_MASTER = 0xa
463 IFLA_WIRELESS = 0xb
464 IFLA_PROTINFO = 0xc
465 IFLA_TXQLEN = 0xd
466 IFLA_MAP = 0xe
467 IFLA_WEIGHT = 0xf
468 IFLA_OPERSTATE = 0x10
469 IFLA_LINKMODE = 0x11
470 IFLA_LINKINFO = 0x12
471 IFLA_NET_NS_PID = 0x13
472 IFLA_IFALIAS = 0x14
473 IFLA_NUM_VF = 0x15
474 IFLA_VFINFO_LIST = 0x16
475 IFLA_STATS64 = 0x17
476 IFLA_VF_PORTS = 0x18
477 IFLA_PORT_SELF = 0x19
478 IFLA_AF_SPEC = 0x1a
479 IFLA_GROUP = 0x1b
480 IFLA_NET_NS_FD = 0x1c
481 IFLA_EXT_MASK = 0x1d
482 IFLA_PROMISCUITY = 0x1e
483 IFLA_NUM_TX_QUEUES = 0x1f
484 IFLA_NUM_RX_QUEUES = 0x20
485 IFLA_CARRIER = 0x21
486 IFLA_PHYS_PORT_ID = 0x22
487 IFLA_CARRIER_CHANGES = 0x23
488 IFLA_PHYS_SWITCH_ID = 0x24
489 IFLA_LINK_NETNSID = 0x25
490 IFLA_PHYS_PORT_NAME = 0x26
491 IFLA_PROTO_DOWN = 0x27
492 IFLA_GSO_MAX_SEGS = 0x28
493 IFLA_GSO_MAX_SIZE = 0x29
494 IFLA_PAD = 0x2a
495 IFLA_XDP = 0x2b
496 IFLA_EVENT = 0x2c
497 IFLA_NEW_NETNSID = 0x2d
498 IFLA_IF_NETNSID = 0x2e
499 IFLA_MAX = 0x33
500 RT_SCOPE_UNIVERSE = 0x0
501 RT_SCOPE_SITE = 0xc8
502 RT_SCOPE_LINK = 0xfd
503 RT_SCOPE_HOST = 0xfe
504 RT_SCOPE_NOWHERE = 0xff
505 RT_TABLE_UNSPEC = 0x0
506 RT_TABLE_COMPAT = 0xfc
507 RT_TABLE_DEFAULT = 0xfd
508 RT_TABLE_MAIN = 0xfe
509 RT_TABLE_LOCAL = 0xff
510 RT_TABLE_MAX = 0xffffffff
511 RTA_UNSPEC = 0x0
512 RTA_DST = 0x1
513 RTA_SRC = 0x2
514 RTA_IIF = 0x3
515 RTA_OIF = 0x4
516 RTA_GATEWAY = 0x5
517 RTA_PRIORITY = 0x6
518 RTA_PREFSRC = 0x7
519 RTA_METRICS = 0x8
520 RTA_MULTIPATH = 0x9
521 RTA_FLOW = 0xb
522 RTA_CACHEINFO = 0xc
523 RTA_TABLE = 0xf
524 RTA_MARK = 0x10
525 RTA_MFC_STATS = 0x11
526 RTA_VIA = 0x12
527 RTA_NEWDST = 0x13
528 RTA_PREF = 0x14
529 RTA_ENCAP_TYPE = 0x15
530 RTA_ENCAP = 0x16
531 RTA_EXPIRES = 0x17
532 RTA_PAD = 0x18
533 RTA_UID = 0x19
534 RTA_TTL_PROPAGATE = 0x1a
535 RTA_IP_PROTO = 0x1b
536 RTA_SPORT = 0x1c
537 RTA_DPORT = 0x1d
538 RTN_UNSPEC = 0x0
539 RTN_UNICAST = 0x1
540 RTN_LOCAL = 0x2
541 RTN_BROADCAST = 0x3
542 RTN_ANYCAST = 0x4
543 RTN_MULTICAST = 0x5
544 RTN_BLACKHOLE = 0x6
545 RTN_UNREACHABLE = 0x7
546 RTN_PROHIBIT = 0x8
547 RTN_THROW = 0x9
548 RTN_NAT = 0xa
549 RTN_XRESOLVE = 0xb
550 RTNLGRP_NONE = 0x0
551 RTNLGRP_LINK = 0x1
552 RTNLGRP_NOTIFY = 0x2
553 RTNLGRP_NEIGH = 0x3
554 RTNLGRP_TC = 0x4
555 RTNLGRP_IPV4_IFADDR = 0x5
556 RTNLGRP_IPV4_MROUTE = 0x6
557 RTNLGRP_IPV4_ROUTE = 0x7
558 RTNLGRP_IPV4_RULE = 0x8
559 RTNLGRP_IPV6_IFADDR = 0x9
560 RTNLGRP_IPV6_MROUTE = 0xa
561 RTNLGRP_IPV6_ROUTE = 0xb
562 RTNLGRP_IPV6_IFINFO = 0xc
563 RTNLGRP_IPV6_PREFIX = 0x12
564 RTNLGRP_IPV6_RULE = 0x13
565 RTNLGRP_ND_USEROPT = 0x14
566 SizeofNlMsghdr = 0x10
567 SizeofNlMsgerr = 0x14
568 SizeofRtGenmsg = 0x1
569 SizeofNlAttr = 0x4
570 SizeofRtAttr = 0x4
571 SizeofIfInfomsg = 0x10
572 SizeofIfAddrmsg = 0x8
573 SizeofRtMsg = 0xc
574 SizeofRtNexthop = 0x8
493575 )
494576
495577 type NlMsghdr struct {
520602 }
521603
522604 type IfInfomsg struct {
523 Family uint8
524 X__ifi_pad uint8
525 Type uint16
526 Index int32
527 Flags uint32
528 Change uint32
605 Family uint8
606 _ uint8
607 Type uint16
608 Index int32
609 Flags uint32
610 Change uint32
529611 }
530612
531613 type IfAddrmsg struct {
568650 }
569651
570652 type SockFprog struct {
571 Len uint16
572 Pad_cgo_0 [2]byte
573 Filter *SockFilter
653 Len uint16
654 Filter *SockFilter
574655 }
575656
576657 type InotifyEvent struct {
604685 Totalhigh uint32
605686 Freehigh uint32
606687 Unit uint32
607 X_f [8]uint8
688 _ [8]uint8
608689 }
609690
610691 type Utsname struct {
611 Sysname [65]uint8
612 Nodename [65]uint8
613 Release [65]uint8
614 Version [65]uint8
615 Machine [65]uint8
616 Domainname [65]uint8
692 Sysname [65]byte
693 Nodename [65]byte
694 Release [65]byte
695 Version [65]byte
696 Machine [65]byte
697 Domainname [65]byte
617698 }
618699
619700 type Ustat_t struct {
631712 }
632713
633714 const (
634 AT_FDCWD = -0x64
635 AT_REMOVEDIR = 0x200
715 AT_EMPTY_PATH = 0x1000
716 AT_FDCWD = -0x64
717 AT_NO_AUTOMOUNT = 0x800
718 AT_REMOVEDIR = 0x200
719
720 AT_STATX_SYNC_AS_STAT = 0x0
721 AT_STATX_FORCE_SYNC = 0x2000
722 AT_STATX_DONT_SYNC = 0x4000
723
636724 AT_SYMLINK_FOLLOW = 0x400
637725 AT_SYMLINK_NOFOLLOW = 0x100
726
727 AT_EACCESS = 0x200
638728 )
639729
640730 type PollFd struct {
654744 )
655745
656746 type Sigset_t struct {
657 X__val [32]uint32
747 Val [32]uint32
748 }
749
750 type SignalfdSiginfo struct {
751 Signo uint32
752 Errno int32
753 Code int32
754 Pid uint32
755 Uid uint32
756 Fd int32
757 Tid uint32
758 Band uint32
759 Overrun uint32
760 Trapno uint32
761 Status int32
762 Int int32
763 Ptr uint64
764 Utime uint64
765 Stime uint64
766 Addr uint64
767 _ [48]uint8
658768 }
659769
660770 const RNDGETENTCNT = 0x80045200
681791
682792 type Taskstats struct {
683793 Version uint16
684 Pad_cgo_0 [2]byte
685794 Ac_exitcode uint32
686795 Ac_flag uint8
687796 Ac_nice uint8
688 Pad_cgo_1 [6]byte
797 _ [4]byte
689798 Cpu_count uint64
690799 Cpu_delay_total uint64
691800 Blkio_count uint64
697806 Ac_comm [32]uint8
698807 Ac_sched uint8
699808 Ac_pad [3]uint8
700 Pad_cgo_2 [4]byte
809 _ [4]byte
701810 Ac_uid uint32
702811 Ac_gid uint32
703812 Ac_pid uint32
704813 Ac_ppid uint32
705814 Ac_btime uint32
706 Pad_cgo_3 [4]byte
815 _ [4]byte
707816 Ac_etime uint64
708817 Ac_utime uint64
709818 Ac_stime uint64
727836 Cpu_scaled_run_real_total uint64
728837 Freepages_count uint64
729838 Freepages_delay_total uint64
839 Thrashing_count uint64
840 Thrashing_delay_total uint64
730841 }
731842
732843 const (
745856 TASKSTATS_CMD_ATTR_TGID = 0x2
746857 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
747858 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
859 )
860
861 type CGroupStats struct {
862 Sleeping uint64
863 Running uint64
864 Stopped uint64
865 Uninterruptible uint64
866 Io_wait uint64
867 }
868
869 const (
870 CGROUPSTATS_CMD_UNSPEC = 0x3
871 CGROUPSTATS_CMD_GET = 0x4
872 CGROUPSTATS_CMD_NEW = 0x5
873 CGROUPSTATS_TYPE_UNSPEC = 0x0
874 CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
875 CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
876 CGROUPSTATS_CMD_ATTR_FD = 0x1
748877 )
749878
750879 type Genlmsghdr struct {
779908 CTRL_ATTR_MCAST_GRP_NAME = 0x1
780909 CTRL_ATTR_MCAST_GRP_ID = 0x2
781910 )
911
912 type cpuMask uint32
913
914 const (
915 _CPU_SETSIZE = 0x400
916 _NCPUBITS = 0x20
917 )
918
919 const (
920 BDADDR_BREDR = 0x0
921 BDADDR_LE_PUBLIC = 0x1
922 BDADDR_LE_RANDOM = 0x2
923 )
924
925 type PerfEventAttr struct {
926 Type uint32
927 Size uint32
928 Config uint64
929 Sample uint64
930 Sample_type uint64
931 Read_format uint64
932 Bits uint64
933 Wakeup uint32
934 Bp_type uint32
935 Ext1 uint64
936 Ext2 uint64
937 Branch_sample_type uint64
938 Sample_regs_user uint64
939 Sample_stack_user uint32
940 Clockid int32
941 Sample_regs_intr uint64
942 Aux_watermark uint32
943 _ uint32
944 }
945
946 type PerfEventMmapPage struct {
947 Version uint32
948 Compat_version uint32
949 Lock uint32
950 Index uint32
951 Offset int64
952 Time_enabled uint64
953 Time_running uint64
954 Capabilities uint64
955 Pmc_width uint16
956 Time_shift uint16
957 Time_mult uint32
958 Time_offset uint64
959 Time_zero uint64
960 Size uint32
961 _ [948]uint8
962 Data_head uint64
963 Data_tail uint64
964 Data_offset uint64
965 Data_size uint64
966 Aux_head uint64
967 Aux_tail uint64
968 Aux_offset uint64
969 Aux_size uint64
970 }
971
972 const (
973 PerfBitDisabled uint64 = CBitFieldMaskBit0
974 PerfBitInherit = CBitFieldMaskBit1
975 PerfBitPinned = CBitFieldMaskBit2
976 PerfBitExclusive = CBitFieldMaskBit3
977 PerfBitExcludeUser = CBitFieldMaskBit4
978 PerfBitExcludeKernel = CBitFieldMaskBit5
979 PerfBitExcludeHv = CBitFieldMaskBit6
980 PerfBitExcludeIdle = CBitFieldMaskBit7
981 PerfBitMmap = CBitFieldMaskBit8
982 PerfBitComm = CBitFieldMaskBit9
983 PerfBitFreq = CBitFieldMaskBit10
984 PerfBitInheritStat = CBitFieldMaskBit11
985 PerfBitEnableOnExec = CBitFieldMaskBit12
986 PerfBitTask = CBitFieldMaskBit13
987 PerfBitWatermark = CBitFieldMaskBit14
988 PerfBitPreciseIPBit1 = CBitFieldMaskBit15
989 PerfBitPreciseIPBit2 = CBitFieldMaskBit16
990 PerfBitMmapData = CBitFieldMaskBit17
991 PerfBitSampleIDAll = CBitFieldMaskBit18
992 PerfBitExcludeHost = CBitFieldMaskBit19
993 PerfBitExcludeGuest = CBitFieldMaskBit20
994 PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
995 PerfBitExcludeCallchainUser = CBitFieldMaskBit22
996 PerfBitMmap2 = CBitFieldMaskBit23
997 PerfBitCommExec = CBitFieldMaskBit24
998 PerfBitUseClockID = CBitFieldMaskBit25
999 PerfBitContextSwitch = CBitFieldMaskBit26
1000 )
1001
1002 const (
1003 PERF_TYPE_HARDWARE = 0x0
1004 PERF_TYPE_SOFTWARE = 0x1
1005 PERF_TYPE_TRACEPOINT = 0x2
1006 PERF_TYPE_HW_CACHE = 0x3
1007 PERF_TYPE_RAW = 0x4
1008 PERF_TYPE_BREAKPOINT = 0x5
1009
1010 PERF_COUNT_HW_CPU_CYCLES = 0x0
1011 PERF_COUNT_HW_INSTRUCTIONS = 0x1
1012 PERF_COUNT_HW_CACHE_REFERENCES = 0x2
1013 PERF_COUNT_HW_CACHE_MISSES = 0x3
1014 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
1015 PERF_COUNT_HW_BRANCH_MISSES = 0x5
1016 PERF_COUNT_HW_BUS_CYCLES = 0x6
1017 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
1018 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
1019 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
1020
1021 PERF_COUNT_HW_CACHE_L1D = 0x0
1022 PERF_COUNT_HW_CACHE_L1I = 0x1
1023 PERF_COUNT_HW_CACHE_LL = 0x2
1024 PERF_COUNT_HW_CACHE_DTLB = 0x3
1025 PERF_COUNT_HW_CACHE_ITLB = 0x4
1026 PERF_COUNT_HW_CACHE_BPU = 0x5
1027 PERF_COUNT_HW_CACHE_NODE = 0x6
1028
1029 PERF_COUNT_HW_CACHE_OP_READ = 0x0
1030 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
1031 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
1032
1033 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
1034 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
1035
1036 PERF_COUNT_SW_CPU_CLOCK = 0x0
1037 PERF_COUNT_SW_TASK_CLOCK = 0x1
1038 PERF_COUNT_SW_PAGE_FAULTS = 0x2
1039 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
1040 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
1041 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
1042 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
1043 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
1044 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
1045 PERF_COUNT_SW_DUMMY = 0x9
1046
1047 PERF_SAMPLE_IP = 0x1
1048 PERF_SAMPLE_TID = 0x2
1049 PERF_SAMPLE_TIME = 0x4
1050 PERF_SAMPLE_ADDR = 0x8
1051 PERF_SAMPLE_READ = 0x10
1052 PERF_SAMPLE_CALLCHAIN = 0x20
1053 PERF_SAMPLE_ID = 0x40
1054 PERF_SAMPLE_CPU = 0x80
1055 PERF_SAMPLE_PERIOD = 0x100
1056 PERF_SAMPLE_STREAM_ID = 0x200
1057 PERF_SAMPLE_RAW = 0x400
1058 PERF_SAMPLE_BRANCH_STACK = 0x800
1059
1060 PERF_SAMPLE_BRANCH_USER = 0x1
1061 PERF_SAMPLE_BRANCH_KERNEL = 0x2
1062 PERF_SAMPLE_BRANCH_HV = 0x4
1063 PERF_SAMPLE_BRANCH_ANY = 0x8
1064 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
1065 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
1066 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
1067
1068 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
1069 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
1070 PERF_FORMAT_ID = 0x4
1071 PERF_FORMAT_GROUP = 0x8
1072
1073 PERF_RECORD_MMAP = 0x1
1074 PERF_RECORD_LOST = 0x2
1075 PERF_RECORD_COMM = 0x3
1076 PERF_RECORD_EXIT = 0x4
1077 PERF_RECORD_THROTTLE = 0x5
1078 PERF_RECORD_UNTHROTTLE = 0x6
1079 PERF_RECORD_FORK = 0x7
1080 PERF_RECORD_READ = 0x8
1081 PERF_RECORD_SAMPLE = 0x9
1082
1083 PERF_CONTEXT_HV = -0x20
1084 PERF_CONTEXT_KERNEL = -0x80
1085 PERF_CONTEXT_USER = -0x200
1086
1087 PERF_CONTEXT_GUEST = -0x800
1088 PERF_CONTEXT_GUEST_KERNEL = -0x880
1089 PERF_CONTEXT_GUEST_USER = -0xa00
1090
1091 PERF_FLAG_FD_NO_GROUP = 0x1
1092 PERF_FLAG_FD_OUTPUT = 0x2
1093 PERF_FLAG_PID_CGROUP = 0x4
1094 )
1095
1096 const (
1097 CBitFieldMaskBit0 = 0x1
1098 CBitFieldMaskBit1 = 0x2
1099 CBitFieldMaskBit2 = 0x4
1100 CBitFieldMaskBit3 = 0x8
1101 CBitFieldMaskBit4 = 0x10
1102 CBitFieldMaskBit5 = 0x20
1103 CBitFieldMaskBit6 = 0x40
1104 CBitFieldMaskBit7 = 0x80
1105 CBitFieldMaskBit8 = 0x100
1106 CBitFieldMaskBit9 = 0x200
1107 CBitFieldMaskBit10 = 0x400
1108 CBitFieldMaskBit11 = 0x800
1109 CBitFieldMaskBit12 = 0x1000
1110 CBitFieldMaskBit13 = 0x2000
1111 CBitFieldMaskBit14 = 0x4000
1112 CBitFieldMaskBit15 = 0x8000
1113 CBitFieldMaskBit16 = 0x10000
1114 CBitFieldMaskBit17 = 0x20000
1115 CBitFieldMaskBit18 = 0x40000
1116 CBitFieldMaskBit19 = 0x80000
1117 CBitFieldMaskBit20 = 0x100000
1118 CBitFieldMaskBit21 = 0x200000
1119 CBitFieldMaskBit22 = 0x400000
1120 CBitFieldMaskBit23 = 0x800000
1121 CBitFieldMaskBit24 = 0x1000000
1122 CBitFieldMaskBit25 = 0x2000000
1123 CBitFieldMaskBit26 = 0x4000000
1124 CBitFieldMaskBit27 = 0x8000000
1125 CBitFieldMaskBit28 = 0x10000000
1126 CBitFieldMaskBit29 = 0x20000000
1127 CBitFieldMaskBit30 = 0x40000000
1128 CBitFieldMaskBit31 = 0x80000000
1129 CBitFieldMaskBit32 = 0x100000000
1130 CBitFieldMaskBit33 = 0x200000000
1131 CBitFieldMaskBit34 = 0x400000000
1132 CBitFieldMaskBit35 = 0x800000000
1133 CBitFieldMaskBit36 = 0x1000000000
1134 CBitFieldMaskBit37 = 0x2000000000
1135 CBitFieldMaskBit38 = 0x4000000000
1136 CBitFieldMaskBit39 = 0x8000000000
1137 CBitFieldMaskBit40 = 0x10000000000
1138 CBitFieldMaskBit41 = 0x20000000000
1139 CBitFieldMaskBit42 = 0x40000000000
1140 CBitFieldMaskBit43 = 0x80000000000
1141 CBitFieldMaskBit44 = 0x100000000000
1142 CBitFieldMaskBit45 = 0x200000000000
1143 CBitFieldMaskBit46 = 0x400000000000
1144 CBitFieldMaskBit47 = 0x800000000000
1145 CBitFieldMaskBit48 = 0x1000000000000
1146 CBitFieldMaskBit49 = 0x2000000000000
1147 CBitFieldMaskBit50 = 0x4000000000000
1148 CBitFieldMaskBit51 = 0x8000000000000
1149 CBitFieldMaskBit52 = 0x10000000000000
1150 CBitFieldMaskBit53 = 0x20000000000000
1151 CBitFieldMaskBit54 = 0x40000000000000
1152 CBitFieldMaskBit55 = 0x80000000000000
1153 CBitFieldMaskBit56 = 0x100000000000000
1154 CBitFieldMaskBit57 = 0x200000000000000
1155 CBitFieldMaskBit58 = 0x400000000000000
1156 CBitFieldMaskBit59 = 0x800000000000000
1157 CBitFieldMaskBit60 = 0x1000000000000000
1158 CBitFieldMaskBit61 = 0x2000000000000000
1159 CBitFieldMaskBit62 = 0x4000000000000000
1160 CBitFieldMaskBit63 = 0x8000000000000000
1161 )
1162
1163 type SockaddrStorage struct {
1164 Family uint16
1165 _ [122]uint8
1166 _ uint32
1167 }
1168
1169 type TCPMD5Sig struct {
1170 Addr SockaddrStorage
1171 Flags uint8
1172 Prefixlen uint8
1173 Keylen uint16
1174 _ uint32
1175 Key [80]uint8
1176 }
1177
1178 type HDDriveCmdHdr struct {
1179 Command uint8
1180 Number uint8
1181 Feature uint8
1182 Count uint8
1183 }
1184
1185 type HDGeometry struct {
1186 Heads uint8
1187 Sectors uint8
1188 Cylinders uint16
1189 Start uint32
1190 }
1191
1192 type HDDriveID struct {
1193 Config uint16
1194 Cyls uint16
1195 Reserved2 uint16
1196 Heads uint16
1197 Track_bytes uint16
1198 Sector_bytes uint16
1199 Sectors uint16
1200 Vendor0 uint16
1201 Vendor1 uint16
1202 Vendor2 uint16
1203 Serial_no [20]uint8
1204 Buf_type uint16
1205 Buf_size uint16
1206 Ecc_bytes uint16
1207 Fw_rev [8]uint8
1208 Model [40]uint8
1209 Max_multsect uint8
1210 Vendor3 uint8
1211 Dword_io uint16
1212 Vendor4 uint8
1213 Capability uint8
1214 Reserved50 uint16
1215 Vendor5 uint8
1216 TPIO uint8
1217 Vendor6 uint8
1218 TDMA uint8
1219 Field_valid uint16
1220 Cur_cyls uint16
1221 Cur_heads uint16
1222 Cur_sectors uint16
1223 Cur_capacity0 uint16
1224 Cur_capacity1 uint16
1225 Multsect uint8
1226 Multsect_valid uint8
1227 Lba_capacity uint32
1228 Dma_1word uint16
1229 Dma_mword uint16
1230 Eide_pio_modes uint16
1231 Eide_dma_min uint16
1232 Eide_dma_time uint16
1233 Eide_pio uint16
1234 Eide_pio_iordy uint16
1235 Words69_70 [2]uint16
1236 Words71_74 [4]uint16
1237 Queue_depth uint16
1238 Words76_79 [4]uint16
1239 Major_rev_num uint16
1240 Minor_rev_num uint16
1241 Command_set_1 uint16
1242 Command_set_2 uint16
1243 Cfsse uint16
1244 Cfs_enable_1 uint16
1245 Cfs_enable_2 uint16
1246 Csf_default uint16
1247 Dma_ultra uint16
1248 Trseuc uint16
1249 TrsEuc uint16
1250 CurAPMvalues uint16
1251 Mprc uint16
1252 Hw_config uint16
1253 Acoustic uint16
1254 Msrqs uint16
1255 Sxfert uint16
1256 Sal uint16
1257 Spg uint32
1258 Lba_capacity_2 uint64
1259 Words104_125 [22]uint16
1260 Last_lun uint16
1261 Word127 uint16
1262 Dlf uint16
1263 Csfo uint16
1264 Words130_155 [26]uint16
1265 Word156 uint16
1266 Words157_159 [3]uint16
1267 Cfa_power uint16
1268 Words161_175 [15]uint16
1269 Words176_205 [30]uint16
1270 Words206_254 [49]uint16
1271 Integrity_word uint16
1272 }
1273
1274 type Statfs_t struct {
1275 Type int32
1276 Bsize int32
1277 Blocks uint64
1278 Bfree uint64
1279 Bavail uint64
1280 Files uint64
1281 Ffree uint64
1282 Fsid Fsid
1283 Namelen int32
1284 Frsize int32
1285 Flags int32
1286 Spare [4]int32
1287 _ [4]byte
1288 }
1289
1290 const (
1291 ST_MANDLOCK = 0x40
1292 ST_NOATIME = 0x400
1293 ST_NODEV = 0x4
1294 ST_NODIRATIME = 0x800
1295 ST_NOEXEC = 0x8
1296 ST_NOSUID = 0x2
1297 ST_RDONLY = 0x1
1298 ST_RELATIME = 0x1000
1299 ST_SYNCHRONOUS = 0x10
1300 )
1301
1302 type TpacketHdr struct {
1303 Status uint32
1304 Len uint32
1305 Snaplen uint32
1306 Mac uint16
1307 Net uint16
1308 Sec uint32
1309 Usec uint32
1310 }
1311
1312 type Tpacket2Hdr struct {
1313 Status uint32
1314 Len uint32
1315 Snaplen uint32
1316 Mac uint16
1317 Net uint16
1318 Sec uint32
1319 Nsec uint32
1320 Vlan_tci uint16
1321 Vlan_tpid uint16
1322 _ [4]uint8
1323 }
1324
1325 type Tpacket3Hdr struct {
1326 Next_offset uint32
1327 Sec uint32
1328 Nsec uint32
1329 Snaplen uint32
1330 Len uint32
1331 Status uint32
1332 Mac uint16
1333 Net uint16
1334 Hv1 TpacketHdrVariant1
1335 _ [8]uint8
1336 }
1337
1338 type TpacketHdrVariant1 struct {
1339 Rxhash uint32
1340 Vlan_tci uint32
1341 Vlan_tpid uint16
1342 _ uint16
1343 }
1344
1345 type TpacketBlockDesc struct {
1346 Version uint32
1347 To_priv uint32
1348 Hdr [40]byte
1349 }
1350
1351 type TpacketReq struct {
1352 Block_size uint32
1353 Block_nr uint32
1354 Frame_size uint32
1355 Frame_nr uint32
1356 }
1357
1358 type TpacketReq3 struct {
1359 Block_size uint32
1360 Block_nr uint32
1361 Frame_size uint32
1362 Frame_nr uint32
1363 Retire_blk_tov uint32
1364 Sizeof_priv uint32
1365 Feature_req_word uint32
1366 }
1367
1368 type TpacketStats struct {
1369 Packets uint32
1370 Drops uint32
1371 }
1372
1373 type TpacketStatsV3 struct {
1374 Packets uint32
1375 Drops uint32
1376 Freeze_q_cnt uint32
1377 }
1378
1379 type TpacketAuxdata struct {
1380 Status uint32
1381 Len uint32
1382 Snaplen uint32
1383 Mac uint16
1384 Net uint16
1385 Vlan_tci uint16
1386 Vlan_tpid uint16
1387 }
1388
1389 const (
1390 TPACKET_V1 = 0x0
1391 TPACKET_V2 = 0x1
1392 TPACKET_V3 = 0x2
1393 )
1394
1395 const (
1396 SizeofTpacketHdr = 0x18
1397 SizeofTpacket2Hdr = 0x20
1398 SizeofTpacket3Hdr = 0x30
1399 )
1400
1401 const (
1402 NF_INET_PRE_ROUTING = 0x0
1403 NF_INET_LOCAL_IN = 0x1
1404 NF_INET_FORWARD = 0x2
1405 NF_INET_LOCAL_OUT = 0x3
1406 NF_INET_POST_ROUTING = 0x4
1407 NF_INET_NUMHOOKS = 0x5
1408 )
1409
1410 const (
1411 NF_NETDEV_INGRESS = 0x0
1412 NF_NETDEV_NUMHOOKS = 0x1
1413 )
1414
1415 const (
1416 NFPROTO_UNSPEC = 0x0
1417 NFPROTO_INET = 0x1
1418 NFPROTO_IPV4 = 0x2
1419 NFPROTO_ARP = 0x3
1420 NFPROTO_NETDEV = 0x5
1421 NFPROTO_BRIDGE = 0x7
1422 NFPROTO_IPV6 = 0xa
1423 NFPROTO_DECNET = 0xc
1424 NFPROTO_NUMPROTO = 0xd
1425 )
1426
1427 type Nfgenmsg struct {
1428 Nfgen_family uint8
1429 Version uint8
1430 Res_id uint16
1431 }
1432
1433 const (
1434 NFNL_BATCH_UNSPEC = 0x0
1435 NFNL_BATCH_GENID = 0x1
1436 )
1437
1438 const (
1439 NFT_REG_VERDICT = 0x0
1440 NFT_REG_1 = 0x1
1441 NFT_REG_2 = 0x2
1442 NFT_REG_3 = 0x3
1443 NFT_REG_4 = 0x4
1444 NFT_REG32_00 = 0x8
1445 NFT_REG32_01 = 0x9
1446 NFT_REG32_02 = 0xa
1447 NFT_REG32_03 = 0xb
1448 NFT_REG32_04 = 0xc
1449 NFT_REG32_05 = 0xd
1450 NFT_REG32_06 = 0xe
1451 NFT_REG32_07 = 0xf
1452 NFT_REG32_08 = 0x10
1453 NFT_REG32_09 = 0x11
1454 NFT_REG32_10 = 0x12
1455 NFT_REG32_11 = 0x13
1456 NFT_REG32_12 = 0x14
1457 NFT_REG32_13 = 0x15
1458 NFT_REG32_14 = 0x16
1459 NFT_REG32_15 = 0x17
1460 NFT_CONTINUE = -0x1
1461 NFT_BREAK = -0x2
1462 NFT_JUMP = -0x3
1463 NFT_GOTO = -0x4
1464 NFT_RETURN = -0x5
1465 NFT_MSG_NEWTABLE = 0x0
1466 NFT_MSG_GETTABLE = 0x1
1467 NFT_MSG_DELTABLE = 0x2
1468 NFT_MSG_NEWCHAIN = 0x3
1469 NFT_MSG_GETCHAIN = 0x4
1470 NFT_MSG_DELCHAIN = 0x5
1471 NFT_MSG_NEWRULE = 0x6
1472 NFT_MSG_GETRULE = 0x7
1473 NFT_MSG_DELRULE = 0x8
1474 NFT_MSG_NEWSET = 0x9
1475 NFT_MSG_GETSET = 0xa
1476 NFT_MSG_DELSET = 0xb
1477 NFT_MSG_NEWSETELEM = 0xc
1478 NFT_MSG_GETSETELEM = 0xd
1479 NFT_MSG_DELSETELEM = 0xe
1480 NFT_MSG_NEWGEN = 0xf
1481 NFT_MSG_GETGEN = 0x10
1482 NFT_MSG_TRACE = 0x11
1483 NFT_MSG_NEWOBJ = 0x12
1484 NFT_MSG_GETOBJ = 0x13
1485 NFT_MSG_DELOBJ = 0x14
1486 NFT_MSG_GETOBJ_RESET = 0x15
1487 NFT_MSG_MAX = 0x19
1488 NFTA_LIST_UNPEC = 0x0
1489 NFTA_LIST_ELEM = 0x1
1490 NFTA_HOOK_UNSPEC = 0x0
1491 NFTA_HOOK_HOOKNUM = 0x1
1492 NFTA_HOOK_PRIORITY = 0x2
1493 NFTA_HOOK_DEV = 0x3
1494 NFT_TABLE_F_DORMANT = 0x1
1495 NFTA_TABLE_UNSPEC = 0x0
1496 NFTA_TABLE_NAME = 0x1
1497 NFTA_TABLE_FLAGS = 0x2
1498 NFTA_TABLE_USE = 0x3
1499 NFTA_CHAIN_UNSPEC = 0x0
1500 NFTA_CHAIN_TABLE = 0x1
1501 NFTA_CHAIN_HANDLE = 0x2
1502 NFTA_CHAIN_NAME = 0x3
1503 NFTA_CHAIN_HOOK = 0x4
1504 NFTA_CHAIN_POLICY = 0x5
1505 NFTA_CHAIN_USE = 0x6
1506 NFTA_CHAIN_TYPE = 0x7
1507 NFTA_CHAIN_COUNTERS = 0x8
1508 NFTA_CHAIN_PAD = 0x9
1509 NFTA_RULE_UNSPEC = 0x0
1510 NFTA_RULE_TABLE = 0x1
1511 NFTA_RULE_CHAIN = 0x2
1512 NFTA_RULE_HANDLE = 0x3
1513 NFTA_RULE_EXPRESSIONS = 0x4
1514 NFTA_RULE_COMPAT = 0x5
1515 NFTA_RULE_POSITION = 0x6
1516 NFTA_RULE_USERDATA = 0x7
1517 NFTA_RULE_PAD = 0x8
1518 NFTA_RULE_ID = 0x9
1519 NFT_RULE_COMPAT_F_INV = 0x2
1520 NFT_RULE_COMPAT_F_MASK = 0x2
1521 NFTA_RULE_COMPAT_UNSPEC = 0x0
1522 NFTA_RULE_COMPAT_PROTO = 0x1
1523 NFTA_RULE_COMPAT_FLAGS = 0x2
1524 NFT_SET_ANONYMOUS = 0x1
1525 NFT_SET_CONSTANT = 0x2
1526 NFT_SET_INTERVAL = 0x4
1527 NFT_SET_MAP = 0x8
1528 NFT_SET_TIMEOUT = 0x10
1529 NFT_SET_EVAL = 0x20
1530 NFT_SET_OBJECT = 0x40
1531 NFT_SET_POL_PERFORMANCE = 0x0
1532 NFT_SET_POL_MEMORY = 0x1
1533 NFTA_SET_DESC_UNSPEC = 0x0
1534 NFTA_SET_DESC_SIZE = 0x1
1535 NFTA_SET_UNSPEC = 0x0
1536 NFTA_SET_TABLE = 0x1
1537 NFTA_SET_NAME = 0x2
1538 NFTA_SET_FLAGS = 0x3
1539 NFTA_SET_KEY_TYPE = 0x4
1540 NFTA_SET_KEY_LEN = 0x5
1541 NFTA_SET_DATA_TYPE = 0x6
1542 NFTA_SET_DATA_LEN = 0x7
1543 NFTA_SET_POLICY = 0x8
1544 NFTA_SET_DESC = 0x9
1545 NFTA_SET_ID = 0xa
1546 NFTA_SET_TIMEOUT = 0xb
1547 NFTA_SET_GC_INTERVAL = 0xc
1548 NFTA_SET_USERDATA = 0xd
1549 NFTA_SET_PAD = 0xe
1550 NFTA_SET_OBJ_TYPE = 0xf
1551 NFT_SET_ELEM_INTERVAL_END = 0x1
1552 NFTA_SET_ELEM_UNSPEC = 0x0
1553 NFTA_SET_ELEM_KEY = 0x1
1554 NFTA_SET_ELEM_DATA = 0x2
1555 NFTA_SET_ELEM_FLAGS = 0x3
1556 NFTA_SET_ELEM_TIMEOUT = 0x4
1557 NFTA_SET_ELEM_EXPIRATION = 0x5
1558 NFTA_SET_ELEM_USERDATA = 0x6
1559 NFTA_SET_ELEM_EXPR = 0x7
1560 NFTA_SET_ELEM_PAD = 0x8
1561 NFTA_SET_ELEM_OBJREF = 0x9
1562 NFTA_SET_ELEM_LIST_UNSPEC = 0x0
1563 NFTA_SET_ELEM_LIST_TABLE = 0x1
1564 NFTA_SET_ELEM_LIST_SET = 0x2
1565 NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
1566 NFTA_SET_ELEM_LIST_SET_ID = 0x4
1567 NFT_DATA_VALUE = 0x0
1568 NFT_DATA_VERDICT = 0xffffff00
1569 NFTA_DATA_UNSPEC = 0x0
1570 NFTA_DATA_VALUE = 0x1
1571 NFTA_DATA_VERDICT = 0x2
1572 NFTA_VERDICT_UNSPEC = 0x0
1573 NFTA_VERDICT_CODE = 0x1
1574 NFTA_VERDICT_CHAIN = 0x2
1575 NFTA_EXPR_UNSPEC = 0x0
1576 NFTA_EXPR_NAME = 0x1
1577 NFTA_EXPR_DATA = 0x2
1578 NFTA_IMMEDIATE_UNSPEC = 0x0
1579 NFTA_IMMEDIATE_DREG = 0x1
1580 NFTA_IMMEDIATE_DATA = 0x2
1581 NFTA_BITWISE_UNSPEC = 0x0
1582 NFTA_BITWISE_SREG = 0x1
1583 NFTA_BITWISE_DREG = 0x2
1584 NFTA_BITWISE_LEN = 0x3
1585 NFTA_BITWISE_MASK = 0x4
1586 NFTA_BITWISE_XOR = 0x5
1587 NFT_BYTEORDER_NTOH = 0x0
1588 NFT_BYTEORDER_HTON = 0x1
1589 NFTA_BYTEORDER_UNSPEC = 0x0
1590 NFTA_BYTEORDER_SREG = 0x1
1591 NFTA_BYTEORDER_DREG = 0x2
1592 NFTA_BYTEORDER_OP = 0x3
1593 NFTA_BYTEORDER_LEN = 0x4
1594 NFTA_BYTEORDER_SIZE = 0x5
1595 NFT_CMP_EQ = 0x0
1596 NFT_CMP_NEQ = 0x1
1597 NFT_CMP_LT = 0x2
1598 NFT_CMP_LTE = 0x3
1599 NFT_CMP_GT = 0x4
1600 NFT_CMP_GTE = 0x5
1601 NFTA_CMP_UNSPEC = 0x0
1602 NFTA_CMP_SREG = 0x1
1603 NFTA_CMP_OP = 0x2
1604 NFTA_CMP_DATA = 0x3
1605 NFT_RANGE_EQ = 0x0
1606 NFT_RANGE_NEQ = 0x1
1607 NFTA_RANGE_UNSPEC = 0x0
1608 NFTA_RANGE_SREG = 0x1
1609 NFTA_RANGE_OP = 0x2
1610 NFTA_RANGE_FROM_DATA = 0x3
1611 NFTA_RANGE_TO_DATA = 0x4
1612 NFT_LOOKUP_F_INV = 0x1
1613 NFTA_LOOKUP_UNSPEC = 0x0
1614 NFTA_LOOKUP_SET = 0x1
1615 NFTA_LOOKUP_SREG = 0x2
1616 NFTA_LOOKUP_DREG = 0x3
1617 NFTA_LOOKUP_SET_ID = 0x4
1618 NFTA_LOOKUP_FLAGS = 0x5
1619 NFT_DYNSET_OP_ADD = 0x0
1620 NFT_DYNSET_OP_UPDATE = 0x1
1621 NFT_DYNSET_F_INV = 0x1
1622 NFTA_DYNSET_UNSPEC = 0x0
1623 NFTA_DYNSET_SET_NAME = 0x1
1624 NFTA_DYNSET_SET_ID = 0x2
1625 NFTA_DYNSET_OP = 0x3
1626 NFTA_DYNSET_SREG_KEY = 0x4
1627 NFTA_DYNSET_SREG_DATA = 0x5
1628 NFTA_DYNSET_TIMEOUT = 0x6
1629 NFTA_DYNSET_EXPR = 0x7
1630 NFTA_DYNSET_PAD = 0x8
1631 NFTA_DYNSET_FLAGS = 0x9
1632 NFT_PAYLOAD_LL_HEADER = 0x0
1633 NFT_PAYLOAD_NETWORK_HEADER = 0x1
1634 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
1635 NFT_PAYLOAD_CSUM_NONE = 0x0
1636 NFT_PAYLOAD_CSUM_INET = 0x1
1637 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
1638 NFTA_PAYLOAD_UNSPEC = 0x0
1639 NFTA_PAYLOAD_DREG = 0x1
1640 NFTA_PAYLOAD_BASE = 0x2
1641 NFTA_PAYLOAD_OFFSET = 0x3
1642 NFTA_PAYLOAD_LEN = 0x4
1643 NFTA_PAYLOAD_SREG = 0x5
1644 NFTA_PAYLOAD_CSUM_TYPE = 0x6
1645 NFTA_PAYLOAD_CSUM_OFFSET = 0x7
1646 NFTA_PAYLOAD_CSUM_FLAGS = 0x8
1647 NFT_EXTHDR_F_PRESENT = 0x1
1648 NFT_EXTHDR_OP_IPV6 = 0x0
1649 NFT_EXTHDR_OP_TCPOPT = 0x1
1650 NFTA_EXTHDR_UNSPEC = 0x0
1651 NFTA_EXTHDR_DREG = 0x1
1652 NFTA_EXTHDR_TYPE = 0x2
1653 NFTA_EXTHDR_OFFSET = 0x3
1654 NFTA_EXTHDR_LEN = 0x4
1655 NFTA_EXTHDR_FLAGS = 0x5
1656 NFTA_EXTHDR_OP = 0x6
1657 NFTA_EXTHDR_SREG = 0x7
1658 NFT_META_LEN = 0x0
1659 NFT_META_PROTOCOL = 0x1
1660 NFT_META_PRIORITY = 0x2
1661 NFT_META_MARK = 0x3
1662 NFT_META_IIF = 0x4
1663 NFT_META_OIF = 0x5
1664 NFT_META_IIFNAME = 0x6
1665 NFT_META_OIFNAME = 0x7
1666 NFT_META_IIFTYPE = 0x8
1667 NFT_META_OIFTYPE = 0x9
1668 NFT_META_SKUID = 0xa
1669 NFT_META_SKGID = 0xb
1670 NFT_META_NFTRACE = 0xc
1671 NFT_META_RTCLASSID = 0xd
1672 NFT_META_SECMARK = 0xe
1673 NFT_META_NFPROTO = 0xf
1674 NFT_META_L4PROTO = 0x10
1675 NFT_META_BRI_IIFNAME = 0x11
1676 NFT_META_BRI_OIFNAME = 0x12
1677 NFT_META_PKTTYPE = 0x13
1678 NFT_META_CPU = 0x14
1679 NFT_META_IIFGROUP = 0x15
1680 NFT_META_OIFGROUP = 0x16
1681 NFT_META_CGROUP = 0x17
1682 NFT_META_PRANDOM = 0x18
1683 NFT_RT_CLASSID = 0x0
1684 NFT_RT_NEXTHOP4 = 0x1
1685 NFT_RT_NEXTHOP6 = 0x2
1686 NFT_RT_TCPMSS = 0x3
1687 NFT_HASH_JENKINS = 0x0
1688 NFT_HASH_SYM = 0x1
1689 NFTA_HASH_UNSPEC = 0x0
1690 NFTA_HASH_SREG = 0x1
1691 NFTA_HASH_DREG = 0x2
1692 NFTA_HASH_LEN = 0x3
1693 NFTA_HASH_MODULUS = 0x4
1694 NFTA_HASH_SEED = 0x5
1695 NFTA_HASH_OFFSET = 0x6
1696 NFTA_HASH_TYPE = 0x7
1697 NFTA_META_UNSPEC = 0x0
1698 NFTA_META_DREG = 0x1
1699 NFTA_META_KEY = 0x2
1700 NFTA_META_SREG = 0x3
1701 NFTA_RT_UNSPEC = 0x0
1702 NFTA_RT_DREG = 0x1
1703 NFTA_RT_KEY = 0x2
1704 NFT_CT_STATE = 0x0
1705 NFT_CT_DIRECTION = 0x1
1706 NFT_CT_STATUS = 0x2
1707 NFT_CT_MARK = 0x3
1708 NFT_CT_SECMARK = 0x4
1709 NFT_CT_EXPIRATION = 0x5
1710 NFT_CT_HELPER = 0x6
1711 NFT_CT_L3PROTOCOL = 0x7
1712 NFT_CT_SRC = 0x8
1713 NFT_CT_DST = 0x9
1714 NFT_CT_PROTOCOL = 0xa
1715 NFT_CT_PROTO_SRC = 0xb
1716 NFT_CT_PROTO_DST = 0xc
1717 NFT_CT_LABELS = 0xd
1718 NFT_CT_PKTS = 0xe
1719 NFT_CT_BYTES = 0xf
1720 NFT_CT_AVGPKT = 0x10
1721 NFT_CT_ZONE = 0x11
1722 NFT_CT_EVENTMASK = 0x12
1723 NFTA_CT_UNSPEC = 0x0
1724 NFTA_CT_DREG = 0x1
1725 NFTA_CT_KEY = 0x2
1726 NFTA_CT_DIRECTION = 0x3
1727 NFTA_CT_SREG = 0x4
1728 NFT_LIMIT_PKTS = 0x0
1729 NFT_LIMIT_PKT_BYTES = 0x1
1730 NFT_LIMIT_F_INV = 0x1
1731 NFTA_LIMIT_UNSPEC = 0x0
1732 NFTA_LIMIT_RATE = 0x1
1733 NFTA_LIMIT_UNIT = 0x2
1734 NFTA_LIMIT_BURST = 0x3
1735 NFTA_LIMIT_TYPE = 0x4
1736 NFTA_LIMIT_FLAGS = 0x5
1737 NFTA_LIMIT_PAD = 0x6
1738 NFTA_COUNTER_UNSPEC = 0x0
1739 NFTA_COUNTER_BYTES = 0x1
1740 NFTA_COUNTER_PACKETS = 0x2
1741 NFTA_COUNTER_PAD = 0x3
1742 NFTA_LOG_UNSPEC = 0x0
1743 NFTA_LOG_GROUP = 0x1
1744 NFTA_LOG_PREFIX = 0x2
1745 NFTA_LOG_SNAPLEN = 0x3
1746 NFTA_LOG_QTHRESHOLD = 0x4
1747 NFTA_LOG_LEVEL = 0x5
1748 NFTA_LOG_FLAGS = 0x6
1749 NFTA_QUEUE_UNSPEC = 0x0
1750 NFTA_QUEUE_NUM = 0x1
1751 NFTA_QUEUE_TOTAL = 0x2
1752 NFTA_QUEUE_FLAGS = 0x3
1753 NFTA_QUEUE_SREG_QNUM = 0x4
1754 NFT_QUOTA_F_INV = 0x1
1755 NFT_QUOTA_F_DEPLETED = 0x2
1756 NFTA_QUOTA_UNSPEC = 0x0
1757 NFTA_QUOTA_BYTES = 0x1
1758 NFTA_QUOTA_FLAGS = 0x2
1759 NFTA_QUOTA_PAD = 0x3
1760 NFTA_QUOTA_CONSUMED = 0x4
1761 NFT_REJECT_ICMP_UNREACH = 0x0
1762 NFT_REJECT_TCP_RST = 0x1
1763 NFT_REJECT_ICMPX_UNREACH = 0x2
1764 NFT_REJECT_ICMPX_NO_ROUTE = 0x0
1765 NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
1766 NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
1767 NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
1768 NFTA_REJECT_UNSPEC = 0x0
1769 NFTA_REJECT_TYPE = 0x1
1770 NFTA_REJECT_ICMP_CODE = 0x2
1771 NFT_NAT_SNAT = 0x0
1772 NFT_NAT_DNAT = 0x1
1773 NFTA_NAT_UNSPEC = 0x0
1774 NFTA_NAT_TYPE = 0x1
1775 NFTA_NAT_FAMILY = 0x2
1776 NFTA_NAT_REG_ADDR_MIN = 0x3
1777 NFTA_NAT_REG_ADDR_MAX = 0x4
1778 NFTA_NAT_REG_PROTO_MIN = 0x5
1779 NFTA_NAT_REG_PROTO_MAX = 0x6
1780 NFTA_NAT_FLAGS = 0x7
1781 NFTA_MASQ_UNSPEC = 0x0
1782 NFTA_MASQ_FLAGS = 0x1
1783 NFTA_MASQ_REG_PROTO_MIN = 0x2
1784 NFTA_MASQ_REG_PROTO_MAX = 0x3
1785 NFTA_REDIR_UNSPEC = 0x0
1786 NFTA_REDIR_REG_PROTO_MIN = 0x1
1787 NFTA_REDIR_REG_PROTO_MAX = 0x2
1788 NFTA_REDIR_FLAGS = 0x3
1789 NFTA_DUP_UNSPEC = 0x0
1790 NFTA_DUP_SREG_ADDR = 0x1
1791 NFTA_DUP_SREG_DEV = 0x2
1792 NFTA_FWD_UNSPEC = 0x0
1793 NFTA_FWD_SREG_DEV = 0x1
1794 NFTA_OBJREF_UNSPEC = 0x0
1795 NFTA_OBJREF_IMM_TYPE = 0x1
1796 NFTA_OBJREF_IMM_NAME = 0x2
1797 NFTA_OBJREF_SET_SREG = 0x3
1798 NFTA_OBJREF_SET_NAME = 0x4
1799 NFTA_OBJREF_SET_ID = 0x5
1800 NFTA_GEN_UNSPEC = 0x0
1801 NFTA_GEN_ID = 0x1
1802 NFTA_GEN_PROC_PID = 0x2
1803 NFTA_GEN_PROC_NAME = 0x3
1804 NFTA_FIB_UNSPEC = 0x0
1805 NFTA_FIB_DREG = 0x1
1806 NFTA_FIB_RESULT = 0x2
1807 NFTA_FIB_FLAGS = 0x3
1808 NFT_FIB_RESULT_UNSPEC = 0x0
1809 NFT_FIB_RESULT_OIF = 0x1
1810 NFT_FIB_RESULT_OIFNAME = 0x2
1811 NFT_FIB_RESULT_ADDRTYPE = 0x3
1812 NFTA_FIB_F_SADDR = 0x1
1813 NFTA_FIB_F_DADDR = 0x2
1814 NFTA_FIB_F_MARK = 0x4
1815 NFTA_FIB_F_IIF = 0x8
1816 NFTA_FIB_F_OIF = 0x10
1817 NFTA_FIB_F_PRESENT = 0x20
1818 NFTA_CT_HELPER_UNSPEC = 0x0
1819 NFTA_CT_HELPER_NAME = 0x1
1820 NFTA_CT_HELPER_L3PROTO = 0x2
1821 NFTA_CT_HELPER_L4PROTO = 0x3
1822 NFTA_OBJ_UNSPEC = 0x0
1823 NFTA_OBJ_TABLE = 0x1
1824 NFTA_OBJ_NAME = 0x2
1825 NFTA_OBJ_TYPE = 0x3
1826 NFTA_OBJ_DATA = 0x4
1827 NFTA_OBJ_USE = 0x5
1828 NFTA_TRACE_UNSPEC = 0x0
1829 NFTA_TRACE_TABLE = 0x1
1830 NFTA_TRACE_CHAIN = 0x2
1831 NFTA_TRACE_RULE_HANDLE = 0x3
1832 NFTA_TRACE_TYPE = 0x4
1833 NFTA_TRACE_VERDICT = 0x5
1834 NFTA_TRACE_ID = 0x6
1835 NFTA_TRACE_LL_HEADER = 0x7
1836 NFTA_TRACE_NETWORK_HEADER = 0x8
1837 NFTA_TRACE_TRANSPORT_HEADER = 0x9
1838 NFTA_TRACE_IIF = 0xa
1839 NFTA_TRACE_IIFTYPE = 0xb
1840 NFTA_TRACE_OIF = 0xc
1841 NFTA_TRACE_OIFTYPE = 0xd
1842 NFTA_TRACE_MARK = 0xe
1843 NFTA_TRACE_NFPROTO = 0xf
1844 NFTA_TRACE_POLICY = 0x10
1845 NFTA_TRACE_PAD = 0x11
1846 NFT_TRACETYPE_UNSPEC = 0x0
1847 NFT_TRACETYPE_POLICY = 0x1
1848 NFT_TRACETYPE_RETURN = 0x2
1849 NFT_TRACETYPE_RULE = 0x3
1850 NFTA_NG_UNSPEC = 0x0
1851 NFTA_NG_DREG = 0x1
1852 NFTA_NG_MODULUS = 0x2
1853 NFTA_NG_TYPE = 0x3
1854 NFTA_NG_OFFSET = 0x4
1855 NFT_NG_INCREMENTAL = 0x0
1856 NFT_NG_RANDOM = 0x1
1857 )
1858
1859 type RTCTime struct {
1860 Sec int32
1861 Min int32
1862 Hour int32
1863 Mday int32
1864 Mon int32
1865 Year int32
1866 Wday int32
1867 Yday int32
1868 Isdst int32
1869 }
1870
1871 type RTCWkAlrm struct {
1872 Enabled uint8
1873 Pending uint8
1874 Time RTCTime
1875 }
1876
1877 type RTCPLLInfo struct {
1878 Ctrl int32
1879 Value int32
1880 Max int32
1881 Min int32
1882 Posmult int32
1883 Negmult int32
1884 Clock int32
1885 }
1886
1887 type BlkpgIoctlArg struct {
1888 Op int32
1889 Flags int32
1890 Datalen int32
1891 Data *byte
1892 }
1893
1894 type BlkpgPartition struct {
1895 Start int64
1896 Length int64
1897 Pno int32
1898 Devname [64]uint8
1899 Volname [64]uint8
1900 _ [4]byte
1901 }
1902
1903 const (
1904 BLKPG = 0x1269
1905 BLKPG_ADD_PARTITION = 0x1
1906 BLKPG_DEL_PARTITION = 0x2
1907 BLKPG_RESIZE_PARTITION = 0x3
1908 )
1909
1910 const (
1911 NETNSA_NONE = 0x0
1912 NETNSA_NSID = 0x1
1913 NETNSA_PID = 0x2
1914 NETNSA_FD = 0x3
1915 )
1916
1917 type XDPRingOffset struct {
1918 Producer uint64
1919 Consumer uint64
1920 Desc uint64
1921 }
1922
1923 type XDPMmapOffsets struct {
1924 Rx XDPRingOffset
1925 Tx XDPRingOffset
1926 Fr XDPRingOffset
1927 Cr XDPRingOffset
1928 }
1929
1930 type XDPUmemReg struct {
1931 Addr uint64
1932 Len uint64
1933 Size uint32
1934 Headroom uint32
1935 }
1936
1937 type XDPStatistics struct {
1938 Rx_dropped uint64
1939 Rx_invalid_descs uint64
1940 Tx_invalid_descs uint64
1941 }
1942
1943 type XDPDesc struct {
1944 Addr uint64
1945 Len uint32
1946 Options uint32
1947 }
1948
1949 const (
1950 NCSI_CMD_UNSPEC = 0x0
1951 NCSI_CMD_PKG_INFO = 0x1
1952 NCSI_CMD_SET_INTERFACE = 0x2
1953 NCSI_CMD_CLEAR_INTERFACE = 0x3
1954 NCSI_ATTR_UNSPEC = 0x0
1955 NCSI_ATTR_IFINDEX = 0x1
1956 NCSI_ATTR_PACKAGE_LIST = 0x2
1957 NCSI_ATTR_PACKAGE_ID = 0x3
1958 NCSI_ATTR_CHANNEL_ID = 0x4
1959 NCSI_PKG_ATTR_UNSPEC = 0x0
1960 NCSI_PKG_ATTR = 0x1
1961 NCSI_PKG_ATTR_ID = 0x2
1962 NCSI_PKG_ATTR_FORCED = 0x3
1963 NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
1964 NCSI_CHANNEL_ATTR_UNSPEC = 0x0
1965 NCSI_CHANNEL_ATTR = 0x1
1966 NCSI_CHANNEL_ATTR_ID = 0x2
1967 NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
1968 NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
1969 NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
1970 NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
1971 NCSI_CHANNEL_ATTR_ACTIVE = 0x7
1972 NCSI_CHANNEL_ATTR_FORCED = 0x8
1973 NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
1974 NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
1975 )
1976
1977 const (
1978 SOF_TIMESTAMPING_TX_HARDWARE = 0x1
1979 SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
1980 SOF_TIMESTAMPING_RX_HARDWARE = 0x4
1981 SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
1982 SOF_TIMESTAMPING_SOFTWARE = 0x10
1983 SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
1984 SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
1985 SOF_TIMESTAMPING_OPT_ID = 0x80
1986 SOF_TIMESTAMPING_TX_SCHED = 0x100
1987 SOF_TIMESTAMPING_TX_ACK = 0x200
1988 SOF_TIMESTAMPING_OPT_CMSG = 0x400
1989 SOF_TIMESTAMPING_OPT_TSONLY = 0x800
1990 SOF_TIMESTAMPING_OPT_STATS = 0x1000
1991 SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
1992 SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
1993
1994 SOF_TIMESTAMPING_LAST = 0x4000
1995 SOF_TIMESTAMPING_MASK = 0x7fff
1996 )
55 package unix
66
77 const (
8 sizeofPtr = 0x8
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x8
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
1313 PathMax = 0x1000
1414 )
1515
3232
3333 type Timex struct {
3434 Modes uint32
35 Pad_cgo_0 [4]byte
3635 Offset int64
3736 Freq int64
3837 Maxerror int64
3938 Esterror int64
4039 Status int32
41 Pad_cgo_1 [4]byte
4240 Constant int64
4341 Precision int64
4442 Tolerance int64
4745 Ppsfreq int64
4846 Jitter int64
4947 Shift int32
50 Pad_cgo_2 [4]byte
5148 Stabil int64
5249 Jitcnt int64
5350 Calcnt int64
5451 Errcnt int64
5552 Stbcnt int64
5653 Tai int32
57 Pad_cgo_3 [44]byte
54 _ [44]byte
5855 }
5956
6057 type Time_t int64
105102 Uid uint32
106103 Gid uint32
107104 Rdev uint64
108 X__pad1 uint64
105 _ uint64
109106 Size int64
110107 Blksize int32
111 X__pad2 int32
108 _ int32
112109 Blocks int64
113110 Atim Timespec
114111 Mtim Timespec
116113 _ [2]int32
117114 }
118115
119 type Statfs_t struct {
120 Type int64
121 Bsize int64
122 Blocks uint64
123 Bfree uint64
124 Bavail uint64
125 Files uint64
126 Ffree uint64
127 Fsid Fsid
128 Namelen int64
129 Frsize int64
130 Flags int64
131 Spare [4]int64
116 type StatxTimestamp struct {
117 Sec int64
118 Nsec uint32
119 _ int32
120 }
121
122 type Statx_t struct {
123 Mask uint32
124 Blksize uint32
125 Attributes uint64
126 Nlink uint32
127 Uid uint32
128 Gid uint32
129 Mode uint16
130 _ [1]uint16
131 Ino uint64
132 Size uint64
133 Blocks uint64
134 Attributes_mask uint64
135 Atime StatxTimestamp
136 Btime StatxTimestamp
137 Ctime StatxTimestamp
138 Mtime StatxTimestamp
139 Rdev_major uint32
140 Rdev_minor uint32
141 Dev_major uint32
142 Dev_minor uint32
143 _ [14]uint64
132144 }
133145
134146 type Dirent struct {
135 Ino uint64
136 Off int64
137 Reclen uint16
138 Type uint8
139 Name [256]int8
140 Pad_cgo_0 [5]byte
147 Ino uint64
148 Off int64
149 Reclen uint16
150 Type uint8
151 Name [256]int8
152 _ [5]byte
141153 }
142154
143155 type Fsid struct {
144 X__val [2]int32
156 Val [2]int32
145157 }
146158
147159 type Flock_t struct {
148 Type int16
149 Whence int16
150 Pad_cgo_0 [4]byte
151 Start int64
152 Len int64
153 Pid int32
154 Pad_cgo_1 [4]byte
160 Type int16
161 Whence int16
162 Start int64
163 Len int64
164 Pid int32
165 _ [4]byte
155166 }
156167
157168 type FscryptPolicy struct {
226237 Channel uint16
227238 }
228239
240 type RawSockaddrL2 struct {
241 Family uint16
242 Psm uint16
243 Bdaddr [6]uint8
244 Cid uint16
245 Bdaddr_type uint8
246 _ [1]byte
247 }
248
249 type RawSockaddrRFCOMM struct {
250 Family uint16
251 Bdaddr [6]uint8
252 Channel uint8
253 _ [1]byte
254 }
255
229256 type RawSockaddrCAN struct {
230 Family uint16
231 Pad_cgo_0 [2]byte
232 Ifindex int32
233 Addr [8]byte
257 Family uint16
258 Ifindex int32
259 Addr [8]byte
234260 }
235261
236262 type RawSockaddrALG struct {
249275 Zero [4]uint8
250276 }
251277
278 type RawSockaddrXDP struct {
279 Family uint16
280 Flags uint16
281 Ifindex uint32
282 Queue_id uint32
283 Shared_umem_fd uint32
284 }
285
286 type RawSockaddrPPPoX [0x1e]byte
287
252288 type RawSockaddr struct {
253289 Family uint16
254290 Data [14]int8
297333 type Msghdr struct {
298334 Name *byte
299335 Namelen uint32
300 Pad_cgo_0 [4]byte
301336 Iov *Iovec
302337 Iovlen uint64
303338 Control *byte
304339 Controllen uint64
305340 Flags int32
306 Pad_cgo_1 [4]byte
341 _ [4]byte
307342 }
308343
309344 type Cmsghdr struct {
345380 Probes uint8
346381 Backoff uint8
347382 Options uint8
348 Pad_cgo_0 [2]byte
349383 Rto uint32
350384 Ato uint32
351385 Snd_mss uint32
380414 SizeofSockaddrLinklayer = 0x14
381415 SizeofSockaddrNetlink = 0xc
382416 SizeofSockaddrHCI = 0x6
417 SizeofSockaddrL2 = 0xe
418 SizeofSockaddrRFCOMM = 0xa
383419 SizeofSockaddrCAN = 0x10
384420 SizeofSockaddrALG = 0x58
385421 SizeofSockaddrVM = 0x10
422 SizeofSockaddrXDP = 0x10
423 SizeofSockaddrPPPoX = 0x1e
386424 SizeofLinger = 0x8
387425 SizeofIovec = 0x10
388426 SizeofIPMreq = 0x8
400438 )
401439
402440 const (
403 IFA_UNSPEC = 0x0
404 IFA_ADDRESS = 0x1
405 IFA_LOCAL = 0x2
406 IFA_LABEL = 0x3
407 IFA_BROADCAST = 0x4
408 IFA_ANYCAST = 0x5
409 IFA_CACHEINFO = 0x6
410 IFA_MULTICAST = 0x7
411 IFLA_UNSPEC = 0x0
412 IFLA_ADDRESS = 0x1
413 IFLA_BROADCAST = 0x2
414 IFLA_IFNAME = 0x3
415 IFLA_MTU = 0x4
416 IFLA_LINK = 0x5
417 IFLA_QDISC = 0x6
418 IFLA_STATS = 0x7
419 IFLA_COST = 0x8
420 IFLA_PRIORITY = 0x9
421 IFLA_MASTER = 0xa
422 IFLA_WIRELESS = 0xb
423 IFLA_PROTINFO = 0xc
424 IFLA_TXQLEN = 0xd
425 IFLA_MAP = 0xe
426 IFLA_WEIGHT = 0xf
427 IFLA_OPERSTATE = 0x10
428 IFLA_LINKMODE = 0x11
429 IFLA_LINKINFO = 0x12
430 IFLA_NET_NS_PID = 0x13
431 IFLA_IFALIAS = 0x14
432 IFLA_MAX = 0x2c
433 RT_SCOPE_UNIVERSE = 0x0
434 RT_SCOPE_SITE = 0xc8
435 RT_SCOPE_LINK = 0xfd
436 RT_SCOPE_HOST = 0xfe
437 RT_SCOPE_NOWHERE = 0xff
438 RT_TABLE_UNSPEC = 0x0
439 RT_TABLE_COMPAT = 0xfc
440 RT_TABLE_DEFAULT = 0xfd
441 RT_TABLE_MAIN = 0xfe
442 RT_TABLE_LOCAL = 0xff
443 RT_TABLE_MAX = 0xffffffff
444 RTA_UNSPEC = 0x0
445 RTA_DST = 0x1
446 RTA_SRC = 0x2
447 RTA_IIF = 0x3
448 RTA_OIF = 0x4
449 RTA_GATEWAY = 0x5
450 RTA_PRIORITY = 0x6
451 RTA_PREFSRC = 0x7
452 RTA_METRICS = 0x8
453 RTA_MULTIPATH = 0x9
454 RTA_FLOW = 0xb
455 RTA_CACHEINFO = 0xc
456 RTA_TABLE = 0xf
457 RTN_UNSPEC = 0x0
458 RTN_UNICAST = 0x1
459 RTN_LOCAL = 0x2
460 RTN_BROADCAST = 0x3
461 RTN_ANYCAST = 0x4
462 RTN_MULTICAST = 0x5
463 RTN_BLACKHOLE = 0x6
464 RTN_UNREACHABLE = 0x7
465 RTN_PROHIBIT = 0x8
466 RTN_THROW = 0x9
467 RTN_NAT = 0xa
468 RTN_XRESOLVE = 0xb
469 RTNLGRP_NONE = 0x0
470 RTNLGRP_LINK = 0x1
471 RTNLGRP_NOTIFY = 0x2
472 RTNLGRP_NEIGH = 0x3
473 RTNLGRP_TC = 0x4
474 RTNLGRP_IPV4_IFADDR = 0x5
475 RTNLGRP_IPV4_MROUTE = 0x6
476 RTNLGRP_IPV4_ROUTE = 0x7
477 RTNLGRP_IPV4_RULE = 0x8
478 RTNLGRP_IPV6_IFADDR = 0x9
479 RTNLGRP_IPV6_MROUTE = 0xa
480 RTNLGRP_IPV6_ROUTE = 0xb
481 RTNLGRP_IPV6_IFINFO = 0xc
482 RTNLGRP_IPV6_PREFIX = 0x12
483 RTNLGRP_IPV6_RULE = 0x13
484 RTNLGRP_ND_USEROPT = 0x14
485 SizeofNlMsghdr = 0x10
486 SizeofNlMsgerr = 0x14
487 SizeofRtGenmsg = 0x1
488 SizeofNlAttr = 0x4
489 SizeofRtAttr = 0x4
490 SizeofIfInfomsg = 0x10
491 SizeofIfAddrmsg = 0x8
492 SizeofRtMsg = 0xc
493 SizeofRtNexthop = 0x8
441 IFA_UNSPEC = 0x0
442 IFA_ADDRESS = 0x1
443 IFA_LOCAL = 0x2
444 IFA_LABEL = 0x3
445 IFA_BROADCAST = 0x4
446 IFA_ANYCAST = 0x5
447 IFA_CACHEINFO = 0x6
448 IFA_MULTICAST = 0x7
449 IFLA_UNSPEC = 0x0
450 IFLA_ADDRESS = 0x1
451 IFLA_BROADCAST = 0x2
452 IFLA_IFNAME = 0x3
453 IFLA_INFO_KIND = 0x1
454 IFLA_MTU = 0x4
455 IFLA_LINK = 0x5
456 IFLA_QDISC = 0x6
457 IFLA_STATS = 0x7
458 IFLA_COST = 0x8
459 IFLA_PRIORITY = 0x9
460 IFLA_MASTER = 0xa
461 IFLA_WIRELESS = 0xb
462 IFLA_PROTINFO = 0xc
463 IFLA_TXQLEN = 0xd
464 IFLA_MAP = 0xe
465 IFLA_WEIGHT = 0xf
466 IFLA_OPERSTATE = 0x10
467 IFLA_LINKMODE = 0x11
468 IFLA_LINKINFO = 0x12
469 IFLA_NET_NS_PID = 0x13
470 IFLA_IFALIAS = 0x14
471 IFLA_NUM_VF = 0x15
472 IFLA_VFINFO_LIST = 0x16
473 IFLA_STATS64 = 0x17
474 IFLA_VF_PORTS = 0x18
475 IFLA_PORT_SELF = 0x19
476 IFLA_AF_SPEC = 0x1a
477 IFLA_GROUP = 0x1b
478 IFLA_NET_NS_FD = 0x1c
479 IFLA_EXT_MASK = 0x1d
480 IFLA_PROMISCUITY = 0x1e
481 IFLA_NUM_TX_QUEUES = 0x1f
482 IFLA_NUM_RX_QUEUES = 0x20
483 IFLA_CARRIER = 0x21
484 IFLA_PHYS_PORT_ID = 0x22
485 IFLA_CARRIER_CHANGES = 0x23
486 IFLA_PHYS_SWITCH_ID = 0x24
487 IFLA_LINK_NETNSID = 0x25
488 IFLA_PHYS_PORT_NAME = 0x26
489 IFLA_PROTO_DOWN = 0x27
490 IFLA_GSO_MAX_SEGS = 0x28
491 IFLA_GSO_MAX_SIZE = 0x29
492 IFLA_PAD = 0x2a
493 IFLA_XDP = 0x2b
494 IFLA_EVENT = 0x2c
495 IFLA_NEW_NETNSID = 0x2d
496 IFLA_IF_NETNSID = 0x2e
497 IFLA_MAX = 0x33
498 RT_SCOPE_UNIVERSE = 0x0
499 RT_SCOPE_SITE = 0xc8
500 RT_SCOPE_LINK = 0xfd
501 RT_SCOPE_HOST = 0xfe
502 RT_SCOPE_NOWHERE = 0xff
503 RT_TABLE_UNSPEC = 0x0
504 RT_TABLE_COMPAT = 0xfc
505 RT_TABLE_DEFAULT = 0xfd
506 RT_TABLE_MAIN = 0xfe
507 RT_TABLE_LOCAL = 0xff
508 RT_TABLE_MAX = 0xffffffff
509 RTA_UNSPEC = 0x0
510 RTA_DST = 0x1
511 RTA_SRC = 0x2
512 RTA_IIF = 0x3
513 RTA_OIF = 0x4
514 RTA_GATEWAY = 0x5
515 RTA_PRIORITY = 0x6
516 RTA_PREFSRC = 0x7
517 RTA_METRICS = 0x8
518 RTA_MULTIPATH = 0x9
519 RTA_FLOW = 0xb
520 RTA_CACHEINFO = 0xc
521 RTA_TABLE = 0xf
522 RTA_MARK = 0x10
523 RTA_MFC_STATS = 0x11
524 RTA_VIA = 0x12
525 RTA_NEWDST = 0x13
526 RTA_PREF = 0x14
527 RTA_ENCAP_TYPE = 0x15
528 RTA_ENCAP = 0x16
529 RTA_EXPIRES = 0x17
530 RTA_PAD = 0x18
531 RTA_UID = 0x19
532 RTA_TTL_PROPAGATE = 0x1a
533 RTA_IP_PROTO = 0x1b
534 RTA_SPORT = 0x1c
535 RTA_DPORT = 0x1d
536 RTN_UNSPEC = 0x0
537 RTN_UNICAST = 0x1
538 RTN_LOCAL = 0x2
539 RTN_BROADCAST = 0x3
540 RTN_ANYCAST = 0x4
541 RTN_MULTICAST = 0x5
542 RTN_BLACKHOLE = 0x6
543 RTN_UNREACHABLE = 0x7
544 RTN_PROHIBIT = 0x8
545 RTN_THROW = 0x9
546 RTN_NAT = 0xa
547 RTN_XRESOLVE = 0xb
548 RTNLGRP_NONE = 0x0
549 RTNLGRP_LINK = 0x1
550 RTNLGRP_NOTIFY = 0x2
551 RTNLGRP_NEIGH = 0x3
552 RTNLGRP_TC = 0x4
553 RTNLGRP_IPV4_IFADDR = 0x5
554 RTNLGRP_IPV4_MROUTE = 0x6
555 RTNLGRP_IPV4_ROUTE = 0x7
556 RTNLGRP_IPV4_RULE = 0x8
557 RTNLGRP_IPV6_IFADDR = 0x9
558 RTNLGRP_IPV6_MROUTE = 0xa
559 RTNLGRP_IPV6_ROUTE = 0xb
560 RTNLGRP_IPV6_IFINFO = 0xc
561 RTNLGRP_IPV6_PREFIX = 0x12
562 RTNLGRP_IPV6_RULE = 0x13
563 RTNLGRP_ND_USEROPT = 0x14
564 SizeofNlMsghdr = 0x10
565 SizeofNlMsgerr = 0x14
566 SizeofRtGenmsg = 0x1
567 SizeofNlAttr = 0x4
568 SizeofRtAttr = 0x4
569 SizeofIfInfomsg = 0x10
570 SizeofIfAddrmsg = 0x8
571 SizeofRtMsg = 0xc
572 SizeofRtNexthop = 0x8
494573 )
495574
496575 type NlMsghdr struct {
521600 }
522601
523602 type IfInfomsg struct {
524 Family uint8
525 X__ifi_pad uint8
526 Type uint16
527 Index int32
528 Flags uint32
529 Change uint32
603 Family uint8
604 _ uint8
605 Type uint16
606 Index int32
607 Flags uint32
608 Change uint32
530609 }
531610
532611 type IfAddrmsg struct {
569648 }
570649
571650 type SockFprog struct {
572 Len uint16
573 Pad_cgo_0 [6]byte
574 Filter *SockFilter
651 Len uint16
652 Filter *SockFilter
575653 }
576654
577655 type InotifyEvent struct {
605683 Freeswap uint64
606684 Procs uint16
607685 Pad uint16
608 Pad_cgo_0 [4]byte
609686 Totalhigh uint64
610687 Freehigh uint64
611688 Unit uint32
612 X_f [0]int8
613 Pad_cgo_1 [4]byte
689 _ [0]int8
690 _ [4]byte
614691 }
615692
616693 type Utsname struct {
617 Sysname [65]int8
618 Nodename [65]int8
619 Release [65]int8
620 Version [65]int8
621 Machine [65]int8
622 Domainname [65]int8
694 Sysname [65]byte
695 Nodename [65]byte
696 Release [65]byte
697 Version [65]byte
698 Machine [65]byte
699 Domainname [65]byte
623700 }
624701
625702 type Ustat_t struct {
626 Tfree int32
627 Pad_cgo_0 [4]byte
628 Tinode uint64
629 Fname [6]int8
630 Fpack [6]int8
631 Pad_cgo_1 [4]byte
703 Tfree int32
704 Tinode uint64
705 Fname [6]int8
706 Fpack [6]int8
707 _ [4]byte
632708 }
633709
634710 type EpollEvent struct {
639715 }
640716
641717 const (
642 AT_FDCWD = -0x64
643 AT_REMOVEDIR = 0x200
718 AT_EMPTY_PATH = 0x1000
719 AT_FDCWD = -0x64
720 AT_NO_AUTOMOUNT = 0x800
721 AT_REMOVEDIR = 0x200
722
723 AT_STATX_SYNC_AS_STAT = 0x0
724 AT_STATX_FORCE_SYNC = 0x2000
725 AT_STATX_DONT_SYNC = 0x4000
726
644727 AT_SYMLINK_FOLLOW = 0x400
645728 AT_SYMLINK_NOFOLLOW = 0x100
729
730 AT_EACCESS = 0x200
646731 )
647732
648733 type PollFd struct {
662747 )
663748
664749 type Sigset_t struct {
665 X__val [16]uint64
750 Val [16]uint64
751 }
752
753 type SignalfdSiginfo struct {
754 Signo uint32
755 Errno int32
756 Code int32
757 Pid uint32
758 Uid uint32
759 Fd int32
760 Tid uint32
761 Band uint32
762 Overrun uint32
763 Trapno uint32
764 Status int32
765 Int int32
766 Ptr uint64
767 Utime uint64
768 Stime uint64
769 Addr uint64
770 _ [48]uint8
666771 }
667772
668773 const RNDGETENTCNT = 0x80045200
689794
690795 type Taskstats struct {
691796 Version uint16
692 Pad_cgo_0 [2]byte
693797 Ac_exitcode uint32
694798 Ac_flag uint8
695799 Ac_nice uint8
696 Pad_cgo_1 [6]byte
697800 Cpu_count uint64
698801 Cpu_delay_total uint64
699802 Blkio_count uint64
705808 Ac_comm [32]int8
706809 Ac_sched uint8
707810 Ac_pad [3]uint8
708 Pad_cgo_2 [4]byte
811 _ [4]byte
709812 Ac_uid uint32
710813 Ac_gid uint32
711814 Ac_pid uint32
712815 Ac_ppid uint32
713816 Ac_btime uint32
714 Pad_cgo_3 [4]byte
715817 Ac_etime uint64
716818 Ac_utime uint64
717819 Ac_stime uint64
735837 Cpu_scaled_run_real_total uint64
736838 Freepages_count uint64
737839 Freepages_delay_total uint64
840 Thrashing_count uint64
841 Thrashing_delay_total uint64
738842 }
739843
740844 const (
753857 TASKSTATS_CMD_ATTR_TGID = 0x2
754858 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
755859 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
860 )
861
862 type CGroupStats struct {
863 Sleeping uint64
864 Running uint64
865 Stopped uint64
866 Uninterruptible uint64
867 Io_wait uint64
868 }
869
870 const (
871 CGROUPSTATS_CMD_UNSPEC = 0x3
872 CGROUPSTATS_CMD_GET = 0x4
873 CGROUPSTATS_CMD_NEW = 0x5
874 CGROUPSTATS_TYPE_UNSPEC = 0x0
875 CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
876 CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
877 CGROUPSTATS_CMD_ATTR_FD = 0x1
756878 )
757879
758880 type Genlmsghdr struct {
787909 CTRL_ATTR_MCAST_GRP_NAME = 0x1
788910 CTRL_ATTR_MCAST_GRP_ID = 0x2
789911 )
912
913 type cpuMask uint64
914
915 const (
916 _CPU_SETSIZE = 0x400
917 _NCPUBITS = 0x40
918 )
919
920 const (
921 BDADDR_BREDR = 0x0
922 BDADDR_LE_PUBLIC = 0x1
923 BDADDR_LE_RANDOM = 0x2
924 )
925
926 type PerfEventAttr struct {
927 Type uint32
928 Size uint32
929 Config uint64
930 Sample uint64
931 Sample_type uint64
932 Read_format uint64
933 Bits uint64
934 Wakeup uint32
935 Bp_type uint32
936 Ext1 uint64
937 Ext2 uint64
938 Branch_sample_type uint64
939 Sample_regs_user uint64
940 Sample_stack_user uint32
941 Clockid int32
942 Sample_regs_intr uint64
943 Aux_watermark uint32
944 _ uint32
945 }
946
947 type PerfEventMmapPage struct {
948 Version uint32
949 Compat_version uint32
950 Lock uint32
951 Index uint32
952 Offset int64
953 Time_enabled uint64
954 Time_running uint64
955 Capabilities uint64
956 Pmc_width uint16
957 Time_shift uint16
958 Time_mult uint32
959 Time_offset uint64
960 Time_zero uint64
961 Size uint32
962 _ [948]uint8
963 Data_head uint64
964 Data_tail uint64
965 Data_offset uint64
966 Data_size uint64
967 Aux_head uint64
968 Aux_tail uint64
969 Aux_offset uint64
970 Aux_size uint64
971 }
972
973 const (
974 PerfBitDisabled uint64 = CBitFieldMaskBit0
975 PerfBitInherit = CBitFieldMaskBit1
976 PerfBitPinned = CBitFieldMaskBit2
977 PerfBitExclusive = CBitFieldMaskBit3
978 PerfBitExcludeUser = CBitFieldMaskBit4
979 PerfBitExcludeKernel = CBitFieldMaskBit5
980 PerfBitExcludeHv = CBitFieldMaskBit6
981 PerfBitExcludeIdle = CBitFieldMaskBit7
982 PerfBitMmap = CBitFieldMaskBit8
983 PerfBitComm = CBitFieldMaskBit9
984 PerfBitFreq = CBitFieldMaskBit10
985 PerfBitInheritStat = CBitFieldMaskBit11
986 PerfBitEnableOnExec = CBitFieldMaskBit12
987 PerfBitTask = CBitFieldMaskBit13
988 PerfBitWatermark = CBitFieldMaskBit14
989 PerfBitPreciseIPBit1 = CBitFieldMaskBit15
990 PerfBitPreciseIPBit2 = CBitFieldMaskBit16
991 PerfBitMmapData = CBitFieldMaskBit17
992 PerfBitSampleIDAll = CBitFieldMaskBit18
993 PerfBitExcludeHost = CBitFieldMaskBit19
994 PerfBitExcludeGuest = CBitFieldMaskBit20
995 PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
996 PerfBitExcludeCallchainUser = CBitFieldMaskBit22
997 PerfBitMmap2 = CBitFieldMaskBit23
998 PerfBitCommExec = CBitFieldMaskBit24
999 PerfBitUseClockID = CBitFieldMaskBit25
1000 PerfBitContextSwitch = CBitFieldMaskBit26
1001 )
1002
1003 const (
1004 PERF_TYPE_HARDWARE = 0x0
1005 PERF_TYPE_SOFTWARE = 0x1
1006 PERF_TYPE_TRACEPOINT = 0x2
1007 PERF_TYPE_HW_CACHE = 0x3
1008 PERF_TYPE_RAW = 0x4
1009 PERF_TYPE_BREAKPOINT = 0x5
1010
1011 PERF_COUNT_HW_CPU_CYCLES = 0x0
1012 PERF_COUNT_HW_INSTRUCTIONS = 0x1
1013 PERF_COUNT_HW_CACHE_REFERENCES = 0x2
1014 PERF_COUNT_HW_CACHE_MISSES = 0x3
1015 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
1016 PERF_COUNT_HW_BRANCH_MISSES = 0x5
1017 PERF_COUNT_HW_BUS_CYCLES = 0x6
1018 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
1019 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
1020 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
1021
1022 PERF_COUNT_HW_CACHE_L1D = 0x0
1023 PERF_COUNT_HW_CACHE_L1I = 0x1
1024 PERF_COUNT_HW_CACHE_LL = 0x2
1025 PERF_COUNT_HW_CACHE_DTLB = 0x3
1026 PERF_COUNT_HW_CACHE_ITLB = 0x4
1027 PERF_COUNT_HW_CACHE_BPU = 0x5
1028 PERF_COUNT_HW_CACHE_NODE = 0x6
1029
1030 PERF_COUNT_HW_CACHE_OP_READ = 0x0
1031 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
1032 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
1033
1034 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
1035 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
1036
1037 PERF_COUNT_SW_CPU_CLOCK = 0x0
1038 PERF_COUNT_SW_TASK_CLOCK = 0x1
1039 PERF_COUNT_SW_PAGE_FAULTS = 0x2
1040 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
1041 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
1042 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
1043 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
1044 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
1045 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
1046 PERF_COUNT_SW_DUMMY = 0x9
1047
1048 PERF_SAMPLE_IP = 0x1
1049 PERF_SAMPLE_TID = 0x2
1050 PERF_SAMPLE_TIME = 0x4
1051 PERF_SAMPLE_ADDR = 0x8
1052 PERF_SAMPLE_READ = 0x10
1053 PERF_SAMPLE_CALLCHAIN = 0x20
1054 PERF_SAMPLE_ID = 0x40
1055 PERF_SAMPLE_CPU = 0x80
1056 PERF_SAMPLE_PERIOD = 0x100
1057 PERF_SAMPLE_STREAM_ID = 0x200
1058 PERF_SAMPLE_RAW = 0x400
1059 PERF_SAMPLE_BRANCH_STACK = 0x800
1060
1061 PERF_SAMPLE_BRANCH_USER = 0x1
1062 PERF_SAMPLE_BRANCH_KERNEL = 0x2
1063 PERF_SAMPLE_BRANCH_HV = 0x4
1064 PERF_SAMPLE_BRANCH_ANY = 0x8
1065 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
1066 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
1067 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
1068
1069 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
1070 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
1071 PERF_FORMAT_ID = 0x4
1072 PERF_FORMAT_GROUP = 0x8
1073
1074 PERF_RECORD_MMAP = 0x1
1075 PERF_RECORD_LOST = 0x2
1076 PERF_RECORD_COMM = 0x3
1077 PERF_RECORD_EXIT = 0x4
1078 PERF_RECORD_THROTTLE = 0x5
1079 PERF_RECORD_UNTHROTTLE = 0x6
1080 PERF_RECORD_FORK = 0x7
1081 PERF_RECORD_READ = 0x8
1082 PERF_RECORD_SAMPLE = 0x9
1083
1084 PERF_CONTEXT_HV = -0x20
1085 PERF_CONTEXT_KERNEL = -0x80
1086 PERF_CONTEXT_USER = -0x200
1087
1088 PERF_CONTEXT_GUEST = -0x800
1089 PERF_CONTEXT_GUEST_KERNEL = -0x880
1090 PERF_CONTEXT_GUEST_USER = -0xa00
1091
1092 PERF_FLAG_FD_NO_GROUP = 0x1
1093 PERF_FLAG_FD_OUTPUT = 0x2
1094 PERF_FLAG_PID_CGROUP = 0x4
1095 )
1096
1097 const (
1098 CBitFieldMaskBit0 = 0x1
1099 CBitFieldMaskBit1 = 0x2
1100 CBitFieldMaskBit2 = 0x4
1101 CBitFieldMaskBit3 = 0x8
1102 CBitFieldMaskBit4 = 0x10
1103 CBitFieldMaskBit5 = 0x20
1104 CBitFieldMaskBit6 = 0x40
1105 CBitFieldMaskBit7 = 0x80
1106 CBitFieldMaskBit8 = 0x100
1107 CBitFieldMaskBit9 = 0x200
1108 CBitFieldMaskBit10 = 0x400
1109 CBitFieldMaskBit11 = 0x800
1110 CBitFieldMaskBit12 = 0x1000
1111 CBitFieldMaskBit13 = 0x2000
1112 CBitFieldMaskBit14 = 0x4000
1113 CBitFieldMaskBit15 = 0x8000
1114 CBitFieldMaskBit16 = 0x10000
1115 CBitFieldMaskBit17 = 0x20000
1116 CBitFieldMaskBit18 = 0x40000
1117 CBitFieldMaskBit19 = 0x80000
1118 CBitFieldMaskBit20 = 0x100000
1119 CBitFieldMaskBit21 = 0x200000
1120 CBitFieldMaskBit22 = 0x400000
1121 CBitFieldMaskBit23 = 0x800000
1122 CBitFieldMaskBit24 = 0x1000000
1123 CBitFieldMaskBit25 = 0x2000000
1124 CBitFieldMaskBit26 = 0x4000000
1125 CBitFieldMaskBit27 = 0x8000000
1126 CBitFieldMaskBit28 = 0x10000000
1127 CBitFieldMaskBit29 = 0x20000000
1128 CBitFieldMaskBit30 = 0x40000000
1129 CBitFieldMaskBit31 = 0x80000000
1130 CBitFieldMaskBit32 = 0x100000000
1131 CBitFieldMaskBit33 = 0x200000000
1132 CBitFieldMaskBit34 = 0x400000000
1133 CBitFieldMaskBit35 = 0x800000000
1134 CBitFieldMaskBit36 = 0x1000000000
1135 CBitFieldMaskBit37 = 0x2000000000
1136 CBitFieldMaskBit38 = 0x4000000000
1137 CBitFieldMaskBit39 = 0x8000000000
1138 CBitFieldMaskBit40 = 0x10000000000
1139 CBitFieldMaskBit41 = 0x20000000000
1140 CBitFieldMaskBit42 = 0x40000000000
1141 CBitFieldMaskBit43 = 0x80000000000
1142 CBitFieldMaskBit44 = 0x100000000000
1143 CBitFieldMaskBit45 = 0x200000000000
1144 CBitFieldMaskBit46 = 0x400000000000
1145 CBitFieldMaskBit47 = 0x800000000000
1146 CBitFieldMaskBit48 = 0x1000000000000
1147 CBitFieldMaskBit49 = 0x2000000000000
1148 CBitFieldMaskBit50 = 0x4000000000000
1149 CBitFieldMaskBit51 = 0x8000000000000
1150 CBitFieldMaskBit52 = 0x10000000000000
1151 CBitFieldMaskBit53 = 0x20000000000000
1152 CBitFieldMaskBit54 = 0x40000000000000
1153 CBitFieldMaskBit55 = 0x80000000000000
1154 CBitFieldMaskBit56 = 0x100000000000000
1155 CBitFieldMaskBit57 = 0x200000000000000
1156 CBitFieldMaskBit58 = 0x400000000000000
1157 CBitFieldMaskBit59 = 0x800000000000000
1158 CBitFieldMaskBit60 = 0x1000000000000000
1159 CBitFieldMaskBit61 = 0x2000000000000000
1160 CBitFieldMaskBit62 = 0x4000000000000000
1161 CBitFieldMaskBit63 = 0x8000000000000000
1162 )
1163
1164 type SockaddrStorage struct {
1165 Family uint16
1166 _ [118]int8
1167 _ uint64
1168 }
1169
1170 type TCPMD5Sig struct {
1171 Addr SockaddrStorage
1172 Flags uint8
1173 Prefixlen uint8
1174 Keylen uint16
1175 _ uint32
1176 Key [80]uint8
1177 }
1178
1179 type HDDriveCmdHdr struct {
1180 Command uint8
1181 Number uint8
1182 Feature uint8
1183 Count uint8
1184 }
1185
1186 type HDGeometry struct {
1187 Heads uint8
1188 Sectors uint8
1189 Cylinders uint16
1190 Start uint64
1191 }
1192
1193 type HDDriveID struct {
1194 Config uint16
1195 Cyls uint16
1196 Reserved2 uint16
1197 Heads uint16
1198 Track_bytes uint16
1199 Sector_bytes uint16
1200 Sectors uint16
1201 Vendor0 uint16
1202 Vendor1 uint16
1203 Vendor2 uint16
1204 Serial_no [20]uint8
1205 Buf_type uint16
1206 Buf_size uint16
1207 Ecc_bytes uint16
1208 Fw_rev [8]uint8
1209 Model [40]uint8
1210 Max_multsect uint8
1211 Vendor3 uint8
1212 Dword_io uint16
1213 Vendor4 uint8
1214 Capability uint8
1215 Reserved50 uint16
1216 Vendor5 uint8
1217 TPIO uint8
1218 Vendor6 uint8
1219 TDMA uint8
1220 Field_valid uint16
1221 Cur_cyls uint16
1222 Cur_heads uint16
1223 Cur_sectors uint16
1224 Cur_capacity0 uint16
1225 Cur_capacity1 uint16
1226 Multsect uint8
1227 Multsect_valid uint8
1228 Lba_capacity uint32
1229 Dma_1word uint16
1230 Dma_mword uint16
1231 Eide_pio_modes uint16
1232 Eide_dma_min uint16
1233 Eide_dma_time uint16
1234 Eide_pio uint16
1235 Eide_pio_iordy uint16
1236 Words69_70 [2]uint16
1237 Words71_74 [4]uint16
1238 Queue_depth uint16
1239 Words76_79 [4]uint16
1240 Major_rev_num uint16
1241 Minor_rev_num uint16
1242 Command_set_1 uint16
1243 Command_set_2 uint16
1244 Cfsse uint16
1245 Cfs_enable_1 uint16
1246 Cfs_enable_2 uint16
1247 Csf_default uint16
1248 Dma_ultra uint16
1249 Trseuc uint16
1250 TrsEuc uint16
1251 CurAPMvalues uint16
1252 Mprc uint16
1253 Hw_config uint16
1254 Acoustic uint16
1255 Msrqs uint16
1256 Sxfert uint16
1257 Sal uint16
1258 Spg uint32
1259 Lba_capacity_2 uint64
1260 Words104_125 [22]uint16
1261 Last_lun uint16
1262 Word127 uint16
1263 Dlf uint16
1264 Csfo uint16
1265 Words130_155 [26]uint16
1266 Word156 uint16
1267 Words157_159 [3]uint16
1268 Cfa_power uint16
1269 Words161_175 [15]uint16
1270 Words176_205 [30]uint16
1271 Words206_254 [49]uint16
1272 Integrity_word uint16
1273 }
1274
1275 type Statfs_t struct {
1276 Type int64
1277 Bsize int64
1278 Blocks uint64
1279 Bfree uint64
1280 Bavail uint64
1281 Files uint64
1282 Ffree uint64
1283 Fsid Fsid
1284 Namelen int64
1285 Frsize int64
1286 Flags int64
1287 Spare [4]int64
1288 }
1289
1290 const (
1291 ST_MANDLOCK = 0x40
1292 ST_NOATIME = 0x400
1293 ST_NODEV = 0x4
1294 ST_NODIRATIME = 0x800
1295 ST_NOEXEC = 0x8
1296 ST_NOSUID = 0x2
1297 ST_RDONLY = 0x1
1298 ST_RELATIME = 0x1000
1299 ST_SYNCHRONOUS = 0x10
1300 )
1301
1302 type TpacketHdr struct {
1303 Status uint64
1304 Len uint32
1305 Snaplen uint32
1306 Mac uint16
1307 Net uint16
1308 Sec uint32
1309 Usec uint32
1310 _ [4]byte
1311 }
1312
1313 type Tpacket2Hdr struct {
1314 Status uint32
1315 Len uint32
1316 Snaplen uint32
1317 Mac uint16
1318 Net uint16
1319 Sec uint32
1320 Nsec uint32
1321 Vlan_tci uint16
1322 Vlan_tpid uint16
1323 _ [4]uint8
1324 }
1325
1326 type Tpacket3Hdr struct {
1327 Next_offset uint32
1328 Sec uint32
1329 Nsec uint32
1330 Snaplen uint32
1331 Len uint32
1332 Status uint32
1333 Mac uint16
1334 Net uint16
1335 Hv1 TpacketHdrVariant1
1336 _ [8]uint8
1337 }
1338
1339 type TpacketHdrVariant1 struct {
1340 Rxhash uint32
1341 Vlan_tci uint32
1342 Vlan_tpid uint16
1343 _ uint16
1344 }
1345
1346 type TpacketBlockDesc struct {
1347 Version uint32
1348 To_priv uint32
1349 Hdr [40]byte
1350 }
1351
1352 type TpacketReq struct {
1353 Block_size uint32
1354 Block_nr uint32
1355 Frame_size uint32
1356 Frame_nr uint32
1357 }
1358
1359 type TpacketReq3 struct {
1360 Block_size uint32
1361 Block_nr uint32
1362 Frame_size uint32
1363 Frame_nr uint32
1364 Retire_blk_tov uint32
1365 Sizeof_priv uint32
1366 Feature_req_word uint32
1367 }
1368
1369 type TpacketStats struct {
1370 Packets uint32
1371 Drops uint32
1372 }
1373
1374 type TpacketStatsV3 struct {
1375 Packets uint32
1376 Drops uint32
1377 Freeze_q_cnt uint32
1378 }
1379
1380 type TpacketAuxdata struct {
1381 Status uint32
1382 Len uint32
1383 Snaplen uint32
1384 Mac uint16
1385 Net uint16
1386 Vlan_tci uint16
1387 Vlan_tpid uint16
1388 }
1389
1390 const (
1391 TPACKET_V1 = 0x0
1392 TPACKET_V2 = 0x1
1393 TPACKET_V3 = 0x2
1394 )
1395
1396 const (
1397 SizeofTpacketHdr = 0x20
1398 SizeofTpacket2Hdr = 0x20
1399 SizeofTpacket3Hdr = 0x30
1400 )
1401
1402 const (
1403 NF_INET_PRE_ROUTING = 0x0
1404 NF_INET_LOCAL_IN = 0x1
1405 NF_INET_FORWARD = 0x2
1406 NF_INET_LOCAL_OUT = 0x3
1407 NF_INET_POST_ROUTING = 0x4
1408 NF_INET_NUMHOOKS = 0x5
1409 )
1410
1411 const (
1412 NF_NETDEV_INGRESS = 0x0
1413 NF_NETDEV_NUMHOOKS = 0x1
1414 )
1415
1416 const (
1417 NFPROTO_UNSPEC = 0x0
1418 NFPROTO_INET = 0x1
1419 NFPROTO_IPV4 = 0x2
1420 NFPROTO_ARP = 0x3
1421 NFPROTO_NETDEV = 0x5
1422 NFPROTO_BRIDGE = 0x7
1423 NFPROTO_IPV6 = 0xa
1424 NFPROTO_DECNET = 0xc
1425 NFPROTO_NUMPROTO = 0xd
1426 )
1427
1428 type Nfgenmsg struct {
1429 Nfgen_family uint8
1430 Version uint8
1431 Res_id uint16
1432 }
1433
1434 const (
1435 NFNL_BATCH_UNSPEC = 0x0
1436 NFNL_BATCH_GENID = 0x1
1437 )
1438
1439 const (
1440 NFT_REG_VERDICT = 0x0
1441 NFT_REG_1 = 0x1
1442 NFT_REG_2 = 0x2
1443 NFT_REG_3 = 0x3
1444 NFT_REG_4 = 0x4
1445 NFT_REG32_00 = 0x8
1446 NFT_REG32_01 = 0x9
1447 NFT_REG32_02 = 0xa
1448 NFT_REG32_03 = 0xb
1449 NFT_REG32_04 = 0xc
1450 NFT_REG32_05 = 0xd
1451 NFT_REG32_06 = 0xe
1452 NFT_REG32_07 = 0xf
1453 NFT_REG32_08 = 0x10
1454 NFT_REG32_09 = 0x11
1455 NFT_REG32_10 = 0x12
1456 NFT_REG32_11 = 0x13
1457 NFT_REG32_12 = 0x14
1458 NFT_REG32_13 = 0x15
1459 NFT_REG32_14 = 0x16
1460 NFT_REG32_15 = 0x17
1461 NFT_CONTINUE = -0x1
1462 NFT_BREAK = -0x2
1463 NFT_JUMP = -0x3
1464 NFT_GOTO = -0x4
1465 NFT_RETURN = -0x5
1466 NFT_MSG_NEWTABLE = 0x0
1467 NFT_MSG_GETTABLE = 0x1
1468 NFT_MSG_DELTABLE = 0x2
1469 NFT_MSG_NEWCHAIN = 0x3
1470 NFT_MSG_GETCHAIN = 0x4
1471 NFT_MSG_DELCHAIN = 0x5
1472 NFT_MSG_NEWRULE = 0x6
1473 NFT_MSG_GETRULE = 0x7
1474 NFT_MSG_DELRULE = 0x8
1475 NFT_MSG_NEWSET = 0x9
1476 NFT_MSG_GETSET = 0xa
1477 NFT_MSG_DELSET = 0xb
1478 NFT_MSG_NEWSETELEM = 0xc
1479 NFT_MSG_GETSETELEM = 0xd
1480 NFT_MSG_DELSETELEM = 0xe
1481 NFT_MSG_NEWGEN = 0xf
1482 NFT_MSG_GETGEN = 0x10
1483 NFT_MSG_TRACE = 0x11
1484 NFT_MSG_NEWOBJ = 0x12
1485 NFT_MSG_GETOBJ = 0x13
1486 NFT_MSG_DELOBJ = 0x14
1487 NFT_MSG_GETOBJ_RESET = 0x15
1488 NFT_MSG_MAX = 0x19
1489 NFTA_LIST_UNPEC = 0x0
1490 NFTA_LIST_ELEM = 0x1
1491 NFTA_HOOK_UNSPEC = 0x0
1492 NFTA_HOOK_HOOKNUM = 0x1
1493 NFTA_HOOK_PRIORITY = 0x2
1494 NFTA_HOOK_DEV = 0x3
1495 NFT_TABLE_F_DORMANT = 0x1
1496 NFTA_TABLE_UNSPEC = 0x0
1497 NFTA_TABLE_NAME = 0x1
1498 NFTA_TABLE_FLAGS = 0x2
1499 NFTA_TABLE_USE = 0x3
1500 NFTA_CHAIN_UNSPEC = 0x0
1501 NFTA_CHAIN_TABLE = 0x1
1502 NFTA_CHAIN_HANDLE = 0x2
1503 NFTA_CHAIN_NAME = 0x3
1504 NFTA_CHAIN_HOOK = 0x4
1505 NFTA_CHAIN_POLICY = 0x5
1506 NFTA_CHAIN_USE = 0x6
1507 NFTA_CHAIN_TYPE = 0x7
1508 NFTA_CHAIN_COUNTERS = 0x8
1509 NFTA_CHAIN_PAD = 0x9
1510 NFTA_RULE_UNSPEC = 0x0
1511 NFTA_RULE_TABLE = 0x1
1512 NFTA_RULE_CHAIN = 0x2
1513 NFTA_RULE_HANDLE = 0x3
1514 NFTA_RULE_EXPRESSIONS = 0x4
1515 NFTA_RULE_COMPAT = 0x5
1516 NFTA_RULE_POSITION = 0x6
1517 NFTA_RULE_USERDATA = 0x7
1518 NFTA_RULE_PAD = 0x8
1519 NFTA_RULE_ID = 0x9
1520 NFT_RULE_COMPAT_F_INV = 0x2
1521 NFT_RULE_COMPAT_F_MASK = 0x2
1522 NFTA_RULE_COMPAT_UNSPEC = 0x0
1523 NFTA_RULE_COMPAT_PROTO = 0x1
1524 NFTA_RULE_COMPAT_FLAGS = 0x2
1525 NFT_SET_ANONYMOUS = 0x1
1526 NFT_SET_CONSTANT = 0x2
1527 NFT_SET_INTERVAL = 0x4
1528 NFT_SET_MAP = 0x8
1529 NFT_SET_TIMEOUT = 0x10
1530 NFT_SET_EVAL = 0x20
1531 NFT_SET_OBJECT = 0x40
1532 NFT_SET_POL_PERFORMANCE = 0x0
1533 NFT_SET_POL_MEMORY = 0x1
1534 NFTA_SET_DESC_UNSPEC = 0x0
1535 NFTA_SET_DESC_SIZE = 0x1
1536 NFTA_SET_UNSPEC = 0x0
1537 NFTA_SET_TABLE = 0x1
1538 NFTA_SET_NAME = 0x2
1539 NFTA_SET_FLAGS = 0x3
1540 NFTA_SET_KEY_TYPE = 0x4
1541 NFTA_SET_KEY_LEN = 0x5
1542 NFTA_SET_DATA_TYPE = 0x6
1543 NFTA_SET_DATA_LEN = 0x7
1544 NFTA_SET_POLICY = 0x8
1545 NFTA_SET_DESC = 0x9
1546 NFTA_SET_ID = 0xa
1547 NFTA_SET_TIMEOUT = 0xb
1548 NFTA_SET_GC_INTERVAL = 0xc
1549 NFTA_SET_USERDATA = 0xd
1550 NFTA_SET_PAD = 0xe
1551 NFTA_SET_OBJ_TYPE = 0xf
1552 NFT_SET_ELEM_INTERVAL_END = 0x1
1553 NFTA_SET_ELEM_UNSPEC = 0x0
1554 NFTA_SET_ELEM_KEY = 0x1
1555 NFTA_SET_ELEM_DATA = 0x2
1556 NFTA_SET_ELEM_FLAGS = 0x3
1557 NFTA_SET_ELEM_TIMEOUT = 0x4
1558 NFTA_SET_ELEM_EXPIRATION = 0x5
1559 NFTA_SET_ELEM_USERDATA = 0x6
1560 NFTA_SET_ELEM_EXPR = 0x7
1561 NFTA_SET_ELEM_PAD = 0x8
1562 NFTA_SET_ELEM_OBJREF = 0x9
1563 NFTA_SET_ELEM_LIST_UNSPEC = 0x0
1564 NFTA_SET_ELEM_LIST_TABLE = 0x1
1565 NFTA_SET_ELEM_LIST_SET = 0x2
1566 NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
1567 NFTA_SET_ELEM_LIST_SET_ID = 0x4
1568 NFT_DATA_VALUE = 0x0
1569 NFT_DATA_VERDICT = 0xffffff00
1570 NFTA_DATA_UNSPEC = 0x0
1571 NFTA_DATA_VALUE = 0x1
1572 NFTA_DATA_VERDICT = 0x2
1573 NFTA_VERDICT_UNSPEC = 0x0
1574 NFTA_VERDICT_CODE = 0x1
1575 NFTA_VERDICT_CHAIN = 0x2
1576 NFTA_EXPR_UNSPEC = 0x0
1577 NFTA_EXPR_NAME = 0x1
1578 NFTA_EXPR_DATA = 0x2
1579 NFTA_IMMEDIATE_UNSPEC = 0x0
1580 NFTA_IMMEDIATE_DREG = 0x1
1581 NFTA_IMMEDIATE_DATA = 0x2
1582 NFTA_BITWISE_UNSPEC = 0x0
1583 NFTA_BITWISE_SREG = 0x1
1584 NFTA_BITWISE_DREG = 0x2
1585 NFTA_BITWISE_LEN = 0x3
1586 NFTA_BITWISE_MASK = 0x4
1587 NFTA_BITWISE_XOR = 0x5
1588 NFT_BYTEORDER_NTOH = 0x0
1589 NFT_BYTEORDER_HTON = 0x1
1590 NFTA_BYTEORDER_UNSPEC = 0x0
1591 NFTA_BYTEORDER_SREG = 0x1
1592 NFTA_BYTEORDER_DREG = 0x2
1593 NFTA_BYTEORDER_OP = 0x3
1594 NFTA_BYTEORDER_LEN = 0x4
1595 NFTA_BYTEORDER_SIZE = 0x5
1596 NFT_CMP_EQ = 0x0
1597 NFT_CMP_NEQ = 0x1
1598 NFT_CMP_LT = 0x2
1599 NFT_CMP_LTE = 0x3
1600 NFT_CMP_GT = 0x4
1601 NFT_CMP_GTE = 0x5
1602 NFTA_CMP_UNSPEC = 0x0
1603 NFTA_CMP_SREG = 0x1
1604 NFTA_CMP_OP = 0x2
1605 NFTA_CMP_DATA = 0x3
1606 NFT_RANGE_EQ = 0x0
1607 NFT_RANGE_NEQ = 0x1
1608 NFTA_RANGE_UNSPEC = 0x0
1609 NFTA_RANGE_SREG = 0x1
1610 NFTA_RANGE_OP = 0x2
1611 NFTA_RANGE_FROM_DATA = 0x3
1612 NFTA_RANGE_TO_DATA = 0x4
1613 NFT_LOOKUP_F_INV = 0x1
1614 NFTA_LOOKUP_UNSPEC = 0x0
1615 NFTA_LOOKUP_SET = 0x1
1616 NFTA_LOOKUP_SREG = 0x2
1617 NFTA_LOOKUP_DREG = 0x3
1618 NFTA_LOOKUP_SET_ID = 0x4
1619 NFTA_LOOKUP_FLAGS = 0x5
1620 NFT_DYNSET_OP_ADD = 0x0
1621 NFT_DYNSET_OP_UPDATE = 0x1
1622 NFT_DYNSET_F_INV = 0x1
1623 NFTA_DYNSET_UNSPEC = 0x0
1624 NFTA_DYNSET_SET_NAME = 0x1
1625 NFTA_DYNSET_SET_ID = 0x2
1626 NFTA_DYNSET_OP = 0x3
1627 NFTA_DYNSET_SREG_KEY = 0x4
1628 NFTA_DYNSET_SREG_DATA = 0x5
1629 NFTA_DYNSET_TIMEOUT = 0x6
1630 NFTA_DYNSET_EXPR = 0x7
1631 NFTA_DYNSET_PAD = 0x8
1632 NFTA_DYNSET_FLAGS = 0x9
1633 NFT_PAYLOAD_LL_HEADER = 0x0
1634 NFT_PAYLOAD_NETWORK_HEADER = 0x1
1635 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
1636 NFT_PAYLOAD_CSUM_NONE = 0x0
1637 NFT_PAYLOAD_CSUM_INET = 0x1
1638 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
1639 NFTA_PAYLOAD_UNSPEC = 0x0
1640 NFTA_PAYLOAD_DREG = 0x1
1641 NFTA_PAYLOAD_BASE = 0x2
1642 NFTA_PAYLOAD_OFFSET = 0x3
1643 NFTA_PAYLOAD_LEN = 0x4
1644 NFTA_PAYLOAD_SREG = 0x5
1645 NFTA_PAYLOAD_CSUM_TYPE = 0x6
1646 NFTA_PAYLOAD_CSUM_OFFSET = 0x7
1647 NFTA_PAYLOAD_CSUM_FLAGS = 0x8
1648 NFT_EXTHDR_F_PRESENT = 0x1
1649 NFT_EXTHDR_OP_IPV6 = 0x0
1650 NFT_EXTHDR_OP_TCPOPT = 0x1
1651 NFTA_EXTHDR_UNSPEC = 0x0
1652 NFTA_EXTHDR_DREG = 0x1
1653 NFTA_EXTHDR_TYPE = 0x2
1654 NFTA_EXTHDR_OFFSET = 0x3
1655 NFTA_EXTHDR_LEN = 0x4
1656 NFTA_EXTHDR_FLAGS = 0x5
1657 NFTA_EXTHDR_OP = 0x6
1658 NFTA_EXTHDR_SREG = 0x7
1659 NFT_META_LEN = 0x0
1660 NFT_META_PROTOCOL = 0x1
1661 NFT_META_PRIORITY = 0x2
1662 NFT_META_MARK = 0x3
1663 NFT_META_IIF = 0x4
1664 NFT_META_OIF = 0x5
1665 NFT_META_IIFNAME = 0x6
1666 NFT_META_OIFNAME = 0x7
1667 NFT_META_IIFTYPE = 0x8
1668 NFT_META_OIFTYPE = 0x9
1669 NFT_META_SKUID = 0xa
1670 NFT_META_SKGID = 0xb
1671 NFT_META_NFTRACE = 0xc
1672 NFT_META_RTCLASSID = 0xd
1673 NFT_META_SECMARK = 0xe
1674 NFT_META_NFPROTO = 0xf
1675 NFT_META_L4PROTO = 0x10
1676 NFT_META_BRI_IIFNAME = 0x11
1677 NFT_META_BRI_OIFNAME = 0x12
1678 NFT_META_PKTTYPE = 0x13
1679 NFT_META_CPU = 0x14
1680 NFT_META_IIFGROUP = 0x15
1681 NFT_META_OIFGROUP = 0x16
1682 NFT_META_CGROUP = 0x17
1683 NFT_META_PRANDOM = 0x18
1684 NFT_RT_CLASSID = 0x0
1685 NFT_RT_NEXTHOP4 = 0x1
1686 NFT_RT_NEXTHOP6 = 0x2
1687 NFT_RT_TCPMSS = 0x3
1688 NFT_HASH_JENKINS = 0x0
1689 NFT_HASH_SYM = 0x1
1690 NFTA_HASH_UNSPEC = 0x0
1691 NFTA_HASH_SREG = 0x1
1692 NFTA_HASH_DREG = 0x2
1693 NFTA_HASH_LEN = 0x3
1694 NFTA_HASH_MODULUS = 0x4
1695 NFTA_HASH_SEED = 0x5
1696 NFTA_HASH_OFFSET = 0x6
1697 NFTA_HASH_TYPE = 0x7
1698 NFTA_META_UNSPEC = 0x0
1699 NFTA_META_DREG = 0x1
1700 NFTA_META_KEY = 0x2
1701 NFTA_META_SREG = 0x3
1702 NFTA_RT_UNSPEC = 0x0
1703 NFTA_RT_DREG = 0x1
1704 NFTA_RT_KEY = 0x2
1705 NFT_CT_STATE = 0x0
1706 NFT_CT_DIRECTION = 0x1
1707 NFT_CT_STATUS = 0x2
1708 NFT_CT_MARK = 0x3
1709 NFT_CT_SECMARK = 0x4
1710 NFT_CT_EXPIRATION = 0x5
1711 NFT_CT_HELPER = 0x6
1712 NFT_CT_L3PROTOCOL = 0x7
1713 NFT_CT_SRC = 0x8
1714 NFT_CT_DST = 0x9
1715 NFT_CT_PROTOCOL = 0xa
1716 NFT_CT_PROTO_SRC = 0xb
1717 NFT_CT_PROTO_DST = 0xc
1718 NFT_CT_LABELS = 0xd
1719 NFT_CT_PKTS = 0xe
1720 NFT_CT_BYTES = 0xf
1721 NFT_CT_AVGPKT = 0x10
1722 NFT_CT_ZONE = 0x11
1723 NFT_CT_EVENTMASK = 0x12
1724 NFTA_CT_UNSPEC = 0x0
1725 NFTA_CT_DREG = 0x1
1726 NFTA_CT_KEY = 0x2
1727 NFTA_CT_DIRECTION = 0x3
1728 NFTA_CT_SREG = 0x4
1729 NFT_LIMIT_PKTS = 0x0
1730 NFT_LIMIT_PKT_BYTES = 0x1
1731 NFT_LIMIT_F_INV = 0x1
1732 NFTA_LIMIT_UNSPEC = 0x0
1733 NFTA_LIMIT_RATE = 0x1
1734 NFTA_LIMIT_UNIT = 0x2
1735 NFTA_LIMIT_BURST = 0x3
1736 NFTA_LIMIT_TYPE = 0x4
1737 NFTA_LIMIT_FLAGS = 0x5
1738 NFTA_LIMIT_PAD = 0x6
1739 NFTA_COUNTER_UNSPEC = 0x0
1740 NFTA_COUNTER_BYTES = 0x1
1741 NFTA_COUNTER_PACKETS = 0x2
1742 NFTA_COUNTER_PAD = 0x3
1743 NFTA_LOG_UNSPEC = 0x0
1744 NFTA_LOG_GROUP = 0x1
1745 NFTA_LOG_PREFIX = 0x2
1746 NFTA_LOG_SNAPLEN = 0x3
1747 NFTA_LOG_QTHRESHOLD = 0x4
1748 NFTA_LOG_LEVEL = 0x5
1749 NFTA_LOG_FLAGS = 0x6
1750 NFTA_QUEUE_UNSPEC = 0x0
1751 NFTA_QUEUE_NUM = 0x1
1752 NFTA_QUEUE_TOTAL = 0x2
1753 NFTA_QUEUE_FLAGS = 0x3
1754 NFTA_QUEUE_SREG_QNUM = 0x4
1755 NFT_QUOTA_F_INV = 0x1
1756 NFT_QUOTA_F_DEPLETED = 0x2
1757 NFTA_QUOTA_UNSPEC = 0x0
1758 NFTA_QUOTA_BYTES = 0x1
1759 NFTA_QUOTA_FLAGS = 0x2
1760 NFTA_QUOTA_PAD = 0x3
1761 NFTA_QUOTA_CONSUMED = 0x4
1762 NFT_REJECT_ICMP_UNREACH = 0x0
1763 NFT_REJECT_TCP_RST = 0x1
1764 NFT_REJECT_ICMPX_UNREACH = 0x2
1765 NFT_REJECT_ICMPX_NO_ROUTE = 0x0
1766 NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
1767 NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
1768 NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
1769 NFTA_REJECT_UNSPEC = 0x0
1770 NFTA_REJECT_TYPE = 0x1
1771 NFTA_REJECT_ICMP_CODE = 0x2
1772 NFT_NAT_SNAT = 0x0
1773 NFT_NAT_DNAT = 0x1
1774 NFTA_NAT_UNSPEC = 0x0
1775 NFTA_NAT_TYPE = 0x1
1776 NFTA_NAT_FAMILY = 0x2
1777 NFTA_NAT_REG_ADDR_MIN = 0x3
1778 NFTA_NAT_REG_ADDR_MAX = 0x4
1779 NFTA_NAT_REG_PROTO_MIN = 0x5
1780 NFTA_NAT_REG_PROTO_MAX = 0x6
1781 NFTA_NAT_FLAGS = 0x7
1782 NFTA_MASQ_UNSPEC = 0x0
1783 NFTA_MASQ_FLAGS = 0x1
1784 NFTA_MASQ_REG_PROTO_MIN = 0x2
1785 NFTA_MASQ_REG_PROTO_MAX = 0x3
1786 NFTA_REDIR_UNSPEC = 0x0
1787 NFTA_REDIR_REG_PROTO_MIN = 0x1
1788 NFTA_REDIR_REG_PROTO_MAX = 0x2
1789 NFTA_REDIR_FLAGS = 0x3
1790 NFTA_DUP_UNSPEC = 0x0
1791 NFTA_DUP_SREG_ADDR = 0x1
1792 NFTA_DUP_SREG_DEV = 0x2
1793 NFTA_FWD_UNSPEC = 0x0
1794 NFTA_FWD_SREG_DEV = 0x1
1795 NFTA_OBJREF_UNSPEC = 0x0
1796 NFTA_OBJREF_IMM_TYPE = 0x1
1797 NFTA_OBJREF_IMM_NAME = 0x2
1798 NFTA_OBJREF_SET_SREG = 0x3
1799 NFTA_OBJREF_SET_NAME = 0x4
1800 NFTA_OBJREF_SET_ID = 0x5
1801 NFTA_GEN_UNSPEC = 0x0
1802 NFTA_GEN_ID = 0x1
1803 NFTA_GEN_PROC_PID = 0x2
1804 NFTA_GEN_PROC_NAME = 0x3
1805 NFTA_FIB_UNSPEC = 0x0
1806 NFTA_FIB_DREG = 0x1
1807 NFTA_FIB_RESULT = 0x2
1808 NFTA_FIB_FLAGS = 0x3
1809 NFT_FIB_RESULT_UNSPEC = 0x0
1810 NFT_FIB_RESULT_OIF = 0x1
1811 NFT_FIB_RESULT_OIFNAME = 0x2
1812 NFT_FIB_RESULT_ADDRTYPE = 0x3
1813 NFTA_FIB_F_SADDR = 0x1
1814 NFTA_FIB_F_DADDR = 0x2
1815 NFTA_FIB_F_MARK = 0x4
1816 NFTA_FIB_F_IIF = 0x8
1817 NFTA_FIB_F_OIF = 0x10
1818 NFTA_FIB_F_PRESENT = 0x20
1819 NFTA_CT_HELPER_UNSPEC = 0x0
1820 NFTA_CT_HELPER_NAME = 0x1
1821 NFTA_CT_HELPER_L3PROTO = 0x2
1822 NFTA_CT_HELPER_L4PROTO = 0x3
1823 NFTA_OBJ_UNSPEC = 0x0
1824 NFTA_OBJ_TABLE = 0x1
1825 NFTA_OBJ_NAME = 0x2
1826 NFTA_OBJ_TYPE = 0x3
1827 NFTA_OBJ_DATA = 0x4
1828 NFTA_OBJ_USE = 0x5
1829 NFTA_TRACE_UNSPEC = 0x0
1830 NFTA_TRACE_TABLE = 0x1
1831 NFTA_TRACE_CHAIN = 0x2
1832 NFTA_TRACE_RULE_HANDLE = 0x3
1833 NFTA_TRACE_TYPE = 0x4
1834 NFTA_TRACE_VERDICT = 0x5
1835 NFTA_TRACE_ID = 0x6
1836 NFTA_TRACE_LL_HEADER = 0x7
1837 NFTA_TRACE_NETWORK_HEADER = 0x8
1838 NFTA_TRACE_TRANSPORT_HEADER = 0x9
1839 NFTA_TRACE_IIF = 0xa
1840 NFTA_TRACE_IIFTYPE = 0xb
1841 NFTA_TRACE_OIF = 0xc
1842 NFTA_TRACE_OIFTYPE = 0xd
1843 NFTA_TRACE_MARK = 0xe
1844 NFTA_TRACE_NFPROTO = 0xf
1845 NFTA_TRACE_POLICY = 0x10
1846 NFTA_TRACE_PAD = 0x11
1847 NFT_TRACETYPE_UNSPEC = 0x0
1848 NFT_TRACETYPE_POLICY = 0x1
1849 NFT_TRACETYPE_RETURN = 0x2
1850 NFT_TRACETYPE_RULE = 0x3
1851 NFTA_NG_UNSPEC = 0x0
1852 NFTA_NG_DREG = 0x1
1853 NFTA_NG_MODULUS = 0x2
1854 NFTA_NG_TYPE = 0x3
1855 NFTA_NG_OFFSET = 0x4
1856 NFT_NG_INCREMENTAL = 0x0
1857 NFT_NG_RANDOM = 0x1
1858 )
1859
1860 type RTCTime struct {
1861 Sec int32
1862 Min int32
1863 Hour int32
1864 Mday int32
1865 Mon int32
1866 Year int32
1867 Wday int32
1868 Yday int32
1869 Isdst int32
1870 }
1871
1872 type RTCWkAlrm struct {
1873 Enabled uint8
1874 Pending uint8
1875 Time RTCTime
1876 }
1877
1878 type RTCPLLInfo struct {
1879 Ctrl int32
1880 Value int32
1881 Max int32
1882 Min int32
1883 Posmult int32
1884 Negmult int32
1885 Clock int64
1886 }
1887
1888 type BlkpgIoctlArg struct {
1889 Op int32
1890 Flags int32
1891 Datalen int32
1892 Data *byte
1893 }
1894
1895 type BlkpgPartition struct {
1896 Start int64
1897 Length int64
1898 Pno int32
1899 Devname [64]uint8
1900 Volname [64]uint8
1901 _ [4]byte
1902 }
1903
1904 const (
1905 BLKPG = 0x1269
1906 BLKPG_ADD_PARTITION = 0x1
1907 BLKPG_DEL_PARTITION = 0x2
1908 BLKPG_RESIZE_PARTITION = 0x3
1909 )
1910
1911 const (
1912 NETNSA_NONE = 0x0
1913 NETNSA_NSID = 0x1
1914 NETNSA_PID = 0x2
1915 NETNSA_FD = 0x3
1916 )
1917
1918 type XDPRingOffset struct {
1919 Producer uint64
1920 Consumer uint64
1921 Desc uint64
1922 }
1923
1924 type XDPMmapOffsets struct {
1925 Rx XDPRingOffset
1926 Tx XDPRingOffset
1927 Fr XDPRingOffset
1928 Cr XDPRingOffset
1929 }
1930
1931 type XDPUmemReg struct {
1932 Addr uint64
1933 Len uint64
1934 Size uint32
1935 Headroom uint32
1936 }
1937
1938 type XDPStatistics struct {
1939 Rx_dropped uint64
1940 Rx_invalid_descs uint64
1941 Tx_invalid_descs uint64
1942 }
1943
1944 type XDPDesc struct {
1945 Addr uint64
1946 Len uint32
1947 Options uint32
1948 }
1949
1950 const (
1951 NCSI_CMD_UNSPEC = 0x0
1952 NCSI_CMD_PKG_INFO = 0x1
1953 NCSI_CMD_SET_INTERFACE = 0x2
1954 NCSI_CMD_CLEAR_INTERFACE = 0x3
1955 NCSI_ATTR_UNSPEC = 0x0
1956 NCSI_ATTR_IFINDEX = 0x1
1957 NCSI_ATTR_PACKAGE_LIST = 0x2
1958 NCSI_ATTR_PACKAGE_ID = 0x3
1959 NCSI_ATTR_CHANNEL_ID = 0x4
1960 NCSI_PKG_ATTR_UNSPEC = 0x0
1961 NCSI_PKG_ATTR = 0x1
1962 NCSI_PKG_ATTR_ID = 0x2
1963 NCSI_PKG_ATTR_FORCED = 0x3
1964 NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
1965 NCSI_CHANNEL_ATTR_UNSPEC = 0x0
1966 NCSI_CHANNEL_ATTR = 0x1
1967 NCSI_CHANNEL_ATTR_ID = 0x2
1968 NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
1969 NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
1970 NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
1971 NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
1972 NCSI_CHANNEL_ATTR_ACTIVE = 0x7
1973 NCSI_CHANNEL_ATTR_FORCED = 0x8
1974 NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
1975 NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
1976 )
1977
1978 const (
1979 SOF_TIMESTAMPING_TX_HARDWARE = 0x1
1980 SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
1981 SOF_TIMESTAMPING_RX_HARDWARE = 0x4
1982 SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
1983 SOF_TIMESTAMPING_SOFTWARE = 0x10
1984 SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
1985 SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
1986 SOF_TIMESTAMPING_OPT_ID = 0x80
1987 SOF_TIMESTAMPING_TX_SCHED = 0x100
1988 SOF_TIMESTAMPING_TX_ACK = 0x200
1989 SOF_TIMESTAMPING_OPT_CMSG = 0x400
1990 SOF_TIMESTAMPING_OPT_TSONLY = 0x800
1991 SOF_TIMESTAMPING_OPT_STATS = 0x1000
1992 SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
1993 SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
1994
1995 SOF_TIMESTAMPING_LAST = 0x4000
1996 SOF_TIMESTAMPING_MASK = 0x7fff
1997 )
55 package unix
66
77 const (
8 sizeofPtr = 0x4
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x4
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x4
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x4
12 SizeofLongLong = 0x8
1313 PathMax = 0x1000
1414 )
1515
5151 Errcnt int32
5252 Stbcnt int32
5353 Tai int32
54 Pad_cgo_0 [44]byte
54 _ [44]byte
5555 }
5656
5757 type Time_t int32
114114 Pad5 [14]int32
115115 }
116116
117 type Statfs_t struct {
118 Type int32
119 Bsize int32
120 Frsize int32
121 Pad_cgo_0 [4]byte
122 Blocks uint64
123 Bfree uint64
124 Files uint64
125 Ffree uint64
126 Bavail uint64
127 Fsid Fsid
128 Namelen int32
129 Flags int32
130 Spare [5]int32
131 Pad_cgo_1 [4]byte
117 type StatxTimestamp struct {
118 Sec int64
119 Nsec uint32
120 _ int32
121 }
122
123 type Statx_t struct {
124 Mask uint32
125 Blksize uint32
126 Attributes uint64
127 Nlink uint32
128 Uid uint32
129 Gid uint32
130 Mode uint16
131 _ [1]uint16
132 Ino uint64
133 Size uint64
134 Blocks uint64
135 Attributes_mask uint64
136 Atime StatxTimestamp
137 Btime StatxTimestamp
138 Ctime StatxTimestamp
139 Mtime StatxTimestamp
140 Rdev_major uint32
141 Rdev_minor uint32
142 Dev_major uint32
143 Dev_minor uint32
144 _ [14]uint64
132145 }
133146
134147 type Dirent struct {
135 Ino uint64
136 Off int64
137 Reclen uint16
138 Type uint8
139 Name [256]int8
140 Pad_cgo_0 [5]byte
148 Ino uint64
149 Off int64
150 Reclen uint16
151 Type uint8
152 Name [256]int8
153 _ [5]byte
141154 }
142155
143156 type Fsid struct {
144 X__val [2]int32
157 Val [2]int32
145158 }
146159
147160 type Flock_t struct {
148 Type int16
149 Whence int16
150 Pad_cgo_0 [4]byte
151 Start int64
152 Len int64
153 Pid int32
154 Pad_cgo_1 [4]byte
161 Type int16
162 Whence int16
163 _ [4]byte
164 Start int64
165 Len int64
166 Pid int32
167 _ [4]byte
155168 }
156169
157170 type FscryptPolicy struct {
226239 Channel uint16
227240 }
228241
242 type RawSockaddrL2 struct {
243 Family uint16
244 Psm uint16
245 Bdaddr [6]uint8
246 Cid uint16
247 Bdaddr_type uint8
248 _ [1]byte
249 }
250
251 type RawSockaddrRFCOMM struct {
252 Family uint16
253 Bdaddr [6]uint8
254 Channel uint8
255 _ [1]byte
256 }
257
229258 type RawSockaddrCAN struct {
230 Family uint16
231 Pad_cgo_0 [2]byte
232 Ifindex int32
233 Addr [8]byte
259 Family uint16
260 Ifindex int32
261 Addr [8]byte
234262 }
235263
236264 type RawSockaddrALG struct {
248276 Cid uint32
249277 Zero [4]uint8
250278 }
279
280 type RawSockaddrXDP struct {
281 Family uint16
282 Flags uint16
283 Ifindex uint32
284 Queue_id uint32
285 Shared_umem_fd uint32
286 }
287
288 type RawSockaddrPPPoX [0x1e]byte
251289
252290 type RawSockaddr struct {
253291 Family uint16
343381 Probes uint8
344382 Backoff uint8
345383 Options uint8
346 Pad_cgo_0 [2]byte
347384 Rto uint32
348385 Ato uint32
349386 Snd_mss uint32
378415 SizeofSockaddrLinklayer = 0x14
379416 SizeofSockaddrNetlink = 0xc
380417 SizeofSockaddrHCI = 0x6
418 SizeofSockaddrL2 = 0xe
419 SizeofSockaddrRFCOMM = 0xa
381420 SizeofSockaddrCAN = 0x10
382421 SizeofSockaddrALG = 0x58
383422 SizeofSockaddrVM = 0x10
423 SizeofSockaddrXDP = 0x10
424 SizeofSockaddrPPPoX = 0x1e
384425 SizeofLinger = 0x8
385426 SizeofIovec = 0x8
386427 SizeofIPMreq = 0x8
398439 )
399440
400441 const (
401 IFA_UNSPEC = 0x0
402 IFA_ADDRESS = 0x1
403 IFA_LOCAL = 0x2
404 IFA_LABEL = 0x3
405 IFA_BROADCAST = 0x4
406 IFA_ANYCAST = 0x5
407 IFA_CACHEINFO = 0x6
408 IFA_MULTICAST = 0x7
409 IFLA_UNSPEC = 0x0
410 IFLA_ADDRESS = 0x1
411 IFLA_BROADCAST = 0x2
412 IFLA_IFNAME = 0x3
413 IFLA_MTU = 0x4
414 IFLA_LINK = 0x5
415 IFLA_QDISC = 0x6
416 IFLA_STATS = 0x7
417 IFLA_COST = 0x8
418 IFLA_PRIORITY = 0x9
419 IFLA_MASTER = 0xa
420 IFLA_WIRELESS = 0xb
421 IFLA_PROTINFO = 0xc
422 IFLA_TXQLEN = 0xd
423 IFLA_MAP = 0xe
424 IFLA_WEIGHT = 0xf
425 IFLA_OPERSTATE = 0x10
426 IFLA_LINKMODE = 0x11
427 IFLA_LINKINFO = 0x12
428 IFLA_NET_NS_PID = 0x13
429 IFLA_IFALIAS = 0x14
430 IFLA_MAX = 0x2c
431 RT_SCOPE_UNIVERSE = 0x0
432 RT_SCOPE_SITE = 0xc8
433 RT_SCOPE_LINK = 0xfd
434 RT_SCOPE_HOST = 0xfe
435 RT_SCOPE_NOWHERE = 0xff
436 RT_TABLE_UNSPEC = 0x0
437 RT_TABLE_COMPAT = 0xfc
438 RT_TABLE_DEFAULT = 0xfd
439 RT_TABLE_MAIN = 0xfe
440 RT_TABLE_LOCAL = 0xff
441 RT_TABLE_MAX = 0xffffffff
442 RTA_UNSPEC = 0x0
443 RTA_DST = 0x1
444 RTA_SRC = 0x2
445 RTA_IIF = 0x3
446 RTA_OIF = 0x4
447 RTA_GATEWAY = 0x5
448 RTA_PRIORITY = 0x6
449 RTA_PREFSRC = 0x7
450 RTA_METRICS = 0x8
451 RTA_MULTIPATH = 0x9
452 RTA_FLOW = 0xb
453 RTA_CACHEINFO = 0xc
454 RTA_TABLE = 0xf
455 RTN_UNSPEC = 0x0
456 RTN_UNICAST = 0x1
457 RTN_LOCAL = 0x2
458 RTN_BROADCAST = 0x3
459 RTN_ANYCAST = 0x4
460 RTN_MULTICAST = 0x5
461 RTN_BLACKHOLE = 0x6
462 RTN_UNREACHABLE = 0x7
463 RTN_PROHIBIT = 0x8
464 RTN_THROW = 0x9
465 RTN_NAT = 0xa
466 RTN_XRESOLVE = 0xb
467 RTNLGRP_NONE = 0x0
468 RTNLGRP_LINK = 0x1
469 RTNLGRP_NOTIFY = 0x2
470 RTNLGRP_NEIGH = 0x3
471 RTNLGRP_TC = 0x4
472 RTNLGRP_IPV4_IFADDR = 0x5
473 RTNLGRP_IPV4_MROUTE = 0x6
474 RTNLGRP_IPV4_ROUTE = 0x7
475 RTNLGRP_IPV4_RULE = 0x8
476 RTNLGRP_IPV6_IFADDR = 0x9
477 RTNLGRP_IPV6_MROUTE = 0xa
478 RTNLGRP_IPV6_ROUTE = 0xb
479 RTNLGRP_IPV6_IFINFO = 0xc
480 RTNLGRP_IPV6_PREFIX = 0x12
481 RTNLGRP_IPV6_RULE = 0x13
482 RTNLGRP_ND_USEROPT = 0x14
483 SizeofNlMsghdr = 0x10
484 SizeofNlMsgerr = 0x14
485 SizeofRtGenmsg = 0x1
486 SizeofNlAttr = 0x4
487 SizeofRtAttr = 0x4
488 SizeofIfInfomsg = 0x10
489 SizeofIfAddrmsg = 0x8
490 SizeofRtMsg = 0xc
491 SizeofRtNexthop = 0x8
442 IFA_UNSPEC = 0x0
443 IFA_ADDRESS = 0x1
444 IFA_LOCAL = 0x2
445 IFA_LABEL = 0x3
446 IFA_BROADCAST = 0x4
447 IFA_ANYCAST = 0x5
448 IFA_CACHEINFO = 0x6
449 IFA_MULTICAST = 0x7
450 IFLA_UNSPEC = 0x0
451 IFLA_ADDRESS = 0x1
452 IFLA_BROADCAST = 0x2
453 IFLA_IFNAME = 0x3
454 IFLA_INFO_KIND = 0x1
455 IFLA_MTU = 0x4
456 IFLA_LINK = 0x5
457 IFLA_QDISC = 0x6
458 IFLA_STATS = 0x7
459 IFLA_COST = 0x8
460 IFLA_PRIORITY = 0x9
461 IFLA_MASTER = 0xa
462 IFLA_WIRELESS = 0xb
463 IFLA_PROTINFO = 0xc
464 IFLA_TXQLEN = 0xd
465 IFLA_MAP = 0xe
466 IFLA_WEIGHT = 0xf
467 IFLA_OPERSTATE = 0x10
468 IFLA_LINKMODE = 0x11
469 IFLA_LINKINFO = 0x12
470 IFLA_NET_NS_PID = 0x13
471 IFLA_IFALIAS = 0x14
472 IFLA_NUM_VF = 0x15
473 IFLA_VFINFO_LIST = 0x16
474 IFLA_STATS64 = 0x17
475 IFLA_VF_PORTS = 0x18
476 IFLA_PORT_SELF = 0x19
477 IFLA_AF_SPEC = 0x1a
478 IFLA_GROUP = 0x1b
479 IFLA_NET_NS_FD = 0x1c
480 IFLA_EXT_MASK = 0x1d
481 IFLA_PROMISCUITY = 0x1e
482 IFLA_NUM_TX_QUEUES = 0x1f
483 IFLA_NUM_RX_QUEUES = 0x20
484 IFLA_CARRIER = 0x21
485 IFLA_PHYS_PORT_ID = 0x22
486 IFLA_CARRIER_CHANGES = 0x23
487 IFLA_PHYS_SWITCH_ID = 0x24
488 IFLA_LINK_NETNSID = 0x25
489 IFLA_PHYS_PORT_NAME = 0x26
490 IFLA_PROTO_DOWN = 0x27
491 IFLA_GSO_MAX_SEGS = 0x28
492 IFLA_GSO_MAX_SIZE = 0x29
493 IFLA_PAD = 0x2a
494 IFLA_XDP = 0x2b
495 IFLA_EVENT = 0x2c
496 IFLA_NEW_NETNSID = 0x2d
497 IFLA_IF_NETNSID = 0x2e
498 IFLA_MAX = 0x33
499 RT_SCOPE_UNIVERSE = 0x0
500 RT_SCOPE_SITE = 0xc8
501 RT_SCOPE_LINK = 0xfd
502 RT_SCOPE_HOST = 0xfe
503 RT_SCOPE_NOWHERE = 0xff
504 RT_TABLE_UNSPEC = 0x0
505 RT_TABLE_COMPAT = 0xfc
506 RT_TABLE_DEFAULT = 0xfd
507 RT_TABLE_MAIN = 0xfe
508 RT_TABLE_LOCAL = 0xff
509 RT_TABLE_MAX = 0xffffffff
510 RTA_UNSPEC = 0x0
511 RTA_DST = 0x1
512 RTA_SRC = 0x2
513 RTA_IIF = 0x3
514 RTA_OIF = 0x4
515 RTA_GATEWAY = 0x5
516 RTA_PRIORITY = 0x6
517 RTA_PREFSRC = 0x7
518 RTA_METRICS = 0x8
519 RTA_MULTIPATH = 0x9
520 RTA_FLOW = 0xb
521 RTA_CACHEINFO = 0xc
522 RTA_TABLE = 0xf
523 RTA_MARK = 0x10
524 RTA_MFC_STATS = 0x11
525 RTA_VIA = 0x12
526 RTA_NEWDST = 0x13
527 RTA_PREF = 0x14
528 RTA_ENCAP_TYPE = 0x15
529 RTA_ENCAP = 0x16
530 RTA_EXPIRES = 0x17
531 RTA_PAD = 0x18
532 RTA_UID = 0x19
533 RTA_TTL_PROPAGATE = 0x1a
534 RTA_IP_PROTO = 0x1b
535 RTA_SPORT = 0x1c
536 RTA_DPORT = 0x1d
537 RTN_UNSPEC = 0x0
538 RTN_UNICAST = 0x1
539 RTN_LOCAL = 0x2
540 RTN_BROADCAST = 0x3
541 RTN_ANYCAST = 0x4
542 RTN_MULTICAST = 0x5
543 RTN_BLACKHOLE = 0x6
544 RTN_UNREACHABLE = 0x7
545 RTN_PROHIBIT = 0x8
546 RTN_THROW = 0x9
547 RTN_NAT = 0xa
548 RTN_XRESOLVE = 0xb
549 RTNLGRP_NONE = 0x0
550 RTNLGRP_LINK = 0x1
551 RTNLGRP_NOTIFY = 0x2
552 RTNLGRP_NEIGH = 0x3
553 RTNLGRP_TC = 0x4
554 RTNLGRP_IPV4_IFADDR = 0x5
555 RTNLGRP_IPV4_MROUTE = 0x6
556 RTNLGRP_IPV4_ROUTE = 0x7
557 RTNLGRP_IPV4_RULE = 0x8
558 RTNLGRP_IPV6_IFADDR = 0x9
559 RTNLGRP_IPV6_MROUTE = 0xa
560 RTNLGRP_IPV6_ROUTE = 0xb
561 RTNLGRP_IPV6_IFINFO = 0xc
562 RTNLGRP_IPV6_PREFIX = 0x12
563 RTNLGRP_IPV6_RULE = 0x13
564 RTNLGRP_ND_USEROPT = 0x14
565 SizeofNlMsghdr = 0x10
566 SizeofNlMsgerr = 0x14
567 SizeofRtGenmsg = 0x1
568 SizeofNlAttr = 0x4
569 SizeofRtAttr = 0x4
570 SizeofIfInfomsg = 0x10
571 SizeofIfAddrmsg = 0x8
572 SizeofRtMsg = 0xc
573 SizeofRtNexthop = 0x8
492574 )
493575
494576 type NlMsghdr struct {
519601 }
520602
521603 type IfInfomsg struct {
522 Family uint8
523 X__ifi_pad uint8
524 Type uint16
525 Index int32
526 Flags uint32
527 Change uint32
604 Family uint8
605 _ uint8
606 Type uint16
607 Index int32
608 Flags uint32
609 Change uint32
528610 }
529611
530612 type IfAddrmsg struct {
567649 }
568650
569651 type SockFprog struct {
570 Len uint16
571 Pad_cgo_0 [2]byte
572 Filter *SockFilter
652 Len uint16
653 Filter *SockFilter
573654 }
574655
575656 type InotifyEvent struct {
609690 Totalhigh uint32
610691 Freehigh uint32
611692 Unit uint32
612 X_f [8]int8
693 _ [8]int8
613694 }
614695
615696 type Utsname struct {
616 Sysname [65]int8
617 Nodename [65]int8
618 Release [65]int8
619 Version [65]int8
620 Machine [65]int8
621 Domainname [65]int8
697 Sysname [65]byte
698 Nodename [65]byte
699 Release [65]byte
700 Version [65]byte
701 Machine [65]byte
702 Domainname [65]byte
622703 }
623704
624705 type Ustat_t struct {
636717 }
637718
638719 const (
639 AT_FDCWD = -0x64
640 AT_REMOVEDIR = 0x200
720 AT_EMPTY_PATH = 0x1000
721 AT_FDCWD = -0x64
722 AT_NO_AUTOMOUNT = 0x800
723 AT_REMOVEDIR = 0x200
724
725 AT_STATX_SYNC_AS_STAT = 0x0
726 AT_STATX_FORCE_SYNC = 0x2000
727 AT_STATX_DONT_SYNC = 0x4000
728
641729 AT_SYMLINK_FOLLOW = 0x400
642730 AT_SYMLINK_NOFOLLOW = 0x100
731
732 AT_EACCESS = 0x200
643733 )
644734
645735 type PollFd struct {
659749 )
660750
661751 type Sigset_t struct {
662 X__val [32]uint32
752 Val [32]uint32
753 }
754
755 type SignalfdSiginfo struct {
756 Signo uint32
757 Errno int32
758 Code int32
759 Pid uint32
760 Uid uint32
761 Fd int32
762 Tid uint32
763 Band uint32
764 Overrun uint32
765 Trapno uint32
766 Status int32
767 Int int32
768 Ptr uint64
769 Utime uint64
770 Stime uint64
771 Addr uint64
772 _ [48]uint8
663773 }
664774
665775 const RNDGETENTCNT = 0x40045200
686796
687797 type Taskstats struct {
688798 Version uint16
689 Pad_cgo_0 [2]byte
690799 Ac_exitcode uint32
691800 Ac_flag uint8
692801 Ac_nice uint8
693 Pad_cgo_1 [6]byte
802 _ [4]byte
694803 Cpu_count uint64
695804 Cpu_delay_total uint64
696805 Blkio_count uint64
702811 Ac_comm [32]int8
703812 Ac_sched uint8
704813 Ac_pad [3]uint8
705 Pad_cgo_2 [4]byte
814 _ [4]byte
706815 Ac_uid uint32
707816 Ac_gid uint32
708817 Ac_pid uint32
709818 Ac_ppid uint32
710819 Ac_btime uint32
711 Pad_cgo_3 [4]byte
820 _ [4]byte
712821 Ac_etime uint64
713822 Ac_utime uint64
714823 Ac_stime uint64
732841 Cpu_scaled_run_real_total uint64
733842 Freepages_count uint64
734843 Freepages_delay_total uint64
844 Thrashing_count uint64
845 Thrashing_delay_total uint64
735846 }
736847
737848 const (
750861 TASKSTATS_CMD_ATTR_TGID = 0x2
751862 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
752863 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
864 )
865
866 type CGroupStats struct {
867 Sleeping uint64
868 Running uint64
869 Stopped uint64
870 Uninterruptible uint64
871 Io_wait uint64
872 }
873
874 const (
875 CGROUPSTATS_CMD_UNSPEC = 0x3
876 CGROUPSTATS_CMD_GET = 0x4
877 CGROUPSTATS_CMD_NEW = 0x5
878 CGROUPSTATS_TYPE_UNSPEC = 0x0
879 CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
880 CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
881 CGROUPSTATS_CMD_ATTR_FD = 0x1
753882 )
754883
755884 type Genlmsghdr struct {
784913 CTRL_ATTR_MCAST_GRP_NAME = 0x1
785914 CTRL_ATTR_MCAST_GRP_ID = 0x2
786915 )
916
917 type cpuMask uint32
918
919 const (
920 _CPU_SETSIZE = 0x400
921 _NCPUBITS = 0x20
922 )
923
924 const (
925 BDADDR_BREDR = 0x0
926 BDADDR_LE_PUBLIC = 0x1
927 BDADDR_LE_RANDOM = 0x2
928 )
929
930 type PerfEventAttr struct {
931 Type uint32
932 Size uint32
933 Config uint64
934 Sample uint64
935 Sample_type uint64
936 Read_format uint64
937 Bits uint64
938 Wakeup uint32
939 Bp_type uint32
940 Ext1 uint64
941 Ext2 uint64
942 Branch_sample_type uint64
943 Sample_regs_user uint64
944 Sample_stack_user uint32
945 Clockid int32
946 Sample_regs_intr uint64
947 Aux_watermark uint32
948 _ uint32
949 }
950
951 type PerfEventMmapPage struct {
952 Version uint32
953 Compat_version uint32
954 Lock uint32
955 Index uint32
956 Offset int64
957 Time_enabled uint64
958 Time_running uint64
959 Capabilities uint64
960 Pmc_width uint16
961 Time_shift uint16
962 Time_mult uint32
963 Time_offset uint64
964 Time_zero uint64
965 Size uint32
966 _ [948]uint8
967 Data_head uint64
968 Data_tail uint64
969 Data_offset uint64
970 Data_size uint64
971 Aux_head uint64
972 Aux_tail uint64
973 Aux_offset uint64
974 Aux_size uint64
975 }
976
977 const (
978 PerfBitDisabled uint64 = CBitFieldMaskBit0
979 PerfBitInherit = CBitFieldMaskBit1
980 PerfBitPinned = CBitFieldMaskBit2
981 PerfBitExclusive = CBitFieldMaskBit3
982 PerfBitExcludeUser = CBitFieldMaskBit4
983 PerfBitExcludeKernel = CBitFieldMaskBit5
984 PerfBitExcludeHv = CBitFieldMaskBit6
985 PerfBitExcludeIdle = CBitFieldMaskBit7
986 PerfBitMmap = CBitFieldMaskBit8
987 PerfBitComm = CBitFieldMaskBit9
988 PerfBitFreq = CBitFieldMaskBit10
989 PerfBitInheritStat = CBitFieldMaskBit11
990 PerfBitEnableOnExec = CBitFieldMaskBit12
991 PerfBitTask = CBitFieldMaskBit13
992 PerfBitWatermark = CBitFieldMaskBit14
993 PerfBitPreciseIPBit1 = CBitFieldMaskBit15
994 PerfBitPreciseIPBit2 = CBitFieldMaskBit16
995 PerfBitMmapData = CBitFieldMaskBit17
996 PerfBitSampleIDAll = CBitFieldMaskBit18
997 PerfBitExcludeHost = CBitFieldMaskBit19
998 PerfBitExcludeGuest = CBitFieldMaskBit20
999 PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
1000 PerfBitExcludeCallchainUser = CBitFieldMaskBit22
1001 PerfBitMmap2 = CBitFieldMaskBit23
1002 PerfBitCommExec = CBitFieldMaskBit24
1003 PerfBitUseClockID = CBitFieldMaskBit25
1004 PerfBitContextSwitch = CBitFieldMaskBit26
1005 )
1006
1007 const (
1008 PERF_TYPE_HARDWARE = 0x0
1009 PERF_TYPE_SOFTWARE = 0x1
1010 PERF_TYPE_TRACEPOINT = 0x2
1011 PERF_TYPE_HW_CACHE = 0x3
1012 PERF_TYPE_RAW = 0x4
1013 PERF_TYPE_BREAKPOINT = 0x5
1014
1015 PERF_COUNT_HW_CPU_CYCLES = 0x0
1016 PERF_COUNT_HW_INSTRUCTIONS = 0x1
1017 PERF_COUNT_HW_CACHE_REFERENCES = 0x2
1018 PERF_COUNT_HW_CACHE_MISSES = 0x3
1019 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
1020 PERF_COUNT_HW_BRANCH_MISSES = 0x5
1021 PERF_COUNT_HW_BUS_CYCLES = 0x6
1022 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
1023 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
1024 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
1025
1026 PERF_COUNT_HW_CACHE_L1D = 0x0
1027 PERF_COUNT_HW_CACHE_L1I = 0x1
1028 PERF_COUNT_HW_CACHE_LL = 0x2
1029 PERF_COUNT_HW_CACHE_DTLB = 0x3
1030 PERF_COUNT_HW_CACHE_ITLB = 0x4
1031 PERF_COUNT_HW_CACHE_BPU = 0x5
1032 PERF_COUNT_HW_CACHE_NODE = 0x6
1033
1034 PERF_COUNT_HW_CACHE_OP_READ = 0x0
1035 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
1036 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
1037
1038 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
1039 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
1040
1041 PERF_COUNT_SW_CPU_CLOCK = 0x0
1042 PERF_COUNT_SW_TASK_CLOCK = 0x1
1043 PERF_COUNT_SW_PAGE_FAULTS = 0x2
1044 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
1045 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
1046 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
1047 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
1048 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
1049 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
1050 PERF_COUNT_SW_DUMMY = 0x9
1051
1052 PERF_SAMPLE_IP = 0x1
1053 PERF_SAMPLE_TID = 0x2
1054 PERF_SAMPLE_TIME = 0x4
1055 PERF_SAMPLE_ADDR = 0x8
1056 PERF_SAMPLE_READ = 0x10
1057 PERF_SAMPLE_CALLCHAIN = 0x20
1058 PERF_SAMPLE_ID = 0x40
1059 PERF_SAMPLE_CPU = 0x80
1060 PERF_SAMPLE_PERIOD = 0x100
1061 PERF_SAMPLE_STREAM_ID = 0x200
1062 PERF_SAMPLE_RAW = 0x400
1063 PERF_SAMPLE_BRANCH_STACK = 0x800
1064
1065 PERF_SAMPLE_BRANCH_USER = 0x1
1066 PERF_SAMPLE_BRANCH_KERNEL = 0x2
1067 PERF_SAMPLE_BRANCH_HV = 0x4
1068 PERF_SAMPLE_BRANCH_ANY = 0x8
1069 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
1070 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
1071 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
1072
1073 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
1074 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
1075 PERF_FORMAT_ID = 0x4
1076 PERF_FORMAT_GROUP = 0x8
1077
1078 PERF_RECORD_MMAP = 0x1
1079 PERF_RECORD_LOST = 0x2
1080 PERF_RECORD_COMM = 0x3
1081 PERF_RECORD_EXIT = 0x4
1082 PERF_RECORD_THROTTLE = 0x5
1083 PERF_RECORD_UNTHROTTLE = 0x6
1084 PERF_RECORD_FORK = 0x7
1085 PERF_RECORD_READ = 0x8
1086 PERF_RECORD_SAMPLE = 0x9
1087
1088 PERF_CONTEXT_HV = -0x20
1089 PERF_CONTEXT_KERNEL = -0x80
1090 PERF_CONTEXT_USER = -0x200
1091
1092 PERF_CONTEXT_GUEST = -0x800
1093 PERF_CONTEXT_GUEST_KERNEL = -0x880
1094 PERF_CONTEXT_GUEST_USER = -0xa00
1095
1096 PERF_FLAG_FD_NO_GROUP = 0x1
1097 PERF_FLAG_FD_OUTPUT = 0x2
1098 PERF_FLAG_PID_CGROUP = 0x4
1099 )
1100
1101 const (
1102 CBitFieldMaskBit0 = 0x8000000000000000
1103 CBitFieldMaskBit1 = 0x4000000000000000
1104 CBitFieldMaskBit2 = 0x2000000000000000
1105 CBitFieldMaskBit3 = 0x1000000000000000
1106 CBitFieldMaskBit4 = 0x800000000000000
1107 CBitFieldMaskBit5 = 0x400000000000000
1108 CBitFieldMaskBit6 = 0x200000000000000
1109 CBitFieldMaskBit7 = 0x100000000000000
1110 CBitFieldMaskBit8 = 0x80000000000000
1111 CBitFieldMaskBit9 = 0x40000000000000
1112 CBitFieldMaskBit10 = 0x20000000000000
1113 CBitFieldMaskBit11 = 0x10000000000000
1114 CBitFieldMaskBit12 = 0x8000000000000
1115 CBitFieldMaskBit13 = 0x4000000000000
1116 CBitFieldMaskBit14 = 0x2000000000000
1117 CBitFieldMaskBit15 = 0x1000000000000
1118 CBitFieldMaskBit16 = 0x800000000000
1119 CBitFieldMaskBit17 = 0x400000000000
1120 CBitFieldMaskBit18 = 0x200000000000
1121 CBitFieldMaskBit19 = 0x100000000000
1122 CBitFieldMaskBit20 = 0x80000000000
1123 CBitFieldMaskBit21 = 0x40000000000
1124 CBitFieldMaskBit22 = 0x20000000000
1125 CBitFieldMaskBit23 = 0x10000000000
1126 CBitFieldMaskBit24 = 0x8000000000
1127 CBitFieldMaskBit25 = 0x4000000000
1128 CBitFieldMaskBit26 = 0x2000000000
1129 CBitFieldMaskBit27 = 0x1000000000
1130 CBitFieldMaskBit28 = 0x800000000
1131 CBitFieldMaskBit29 = 0x400000000
1132 CBitFieldMaskBit30 = 0x200000000
1133 CBitFieldMaskBit31 = 0x100000000
1134 CBitFieldMaskBit32 = 0x80000000
1135 CBitFieldMaskBit33 = 0x40000000
1136 CBitFieldMaskBit34 = 0x20000000
1137 CBitFieldMaskBit35 = 0x10000000
1138 CBitFieldMaskBit36 = 0x8000000
1139 CBitFieldMaskBit37 = 0x4000000
1140 CBitFieldMaskBit38 = 0x2000000
1141 CBitFieldMaskBit39 = 0x1000000
1142 CBitFieldMaskBit40 = 0x800000
1143 CBitFieldMaskBit41 = 0x400000
1144 CBitFieldMaskBit42 = 0x200000
1145 CBitFieldMaskBit43 = 0x100000
1146 CBitFieldMaskBit44 = 0x80000
1147 CBitFieldMaskBit45 = 0x40000
1148 CBitFieldMaskBit46 = 0x20000
1149 CBitFieldMaskBit47 = 0x10000
1150 CBitFieldMaskBit48 = 0x8000
1151 CBitFieldMaskBit49 = 0x4000
1152 CBitFieldMaskBit50 = 0x2000
1153 CBitFieldMaskBit51 = 0x1000
1154 CBitFieldMaskBit52 = 0x800
1155 CBitFieldMaskBit53 = 0x400
1156 CBitFieldMaskBit54 = 0x200
1157 CBitFieldMaskBit55 = 0x100
1158 CBitFieldMaskBit56 = 0x80
1159 CBitFieldMaskBit57 = 0x40
1160 CBitFieldMaskBit58 = 0x20
1161 CBitFieldMaskBit59 = 0x10
1162 CBitFieldMaskBit60 = 0x8
1163 CBitFieldMaskBit61 = 0x4
1164 CBitFieldMaskBit62 = 0x2
1165 CBitFieldMaskBit63 = 0x1
1166 )
1167
1168 type SockaddrStorage struct {
1169 Family uint16
1170 _ [122]int8
1171 _ uint32
1172 }
1173
1174 type TCPMD5Sig struct {
1175 Addr SockaddrStorage
1176 Flags uint8
1177 Prefixlen uint8
1178 Keylen uint16
1179 _ uint32
1180 Key [80]uint8
1181 }
1182
1183 type HDDriveCmdHdr struct {
1184 Command uint8
1185 Number uint8
1186 Feature uint8
1187 Count uint8
1188 }
1189
1190 type HDGeometry struct {
1191 Heads uint8
1192 Sectors uint8
1193 Cylinders uint16
1194 Start uint32
1195 }
1196
1197 type HDDriveID struct {
1198 Config uint16
1199 Cyls uint16
1200 Reserved2 uint16
1201 Heads uint16
1202 Track_bytes uint16
1203 Sector_bytes uint16
1204 Sectors uint16
1205 Vendor0 uint16
1206 Vendor1 uint16
1207 Vendor2 uint16
1208 Serial_no [20]uint8
1209 Buf_type uint16
1210 Buf_size uint16
1211 Ecc_bytes uint16
1212 Fw_rev [8]uint8
1213 Model [40]uint8
1214 Max_multsect uint8
1215 Vendor3 uint8
1216 Dword_io uint16
1217 Vendor4 uint8
1218 Capability uint8
1219 Reserved50 uint16
1220 Vendor5 uint8
1221 TPIO uint8
1222 Vendor6 uint8
1223 TDMA uint8
1224 Field_valid uint16
1225 Cur_cyls uint16
1226 Cur_heads uint16
1227 Cur_sectors uint16
1228 Cur_capacity0 uint16
1229 Cur_capacity1 uint16
1230 Multsect uint8
1231 Multsect_valid uint8
1232 Lba_capacity uint32
1233 Dma_1word uint16
1234 Dma_mword uint16
1235 Eide_pio_modes uint16
1236 Eide_dma_min uint16
1237 Eide_dma_time uint16
1238 Eide_pio uint16
1239 Eide_pio_iordy uint16
1240 Words69_70 [2]uint16
1241 Words71_74 [4]uint16
1242 Queue_depth uint16
1243 Words76_79 [4]uint16
1244 Major_rev_num uint16
1245 Minor_rev_num uint16
1246 Command_set_1 uint16
1247 Command_set_2 uint16
1248 Cfsse uint16
1249 Cfs_enable_1 uint16
1250 Cfs_enable_2 uint16
1251 Csf_default uint16
1252 Dma_ultra uint16
1253 Trseuc uint16
1254 TrsEuc uint16
1255 CurAPMvalues uint16
1256 Mprc uint16
1257 Hw_config uint16
1258 Acoustic uint16
1259 Msrqs uint16
1260 Sxfert uint16
1261 Sal uint16
1262 Spg uint32
1263 Lba_capacity_2 uint64
1264 Words104_125 [22]uint16
1265 Last_lun uint16
1266 Word127 uint16
1267 Dlf uint16
1268 Csfo uint16
1269 Words130_155 [26]uint16
1270 Word156 uint16
1271 Words157_159 [3]uint16
1272 Cfa_power uint16
1273 Words161_175 [15]uint16
1274 Words176_205 [30]uint16
1275 Words206_254 [49]uint16
1276 Integrity_word uint16
1277 }
1278
1279 type Statfs_t struct {
1280 Type int32
1281 Bsize int32
1282 Frsize int32
1283 _ [4]byte
1284 Blocks uint64
1285 Bfree uint64
1286 Files uint64
1287 Ffree uint64
1288 Bavail uint64
1289 Fsid Fsid
1290 Namelen int32
1291 Flags int32
1292 Spare [5]int32
1293 _ [4]byte
1294 }
1295
1296 const (
1297 ST_MANDLOCK = 0x40
1298 ST_NOATIME = 0x400
1299 ST_NODEV = 0x4
1300 ST_NODIRATIME = 0x800
1301 ST_NOEXEC = 0x8
1302 ST_NOSUID = 0x2
1303 ST_RDONLY = 0x1
1304 ST_RELATIME = 0x1000
1305 ST_SYNCHRONOUS = 0x10
1306 )
1307
1308 type TpacketHdr struct {
1309 Status uint32
1310 Len uint32
1311 Snaplen uint32
1312 Mac uint16
1313 Net uint16
1314 Sec uint32
1315 Usec uint32
1316 }
1317
1318 type Tpacket2Hdr struct {
1319 Status uint32
1320 Len uint32
1321 Snaplen uint32
1322 Mac uint16
1323 Net uint16
1324 Sec uint32
1325 Nsec uint32
1326 Vlan_tci uint16
1327 Vlan_tpid uint16
1328 _ [4]uint8
1329 }
1330
1331 type Tpacket3Hdr struct {
1332 Next_offset uint32
1333 Sec uint32
1334 Nsec uint32
1335 Snaplen uint32
1336 Len uint32
1337 Status uint32
1338 Mac uint16
1339 Net uint16
1340 Hv1 TpacketHdrVariant1
1341 _ [8]uint8
1342 }
1343
1344 type TpacketHdrVariant1 struct {
1345 Rxhash uint32
1346 Vlan_tci uint32
1347 Vlan_tpid uint16
1348 _ uint16
1349 }
1350
1351 type TpacketBlockDesc struct {
1352 Version uint32
1353 To_priv uint32
1354 Hdr [40]byte
1355 }
1356
1357 type TpacketReq struct {
1358 Block_size uint32
1359 Block_nr uint32
1360 Frame_size uint32
1361 Frame_nr uint32
1362 }
1363
1364 type TpacketReq3 struct {
1365 Block_size uint32
1366 Block_nr uint32
1367 Frame_size uint32
1368 Frame_nr uint32
1369 Retire_blk_tov uint32
1370 Sizeof_priv uint32
1371 Feature_req_word uint32
1372 }
1373
1374 type TpacketStats struct {
1375 Packets uint32
1376 Drops uint32
1377 }
1378
1379 type TpacketStatsV3 struct {
1380 Packets uint32
1381 Drops uint32
1382 Freeze_q_cnt uint32
1383 }
1384
1385 type TpacketAuxdata struct {
1386 Status uint32
1387 Len uint32
1388 Snaplen uint32
1389 Mac uint16
1390 Net uint16
1391 Vlan_tci uint16
1392 Vlan_tpid uint16
1393 }
1394
1395 const (
1396 TPACKET_V1 = 0x0
1397 TPACKET_V2 = 0x1
1398 TPACKET_V3 = 0x2
1399 )
1400
1401 const (
1402 SizeofTpacketHdr = 0x18
1403 SizeofTpacket2Hdr = 0x20
1404 SizeofTpacket3Hdr = 0x30
1405 )
1406
1407 const (
1408 NF_INET_PRE_ROUTING = 0x0
1409 NF_INET_LOCAL_IN = 0x1
1410 NF_INET_FORWARD = 0x2
1411 NF_INET_LOCAL_OUT = 0x3
1412 NF_INET_POST_ROUTING = 0x4
1413 NF_INET_NUMHOOKS = 0x5
1414 )
1415
1416 const (
1417 NF_NETDEV_INGRESS = 0x0
1418 NF_NETDEV_NUMHOOKS = 0x1
1419 )
1420
1421 const (
1422 NFPROTO_UNSPEC = 0x0
1423 NFPROTO_INET = 0x1
1424 NFPROTO_IPV4 = 0x2
1425 NFPROTO_ARP = 0x3
1426 NFPROTO_NETDEV = 0x5
1427 NFPROTO_BRIDGE = 0x7
1428 NFPROTO_IPV6 = 0xa
1429 NFPROTO_DECNET = 0xc
1430 NFPROTO_NUMPROTO = 0xd
1431 )
1432
1433 type Nfgenmsg struct {
1434 Nfgen_family uint8
1435 Version uint8
1436 Res_id uint16
1437 }
1438
1439 const (
1440 NFNL_BATCH_UNSPEC = 0x0
1441 NFNL_BATCH_GENID = 0x1
1442 )
1443
1444 const (
1445 NFT_REG_VERDICT = 0x0
1446 NFT_REG_1 = 0x1
1447 NFT_REG_2 = 0x2
1448 NFT_REG_3 = 0x3
1449 NFT_REG_4 = 0x4
1450 NFT_REG32_00 = 0x8
1451 NFT_REG32_01 = 0x9
1452 NFT_REG32_02 = 0xa
1453 NFT_REG32_03 = 0xb
1454 NFT_REG32_04 = 0xc
1455 NFT_REG32_05 = 0xd
1456 NFT_REG32_06 = 0xe
1457 NFT_REG32_07 = 0xf
1458 NFT_REG32_08 = 0x10
1459 NFT_REG32_09 = 0x11
1460 NFT_REG32_10 = 0x12
1461 NFT_REG32_11 = 0x13
1462 NFT_REG32_12 = 0x14
1463 NFT_REG32_13 = 0x15
1464 NFT_REG32_14 = 0x16
1465 NFT_REG32_15 = 0x17
1466 NFT_CONTINUE = -0x1
1467 NFT_BREAK = -0x2
1468 NFT_JUMP = -0x3
1469 NFT_GOTO = -0x4
1470 NFT_RETURN = -0x5
1471 NFT_MSG_NEWTABLE = 0x0
1472 NFT_MSG_GETTABLE = 0x1
1473 NFT_MSG_DELTABLE = 0x2
1474 NFT_MSG_NEWCHAIN = 0x3
1475 NFT_MSG_GETCHAIN = 0x4
1476 NFT_MSG_DELCHAIN = 0x5
1477 NFT_MSG_NEWRULE = 0x6
1478 NFT_MSG_GETRULE = 0x7
1479 NFT_MSG_DELRULE = 0x8
1480 NFT_MSG_NEWSET = 0x9
1481 NFT_MSG_GETSET = 0xa
1482 NFT_MSG_DELSET = 0xb
1483 NFT_MSG_NEWSETELEM = 0xc
1484 NFT_MSG_GETSETELEM = 0xd
1485 NFT_MSG_DELSETELEM = 0xe
1486 NFT_MSG_NEWGEN = 0xf
1487 NFT_MSG_GETGEN = 0x10
1488 NFT_MSG_TRACE = 0x11
1489 NFT_MSG_NEWOBJ = 0x12
1490 NFT_MSG_GETOBJ = 0x13
1491 NFT_MSG_DELOBJ = 0x14
1492 NFT_MSG_GETOBJ_RESET = 0x15
1493 NFT_MSG_MAX = 0x19
1494 NFTA_LIST_UNPEC = 0x0
1495 NFTA_LIST_ELEM = 0x1
1496 NFTA_HOOK_UNSPEC = 0x0
1497 NFTA_HOOK_HOOKNUM = 0x1
1498 NFTA_HOOK_PRIORITY = 0x2
1499 NFTA_HOOK_DEV = 0x3
1500 NFT_TABLE_F_DORMANT = 0x1
1501 NFTA_TABLE_UNSPEC = 0x0
1502 NFTA_TABLE_NAME = 0x1
1503 NFTA_TABLE_FLAGS = 0x2
1504 NFTA_TABLE_USE = 0x3
1505 NFTA_CHAIN_UNSPEC = 0x0
1506 NFTA_CHAIN_TABLE = 0x1
1507 NFTA_CHAIN_HANDLE = 0x2
1508 NFTA_CHAIN_NAME = 0x3
1509 NFTA_CHAIN_HOOK = 0x4
1510 NFTA_CHAIN_POLICY = 0x5
1511 NFTA_CHAIN_USE = 0x6
1512 NFTA_CHAIN_TYPE = 0x7
1513 NFTA_CHAIN_COUNTERS = 0x8
1514 NFTA_CHAIN_PAD = 0x9
1515 NFTA_RULE_UNSPEC = 0x0
1516 NFTA_RULE_TABLE = 0x1
1517 NFTA_RULE_CHAIN = 0x2
1518 NFTA_RULE_HANDLE = 0x3
1519 NFTA_RULE_EXPRESSIONS = 0x4
1520 NFTA_RULE_COMPAT = 0x5
1521 NFTA_RULE_POSITION = 0x6
1522 NFTA_RULE_USERDATA = 0x7
1523 NFTA_RULE_PAD = 0x8
1524 NFTA_RULE_ID = 0x9
1525 NFT_RULE_COMPAT_F_INV = 0x2
1526 NFT_RULE_COMPAT_F_MASK = 0x2
1527 NFTA_RULE_COMPAT_UNSPEC = 0x0
1528 NFTA_RULE_COMPAT_PROTO = 0x1
1529 NFTA_RULE_COMPAT_FLAGS = 0x2
1530 NFT_SET_ANONYMOUS = 0x1
1531 NFT_SET_CONSTANT = 0x2
1532 NFT_SET_INTERVAL = 0x4
1533 NFT_SET_MAP = 0x8
1534 NFT_SET_TIMEOUT = 0x10
1535 NFT_SET_EVAL = 0x20
1536 NFT_SET_OBJECT = 0x40
1537 NFT_SET_POL_PERFORMANCE = 0x0
1538 NFT_SET_POL_MEMORY = 0x1
1539 NFTA_SET_DESC_UNSPEC = 0x0
1540 NFTA_SET_DESC_SIZE = 0x1
1541 NFTA_SET_UNSPEC = 0x0
1542 NFTA_SET_TABLE = 0x1
1543 NFTA_SET_NAME = 0x2
1544 NFTA_SET_FLAGS = 0x3
1545 NFTA_SET_KEY_TYPE = 0x4
1546 NFTA_SET_KEY_LEN = 0x5
1547 NFTA_SET_DATA_TYPE = 0x6
1548 NFTA_SET_DATA_LEN = 0x7
1549 NFTA_SET_POLICY = 0x8
1550 NFTA_SET_DESC = 0x9
1551 NFTA_SET_ID = 0xa
1552 NFTA_SET_TIMEOUT = 0xb
1553 NFTA_SET_GC_INTERVAL = 0xc
1554 NFTA_SET_USERDATA = 0xd
1555 NFTA_SET_PAD = 0xe
1556 NFTA_SET_OBJ_TYPE = 0xf
1557 NFT_SET_ELEM_INTERVAL_END = 0x1
1558 NFTA_SET_ELEM_UNSPEC = 0x0
1559 NFTA_SET_ELEM_KEY = 0x1
1560 NFTA_SET_ELEM_DATA = 0x2
1561 NFTA_SET_ELEM_FLAGS = 0x3
1562 NFTA_SET_ELEM_TIMEOUT = 0x4
1563 NFTA_SET_ELEM_EXPIRATION = 0x5
1564 NFTA_SET_ELEM_USERDATA = 0x6
1565 NFTA_SET_ELEM_EXPR = 0x7
1566 NFTA_SET_ELEM_PAD = 0x8
1567 NFTA_SET_ELEM_OBJREF = 0x9
1568 NFTA_SET_ELEM_LIST_UNSPEC = 0x0
1569 NFTA_SET_ELEM_LIST_TABLE = 0x1
1570 NFTA_SET_ELEM_LIST_SET = 0x2
1571 NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
1572 NFTA_SET_ELEM_LIST_SET_ID = 0x4
1573 NFT_DATA_VALUE = 0x0
1574 NFT_DATA_VERDICT = 0xffffff00
1575 NFTA_DATA_UNSPEC = 0x0
1576 NFTA_DATA_VALUE = 0x1
1577 NFTA_DATA_VERDICT = 0x2
1578 NFTA_VERDICT_UNSPEC = 0x0
1579 NFTA_VERDICT_CODE = 0x1
1580 NFTA_VERDICT_CHAIN = 0x2
1581 NFTA_EXPR_UNSPEC = 0x0
1582 NFTA_EXPR_NAME = 0x1
1583 NFTA_EXPR_DATA = 0x2
1584 NFTA_IMMEDIATE_UNSPEC = 0x0
1585 NFTA_IMMEDIATE_DREG = 0x1
1586 NFTA_IMMEDIATE_DATA = 0x2
1587 NFTA_BITWISE_UNSPEC = 0x0
1588 NFTA_BITWISE_SREG = 0x1
1589 NFTA_BITWISE_DREG = 0x2
1590 NFTA_BITWISE_LEN = 0x3
1591 NFTA_BITWISE_MASK = 0x4
1592 NFTA_BITWISE_XOR = 0x5
1593 NFT_BYTEORDER_NTOH = 0x0
1594 NFT_BYTEORDER_HTON = 0x1
1595 NFTA_BYTEORDER_UNSPEC = 0x0
1596 NFTA_BYTEORDER_SREG = 0x1
1597 NFTA_BYTEORDER_DREG = 0x2
1598 NFTA_BYTEORDER_OP = 0x3
1599 NFTA_BYTEORDER_LEN = 0x4
1600 NFTA_BYTEORDER_SIZE = 0x5
1601 NFT_CMP_EQ = 0x0
1602 NFT_CMP_NEQ = 0x1
1603 NFT_CMP_LT = 0x2
1604 NFT_CMP_LTE = 0x3
1605 NFT_CMP_GT = 0x4
1606 NFT_CMP_GTE = 0x5
1607 NFTA_CMP_UNSPEC = 0x0
1608 NFTA_CMP_SREG = 0x1
1609 NFTA_CMP_OP = 0x2
1610 NFTA_CMP_DATA = 0x3
1611 NFT_RANGE_EQ = 0x0
1612 NFT_RANGE_NEQ = 0x1
1613 NFTA_RANGE_UNSPEC = 0x0
1614 NFTA_RANGE_SREG = 0x1
1615 NFTA_RANGE_OP = 0x2
1616 NFTA_RANGE_FROM_DATA = 0x3
1617 NFTA_RANGE_TO_DATA = 0x4
1618 NFT_LOOKUP_F_INV = 0x1
1619 NFTA_LOOKUP_UNSPEC = 0x0
1620 NFTA_LOOKUP_SET = 0x1
1621 NFTA_LOOKUP_SREG = 0x2
1622 NFTA_LOOKUP_DREG = 0x3
1623 NFTA_LOOKUP_SET_ID = 0x4
1624 NFTA_LOOKUP_FLAGS = 0x5
1625 NFT_DYNSET_OP_ADD = 0x0
1626 NFT_DYNSET_OP_UPDATE = 0x1
1627 NFT_DYNSET_F_INV = 0x1
1628 NFTA_DYNSET_UNSPEC = 0x0
1629 NFTA_DYNSET_SET_NAME = 0x1
1630 NFTA_DYNSET_SET_ID = 0x2
1631 NFTA_DYNSET_OP = 0x3
1632 NFTA_DYNSET_SREG_KEY = 0x4
1633 NFTA_DYNSET_SREG_DATA = 0x5
1634 NFTA_DYNSET_TIMEOUT = 0x6
1635 NFTA_DYNSET_EXPR = 0x7
1636 NFTA_DYNSET_PAD = 0x8
1637 NFTA_DYNSET_FLAGS = 0x9
1638 NFT_PAYLOAD_LL_HEADER = 0x0
1639 NFT_PAYLOAD_NETWORK_HEADER = 0x1
1640 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
1641 NFT_PAYLOAD_CSUM_NONE = 0x0
1642 NFT_PAYLOAD_CSUM_INET = 0x1
1643 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
1644 NFTA_PAYLOAD_UNSPEC = 0x0
1645 NFTA_PAYLOAD_DREG = 0x1
1646 NFTA_PAYLOAD_BASE = 0x2
1647 NFTA_PAYLOAD_OFFSET = 0x3
1648 NFTA_PAYLOAD_LEN = 0x4
1649 NFTA_PAYLOAD_SREG = 0x5
1650 NFTA_PAYLOAD_CSUM_TYPE = 0x6
1651 NFTA_PAYLOAD_CSUM_OFFSET = 0x7
1652 NFTA_PAYLOAD_CSUM_FLAGS = 0x8
1653 NFT_EXTHDR_F_PRESENT = 0x1
1654 NFT_EXTHDR_OP_IPV6 = 0x0
1655 NFT_EXTHDR_OP_TCPOPT = 0x1
1656 NFTA_EXTHDR_UNSPEC = 0x0
1657 NFTA_EXTHDR_DREG = 0x1
1658 NFTA_EXTHDR_TYPE = 0x2
1659 NFTA_EXTHDR_OFFSET = 0x3
1660 NFTA_EXTHDR_LEN = 0x4
1661 NFTA_EXTHDR_FLAGS = 0x5
1662 NFTA_EXTHDR_OP = 0x6
1663 NFTA_EXTHDR_SREG = 0x7
1664 NFT_META_LEN = 0x0
1665 NFT_META_PROTOCOL = 0x1
1666 NFT_META_PRIORITY = 0x2
1667 NFT_META_MARK = 0x3
1668 NFT_META_IIF = 0x4
1669 NFT_META_OIF = 0x5
1670 NFT_META_IIFNAME = 0x6
1671 NFT_META_OIFNAME = 0x7
1672 NFT_META_IIFTYPE = 0x8
1673 NFT_META_OIFTYPE = 0x9
1674 NFT_META_SKUID = 0xa
1675 NFT_META_SKGID = 0xb
1676 NFT_META_NFTRACE = 0xc
1677 NFT_META_RTCLASSID = 0xd
1678 NFT_META_SECMARK = 0xe
1679 NFT_META_NFPROTO = 0xf
1680 NFT_META_L4PROTO = 0x10
1681 NFT_META_BRI_IIFNAME = 0x11
1682 NFT_META_BRI_OIFNAME = 0x12
1683 NFT_META_PKTTYPE = 0x13
1684 NFT_META_CPU = 0x14
1685 NFT_META_IIFGROUP = 0x15
1686 NFT_META_OIFGROUP = 0x16
1687 NFT_META_CGROUP = 0x17
1688 NFT_META_PRANDOM = 0x18
1689 NFT_RT_CLASSID = 0x0
1690 NFT_RT_NEXTHOP4 = 0x1
1691 NFT_RT_NEXTHOP6 = 0x2
1692 NFT_RT_TCPMSS = 0x3
1693 NFT_HASH_JENKINS = 0x0
1694 NFT_HASH_SYM = 0x1
1695 NFTA_HASH_UNSPEC = 0x0
1696 NFTA_HASH_SREG = 0x1
1697 NFTA_HASH_DREG = 0x2
1698 NFTA_HASH_LEN = 0x3
1699 NFTA_HASH_MODULUS = 0x4
1700 NFTA_HASH_SEED = 0x5
1701 NFTA_HASH_OFFSET = 0x6
1702 NFTA_HASH_TYPE = 0x7
1703 NFTA_META_UNSPEC = 0x0
1704 NFTA_META_DREG = 0x1
1705 NFTA_META_KEY = 0x2
1706 NFTA_META_SREG = 0x3
1707 NFTA_RT_UNSPEC = 0x0
1708 NFTA_RT_DREG = 0x1
1709 NFTA_RT_KEY = 0x2
1710 NFT_CT_STATE = 0x0
1711 NFT_CT_DIRECTION = 0x1
1712 NFT_CT_STATUS = 0x2
1713 NFT_CT_MARK = 0x3
1714 NFT_CT_SECMARK = 0x4
1715 NFT_CT_EXPIRATION = 0x5
1716 NFT_CT_HELPER = 0x6
1717 NFT_CT_L3PROTOCOL = 0x7
1718 NFT_CT_SRC = 0x8
1719 NFT_CT_DST = 0x9
1720 NFT_CT_PROTOCOL = 0xa
1721 NFT_CT_PROTO_SRC = 0xb
1722 NFT_CT_PROTO_DST = 0xc
1723 NFT_CT_LABELS = 0xd
1724 NFT_CT_PKTS = 0xe
1725 NFT_CT_BYTES = 0xf
1726 NFT_CT_AVGPKT = 0x10
1727 NFT_CT_ZONE = 0x11
1728 NFT_CT_EVENTMASK = 0x12
1729 NFTA_CT_UNSPEC = 0x0
1730 NFTA_CT_DREG = 0x1
1731 NFTA_CT_KEY = 0x2
1732 NFTA_CT_DIRECTION = 0x3
1733 NFTA_CT_SREG = 0x4
1734 NFT_LIMIT_PKTS = 0x0
1735 NFT_LIMIT_PKT_BYTES = 0x1
1736 NFT_LIMIT_F_INV = 0x1
1737 NFTA_LIMIT_UNSPEC = 0x0
1738 NFTA_LIMIT_RATE = 0x1
1739 NFTA_LIMIT_UNIT = 0x2
1740 NFTA_LIMIT_BURST = 0x3
1741 NFTA_LIMIT_TYPE = 0x4
1742 NFTA_LIMIT_FLAGS = 0x5
1743 NFTA_LIMIT_PAD = 0x6
1744 NFTA_COUNTER_UNSPEC = 0x0
1745 NFTA_COUNTER_BYTES = 0x1
1746 NFTA_COUNTER_PACKETS = 0x2
1747 NFTA_COUNTER_PAD = 0x3
1748 NFTA_LOG_UNSPEC = 0x0
1749 NFTA_LOG_GROUP = 0x1
1750 NFTA_LOG_PREFIX = 0x2
1751 NFTA_LOG_SNAPLEN = 0x3
1752 NFTA_LOG_QTHRESHOLD = 0x4
1753 NFTA_LOG_LEVEL = 0x5
1754 NFTA_LOG_FLAGS = 0x6
1755 NFTA_QUEUE_UNSPEC = 0x0
1756 NFTA_QUEUE_NUM = 0x1
1757 NFTA_QUEUE_TOTAL = 0x2
1758 NFTA_QUEUE_FLAGS = 0x3
1759 NFTA_QUEUE_SREG_QNUM = 0x4
1760 NFT_QUOTA_F_INV = 0x1
1761 NFT_QUOTA_F_DEPLETED = 0x2
1762 NFTA_QUOTA_UNSPEC = 0x0
1763 NFTA_QUOTA_BYTES = 0x1
1764 NFTA_QUOTA_FLAGS = 0x2
1765 NFTA_QUOTA_PAD = 0x3
1766 NFTA_QUOTA_CONSUMED = 0x4
1767 NFT_REJECT_ICMP_UNREACH = 0x0
1768 NFT_REJECT_TCP_RST = 0x1
1769 NFT_REJECT_ICMPX_UNREACH = 0x2
1770 NFT_REJECT_ICMPX_NO_ROUTE = 0x0
1771 NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
1772 NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
1773 NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
1774 NFTA_REJECT_UNSPEC = 0x0
1775 NFTA_REJECT_TYPE = 0x1
1776 NFTA_REJECT_ICMP_CODE = 0x2
1777 NFT_NAT_SNAT = 0x0
1778 NFT_NAT_DNAT = 0x1
1779 NFTA_NAT_UNSPEC = 0x0
1780 NFTA_NAT_TYPE = 0x1
1781 NFTA_NAT_FAMILY = 0x2
1782 NFTA_NAT_REG_ADDR_MIN = 0x3
1783 NFTA_NAT_REG_ADDR_MAX = 0x4
1784 NFTA_NAT_REG_PROTO_MIN = 0x5
1785 NFTA_NAT_REG_PROTO_MAX = 0x6
1786 NFTA_NAT_FLAGS = 0x7
1787 NFTA_MASQ_UNSPEC = 0x0
1788 NFTA_MASQ_FLAGS = 0x1
1789 NFTA_MASQ_REG_PROTO_MIN = 0x2
1790 NFTA_MASQ_REG_PROTO_MAX = 0x3
1791 NFTA_REDIR_UNSPEC = 0x0
1792 NFTA_REDIR_REG_PROTO_MIN = 0x1
1793 NFTA_REDIR_REG_PROTO_MAX = 0x2
1794 NFTA_REDIR_FLAGS = 0x3
1795 NFTA_DUP_UNSPEC = 0x0
1796 NFTA_DUP_SREG_ADDR = 0x1
1797 NFTA_DUP_SREG_DEV = 0x2
1798 NFTA_FWD_UNSPEC = 0x0
1799 NFTA_FWD_SREG_DEV = 0x1
1800 NFTA_OBJREF_UNSPEC = 0x0
1801 NFTA_OBJREF_IMM_TYPE = 0x1
1802 NFTA_OBJREF_IMM_NAME = 0x2
1803 NFTA_OBJREF_SET_SREG = 0x3
1804 NFTA_OBJREF_SET_NAME = 0x4
1805 NFTA_OBJREF_SET_ID = 0x5
1806 NFTA_GEN_UNSPEC = 0x0
1807 NFTA_GEN_ID = 0x1
1808 NFTA_GEN_PROC_PID = 0x2
1809 NFTA_GEN_PROC_NAME = 0x3
1810 NFTA_FIB_UNSPEC = 0x0
1811 NFTA_FIB_DREG = 0x1
1812 NFTA_FIB_RESULT = 0x2
1813 NFTA_FIB_FLAGS = 0x3
1814 NFT_FIB_RESULT_UNSPEC = 0x0
1815 NFT_FIB_RESULT_OIF = 0x1
1816 NFT_FIB_RESULT_OIFNAME = 0x2
1817 NFT_FIB_RESULT_ADDRTYPE = 0x3
1818 NFTA_FIB_F_SADDR = 0x1
1819 NFTA_FIB_F_DADDR = 0x2
1820 NFTA_FIB_F_MARK = 0x4
1821 NFTA_FIB_F_IIF = 0x8
1822 NFTA_FIB_F_OIF = 0x10
1823 NFTA_FIB_F_PRESENT = 0x20
1824 NFTA_CT_HELPER_UNSPEC = 0x0
1825 NFTA_CT_HELPER_NAME = 0x1
1826 NFTA_CT_HELPER_L3PROTO = 0x2
1827 NFTA_CT_HELPER_L4PROTO = 0x3
1828 NFTA_OBJ_UNSPEC = 0x0
1829 NFTA_OBJ_TABLE = 0x1
1830 NFTA_OBJ_NAME = 0x2
1831 NFTA_OBJ_TYPE = 0x3
1832 NFTA_OBJ_DATA = 0x4
1833 NFTA_OBJ_USE = 0x5
1834 NFTA_TRACE_UNSPEC = 0x0
1835 NFTA_TRACE_TABLE = 0x1
1836 NFTA_TRACE_CHAIN = 0x2
1837 NFTA_TRACE_RULE_HANDLE = 0x3
1838 NFTA_TRACE_TYPE = 0x4
1839 NFTA_TRACE_VERDICT = 0x5
1840 NFTA_TRACE_ID = 0x6
1841 NFTA_TRACE_LL_HEADER = 0x7
1842 NFTA_TRACE_NETWORK_HEADER = 0x8
1843 NFTA_TRACE_TRANSPORT_HEADER = 0x9
1844 NFTA_TRACE_IIF = 0xa
1845 NFTA_TRACE_IIFTYPE = 0xb
1846 NFTA_TRACE_OIF = 0xc
1847 NFTA_TRACE_OIFTYPE = 0xd
1848 NFTA_TRACE_MARK = 0xe
1849 NFTA_TRACE_NFPROTO = 0xf
1850 NFTA_TRACE_POLICY = 0x10
1851 NFTA_TRACE_PAD = 0x11
1852 NFT_TRACETYPE_UNSPEC = 0x0
1853 NFT_TRACETYPE_POLICY = 0x1
1854 NFT_TRACETYPE_RETURN = 0x2
1855 NFT_TRACETYPE_RULE = 0x3
1856 NFTA_NG_UNSPEC = 0x0
1857 NFTA_NG_DREG = 0x1
1858 NFTA_NG_MODULUS = 0x2
1859 NFTA_NG_TYPE = 0x3
1860 NFTA_NG_OFFSET = 0x4
1861 NFT_NG_INCREMENTAL = 0x0
1862 NFT_NG_RANDOM = 0x1
1863 )
1864
1865 type RTCTime struct {
1866 Sec int32
1867 Min int32
1868 Hour int32
1869 Mday int32
1870 Mon int32
1871 Year int32
1872 Wday int32
1873 Yday int32
1874 Isdst int32
1875 }
1876
1877 type RTCWkAlrm struct {
1878 Enabled uint8
1879 Pending uint8
1880 Time RTCTime
1881 }
1882
1883 type RTCPLLInfo struct {
1884 Ctrl int32
1885 Value int32
1886 Max int32
1887 Min int32
1888 Posmult int32
1889 Negmult int32
1890 Clock int32
1891 }
1892
1893 type BlkpgIoctlArg struct {
1894 Op int32
1895 Flags int32
1896 Datalen int32
1897 Data *byte
1898 }
1899
1900 type BlkpgPartition struct {
1901 Start int64
1902 Length int64
1903 Pno int32
1904 Devname [64]uint8
1905 Volname [64]uint8
1906 _ [4]byte
1907 }
1908
1909 const (
1910 BLKPG = 0x20001269
1911 BLKPG_ADD_PARTITION = 0x1
1912 BLKPG_DEL_PARTITION = 0x2
1913 BLKPG_RESIZE_PARTITION = 0x3
1914 )
1915
1916 const (
1917 NETNSA_NONE = 0x0
1918 NETNSA_NSID = 0x1
1919 NETNSA_PID = 0x2
1920 NETNSA_FD = 0x3
1921 )
1922
1923 type XDPRingOffset struct {
1924 Producer uint64
1925 Consumer uint64
1926 Desc uint64
1927 }
1928
1929 type XDPMmapOffsets struct {
1930 Rx XDPRingOffset
1931 Tx XDPRingOffset
1932 Fr XDPRingOffset
1933 Cr XDPRingOffset
1934 }
1935
1936 type XDPUmemReg struct {
1937 Addr uint64
1938 Len uint64
1939 Size uint32
1940 Headroom uint32
1941 }
1942
1943 type XDPStatistics struct {
1944 Rx_dropped uint64
1945 Rx_invalid_descs uint64
1946 Tx_invalid_descs uint64
1947 }
1948
1949 type XDPDesc struct {
1950 Addr uint64
1951 Len uint32
1952 Options uint32
1953 }
1954
1955 const (
1956 NCSI_CMD_UNSPEC = 0x0
1957 NCSI_CMD_PKG_INFO = 0x1
1958 NCSI_CMD_SET_INTERFACE = 0x2
1959 NCSI_CMD_CLEAR_INTERFACE = 0x3
1960 NCSI_ATTR_UNSPEC = 0x0
1961 NCSI_ATTR_IFINDEX = 0x1
1962 NCSI_ATTR_PACKAGE_LIST = 0x2
1963 NCSI_ATTR_PACKAGE_ID = 0x3
1964 NCSI_ATTR_CHANNEL_ID = 0x4
1965 NCSI_PKG_ATTR_UNSPEC = 0x0
1966 NCSI_PKG_ATTR = 0x1
1967 NCSI_PKG_ATTR_ID = 0x2
1968 NCSI_PKG_ATTR_FORCED = 0x3
1969 NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
1970 NCSI_CHANNEL_ATTR_UNSPEC = 0x0
1971 NCSI_CHANNEL_ATTR = 0x1
1972 NCSI_CHANNEL_ATTR_ID = 0x2
1973 NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
1974 NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
1975 NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
1976 NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
1977 NCSI_CHANNEL_ATTR_ACTIVE = 0x7
1978 NCSI_CHANNEL_ATTR_FORCED = 0x8
1979 NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
1980 NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
1981 )
1982
1983 const (
1984 SOF_TIMESTAMPING_TX_HARDWARE = 0x1
1985 SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
1986 SOF_TIMESTAMPING_RX_HARDWARE = 0x4
1987 SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
1988 SOF_TIMESTAMPING_SOFTWARE = 0x10
1989 SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
1990 SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
1991 SOF_TIMESTAMPING_OPT_ID = 0x80
1992 SOF_TIMESTAMPING_TX_SCHED = 0x100
1993 SOF_TIMESTAMPING_TX_ACK = 0x200
1994 SOF_TIMESTAMPING_OPT_CMSG = 0x400
1995 SOF_TIMESTAMPING_OPT_TSONLY = 0x800
1996 SOF_TIMESTAMPING_OPT_STATS = 0x1000
1997 SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
1998 SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
1999
2000 SOF_TIMESTAMPING_LAST = 0x4000
2001 SOF_TIMESTAMPING_MASK = 0x7fff
2002 )
55 package unix
66
77 const (
8 sizeofPtr = 0x8
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x8
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
1313 PathMax = 0x1000
1414 )
1515
3232
3333 type Timex struct {
3434 Modes uint32
35 Pad_cgo_0 [4]byte
3635 Offset int64
3736 Freq int64
3837 Maxerror int64
3938 Esterror int64
4039 Status int32
41 Pad_cgo_1 [4]byte
4240 Constant int64
4341 Precision int64
4442 Tolerance int64
4745 Ppsfreq int64
4846 Jitter int64
4947 Shift int32
50 Pad_cgo_2 [4]byte
5148 Stabil int64
5249 Jitcnt int64
5350 Calcnt int64
5451 Errcnt int64
5552 Stbcnt int64
5653 Tai int32
57 Pad_cgo_3 [44]byte
54 _ [44]byte
5855 }
5956
6057 type Time_t int64
116113 Blocks int64
117114 }
118115
119 type Statfs_t struct {
120 Type int64
121 Bsize int64
122 Frsize int64
123 Blocks uint64
124 Bfree uint64
125 Files uint64
126 Ffree uint64
127 Bavail uint64
128 Fsid Fsid
129 Namelen int64
130 Flags int64
131 Spare [5]int64
116 type StatxTimestamp struct {
117 Sec int64
118 Nsec uint32
119 _ int32
120 }
121
122 type Statx_t struct {
123 Mask uint32
124 Blksize uint32
125 Attributes uint64
126 Nlink uint32
127 Uid uint32
128 Gid uint32
129 Mode uint16
130 _ [1]uint16
131 Ino uint64
132 Size uint64
133 Blocks uint64
134 Attributes_mask uint64
135 Atime StatxTimestamp
136 Btime StatxTimestamp
137 Ctime StatxTimestamp
138 Mtime StatxTimestamp
139 Rdev_major uint32
140 Rdev_minor uint32
141 Dev_major uint32
142 Dev_minor uint32
143 _ [14]uint64
132144 }
133145
134146 type Dirent struct {
135 Ino uint64
136 Off int64
137 Reclen uint16
138 Type uint8
139 Name [256]int8
140 Pad_cgo_0 [5]byte
147 Ino uint64
148 Off int64
149 Reclen uint16
150 Type uint8
151 Name [256]int8
152 _ [5]byte
141153 }
142154
143155 type Fsid struct {
144 X__val [2]int32
156 Val [2]int32
145157 }
146158
147159 type Flock_t struct {
148 Type int16
149 Whence int16
150 Pad_cgo_0 [4]byte
151 Start int64
152 Len int64
153 Pid int32
154 Pad_cgo_1 [4]byte
160 Type int16
161 Whence int16
162 Start int64
163 Len int64
164 Pid int32
165 _ [4]byte
155166 }
156167
157168 type FscryptPolicy struct {
226237 Channel uint16
227238 }
228239
240 type RawSockaddrL2 struct {
241 Family uint16
242 Psm uint16
243 Bdaddr [6]uint8
244 Cid uint16
245 Bdaddr_type uint8
246 _ [1]byte
247 }
248
249 type RawSockaddrRFCOMM struct {
250 Family uint16
251 Bdaddr [6]uint8
252 Channel uint8
253 _ [1]byte
254 }
255
229256 type RawSockaddrCAN struct {
230 Family uint16
231 Pad_cgo_0 [2]byte
232 Ifindex int32
233 Addr [8]byte
257 Family uint16
258 Ifindex int32
259 Addr [8]byte
234260 }
235261
236262 type RawSockaddrALG struct {
249275 Zero [4]uint8
250276 }
251277
278 type RawSockaddrXDP struct {
279 Family uint16
280 Flags uint16
281 Ifindex uint32
282 Queue_id uint32
283 Shared_umem_fd uint32
284 }
285
286 type RawSockaddrPPPoX [0x1e]byte
287
252288 type RawSockaddr struct {
253289 Family uint16
254290 Data [14]int8
297333 type Msghdr struct {
298334 Name *byte
299335 Namelen uint32
300 Pad_cgo_0 [4]byte
301336 Iov *Iovec
302337 Iovlen uint64
303338 Control *byte
304339 Controllen uint64
305340 Flags int32
306 Pad_cgo_1 [4]byte
341 _ [4]byte
307342 }
308343
309344 type Cmsghdr struct {
345380 Probes uint8
346381 Backoff uint8
347382 Options uint8
348 Pad_cgo_0 [2]byte
349383 Rto uint32
350384 Ato uint32
351385 Snd_mss uint32
380414 SizeofSockaddrLinklayer = 0x14
381415 SizeofSockaddrNetlink = 0xc
382416 SizeofSockaddrHCI = 0x6
417 SizeofSockaddrL2 = 0xe
418 SizeofSockaddrRFCOMM = 0xa
383419 SizeofSockaddrCAN = 0x10
384420 SizeofSockaddrALG = 0x58
385421 SizeofSockaddrVM = 0x10
422 SizeofSockaddrXDP = 0x10
423 SizeofSockaddrPPPoX = 0x1e
386424 SizeofLinger = 0x8
387425 SizeofIovec = 0x10
388426 SizeofIPMreq = 0x8
400438 )
401439
402440 const (
403 IFA_UNSPEC = 0x0
404 IFA_ADDRESS = 0x1
405 IFA_LOCAL = 0x2
406 IFA_LABEL = 0x3
407 IFA_BROADCAST = 0x4
408 IFA_ANYCAST = 0x5
409 IFA_CACHEINFO = 0x6
410 IFA_MULTICAST = 0x7
411 IFLA_UNSPEC = 0x0
412 IFLA_ADDRESS = 0x1
413 IFLA_BROADCAST = 0x2
414 IFLA_IFNAME = 0x3
415 IFLA_MTU = 0x4
416 IFLA_LINK = 0x5
417 IFLA_QDISC = 0x6
418 IFLA_STATS = 0x7
419 IFLA_COST = 0x8
420 IFLA_PRIORITY = 0x9
421 IFLA_MASTER = 0xa
422 IFLA_WIRELESS = 0xb
423 IFLA_PROTINFO = 0xc
424 IFLA_TXQLEN = 0xd
425 IFLA_MAP = 0xe
426 IFLA_WEIGHT = 0xf
427 IFLA_OPERSTATE = 0x10
428 IFLA_LINKMODE = 0x11
429 IFLA_LINKINFO = 0x12
430 IFLA_NET_NS_PID = 0x13
431 IFLA_IFALIAS = 0x14
432 IFLA_MAX = 0x2c
433 RT_SCOPE_UNIVERSE = 0x0
434 RT_SCOPE_SITE = 0xc8
435 RT_SCOPE_LINK = 0xfd
436 RT_SCOPE_HOST = 0xfe
437 RT_SCOPE_NOWHERE = 0xff
438 RT_TABLE_UNSPEC = 0x0
439 RT_TABLE_COMPAT = 0xfc
440 RT_TABLE_DEFAULT = 0xfd
441 RT_TABLE_MAIN = 0xfe
442 RT_TABLE_LOCAL = 0xff
443 RT_TABLE_MAX = 0xffffffff
444 RTA_UNSPEC = 0x0
445 RTA_DST = 0x1
446 RTA_SRC = 0x2
447 RTA_IIF = 0x3
448 RTA_OIF = 0x4
449 RTA_GATEWAY = 0x5
450 RTA_PRIORITY = 0x6
451 RTA_PREFSRC = 0x7
452 RTA_METRICS = 0x8
453 RTA_MULTIPATH = 0x9
454 RTA_FLOW = 0xb
455 RTA_CACHEINFO = 0xc
456 RTA_TABLE = 0xf
457 RTN_UNSPEC = 0x0
458 RTN_UNICAST = 0x1
459 RTN_LOCAL = 0x2
460 RTN_BROADCAST = 0x3
461 RTN_ANYCAST = 0x4
462 RTN_MULTICAST = 0x5
463 RTN_BLACKHOLE = 0x6
464 RTN_UNREACHABLE = 0x7
465 RTN_PROHIBIT = 0x8
466 RTN_THROW = 0x9
467 RTN_NAT = 0xa
468 RTN_XRESOLVE = 0xb
469 RTNLGRP_NONE = 0x0
470 RTNLGRP_LINK = 0x1
471 RTNLGRP_NOTIFY = 0x2
472 RTNLGRP_NEIGH = 0x3
473 RTNLGRP_TC = 0x4
474 RTNLGRP_IPV4_IFADDR = 0x5
475 RTNLGRP_IPV4_MROUTE = 0x6
476 RTNLGRP_IPV4_ROUTE = 0x7
477 RTNLGRP_IPV4_RULE = 0x8
478 RTNLGRP_IPV6_IFADDR = 0x9
479 RTNLGRP_IPV6_MROUTE = 0xa
480 RTNLGRP_IPV6_ROUTE = 0xb
481 RTNLGRP_IPV6_IFINFO = 0xc
482 RTNLGRP_IPV6_PREFIX = 0x12
483 RTNLGRP_IPV6_RULE = 0x13
484 RTNLGRP_ND_USEROPT = 0x14
485 SizeofNlMsghdr = 0x10
486 SizeofNlMsgerr = 0x14
487 SizeofRtGenmsg = 0x1
488 SizeofNlAttr = 0x4
489 SizeofRtAttr = 0x4
490 SizeofIfInfomsg = 0x10
491 SizeofIfAddrmsg = 0x8
492 SizeofRtMsg = 0xc
493 SizeofRtNexthop = 0x8
441 IFA_UNSPEC = 0x0
442 IFA_ADDRESS = 0x1
443 IFA_LOCAL = 0x2
444 IFA_LABEL = 0x3
445 IFA_BROADCAST = 0x4
446 IFA_ANYCAST = 0x5
447 IFA_CACHEINFO = 0x6
448 IFA_MULTICAST = 0x7
449 IFLA_UNSPEC = 0x0
450 IFLA_ADDRESS = 0x1
451 IFLA_BROADCAST = 0x2
452 IFLA_IFNAME = 0x3
453 IFLA_INFO_KIND = 0x1
454 IFLA_MTU = 0x4
455 IFLA_LINK = 0x5
456 IFLA_QDISC = 0x6
457 IFLA_STATS = 0x7
458 IFLA_COST = 0x8
459 IFLA_PRIORITY = 0x9
460 IFLA_MASTER = 0xa
461 IFLA_WIRELESS = 0xb
462 IFLA_PROTINFO = 0xc
463 IFLA_TXQLEN = 0xd
464 IFLA_MAP = 0xe
465 IFLA_WEIGHT = 0xf
466 IFLA_OPERSTATE = 0x10
467 IFLA_LINKMODE = 0x11
468 IFLA_LINKINFO = 0x12
469 IFLA_NET_NS_PID = 0x13
470 IFLA_IFALIAS = 0x14
471 IFLA_NUM_VF = 0x15
472 IFLA_VFINFO_LIST = 0x16
473 IFLA_STATS64 = 0x17
474 IFLA_VF_PORTS = 0x18
475 IFLA_PORT_SELF = 0x19
476 IFLA_AF_SPEC = 0x1a
477 IFLA_GROUP = 0x1b
478 IFLA_NET_NS_FD = 0x1c
479 IFLA_EXT_MASK = 0x1d
480 IFLA_PROMISCUITY = 0x1e
481 IFLA_NUM_TX_QUEUES = 0x1f
482 IFLA_NUM_RX_QUEUES = 0x20
483 IFLA_CARRIER = 0x21
484 IFLA_PHYS_PORT_ID = 0x22
485 IFLA_CARRIER_CHANGES = 0x23
486 IFLA_PHYS_SWITCH_ID = 0x24
487 IFLA_LINK_NETNSID = 0x25
488 IFLA_PHYS_PORT_NAME = 0x26
489 IFLA_PROTO_DOWN = 0x27
490 IFLA_GSO_MAX_SEGS = 0x28
491 IFLA_GSO_MAX_SIZE = 0x29
492 IFLA_PAD = 0x2a
493 IFLA_XDP = 0x2b
494 IFLA_EVENT = 0x2c
495 IFLA_NEW_NETNSID = 0x2d
496 IFLA_IF_NETNSID = 0x2e
497 IFLA_MAX = 0x33
498 RT_SCOPE_UNIVERSE = 0x0
499 RT_SCOPE_SITE = 0xc8
500 RT_SCOPE_LINK = 0xfd
501 RT_SCOPE_HOST = 0xfe
502 RT_SCOPE_NOWHERE = 0xff
503 RT_TABLE_UNSPEC = 0x0
504 RT_TABLE_COMPAT = 0xfc
505 RT_TABLE_DEFAULT = 0xfd
506 RT_TABLE_MAIN = 0xfe
507 RT_TABLE_LOCAL = 0xff
508 RT_TABLE_MAX = 0xffffffff
509 RTA_UNSPEC = 0x0
510 RTA_DST = 0x1
511 RTA_SRC = 0x2
512 RTA_IIF = 0x3
513 RTA_OIF = 0x4
514 RTA_GATEWAY = 0x5
515 RTA_PRIORITY = 0x6
516 RTA_PREFSRC = 0x7
517 RTA_METRICS = 0x8
518 RTA_MULTIPATH = 0x9
519 RTA_FLOW = 0xb
520 RTA_CACHEINFO = 0xc
521 RTA_TABLE = 0xf
522 RTA_MARK = 0x10
523 RTA_MFC_STATS = 0x11
524 RTA_VIA = 0x12
525 RTA_NEWDST = 0x13
526 RTA_PREF = 0x14
527 RTA_ENCAP_TYPE = 0x15
528 RTA_ENCAP = 0x16
529 RTA_EXPIRES = 0x17
530 RTA_PAD = 0x18
531 RTA_UID = 0x19
532 RTA_TTL_PROPAGATE = 0x1a
533 RTA_IP_PROTO = 0x1b
534 RTA_SPORT = 0x1c
535 RTA_DPORT = 0x1d
536 RTN_UNSPEC = 0x0
537 RTN_UNICAST = 0x1
538 RTN_LOCAL = 0x2
539 RTN_BROADCAST = 0x3
540 RTN_ANYCAST = 0x4
541 RTN_MULTICAST = 0x5
542 RTN_BLACKHOLE = 0x6
543 RTN_UNREACHABLE = 0x7
544 RTN_PROHIBIT = 0x8
545 RTN_THROW = 0x9
546 RTN_NAT = 0xa
547 RTN_XRESOLVE = 0xb
548 RTNLGRP_NONE = 0x0
549 RTNLGRP_LINK = 0x1
550 RTNLGRP_NOTIFY = 0x2
551 RTNLGRP_NEIGH = 0x3
552 RTNLGRP_TC = 0x4
553 RTNLGRP_IPV4_IFADDR = 0x5
554 RTNLGRP_IPV4_MROUTE = 0x6
555 RTNLGRP_IPV4_ROUTE = 0x7
556 RTNLGRP_IPV4_RULE = 0x8
557 RTNLGRP_IPV6_IFADDR = 0x9
558 RTNLGRP_IPV6_MROUTE = 0xa
559 RTNLGRP_IPV6_ROUTE = 0xb
560 RTNLGRP_IPV6_IFINFO = 0xc
561 RTNLGRP_IPV6_PREFIX = 0x12
562 RTNLGRP_IPV6_RULE = 0x13
563 RTNLGRP_ND_USEROPT = 0x14
564 SizeofNlMsghdr = 0x10
565 SizeofNlMsgerr = 0x14
566 SizeofRtGenmsg = 0x1
567 SizeofNlAttr = 0x4
568 SizeofRtAttr = 0x4
569 SizeofIfInfomsg = 0x10
570 SizeofIfAddrmsg = 0x8
571 SizeofRtMsg = 0xc
572 SizeofRtNexthop = 0x8
494573 )
495574
496575 type NlMsghdr struct {
521600 }
522601
523602 type IfInfomsg struct {
524 Family uint8
525 X__ifi_pad uint8
526 Type uint16
527 Index int32
528 Flags uint32
529 Change uint32
603 Family uint8
604 _ uint8
605 Type uint16
606 Index int32
607 Flags uint32
608 Change uint32
530609 }
531610
532611 type IfAddrmsg struct {
569648 }
570649
571650 type SockFprog struct {
572 Len uint16
573 Pad_cgo_0 [6]byte
574 Filter *SockFilter
651 Len uint16
652 Filter *SockFilter
575653 }
576654
577655 type InotifyEvent struct {
608686 Freeswap uint64
609687 Procs uint16
610688 Pad uint16
611 Pad_cgo_0 [4]byte
612689 Totalhigh uint64
613690 Freehigh uint64
614691 Unit uint32
615 X_f [0]int8
616 Pad_cgo_1 [4]byte
692 _ [0]int8
693 _ [4]byte
617694 }
618695
619696 type Utsname struct {
620 Sysname [65]int8
621 Nodename [65]int8
622 Release [65]int8
623 Version [65]int8
624 Machine [65]int8
625 Domainname [65]int8
697 Sysname [65]byte
698 Nodename [65]byte
699 Release [65]byte
700 Version [65]byte
701 Machine [65]byte
702 Domainname [65]byte
626703 }
627704
628705 type Ustat_t struct {
629 Tfree int32
630 Pad_cgo_0 [4]byte
631 Tinode uint64
632 Fname [6]int8
633 Fpack [6]int8
634 Pad_cgo_1 [4]byte
706 Tfree int32
707 Tinode uint64
708 Fname [6]int8
709 Fpack [6]int8
710 _ [4]byte
635711 }
636712
637713 type EpollEvent struct {
641717 }
642718
643719 const (
644 AT_FDCWD = -0x64
645 AT_REMOVEDIR = 0x200
720 AT_EMPTY_PATH = 0x1000
721 AT_FDCWD = -0x64
722 AT_NO_AUTOMOUNT = 0x800
723 AT_REMOVEDIR = 0x200
724
725 AT_STATX_SYNC_AS_STAT = 0x0
726 AT_STATX_FORCE_SYNC = 0x2000
727 AT_STATX_DONT_SYNC = 0x4000
728
646729 AT_SYMLINK_FOLLOW = 0x400
647730 AT_SYMLINK_NOFOLLOW = 0x100
731
732 AT_EACCESS = 0x200
648733 )
649734
650735 type PollFd struct {
664749 )
665750
666751 type Sigset_t struct {
667 X__val [16]uint64
752 Val [16]uint64
753 }
754
755 type SignalfdSiginfo struct {
756 Signo uint32
757 Errno int32
758 Code int32
759 Pid uint32
760 Uid uint32
761 Fd int32
762 Tid uint32
763 Band uint32
764 Overrun uint32
765 Trapno uint32
766 Status int32
767 Int int32
768 Ptr uint64
769 Utime uint64
770 Stime uint64
771 Addr uint64
772 _ [48]uint8
668773 }
669774
670775 const RNDGETENTCNT = 0x40045200
691796
692797 type Taskstats struct {
693798 Version uint16
694 Pad_cgo_0 [2]byte
695799 Ac_exitcode uint32
696800 Ac_flag uint8
697801 Ac_nice uint8
698 Pad_cgo_1 [6]byte
699802 Cpu_count uint64
700803 Cpu_delay_total uint64
701804 Blkio_count uint64
707810 Ac_comm [32]int8
708811 Ac_sched uint8
709812 Ac_pad [3]uint8
710 Pad_cgo_2 [4]byte
813 _ [4]byte
711814 Ac_uid uint32
712815 Ac_gid uint32
713816 Ac_pid uint32
714817 Ac_ppid uint32
715818 Ac_btime uint32
716 Pad_cgo_3 [4]byte
717819 Ac_etime uint64
718820 Ac_utime uint64
719821 Ac_stime uint64
737839 Cpu_scaled_run_real_total uint64
738840 Freepages_count uint64
739841 Freepages_delay_total uint64
842 Thrashing_count uint64
843 Thrashing_delay_total uint64
740844 }
741845
742846 const (
755859 TASKSTATS_CMD_ATTR_TGID = 0x2
756860 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
757861 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
862 )
863
864 type CGroupStats struct {
865 Sleeping uint64
866 Running uint64
867 Stopped uint64
868 Uninterruptible uint64
869 Io_wait uint64
870 }
871
872 const (
873 CGROUPSTATS_CMD_UNSPEC = 0x3
874 CGROUPSTATS_CMD_GET = 0x4
875 CGROUPSTATS_CMD_NEW = 0x5
876 CGROUPSTATS_TYPE_UNSPEC = 0x0
877 CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
878 CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
879 CGROUPSTATS_CMD_ATTR_FD = 0x1
758880 )
759881
760882 type Genlmsghdr struct {
789911 CTRL_ATTR_MCAST_GRP_NAME = 0x1
790912 CTRL_ATTR_MCAST_GRP_ID = 0x2
791913 )
914
915 type cpuMask uint64
916
917 const (
918 _CPU_SETSIZE = 0x400
919 _NCPUBITS = 0x40
920 )
921
922 const (
923 BDADDR_BREDR = 0x0
924 BDADDR_LE_PUBLIC = 0x1
925 BDADDR_LE_RANDOM = 0x2
926 )
927
928 type PerfEventAttr struct {
929 Type uint32
930 Size uint32
931 Config uint64
932 Sample uint64
933 Sample_type uint64
934 Read_format uint64
935 Bits uint64
936 Wakeup uint32
937 Bp_type uint32
938 Ext1 uint64
939 Ext2 uint64
940 Branch_sample_type uint64
941 Sample_regs_user uint64
942 Sample_stack_user uint32
943 Clockid int32
944 Sample_regs_intr uint64
945 Aux_watermark uint32
946 _ uint32
947 }
948
949 type PerfEventMmapPage struct {
950 Version uint32
951 Compat_version uint32
952 Lock uint32
953 Index uint32
954 Offset int64
955 Time_enabled uint64
956 Time_running uint64
957 Capabilities uint64
958 Pmc_width uint16
959 Time_shift uint16
960 Time_mult uint32
961 Time_offset uint64
962 Time_zero uint64
963 Size uint32
964 _ [948]uint8
965 Data_head uint64
966 Data_tail uint64
967 Data_offset uint64
968 Data_size uint64
969 Aux_head uint64
970 Aux_tail uint64
971 Aux_offset uint64
972 Aux_size uint64
973 }
974
975 const (
976 PerfBitDisabled uint64 = CBitFieldMaskBit0
977 PerfBitInherit = CBitFieldMaskBit1
978 PerfBitPinned = CBitFieldMaskBit2
979 PerfBitExclusive = CBitFieldMaskBit3
980 PerfBitExcludeUser = CBitFieldMaskBit4
981 PerfBitExcludeKernel = CBitFieldMaskBit5
982 PerfBitExcludeHv = CBitFieldMaskBit6
983 PerfBitExcludeIdle = CBitFieldMaskBit7
984 PerfBitMmap = CBitFieldMaskBit8
985 PerfBitComm = CBitFieldMaskBit9
986 PerfBitFreq = CBitFieldMaskBit10
987 PerfBitInheritStat = CBitFieldMaskBit11
988 PerfBitEnableOnExec = CBitFieldMaskBit12
989 PerfBitTask = CBitFieldMaskBit13
990 PerfBitWatermark = CBitFieldMaskBit14
991 PerfBitPreciseIPBit1 = CBitFieldMaskBit15
992 PerfBitPreciseIPBit2 = CBitFieldMaskBit16
993 PerfBitMmapData = CBitFieldMaskBit17
994 PerfBitSampleIDAll = CBitFieldMaskBit18
995 PerfBitExcludeHost = CBitFieldMaskBit19
996 PerfBitExcludeGuest = CBitFieldMaskBit20
997 PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
998 PerfBitExcludeCallchainUser = CBitFieldMaskBit22
999 PerfBitMmap2 = CBitFieldMaskBit23
1000 PerfBitCommExec = CBitFieldMaskBit24
1001 PerfBitUseClockID = CBitFieldMaskBit25
1002 PerfBitContextSwitch = CBitFieldMaskBit26
1003 )
1004
1005 const (
1006 PERF_TYPE_HARDWARE = 0x0
1007 PERF_TYPE_SOFTWARE = 0x1
1008 PERF_TYPE_TRACEPOINT = 0x2
1009 PERF_TYPE_HW_CACHE = 0x3
1010 PERF_TYPE_RAW = 0x4
1011 PERF_TYPE_BREAKPOINT = 0x5
1012
1013 PERF_COUNT_HW_CPU_CYCLES = 0x0
1014 PERF_COUNT_HW_INSTRUCTIONS = 0x1
1015 PERF_COUNT_HW_CACHE_REFERENCES = 0x2
1016 PERF_COUNT_HW_CACHE_MISSES = 0x3
1017 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
1018 PERF_COUNT_HW_BRANCH_MISSES = 0x5
1019 PERF_COUNT_HW_BUS_CYCLES = 0x6
1020 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
1021 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
1022 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
1023
1024 PERF_COUNT_HW_CACHE_L1D = 0x0
1025 PERF_COUNT_HW_CACHE_L1I = 0x1
1026 PERF_COUNT_HW_CACHE_LL = 0x2
1027 PERF_COUNT_HW_CACHE_DTLB = 0x3
1028 PERF_COUNT_HW_CACHE_ITLB = 0x4
1029 PERF_COUNT_HW_CACHE_BPU = 0x5
1030 PERF_COUNT_HW_CACHE_NODE = 0x6
1031
1032 PERF_COUNT_HW_CACHE_OP_READ = 0x0
1033 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
1034 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
1035
1036 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
1037 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
1038
1039 PERF_COUNT_SW_CPU_CLOCK = 0x0
1040 PERF_COUNT_SW_TASK_CLOCK = 0x1
1041 PERF_COUNT_SW_PAGE_FAULTS = 0x2
1042 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
1043 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
1044 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
1045 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
1046 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
1047 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
1048 PERF_COUNT_SW_DUMMY = 0x9
1049
1050 PERF_SAMPLE_IP = 0x1
1051 PERF_SAMPLE_TID = 0x2
1052 PERF_SAMPLE_TIME = 0x4
1053 PERF_SAMPLE_ADDR = 0x8
1054 PERF_SAMPLE_READ = 0x10
1055 PERF_SAMPLE_CALLCHAIN = 0x20
1056 PERF_SAMPLE_ID = 0x40
1057 PERF_SAMPLE_CPU = 0x80
1058 PERF_SAMPLE_PERIOD = 0x100
1059 PERF_SAMPLE_STREAM_ID = 0x200
1060 PERF_SAMPLE_RAW = 0x400
1061 PERF_SAMPLE_BRANCH_STACK = 0x800
1062
1063 PERF_SAMPLE_BRANCH_USER = 0x1
1064 PERF_SAMPLE_BRANCH_KERNEL = 0x2
1065 PERF_SAMPLE_BRANCH_HV = 0x4
1066 PERF_SAMPLE_BRANCH_ANY = 0x8
1067 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
1068 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
1069 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
1070
1071 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
1072 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
1073 PERF_FORMAT_ID = 0x4
1074 PERF_FORMAT_GROUP = 0x8
1075
1076 PERF_RECORD_MMAP = 0x1
1077 PERF_RECORD_LOST = 0x2
1078 PERF_RECORD_COMM = 0x3
1079 PERF_RECORD_EXIT = 0x4
1080 PERF_RECORD_THROTTLE = 0x5
1081 PERF_RECORD_UNTHROTTLE = 0x6
1082 PERF_RECORD_FORK = 0x7
1083 PERF_RECORD_READ = 0x8
1084 PERF_RECORD_SAMPLE = 0x9
1085
1086 PERF_CONTEXT_HV = -0x20
1087 PERF_CONTEXT_KERNEL = -0x80
1088 PERF_CONTEXT_USER = -0x200
1089
1090 PERF_CONTEXT_GUEST = -0x800
1091 PERF_CONTEXT_GUEST_KERNEL = -0x880
1092 PERF_CONTEXT_GUEST_USER = -0xa00
1093
1094 PERF_FLAG_FD_NO_GROUP = 0x1
1095 PERF_FLAG_FD_OUTPUT = 0x2
1096 PERF_FLAG_PID_CGROUP = 0x4
1097 )
1098
1099 const (
1100 CBitFieldMaskBit0 = 0x8000000000000000
1101 CBitFieldMaskBit1 = 0x4000000000000000
1102 CBitFieldMaskBit2 = 0x2000000000000000
1103 CBitFieldMaskBit3 = 0x1000000000000000
1104 CBitFieldMaskBit4 = 0x800000000000000
1105 CBitFieldMaskBit5 = 0x400000000000000
1106 CBitFieldMaskBit6 = 0x200000000000000
1107 CBitFieldMaskBit7 = 0x100000000000000
1108 CBitFieldMaskBit8 = 0x80000000000000
1109 CBitFieldMaskBit9 = 0x40000000000000
1110 CBitFieldMaskBit10 = 0x20000000000000
1111 CBitFieldMaskBit11 = 0x10000000000000
1112 CBitFieldMaskBit12 = 0x8000000000000
1113 CBitFieldMaskBit13 = 0x4000000000000
1114 CBitFieldMaskBit14 = 0x2000000000000
1115 CBitFieldMaskBit15 = 0x1000000000000
1116 CBitFieldMaskBit16 = 0x800000000000
1117 CBitFieldMaskBit17 = 0x400000000000
1118 CBitFieldMaskBit18 = 0x200000000000
1119 CBitFieldMaskBit19 = 0x100000000000
1120 CBitFieldMaskBit20 = 0x80000000000
1121 CBitFieldMaskBit21 = 0x40000000000
1122 CBitFieldMaskBit22 = 0x20000000000
1123 CBitFieldMaskBit23 = 0x10000000000
1124 CBitFieldMaskBit24 = 0x8000000000
1125 CBitFieldMaskBit25 = 0x4000000000
1126 CBitFieldMaskBit26 = 0x2000000000
1127 CBitFieldMaskBit27 = 0x1000000000
1128 CBitFieldMaskBit28 = 0x800000000
1129 CBitFieldMaskBit29 = 0x400000000
1130 CBitFieldMaskBit30 = 0x200000000
1131 CBitFieldMaskBit31 = 0x100000000
1132 CBitFieldMaskBit32 = 0x80000000
1133 CBitFieldMaskBit33 = 0x40000000
1134 CBitFieldMaskBit34 = 0x20000000
1135 CBitFieldMaskBit35 = 0x10000000
1136 CBitFieldMaskBit36 = 0x8000000
1137 CBitFieldMaskBit37 = 0x4000000
1138 CBitFieldMaskBit38 = 0x2000000
1139 CBitFieldMaskBit39 = 0x1000000
1140 CBitFieldMaskBit40 = 0x800000
1141 CBitFieldMaskBit41 = 0x400000
1142 CBitFieldMaskBit42 = 0x200000
1143 CBitFieldMaskBit43 = 0x100000
1144 CBitFieldMaskBit44 = 0x80000
1145 CBitFieldMaskBit45 = 0x40000
1146 CBitFieldMaskBit46 = 0x20000
1147 CBitFieldMaskBit47 = 0x10000
1148 CBitFieldMaskBit48 = 0x8000
1149 CBitFieldMaskBit49 = 0x4000
1150 CBitFieldMaskBit50 = 0x2000
1151 CBitFieldMaskBit51 = 0x1000
1152 CBitFieldMaskBit52 = 0x800
1153 CBitFieldMaskBit53 = 0x400
1154 CBitFieldMaskBit54 = 0x200
1155 CBitFieldMaskBit55 = 0x100
1156 CBitFieldMaskBit56 = 0x80
1157 CBitFieldMaskBit57 = 0x40
1158 CBitFieldMaskBit58 = 0x20
1159 CBitFieldMaskBit59 = 0x10
1160 CBitFieldMaskBit60 = 0x8
1161 CBitFieldMaskBit61 = 0x4
1162 CBitFieldMaskBit62 = 0x2
1163 CBitFieldMaskBit63 = 0x1
1164 )
1165
1166 type SockaddrStorage struct {
1167 Family uint16
1168 _ [118]int8
1169 _ uint64
1170 }
1171
1172 type TCPMD5Sig struct {
1173 Addr SockaddrStorage
1174 Flags uint8
1175 Prefixlen uint8
1176 Keylen uint16
1177 _ uint32
1178 Key [80]uint8
1179 }
1180
1181 type HDDriveCmdHdr struct {
1182 Command uint8
1183 Number uint8
1184 Feature uint8
1185 Count uint8
1186 }
1187
1188 type HDGeometry struct {
1189 Heads uint8
1190 Sectors uint8
1191 Cylinders uint16
1192 Start uint64
1193 }
1194
1195 type HDDriveID struct {
1196 Config uint16
1197 Cyls uint16
1198 Reserved2 uint16
1199 Heads uint16
1200 Track_bytes uint16
1201 Sector_bytes uint16
1202 Sectors uint16
1203 Vendor0 uint16
1204 Vendor1 uint16
1205 Vendor2 uint16
1206 Serial_no [20]uint8
1207 Buf_type uint16
1208 Buf_size uint16
1209 Ecc_bytes uint16
1210 Fw_rev [8]uint8
1211 Model [40]uint8
1212 Max_multsect uint8
1213 Vendor3 uint8
1214 Dword_io uint16
1215 Vendor4 uint8
1216 Capability uint8
1217 Reserved50 uint16
1218 Vendor5 uint8
1219 TPIO uint8
1220 Vendor6 uint8
1221 TDMA uint8
1222 Field_valid uint16
1223 Cur_cyls uint16
1224 Cur_heads uint16
1225 Cur_sectors uint16
1226 Cur_capacity0 uint16
1227 Cur_capacity1 uint16
1228 Multsect uint8
1229 Multsect_valid uint8
1230 Lba_capacity uint32
1231 Dma_1word uint16
1232 Dma_mword uint16
1233 Eide_pio_modes uint16
1234 Eide_dma_min uint16
1235 Eide_dma_time uint16
1236 Eide_pio uint16
1237 Eide_pio_iordy uint16
1238 Words69_70 [2]uint16
1239 Words71_74 [4]uint16
1240 Queue_depth uint16
1241 Words76_79 [4]uint16
1242 Major_rev_num uint16
1243 Minor_rev_num uint16
1244 Command_set_1 uint16
1245 Command_set_2 uint16
1246 Cfsse uint16
1247 Cfs_enable_1 uint16
1248 Cfs_enable_2 uint16
1249 Csf_default uint16
1250 Dma_ultra uint16
1251 Trseuc uint16
1252 TrsEuc uint16
1253 CurAPMvalues uint16
1254 Mprc uint16
1255 Hw_config uint16
1256 Acoustic uint16
1257 Msrqs uint16
1258 Sxfert uint16
1259 Sal uint16
1260 Spg uint32
1261 Lba_capacity_2 uint64
1262 Words104_125 [22]uint16
1263 Last_lun uint16
1264 Word127 uint16
1265 Dlf uint16
1266 Csfo uint16
1267 Words130_155 [26]uint16
1268 Word156 uint16
1269 Words157_159 [3]uint16
1270 Cfa_power uint16
1271 Words161_175 [15]uint16
1272 Words176_205 [30]uint16
1273 Words206_254 [49]uint16
1274 Integrity_word uint16
1275 }
1276
1277 type Statfs_t struct {
1278 Type int64
1279 Bsize int64
1280 Frsize int64
1281 Blocks uint64
1282 Bfree uint64
1283 Files uint64
1284 Ffree uint64
1285 Bavail uint64
1286 Fsid Fsid
1287 Namelen int64
1288 Flags int64
1289 Spare [5]int64
1290 }
1291
1292 const (
1293 ST_MANDLOCK = 0x40
1294 ST_NOATIME = 0x400
1295 ST_NODEV = 0x4
1296 ST_NODIRATIME = 0x800
1297 ST_NOEXEC = 0x8
1298 ST_NOSUID = 0x2
1299 ST_RDONLY = 0x1
1300 ST_RELATIME = 0x1000
1301 ST_SYNCHRONOUS = 0x10
1302 )
1303
1304 type TpacketHdr struct {
1305 Status uint64
1306 Len uint32
1307 Snaplen uint32
1308 Mac uint16
1309 Net uint16
1310 Sec uint32
1311 Usec uint32
1312 _ [4]byte
1313 }
1314
1315 type Tpacket2Hdr struct {
1316 Status uint32
1317 Len uint32
1318 Snaplen uint32
1319 Mac uint16
1320 Net uint16
1321 Sec uint32
1322 Nsec uint32
1323 Vlan_tci uint16
1324 Vlan_tpid uint16
1325 _ [4]uint8
1326 }
1327
1328 type Tpacket3Hdr struct {
1329 Next_offset uint32
1330 Sec uint32
1331 Nsec uint32
1332 Snaplen uint32
1333 Len uint32
1334 Status uint32
1335 Mac uint16
1336 Net uint16
1337 Hv1 TpacketHdrVariant1
1338 _ [8]uint8
1339 }
1340
1341 type TpacketHdrVariant1 struct {
1342 Rxhash uint32
1343 Vlan_tci uint32
1344 Vlan_tpid uint16
1345 _ uint16
1346 }
1347
1348 type TpacketBlockDesc struct {
1349 Version uint32
1350 To_priv uint32
1351 Hdr [40]byte
1352 }
1353
1354 type TpacketReq struct {
1355 Block_size uint32
1356 Block_nr uint32
1357 Frame_size uint32
1358 Frame_nr uint32
1359 }
1360
1361 type TpacketReq3 struct {
1362 Block_size uint32
1363 Block_nr uint32
1364 Frame_size uint32
1365 Frame_nr uint32
1366 Retire_blk_tov uint32
1367 Sizeof_priv uint32
1368 Feature_req_word uint32
1369 }
1370
1371 type TpacketStats struct {
1372 Packets uint32
1373 Drops uint32
1374 }
1375
1376 type TpacketStatsV3 struct {
1377 Packets uint32
1378 Drops uint32
1379 Freeze_q_cnt uint32
1380 }
1381
1382 type TpacketAuxdata struct {
1383 Status uint32
1384 Len uint32
1385 Snaplen uint32
1386 Mac uint16
1387 Net uint16
1388 Vlan_tci uint16
1389 Vlan_tpid uint16
1390 }
1391
1392 const (
1393 TPACKET_V1 = 0x0
1394 TPACKET_V2 = 0x1
1395 TPACKET_V3 = 0x2
1396 )
1397
1398 const (
1399 SizeofTpacketHdr = 0x20
1400 SizeofTpacket2Hdr = 0x20
1401 SizeofTpacket3Hdr = 0x30
1402 )
1403
1404 const (
1405 NF_INET_PRE_ROUTING = 0x0
1406 NF_INET_LOCAL_IN = 0x1
1407 NF_INET_FORWARD = 0x2
1408 NF_INET_LOCAL_OUT = 0x3
1409 NF_INET_POST_ROUTING = 0x4
1410 NF_INET_NUMHOOKS = 0x5
1411 )
1412
1413 const (
1414 NF_NETDEV_INGRESS = 0x0
1415 NF_NETDEV_NUMHOOKS = 0x1
1416 )
1417
1418 const (
1419 NFPROTO_UNSPEC = 0x0
1420 NFPROTO_INET = 0x1
1421 NFPROTO_IPV4 = 0x2
1422 NFPROTO_ARP = 0x3
1423 NFPROTO_NETDEV = 0x5
1424 NFPROTO_BRIDGE = 0x7
1425 NFPROTO_IPV6 = 0xa
1426 NFPROTO_DECNET = 0xc
1427 NFPROTO_NUMPROTO = 0xd
1428 )
1429
1430 type Nfgenmsg struct {
1431 Nfgen_family uint8
1432 Version uint8
1433 Res_id uint16
1434 }
1435
1436 const (
1437 NFNL_BATCH_UNSPEC = 0x0
1438 NFNL_BATCH_GENID = 0x1
1439 )
1440
1441 const (
1442 NFT_REG_VERDICT = 0x0
1443 NFT_REG_1 = 0x1
1444 NFT_REG_2 = 0x2
1445 NFT_REG_3 = 0x3
1446 NFT_REG_4 = 0x4
1447 NFT_REG32_00 = 0x8
1448 NFT_REG32_01 = 0x9
1449 NFT_REG32_02 = 0xa
1450 NFT_REG32_03 = 0xb
1451 NFT_REG32_04 = 0xc
1452 NFT_REG32_05 = 0xd
1453 NFT_REG32_06 = 0xe
1454 NFT_REG32_07 = 0xf
1455 NFT_REG32_08 = 0x10
1456 NFT_REG32_09 = 0x11
1457 NFT_REG32_10 = 0x12
1458 NFT_REG32_11 = 0x13
1459 NFT_REG32_12 = 0x14
1460 NFT_REG32_13 = 0x15
1461 NFT_REG32_14 = 0x16
1462 NFT_REG32_15 = 0x17
1463 NFT_CONTINUE = -0x1
1464 NFT_BREAK = -0x2
1465 NFT_JUMP = -0x3
1466 NFT_GOTO = -0x4
1467 NFT_RETURN = -0x5
1468 NFT_MSG_NEWTABLE = 0x0
1469 NFT_MSG_GETTABLE = 0x1
1470 NFT_MSG_DELTABLE = 0x2
1471 NFT_MSG_NEWCHAIN = 0x3
1472 NFT_MSG_GETCHAIN = 0x4
1473 NFT_MSG_DELCHAIN = 0x5
1474 NFT_MSG_NEWRULE = 0x6
1475 NFT_MSG_GETRULE = 0x7
1476 NFT_MSG_DELRULE = 0x8
1477 NFT_MSG_NEWSET = 0x9
1478 NFT_MSG_GETSET = 0xa
1479 NFT_MSG_DELSET = 0xb
1480 NFT_MSG_NEWSETELEM = 0xc
1481 NFT_MSG_GETSETELEM = 0xd
1482 NFT_MSG_DELSETELEM = 0xe
1483 NFT_MSG_NEWGEN = 0xf
1484 NFT_MSG_GETGEN = 0x10
1485 NFT_MSG_TRACE = 0x11
1486 NFT_MSG_NEWOBJ = 0x12
1487 NFT_MSG_GETOBJ = 0x13
1488 NFT_MSG_DELOBJ = 0x14
1489 NFT_MSG_GETOBJ_RESET = 0x15
1490 NFT_MSG_MAX = 0x19
1491 NFTA_LIST_UNPEC = 0x0
1492 NFTA_LIST_ELEM = 0x1
1493 NFTA_HOOK_UNSPEC = 0x0
1494 NFTA_HOOK_HOOKNUM = 0x1
1495 NFTA_HOOK_PRIORITY = 0x2
1496 NFTA_HOOK_DEV = 0x3
1497 NFT_TABLE_F_DORMANT = 0x1
1498 NFTA_TABLE_UNSPEC = 0x0
1499 NFTA_TABLE_NAME = 0x1
1500 NFTA_TABLE_FLAGS = 0x2
1501 NFTA_TABLE_USE = 0x3
1502 NFTA_CHAIN_UNSPEC = 0x0
1503 NFTA_CHAIN_TABLE = 0x1
1504 NFTA_CHAIN_HANDLE = 0x2
1505 NFTA_CHAIN_NAME = 0x3
1506 NFTA_CHAIN_HOOK = 0x4
1507 NFTA_CHAIN_POLICY = 0x5
1508 NFTA_CHAIN_USE = 0x6
1509 NFTA_CHAIN_TYPE = 0x7
1510 NFTA_CHAIN_COUNTERS = 0x8
1511 NFTA_CHAIN_PAD = 0x9
1512 NFTA_RULE_UNSPEC = 0x0
1513 NFTA_RULE_TABLE = 0x1
1514 NFTA_RULE_CHAIN = 0x2
1515 NFTA_RULE_HANDLE = 0x3
1516 NFTA_RULE_EXPRESSIONS = 0x4
1517 NFTA_RULE_COMPAT = 0x5
1518 NFTA_RULE_POSITION = 0x6
1519 NFTA_RULE_USERDATA = 0x7
1520 NFTA_RULE_PAD = 0x8
1521 NFTA_RULE_ID = 0x9
1522 NFT_RULE_COMPAT_F_INV = 0x2
1523 NFT_RULE_COMPAT_F_MASK = 0x2
1524 NFTA_RULE_COMPAT_UNSPEC = 0x0
1525 NFTA_RULE_COMPAT_PROTO = 0x1
1526 NFTA_RULE_COMPAT_FLAGS = 0x2
1527 NFT_SET_ANONYMOUS = 0x1
1528 NFT_SET_CONSTANT = 0x2
1529 NFT_SET_INTERVAL = 0x4
1530 NFT_SET_MAP = 0x8
1531 NFT_SET_TIMEOUT = 0x10
1532 NFT_SET_EVAL = 0x20
1533 NFT_SET_OBJECT = 0x40
1534 NFT_SET_POL_PERFORMANCE = 0x0
1535 NFT_SET_POL_MEMORY = 0x1
1536 NFTA_SET_DESC_UNSPEC = 0x0
1537 NFTA_SET_DESC_SIZE = 0x1
1538 NFTA_SET_UNSPEC = 0x0
1539 NFTA_SET_TABLE = 0x1
1540 NFTA_SET_NAME = 0x2
1541 NFTA_SET_FLAGS = 0x3
1542 NFTA_SET_KEY_TYPE = 0x4
1543 NFTA_SET_KEY_LEN = 0x5
1544 NFTA_SET_DATA_TYPE = 0x6
1545 NFTA_SET_DATA_LEN = 0x7
1546 NFTA_SET_POLICY = 0x8
1547 NFTA_SET_DESC = 0x9
1548 NFTA_SET_ID = 0xa
1549 NFTA_SET_TIMEOUT = 0xb
1550 NFTA_SET_GC_INTERVAL = 0xc
1551 NFTA_SET_USERDATA = 0xd
1552 NFTA_SET_PAD = 0xe
1553 NFTA_SET_OBJ_TYPE = 0xf
1554 NFT_SET_ELEM_INTERVAL_END = 0x1
1555 NFTA_SET_ELEM_UNSPEC = 0x0
1556 NFTA_SET_ELEM_KEY = 0x1
1557 NFTA_SET_ELEM_DATA = 0x2
1558 NFTA_SET_ELEM_FLAGS = 0x3
1559 NFTA_SET_ELEM_TIMEOUT = 0x4
1560 NFTA_SET_ELEM_EXPIRATION = 0x5
1561 NFTA_SET_ELEM_USERDATA = 0x6
1562 NFTA_SET_ELEM_EXPR = 0x7
1563 NFTA_SET_ELEM_PAD = 0x8
1564 NFTA_SET_ELEM_OBJREF = 0x9
1565 NFTA_SET_ELEM_LIST_UNSPEC = 0x0
1566 NFTA_SET_ELEM_LIST_TABLE = 0x1
1567 NFTA_SET_ELEM_LIST_SET = 0x2
1568 NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
1569 NFTA_SET_ELEM_LIST_SET_ID = 0x4
1570 NFT_DATA_VALUE = 0x0
1571 NFT_DATA_VERDICT = 0xffffff00
1572 NFTA_DATA_UNSPEC = 0x0
1573 NFTA_DATA_VALUE = 0x1
1574 NFTA_DATA_VERDICT = 0x2
1575 NFTA_VERDICT_UNSPEC = 0x0
1576 NFTA_VERDICT_CODE = 0x1
1577 NFTA_VERDICT_CHAIN = 0x2
1578 NFTA_EXPR_UNSPEC = 0x0
1579 NFTA_EXPR_NAME = 0x1
1580 NFTA_EXPR_DATA = 0x2
1581 NFTA_IMMEDIATE_UNSPEC = 0x0
1582 NFTA_IMMEDIATE_DREG = 0x1
1583 NFTA_IMMEDIATE_DATA = 0x2
1584 NFTA_BITWISE_UNSPEC = 0x0
1585 NFTA_BITWISE_SREG = 0x1
1586 NFTA_BITWISE_DREG = 0x2
1587 NFTA_BITWISE_LEN = 0x3
1588 NFTA_BITWISE_MASK = 0x4
1589 NFTA_BITWISE_XOR = 0x5
1590 NFT_BYTEORDER_NTOH = 0x0
1591 NFT_BYTEORDER_HTON = 0x1
1592 NFTA_BYTEORDER_UNSPEC = 0x0
1593 NFTA_BYTEORDER_SREG = 0x1
1594 NFTA_BYTEORDER_DREG = 0x2
1595 NFTA_BYTEORDER_OP = 0x3
1596 NFTA_BYTEORDER_LEN = 0x4
1597 NFTA_BYTEORDER_SIZE = 0x5
1598 NFT_CMP_EQ = 0x0
1599 NFT_CMP_NEQ = 0x1
1600 NFT_CMP_LT = 0x2
1601 NFT_CMP_LTE = 0x3
1602 NFT_CMP_GT = 0x4
1603 NFT_CMP_GTE = 0x5
1604 NFTA_CMP_UNSPEC = 0x0
1605 NFTA_CMP_SREG = 0x1
1606 NFTA_CMP_OP = 0x2
1607 NFTA_CMP_DATA = 0x3
1608 NFT_RANGE_EQ = 0x0
1609 NFT_RANGE_NEQ = 0x1
1610 NFTA_RANGE_UNSPEC = 0x0
1611 NFTA_RANGE_SREG = 0x1
1612 NFTA_RANGE_OP = 0x2
1613 NFTA_RANGE_FROM_DATA = 0x3
1614 NFTA_RANGE_TO_DATA = 0x4
1615 NFT_LOOKUP_F_INV = 0x1
1616 NFTA_LOOKUP_UNSPEC = 0x0
1617 NFTA_LOOKUP_SET = 0x1
1618 NFTA_LOOKUP_SREG = 0x2
1619 NFTA_LOOKUP_DREG = 0x3
1620 NFTA_LOOKUP_SET_ID = 0x4
1621 NFTA_LOOKUP_FLAGS = 0x5
1622 NFT_DYNSET_OP_ADD = 0x0
1623 NFT_DYNSET_OP_UPDATE = 0x1
1624 NFT_DYNSET_F_INV = 0x1
1625 NFTA_DYNSET_UNSPEC = 0x0
1626 NFTA_DYNSET_SET_NAME = 0x1
1627 NFTA_DYNSET_SET_ID = 0x2
1628 NFTA_DYNSET_OP = 0x3
1629 NFTA_DYNSET_SREG_KEY = 0x4
1630 NFTA_DYNSET_SREG_DATA = 0x5
1631 NFTA_DYNSET_TIMEOUT = 0x6
1632 NFTA_DYNSET_EXPR = 0x7
1633 NFTA_DYNSET_PAD = 0x8
1634 NFTA_DYNSET_FLAGS = 0x9
1635 NFT_PAYLOAD_LL_HEADER = 0x0
1636 NFT_PAYLOAD_NETWORK_HEADER = 0x1
1637 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
1638 NFT_PAYLOAD_CSUM_NONE = 0x0
1639 NFT_PAYLOAD_CSUM_INET = 0x1
1640 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
1641 NFTA_PAYLOAD_UNSPEC = 0x0
1642 NFTA_PAYLOAD_DREG = 0x1
1643 NFTA_PAYLOAD_BASE = 0x2
1644 NFTA_PAYLOAD_OFFSET = 0x3
1645 NFTA_PAYLOAD_LEN = 0x4
1646 NFTA_PAYLOAD_SREG = 0x5
1647 NFTA_PAYLOAD_CSUM_TYPE = 0x6
1648 NFTA_PAYLOAD_CSUM_OFFSET = 0x7
1649 NFTA_PAYLOAD_CSUM_FLAGS = 0x8
1650 NFT_EXTHDR_F_PRESENT = 0x1
1651 NFT_EXTHDR_OP_IPV6 = 0x0
1652 NFT_EXTHDR_OP_TCPOPT = 0x1
1653 NFTA_EXTHDR_UNSPEC = 0x0
1654 NFTA_EXTHDR_DREG = 0x1
1655 NFTA_EXTHDR_TYPE = 0x2
1656 NFTA_EXTHDR_OFFSET = 0x3
1657 NFTA_EXTHDR_LEN = 0x4
1658 NFTA_EXTHDR_FLAGS = 0x5
1659 NFTA_EXTHDR_OP = 0x6
1660 NFTA_EXTHDR_SREG = 0x7
1661 NFT_META_LEN = 0x0
1662 NFT_META_PROTOCOL = 0x1
1663 NFT_META_PRIORITY = 0x2
1664 NFT_META_MARK = 0x3
1665 NFT_META_IIF = 0x4
1666 NFT_META_OIF = 0x5
1667 NFT_META_IIFNAME = 0x6
1668 NFT_META_OIFNAME = 0x7
1669 NFT_META_IIFTYPE = 0x8
1670 NFT_META_OIFTYPE = 0x9
1671 NFT_META_SKUID = 0xa
1672 NFT_META_SKGID = 0xb
1673 NFT_META_NFTRACE = 0xc
1674 NFT_META_RTCLASSID = 0xd
1675 NFT_META_SECMARK = 0xe
1676 NFT_META_NFPROTO = 0xf
1677 NFT_META_L4PROTO = 0x10
1678 NFT_META_BRI_IIFNAME = 0x11
1679 NFT_META_BRI_OIFNAME = 0x12
1680 NFT_META_PKTTYPE = 0x13
1681 NFT_META_CPU = 0x14
1682 NFT_META_IIFGROUP = 0x15
1683 NFT_META_OIFGROUP = 0x16
1684 NFT_META_CGROUP = 0x17
1685 NFT_META_PRANDOM = 0x18
1686 NFT_RT_CLASSID = 0x0
1687 NFT_RT_NEXTHOP4 = 0x1
1688 NFT_RT_NEXTHOP6 = 0x2
1689 NFT_RT_TCPMSS = 0x3
1690 NFT_HASH_JENKINS = 0x0
1691 NFT_HASH_SYM = 0x1
1692 NFTA_HASH_UNSPEC = 0x0
1693 NFTA_HASH_SREG = 0x1
1694 NFTA_HASH_DREG = 0x2
1695 NFTA_HASH_LEN = 0x3
1696 NFTA_HASH_MODULUS = 0x4
1697 NFTA_HASH_SEED = 0x5
1698 NFTA_HASH_OFFSET = 0x6
1699 NFTA_HASH_TYPE = 0x7
1700 NFTA_META_UNSPEC = 0x0
1701 NFTA_META_DREG = 0x1
1702 NFTA_META_KEY = 0x2
1703 NFTA_META_SREG = 0x3
1704 NFTA_RT_UNSPEC = 0x0
1705 NFTA_RT_DREG = 0x1
1706 NFTA_RT_KEY = 0x2
1707 NFT_CT_STATE = 0x0
1708 NFT_CT_DIRECTION = 0x1
1709 NFT_CT_STATUS = 0x2
1710 NFT_CT_MARK = 0x3
1711 NFT_CT_SECMARK = 0x4
1712 NFT_CT_EXPIRATION = 0x5
1713 NFT_CT_HELPER = 0x6
1714 NFT_CT_L3PROTOCOL = 0x7
1715 NFT_CT_SRC = 0x8
1716 NFT_CT_DST = 0x9
1717 NFT_CT_PROTOCOL = 0xa
1718 NFT_CT_PROTO_SRC = 0xb
1719 NFT_CT_PROTO_DST = 0xc
1720 NFT_CT_LABELS = 0xd
1721 NFT_CT_PKTS = 0xe
1722 NFT_CT_BYTES = 0xf
1723 NFT_CT_AVGPKT = 0x10
1724 NFT_CT_ZONE = 0x11
1725 NFT_CT_EVENTMASK = 0x12
1726 NFTA_CT_UNSPEC = 0x0
1727 NFTA_CT_DREG = 0x1
1728 NFTA_CT_KEY = 0x2
1729 NFTA_CT_DIRECTION = 0x3
1730 NFTA_CT_SREG = 0x4
1731 NFT_LIMIT_PKTS = 0x0
1732 NFT_LIMIT_PKT_BYTES = 0x1
1733 NFT_LIMIT_F_INV = 0x1
1734 NFTA_LIMIT_UNSPEC = 0x0
1735 NFTA_LIMIT_RATE = 0x1
1736 NFTA_LIMIT_UNIT = 0x2
1737 NFTA_LIMIT_BURST = 0x3
1738 NFTA_LIMIT_TYPE = 0x4
1739 NFTA_LIMIT_FLAGS = 0x5
1740 NFTA_LIMIT_PAD = 0x6
1741 NFTA_COUNTER_UNSPEC = 0x0
1742 NFTA_COUNTER_BYTES = 0x1
1743 NFTA_COUNTER_PACKETS = 0x2
1744 NFTA_COUNTER_PAD = 0x3
1745 NFTA_LOG_UNSPEC = 0x0
1746 NFTA_LOG_GROUP = 0x1
1747 NFTA_LOG_PREFIX = 0x2
1748 NFTA_LOG_SNAPLEN = 0x3
1749 NFTA_LOG_QTHRESHOLD = 0x4
1750 NFTA_LOG_LEVEL = 0x5
1751 NFTA_LOG_FLAGS = 0x6
1752 NFTA_QUEUE_UNSPEC = 0x0
1753 NFTA_QUEUE_NUM = 0x1
1754 NFTA_QUEUE_TOTAL = 0x2
1755 NFTA_QUEUE_FLAGS = 0x3
1756 NFTA_QUEUE_SREG_QNUM = 0x4
1757 NFT_QUOTA_F_INV = 0x1
1758 NFT_QUOTA_F_DEPLETED = 0x2
1759 NFTA_QUOTA_UNSPEC = 0x0
1760 NFTA_QUOTA_BYTES = 0x1
1761 NFTA_QUOTA_FLAGS = 0x2
1762 NFTA_QUOTA_PAD = 0x3
1763 NFTA_QUOTA_CONSUMED = 0x4
1764 NFT_REJECT_ICMP_UNREACH = 0x0
1765 NFT_REJECT_TCP_RST = 0x1
1766 NFT_REJECT_ICMPX_UNREACH = 0x2
1767 NFT_REJECT_ICMPX_NO_ROUTE = 0x0
1768 NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
1769 NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
1770 NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
1771 NFTA_REJECT_UNSPEC = 0x0
1772 NFTA_REJECT_TYPE = 0x1
1773 NFTA_REJECT_ICMP_CODE = 0x2
1774 NFT_NAT_SNAT = 0x0
1775 NFT_NAT_DNAT = 0x1
1776 NFTA_NAT_UNSPEC = 0x0
1777 NFTA_NAT_TYPE = 0x1
1778 NFTA_NAT_FAMILY = 0x2
1779 NFTA_NAT_REG_ADDR_MIN = 0x3
1780 NFTA_NAT_REG_ADDR_MAX = 0x4
1781 NFTA_NAT_REG_PROTO_MIN = 0x5
1782 NFTA_NAT_REG_PROTO_MAX = 0x6
1783 NFTA_NAT_FLAGS = 0x7
1784 NFTA_MASQ_UNSPEC = 0x0
1785 NFTA_MASQ_FLAGS = 0x1
1786 NFTA_MASQ_REG_PROTO_MIN = 0x2
1787 NFTA_MASQ_REG_PROTO_MAX = 0x3
1788 NFTA_REDIR_UNSPEC = 0x0
1789 NFTA_REDIR_REG_PROTO_MIN = 0x1
1790 NFTA_REDIR_REG_PROTO_MAX = 0x2
1791 NFTA_REDIR_FLAGS = 0x3
1792 NFTA_DUP_UNSPEC = 0x0
1793 NFTA_DUP_SREG_ADDR = 0x1
1794 NFTA_DUP_SREG_DEV = 0x2
1795 NFTA_FWD_UNSPEC = 0x0
1796 NFTA_FWD_SREG_DEV = 0x1
1797 NFTA_OBJREF_UNSPEC = 0x0
1798 NFTA_OBJREF_IMM_TYPE = 0x1
1799 NFTA_OBJREF_IMM_NAME = 0x2
1800 NFTA_OBJREF_SET_SREG = 0x3
1801 NFTA_OBJREF_SET_NAME = 0x4
1802 NFTA_OBJREF_SET_ID = 0x5
1803 NFTA_GEN_UNSPEC = 0x0
1804 NFTA_GEN_ID = 0x1
1805 NFTA_GEN_PROC_PID = 0x2
1806 NFTA_GEN_PROC_NAME = 0x3
1807 NFTA_FIB_UNSPEC = 0x0
1808 NFTA_FIB_DREG = 0x1
1809 NFTA_FIB_RESULT = 0x2
1810 NFTA_FIB_FLAGS = 0x3
1811 NFT_FIB_RESULT_UNSPEC = 0x0
1812 NFT_FIB_RESULT_OIF = 0x1
1813 NFT_FIB_RESULT_OIFNAME = 0x2
1814 NFT_FIB_RESULT_ADDRTYPE = 0x3
1815 NFTA_FIB_F_SADDR = 0x1
1816 NFTA_FIB_F_DADDR = 0x2
1817 NFTA_FIB_F_MARK = 0x4
1818 NFTA_FIB_F_IIF = 0x8
1819 NFTA_FIB_F_OIF = 0x10
1820 NFTA_FIB_F_PRESENT = 0x20
1821 NFTA_CT_HELPER_UNSPEC = 0x0
1822 NFTA_CT_HELPER_NAME = 0x1
1823 NFTA_CT_HELPER_L3PROTO = 0x2
1824 NFTA_CT_HELPER_L4PROTO = 0x3
1825 NFTA_OBJ_UNSPEC = 0x0
1826 NFTA_OBJ_TABLE = 0x1
1827 NFTA_OBJ_NAME = 0x2
1828 NFTA_OBJ_TYPE = 0x3
1829 NFTA_OBJ_DATA = 0x4
1830 NFTA_OBJ_USE = 0x5
1831 NFTA_TRACE_UNSPEC = 0x0
1832 NFTA_TRACE_TABLE = 0x1
1833 NFTA_TRACE_CHAIN = 0x2
1834 NFTA_TRACE_RULE_HANDLE = 0x3
1835 NFTA_TRACE_TYPE = 0x4
1836 NFTA_TRACE_VERDICT = 0x5
1837 NFTA_TRACE_ID = 0x6
1838 NFTA_TRACE_LL_HEADER = 0x7
1839 NFTA_TRACE_NETWORK_HEADER = 0x8
1840 NFTA_TRACE_TRANSPORT_HEADER = 0x9
1841 NFTA_TRACE_IIF = 0xa
1842 NFTA_TRACE_IIFTYPE = 0xb
1843 NFTA_TRACE_OIF = 0xc
1844 NFTA_TRACE_OIFTYPE = 0xd
1845 NFTA_TRACE_MARK = 0xe
1846 NFTA_TRACE_NFPROTO = 0xf
1847 NFTA_TRACE_POLICY = 0x10
1848 NFTA_TRACE_PAD = 0x11
1849 NFT_TRACETYPE_UNSPEC = 0x0
1850 NFT_TRACETYPE_POLICY = 0x1
1851 NFT_TRACETYPE_RETURN = 0x2
1852 NFT_TRACETYPE_RULE = 0x3
1853 NFTA_NG_UNSPEC = 0x0
1854 NFTA_NG_DREG = 0x1
1855 NFTA_NG_MODULUS = 0x2
1856 NFTA_NG_TYPE = 0x3
1857 NFTA_NG_OFFSET = 0x4
1858 NFT_NG_INCREMENTAL = 0x0
1859 NFT_NG_RANDOM = 0x1
1860 )
1861
1862 type RTCTime struct {
1863 Sec int32
1864 Min int32
1865 Hour int32
1866 Mday int32
1867 Mon int32
1868 Year int32
1869 Wday int32
1870 Yday int32
1871 Isdst int32
1872 }
1873
1874 type RTCWkAlrm struct {
1875 Enabled uint8
1876 Pending uint8
1877 Time RTCTime
1878 }
1879
1880 type RTCPLLInfo struct {
1881 Ctrl int32
1882 Value int32
1883 Max int32
1884 Min int32
1885 Posmult int32
1886 Negmult int32
1887 Clock int64
1888 }
1889
1890 type BlkpgIoctlArg struct {
1891 Op int32
1892 Flags int32
1893 Datalen int32
1894 Data *byte
1895 }
1896
1897 type BlkpgPartition struct {
1898 Start int64
1899 Length int64
1900 Pno int32
1901 Devname [64]uint8
1902 Volname [64]uint8
1903 _ [4]byte
1904 }
1905
1906 const (
1907 BLKPG = 0x20001269
1908 BLKPG_ADD_PARTITION = 0x1
1909 BLKPG_DEL_PARTITION = 0x2
1910 BLKPG_RESIZE_PARTITION = 0x3
1911 )
1912
1913 const (
1914 NETNSA_NONE = 0x0
1915 NETNSA_NSID = 0x1
1916 NETNSA_PID = 0x2
1917 NETNSA_FD = 0x3
1918 )
1919
1920 type XDPRingOffset struct {
1921 Producer uint64
1922 Consumer uint64
1923 Desc uint64
1924 }
1925
1926 type XDPMmapOffsets struct {
1927 Rx XDPRingOffset
1928 Tx XDPRingOffset
1929 Fr XDPRingOffset
1930 Cr XDPRingOffset
1931 }
1932
1933 type XDPUmemReg struct {
1934 Addr uint64
1935 Len uint64
1936 Size uint32
1937 Headroom uint32
1938 }
1939
1940 type XDPStatistics struct {
1941 Rx_dropped uint64
1942 Rx_invalid_descs uint64
1943 Tx_invalid_descs uint64
1944 }
1945
1946 type XDPDesc struct {
1947 Addr uint64
1948 Len uint32
1949 Options uint32
1950 }
1951
1952 const (
1953 NCSI_CMD_UNSPEC = 0x0
1954 NCSI_CMD_PKG_INFO = 0x1
1955 NCSI_CMD_SET_INTERFACE = 0x2
1956 NCSI_CMD_CLEAR_INTERFACE = 0x3
1957 NCSI_ATTR_UNSPEC = 0x0
1958 NCSI_ATTR_IFINDEX = 0x1
1959 NCSI_ATTR_PACKAGE_LIST = 0x2
1960 NCSI_ATTR_PACKAGE_ID = 0x3
1961 NCSI_ATTR_CHANNEL_ID = 0x4
1962 NCSI_PKG_ATTR_UNSPEC = 0x0
1963 NCSI_PKG_ATTR = 0x1
1964 NCSI_PKG_ATTR_ID = 0x2
1965 NCSI_PKG_ATTR_FORCED = 0x3
1966 NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
1967 NCSI_CHANNEL_ATTR_UNSPEC = 0x0
1968 NCSI_CHANNEL_ATTR = 0x1
1969 NCSI_CHANNEL_ATTR_ID = 0x2
1970 NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
1971 NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
1972 NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
1973 NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
1974 NCSI_CHANNEL_ATTR_ACTIVE = 0x7
1975 NCSI_CHANNEL_ATTR_FORCED = 0x8
1976 NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
1977 NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
1978 )
1979
1980 const (
1981 SOF_TIMESTAMPING_TX_HARDWARE = 0x1
1982 SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
1983 SOF_TIMESTAMPING_RX_HARDWARE = 0x4
1984 SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
1985 SOF_TIMESTAMPING_SOFTWARE = 0x10
1986 SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
1987 SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
1988 SOF_TIMESTAMPING_OPT_ID = 0x80
1989 SOF_TIMESTAMPING_TX_SCHED = 0x100
1990 SOF_TIMESTAMPING_TX_ACK = 0x200
1991 SOF_TIMESTAMPING_OPT_CMSG = 0x400
1992 SOF_TIMESTAMPING_OPT_TSONLY = 0x800
1993 SOF_TIMESTAMPING_OPT_STATS = 0x1000
1994 SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
1995 SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
1996
1997 SOF_TIMESTAMPING_LAST = 0x4000
1998 SOF_TIMESTAMPING_MASK = 0x7fff
1999 )
55 package unix
66
77 const (
8 sizeofPtr = 0x8
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x8
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
1313 PathMax = 0x1000
1414 )
1515
3232
3333 type Timex struct {
3434 Modes uint32
35 Pad_cgo_0 [4]byte
3635 Offset int64
3736 Freq int64
3837 Maxerror int64
3938 Esterror int64
4039 Status int32
41 Pad_cgo_1 [4]byte
4240 Constant int64
4341 Precision int64
4442 Tolerance int64
4745 Ppsfreq int64
4846 Jitter int64
4947 Shift int32
50 Pad_cgo_2 [4]byte
5148 Stabil int64
5249 Jitcnt int64
5350 Calcnt int64
5451 Errcnt int64
5552 Stbcnt int64
5653 Tai int32
57 Pad_cgo_3 [44]byte
54 _ [44]byte
5855 }
5956
6057 type Time_t int64
116113 Blocks int64
117114 }
118115
119 type Statfs_t struct {
120 Type int64
121 Bsize int64
122 Frsize int64
123 Blocks uint64
124 Bfree uint64
125 Files uint64
126 Ffree uint64
127 Bavail uint64
128 Fsid Fsid
129 Namelen int64
130 Flags int64
131 Spare [5]int64
116 type StatxTimestamp struct {
117 Sec int64
118 Nsec uint32
119 _ int32
120 }
121
122 type Statx_t struct {
123 Mask uint32
124 Blksize uint32
125 Attributes uint64
126 Nlink uint32
127 Uid uint32
128 Gid uint32
129 Mode uint16
130 _ [1]uint16
131 Ino uint64
132 Size uint64
133 Blocks uint64
134 Attributes_mask uint64
135 Atime StatxTimestamp
136 Btime StatxTimestamp
137 Ctime StatxTimestamp
138 Mtime StatxTimestamp
139 Rdev_major uint32
140 Rdev_minor uint32
141 Dev_major uint32
142 Dev_minor uint32
143 _ [14]uint64
132144 }
133145
134146 type Dirent struct {
135 Ino uint64
136 Off int64
137 Reclen uint16
138 Type uint8
139 Name [256]int8
140 Pad_cgo_0 [5]byte
147 Ino uint64
148 Off int64
149 Reclen uint16
150 Type uint8
151 Name [256]int8
152 _ [5]byte
141153 }
142154
143155 type Fsid struct {
144 X__val [2]int32
156 Val [2]int32
145157 }
146158
147159 type Flock_t struct {
148 Type int16
149 Whence int16
150 Pad_cgo_0 [4]byte
151 Start int64
152 Len int64
153 Pid int32
154 Pad_cgo_1 [4]byte
160 Type int16
161 Whence int16
162 Start int64
163 Len int64
164 Pid int32
165 _ [4]byte
155166 }
156167
157168 type FscryptPolicy struct {
226237 Channel uint16
227238 }
228239
240 type RawSockaddrL2 struct {
241 Family uint16
242 Psm uint16
243 Bdaddr [6]uint8
244 Cid uint16
245 Bdaddr_type uint8
246 _ [1]byte
247 }
248
249 type RawSockaddrRFCOMM struct {
250 Family uint16
251 Bdaddr [6]uint8
252 Channel uint8
253 _ [1]byte
254 }
255
229256 type RawSockaddrCAN struct {
230 Family uint16
231 Pad_cgo_0 [2]byte
232 Ifindex int32
233 Addr [8]byte
257 Family uint16
258 Ifindex int32
259 Addr [8]byte
234260 }
235261
236262 type RawSockaddrALG struct {
249275 Zero [4]uint8
250276 }
251277
278 type RawSockaddrXDP struct {
279 Family uint16
280 Flags uint16
281 Ifindex uint32
282 Queue_id uint32
283 Shared_umem_fd uint32
284 }
285
286 type RawSockaddrPPPoX [0x1e]byte
287
252288 type RawSockaddr struct {
253289 Family uint16
254290 Data [14]int8
297333 type Msghdr struct {
298334 Name *byte
299335 Namelen uint32
300 Pad_cgo_0 [4]byte
301336 Iov *Iovec
302337 Iovlen uint64
303338 Control *byte
304339 Controllen uint64
305340 Flags int32
306 Pad_cgo_1 [4]byte
341 _ [4]byte
307342 }
308343
309344 type Cmsghdr struct {
345380 Probes uint8
346381 Backoff uint8
347382 Options uint8
348 Pad_cgo_0 [2]byte
349383 Rto uint32
350384 Ato uint32
351385 Snd_mss uint32
380414 SizeofSockaddrLinklayer = 0x14
381415 SizeofSockaddrNetlink = 0xc
382416 SizeofSockaddrHCI = 0x6
417 SizeofSockaddrL2 = 0xe
418 SizeofSockaddrRFCOMM = 0xa
383419 SizeofSockaddrCAN = 0x10
384420 SizeofSockaddrALG = 0x58
385421 SizeofSockaddrVM = 0x10
422 SizeofSockaddrXDP = 0x10
423 SizeofSockaddrPPPoX = 0x1e
386424 SizeofLinger = 0x8
387425 SizeofIovec = 0x10
388426 SizeofIPMreq = 0x8
400438 )
401439
402440 const (
403 IFA_UNSPEC = 0x0
404 IFA_ADDRESS = 0x1
405 IFA_LOCAL = 0x2
406 IFA_LABEL = 0x3
407 IFA_BROADCAST = 0x4
408 IFA_ANYCAST = 0x5
409 IFA_CACHEINFO = 0x6
410 IFA_MULTICAST = 0x7
411 IFLA_UNSPEC = 0x0
412 IFLA_ADDRESS = 0x1
413 IFLA_BROADCAST = 0x2
414 IFLA_IFNAME = 0x3
415 IFLA_MTU = 0x4
416 IFLA_LINK = 0x5
417 IFLA_QDISC = 0x6
418 IFLA_STATS = 0x7
419 IFLA_COST = 0x8
420 IFLA_PRIORITY = 0x9
421 IFLA_MASTER = 0xa
422 IFLA_WIRELESS = 0xb
423 IFLA_PROTINFO = 0xc
424 IFLA_TXQLEN = 0xd
425 IFLA_MAP = 0xe
426 IFLA_WEIGHT = 0xf
427 IFLA_OPERSTATE = 0x10
428 IFLA_LINKMODE = 0x11
429 IFLA_LINKINFO = 0x12
430 IFLA_NET_NS_PID = 0x13
431 IFLA_IFALIAS = 0x14
432 IFLA_MAX = 0x2c
433 RT_SCOPE_UNIVERSE = 0x0
434 RT_SCOPE_SITE = 0xc8
435 RT_SCOPE_LINK = 0xfd
436 RT_SCOPE_HOST = 0xfe
437 RT_SCOPE_NOWHERE = 0xff
438 RT_TABLE_UNSPEC = 0x0
439 RT_TABLE_COMPAT = 0xfc
440 RT_TABLE_DEFAULT = 0xfd
441 RT_TABLE_MAIN = 0xfe
442 RT_TABLE_LOCAL = 0xff
443 RT_TABLE_MAX = 0xffffffff
444 RTA_UNSPEC = 0x0
445 RTA_DST = 0x1
446 RTA_SRC = 0x2
447 RTA_IIF = 0x3
448 RTA_OIF = 0x4
449 RTA_GATEWAY = 0x5
450 RTA_PRIORITY = 0x6
451 RTA_PREFSRC = 0x7
452 RTA_METRICS = 0x8
453 RTA_MULTIPATH = 0x9
454 RTA_FLOW = 0xb
455 RTA_CACHEINFO = 0xc
456 RTA_TABLE = 0xf
457 RTN_UNSPEC = 0x0
458 RTN_UNICAST = 0x1
459 RTN_LOCAL = 0x2
460 RTN_BROADCAST = 0x3
461 RTN_ANYCAST = 0x4
462 RTN_MULTICAST = 0x5
463 RTN_BLACKHOLE = 0x6
464 RTN_UNREACHABLE = 0x7
465 RTN_PROHIBIT = 0x8
466 RTN_THROW = 0x9
467 RTN_NAT = 0xa
468 RTN_XRESOLVE = 0xb
469 RTNLGRP_NONE = 0x0
470 RTNLGRP_LINK = 0x1
471 RTNLGRP_NOTIFY = 0x2
472 RTNLGRP_NEIGH = 0x3
473 RTNLGRP_TC = 0x4
474 RTNLGRP_IPV4_IFADDR = 0x5
475 RTNLGRP_IPV4_MROUTE = 0x6
476 RTNLGRP_IPV4_ROUTE = 0x7
477 RTNLGRP_IPV4_RULE = 0x8
478 RTNLGRP_IPV6_IFADDR = 0x9
479 RTNLGRP_IPV6_MROUTE = 0xa
480 RTNLGRP_IPV6_ROUTE = 0xb
481 RTNLGRP_IPV6_IFINFO = 0xc
482 RTNLGRP_IPV6_PREFIX = 0x12
483 RTNLGRP_IPV6_RULE = 0x13
484 RTNLGRP_ND_USEROPT = 0x14
485 SizeofNlMsghdr = 0x10
486 SizeofNlMsgerr = 0x14
487 SizeofRtGenmsg = 0x1
488 SizeofNlAttr = 0x4
489 SizeofRtAttr = 0x4
490 SizeofIfInfomsg = 0x10
491 SizeofIfAddrmsg = 0x8
492 SizeofRtMsg = 0xc
493 SizeofRtNexthop = 0x8
441 IFA_UNSPEC = 0x0
442 IFA_ADDRESS = 0x1
443 IFA_LOCAL = 0x2
444 IFA_LABEL = 0x3
445 IFA_BROADCAST = 0x4
446 IFA_ANYCAST = 0x5
447 IFA_CACHEINFO = 0x6
448 IFA_MULTICAST = 0x7
449 IFLA_UNSPEC = 0x0
450 IFLA_ADDRESS = 0x1
451 IFLA_BROADCAST = 0x2
452 IFLA_IFNAME = 0x3
453 IFLA_INFO_KIND = 0x1
454 IFLA_MTU = 0x4
455 IFLA_LINK = 0x5
456 IFLA_QDISC = 0x6
457 IFLA_STATS = 0x7
458 IFLA_COST = 0x8
459 IFLA_PRIORITY = 0x9
460 IFLA_MASTER = 0xa
461 IFLA_WIRELESS = 0xb
462 IFLA_PROTINFO = 0xc
463 IFLA_TXQLEN = 0xd
464 IFLA_MAP = 0xe
465 IFLA_WEIGHT = 0xf
466 IFLA_OPERSTATE = 0x10
467 IFLA_LINKMODE = 0x11
468 IFLA_LINKINFO = 0x12
469 IFLA_NET_NS_PID = 0x13
470 IFLA_IFALIAS = 0x14
471 IFLA_NUM_VF = 0x15
472 IFLA_VFINFO_LIST = 0x16
473 IFLA_STATS64 = 0x17
474 IFLA_VF_PORTS = 0x18
475 IFLA_PORT_SELF = 0x19
476 IFLA_AF_SPEC = 0x1a
477 IFLA_GROUP = 0x1b
478 IFLA_NET_NS_FD = 0x1c
479 IFLA_EXT_MASK = 0x1d
480 IFLA_PROMISCUITY = 0x1e
481 IFLA_NUM_TX_QUEUES = 0x1f
482 IFLA_NUM_RX_QUEUES = 0x20
483 IFLA_CARRIER = 0x21
484 IFLA_PHYS_PORT_ID = 0x22
485 IFLA_CARRIER_CHANGES = 0x23
486 IFLA_PHYS_SWITCH_ID = 0x24
487 IFLA_LINK_NETNSID = 0x25
488 IFLA_PHYS_PORT_NAME = 0x26
489 IFLA_PROTO_DOWN = 0x27
490 IFLA_GSO_MAX_SEGS = 0x28
491 IFLA_GSO_MAX_SIZE = 0x29
492 IFLA_PAD = 0x2a
493 IFLA_XDP = 0x2b
494 IFLA_EVENT = 0x2c
495 IFLA_NEW_NETNSID = 0x2d
496 IFLA_IF_NETNSID = 0x2e
497 IFLA_MAX = 0x33
498 RT_SCOPE_UNIVERSE = 0x0
499 RT_SCOPE_SITE = 0xc8
500 RT_SCOPE_LINK = 0xfd
501 RT_SCOPE_HOST = 0xfe
502 RT_SCOPE_NOWHERE = 0xff
503 RT_TABLE_UNSPEC = 0x0
504 RT_TABLE_COMPAT = 0xfc
505 RT_TABLE_DEFAULT = 0xfd
506 RT_TABLE_MAIN = 0xfe
507 RT_TABLE_LOCAL = 0xff
508 RT_TABLE_MAX = 0xffffffff
509 RTA_UNSPEC = 0x0
510 RTA_DST = 0x1
511 RTA_SRC = 0x2
512 RTA_IIF = 0x3
513 RTA_OIF = 0x4
514 RTA_GATEWAY = 0x5
515 RTA_PRIORITY = 0x6
516 RTA_PREFSRC = 0x7
517 RTA_METRICS = 0x8
518 RTA_MULTIPATH = 0x9
519 RTA_FLOW = 0xb
520 RTA_CACHEINFO = 0xc
521 RTA_TABLE = 0xf
522 RTA_MARK = 0x10
523 RTA_MFC_STATS = 0x11
524 RTA_VIA = 0x12
525 RTA_NEWDST = 0x13
526 RTA_PREF = 0x14
527 RTA_ENCAP_TYPE = 0x15
528 RTA_ENCAP = 0x16
529 RTA_EXPIRES = 0x17
530 RTA_PAD = 0x18
531 RTA_UID = 0x19
532 RTA_TTL_PROPAGATE = 0x1a
533 RTA_IP_PROTO = 0x1b
534 RTA_SPORT = 0x1c
535 RTA_DPORT = 0x1d
536 RTN_UNSPEC = 0x0
537 RTN_UNICAST = 0x1
538 RTN_LOCAL = 0x2
539 RTN_BROADCAST = 0x3
540 RTN_ANYCAST = 0x4
541 RTN_MULTICAST = 0x5
542 RTN_BLACKHOLE = 0x6
543 RTN_UNREACHABLE = 0x7
544 RTN_PROHIBIT = 0x8
545 RTN_THROW = 0x9
546 RTN_NAT = 0xa
547 RTN_XRESOLVE = 0xb
548 RTNLGRP_NONE = 0x0
549 RTNLGRP_LINK = 0x1
550 RTNLGRP_NOTIFY = 0x2
551 RTNLGRP_NEIGH = 0x3
552 RTNLGRP_TC = 0x4
553 RTNLGRP_IPV4_IFADDR = 0x5
554 RTNLGRP_IPV4_MROUTE = 0x6
555 RTNLGRP_IPV4_ROUTE = 0x7
556 RTNLGRP_IPV4_RULE = 0x8
557 RTNLGRP_IPV6_IFADDR = 0x9
558 RTNLGRP_IPV6_MROUTE = 0xa
559 RTNLGRP_IPV6_ROUTE = 0xb
560 RTNLGRP_IPV6_IFINFO = 0xc
561 RTNLGRP_IPV6_PREFIX = 0x12
562 RTNLGRP_IPV6_RULE = 0x13
563 RTNLGRP_ND_USEROPT = 0x14
564 SizeofNlMsghdr = 0x10
565 SizeofNlMsgerr = 0x14
566 SizeofRtGenmsg = 0x1
567 SizeofNlAttr = 0x4
568 SizeofRtAttr = 0x4
569 SizeofIfInfomsg = 0x10
570 SizeofIfAddrmsg = 0x8
571 SizeofRtMsg = 0xc
572 SizeofRtNexthop = 0x8
494573 )
495574
496575 type NlMsghdr struct {
521600 }
522601
523602 type IfInfomsg struct {
524 Family uint8
525 X__ifi_pad uint8
526 Type uint16
527 Index int32
528 Flags uint32
529 Change uint32
603 Family uint8
604 _ uint8
605 Type uint16
606 Index int32
607 Flags uint32
608 Change uint32
530609 }
531610
532611 type IfAddrmsg struct {
569648 }
570649
571650 type SockFprog struct {
572 Len uint16
573 Pad_cgo_0 [6]byte
574 Filter *SockFilter
651 Len uint16
652 Filter *SockFilter
575653 }
576654
577655 type InotifyEvent struct {
608686 Freeswap uint64
609687 Procs uint16
610688 Pad uint16
611 Pad_cgo_0 [4]byte
612689 Totalhigh uint64
613690 Freehigh uint64
614691 Unit uint32
615 X_f [0]int8
616 Pad_cgo_1 [4]byte
692 _ [0]int8
693 _ [4]byte
617694 }
618695
619696 type Utsname struct {
620 Sysname [65]int8
621 Nodename [65]int8
622 Release [65]int8
623 Version [65]int8
624 Machine [65]int8
625 Domainname [65]int8
697 Sysname [65]byte
698 Nodename [65]byte
699 Release [65]byte
700 Version [65]byte
701 Machine [65]byte
702 Domainname [65]byte
626703 }
627704
628705 type Ustat_t struct {
629 Tfree int32
630 Pad_cgo_0 [4]byte
631 Tinode uint64
632 Fname [6]int8
633 Fpack [6]int8
634 Pad_cgo_1 [4]byte
706 Tfree int32
707 Tinode uint64
708 Fname [6]int8
709 Fpack [6]int8
710 _ [4]byte
635711 }
636712
637713 type EpollEvent struct {
641717 }
642718
643719 const (
644 AT_FDCWD = -0x64
645 AT_REMOVEDIR = 0x200
720 AT_EMPTY_PATH = 0x1000
721 AT_FDCWD = -0x64
722 AT_NO_AUTOMOUNT = 0x800
723 AT_REMOVEDIR = 0x200
724
725 AT_STATX_SYNC_AS_STAT = 0x0
726 AT_STATX_FORCE_SYNC = 0x2000
727 AT_STATX_DONT_SYNC = 0x4000
728
646729 AT_SYMLINK_FOLLOW = 0x400
647730 AT_SYMLINK_NOFOLLOW = 0x100
731
732 AT_EACCESS = 0x200
648733 )
649734
650735 type PollFd struct {
664749 )
665750
666751 type Sigset_t struct {
667 X__val [16]uint64
752 Val [16]uint64
753 }
754
755 type SignalfdSiginfo struct {
756 Signo uint32
757 Errno int32
758 Code int32
759 Pid uint32
760 Uid uint32
761 Fd int32
762 Tid uint32
763 Band uint32
764 Overrun uint32
765 Trapno uint32
766 Status int32
767 Int int32
768 Ptr uint64
769 Utime uint64
770 Stime uint64
771 Addr uint64
772 _ [48]uint8
668773 }
669774
670775 const RNDGETENTCNT = 0x40045200
691796
692797 type Taskstats struct {
693798 Version uint16
694 Pad_cgo_0 [2]byte
695799 Ac_exitcode uint32
696800 Ac_flag uint8
697801 Ac_nice uint8
698 Pad_cgo_1 [6]byte
699802 Cpu_count uint64
700803 Cpu_delay_total uint64
701804 Blkio_count uint64
707810 Ac_comm [32]int8
708811 Ac_sched uint8
709812 Ac_pad [3]uint8
710 Pad_cgo_2 [4]byte
813 _ [4]byte
711814 Ac_uid uint32
712815 Ac_gid uint32
713816 Ac_pid uint32
714817 Ac_ppid uint32
715818 Ac_btime uint32
716 Pad_cgo_3 [4]byte
717819 Ac_etime uint64
718820 Ac_utime uint64
719821 Ac_stime uint64
737839 Cpu_scaled_run_real_total uint64
738840 Freepages_count uint64
739841 Freepages_delay_total uint64
842 Thrashing_count uint64
843 Thrashing_delay_total uint64
740844 }
741845
742846 const (
755859 TASKSTATS_CMD_ATTR_TGID = 0x2
756860 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
757861 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
862 )
863
864 type CGroupStats struct {
865 Sleeping uint64
866 Running uint64
867 Stopped uint64
868 Uninterruptible uint64
869 Io_wait uint64
870 }
871
872 const (
873 CGROUPSTATS_CMD_UNSPEC = 0x3
874 CGROUPSTATS_CMD_GET = 0x4
875 CGROUPSTATS_CMD_NEW = 0x5
876 CGROUPSTATS_TYPE_UNSPEC = 0x0
877 CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
878 CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
879 CGROUPSTATS_CMD_ATTR_FD = 0x1
758880 )
759881
760882 type Genlmsghdr struct {
789911 CTRL_ATTR_MCAST_GRP_NAME = 0x1
790912 CTRL_ATTR_MCAST_GRP_ID = 0x2
791913 )
914
915 type cpuMask uint64
916
917 const (
918 _CPU_SETSIZE = 0x400
919 _NCPUBITS = 0x40
920 )
921
922 const (
923 BDADDR_BREDR = 0x0
924 BDADDR_LE_PUBLIC = 0x1
925 BDADDR_LE_RANDOM = 0x2
926 )
927
928 type PerfEventAttr struct {
929 Type uint32
930 Size uint32
931 Config uint64
932 Sample uint64
933 Sample_type uint64
934 Read_format uint64
935 Bits uint64
936 Wakeup uint32
937 Bp_type uint32
938 Ext1 uint64
939 Ext2 uint64
940 Branch_sample_type uint64
941 Sample_regs_user uint64
942 Sample_stack_user uint32
943 Clockid int32
944 Sample_regs_intr uint64
945 Aux_watermark uint32
946 _ uint32
947 }
948
949 type PerfEventMmapPage struct {
950 Version uint32
951 Compat_version uint32
952 Lock uint32
953 Index uint32
954 Offset int64
955 Time_enabled uint64
956 Time_running uint64
957 Capabilities uint64
958 Pmc_width uint16
959 Time_shift uint16
960 Time_mult uint32
961 Time_offset uint64
962 Time_zero uint64
963 Size uint32
964 _ [948]uint8
965 Data_head uint64
966 Data_tail uint64
967 Data_offset uint64
968 Data_size uint64
969 Aux_head uint64
970 Aux_tail uint64
971 Aux_offset uint64
972 Aux_size uint64
973 }
974
975 const (
976 PerfBitDisabled uint64 = CBitFieldMaskBit0
977 PerfBitInherit = CBitFieldMaskBit1
978 PerfBitPinned = CBitFieldMaskBit2
979 PerfBitExclusive = CBitFieldMaskBit3
980 PerfBitExcludeUser = CBitFieldMaskBit4
981 PerfBitExcludeKernel = CBitFieldMaskBit5
982 PerfBitExcludeHv = CBitFieldMaskBit6
983 PerfBitExcludeIdle = CBitFieldMaskBit7
984 PerfBitMmap = CBitFieldMaskBit8
985 PerfBitComm = CBitFieldMaskBit9
986 PerfBitFreq = CBitFieldMaskBit10
987 PerfBitInheritStat = CBitFieldMaskBit11
988 PerfBitEnableOnExec = CBitFieldMaskBit12
989 PerfBitTask = CBitFieldMaskBit13
990 PerfBitWatermark = CBitFieldMaskBit14
991 PerfBitPreciseIPBit1 = CBitFieldMaskBit15
992 PerfBitPreciseIPBit2 = CBitFieldMaskBit16
993 PerfBitMmapData = CBitFieldMaskBit17
994 PerfBitSampleIDAll = CBitFieldMaskBit18
995 PerfBitExcludeHost = CBitFieldMaskBit19
996 PerfBitExcludeGuest = CBitFieldMaskBit20
997 PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
998 PerfBitExcludeCallchainUser = CBitFieldMaskBit22
999 PerfBitMmap2 = CBitFieldMaskBit23
1000 PerfBitCommExec = CBitFieldMaskBit24
1001 PerfBitUseClockID = CBitFieldMaskBit25
1002 PerfBitContextSwitch = CBitFieldMaskBit26
1003 )
1004
1005 const (
1006 PERF_TYPE_HARDWARE = 0x0
1007 PERF_TYPE_SOFTWARE = 0x1
1008 PERF_TYPE_TRACEPOINT = 0x2
1009 PERF_TYPE_HW_CACHE = 0x3
1010 PERF_TYPE_RAW = 0x4
1011 PERF_TYPE_BREAKPOINT = 0x5
1012
1013 PERF_COUNT_HW_CPU_CYCLES = 0x0
1014 PERF_COUNT_HW_INSTRUCTIONS = 0x1
1015 PERF_COUNT_HW_CACHE_REFERENCES = 0x2
1016 PERF_COUNT_HW_CACHE_MISSES = 0x3
1017 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
1018 PERF_COUNT_HW_BRANCH_MISSES = 0x5
1019 PERF_COUNT_HW_BUS_CYCLES = 0x6
1020 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
1021 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
1022 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
1023
1024 PERF_COUNT_HW_CACHE_L1D = 0x0
1025 PERF_COUNT_HW_CACHE_L1I = 0x1
1026 PERF_COUNT_HW_CACHE_LL = 0x2
1027 PERF_COUNT_HW_CACHE_DTLB = 0x3
1028 PERF_COUNT_HW_CACHE_ITLB = 0x4
1029 PERF_COUNT_HW_CACHE_BPU = 0x5
1030 PERF_COUNT_HW_CACHE_NODE = 0x6
1031
1032 PERF_COUNT_HW_CACHE_OP_READ = 0x0
1033 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
1034 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
1035
1036 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
1037 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
1038
1039 PERF_COUNT_SW_CPU_CLOCK = 0x0
1040 PERF_COUNT_SW_TASK_CLOCK = 0x1
1041 PERF_COUNT_SW_PAGE_FAULTS = 0x2
1042 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
1043 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
1044 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
1045 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
1046 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
1047 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
1048 PERF_COUNT_SW_DUMMY = 0x9
1049
1050 PERF_SAMPLE_IP = 0x1
1051 PERF_SAMPLE_TID = 0x2
1052 PERF_SAMPLE_TIME = 0x4
1053 PERF_SAMPLE_ADDR = 0x8
1054 PERF_SAMPLE_READ = 0x10
1055 PERF_SAMPLE_CALLCHAIN = 0x20
1056 PERF_SAMPLE_ID = 0x40
1057 PERF_SAMPLE_CPU = 0x80
1058 PERF_SAMPLE_PERIOD = 0x100
1059 PERF_SAMPLE_STREAM_ID = 0x200
1060 PERF_SAMPLE_RAW = 0x400
1061 PERF_SAMPLE_BRANCH_STACK = 0x800
1062
1063 PERF_SAMPLE_BRANCH_USER = 0x1
1064 PERF_SAMPLE_BRANCH_KERNEL = 0x2
1065 PERF_SAMPLE_BRANCH_HV = 0x4
1066 PERF_SAMPLE_BRANCH_ANY = 0x8
1067 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
1068 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
1069 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
1070
1071 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
1072 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
1073 PERF_FORMAT_ID = 0x4
1074 PERF_FORMAT_GROUP = 0x8
1075
1076 PERF_RECORD_MMAP = 0x1
1077 PERF_RECORD_LOST = 0x2
1078 PERF_RECORD_COMM = 0x3
1079 PERF_RECORD_EXIT = 0x4
1080 PERF_RECORD_THROTTLE = 0x5
1081 PERF_RECORD_UNTHROTTLE = 0x6
1082 PERF_RECORD_FORK = 0x7
1083 PERF_RECORD_READ = 0x8
1084 PERF_RECORD_SAMPLE = 0x9
1085
1086 PERF_CONTEXT_HV = -0x20
1087 PERF_CONTEXT_KERNEL = -0x80
1088 PERF_CONTEXT_USER = -0x200
1089
1090 PERF_CONTEXT_GUEST = -0x800
1091 PERF_CONTEXT_GUEST_KERNEL = -0x880
1092 PERF_CONTEXT_GUEST_USER = -0xa00
1093
1094 PERF_FLAG_FD_NO_GROUP = 0x1
1095 PERF_FLAG_FD_OUTPUT = 0x2
1096 PERF_FLAG_PID_CGROUP = 0x4
1097 )
1098
1099 const (
1100 CBitFieldMaskBit0 = 0x1
1101 CBitFieldMaskBit1 = 0x2
1102 CBitFieldMaskBit2 = 0x4
1103 CBitFieldMaskBit3 = 0x8
1104 CBitFieldMaskBit4 = 0x10
1105 CBitFieldMaskBit5 = 0x20
1106 CBitFieldMaskBit6 = 0x40
1107 CBitFieldMaskBit7 = 0x80
1108 CBitFieldMaskBit8 = 0x100
1109 CBitFieldMaskBit9 = 0x200
1110 CBitFieldMaskBit10 = 0x400
1111 CBitFieldMaskBit11 = 0x800
1112 CBitFieldMaskBit12 = 0x1000
1113 CBitFieldMaskBit13 = 0x2000
1114 CBitFieldMaskBit14 = 0x4000
1115 CBitFieldMaskBit15 = 0x8000
1116 CBitFieldMaskBit16 = 0x10000
1117 CBitFieldMaskBit17 = 0x20000
1118 CBitFieldMaskBit18 = 0x40000
1119 CBitFieldMaskBit19 = 0x80000
1120 CBitFieldMaskBit20 = 0x100000
1121 CBitFieldMaskBit21 = 0x200000
1122 CBitFieldMaskBit22 = 0x400000
1123 CBitFieldMaskBit23 = 0x800000
1124 CBitFieldMaskBit24 = 0x1000000
1125 CBitFieldMaskBit25 = 0x2000000
1126 CBitFieldMaskBit26 = 0x4000000
1127 CBitFieldMaskBit27 = 0x8000000
1128 CBitFieldMaskBit28 = 0x10000000
1129 CBitFieldMaskBit29 = 0x20000000
1130 CBitFieldMaskBit30 = 0x40000000
1131 CBitFieldMaskBit31 = 0x80000000
1132 CBitFieldMaskBit32 = 0x100000000
1133 CBitFieldMaskBit33 = 0x200000000
1134 CBitFieldMaskBit34 = 0x400000000
1135 CBitFieldMaskBit35 = 0x800000000
1136 CBitFieldMaskBit36 = 0x1000000000
1137 CBitFieldMaskBit37 = 0x2000000000
1138 CBitFieldMaskBit38 = 0x4000000000
1139 CBitFieldMaskBit39 = 0x8000000000
1140 CBitFieldMaskBit40 = 0x10000000000
1141 CBitFieldMaskBit41 = 0x20000000000
1142 CBitFieldMaskBit42 = 0x40000000000
1143 CBitFieldMaskBit43 = 0x80000000000
1144 CBitFieldMaskBit44 = 0x100000000000
1145 CBitFieldMaskBit45 = 0x200000000000
1146 CBitFieldMaskBit46 = 0x400000000000
1147 CBitFieldMaskBit47 = 0x800000000000
1148 CBitFieldMaskBit48 = 0x1000000000000
1149 CBitFieldMaskBit49 = 0x2000000000000
1150 CBitFieldMaskBit50 = 0x4000000000000
1151 CBitFieldMaskBit51 = 0x8000000000000
1152 CBitFieldMaskBit52 = 0x10000000000000
1153 CBitFieldMaskBit53 = 0x20000000000000
1154 CBitFieldMaskBit54 = 0x40000000000000
1155 CBitFieldMaskBit55 = 0x80000000000000
1156 CBitFieldMaskBit56 = 0x100000000000000
1157 CBitFieldMaskBit57 = 0x200000000000000
1158 CBitFieldMaskBit58 = 0x400000000000000
1159 CBitFieldMaskBit59 = 0x800000000000000
1160 CBitFieldMaskBit60 = 0x1000000000000000
1161 CBitFieldMaskBit61 = 0x2000000000000000
1162 CBitFieldMaskBit62 = 0x4000000000000000
1163 CBitFieldMaskBit63 = 0x8000000000000000
1164 )
1165
1166 type SockaddrStorage struct {
1167 Family uint16
1168 _ [118]int8
1169 _ uint64
1170 }
1171
1172 type TCPMD5Sig struct {
1173 Addr SockaddrStorage
1174 Flags uint8
1175 Prefixlen uint8
1176 Keylen uint16
1177 _ uint32
1178 Key [80]uint8
1179 }
1180
1181 type HDDriveCmdHdr struct {
1182 Command uint8
1183 Number uint8
1184 Feature uint8
1185 Count uint8
1186 }
1187
1188 type HDGeometry struct {
1189 Heads uint8
1190 Sectors uint8
1191 Cylinders uint16
1192 Start uint64
1193 }
1194
1195 type HDDriveID struct {
1196 Config uint16
1197 Cyls uint16
1198 Reserved2 uint16
1199 Heads uint16
1200 Track_bytes uint16
1201 Sector_bytes uint16
1202 Sectors uint16
1203 Vendor0 uint16
1204 Vendor1 uint16
1205 Vendor2 uint16
1206 Serial_no [20]uint8
1207 Buf_type uint16
1208 Buf_size uint16
1209 Ecc_bytes uint16
1210 Fw_rev [8]uint8
1211 Model [40]uint8
1212 Max_multsect uint8
1213 Vendor3 uint8
1214 Dword_io uint16
1215 Vendor4 uint8
1216 Capability uint8
1217 Reserved50 uint16
1218 Vendor5 uint8
1219 TPIO uint8
1220 Vendor6 uint8
1221 TDMA uint8
1222 Field_valid uint16
1223 Cur_cyls uint16
1224 Cur_heads uint16
1225 Cur_sectors uint16
1226 Cur_capacity0 uint16
1227 Cur_capacity1 uint16
1228 Multsect uint8
1229 Multsect_valid uint8
1230 Lba_capacity uint32
1231 Dma_1word uint16
1232 Dma_mword uint16
1233 Eide_pio_modes uint16
1234 Eide_dma_min uint16
1235 Eide_dma_time uint16
1236 Eide_pio uint16
1237 Eide_pio_iordy uint16
1238 Words69_70 [2]uint16
1239 Words71_74 [4]uint16
1240 Queue_depth uint16
1241 Words76_79 [4]uint16
1242 Major_rev_num uint16
1243 Minor_rev_num uint16
1244 Command_set_1 uint16
1245 Command_set_2 uint16
1246 Cfsse uint16
1247 Cfs_enable_1 uint16
1248 Cfs_enable_2 uint16
1249 Csf_default uint16
1250 Dma_ultra uint16
1251 Trseuc uint16
1252 TrsEuc uint16
1253 CurAPMvalues uint16
1254 Mprc uint16
1255 Hw_config uint16
1256 Acoustic uint16
1257 Msrqs uint16
1258 Sxfert uint16
1259 Sal uint16
1260 Spg uint32
1261 Lba_capacity_2 uint64
1262 Words104_125 [22]uint16
1263 Last_lun uint16
1264 Word127 uint16
1265 Dlf uint16
1266 Csfo uint16
1267 Words130_155 [26]uint16
1268 Word156 uint16
1269 Words157_159 [3]uint16
1270 Cfa_power uint16
1271 Words161_175 [15]uint16
1272 Words176_205 [30]uint16
1273 Words206_254 [49]uint16
1274 Integrity_word uint16
1275 }
1276
1277 type Statfs_t struct {
1278 Type int64
1279 Bsize int64
1280 Frsize int64
1281 Blocks uint64
1282 Bfree uint64
1283 Files uint64
1284 Ffree uint64
1285 Bavail uint64
1286 Fsid Fsid
1287 Namelen int64
1288 Flags int64
1289 Spare [5]int64
1290 }
1291
1292 const (
1293 ST_MANDLOCK = 0x40
1294 ST_NOATIME = 0x400
1295 ST_NODEV = 0x4
1296 ST_NODIRATIME = 0x800
1297 ST_NOEXEC = 0x8
1298 ST_NOSUID = 0x2
1299 ST_RDONLY = 0x1
1300 ST_RELATIME = 0x1000
1301 ST_SYNCHRONOUS = 0x10
1302 )
1303
1304 type TpacketHdr struct {
1305 Status uint64
1306 Len uint32
1307 Snaplen uint32
1308 Mac uint16
1309 Net uint16
1310 Sec uint32
1311 Usec uint32
1312 _ [4]byte
1313 }
1314
1315 type Tpacket2Hdr struct {
1316 Status uint32
1317 Len uint32
1318 Snaplen uint32
1319 Mac uint16
1320 Net uint16
1321 Sec uint32
1322 Nsec uint32
1323 Vlan_tci uint16
1324 Vlan_tpid uint16
1325 _ [4]uint8
1326 }
1327
1328 type Tpacket3Hdr struct {
1329 Next_offset uint32
1330 Sec uint32
1331 Nsec uint32
1332 Snaplen uint32
1333 Len uint32
1334 Status uint32
1335 Mac uint16
1336 Net uint16
1337 Hv1 TpacketHdrVariant1
1338 _ [8]uint8
1339 }
1340
1341 type TpacketHdrVariant1 struct {
1342 Rxhash uint32
1343 Vlan_tci uint32
1344 Vlan_tpid uint16
1345 _ uint16
1346 }
1347
1348 type TpacketBlockDesc struct {
1349 Version uint32
1350 To_priv uint32
1351 Hdr [40]byte
1352 }
1353
1354 type TpacketReq struct {
1355 Block_size uint32
1356 Block_nr uint32
1357 Frame_size uint32
1358 Frame_nr uint32
1359 }
1360
1361 type TpacketReq3 struct {
1362 Block_size uint32
1363 Block_nr uint32
1364 Frame_size uint32
1365 Frame_nr uint32
1366 Retire_blk_tov uint32
1367 Sizeof_priv uint32
1368 Feature_req_word uint32
1369 }
1370
1371 type TpacketStats struct {
1372 Packets uint32
1373 Drops uint32
1374 }
1375
1376 type TpacketStatsV3 struct {
1377 Packets uint32
1378 Drops uint32
1379 Freeze_q_cnt uint32
1380 }
1381
1382 type TpacketAuxdata struct {
1383 Status uint32
1384 Len uint32
1385 Snaplen uint32
1386 Mac uint16
1387 Net uint16
1388 Vlan_tci uint16
1389 Vlan_tpid uint16
1390 }
1391
1392 const (
1393 TPACKET_V1 = 0x0
1394 TPACKET_V2 = 0x1
1395 TPACKET_V3 = 0x2
1396 )
1397
1398 const (
1399 SizeofTpacketHdr = 0x20
1400 SizeofTpacket2Hdr = 0x20
1401 SizeofTpacket3Hdr = 0x30
1402 )
1403
1404 const (
1405 NF_INET_PRE_ROUTING = 0x0
1406 NF_INET_LOCAL_IN = 0x1
1407 NF_INET_FORWARD = 0x2
1408 NF_INET_LOCAL_OUT = 0x3
1409 NF_INET_POST_ROUTING = 0x4
1410 NF_INET_NUMHOOKS = 0x5
1411 )
1412
1413 const (
1414 NF_NETDEV_INGRESS = 0x0
1415 NF_NETDEV_NUMHOOKS = 0x1
1416 )
1417
1418 const (
1419 NFPROTO_UNSPEC = 0x0
1420 NFPROTO_INET = 0x1
1421 NFPROTO_IPV4 = 0x2
1422 NFPROTO_ARP = 0x3
1423 NFPROTO_NETDEV = 0x5
1424 NFPROTO_BRIDGE = 0x7
1425 NFPROTO_IPV6 = 0xa
1426 NFPROTO_DECNET = 0xc
1427 NFPROTO_NUMPROTO = 0xd
1428 )
1429
1430 type Nfgenmsg struct {
1431 Nfgen_family uint8
1432 Version uint8
1433 Res_id uint16
1434 }
1435
1436 const (
1437 NFNL_BATCH_UNSPEC = 0x0
1438 NFNL_BATCH_GENID = 0x1
1439 )
1440
1441 const (
1442 NFT_REG_VERDICT = 0x0
1443 NFT_REG_1 = 0x1
1444 NFT_REG_2 = 0x2
1445 NFT_REG_3 = 0x3
1446 NFT_REG_4 = 0x4
1447 NFT_REG32_00 = 0x8
1448 NFT_REG32_01 = 0x9
1449 NFT_REG32_02 = 0xa
1450 NFT_REG32_03 = 0xb
1451 NFT_REG32_04 = 0xc
1452 NFT_REG32_05 = 0xd
1453 NFT_REG32_06 = 0xe
1454 NFT_REG32_07 = 0xf
1455 NFT_REG32_08 = 0x10
1456 NFT_REG32_09 = 0x11
1457 NFT_REG32_10 = 0x12
1458 NFT_REG32_11 = 0x13
1459 NFT_REG32_12 = 0x14
1460 NFT_REG32_13 = 0x15
1461 NFT_REG32_14 = 0x16
1462 NFT_REG32_15 = 0x17
1463 NFT_CONTINUE = -0x1
1464 NFT_BREAK = -0x2
1465 NFT_JUMP = -0x3
1466 NFT_GOTO = -0x4
1467 NFT_RETURN = -0x5
1468 NFT_MSG_NEWTABLE = 0x0
1469 NFT_MSG_GETTABLE = 0x1
1470 NFT_MSG_DELTABLE = 0x2
1471 NFT_MSG_NEWCHAIN = 0x3
1472 NFT_MSG_GETCHAIN = 0x4
1473 NFT_MSG_DELCHAIN = 0x5
1474 NFT_MSG_NEWRULE = 0x6
1475 NFT_MSG_GETRULE = 0x7
1476 NFT_MSG_DELRULE = 0x8
1477 NFT_MSG_NEWSET = 0x9
1478 NFT_MSG_GETSET = 0xa
1479 NFT_MSG_DELSET = 0xb
1480 NFT_MSG_NEWSETELEM = 0xc
1481 NFT_MSG_GETSETELEM = 0xd
1482 NFT_MSG_DELSETELEM = 0xe
1483 NFT_MSG_NEWGEN = 0xf
1484 NFT_MSG_GETGEN = 0x10
1485 NFT_MSG_TRACE = 0x11
1486 NFT_MSG_NEWOBJ = 0x12
1487 NFT_MSG_GETOBJ = 0x13
1488 NFT_MSG_DELOBJ = 0x14
1489 NFT_MSG_GETOBJ_RESET = 0x15
1490 NFT_MSG_MAX = 0x19
1491 NFTA_LIST_UNPEC = 0x0
1492 NFTA_LIST_ELEM = 0x1
1493 NFTA_HOOK_UNSPEC = 0x0
1494 NFTA_HOOK_HOOKNUM = 0x1
1495 NFTA_HOOK_PRIORITY = 0x2
1496 NFTA_HOOK_DEV = 0x3
1497 NFT_TABLE_F_DORMANT = 0x1
1498 NFTA_TABLE_UNSPEC = 0x0
1499 NFTA_TABLE_NAME = 0x1
1500 NFTA_TABLE_FLAGS = 0x2
1501 NFTA_TABLE_USE = 0x3
1502 NFTA_CHAIN_UNSPEC = 0x0
1503 NFTA_CHAIN_TABLE = 0x1
1504 NFTA_CHAIN_HANDLE = 0x2
1505 NFTA_CHAIN_NAME = 0x3
1506 NFTA_CHAIN_HOOK = 0x4
1507 NFTA_CHAIN_POLICY = 0x5
1508 NFTA_CHAIN_USE = 0x6
1509 NFTA_CHAIN_TYPE = 0x7
1510 NFTA_CHAIN_COUNTERS = 0x8
1511 NFTA_CHAIN_PAD = 0x9
1512 NFTA_RULE_UNSPEC = 0x0
1513 NFTA_RULE_TABLE = 0x1
1514 NFTA_RULE_CHAIN = 0x2
1515 NFTA_RULE_HANDLE = 0x3
1516 NFTA_RULE_EXPRESSIONS = 0x4
1517 NFTA_RULE_COMPAT = 0x5
1518 NFTA_RULE_POSITION = 0x6
1519 NFTA_RULE_USERDATA = 0x7
1520 NFTA_RULE_PAD = 0x8
1521 NFTA_RULE_ID = 0x9
1522 NFT_RULE_COMPAT_F_INV = 0x2
1523 NFT_RULE_COMPAT_F_MASK = 0x2
1524 NFTA_RULE_COMPAT_UNSPEC = 0x0
1525 NFTA_RULE_COMPAT_PROTO = 0x1
1526 NFTA_RULE_COMPAT_FLAGS = 0x2
1527 NFT_SET_ANONYMOUS = 0x1
1528 NFT_SET_CONSTANT = 0x2
1529 NFT_SET_INTERVAL = 0x4
1530 NFT_SET_MAP = 0x8
1531 NFT_SET_TIMEOUT = 0x10
1532 NFT_SET_EVAL = 0x20
1533 NFT_SET_OBJECT = 0x40
1534 NFT_SET_POL_PERFORMANCE = 0x0
1535 NFT_SET_POL_MEMORY = 0x1
1536 NFTA_SET_DESC_UNSPEC = 0x0
1537 NFTA_SET_DESC_SIZE = 0x1
1538 NFTA_SET_UNSPEC = 0x0
1539 NFTA_SET_TABLE = 0x1
1540 NFTA_SET_NAME = 0x2
1541 NFTA_SET_FLAGS = 0x3
1542 NFTA_SET_KEY_TYPE = 0x4
1543 NFTA_SET_KEY_LEN = 0x5
1544 NFTA_SET_DATA_TYPE = 0x6
1545 NFTA_SET_DATA_LEN = 0x7
1546 NFTA_SET_POLICY = 0x8
1547 NFTA_SET_DESC = 0x9
1548 NFTA_SET_ID = 0xa
1549 NFTA_SET_TIMEOUT = 0xb
1550 NFTA_SET_GC_INTERVAL = 0xc
1551 NFTA_SET_USERDATA = 0xd
1552 NFTA_SET_PAD = 0xe
1553 NFTA_SET_OBJ_TYPE = 0xf
1554 NFT_SET_ELEM_INTERVAL_END = 0x1
1555 NFTA_SET_ELEM_UNSPEC = 0x0
1556 NFTA_SET_ELEM_KEY = 0x1
1557 NFTA_SET_ELEM_DATA = 0x2
1558 NFTA_SET_ELEM_FLAGS = 0x3
1559 NFTA_SET_ELEM_TIMEOUT = 0x4
1560 NFTA_SET_ELEM_EXPIRATION = 0x5
1561 NFTA_SET_ELEM_USERDATA = 0x6
1562 NFTA_SET_ELEM_EXPR = 0x7
1563 NFTA_SET_ELEM_PAD = 0x8
1564 NFTA_SET_ELEM_OBJREF = 0x9
1565 NFTA_SET_ELEM_LIST_UNSPEC = 0x0
1566 NFTA_SET_ELEM_LIST_TABLE = 0x1
1567 NFTA_SET_ELEM_LIST_SET = 0x2
1568 NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
1569 NFTA_SET_ELEM_LIST_SET_ID = 0x4
1570 NFT_DATA_VALUE = 0x0
1571 NFT_DATA_VERDICT = 0xffffff00
1572 NFTA_DATA_UNSPEC = 0x0
1573 NFTA_DATA_VALUE = 0x1
1574 NFTA_DATA_VERDICT = 0x2
1575 NFTA_VERDICT_UNSPEC = 0x0
1576 NFTA_VERDICT_CODE = 0x1
1577 NFTA_VERDICT_CHAIN = 0x2
1578 NFTA_EXPR_UNSPEC = 0x0
1579 NFTA_EXPR_NAME = 0x1
1580 NFTA_EXPR_DATA = 0x2
1581 NFTA_IMMEDIATE_UNSPEC = 0x0
1582 NFTA_IMMEDIATE_DREG = 0x1
1583 NFTA_IMMEDIATE_DATA = 0x2
1584 NFTA_BITWISE_UNSPEC = 0x0
1585 NFTA_BITWISE_SREG = 0x1
1586 NFTA_BITWISE_DREG = 0x2
1587 NFTA_BITWISE_LEN = 0x3
1588 NFTA_BITWISE_MASK = 0x4
1589 NFTA_BITWISE_XOR = 0x5
1590 NFT_BYTEORDER_NTOH = 0x0
1591 NFT_BYTEORDER_HTON = 0x1
1592 NFTA_BYTEORDER_UNSPEC = 0x0
1593 NFTA_BYTEORDER_SREG = 0x1
1594 NFTA_BYTEORDER_DREG = 0x2
1595 NFTA_BYTEORDER_OP = 0x3
1596 NFTA_BYTEORDER_LEN = 0x4
1597 NFTA_BYTEORDER_SIZE = 0x5
1598 NFT_CMP_EQ = 0x0
1599 NFT_CMP_NEQ = 0x1
1600 NFT_CMP_LT = 0x2
1601 NFT_CMP_LTE = 0x3
1602 NFT_CMP_GT = 0x4
1603 NFT_CMP_GTE = 0x5
1604 NFTA_CMP_UNSPEC = 0x0
1605 NFTA_CMP_SREG = 0x1
1606 NFTA_CMP_OP = 0x2
1607 NFTA_CMP_DATA = 0x3
1608 NFT_RANGE_EQ = 0x0
1609 NFT_RANGE_NEQ = 0x1
1610 NFTA_RANGE_UNSPEC = 0x0
1611 NFTA_RANGE_SREG = 0x1
1612 NFTA_RANGE_OP = 0x2
1613 NFTA_RANGE_FROM_DATA = 0x3
1614 NFTA_RANGE_TO_DATA = 0x4
1615 NFT_LOOKUP_F_INV = 0x1
1616 NFTA_LOOKUP_UNSPEC = 0x0
1617 NFTA_LOOKUP_SET = 0x1
1618 NFTA_LOOKUP_SREG = 0x2
1619 NFTA_LOOKUP_DREG = 0x3
1620 NFTA_LOOKUP_SET_ID = 0x4
1621 NFTA_LOOKUP_FLAGS = 0x5
1622 NFT_DYNSET_OP_ADD = 0x0
1623 NFT_DYNSET_OP_UPDATE = 0x1
1624 NFT_DYNSET_F_INV = 0x1
1625 NFTA_DYNSET_UNSPEC = 0x0
1626 NFTA_DYNSET_SET_NAME = 0x1
1627 NFTA_DYNSET_SET_ID = 0x2
1628 NFTA_DYNSET_OP = 0x3
1629 NFTA_DYNSET_SREG_KEY = 0x4
1630 NFTA_DYNSET_SREG_DATA = 0x5
1631 NFTA_DYNSET_TIMEOUT = 0x6
1632 NFTA_DYNSET_EXPR = 0x7
1633 NFTA_DYNSET_PAD = 0x8
1634 NFTA_DYNSET_FLAGS = 0x9
1635 NFT_PAYLOAD_LL_HEADER = 0x0
1636 NFT_PAYLOAD_NETWORK_HEADER = 0x1
1637 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
1638 NFT_PAYLOAD_CSUM_NONE = 0x0
1639 NFT_PAYLOAD_CSUM_INET = 0x1
1640 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
1641 NFTA_PAYLOAD_UNSPEC = 0x0
1642 NFTA_PAYLOAD_DREG = 0x1
1643 NFTA_PAYLOAD_BASE = 0x2
1644 NFTA_PAYLOAD_OFFSET = 0x3
1645 NFTA_PAYLOAD_LEN = 0x4
1646 NFTA_PAYLOAD_SREG = 0x5
1647 NFTA_PAYLOAD_CSUM_TYPE = 0x6
1648 NFTA_PAYLOAD_CSUM_OFFSET = 0x7
1649 NFTA_PAYLOAD_CSUM_FLAGS = 0x8
1650 NFT_EXTHDR_F_PRESENT = 0x1
1651 NFT_EXTHDR_OP_IPV6 = 0x0
1652 NFT_EXTHDR_OP_TCPOPT = 0x1
1653 NFTA_EXTHDR_UNSPEC = 0x0
1654 NFTA_EXTHDR_DREG = 0x1
1655 NFTA_EXTHDR_TYPE = 0x2
1656 NFTA_EXTHDR_OFFSET = 0x3
1657 NFTA_EXTHDR_LEN = 0x4
1658 NFTA_EXTHDR_FLAGS = 0x5
1659 NFTA_EXTHDR_OP = 0x6
1660 NFTA_EXTHDR_SREG = 0x7
1661 NFT_META_LEN = 0x0
1662 NFT_META_PROTOCOL = 0x1
1663 NFT_META_PRIORITY = 0x2
1664 NFT_META_MARK = 0x3
1665 NFT_META_IIF = 0x4
1666 NFT_META_OIF = 0x5
1667 NFT_META_IIFNAME = 0x6
1668 NFT_META_OIFNAME = 0x7
1669 NFT_META_IIFTYPE = 0x8
1670 NFT_META_OIFTYPE = 0x9
1671 NFT_META_SKUID = 0xa
1672 NFT_META_SKGID = 0xb
1673 NFT_META_NFTRACE = 0xc
1674 NFT_META_RTCLASSID = 0xd
1675 NFT_META_SECMARK = 0xe
1676 NFT_META_NFPROTO = 0xf
1677 NFT_META_L4PROTO = 0x10
1678 NFT_META_BRI_IIFNAME = 0x11
1679 NFT_META_BRI_OIFNAME = 0x12
1680 NFT_META_PKTTYPE = 0x13
1681 NFT_META_CPU = 0x14
1682 NFT_META_IIFGROUP = 0x15
1683 NFT_META_OIFGROUP = 0x16
1684 NFT_META_CGROUP = 0x17
1685 NFT_META_PRANDOM = 0x18
1686 NFT_RT_CLASSID = 0x0
1687 NFT_RT_NEXTHOP4 = 0x1
1688 NFT_RT_NEXTHOP6 = 0x2
1689 NFT_RT_TCPMSS = 0x3
1690 NFT_HASH_JENKINS = 0x0
1691 NFT_HASH_SYM = 0x1
1692 NFTA_HASH_UNSPEC = 0x0
1693 NFTA_HASH_SREG = 0x1
1694 NFTA_HASH_DREG = 0x2
1695 NFTA_HASH_LEN = 0x3
1696 NFTA_HASH_MODULUS = 0x4
1697 NFTA_HASH_SEED = 0x5
1698 NFTA_HASH_OFFSET = 0x6
1699 NFTA_HASH_TYPE = 0x7
1700 NFTA_META_UNSPEC = 0x0
1701 NFTA_META_DREG = 0x1
1702 NFTA_META_KEY = 0x2
1703 NFTA_META_SREG = 0x3
1704 NFTA_RT_UNSPEC = 0x0
1705 NFTA_RT_DREG = 0x1
1706 NFTA_RT_KEY = 0x2
1707 NFT_CT_STATE = 0x0
1708 NFT_CT_DIRECTION = 0x1
1709 NFT_CT_STATUS = 0x2
1710 NFT_CT_MARK = 0x3
1711 NFT_CT_SECMARK = 0x4
1712 NFT_CT_EXPIRATION = 0x5
1713 NFT_CT_HELPER = 0x6
1714 NFT_CT_L3PROTOCOL = 0x7
1715 NFT_CT_SRC = 0x8
1716 NFT_CT_DST = 0x9
1717 NFT_CT_PROTOCOL = 0xa
1718 NFT_CT_PROTO_SRC = 0xb
1719 NFT_CT_PROTO_DST = 0xc
1720 NFT_CT_LABELS = 0xd
1721 NFT_CT_PKTS = 0xe
1722 NFT_CT_BYTES = 0xf
1723 NFT_CT_AVGPKT = 0x10
1724 NFT_CT_ZONE = 0x11
1725 NFT_CT_EVENTMASK = 0x12
1726 NFTA_CT_UNSPEC = 0x0
1727 NFTA_CT_DREG = 0x1
1728 NFTA_CT_KEY = 0x2
1729 NFTA_CT_DIRECTION = 0x3
1730 NFTA_CT_SREG = 0x4
1731 NFT_LIMIT_PKTS = 0x0
1732 NFT_LIMIT_PKT_BYTES = 0x1
1733 NFT_LIMIT_F_INV = 0x1
1734 NFTA_LIMIT_UNSPEC = 0x0
1735 NFTA_LIMIT_RATE = 0x1
1736 NFTA_LIMIT_UNIT = 0x2
1737 NFTA_LIMIT_BURST = 0x3
1738 NFTA_LIMIT_TYPE = 0x4
1739 NFTA_LIMIT_FLAGS = 0x5
1740 NFTA_LIMIT_PAD = 0x6
1741 NFTA_COUNTER_UNSPEC = 0x0
1742 NFTA_COUNTER_BYTES = 0x1
1743 NFTA_COUNTER_PACKETS = 0x2
1744 NFTA_COUNTER_PAD = 0x3
1745 NFTA_LOG_UNSPEC = 0x0
1746 NFTA_LOG_GROUP = 0x1
1747 NFTA_LOG_PREFIX = 0x2
1748 NFTA_LOG_SNAPLEN = 0x3
1749 NFTA_LOG_QTHRESHOLD = 0x4
1750 NFTA_LOG_LEVEL = 0x5
1751 NFTA_LOG_FLAGS = 0x6
1752 NFTA_QUEUE_UNSPEC = 0x0
1753 NFTA_QUEUE_NUM = 0x1
1754 NFTA_QUEUE_TOTAL = 0x2
1755 NFTA_QUEUE_FLAGS = 0x3
1756 NFTA_QUEUE_SREG_QNUM = 0x4
1757 NFT_QUOTA_F_INV = 0x1
1758 NFT_QUOTA_F_DEPLETED = 0x2
1759 NFTA_QUOTA_UNSPEC = 0x0
1760 NFTA_QUOTA_BYTES = 0x1
1761 NFTA_QUOTA_FLAGS = 0x2
1762 NFTA_QUOTA_PAD = 0x3
1763 NFTA_QUOTA_CONSUMED = 0x4
1764 NFT_REJECT_ICMP_UNREACH = 0x0
1765 NFT_REJECT_TCP_RST = 0x1
1766 NFT_REJECT_ICMPX_UNREACH = 0x2
1767 NFT_REJECT_ICMPX_NO_ROUTE = 0x0
1768 NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
1769 NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
1770 NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
1771 NFTA_REJECT_UNSPEC = 0x0
1772 NFTA_REJECT_TYPE = 0x1
1773 NFTA_REJECT_ICMP_CODE = 0x2
1774 NFT_NAT_SNAT = 0x0
1775 NFT_NAT_DNAT = 0x1
1776 NFTA_NAT_UNSPEC = 0x0
1777 NFTA_NAT_TYPE = 0x1
1778 NFTA_NAT_FAMILY = 0x2
1779 NFTA_NAT_REG_ADDR_MIN = 0x3
1780 NFTA_NAT_REG_ADDR_MAX = 0x4
1781 NFTA_NAT_REG_PROTO_MIN = 0x5
1782 NFTA_NAT_REG_PROTO_MAX = 0x6
1783 NFTA_NAT_FLAGS = 0x7
1784 NFTA_MASQ_UNSPEC = 0x0
1785 NFTA_MASQ_FLAGS = 0x1
1786 NFTA_MASQ_REG_PROTO_MIN = 0x2
1787 NFTA_MASQ_REG_PROTO_MAX = 0x3
1788 NFTA_REDIR_UNSPEC = 0x0
1789 NFTA_REDIR_REG_PROTO_MIN = 0x1
1790 NFTA_REDIR_REG_PROTO_MAX = 0x2
1791 NFTA_REDIR_FLAGS = 0x3
1792 NFTA_DUP_UNSPEC = 0x0
1793 NFTA_DUP_SREG_ADDR = 0x1
1794 NFTA_DUP_SREG_DEV = 0x2
1795 NFTA_FWD_UNSPEC = 0x0
1796 NFTA_FWD_SREG_DEV = 0x1
1797 NFTA_OBJREF_UNSPEC = 0x0
1798 NFTA_OBJREF_IMM_TYPE = 0x1
1799 NFTA_OBJREF_IMM_NAME = 0x2
1800 NFTA_OBJREF_SET_SREG = 0x3
1801 NFTA_OBJREF_SET_NAME = 0x4
1802 NFTA_OBJREF_SET_ID = 0x5
1803 NFTA_GEN_UNSPEC = 0x0
1804 NFTA_GEN_ID = 0x1
1805 NFTA_GEN_PROC_PID = 0x2
1806 NFTA_GEN_PROC_NAME = 0x3
1807 NFTA_FIB_UNSPEC = 0x0
1808 NFTA_FIB_DREG = 0x1
1809 NFTA_FIB_RESULT = 0x2
1810 NFTA_FIB_FLAGS = 0x3
1811 NFT_FIB_RESULT_UNSPEC = 0x0
1812 NFT_FIB_RESULT_OIF = 0x1
1813 NFT_FIB_RESULT_OIFNAME = 0x2
1814 NFT_FIB_RESULT_ADDRTYPE = 0x3
1815 NFTA_FIB_F_SADDR = 0x1
1816 NFTA_FIB_F_DADDR = 0x2
1817 NFTA_FIB_F_MARK = 0x4
1818 NFTA_FIB_F_IIF = 0x8
1819 NFTA_FIB_F_OIF = 0x10
1820 NFTA_FIB_F_PRESENT = 0x20
1821 NFTA_CT_HELPER_UNSPEC = 0x0
1822 NFTA_CT_HELPER_NAME = 0x1
1823 NFTA_CT_HELPER_L3PROTO = 0x2
1824 NFTA_CT_HELPER_L4PROTO = 0x3
1825 NFTA_OBJ_UNSPEC = 0x0
1826 NFTA_OBJ_TABLE = 0x1
1827 NFTA_OBJ_NAME = 0x2
1828 NFTA_OBJ_TYPE = 0x3
1829 NFTA_OBJ_DATA = 0x4
1830 NFTA_OBJ_USE = 0x5
1831 NFTA_TRACE_UNSPEC = 0x0
1832 NFTA_TRACE_TABLE = 0x1
1833 NFTA_TRACE_CHAIN = 0x2
1834 NFTA_TRACE_RULE_HANDLE = 0x3
1835 NFTA_TRACE_TYPE = 0x4
1836 NFTA_TRACE_VERDICT = 0x5
1837 NFTA_TRACE_ID = 0x6
1838 NFTA_TRACE_LL_HEADER = 0x7
1839 NFTA_TRACE_NETWORK_HEADER = 0x8
1840 NFTA_TRACE_TRANSPORT_HEADER = 0x9
1841 NFTA_TRACE_IIF = 0xa
1842 NFTA_TRACE_IIFTYPE = 0xb
1843 NFTA_TRACE_OIF = 0xc
1844 NFTA_TRACE_OIFTYPE = 0xd
1845 NFTA_TRACE_MARK = 0xe
1846 NFTA_TRACE_NFPROTO = 0xf
1847 NFTA_TRACE_POLICY = 0x10
1848 NFTA_TRACE_PAD = 0x11
1849 NFT_TRACETYPE_UNSPEC = 0x0
1850 NFT_TRACETYPE_POLICY = 0x1
1851 NFT_TRACETYPE_RETURN = 0x2
1852 NFT_TRACETYPE_RULE = 0x3
1853 NFTA_NG_UNSPEC = 0x0
1854 NFTA_NG_DREG = 0x1
1855 NFTA_NG_MODULUS = 0x2
1856 NFTA_NG_TYPE = 0x3
1857 NFTA_NG_OFFSET = 0x4
1858 NFT_NG_INCREMENTAL = 0x0
1859 NFT_NG_RANDOM = 0x1
1860 )
1861
1862 type RTCTime struct {
1863 Sec int32
1864 Min int32
1865 Hour int32
1866 Mday int32
1867 Mon int32
1868 Year int32
1869 Wday int32
1870 Yday int32
1871 Isdst int32
1872 }
1873
1874 type RTCWkAlrm struct {
1875 Enabled uint8
1876 Pending uint8
1877 Time RTCTime
1878 }
1879
1880 type RTCPLLInfo struct {
1881 Ctrl int32
1882 Value int32
1883 Max int32
1884 Min int32
1885 Posmult int32
1886 Negmult int32
1887 Clock int64
1888 }
1889
1890 type BlkpgIoctlArg struct {
1891 Op int32
1892 Flags int32
1893 Datalen int32
1894 Data *byte
1895 }
1896
1897 type BlkpgPartition struct {
1898 Start int64
1899 Length int64
1900 Pno int32
1901 Devname [64]uint8
1902 Volname [64]uint8
1903 _ [4]byte
1904 }
1905
1906 const (
1907 BLKPG = 0x20001269
1908 BLKPG_ADD_PARTITION = 0x1
1909 BLKPG_DEL_PARTITION = 0x2
1910 BLKPG_RESIZE_PARTITION = 0x3
1911 )
1912
1913 const (
1914 NETNSA_NONE = 0x0
1915 NETNSA_NSID = 0x1
1916 NETNSA_PID = 0x2
1917 NETNSA_FD = 0x3
1918 )
1919
1920 type XDPRingOffset struct {
1921 Producer uint64
1922 Consumer uint64
1923 Desc uint64
1924 }
1925
1926 type XDPMmapOffsets struct {
1927 Rx XDPRingOffset
1928 Tx XDPRingOffset
1929 Fr XDPRingOffset
1930 Cr XDPRingOffset
1931 }
1932
1933 type XDPUmemReg struct {
1934 Addr uint64
1935 Len uint64
1936 Size uint32
1937 Headroom uint32
1938 }
1939
1940 type XDPStatistics struct {
1941 Rx_dropped uint64
1942 Rx_invalid_descs uint64
1943 Tx_invalid_descs uint64
1944 }
1945
1946 type XDPDesc struct {
1947 Addr uint64
1948 Len uint32
1949 Options uint32
1950 }
1951
1952 const (
1953 NCSI_CMD_UNSPEC = 0x0
1954 NCSI_CMD_PKG_INFO = 0x1
1955 NCSI_CMD_SET_INTERFACE = 0x2
1956 NCSI_CMD_CLEAR_INTERFACE = 0x3
1957 NCSI_ATTR_UNSPEC = 0x0
1958 NCSI_ATTR_IFINDEX = 0x1
1959 NCSI_ATTR_PACKAGE_LIST = 0x2
1960 NCSI_ATTR_PACKAGE_ID = 0x3
1961 NCSI_ATTR_CHANNEL_ID = 0x4
1962 NCSI_PKG_ATTR_UNSPEC = 0x0
1963 NCSI_PKG_ATTR = 0x1
1964 NCSI_PKG_ATTR_ID = 0x2
1965 NCSI_PKG_ATTR_FORCED = 0x3
1966 NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
1967 NCSI_CHANNEL_ATTR_UNSPEC = 0x0
1968 NCSI_CHANNEL_ATTR = 0x1
1969 NCSI_CHANNEL_ATTR_ID = 0x2
1970 NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
1971 NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
1972 NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
1973 NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
1974 NCSI_CHANNEL_ATTR_ACTIVE = 0x7
1975 NCSI_CHANNEL_ATTR_FORCED = 0x8
1976 NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
1977 NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
1978 )
1979
1980 const (
1981 SOF_TIMESTAMPING_TX_HARDWARE = 0x1
1982 SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
1983 SOF_TIMESTAMPING_RX_HARDWARE = 0x4
1984 SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
1985 SOF_TIMESTAMPING_SOFTWARE = 0x10
1986 SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
1987 SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
1988 SOF_TIMESTAMPING_OPT_ID = 0x80
1989 SOF_TIMESTAMPING_TX_SCHED = 0x100
1990 SOF_TIMESTAMPING_TX_ACK = 0x200
1991 SOF_TIMESTAMPING_OPT_CMSG = 0x400
1992 SOF_TIMESTAMPING_OPT_TSONLY = 0x800
1993 SOF_TIMESTAMPING_OPT_STATS = 0x1000
1994 SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
1995 SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
1996
1997 SOF_TIMESTAMPING_LAST = 0x4000
1998 SOF_TIMESTAMPING_MASK = 0x7fff
1999 )
55 package unix
66
77 const (
8 sizeofPtr = 0x4
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x4
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x4
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x4
12 SizeofLongLong = 0x8
1313 PathMax = 0x1000
1414 )
1515
5151 Errcnt int32
5252 Stbcnt int32
5353 Tai int32
54 Pad_cgo_0 [44]byte
54 _ [44]byte
5555 }
5656
5757 type Time_t int32
114114 Pad5 [14]int32
115115 }
116116
117 type Statfs_t struct {
118 Type int32
119 Bsize int32
120 Frsize int32
121 Pad_cgo_0 [4]byte
122 Blocks uint64
123 Bfree uint64
124 Files uint64
125 Ffree uint64
126 Bavail uint64
127 Fsid Fsid
128 Namelen int32
129 Flags int32
130 Spare [5]int32
131 Pad_cgo_1 [4]byte
117 type StatxTimestamp struct {
118 Sec int64
119 Nsec uint32
120 _ int32
121 }
122
123 type Statx_t struct {
124 Mask uint32
125 Blksize uint32
126 Attributes uint64
127 Nlink uint32
128 Uid uint32
129 Gid uint32
130 Mode uint16
131 _ [1]uint16
132 Ino uint64
133 Size uint64
134 Blocks uint64
135 Attributes_mask uint64
136 Atime StatxTimestamp
137 Btime StatxTimestamp
138 Ctime StatxTimestamp
139 Mtime StatxTimestamp
140 Rdev_major uint32
141 Rdev_minor uint32
142 Dev_major uint32
143 Dev_minor uint32
144 _ [14]uint64
132145 }
133146
134147 type Dirent struct {
135 Ino uint64
136 Off int64
137 Reclen uint16
138 Type uint8
139 Name [256]int8
140 Pad_cgo_0 [5]byte
148 Ino uint64
149 Off int64
150 Reclen uint16
151 Type uint8
152 Name [256]int8
153 _ [5]byte
141154 }
142155
143156 type Fsid struct {
144 X__val [2]int32
157 Val [2]int32
145158 }
146159
147160 type Flock_t struct {
148 Type int16
149 Whence int16
150 Pad_cgo_0 [4]byte
151 Start int64
152 Len int64
153 Pid int32
154 Pad_cgo_1 [4]byte
161 Type int16
162 Whence int16
163 _ [4]byte
164 Start int64
165 Len int64
166 Pid int32
167 _ [4]byte
155168 }
156169
157170 type FscryptPolicy struct {
226239 Channel uint16
227240 }
228241
242 type RawSockaddrL2 struct {
243 Family uint16
244 Psm uint16
245 Bdaddr [6]uint8
246 Cid uint16
247 Bdaddr_type uint8
248 _ [1]byte
249 }
250
251 type RawSockaddrRFCOMM struct {
252 Family uint16
253 Bdaddr [6]uint8
254 Channel uint8
255 _ [1]byte
256 }
257
229258 type RawSockaddrCAN struct {
230 Family uint16
231 Pad_cgo_0 [2]byte
232 Ifindex int32
233 Addr [8]byte
259 Family uint16
260 Ifindex int32
261 Addr [8]byte
234262 }
235263
236264 type RawSockaddrALG struct {
248276 Cid uint32
249277 Zero [4]uint8
250278 }
279
280 type RawSockaddrXDP struct {
281 Family uint16
282 Flags uint16
283 Ifindex uint32
284 Queue_id uint32
285 Shared_umem_fd uint32
286 }
287
288 type RawSockaddrPPPoX [0x1e]byte
251289
252290 type RawSockaddr struct {
253291 Family uint16
343381 Probes uint8
344382 Backoff uint8
345383 Options uint8
346 Pad_cgo_0 [2]byte
347384 Rto uint32
348385 Ato uint32
349386 Snd_mss uint32
378415 SizeofSockaddrLinklayer = 0x14
379416 SizeofSockaddrNetlink = 0xc
380417 SizeofSockaddrHCI = 0x6
418 SizeofSockaddrL2 = 0xe
419 SizeofSockaddrRFCOMM = 0xa
381420 SizeofSockaddrCAN = 0x10
382421 SizeofSockaddrALG = 0x58
383422 SizeofSockaddrVM = 0x10
423 SizeofSockaddrXDP = 0x10
424 SizeofSockaddrPPPoX = 0x1e
384425 SizeofLinger = 0x8
385426 SizeofIovec = 0x8
386427 SizeofIPMreq = 0x8
398439 )
399440
400441 const (
401 IFA_UNSPEC = 0x0
402 IFA_ADDRESS = 0x1
403 IFA_LOCAL = 0x2
404 IFA_LABEL = 0x3
405 IFA_BROADCAST = 0x4
406 IFA_ANYCAST = 0x5
407 IFA_CACHEINFO = 0x6
408 IFA_MULTICAST = 0x7
409 IFLA_UNSPEC = 0x0
410 IFLA_ADDRESS = 0x1
411 IFLA_BROADCAST = 0x2
412 IFLA_IFNAME = 0x3
413 IFLA_MTU = 0x4
414 IFLA_LINK = 0x5
415 IFLA_QDISC = 0x6
416 IFLA_STATS = 0x7
417 IFLA_COST = 0x8
418 IFLA_PRIORITY = 0x9
419 IFLA_MASTER = 0xa
420 IFLA_WIRELESS = 0xb
421 IFLA_PROTINFO = 0xc
422 IFLA_TXQLEN = 0xd
423 IFLA_MAP = 0xe
424 IFLA_WEIGHT = 0xf
425 IFLA_OPERSTATE = 0x10
426 IFLA_LINKMODE = 0x11
427 IFLA_LINKINFO = 0x12
428 IFLA_NET_NS_PID = 0x13
429 IFLA_IFALIAS = 0x14
430 IFLA_MAX = 0x2c
431 RT_SCOPE_UNIVERSE = 0x0
432 RT_SCOPE_SITE = 0xc8
433 RT_SCOPE_LINK = 0xfd
434 RT_SCOPE_HOST = 0xfe
435 RT_SCOPE_NOWHERE = 0xff
436 RT_TABLE_UNSPEC = 0x0
437 RT_TABLE_COMPAT = 0xfc
438 RT_TABLE_DEFAULT = 0xfd
439 RT_TABLE_MAIN = 0xfe
440 RT_TABLE_LOCAL = 0xff
441 RT_TABLE_MAX = 0xffffffff
442 RTA_UNSPEC = 0x0
443 RTA_DST = 0x1
444 RTA_SRC = 0x2
445 RTA_IIF = 0x3
446 RTA_OIF = 0x4
447 RTA_GATEWAY = 0x5
448 RTA_PRIORITY = 0x6
449 RTA_PREFSRC = 0x7
450 RTA_METRICS = 0x8
451 RTA_MULTIPATH = 0x9
452 RTA_FLOW = 0xb
453 RTA_CACHEINFO = 0xc
454 RTA_TABLE = 0xf
455 RTN_UNSPEC = 0x0
456 RTN_UNICAST = 0x1
457 RTN_LOCAL = 0x2
458 RTN_BROADCAST = 0x3
459 RTN_ANYCAST = 0x4
460 RTN_MULTICAST = 0x5
461 RTN_BLACKHOLE = 0x6
462 RTN_UNREACHABLE = 0x7
463 RTN_PROHIBIT = 0x8
464 RTN_THROW = 0x9
465 RTN_NAT = 0xa
466 RTN_XRESOLVE = 0xb
467 RTNLGRP_NONE = 0x0
468 RTNLGRP_LINK = 0x1
469 RTNLGRP_NOTIFY = 0x2
470 RTNLGRP_NEIGH = 0x3
471 RTNLGRP_TC = 0x4
472 RTNLGRP_IPV4_IFADDR = 0x5
473 RTNLGRP_IPV4_MROUTE = 0x6
474 RTNLGRP_IPV4_ROUTE = 0x7
475 RTNLGRP_IPV4_RULE = 0x8
476 RTNLGRP_IPV6_IFADDR = 0x9
477 RTNLGRP_IPV6_MROUTE = 0xa
478 RTNLGRP_IPV6_ROUTE = 0xb
479 RTNLGRP_IPV6_IFINFO = 0xc
480 RTNLGRP_IPV6_PREFIX = 0x12
481 RTNLGRP_IPV6_RULE = 0x13
482 RTNLGRP_ND_USEROPT = 0x14
483 SizeofNlMsghdr = 0x10
484 SizeofNlMsgerr = 0x14
485 SizeofRtGenmsg = 0x1
486 SizeofNlAttr = 0x4
487 SizeofRtAttr = 0x4
488 SizeofIfInfomsg = 0x10
489 SizeofIfAddrmsg = 0x8
490 SizeofRtMsg = 0xc
491 SizeofRtNexthop = 0x8
442 IFA_UNSPEC = 0x0
443 IFA_ADDRESS = 0x1
444 IFA_LOCAL = 0x2
445 IFA_LABEL = 0x3
446 IFA_BROADCAST = 0x4
447 IFA_ANYCAST = 0x5
448 IFA_CACHEINFO = 0x6
449 IFA_MULTICAST = 0x7
450 IFLA_UNSPEC = 0x0
451 IFLA_ADDRESS = 0x1
452 IFLA_BROADCAST = 0x2
453 IFLA_IFNAME = 0x3
454 IFLA_INFO_KIND = 0x1
455 IFLA_MTU = 0x4
456 IFLA_LINK = 0x5
457 IFLA_QDISC = 0x6
458 IFLA_STATS = 0x7
459 IFLA_COST = 0x8
460 IFLA_PRIORITY = 0x9
461 IFLA_MASTER = 0xa
462 IFLA_WIRELESS = 0xb
463 IFLA_PROTINFO = 0xc
464 IFLA_TXQLEN = 0xd
465 IFLA_MAP = 0xe
466 IFLA_WEIGHT = 0xf
467 IFLA_OPERSTATE = 0x10
468 IFLA_LINKMODE = 0x11
469 IFLA_LINKINFO = 0x12
470 IFLA_NET_NS_PID = 0x13
471 IFLA_IFALIAS = 0x14
472 IFLA_NUM_VF = 0x15
473 IFLA_VFINFO_LIST = 0x16
474 IFLA_STATS64 = 0x17
475 IFLA_VF_PORTS = 0x18
476 IFLA_PORT_SELF = 0x19
477 IFLA_AF_SPEC = 0x1a
478 IFLA_GROUP = 0x1b
479 IFLA_NET_NS_FD = 0x1c
480 IFLA_EXT_MASK = 0x1d
481 IFLA_PROMISCUITY = 0x1e
482 IFLA_NUM_TX_QUEUES = 0x1f
483 IFLA_NUM_RX_QUEUES = 0x20
484 IFLA_CARRIER = 0x21
485 IFLA_PHYS_PORT_ID = 0x22
486 IFLA_CARRIER_CHANGES = 0x23
487 IFLA_PHYS_SWITCH_ID = 0x24
488 IFLA_LINK_NETNSID = 0x25
489 IFLA_PHYS_PORT_NAME = 0x26
490 IFLA_PROTO_DOWN = 0x27
491 IFLA_GSO_MAX_SEGS = 0x28
492 IFLA_GSO_MAX_SIZE = 0x29
493 IFLA_PAD = 0x2a
494 IFLA_XDP = 0x2b
495 IFLA_EVENT = 0x2c
496 IFLA_NEW_NETNSID = 0x2d
497 IFLA_IF_NETNSID = 0x2e
498 IFLA_MAX = 0x33
499 RT_SCOPE_UNIVERSE = 0x0
500 RT_SCOPE_SITE = 0xc8
501 RT_SCOPE_LINK = 0xfd
502 RT_SCOPE_HOST = 0xfe
503 RT_SCOPE_NOWHERE = 0xff
504 RT_TABLE_UNSPEC = 0x0
505 RT_TABLE_COMPAT = 0xfc
506 RT_TABLE_DEFAULT = 0xfd
507 RT_TABLE_MAIN = 0xfe
508 RT_TABLE_LOCAL = 0xff
509 RT_TABLE_MAX = 0xffffffff
510 RTA_UNSPEC = 0x0
511 RTA_DST = 0x1
512 RTA_SRC = 0x2
513 RTA_IIF = 0x3
514 RTA_OIF = 0x4
515 RTA_GATEWAY = 0x5
516 RTA_PRIORITY = 0x6
517 RTA_PREFSRC = 0x7
518 RTA_METRICS = 0x8
519 RTA_MULTIPATH = 0x9
520 RTA_FLOW = 0xb
521 RTA_CACHEINFO = 0xc
522 RTA_TABLE = 0xf
523 RTA_MARK = 0x10
524 RTA_MFC_STATS = 0x11
525 RTA_VIA = 0x12
526 RTA_NEWDST = 0x13
527 RTA_PREF = 0x14
528 RTA_ENCAP_TYPE = 0x15
529 RTA_ENCAP = 0x16
530 RTA_EXPIRES = 0x17
531 RTA_PAD = 0x18
532 RTA_UID = 0x19
533 RTA_TTL_PROPAGATE = 0x1a
534 RTA_IP_PROTO = 0x1b
535 RTA_SPORT = 0x1c
536 RTA_DPORT = 0x1d
537 RTN_UNSPEC = 0x0
538 RTN_UNICAST = 0x1
539 RTN_LOCAL = 0x2
540 RTN_BROADCAST = 0x3
541 RTN_ANYCAST = 0x4
542 RTN_MULTICAST = 0x5
543 RTN_BLACKHOLE = 0x6
544 RTN_UNREACHABLE = 0x7
545 RTN_PROHIBIT = 0x8
546 RTN_THROW = 0x9
547 RTN_NAT = 0xa
548 RTN_XRESOLVE = 0xb
549 RTNLGRP_NONE = 0x0
550 RTNLGRP_LINK = 0x1
551 RTNLGRP_NOTIFY = 0x2
552 RTNLGRP_NEIGH = 0x3
553 RTNLGRP_TC = 0x4
554 RTNLGRP_IPV4_IFADDR = 0x5
555 RTNLGRP_IPV4_MROUTE = 0x6
556 RTNLGRP_IPV4_ROUTE = 0x7
557 RTNLGRP_IPV4_RULE = 0x8
558 RTNLGRP_IPV6_IFADDR = 0x9
559 RTNLGRP_IPV6_MROUTE = 0xa
560 RTNLGRP_IPV6_ROUTE = 0xb
561 RTNLGRP_IPV6_IFINFO = 0xc
562 RTNLGRP_IPV6_PREFIX = 0x12
563 RTNLGRP_IPV6_RULE = 0x13
564 RTNLGRP_ND_USEROPT = 0x14
565 SizeofNlMsghdr = 0x10
566 SizeofNlMsgerr = 0x14
567 SizeofRtGenmsg = 0x1
568 SizeofNlAttr = 0x4
569 SizeofRtAttr = 0x4
570 SizeofIfInfomsg = 0x10
571 SizeofIfAddrmsg = 0x8
572 SizeofRtMsg = 0xc
573 SizeofRtNexthop = 0x8
492574 )
493575
494576 type NlMsghdr struct {
519601 }
520602
521603 type IfInfomsg struct {
522 Family uint8
523 X__ifi_pad uint8
524 Type uint16
525 Index int32
526 Flags uint32
527 Change uint32
604 Family uint8
605 _ uint8
606 Type uint16
607 Index int32
608 Flags uint32
609 Change uint32
528610 }
529611
530612 type IfAddrmsg struct {
567649 }
568650
569651 type SockFprog struct {
570 Len uint16
571 Pad_cgo_0 [2]byte
572 Filter *SockFilter
652 Len uint16
653 Filter *SockFilter
573654 }
574655
575656 type InotifyEvent struct {
609690 Totalhigh uint32
610691 Freehigh uint32
611692 Unit uint32
612 X_f [8]int8
693 _ [8]int8
613694 }
614695
615696 type Utsname struct {
616 Sysname [65]int8
617 Nodename [65]int8
618 Release [65]int8
619 Version [65]int8
620 Machine [65]int8
621 Domainname [65]int8
697 Sysname [65]byte
698 Nodename [65]byte
699 Release [65]byte
700 Version [65]byte
701 Machine [65]byte
702 Domainname [65]byte
622703 }
623704
624705 type Ustat_t struct {
636717 }
637718
638719 const (
639 AT_FDCWD = -0x64
640 AT_REMOVEDIR = 0x200
720 AT_EMPTY_PATH = 0x1000
721 AT_FDCWD = -0x64
722 AT_NO_AUTOMOUNT = 0x800
723 AT_REMOVEDIR = 0x200
724
725 AT_STATX_SYNC_AS_STAT = 0x0
726 AT_STATX_FORCE_SYNC = 0x2000
727 AT_STATX_DONT_SYNC = 0x4000
728
641729 AT_SYMLINK_FOLLOW = 0x400
642730 AT_SYMLINK_NOFOLLOW = 0x100
731
732 AT_EACCESS = 0x200
643733 )
644734
645735 type PollFd struct {
659749 )
660750
661751 type Sigset_t struct {
662 X__val [32]uint32
752 Val [32]uint32
753 }
754
755 type SignalfdSiginfo struct {
756 Signo uint32
757 Errno int32
758 Code int32
759 Pid uint32
760 Uid uint32
761 Fd int32
762 Tid uint32
763 Band uint32
764 Overrun uint32
765 Trapno uint32
766 Status int32
767 Int int32
768 Ptr uint64
769 Utime uint64
770 Stime uint64
771 Addr uint64
772 _ [48]uint8
663773 }
664774
665775 const RNDGETENTCNT = 0x40045200
686796
687797 type Taskstats struct {
688798 Version uint16
689 Pad_cgo_0 [2]byte
690799 Ac_exitcode uint32
691800 Ac_flag uint8
692801 Ac_nice uint8
693 Pad_cgo_1 [6]byte
802 _ [4]byte
694803 Cpu_count uint64
695804 Cpu_delay_total uint64
696805 Blkio_count uint64
702811 Ac_comm [32]int8
703812 Ac_sched uint8
704813 Ac_pad [3]uint8
705 Pad_cgo_2 [4]byte
814 _ [4]byte
706815 Ac_uid uint32
707816 Ac_gid uint32
708817 Ac_pid uint32
709818 Ac_ppid uint32
710819 Ac_btime uint32
711 Pad_cgo_3 [4]byte
820 _ [4]byte
712821 Ac_etime uint64
713822 Ac_utime uint64
714823 Ac_stime uint64
732841 Cpu_scaled_run_real_total uint64
733842 Freepages_count uint64
734843 Freepages_delay_total uint64
844 Thrashing_count uint64
845 Thrashing_delay_total uint64
735846 }
736847
737848 const (
750861 TASKSTATS_CMD_ATTR_TGID = 0x2
751862 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
752863 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
864 )
865
866 type CGroupStats struct {
867 Sleeping uint64
868 Running uint64
869 Stopped uint64
870 Uninterruptible uint64
871 Io_wait uint64
872 }
873
874 const (
875 CGROUPSTATS_CMD_UNSPEC = 0x3
876 CGROUPSTATS_CMD_GET = 0x4
877 CGROUPSTATS_CMD_NEW = 0x5
878 CGROUPSTATS_TYPE_UNSPEC = 0x0
879 CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
880 CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
881 CGROUPSTATS_CMD_ATTR_FD = 0x1
753882 )
754883
755884 type Genlmsghdr struct {
784913 CTRL_ATTR_MCAST_GRP_NAME = 0x1
785914 CTRL_ATTR_MCAST_GRP_ID = 0x2
786915 )
916
917 type cpuMask uint32
918
919 const (
920 _CPU_SETSIZE = 0x400
921 _NCPUBITS = 0x20
922 )
923
924 const (
925 BDADDR_BREDR = 0x0
926 BDADDR_LE_PUBLIC = 0x1
927 BDADDR_LE_RANDOM = 0x2
928 )
929
930 type PerfEventAttr struct {
931 Type uint32
932 Size uint32
933 Config uint64
934 Sample uint64
935 Sample_type uint64
936 Read_format uint64
937 Bits uint64
938 Wakeup uint32
939 Bp_type uint32
940 Ext1 uint64
941 Ext2 uint64
942 Branch_sample_type uint64
943 Sample_regs_user uint64
944 Sample_stack_user uint32
945 Clockid int32
946 Sample_regs_intr uint64
947 Aux_watermark uint32
948 _ uint32
949 }
950
951 type PerfEventMmapPage struct {
952 Version uint32
953 Compat_version uint32
954 Lock uint32
955 Index uint32
956 Offset int64
957 Time_enabled uint64
958 Time_running uint64
959 Capabilities uint64
960 Pmc_width uint16
961 Time_shift uint16
962 Time_mult uint32
963 Time_offset uint64
964 Time_zero uint64
965 Size uint32
966 _ [948]uint8
967 Data_head uint64
968 Data_tail uint64
969 Data_offset uint64
970 Data_size uint64
971 Aux_head uint64
972 Aux_tail uint64
973 Aux_offset uint64
974 Aux_size uint64
975 }
976
977 const (
978 PerfBitDisabled uint64 = CBitFieldMaskBit0
979 PerfBitInherit = CBitFieldMaskBit1
980 PerfBitPinned = CBitFieldMaskBit2
981 PerfBitExclusive = CBitFieldMaskBit3
982 PerfBitExcludeUser = CBitFieldMaskBit4
983 PerfBitExcludeKernel = CBitFieldMaskBit5
984 PerfBitExcludeHv = CBitFieldMaskBit6
985 PerfBitExcludeIdle = CBitFieldMaskBit7
986 PerfBitMmap = CBitFieldMaskBit8
987 PerfBitComm = CBitFieldMaskBit9
988 PerfBitFreq = CBitFieldMaskBit10
989 PerfBitInheritStat = CBitFieldMaskBit11
990 PerfBitEnableOnExec = CBitFieldMaskBit12
991 PerfBitTask = CBitFieldMaskBit13
992 PerfBitWatermark = CBitFieldMaskBit14
993 PerfBitPreciseIPBit1 = CBitFieldMaskBit15
994 PerfBitPreciseIPBit2 = CBitFieldMaskBit16
995 PerfBitMmapData = CBitFieldMaskBit17
996 PerfBitSampleIDAll = CBitFieldMaskBit18
997 PerfBitExcludeHost = CBitFieldMaskBit19
998 PerfBitExcludeGuest = CBitFieldMaskBit20
999 PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
1000 PerfBitExcludeCallchainUser = CBitFieldMaskBit22
1001 PerfBitMmap2 = CBitFieldMaskBit23
1002 PerfBitCommExec = CBitFieldMaskBit24
1003 PerfBitUseClockID = CBitFieldMaskBit25
1004 PerfBitContextSwitch = CBitFieldMaskBit26
1005 )
1006
1007 const (
1008 PERF_TYPE_HARDWARE = 0x0
1009 PERF_TYPE_SOFTWARE = 0x1
1010 PERF_TYPE_TRACEPOINT = 0x2
1011 PERF_TYPE_HW_CACHE = 0x3
1012 PERF_TYPE_RAW = 0x4
1013 PERF_TYPE_BREAKPOINT = 0x5
1014
1015 PERF_COUNT_HW_CPU_CYCLES = 0x0
1016 PERF_COUNT_HW_INSTRUCTIONS = 0x1
1017 PERF_COUNT_HW_CACHE_REFERENCES = 0x2
1018 PERF_COUNT_HW_CACHE_MISSES = 0x3
1019 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
1020 PERF_COUNT_HW_BRANCH_MISSES = 0x5
1021 PERF_COUNT_HW_BUS_CYCLES = 0x6
1022 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
1023 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
1024 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
1025
1026 PERF_COUNT_HW_CACHE_L1D = 0x0
1027 PERF_COUNT_HW_CACHE_L1I = 0x1
1028 PERF_COUNT_HW_CACHE_LL = 0x2
1029 PERF_COUNT_HW_CACHE_DTLB = 0x3
1030 PERF_COUNT_HW_CACHE_ITLB = 0x4
1031 PERF_COUNT_HW_CACHE_BPU = 0x5
1032 PERF_COUNT_HW_CACHE_NODE = 0x6
1033
1034 PERF_COUNT_HW_CACHE_OP_READ = 0x0
1035 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
1036 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
1037
1038 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
1039 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
1040
1041 PERF_COUNT_SW_CPU_CLOCK = 0x0
1042 PERF_COUNT_SW_TASK_CLOCK = 0x1
1043 PERF_COUNT_SW_PAGE_FAULTS = 0x2
1044 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
1045 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
1046 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
1047 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
1048 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
1049 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
1050 PERF_COUNT_SW_DUMMY = 0x9
1051
1052 PERF_SAMPLE_IP = 0x1
1053 PERF_SAMPLE_TID = 0x2
1054 PERF_SAMPLE_TIME = 0x4
1055 PERF_SAMPLE_ADDR = 0x8
1056 PERF_SAMPLE_READ = 0x10
1057 PERF_SAMPLE_CALLCHAIN = 0x20
1058 PERF_SAMPLE_ID = 0x40
1059 PERF_SAMPLE_CPU = 0x80
1060 PERF_SAMPLE_PERIOD = 0x100
1061 PERF_SAMPLE_STREAM_ID = 0x200
1062 PERF_SAMPLE_RAW = 0x400
1063 PERF_SAMPLE_BRANCH_STACK = 0x800
1064
1065 PERF_SAMPLE_BRANCH_USER = 0x1
1066 PERF_SAMPLE_BRANCH_KERNEL = 0x2
1067 PERF_SAMPLE_BRANCH_HV = 0x4
1068 PERF_SAMPLE_BRANCH_ANY = 0x8
1069 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
1070 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
1071 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
1072
1073 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
1074 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
1075 PERF_FORMAT_ID = 0x4
1076 PERF_FORMAT_GROUP = 0x8
1077
1078 PERF_RECORD_MMAP = 0x1
1079 PERF_RECORD_LOST = 0x2
1080 PERF_RECORD_COMM = 0x3
1081 PERF_RECORD_EXIT = 0x4
1082 PERF_RECORD_THROTTLE = 0x5
1083 PERF_RECORD_UNTHROTTLE = 0x6
1084 PERF_RECORD_FORK = 0x7
1085 PERF_RECORD_READ = 0x8
1086 PERF_RECORD_SAMPLE = 0x9
1087
1088 PERF_CONTEXT_HV = -0x20
1089 PERF_CONTEXT_KERNEL = -0x80
1090 PERF_CONTEXT_USER = -0x200
1091
1092 PERF_CONTEXT_GUEST = -0x800
1093 PERF_CONTEXT_GUEST_KERNEL = -0x880
1094 PERF_CONTEXT_GUEST_USER = -0xa00
1095
1096 PERF_FLAG_FD_NO_GROUP = 0x1
1097 PERF_FLAG_FD_OUTPUT = 0x2
1098 PERF_FLAG_PID_CGROUP = 0x4
1099 )
1100
1101 const (
1102 CBitFieldMaskBit0 = 0x1
1103 CBitFieldMaskBit1 = 0x2
1104 CBitFieldMaskBit2 = 0x4
1105 CBitFieldMaskBit3 = 0x8
1106 CBitFieldMaskBit4 = 0x10
1107 CBitFieldMaskBit5 = 0x20
1108 CBitFieldMaskBit6 = 0x40
1109 CBitFieldMaskBit7 = 0x80
1110 CBitFieldMaskBit8 = 0x100
1111 CBitFieldMaskBit9 = 0x200
1112 CBitFieldMaskBit10 = 0x400
1113 CBitFieldMaskBit11 = 0x800
1114 CBitFieldMaskBit12 = 0x1000
1115 CBitFieldMaskBit13 = 0x2000
1116 CBitFieldMaskBit14 = 0x4000
1117 CBitFieldMaskBit15 = 0x8000
1118 CBitFieldMaskBit16 = 0x10000
1119 CBitFieldMaskBit17 = 0x20000
1120 CBitFieldMaskBit18 = 0x40000
1121 CBitFieldMaskBit19 = 0x80000
1122 CBitFieldMaskBit20 = 0x100000
1123 CBitFieldMaskBit21 = 0x200000
1124 CBitFieldMaskBit22 = 0x400000
1125 CBitFieldMaskBit23 = 0x800000
1126 CBitFieldMaskBit24 = 0x1000000
1127 CBitFieldMaskBit25 = 0x2000000
1128 CBitFieldMaskBit26 = 0x4000000
1129 CBitFieldMaskBit27 = 0x8000000
1130 CBitFieldMaskBit28 = 0x10000000
1131 CBitFieldMaskBit29 = 0x20000000
1132 CBitFieldMaskBit30 = 0x40000000
1133 CBitFieldMaskBit31 = 0x80000000
1134 CBitFieldMaskBit32 = 0x100000000
1135 CBitFieldMaskBit33 = 0x200000000
1136 CBitFieldMaskBit34 = 0x400000000
1137 CBitFieldMaskBit35 = 0x800000000
1138 CBitFieldMaskBit36 = 0x1000000000
1139 CBitFieldMaskBit37 = 0x2000000000
1140 CBitFieldMaskBit38 = 0x4000000000
1141 CBitFieldMaskBit39 = 0x8000000000
1142 CBitFieldMaskBit40 = 0x10000000000
1143 CBitFieldMaskBit41 = 0x20000000000
1144 CBitFieldMaskBit42 = 0x40000000000
1145 CBitFieldMaskBit43 = 0x80000000000
1146 CBitFieldMaskBit44 = 0x100000000000
1147 CBitFieldMaskBit45 = 0x200000000000
1148 CBitFieldMaskBit46 = 0x400000000000
1149 CBitFieldMaskBit47 = 0x800000000000
1150 CBitFieldMaskBit48 = 0x1000000000000
1151 CBitFieldMaskBit49 = 0x2000000000000
1152 CBitFieldMaskBit50 = 0x4000000000000
1153 CBitFieldMaskBit51 = 0x8000000000000
1154 CBitFieldMaskBit52 = 0x10000000000000
1155 CBitFieldMaskBit53 = 0x20000000000000
1156 CBitFieldMaskBit54 = 0x40000000000000
1157 CBitFieldMaskBit55 = 0x80000000000000
1158 CBitFieldMaskBit56 = 0x100000000000000
1159 CBitFieldMaskBit57 = 0x200000000000000
1160 CBitFieldMaskBit58 = 0x400000000000000
1161 CBitFieldMaskBit59 = 0x800000000000000
1162 CBitFieldMaskBit60 = 0x1000000000000000
1163 CBitFieldMaskBit61 = 0x2000000000000000
1164 CBitFieldMaskBit62 = 0x4000000000000000
1165 CBitFieldMaskBit63 = 0x8000000000000000
1166 )
1167
1168 type SockaddrStorage struct {
1169 Family uint16
1170 _ [122]int8
1171 _ uint32
1172 }
1173
1174 type TCPMD5Sig struct {
1175 Addr SockaddrStorage
1176 Flags uint8
1177 Prefixlen uint8
1178 Keylen uint16
1179 _ uint32
1180 Key [80]uint8
1181 }
1182
1183 type HDDriveCmdHdr struct {
1184 Command uint8
1185 Number uint8
1186 Feature uint8
1187 Count uint8
1188 }
1189
1190 type HDGeometry struct {
1191 Heads uint8
1192 Sectors uint8
1193 Cylinders uint16
1194 Start uint32
1195 }
1196
1197 type HDDriveID struct {
1198 Config uint16
1199 Cyls uint16
1200 Reserved2 uint16
1201 Heads uint16
1202 Track_bytes uint16
1203 Sector_bytes uint16
1204 Sectors uint16
1205 Vendor0 uint16
1206 Vendor1 uint16
1207 Vendor2 uint16
1208 Serial_no [20]uint8
1209 Buf_type uint16
1210 Buf_size uint16
1211 Ecc_bytes uint16
1212 Fw_rev [8]uint8
1213 Model [40]uint8
1214 Max_multsect uint8
1215 Vendor3 uint8
1216 Dword_io uint16
1217 Vendor4 uint8
1218 Capability uint8
1219 Reserved50 uint16
1220 Vendor5 uint8
1221 TPIO uint8
1222 Vendor6 uint8
1223 TDMA uint8
1224 Field_valid uint16
1225 Cur_cyls uint16
1226 Cur_heads uint16
1227 Cur_sectors uint16
1228 Cur_capacity0 uint16
1229 Cur_capacity1 uint16
1230 Multsect uint8
1231 Multsect_valid uint8
1232 Lba_capacity uint32
1233 Dma_1word uint16
1234 Dma_mword uint16
1235 Eide_pio_modes uint16
1236 Eide_dma_min uint16
1237 Eide_dma_time uint16
1238 Eide_pio uint16
1239 Eide_pio_iordy uint16
1240 Words69_70 [2]uint16
1241 Words71_74 [4]uint16
1242 Queue_depth uint16
1243 Words76_79 [4]uint16
1244 Major_rev_num uint16
1245 Minor_rev_num uint16
1246 Command_set_1 uint16
1247 Command_set_2 uint16
1248 Cfsse uint16
1249 Cfs_enable_1 uint16
1250 Cfs_enable_2 uint16
1251 Csf_default uint16
1252 Dma_ultra uint16
1253 Trseuc uint16
1254 TrsEuc uint16
1255 CurAPMvalues uint16
1256 Mprc uint16
1257 Hw_config uint16
1258 Acoustic uint16
1259 Msrqs uint16
1260 Sxfert uint16
1261 Sal uint16
1262 Spg uint32
1263 Lba_capacity_2 uint64
1264 Words104_125 [22]uint16
1265 Last_lun uint16
1266 Word127 uint16
1267 Dlf uint16
1268 Csfo uint16
1269 Words130_155 [26]uint16
1270 Word156 uint16
1271 Words157_159 [3]uint16
1272 Cfa_power uint16
1273 Words161_175 [15]uint16
1274 Words176_205 [30]uint16
1275 Words206_254 [49]uint16
1276 Integrity_word uint16
1277 }
1278
1279 type Statfs_t struct {
1280 Type int32
1281 Bsize int32
1282 Frsize int32
1283 _ [4]byte
1284 Blocks uint64
1285 Bfree uint64
1286 Files uint64
1287 Ffree uint64
1288 Bavail uint64
1289 Fsid Fsid
1290 Namelen int32
1291 Flags int32
1292 Spare [5]int32
1293 _ [4]byte
1294 }
1295
1296 const (
1297 ST_MANDLOCK = 0x40
1298 ST_NOATIME = 0x400
1299 ST_NODEV = 0x4
1300 ST_NODIRATIME = 0x800
1301 ST_NOEXEC = 0x8
1302 ST_NOSUID = 0x2
1303 ST_RDONLY = 0x1
1304 ST_RELATIME = 0x1000
1305 ST_SYNCHRONOUS = 0x10
1306 )
1307
1308 type TpacketHdr struct {
1309 Status uint32
1310 Len uint32
1311 Snaplen uint32
1312 Mac uint16
1313 Net uint16
1314 Sec uint32
1315 Usec uint32
1316 }
1317
1318 type Tpacket2Hdr struct {
1319 Status uint32
1320 Len uint32
1321 Snaplen uint32
1322 Mac uint16
1323 Net uint16
1324 Sec uint32
1325 Nsec uint32
1326 Vlan_tci uint16
1327 Vlan_tpid uint16
1328 _ [4]uint8
1329 }
1330
1331 type Tpacket3Hdr struct {
1332 Next_offset uint32
1333 Sec uint32
1334 Nsec uint32
1335 Snaplen uint32
1336 Len uint32
1337 Status uint32
1338 Mac uint16
1339 Net uint16
1340 Hv1 TpacketHdrVariant1
1341 _ [8]uint8
1342 }
1343
1344 type TpacketHdrVariant1 struct {
1345 Rxhash uint32
1346 Vlan_tci uint32
1347 Vlan_tpid uint16
1348 _ uint16
1349 }
1350
1351 type TpacketBlockDesc struct {
1352 Version uint32
1353 To_priv uint32
1354 Hdr [40]byte
1355 }
1356
1357 type TpacketReq struct {
1358 Block_size uint32
1359 Block_nr uint32
1360 Frame_size uint32
1361 Frame_nr uint32
1362 }
1363
1364 type TpacketReq3 struct {
1365 Block_size uint32
1366 Block_nr uint32
1367 Frame_size uint32
1368 Frame_nr uint32
1369 Retire_blk_tov uint32
1370 Sizeof_priv uint32
1371 Feature_req_word uint32
1372 }
1373
1374 type TpacketStats struct {
1375 Packets uint32
1376 Drops uint32
1377 }
1378
1379 type TpacketStatsV3 struct {
1380 Packets uint32
1381 Drops uint32
1382 Freeze_q_cnt uint32
1383 }
1384
1385 type TpacketAuxdata struct {
1386 Status uint32
1387 Len uint32
1388 Snaplen uint32
1389 Mac uint16
1390 Net uint16
1391 Vlan_tci uint16
1392 Vlan_tpid uint16
1393 }
1394
1395 const (
1396 TPACKET_V1 = 0x0
1397 TPACKET_V2 = 0x1
1398 TPACKET_V3 = 0x2
1399 )
1400
1401 const (
1402 SizeofTpacketHdr = 0x18
1403 SizeofTpacket2Hdr = 0x20
1404 SizeofTpacket3Hdr = 0x30
1405 )
1406
1407 const (
1408 NF_INET_PRE_ROUTING = 0x0
1409 NF_INET_LOCAL_IN = 0x1
1410 NF_INET_FORWARD = 0x2
1411 NF_INET_LOCAL_OUT = 0x3
1412 NF_INET_POST_ROUTING = 0x4
1413 NF_INET_NUMHOOKS = 0x5
1414 )
1415
1416 const (
1417 NF_NETDEV_INGRESS = 0x0
1418 NF_NETDEV_NUMHOOKS = 0x1
1419 )
1420
1421 const (
1422 NFPROTO_UNSPEC = 0x0
1423 NFPROTO_INET = 0x1
1424 NFPROTO_IPV4 = 0x2
1425 NFPROTO_ARP = 0x3
1426 NFPROTO_NETDEV = 0x5
1427 NFPROTO_BRIDGE = 0x7
1428 NFPROTO_IPV6 = 0xa
1429 NFPROTO_DECNET = 0xc
1430 NFPROTO_NUMPROTO = 0xd
1431 )
1432
1433 type Nfgenmsg struct {
1434 Nfgen_family uint8
1435 Version uint8
1436 Res_id uint16
1437 }
1438
1439 const (
1440 NFNL_BATCH_UNSPEC = 0x0
1441 NFNL_BATCH_GENID = 0x1
1442 )
1443
1444 const (
1445 NFT_REG_VERDICT = 0x0
1446 NFT_REG_1 = 0x1
1447 NFT_REG_2 = 0x2
1448 NFT_REG_3 = 0x3
1449 NFT_REG_4 = 0x4
1450 NFT_REG32_00 = 0x8
1451 NFT_REG32_01 = 0x9
1452 NFT_REG32_02 = 0xa
1453 NFT_REG32_03 = 0xb
1454 NFT_REG32_04 = 0xc
1455 NFT_REG32_05 = 0xd
1456 NFT_REG32_06 = 0xe
1457 NFT_REG32_07 = 0xf
1458 NFT_REG32_08 = 0x10
1459 NFT_REG32_09 = 0x11
1460 NFT_REG32_10 = 0x12
1461 NFT_REG32_11 = 0x13
1462 NFT_REG32_12 = 0x14
1463 NFT_REG32_13 = 0x15
1464 NFT_REG32_14 = 0x16
1465 NFT_REG32_15 = 0x17
1466 NFT_CONTINUE = -0x1
1467 NFT_BREAK = -0x2
1468 NFT_JUMP = -0x3
1469 NFT_GOTO = -0x4
1470 NFT_RETURN = -0x5
1471 NFT_MSG_NEWTABLE = 0x0
1472 NFT_MSG_GETTABLE = 0x1
1473 NFT_MSG_DELTABLE = 0x2
1474 NFT_MSG_NEWCHAIN = 0x3
1475 NFT_MSG_GETCHAIN = 0x4
1476 NFT_MSG_DELCHAIN = 0x5
1477 NFT_MSG_NEWRULE = 0x6
1478 NFT_MSG_GETRULE = 0x7
1479 NFT_MSG_DELRULE = 0x8
1480 NFT_MSG_NEWSET = 0x9
1481 NFT_MSG_GETSET = 0xa
1482 NFT_MSG_DELSET = 0xb
1483 NFT_MSG_NEWSETELEM = 0xc
1484 NFT_MSG_GETSETELEM = 0xd
1485 NFT_MSG_DELSETELEM = 0xe
1486 NFT_MSG_NEWGEN = 0xf
1487 NFT_MSG_GETGEN = 0x10
1488 NFT_MSG_TRACE = 0x11
1489 NFT_MSG_NEWOBJ = 0x12
1490 NFT_MSG_GETOBJ = 0x13
1491 NFT_MSG_DELOBJ = 0x14
1492 NFT_MSG_GETOBJ_RESET = 0x15
1493 NFT_MSG_MAX = 0x19
1494 NFTA_LIST_UNPEC = 0x0
1495 NFTA_LIST_ELEM = 0x1
1496 NFTA_HOOK_UNSPEC = 0x0
1497 NFTA_HOOK_HOOKNUM = 0x1
1498 NFTA_HOOK_PRIORITY = 0x2
1499 NFTA_HOOK_DEV = 0x3
1500 NFT_TABLE_F_DORMANT = 0x1
1501 NFTA_TABLE_UNSPEC = 0x0
1502 NFTA_TABLE_NAME = 0x1
1503 NFTA_TABLE_FLAGS = 0x2
1504 NFTA_TABLE_USE = 0x3
1505 NFTA_CHAIN_UNSPEC = 0x0
1506 NFTA_CHAIN_TABLE = 0x1
1507 NFTA_CHAIN_HANDLE = 0x2
1508 NFTA_CHAIN_NAME = 0x3
1509 NFTA_CHAIN_HOOK = 0x4
1510 NFTA_CHAIN_POLICY = 0x5
1511 NFTA_CHAIN_USE = 0x6
1512 NFTA_CHAIN_TYPE = 0x7
1513 NFTA_CHAIN_COUNTERS = 0x8
1514 NFTA_CHAIN_PAD = 0x9
1515 NFTA_RULE_UNSPEC = 0x0
1516 NFTA_RULE_TABLE = 0x1
1517 NFTA_RULE_CHAIN = 0x2
1518 NFTA_RULE_HANDLE = 0x3
1519 NFTA_RULE_EXPRESSIONS = 0x4
1520 NFTA_RULE_COMPAT = 0x5
1521 NFTA_RULE_POSITION = 0x6
1522 NFTA_RULE_USERDATA = 0x7
1523 NFTA_RULE_PAD = 0x8
1524 NFTA_RULE_ID = 0x9
1525 NFT_RULE_COMPAT_F_INV = 0x2
1526 NFT_RULE_COMPAT_F_MASK = 0x2
1527 NFTA_RULE_COMPAT_UNSPEC = 0x0
1528 NFTA_RULE_COMPAT_PROTO = 0x1
1529 NFTA_RULE_COMPAT_FLAGS = 0x2
1530 NFT_SET_ANONYMOUS = 0x1
1531 NFT_SET_CONSTANT = 0x2
1532 NFT_SET_INTERVAL = 0x4
1533 NFT_SET_MAP = 0x8
1534 NFT_SET_TIMEOUT = 0x10
1535 NFT_SET_EVAL = 0x20
1536 NFT_SET_OBJECT = 0x40
1537 NFT_SET_POL_PERFORMANCE = 0x0
1538 NFT_SET_POL_MEMORY = 0x1
1539 NFTA_SET_DESC_UNSPEC = 0x0
1540 NFTA_SET_DESC_SIZE = 0x1
1541 NFTA_SET_UNSPEC = 0x0
1542 NFTA_SET_TABLE = 0x1
1543 NFTA_SET_NAME = 0x2
1544 NFTA_SET_FLAGS = 0x3
1545 NFTA_SET_KEY_TYPE = 0x4
1546 NFTA_SET_KEY_LEN = 0x5
1547 NFTA_SET_DATA_TYPE = 0x6
1548 NFTA_SET_DATA_LEN = 0x7
1549 NFTA_SET_POLICY = 0x8
1550 NFTA_SET_DESC = 0x9
1551 NFTA_SET_ID = 0xa
1552 NFTA_SET_TIMEOUT = 0xb
1553 NFTA_SET_GC_INTERVAL = 0xc
1554 NFTA_SET_USERDATA = 0xd
1555 NFTA_SET_PAD = 0xe
1556 NFTA_SET_OBJ_TYPE = 0xf
1557 NFT_SET_ELEM_INTERVAL_END = 0x1
1558 NFTA_SET_ELEM_UNSPEC = 0x0
1559 NFTA_SET_ELEM_KEY = 0x1
1560 NFTA_SET_ELEM_DATA = 0x2
1561 NFTA_SET_ELEM_FLAGS = 0x3
1562 NFTA_SET_ELEM_TIMEOUT = 0x4
1563 NFTA_SET_ELEM_EXPIRATION = 0x5
1564 NFTA_SET_ELEM_USERDATA = 0x6
1565 NFTA_SET_ELEM_EXPR = 0x7
1566 NFTA_SET_ELEM_PAD = 0x8
1567 NFTA_SET_ELEM_OBJREF = 0x9
1568 NFTA_SET_ELEM_LIST_UNSPEC = 0x0
1569 NFTA_SET_ELEM_LIST_TABLE = 0x1
1570 NFTA_SET_ELEM_LIST_SET = 0x2
1571 NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
1572 NFTA_SET_ELEM_LIST_SET_ID = 0x4
1573 NFT_DATA_VALUE = 0x0
1574 NFT_DATA_VERDICT = 0xffffff00
1575 NFTA_DATA_UNSPEC = 0x0
1576 NFTA_DATA_VALUE = 0x1
1577 NFTA_DATA_VERDICT = 0x2
1578 NFTA_VERDICT_UNSPEC = 0x0
1579 NFTA_VERDICT_CODE = 0x1
1580 NFTA_VERDICT_CHAIN = 0x2
1581 NFTA_EXPR_UNSPEC = 0x0
1582 NFTA_EXPR_NAME = 0x1
1583 NFTA_EXPR_DATA = 0x2
1584 NFTA_IMMEDIATE_UNSPEC = 0x0
1585 NFTA_IMMEDIATE_DREG = 0x1
1586 NFTA_IMMEDIATE_DATA = 0x2
1587 NFTA_BITWISE_UNSPEC = 0x0
1588 NFTA_BITWISE_SREG = 0x1
1589 NFTA_BITWISE_DREG = 0x2
1590 NFTA_BITWISE_LEN = 0x3
1591 NFTA_BITWISE_MASK = 0x4
1592 NFTA_BITWISE_XOR = 0x5
1593 NFT_BYTEORDER_NTOH = 0x0
1594 NFT_BYTEORDER_HTON = 0x1
1595 NFTA_BYTEORDER_UNSPEC = 0x0
1596 NFTA_BYTEORDER_SREG = 0x1
1597 NFTA_BYTEORDER_DREG = 0x2
1598 NFTA_BYTEORDER_OP = 0x3
1599 NFTA_BYTEORDER_LEN = 0x4
1600 NFTA_BYTEORDER_SIZE = 0x5
1601 NFT_CMP_EQ = 0x0
1602 NFT_CMP_NEQ = 0x1
1603 NFT_CMP_LT = 0x2
1604 NFT_CMP_LTE = 0x3
1605 NFT_CMP_GT = 0x4
1606 NFT_CMP_GTE = 0x5
1607 NFTA_CMP_UNSPEC = 0x0
1608 NFTA_CMP_SREG = 0x1
1609 NFTA_CMP_OP = 0x2
1610 NFTA_CMP_DATA = 0x3
1611 NFT_RANGE_EQ = 0x0
1612 NFT_RANGE_NEQ = 0x1
1613 NFTA_RANGE_UNSPEC = 0x0
1614 NFTA_RANGE_SREG = 0x1
1615 NFTA_RANGE_OP = 0x2
1616 NFTA_RANGE_FROM_DATA = 0x3
1617 NFTA_RANGE_TO_DATA = 0x4
1618 NFT_LOOKUP_F_INV = 0x1
1619 NFTA_LOOKUP_UNSPEC = 0x0
1620 NFTA_LOOKUP_SET = 0x1
1621 NFTA_LOOKUP_SREG = 0x2
1622 NFTA_LOOKUP_DREG = 0x3
1623 NFTA_LOOKUP_SET_ID = 0x4
1624 NFTA_LOOKUP_FLAGS = 0x5
1625 NFT_DYNSET_OP_ADD = 0x0
1626 NFT_DYNSET_OP_UPDATE = 0x1
1627 NFT_DYNSET_F_INV = 0x1
1628 NFTA_DYNSET_UNSPEC = 0x0
1629 NFTA_DYNSET_SET_NAME = 0x1
1630 NFTA_DYNSET_SET_ID = 0x2
1631 NFTA_DYNSET_OP = 0x3
1632 NFTA_DYNSET_SREG_KEY = 0x4
1633 NFTA_DYNSET_SREG_DATA = 0x5
1634 NFTA_DYNSET_TIMEOUT = 0x6
1635 NFTA_DYNSET_EXPR = 0x7
1636 NFTA_DYNSET_PAD = 0x8
1637 NFTA_DYNSET_FLAGS = 0x9
1638 NFT_PAYLOAD_LL_HEADER = 0x0
1639 NFT_PAYLOAD_NETWORK_HEADER = 0x1
1640 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
1641 NFT_PAYLOAD_CSUM_NONE = 0x0
1642 NFT_PAYLOAD_CSUM_INET = 0x1
1643 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
1644 NFTA_PAYLOAD_UNSPEC = 0x0
1645 NFTA_PAYLOAD_DREG = 0x1
1646 NFTA_PAYLOAD_BASE = 0x2
1647 NFTA_PAYLOAD_OFFSET = 0x3
1648 NFTA_PAYLOAD_LEN = 0x4
1649 NFTA_PAYLOAD_SREG = 0x5
1650 NFTA_PAYLOAD_CSUM_TYPE = 0x6
1651 NFTA_PAYLOAD_CSUM_OFFSET = 0x7
1652 NFTA_PAYLOAD_CSUM_FLAGS = 0x8
1653 NFT_EXTHDR_F_PRESENT = 0x1
1654 NFT_EXTHDR_OP_IPV6 = 0x0
1655 NFT_EXTHDR_OP_TCPOPT = 0x1
1656 NFTA_EXTHDR_UNSPEC = 0x0
1657 NFTA_EXTHDR_DREG = 0x1
1658 NFTA_EXTHDR_TYPE = 0x2
1659 NFTA_EXTHDR_OFFSET = 0x3
1660 NFTA_EXTHDR_LEN = 0x4
1661 NFTA_EXTHDR_FLAGS = 0x5
1662 NFTA_EXTHDR_OP = 0x6
1663 NFTA_EXTHDR_SREG = 0x7
1664 NFT_META_LEN = 0x0
1665 NFT_META_PROTOCOL = 0x1
1666 NFT_META_PRIORITY = 0x2
1667 NFT_META_MARK = 0x3
1668 NFT_META_IIF = 0x4
1669 NFT_META_OIF = 0x5
1670 NFT_META_IIFNAME = 0x6
1671 NFT_META_OIFNAME = 0x7
1672 NFT_META_IIFTYPE = 0x8
1673 NFT_META_OIFTYPE = 0x9
1674 NFT_META_SKUID = 0xa
1675 NFT_META_SKGID = 0xb
1676 NFT_META_NFTRACE = 0xc
1677 NFT_META_RTCLASSID = 0xd
1678 NFT_META_SECMARK = 0xe
1679 NFT_META_NFPROTO = 0xf
1680 NFT_META_L4PROTO = 0x10
1681 NFT_META_BRI_IIFNAME = 0x11
1682 NFT_META_BRI_OIFNAME = 0x12
1683 NFT_META_PKTTYPE = 0x13
1684 NFT_META_CPU = 0x14
1685 NFT_META_IIFGROUP = 0x15
1686 NFT_META_OIFGROUP = 0x16
1687 NFT_META_CGROUP = 0x17
1688 NFT_META_PRANDOM = 0x18
1689 NFT_RT_CLASSID = 0x0
1690 NFT_RT_NEXTHOP4 = 0x1
1691 NFT_RT_NEXTHOP6 = 0x2
1692 NFT_RT_TCPMSS = 0x3
1693 NFT_HASH_JENKINS = 0x0
1694 NFT_HASH_SYM = 0x1
1695 NFTA_HASH_UNSPEC = 0x0
1696 NFTA_HASH_SREG = 0x1
1697 NFTA_HASH_DREG = 0x2
1698 NFTA_HASH_LEN = 0x3
1699 NFTA_HASH_MODULUS = 0x4
1700 NFTA_HASH_SEED = 0x5
1701 NFTA_HASH_OFFSET = 0x6
1702 NFTA_HASH_TYPE = 0x7
1703 NFTA_META_UNSPEC = 0x0
1704 NFTA_META_DREG = 0x1
1705 NFTA_META_KEY = 0x2
1706 NFTA_META_SREG = 0x3
1707 NFTA_RT_UNSPEC = 0x0
1708 NFTA_RT_DREG = 0x1
1709 NFTA_RT_KEY = 0x2
1710 NFT_CT_STATE = 0x0
1711 NFT_CT_DIRECTION = 0x1
1712 NFT_CT_STATUS = 0x2
1713 NFT_CT_MARK = 0x3
1714 NFT_CT_SECMARK = 0x4
1715 NFT_CT_EXPIRATION = 0x5
1716 NFT_CT_HELPER = 0x6
1717 NFT_CT_L3PROTOCOL = 0x7
1718 NFT_CT_SRC = 0x8
1719 NFT_CT_DST = 0x9
1720 NFT_CT_PROTOCOL = 0xa
1721 NFT_CT_PROTO_SRC = 0xb
1722 NFT_CT_PROTO_DST = 0xc
1723 NFT_CT_LABELS = 0xd
1724 NFT_CT_PKTS = 0xe
1725 NFT_CT_BYTES = 0xf
1726 NFT_CT_AVGPKT = 0x10
1727 NFT_CT_ZONE = 0x11
1728 NFT_CT_EVENTMASK = 0x12
1729 NFTA_CT_UNSPEC = 0x0
1730 NFTA_CT_DREG = 0x1
1731 NFTA_CT_KEY = 0x2
1732 NFTA_CT_DIRECTION = 0x3
1733 NFTA_CT_SREG = 0x4
1734 NFT_LIMIT_PKTS = 0x0
1735 NFT_LIMIT_PKT_BYTES = 0x1
1736 NFT_LIMIT_F_INV = 0x1
1737 NFTA_LIMIT_UNSPEC = 0x0
1738 NFTA_LIMIT_RATE = 0x1
1739 NFTA_LIMIT_UNIT = 0x2
1740 NFTA_LIMIT_BURST = 0x3
1741 NFTA_LIMIT_TYPE = 0x4
1742 NFTA_LIMIT_FLAGS = 0x5
1743 NFTA_LIMIT_PAD = 0x6
1744 NFTA_COUNTER_UNSPEC = 0x0
1745 NFTA_COUNTER_BYTES = 0x1
1746 NFTA_COUNTER_PACKETS = 0x2
1747 NFTA_COUNTER_PAD = 0x3
1748 NFTA_LOG_UNSPEC = 0x0
1749 NFTA_LOG_GROUP = 0x1
1750 NFTA_LOG_PREFIX = 0x2
1751 NFTA_LOG_SNAPLEN = 0x3
1752 NFTA_LOG_QTHRESHOLD = 0x4
1753 NFTA_LOG_LEVEL = 0x5
1754 NFTA_LOG_FLAGS = 0x6
1755 NFTA_QUEUE_UNSPEC = 0x0
1756 NFTA_QUEUE_NUM = 0x1
1757 NFTA_QUEUE_TOTAL = 0x2
1758 NFTA_QUEUE_FLAGS = 0x3
1759 NFTA_QUEUE_SREG_QNUM = 0x4
1760 NFT_QUOTA_F_INV = 0x1
1761 NFT_QUOTA_F_DEPLETED = 0x2
1762 NFTA_QUOTA_UNSPEC = 0x0
1763 NFTA_QUOTA_BYTES = 0x1
1764 NFTA_QUOTA_FLAGS = 0x2
1765 NFTA_QUOTA_PAD = 0x3
1766 NFTA_QUOTA_CONSUMED = 0x4
1767 NFT_REJECT_ICMP_UNREACH = 0x0
1768 NFT_REJECT_TCP_RST = 0x1
1769 NFT_REJECT_ICMPX_UNREACH = 0x2
1770 NFT_REJECT_ICMPX_NO_ROUTE = 0x0
1771 NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
1772 NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
1773 NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
1774 NFTA_REJECT_UNSPEC = 0x0
1775 NFTA_REJECT_TYPE = 0x1
1776 NFTA_REJECT_ICMP_CODE = 0x2
1777 NFT_NAT_SNAT = 0x0
1778 NFT_NAT_DNAT = 0x1
1779 NFTA_NAT_UNSPEC = 0x0
1780 NFTA_NAT_TYPE = 0x1
1781 NFTA_NAT_FAMILY = 0x2
1782 NFTA_NAT_REG_ADDR_MIN = 0x3
1783 NFTA_NAT_REG_ADDR_MAX = 0x4
1784 NFTA_NAT_REG_PROTO_MIN = 0x5
1785 NFTA_NAT_REG_PROTO_MAX = 0x6
1786 NFTA_NAT_FLAGS = 0x7
1787 NFTA_MASQ_UNSPEC = 0x0
1788 NFTA_MASQ_FLAGS = 0x1
1789 NFTA_MASQ_REG_PROTO_MIN = 0x2
1790 NFTA_MASQ_REG_PROTO_MAX = 0x3
1791 NFTA_REDIR_UNSPEC = 0x0
1792 NFTA_REDIR_REG_PROTO_MIN = 0x1
1793 NFTA_REDIR_REG_PROTO_MAX = 0x2
1794 NFTA_REDIR_FLAGS = 0x3
1795 NFTA_DUP_UNSPEC = 0x0
1796 NFTA_DUP_SREG_ADDR = 0x1
1797 NFTA_DUP_SREG_DEV = 0x2
1798 NFTA_FWD_UNSPEC = 0x0
1799 NFTA_FWD_SREG_DEV = 0x1
1800 NFTA_OBJREF_UNSPEC = 0x0
1801 NFTA_OBJREF_IMM_TYPE = 0x1
1802 NFTA_OBJREF_IMM_NAME = 0x2
1803 NFTA_OBJREF_SET_SREG = 0x3
1804 NFTA_OBJREF_SET_NAME = 0x4
1805 NFTA_OBJREF_SET_ID = 0x5
1806 NFTA_GEN_UNSPEC = 0x0
1807 NFTA_GEN_ID = 0x1
1808 NFTA_GEN_PROC_PID = 0x2
1809 NFTA_GEN_PROC_NAME = 0x3
1810 NFTA_FIB_UNSPEC = 0x0
1811 NFTA_FIB_DREG = 0x1
1812 NFTA_FIB_RESULT = 0x2
1813 NFTA_FIB_FLAGS = 0x3
1814 NFT_FIB_RESULT_UNSPEC = 0x0
1815 NFT_FIB_RESULT_OIF = 0x1
1816 NFT_FIB_RESULT_OIFNAME = 0x2
1817 NFT_FIB_RESULT_ADDRTYPE = 0x3
1818 NFTA_FIB_F_SADDR = 0x1
1819 NFTA_FIB_F_DADDR = 0x2
1820 NFTA_FIB_F_MARK = 0x4
1821 NFTA_FIB_F_IIF = 0x8
1822 NFTA_FIB_F_OIF = 0x10
1823 NFTA_FIB_F_PRESENT = 0x20
1824 NFTA_CT_HELPER_UNSPEC = 0x0
1825 NFTA_CT_HELPER_NAME = 0x1
1826 NFTA_CT_HELPER_L3PROTO = 0x2
1827 NFTA_CT_HELPER_L4PROTO = 0x3
1828 NFTA_OBJ_UNSPEC = 0x0
1829 NFTA_OBJ_TABLE = 0x1
1830 NFTA_OBJ_NAME = 0x2
1831 NFTA_OBJ_TYPE = 0x3
1832 NFTA_OBJ_DATA = 0x4
1833 NFTA_OBJ_USE = 0x5
1834 NFTA_TRACE_UNSPEC = 0x0
1835 NFTA_TRACE_TABLE = 0x1
1836 NFTA_TRACE_CHAIN = 0x2
1837 NFTA_TRACE_RULE_HANDLE = 0x3
1838 NFTA_TRACE_TYPE = 0x4
1839 NFTA_TRACE_VERDICT = 0x5
1840 NFTA_TRACE_ID = 0x6
1841 NFTA_TRACE_LL_HEADER = 0x7
1842 NFTA_TRACE_NETWORK_HEADER = 0x8
1843 NFTA_TRACE_TRANSPORT_HEADER = 0x9
1844 NFTA_TRACE_IIF = 0xa
1845 NFTA_TRACE_IIFTYPE = 0xb
1846 NFTA_TRACE_OIF = 0xc
1847 NFTA_TRACE_OIFTYPE = 0xd
1848 NFTA_TRACE_MARK = 0xe
1849 NFTA_TRACE_NFPROTO = 0xf
1850 NFTA_TRACE_POLICY = 0x10
1851 NFTA_TRACE_PAD = 0x11
1852 NFT_TRACETYPE_UNSPEC = 0x0
1853 NFT_TRACETYPE_POLICY = 0x1
1854 NFT_TRACETYPE_RETURN = 0x2
1855 NFT_TRACETYPE_RULE = 0x3
1856 NFTA_NG_UNSPEC = 0x0
1857 NFTA_NG_DREG = 0x1
1858 NFTA_NG_MODULUS = 0x2
1859 NFTA_NG_TYPE = 0x3
1860 NFTA_NG_OFFSET = 0x4
1861 NFT_NG_INCREMENTAL = 0x0
1862 NFT_NG_RANDOM = 0x1
1863 )
1864
1865 type RTCTime struct {
1866 Sec int32
1867 Min int32
1868 Hour int32
1869 Mday int32
1870 Mon int32
1871 Year int32
1872 Wday int32
1873 Yday int32
1874 Isdst int32
1875 }
1876
1877 type RTCWkAlrm struct {
1878 Enabled uint8
1879 Pending uint8
1880 Time RTCTime
1881 }
1882
1883 type RTCPLLInfo struct {
1884 Ctrl int32
1885 Value int32
1886 Max int32
1887 Min int32
1888 Posmult int32
1889 Negmult int32
1890 Clock int32
1891 }
1892
1893 type BlkpgIoctlArg struct {
1894 Op int32
1895 Flags int32
1896 Datalen int32
1897 Data *byte
1898 }
1899
1900 type BlkpgPartition struct {
1901 Start int64
1902 Length int64
1903 Pno int32
1904 Devname [64]uint8
1905 Volname [64]uint8
1906 _ [4]byte
1907 }
1908
1909 const (
1910 BLKPG = 0x20001269
1911 BLKPG_ADD_PARTITION = 0x1
1912 BLKPG_DEL_PARTITION = 0x2
1913 BLKPG_RESIZE_PARTITION = 0x3
1914 )
1915
1916 const (
1917 NETNSA_NONE = 0x0
1918 NETNSA_NSID = 0x1
1919 NETNSA_PID = 0x2
1920 NETNSA_FD = 0x3
1921 )
1922
1923 type XDPRingOffset struct {
1924 Producer uint64
1925 Consumer uint64
1926 Desc uint64
1927 }
1928
1929 type XDPMmapOffsets struct {
1930 Rx XDPRingOffset
1931 Tx XDPRingOffset
1932 Fr XDPRingOffset
1933 Cr XDPRingOffset
1934 }
1935
1936 type XDPUmemReg struct {
1937 Addr uint64
1938 Len uint64
1939 Size uint32
1940 Headroom uint32
1941 }
1942
1943 type XDPStatistics struct {
1944 Rx_dropped uint64
1945 Rx_invalid_descs uint64
1946 Tx_invalid_descs uint64
1947 }
1948
1949 type XDPDesc struct {
1950 Addr uint64
1951 Len uint32
1952 Options uint32
1953 }
1954
1955 const (
1956 NCSI_CMD_UNSPEC = 0x0
1957 NCSI_CMD_PKG_INFO = 0x1
1958 NCSI_CMD_SET_INTERFACE = 0x2
1959 NCSI_CMD_CLEAR_INTERFACE = 0x3
1960 NCSI_ATTR_UNSPEC = 0x0
1961 NCSI_ATTR_IFINDEX = 0x1
1962 NCSI_ATTR_PACKAGE_LIST = 0x2
1963 NCSI_ATTR_PACKAGE_ID = 0x3
1964 NCSI_ATTR_CHANNEL_ID = 0x4
1965 NCSI_PKG_ATTR_UNSPEC = 0x0
1966 NCSI_PKG_ATTR = 0x1
1967 NCSI_PKG_ATTR_ID = 0x2
1968 NCSI_PKG_ATTR_FORCED = 0x3
1969 NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
1970 NCSI_CHANNEL_ATTR_UNSPEC = 0x0
1971 NCSI_CHANNEL_ATTR = 0x1
1972 NCSI_CHANNEL_ATTR_ID = 0x2
1973 NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
1974 NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
1975 NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
1976 NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
1977 NCSI_CHANNEL_ATTR_ACTIVE = 0x7
1978 NCSI_CHANNEL_ATTR_FORCED = 0x8
1979 NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
1980 NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
1981 )
1982
1983 const (
1984 SOF_TIMESTAMPING_TX_HARDWARE = 0x1
1985 SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
1986 SOF_TIMESTAMPING_RX_HARDWARE = 0x4
1987 SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
1988 SOF_TIMESTAMPING_SOFTWARE = 0x10
1989 SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
1990 SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
1991 SOF_TIMESTAMPING_OPT_ID = 0x80
1992 SOF_TIMESTAMPING_TX_SCHED = 0x100
1993 SOF_TIMESTAMPING_TX_ACK = 0x200
1994 SOF_TIMESTAMPING_OPT_CMSG = 0x400
1995 SOF_TIMESTAMPING_OPT_TSONLY = 0x800
1996 SOF_TIMESTAMPING_OPT_STATS = 0x1000
1997 SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
1998 SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
1999
2000 SOF_TIMESTAMPING_LAST = 0x4000
2001 SOF_TIMESTAMPING_MASK = 0x7fff
2002 )
55 package unix
66
77 const (
8 sizeofPtr = 0x8
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x8
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
1313 PathMax = 0x1000
1414 )
1515
3232
3333 type Timex struct {
3434 Modes uint32
35 Pad_cgo_0 [4]byte
3635 Offset int64
3736 Freq int64
3837 Maxerror int64
3938 Esterror int64
4039 Status int32
41 Pad_cgo_1 [4]byte
4240 Constant int64
4341 Precision int64
4442 Tolerance int64
4745 Ppsfreq int64
4846 Jitter int64
4947 Shift int32
50 Pad_cgo_2 [4]byte
5148 Stabil int64
5249 Jitcnt int64
5350 Calcnt int64
5451 Errcnt int64
5552 Stbcnt int64
5653 Tai int32
57 Pad_cgo_3 [44]byte
54 _ [44]byte
5855 }
5956
6057 type Time_t int64
104101 Mode uint32
105102 Uid uint32
106103 Gid uint32
107 X__pad2 int32
104 _ int32
108105 Rdev uint64
109106 Size int64
110107 Blksize int64
117114 _ uint64
118115 }
119116
120 type Statfs_t struct {
121 Type int64
122 Bsize int64
123 Blocks uint64
124 Bfree uint64
125 Bavail uint64
126 Files uint64
127 Ffree uint64
128 Fsid Fsid
129 Namelen int64
130 Frsize int64
131 Flags int64
132 Spare [4]int64
117 type StatxTimestamp struct {
118 Sec int64
119 Nsec uint32
120 _ int32
121 }
122
123 type Statx_t struct {
124 Mask uint32
125 Blksize uint32
126 Attributes uint64
127 Nlink uint32
128 Uid uint32
129 Gid uint32
130 Mode uint16
131 _ [1]uint16
132 Ino uint64
133 Size uint64
134 Blocks uint64
135 Attributes_mask uint64
136 Atime StatxTimestamp
137 Btime StatxTimestamp
138 Ctime StatxTimestamp
139 Mtime StatxTimestamp
140 Rdev_major uint32
141 Rdev_minor uint32
142 Dev_major uint32
143 Dev_minor uint32
144 _ [14]uint64
133145 }
134146
135147 type Dirent struct {
136 Ino uint64
137 Off int64
138 Reclen uint16
139 Type uint8
140 Name [256]uint8
141 Pad_cgo_0 [5]byte
148 Ino uint64
149 Off int64
150 Reclen uint16
151 Type uint8
152 Name [256]uint8
153 _ [5]byte
142154 }
143155
144156 type Fsid struct {
145 X__val [2]int32
157 Val [2]int32
146158 }
147159
148160 type Flock_t struct {
149 Type int16
150 Whence int16
151 Pad_cgo_0 [4]byte
152 Start int64
153 Len int64
154 Pid int32
155 Pad_cgo_1 [4]byte
161 Type int16
162 Whence int16
163 Start int64
164 Len int64
165 Pid int32
166 _ [4]byte
156167 }
157168
158169 type FscryptPolicy struct {
227238 Channel uint16
228239 }
229240
241 type RawSockaddrL2 struct {
242 Family uint16
243 Psm uint16
244 Bdaddr [6]uint8
245 Cid uint16
246 Bdaddr_type uint8
247 _ [1]byte
248 }
249
250 type RawSockaddrRFCOMM struct {
251 Family uint16
252 Bdaddr [6]uint8
253 Channel uint8
254 _ [1]byte
255 }
256
230257 type RawSockaddrCAN struct {
231 Family uint16
232 Pad_cgo_0 [2]byte
233 Ifindex int32
234 Addr [8]byte
258 Family uint16
259 Ifindex int32
260 Addr [8]byte
235261 }
236262
237263 type RawSockaddrALG struct {
250276 Zero [4]uint8
251277 }
252278
279 type RawSockaddrXDP struct {
280 Family uint16
281 Flags uint16
282 Ifindex uint32
283 Queue_id uint32
284 Shared_umem_fd uint32
285 }
286
287 type RawSockaddrPPPoX [0x1e]byte
288
253289 type RawSockaddr struct {
254290 Family uint16
255291 Data [14]uint8
298334 type Msghdr struct {
299335 Name *byte
300336 Namelen uint32
301 Pad_cgo_0 [4]byte
302337 Iov *Iovec
303338 Iovlen uint64
304339 Control *byte
305340 Controllen uint64
306341 Flags int32
307 Pad_cgo_1 [4]byte
342 _ [4]byte
308343 }
309344
310345 type Cmsghdr struct {
346381 Probes uint8
347382 Backoff uint8
348383 Options uint8
349 Pad_cgo_0 [2]byte
350384 Rto uint32
351385 Ato uint32
352386 Snd_mss uint32
381415 SizeofSockaddrLinklayer = 0x14
382416 SizeofSockaddrNetlink = 0xc
383417 SizeofSockaddrHCI = 0x6
418 SizeofSockaddrL2 = 0xe
419 SizeofSockaddrRFCOMM = 0xa
384420 SizeofSockaddrCAN = 0x10
385421 SizeofSockaddrALG = 0x58
386422 SizeofSockaddrVM = 0x10
423 SizeofSockaddrXDP = 0x10
424 SizeofSockaddrPPPoX = 0x1e
387425 SizeofLinger = 0x8
388426 SizeofIovec = 0x10
389427 SizeofIPMreq = 0x8
401439 )
402440
403441 const (
404 IFA_UNSPEC = 0x0
405 IFA_ADDRESS = 0x1
406 IFA_LOCAL = 0x2
407 IFA_LABEL = 0x3
408 IFA_BROADCAST = 0x4
409 IFA_ANYCAST = 0x5
410 IFA_CACHEINFO = 0x6
411 IFA_MULTICAST = 0x7
412 IFLA_UNSPEC = 0x0
413 IFLA_ADDRESS = 0x1
414 IFLA_BROADCAST = 0x2
415 IFLA_IFNAME = 0x3
416 IFLA_MTU = 0x4
417 IFLA_LINK = 0x5
418 IFLA_QDISC = 0x6
419 IFLA_STATS = 0x7
420 IFLA_COST = 0x8
421 IFLA_PRIORITY = 0x9
422 IFLA_MASTER = 0xa
423 IFLA_WIRELESS = 0xb
424 IFLA_PROTINFO = 0xc
425 IFLA_TXQLEN = 0xd
426 IFLA_MAP = 0xe
427 IFLA_WEIGHT = 0xf
428 IFLA_OPERSTATE = 0x10
429 IFLA_LINKMODE = 0x11
430 IFLA_LINKINFO = 0x12
431 IFLA_NET_NS_PID = 0x13
432 IFLA_IFALIAS = 0x14
433 IFLA_MAX = 0x2c
434 RT_SCOPE_UNIVERSE = 0x0
435 RT_SCOPE_SITE = 0xc8
436 RT_SCOPE_LINK = 0xfd
437 RT_SCOPE_HOST = 0xfe
438 RT_SCOPE_NOWHERE = 0xff
439 RT_TABLE_UNSPEC = 0x0
440 RT_TABLE_COMPAT = 0xfc
441 RT_TABLE_DEFAULT = 0xfd
442 RT_TABLE_MAIN = 0xfe
443 RT_TABLE_LOCAL = 0xff
444 RT_TABLE_MAX = 0xffffffff
445 RTA_UNSPEC = 0x0
446 RTA_DST = 0x1
447 RTA_SRC = 0x2
448 RTA_IIF = 0x3
449 RTA_OIF = 0x4
450 RTA_GATEWAY = 0x5
451 RTA_PRIORITY = 0x6
452 RTA_PREFSRC = 0x7
453 RTA_METRICS = 0x8
454 RTA_MULTIPATH = 0x9
455 RTA_FLOW = 0xb
456 RTA_CACHEINFO = 0xc
457 RTA_TABLE = 0xf
458 RTN_UNSPEC = 0x0
459 RTN_UNICAST = 0x1
460 RTN_LOCAL = 0x2
461 RTN_BROADCAST = 0x3
462 RTN_ANYCAST = 0x4
463 RTN_MULTICAST = 0x5
464 RTN_BLACKHOLE = 0x6
465 RTN_UNREACHABLE = 0x7
466 RTN_PROHIBIT = 0x8
467 RTN_THROW = 0x9
468 RTN_NAT = 0xa
469 RTN_XRESOLVE = 0xb
470 RTNLGRP_NONE = 0x0
471 RTNLGRP_LINK = 0x1
472 RTNLGRP_NOTIFY = 0x2
473 RTNLGRP_NEIGH = 0x3
474 RTNLGRP_TC = 0x4
475 RTNLGRP_IPV4_IFADDR = 0x5
476 RTNLGRP_IPV4_MROUTE = 0x6
477 RTNLGRP_IPV4_ROUTE = 0x7
478 RTNLGRP_IPV4_RULE = 0x8
479 RTNLGRP_IPV6_IFADDR = 0x9
480 RTNLGRP_IPV6_MROUTE = 0xa
481 RTNLGRP_IPV6_ROUTE = 0xb
482 RTNLGRP_IPV6_IFINFO = 0xc
483 RTNLGRP_IPV6_PREFIX = 0x12
484 RTNLGRP_IPV6_RULE = 0x13
485 RTNLGRP_ND_USEROPT = 0x14
486 SizeofNlMsghdr = 0x10
487 SizeofNlMsgerr = 0x14
488 SizeofRtGenmsg = 0x1
489 SizeofNlAttr = 0x4
490 SizeofRtAttr = 0x4
491 SizeofIfInfomsg = 0x10
492 SizeofIfAddrmsg = 0x8
493 SizeofRtMsg = 0xc
494 SizeofRtNexthop = 0x8
442 IFA_UNSPEC = 0x0
443 IFA_ADDRESS = 0x1
444 IFA_LOCAL = 0x2
445 IFA_LABEL = 0x3
446 IFA_BROADCAST = 0x4
447 IFA_ANYCAST = 0x5
448 IFA_CACHEINFO = 0x6
449 IFA_MULTICAST = 0x7
450 IFLA_UNSPEC = 0x0
451 IFLA_ADDRESS = 0x1
452 IFLA_BROADCAST = 0x2
453 IFLA_IFNAME = 0x3
454 IFLA_INFO_KIND = 0x1
455 IFLA_MTU = 0x4
456 IFLA_LINK = 0x5
457 IFLA_QDISC = 0x6
458 IFLA_STATS = 0x7
459 IFLA_COST = 0x8
460 IFLA_PRIORITY = 0x9
461 IFLA_MASTER = 0xa
462 IFLA_WIRELESS = 0xb
463 IFLA_PROTINFO = 0xc
464 IFLA_TXQLEN = 0xd
465 IFLA_MAP = 0xe
466 IFLA_WEIGHT = 0xf
467 IFLA_OPERSTATE = 0x10
468 IFLA_LINKMODE = 0x11
469 IFLA_LINKINFO = 0x12
470 IFLA_NET_NS_PID = 0x13
471 IFLA_IFALIAS = 0x14
472 IFLA_NUM_VF = 0x15
473 IFLA_VFINFO_LIST = 0x16
474 IFLA_STATS64 = 0x17
475 IFLA_VF_PORTS = 0x18
476 IFLA_PORT_SELF = 0x19
477 IFLA_AF_SPEC = 0x1a
478 IFLA_GROUP = 0x1b
479 IFLA_NET_NS_FD = 0x1c
480 IFLA_EXT_MASK = 0x1d
481 IFLA_PROMISCUITY = 0x1e
482 IFLA_NUM_TX_QUEUES = 0x1f
483 IFLA_NUM_RX_QUEUES = 0x20
484 IFLA_CARRIER = 0x21
485 IFLA_PHYS_PORT_ID = 0x22
486 IFLA_CARRIER_CHANGES = 0x23
487 IFLA_PHYS_SWITCH_ID = 0x24
488 IFLA_LINK_NETNSID = 0x25
489 IFLA_PHYS_PORT_NAME = 0x26
490 IFLA_PROTO_DOWN = 0x27
491 IFLA_GSO_MAX_SEGS = 0x28
492 IFLA_GSO_MAX_SIZE = 0x29
493 IFLA_PAD = 0x2a
494 IFLA_XDP = 0x2b
495 IFLA_EVENT = 0x2c
496 IFLA_NEW_NETNSID = 0x2d
497 IFLA_IF_NETNSID = 0x2e
498 IFLA_MAX = 0x33
499 RT_SCOPE_UNIVERSE = 0x0
500 RT_SCOPE_SITE = 0xc8
501 RT_SCOPE_LINK = 0xfd
502 RT_SCOPE_HOST = 0xfe
503 RT_SCOPE_NOWHERE = 0xff
504 RT_TABLE_UNSPEC = 0x0
505 RT_TABLE_COMPAT = 0xfc
506 RT_TABLE_DEFAULT = 0xfd
507 RT_TABLE_MAIN = 0xfe
508 RT_TABLE_LOCAL = 0xff
509 RT_TABLE_MAX = 0xffffffff
510 RTA_UNSPEC = 0x0
511 RTA_DST = 0x1
512 RTA_SRC = 0x2
513 RTA_IIF = 0x3
514 RTA_OIF = 0x4
515 RTA_GATEWAY = 0x5
516 RTA_PRIORITY = 0x6
517 RTA_PREFSRC = 0x7
518 RTA_METRICS = 0x8
519 RTA_MULTIPATH = 0x9
520 RTA_FLOW = 0xb
521 RTA_CACHEINFO = 0xc
522 RTA_TABLE = 0xf
523 RTA_MARK = 0x10
524 RTA_MFC_STATS = 0x11
525 RTA_VIA = 0x12
526 RTA_NEWDST = 0x13
527 RTA_PREF = 0x14
528 RTA_ENCAP_TYPE = 0x15
529 RTA_ENCAP = 0x16
530 RTA_EXPIRES = 0x17
531 RTA_PAD = 0x18
532 RTA_UID = 0x19
533 RTA_TTL_PROPAGATE = 0x1a
534 RTA_IP_PROTO = 0x1b
535 RTA_SPORT = 0x1c
536 RTA_DPORT = 0x1d
537 RTN_UNSPEC = 0x0
538 RTN_UNICAST = 0x1
539 RTN_LOCAL = 0x2
540 RTN_BROADCAST = 0x3
541 RTN_ANYCAST = 0x4
542 RTN_MULTICAST = 0x5
543 RTN_BLACKHOLE = 0x6
544 RTN_UNREACHABLE = 0x7
545 RTN_PROHIBIT = 0x8
546 RTN_THROW = 0x9
547 RTN_NAT = 0xa
548 RTN_XRESOLVE = 0xb
549 RTNLGRP_NONE = 0x0
550 RTNLGRP_LINK = 0x1
551 RTNLGRP_NOTIFY = 0x2
552 RTNLGRP_NEIGH = 0x3
553 RTNLGRP_TC = 0x4
554 RTNLGRP_IPV4_IFADDR = 0x5
555 RTNLGRP_IPV4_MROUTE = 0x6
556 RTNLGRP_IPV4_ROUTE = 0x7
557 RTNLGRP_IPV4_RULE = 0x8
558 RTNLGRP_IPV6_IFADDR = 0x9
559 RTNLGRP_IPV6_MROUTE = 0xa
560 RTNLGRP_IPV6_ROUTE = 0xb
561 RTNLGRP_IPV6_IFINFO = 0xc
562 RTNLGRP_IPV6_PREFIX = 0x12
563 RTNLGRP_IPV6_RULE = 0x13
564 RTNLGRP_ND_USEROPT = 0x14
565 SizeofNlMsghdr = 0x10
566 SizeofNlMsgerr = 0x14
567 SizeofRtGenmsg = 0x1
568 SizeofNlAttr = 0x4
569 SizeofRtAttr = 0x4
570 SizeofIfInfomsg = 0x10
571 SizeofIfAddrmsg = 0x8
572 SizeofRtMsg = 0xc
573 SizeofRtNexthop = 0x8
495574 )
496575
497576 type NlMsghdr struct {
522601 }
523602
524603 type IfInfomsg struct {
525 Family uint8
526 X__ifi_pad uint8
527 Type uint16
528 Index int32
529 Flags uint32
530 Change uint32
604 Family uint8
605 _ uint8
606 Type uint16
607 Index int32
608 Flags uint32
609 Change uint32
531610 }
532611
533612 type IfAddrmsg struct {
570649 }
571650
572651 type SockFprog struct {
573 Len uint16
574 Pad_cgo_0 [6]byte
575 Filter *SockFilter
652 Len uint16
653 Filter *SockFilter
576654 }
577655
578656 type InotifyEvent struct {
615693 Freeswap uint64
616694 Procs uint16
617695 Pad uint16
618 Pad_cgo_0 [4]byte
619696 Totalhigh uint64
620697 Freehigh uint64
621698 Unit uint32
622 X_f [0]uint8
623 Pad_cgo_1 [4]byte
699 _ [0]uint8
700 _ [4]byte
624701 }
625702
626703 type Utsname struct {
627 Sysname [65]uint8
628 Nodename [65]uint8
629 Release [65]uint8
630 Version [65]uint8
631 Machine [65]uint8
632 Domainname [65]uint8
704 Sysname [65]byte
705 Nodename [65]byte
706 Release [65]byte
707 Version [65]byte
708 Machine [65]byte
709 Domainname [65]byte
633710 }
634711
635712 type Ustat_t struct {
636 Tfree int32
637 Pad_cgo_0 [4]byte
638 Tinode uint64
639 Fname [6]uint8
640 Fpack [6]uint8
641 Pad_cgo_1 [4]byte
713 Tfree int32
714 Tinode uint64
715 Fname [6]uint8
716 Fpack [6]uint8
717 _ [4]byte
642718 }
643719
644720 type EpollEvent struct {
645 Events uint32
646 X_padFd int32
647 Fd int32
648 Pad int32
649 }
650
651 const (
652 AT_FDCWD = -0x64
653 AT_REMOVEDIR = 0x200
721 Events uint32
722 _ int32
723 Fd int32
724 Pad int32
725 }
726
727 const (
728 AT_EMPTY_PATH = 0x1000
729 AT_FDCWD = -0x64
730 AT_NO_AUTOMOUNT = 0x800
731 AT_REMOVEDIR = 0x200
732
733 AT_STATX_SYNC_AS_STAT = 0x0
734 AT_STATX_FORCE_SYNC = 0x2000
735 AT_STATX_DONT_SYNC = 0x4000
736
654737 AT_SYMLINK_FOLLOW = 0x400
655738 AT_SYMLINK_NOFOLLOW = 0x100
739
740 AT_EACCESS = 0x200
656741 )
657742
658743 type PollFd struct {
672757 )
673758
674759 type Sigset_t struct {
675 X__val [16]uint64
760 Val [16]uint64
761 }
762
763 type SignalfdSiginfo struct {
764 Signo uint32
765 Errno int32
766 Code int32
767 Pid uint32
768 Uid uint32
769 Fd int32
770 Tid uint32
771 Band uint32
772 Overrun uint32
773 Trapno uint32
774 Status int32
775 Int int32
776 Ptr uint64
777 Utime uint64
778 Stime uint64
779 Addr uint64
780 _ [48]uint8
676781 }
677782
678783 const RNDGETENTCNT = 0x40045200
699804
700805 type Taskstats struct {
701806 Version uint16
702 Pad_cgo_0 [2]byte
703807 Ac_exitcode uint32
704808 Ac_flag uint8
705809 Ac_nice uint8
706 Pad_cgo_1 [6]byte
707810 Cpu_count uint64
708811 Cpu_delay_total uint64
709812 Blkio_count uint64
715818 Ac_comm [32]uint8
716819 Ac_sched uint8
717820 Ac_pad [3]uint8
718 Pad_cgo_2 [4]byte
821 _ [4]byte
719822 Ac_uid uint32
720823 Ac_gid uint32
721824 Ac_pid uint32
722825 Ac_ppid uint32
723826 Ac_btime uint32
724 Pad_cgo_3 [4]byte
725827 Ac_etime uint64
726828 Ac_utime uint64
727829 Ac_stime uint64
745847 Cpu_scaled_run_real_total uint64
746848 Freepages_count uint64
747849 Freepages_delay_total uint64
850 Thrashing_count uint64
851 Thrashing_delay_total uint64
748852 }
749853
750854 const (
763867 TASKSTATS_CMD_ATTR_TGID = 0x2
764868 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
765869 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
870 )
871
872 type CGroupStats struct {
873 Sleeping uint64
874 Running uint64
875 Stopped uint64
876 Uninterruptible uint64
877 Io_wait uint64
878 }
879
880 const (
881 CGROUPSTATS_CMD_UNSPEC = 0x3
882 CGROUPSTATS_CMD_GET = 0x4
883 CGROUPSTATS_CMD_NEW = 0x5
884 CGROUPSTATS_TYPE_UNSPEC = 0x0
885 CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
886 CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
887 CGROUPSTATS_CMD_ATTR_FD = 0x1
766888 )
767889
768890 type Genlmsghdr struct {
797919 CTRL_ATTR_MCAST_GRP_NAME = 0x1
798920 CTRL_ATTR_MCAST_GRP_ID = 0x2
799921 )
922
923 type cpuMask uint64
924
925 const (
926 _CPU_SETSIZE = 0x400
927 _NCPUBITS = 0x40
928 )
929
930 const (
931 BDADDR_BREDR = 0x0
932 BDADDR_LE_PUBLIC = 0x1
933 BDADDR_LE_RANDOM = 0x2
934 )
935
936 type PerfEventAttr struct {
937 Type uint32
938 Size uint32
939 Config uint64
940 Sample uint64
941 Sample_type uint64
942 Read_format uint64
943 Bits uint64
944 Wakeup uint32
945 Bp_type uint32
946 Ext1 uint64
947 Ext2 uint64
948 Branch_sample_type uint64
949 Sample_regs_user uint64
950 Sample_stack_user uint32
951 Clockid int32
952 Sample_regs_intr uint64
953 Aux_watermark uint32
954 _ uint32
955 }
956
957 type PerfEventMmapPage struct {
958 Version uint32
959 Compat_version uint32
960 Lock uint32
961 Index uint32
962 Offset int64
963 Time_enabled uint64
964 Time_running uint64
965 Capabilities uint64
966 Pmc_width uint16
967 Time_shift uint16
968 Time_mult uint32
969 Time_offset uint64
970 Time_zero uint64
971 Size uint32
972 _ [948]uint8
973 Data_head uint64
974 Data_tail uint64
975 Data_offset uint64
976 Data_size uint64
977 Aux_head uint64
978 Aux_tail uint64
979 Aux_offset uint64
980 Aux_size uint64
981 }
982
983 const (
984 PerfBitDisabled uint64 = CBitFieldMaskBit0
985 PerfBitInherit = CBitFieldMaskBit1
986 PerfBitPinned = CBitFieldMaskBit2
987 PerfBitExclusive = CBitFieldMaskBit3
988 PerfBitExcludeUser = CBitFieldMaskBit4
989 PerfBitExcludeKernel = CBitFieldMaskBit5
990 PerfBitExcludeHv = CBitFieldMaskBit6
991 PerfBitExcludeIdle = CBitFieldMaskBit7
992 PerfBitMmap = CBitFieldMaskBit8
993 PerfBitComm = CBitFieldMaskBit9
994 PerfBitFreq = CBitFieldMaskBit10
995 PerfBitInheritStat = CBitFieldMaskBit11
996 PerfBitEnableOnExec = CBitFieldMaskBit12
997 PerfBitTask = CBitFieldMaskBit13
998 PerfBitWatermark = CBitFieldMaskBit14
999 PerfBitPreciseIPBit1 = CBitFieldMaskBit15
1000 PerfBitPreciseIPBit2 = CBitFieldMaskBit16
1001 PerfBitMmapData = CBitFieldMaskBit17
1002 PerfBitSampleIDAll = CBitFieldMaskBit18
1003 PerfBitExcludeHost = CBitFieldMaskBit19
1004 PerfBitExcludeGuest = CBitFieldMaskBit20
1005 PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
1006 PerfBitExcludeCallchainUser = CBitFieldMaskBit22
1007 PerfBitMmap2 = CBitFieldMaskBit23
1008 PerfBitCommExec = CBitFieldMaskBit24
1009 PerfBitUseClockID = CBitFieldMaskBit25
1010 PerfBitContextSwitch = CBitFieldMaskBit26
1011 )
1012
1013 const (
1014 PERF_TYPE_HARDWARE = 0x0
1015 PERF_TYPE_SOFTWARE = 0x1
1016 PERF_TYPE_TRACEPOINT = 0x2
1017 PERF_TYPE_HW_CACHE = 0x3
1018 PERF_TYPE_RAW = 0x4
1019 PERF_TYPE_BREAKPOINT = 0x5
1020
1021 PERF_COUNT_HW_CPU_CYCLES = 0x0
1022 PERF_COUNT_HW_INSTRUCTIONS = 0x1
1023 PERF_COUNT_HW_CACHE_REFERENCES = 0x2
1024 PERF_COUNT_HW_CACHE_MISSES = 0x3
1025 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
1026 PERF_COUNT_HW_BRANCH_MISSES = 0x5
1027 PERF_COUNT_HW_BUS_CYCLES = 0x6
1028 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
1029 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
1030 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
1031
1032 PERF_COUNT_HW_CACHE_L1D = 0x0
1033 PERF_COUNT_HW_CACHE_L1I = 0x1
1034 PERF_COUNT_HW_CACHE_LL = 0x2
1035 PERF_COUNT_HW_CACHE_DTLB = 0x3
1036 PERF_COUNT_HW_CACHE_ITLB = 0x4
1037 PERF_COUNT_HW_CACHE_BPU = 0x5
1038 PERF_COUNT_HW_CACHE_NODE = 0x6
1039
1040 PERF_COUNT_HW_CACHE_OP_READ = 0x0
1041 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
1042 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
1043
1044 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
1045 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
1046
1047 PERF_COUNT_SW_CPU_CLOCK = 0x0
1048 PERF_COUNT_SW_TASK_CLOCK = 0x1
1049 PERF_COUNT_SW_PAGE_FAULTS = 0x2
1050 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
1051 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
1052 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
1053 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
1054 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
1055 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
1056 PERF_COUNT_SW_DUMMY = 0x9
1057
1058 PERF_SAMPLE_IP = 0x1
1059 PERF_SAMPLE_TID = 0x2
1060 PERF_SAMPLE_TIME = 0x4
1061 PERF_SAMPLE_ADDR = 0x8
1062 PERF_SAMPLE_READ = 0x10
1063 PERF_SAMPLE_CALLCHAIN = 0x20
1064 PERF_SAMPLE_ID = 0x40
1065 PERF_SAMPLE_CPU = 0x80
1066 PERF_SAMPLE_PERIOD = 0x100
1067 PERF_SAMPLE_STREAM_ID = 0x200
1068 PERF_SAMPLE_RAW = 0x400
1069 PERF_SAMPLE_BRANCH_STACK = 0x800
1070
1071 PERF_SAMPLE_BRANCH_USER = 0x1
1072 PERF_SAMPLE_BRANCH_KERNEL = 0x2
1073 PERF_SAMPLE_BRANCH_HV = 0x4
1074 PERF_SAMPLE_BRANCH_ANY = 0x8
1075 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
1076 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
1077 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
1078
1079 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
1080 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
1081 PERF_FORMAT_ID = 0x4
1082 PERF_FORMAT_GROUP = 0x8
1083
1084 PERF_RECORD_MMAP = 0x1
1085 PERF_RECORD_LOST = 0x2
1086 PERF_RECORD_COMM = 0x3
1087 PERF_RECORD_EXIT = 0x4
1088 PERF_RECORD_THROTTLE = 0x5
1089 PERF_RECORD_UNTHROTTLE = 0x6
1090 PERF_RECORD_FORK = 0x7
1091 PERF_RECORD_READ = 0x8
1092 PERF_RECORD_SAMPLE = 0x9
1093
1094 PERF_CONTEXT_HV = -0x20
1095 PERF_CONTEXT_KERNEL = -0x80
1096 PERF_CONTEXT_USER = -0x200
1097
1098 PERF_CONTEXT_GUEST = -0x800
1099 PERF_CONTEXT_GUEST_KERNEL = -0x880
1100 PERF_CONTEXT_GUEST_USER = -0xa00
1101
1102 PERF_FLAG_FD_NO_GROUP = 0x1
1103 PERF_FLAG_FD_OUTPUT = 0x2
1104 PERF_FLAG_PID_CGROUP = 0x4
1105 )
1106
1107 const (
1108 CBitFieldMaskBit0 = 0x8000000000000000
1109 CBitFieldMaskBit1 = 0x4000000000000000
1110 CBitFieldMaskBit2 = 0x2000000000000000
1111 CBitFieldMaskBit3 = 0x1000000000000000
1112 CBitFieldMaskBit4 = 0x800000000000000
1113 CBitFieldMaskBit5 = 0x400000000000000
1114 CBitFieldMaskBit6 = 0x200000000000000
1115 CBitFieldMaskBit7 = 0x100000000000000
1116 CBitFieldMaskBit8 = 0x80000000000000
1117 CBitFieldMaskBit9 = 0x40000000000000
1118 CBitFieldMaskBit10 = 0x20000000000000
1119 CBitFieldMaskBit11 = 0x10000000000000
1120 CBitFieldMaskBit12 = 0x8000000000000
1121 CBitFieldMaskBit13 = 0x4000000000000
1122 CBitFieldMaskBit14 = 0x2000000000000
1123 CBitFieldMaskBit15 = 0x1000000000000
1124 CBitFieldMaskBit16 = 0x800000000000
1125 CBitFieldMaskBit17 = 0x400000000000
1126 CBitFieldMaskBit18 = 0x200000000000
1127 CBitFieldMaskBit19 = 0x100000000000
1128 CBitFieldMaskBit20 = 0x80000000000
1129 CBitFieldMaskBit21 = 0x40000000000
1130 CBitFieldMaskBit22 = 0x20000000000
1131 CBitFieldMaskBit23 = 0x10000000000
1132 CBitFieldMaskBit24 = 0x8000000000
1133 CBitFieldMaskBit25 = 0x4000000000
1134 CBitFieldMaskBit26 = 0x2000000000
1135 CBitFieldMaskBit27 = 0x1000000000
1136 CBitFieldMaskBit28 = 0x800000000
1137 CBitFieldMaskBit29 = 0x400000000
1138 CBitFieldMaskBit30 = 0x200000000
1139 CBitFieldMaskBit31 = 0x100000000
1140 CBitFieldMaskBit32 = 0x80000000
1141 CBitFieldMaskBit33 = 0x40000000
1142 CBitFieldMaskBit34 = 0x20000000
1143 CBitFieldMaskBit35 = 0x10000000
1144 CBitFieldMaskBit36 = 0x8000000
1145 CBitFieldMaskBit37 = 0x4000000
1146 CBitFieldMaskBit38 = 0x2000000
1147 CBitFieldMaskBit39 = 0x1000000
1148 CBitFieldMaskBit40 = 0x800000
1149 CBitFieldMaskBit41 = 0x400000
1150 CBitFieldMaskBit42 = 0x200000
1151 CBitFieldMaskBit43 = 0x100000
1152 CBitFieldMaskBit44 = 0x80000
1153 CBitFieldMaskBit45 = 0x40000
1154 CBitFieldMaskBit46 = 0x20000
1155 CBitFieldMaskBit47 = 0x10000
1156 CBitFieldMaskBit48 = 0x8000
1157 CBitFieldMaskBit49 = 0x4000
1158 CBitFieldMaskBit50 = 0x2000
1159 CBitFieldMaskBit51 = 0x1000
1160 CBitFieldMaskBit52 = 0x800
1161 CBitFieldMaskBit53 = 0x400
1162 CBitFieldMaskBit54 = 0x200
1163 CBitFieldMaskBit55 = 0x100
1164 CBitFieldMaskBit56 = 0x80
1165 CBitFieldMaskBit57 = 0x40
1166 CBitFieldMaskBit58 = 0x20
1167 CBitFieldMaskBit59 = 0x10
1168 CBitFieldMaskBit60 = 0x8
1169 CBitFieldMaskBit61 = 0x4
1170 CBitFieldMaskBit62 = 0x2
1171 CBitFieldMaskBit63 = 0x1
1172 )
1173
1174 type SockaddrStorage struct {
1175 Family uint16
1176 _ [118]uint8
1177 _ uint64
1178 }
1179
1180 type TCPMD5Sig struct {
1181 Addr SockaddrStorage
1182 Flags uint8
1183 Prefixlen uint8
1184 Keylen uint16
1185 _ uint32
1186 Key [80]uint8
1187 }
1188
1189 type HDDriveCmdHdr struct {
1190 Command uint8
1191 Number uint8
1192 Feature uint8
1193 Count uint8
1194 }
1195
1196 type HDGeometry struct {
1197 Heads uint8
1198 Sectors uint8
1199 Cylinders uint16
1200 Start uint64
1201 }
1202
1203 type HDDriveID struct {
1204 Config uint16
1205 Cyls uint16
1206 Reserved2 uint16
1207 Heads uint16
1208 Track_bytes uint16
1209 Sector_bytes uint16
1210 Sectors uint16
1211 Vendor0 uint16
1212 Vendor1 uint16
1213 Vendor2 uint16
1214 Serial_no [20]uint8
1215 Buf_type uint16
1216 Buf_size uint16
1217 Ecc_bytes uint16
1218 Fw_rev [8]uint8
1219 Model [40]uint8
1220 Max_multsect uint8
1221 Vendor3 uint8
1222 Dword_io uint16
1223 Vendor4 uint8
1224 Capability uint8
1225 Reserved50 uint16
1226 Vendor5 uint8
1227 TPIO uint8
1228 Vendor6 uint8
1229 TDMA uint8
1230 Field_valid uint16
1231 Cur_cyls uint16
1232 Cur_heads uint16
1233 Cur_sectors uint16
1234 Cur_capacity0 uint16
1235 Cur_capacity1 uint16
1236 Multsect uint8
1237 Multsect_valid uint8
1238 Lba_capacity uint32
1239 Dma_1word uint16
1240 Dma_mword uint16
1241 Eide_pio_modes uint16
1242 Eide_dma_min uint16
1243 Eide_dma_time uint16
1244 Eide_pio uint16
1245 Eide_pio_iordy uint16
1246 Words69_70 [2]uint16
1247 Words71_74 [4]uint16
1248 Queue_depth uint16
1249 Words76_79 [4]uint16
1250 Major_rev_num uint16
1251 Minor_rev_num uint16
1252 Command_set_1 uint16
1253 Command_set_2 uint16
1254 Cfsse uint16
1255 Cfs_enable_1 uint16
1256 Cfs_enable_2 uint16
1257 Csf_default uint16
1258 Dma_ultra uint16
1259 Trseuc uint16
1260 TrsEuc uint16
1261 CurAPMvalues uint16
1262 Mprc uint16
1263 Hw_config uint16
1264 Acoustic uint16
1265 Msrqs uint16
1266 Sxfert uint16
1267 Sal uint16
1268 Spg uint32
1269 Lba_capacity_2 uint64
1270 Words104_125 [22]uint16
1271 Last_lun uint16
1272 Word127 uint16
1273 Dlf uint16
1274 Csfo uint16
1275 Words130_155 [26]uint16
1276 Word156 uint16
1277 Words157_159 [3]uint16
1278 Cfa_power uint16
1279 Words161_175 [15]uint16
1280 Words176_205 [30]uint16
1281 Words206_254 [49]uint16
1282 Integrity_word uint16
1283 }
1284
1285 type Statfs_t struct {
1286 Type int64
1287 Bsize int64
1288 Blocks uint64
1289 Bfree uint64
1290 Bavail uint64
1291 Files uint64
1292 Ffree uint64
1293 Fsid Fsid
1294 Namelen int64
1295 Frsize int64
1296 Flags int64
1297 Spare [4]int64
1298 }
1299
1300 const (
1301 ST_MANDLOCK = 0x40
1302 ST_NOATIME = 0x400
1303 ST_NODEV = 0x4
1304 ST_NODIRATIME = 0x800
1305 ST_NOEXEC = 0x8
1306 ST_NOSUID = 0x2
1307 ST_RDONLY = 0x1
1308 ST_RELATIME = 0x1000
1309 ST_SYNCHRONOUS = 0x10
1310 )
1311
1312 type TpacketHdr struct {
1313 Status uint64
1314 Len uint32
1315 Snaplen uint32
1316 Mac uint16
1317 Net uint16
1318 Sec uint32
1319 Usec uint32
1320 _ [4]byte
1321 }
1322
1323 type Tpacket2Hdr struct {
1324 Status uint32
1325 Len uint32
1326 Snaplen uint32
1327 Mac uint16
1328 Net uint16
1329 Sec uint32
1330 Nsec uint32
1331 Vlan_tci uint16
1332 Vlan_tpid uint16
1333 _ [4]uint8
1334 }
1335
1336 type Tpacket3Hdr struct {
1337 Next_offset uint32
1338 Sec uint32
1339 Nsec uint32
1340 Snaplen uint32
1341 Len uint32
1342 Status uint32
1343 Mac uint16
1344 Net uint16
1345 Hv1 TpacketHdrVariant1
1346 _ [8]uint8
1347 }
1348
1349 type TpacketHdrVariant1 struct {
1350 Rxhash uint32
1351 Vlan_tci uint32
1352 Vlan_tpid uint16
1353 _ uint16
1354 }
1355
1356 type TpacketBlockDesc struct {
1357 Version uint32
1358 To_priv uint32
1359 Hdr [40]byte
1360 }
1361
1362 type TpacketReq struct {
1363 Block_size uint32
1364 Block_nr uint32
1365 Frame_size uint32
1366 Frame_nr uint32
1367 }
1368
1369 type TpacketReq3 struct {
1370 Block_size uint32
1371 Block_nr uint32
1372 Frame_size uint32
1373 Frame_nr uint32
1374 Retire_blk_tov uint32
1375 Sizeof_priv uint32
1376 Feature_req_word uint32
1377 }
1378
1379 type TpacketStats struct {
1380 Packets uint32
1381 Drops uint32
1382 }
1383
1384 type TpacketStatsV3 struct {
1385 Packets uint32
1386 Drops uint32
1387 Freeze_q_cnt uint32
1388 }
1389
1390 type TpacketAuxdata struct {
1391 Status uint32
1392 Len uint32
1393 Snaplen uint32
1394 Mac uint16
1395 Net uint16
1396 Vlan_tci uint16
1397 Vlan_tpid uint16
1398 }
1399
1400 const (
1401 TPACKET_V1 = 0x0
1402 TPACKET_V2 = 0x1
1403 TPACKET_V3 = 0x2
1404 )
1405
1406 const (
1407 SizeofTpacketHdr = 0x20
1408 SizeofTpacket2Hdr = 0x20
1409 SizeofTpacket3Hdr = 0x30
1410 )
1411
1412 const (
1413 NF_INET_PRE_ROUTING = 0x0
1414 NF_INET_LOCAL_IN = 0x1
1415 NF_INET_FORWARD = 0x2
1416 NF_INET_LOCAL_OUT = 0x3
1417 NF_INET_POST_ROUTING = 0x4
1418 NF_INET_NUMHOOKS = 0x5
1419 )
1420
1421 const (
1422 NF_NETDEV_INGRESS = 0x0
1423 NF_NETDEV_NUMHOOKS = 0x1
1424 )
1425
1426 const (
1427 NFPROTO_UNSPEC = 0x0
1428 NFPROTO_INET = 0x1
1429 NFPROTO_IPV4 = 0x2
1430 NFPROTO_ARP = 0x3
1431 NFPROTO_NETDEV = 0x5
1432 NFPROTO_BRIDGE = 0x7
1433 NFPROTO_IPV6 = 0xa
1434 NFPROTO_DECNET = 0xc
1435 NFPROTO_NUMPROTO = 0xd
1436 )
1437
1438 type Nfgenmsg struct {
1439 Nfgen_family uint8
1440 Version uint8
1441 Res_id uint16
1442 }
1443
1444 const (
1445 NFNL_BATCH_UNSPEC = 0x0
1446 NFNL_BATCH_GENID = 0x1
1447 )
1448
1449 const (
1450 NFT_REG_VERDICT = 0x0
1451 NFT_REG_1 = 0x1
1452 NFT_REG_2 = 0x2
1453 NFT_REG_3 = 0x3
1454 NFT_REG_4 = 0x4
1455 NFT_REG32_00 = 0x8
1456 NFT_REG32_01 = 0x9
1457 NFT_REG32_02 = 0xa
1458 NFT_REG32_03 = 0xb
1459 NFT_REG32_04 = 0xc
1460 NFT_REG32_05 = 0xd
1461 NFT_REG32_06 = 0xe
1462 NFT_REG32_07 = 0xf
1463 NFT_REG32_08 = 0x10
1464 NFT_REG32_09 = 0x11
1465 NFT_REG32_10 = 0x12
1466 NFT_REG32_11 = 0x13
1467 NFT_REG32_12 = 0x14
1468 NFT_REG32_13 = 0x15
1469 NFT_REG32_14 = 0x16
1470 NFT_REG32_15 = 0x17
1471 NFT_CONTINUE = -0x1
1472 NFT_BREAK = -0x2
1473 NFT_JUMP = -0x3
1474 NFT_GOTO = -0x4
1475 NFT_RETURN = -0x5
1476 NFT_MSG_NEWTABLE = 0x0
1477 NFT_MSG_GETTABLE = 0x1
1478 NFT_MSG_DELTABLE = 0x2
1479 NFT_MSG_NEWCHAIN = 0x3
1480 NFT_MSG_GETCHAIN = 0x4
1481 NFT_MSG_DELCHAIN = 0x5
1482 NFT_MSG_NEWRULE = 0x6
1483 NFT_MSG_GETRULE = 0x7
1484 NFT_MSG_DELRULE = 0x8
1485 NFT_MSG_NEWSET = 0x9
1486 NFT_MSG_GETSET = 0xa
1487 NFT_MSG_DELSET = 0xb
1488 NFT_MSG_NEWSETELEM = 0xc
1489 NFT_MSG_GETSETELEM = 0xd
1490 NFT_MSG_DELSETELEM = 0xe
1491 NFT_MSG_NEWGEN = 0xf
1492 NFT_MSG_GETGEN = 0x10
1493 NFT_MSG_TRACE = 0x11
1494 NFT_MSG_NEWOBJ = 0x12
1495 NFT_MSG_GETOBJ = 0x13
1496 NFT_MSG_DELOBJ = 0x14
1497 NFT_MSG_GETOBJ_RESET = 0x15
1498 NFT_MSG_MAX = 0x19
1499 NFTA_LIST_UNPEC = 0x0
1500 NFTA_LIST_ELEM = 0x1
1501 NFTA_HOOK_UNSPEC = 0x0
1502 NFTA_HOOK_HOOKNUM = 0x1
1503 NFTA_HOOK_PRIORITY = 0x2
1504 NFTA_HOOK_DEV = 0x3
1505 NFT_TABLE_F_DORMANT = 0x1
1506 NFTA_TABLE_UNSPEC = 0x0
1507 NFTA_TABLE_NAME = 0x1
1508 NFTA_TABLE_FLAGS = 0x2
1509 NFTA_TABLE_USE = 0x3
1510 NFTA_CHAIN_UNSPEC = 0x0
1511 NFTA_CHAIN_TABLE = 0x1
1512 NFTA_CHAIN_HANDLE = 0x2
1513 NFTA_CHAIN_NAME = 0x3
1514 NFTA_CHAIN_HOOK = 0x4
1515 NFTA_CHAIN_POLICY = 0x5
1516 NFTA_CHAIN_USE = 0x6
1517 NFTA_CHAIN_TYPE = 0x7
1518 NFTA_CHAIN_COUNTERS = 0x8
1519 NFTA_CHAIN_PAD = 0x9
1520 NFTA_RULE_UNSPEC = 0x0
1521 NFTA_RULE_TABLE = 0x1
1522 NFTA_RULE_CHAIN = 0x2
1523 NFTA_RULE_HANDLE = 0x3
1524 NFTA_RULE_EXPRESSIONS = 0x4
1525 NFTA_RULE_COMPAT = 0x5
1526 NFTA_RULE_POSITION = 0x6
1527 NFTA_RULE_USERDATA = 0x7
1528 NFTA_RULE_PAD = 0x8
1529 NFTA_RULE_ID = 0x9
1530 NFT_RULE_COMPAT_F_INV = 0x2
1531 NFT_RULE_COMPAT_F_MASK = 0x2
1532 NFTA_RULE_COMPAT_UNSPEC = 0x0
1533 NFTA_RULE_COMPAT_PROTO = 0x1
1534 NFTA_RULE_COMPAT_FLAGS = 0x2
1535 NFT_SET_ANONYMOUS = 0x1
1536 NFT_SET_CONSTANT = 0x2
1537 NFT_SET_INTERVAL = 0x4
1538 NFT_SET_MAP = 0x8
1539 NFT_SET_TIMEOUT = 0x10
1540 NFT_SET_EVAL = 0x20
1541 NFT_SET_OBJECT = 0x40
1542 NFT_SET_POL_PERFORMANCE = 0x0
1543 NFT_SET_POL_MEMORY = 0x1
1544 NFTA_SET_DESC_UNSPEC = 0x0
1545 NFTA_SET_DESC_SIZE = 0x1
1546 NFTA_SET_UNSPEC = 0x0
1547 NFTA_SET_TABLE = 0x1
1548 NFTA_SET_NAME = 0x2
1549 NFTA_SET_FLAGS = 0x3
1550 NFTA_SET_KEY_TYPE = 0x4
1551 NFTA_SET_KEY_LEN = 0x5
1552 NFTA_SET_DATA_TYPE = 0x6
1553 NFTA_SET_DATA_LEN = 0x7
1554 NFTA_SET_POLICY = 0x8
1555 NFTA_SET_DESC = 0x9
1556 NFTA_SET_ID = 0xa
1557 NFTA_SET_TIMEOUT = 0xb
1558 NFTA_SET_GC_INTERVAL = 0xc
1559 NFTA_SET_USERDATA = 0xd
1560 NFTA_SET_PAD = 0xe
1561 NFTA_SET_OBJ_TYPE = 0xf
1562 NFT_SET_ELEM_INTERVAL_END = 0x1
1563 NFTA_SET_ELEM_UNSPEC = 0x0
1564 NFTA_SET_ELEM_KEY = 0x1
1565 NFTA_SET_ELEM_DATA = 0x2
1566 NFTA_SET_ELEM_FLAGS = 0x3
1567 NFTA_SET_ELEM_TIMEOUT = 0x4
1568 NFTA_SET_ELEM_EXPIRATION = 0x5
1569 NFTA_SET_ELEM_USERDATA = 0x6
1570 NFTA_SET_ELEM_EXPR = 0x7
1571 NFTA_SET_ELEM_PAD = 0x8
1572 NFTA_SET_ELEM_OBJREF = 0x9
1573 NFTA_SET_ELEM_LIST_UNSPEC = 0x0
1574 NFTA_SET_ELEM_LIST_TABLE = 0x1
1575 NFTA_SET_ELEM_LIST_SET = 0x2
1576 NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
1577 NFTA_SET_ELEM_LIST_SET_ID = 0x4
1578 NFT_DATA_VALUE = 0x0
1579 NFT_DATA_VERDICT = 0xffffff00
1580 NFTA_DATA_UNSPEC = 0x0
1581 NFTA_DATA_VALUE = 0x1
1582 NFTA_DATA_VERDICT = 0x2
1583 NFTA_VERDICT_UNSPEC = 0x0
1584 NFTA_VERDICT_CODE = 0x1
1585 NFTA_VERDICT_CHAIN = 0x2
1586 NFTA_EXPR_UNSPEC = 0x0
1587 NFTA_EXPR_NAME = 0x1
1588 NFTA_EXPR_DATA = 0x2
1589 NFTA_IMMEDIATE_UNSPEC = 0x0
1590 NFTA_IMMEDIATE_DREG = 0x1
1591 NFTA_IMMEDIATE_DATA = 0x2
1592 NFTA_BITWISE_UNSPEC = 0x0
1593 NFTA_BITWISE_SREG = 0x1
1594 NFTA_BITWISE_DREG = 0x2
1595 NFTA_BITWISE_LEN = 0x3
1596 NFTA_BITWISE_MASK = 0x4
1597 NFTA_BITWISE_XOR = 0x5
1598 NFT_BYTEORDER_NTOH = 0x0
1599 NFT_BYTEORDER_HTON = 0x1
1600 NFTA_BYTEORDER_UNSPEC = 0x0
1601 NFTA_BYTEORDER_SREG = 0x1
1602 NFTA_BYTEORDER_DREG = 0x2
1603 NFTA_BYTEORDER_OP = 0x3
1604 NFTA_BYTEORDER_LEN = 0x4
1605 NFTA_BYTEORDER_SIZE = 0x5
1606 NFT_CMP_EQ = 0x0
1607 NFT_CMP_NEQ = 0x1
1608 NFT_CMP_LT = 0x2
1609 NFT_CMP_LTE = 0x3
1610 NFT_CMP_GT = 0x4
1611 NFT_CMP_GTE = 0x5
1612 NFTA_CMP_UNSPEC = 0x0
1613 NFTA_CMP_SREG = 0x1
1614 NFTA_CMP_OP = 0x2
1615 NFTA_CMP_DATA = 0x3
1616 NFT_RANGE_EQ = 0x0
1617 NFT_RANGE_NEQ = 0x1
1618 NFTA_RANGE_UNSPEC = 0x0
1619 NFTA_RANGE_SREG = 0x1
1620 NFTA_RANGE_OP = 0x2
1621 NFTA_RANGE_FROM_DATA = 0x3
1622 NFTA_RANGE_TO_DATA = 0x4
1623 NFT_LOOKUP_F_INV = 0x1
1624 NFTA_LOOKUP_UNSPEC = 0x0
1625 NFTA_LOOKUP_SET = 0x1
1626 NFTA_LOOKUP_SREG = 0x2
1627 NFTA_LOOKUP_DREG = 0x3
1628 NFTA_LOOKUP_SET_ID = 0x4
1629 NFTA_LOOKUP_FLAGS = 0x5
1630 NFT_DYNSET_OP_ADD = 0x0
1631 NFT_DYNSET_OP_UPDATE = 0x1
1632 NFT_DYNSET_F_INV = 0x1
1633 NFTA_DYNSET_UNSPEC = 0x0
1634 NFTA_DYNSET_SET_NAME = 0x1
1635 NFTA_DYNSET_SET_ID = 0x2
1636 NFTA_DYNSET_OP = 0x3
1637 NFTA_DYNSET_SREG_KEY = 0x4
1638 NFTA_DYNSET_SREG_DATA = 0x5
1639 NFTA_DYNSET_TIMEOUT = 0x6
1640 NFTA_DYNSET_EXPR = 0x7
1641 NFTA_DYNSET_PAD = 0x8
1642 NFTA_DYNSET_FLAGS = 0x9
1643 NFT_PAYLOAD_LL_HEADER = 0x0
1644 NFT_PAYLOAD_NETWORK_HEADER = 0x1
1645 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
1646 NFT_PAYLOAD_CSUM_NONE = 0x0
1647 NFT_PAYLOAD_CSUM_INET = 0x1
1648 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
1649 NFTA_PAYLOAD_UNSPEC = 0x0
1650 NFTA_PAYLOAD_DREG = 0x1
1651 NFTA_PAYLOAD_BASE = 0x2
1652 NFTA_PAYLOAD_OFFSET = 0x3
1653 NFTA_PAYLOAD_LEN = 0x4
1654 NFTA_PAYLOAD_SREG = 0x5
1655 NFTA_PAYLOAD_CSUM_TYPE = 0x6
1656 NFTA_PAYLOAD_CSUM_OFFSET = 0x7
1657 NFTA_PAYLOAD_CSUM_FLAGS = 0x8
1658 NFT_EXTHDR_F_PRESENT = 0x1
1659 NFT_EXTHDR_OP_IPV6 = 0x0
1660 NFT_EXTHDR_OP_TCPOPT = 0x1
1661 NFTA_EXTHDR_UNSPEC = 0x0
1662 NFTA_EXTHDR_DREG = 0x1
1663 NFTA_EXTHDR_TYPE = 0x2
1664 NFTA_EXTHDR_OFFSET = 0x3
1665 NFTA_EXTHDR_LEN = 0x4
1666 NFTA_EXTHDR_FLAGS = 0x5
1667 NFTA_EXTHDR_OP = 0x6
1668 NFTA_EXTHDR_SREG = 0x7
1669 NFT_META_LEN = 0x0
1670 NFT_META_PROTOCOL = 0x1
1671 NFT_META_PRIORITY = 0x2
1672 NFT_META_MARK = 0x3
1673 NFT_META_IIF = 0x4
1674 NFT_META_OIF = 0x5
1675 NFT_META_IIFNAME = 0x6
1676 NFT_META_OIFNAME = 0x7
1677 NFT_META_IIFTYPE = 0x8
1678 NFT_META_OIFTYPE = 0x9
1679 NFT_META_SKUID = 0xa
1680 NFT_META_SKGID = 0xb
1681 NFT_META_NFTRACE = 0xc
1682 NFT_META_RTCLASSID = 0xd
1683 NFT_META_SECMARK = 0xe
1684 NFT_META_NFPROTO = 0xf
1685 NFT_META_L4PROTO = 0x10
1686 NFT_META_BRI_IIFNAME = 0x11
1687 NFT_META_BRI_OIFNAME = 0x12
1688 NFT_META_PKTTYPE = 0x13
1689 NFT_META_CPU = 0x14
1690 NFT_META_IIFGROUP = 0x15
1691 NFT_META_OIFGROUP = 0x16
1692 NFT_META_CGROUP = 0x17
1693 NFT_META_PRANDOM = 0x18
1694 NFT_RT_CLASSID = 0x0
1695 NFT_RT_NEXTHOP4 = 0x1
1696 NFT_RT_NEXTHOP6 = 0x2
1697 NFT_RT_TCPMSS = 0x3
1698 NFT_HASH_JENKINS = 0x0
1699 NFT_HASH_SYM = 0x1
1700 NFTA_HASH_UNSPEC = 0x0
1701 NFTA_HASH_SREG = 0x1
1702 NFTA_HASH_DREG = 0x2
1703 NFTA_HASH_LEN = 0x3
1704 NFTA_HASH_MODULUS = 0x4
1705 NFTA_HASH_SEED = 0x5
1706 NFTA_HASH_OFFSET = 0x6
1707 NFTA_HASH_TYPE = 0x7
1708 NFTA_META_UNSPEC = 0x0
1709 NFTA_META_DREG = 0x1
1710 NFTA_META_KEY = 0x2
1711 NFTA_META_SREG = 0x3
1712 NFTA_RT_UNSPEC = 0x0
1713 NFTA_RT_DREG = 0x1
1714 NFTA_RT_KEY = 0x2
1715 NFT_CT_STATE = 0x0
1716 NFT_CT_DIRECTION = 0x1
1717 NFT_CT_STATUS = 0x2
1718 NFT_CT_MARK = 0x3
1719 NFT_CT_SECMARK = 0x4
1720 NFT_CT_EXPIRATION = 0x5
1721 NFT_CT_HELPER = 0x6
1722 NFT_CT_L3PROTOCOL = 0x7
1723 NFT_CT_SRC = 0x8
1724 NFT_CT_DST = 0x9
1725 NFT_CT_PROTOCOL = 0xa
1726 NFT_CT_PROTO_SRC = 0xb
1727 NFT_CT_PROTO_DST = 0xc
1728 NFT_CT_LABELS = 0xd
1729 NFT_CT_PKTS = 0xe
1730 NFT_CT_BYTES = 0xf
1731 NFT_CT_AVGPKT = 0x10
1732 NFT_CT_ZONE = 0x11
1733 NFT_CT_EVENTMASK = 0x12
1734 NFTA_CT_UNSPEC = 0x0
1735 NFTA_CT_DREG = 0x1
1736 NFTA_CT_KEY = 0x2
1737 NFTA_CT_DIRECTION = 0x3
1738 NFTA_CT_SREG = 0x4
1739 NFT_LIMIT_PKTS = 0x0
1740 NFT_LIMIT_PKT_BYTES = 0x1
1741 NFT_LIMIT_F_INV = 0x1
1742 NFTA_LIMIT_UNSPEC = 0x0
1743 NFTA_LIMIT_RATE = 0x1
1744 NFTA_LIMIT_UNIT = 0x2
1745 NFTA_LIMIT_BURST = 0x3
1746 NFTA_LIMIT_TYPE = 0x4
1747 NFTA_LIMIT_FLAGS = 0x5
1748 NFTA_LIMIT_PAD = 0x6
1749 NFTA_COUNTER_UNSPEC = 0x0
1750 NFTA_COUNTER_BYTES = 0x1
1751 NFTA_COUNTER_PACKETS = 0x2
1752 NFTA_COUNTER_PAD = 0x3
1753 NFTA_LOG_UNSPEC = 0x0
1754 NFTA_LOG_GROUP = 0x1
1755 NFTA_LOG_PREFIX = 0x2
1756 NFTA_LOG_SNAPLEN = 0x3
1757 NFTA_LOG_QTHRESHOLD = 0x4
1758 NFTA_LOG_LEVEL = 0x5
1759 NFTA_LOG_FLAGS = 0x6
1760 NFTA_QUEUE_UNSPEC = 0x0
1761 NFTA_QUEUE_NUM = 0x1
1762 NFTA_QUEUE_TOTAL = 0x2
1763 NFTA_QUEUE_FLAGS = 0x3
1764 NFTA_QUEUE_SREG_QNUM = 0x4
1765 NFT_QUOTA_F_INV = 0x1
1766 NFT_QUOTA_F_DEPLETED = 0x2
1767 NFTA_QUOTA_UNSPEC = 0x0
1768 NFTA_QUOTA_BYTES = 0x1
1769 NFTA_QUOTA_FLAGS = 0x2
1770 NFTA_QUOTA_PAD = 0x3
1771 NFTA_QUOTA_CONSUMED = 0x4
1772 NFT_REJECT_ICMP_UNREACH = 0x0
1773 NFT_REJECT_TCP_RST = 0x1
1774 NFT_REJECT_ICMPX_UNREACH = 0x2
1775 NFT_REJECT_ICMPX_NO_ROUTE = 0x0
1776 NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
1777 NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
1778 NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
1779 NFTA_REJECT_UNSPEC = 0x0
1780 NFTA_REJECT_TYPE = 0x1
1781 NFTA_REJECT_ICMP_CODE = 0x2
1782 NFT_NAT_SNAT = 0x0
1783 NFT_NAT_DNAT = 0x1
1784 NFTA_NAT_UNSPEC = 0x0
1785 NFTA_NAT_TYPE = 0x1
1786 NFTA_NAT_FAMILY = 0x2
1787 NFTA_NAT_REG_ADDR_MIN = 0x3
1788 NFTA_NAT_REG_ADDR_MAX = 0x4
1789 NFTA_NAT_REG_PROTO_MIN = 0x5
1790 NFTA_NAT_REG_PROTO_MAX = 0x6
1791 NFTA_NAT_FLAGS = 0x7
1792 NFTA_MASQ_UNSPEC = 0x0
1793 NFTA_MASQ_FLAGS = 0x1
1794 NFTA_MASQ_REG_PROTO_MIN = 0x2
1795 NFTA_MASQ_REG_PROTO_MAX = 0x3
1796 NFTA_REDIR_UNSPEC = 0x0
1797 NFTA_REDIR_REG_PROTO_MIN = 0x1
1798 NFTA_REDIR_REG_PROTO_MAX = 0x2
1799 NFTA_REDIR_FLAGS = 0x3
1800 NFTA_DUP_UNSPEC = 0x0
1801 NFTA_DUP_SREG_ADDR = 0x1
1802 NFTA_DUP_SREG_DEV = 0x2
1803 NFTA_FWD_UNSPEC = 0x0
1804 NFTA_FWD_SREG_DEV = 0x1
1805 NFTA_OBJREF_UNSPEC = 0x0
1806 NFTA_OBJREF_IMM_TYPE = 0x1
1807 NFTA_OBJREF_IMM_NAME = 0x2
1808 NFTA_OBJREF_SET_SREG = 0x3
1809 NFTA_OBJREF_SET_NAME = 0x4
1810 NFTA_OBJREF_SET_ID = 0x5
1811 NFTA_GEN_UNSPEC = 0x0
1812 NFTA_GEN_ID = 0x1
1813 NFTA_GEN_PROC_PID = 0x2
1814 NFTA_GEN_PROC_NAME = 0x3
1815 NFTA_FIB_UNSPEC = 0x0
1816 NFTA_FIB_DREG = 0x1
1817 NFTA_FIB_RESULT = 0x2
1818 NFTA_FIB_FLAGS = 0x3
1819 NFT_FIB_RESULT_UNSPEC = 0x0
1820 NFT_FIB_RESULT_OIF = 0x1
1821 NFT_FIB_RESULT_OIFNAME = 0x2
1822 NFT_FIB_RESULT_ADDRTYPE = 0x3
1823 NFTA_FIB_F_SADDR = 0x1
1824 NFTA_FIB_F_DADDR = 0x2
1825 NFTA_FIB_F_MARK = 0x4
1826 NFTA_FIB_F_IIF = 0x8
1827 NFTA_FIB_F_OIF = 0x10
1828 NFTA_FIB_F_PRESENT = 0x20
1829 NFTA_CT_HELPER_UNSPEC = 0x0
1830 NFTA_CT_HELPER_NAME = 0x1
1831 NFTA_CT_HELPER_L3PROTO = 0x2
1832 NFTA_CT_HELPER_L4PROTO = 0x3
1833 NFTA_OBJ_UNSPEC = 0x0
1834 NFTA_OBJ_TABLE = 0x1
1835 NFTA_OBJ_NAME = 0x2
1836 NFTA_OBJ_TYPE = 0x3
1837 NFTA_OBJ_DATA = 0x4
1838 NFTA_OBJ_USE = 0x5
1839 NFTA_TRACE_UNSPEC = 0x0
1840 NFTA_TRACE_TABLE = 0x1
1841 NFTA_TRACE_CHAIN = 0x2
1842 NFTA_TRACE_RULE_HANDLE = 0x3
1843 NFTA_TRACE_TYPE = 0x4
1844 NFTA_TRACE_VERDICT = 0x5
1845 NFTA_TRACE_ID = 0x6
1846 NFTA_TRACE_LL_HEADER = 0x7
1847 NFTA_TRACE_NETWORK_HEADER = 0x8
1848 NFTA_TRACE_TRANSPORT_HEADER = 0x9
1849 NFTA_TRACE_IIF = 0xa
1850 NFTA_TRACE_IIFTYPE = 0xb
1851 NFTA_TRACE_OIF = 0xc
1852 NFTA_TRACE_OIFTYPE = 0xd
1853 NFTA_TRACE_MARK = 0xe
1854 NFTA_TRACE_NFPROTO = 0xf
1855 NFTA_TRACE_POLICY = 0x10
1856 NFTA_TRACE_PAD = 0x11
1857 NFT_TRACETYPE_UNSPEC = 0x0
1858 NFT_TRACETYPE_POLICY = 0x1
1859 NFT_TRACETYPE_RETURN = 0x2
1860 NFT_TRACETYPE_RULE = 0x3
1861 NFTA_NG_UNSPEC = 0x0
1862 NFTA_NG_DREG = 0x1
1863 NFTA_NG_MODULUS = 0x2
1864 NFTA_NG_TYPE = 0x3
1865 NFTA_NG_OFFSET = 0x4
1866 NFT_NG_INCREMENTAL = 0x0
1867 NFT_NG_RANDOM = 0x1
1868 )
1869
1870 type RTCTime struct {
1871 Sec int32
1872 Min int32
1873 Hour int32
1874 Mday int32
1875 Mon int32
1876 Year int32
1877 Wday int32
1878 Yday int32
1879 Isdst int32
1880 }
1881
1882 type RTCWkAlrm struct {
1883 Enabled uint8
1884 Pending uint8
1885 Time RTCTime
1886 }
1887
1888 type RTCPLLInfo struct {
1889 Ctrl int32
1890 Value int32
1891 Max int32
1892 Min int32
1893 Posmult int32
1894 Negmult int32
1895 Clock int64
1896 }
1897
1898 type BlkpgIoctlArg struct {
1899 Op int32
1900 Flags int32
1901 Datalen int32
1902 Data *byte
1903 }
1904
1905 type BlkpgPartition struct {
1906 Start int64
1907 Length int64
1908 Pno int32
1909 Devname [64]uint8
1910 Volname [64]uint8
1911 _ [4]byte
1912 }
1913
1914 const (
1915 BLKPG = 0x20001269
1916 BLKPG_ADD_PARTITION = 0x1
1917 BLKPG_DEL_PARTITION = 0x2
1918 BLKPG_RESIZE_PARTITION = 0x3
1919 )
1920
1921 const (
1922 NETNSA_NONE = 0x0
1923 NETNSA_NSID = 0x1
1924 NETNSA_PID = 0x2
1925 NETNSA_FD = 0x3
1926 )
1927
1928 type XDPRingOffset struct {
1929 Producer uint64
1930 Consumer uint64
1931 Desc uint64
1932 }
1933
1934 type XDPMmapOffsets struct {
1935 Rx XDPRingOffset
1936 Tx XDPRingOffset
1937 Fr XDPRingOffset
1938 Cr XDPRingOffset
1939 }
1940
1941 type XDPUmemReg struct {
1942 Addr uint64
1943 Len uint64
1944 Size uint32
1945 Headroom uint32
1946 }
1947
1948 type XDPStatistics struct {
1949 Rx_dropped uint64
1950 Rx_invalid_descs uint64
1951 Tx_invalid_descs uint64
1952 }
1953
1954 type XDPDesc struct {
1955 Addr uint64
1956 Len uint32
1957 Options uint32
1958 }
1959
1960 const (
1961 NCSI_CMD_UNSPEC = 0x0
1962 NCSI_CMD_PKG_INFO = 0x1
1963 NCSI_CMD_SET_INTERFACE = 0x2
1964 NCSI_CMD_CLEAR_INTERFACE = 0x3
1965 NCSI_ATTR_UNSPEC = 0x0
1966 NCSI_ATTR_IFINDEX = 0x1
1967 NCSI_ATTR_PACKAGE_LIST = 0x2
1968 NCSI_ATTR_PACKAGE_ID = 0x3
1969 NCSI_ATTR_CHANNEL_ID = 0x4
1970 NCSI_PKG_ATTR_UNSPEC = 0x0
1971 NCSI_PKG_ATTR = 0x1
1972 NCSI_PKG_ATTR_ID = 0x2
1973 NCSI_PKG_ATTR_FORCED = 0x3
1974 NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
1975 NCSI_CHANNEL_ATTR_UNSPEC = 0x0
1976 NCSI_CHANNEL_ATTR = 0x1
1977 NCSI_CHANNEL_ATTR_ID = 0x2
1978 NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
1979 NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
1980 NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
1981 NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
1982 NCSI_CHANNEL_ATTR_ACTIVE = 0x7
1983 NCSI_CHANNEL_ATTR_FORCED = 0x8
1984 NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
1985 NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
1986 )
1987
1988 const (
1989 SOF_TIMESTAMPING_TX_HARDWARE = 0x1
1990 SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
1991 SOF_TIMESTAMPING_RX_HARDWARE = 0x4
1992 SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
1993 SOF_TIMESTAMPING_SOFTWARE = 0x10
1994 SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
1995 SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
1996 SOF_TIMESTAMPING_OPT_ID = 0x80
1997 SOF_TIMESTAMPING_TX_SCHED = 0x100
1998 SOF_TIMESTAMPING_TX_ACK = 0x200
1999 SOF_TIMESTAMPING_OPT_CMSG = 0x400
2000 SOF_TIMESTAMPING_OPT_TSONLY = 0x800
2001 SOF_TIMESTAMPING_OPT_STATS = 0x1000
2002 SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
2003 SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
2004
2005 SOF_TIMESTAMPING_LAST = 0x4000
2006 SOF_TIMESTAMPING_MASK = 0x7fff
2007 )
55 package unix
66
77 const (
8 sizeofPtr = 0x8
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x8
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
1313 PathMax = 0x1000
1414 )
1515
3232
3333 type Timex struct {
3434 Modes uint32
35 Pad_cgo_0 [4]byte
3635 Offset int64
3736 Freq int64
3837 Maxerror int64
3938 Esterror int64
4039 Status int32
41 Pad_cgo_1 [4]byte
4240 Constant int64
4341 Precision int64
4442 Tolerance int64
4745 Ppsfreq int64
4846 Jitter int64
4947 Shift int32
50 Pad_cgo_2 [4]byte
5148 Stabil int64
5249 Jitcnt int64
5350 Calcnt int64
5451 Errcnt int64
5552 Stbcnt int64
5653 Tai int32
57 Pad_cgo_3 [44]byte
54 _ [44]byte
5855 }
5956
6057 type Time_t int64
104101 Mode uint32
105102 Uid uint32
106103 Gid uint32
107 X__pad2 int32
104 _ int32
108105 Rdev uint64
109106 Size int64
110107 Blksize int64
117114 _ uint64
118115 }
119116
120 type Statfs_t struct {
121 Type int64
122 Bsize int64
123 Blocks uint64
124 Bfree uint64
125 Bavail uint64
126 Files uint64
127 Ffree uint64
128 Fsid Fsid
129 Namelen int64
130 Frsize int64
131 Flags int64
132 Spare [4]int64
117 type StatxTimestamp struct {
118 Sec int64
119 Nsec uint32
120 _ int32
121 }
122
123 type Statx_t struct {
124 Mask uint32
125 Blksize uint32
126 Attributes uint64
127 Nlink uint32
128 Uid uint32
129 Gid uint32
130 Mode uint16
131 _ [1]uint16
132 Ino uint64
133 Size uint64
134 Blocks uint64
135 Attributes_mask uint64
136 Atime StatxTimestamp
137 Btime StatxTimestamp
138 Ctime StatxTimestamp
139 Mtime StatxTimestamp
140 Rdev_major uint32
141 Rdev_minor uint32
142 Dev_major uint32
143 Dev_minor uint32
144 _ [14]uint64
133145 }
134146
135147 type Dirent struct {
136 Ino uint64
137 Off int64
138 Reclen uint16
139 Type uint8
140 Name [256]uint8
141 Pad_cgo_0 [5]byte
148 Ino uint64
149 Off int64
150 Reclen uint16
151 Type uint8
152 Name [256]uint8
153 _ [5]byte
142154 }
143155
144156 type Fsid struct {
145 X__val [2]int32
157 Val [2]int32
146158 }
147159
148160 type Flock_t struct {
149 Type int16
150 Whence int16
151 Pad_cgo_0 [4]byte
152 Start int64
153 Len int64
154 Pid int32
155 Pad_cgo_1 [4]byte
161 Type int16
162 Whence int16
163 Start int64
164 Len int64
165 Pid int32
166 _ [4]byte
156167 }
157168
158169 type FscryptPolicy struct {
227238 Channel uint16
228239 }
229240
241 type RawSockaddrL2 struct {
242 Family uint16
243 Psm uint16
244 Bdaddr [6]uint8
245 Cid uint16
246 Bdaddr_type uint8
247 _ [1]byte
248 }
249
250 type RawSockaddrRFCOMM struct {
251 Family uint16
252 Bdaddr [6]uint8
253 Channel uint8
254 _ [1]byte
255 }
256
230257 type RawSockaddrCAN struct {
231 Family uint16
232 Pad_cgo_0 [2]byte
233 Ifindex int32
234 Addr [8]byte
258 Family uint16
259 Ifindex int32
260 Addr [8]byte
235261 }
236262
237263 type RawSockaddrALG struct {
250276 Zero [4]uint8
251277 }
252278
279 type RawSockaddrXDP struct {
280 Family uint16
281 Flags uint16
282 Ifindex uint32
283 Queue_id uint32
284 Shared_umem_fd uint32
285 }
286
287 type RawSockaddrPPPoX [0x1e]byte
288
253289 type RawSockaddr struct {
254290 Family uint16
255291 Data [14]uint8
298334 type Msghdr struct {
299335 Name *byte
300336 Namelen uint32
301 Pad_cgo_0 [4]byte
302337 Iov *Iovec
303338 Iovlen uint64
304339 Control *byte
305340 Controllen uint64
306341 Flags int32
307 Pad_cgo_1 [4]byte
342 _ [4]byte
308343 }
309344
310345 type Cmsghdr struct {
346381 Probes uint8
347382 Backoff uint8
348383 Options uint8
349 Pad_cgo_0 [2]byte
350384 Rto uint32
351385 Ato uint32
352386 Snd_mss uint32
381415 SizeofSockaddrLinklayer = 0x14
382416 SizeofSockaddrNetlink = 0xc
383417 SizeofSockaddrHCI = 0x6
418 SizeofSockaddrL2 = 0xe
419 SizeofSockaddrRFCOMM = 0xa
384420 SizeofSockaddrCAN = 0x10
385421 SizeofSockaddrALG = 0x58
386422 SizeofSockaddrVM = 0x10
423 SizeofSockaddrXDP = 0x10
424 SizeofSockaddrPPPoX = 0x1e
387425 SizeofLinger = 0x8
388426 SizeofIovec = 0x10
389427 SizeofIPMreq = 0x8
401439 )
402440
403441 const (
404 IFA_UNSPEC = 0x0
405 IFA_ADDRESS = 0x1
406 IFA_LOCAL = 0x2
407 IFA_LABEL = 0x3
408 IFA_BROADCAST = 0x4
409 IFA_ANYCAST = 0x5
410 IFA_CACHEINFO = 0x6
411 IFA_MULTICAST = 0x7
412 IFLA_UNSPEC = 0x0
413 IFLA_ADDRESS = 0x1
414 IFLA_BROADCAST = 0x2
415 IFLA_IFNAME = 0x3
416 IFLA_MTU = 0x4
417 IFLA_LINK = 0x5
418 IFLA_QDISC = 0x6
419 IFLA_STATS = 0x7
420 IFLA_COST = 0x8
421 IFLA_PRIORITY = 0x9
422 IFLA_MASTER = 0xa
423 IFLA_WIRELESS = 0xb
424 IFLA_PROTINFO = 0xc
425 IFLA_TXQLEN = 0xd
426 IFLA_MAP = 0xe
427 IFLA_WEIGHT = 0xf
428 IFLA_OPERSTATE = 0x10
429 IFLA_LINKMODE = 0x11
430 IFLA_LINKINFO = 0x12
431 IFLA_NET_NS_PID = 0x13
432 IFLA_IFALIAS = 0x14
433 IFLA_MAX = 0x2c
434 RT_SCOPE_UNIVERSE = 0x0
435 RT_SCOPE_SITE = 0xc8
436 RT_SCOPE_LINK = 0xfd
437 RT_SCOPE_HOST = 0xfe
438 RT_SCOPE_NOWHERE = 0xff
439 RT_TABLE_UNSPEC = 0x0
440 RT_TABLE_COMPAT = 0xfc
441 RT_TABLE_DEFAULT = 0xfd
442 RT_TABLE_MAIN = 0xfe
443 RT_TABLE_LOCAL = 0xff
444 RT_TABLE_MAX = 0xffffffff
445 RTA_UNSPEC = 0x0
446 RTA_DST = 0x1
447 RTA_SRC = 0x2
448 RTA_IIF = 0x3
449 RTA_OIF = 0x4
450 RTA_GATEWAY = 0x5
451 RTA_PRIORITY = 0x6
452 RTA_PREFSRC = 0x7
453 RTA_METRICS = 0x8
454 RTA_MULTIPATH = 0x9
455 RTA_FLOW = 0xb
456 RTA_CACHEINFO = 0xc
457 RTA_TABLE = 0xf
458 RTN_UNSPEC = 0x0
459 RTN_UNICAST = 0x1
460 RTN_LOCAL = 0x2
461 RTN_BROADCAST = 0x3
462 RTN_ANYCAST = 0x4
463 RTN_MULTICAST = 0x5
464 RTN_BLACKHOLE = 0x6
465 RTN_UNREACHABLE = 0x7
466 RTN_PROHIBIT = 0x8
467 RTN_THROW = 0x9
468 RTN_NAT = 0xa
469 RTN_XRESOLVE = 0xb
470 RTNLGRP_NONE = 0x0
471 RTNLGRP_LINK = 0x1
472 RTNLGRP_NOTIFY = 0x2
473 RTNLGRP_NEIGH = 0x3
474 RTNLGRP_TC = 0x4
475 RTNLGRP_IPV4_IFADDR = 0x5
476 RTNLGRP_IPV4_MROUTE = 0x6
477 RTNLGRP_IPV4_ROUTE = 0x7
478 RTNLGRP_IPV4_RULE = 0x8
479 RTNLGRP_IPV6_IFADDR = 0x9
480 RTNLGRP_IPV6_MROUTE = 0xa
481 RTNLGRP_IPV6_ROUTE = 0xb
482 RTNLGRP_IPV6_IFINFO = 0xc
483 RTNLGRP_IPV6_PREFIX = 0x12
484 RTNLGRP_IPV6_RULE = 0x13
485 RTNLGRP_ND_USEROPT = 0x14
486 SizeofNlMsghdr = 0x10
487 SizeofNlMsgerr = 0x14
488 SizeofRtGenmsg = 0x1
489 SizeofNlAttr = 0x4
490 SizeofRtAttr = 0x4
491 SizeofIfInfomsg = 0x10
492 SizeofIfAddrmsg = 0x8
493 SizeofRtMsg = 0xc
494 SizeofRtNexthop = 0x8
442 IFA_UNSPEC = 0x0
443 IFA_ADDRESS = 0x1
444 IFA_LOCAL = 0x2
445 IFA_LABEL = 0x3
446 IFA_BROADCAST = 0x4
447 IFA_ANYCAST = 0x5
448 IFA_CACHEINFO = 0x6
449 IFA_MULTICAST = 0x7
450 IFLA_UNSPEC = 0x0
451 IFLA_ADDRESS = 0x1
452 IFLA_BROADCAST = 0x2
453 IFLA_IFNAME = 0x3
454 IFLA_INFO_KIND = 0x1
455 IFLA_MTU = 0x4
456 IFLA_LINK = 0x5
457 IFLA_QDISC = 0x6
458 IFLA_STATS = 0x7
459 IFLA_COST = 0x8
460 IFLA_PRIORITY = 0x9
461 IFLA_MASTER = 0xa
462 IFLA_WIRELESS = 0xb
463 IFLA_PROTINFO = 0xc
464 IFLA_TXQLEN = 0xd
465 IFLA_MAP = 0xe
466 IFLA_WEIGHT = 0xf
467 IFLA_OPERSTATE = 0x10
468 IFLA_LINKMODE = 0x11
469 IFLA_LINKINFO = 0x12
470 IFLA_NET_NS_PID = 0x13
471 IFLA_IFALIAS = 0x14
472 IFLA_NUM_VF = 0x15
473 IFLA_VFINFO_LIST = 0x16
474 IFLA_STATS64 = 0x17
475 IFLA_VF_PORTS = 0x18
476 IFLA_PORT_SELF = 0x19
477 IFLA_AF_SPEC = 0x1a
478 IFLA_GROUP = 0x1b
479 IFLA_NET_NS_FD = 0x1c
480 IFLA_EXT_MASK = 0x1d
481 IFLA_PROMISCUITY = 0x1e
482 IFLA_NUM_TX_QUEUES = 0x1f
483 IFLA_NUM_RX_QUEUES = 0x20
484 IFLA_CARRIER = 0x21
485 IFLA_PHYS_PORT_ID = 0x22
486 IFLA_CARRIER_CHANGES = 0x23
487 IFLA_PHYS_SWITCH_ID = 0x24
488 IFLA_LINK_NETNSID = 0x25
489 IFLA_PHYS_PORT_NAME = 0x26
490 IFLA_PROTO_DOWN = 0x27
491 IFLA_GSO_MAX_SEGS = 0x28
492 IFLA_GSO_MAX_SIZE = 0x29
493 IFLA_PAD = 0x2a
494 IFLA_XDP = 0x2b
495 IFLA_EVENT = 0x2c
496 IFLA_NEW_NETNSID = 0x2d
497 IFLA_IF_NETNSID = 0x2e
498 IFLA_MAX = 0x33
499 RT_SCOPE_UNIVERSE = 0x0
500 RT_SCOPE_SITE = 0xc8
501 RT_SCOPE_LINK = 0xfd
502 RT_SCOPE_HOST = 0xfe
503 RT_SCOPE_NOWHERE = 0xff
504 RT_TABLE_UNSPEC = 0x0
505 RT_TABLE_COMPAT = 0xfc
506 RT_TABLE_DEFAULT = 0xfd
507 RT_TABLE_MAIN = 0xfe
508 RT_TABLE_LOCAL = 0xff
509 RT_TABLE_MAX = 0xffffffff
510 RTA_UNSPEC = 0x0
511 RTA_DST = 0x1
512 RTA_SRC = 0x2
513 RTA_IIF = 0x3
514 RTA_OIF = 0x4
515 RTA_GATEWAY = 0x5
516 RTA_PRIORITY = 0x6
517 RTA_PREFSRC = 0x7
518 RTA_METRICS = 0x8
519 RTA_MULTIPATH = 0x9
520 RTA_FLOW = 0xb
521 RTA_CACHEINFO = 0xc
522 RTA_TABLE = 0xf
523 RTA_MARK = 0x10
524 RTA_MFC_STATS = 0x11
525 RTA_VIA = 0x12
526 RTA_NEWDST = 0x13
527 RTA_PREF = 0x14
528 RTA_ENCAP_TYPE = 0x15
529 RTA_ENCAP = 0x16
530 RTA_EXPIRES = 0x17
531 RTA_PAD = 0x18
532 RTA_UID = 0x19
533 RTA_TTL_PROPAGATE = 0x1a
534 RTA_IP_PROTO = 0x1b
535 RTA_SPORT = 0x1c
536 RTA_DPORT = 0x1d
537 RTN_UNSPEC = 0x0
538 RTN_UNICAST = 0x1
539 RTN_LOCAL = 0x2
540 RTN_BROADCAST = 0x3
541 RTN_ANYCAST = 0x4
542 RTN_MULTICAST = 0x5
543 RTN_BLACKHOLE = 0x6
544 RTN_UNREACHABLE = 0x7
545 RTN_PROHIBIT = 0x8
546 RTN_THROW = 0x9
547 RTN_NAT = 0xa
548 RTN_XRESOLVE = 0xb
549 RTNLGRP_NONE = 0x0
550 RTNLGRP_LINK = 0x1
551 RTNLGRP_NOTIFY = 0x2
552 RTNLGRP_NEIGH = 0x3
553 RTNLGRP_TC = 0x4
554 RTNLGRP_IPV4_IFADDR = 0x5
555 RTNLGRP_IPV4_MROUTE = 0x6
556 RTNLGRP_IPV4_ROUTE = 0x7
557 RTNLGRP_IPV4_RULE = 0x8
558 RTNLGRP_IPV6_IFADDR = 0x9
559 RTNLGRP_IPV6_MROUTE = 0xa
560 RTNLGRP_IPV6_ROUTE = 0xb
561 RTNLGRP_IPV6_IFINFO = 0xc
562 RTNLGRP_IPV6_PREFIX = 0x12
563 RTNLGRP_IPV6_RULE = 0x13
564 RTNLGRP_ND_USEROPT = 0x14
565 SizeofNlMsghdr = 0x10
566 SizeofNlMsgerr = 0x14
567 SizeofRtGenmsg = 0x1
568 SizeofNlAttr = 0x4
569 SizeofRtAttr = 0x4
570 SizeofIfInfomsg = 0x10
571 SizeofIfAddrmsg = 0x8
572 SizeofRtMsg = 0xc
573 SizeofRtNexthop = 0x8
495574 )
496575
497576 type NlMsghdr struct {
522601 }
523602
524603 type IfInfomsg struct {
525 Family uint8
526 X__ifi_pad uint8
527 Type uint16
528 Index int32
529 Flags uint32
530 Change uint32
604 Family uint8
605 _ uint8
606 Type uint16
607 Index int32
608 Flags uint32
609 Change uint32
531610 }
532611
533612 type IfAddrmsg struct {
570649 }
571650
572651 type SockFprog struct {
573 Len uint16
574 Pad_cgo_0 [6]byte
575 Filter *SockFilter
652 Len uint16
653 Filter *SockFilter
576654 }
577655
578656 type InotifyEvent struct {
615693 Freeswap uint64
616694 Procs uint16
617695 Pad uint16
618 Pad_cgo_0 [4]byte
619696 Totalhigh uint64
620697 Freehigh uint64
621698 Unit uint32
622 X_f [0]uint8
623 Pad_cgo_1 [4]byte
699 _ [0]uint8
700 _ [4]byte
624701 }
625702
626703 type Utsname struct {
627 Sysname [65]uint8
628 Nodename [65]uint8
629 Release [65]uint8
630 Version [65]uint8
631 Machine [65]uint8
632 Domainname [65]uint8
704 Sysname [65]byte
705 Nodename [65]byte
706 Release [65]byte
707 Version [65]byte
708 Machine [65]byte
709 Domainname [65]byte
633710 }
634711
635712 type Ustat_t struct {
636 Tfree int32
637 Pad_cgo_0 [4]byte
638 Tinode uint64
639 Fname [6]uint8
640 Fpack [6]uint8
641 Pad_cgo_1 [4]byte
713 Tfree int32
714 Tinode uint64
715 Fname [6]uint8
716 Fpack [6]uint8
717 _ [4]byte
642718 }
643719
644720 type EpollEvent struct {
645 Events uint32
646 X_padFd int32
647 Fd int32
648 Pad int32
649 }
650
651 const (
652 AT_FDCWD = -0x64
653 AT_REMOVEDIR = 0x200
721 Events uint32
722 _ int32
723 Fd int32
724 Pad int32
725 }
726
727 const (
728 AT_EMPTY_PATH = 0x1000
729 AT_FDCWD = -0x64
730 AT_NO_AUTOMOUNT = 0x800
731 AT_REMOVEDIR = 0x200
732
733 AT_STATX_SYNC_AS_STAT = 0x0
734 AT_STATX_FORCE_SYNC = 0x2000
735 AT_STATX_DONT_SYNC = 0x4000
736
654737 AT_SYMLINK_FOLLOW = 0x400
655738 AT_SYMLINK_NOFOLLOW = 0x100
739
740 AT_EACCESS = 0x200
656741 )
657742
658743 type PollFd struct {
672757 )
673758
674759 type Sigset_t struct {
675 X__val [16]uint64
760 Val [16]uint64
761 }
762
763 type SignalfdSiginfo struct {
764 Signo uint32
765 Errno int32
766 Code int32
767 Pid uint32
768 Uid uint32
769 Fd int32
770 Tid uint32
771 Band uint32
772 Overrun uint32
773 Trapno uint32
774 Status int32
775 Int int32
776 Ptr uint64
777 Utime uint64
778 Stime uint64
779 Addr uint64
780 _ [48]uint8
676781 }
677782
678783 const RNDGETENTCNT = 0x40045200
699804
700805 type Taskstats struct {
701806 Version uint16
702 Pad_cgo_0 [2]byte
703807 Ac_exitcode uint32
704808 Ac_flag uint8
705809 Ac_nice uint8
706 Pad_cgo_1 [6]byte
707810 Cpu_count uint64
708811 Cpu_delay_total uint64
709812 Blkio_count uint64
715818 Ac_comm [32]uint8
716819 Ac_sched uint8
717820 Ac_pad [3]uint8
718 Pad_cgo_2 [4]byte
821 _ [4]byte
719822 Ac_uid uint32
720823 Ac_gid uint32
721824 Ac_pid uint32
722825 Ac_ppid uint32
723826 Ac_btime uint32
724 Pad_cgo_3 [4]byte
725827 Ac_etime uint64
726828 Ac_utime uint64
727829 Ac_stime uint64
745847 Cpu_scaled_run_real_total uint64
746848 Freepages_count uint64
747849 Freepages_delay_total uint64
850 Thrashing_count uint64
851 Thrashing_delay_total uint64
748852 }
749853
750854 const (
763867 TASKSTATS_CMD_ATTR_TGID = 0x2
764868 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
765869 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
870 )
871
872 type CGroupStats struct {
873 Sleeping uint64
874 Running uint64
875 Stopped uint64
876 Uninterruptible uint64
877 Io_wait uint64
878 }
879
880 const (
881 CGROUPSTATS_CMD_UNSPEC = 0x3
882 CGROUPSTATS_CMD_GET = 0x4
883 CGROUPSTATS_CMD_NEW = 0x5
884 CGROUPSTATS_TYPE_UNSPEC = 0x0
885 CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
886 CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
887 CGROUPSTATS_CMD_ATTR_FD = 0x1
766888 )
767889
768890 type Genlmsghdr struct {
797919 CTRL_ATTR_MCAST_GRP_NAME = 0x1
798920 CTRL_ATTR_MCAST_GRP_ID = 0x2
799921 )
922
923 type cpuMask uint64
924
925 const (
926 _CPU_SETSIZE = 0x400
927 _NCPUBITS = 0x40
928 )
929
930 const (
931 BDADDR_BREDR = 0x0
932 BDADDR_LE_PUBLIC = 0x1
933 BDADDR_LE_RANDOM = 0x2
934 )
935
936 type PerfEventAttr struct {
937 Type uint32
938 Size uint32
939 Config uint64
940 Sample uint64
941 Sample_type uint64
942 Read_format uint64
943 Bits uint64
944 Wakeup uint32
945 Bp_type uint32
946 Ext1 uint64
947 Ext2 uint64
948 Branch_sample_type uint64
949 Sample_regs_user uint64
950 Sample_stack_user uint32
951 Clockid int32
952 Sample_regs_intr uint64
953 Aux_watermark uint32
954 _ uint32
955 }
956
957 type PerfEventMmapPage struct {
958 Version uint32
959 Compat_version uint32
960 Lock uint32
961 Index uint32
962 Offset int64
963 Time_enabled uint64
964 Time_running uint64
965 Capabilities uint64
966 Pmc_width uint16
967 Time_shift uint16
968 Time_mult uint32
969 Time_offset uint64
970 Time_zero uint64
971 Size uint32
972 _ [948]uint8
973 Data_head uint64
974 Data_tail uint64
975 Data_offset uint64
976 Data_size uint64
977 Aux_head uint64
978 Aux_tail uint64
979 Aux_offset uint64
980 Aux_size uint64
981 }
982
983 const (
984 PerfBitDisabled uint64 = CBitFieldMaskBit0
985 PerfBitInherit = CBitFieldMaskBit1
986 PerfBitPinned = CBitFieldMaskBit2
987 PerfBitExclusive = CBitFieldMaskBit3
988 PerfBitExcludeUser = CBitFieldMaskBit4
989 PerfBitExcludeKernel = CBitFieldMaskBit5
990 PerfBitExcludeHv = CBitFieldMaskBit6
991 PerfBitExcludeIdle = CBitFieldMaskBit7
992 PerfBitMmap = CBitFieldMaskBit8
993 PerfBitComm = CBitFieldMaskBit9
994 PerfBitFreq = CBitFieldMaskBit10
995 PerfBitInheritStat = CBitFieldMaskBit11
996 PerfBitEnableOnExec = CBitFieldMaskBit12
997 PerfBitTask = CBitFieldMaskBit13
998 PerfBitWatermark = CBitFieldMaskBit14
999 PerfBitPreciseIPBit1 = CBitFieldMaskBit15
1000 PerfBitPreciseIPBit2 = CBitFieldMaskBit16
1001 PerfBitMmapData = CBitFieldMaskBit17
1002 PerfBitSampleIDAll = CBitFieldMaskBit18
1003 PerfBitExcludeHost = CBitFieldMaskBit19
1004 PerfBitExcludeGuest = CBitFieldMaskBit20
1005 PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
1006 PerfBitExcludeCallchainUser = CBitFieldMaskBit22
1007 PerfBitMmap2 = CBitFieldMaskBit23
1008 PerfBitCommExec = CBitFieldMaskBit24
1009 PerfBitUseClockID = CBitFieldMaskBit25
1010 PerfBitContextSwitch = CBitFieldMaskBit26
1011 )
1012
1013 const (
1014 PERF_TYPE_HARDWARE = 0x0
1015 PERF_TYPE_SOFTWARE = 0x1
1016 PERF_TYPE_TRACEPOINT = 0x2
1017 PERF_TYPE_HW_CACHE = 0x3
1018 PERF_TYPE_RAW = 0x4
1019 PERF_TYPE_BREAKPOINT = 0x5
1020
1021 PERF_COUNT_HW_CPU_CYCLES = 0x0
1022 PERF_COUNT_HW_INSTRUCTIONS = 0x1
1023 PERF_COUNT_HW_CACHE_REFERENCES = 0x2
1024 PERF_COUNT_HW_CACHE_MISSES = 0x3
1025 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
1026 PERF_COUNT_HW_BRANCH_MISSES = 0x5
1027 PERF_COUNT_HW_BUS_CYCLES = 0x6
1028 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
1029 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
1030 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
1031
1032 PERF_COUNT_HW_CACHE_L1D = 0x0
1033 PERF_COUNT_HW_CACHE_L1I = 0x1
1034 PERF_COUNT_HW_CACHE_LL = 0x2
1035 PERF_COUNT_HW_CACHE_DTLB = 0x3
1036 PERF_COUNT_HW_CACHE_ITLB = 0x4
1037 PERF_COUNT_HW_CACHE_BPU = 0x5
1038 PERF_COUNT_HW_CACHE_NODE = 0x6
1039
1040 PERF_COUNT_HW_CACHE_OP_READ = 0x0
1041 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
1042 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
1043
1044 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
1045 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
1046
1047 PERF_COUNT_SW_CPU_CLOCK = 0x0
1048 PERF_COUNT_SW_TASK_CLOCK = 0x1
1049 PERF_COUNT_SW_PAGE_FAULTS = 0x2
1050 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
1051 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
1052 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
1053 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
1054 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
1055 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
1056 PERF_COUNT_SW_DUMMY = 0x9
1057
1058 PERF_SAMPLE_IP = 0x1
1059 PERF_SAMPLE_TID = 0x2
1060 PERF_SAMPLE_TIME = 0x4
1061 PERF_SAMPLE_ADDR = 0x8
1062 PERF_SAMPLE_READ = 0x10
1063 PERF_SAMPLE_CALLCHAIN = 0x20
1064 PERF_SAMPLE_ID = 0x40
1065 PERF_SAMPLE_CPU = 0x80
1066 PERF_SAMPLE_PERIOD = 0x100
1067 PERF_SAMPLE_STREAM_ID = 0x200
1068 PERF_SAMPLE_RAW = 0x400
1069 PERF_SAMPLE_BRANCH_STACK = 0x800
1070
1071 PERF_SAMPLE_BRANCH_USER = 0x1
1072 PERF_SAMPLE_BRANCH_KERNEL = 0x2
1073 PERF_SAMPLE_BRANCH_HV = 0x4
1074 PERF_SAMPLE_BRANCH_ANY = 0x8
1075 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
1076 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
1077 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
1078
1079 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
1080 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
1081 PERF_FORMAT_ID = 0x4
1082 PERF_FORMAT_GROUP = 0x8
1083
1084 PERF_RECORD_MMAP = 0x1
1085 PERF_RECORD_LOST = 0x2
1086 PERF_RECORD_COMM = 0x3
1087 PERF_RECORD_EXIT = 0x4
1088 PERF_RECORD_THROTTLE = 0x5
1089 PERF_RECORD_UNTHROTTLE = 0x6
1090 PERF_RECORD_FORK = 0x7
1091 PERF_RECORD_READ = 0x8
1092 PERF_RECORD_SAMPLE = 0x9
1093
1094 PERF_CONTEXT_HV = -0x20
1095 PERF_CONTEXT_KERNEL = -0x80
1096 PERF_CONTEXT_USER = -0x200
1097
1098 PERF_CONTEXT_GUEST = -0x800
1099 PERF_CONTEXT_GUEST_KERNEL = -0x880
1100 PERF_CONTEXT_GUEST_USER = -0xa00
1101
1102 PERF_FLAG_FD_NO_GROUP = 0x1
1103 PERF_FLAG_FD_OUTPUT = 0x2
1104 PERF_FLAG_PID_CGROUP = 0x4
1105 )
1106
1107 const (
1108 CBitFieldMaskBit0 = 0x1
1109 CBitFieldMaskBit1 = 0x2
1110 CBitFieldMaskBit2 = 0x4
1111 CBitFieldMaskBit3 = 0x8
1112 CBitFieldMaskBit4 = 0x10
1113 CBitFieldMaskBit5 = 0x20
1114 CBitFieldMaskBit6 = 0x40
1115 CBitFieldMaskBit7 = 0x80
1116 CBitFieldMaskBit8 = 0x100
1117 CBitFieldMaskBit9 = 0x200
1118 CBitFieldMaskBit10 = 0x400
1119 CBitFieldMaskBit11 = 0x800
1120 CBitFieldMaskBit12 = 0x1000
1121 CBitFieldMaskBit13 = 0x2000
1122 CBitFieldMaskBit14 = 0x4000
1123 CBitFieldMaskBit15 = 0x8000
1124 CBitFieldMaskBit16 = 0x10000
1125 CBitFieldMaskBit17 = 0x20000
1126 CBitFieldMaskBit18 = 0x40000
1127 CBitFieldMaskBit19 = 0x80000
1128 CBitFieldMaskBit20 = 0x100000
1129 CBitFieldMaskBit21 = 0x200000
1130 CBitFieldMaskBit22 = 0x400000
1131 CBitFieldMaskBit23 = 0x800000
1132 CBitFieldMaskBit24 = 0x1000000
1133 CBitFieldMaskBit25 = 0x2000000
1134 CBitFieldMaskBit26 = 0x4000000
1135 CBitFieldMaskBit27 = 0x8000000
1136 CBitFieldMaskBit28 = 0x10000000
1137 CBitFieldMaskBit29 = 0x20000000
1138 CBitFieldMaskBit30 = 0x40000000
1139 CBitFieldMaskBit31 = 0x80000000
1140 CBitFieldMaskBit32 = 0x100000000
1141 CBitFieldMaskBit33 = 0x200000000
1142 CBitFieldMaskBit34 = 0x400000000
1143 CBitFieldMaskBit35 = 0x800000000
1144 CBitFieldMaskBit36 = 0x1000000000
1145 CBitFieldMaskBit37 = 0x2000000000
1146 CBitFieldMaskBit38 = 0x4000000000
1147 CBitFieldMaskBit39 = 0x8000000000
1148 CBitFieldMaskBit40 = 0x10000000000
1149 CBitFieldMaskBit41 = 0x20000000000
1150 CBitFieldMaskBit42 = 0x40000000000
1151 CBitFieldMaskBit43 = 0x80000000000
1152 CBitFieldMaskBit44 = 0x100000000000
1153 CBitFieldMaskBit45 = 0x200000000000
1154 CBitFieldMaskBit46 = 0x400000000000
1155 CBitFieldMaskBit47 = 0x800000000000
1156 CBitFieldMaskBit48 = 0x1000000000000
1157 CBitFieldMaskBit49 = 0x2000000000000
1158 CBitFieldMaskBit50 = 0x4000000000000
1159 CBitFieldMaskBit51 = 0x8000000000000
1160 CBitFieldMaskBit52 = 0x10000000000000
1161 CBitFieldMaskBit53 = 0x20000000000000
1162 CBitFieldMaskBit54 = 0x40000000000000
1163 CBitFieldMaskBit55 = 0x80000000000000
1164 CBitFieldMaskBit56 = 0x100000000000000
1165 CBitFieldMaskBit57 = 0x200000000000000
1166 CBitFieldMaskBit58 = 0x400000000000000
1167 CBitFieldMaskBit59 = 0x800000000000000
1168 CBitFieldMaskBit60 = 0x1000000000000000
1169 CBitFieldMaskBit61 = 0x2000000000000000
1170 CBitFieldMaskBit62 = 0x4000000000000000
1171 CBitFieldMaskBit63 = 0x8000000000000000
1172 )
1173
1174 type SockaddrStorage struct {
1175 Family uint16
1176 _ [118]uint8
1177 _ uint64
1178 }
1179
1180 type TCPMD5Sig struct {
1181 Addr SockaddrStorage
1182 Flags uint8
1183 Prefixlen uint8
1184 Keylen uint16
1185 _ uint32
1186 Key [80]uint8
1187 }
1188
1189 type HDDriveCmdHdr struct {
1190 Command uint8
1191 Number uint8
1192 Feature uint8
1193 Count uint8
1194 }
1195
1196 type HDGeometry struct {
1197 Heads uint8
1198 Sectors uint8
1199 Cylinders uint16
1200 Start uint64
1201 }
1202
1203 type HDDriveID struct {
1204 Config uint16
1205 Cyls uint16
1206 Reserved2 uint16
1207 Heads uint16
1208 Track_bytes uint16
1209 Sector_bytes uint16
1210 Sectors uint16
1211 Vendor0 uint16
1212 Vendor1 uint16
1213 Vendor2 uint16
1214 Serial_no [20]uint8
1215 Buf_type uint16
1216 Buf_size uint16
1217 Ecc_bytes uint16
1218 Fw_rev [8]uint8
1219 Model [40]uint8
1220 Max_multsect uint8
1221 Vendor3 uint8
1222 Dword_io uint16
1223 Vendor4 uint8
1224 Capability uint8
1225 Reserved50 uint16
1226 Vendor5 uint8
1227 TPIO uint8
1228 Vendor6 uint8
1229 TDMA uint8
1230 Field_valid uint16
1231 Cur_cyls uint16
1232 Cur_heads uint16
1233 Cur_sectors uint16
1234 Cur_capacity0 uint16
1235 Cur_capacity1 uint16
1236 Multsect uint8
1237 Multsect_valid uint8
1238 Lba_capacity uint32
1239 Dma_1word uint16
1240 Dma_mword uint16
1241 Eide_pio_modes uint16
1242 Eide_dma_min uint16
1243 Eide_dma_time uint16
1244 Eide_pio uint16
1245 Eide_pio_iordy uint16
1246 Words69_70 [2]uint16
1247 Words71_74 [4]uint16
1248 Queue_depth uint16
1249 Words76_79 [4]uint16
1250 Major_rev_num uint16
1251 Minor_rev_num uint16
1252 Command_set_1 uint16
1253 Command_set_2 uint16
1254 Cfsse uint16
1255 Cfs_enable_1 uint16
1256 Cfs_enable_2 uint16
1257 Csf_default uint16
1258 Dma_ultra uint16
1259 Trseuc uint16
1260 TrsEuc uint16
1261 CurAPMvalues uint16
1262 Mprc uint16
1263 Hw_config uint16
1264 Acoustic uint16
1265 Msrqs uint16
1266 Sxfert uint16
1267 Sal uint16
1268 Spg uint32
1269 Lba_capacity_2 uint64
1270 Words104_125 [22]uint16
1271 Last_lun uint16
1272 Word127 uint16
1273 Dlf uint16
1274 Csfo uint16
1275 Words130_155 [26]uint16
1276 Word156 uint16
1277 Words157_159 [3]uint16
1278 Cfa_power uint16
1279 Words161_175 [15]uint16
1280 Words176_205 [30]uint16
1281 Words206_254 [49]uint16
1282 Integrity_word uint16
1283 }
1284
1285 type Statfs_t struct {
1286 Type int64
1287 Bsize int64
1288 Blocks uint64
1289 Bfree uint64
1290 Bavail uint64
1291 Files uint64
1292 Ffree uint64
1293 Fsid Fsid
1294 Namelen int64
1295 Frsize int64
1296 Flags int64
1297 Spare [4]int64
1298 }
1299
1300 const (
1301 ST_MANDLOCK = 0x40
1302 ST_NOATIME = 0x400
1303 ST_NODEV = 0x4
1304 ST_NODIRATIME = 0x800
1305 ST_NOEXEC = 0x8
1306 ST_NOSUID = 0x2
1307 ST_RDONLY = 0x1
1308 ST_RELATIME = 0x1000
1309 ST_SYNCHRONOUS = 0x10
1310 )
1311
1312 type TpacketHdr struct {
1313 Status uint64
1314 Len uint32
1315 Snaplen uint32
1316 Mac uint16
1317 Net uint16
1318 Sec uint32
1319 Usec uint32
1320 _ [4]byte
1321 }
1322
1323 type Tpacket2Hdr struct {
1324 Status uint32
1325 Len uint32
1326 Snaplen uint32
1327 Mac uint16
1328 Net uint16
1329 Sec uint32
1330 Nsec uint32
1331 Vlan_tci uint16
1332 Vlan_tpid uint16
1333 _ [4]uint8
1334 }
1335
1336 type Tpacket3Hdr struct {
1337 Next_offset uint32
1338 Sec uint32
1339 Nsec uint32
1340 Snaplen uint32
1341 Len uint32
1342 Status uint32
1343 Mac uint16
1344 Net uint16
1345 Hv1 TpacketHdrVariant1
1346 _ [8]uint8
1347 }
1348
1349 type TpacketHdrVariant1 struct {
1350 Rxhash uint32
1351 Vlan_tci uint32
1352 Vlan_tpid uint16
1353 _ uint16
1354 }
1355
1356 type TpacketBlockDesc struct {
1357 Version uint32
1358 To_priv uint32
1359 Hdr [40]byte
1360 }
1361
1362 type TpacketReq struct {
1363 Block_size uint32
1364 Block_nr uint32
1365 Frame_size uint32
1366 Frame_nr uint32
1367 }
1368
1369 type TpacketReq3 struct {
1370 Block_size uint32
1371 Block_nr uint32
1372 Frame_size uint32
1373 Frame_nr uint32
1374 Retire_blk_tov uint32
1375 Sizeof_priv uint32
1376 Feature_req_word uint32
1377 }
1378
1379 type TpacketStats struct {
1380 Packets uint32
1381 Drops uint32
1382 }
1383
1384 type TpacketStatsV3 struct {
1385 Packets uint32
1386 Drops uint32
1387 Freeze_q_cnt uint32
1388 }
1389
1390 type TpacketAuxdata struct {
1391 Status uint32
1392 Len uint32
1393 Snaplen uint32
1394 Mac uint16
1395 Net uint16
1396 Vlan_tci uint16
1397 Vlan_tpid uint16
1398 }
1399
1400 const (
1401 TPACKET_V1 = 0x0
1402 TPACKET_V2 = 0x1
1403 TPACKET_V3 = 0x2
1404 )
1405
1406 const (
1407 SizeofTpacketHdr = 0x20
1408 SizeofTpacket2Hdr = 0x20
1409 SizeofTpacket3Hdr = 0x30
1410 )
1411
1412 const (
1413 NF_INET_PRE_ROUTING = 0x0
1414 NF_INET_LOCAL_IN = 0x1
1415 NF_INET_FORWARD = 0x2
1416 NF_INET_LOCAL_OUT = 0x3
1417 NF_INET_POST_ROUTING = 0x4
1418 NF_INET_NUMHOOKS = 0x5
1419 )
1420
1421 const (
1422 NF_NETDEV_INGRESS = 0x0
1423 NF_NETDEV_NUMHOOKS = 0x1
1424 )
1425
1426 const (
1427 NFPROTO_UNSPEC = 0x0
1428 NFPROTO_INET = 0x1
1429 NFPROTO_IPV4 = 0x2
1430 NFPROTO_ARP = 0x3
1431 NFPROTO_NETDEV = 0x5
1432 NFPROTO_BRIDGE = 0x7
1433 NFPROTO_IPV6 = 0xa
1434 NFPROTO_DECNET = 0xc
1435 NFPROTO_NUMPROTO = 0xd
1436 )
1437
1438 type Nfgenmsg struct {
1439 Nfgen_family uint8
1440 Version uint8
1441 Res_id uint16
1442 }
1443
1444 const (
1445 NFNL_BATCH_UNSPEC = 0x0
1446 NFNL_BATCH_GENID = 0x1
1447 )
1448
1449 const (
1450 NFT_REG_VERDICT = 0x0
1451 NFT_REG_1 = 0x1
1452 NFT_REG_2 = 0x2
1453 NFT_REG_3 = 0x3
1454 NFT_REG_4 = 0x4
1455 NFT_REG32_00 = 0x8
1456 NFT_REG32_01 = 0x9
1457 NFT_REG32_02 = 0xa
1458 NFT_REG32_03 = 0xb
1459 NFT_REG32_04 = 0xc
1460 NFT_REG32_05 = 0xd
1461 NFT_REG32_06 = 0xe
1462 NFT_REG32_07 = 0xf
1463 NFT_REG32_08 = 0x10
1464 NFT_REG32_09 = 0x11
1465 NFT_REG32_10 = 0x12
1466 NFT_REG32_11 = 0x13
1467 NFT_REG32_12 = 0x14
1468 NFT_REG32_13 = 0x15
1469 NFT_REG32_14 = 0x16
1470 NFT_REG32_15 = 0x17
1471 NFT_CONTINUE = -0x1
1472 NFT_BREAK = -0x2
1473 NFT_JUMP = -0x3
1474 NFT_GOTO = -0x4
1475 NFT_RETURN = -0x5
1476 NFT_MSG_NEWTABLE = 0x0
1477 NFT_MSG_GETTABLE = 0x1
1478 NFT_MSG_DELTABLE = 0x2
1479 NFT_MSG_NEWCHAIN = 0x3
1480 NFT_MSG_GETCHAIN = 0x4
1481 NFT_MSG_DELCHAIN = 0x5
1482 NFT_MSG_NEWRULE = 0x6
1483 NFT_MSG_GETRULE = 0x7
1484 NFT_MSG_DELRULE = 0x8
1485 NFT_MSG_NEWSET = 0x9
1486 NFT_MSG_GETSET = 0xa
1487 NFT_MSG_DELSET = 0xb
1488 NFT_MSG_NEWSETELEM = 0xc
1489 NFT_MSG_GETSETELEM = 0xd
1490 NFT_MSG_DELSETELEM = 0xe
1491 NFT_MSG_NEWGEN = 0xf
1492 NFT_MSG_GETGEN = 0x10
1493 NFT_MSG_TRACE = 0x11
1494 NFT_MSG_NEWOBJ = 0x12
1495 NFT_MSG_GETOBJ = 0x13
1496 NFT_MSG_DELOBJ = 0x14
1497 NFT_MSG_GETOBJ_RESET = 0x15
1498 NFT_MSG_MAX = 0x19
1499 NFTA_LIST_UNPEC = 0x0
1500 NFTA_LIST_ELEM = 0x1
1501 NFTA_HOOK_UNSPEC = 0x0
1502 NFTA_HOOK_HOOKNUM = 0x1
1503 NFTA_HOOK_PRIORITY = 0x2
1504 NFTA_HOOK_DEV = 0x3
1505 NFT_TABLE_F_DORMANT = 0x1
1506 NFTA_TABLE_UNSPEC = 0x0
1507 NFTA_TABLE_NAME = 0x1
1508 NFTA_TABLE_FLAGS = 0x2
1509 NFTA_TABLE_USE = 0x3
1510 NFTA_CHAIN_UNSPEC = 0x0
1511 NFTA_CHAIN_TABLE = 0x1
1512 NFTA_CHAIN_HANDLE = 0x2
1513 NFTA_CHAIN_NAME = 0x3
1514 NFTA_CHAIN_HOOK = 0x4
1515 NFTA_CHAIN_POLICY = 0x5
1516 NFTA_CHAIN_USE = 0x6
1517 NFTA_CHAIN_TYPE = 0x7
1518 NFTA_CHAIN_COUNTERS = 0x8
1519 NFTA_CHAIN_PAD = 0x9
1520 NFTA_RULE_UNSPEC = 0x0
1521 NFTA_RULE_TABLE = 0x1
1522 NFTA_RULE_CHAIN = 0x2
1523 NFTA_RULE_HANDLE = 0x3
1524 NFTA_RULE_EXPRESSIONS = 0x4
1525 NFTA_RULE_COMPAT = 0x5
1526 NFTA_RULE_POSITION = 0x6
1527 NFTA_RULE_USERDATA = 0x7
1528 NFTA_RULE_PAD = 0x8
1529 NFTA_RULE_ID = 0x9
1530 NFT_RULE_COMPAT_F_INV = 0x2
1531 NFT_RULE_COMPAT_F_MASK = 0x2
1532 NFTA_RULE_COMPAT_UNSPEC = 0x0
1533 NFTA_RULE_COMPAT_PROTO = 0x1
1534 NFTA_RULE_COMPAT_FLAGS = 0x2
1535 NFT_SET_ANONYMOUS = 0x1
1536 NFT_SET_CONSTANT = 0x2
1537 NFT_SET_INTERVAL = 0x4
1538 NFT_SET_MAP = 0x8
1539 NFT_SET_TIMEOUT = 0x10
1540 NFT_SET_EVAL = 0x20
1541 NFT_SET_OBJECT = 0x40
1542 NFT_SET_POL_PERFORMANCE = 0x0
1543 NFT_SET_POL_MEMORY = 0x1
1544 NFTA_SET_DESC_UNSPEC = 0x0
1545 NFTA_SET_DESC_SIZE = 0x1
1546 NFTA_SET_UNSPEC = 0x0
1547 NFTA_SET_TABLE = 0x1
1548 NFTA_SET_NAME = 0x2
1549 NFTA_SET_FLAGS = 0x3
1550 NFTA_SET_KEY_TYPE = 0x4
1551 NFTA_SET_KEY_LEN = 0x5
1552 NFTA_SET_DATA_TYPE = 0x6
1553 NFTA_SET_DATA_LEN = 0x7
1554 NFTA_SET_POLICY = 0x8
1555 NFTA_SET_DESC = 0x9
1556 NFTA_SET_ID = 0xa
1557 NFTA_SET_TIMEOUT = 0xb
1558 NFTA_SET_GC_INTERVAL = 0xc
1559 NFTA_SET_USERDATA = 0xd
1560 NFTA_SET_PAD = 0xe
1561 NFTA_SET_OBJ_TYPE = 0xf
1562 NFT_SET_ELEM_INTERVAL_END = 0x1
1563 NFTA_SET_ELEM_UNSPEC = 0x0
1564 NFTA_SET_ELEM_KEY = 0x1
1565 NFTA_SET_ELEM_DATA = 0x2
1566 NFTA_SET_ELEM_FLAGS = 0x3
1567 NFTA_SET_ELEM_TIMEOUT = 0x4
1568 NFTA_SET_ELEM_EXPIRATION = 0x5
1569 NFTA_SET_ELEM_USERDATA = 0x6
1570 NFTA_SET_ELEM_EXPR = 0x7
1571 NFTA_SET_ELEM_PAD = 0x8
1572 NFTA_SET_ELEM_OBJREF = 0x9
1573 NFTA_SET_ELEM_LIST_UNSPEC = 0x0
1574 NFTA_SET_ELEM_LIST_TABLE = 0x1
1575 NFTA_SET_ELEM_LIST_SET = 0x2
1576 NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
1577 NFTA_SET_ELEM_LIST_SET_ID = 0x4
1578 NFT_DATA_VALUE = 0x0
1579 NFT_DATA_VERDICT = 0xffffff00
1580 NFTA_DATA_UNSPEC = 0x0
1581 NFTA_DATA_VALUE = 0x1
1582 NFTA_DATA_VERDICT = 0x2
1583 NFTA_VERDICT_UNSPEC = 0x0
1584 NFTA_VERDICT_CODE = 0x1
1585 NFTA_VERDICT_CHAIN = 0x2
1586 NFTA_EXPR_UNSPEC = 0x0
1587 NFTA_EXPR_NAME = 0x1
1588 NFTA_EXPR_DATA = 0x2
1589 NFTA_IMMEDIATE_UNSPEC = 0x0
1590 NFTA_IMMEDIATE_DREG = 0x1
1591 NFTA_IMMEDIATE_DATA = 0x2
1592 NFTA_BITWISE_UNSPEC = 0x0
1593 NFTA_BITWISE_SREG = 0x1
1594 NFTA_BITWISE_DREG = 0x2
1595 NFTA_BITWISE_LEN = 0x3
1596 NFTA_BITWISE_MASK = 0x4
1597 NFTA_BITWISE_XOR = 0x5
1598 NFT_BYTEORDER_NTOH = 0x0
1599 NFT_BYTEORDER_HTON = 0x1
1600 NFTA_BYTEORDER_UNSPEC = 0x0
1601 NFTA_BYTEORDER_SREG = 0x1
1602 NFTA_BYTEORDER_DREG = 0x2
1603 NFTA_BYTEORDER_OP = 0x3
1604 NFTA_BYTEORDER_LEN = 0x4
1605 NFTA_BYTEORDER_SIZE = 0x5
1606 NFT_CMP_EQ = 0x0
1607 NFT_CMP_NEQ = 0x1
1608 NFT_CMP_LT = 0x2
1609 NFT_CMP_LTE = 0x3
1610 NFT_CMP_GT = 0x4
1611 NFT_CMP_GTE = 0x5
1612 NFTA_CMP_UNSPEC = 0x0
1613 NFTA_CMP_SREG = 0x1
1614 NFTA_CMP_OP = 0x2
1615 NFTA_CMP_DATA = 0x3
1616 NFT_RANGE_EQ = 0x0
1617 NFT_RANGE_NEQ = 0x1
1618 NFTA_RANGE_UNSPEC = 0x0
1619 NFTA_RANGE_SREG = 0x1
1620 NFTA_RANGE_OP = 0x2
1621 NFTA_RANGE_FROM_DATA = 0x3
1622 NFTA_RANGE_TO_DATA = 0x4
1623 NFT_LOOKUP_F_INV = 0x1
1624 NFTA_LOOKUP_UNSPEC = 0x0
1625 NFTA_LOOKUP_SET = 0x1
1626 NFTA_LOOKUP_SREG = 0x2
1627 NFTA_LOOKUP_DREG = 0x3
1628 NFTA_LOOKUP_SET_ID = 0x4
1629 NFTA_LOOKUP_FLAGS = 0x5
1630 NFT_DYNSET_OP_ADD = 0x0
1631 NFT_DYNSET_OP_UPDATE = 0x1
1632 NFT_DYNSET_F_INV = 0x1
1633 NFTA_DYNSET_UNSPEC = 0x0
1634 NFTA_DYNSET_SET_NAME = 0x1
1635 NFTA_DYNSET_SET_ID = 0x2
1636 NFTA_DYNSET_OP = 0x3
1637 NFTA_DYNSET_SREG_KEY = 0x4
1638 NFTA_DYNSET_SREG_DATA = 0x5
1639 NFTA_DYNSET_TIMEOUT = 0x6
1640 NFTA_DYNSET_EXPR = 0x7
1641 NFTA_DYNSET_PAD = 0x8
1642 NFTA_DYNSET_FLAGS = 0x9
1643 NFT_PAYLOAD_LL_HEADER = 0x0
1644 NFT_PAYLOAD_NETWORK_HEADER = 0x1
1645 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
1646 NFT_PAYLOAD_CSUM_NONE = 0x0
1647 NFT_PAYLOAD_CSUM_INET = 0x1
1648 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
1649 NFTA_PAYLOAD_UNSPEC = 0x0
1650 NFTA_PAYLOAD_DREG = 0x1
1651 NFTA_PAYLOAD_BASE = 0x2
1652 NFTA_PAYLOAD_OFFSET = 0x3
1653 NFTA_PAYLOAD_LEN = 0x4
1654 NFTA_PAYLOAD_SREG = 0x5
1655 NFTA_PAYLOAD_CSUM_TYPE = 0x6
1656 NFTA_PAYLOAD_CSUM_OFFSET = 0x7
1657 NFTA_PAYLOAD_CSUM_FLAGS = 0x8
1658 NFT_EXTHDR_F_PRESENT = 0x1
1659 NFT_EXTHDR_OP_IPV6 = 0x0
1660 NFT_EXTHDR_OP_TCPOPT = 0x1
1661 NFTA_EXTHDR_UNSPEC = 0x0
1662 NFTA_EXTHDR_DREG = 0x1
1663 NFTA_EXTHDR_TYPE = 0x2
1664 NFTA_EXTHDR_OFFSET = 0x3
1665 NFTA_EXTHDR_LEN = 0x4
1666 NFTA_EXTHDR_FLAGS = 0x5
1667 NFTA_EXTHDR_OP = 0x6
1668 NFTA_EXTHDR_SREG = 0x7
1669 NFT_META_LEN = 0x0
1670 NFT_META_PROTOCOL = 0x1
1671 NFT_META_PRIORITY = 0x2
1672 NFT_META_MARK = 0x3
1673 NFT_META_IIF = 0x4
1674 NFT_META_OIF = 0x5
1675 NFT_META_IIFNAME = 0x6
1676 NFT_META_OIFNAME = 0x7
1677 NFT_META_IIFTYPE = 0x8
1678 NFT_META_OIFTYPE = 0x9
1679 NFT_META_SKUID = 0xa
1680 NFT_META_SKGID = 0xb
1681 NFT_META_NFTRACE = 0xc
1682 NFT_META_RTCLASSID = 0xd
1683 NFT_META_SECMARK = 0xe
1684 NFT_META_NFPROTO = 0xf
1685 NFT_META_L4PROTO = 0x10
1686 NFT_META_BRI_IIFNAME = 0x11
1687 NFT_META_BRI_OIFNAME = 0x12
1688 NFT_META_PKTTYPE = 0x13
1689 NFT_META_CPU = 0x14
1690 NFT_META_IIFGROUP = 0x15
1691 NFT_META_OIFGROUP = 0x16
1692 NFT_META_CGROUP = 0x17
1693 NFT_META_PRANDOM = 0x18
1694 NFT_RT_CLASSID = 0x0
1695 NFT_RT_NEXTHOP4 = 0x1
1696 NFT_RT_NEXTHOP6 = 0x2
1697 NFT_RT_TCPMSS = 0x3
1698 NFT_HASH_JENKINS = 0x0
1699 NFT_HASH_SYM = 0x1
1700 NFTA_HASH_UNSPEC = 0x0
1701 NFTA_HASH_SREG = 0x1
1702 NFTA_HASH_DREG = 0x2
1703 NFTA_HASH_LEN = 0x3
1704 NFTA_HASH_MODULUS = 0x4
1705 NFTA_HASH_SEED = 0x5
1706 NFTA_HASH_OFFSET = 0x6
1707 NFTA_HASH_TYPE = 0x7
1708 NFTA_META_UNSPEC = 0x0
1709 NFTA_META_DREG = 0x1
1710 NFTA_META_KEY = 0x2
1711 NFTA_META_SREG = 0x3
1712 NFTA_RT_UNSPEC = 0x0
1713 NFTA_RT_DREG = 0x1
1714 NFTA_RT_KEY = 0x2
1715 NFT_CT_STATE = 0x0
1716 NFT_CT_DIRECTION = 0x1
1717 NFT_CT_STATUS = 0x2
1718 NFT_CT_MARK = 0x3
1719 NFT_CT_SECMARK = 0x4
1720 NFT_CT_EXPIRATION = 0x5
1721 NFT_CT_HELPER = 0x6
1722 NFT_CT_L3PROTOCOL = 0x7
1723 NFT_CT_SRC = 0x8
1724 NFT_CT_DST = 0x9
1725 NFT_CT_PROTOCOL = 0xa
1726 NFT_CT_PROTO_SRC = 0xb
1727 NFT_CT_PROTO_DST = 0xc
1728 NFT_CT_LABELS = 0xd
1729 NFT_CT_PKTS = 0xe
1730 NFT_CT_BYTES = 0xf
1731 NFT_CT_AVGPKT = 0x10
1732 NFT_CT_ZONE = 0x11
1733 NFT_CT_EVENTMASK = 0x12
1734 NFTA_CT_UNSPEC = 0x0
1735 NFTA_CT_DREG = 0x1
1736 NFTA_CT_KEY = 0x2
1737 NFTA_CT_DIRECTION = 0x3
1738 NFTA_CT_SREG = 0x4
1739 NFT_LIMIT_PKTS = 0x0
1740 NFT_LIMIT_PKT_BYTES = 0x1
1741 NFT_LIMIT_F_INV = 0x1
1742 NFTA_LIMIT_UNSPEC = 0x0
1743 NFTA_LIMIT_RATE = 0x1
1744 NFTA_LIMIT_UNIT = 0x2
1745 NFTA_LIMIT_BURST = 0x3
1746 NFTA_LIMIT_TYPE = 0x4
1747 NFTA_LIMIT_FLAGS = 0x5
1748 NFTA_LIMIT_PAD = 0x6
1749 NFTA_COUNTER_UNSPEC = 0x0
1750 NFTA_COUNTER_BYTES = 0x1
1751 NFTA_COUNTER_PACKETS = 0x2
1752 NFTA_COUNTER_PAD = 0x3
1753 NFTA_LOG_UNSPEC = 0x0
1754 NFTA_LOG_GROUP = 0x1
1755 NFTA_LOG_PREFIX = 0x2
1756 NFTA_LOG_SNAPLEN = 0x3
1757 NFTA_LOG_QTHRESHOLD = 0x4
1758 NFTA_LOG_LEVEL = 0x5
1759 NFTA_LOG_FLAGS = 0x6
1760 NFTA_QUEUE_UNSPEC = 0x0
1761 NFTA_QUEUE_NUM = 0x1
1762 NFTA_QUEUE_TOTAL = 0x2
1763 NFTA_QUEUE_FLAGS = 0x3
1764 NFTA_QUEUE_SREG_QNUM = 0x4
1765 NFT_QUOTA_F_INV = 0x1
1766 NFT_QUOTA_F_DEPLETED = 0x2
1767 NFTA_QUOTA_UNSPEC = 0x0
1768 NFTA_QUOTA_BYTES = 0x1
1769 NFTA_QUOTA_FLAGS = 0x2
1770 NFTA_QUOTA_PAD = 0x3
1771 NFTA_QUOTA_CONSUMED = 0x4
1772 NFT_REJECT_ICMP_UNREACH = 0x0
1773 NFT_REJECT_TCP_RST = 0x1
1774 NFT_REJECT_ICMPX_UNREACH = 0x2
1775 NFT_REJECT_ICMPX_NO_ROUTE = 0x0
1776 NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
1777 NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
1778 NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
1779 NFTA_REJECT_UNSPEC = 0x0
1780 NFTA_REJECT_TYPE = 0x1
1781 NFTA_REJECT_ICMP_CODE = 0x2
1782 NFT_NAT_SNAT = 0x0
1783 NFT_NAT_DNAT = 0x1
1784 NFTA_NAT_UNSPEC = 0x0
1785 NFTA_NAT_TYPE = 0x1
1786 NFTA_NAT_FAMILY = 0x2
1787 NFTA_NAT_REG_ADDR_MIN = 0x3
1788 NFTA_NAT_REG_ADDR_MAX = 0x4
1789 NFTA_NAT_REG_PROTO_MIN = 0x5
1790 NFTA_NAT_REG_PROTO_MAX = 0x6
1791 NFTA_NAT_FLAGS = 0x7
1792 NFTA_MASQ_UNSPEC = 0x0
1793 NFTA_MASQ_FLAGS = 0x1
1794 NFTA_MASQ_REG_PROTO_MIN = 0x2
1795 NFTA_MASQ_REG_PROTO_MAX = 0x3
1796 NFTA_REDIR_UNSPEC = 0x0
1797 NFTA_REDIR_REG_PROTO_MIN = 0x1
1798 NFTA_REDIR_REG_PROTO_MAX = 0x2
1799 NFTA_REDIR_FLAGS = 0x3
1800 NFTA_DUP_UNSPEC = 0x0
1801 NFTA_DUP_SREG_ADDR = 0x1
1802 NFTA_DUP_SREG_DEV = 0x2
1803 NFTA_FWD_UNSPEC = 0x0
1804 NFTA_FWD_SREG_DEV = 0x1
1805 NFTA_OBJREF_UNSPEC = 0x0
1806 NFTA_OBJREF_IMM_TYPE = 0x1
1807 NFTA_OBJREF_IMM_NAME = 0x2
1808 NFTA_OBJREF_SET_SREG = 0x3
1809 NFTA_OBJREF_SET_NAME = 0x4
1810 NFTA_OBJREF_SET_ID = 0x5
1811 NFTA_GEN_UNSPEC = 0x0
1812 NFTA_GEN_ID = 0x1
1813 NFTA_GEN_PROC_PID = 0x2
1814 NFTA_GEN_PROC_NAME = 0x3
1815 NFTA_FIB_UNSPEC = 0x0
1816 NFTA_FIB_DREG = 0x1
1817 NFTA_FIB_RESULT = 0x2
1818 NFTA_FIB_FLAGS = 0x3
1819 NFT_FIB_RESULT_UNSPEC = 0x0
1820 NFT_FIB_RESULT_OIF = 0x1
1821 NFT_FIB_RESULT_OIFNAME = 0x2
1822 NFT_FIB_RESULT_ADDRTYPE = 0x3
1823 NFTA_FIB_F_SADDR = 0x1
1824 NFTA_FIB_F_DADDR = 0x2
1825 NFTA_FIB_F_MARK = 0x4
1826 NFTA_FIB_F_IIF = 0x8
1827 NFTA_FIB_F_OIF = 0x10
1828 NFTA_FIB_F_PRESENT = 0x20
1829 NFTA_CT_HELPER_UNSPEC = 0x0
1830 NFTA_CT_HELPER_NAME = 0x1
1831 NFTA_CT_HELPER_L3PROTO = 0x2
1832 NFTA_CT_HELPER_L4PROTO = 0x3
1833 NFTA_OBJ_UNSPEC = 0x0
1834 NFTA_OBJ_TABLE = 0x1
1835 NFTA_OBJ_NAME = 0x2
1836 NFTA_OBJ_TYPE = 0x3
1837 NFTA_OBJ_DATA = 0x4
1838 NFTA_OBJ_USE = 0x5
1839 NFTA_TRACE_UNSPEC = 0x0
1840 NFTA_TRACE_TABLE = 0x1
1841 NFTA_TRACE_CHAIN = 0x2
1842 NFTA_TRACE_RULE_HANDLE = 0x3
1843 NFTA_TRACE_TYPE = 0x4
1844 NFTA_TRACE_VERDICT = 0x5
1845 NFTA_TRACE_ID = 0x6
1846 NFTA_TRACE_LL_HEADER = 0x7
1847 NFTA_TRACE_NETWORK_HEADER = 0x8
1848 NFTA_TRACE_TRANSPORT_HEADER = 0x9
1849 NFTA_TRACE_IIF = 0xa
1850 NFTA_TRACE_IIFTYPE = 0xb
1851 NFTA_TRACE_OIF = 0xc
1852 NFTA_TRACE_OIFTYPE = 0xd
1853 NFTA_TRACE_MARK = 0xe
1854 NFTA_TRACE_NFPROTO = 0xf
1855 NFTA_TRACE_POLICY = 0x10
1856 NFTA_TRACE_PAD = 0x11
1857 NFT_TRACETYPE_UNSPEC = 0x0
1858 NFT_TRACETYPE_POLICY = 0x1
1859 NFT_TRACETYPE_RETURN = 0x2
1860 NFT_TRACETYPE_RULE = 0x3
1861 NFTA_NG_UNSPEC = 0x0
1862 NFTA_NG_DREG = 0x1
1863 NFTA_NG_MODULUS = 0x2
1864 NFTA_NG_TYPE = 0x3
1865 NFTA_NG_OFFSET = 0x4
1866 NFT_NG_INCREMENTAL = 0x0
1867 NFT_NG_RANDOM = 0x1
1868 )
1869
1870 type RTCTime struct {
1871 Sec int32
1872 Min int32
1873 Hour int32
1874 Mday int32
1875 Mon int32
1876 Year int32
1877 Wday int32
1878 Yday int32
1879 Isdst int32
1880 }
1881
1882 type RTCWkAlrm struct {
1883 Enabled uint8
1884 Pending uint8
1885 Time RTCTime
1886 }
1887
1888 type RTCPLLInfo struct {
1889 Ctrl int32
1890 Value int32
1891 Max int32
1892 Min int32
1893 Posmult int32
1894 Negmult int32
1895 Clock int64
1896 }
1897
1898 type BlkpgIoctlArg struct {
1899 Op int32
1900 Flags int32
1901 Datalen int32
1902 Data *byte
1903 }
1904
1905 type BlkpgPartition struct {
1906 Start int64
1907 Length int64
1908 Pno int32
1909 Devname [64]uint8
1910 Volname [64]uint8
1911 _ [4]byte
1912 }
1913
1914 const (
1915 BLKPG = 0x20001269
1916 BLKPG_ADD_PARTITION = 0x1
1917 BLKPG_DEL_PARTITION = 0x2
1918 BLKPG_RESIZE_PARTITION = 0x3
1919 )
1920
1921 const (
1922 NETNSA_NONE = 0x0
1923 NETNSA_NSID = 0x1
1924 NETNSA_PID = 0x2
1925 NETNSA_FD = 0x3
1926 )
1927
1928 type XDPRingOffset struct {
1929 Producer uint64
1930 Consumer uint64
1931 Desc uint64
1932 }
1933
1934 type XDPMmapOffsets struct {
1935 Rx XDPRingOffset
1936 Tx XDPRingOffset
1937 Fr XDPRingOffset
1938 Cr XDPRingOffset
1939 }
1940
1941 type XDPUmemReg struct {
1942 Addr uint64
1943 Len uint64
1944 Size uint32
1945 Headroom uint32
1946 }
1947
1948 type XDPStatistics struct {
1949 Rx_dropped uint64
1950 Rx_invalid_descs uint64
1951 Tx_invalid_descs uint64
1952 }
1953
1954 type XDPDesc struct {
1955 Addr uint64
1956 Len uint32
1957 Options uint32
1958 }
1959
1960 const (
1961 NCSI_CMD_UNSPEC = 0x0
1962 NCSI_CMD_PKG_INFO = 0x1
1963 NCSI_CMD_SET_INTERFACE = 0x2
1964 NCSI_CMD_CLEAR_INTERFACE = 0x3
1965 NCSI_ATTR_UNSPEC = 0x0
1966 NCSI_ATTR_IFINDEX = 0x1
1967 NCSI_ATTR_PACKAGE_LIST = 0x2
1968 NCSI_ATTR_PACKAGE_ID = 0x3
1969 NCSI_ATTR_CHANNEL_ID = 0x4
1970 NCSI_PKG_ATTR_UNSPEC = 0x0
1971 NCSI_PKG_ATTR = 0x1
1972 NCSI_PKG_ATTR_ID = 0x2
1973 NCSI_PKG_ATTR_FORCED = 0x3
1974 NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
1975 NCSI_CHANNEL_ATTR_UNSPEC = 0x0
1976 NCSI_CHANNEL_ATTR = 0x1
1977 NCSI_CHANNEL_ATTR_ID = 0x2
1978 NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
1979 NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
1980 NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
1981 NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
1982 NCSI_CHANNEL_ATTR_ACTIVE = 0x7
1983 NCSI_CHANNEL_ATTR_FORCED = 0x8
1984 NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
1985 NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
1986 )
1987
1988 const (
1989 SOF_TIMESTAMPING_TX_HARDWARE = 0x1
1990 SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
1991 SOF_TIMESTAMPING_RX_HARDWARE = 0x4
1992 SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
1993 SOF_TIMESTAMPING_SOFTWARE = 0x10
1994 SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
1995 SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
1996 SOF_TIMESTAMPING_OPT_ID = 0x80
1997 SOF_TIMESTAMPING_TX_SCHED = 0x100
1998 SOF_TIMESTAMPING_TX_ACK = 0x200
1999 SOF_TIMESTAMPING_OPT_CMSG = 0x400
2000 SOF_TIMESTAMPING_OPT_TSONLY = 0x800
2001 SOF_TIMESTAMPING_OPT_STATS = 0x1000
2002 SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
2003 SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
2004
2005 SOF_TIMESTAMPING_LAST = 0x4000
2006 SOF_TIMESTAMPING_MASK = 0x7fff
2007 )
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build riscv64,linux
4
5 package unix
6
7 const (
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
13 PathMax = 0x1000
14 )
15
16 type (
17 _C_short int16
18 _C_int int32
19 _C_long int64
20 _C_long_long int64
21 )
22
23 type Timespec struct {
24 Sec int64
25 Nsec int64
26 }
27
28 type Timeval struct {
29 Sec int64
30 Usec int64
31 }
32
33 type Timex struct {
34 Modes uint32
35 Offset int64
36 Freq int64
37 Maxerror int64
38 Esterror int64
39 Status int32
40 Constant int64
41 Precision int64
42 Tolerance int64
43 Time Timeval
44 Tick int64
45 Ppsfreq int64
46 Jitter int64
47 Shift int32
48 Stabil int64
49 Jitcnt int64
50 Calcnt int64
51 Errcnt int64
52 Stbcnt int64
53 Tai int32
54 _ [44]byte
55 }
56
57 type Time_t int64
58
59 type Tms struct {
60 Utime int64
61 Stime int64
62 Cutime int64
63 Cstime int64
64 }
65
66 type Utimbuf struct {
67 Actime int64
68 Modtime int64
69 }
70
71 type Rusage struct {
72 Utime Timeval
73 Stime Timeval
74 Maxrss int64
75 Ixrss int64
76 Idrss int64
77 Isrss int64
78 Minflt int64
79 Majflt int64
80 Nswap int64
81 Inblock int64
82 Oublock int64
83 Msgsnd int64
84 Msgrcv int64
85 Nsignals int64
86 Nvcsw int64
87 Nivcsw int64
88 }
89
90 type Rlimit struct {
91 Cur uint64
92 Max uint64
93 }
94
95 type _Gid_t uint32
96
97 type Stat_t struct {
98 Dev uint64
99 Ino uint64
100 Mode uint32
101 Nlink uint32
102 Uid uint32
103 Gid uint32
104 Rdev uint64
105 _ uint64
106 Size int64
107 Blksize int32
108 _ int32
109 Blocks int64
110 Atim Timespec
111 Mtim Timespec
112 Ctim Timespec
113 _ [2]int32
114 }
115
116 type StatxTimestamp struct {
117 Sec int64
118 Nsec uint32
119 _ int32
120 }
121
122 type Statx_t struct {
123 Mask uint32
124 Blksize uint32
125 Attributes uint64
126 Nlink uint32
127 Uid uint32
128 Gid uint32
129 Mode uint16
130 _ [1]uint16
131 Ino uint64
132 Size uint64
133 Blocks uint64
134 Attributes_mask uint64
135 Atime StatxTimestamp
136 Btime StatxTimestamp
137 Ctime StatxTimestamp
138 Mtime StatxTimestamp
139 Rdev_major uint32
140 Rdev_minor uint32
141 Dev_major uint32
142 Dev_minor uint32
143 _ [14]uint64
144 }
145
146 type Dirent struct {
147 Ino uint64
148 Off int64
149 Reclen uint16
150 Type uint8
151 Name [256]uint8
152 _ [5]byte
153 }
154
155 type Fsid struct {
156 Val [2]int32
157 }
158
159 type Flock_t struct {
160 Type int16
161 Whence int16
162 Start int64
163 Len int64
164 Pid int32
165 _ [4]byte
166 }
167
168 type FscryptPolicy struct {
169 Version uint8
170 Contents_encryption_mode uint8
171 Filenames_encryption_mode uint8
172 Flags uint8
173 Master_key_descriptor [8]uint8
174 }
175
176 type FscryptKey struct {
177 Mode uint32
178 Raw [64]uint8
179 Size uint32
180 }
181
182 type KeyctlDHParams struct {
183 Private int32
184 Prime int32
185 Base int32
186 }
187
188 const (
189 FADV_NORMAL = 0x0
190 FADV_RANDOM = 0x1
191 FADV_SEQUENTIAL = 0x2
192 FADV_WILLNEED = 0x3
193 FADV_DONTNEED = 0x4
194 FADV_NOREUSE = 0x5
195 )
196
197 type RawSockaddrInet4 struct {
198 Family uint16
199 Port uint16
200 Addr [4]byte /* in_addr */
201 Zero [8]uint8
202 }
203
204 type RawSockaddrInet6 struct {
205 Family uint16
206 Port uint16
207 Flowinfo uint32
208 Addr [16]byte /* in6_addr */
209 Scope_id uint32
210 }
211
212 type RawSockaddrUnix struct {
213 Family uint16
214 Path [108]int8
215 }
216
217 type RawSockaddrLinklayer struct {
218 Family uint16
219 Protocol uint16
220 Ifindex int32
221 Hatype uint16
222 Pkttype uint8
223 Halen uint8
224 Addr [8]uint8
225 }
226
227 type RawSockaddrNetlink struct {
228 Family uint16
229 Pad uint16
230 Pid uint32
231 Groups uint32
232 }
233
234 type RawSockaddrHCI struct {
235 Family uint16
236 Dev uint16
237 Channel uint16
238 }
239
240 type RawSockaddrL2 struct {
241 Family uint16
242 Psm uint16
243 Bdaddr [6]uint8
244 Cid uint16
245 Bdaddr_type uint8
246 _ [1]byte
247 }
248
249 type RawSockaddrRFCOMM struct {
250 Family uint16
251 Bdaddr [6]uint8
252 Channel uint8
253 _ [1]byte
254 }
255
256 type RawSockaddrCAN struct {
257 Family uint16
258 Ifindex int32
259 Addr [8]byte
260 }
261
262 type RawSockaddrALG struct {
263 Family uint16
264 Type [14]uint8
265 Feat uint32
266 Mask uint32
267 Name [64]uint8
268 }
269
270 type RawSockaddrVM struct {
271 Family uint16
272 Reserved1 uint16
273 Port uint32
274 Cid uint32
275 Zero [4]uint8
276 }
277
278 type RawSockaddrXDP struct {
279 Family uint16
280 Flags uint16
281 Ifindex uint32
282 Queue_id uint32
283 Shared_umem_fd uint32
284 }
285
286 type RawSockaddrPPPoX [0x1e]byte
287
288 type RawSockaddr struct {
289 Family uint16
290 Data [14]uint8
291 }
292
293 type RawSockaddrAny struct {
294 Addr RawSockaddr
295 Pad [96]uint8
296 }
297
298 type _Socklen uint32
299
300 type Linger struct {
301 Onoff int32
302 Linger int32
303 }
304
305 type Iovec struct {
306 Base *byte
307 Len uint64
308 }
309
310 type IPMreq struct {
311 Multiaddr [4]byte /* in_addr */
312 Interface [4]byte /* in_addr */
313 }
314
315 type IPMreqn struct {
316 Multiaddr [4]byte /* in_addr */
317 Address [4]byte /* in_addr */
318 Ifindex int32
319 }
320
321 type IPv6Mreq struct {
322 Multiaddr [16]byte /* in6_addr */
323 Interface uint32
324 }
325
326 type PacketMreq struct {
327 Ifindex int32
328 Type uint16
329 Alen uint16
330 Address [8]uint8
331 }
332
333 type Msghdr struct {
334 Name *byte
335 Namelen uint32
336 Iov *Iovec
337 Iovlen uint64
338 Control *byte
339 Controllen uint64
340 Flags int32
341 _ [4]byte
342 }
343
344 type Cmsghdr struct {
345 Len uint64
346 Level int32
347 Type int32
348 }
349
350 type Inet4Pktinfo struct {
351 Ifindex int32
352 Spec_dst [4]byte /* in_addr */
353 Addr [4]byte /* in_addr */
354 }
355
356 type Inet6Pktinfo struct {
357 Addr [16]byte /* in6_addr */
358 Ifindex uint32
359 }
360
361 type IPv6MTUInfo struct {
362 Addr RawSockaddrInet6
363 Mtu uint32
364 }
365
366 type ICMPv6Filter struct {
367 Data [8]uint32
368 }
369
370 type Ucred struct {
371 Pid int32
372 Uid uint32
373 Gid uint32
374 }
375
376 type TCPInfo struct {
377 State uint8
378 Ca_state uint8
379 Retransmits uint8
380 Probes uint8
381 Backoff uint8
382 Options uint8
383 Rto uint32
384 Ato uint32
385 Snd_mss uint32
386 Rcv_mss uint32
387 Unacked uint32
388 Sacked uint32
389 Lost uint32
390 Retrans uint32
391 Fackets uint32
392 Last_data_sent uint32
393 Last_ack_sent uint32
394 Last_data_recv uint32
395 Last_ack_recv uint32
396 Pmtu uint32
397 Rcv_ssthresh uint32
398 Rtt uint32
399 Rttvar uint32
400 Snd_ssthresh uint32
401 Snd_cwnd uint32
402 Advmss uint32
403 Reordering uint32
404 Rcv_rtt uint32
405 Rcv_space uint32
406 Total_retrans uint32
407 }
408
409 const (
410 SizeofSockaddrInet4 = 0x10
411 SizeofSockaddrInet6 = 0x1c
412 SizeofSockaddrAny = 0x70
413 SizeofSockaddrUnix = 0x6e
414 SizeofSockaddrLinklayer = 0x14
415 SizeofSockaddrNetlink = 0xc
416 SizeofSockaddrHCI = 0x6
417 SizeofSockaddrL2 = 0xe
418 SizeofSockaddrRFCOMM = 0xa
419 SizeofSockaddrCAN = 0x10
420 SizeofSockaddrALG = 0x58
421 SizeofSockaddrVM = 0x10
422 SizeofSockaddrXDP = 0x10
423 SizeofSockaddrPPPoX = 0x1e
424 SizeofLinger = 0x8
425 SizeofIovec = 0x10
426 SizeofIPMreq = 0x8
427 SizeofIPMreqn = 0xc
428 SizeofIPv6Mreq = 0x14
429 SizeofPacketMreq = 0x10
430 SizeofMsghdr = 0x38
431 SizeofCmsghdr = 0x10
432 SizeofInet4Pktinfo = 0xc
433 SizeofInet6Pktinfo = 0x14
434 SizeofIPv6MTUInfo = 0x20
435 SizeofICMPv6Filter = 0x20
436 SizeofUcred = 0xc
437 SizeofTCPInfo = 0x68
438 )
439
440 const (
441 IFA_UNSPEC = 0x0
442 IFA_ADDRESS = 0x1
443 IFA_LOCAL = 0x2
444 IFA_LABEL = 0x3
445 IFA_BROADCAST = 0x4
446 IFA_ANYCAST = 0x5
447 IFA_CACHEINFO = 0x6
448 IFA_MULTICAST = 0x7
449 IFLA_UNSPEC = 0x0
450 IFLA_ADDRESS = 0x1
451 IFLA_BROADCAST = 0x2
452 IFLA_IFNAME = 0x3
453 IFLA_INFO_KIND = 0x1
454 IFLA_MTU = 0x4
455 IFLA_LINK = 0x5
456 IFLA_QDISC = 0x6
457 IFLA_STATS = 0x7
458 IFLA_COST = 0x8
459 IFLA_PRIORITY = 0x9
460 IFLA_MASTER = 0xa
461 IFLA_WIRELESS = 0xb
462 IFLA_PROTINFO = 0xc
463 IFLA_TXQLEN = 0xd
464 IFLA_MAP = 0xe
465 IFLA_WEIGHT = 0xf
466 IFLA_OPERSTATE = 0x10
467 IFLA_LINKMODE = 0x11
468 IFLA_LINKINFO = 0x12
469 IFLA_NET_NS_PID = 0x13
470 IFLA_IFALIAS = 0x14
471 IFLA_NUM_VF = 0x15
472 IFLA_VFINFO_LIST = 0x16
473 IFLA_STATS64 = 0x17
474 IFLA_VF_PORTS = 0x18
475 IFLA_PORT_SELF = 0x19
476 IFLA_AF_SPEC = 0x1a
477 IFLA_GROUP = 0x1b
478 IFLA_NET_NS_FD = 0x1c
479 IFLA_EXT_MASK = 0x1d
480 IFLA_PROMISCUITY = 0x1e
481 IFLA_NUM_TX_QUEUES = 0x1f
482 IFLA_NUM_RX_QUEUES = 0x20
483 IFLA_CARRIER = 0x21
484 IFLA_PHYS_PORT_ID = 0x22
485 IFLA_CARRIER_CHANGES = 0x23
486 IFLA_PHYS_SWITCH_ID = 0x24
487 IFLA_LINK_NETNSID = 0x25
488 IFLA_PHYS_PORT_NAME = 0x26
489 IFLA_PROTO_DOWN = 0x27
490 IFLA_GSO_MAX_SEGS = 0x28
491 IFLA_GSO_MAX_SIZE = 0x29
492 IFLA_PAD = 0x2a
493 IFLA_XDP = 0x2b
494 IFLA_EVENT = 0x2c
495 IFLA_NEW_NETNSID = 0x2d
496 IFLA_IF_NETNSID = 0x2e
497 IFLA_MAX = 0x33
498 RT_SCOPE_UNIVERSE = 0x0
499 RT_SCOPE_SITE = 0xc8
500 RT_SCOPE_LINK = 0xfd
501 RT_SCOPE_HOST = 0xfe
502 RT_SCOPE_NOWHERE = 0xff
503 RT_TABLE_UNSPEC = 0x0
504 RT_TABLE_COMPAT = 0xfc
505 RT_TABLE_DEFAULT = 0xfd
506 RT_TABLE_MAIN = 0xfe
507 RT_TABLE_LOCAL = 0xff
508 RT_TABLE_MAX = 0xffffffff
509 RTA_UNSPEC = 0x0
510 RTA_DST = 0x1
511 RTA_SRC = 0x2
512 RTA_IIF = 0x3
513 RTA_OIF = 0x4
514 RTA_GATEWAY = 0x5
515 RTA_PRIORITY = 0x6
516 RTA_PREFSRC = 0x7
517 RTA_METRICS = 0x8
518 RTA_MULTIPATH = 0x9
519 RTA_FLOW = 0xb
520 RTA_CACHEINFO = 0xc
521 RTA_TABLE = 0xf
522 RTA_MARK = 0x10
523 RTA_MFC_STATS = 0x11
524 RTA_VIA = 0x12
525 RTA_NEWDST = 0x13
526 RTA_PREF = 0x14
527 RTA_ENCAP_TYPE = 0x15
528 RTA_ENCAP = 0x16
529 RTA_EXPIRES = 0x17
530 RTA_PAD = 0x18
531 RTA_UID = 0x19
532 RTA_TTL_PROPAGATE = 0x1a
533 RTA_IP_PROTO = 0x1b
534 RTA_SPORT = 0x1c
535 RTA_DPORT = 0x1d
536 RTN_UNSPEC = 0x0
537 RTN_UNICAST = 0x1
538 RTN_LOCAL = 0x2
539 RTN_BROADCAST = 0x3
540 RTN_ANYCAST = 0x4
541 RTN_MULTICAST = 0x5
542 RTN_BLACKHOLE = 0x6
543 RTN_UNREACHABLE = 0x7
544 RTN_PROHIBIT = 0x8
545 RTN_THROW = 0x9
546 RTN_NAT = 0xa
547 RTN_XRESOLVE = 0xb
548 RTNLGRP_NONE = 0x0
549 RTNLGRP_LINK = 0x1
550 RTNLGRP_NOTIFY = 0x2
551 RTNLGRP_NEIGH = 0x3
552 RTNLGRP_TC = 0x4
553 RTNLGRP_IPV4_IFADDR = 0x5
554 RTNLGRP_IPV4_MROUTE = 0x6
555 RTNLGRP_IPV4_ROUTE = 0x7
556 RTNLGRP_IPV4_RULE = 0x8
557 RTNLGRP_IPV6_IFADDR = 0x9
558 RTNLGRP_IPV6_MROUTE = 0xa
559 RTNLGRP_IPV6_ROUTE = 0xb
560 RTNLGRP_IPV6_IFINFO = 0xc
561 RTNLGRP_IPV6_PREFIX = 0x12
562 RTNLGRP_IPV6_RULE = 0x13
563 RTNLGRP_ND_USEROPT = 0x14
564 SizeofNlMsghdr = 0x10
565 SizeofNlMsgerr = 0x14
566 SizeofRtGenmsg = 0x1
567 SizeofNlAttr = 0x4
568 SizeofRtAttr = 0x4
569 SizeofIfInfomsg = 0x10
570 SizeofIfAddrmsg = 0x8
571 SizeofRtMsg = 0xc
572 SizeofRtNexthop = 0x8
573 )
574
575 type NlMsghdr struct {
576 Len uint32
577 Type uint16
578 Flags uint16
579 Seq uint32
580 Pid uint32
581 }
582
583 type NlMsgerr struct {
584 Error int32
585 Msg NlMsghdr
586 }
587
588 type RtGenmsg struct {
589 Family uint8
590 }
591
592 type NlAttr struct {
593 Len uint16
594 Type uint16
595 }
596
597 type RtAttr struct {
598 Len uint16
599 Type uint16
600 }
601
602 type IfInfomsg struct {
603 Family uint8
604 _ uint8
605 Type uint16
606 Index int32
607 Flags uint32
608 Change uint32
609 }
610
611 type IfAddrmsg struct {
612 Family uint8
613 Prefixlen uint8
614 Flags uint8
615 Scope uint8
616 Index uint32
617 }
618
619 type RtMsg struct {
620 Family uint8
621 Dst_len uint8
622 Src_len uint8
623 Tos uint8
624 Table uint8
625 Protocol uint8
626 Scope uint8
627 Type uint8
628 Flags uint32
629 }
630
631 type RtNexthop struct {
632 Len uint16
633 Flags uint8
634 Hops uint8
635 Ifindex int32
636 }
637
638 const (
639 SizeofSockFilter = 0x8
640 SizeofSockFprog = 0x10
641 )
642
643 type SockFilter struct {
644 Code uint16
645 Jt uint8
646 Jf uint8
647 K uint32
648 }
649
650 type SockFprog struct {
651 Len uint16
652 Filter *SockFilter
653 }
654
655 type InotifyEvent struct {
656 Wd int32
657 Mask uint32
658 Cookie uint32
659 Len uint32
660 }
661
662 const SizeofInotifyEvent = 0x10
663
664 type PtraceRegs struct {
665 Pc uint64
666 Ra uint64
667 Sp uint64
668 Gp uint64
669 Tp uint64
670 T0 uint64
671 T1 uint64
672 T2 uint64
673 S0 uint64
674 S1 uint64
675 A0 uint64
676 A1 uint64
677 A2 uint64
678 A3 uint64
679 A4 uint64
680 A5 uint64
681 A6 uint64
682 A7 uint64
683 S2 uint64
684 S3 uint64
685 S4 uint64
686 S5 uint64
687 S6 uint64
688 S7 uint64
689 S8 uint64
690 S9 uint64
691 S10 uint64
692 S11 uint64
693 T3 uint64
694 T4 uint64
695 T5 uint64
696 T6 uint64
697 }
698
699 type FdSet struct {
700 Bits [16]int64
701 }
702
703 type Sysinfo_t struct {
704 Uptime int64
705 Loads [3]uint64
706 Totalram uint64
707 Freeram uint64
708 Sharedram uint64
709 Bufferram uint64
710 Totalswap uint64
711 Freeswap uint64
712 Procs uint16
713 Pad uint16
714 Totalhigh uint64
715 Freehigh uint64
716 Unit uint32
717 _ [0]uint8
718 _ [4]byte
719 }
720
721 type Utsname struct {
722 Sysname [65]byte
723 Nodename [65]byte
724 Release [65]byte
725 Version [65]byte
726 Machine [65]byte
727 Domainname [65]byte
728 }
729
730 type Ustat_t struct {
731 Tfree int32
732 Tinode uint64
733 Fname [6]uint8
734 Fpack [6]uint8
735 _ [4]byte
736 }
737
738 type EpollEvent struct {
739 Events uint32
740 Fd int32
741 Pad int32
742 }
743
744 const (
745 AT_EMPTY_PATH = 0x1000
746 AT_FDCWD = -0x64
747 AT_NO_AUTOMOUNT = 0x800
748 AT_REMOVEDIR = 0x200
749
750 AT_STATX_SYNC_AS_STAT = 0x0
751 AT_STATX_FORCE_SYNC = 0x2000
752 AT_STATX_DONT_SYNC = 0x4000
753
754 AT_SYMLINK_FOLLOW = 0x400
755 AT_SYMLINK_NOFOLLOW = 0x100
756
757 AT_EACCESS = 0x200
758 )
759
760 type PollFd struct {
761 Fd int32
762 Events int16
763 Revents int16
764 }
765
766 const (
767 POLLIN = 0x1
768 POLLPRI = 0x2
769 POLLOUT = 0x4
770 POLLRDHUP = 0x2000
771 POLLERR = 0x8
772 POLLHUP = 0x10
773 POLLNVAL = 0x20
774 )
775
776 type Sigset_t struct {
777 Val [16]uint64
778 }
779
780 type SignalfdSiginfo struct {
781 Signo uint32
782 Errno int32
783 Code int32
784 Pid uint32
785 Uid uint32
786 Fd int32
787 Tid uint32
788 Band uint32
789 Overrun uint32
790 Trapno uint32
791 Status int32
792 Int int32
793 Ptr uint64
794 Utime uint64
795 Stime uint64
796 Addr uint64
797 _ [48]uint8
798 }
799
800 const RNDGETENTCNT = 0x80045200
801
802 const PERF_IOC_FLAG_GROUP = 0x1
803
804 type Termios struct {
805 Iflag uint32
806 Oflag uint32
807 Cflag uint32
808 Lflag uint32
809 Line uint8
810 Cc [19]uint8
811 Ispeed uint32
812 Ospeed uint32
813 }
814
815 type Winsize struct {
816 Row uint16
817 Col uint16
818 Xpixel uint16
819 Ypixel uint16
820 }
821
822 type Taskstats struct {
823 Version uint16
824 Ac_exitcode uint32
825 Ac_flag uint8
826 Ac_nice uint8
827 Cpu_count uint64
828 Cpu_delay_total uint64
829 Blkio_count uint64
830 Blkio_delay_total uint64
831 Swapin_count uint64
832 Swapin_delay_total uint64
833 Cpu_run_real_total uint64
834 Cpu_run_virtual_total uint64
835 Ac_comm [32]uint8
836 Ac_sched uint8
837 Ac_pad [3]uint8
838 _ [4]byte
839 Ac_uid uint32
840 Ac_gid uint32
841 Ac_pid uint32
842 Ac_ppid uint32
843 Ac_btime uint32
844 Ac_etime uint64
845 Ac_utime uint64
846 Ac_stime uint64
847 Ac_minflt uint64
848 Ac_majflt uint64
849 Coremem uint64
850 Virtmem uint64
851 Hiwater_rss uint64
852 Hiwater_vm uint64
853 Read_char uint64
854 Write_char uint64
855 Read_syscalls uint64
856 Write_syscalls uint64
857 Read_bytes uint64
858 Write_bytes uint64
859 Cancelled_write_bytes uint64
860 Nvcsw uint64
861 Nivcsw uint64
862 Ac_utimescaled uint64
863 Ac_stimescaled uint64
864 Cpu_scaled_run_real_total uint64
865 Freepages_count uint64
866 Freepages_delay_total uint64
867 Thrashing_count uint64
868 Thrashing_delay_total uint64
869 }
870
871 const (
872 TASKSTATS_CMD_UNSPEC = 0x0
873 TASKSTATS_CMD_GET = 0x1
874 TASKSTATS_CMD_NEW = 0x2
875 TASKSTATS_TYPE_UNSPEC = 0x0
876 TASKSTATS_TYPE_PID = 0x1
877 TASKSTATS_TYPE_TGID = 0x2
878 TASKSTATS_TYPE_STATS = 0x3
879 TASKSTATS_TYPE_AGGR_PID = 0x4
880 TASKSTATS_TYPE_AGGR_TGID = 0x5
881 TASKSTATS_TYPE_NULL = 0x6
882 TASKSTATS_CMD_ATTR_UNSPEC = 0x0
883 TASKSTATS_CMD_ATTR_PID = 0x1
884 TASKSTATS_CMD_ATTR_TGID = 0x2
885 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
886 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
887 )
888
889 type CGroupStats struct {
890 Sleeping uint64
891 Running uint64
892 Stopped uint64
893 Uninterruptible uint64
894 Io_wait uint64
895 }
896
897 const (
898 CGROUPSTATS_CMD_UNSPEC = 0x3
899 CGROUPSTATS_CMD_GET = 0x4
900 CGROUPSTATS_CMD_NEW = 0x5
901 CGROUPSTATS_TYPE_UNSPEC = 0x0
902 CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
903 CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
904 CGROUPSTATS_CMD_ATTR_FD = 0x1
905 )
906
907 type Genlmsghdr struct {
908 Cmd uint8
909 Version uint8
910 Reserved uint16
911 }
912
913 const (
914 CTRL_CMD_UNSPEC = 0x0
915 CTRL_CMD_NEWFAMILY = 0x1
916 CTRL_CMD_DELFAMILY = 0x2
917 CTRL_CMD_GETFAMILY = 0x3
918 CTRL_CMD_NEWOPS = 0x4
919 CTRL_CMD_DELOPS = 0x5
920 CTRL_CMD_GETOPS = 0x6
921 CTRL_CMD_NEWMCAST_GRP = 0x7
922 CTRL_CMD_DELMCAST_GRP = 0x8
923 CTRL_CMD_GETMCAST_GRP = 0x9
924 CTRL_ATTR_UNSPEC = 0x0
925 CTRL_ATTR_FAMILY_ID = 0x1
926 CTRL_ATTR_FAMILY_NAME = 0x2
927 CTRL_ATTR_VERSION = 0x3
928 CTRL_ATTR_HDRSIZE = 0x4
929 CTRL_ATTR_MAXATTR = 0x5
930 CTRL_ATTR_OPS = 0x6
931 CTRL_ATTR_MCAST_GROUPS = 0x7
932 CTRL_ATTR_OP_UNSPEC = 0x0
933 CTRL_ATTR_OP_ID = 0x1
934 CTRL_ATTR_OP_FLAGS = 0x2
935 CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
936 CTRL_ATTR_MCAST_GRP_NAME = 0x1
937 CTRL_ATTR_MCAST_GRP_ID = 0x2
938 )
939
940 type cpuMask uint64
941
942 const (
943 _CPU_SETSIZE = 0x400
944 _NCPUBITS = 0x40
945 )
946
947 const (
948 BDADDR_BREDR = 0x0
949 BDADDR_LE_PUBLIC = 0x1
950 BDADDR_LE_RANDOM = 0x2
951 )
952
953 type PerfEventAttr struct {
954 Type uint32
955 Size uint32
956 Config uint64
957 Sample uint64
958 Sample_type uint64
959 Read_format uint64
960 Bits uint64
961 Wakeup uint32
962 Bp_type uint32
963 Ext1 uint64
964 Ext2 uint64
965 Branch_sample_type uint64
966 Sample_regs_user uint64
967 Sample_stack_user uint32
968 Clockid int32
969 Sample_regs_intr uint64
970 Aux_watermark uint32
971 _ uint32
972 }
973
974 type PerfEventMmapPage struct {
975 Version uint32
976 Compat_version uint32
977 Lock uint32
978 Index uint32
979 Offset int64
980 Time_enabled uint64
981 Time_running uint64
982 Capabilities uint64
983 Pmc_width uint16
984 Time_shift uint16
985 Time_mult uint32
986 Time_offset uint64
987 Time_zero uint64
988 Size uint32
989 _ [948]uint8
990 Data_head uint64
991 Data_tail uint64
992 Data_offset uint64
993 Data_size uint64
994 Aux_head uint64
995 Aux_tail uint64
996 Aux_offset uint64
997 Aux_size uint64
998 }
999
1000 const (
1001 PerfBitDisabled uint64 = CBitFieldMaskBit0
1002 PerfBitInherit = CBitFieldMaskBit1
1003 PerfBitPinned = CBitFieldMaskBit2
1004 PerfBitExclusive = CBitFieldMaskBit3
1005 PerfBitExcludeUser = CBitFieldMaskBit4
1006 PerfBitExcludeKernel = CBitFieldMaskBit5
1007 PerfBitExcludeHv = CBitFieldMaskBit6
1008 PerfBitExcludeIdle = CBitFieldMaskBit7
1009 PerfBitMmap = CBitFieldMaskBit8
1010 PerfBitComm = CBitFieldMaskBit9
1011 PerfBitFreq = CBitFieldMaskBit10
1012 PerfBitInheritStat = CBitFieldMaskBit11
1013 PerfBitEnableOnExec = CBitFieldMaskBit12
1014 PerfBitTask = CBitFieldMaskBit13
1015 PerfBitWatermark = CBitFieldMaskBit14
1016 PerfBitPreciseIPBit1 = CBitFieldMaskBit15
1017 PerfBitPreciseIPBit2 = CBitFieldMaskBit16
1018 PerfBitMmapData = CBitFieldMaskBit17
1019 PerfBitSampleIDAll = CBitFieldMaskBit18
1020 PerfBitExcludeHost = CBitFieldMaskBit19
1021 PerfBitExcludeGuest = CBitFieldMaskBit20
1022 PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
1023 PerfBitExcludeCallchainUser = CBitFieldMaskBit22
1024 PerfBitMmap2 = CBitFieldMaskBit23
1025 PerfBitCommExec = CBitFieldMaskBit24
1026 PerfBitUseClockID = CBitFieldMaskBit25
1027 PerfBitContextSwitch = CBitFieldMaskBit26
1028 )
1029
1030 const (
1031 PERF_TYPE_HARDWARE = 0x0
1032 PERF_TYPE_SOFTWARE = 0x1
1033 PERF_TYPE_TRACEPOINT = 0x2
1034 PERF_TYPE_HW_CACHE = 0x3
1035 PERF_TYPE_RAW = 0x4
1036 PERF_TYPE_BREAKPOINT = 0x5
1037
1038 PERF_COUNT_HW_CPU_CYCLES = 0x0
1039 PERF_COUNT_HW_INSTRUCTIONS = 0x1
1040 PERF_COUNT_HW_CACHE_REFERENCES = 0x2
1041 PERF_COUNT_HW_CACHE_MISSES = 0x3
1042 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
1043 PERF_COUNT_HW_BRANCH_MISSES = 0x5
1044 PERF_COUNT_HW_BUS_CYCLES = 0x6
1045 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
1046 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
1047 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
1048
1049 PERF_COUNT_HW_CACHE_L1D = 0x0
1050 PERF_COUNT_HW_CACHE_L1I = 0x1
1051 PERF_COUNT_HW_CACHE_LL = 0x2
1052 PERF_COUNT_HW_CACHE_DTLB = 0x3
1053 PERF_COUNT_HW_CACHE_ITLB = 0x4
1054 PERF_COUNT_HW_CACHE_BPU = 0x5
1055 PERF_COUNT_HW_CACHE_NODE = 0x6
1056
1057 PERF_COUNT_HW_CACHE_OP_READ = 0x0
1058 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
1059 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
1060
1061 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
1062 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
1063
1064 PERF_COUNT_SW_CPU_CLOCK = 0x0
1065 PERF_COUNT_SW_TASK_CLOCK = 0x1
1066 PERF_COUNT_SW_PAGE_FAULTS = 0x2
1067 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
1068 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
1069 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
1070 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
1071 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
1072 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
1073 PERF_COUNT_SW_DUMMY = 0x9
1074
1075 PERF_SAMPLE_IP = 0x1
1076 PERF_SAMPLE_TID = 0x2
1077 PERF_SAMPLE_TIME = 0x4
1078 PERF_SAMPLE_ADDR = 0x8
1079 PERF_SAMPLE_READ = 0x10
1080 PERF_SAMPLE_CALLCHAIN = 0x20
1081 PERF_SAMPLE_ID = 0x40
1082 PERF_SAMPLE_CPU = 0x80
1083 PERF_SAMPLE_PERIOD = 0x100
1084 PERF_SAMPLE_STREAM_ID = 0x200
1085 PERF_SAMPLE_RAW = 0x400
1086 PERF_SAMPLE_BRANCH_STACK = 0x800
1087
1088 PERF_SAMPLE_BRANCH_USER = 0x1
1089 PERF_SAMPLE_BRANCH_KERNEL = 0x2
1090 PERF_SAMPLE_BRANCH_HV = 0x4
1091 PERF_SAMPLE_BRANCH_ANY = 0x8
1092 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
1093 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
1094 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
1095
1096 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
1097 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
1098 PERF_FORMAT_ID = 0x4
1099 PERF_FORMAT_GROUP = 0x8
1100
1101 PERF_RECORD_MMAP = 0x1
1102 PERF_RECORD_LOST = 0x2
1103 PERF_RECORD_COMM = 0x3
1104 PERF_RECORD_EXIT = 0x4
1105 PERF_RECORD_THROTTLE = 0x5
1106 PERF_RECORD_UNTHROTTLE = 0x6
1107 PERF_RECORD_FORK = 0x7
1108 PERF_RECORD_READ = 0x8
1109 PERF_RECORD_SAMPLE = 0x9
1110
1111 PERF_CONTEXT_HV = -0x20
1112 PERF_CONTEXT_KERNEL = -0x80
1113 PERF_CONTEXT_USER = -0x200
1114
1115 PERF_CONTEXT_GUEST = -0x800
1116 PERF_CONTEXT_GUEST_KERNEL = -0x880
1117 PERF_CONTEXT_GUEST_USER = -0xa00
1118
1119 PERF_FLAG_FD_NO_GROUP = 0x1
1120 PERF_FLAG_FD_OUTPUT = 0x2
1121 PERF_FLAG_PID_CGROUP = 0x4
1122 )
1123
1124 const (
1125 CBitFieldMaskBit0 = 0x1
1126 CBitFieldMaskBit1 = 0x2
1127 CBitFieldMaskBit2 = 0x4
1128 CBitFieldMaskBit3 = 0x8
1129 CBitFieldMaskBit4 = 0x10
1130 CBitFieldMaskBit5 = 0x20
1131 CBitFieldMaskBit6 = 0x40
1132 CBitFieldMaskBit7 = 0x80
1133 CBitFieldMaskBit8 = 0x100
1134 CBitFieldMaskBit9 = 0x200
1135 CBitFieldMaskBit10 = 0x400
1136 CBitFieldMaskBit11 = 0x800
1137 CBitFieldMaskBit12 = 0x1000
1138 CBitFieldMaskBit13 = 0x2000
1139 CBitFieldMaskBit14 = 0x4000
1140 CBitFieldMaskBit15 = 0x8000
1141 CBitFieldMaskBit16 = 0x10000
1142 CBitFieldMaskBit17 = 0x20000
1143 CBitFieldMaskBit18 = 0x40000
1144 CBitFieldMaskBit19 = 0x80000
1145 CBitFieldMaskBit20 = 0x100000
1146 CBitFieldMaskBit21 = 0x200000
1147 CBitFieldMaskBit22 = 0x400000
1148 CBitFieldMaskBit23 = 0x800000
1149 CBitFieldMaskBit24 = 0x1000000
1150 CBitFieldMaskBit25 = 0x2000000
1151 CBitFieldMaskBit26 = 0x4000000
1152 CBitFieldMaskBit27 = 0x8000000
1153 CBitFieldMaskBit28 = 0x10000000
1154 CBitFieldMaskBit29 = 0x20000000
1155 CBitFieldMaskBit30 = 0x40000000
1156 CBitFieldMaskBit31 = 0x80000000
1157 CBitFieldMaskBit32 = 0x100000000
1158 CBitFieldMaskBit33 = 0x200000000
1159 CBitFieldMaskBit34 = 0x400000000
1160 CBitFieldMaskBit35 = 0x800000000
1161 CBitFieldMaskBit36 = 0x1000000000
1162 CBitFieldMaskBit37 = 0x2000000000
1163 CBitFieldMaskBit38 = 0x4000000000
1164 CBitFieldMaskBit39 = 0x8000000000
1165 CBitFieldMaskBit40 = 0x10000000000
1166 CBitFieldMaskBit41 = 0x20000000000
1167 CBitFieldMaskBit42 = 0x40000000000
1168 CBitFieldMaskBit43 = 0x80000000000
1169 CBitFieldMaskBit44 = 0x100000000000
1170 CBitFieldMaskBit45 = 0x200000000000
1171 CBitFieldMaskBit46 = 0x400000000000
1172 CBitFieldMaskBit47 = 0x800000000000
1173 CBitFieldMaskBit48 = 0x1000000000000
1174 CBitFieldMaskBit49 = 0x2000000000000
1175 CBitFieldMaskBit50 = 0x4000000000000
1176 CBitFieldMaskBit51 = 0x8000000000000
1177 CBitFieldMaskBit52 = 0x10000000000000
1178 CBitFieldMaskBit53 = 0x20000000000000
1179 CBitFieldMaskBit54 = 0x40000000000000
1180 CBitFieldMaskBit55 = 0x80000000000000
1181 CBitFieldMaskBit56 = 0x100000000000000
1182 CBitFieldMaskBit57 = 0x200000000000000
1183 CBitFieldMaskBit58 = 0x400000000000000
1184 CBitFieldMaskBit59 = 0x800000000000000
1185 CBitFieldMaskBit60 = 0x1000000000000000
1186 CBitFieldMaskBit61 = 0x2000000000000000
1187 CBitFieldMaskBit62 = 0x4000000000000000
1188 CBitFieldMaskBit63 = 0x8000000000000000
1189 )
1190
1191 type SockaddrStorage struct {
1192 Family uint16
1193 _ [118]uint8
1194 _ uint64
1195 }
1196
1197 type TCPMD5Sig struct {
1198 Addr SockaddrStorage
1199 Flags uint8
1200 Prefixlen uint8
1201 Keylen uint16
1202 _ uint32
1203 Key [80]uint8
1204 }
1205
1206 type HDDriveCmdHdr struct {
1207 Command uint8
1208 Number uint8
1209 Feature uint8
1210 Count uint8
1211 }
1212
1213 type HDGeometry struct {
1214 Heads uint8
1215 Sectors uint8
1216 Cylinders uint16
1217 Start uint64
1218 }
1219
1220 type HDDriveID struct {
1221 Config uint16
1222 Cyls uint16
1223 Reserved2 uint16
1224 Heads uint16
1225 Track_bytes uint16
1226 Sector_bytes uint16
1227 Sectors uint16
1228 Vendor0 uint16
1229 Vendor1 uint16
1230 Vendor2 uint16
1231 Serial_no [20]uint8
1232 Buf_type uint16
1233 Buf_size uint16
1234 Ecc_bytes uint16
1235 Fw_rev [8]uint8
1236 Model [40]uint8
1237 Max_multsect uint8
1238 Vendor3 uint8
1239 Dword_io uint16
1240 Vendor4 uint8
1241 Capability uint8
1242 Reserved50 uint16
1243 Vendor5 uint8
1244 TPIO uint8
1245 Vendor6 uint8
1246 TDMA uint8
1247 Field_valid uint16
1248 Cur_cyls uint16
1249 Cur_heads uint16
1250 Cur_sectors uint16
1251 Cur_capacity0 uint16
1252 Cur_capacity1 uint16
1253 Multsect uint8
1254 Multsect_valid uint8
1255 Lba_capacity uint32
1256 Dma_1word uint16
1257 Dma_mword uint16
1258 Eide_pio_modes uint16
1259 Eide_dma_min uint16
1260 Eide_dma_time uint16
1261 Eide_pio uint16
1262 Eide_pio_iordy uint16
1263 Words69_70 [2]uint16
1264 Words71_74 [4]uint16
1265 Queue_depth uint16
1266 Words76_79 [4]uint16
1267 Major_rev_num uint16
1268 Minor_rev_num uint16
1269 Command_set_1 uint16
1270 Command_set_2 uint16
1271 Cfsse uint16
1272 Cfs_enable_1 uint16
1273 Cfs_enable_2 uint16
1274 Csf_default uint16
1275 Dma_ultra uint16
1276 Trseuc uint16
1277 TrsEuc uint16
1278 CurAPMvalues uint16
1279 Mprc uint16
1280 Hw_config uint16
1281 Acoustic uint16
1282 Msrqs uint16
1283 Sxfert uint16
1284 Sal uint16
1285 Spg uint32
1286 Lba_capacity_2 uint64
1287 Words104_125 [22]uint16
1288 Last_lun uint16
1289 Word127 uint16
1290 Dlf uint16
1291 Csfo uint16
1292 Words130_155 [26]uint16
1293 Word156 uint16
1294 Words157_159 [3]uint16
1295 Cfa_power uint16
1296 Words161_175 [15]uint16
1297 Words176_205 [30]uint16
1298 Words206_254 [49]uint16
1299 Integrity_word uint16
1300 }
1301
1302 type Statfs_t struct {
1303 Type int64
1304 Bsize int64
1305 Blocks uint64
1306 Bfree uint64
1307 Bavail uint64
1308 Files uint64
1309 Ffree uint64
1310 Fsid Fsid
1311 Namelen int64
1312 Frsize int64
1313 Flags int64
1314 Spare [4]int64
1315 }
1316
1317 const (
1318 ST_MANDLOCK = 0x40
1319 ST_NOATIME = 0x400
1320 ST_NODEV = 0x4
1321 ST_NODIRATIME = 0x800
1322 ST_NOEXEC = 0x8
1323 ST_NOSUID = 0x2
1324 ST_RDONLY = 0x1
1325 ST_RELATIME = 0x1000
1326 ST_SYNCHRONOUS = 0x10
1327 )
1328
1329 type TpacketHdr struct {
1330 Status uint64
1331 Len uint32
1332 Snaplen uint32
1333 Mac uint16
1334 Net uint16
1335 Sec uint32
1336 Usec uint32
1337 _ [4]byte
1338 }
1339
1340 type Tpacket2Hdr struct {
1341 Status uint32
1342 Len uint32
1343 Snaplen uint32
1344 Mac uint16
1345 Net uint16
1346 Sec uint32
1347 Nsec uint32
1348 Vlan_tci uint16
1349 Vlan_tpid uint16
1350 _ [4]uint8
1351 }
1352
1353 type Tpacket3Hdr struct {
1354 Next_offset uint32
1355 Sec uint32
1356 Nsec uint32
1357 Snaplen uint32
1358 Len uint32
1359 Status uint32
1360 Mac uint16
1361 Net uint16
1362 Hv1 TpacketHdrVariant1
1363 _ [8]uint8
1364 }
1365
1366 type TpacketHdrVariant1 struct {
1367 Rxhash uint32
1368 Vlan_tci uint32
1369 Vlan_tpid uint16
1370 _ uint16
1371 }
1372
1373 type TpacketBlockDesc struct {
1374 Version uint32
1375 To_priv uint32
1376 Hdr [40]byte
1377 }
1378
1379 type TpacketReq struct {
1380 Block_size uint32
1381 Block_nr uint32
1382 Frame_size uint32
1383 Frame_nr uint32
1384 }
1385
1386 type TpacketReq3 struct {
1387 Block_size uint32
1388 Block_nr uint32
1389 Frame_size uint32
1390 Frame_nr uint32
1391 Retire_blk_tov uint32
1392 Sizeof_priv uint32
1393 Feature_req_word uint32
1394 }
1395
1396 type TpacketStats struct {
1397 Packets uint32
1398 Drops uint32
1399 }
1400
1401 type TpacketStatsV3 struct {
1402 Packets uint32
1403 Drops uint32
1404 Freeze_q_cnt uint32
1405 }
1406
1407 type TpacketAuxdata struct {
1408 Status uint32
1409 Len uint32
1410 Snaplen uint32
1411 Mac uint16
1412 Net uint16
1413 Vlan_tci uint16
1414 Vlan_tpid uint16
1415 }
1416
1417 const (
1418 TPACKET_V1 = 0x0
1419 TPACKET_V2 = 0x1
1420 TPACKET_V3 = 0x2
1421 )
1422
1423 const (
1424 SizeofTpacketHdr = 0x20
1425 SizeofTpacket2Hdr = 0x20
1426 SizeofTpacket3Hdr = 0x30
1427 )
1428
1429 const (
1430 NF_INET_PRE_ROUTING = 0x0
1431 NF_INET_LOCAL_IN = 0x1
1432 NF_INET_FORWARD = 0x2
1433 NF_INET_LOCAL_OUT = 0x3
1434 NF_INET_POST_ROUTING = 0x4
1435 NF_INET_NUMHOOKS = 0x5
1436 )
1437
1438 const (
1439 NF_NETDEV_INGRESS = 0x0
1440 NF_NETDEV_NUMHOOKS = 0x1
1441 )
1442
1443 const (
1444 NFPROTO_UNSPEC = 0x0
1445 NFPROTO_INET = 0x1
1446 NFPROTO_IPV4 = 0x2
1447 NFPROTO_ARP = 0x3
1448 NFPROTO_NETDEV = 0x5
1449 NFPROTO_BRIDGE = 0x7
1450 NFPROTO_IPV6 = 0xa
1451 NFPROTO_DECNET = 0xc
1452 NFPROTO_NUMPROTO = 0xd
1453 )
1454
1455 type Nfgenmsg struct {
1456 Nfgen_family uint8
1457 Version uint8
1458 Res_id uint16
1459 }
1460
1461 const (
1462 NFNL_BATCH_UNSPEC = 0x0
1463 NFNL_BATCH_GENID = 0x1
1464 )
1465
1466 const (
1467 NFT_REG_VERDICT = 0x0
1468 NFT_REG_1 = 0x1
1469 NFT_REG_2 = 0x2
1470 NFT_REG_3 = 0x3
1471 NFT_REG_4 = 0x4
1472 NFT_REG32_00 = 0x8
1473 NFT_REG32_01 = 0x9
1474 NFT_REG32_02 = 0xa
1475 NFT_REG32_03 = 0xb
1476 NFT_REG32_04 = 0xc
1477 NFT_REG32_05 = 0xd
1478 NFT_REG32_06 = 0xe
1479 NFT_REG32_07 = 0xf
1480 NFT_REG32_08 = 0x10
1481 NFT_REG32_09 = 0x11
1482 NFT_REG32_10 = 0x12
1483 NFT_REG32_11 = 0x13
1484 NFT_REG32_12 = 0x14
1485 NFT_REG32_13 = 0x15
1486 NFT_REG32_14 = 0x16
1487 NFT_REG32_15 = 0x17
1488 NFT_CONTINUE = -0x1
1489 NFT_BREAK = -0x2
1490 NFT_JUMP = -0x3
1491 NFT_GOTO = -0x4
1492 NFT_RETURN = -0x5
1493 NFT_MSG_NEWTABLE = 0x0
1494 NFT_MSG_GETTABLE = 0x1
1495 NFT_MSG_DELTABLE = 0x2
1496 NFT_MSG_NEWCHAIN = 0x3
1497 NFT_MSG_GETCHAIN = 0x4
1498 NFT_MSG_DELCHAIN = 0x5
1499 NFT_MSG_NEWRULE = 0x6
1500 NFT_MSG_GETRULE = 0x7
1501 NFT_MSG_DELRULE = 0x8
1502 NFT_MSG_NEWSET = 0x9
1503 NFT_MSG_GETSET = 0xa
1504 NFT_MSG_DELSET = 0xb
1505 NFT_MSG_NEWSETELEM = 0xc
1506 NFT_MSG_GETSETELEM = 0xd
1507 NFT_MSG_DELSETELEM = 0xe
1508 NFT_MSG_NEWGEN = 0xf
1509 NFT_MSG_GETGEN = 0x10
1510 NFT_MSG_TRACE = 0x11
1511 NFT_MSG_NEWOBJ = 0x12
1512 NFT_MSG_GETOBJ = 0x13
1513 NFT_MSG_DELOBJ = 0x14
1514 NFT_MSG_GETOBJ_RESET = 0x15
1515 NFT_MSG_MAX = 0x19
1516 NFTA_LIST_UNPEC = 0x0
1517 NFTA_LIST_ELEM = 0x1
1518 NFTA_HOOK_UNSPEC = 0x0
1519 NFTA_HOOK_HOOKNUM = 0x1
1520 NFTA_HOOK_PRIORITY = 0x2
1521 NFTA_HOOK_DEV = 0x3
1522 NFT_TABLE_F_DORMANT = 0x1
1523 NFTA_TABLE_UNSPEC = 0x0
1524 NFTA_TABLE_NAME = 0x1
1525 NFTA_TABLE_FLAGS = 0x2
1526 NFTA_TABLE_USE = 0x3
1527 NFTA_CHAIN_UNSPEC = 0x0
1528 NFTA_CHAIN_TABLE = 0x1
1529 NFTA_CHAIN_HANDLE = 0x2
1530 NFTA_CHAIN_NAME = 0x3
1531 NFTA_CHAIN_HOOK = 0x4
1532 NFTA_CHAIN_POLICY = 0x5
1533 NFTA_CHAIN_USE = 0x6
1534 NFTA_CHAIN_TYPE = 0x7
1535 NFTA_CHAIN_COUNTERS = 0x8
1536 NFTA_CHAIN_PAD = 0x9
1537 NFTA_RULE_UNSPEC = 0x0
1538 NFTA_RULE_TABLE = 0x1
1539 NFTA_RULE_CHAIN = 0x2
1540 NFTA_RULE_HANDLE = 0x3
1541 NFTA_RULE_EXPRESSIONS = 0x4
1542 NFTA_RULE_COMPAT = 0x5
1543 NFTA_RULE_POSITION = 0x6
1544 NFTA_RULE_USERDATA = 0x7
1545 NFTA_RULE_PAD = 0x8
1546 NFTA_RULE_ID = 0x9
1547 NFT_RULE_COMPAT_F_INV = 0x2
1548 NFT_RULE_COMPAT_F_MASK = 0x2
1549 NFTA_RULE_COMPAT_UNSPEC = 0x0
1550 NFTA_RULE_COMPAT_PROTO = 0x1
1551 NFTA_RULE_COMPAT_FLAGS = 0x2
1552 NFT_SET_ANONYMOUS = 0x1
1553 NFT_SET_CONSTANT = 0x2
1554 NFT_SET_INTERVAL = 0x4
1555 NFT_SET_MAP = 0x8
1556 NFT_SET_TIMEOUT = 0x10
1557 NFT_SET_EVAL = 0x20
1558 NFT_SET_OBJECT = 0x40
1559 NFT_SET_POL_PERFORMANCE = 0x0
1560 NFT_SET_POL_MEMORY = 0x1
1561 NFTA_SET_DESC_UNSPEC = 0x0
1562 NFTA_SET_DESC_SIZE = 0x1
1563 NFTA_SET_UNSPEC = 0x0
1564 NFTA_SET_TABLE = 0x1
1565 NFTA_SET_NAME = 0x2
1566 NFTA_SET_FLAGS = 0x3
1567 NFTA_SET_KEY_TYPE = 0x4
1568 NFTA_SET_KEY_LEN = 0x5
1569 NFTA_SET_DATA_TYPE = 0x6
1570 NFTA_SET_DATA_LEN = 0x7
1571 NFTA_SET_POLICY = 0x8
1572 NFTA_SET_DESC = 0x9
1573 NFTA_SET_ID = 0xa
1574 NFTA_SET_TIMEOUT = 0xb
1575 NFTA_SET_GC_INTERVAL = 0xc
1576 NFTA_SET_USERDATA = 0xd
1577 NFTA_SET_PAD = 0xe
1578 NFTA_SET_OBJ_TYPE = 0xf
1579 NFT_SET_ELEM_INTERVAL_END = 0x1
1580 NFTA_SET_ELEM_UNSPEC = 0x0
1581 NFTA_SET_ELEM_KEY = 0x1
1582 NFTA_SET_ELEM_DATA = 0x2
1583 NFTA_SET_ELEM_FLAGS = 0x3
1584 NFTA_SET_ELEM_TIMEOUT = 0x4
1585 NFTA_SET_ELEM_EXPIRATION = 0x5
1586 NFTA_SET_ELEM_USERDATA = 0x6
1587 NFTA_SET_ELEM_EXPR = 0x7
1588 NFTA_SET_ELEM_PAD = 0x8
1589 NFTA_SET_ELEM_OBJREF = 0x9
1590 NFTA_SET_ELEM_LIST_UNSPEC = 0x0
1591 NFTA_SET_ELEM_LIST_TABLE = 0x1
1592 NFTA_SET_ELEM_LIST_SET = 0x2
1593 NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
1594 NFTA_SET_ELEM_LIST_SET_ID = 0x4
1595 NFT_DATA_VALUE = 0x0
1596 NFT_DATA_VERDICT = 0xffffff00
1597 NFTA_DATA_UNSPEC = 0x0
1598 NFTA_DATA_VALUE = 0x1
1599 NFTA_DATA_VERDICT = 0x2
1600 NFTA_VERDICT_UNSPEC = 0x0
1601 NFTA_VERDICT_CODE = 0x1
1602 NFTA_VERDICT_CHAIN = 0x2
1603 NFTA_EXPR_UNSPEC = 0x0
1604 NFTA_EXPR_NAME = 0x1
1605 NFTA_EXPR_DATA = 0x2
1606 NFTA_IMMEDIATE_UNSPEC = 0x0
1607 NFTA_IMMEDIATE_DREG = 0x1
1608 NFTA_IMMEDIATE_DATA = 0x2
1609 NFTA_BITWISE_UNSPEC = 0x0
1610 NFTA_BITWISE_SREG = 0x1
1611 NFTA_BITWISE_DREG = 0x2
1612 NFTA_BITWISE_LEN = 0x3
1613 NFTA_BITWISE_MASK = 0x4
1614 NFTA_BITWISE_XOR = 0x5
1615 NFT_BYTEORDER_NTOH = 0x0
1616 NFT_BYTEORDER_HTON = 0x1
1617 NFTA_BYTEORDER_UNSPEC = 0x0
1618 NFTA_BYTEORDER_SREG = 0x1
1619 NFTA_BYTEORDER_DREG = 0x2
1620 NFTA_BYTEORDER_OP = 0x3
1621 NFTA_BYTEORDER_LEN = 0x4
1622 NFTA_BYTEORDER_SIZE = 0x5
1623 NFT_CMP_EQ = 0x0
1624 NFT_CMP_NEQ = 0x1
1625 NFT_CMP_LT = 0x2
1626 NFT_CMP_LTE = 0x3
1627 NFT_CMP_GT = 0x4
1628 NFT_CMP_GTE = 0x5
1629 NFTA_CMP_UNSPEC = 0x0
1630 NFTA_CMP_SREG = 0x1
1631 NFTA_CMP_OP = 0x2
1632 NFTA_CMP_DATA = 0x3
1633 NFT_RANGE_EQ = 0x0
1634 NFT_RANGE_NEQ = 0x1
1635 NFTA_RANGE_UNSPEC = 0x0
1636 NFTA_RANGE_SREG = 0x1
1637 NFTA_RANGE_OP = 0x2
1638 NFTA_RANGE_FROM_DATA = 0x3
1639 NFTA_RANGE_TO_DATA = 0x4
1640 NFT_LOOKUP_F_INV = 0x1
1641 NFTA_LOOKUP_UNSPEC = 0x0
1642 NFTA_LOOKUP_SET = 0x1
1643 NFTA_LOOKUP_SREG = 0x2
1644 NFTA_LOOKUP_DREG = 0x3
1645 NFTA_LOOKUP_SET_ID = 0x4
1646 NFTA_LOOKUP_FLAGS = 0x5
1647 NFT_DYNSET_OP_ADD = 0x0
1648 NFT_DYNSET_OP_UPDATE = 0x1
1649 NFT_DYNSET_F_INV = 0x1
1650 NFTA_DYNSET_UNSPEC = 0x0
1651 NFTA_DYNSET_SET_NAME = 0x1
1652 NFTA_DYNSET_SET_ID = 0x2
1653 NFTA_DYNSET_OP = 0x3
1654 NFTA_DYNSET_SREG_KEY = 0x4
1655 NFTA_DYNSET_SREG_DATA = 0x5
1656 NFTA_DYNSET_TIMEOUT = 0x6
1657 NFTA_DYNSET_EXPR = 0x7
1658 NFTA_DYNSET_PAD = 0x8
1659 NFTA_DYNSET_FLAGS = 0x9
1660 NFT_PAYLOAD_LL_HEADER = 0x0
1661 NFT_PAYLOAD_NETWORK_HEADER = 0x1
1662 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
1663 NFT_PAYLOAD_CSUM_NONE = 0x0
1664 NFT_PAYLOAD_CSUM_INET = 0x1
1665 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
1666 NFTA_PAYLOAD_UNSPEC = 0x0
1667 NFTA_PAYLOAD_DREG = 0x1
1668 NFTA_PAYLOAD_BASE = 0x2
1669 NFTA_PAYLOAD_OFFSET = 0x3
1670 NFTA_PAYLOAD_LEN = 0x4
1671 NFTA_PAYLOAD_SREG = 0x5
1672 NFTA_PAYLOAD_CSUM_TYPE = 0x6
1673 NFTA_PAYLOAD_CSUM_OFFSET = 0x7
1674 NFTA_PAYLOAD_CSUM_FLAGS = 0x8
1675 NFT_EXTHDR_F_PRESENT = 0x1
1676 NFT_EXTHDR_OP_IPV6 = 0x0
1677 NFT_EXTHDR_OP_TCPOPT = 0x1
1678 NFTA_EXTHDR_UNSPEC = 0x0
1679 NFTA_EXTHDR_DREG = 0x1
1680 NFTA_EXTHDR_TYPE = 0x2
1681 NFTA_EXTHDR_OFFSET = 0x3
1682 NFTA_EXTHDR_LEN = 0x4
1683 NFTA_EXTHDR_FLAGS = 0x5
1684 NFTA_EXTHDR_OP = 0x6
1685 NFTA_EXTHDR_SREG = 0x7
1686 NFT_META_LEN = 0x0
1687 NFT_META_PROTOCOL = 0x1
1688 NFT_META_PRIORITY = 0x2
1689 NFT_META_MARK = 0x3
1690 NFT_META_IIF = 0x4
1691 NFT_META_OIF = 0x5
1692 NFT_META_IIFNAME = 0x6
1693 NFT_META_OIFNAME = 0x7
1694 NFT_META_IIFTYPE = 0x8
1695 NFT_META_OIFTYPE = 0x9
1696 NFT_META_SKUID = 0xa
1697 NFT_META_SKGID = 0xb
1698 NFT_META_NFTRACE = 0xc
1699 NFT_META_RTCLASSID = 0xd
1700 NFT_META_SECMARK = 0xe
1701 NFT_META_NFPROTO = 0xf
1702 NFT_META_L4PROTO = 0x10
1703 NFT_META_BRI_IIFNAME = 0x11
1704 NFT_META_BRI_OIFNAME = 0x12
1705 NFT_META_PKTTYPE = 0x13
1706 NFT_META_CPU = 0x14
1707 NFT_META_IIFGROUP = 0x15
1708 NFT_META_OIFGROUP = 0x16
1709 NFT_META_CGROUP = 0x17
1710 NFT_META_PRANDOM = 0x18
1711 NFT_RT_CLASSID = 0x0
1712 NFT_RT_NEXTHOP4 = 0x1
1713 NFT_RT_NEXTHOP6 = 0x2
1714 NFT_RT_TCPMSS = 0x3
1715 NFT_HASH_JENKINS = 0x0
1716 NFT_HASH_SYM = 0x1
1717 NFTA_HASH_UNSPEC = 0x0
1718 NFTA_HASH_SREG = 0x1
1719 NFTA_HASH_DREG = 0x2
1720 NFTA_HASH_LEN = 0x3
1721 NFTA_HASH_MODULUS = 0x4
1722 NFTA_HASH_SEED = 0x5
1723 NFTA_HASH_OFFSET = 0x6
1724 NFTA_HASH_TYPE = 0x7
1725 NFTA_META_UNSPEC = 0x0
1726 NFTA_META_DREG = 0x1
1727 NFTA_META_KEY = 0x2
1728 NFTA_META_SREG = 0x3
1729 NFTA_RT_UNSPEC = 0x0
1730 NFTA_RT_DREG = 0x1
1731 NFTA_RT_KEY = 0x2
1732 NFT_CT_STATE = 0x0
1733 NFT_CT_DIRECTION = 0x1
1734 NFT_CT_STATUS = 0x2
1735 NFT_CT_MARK = 0x3
1736 NFT_CT_SECMARK = 0x4
1737 NFT_CT_EXPIRATION = 0x5
1738 NFT_CT_HELPER = 0x6
1739 NFT_CT_L3PROTOCOL = 0x7
1740 NFT_CT_SRC = 0x8
1741 NFT_CT_DST = 0x9
1742 NFT_CT_PROTOCOL = 0xa
1743 NFT_CT_PROTO_SRC = 0xb
1744 NFT_CT_PROTO_DST = 0xc
1745 NFT_CT_LABELS = 0xd
1746 NFT_CT_PKTS = 0xe
1747 NFT_CT_BYTES = 0xf
1748 NFT_CT_AVGPKT = 0x10
1749 NFT_CT_ZONE = 0x11
1750 NFT_CT_EVENTMASK = 0x12
1751 NFTA_CT_UNSPEC = 0x0
1752 NFTA_CT_DREG = 0x1
1753 NFTA_CT_KEY = 0x2
1754 NFTA_CT_DIRECTION = 0x3
1755 NFTA_CT_SREG = 0x4
1756 NFT_LIMIT_PKTS = 0x0
1757 NFT_LIMIT_PKT_BYTES = 0x1
1758 NFT_LIMIT_F_INV = 0x1
1759 NFTA_LIMIT_UNSPEC = 0x0
1760 NFTA_LIMIT_RATE = 0x1
1761 NFTA_LIMIT_UNIT = 0x2
1762 NFTA_LIMIT_BURST = 0x3
1763 NFTA_LIMIT_TYPE = 0x4
1764 NFTA_LIMIT_FLAGS = 0x5
1765 NFTA_LIMIT_PAD = 0x6
1766 NFTA_COUNTER_UNSPEC = 0x0
1767 NFTA_COUNTER_BYTES = 0x1
1768 NFTA_COUNTER_PACKETS = 0x2
1769 NFTA_COUNTER_PAD = 0x3
1770 NFTA_LOG_UNSPEC = 0x0
1771 NFTA_LOG_GROUP = 0x1
1772 NFTA_LOG_PREFIX = 0x2
1773 NFTA_LOG_SNAPLEN = 0x3
1774 NFTA_LOG_QTHRESHOLD = 0x4
1775 NFTA_LOG_LEVEL = 0x5
1776 NFTA_LOG_FLAGS = 0x6
1777 NFTA_QUEUE_UNSPEC = 0x0
1778 NFTA_QUEUE_NUM = 0x1
1779 NFTA_QUEUE_TOTAL = 0x2
1780 NFTA_QUEUE_FLAGS = 0x3
1781 NFTA_QUEUE_SREG_QNUM = 0x4
1782 NFT_QUOTA_F_INV = 0x1
1783 NFT_QUOTA_F_DEPLETED = 0x2
1784 NFTA_QUOTA_UNSPEC = 0x0
1785 NFTA_QUOTA_BYTES = 0x1
1786 NFTA_QUOTA_FLAGS = 0x2
1787 NFTA_QUOTA_PAD = 0x3
1788 NFTA_QUOTA_CONSUMED = 0x4
1789 NFT_REJECT_ICMP_UNREACH = 0x0
1790 NFT_REJECT_TCP_RST = 0x1
1791 NFT_REJECT_ICMPX_UNREACH = 0x2
1792 NFT_REJECT_ICMPX_NO_ROUTE = 0x0
1793 NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
1794 NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
1795 NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
1796 NFTA_REJECT_UNSPEC = 0x0
1797 NFTA_REJECT_TYPE = 0x1
1798 NFTA_REJECT_ICMP_CODE = 0x2
1799 NFT_NAT_SNAT = 0x0
1800 NFT_NAT_DNAT = 0x1
1801 NFTA_NAT_UNSPEC = 0x0
1802 NFTA_NAT_TYPE = 0x1
1803 NFTA_NAT_FAMILY = 0x2
1804 NFTA_NAT_REG_ADDR_MIN = 0x3
1805 NFTA_NAT_REG_ADDR_MAX = 0x4
1806 NFTA_NAT_REG_PROTO_MIN = 0x5
1807 NFTA_NAT_REG_PROTO_MAX = 0x6
1808 NFTA_NAT_FLAGS = 0x7
1809 NFTA_MASQ_UNSPEC = 0x0
1810 NFTA_MASQ_FLAGS = 0x1
1811 NFTA_MASQ_REG_PROTO_MIN = 0x2
1812 NFTA_MASQ_REG_PROTO_MAX = 0x3
1813 NFTA_REDIR_UNSPEC = 0x0
1814 NFTA_REDIR_REG_PROTO_MIN = 0x1
1815 NFTA_REDIR_REG_PROTO_MAX = 0x2
1816 NFTA_REDIR_FLAGS = 0x3
1817 NFTA_DUP_UNSPEC = 0x0
1818 NFTA_DUP_SREG_ADDR = 0x1
1819 NFTA_DUP_SREG_DEV = 0x2
1820 NFTA_FWD_UNSPEC = 0x0
1821 NFTA_FWD_SREG_DEV = 0x1
1822 NFTA_OBJREF_UNSPEC = 0x0
1823 NFTA_OBJREF_IMM_TYPE = 0x1
1824 NFTA_OBJREF_IMM_NAME = 0x2
1825 NFTA_OBJREF_SET_SREG = 0x3
1826 NFTA_OBJREF_SET_NAME = 0x4
1827 NFTA_OBJREF_SET_ID = 0x5
1828 NFTA_GEN_UNSPEC = 0x0
1829 NFTA_GEN_ID = 0x1
1830 NFTA_GEN_PROC_PID = 0x2
1831 NFTA_GEN_PROC_NAME = 0x3
1832 NFTA_FIB_UNSPEC = 0x0
1833 NFTA_FIB_DREG = 0x1
1834 NFTA_FIB_RESULT = 0x2
1835 NFTA_FIB_FLAGS = 0x3
1836 NFT_FIB_RESULT_UNSPEC = 0x0
1837 NFT_FIB_RESULT_OIF = 0x1
1838 NFT_FIB_RESULT_OIFNAME = 0x2
1839 NFT_FIB_RESULT_ADDRTYPE = 0x3
1840 NFTA_FIB_F_SADDR = 0x1
1841 NFTA_FIB_F_DADDR = 0x2
1842 NFTA_FIB_F_MARK = 0x4
1843 NFTA_FIB_F_IIF = 0x8
1844 NFTA_FIB_F_OIF = 0x10
1845 NFTA_FIB_F_PRESENT = 0x20
1846 NFTA_CT_HELPER_UNSPEC = 0x0
1847 NFTA_CT_HELPER_NAME = 0x1
1848 NFTA_CT_HELPER_L3PROTO = 0x2
1849 NFTA_CT_HELPER_L4PROTO = 0x3
1850 NFTA_OBJ_UNSPEC = 0x0
1851 NFTA_OBJ_TABLE = 0x1
1852 NFTA_OBJ_NAME = 0x2
1853 NFTA_OBJ_TYPE = 0x3
1854 NFTA_OBJ_DATA = 0x4
1855 NFTA_OBJ_USE = 0x5
1856 NFTA_TRACE_UNSPEC = 0x0
1857 NFTA_TRACE_TABLE = 0x1
1858 NFTA_TRACE_CHAIN = 0x2
1859 NFTA_TRACE_RULE_HANDLE = 0x3
1860 NFTA_TRACE_TYPE = 0x4
1861 NFTA_TRACE_VERDICT = 0x5
1862 NFTA_TRACE_ID = 0x6
1863 NFTA_TRACE_LL_HEADER = 0x7
1864 NFTA_TRACE_NETWORK_HEADER = 0x8
1865 NFTA_TRACE_TRANSPORT_HEADER = 0x9
1866 NFTA_TRACE_IIF = 0xa
1867 NFTA_TRACE_IIFTYPE = 0xb
1868 NFTA_TRACE_OIF = 0xc
1869 NFTA_TRACE_OIFTYPE = 0xd
1870 NFTA_TRACE_MARK = 0xe
1871 NFTA_TRACE_NFPROTO = 0xf
1872 NFTA_TRACE_POLICY = 0x10
1873 NFTA_TRACE_PAD = 0x11
1874 NFT_TRACETYPE_UNSPEC = 0x0
1875 NFT_TRACETYPE_POLICY = 0x1
1876 NFT_TRACETYPE_RETURN = 0x2
1877 NFT_TRACETYPE_RULE = 0x3
1878 NFTA_NG_UNSPEC = 0x0
1879 NFTA_NG_DREG = 0x1
1880 NFTA_NG_MODULUS = 0x2
1881 NFTA_NG_TYPE = 0x3
1882 NFTA_NG_OFFSET = 0x4
1883 NFT_NG_INCREMENTAL = 0x0
1884 NFT_NG_RANDOM = 0x1
1885 )
1886
1887 type RTCTime struct {
1888 Sec int32
1889 Min int32
1890 Hour int32
1891 Mday int32
1892 Mon int32
1893 Year int32
1894 Wday int32
1895 Yday int32
1896 Isdst int32
1897 }
1898
1899 type RTCWkAlrm struct {
1900 Enabled uint8
1901 Pending uint8
1902 Time RTCTime
1903 }
1904
1905 type RTCPLLInfo struct {
1906 Ctrl int32
1907 Value int32
1908 Max int32
1909 Min int32
1910 Posmult int32
1911 Negmult int32
1912 Clock int64
1913 }
1914
1915 type BlkpgIoctlArg struct {
1916 Op int32
1917 Flags int32
1918 Datalen int32
1919 Data *byte
1920 }
1921
1922 type BlkpgPartition struct {
1923 Start int64
1924 Length int64
1925 Pno int32
1926 Devname [64]uint8
1927 Volname [64]uint8
1928 _ [4]byte
1929 }
1930
1931 const (
1932 BLKPG = 0x1269
1933 BLKPG_ADD_PARTITION = 0x1
1934 BLKPG_DEL_PARTITION = 0x2
1935 BLKPG_RESIZE_PARTITION = 0x3
1936 )
1937
1938 const (
1939 NETNSA_NONE = 0x0
1940 NETNSA_NSID = 0x1
1941 NETNSA_PID = 0x2
1942 NETNSA_FD = 0x3
1943 )
1944
1945 type XDPRingOffset struct {
1946 Producer uint64
1947 Consumer uint64
1948 Desc uint64
1949 }
1950
1951 type XDPMmapOffsets struct {
1952 Rx XDPRingOffset
1953 Tx XDPRingOffset
1954 Fr XDPRingOffset
1955 Cr XDPRingOffset
1956 }
1957
1958 type XDPUmemReg struct {
1959 Addr uint64
1960 Len uint64
1961 Size uint32
1962 Headroom uint32
1963 }
1964
1965 type XDPStatistics struct {
1966 Rx_dropped uint64
1967 Rx_invalid_descs uint64
1968 Tx_invalid_descs uint64
1969 }
1970
1971 type XDPDesc struct {
1972 Addr uint64
1973 Len uint32
1974 Options uint32
1975 }
1976
1977 const (
1978 NCSI_CMD_UNSPEC = 0x0
1979 NCSI_CMD_PKG_INFO = 0x1
1980 NCSI_CMD_SET_INTERFACE = 0x2
1981 NCSI_CMD_CLEAR_INTERFACE = 0x3
1982 NCSI_ATTR_UNSPEC = 0x0
1983 NCSI_ATTR_IFINDEX = 0x1
1984 NCSI_ATTR_PACKAGE_LIST = 0x2
1985 NCSI_ATTR_PACKAGE_ID = 0x3
1986 NCSI_ATTR_CHANNEL_ID = 0x4
1987 NCSI_PKG_ATTR_UNSPEC = 0x0
1988 NCSI_PKG_ATTR = 0x1
1989 NCSI_PKG_ATTR_ID = 0x2
1990 NCSI_PKG_ATTR_FORCED = 0x3
1991 NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
1992 NCSI_CHANNEL_ATTR_UNSPEC = 0x0
1993 NCSI_CHANNEL_ATTR = 0x1
1994 NCSI_CHANNEL_ATTR_ID = 0x2
1995 NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
1996 NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
1997 NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
1998 NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
1999 NCSI_CHANNEL_ATTR_ACTIVE = 0x7
2000 NCSI_CHANNEL_ATTR_FORCED = 0x8
2001 NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
2002 NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
2003 )
2004
2005 const (
2006 SOF_TIMESTAMPING_TX_HARDWARE = 0x1
2007 SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
2008 SOF_TIMESTAMPING_RX_HARDWARE = 0x4
2009 SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
2010 SOF_TIMESTAMPING_SOFTWARE = 0x10
2011 SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
2012 SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
2013 SOF_TIMESTAMPING_OPT_ID = 0x80
2014 SOF_TIMESTAMPING_TX_SCHED = 0x100
2015 SOF_TIMESTAMPING_TX_ACK = 0x200
2016 SOF_TIMESTAMPING_OPT_CMSG = 0x400
2017 SOF_TIMESTAMPING_OPT_TSONLY = 0x800
2018 SOF_TIMESTAMPING_OPT_STATS = 0x1000
2019 SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
2020 SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
2021
2022 SOF_TIMESTAMPING_LAST = 0x4000
2023 SOF_TIMESTAMPING_MASK = 0x7fff
2024 )
55 package unix
66
77 const (
8 sizeofPtr = 0x8
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x8
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
1313 PathMax = 0x1000
1414 )
1515
3232
3333 type Timex struct {
3434 Modes uint32
35 _ [4]byte
3635 Offset int64
3736 Freq int64
3837 Maxerror int64
3938 Esterror int64
4039 Status int32
41 _ [4]byte
4240 Constant int64
4341 Precision int64
4442 Tolerance int64
4745 Ppsfreq int64
4846 Jitter int64
4947 Shift int32
50 _ [4]byte
5148 Stabil int64
5249 Jitcnt int64
5350 Calcnt int64
115112 _ [3]int64
116113 }
117114
118 type Statfs_t struct {
119 Type uint32
120 Bsize uint32
121 Blocks uint64
122 Bfree uint64
123 Bavail uint64
124 Files uint64
125 Ffree uint64
126 Fsid Fsid
127 Namelen uint32
128 Frsize uint32
129 Flags uint32
130 Spare [4]uint32
131 _ [4]byte
115 type StatxTimestamp struct {
116 Sec int64
117 Nsec uint32
118 _ int32
119 }
120
121 type Statx_t struct {
122 Mask uint32
123 Blksize uint32
124 Attributes uint64
125 Nlink uint32
126 Uid uint32
127 Gid uint32
128 Mode uint16
129 _ [1]uint16
130 Ino uint64
131 Size uint64
132 Blocks uint64
133 Attributes_mask uint64
134 Atime StatxTimestamp
135 Btime StatxTimestamp
136 Ctime StatxTimestamp
137 Mtime StatxTimestamp
138 Rdev_major uint32
139 Rdev_minor uint32
140 Dev_major uint32
141 Dev_minor uint32
142 _ [14]uint64
132143 }
133144
134145 type Dirent struct {
141152 }
142153
143154 type Fsid struct {
144 _ [2]int32
155 Val [2]int32
145156 }
146157
147158 type Flock_t struct {
148159 Type int16
149160 Whence int16
150 _ [4]byte
151161 Start int64
152162 Len int64
153163 Pid int32
226236 Channel uint16
227237 }
228238
239 type RawSockaddrL2 struct {
240 Family uint16
241 Psm uint16
242 Bdaddr [6]uint8
243 Cid uint16
244 Bdaddr_type uint8
245 _ [1]byte
246 }
247
248 type RawSockaddrRFCOMM struct {
249 Family uint16
250 Bdaddr [6]uint8
251 Channel uint8
252 _ [1]byte
253 }
254
229255 type RawSockaddrCAN struct {
230256 Family uint16
231 _ [2]byte
232257 Ifindex int32
233258 Addr [8]byte
234259 }
249274 Zero [4]uint8
250275 }
251276
277 type RawSockaddrXDP struct {
278 Family uint16
279 Flags uint16
280 Ifindex uint32
281 Queue_id uint32
282 Shared_umem_fd uint32
283 }
284
285 type RawSockaddrPPPoX [0x1e]byte
286
252287 type RawSockaddr struct {
253288 Family uint16
254289 Data [14]int8
297332 type Msghdr struct {
298333 Name *byte
299334 Namelen uint32
300 _ [4]byte
301335 Iov *Iovec
302336 Iovlen uint64
303337 Control *byte
345379 Probes uint8
346380 Backoff uint8
347381 Options uint8
348 _ [2]byte
349382 Rto uint32
350383 Ato uint32
351384 Snd_mss uint32
380413 SizeofSockaddrLinklayer = 0x14
381414 SizeofSockaddrNetlink = 0xc
382415 SizeofSockaddrHCI = 0x6
416 SizeofSockaddrL2 = 0xe
417 SizeofSockaddrRFCOMM = 0xa
383418 SizeofSockaddrCAN = 0x10
384419 SizeofSockaddrALG = 0x58
385420 SizeofSockaddrVM = 0x10
421 SizeofSockaddrXDP = 0x10
422 SizeofSockaddrPPPoX = 0x1e
386423 SizeofLinger = 0x8
387424 SizeofIovec = 0x10
388425 SizeofIPMreq = 0x8
400437 )
401438
402439 const (
403 IFA_UNSPEC = 0x0
404 IFA_ADDRESS = 0x1
405 IFA_LOCAL = 0x2
406 IFA_LABEL = 0x3
407 IFA_BROADCAST = 0x4
408 IFA_ANYCAST = 0x5
409 IFA_CACHEINFO = 0x6
410 IFA_MULTICAST = 0x7
411 IFLA_UNSPEC = 0x0
412 IFLA_ADDRESS = 0x1
413 IFLA_BROADCAST = 0x2
414 IFLA_IFNAME = 0x3
415 IFLA_MTU = 0x4
416 IFLA_LINK = 0x5
417 IFLA_QDISC = 0x6
418 IFLA_STATS = 0x7
419 IFLA_COST = 0x8
420 IFLA_PRIORITY = 0x9
421 IFLA_MASTER = 0xa
422 IFLA_WIRELESS = 0xb
423 IFLA_PROTINFO = 0xc
424 IFLA_TXQLEN = 0xd
425 IFLA_MAP = 0xe
426 IFLA_WEIGHT = 0xf
427 IFLA_OPERSTATE = 0x10
428 IFLA_LINKMODE = 0x11
429 IFLA_LINKINFO = 0x12
430 IFLA_NET_NS_PID = 0x13
431 IFLA_IFALIAS = 0x14
432 IFLA_MAX = 0x2c
433 RT_SCOPE_UNIVERSE = 0x0
434 RT_SCOPE_SITE = 0xc8
435 RT_SCOPE_LINK = 0xfd
436 RT_SCOPE_HOST = 0xfe
437 RT_SCOPE_NOWHERE = 0xff
438 RT_TABLE_UNSPEC = 0x0
439 RT_TABLE_COMPAT = 0xfc
440 RT_TABLE_DEFAULT = 0xfd
441 RT_TABLE_MAIN = 0xfe
442 RT_TABLE_LOCAL = 0xff
443 RT_TABLE_MAX = 0xffffffff
444 RTA_UNSPEC = 0x0
445 RTA_DST = 0x1
446 RTA_SRC = 0x2
447 RTA_IIF = 0x3
448 RTA_OIF = 0x4
449 RTA_GATEWAY = 0x5
450 RTA_PRIORITY = 0x6
451 RTA_PREFSRC = 0x7
452 RTA_METRICS = 0x8
453 RTA_MULTIPATH = 0x9
454 RTA_FLOW = 0xb
455 RTA_CACHEINFO = 0xc
456 RTA_TABLE = 0xf
457 RTN_UNSPEC = 0x0
458 RTN_UNICAST = 0x1
459 RTN_LOCAL = 0x2
460 RTN_BROADCAST = 0x3
461 RTN_ANYCAST = 0x4
462 RTN_MULTICAST = 0x5
463 RTN_BLACKHOLE = 0x6
464 RTN_UNREACHABLE = 0x7
465 RTN_PROHIBIT = 0x8
466 RTN_THROW = 0x9
467 RTN_NAT = 0xa
468 RTN_XRESOLVE = 0xb
469 RTNLGRP_NONE = 0x0
470 RTNLGRP_LINK = 0x1
471 RTNLGRP_NOTIFY = 0x2
472 RTNLGRP_NEIGH = 0x3
473 RTNLGRP_TC = 0x4
474 RTNLGRP_IPV4_IFADDR = 0x5
475 RTNLGRP_IPV4_MROUTE = 0x6
476 RTNLGRP_IPV4_ROUTE = 0x7
477 RTNLGRP_IPV4_RULE = 0x8
478 RTNLGRP_IPV6_IFADDR = 0x9
479 RTNLGRP_IPV6_MROUTE = 0xa
480 RTNLGRP_IPV6_ROUTE = 0xb
481 RTNLGRP_IPV6_IFINFO = 0xc
482 RTNLGRP_IPV6_PREFIX = 0x12
483 RTNLGRP_IPV6_RULE = 0x13
484 RTNLGRP_ND_USEROPT = 0x14
485 SizeofNlMsghdr = 0x10
486 SizeofNlMsgerr = 0x14
487 SizeofRtGenmsg = 0x1
488 SizeofNlAttr = 0x4
489 SizeofRtAttr = 0x4
490 SizeofIfInfomsg = 0x10
491 SizeofIfAddrmsg = 0x8
492 SizeofRtMsg = 0xc
493 SizeofRtNexthop = 0x8
440 IFA_UNSPEC = 0x0
441 IFA_ADDRESS = 0x1
442 IFA_LOCAL = 0x2
443 IFA_LABEL = 0x3
444 IFA_BROADCAST = 0x4
445 IFA_ANYCAST = 0x5
446 IFA_CACHEINFO = 0x6
447 IFA_MULTICAST = 0x7
448 IFLA_UNSPEC = 0x0
449 IFLA_ADDRESS = 0x1
450 IFLA_BROADCAST = 0x2
451 IFLA_IFNAME = 0x3
452 IFLA_INFO_KIND = 0x1
453 IFLA_MTU = 0x4
454 IFLA_LINK = 0x5
455 IFLA_QDISC = 0x6
456 IFLA_STATS = 0x7
457 IFLA_COST = 0x8
458 IFLA_PRIORITY = 0x9
459 IFLA_MASTER = 0xa
460 IFLA_WIRELESS = 0xb
461 IFLA_PROTINFO = 0xc
462 IFLA_TXQLEN = 0xd
463 IFLA_MAP = 0xe
464 IFLA_WEIGHT = 0xf
465 IFLA_OPERSTATE = 0x10
466 IFLA_LINKMODE = 0x11
467 IFLA_LINKINFO = 0x12
468 IFLA_NET_NS_PID = 0x13
469 IFLA_IFALIAS = 0x14
470 IFLA_NUM_VF = 0x15
471 IFLA_VFINFO_LIST = 0x16
472 IFLA_STATS64 = 0x17
473 IFLA_VF_PORTS = 0x18
474 IFLA_PORT_SELF = 0x19
475 IFLA_AF_SPEC = 0x1a
476 IFLA_GROUP = 0x1b
477 IFLA_NET_NS_FD = 0x1c
478 IFLA_EXT_MASK = 0x1d
479 IFLA_PROMISCUITY = 0x1e
480 IFLA_NUM_TX_QUEUES = 0x1f
481 IFLA_NUM_RX_QUEUES = 0x20
482 IFLA_CARRIER = 0x21
483 IFLA_PHYS_PORT_ID = 0x22
484 IFLA_CARRIER_CHANGES = 0x23
485 IFLA_PHYS_SWITCH_ID = 0x24
486 IFLA_LINK_NETNSID = 0x25
487 IFLA_PHYS_PORT_NAME = 0x26
488 IFLA_PROTO_DOWN = 0x27
489 IFLA_GSO_MAX_SEGS = 0x28
490 IFLA_GSO_MAX_SIZE = 0x29
491 IFLA_PAD = 0x2a
492 IFLA_XDP = 0x2b
493 IFLA_EVENT = 0x2c
494 IFLA_NEW_NETNSID = 0x2d
495 IFLA_IF_NETNSID = 0x2e
496 IFLA_MAX = 0x33
497 RT_SCOPE_UNIVERSE = 0x0
498 RT_SCOPE_SITE = 0xc8
499 RT_SCOPE_LINK = 0xfd
500 RT_SCOPE_HOST = 0xfe
501 RT_SCOPE_NOWHERE = 0xff
502 RT_TABLE_UNSPEC = 0x0
503 RT_TABLE_COMPAT = 0xfc
504 RT_TABLE_DEFAULT = 0xfd
505 RT_TABLE_MAIN = 0xfe
506 RT_TABLE_LOCAL = 0xff
507 RT_TABLE_MAX = 0xffffffff
508 RTA_UNSPEC = 0x0
509 RTA_DST = 0x1
510 RTA_SRC = 0x2
511 RTA_IIF = 0x3
512 RTA_OIF = 0x4
513 RTA_GATEWAY = 0x5
514 RTA_PRIORITY = 0x6
515 RTA_PREFSRC = 0x7
516 RTA_METRICS = 0x8
517 RTA_MULTIPATH = 0x9
518 RTA_FLOW = 0xb
519 RTA_CACHEINFO = 0xc
520 RTA_TABLE = 0xf
521 RTA_MARK = 0x10
522 RTA_MFC_STATS = 0x11
523 RTA_VIA = 0x12
524 RTA_NEWDST = 0x13
525 RTA_PREF = 0x14
526 RTA_ENCAP_TYPE = 0x15
527 RTA_ENCAP = 0x16
528 RTA_EXPIRES = 0x17
529 RTA_PAD = 0x18
530 RTA_UID = 0x19
531 RTA_TTL_PROPAGATE = 0x1a
532 RTA_IP_PROTO = 0x1b
533 RTA_SPORT = 0x1c
534 RTA_DPORT = 0x1d
535 RTN_UNSPEC = 0x0
536 RTN_UNICAST = 0x1
537 RTN_LOCAL = 0x2
538 RTN_BROADCAST = 0x3
539 RTN_ANYCAST = 0x4
540 RTN_MULTICAST = 0x5
541 RTN_BLACKHOLE = 0x6
542 RTN_UNREACHABLE = 0x7
543 RTN_PROHIBIT = 0x8
544 RTN_THROW = 0x9
545 RTN_NAT = 0xa
546 RTN_XRESOLVE = 0xb
547 RTNLGRP_NONE = 0x0
548 RTNLGRP_LINK = 0x1
549 RTNLGRP_NOTIFY = 0x2
550 RTNLGRP_NEIGH = 0x3
551 RTNLGRP_TC = 0x4
552 RTNLGRP_IPV4_IFADDR = 0x5
553 RTNLGRP_IPV4_MROUTE = 0x6
554 RTNLGRP_IPV4_ROUTE = 0x7
555 RTNLGRP_IPV4_RULE = 0x8
556 RTNLGRP_IPV6_IFADDR = 0x9
557 RTNLGRP_IPV6_MROUTE = 0xa
558 RTNLGRP_IPV6_ROUTE = 0xb
559 RTNLGRP_IPV6_IFINFO = 0xc
560 RTNLGRP_IPV6_PREFIX = 0x12
561 RTNLGRP_IPV6_RULE = 0x13
562 RTNLGRP_ND_USEROPT = 0x14
563 SizeofNlMsghdr = 0x10
564 SizeofNlMsgerr = 0x14
565 SizeofRtGenmsg = 0x1
566 SizeofNlAttr = 0x4
567 SizeofRtAttr = 0x4
568 SizeofIfInfomsg = 0x10
569 SizeofIfAddrmsg = 0x8
570 SizeofRtMsg = 0xc
571 SizeofRtNexthop = 0x8
494572 )
495573
496574 type NlMsghdr struct {
570648
571649 type SockFprog struct {
572650 Len uint16
573 _ [6]byte
574651 Filter *SockFilter
575652 }
576653
600677
601678 type PtraceFpregs struct {
602679 Fpc uint32
603 _ [4]byte
604680 Fprs [16]float64
605681 }
606682
607683 type PtracePer struct {
608684 _ [0]uint64
609 _ [24]byte
610 _ [8]byte
685 _ [32]byte
611686 Starting_addr uint64
612687 Ending_addr uint64
613688 Perc_atmid uint16
614 _ [6]byte
615689 Address uint64
616690 Access_id uint8
617691 _ [7]byte
632706 Freeswap uint64
633707 Procs uint16
634708 Pad uint16
635 _ [4]byte
636709 Totalhigh uint64
637710 Freehigh uint64
638711 Unit uint32
641714 }
642715
643716 type Utsname struct {
644 Sysname [65]int8
645 Nodename [65]int8
646 Release [65]int8
647 Version [65]int8
648 Machine [65]int8
649 Domainname [65]int8
717 Sysname [65]byte
718 Nodename [65]byte
719 Release [65]byte
720 Version [65]byte
721 Machine [65]byte
722 Domainname [65]byte
650723 }
651724
652725 type Ustat_t struct {
653726 Tfree int32
654 _ [4]byte
655727 Tinode uint64
656728 Fname [6]int8
657729 Fpack [6]int8
666738 }
667739
668740 const (
669 AT_FDCWD = -0x64
670 AT_REMOVEDIR = 0x200
741 AT_EMPTY_PATH = 0x1000
742 AT_FDCWD = -0x64
743 AT_NO_AUTOMOUNT = 0x800
744 AT_REMOVEDIR = 0x200
745
746 AT_STATX_SYNC_AS_STAT = 0x0
747 AT_STATX_FORCE_SYNC = 0x2000
748 AT_STATX_DONT_SYNC = 0x4000
749
671750 AT_SYMLINK_FOLLOW = 0x400
672751 AT_SYMLINK_NOFOLLOW = 0x100
752
753 AT_EACCESS = 0x200
673754 )
674755
675756 type PollFd struct {
689770 )
690771
691772 type Sigset_t struct {
692 _ [16]uint64
773 Val [16]uint64
774 }
775
776 type SignalfdSiginfo struct {
777 Signo uint32
778 Errno int32
779 Code int32
780 Pid uint32
781 Uid uint32
782 Fd int32
783 Tid uint32
784 Band uint32
785 Overrun uint32
786 Trapno uint32
787 Status int32
788 Int int32
789 Ptr uint64
790 Utime uint64
791 Stime uint64
792 Addr uint64
793 _ [48]uint8
693794 }
694795
695796 const RNDGETENTCNT = 0x80045200
716817
717818 type Taskstats struct {
718819 Version uint16
719 _ [2]byte
720820 Ac_exitcode uint32
721821 Ac_flag uint8
722822 Ac_nice uint8
723 _ [6]byte
724823 Cpu_count uint64
725824 Cpu_delay_total uint64
726825 Blkio_count uint64
738837 Ac_pid uint32
739838 Ac_ppid uint32
740839 Ac_btime uint32
741 _ [4]byte
742840 Ac_etime uint64
743841 Ac_utime uint64
744842 Ac_stime uint64
762860 Cpu_scaled_run_real_total uint64
763861 Freepages_count uint64
764862 Freepages_delay_total uint64
863 Thrashing_count uint64
864 Thrashing_delay_total uint64
765865 }
766866
767867 const (
780880 TASKSTATS_CMD_ATTR_TGID = 0x2
781881 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
782882 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
883 )
884
885 type CGroupStats struct {
886 Sleeping uint64
887 Running uint64
888 Stopped uint64
889 Uninterruptible uint64
890 Io_wait uint64
891 }
892
893 const (
894 CGROUPSTATS_CMD_UNSPEC = 0x3
895 CGROUPSTATS_CMD_GET = 0x4
896 CGROUPSTATS_CMD_NEW = 0x5
897 CGROUPSTATS_TYPE_UNSPEC = 0x0
898 CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
899 CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
900 CGROUPSTATS_CMD_ATTR_FD = 0x1
783901 )
784902
785903 type Genlmsghdr struct {
814932 CTRL_ATTR_MCAST_GRP_NAME = 0x1
815933 CTRL_ATTR_MCAST_GRP_ID = 0x2
816934 )
935
936 type cpuMask uint64
937
938 const (
939 _CPU_SETSIZE = 0x400
940 _NCPUBITS = 0x40
941 )
942
943 const (
944 BDADDR_BREDR = 0x0
945 BDADDR_LE_PUBLIC = 0x1
946 BDADDR_LE_RANDOM = 0x2
947 )
948
949 type PerfEventAttr struct {
950 Type uint32
951 Size uint32
952 Config uint64
953 Sample uint64
954 Sample_type uint64
955 Read_format uint64
956 Bits uint64
957 Wakeup uint32
958 Bp_type uint32
959 Ext1 uint64
960 Ext2 uint64
961 Branch_sample_type uint64
962 Sample_regs_user uint64
963 Sample_stack_user uint32
964 Clockid int32
965 Sample_regs_intr uint64
966 Aux_watermark uint32
967 _ uint32
968 }
969
970 type PerfEventMmapPage struct {
971 Version uint32
972 Compat_version uint32
973 Lock uint32
974 Index uint32
975 Offset int64
976 Time_enabled uint64
977 Time_running uint64
978 Capabilities uint64
979 Pmc_width uint16
980 Time_shift uint16
981 Time_mult uint32
982 Time_offset uint64
983 Time_zero uint64
984 Size uint32
985 _ [948]uint8
986 Data_head uint64
987 Data_tail uint64
988 Data_offset uint64
989 Data_size uint64
990 Aux_head uint64
991 Aux_tail uint64
992 Aux_offset uint64
993 Aux_size uint64
994 }
995
996 const (
997 PerfBitDisabled uint64 = CBitFieldMaskBit0
998 PerfBitInherit = CBitFieldMaskBit1
999 PerfBitPinned = CBitFieldMaskBit2
1000 PerfBitExclusive = CBitFieldMaskBit3
1001 PerfBitExcludeUser = CBitFieldMaskBit4
1002 PerfBitExcludeKernel = CBitFieldMaskBit5
1003 PerfBitExcludeHv = CBitFieldMaskBit6
1004 PerfBitExcludeIdle = CBitFieldMaskBit7
1005 PerfBitMmap = CBitFieldMaskBit8
1006 PerfBitComm = CBitFieldMaskBit9
1007 PerfBitFreq = CBitFieldMaskBit10
1008 PerfBitInheritStat = CBitFieldMaskBit11
1009 PerfBitEnableOnExec = CBitFieldMaskBit12
1010 PerfBitTask = CBitFieldMaskBit13
1011 PerfBitWatermark = CBitFieldMaskBit14
1012 PerfBitPreciseIPBit1 = CBitFieldMaskBit15
1013 PerfBitPreciseIPBit2 = CBitFieldMaskBit16
1014 PerfBitMmapData = CBitFieldMaskBit17
1015 PerfBitSampleIDAll = CBitFieldMaskBit18
1016 PerfBitExcludeHost = CBitFieldMaskBit19
1017 PerfBitExcludeGuest = CBitFieldMaskBit20
1018 PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
1019 PerfBitExcludeCallchainUser = CBitFieldMaskBit22
1020 PerfBitMmap2 = CBitFieldMaskBit23
1021 PerfBitCommExec = CBitFieldMaskBit24
1022 PerfBitUseClockID = CBitFieldMaskBit25
1023 PerfBitContextSwitch = CBitFieldMaskBit26
1024 )
1025
1026 const (
1027 PERF_TYPE_HARDWARE = 0x0
1028 PERF_TYPE_SOFTWARE = 0x1
1029 PERF_TYPE_TRACEPOINT = 0x2
1030 PERF_TYPE_HW_CACHE = 0x3
1031 PERF_TYPE_RAW = 0x4
1032 PERF_TYPE_BREAKPOINT = 0x5
1033
1034 PERF_COUNT_HW_CPU_CYCLES = 0x0
1035 PERF_COUNT_HW_INSTRUCTIONS = 0x1
1036 PERF_COUNT_HW_CACHE_REFERENCES = 0x2
1037 PERF_COUNT_HW_CACHE_MISSES = 0x3
1038 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
1039 PERF_COUNT_HW_BRANCH_MISSES = 0x5
1040 PERF_COUNT_HW_BUS_CYCLES = 0x6
1041 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
1042 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
1043 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
1044
1045 PERF_COUNT_HW_CACHE_L1D = 0x0
1046 PERF_COUNT_HW_CACHE_L1I = 0x1
1047 PERF_COUNT_HW_CACHE_LL = 0x2
1048 PERF_COUNT_HW_CACHE_DTLB = 0x3
1049 PERF_COUNT_HW_CACHE_ITLB = 0x4
1050 PERF_COUNT_HW_CACHE_BPU = 0x5
1051 PERF_COUNT_HW_CACHE_NODE = 0x6
1052
1053 PERF_COUNT_HW_CACHE_OP_READ = 0x0
1054 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
1055 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
1056
1057 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
1058 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
1059
1060 PERF_COUNT_SW_CPU_CLOCK = 0x0
1061 PERF_COUNT_SW_TASK_CLOCK = 0x1
1062 PERF_COUNT_SW_PAGE_FAULTS = 0x2
1063 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
1064 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
1065 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
1066 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
1067 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
1068 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
1069 PERF_COUNT_SW_DUMMY = 0x9
1070
1071 PERF_SAMPLE_IP = 0x1
1072 PERF_SAMPLE_TID = 0x2
1073 PERF_SAMPLE_TIME = 0x4
1074 PERF_SAMPLE_ADDR = 0x8
1075 PERF_SAMPLE_READ = 0x10
1076 PERF_SAMPLE_CALLCHAIN = 0x20
1077 PERF_SAMPLE_ID = 0x40
1078 PERF_SAMPLE_CPU = 0x80
1079 PERF_SAMPLE_PERIOD = 0x100
1080 PERF_SAMPLE_STREAM_ID = 0x200
1081 PERF_SAMPLE_RAW = 0x400
1082 PERF_SAMPLE_BRANCH_STACK = 0x800
1083
1084 PERF_SAMPLE_BRANCH_USER = 0x1
1085 PERF_SAMPLE_BRANCH_KERNEL = 0x2
1086 PERF_SAMPLE_BRANCH_HV = 0x4
1087 PERF_SAMPLE_BRANCH_ANY = 0x8
1088 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
1089 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
1090 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
1091
1092 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
1093 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
1094 PERF_FORMAT_ID = 0x4
1095 PERF_FORMAT_GROUP = 0x8
1096
1097 PERF_RECORD_MMAP = 0x1
1098 PERF_RECORD_LOST = 0x2
1099 PERF_RECORD_COMM = 0x3
1100 PERF_RECORD_EXIT = 0x4
1101 PERF_RECORD_THROTTLE = 0x5
1102 PERF_RECORD_UNTHROTTLE = 0x6
1103 PERF_RECORD_FORK = 0x7
1104 PERF_RECORD_READ = 0x8
1105 PERF_RECORD_SAMPLE = 0x9
1106
1107 PERF_CONTEXT_HV = -0x20
1108 PERF_CONTEXT_KERNEL = -0x80
1109 PERF_CONTEXT_USER = -0x200
1110
1111 PERF_CONTEXT_GUEST = -0x800
1112 PERF_CONTEXT_GUEST_KERNEL = -0x880
1113 PERF_CONTEXT_GUEST_USER = -0xa00
1114
1115 PERF_FLAG_FD_NO_GROUP = 0x1
1116 PERF_FLAG_FD_OUTPUT = 0x2
1117 PERF_FLAG_PID_CGROUP = 0x4
1118 )
1119
1120 const (
1121 CBitFieldMaskBit0 = 0x8000000000000000
1122 CBitFieldMaskBit1 = 0x4000000000000000
1123 CBitFieldMaskBit2 = 0x2000000000000000
1124 CBitFieldMaskBit3 = 0x1000000000000000
1125 CBitFieldMaskBit4 = 0x800000000000000
1126 CBitFieldMaskBit5 = 0x400000000000000
1127 CBitFieldMaskBit6 = 0x200000000000000
1128 CBitFieldMaskBit7 = 0x100000000000000
1129 CBitFieldMaskBit8 = 0x80000000000000
1130 CBitFieldMaskBit9 = 0x40000000000000
1131 CBitFieldMaskBit10 = 0x20000000000000
1132 CBitFieldMaskBit11 = 0x10000000000000
1133 CBitFieldMaskBit12 = 0x8000000000000
1134 CBitFieldMaskBit13 = 0x4000000000000
1135 CBitFieldMaskBit14 = 0x2000000000000
1136 CBitFieldMaskBit15 = 0x1000000000000
1137 CBitFieldMaskBit16 = 0x800000000000
1138 CBitFieldMaskBit17 = 0x400000000000
1139 CBitFieldMaskBit18 = 0x200000000000
1140 CBitFieldMaskBit19 = 0x100000000000
1141 CBitFieldMaskBit20 = 0x80000000000
1142 CBitFieldMaskBit21 = 0x40000000000
1143 CBitFieldMaskBit22 = 0x20000000000
1144 CBitFieldMaskBit23 = 0x10000000000
1145 CBitFieldMaskBit24 = 0x8000000000
1146 CBitFieldMaskBit25 = 0x4000000000
1147 CBitFieldMaskBit26 = 0x2000000000
1148 CBitFieldMaskBit27 = 0x1000000000
1149 CBitFieldMaskBit28 = 0x800000000
1150 CBitFieldMaskBit29 = 0x400000000
1151 CBitFieldMaskBit30 = 0x200000000
1152 CBitFieldMaskBit31 = 0x100000000
1153 CBitFieldMaskBit32 = 0x80000000
1154 CBitFieldMaskBit33 = 0x40000000
1155 CBitFieldMaskBit34 = 0x20000000
1156 CBitFieldMaskBit35 = 0x10000000
1157 CBitFieldMaskBit36 = 0x8000000
1158 CBitFieldMaskBit37 = 0x4000000
1159 CBitFieldMaskBit38 = 0x2000000
1160 CBitFieldMaskBit39 = 0x1000000
1161 CBitFieldMaskBit40 = 0x800000
1162 CBitFieldMaskBit41 = 0x400000
1163 CBitFieldMaskBit42 = 0x200000
1164 CBitFieldMaskBit43 = 0x100000
1165 CBitFieldMaskBit44 = 0x80000
1166 CBitFieldMaskBit45 = 0x40000
1167 CBitFieldMaskBit46 = 0x20000
1168 CBitFieldMaskBit47 = 0x10000
1169 CBitFieldMaskBit48 = 0x8000
1170 CBitFieldMaskBit49 = 0x4000
1171 CBitFieldMaskBit50 = 0x2000
1172 CBitFieldMaskBit51 = 0x1000
1173 CBitFieldMaskBit52 = 0x800
1174 CBitFieldMaskBit53 = 0x400
1175 CBitFieldMaskBit54 = 0x200
1176 CBitFieldMaskBit55 = 0x100
1177 CBitFieldMaskBit56 = 0x80
1178 CBitFieldMaskBit57 = 0x40
1179 CBitFieldMaskBit58 = 0x20
1180 CBitFieldMaskBit59 = 0x10
1181 CBitFieldMaskBit60 = 0x8
1182 CBitFieldMaskBit61 = 0x4
1183 CBitFieldMaskBit62 = 0x2
1184 CBitFieldMaskBit63 = 0x1
1185 )
1186
1187 type SockaddrStorage struct {
1188 Family uint16
1189 _ [118]int8
1190 _ uint64
1191 }
1192
1193 type TCPMD5Sig struct {
1194 Addr SockaddrStorage
1195 Flags uint8
1196 Prefixlen uint8
1197 Keylen uint16
1198 _ uint32
1199 Key [80]uint8
1200 }
1201
1202 type HDDriveCmdHdr struct {
1203 Command uint8
1204 Number uint8
1205 Feature uint8
1206 Count uint8
1207 }
1208
1209 type HDGeometry struct {
1210 Heads uint8
1211 Sectors uint8
1212 Cylinders uint16
1213 Start uint64
1214 }
1215
1216 type HDDriveID struct {
1217 Config uint16
1218 Cyls uint16
1219 Reserved2 uint16
1220 Heads uint16
1221 Track_bytes uint16
1222 Sector_bytes uint16
1223 Sectors uint16
1224 Vendor0 uint16
1225 Vendor1 uint16
1226 Vendor2 uint16
1227 Serial_no [20]uint8
1228 Buf_type uint16
1229 Buf_size uint16
1230 Ecc_bytes uint16
1231 Fw_rev [8]uint8
1232 Model [40]uint8
1233 Max_multsect uint8
1234 Vendor3 uint8
1235 Dword_io uint16
1236 Vendor4 uint8
1237 Capability uint8
1238 Reserved50 uint16
1239 Vendor5 uint8
1240 TPIO uint8
1241 Vendor6 uint8
1242 TDMA uint8
1243 Field_valid uint16
1244 Cur_cyls uint16
1245 Cur_heads uint16
1246 Cur_sectors uint16
1247 Cur_capacity0 uint16
1248 Cur_capacity1 uint16
1249 Multsect uint8
1250 Multsect_valid uint8
1251 Lba_capacity uint32
1252 Dma_1word uint16
1253 Dma_mword uint16
1254 Eide_pio_modes uint16
1255 Eide_dma_min uint16
1256 Eide_dma_time uint16
1257 Eide_pio uint16
1258 Eide_pio_iordy uint16
1259 Words69_70 [2]uint16
1260 Words71_74 [4]uint16
1261 Queue_depth uint16
1262 Words76_79 [4]uint16
1263 Major_rev_num uint16
1264 Minor_rev_num uint16
1265 Command_set_1 uint16
1266 Command_set_2 uint16
1267 Cfsse uint16
1268 Cfs_enable_1 uint16
1269 Cfs_enable_2 uint16
1270 Csf_default uint16
1271 Dma_ultra uint16
1272 Trseuc uint16
1273 TrsEuc uint16
1274 CurAPMvalues uint16
1275 Mprc uint16
1276 Hw_config uint16
1277 Acoustic uint16
1278 Msrqs uint16
1279 Sxfert uint16
1280 Sal uint16
1281 Spg uint32
1282 Lba_capacity_2 uint64
1283 Words104_125 [22]uint16
1284 Last_lun uint16
1285 Word127 uint16
1286 Dlf uint16
1287 Csfo uint16
1288 Words130_155 [26]uint16
1289 Word156 uint16
1290 Words157_159 [3]uint16
1291 Cfa_power uint16
1292 Words161_175 [15]uint16
1293 Words176_205 [30]uint16
1294 Words206_254 [49]uint16
1295 Integrity_word uint16
1296 }
1297
1298 type Statfs_t struct {
1299 Type uint32
1300 Bsize uint32
1301 Blocks uint64
1302 Bfree uint64
1303 Bavail uint64
1304 Files uint64
1305 Ffree uint64
1306 Fsid Fsid
1307 Namelen uint32
1308 Frsize uint32
1309 Flags uint32
1310 Spare [4]uint32
1311 _ [4]byte
1312 }
1313
1314 const (
1315 ST_MANDLOCK = 0x40
1316 ST_NOATIME = 0x400
1317 ST_NODEV = 0x4
1318 ST_NODIRATIME = 0x800
1319 ST_NOEXEC = 0x8
1320 ST_NOSUID = 0x2
1321 ST_RDONLY = 0x1
1322 ST_RELATIME = 0x1000
1323 ST_SYNCHRONOUS = 0x10
1324 )
1325
1326 type TpacketHdr struct {
1327 Status uint64
1328 Len uint32
1329 Snaplen uint32
1330 Mac uint16
1331 Net uint16
1332 Sec uint32
1333 Usec uint32
1334 _ [4]byte
1335 }
1336
1337 type Tpacket2Hdr struct {
1338 Status uint32
1339 Len uint32
1340 Snaplen uint32
1341 Mac uint16
1342 Net uint16
1343 Sec uint32
1344 Nsec uint32
1345 Vlan_tci uint16
1346 Vlan_tpid uint16
1347 _ [4]uint8
1348 }
1349
1350 type Tpacket3Hdr struct {
1351 Next_offset uint32
1352 Sec uint32
1353 Nsec uint32
1354 Snaplen uint32
1355 Len uint32
1356 Status uint32
1357 Mac uint16
1358 Net uint16
1359 Hv1 TpacketHdrVariant1
1360 _ [8]uint8
1361 }
1362
1363 type TpacketHdrVariant1 struct {
1364 Rxhash uint32
1365 Vlan_tci uint32
1366 Vlan_tpid uint16
1367 _ uint16
1368 }
1369
1370 type TpacketBlockDesc struct {
1371 Version uint32
1372 To_priv uint32
1373 Hdr [40]byte
1374 }
1375
1376 type TpacketReq struct {
1377 Block_size uint32
1378 Block_nr uint32
1379 Frame_size uint32
1380 Frame_nr uint32
1381 }
1382
1383 type TpacketReq3 struct {
1384 Block_size uint32
1385 Block_nr uint32
1386 Frame_size uint32
1387 Frame_nr uint32
1388 Retire_blk_tov uint32
1389 Sizeof_priv uint32
1390 Feature_req_word uint32
1391 }
1392
1393 type TpacketStats struct {
1394 Packets uint32
1395 Drops uint32
1396 }
1397
1398 type TpacketStatsV3 struct {
1399 Packets uint32
1400 Drops uint32
1401 Freeze_q_cnt uint32
1402 }
1403
1404 type TpacketAuxdata struct {
1405 Status uint32
1406 Len uint32
1407 Snaplen uint32
1408 Mac uint16
1409 Net uint16
1410 Vlan_tci uint16
1411 Vlan_tpid uint16
1412 }
1413
1414 const (
1415 TPACKET_V1 = 0x0
1416 TPACKET_V2 = 0x1
1417 TPACKET_V3 = 0x2
1418 )
1419
1420 const (
1421 SizeofTpacketHdr = 0x20
1422 SizeofTpacket2Hdr = 0x20
1423 SizeofTpacket3Hdr = 0x30
1424 )
1425
1426 const (
1427 NF_INET_PRE_ROUTING = 0x0
1428 NF_INET_LOCAL_IN = 0x1
1429 NF_INET_FORWARD = 0x2
1430 NF_INET_LOCAL_OUT = 0x3
1431 NF_INET_POST_ROUTING = 0x4
1432 NF_INET_NUMHOOKS = 0x5
1433 )
1434
1435 const (
1436 NF_NETDEV_INGRESS = 0x0
1437 NF_NETDEV_NUMHOOKS = 0x1
1438 )
1439
1440 const (
1441 NFPROTO_UNSPEC = 0x0
1442 NFPROTO_INET = 0x1
1443 NFPROTO_IPV4 = 0x2
1444 NFPROTO_ARP = 0x3
1445 NFPROTO_NETDEV = 0x5
1446 NFPROTO_BRIDGE = 0x7
1447 NFPROTO_IPV6 = 0xa
1448 NFPROTO_DECNET = 0xc
1449 NFPROTO_NUMPROTO = 0xd
1450 )
1451
1452 type Nfgenmsg struct {
1453 Nfgen_family uint8
1454 Version uint8
1455 Res_id uint16
1456 }
1457
1458 const (
1459 NFNL_BATCH_UNSPEC = 0x0
1460 NFNL_BATCH_GENID = 0x1
1461 )
1462
1463 const (
1464 NFT_REG_VERDICT = 0x0
1465 NFT_REG_1 = 0x1
1466 NFT_REG_2 = 0x2
1467 NFT_REG_3 = 0x3
1468 NFT_REG_4 = 0x4
1469 NFT_REG32_00 = 0x8
1470 NFT_REG32_01 = 0x9
1471 NFT_REG32_02 = 0xa
1472 NFT_REG32_03 = 0xb
1473 NFT_REG32_04 = 0xc
1474 NFT_REG32_05 = 0xd
1475 NFT_REG32_06 = 0xe
1476 NFT_REG32_07 = 0xf
1477 NFT_REG32_08 = 0x10
1478 NFT_REG32_09 = 0x11
1479 NFT_REG32_10 = 0x12
1480 NFT_REG32_11 = 0x13
1481 NFT_REG32_12 = 0x14
1482 NFT_REG32_13 = 0x15
1483 NFT_REG32_14 = 0x16
1484 NFT_REG32_15 = 0x17
1485 NFT_CONTINUE = -0x1
1486 NFT_BREAK = -0x2
1487 NFT_JUMP = -0x3
1488 NFT_GOTO = -0x4
1489 NFT_RETURN = -0x5
1490 NFT_MSG_NEWTABLE = 0x0
1491 NFT_MSG_GETTABLE = 0x1
1492 NFT_MSG_DELTABLE = 0x2
1493 NFT_MSG_NEWCHAIN = 0x3
1494 NFT_MSG_GETCHAIN = 0x4
1495 NFT_MSG_DELCHAIN = 0x5
1496 NFT_MSG_NEWRULE = 0x6
1497 NFT_MSG_GETRULE = 0x7
1498 NFT_MSG_DELRULE = 0x8
1499 NFT_MSG_NEWSET = 0x9
1500 NFT_MSG_GETSET = 0xa
1501 NFT_MSG_DELSET = 0xb
1502 NFT_MSG_NEWSETELEM = 0xc
1503 NFT_MSG_GETSETELEM = 0xd
1504 NFT_MSG_DELSETELEM = 0xe
1505 NFT_MSG_NEWGEN = 0xf
1506 NFT_MSG_GETGEN = 0x10
1507 NFT_MSG_TRACE = 0x11
1508 NFT_MSG_NEWOBJ = 0x12
1509 NFT_MSG_GETOBJ = 0x13
1510 NFT_MSG_DELOBJ = 0x14
1511 NFT_MSG_GETOBJ_RESET = 0x15
1512 NFT_MSG_MAX = 0x19
1513 NFTA_LIST_UNPEC = 0x0
1514 NFTA_LIST_ELEM = 0x1
1515 NFTA_HOOK_UNSPEC = 0x0
1516 NFTA_HOOK_HOOKNUM = 0x1
1517 NFTA_HOOK_PRIORITY = 0x2
1518 NFTA_HOOK_DEV = 0x3
1519 NFT_TABLE_F_DORMANT = 0x1
1520 NFTA_TABLE_UNSPEC = 0x0
1521 NFTA_TABLE_NAME = 0x1
1522 NFTA_TABLE_FLAGS = 0x2
1523 NFTA_TABLE_USE = 0x3
1524 NFTA_CHAIN_UNSPEC = 0x0
1525 NFTA_CHAIN_TABLE = 0x1
1526 NFTA_CHAIN_HANDLE = 0x2
1527 NFTA_CHAIN_NAME = 0x3
1528 NFTA_CHAIN_HOOK = 0x4
1529 NFTA_CHAIN_POLICY = 0x5
1530 NFTA_CHAIN_USE = 0x6
1531 NFTA_CHAIN_TYPE = 0x7
1532 NFTA_CHAIN_COUNTERS = 0x8
1533 NFTA_CHAIN_PAD = 0x9
1534 NFTA_RULE_UNSPEC = 0x0
1535 NFTA_RULE_TABLE = 0x1
1536 NFTA_RULE_CHAIN = 0x2
1537 NFTA_RULE_HANDLE = 0x3
1538 NFTA_RULE_EXPRESSIONS = 0x4
1539 NFTA_RULE_COMPAT = 0x5
1540 NFTA_RULE_POSITION = 0x6
1541 NFTA_RULE_USERDATA = 0x7
1542 NFTA_RULE_PAD = 0x8
1543 NFTA_RULE_ID = 0x9
1544 NFT_RULE_COMPAT_F_INV = 0x2
1545 NFT_RULE_COMPAT_F_MASK = 0x2
1546 NFTA_RULE_COMPAT_UNSPEC = 0x0
1547 NFTA_RULE_COMPAT_PROTO = 0x1
1548 NFTA_RULE_COMPAT_FLAGS = 0x2
1549 NFT_SET_ANONYMOUS = 0x1
1550 NFT_SET_CONSTANT = 0x2
1551 NFT_SET_INTERVAL = 0x4
1552 NFT_SET_MAP = 0x8
1553 NFT_SET_TIMEOUT = 0x10
1554 NFT_SET_EVAL = 0x20
1555 NFT_SET_OBJECT = 0x40
1556 NFT_SET_POL_PERFORMANCE = 0x0
1557 NFT_SET_POL_MEMORY = 0x1
1558 NFTA_SET_DESC_UNSPEC = 0x0
1559 NFTA_SET_DESC_SIZE = 0x1
1560 NFTA_SET_UNSPEC = 0x0
1561 NFTA_SET_TABLE = 0x1
1562 NFTA_SET_NAME = 0x2
1563 NFTA_SET_FLAGS = 0x3
1564 NFTA_SET_KEY_TYPE = 0x4
1565 NFTA_SET_KEY_LEN = 0x5
1566 NFTA_SET_DATA_TYPE = 0x6
1567 NFTA_SET_DATA_LEN = 0x7
1568 NFTA_SET_POLICY = 0x8
1569 NFTA_SET_DESC = 0x9
1570 NFTA_SET_ID = 0xa
1571 NFTA_SET_TIMEOUT = 0xb
1572 NFTA_SET_GC_INTERVAL = 0xc
1573 NFTA_SET_USERDATA = 0xd
1574 NFTA_SET_PAD = 0xe
1575 NFTA_SET_OBJ_TYPE = 0xf
1576 NFT_SET_ELEM_INTERVAL_END = 0x1
1577 NFTA_SET_ELEM_UNSPEC = 0x0
1578 NFTA_SET_ELEM_KEY = 0x1
1579 NFTA_SET_ELEM_DATA = 0x2
1580 NFTA_SET_ELEM_FLAGS = 0x3
1581 NFTA_SET_ELEM_TIMEOUT = 0x4
1582 NFTA_SET_ELEM_EXPIRATION = 0x5
1583 NFTA_SET_ELEM_USERDATA = 0x6
1584 NFTA_SET_ELEM_EXPR = 0x7
1585 NFTA_SET_ELEM_PAD = 0x8
1586 NFTA_SET_ELEM_OBJREF = 0x9
1587 NFTA_SET_ELEM_LIST_UNSPEC = 0x0
1588 NFTA_SET_ELEM_LIST_TABLE = 0x1
1589 NFTA_SET_ELEM_LIST_SET = 0x2
1590 NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
1591 NFTA_SET_ELEM_LIST_SET_ID = 0x4
1592 NFT_DATA_VALUE = 0x0
1593 NFT_DATA_VERDICT = 0xffffff00
1594 NFTA_DATA_UNSPEC = 0x0
1595 NFTA_DATA_VALUE = 0x1
1596 NFTA_DATA_VERDICT = 0x2
1597 NFTA_VERDICT_UNSPEC = 0x0
1598 NFTA_VERDICT_CODE = 0x1
1599 NFTA_VERDICT_CHAIN = 0x2
1600 NFTA_EXPR_UNSPEC = 0x0
1601 NFTA_EXPR_NAME = 0x1
1602 NFTA_EXPR_DATA = 0x2
1603 NFTA_IMMEDIATE_UNSPEC = 0x0
1604 NFTA_IMMEDIATE_DREG = 0x1
1605 NFTA_IMMEDIATE_DATA = 0x2
1606 NFTA_BITWISE_UNSPEC = 0x0
1607 NFTA_BITWISE_SREG = 0x1
1608 NFTA_BITWISE_DREG = 0x2
1609 NFTA_BITWISE_LEN = 0x3
1610 NFTA_BITWISE_MASK = 0x4
1611 NFTA_BITWISE_XOR = 0x5
1612 NFT_BYTEORDER_NTOH = 0x0
1613 NFT_BYTEORDER_HTON = 0x1
1614 NFTA_BYTEORDER_UNSPEC = 0x0
1615 NFTA_BYTEORDER_SREG = 0x1
1616 NFTA_BYTEORDER_DREG = 0x2
1617 NFTA_BYTEORDER_OP = 0x3
1618 NFTA_BYTEORDER_LEN = 0x4
1619 NFTA_BYTEORDER_SIZE = 0x5
1620 NFT_CMP_EQ = 0x0
1621 NFT_CMP_NEQ = 0x1
1622 NFT_CMP_LT = 0x2
1623 NFT_CMP_LTE = 0x3
1624 NFT_CMP_GT = 0x4
1625 NFT_CMP_GTE = 0x5
1626 NFTA_CMP_UNSPEC = 0x0
1627 NFTA_CMP_SREG = 0x1
1628 NFTA_CMP_OP = 0x2
1629 NFTA_CMP_DATA = 0x3
1630 NFT_RANGE_EQ = 0x0
1631 NFT_RANGE_NEQ = 0x1
1632 NFTA_RANGE_UNSPEC = 0x0
1633 NFTA_RANGE_SREG = 0x1
1634 NFTA_RANGE_OP = 0x2
1635 NFTA_RANGE_FROM_DATA = 0x3
1636 NFTA_RANGE_TO_DATA = 0x4
1637 NFT_LOOKUP_F_INV = 0x1
1638 NFTA_LOOKUP_UNSPEC = 0x0
1639 NFTA_LOOKUP_SET = 0x1
1640 NFTA_LOOKUP_SREG = 0x2
1641 NFTA_LOOKUP_DREG = 0x3
1642 NFTA_LOOKUP_SET_ID = 0x4
1643 NFTA_LOOKUP_FLAGS = 0x5
1644 NFT_DYNSET_OP_ADD = 0x0
1645 NFT_DYNSET_OP_UPDATE = 0x1
1646 NFT_DYNSET_F_INV = 0x1
1647 NFTA_DYNSET_UNSPEC = 0x0
1648 NFTA_DYNSET_SET_NAME = 0x1
1649 NFTA_DYNSET_SET_ID = 0x2
1650 NFTA_DYNSET_OP = 0x3
1651 NFTA_DYNSET_SREG_KEY = 0x4
1652 NFTA_DYNSET_SREG_DATA = 0x5
1653 NFTA_DYNSET_TIMEOUT = 0x6
1654 NFTA_DYNSET_EXPR = 0x7
1655 NFTA_DYNSET_PAD = 0x8
1656 NFTA_DYNSET_FLAGS = 0x9
1657 NFT_PAYLOAD_LL_HEADER = 0x0
1658 NFT_PAYLOAD_NETWORK_HEADER = 0x1
1659 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
1660 NFT_PAYLOAD_CSUM_NONE = 0x0
1661 NFT_PAYLOAD_CSUM_INET = 0x1
1662 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
1663 NFTA_PAYLOAD_UNSPEC = 0x0
1664 NFTA_PAYLOAD_DREG = 0x1
1665 NFTA_PAYLOAD_BASE = 0x2
1666 NFTA_PAYLOAD_OFFSET = 0x3
1667 NFTA_PAYLOAD_LEN = 0x4
1668 NFTA_PAYLOAD_SREG = 0x5
1669 NFTA_PAYLOAD_CSUM_TYPE = 0x6
1670 NFTA_PAYLOAD_CSUM_OFFSET = 0x7
1671 NFTA_PAYLOAD_CSUM_FLAGS = 0x8
1672 NFT_EXTHDR_F_PRESENT = 0x1
1673 NFT_EXTHDR_OP_IPV6 = 0x0
1674 NFT_EXTHDR_OP_TCPOPT = 0x1
1675 NFTA_EXTHDR_UNSPEC = 0x0
1676 NFTA_EXTHDR_DREG = 0x1
1677 NFTA_EXTHDR_TYPE = 0x2
1678 NFTA_EXTHDR_OFFSET = 0x3
1679 NFTA_EXTHDR_LEN = 0x4
1680 NFTA_EXTHDR_FLAGS = 0x5
1681 NFTA_EXTHDR_OP = 0x6
1682 NFTA_EXTHDR_SREG = 0x7
1683 NFT_META_LEN = 0x0
1684 NFT_META_PROTOCOL = 0x1
1685 NFT_META_PRIORITY = 0x2
1686 NFT_META_MARK = 0x3
1687 NFT_META_IIF = 0x4
1688 NFT_META_OIF = 0x5
1689 NFT_META_IIFNAME = 0x6
1690 NFT_META_OIFNAME = 0x7
1691 NFT_META_IIFTYPE = 0x8
1692 NFT_META_OIFTYPE = 0x9
1693 NFT_META_SKUID = 0xa
1694 NFT_META_SKGID = 0xb
1695 NFT_META_NFTRACE = 0xc
1696 NFT_META_RTCLASSID = 0xd
1697 NFT_META_SECMARK = 0xe
1698 NFT_META_NFPROTO = 0xf
1699 NFT_META_L4PROTO = 0x10
1700 NFT_META_BRI_IIFNAME = 0x11
1701 NFT_META_BRI_OIFNAME = 0x12
1702 NFT_META_PKTTYPE = 0x13
1703 NFT_META_CPU = 0x14
1704 NFT_META_IIFGROUP = 0x15
1705 NFT_META_OIFGROUP = 0x16
1706 NFT_META_CGROUP = 0x17
1707 NFT_META_PRANDOM = 0x18
1708 NFT_RT_CLASSID = 0x0
1709 NFT_RT_NEXTHOP4 = 0x1
1710 NFT_RT_NEXTHOP6 = 0x2
1711 NFT_RT_TCPMSS = 0x3
1712 NFT_HASH_JENKINS = 0x0
1713 NFT_HASH_SYM = 0x1
1714 NFTA_HASH_UNSPEC = 0x0
1715 NFTA_HASH_SREG = 0x1
1716 NFTA_HASH_DREG = 0x2
1717 NFTA_HASH_LEN = 0x3
1718 NFTA_HASH_MODULUS = 0x4
1719 NFTA_HASH_SEED = 0x5
1720 NFTA_HASH_OFFSET = 0x6
1721 NFTA_HASH_TYPE = 0x7
1722 NFTA_META_UNSPEC = 0x0
1723 NFTA_META_DREG = 0x1
1724 NFTA_META_KEY = 0x2
1725 NFTA_META_SREG = 0x3
1726 NFTA_RT_UNSPEC = 0x0
1727 NFTA_RT_DREG = 0x1
1728 NFTA_RT_KEY = 0x2
1729 NFT_CT_STATE = 0x0
1730 NFT_CT_DIRECTION = 0x1
1731 NFT_CT_STATUS = 0x2
1732 NFT_CT_MARK = 0x3
1733 NFT_CT_SECMARK = 0x4
1734 NFT_CT_EXPIRATION = 0x5
1735 NFT_CT_HELPER = 0x6
1736 NFT_CT_L3PROTOCOL = 0x7
1737 NFT_CT_SRC = 0x8
1738 NFT_CT_DST = 0x9
1739 NFT_CT_PROTOCOL = 0xa
1740 NFT_CT_PROTO_SRC = 0xb
1741 NFT_CT_PROTO_DST = 0xc
1742 NFT_CT_LABELS = 0xd
1743 NFT_CT_PKTS = 0xe
1744 NFT_CT_BYTES = 0xf
1745 NFT_CT_AVGPKT = 0x10
1746 NFT_CT_ZONE = 0x11
1747 NFT_CT_EVENTMASK = 0x12
1748 NFTA_CT_UNSPEC = 0x0
1749 NFTA_CT_DREG = 0x1
1750 NFTA_CT_KEY = 0x2
1751 NFTA_CT_DIRECTION = 0x3
1752 NFTA_CT_SREG = 0x4
1753 NFT_LIMIT_PKTS = 0x0
1754 NFT_LIMIT_PKT_BYTES = 0x1
1755 NFT_LIMIT_F_INV = 0x1
1756 NFTA_LIMIT_UNSPEC = 0x0
1757 NFTA_LIMIT_RATE = 0x1
1758 NFTA_LIMIT_UNIT = 0x2
1759 NFTA_LIMIT_BURST = 0x3
1760 NFTA_LIMIT_TYPE = 0x4
1761 NFTA_LIMIT_FLAGS = 0x5
1762 NFTA_LIMIT_PAD = 0x6
1763 NFTA_COUNTER_UNSPEC = 0x0
1764 NFTA_COUNTER_BYTES = 0x1
1765 NFTA_COUNTER_PACKETS = 0x2
1766 NFTA_COUNTER_PAD = 0x3
1767 NFTA_LOG_UNSPEC = 0x0
1768 NFTA_LOG_GROUP = 0x1
1769 NFTA_LOG_PREFIX = 0x2
1770 NFTA_LOG_SNAPLEN = 0x3
1771 NFTA_LOG_QTHRESHOLD = 0x4
1772 NFTA_LOG_LEVEL = 0x5
1773 NFTA_LOG_FLAGS = 0x6
1774 NFTA_QUEUE_UNSPEC = 0x0
1775 NFTA_QUEUE_NUM = 0x1
1776 NFTA_QUEUE_TOTAL = 0x2
1777 NFTA_QUEUE_FLAGS = 0x3
1778 NFTA_QUEUE_SREG_QNUM = 0x4
1779 NFT_QUOTA_F_INV = 0x1
1780 NFT_QUOTA_F_DEPLETED = 0x2
1781 NFTA_QUOTA_UNSPEC = 0x0
1782 NFTA_QUOTA_BYTES = 0x1
1783 NFTA_QUOTA_FLAGS = 0x2
1784 NFTA_QUOTA_PAD = 0x3
1785 NFTA_QUOTA_CONSUMED = 0x4
1786 NFT_REJECT_ICMP_UNREACH = 0x0
1787 NFT_REJECT_TCP_RST = 0x1
1788 NFT_REJECT_ICMPX_UNREACH = 0x2
1789 NFT_REJECT_ICMPX_NO_ROUTE = 0x0
1790 NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
1791 NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
1792 NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
1793 NFTA_REJECT_UNSPEC = 0x0
1794 NFTA_REJECT_TYPE = 0x1
1795 NFTA_REJECT_ICMP_CODE = 0x2
1796 NFT_NAT_SNAT = 0x0
1797 NFT_NAT_DNAT = 0x1
1798 NFTA_NAT_UNSPEC = 0x0
1799 NFTA_NAT_TYPE = 0x1
1800 NFTA_NAT_FAMILY = 0x2
1801 NFTA_NAT_REG_ADDR_MIN = 0x3
1802 NFTA_NAT_REG_ADDR_MAX = 0x4
1803 NFTA_NAT_REG_PROTO_MIN = 0x5
1804 NFTA_NAT_REG_PROTO_MAX = 0x6
1805 NFTA_NAT_FLAGS = 0x7
1806 NFTA_MASQ_UNSPEC = 0x0
1807 NFTA_MASQ_FLAGS = 0x1
1808 NFTA_MASQ_REG_PROTO_MIN = 0x2
1809 NFTA_MASQ_REG_PROTO_MAX = 0x3
1810 NFTA_REDIR_UNSPEC = 0x0
1811 NFTA_REDIR_REG_PROTO_MIN = 0x1
1812 NFTA_REDIR_REG_PROTO_MAX = 0x2
1813 NFTA_REDIR_FLAGS = 0x3
1814 NFTA_DUP_UNSPEC = 0x0
1815 NFTA_DUP_SREG_ADDR = 0x1
1816 NFTA_DUP_SREG_DEV = 0x2
1817 NFTA_FWD_UNSPEC = 0x0
1818 NFTA_FWD_SREG_DEV = 0x1
1819 NFTA_OBJREF_UNSPEC = 0x0
1820 NFTA_OBJREF_IMM_TYPE = 0x1
1821 NFTA_OBJREF_IMM_NAME = 0x2
1822 NFTA_OBJREF_SET_SREG = 0x3
1823 NFTA_OBJREF_SET_NAME = 0x4
1824 NFTA_OBJREF_SET_ID = 0x5
1825 NFTA_GEN_UNSPEC = 0x0
1826 NFTA_GEN_ID = 0x1
1827 NFTA_GEN_PROC_PID = 0x2
1828 NFTA_GEN_PROC_NAME = 0x3
1829 NFTA_FIB_UNSPEC = 0x0
1830 NFTA_FIB_DREG = 0x1
1831 NFTA_FIB_RESULT = 0x2
1832 NFTA_FIB_FLAGS = 0x3
1833 NFT_FIB_RESULT_UNSPEC = 0x0
1834 NFT_FIB_RESULT_OIF = 0x1
1835 NFT_FIB_RESULT_OIFNAME = 0x2
1836 NFT_FIB_RESULT_ADDRTYPE = 0x3
1837 NFTA_FIB_F_SADDR = 0x1
1838 NFTA_FIB_F_DADDR = 0x2
1839 NFTA_FIB_F_MARK = 0x4
1840 NFTA_FIB_F_IIF = 0x8
1841 NFTA_FIB_F_OIF = 0x10
1842 NFTA_FIB_F_PRESENT = 0x20
1843 NFTA_CT_HELPER_UNSPEC = 0x0
1844 NFTA_CT_HELPER_NAME = 0x1
1845 NFTA_CT_HELPER_L3PROTO = 0x2
1846 NFTA_CT_HELPER_L4PROTO = 0x3
1847 NFTA_OBJ_UNSPEC = 0x0
1848 NFTA_OBJ_TABLE = 0x1
1849 NFTA_OBJ_NAME = 0x2
1850 NFTA_OBJ_TYPE = 0x3
1851 NFTA_OBJ_DATA = 0x4
1852 NFTA_OBJ_USE = 0x5
1853 NFTA_TRACE_UNSPEC = 0x0
1854 NFTA_TRACE_TABLE = 0x1
1855 NFTA_TRACE_CHAIN = 0x2
1856 NFTA_TRACE_RULE_HANDLE = 0x3
1857 NFTA_TRACE_TYPE = 0x4
1858 NFTA_TRACE_VERDICT = 0x5
1859 NFTA_TRACE_ID = 0x6
1860 NFTA_TRACE_LL_HEADER = 0x7
1861 NFTA_TRACE_NETWORK_HEADER = 0x8
1862 NFTA_TRACE_TRANSPORT_HEADER = 0x9
1863 NFTA_TRACE_IIF = 0xa
1864 NFTA_TRACE_IIFTYPE = 0xb
1865 NFTA_TRACE_OIF = 0xc
1866 NFTA_TRACE_OIFTYPE = 0xd
1867 NFTA_TRACE_MARK = 0xe
1868 NFTA_TRACE_NFPROTO = 0xf
1869 NFTA_TRACE_POLICY = 0x10
1870 NFTA_TRACE_PAD = 0x11
1871 NFT_TRACETYPE_UNSPEC = 0x0
1872 NFT_TRACETYPE_POLICY = 0x1
1873 NFT_TRACETYPE_RETURN = 0x2
1874 NFT_TRACETYPE_RULE = 0x3
1875 NFTA_NG_UNSPEC = 0x0
1876 NFTA_NG_DREG = 0x1
1877 NFTA_NG_MODULUS = 0x2
1878 NFTA_NG_TYPE = 0x3
1879 NFTA_NG_OFFSET = 0x4
1880 NFT_NG_INCREMENTAL = 0x0
1881 NFT_NG_RANDOM = 0x1
1882 )
1883
1884 type RTCTime struct {
1885 Sec int32
1886 Min int32
1887 Hour int32
1888 Mday int32
1889 Mon int32
1890 Year int32
1891 Wday int32
1892 Yday int32
1893 Isdst int32
1894 }
1895
1896 type RTCWkAlrm struct {
1897 Enabled uint8
1898 Pending uint8
1899 Time RTCTime
1900 }
1901
1902 type RTCPLLInfo struct {
1903 Ctrl int32
1904 Value int32
1905 Max int32
1906 Min int32
1907 Posmult int32
1908 Negmult int32
1909 Clock int64
1910 }
1911
1912 type BlkpgIoctlArg struct {
1913 Op int32
1914 Flags int32
1915 Datalen int32
1916 Data *byte
1917 }
1918
1919 type BlkpgPartition struct {
1920 Start int64
1921 Length int64
1922 Pno int32
1923 Devname [64]uint8
1924 Volname [64]uint8
1925 _ [4]byte
1926 }
1927
1928 const (
1929 BLKPG = 0x1269
1930 BLKPG_ADD_PARTITION = 0x1
1931 BLKPG_DEL_PARTITION = 0x2
1932 BLKPG_RESIZE_PARTITION = 0x3
1933 )
1934
1935 const (
1936 NETNSA_NONE = 0x0
1937 NETNSA_NSID = 0x1
1938 NETNSA_PID = 0x2
1939 NETNSA_FD = 0x3
1940 )
1941
1942 type XDPRingOffset struct {
1943 Producer uint64
1944 Consumer uint64
1945 Desc uint64
1946 }
1947
1948 type XDPMmapOffsets struct {
1949 Rx XDPRingOffset
1950 Tx XDPRingOffset
1951 Fr XDPRingOffset
1952 Cr XDPRingOffset
1953 }
1954
1955 type XDPUmemReg struct {
1956 Addr uint64
1957 Len uint64
1958 Size uint32
1959 Headroom uint32
1960 }
1961
1962 type XDPStatistics struct {
1963 Rx_dropped uint64
1964 Rx_invalid_descs uint64
1965 Tx_invalid_descs uint64
1966 }
1967
1968 type XDPDesc struct {
1969 Addr uint64
1970 Len uint32
1971 Options uint32
1972 }
1973
1974 const (
1975 NCSI_CMD_UNSPEC = 0x0
1976 NCSI_CMD_PKG_INFO = 0x1
1977 NCSI_CMD_SET_INTERFACE = 0x2
1978 NCSI_CMD_CLEAR_INTERFACE = 0x3
1979 NCSI_ATTR_UNSPEC = 0x0
1980 NCSI_ATTR_IFINDEX = 0x1
1981 NCSI_ATTR_PACKAGE_LIST = 0x2
1982 NCSI_ATTR_PACKAGE_ID = 0x3
1983 NCSI_ATTR_CHANNEL_ID = 0x4
1984 NCSI_PKG_ATTR_UNSPEC = 0x0
1985 NCSI_PKG_ATTR = 0x1
1986 NCSI_PKG_ATTR_ID = 0x2
1987 NCSI_PKG_ATTR_FORCED = 0x3
1988 NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
1989 NCSI_CHANNEL_ATTR_UNSPEC = 0x0
1990 NCSI_CHANNEL_ATTR = 0x1
1991 NCSI_CHANNEL_ATTR_ID = 0x2
1992 NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
1993 NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
1994 NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
1995 NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
1996 NCSI_CHANNEL_ATTR_ACTIVE = 0x7
1997 NCSI_CHANNEL_ATTR_FORCED = 0x8
1998 NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
1999 NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
2000 )
2001
2002 const (
2003 SOF_TIMESTAMPING_TX_HARDWARE = 0x1
2004 SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
2005 SOF_TIMESTAMPING_RX_HARDWARE = 0x4
2006 SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
2007 SOF_TIMESTAMPING_SOFTWARE = 0x10
2008 SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
2009 SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
2010 SOF_TIMESTAMPING_OPT_ID = 0x80
2011 SOF_TIMESTAMPING_TX_SCHED = 0x100
2012 SOF_TIMESTAMPING_TX_ACK = 0x200
2013 SOF_TIMESTAMPING_OPT_CMSG = 0x400
2014 SOF_TIMESTAMPING_OPT_TSONLY = 0x800
2015 SOF_TIMESTAMPING_OPT_STATS = 0x1000
2016 SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
2017 SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
2018
2019 SOF_TIMESTAMPING_LAST = 0x4000
2020 SOF_TIMESTAMPING_MASK = 0x7fff
2021 )
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
03 // +build sparc64,linux
1 // Created by cgo -godefs - DO NOT EDIT
2 // cgo -godefs types_linux.go | go run mkpost.go
34
45 package unix
56
67 const (
7 sizeofPtr = 0x8
8 sizeofShort = 0x2
9 sizeofInt = 0x4
10 sizeofLong = 0x8
11 sizeofLongLong = 0x8
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
1213 PathMax = 0x1000
1314 )
1415
2526 }
2627
2728 type Timeval struct {
28 Sec int64
29 Usec int32
30 Pad_cgo_0 [4]byte
29 Sec int64
30 Usec int32
31 _ [4]byte
3132 }
3233
3334 type Timex struct {
3435 Modes uint32
35 Pad_cgo_0 [4]byte
3636 Offset int64
3737 Freq int64
3838 Maxerror int64
3939 Esterror int64
4040 Status int32
41 Pad_cgo_1 [4]byte
4241 Constant int64
4342 Precision int64
4443 Tolerance int64
4746 Ppsfreq int64
4847 Jitter int64
4948 Shift int32
50 Pad_cgo_2 [4]byte
5149 Stabil int64
5250 Jitcnt int64
5351 Calcnt int64
5452 Errcnt int64
5553 Stbcnt int64
5654 Tai int32
57 Pad_cgo_3 [44]byte
55 _ [44]byte
5856 }
5957
6058 type Time_t int64
9896 type _Gid_t uint32
9997
10098 type Stat_t struct {
101 Dev uint64
102 X__pad1 uint16
103 Pad_cgo_0 [6]byte
104 Ino uint64
105 Mode uint32
106 Nlink uint32
107 Uid uint32
108 Gid uint32
109 Rdev uint64
110 X__pad2 uint16
111 Pad_cgo_1 [6]byte
112 Size int64
113 Blksize int64
114 Blocks int64
115 Atim Timespec
116 Mtim Timespec
117 Ctim Timespec
118 X__glibc_reserved4 uint64
119 X__glibc_reserved5 uint64
120 }
121
122 type Statfs_t struct {
123 Type int64
124 Bsize int64
125 Blocks uint64
126 Bfree uint64
127 Bavail uint64
128 Files uint64
129 Ffree uint64
130 Fsid Fsid
131 Namelen int64
132 Frsize int64
133 Flags int64
134 Spare [4]int64
99 Dev uint64
100 _ uint16
101 Ino uint64
102 Mode uint32
103 Nlink uint32
104 Uid uint32
105 Gid uint32
106 Rdev uint64
107 _ uint16
108 Size int64
109 Blksize int64
110 Blocks int64
111 Atim Timespec
112 Mtim Timespec
113 Ctim Timespec
114 _ uint64
115 _ uint64
116 }
117
118 type StatxTimestamp struct {
119 Sec int64
120 Nsec uint32
121 _ int32
122 }
123
124 type Statx_t struct {
125 Mask uint32
126 Blksize uint32
127 Attributes uint64
128 Nlink uint32
129 Uid uint32
130 Gid uint32
131 Mode uint16
132 _ [1]uint16
133 Ino uint64
134 Size uint64
135 Blocks uint64
136 Attributes_mask uint64
137 Atime StatxTimestamp
138 Btime StatxTimestamp
139 Ctime StatxTimestamp
140 Mtime StatxTimestamp
141 Rdev_major uint32
142 Rdev_minor uint32
143 Dev_major uint32
144 Dev_minor uint32
145 _ [14]uint64
135146 }
136147
137148 type Dirent struct {
138 Ino uint64
139 Off int64
140 Reclen uint16
141 Type uint8
142 Name [256]int8
143 Pad_cgo_0 [5]byte
149 Ino uint64
150 Off int64
151 Reclen uint16
152 Type uint8
153 Name [256]int8
154 _ [5]byte
144155 }
145156
146157 type Fsid struct {
147 X__val [2]int32
158 Val [2]int32
148159 }
149160
150161 type Flock_t struct {
151 Type int16
152 Whence int16
153 Pad_cgo_0 [4]byte
154 Start int64
155 Len int64
156 Pid int32
157 X__glibc_reserved int16
158 Pad_cgo_1 [2]byte
162 Type int16
163 Whence int16
164 Start int64
165 Len int64
166 Pid int32
167 _ int16
168 _ [2]byte
169 }
170
171 type FscryptPolicy struct {
172 Version uint8
173 Contents_encryption_mode uint8
174 Filenames_encryption_mode uint8
175 Flags uint8
176 Master_key_descriptor [8]uint8
177 }
178
179 type FscryptKey struct {
180 Mode uint32
181 Raw [64]uint8
182 Size uint32
183 }
184
185 type KeyctlDHParams struct {
186 Private int32
187 Prime int32
188 Base int32
159189 }
160190
161191 const (
210240 Channel uint16
211241 }
212242
243 type RawSockaddrL2 struct {
244 Family uint16
245 Psm uint16
246 Bdaddr [6]uint8
247 Cid uint16
248 Bdaddr_type uint8
249 _ [1]byte
250 }
251
252 type RawSockaddrRFCOMM struct {
253 Family uint16
254 Bdaddr [6]uint8
255 Channel uint8
256 _ [1]byte
257 }
258
213259 type RawSockaddrCAN struct {
214 Family uint16
215 Pad_cgo_0 [2]byte
216 Ifindex int32
217 Addr [8]byte
260 Family uint16
261 Ifindex int32
262 Addr [8]byte
218263 }
219264
220265 type RawSockaddrALG struct {
233278 Zero [4]uint8
234279 }
235280
281 type RawSockaddrXDP struct {
282 Family uint16
283 Flags uint16
284 Ifindex uint32
285 Queue_id uint32
286 Shared_umem_fd uint32
287 }
288
289 type RawSockaddrPPPoX [0x1e]byte
290
236291 type RawSockaddr struct {
237292 Family uint16
238293 Data [14]int8
271326 Interface uint32
272327 }
273328
329 type PacketMreq struct {
330 Ifindex int32
331 Type uint16
332 Alen uint16
333 Address [8]uint8
334 }
335
274336 type Msghdr struct {
275337 Name *byte
276338 Namelen uint32
277 Pad_cgo_0 [4]byte
278339 Iov *Iovec
279340 Iovlen uint64
280341 Control *byte
281342 Controllen uint64
282343 Flags int32
283 Pad_cgo_1 [4]byte
344 _ [4]byte
284345 }
285346
286347 type Cmsghdr struct {
322383 Probes uint8
323384 Backoff uint8
324385 Options uint8
325 Pad_cgo_0 [2]byte
326386 Rto uint32
327387 Ato uint32
328388 Snd_mss uint32
357417 SizeofSockaddrLinklayer = 0x14
358418 SizeofSockaddrNetlink = 0xc
359419 SizeofSockaddrHCI = 0x6
420 SizeofSockaddrL2 = 0xe
421 SizeofSockaddrRFCOMM = 0xa
360422 SizeofSockaddrCAN = 0x10
361423 SizeofSockaddrALG = 0x58
362424 SizeofSockaddrVM = 0x10
425 SizeofSockaddrXDP = 0x10
426 SizeofSockaddrPPPoX = 0x1e
363427 SizeofLinger = 0x8
428 SizeofIovec = 0x10
364429 SizeofIPMreq = 0x8
365430 SizeofIPMreqn = 0xc
366431 SizeofIPv6Mreq = 0x14
432 SizeofPacketMreq = 0x10
367433 SizeofMsghdr = 0x38
368434 SizeofCmsghdr = 0x10
369435 SizeofInet4Pktinfo = 0xc
375441 )
376442
377443 const (
378 IFA_UNSPEC = 0x0
379 IFA_ADDRESS = 0x1
380 IFA_LOCAL = 0x2
381 IFA_LABEL = 0x3
382 IFA_BROADCAST = 0x4
383 IFA_ANYCAST = 0x5
384 IFA_CACHEINFO = 0x6
385 IFA_MULTICAST = 0x7
386 IFLA_UNSPEC = 0x0
387 IFLA_ADDRESS = 0x1
388 IFLA_BROADCAST = 0x2
389 IFLA_IFNAME = 0x3
390 IFLA_MTU = 0x4
391 IFLA_LINK = 0x5
392 IFLA_QDISC = 0x6
393 IFLA_STATS = 0x7
394 IFLA_COST = 0x8
395 IFLA_PRIORITY = 0x9
396 IFLA_MASTER = 0xa
397 IFLA_WIRELESS = 0xb
398 IFLA_PROTINFO = 0xc
399 IFLA_TXQLEN = 0xd
400 IFLA_MAP = 0xe
401 IFLA_WEIGHT = 0xf
402 IFLA_OPERSTATE = 0x10
403 IFLA_LINKMODE = 0x11
404 IFLA_LINKINFO = 0x12
405 IFLA_NET_NS_PID = 0x13
406 IFLA_IFALIAS = 0x14
407 IFLA_MAX = 0x2a
408 RT_SCOPE_UNIVERSE = 0x0
409 RT_SCOPE_SITE = 0xc8
410 RT_SCOPE_LINK = 0xfd
411 RT_SCOPE_HOST = 0xfe
412 RT_SCOPE_NOWHERE = 0xff
413 RT_TABLE_UNSPEC = 0x0
414 RT_TABLE_COMPAT = 0xfc
415 RT_TABLE_DEFAULT = 0xfd
416 RT_TABLE_MAIN = 0xfe
417 RT_TABLE_LOCAL = 0xff
418 RT_TABLE_MAX = 0xffffffff
419 RTA_UNSPEC = 0x0
420 RTA_DST = 0x1
421 RTA_SRC = 0x2
422 RTA_IIF = 0x3
423 RTA_OIF = 0x4
424 RTA_GATEWAY = 0x5
425 RTA_PRIORITY = 0x6
426 RTA_PREFSRC = 0x7
427 RTA_METRICS = 0x8
428 RTA_MULTIPATH = 0x9
429 RTA_FLOW = 0xb
430 RTA_CACHEINFO = 0xc
431 RTA_TABLE = 0xf
432 RTN_UNSPEC = 0x0
433 RTN_UNICAST = 0x1
434 RTN_LOCAL = 0x2
435 RTN_BROADCAST = 0x3
436 RTN_ANYCAST = 0x4
437 RTN_MULTICAST = 0x5
438 RTN_BLACKHOLE = 0x6
439 RTN_UNREACHABLE = 0x7
440 RTN_PROHIBIT = 0x8
441 RTN_THROW = 0x9
442 RTN_NAT = 0xa
443 RTN_XRESOLVE = 0xb
444 RTNLGRP_NONE = 0x0
445 RTNLGRP_LINK = 0x1
446 RTNLGRP_NOTIFY = 0x2
447 RTNLGRP_NEIGH = 0x3
448 RTNLGRP_TC = 0x4
449 RTNLGRP_IPV4_IFADDR = 0x5
450 RTNLGRP_IPV4_MROUTE = 0x6
451 RTNLGRP_IPV4_ROUTE = 0x7
452 RTNLGRP_IPV4_RULE = 0x8
453 RTNLGRP_IPV6_IFADDR = 0x9
454 RTNLGRP_IPV6_MROUTE = 0xa
455 RTNLGRP_IPV6_ROUTE = 0xb
456 RTNLGRP_IPV6_IFINFO = 0xc
457 RTNLGRP_IPV6_PREFIX = 0x12
458 RTNLGRP_IPV6_RULE = 0x13
459 RTNLGRP_ND_USEROPT = 0x14
460 SizeofNlMsghdr = 0x10
461 SizeofNlMsgerr = 0x14
462 SizeofRtGenmsg = 0x1
463 SizeofNlAttr = 0x4
464 SizeofRtAttr = 0x4
465 SizeofIfInfomsg = 0x10
466 SizeofIfAddrmsg = 0x8
467 SizeofRtMsg = 0xc
468 SizeofRtNexthop = 0x8
444 IFA_UNSPEC = 0x0
445 IFA_ADDRESS = 0x1
446 IFA_LOCAL = 0x2
447 IFA_LABEL = 0x3
448 IFA_BROADCAST = 0x4
449 IFA_ANYCAST = 0x5
450 IFA_CACHEINFO = 0x6
451 IFA_MULTICAST = 0x7
452 IFLA_UNSPEC = 0x0
453 IFLA_ADDRESS = 0x1
454 IFLA_BROADCAST = 0x2
455 IFLA_IFNAME = 0x3
456 IFLA_INFO_KIND = 0x1
457 IFLA_MTU = 0x4
458 IFLA_LINK = 0x5
459 IFLA_QDISC = 0x6
460 IFLA_STATS = 0x7
461 IFLA_COST = 0x8
462 IFLA_PRIORITY = 0x9
463 IFLA_MASTER = 0xa
464 IFLA_WIRELESS = 0xb
465 IFLA_PROTINFO = 0xc
466 IFLA_TXQLEN = 0xd
467 IFLA_MAP = 0xe
468 IFLA_WEIGHT = 0xf
469 IFLA_OPERSTATE = 0x10
470 IFLA_LINKMODE = 0x11
471 IFLA_LINKINFO = 0x12
472 IFLA_NET_NS_PID = 0x13
473 IFLA_IFALIAS = 0x14
474 IFLA_NUM_VF = 0x15
475 IFLA_VFINFO_LIST = 0x16
476 IFLA_STATS64 = 0x17
477 IFLA_VF_PORTS = 0x18
478 IFLA_PORT_SELF = 0x19
479 IFLA_AF_SPEC = 0x1a
480 IFLA_GROUP = 0x1b
481 IFLA_NET_NS_FD = 0x1c
482 IFLA_EXT_MASK = 0x1d
483 IFLA_PROMISCUITY = 0x1e
484 IFLA_NUM_TX_QUEUES = 0x1f
485 IFLA_NUM_RX_QUEUES = 0x20
486 IFLA_CARRIER = 0x21
487 IFLA_PHYS_PORT_ID = 0x22
488 IFLA_CARRIER_CHANGES = 0x23
489 IFLA_PHYS_SWITCH_ID = 0x24
490 IFLA_LINK_NETNSID = 0x25
491 IFLA_PHYS_PORT_NAME = 0x26
492 IFLA_PROTO_DOWN = 0x27
493 IFLA_GSO_MAX_SEGS = 0x28
494 IFLA_GSO_MAX_SIZE = 0x29
495 IFLA_PAD = 0x2a
496 IFLA_XDP = 0x2b
497 IFLA_EVENT = 0x2c
498 IFLA_NEW_NETNSID = 0x2d
499 IFLA_IF_NETNSID = 0x2e
500 IFLA_MAX = 0x33
501 RT_SCOPE_UNIVERSE = 0x0
502 RT_SCOPE_SITE = 0xc8
503 RT_SCOPE_LINK = 0xfd
504 RT_SCOPE_HOST = 0xfe
505 RT_SCOPE_NOWHERE = 0xff
506 RT_TABLE_UNSPEC = 0x0
507 RT_TABLE_COMPAT = 0xfc
508 RT_TABLE_DEFAULT = 0xfd
509 RT_TABLE_MAIN = 0xfe
510 RT_TABLE_LOCAL = 0xff
511 RT_TABLE_MAX = 0xffffffff
512 RTA_UNSPEC = 0x0
513 RTA_DST = 0x1
514 RTA_SRC = 0x2
515 RTA_IIF = 0x3
516 RTA_OIF = 0x4
517 RTA_GATEWAY = 0x5
518 RTA_PRIORITY = 0x6
519 RTA_PREFSRC = 0x7
520 RTA_METRICS = 0x8
521 RTA_MULTIPATH = 0x9
522 RTA_FLOW = 0xb
523 RTA_CACHEINFO = 0xc
524 RTA_TABLE = 0xf
525 RTA_MARK = 0x10
526 RTA_MFC_STATS = 0x11
527 RTA_VIA = 0x12
528 RTA_NEWDST = 0x13
529 RTA_PREF = 0x14
530 RTA_ENCAP_TYPE = 0x15
531 RTA_ENCAP = 0x16
532 RTA_EXPIRES = 0x17
533 RTA_PAD = 0x18
534 RTA_UID = 0x19
535 RTA_TTL_PROPAGATE = 0x1a
536 RTA_IP_PROTO = 0x1b
537 RTA_SPORT = 0x1c
538 RTA_DPORT = 0x1d
539 RTN_UNSPEC = 0x0
540 RTN_UNICAST = 0x1
541 RTN_LOCAL = 0x2
542 RTN_BROADCAST = 0x3
543 RTN_ANYCAST = 0x4
544 RTN_MULTICAST = 0x5
545 RTN_BLACKHOLE = 0x6
546 RTN_UNREACHABLE = 0x7
547 RTN_PROHIBIT = 0x8
548 RTN_THROW = 0x9
549 RTN_NAT = 0xa
550 RTN_XRESOLVE = 0xb
551 RTNLGRP_NONE = 0x0
552 RTNLGRP_LINK = 0x1
553 RTNLGRP_NOTIFY = 0x2
554 RTNLGRP_NEIGH = 0x3
555 RTNLGRP_TC = 0x4
556 RTNLGRP_IPV4_IFADDR = 0x5
557 RTNLGRP_IPV4_MROUTE = 0x6
558 RTNLGRP_IPV4_ROUTE = 0x7
559 RTNLGRP_IPV4_RULE = 0x8
560 RTNLGRP_IPV6_IFADDR = 0x9
561 RTNLGRP_IPV6_MROUTE = 0xa
562 RTNLGRP_IPV6_ROUTE = 0xb
563 RTNLGRP_IPV6_IFINFO = 0xc
564 RTNLGRP_IPV6_PREFIX = 0x12
565 RTNLGRP_IPV6_RULE = 0x13
566 RTNLGRP_ND_USEROPT = 0x14
567 SizeofNlMsghdr = 0x10
568 SizeofNlMsgerr = 0x14
569 SizeofRtGenmsg = 0x1
570 SizeofNlAttr = 0x4
571 SizeofRtAttr = 0x4
572 SizeofIfInfomsg = 0x10
573 SizeofIfAddrmsg = 0x8
574 SizeofRtMsg = 0xc
575 SizeofRtNexthop = 0x8
469576 )
470577
471578 type NlMsghdr struct {
496603 }
497604
498605 type IfInfomsg struct {
499 Family uint8
500 X__ifi_pad uint8
501 Type uint16
502 Index int32
503 Flags uint32
504 Change uint32
606 Family uint8
607 _ uint8
608 Type uint16
609 Index int32
610 Flags uint32
611 Change uint32
505612 }
506613
507614 type IfAddrmsg struct {
544651 }
545652
546653 type SockFprog struct {
547 Len uint16
548 Pad_cgo_0 [6]byte
549 Filter *SockFilter
654 Len uint16
655 Filter *SockFilter
550656 }
551657
552658 type InotifyEvent struct {
565671 Tnpc uint64
566672 Y uint32
567673 Magic uint32
568 }
569
570 type ptracePsw struct {
571 }
572
573 type ptraceFpregs struct {
574 }
575
576 type ptracePer struct {
577674 }
578675
579676 type FdSet struct {
591688 Freeswap uint64
592689 Procs uint16
593690 Pad uint16
594 Pad_cgo_0 [4]byte
595691 Totalhigh uint64
596692 Freehigh uint64
597693 Unit uint32
598 X_f [0]int8
599 Pad_cgo_1 [4]byte
694 _ [0]int8
695 _ [4]byte
600696 }
601697
602698 type Utsname struct {
603 Sysname [65]int8
604 Nodename [65]int8
605 Release [65]int8
606 Version [65]int8
607 Machine [65]int8
608 Domainname [65]int8
699 Sysname [65]byte
700 Nodename [65]byte
701 Release [65]byte
702 Version [65]byte
703 Machine [65]byte
704 Domainname [65]byte
609705 }
610706
611707 type Ustat_t struct {
612 Tfree int32
613 Pad_cgo_0 [4]byte
614 Tinode uint64
615 Fname [6]int8
616 Fpack [6]int8
617 Pad_cgo_1 [4]byte
708 Tfree int32
709 Tinode uint64
710 Fname [6]int8
711 Fpack [6]int8
712 _ [4]byte
618713 }
619714
620715 type EpollEvent struct {
621 Events uint32
622 X_padFd int32
623 Fd int32
624 Pad int32
625 }
626
627 const (
628 AT_FDCWD = -0x64
629 AT_REMOVEDIR = 0x200
716 Events uint32
717 _ int32
718 Fd int32
719 Pad int32
720 }
721
722 const (
723 AT_EMPTY_PATH = 0x1000
724 AT_FDCWD = -0x64
725 AT_NO_AUTOMOUNT = 0x800
726 AT_REMOVEDIR = 0x200
727
728 AT_STATX_SYNC_AS_STAT = 0x0
729 AT_STATX_FORCE_SYNC = 0x2000
730 AT_STATX_DONT_SYNC = 0x4000
731
630732 AT_SYMLINK_FOLLOW = 0x400
631733 AT_SYMLINK_NOFOLLOW = 0x100
734
735 AT_EACCESS = 0x200
632736 )
633737
634738 type PollFd struct {
648752 )
649753
650754 type Sigset_t struct {
651 X__val [16]uint64
652 }
653
654 const _SC_PAGESIZE = 0x1e
755 Val [16]uint64
756 }
757
758 type SignalfdSiginfo struct {
759 Signo uint32
760 Errno int32
761 Code int32
762 Pid uint32
763 Uid uint32
764 Fd int32
765 Tid uint32
766 Band uint32
767 Overrun uint32
768 Trapno uint32
769 Status int32
770 Int int32
771 Ptr uint64
772 Utime uint64
773 Stime uint64
774 Addr uint64
775 _ [48]uint8
776 }
777
778 const RNDGETENTCNT = 0x40045200
779
780 const PERF_IOC_FLAG_GROUP = 0x1
655781
656782 type Termios struct {
657783 Iflag uint32
663789 Ispeed uint32
664790 Ospeed uint32
665791 }
792
793 type Winsize struct {
794 Row uint16
795 Col uint16
796 Xpixel uint16
797 Ypixel uint16
798 }
799
800 type Taskstats struct {
801 Version uint16
802 Ac_exitcode uint32
803 Ac_flag uint8
804 Ac_nice uint8
805 Cpu_count uint64
806 Cpu_delay_total uint64
807 Blkio_count uint64
808 Blkio_delay_total uint64
809 Swapin_count uint64
810 Swapin_delay_total uint64
811 Cpu_run_real_total uint64
812 Cpu_run_virtual_total uint64
813 Ac_comm [32]int8
814 Ac_sched uint8
815 Ac_pad [3]uint8
816 _ [4]byte
817 Ac_uid uint32
818 Ac_gid uint32
819 Ac_pid uint32
820 Ac_ppid uint32
821 Ac_btime uint32
822 Ac_etime uint64
823 Ac_utime uint64
824 Ac_stime uint64
825 Ac_minflt uint64
826 Ac_majflt uint64
827 Coremem uint64
828 Virtmem uint64
829 Hiwater_rss uint64
830 Hiwater_vm uint64
831 Read_char uint64
832 Write_char uint64
833 Read_syscalls uint64
834 Write_syscalls uint64
835 Read_bytes uint64
836 Write_bytes uint64
837 Cancelled_write_bytes uint64
838 Nvcsw uint64
839 Nivcsw uint64
840 Ac_utimescaled uint64
841 Ac_stimescaled uint64
842 Cpu_scaled_run_real_total uint64
843 Freepages_count uint64
844 Freepages_delay_total uint64
845 Thrashing_count uint64
846 Thrashing_delay_total uint64
847 }
848
849 const (
850 TASKSTATS_CMD_UNSPEC = 0x0
851 TASKSTATS_CMD_GET = 0x1
852 TASKSTATS_CMD_NEW = 0x2
853 TASKSTATS_TYPE_UNSPEC = 0x0
854 TASKSTATS_TYPE_PID = 0x1
855 TASKSTATS_TYPE_TGID = 0x2
856 TASKSTATS_TYPE_STATS = 0x3
857 TASKSTATS_TYPE_AGGR_PID = 0x4
858 TASKSTATS_TYPE_AGGR_TGID = 0x5
859 TASKSTATS_TYPE_NULL = 0x6
860 TASKSTATS_CMD_ATTR_UNSPEC = 0x0
861 TASKSTATS_CMD_ATTR_PID = 0x1
862 TASKSTATS_CMD_ATTR_TGID = 0x2
863 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
864 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
865 )
866
867 type CGroupStats struct {
868 Sleeping uint64
869 Running uint64
870 Stopped uint64
871 Uninterruptible uint64
872 Io_wait uint64
873 }
874
875 const (
876 CGROUPSTATS_CMD_UNSPEC = 0x3
877 CGROUPSTATS_CMD_GET = 0x4
878 CGROUPSTATS_CMD_NEW = 0x5
879 CGROUPSTATS_TYPE_UNSPEC = 0x0
880 CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
881 CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
882 CGROUPSTATS_CMD_ATTR_FD = 0x1
883 )
884
885 type Genlmsghdr struct {
886 Cmd uint8
887 Version uint8
888 Reserved uint16
889 }
890
891 const (
892 CTRL_CMD_UNSPEC = 0x0
893 CTRL_CMD_NEWFAMILY = 0x1
894 CTRL_CMD_DELFAMILY = 0x2
895 CTRL_CMD_GETFAMILY = 0x3
896 CTRL_CMD_NEWOPS = 0x4
897 CTRL_CMD_DELOPS = 0x5
898 CTRL_CMD_GETOPS = 0x6
899 CTRL_CMD_NEWMCAST_GRP = 0x7
900 CTRL_CMD_DELMCAST_GRP = 0x8
901 CTRL_CMD_GETMCAST_GRP = 0x9
902 CTRL_ATTR_UNSPEC = 0x0
903 CTRL_ATTR_FAMILY_ID = 0x1
904 CTRL_ATTR_FAMILY_NAME = 0x2
905 CTRL_ATTR_VERSION = 0x3
906 CTRL_ATTR_HDRSIZE = 0x4
907 CTRL_ATTR_MAXATTR = 0x5
908 CTRL_ATTR_OPS = 0x6
909 CTRL_ATTR_MCAST_GROUPS = 0x7
910 CTRL_ATTR_OP_UNSPEC = 0x0
911 CTRL_ATTR_OP_ID = 0x1
912 CTRL_ATTR_OP_FLAGS = 0x2
913 CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
914 CTRL_ATTR_MCAST_GRP_NAME = 0x1
915 CTRL_ATTR_MCAST_GRP_ID = 0x2
916 )
917
918 type cpuMask uint64
919
920 const (
921 _CPU_SETSIZE = 0x400
922 _NCPUBITS = 0x40
923 )
924
925 const (
926 BDADDR_BREDR = 0x0
927 BDADDR_LE_PUBLIC = 0x1
928 BDADDR_LE_RANDOM = 0x2
929 )
930
931 type PerfEventAttr struct {
932 Type uint32
933 Size uint32
934 Config uint64
935 Sample uint64
936 Sample_type uint64
937 Read_format uint64
938 Bits uint64
939 Wakeup uint32
940 Bp_type uint32
941 Ext1 uint64
942 Ext2 uint64
943 Branch_sample_type uint64
944 Sample_regs_user uint64
945 Sample_stack_user uint32
946 Clockid int32
947 Sample_regs_intr uint64
948 Aux_watermark uint32
949 _ uint32
950 }
951
952 type PerfEventMmapPage struct {
953 Version uint32
954 Compat_version uint32
955 Lock uint32
956 Index uint32
957 Offset int64
958 Time_enabled uint64
959 Time_running uint64
960 Capabilities uint64
961 Pmc_width uint16
962 Time_shift uint16
963 Time_mult uint32
964 Time_offset uint64
965 Time_zero uint64
966 Size uint32
967 _ [948]uint8
968 Data_head uint64
969 Data_tail uint64
970 Data_offset uint64
971 Data_size uint64
972 Aux_head uint64
973 Aux_tail uint64
974 Aux_offset uint64
975 Aux_size uint64
976 }
977
978 const (
979 PerfBitDisabled uint64 = CBitFieldMaskBit0
980 PerfBitInherit = CBitFieldMaskBit1
981 PerfBitPinned = CBitFieldMaskBit2
982 PerfBitExclusive = CBitFieldMaskBit3
983 PerfBitExcludeUser = CBitFieldMaskBit4
984 PerfBitExcludeKernel = CBitFieldMaskBit5
985 PerfBitExcludeHv = CBitFieldMaskBit6
986 PerfBitExcludeIdle = CBitFieldMaskBit7
987 PerfBitMmap = CBitFieldMaskBit8
988 PerfBitComm = CBitFieldMaskBit9
989 PerfBitFreq = CBitFieldMaskBit10
990 PerfBitInheritStat = CBitFieldMaskBit11
991 PerfBitEnableOnExec = CBitFieldMaskBit12
992 PerfBitTask = CBitFieldMaskBit13
993 PerfBitWatermark = CBitFieldMaskBit14
994 PerfBitPreciseIPBit1 = CBitFieldMaskBit15
995 PerfBitPreciseIPBit2 = CBitFieldMaskBit16
996 PerfBitMmapData = CBitFieldMaskBit17
997 PerfBitSampleIDAll = CBitFieldMaskBit18
998 PerfBitExcludeHost = CBitFieldMaskBit19
999 PerfBitExcludeGuest = CBitFieldMaskBit20
1000 PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
1001 PerfBitExcludeCallchainUser = CBitFieldMaskBit22
1002 PerfBitMmap2 = CBitFieldMaskBit23
1003 PerfBitCommExec = CBitFieldMaskBit24
1004 PerfBitUseClockID = CBitFieldMaskBit25
1005 PerfBitContextSwitch = CBitFieldMaskBit26
1006 )
1007
1008 const (
1009 PERF_TYPE_HARDWARE = 0x0
1010 PERF_TYPE_SOFTWARE = 0x1
1011 PERF_TYPE_TRACEPOINT = 0x2
1012 PERF_TYPE_HW_CACHE = 0x3
1013 PERF_TYPE_RAW = 0x4
1014 PERF_TYPE_BREAKPOINT = 0x5
1015
1016 PERF_COUNT_HW_CPU_CYCLES = 0x0
1017 PERF_COUNT_HW_INSTRUCTIONS = 0x1
1018 PERF_COUNT_HW_CACHE_REFERENCES = 0x2
1019 PERF_COUNT_HW_CACHE_MISSES = 0x3
1020 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
1021 PERF_COUNT_HW_BRANCH_MISSES = 0x5
1022 PERF_COUNT_HW_BUS_CYCLES = 0x6
1023 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
1024 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
1025 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
1026
1027 PERF_COUNT_HW_CACHE_L1D = 0x0
1028 PERF_COUNT_HW_CACHE_L1I = 0x1
1029 PERF_COUNT_HW_CACHE_LL = 0x2
1030 PERF_COUNT_HW_CACHE_DTLB = 0x3
1031 PERF_COUNT_HW_CACHE_ITLB = 0x4
1032 PERF_COUNT_HW_CACHE_BPU = 0x5
1033 PERF_COUNT_HW_CACHE_NODE = 0x6
1034
1035 PERF_COUNT_HW_CACHE_OP_READ = 0x0
1036 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
1037 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
1038
1039 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
1040 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
1041
1042 PERF_COUNT_SW_CPU_CLOCK = 0x0
1043 PERF_COUNT_SW_TASK_CLOCK = 0x1
1044 PERF_COUNT_SW_PAGE_FAULTS = 0x2
1045 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
1046 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
1047 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
1048 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
1049 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
1050 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
1051 PERF_COUNT_SW_DUMMY = 0x9
1052
1053 PERF_SAMPLE_IP = 0x1
1054 PERF_SAMPLE_TID = 0x2
1055 PERF_SAMPLE_TIME = 0x4
1056 PERF_SAMPLE_ADDR = 0x8
1057 PERF_SAMPLE_READ = 0x10
1058 PERF_SAMPLE_CALLCHAIN = 0x20
1059 PERF_SAMPLE_ID = 0x40
1060 PERF_SAMPLE_CPU = 0x80
1061 PERF_SAMPLE_PERIOD = 0x100
1062 PERF_SAMPLE_STREAM_ID = 0x200
1063 PERF_SAMPLE_RAW = 0x400
1064 PERF_SAMPLE_BRANCH_STACK = 0x800
1065
1066 PERF_SAMPLE_BRANCH_USER = 0x1
1067 PERF_SAMPLE_BRANCH_KERNEL = 0x2
1068 PERF_SAMPLE_BRANCH_HV = 0x4
1069 PERF_SAMPLE_BRANCH_ANY = 0x8
1070 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
1071 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
1072 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
1073
1074 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
1075 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
1076 PERF_FORMAT_ID = 0x4
1077 PERF_FORMAT_GROUP = 0x8
1078
1079 PERF_RECORD_MMAP = 0x1
1080 PERF_RECORD_LOST = 0x2
1081 PERF_RECORD_COMM = 0x3
1082 PERF_RECORD_EXIT = 0x4
1083 PERF_RECORD_THROTTLE = 0x5
1084 PERF_RECORD_UNTHROTTLE = 0x6
1085 PERF_RECORD_FORK = 0x7
1086 PERF_RECORD_READ = 0x8
1087 PERF_RECORD_SAMPLE = 0x9
1088
1089 PERF_CONTEXT_HV = -0x20
1090 PERF_CONTEXT_KERNEL = -0x80
1091 PERF_CONTEXT_USER = -0x200
1092
1093 PERF_CONTEXT_GUEST = -0x800
1094 PERF_CONTEXT_GUEST_KERNEL = -0x880
1095 PERF_CONTEXT_GUEST_USER = -0xa00
1096
1097 PERF_FLAG_FD_NO_GROUP = 0x1
1098 PERF_FLAG_FD_OUTPUT = 0x2
1099 PERF_FLAG_PID_CGROUP = 0x4
1100 )
1101
1102 const (
1103 CBitFieldMaskBit0 = 0x8000000000000000
1104 CBitFieldMaskBit1 = 0x4000000000000000
1105 CBitFieldMaskBit2 = 0x2000000000000000
1106 CBitFieldMaskBit3 = 0x1000000000000000
1107 CBitFieldMaskBit4 = 0x800000000000000
1108 CBitFieldMaskBit5 = 0x400000000000000
1109 CBitFieldMaskBit6 = 0x200000000000000
1110 CBitFieldMaskBit7 = 0x100000000000000
1111 CBitFieldMaskBit8 = 0x80000000000000
1112 CBitFieldMaskBit9 = 0x40000000000000
1113 CBitFieldMaskBit10 = 0x20000000000000
1114 CBitFieldMaskBit11 = 0x10000000000000
1115 CBitFieldMaskBit12 = 0x8000000000000
1116 CBitFieldMaskBit13 = 0x4000000000000
1117 CBitFieldMaskBit14 = 0x2000000000000
1118 CBitFieldMaskBit15 = 0x1000000000000
1119 CBitFieldMaskBit16 = 0x800000000000
1120 CBitFieldMaskBit17 = 0x400000000000
1121 CBitFieldMaskBit18 = 0x200000000000
1122 CBitFieldMaskBit19 = 0x100000000000
1123 CBitFieldMaskBit20 = 0x80000000000
1124 CBitFieldMaskBit21 = 0x40000000000
1125 CBitFieldMaskBit22 = 0x20000000000
1126 CBitFieldMaskBit23 = 0x10000000000
1127 CBitFieldMaskBit24 = 0x8000000000
1128 CBitFieldMaskBit25 = 0x4000000000
1129 CBitFieldMaskBit26 = 0x2000000000
1130 CBitFieldMaskBit27 = 0x1000000000
1131 CBitFieldMaskBit28 = 0x800000000
1132 CBitFieldMaskBit29 = 0x400000000
1133 CBitFieldMaskBit30 = 0x200000000
1134 CBitFieldMaskBit31 = 0x100000000
1135 CBitFieldMaskBit32 = 0x80000000
1136 CBitFieldMaskBit33 = 0x40000000
1137 CBitFieldMaskBit34 = 0x20000000
1138 CBitFieldMaskBit35 = 0x10000000
1139 CBitFieldMaskBit36 = 0x8000000
1140 CBitFieldMaskBit37 = 0x4000000
1141 CBitFieldMaskBit38 = 0x2000000
1142 CBitFieldMaskBit39 = 0x1000000
1143 CBitFieldMaskBit40 = 0x800000
1144 CBitFieldMaskBit41 = 0x400000
1145 CBitFieldMaskBit42 = 0x200000
1146 CBitFieldMaskBit43 = 0x100000
1147 CBitFieldMaskBit44 = 0x80000
1148 CBitFieldMaskBit45 = 0x40000
1149 CBitFieldMaskBit46 = 0x20000
1150 CBitFieldMaskBit47 = 0x10000
1151 CBitFieldMaskBit48 = 0x8000
1152 CBitFieldMaskBit49 = 0x4000
1153 CBitFieldMaskBit50 = 0x2000
1154 CBitFieldMaskBit51 = 0x1000
1155 CBitFieldMaskBit52 = 0x800
1156 CBitFieldMaskBit53 = 0x400
1157 CBitFieldMaskBit54 = 0x200
1158 CBitFieldMaskBit55 = 0x100
1159 CBitFieldMaskBit56 = 0x80
1160 CBitFieldMaskBit57 = 0x40
1161 CBitFieldMaskBit58 = 0x20
1162 CBitFieldMaskBit59 = 0x10
1163 CBitFieldMaskBit60 = 0x8
1164 CBitFieldMaskBit61 = 0x4
1165 CBitFieldMaskBit62 = 0x2
1166 CBitFieldMaskBit63 = 0x1
1167 )
1168
1169 type SockaddrStorage struct {
1170 Family uint16
1171 _ [118]int8
1172 _ uint64
1173 }
1174
1175 type TCPMD5Sig struct {
1176 Addr SockaddrStorage
1177 Flags uint8
1178 Prefixlen uint8
1179 Keylen uint16
1180 _ uint32
1181 Key [80]uint8
1182 }
1183
1184 type HDDriveCmdHdr struct {
1185 Command uint8
1186 Number uint8
1187 Feature uint8
1188 Count uint8
1189 }
1190
1191 type HDGeometry struct {
1192 Heads uint8
1193 Sectors uint8
1194 Cylinders uint16
1195 Start uint64
1196 }
1197
1198 type HDDriveID struct {
1199 Config uint16
1200 Cyls uint16
1201 Reserved2 uint16
1202 Heads uint16
1203 Track_bytes uint16
1204 Sector_bytes uint16
1205 Sectors uint16
1206 Vendor0 uint16
1207 Vendor1 uint16
1208 Vendor2 uint16
1209 Serial_no [20]uint8
1210 Buf_type uint16
1211 Buf_size uint16
1212 Ecc_bytes uint16
1213 Fw_rev [8]uint8
1214 Model [40]uint8
1215 Max_multsect uint8
1216 Vendor3 uint8
1217 Dword_io uint16
1218 Vendor4 uint8
1219 Capability uint8
1220 Reserved50 uint16
1221 Vendor5 uint8
1222 TPIO uint8
1223 Vendor6 uint8
1224 TDMA uint8
1225 Field_valid uint16
1226 Cur_cyls uint16
1227 Cur_heads uint16
1228 Cur_sectors uint16
1229 Cur_capacity0 uint16
1230 Cur_capacity1 uint16
1231 Multsect uint8
1232 Multsect_valid uint8
1233 Lba_capacity uint32
1234 Dma_1word uint16
1235 Dma_mword uint16
1236 Eide_pio_modes uint16
1237 Eide_dma_min uint16
1238 Eide_dma_time uint16
1239 Eide_pio uint16
1240 Eide_pio_iordy uint16
1241 Words69_70 [2]uint16
1242 Words71_74 [4]uint16
1243 Queue_depth uint16
1244 Words76_79 [4]uint16
1245 Major_rev_num uint16
1246 Minor_rev_num uint16
1247 Command_set_1 uint16
1248 Command_set_2 uint16
1249 Cfsse uint16
1250 Cfs_enable_1 uint16
1251 Cfs_enable_2 uint16
1252 Csf_default uint16
1253 Dma_ultra uint16
1254 Trseuc uint16
1255 TrsEuc uint16
1256 CurAPMvalues uint16
1257 Mprc uint16
1258 Hw_config uint16
1259 Acoustic uint16
1260 Msrqs uint16
1261 Sxfert uint16
1262 Sal uint16
1263 Spg uint32
1264 Lba_capacity_2 uint64
1265 Words104_125 [22]uint16
1266 Last_lun uint16
1267 Word127 uint16
1268 Dlf uint16
1269 Csfo uint16
1270 Words130_155 [26]uint16
1271 Word156 uint16
1272 Words157_159 [3]uint16
1273 Cfa_power uint16
1274 Words161_175 [15]uint16
1275 Words176_205 [30]uint16
1276 Words206_254 [49]uint16
1277 Integrity_word uint16
1278 }
1279
1280 type Statfs_t struct {
1281 Type int64
1282 Bsize int64
1283 Blocks uint64
1284 Bfree uint64
1285 Bavail uint64
1286 Files uint64
1287 Ffree uint64
1288 Fsid Fsid
1289 Namelen int64
1290 Frsize int64
1291 Flags int64
1292 Spare [4]int64
1293 }
1294
1295 const (
1296 ST_MANDLOCK = 0x40
1297 ST_NOATIME = 0x400
1298 ST_NODEV = 0x4
1299 ST_NODIRATIME = 0x800
1300 ST_NOEXEC = 0x8
1301 ST_NOSUID = 0x2
1302 ST_RDONLY = 0x1
1303 ST_RELATIME = 0x1000
1304 ST_SYNCHRONOUS = 0x10
1305 )
1306
1307 type TpacketHdr struct {
1308 Status uint64
1309 Len uint32
1310 Snaplen uint32
1311 Mac uint16
1312 Net uint16
1313 Sec uint32
1314 Usec uint32
1315 _ [4]byte
1316 }
1317
1318 type Tpacket2Hdr struct {
1319 Status uint32
1320 Len uint32
1321 Snaplen uint32
1322 Mac uint16
1323 Net uint16
1324 Sec uint32
1325 Nsec uint32
1326 Vlan_tci uint16
1327 Vlan_tpid uint16
1328 _ [4]uint8
1329 }
1330
1331 type Tpacket3Hdr struct {
1332 Next_offset uint32
1333 Sec uint32
1334 Nsec uint32
1335 Snaplen uint32
1336 Len uint32
1337 Status uint32
1338 Mac uint16
1339 Net uint16
1340 Hv1 TpacketHdrVariant1
1341 _ [8]uint8
1342 }
1343
1344 type TpacketHdrVariant1 struct {
1345 Rxhash uint32
1346 Vlan_tci uint32
1347 Vlan_tpid uint16
1348 _ uint16
1349 }
1350
1351 type TpacketBlockDesc struct {
1352 Version uint32
1353 To_priv uint32
1354 Hdr [40]byte
1355 }
1356
1357 type TpacketReq struct {
1358 Block_size uint32
1359 Block_nr uint32
1360 Frame_size uint32
1361 Frame_nr uint32
1362 }
1363
1364 type TpacketReq3 struct {
1365 Block_size uint32
1366 Block_nr uint32
1367 Frame_size uint32
1368 Frame_nr uint32
1369 Retire_blk_tov uint32
1370 Sizeof_priv uint32
1371 Feature_req_word uint32
1372 }
1373
1374 type TpacketStats struct {
1375 Packets uint32
1376 Drops uint32
1377 }
1378
1379 type TpacketStatsV3 struct {
1380 Packets uint32
1381 Drops uint32
1382 Freeze_q_cnt uint32
1383 }
1384
1385 type TpacketAuxdata struct {
1386 Status uint32
1387 Len uint32
1388 Snaplen uint32
1389 Mac uint16
1390 Net uint16
1391 Vlan_tci uint16
1392 Vlan_tpid uint16
1393 }
1394
1395 const (
1396 TPACKET_V1 = 0x0
1397 TPACKET_V2 = 0x1
1398 TPACKET_V3 = 0x2
1399 )
1400
1401 const (
1402 SizeofTpacketHdr = 0x20
1403 SizeofTpacket2Hdr = 0x20
1404 SizeofTpacket3Hdr = 0x30
1405 )
1406
1407 const (
1408 NF_INET_PRE_ROUTING = 0x0
1409 NF_INET_LOCAL_IN = 0x1
1410 NF_INET_FORWARD = 0x2
1411 NF_INET_LOCAL_OUT = 0x3
1412 NF_INET_POST_ROUTING = 0x4
1413 NF_INET_NUMHOOKS = 0x5
1414 )
1415
1416 const (
1417 NF_NETDEV_INGRESS = 0x0
1418 NF_NETDEV_NUMHOOKS = 0x1
1419 )
1420
1421 const (
1422 NFPROTO_UNSPEC = 0x0
1423 NFPROTO_INET = 0x1
1424 NFPROTO_IPV4 = 0x2
1425 NFPROTO_ARP = 0x3
1426 NFPROTO_NETDEV = 0x5
1427 NFPROTO_BRIDGE = 0x7
1428 NFPROTO_IPV6 = 0xa
1429 NFPROTO_DECNET = 0xc
1430 NFPROTO_NUMPROTO = 0xd
1431 )
1432
1433 type Nfgenmsg struct {
1434 Nfgen_family uint8
1435 Version uint8
1436 Res_id uint16
1437 }
1438
1439 const (
1440 NFNL_BATCH_UNSPEC = 0x0
1441 NFNL_BATCH_GENID = 0x1
1442 )
1443
1444 const (
1445 NFT_REG_VERDICT = 0x0
1446 NFT_REG_1 = 0x1
1447 NFT_REG_2 = 0x2
1448 NFT_REG_3 = 0x3
1449 NFT_REG_4 = 0x4
1450 NFT_REG32_00 = 0x8
1451 NFT_REG32_01 = 0x9
1452 NFT_REG32_02 = 0xa
1453 NFT_REG32_03 = 0xb
1454 NFT_REG32_04 = 0xc
1455 NFT_REG32_05 = 0xd
1456 NFT_REG32_06 = 0xe
1457 NFT_REG32_07 = 0xf
1458 NFT_REG32_08 = 0x10
1459 NFT_REG32_09 = 0x11
1460 NFT_REG32_10 = 0x12
1461 NFT_REG32_11 = 0x13
1462 NFT_REG32_12 = 0x14
1463 NFT_REG32_13 = 0x15
1464 NFT_REG32_14 = 0x16
1465 NFT_REG32_15 = 0x17
1466 NFT_CONTINUE = -0x1
1467 NFT_BREAK = -0x2
1468 NFT_JUMP = -0x3
1469 NFT_GOTO = -0x4
1470 NFT_RETURN = -0x5
1471 NFT_MSG_NEWTABLE = 0x0
1472 NFT_MSG_GETTABLE = 0x1
1473 NFT_MSG_DELTABLE = 0x2
1474 NFT_MSG_NEWCHAIN = 0x3
1475 NFT_MSG_GETCHAIN = 0x4
1476 NFT_MSG_DELCHAIN = 0x5
1477 NFT_MSG_NEWRULE = 0x6
1478 NFT_MSG_GETRULE = 0x7
1479 NFT_MSG_DELRULE = 0x8
1480 NFT_MSG_NEWSET = 0x9
1481 NFT_MSG_GETSET = 0xa
1482 NFT_MSG_DELSET = 0xb
1483 NFT_MSG_NEWSETELEM = 0xc
1484 NFT_MSG_GETSETELEM = 0xd
1485 NFT_MSG_DELSETELEM = 0xe
1486 NFT_MSG_NEWGEN = 0xf
1487 NFT_MSG_GETGEN = 0x10
1488 NFT_MSG_TRACE = 0x11
1489 NFT_MSG_NEWOBJ = 0x12
1490 NFT_MSG_GETOBJ = 0x13
1491 NFT_MSG_DELOBJ = 0x14
1492 NFT_MSG_GETOBJ_RESET = 0x15
1493 NFT_MSG_MAX = 0x19
1494 NFTA_LIST_UNPEC = 0x0
1495 NFTA_LIST_ELEM = 0x1
1496 NFTA_HOOK_UNSPEC = 0x0
1497 NFTA_HOOK_HOOKNUM = 0x1
1498 NFTA_HOOK_PRIORITY = 0x2
1499 NFTA_HOOK_DEV = 0x3
1500 NFT_TABLE_F_DORMANT = 0x1
1501 NFTA_TABLE_UNSPEC = 0x0
1502 NFTA_TABLE_NAME = 0x1
1503 NFTA_TABLE_FLAGS = 0x2
1504 NFTA_TABLE_USE = 0x3
1505 NFTA_CHAIN_UNSPEC = 0x0
1506 NFTA_CHAIN_TABLE = 0x1
1507 NFTA_CHAIN_HANDLE = 0x2
1508 NFTA_CHAIN_NAME = 0x3
1509 NFTA_CHAIN_HOOK = 0x4
1510 NFTA_CHAIN_POLICY = 0x5
1511 NFTA_CHAIN_USE = 0x6
1512 NFTA_CHAIN_TYPE = 0x7
1513 NFTA_CHAIN_COUNTERS = 0x8
1514 NFTA_CHAIN_PAD = 0x9
1515 NFTA_RULE_UNSPEC = 0x0
1516 NFTA_RULE_TABLE = 0x1
1517 NFTA_RULE_CHAIN = 0x2
1518 NFTA_RULE_HANDLE = 0x3
1519 NFTA_RULE_EXPRESSIONS = 0x4
1520 NFTA_RULE_COMPAT = 0x5
1521 NFTA_RULE_POSITION = 0x6
1522 NFTA_RULE_USERDATA = 0x7
1523 NFTA_RULE_PAD = 0x8
1524 NFTA_RULE_ID = 0x9
1525 NFT_RULE_COMPAT_F_INV = 0x2
1526 NFT_RULE_COMPAT_F_MASK = 0x2
1527 NFTA_RULE_COMPAT_UNSPEC = 0x0
1528 NFTA_RULE_COMPAT_PROTO = 0x1
1529 NFTA_RULE_COMPAT_FLAGS = 0x2
1530 NFT_SET_ANONYMOUS = 0x1
1531 NFT_SET_CONSTANT = 0x2
1532 NFT_SET_INTERVAL = 0x4
1533 NFT_SET_MAP = 0x8
1534 NFT_SET_TIMEOUT = 0x10
1535 NFT_SET_EVAL = 0x20
1536 NFT_SET_OBJECT = 0x40
1537 NFT_SET_POL_PERFORMANCE = 0x0
1538 NFT_SET_POL_MEMORY = 0x1
1539 NFTA_SET_DESC_UNSPEC = 0x0
1540 NFTA_SET_DESC_SIZE = 0x1
1541 NFTA_SET_UNSPEC = 0x0
1542 NFTA_SET_TABLE = 0x1
1543 NFTA_SET_NAME = 0x2
1544 NFTA_SET_FLAGS = 0x3
1545 NFTA_SET_KEY_TYPE = 0x4
1546 NFTA_SET_KEY_LEN = 0x5
1547 NFTA_SET_DATA_TYPE = 0x6
1548 NFTA_SET_DATA_LEN = 0x7
1549 NFTA_SET_POLICY = 0x8
1550 NFTA_SET_DESC = 0x9
1551 NFTA_SET_ID = 0xa
1552 NFTA_SET_TIMEOUT = 0xb
1553 NFTA_SET_GC_INTERVAL = 0xc
1554 NFTA_SET_USERDATA = 0xd
1555 NFTA_SET_PAD = 0xe
1556 NFTA_SET_OBJ_TYPE = 0xf
1557 NFT_SET_ELEM_INTERVAL_END = 0x1
1558 NFTA_SET_ELEM_UNSPEC = 0x0
1559 NFTA_SET_ELEM_KEY = 0x1
1560 NFTA_SET_ELEM_DATA = 0x2
1561 NFTA_SET_ELEM_FLAGS = 0x3
1562 NFTA_SET_ELEM_TIMEOUT = 0x4
1563 NFTA_SET_ELEM_EXPIRATION = 0x5
1564 NFTA_SET_ELEM_USERDATA = 0x6
1565 NFTA_SET_ELEM_EXPR = 0x7
1566 NFTA_SET_ELEM_PAD = 0x8
1567 NFTA_SET_ELEM_OBJREF = 0x9
1568 NFTA_SET_ELEM_LIST_UNSPEC = 0x0
1569 NFTA_SET_ELEM_LIST_TABLE = 0x1
1570 NFTA_SET_ELEM_LIST_SET = 0x2
1571 NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
1572 NFTA_SET_ELEM_LIST_SET_ID = 0x4
1573 NFT_DATA_VALUE = 0x0
1574 NFT_DATA_VERDICT = 0xffffff00
1575 NFTA_DATA_UNSPEC = 0x0
1576 NFTA_DATA_VALUE = 0x1
1577 NFTA_DATA_VERDICT = 0x2
1578 NFTA_VERDICT_UNSPEC = 0x0
1579 NFTA_VERDICT_CODE = 0x1
1580 NFTA_VERDICT_CHAIN = 0x2
1581 NFTA_EXPR_UNSPEC = 0x0
1582 NFTA_EXPR_NAME = 0x1
1583 NFTA_EXPR_DATA = 0x2
1584 NFTA_IMMEDIATE_UNSPEC = 0x0
1585 NFTA_IMMEDIATE_DREG = 0x1
1586 NFTA_IMMEDIATE_DATA = 0x2
1587 NFTA_BITWISE_UNSPEC = 0x0
1588 NFTA_BITWISE_SREG = 0x1
1589 NFTA_BITWISE_DREG = 0x2
1590 NFTA_BITWISE_LEN = 0x3
1591 NFTA_BITWISE_MASK = 0x4
1592 NFTA_BITWISE_XOR = 0x5
1593 NFT_BYTEORDER_NTOH = 0x0
1594 NFT_BYTEORDER_HTON = 0x1
1595 NFTA_BYTEORDER_UNSPEC = 0x0
1596 NFTA_BYTEORDER_SREG = 0x1
1597 NFTA_BYTEORDER_DREG = 0x2
1598 NFTA_BYTEORDER_OP = 0x3
1599 NFTA_BYTEORDER_LEN = 0x4
1600 NFTA_BYTEORDER_SIZE = 0x5
1601 NFT_CMP_EQ = 0x0
1602 NFT_CMP_NEQ = 0x1
1603 NFT_CMP_LT = 0x2
1604 NFT_CMP_LTE = 0x3
1605 NFT_CMP_GT = 0x4
1606 NFT_CMP_GTE = 0x5
1607 NFTA_CMP_UNSPEC = 0x0
1608 NFTA_CMP_SREG = 0x1
1609 NFTA_CMP_OP = 0x2
1610 NFTA_CMP_DATA = 0x3
1611 NFT_RANGE_EQ = 0x0
1612 NFT_RANGE_NEQ = 0x1
1613 NFTA_RANGE_UNSPEC = 0x0
1614 NFTA_RANGE_SREG = 0x1
1615 NFTA_RANGE_OP = 0x2
1616 NFTA_RANGE_FROM_DATA = 0x3
1617 NFTA_RANGE_TO_DATA = 0x4
1618 NFT_LOOKUP_F_INV = 0x1
1619 NFTA_LOOKUP_UNSPEC = 0x0
1620 NFTA_LOOKUP_SET = 0x1
1621 NFTA_LOOKUP_SREG = 0x2
1622 NFTA_LOOKUP_DREG = 0x3
1623 NFTA_LOOKUP_SET_ID = 0x4
1624 NFTA_LOOKUP_FLAGS = 0x5
1625 NFT_DYNSET_OP_ADD = 0x0
1626 NFT_DYNSET_OP_UPDATE = 0x1
1627 NFT_DYNSET_F_INV = 0x1
1628 NFTA_DYNSET_UNSPEC = 0x0
1629 NFTA_DYNSET_SET_NAME = 0x1
1630 NFTA_DYNSET_SET_ID = 0x2
1631 NFTA_DYNSET_OP = 0x3
1632 NFTA_DYNSET_SREG_KEY = 0x4
1633 NFTA_DYNSET_SREG_DATA = 0x5
1634 NFTA_DYNSET_TIMEOUT = 0x6
1635 NFTA_DYNSET_EXPR = 0x7
1636 NFTA_DYNSET_PAD = 0x8
1637 NFTA_DYNSET_FLAGS = 0x9
1638 NFT_PAYLOAD_LL_HEADER = 0x0
1639 NFT_PAYLOAD_NETWORK_HEADER = 0x1
1640 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
1641 NFT_PAYLOAD_CSUM_NONE = 0x0
1642 NFT_PAYLOAD_CSUM_INET = 0x1
1643 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
1644 NFTA_PAYLOAD_UNSPEC = 0x0
1645 NFTA_PAYLOAD_DREG = 0x1
1646 NFTA_PAYLOAD_BASE = 0x2
1647 NFTA_PAYLOAD_OFFSET = 0x3
1648 NFTA_PAYLOAD_LEN = 0x4
1649 NFTA_PAYLOAD_SREG = 0x5
1650 NFTA_PAYLOAD_CSUM_TYPE = 0x6
1651 NFTA_PAYLOAD_CSUM_OFFSET = 0x7
1652 NFTA_PAYLOAD_CSUM_FLAGS = 0x8
1653 NFT_EXTHDR_F_PRESENT = 0x1
1654 NFT_EXTHDR_OP_IPV6 = 0x0
1655 NFT_EXTHDR_OP_TCPOPT = 0x1
1656 NFTA_EXTHDR_UNSPEC = 0x0
1657 NFTA_EXTHDR_DREG = 0x1
1658 NFTA_EXTHDR_TYPE = 0x2
1659 NFTA_EXTHDR_OFFSET = 0x3
1660 NFTA_EXTHDR_LEN = 0x4
1661 NFTA_EXTHDR_FLAGS = 0x5
1662 NFTA_EXTHDR_OP = 0x6
1663 NFTA_EXTHDR_SREG = 0x7
1664 NFT_META_LEN = 0x0
1665 NFT_META_PROTOCOL = 0x1
1666 NFT_META_PRIORITY = 0x2
1667 NFT_META_MARK = 0x3
1668 NFT_META_IIF = 0x4
1669 NFT_META_OIF = 0x5
1670 NFT_META_IIFNAME = 0x6
1671 NFT_META_OIFNAME = 0x7
1672 NFT_META_IIFTYPE = 0x8
1673 NFT_META_OIFTYPE = 0x9
1674 NFT_META_SKUID = 0xa
1675 NFT_META_SKGID = 0xb
1676 NFT_META_NFTRACE = 0xc
1677 NFT_META_RTCLASSID = 0xd
1678 NFT_META_SECMARK = 0xe
1679 NFT_META_NFPROTO = 0xf
1680 NFT_META_L4PROTO = 0x10
1681 NFT_META_BRI_IIFNAME = 0x11
1682 NFT_META_BRI_OIFNAME = 0x12
1683 NFT_META_PKTTYPE = 0x13
1684 NFT_META_CPU = 0x14
1685 NFT_META_IIFGROUP = 0x15
1686 NFT_META_OIFGROUP = 0x16
1687 NFT_META_CGROUP = 0x17
1688 NFT_META_PRANDOM = 0x18
1689 NFT_RT_CLASSID = 0x0
1690 NFT_RT_NEXTHOP4 = 0x1
1691 NFT_RT_NEXTHOP6 = 0x2
1692 NFT_RT_TCPMSS = 0x3
1693 NFT_HASH_JENKINS = 0x0
1694 NFT_HASH_SYM = 0x1
1695 NFTA_HASH_UNSPEC = 0x0
1696 NFTA_HASH_SREG = 0x1
1697 NFTA_HASH_DREG = 0x2
1698 NFTA_HASH_LEN = 0x3
1699 NFTA_HASH_MODULUS = 0x4
1700 NFTA_HASH_SEED = 0x5
1701 NFTA_HASH_OFFSET = 0x6
1702 NFTA_HASH_TYPE = 0x7
1703 NFTA_META_UNSPEC = 0x0
1704 NFTA_META_DREG = 0x1
1705 NFTA_META_KEY = 0x2
1706 NFTA_META_SREG = 0x3
1707 NFTA_RT_UNSPEC = 0x0
1708 NFTA_RT_DREG = 0x1
1709 NFTA_RT_KEY = 0x2
1710 NFT_CT_STATE = 0x0
1711 NFT_CT_DIRECTION = 0x1
1712 NFT_CT_STATUS = 0x2
1713 NFT_CT_MARK = 0x3
1714 NFT_CT_SECMARK = 0x4
1715 NFT_CT_EXPIRATION = 0x5
1716 NFT_CT_HELPER = 0x6
1717 NFT_CT_L3PROTOCOL = 0x7
1718 NFT_CT_SRC = 0x8
1719 NFT_CT_DST = 0x9
1720 NFT_CT_PROTOCOL = 0xa
1721 NFT_CT_PROTO_SRC = 0xb
1722 NFT_CT_PROTO_DST = 0xc
1723 NFT_CT_LABELS = 0xd
1724 NFT_CT_PKTS = 0xe
1725 NFT_CT_BYTES = 0xf
1726 NFT_CT_AVGPKT = 0x10
1727 NFT_CT_ZONE = 0x11
1728 NFT_CT_EVENTMASK = 0x12
1729 NFTA_CT_UNSPEC = 0x0
1730 NFTA_CT_DREG = 0x1
1731 NFTA_CT_KEY = 0x2
1732 NFTA_CT_DIRECTION = 0x3
1733 NFTA_CT_SREG = 0x4
1734 NFT_LIMIT_PKTS = 0x0
1735 NFT_LIMIT_PKT_BYTES = 0x1
1736 NFT_LIMIT_F_INV = 0x1
1737 NFTA_LIMIT_UNSPEC = 0x0
1738 NFTA_LIMIT_RATE = 0x1
1739 NFTA_LIMIT_UNIT = 0x2
1740 NFTA_LIMIT_BURST = 0x3
1741 NFTA_LIMIT_TYPE = 0x4
1742 NFTA_LIMIT_FLAGS = 0x5
1743 NFTA_LIMIT_PAD = 0x6
1744 NFTA_COUNTER_UNSPEC = 0x0
1745 NFTA_COUNTER_BYTES = 0x1
1746 NFTA_COUNTER_PACKETS = 0x2
1747 NFTA_COUNTER_PAD = 0x3
1748 NFTA_LOG_UNSPEC = 0x0
1749 NFTA_LOG_GROUP = 0x1
1750 NFTA_LOG_PREFIX = 0x2
1751 NFTA_LOG_SNAPLEN = 0x3
1752 NFTA_LOG_QTHRESHOLD = 0x4
1753 NFTA_LOG_LEVEL = 0x5
1754 NFTA_LOG_FLAGS = 0x6
1755 NFTA_QUEUE_UNSPEC = 0x0
1756 NFTA_QUEUE_NUM = 0x1
1757 NFTA_QUEUE_TOTAL = 0x2
1758 NFTA_QUEUE_FLAGS = 0x3
1759 NFTA_QUEUE_SREG_QNUM = 0x4
1760 NFT_QUOTA_F_INV = 0x1
1761 NFT_QUOTA_F_DEPLETED = 0x2
1762 NFTA_QUOTA_UNSPEC = 0x0
1763 NFTA_QUOTA_BYTES = 0x1
1764 NFTA_QUOTA_FLAGS = 0x2
1765 NFTA_QUOTA_PAD = 0x3
1766 NFTA_QUOTA_CONSUMED = 0x4
1767 NFT_REJECT_ICMP_UNREACH = 0x0
1768 NFT_REJECT_TCP_RST = 0x1
1769 NFT_REJECT_ICMPX_UNREACH = 0x2
1770 NFT_REJECT_ICMPX_NO_ROUTE = 0x0
1771 NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
1772 NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
1773 NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
1774 NFTA_REJECT_UNSPEC = 0x0
1775 NFTA_REJECT_TYPE = 0x1
1776 NFTA_REJECT_ICMP_CODE = 0x2
1777 NFT_NAT_SNAT = 0x0
1778 NFT_NAT_DNAT = 0x1
1779 NFTA_NAT_UNSPEC = 0x0
1780 NFTA_NAT_TYPE = 0x1
1781 NFTA_NAT_FAMILY = 0x2
1782 NFTA_NAT_REG_ADDR_MIN = 0x3
1783 NFTA_NAT_REG_ADDR_MAX = 0x4
1784 NFTA_NAT_REG_PROTO_MIN = 0x5
1785 NFTA_NAT_REG_PROTO_MAX = 0x6
1786 NFTA_NAT_FLAGS = 0x7
1787 NFTA_MASQ_UNSPEC = 0x0
1788 NFTA_MASQ_FLAGS = 0x1
1789 NFTA_MASQ_REG_PROTO_MIN = 0x2
1790 NFTA_MASQ_REG_PROTO_MAX = 0x3
1791 NFTA_REDIR_UNSPEC = 0x0
1792 NFTA_REDIR_REG_PROTO_MIN = 0x1
1793 NFTA_REDIR_REG_PROTO_MAX = 0x2
1794 NFTA_REDIR_FLAGS = 0x3
1795 NFTA_DUP_UNSPEC = 0x0
1796 NFTA_DUP_SREG_ADDR = 0x1
1797 NFTA_DUP_SREG_DEV = 0x2
1798 NFTA_FWD_UNSPEC = 0x0
1799 NFTA_FWD_SREG_DEV = 0x1
1800 NFTA_OBJREF_UNSPEC = 0x0
1801 NFTA_OBJREF_IMM_TYPE = 0x1
1802 NFTA_OBJREF_IMM_NAME = 0x2
1803 NFTA_OBJREF_SET_SREG = 0x3
1804 NFTA_OBJREF_SET_NAME = 0x4
1805 NFTA_OBJREF_SET_ID = 0x5
1806 NFTA_GEN_UNSPEC = 0x0
1807 NFTA_GEN_ID = 0x1
1808 NFTA_GEN_PROC_PID = 0x2
1809 NFTA_GEN_PROC_NAME = 0x3
1810 NFTA_FIB_UNSPEC = 0x0
1811 NFTA_FIB_DREG = 0x1
1812 NFTA_FIB_RESULT = 0x2
1813 NFTA_FIB_FLAGS = 0x3
1814 NFT_FIB_RESULT_UNSPEC = 0x0
1815 NFT_FIB_RESULT_OIF = 0x1
1816 NFT_FIB_RESULT_OIFNAME = 0x2
1817 NFT_FIB_RESULT_ADDRTYPE = 0x3
1818 NFTA_FIB_F_SADDR = 0x1
1819 NFTA_FIB_F_DADDR = 0x2
1820 NFTA_FIB_F_MARK = 0x4
1821 NFTA_FIB_F_IIF = 0x8
1822 NFTA_FIB_F_OIF = 0x10
1823 NFTA_FIB_F_PRESENT = 0x20
1824 NFTA_CT_HELPER_UNSPEC = 0x0
1825 NFTA_CT_HELPER_NAME = 0x1
1826 NFTA_CT_HELPER_L3PROTO = 0x2
1827 NFTA_CT_HELPER_L4PROTO = 0x3
1828 NFTA_OBJ_UNSPEC = 0x0
1829 NFTA_OBJ_TABLE = 0x1
1830 NFTA_OBJ_NAME = 0x2
1831 NFTA_OBJ_TYPE = 0x3
1832 NFTA_OBJ_DATA = 0x4
1833 NFTA_OBJ_USE = 0x5
1834 NFTA_TRACE_UNSPEC = 0x0
1835 NFTA_TRACE_TABLE = 0x1
1836 NFTA_TRACE_CHAIN = 0x2
1837 NFTA_TRACE_RULE_HANDLE = 0x3
1838 NFTA_TRACE_TYPE = 0x4
1839 NFTA_TRACE_VERDICT = 0x5
1840 NFTA_TRACE_ID = 0x6
1841 NFTA_TRACE_LL_HEADER = 0x7
1842 NFTA_TRACE_NETWORK_HEADER = 0x8
1843 NFTA_TRACE_TRANSPORT_HEADER = 0x9
1844 NFTA_TRACE_IIF = 0xa
1845 NFTA_TRACE_IIFTYPE = 0xb
1846 NFTA_TRACE_OIF = 0xc
1847 NFTA_TRACE_OIFTYPE = 0xd
1848 NFTA_TRACE_MARK = 0xe
1849 NFTA_TRACE_NFPROTO = 0xf
1850 NFTA_TRACE_POLICY = 0x10
1851 NFTA_TRACE_PAD = 0x11
1852 NFT_TRACETYPE_UNSPEC = 0x0
1853 NFT_TRACETYPE_POLICY = 0x1
1854 NFT_TRACETYPE_RETURN = 0x2
1855 NFT_TRACETYPE_RULE = 0x3
1856 NFTA_NG_UNSPEC = 0x0
1857 NFTA_NG_DREG = 0x1
1858 NFTA_NG_MODULUS = 0x2
1859 NFTA_NG_TYPE = 0x3
1860 NFTA_NG_OFFSET = 0x4
1861 NFT_NG_INCREMENTAL = 0x0
1862 NFT_NG_RANDOM = 0x1
1863 )
1864
1865 type RTCTime struct {
1866 Sec int32
1867 Min int32
1868 Hour int32
1869 Mday int32
1870 Mon int32
1871 Year int32
1872 Wday int32
1873 Yday int32
1874 Isdst int32
1875 }
1876
1877 type RTCWkAlrm struct {
1878 Enabled uint8
1879 Pending uint8
1880 Time RTCTime
1881 }
1882
1883 type RTCPLLInfo struct {
1884 Ctrl int32
1885 Value int32
1886 Max int32
1887 Min int32
1888 Posmult int32
1889 Negmult int32
1890 Clock int64
1891 }
1892
1893 type BlkpgIoctlArg struct {
1894 Op int32
1895 Flags int32
1896 Datalen int32
1897 Data *byte
1898 }
1899
1900 type BlkpgPartition struct {
1901 Start int64
1902 Length int64
1903 Pno int32
1904 Devname [64]uint8
1905 Volname [64]uint8
1906 _ [4]byte
1907 }
1908
1909 const (
1910 BLKPG = 0x20001269
1911 BLKPG_ADD_PARTITION = 0x1
1912 BLKPG_DEL_PARTITION = 0x2
1913 BLKPG_RESIZE_PARTITION = 0x3
1914 )
1915
1916 const (
1917 NETNSA_NONE = 0x0
1918 NETNSA_NSID = 0x1
1919 NETNSA_PID = 0x2
1920 NETNSA_FD = 0x3
1921 )
1922
1923 type XDPRingOffset struct {
1924 Producer uint64
1925 Consumer uint64
1926 Desc uint64
1927 }
1928
1929 type XDPMmapOffsets struct {
1930 Rx XDPRingOffset
1931 Tx XDPRingOffset
1932 Fr XDPRingOffset
1933 Cr XDPRingOffset
1934 }
1935
1936 type XDPUmemReg struct {
1937 Addr uint64
1938 Len uint64
1939 Size uint32
1940 Headroom uint32
1941 }
1942
1943 type XDPStatistics struct {
1944 Rx_dropped uint64
1945 Rx_invalid_descs uint64
1946 Tx_invalid_descs uint64
1947 }
1948
1949 type XDPDesc struct {
1950 Addr uint64
1951 Len uint32
1952 Options uint32
1953 }
1954
1955 const (
1956 NCSI_CMD_UNSPEC = 0x0
1957 NCSI_CMD_PKG_INFO = 0x1
1958 NCSI_CMD_SET_INTERFACE = 0x2
1959 NCSI_CMD_CLEAR_INTERFACE = 0x3
1960 NCSI_ATTR_UNSPEC = 0x0
1961 NCSI_ATTR_IFINDEX = 0x1
1962 NCSI_ATTR_PACKAGE_LIST = 0x2
1963 NCSI_ATTR_PACKAGE_ID = 0x3
1964 NCSI_ATTR_CHANNEL_ID = 0x4
1965 NCSI_PKG_ATTR_UNSPEC = 0x0
1966 NCSI_PKG_ATTR = 0x1
1967 NCSI_PKG_ATTR_ID = 0x2
1968 NCSI_PKG_ATTR_FORCED = 0x3
1969 NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
1970 NCSI_CHANNEL_ATTR_UNSPEC = 0x0
1971 NCSI_CHANNEL_ATTR = 0x1
1972 NCSI_CHANNEL_ATTR_ID = 0x2
1973 NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
1974 NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
1975 NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
1976 NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
1977 NCSI_CHANNEL_ATTR_ACTIVE = 0x7
1978 NCSI_CHANNEL_ATTR_FORCED = 0x8
1979 NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
1980 NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
1981 )
1982
1983 const (
1984 SOF_TIMESTAMPING_TX_HARDWARE = 0x1
1985 SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
1986 SOF_TIMESTAMPING_RX_HARDWARE = 0x4
1987 SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
1988 SOF_TIMESTAMPING_SOFTWARE = 0x10
1989 SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
1990 SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
1991 SOF_TIMESTAMPING_OPT_ID = 0x80
1992 SOF_TIMESTAMPING_TX_SCHED = 0x100
1993 SOF_TIMESTAMPING_TX_ACK = 0x200
1994 SOF_TIMESTAMPING_OPT_CMSG = 0x400
1995 SOF_TIMESTAMPING_OPT_TSONLY = 0x800
1996 SOF_TIMESTAMPING_OPT_STATS = 0x1000
1997 SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
1998 SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
1999
2000 SOF_TIMESTAMPING_LAST = 0x4000
2001 SOF_TIMESTAMPING_MASK = 0x7fff
2002 )
0 // Created by cgo -godefs - DO NOT EDIT
1 // cgo -godefs types_netbsd.go
0 // cgo -godefs types_netbsd.go | go run mkpost.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build 386,netbsd
44
55 package unix
66
77 const (
8 sizeofPtr = 0x4
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x4
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x4
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x4
12 SizeofLongLong = 0x8
1313 )
1414
1515 type (
9797 type Fsid struct {
9898 X__fsid_val [2]int32
9999 }
100
101 const (
102 PathMax = 0x400
103 )
104
105 const (
106 FADV_NORMAL = 0x0
107 FADV_RANDOM = 0x1
108 FADV_SEQUENTIAL = 0x2
109 FADV_WILLNEED = 0x3
110 FADV_DONTNEED = 0x4
111 FADV_NOREUSE = 0x5
112 )
100113
101114 type RawSockaddrInet4 struct {
102115 Len uint8
381394 Ospeed int32
382395 }
383396
397 type Winsize struct {
398 Row uint16
399 Col uint16
400 Xpixel uint16
401 Ypixel uint16
402 }
403
404 type Ptmget struct {
405 Cfd int32
406 Sfd int32
407 Cn [1024]byte
408 Sn [1024]byte
409 }
410
384411 const (
385412 AT_FDCWD = -0x64
386413 AT_SYMLINK_NOFOLLOW = 0x200
414 )
415
416 type PollFd struct {
417 Fd int32
418 Events int16
419 Revents int16
420 }
421
422 const (
423 POLLERR = 0x8
424 POLLHUP = 0x10
425 POLLIN = 0x1
426 POLLNVAL = 0x20
427 POLLOUT = 0x4
428 POLLPRI = 0x2
429 POLLRDBAND = 0x80
430 POLLRDNORM = 0x40
431 POLLWRBAND = 0x100
432 POLLWRNORM = 0x4
387433 )
388434
389435 type Sysctlnode struct {
398444 X_sysctl_parent [8]byte
399445 X_sysctl_desc [8]byte
400446 }
447
448 type Utsname struct {
449 Sysname [256]byte
450 Nodename [256]byte
451 Release [256]byte
452 Version [256]byte
453 Machine [256]byte
454 }
455
456 const SizeofClockinfo = 0x14
457
458 type Clockinfo struct {
459 Hz int32
460 Tick int32
461 Tickadj int32
462 Stathz int32
463 Profhz int32
464 }
0 // Created by cgo -godefs - DO NOT EDIT
1 // cgo -godefs types_netbsd.go
0 // cgo -godefs types_netbsd.go | go run mkpost.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build amd64,netbsd
44
55 package unix
66
77 const (
8 sizeofPtr = 0x8
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x8
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
1313 )
1414
1515 type (
102102 X__fsid_val [2]int32
103103 }
104104
105 const (
106 PathMax = 0x400
107 )
108
109 const (
110 FADV_NORMAL = 0x0
111 FADV_RANDOM = 0x1
112 FADV_SEQUENTIAL = 0x2
113 FADV_WILLNEED = 0x3
114 FADV_DONTNEED = 0x4
115 FADV_NOREUSE = 0x5
116 )
117
105118 type RawSockaddrInet4 struct {
106119 Len uint8
107120 Family uint8
388401 Ospeed int32
389402 }
390403
404 type Winsize struct {
405 Row uint16
406 Col uint16
407 Xpixel uint16
408 Ypixel uint16
409 }
410
411 type Ptmget struct {
412 Cfd int32
413 Sfd int32
414 Cn [1024]byte
415 Sn [1024]byte
416 }
417
391418 const (
392419 AT_FDCWD = -0x64
393420 AT_SYMLINK_NOFOLLOW = 0x200
421 )
422
423 type PollFd struct {
424 Fd int32
425 Events int16
426 Revents int16
427 }
428
429 const (
430 POLLERR = 0x8
431 POLLHUP = 0x10
432 POLLIN = 0x1
433 POLLNVAL = 0x20
434 POLLOUT = 0x4
435 POLLPRI = 0x2
436 POLLRDBAND = 0x80
437 POLLRDNORM = 0x40
438 POLLWRBAND = 0x100
439 POLLWRNORM = 0x4
394440 )
395441
396442 type Sysctlnode struct {
405451 X_sysctl_parent [8]byte
406452 X_sysctl_desc [8]byte
407453 }
454
455 type Utsname struct {
456 Sysname [256]byte
457 Nodename [256]byte
458 Release [256]byte
459 Version [256]byte
460 Machine [256]byte
461 }
462
463 const SizeofClockinfo = 0x14
464
465 type Clockinfo struct {
466 Hz int32
467 Tick int32
468 Tickadj int32
469 Stathz int32
470 Profhz int32
471 }
0 // Created by cgo -godefs - DO NOT EDIT
1 // cgo -godefs types_netbsd.go
0 // cgo -godefs types_netbsd.go | go run mkpost.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build arm,netbsd
44
55 package unix
66
77 const (
8 sizeofPtr = 0x4
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x4
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x4
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x4
12 SizeofLongLong = 0x8
1313 )
1414
1515 type (
103103 X__fsid_val [2]int32
104104 }
105105
106 const (
107 PathMax = 0x400
108 )
109
110 const (
111 FADV_NORMAL = 0x0
112 FADV_RANDOM = 0x1
113 FADV_SEQUENTIAL = 0x2
114 FADV_WILLNEED = 0x3
115 FADV_DONTNEED = 0x4
116 FADV_NOREUSE = 0x5
117 )
118
106119 type RawSockaddrInet4 struct {
107120 Len uint8
108121 Family uint8
386399 Ospeed int32
387400 }
388401
402 type Winsize struct {
403 Row uint16
404 Col uint16
405 Xpixel uint16
406 Ypixel uint16
407 }
408
409 type Ptmget struct {
410 Cfd int32
411 Sfd int32
412 Cn [1024]byte
413 Sn [1024]byte
414 }
415
389416 const (
390417 AT_FDCWD = -0x64
391418 AT_SYMLINK_NOFOLLOW = 0x200
419 )
420
421 type PollFd struct {
422 Fd int32
423 Events int16
424 Revents int16
425 }
426
427 const (
428 POLLERR = 0x8
429 POLLHUP = 0x10
430 POLLIN = 0x1
431 POLLNVAL = 0x20
432 POLLOUT = 0x4
433 POLLPRI = 0x2
434 POLLRDBAND = 0x80
435 POLLRDNORM = 0x40
436 POLLWRBAND = 0x100
437 POLLWRNORM = 0x4
392438 )
393439
394440 type Sysctlnode struct {
403449 X_sysctl_parent [8]byte
404450 X_sysctl_desc [8]byte
405451 }
452
453 type Utsname struct {
454 Sysname [256]byte
455 Nodename [256]byte
456 Release [256]byte
457 Version [256]byte
458 Machine [256]byte
459 }
460
461 const SizeofClockinfo = 0x14
462
463 type Clockinfo struct {
464 Hz int32
465 Tick int32
466 Tickadj int32
467 Stathz int32
468 Profhz int32
469 }
0 // cgo -godefs types_netbsd.go | go run mkpost.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
2
3 // +build arm64,netbsd
4
5 package unix
6
7 const (
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
13 )
14
15 type (
16 _C_short int16
17 _C_int int32
18 _C_long int64
19 _C_long_long int64
20 )
21
22 type Timespec struct {
23 Sec int64
24 Nsec int64
25 }
26
27 type Timeval struct {
28 Sec int64
29 Usec int32
30 Pad_cgo_0 [4]byte
31 }
32
33 type Rusage struct {
34 Utime Timeval
35 Stime Timeval
36 Maxrss int64
37 Ixrss int64
38 Idrss int64
39 Isrss int64
40 Minflt int64
41 Majflt int64
42 Nswap int64
43 Inblock int64
44 Oublock int64
45 Msgsnd int64
46 Msgrcv int64
47 Nsignals int64
48 Nvcsw int64
49 Nivcsw int64
50 }
51
52 type Rlimit struct {
53 Cur uint64
54 Max uint64
55 }
56
57 type _Gid_t uint32
58
59 type Stat_t struct {
60 Dev uint64
61 Mode uint32
62 Pad_cgo_0 [4]byte
63 Ino uint64
64 Nlink uint32
65 Uid uint32
66 Gid uint32
67 Pad_cgo_1 [4]byte
68 Rdev uint64
69 Atimespec Timespec
70 Mtimespec Timespec
71 Ctimespec Timespec
72 Birthtimespec Timespec
73 Size int64
74 Blocks int64
75 Blksize uint32
76 Flags uint32
77 Gen uint32
78 Spare [2]uint32
79 Pad_cgo_2 [4]byte
80 }
81
82 type Statfs_t [0]byte
83
84 type Flock_t struct {
85 Start int64
86 Len int64
87 Pid int32
88 Type int16
89 Whence int16
90 }
91
92 type Dirent struct {
93 Fileno uint64
94 Reclen uint16
95 Namlen uint16
96 Type uint8
97 Name [512]int8
98 Pad_cgo_0 [3]byte
99 }
100
101 type Fsid struct {
102 X__fsid_val [2]int32
103 }
104
105 const (
106 PathMax = 0x400
107 )
108
109 const (
110 FADV_NORMAL = 0x0
111 FADV_RANDOM = 0x1
112 FADV_SEQUENTIAL = 0x2
113 FADV_WILLNEED = 0x3
114 FADV_DONTNEED = 0x4
115 FADV_NOREUSE = 0x5
116 )
117
118 type RawSockaddrInet4 struct {
119 Len uint8
120 Family uint8
121 Port uint16
122 Addr [4]byte /* in_addr */
123 Zero [8]int8
124 }
125
126 type RawSockaddrInet6 struct {
127 Len uint8
128 Family uint8
129 Port uint16
130 Flowinfo uint32
131 Addr [16]byte /* in6_addr */
132 Scope_id uint32
133 }
134
135 type RawSockaddrUnix struct {
136 Len uint8
137 Family uint8
138 Path [104]int8
139 }
140
141 type RawSockaddrDatalink struct {
142 Len uint8
143 Family uint8
144 Index uint16
145 Type uint8
146 Nlen uint8
147 Alen uint8
148 Slen uint8
149 Data [12]int8
150 }
151
152 type RawSockaddr struct {
153 Len uint8
154 Family uint8
155 Data [14]int8
156 }
157
158 type RawSockaddrAny struct {
159 Addr RawSockaddr
160 Pad [92]int8
161 }
162
163 type _Socklen uint32
164
165 type Linger struct {
166 Onoff int32
167 Linger int32
168 }
169
170 type Iovec struct {
171 Base *byte
172 Len uint64
173 }
174
175 type IPMreq struct {
176 Multiaddr [4]byte /* in_addr */
177 Interface [4]byte /* in_addr */
178 }
179
180 type IPv6Mreq struct {
181 Multiaddr [16]byte /* in6_addr */
182 Interface uint32
183 }
184
185 type Msghdr struct {
186 Name *byte
187 Namelen uint32
188 Pad_cgo_0 [4]byte
189 Iov *Iovec
190 Iovlen int32
191 Pad_cgo_1 [4]byte
192 Control *byte
193 Controllen uint32
194 Flags int32
195 }
196
197 type Cmsghdr struct {
198 Len uint32
199 Level int32
200 Type int32
201 }
202
203 type Inet6Pktinfo struct {
204 Addr [16]byte /* in6_addr */
205 Ifindex uint32
206 }
207
208 type IPv6MTUInfo struct {
209 Addr RawSockaddrInet6
210 Mtu uint32
211 }
212
213 type ICMPv6Filter struct {
214 Filt [8]uint32
215 }
216
217 const (
218 SizeofSockaddrInet4 = 0x10
219 SizeofSockaddrInet6 = 0x1c
220 SizeofSockaddrAny = 0x6c
221 SizeofSockaddrUnix = 0x6a
222 SizeofSockaddrDatalink = 0x14
223 SizeofLinger = 0x8
224 SizeofIPMreq = 0x8
225 SizeofIPv6Mreq = 0x14
226 SizeofMsghdr = 0x30
227 SizeofCmsghdr = 0xc
228 SizeofInet6Pktinfo = 0x14
229 SizeofIPv6MTUInfo = 0x20
230 SizeofICMPv6Filter = 0x20
231 )
232
233 const (
234 PTRACE_TRACEME = 0x0
235 PTRACE_CONT = 0x7
236 PTRACE_KILL = 0x8
237 )
238
239 type Kevent_t struct {
240 Ident uint64
241 Filter uint32
242 Flags uint32
243 Fflags uint32
244 Pad_cgo_0 [4]byte
245 Data int64
246 Udata int64
247 }
248
249 type FdSet struct {
250 Bits [8]uint32
251 }
252
253 const (
254 SizeofIfMsghdr = 0x98
255 SizeofIfData = 0x88
256 SizeofIfaMsghdr = 0x18
257 SizeofIfAnnounceMsghdr = 0x18
258 SizeofRtMsghdr = 0x78
259 SizeofRtMetrics = 0x50
260 )
261
262 type IfMsghdr struct {
263 Msglen uint16
264 Version uint8
265 Type uint8
266 Addrs int32
267 Flags int32
268 Index uint16
269 Pad_cgo_0 [2]byte
270 Data IfData
271 }
272
273 type IfData struct {
274 Type uint8
275 Addrlen uint8
276 Hdrlen uint8
277 Pad_cgo_0 [1]byte
278 Link_state int32
279 Mtu uint64
280 Metric uint64
281 Baudrate uint64
282 Ipackets uint64
283 Ierrors uint64
284 Opackets uint64
285 Oerrors uint64
286 Collisions uint64
287 Ibytes uint64
288 Obytes uint64
289 Imcasts uint64
290 Omcasts uint64
291 Iqdrops uint64
292 Noproto uint64
293 Lastchange Timespec
294 }
295
296 type IfaMsghdr struct {
297 Msglen uint16
298 Version uint8
299 Type uint8
300 Addrs int32
301 Flags int32
302 Metric int32
303 Index uint16
304 Pad_cgo_0 [6]byte
305 }
306
307 type IfAnnounceMsghdr struct {
308 Msglen uint16
309 Version uint8
310 Type uint8
311 Index uint16
312 Name [16]int8
313 What uint16
314 }
315
316 type RtMsghdr struct {
317 Msglen uint16
318 Version uint8
319 Type uint8
320 Index uint16
321 Pad_cgo_0 [2]byte
322 Flags int32
323 Addrs int32
324 Pid int32
325 Seq int32
326 Errno int32
327 Use int32
328 Inits int32
329 Pad_cgo_1 [4]byte
330 Rmx RtMetrics
331 }
332
333 type RtMetrics struct {
334 Locks uint64
335 Mtu uint64
336 Hopcount uint64
337 Recvpipe uint64
338 Sendpipe uint64
339 Ssthresh uint64
340 Rtt uint64
341 Rttvar uint64
342 Expire int64
343 Pksent int64
344 }
345
346 type Mclpool [0]byte
347
348 const (
349 SizeofBpfVersion = 0x4
350 SizeofBpfStat = 0x80
351 SizeofBpfProgram = 0x10
352 SizeofBpfInsn = 0x8
353 SizeofBpfHdr = 0x20
354 )
355
356 type BpfVersion struct {
357 Major uint16
358 Minor uint16
359 }
360
361 type BpfStat struct {
362 Recv uint64
363 Drop uint64
364 Capt uint64
365 Padding [13]uint64
366 }
367
368 type BpfProgram struct {
369 Len uint32
370 Pad_cgo_0 [4]byte
371 Insns *BpfInsn
372 }
373
374 type BpfInsn struct {
375 Code uint16
376 Jt uint8
377 Jf uint8
378 K uint32
379 }
380
381 type BpfHdr struct {
382 Tstamp BpfTimeval
383 Caplen uint32
384 Datalen uint32
385 Hdrlen uint16
386 Pad_cgo_0 [6]byte
387 }
388
389 type BpfTimeval struct {
390 Sec int64
391 Usec int64
392 }
393
394 type Termios struct {
395 Iflag uint32
396 Oflag uint32
397 Cflag uint32
398 Lflag uint32
399 Cc [20]uint8
400 Ispeed int32
401 Ospeed int32
402 }
403
404 type Winsize struct {
405 Row uint16
406 Col uint16
407 Xpixel uint16
408 Ypixel uint16
409 }
410
411 type Ptmget struct {
412 Cfd int32
413 Sfd int32
414 Cn [1024]byte
415 Sn [1024]byte
416 }
417
418 const (
419 AT_FDCWD = -0x64
420 AT_SYMLINK_NOFOLLOW = 0x200
421 )
422
423 type PollFd struct {
424 Fd int32
425 Events int16
426 Revents int16
427 }
428
429 const (
430 POLLERR = 0x8
431 POLLHUP = 0x10
432 POLLIN = 0x1
433 POLLNVAL = 0x20
434 POLLOUT = 0x4
435 POLLPRI = 0x2
436 POLLRDBAND = 0x80
437 POLLRDNORM = 0x40
438 POLLWRBAND = 0x100
439 POLLWRNORM = 0x4
440 )
441
442 type Sysctlnode struct {
443 Flags uint32
444 Num int32
445 Name [32]int8
446 Ver uint32
447 X__rsvd uint32
448 Un [16]byte
449 X_sysctl_size [8]byte
450 X_sysctl_func [8]byte
451 X_sysctl_parent [8]byte
452 X_sysctl_desc [8]byte
453 }
454
455 type Utsname struct {
456 Sysname [256]byte
457 Nodename [256]byte
458 Release [256]byte
459 Version [256]byte
460 Machine [256]byte
461 }
462
463 const SizeofClockinfo = 0x14
464
465 type Clockinfo struct {
466 Hz int32
467 Tick int32
468 Tickadj int32
469 Stathz int32
470 Profhz int32
471 }
0 // Created by cgo -godefs - DO NOT EDIT
1 // cgo -godefs types_openbsd.go
0 // cgo -godefs types_openbsd.go | go run mkpost.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build 386,openbsd
44
55 package unix
66
77 const (
8 sizeofPtr = 0x4
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x4
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x4
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x4
12 SizeofLongLong = 0x8
1313 )
1414
1515 type (
5454 }
5555
5656 type _Gid_t uint32
57
58 const (
59 S_IFMT = 0xf000
60 S_IFIFO = 0x1000
61 S_IFCHR = 0x2000
62 S_IFDIR = 0x4000
63 S_IFBLK = 0x6000
64 S_IFREG = 0x8000
65 S_IFLNK = 0xa000
66 S_IFSOCK = 0xc000
67 S_ISUID = 0x800
68 S_ISGID = 0x400
69 S_ISVTX = 0x200
70 S_IRUSR = 0x100
71 S_IWUSR = 0x80
72 S_IXUSR = 0x40
73 )
7457
7558 type Stat_t struct {
7659 Mode uint32
139122 Val [2]int32
140123 }
141124
125 const (
126 PathMax = 0x400
127 )
128
142129 type RawSockaddrInet4 struct {
143130 Len uint8
144131 Family uint8
439426 Ospeed int32
440427 }
441428
429 type Winsize struct {
430 Row uint16
431 Col uint16
432 Xpixel uint16
433 Ypixel uint16
434 }
435
442436 const (
443437 AT_FDCWD = -0x64
444438 AT_SYMLINK_NOFOLLOW = 0x2
445439 )
440
441 type PollFd struct {
442 Fd int32
443 Events int16
444 Revents int16
445 }
446
447 const (
448 POLLERR = 0x8
449 POLLHUP = 0x10
450 POLLIN = 0x1
451 POLLNVAL = 0x20
452 POLLOUT = 0x4
453 POLLPRI = 0x2
454 POLLRDBAND = 0x80
455 POLLRDNORM = 0x40
456 POLLWRBAND = 0x100
457 POLLWRNORM = 0x4
458 )
459
460 type Sigset_t uint32
461
462 type Utsname struct {
463 Sysname [256]byte
464 Nodename [256]byte
465 Release [256]byte
466 Version [256]byte
467 Machine [256]byte
468 }
469
470 const SizeofUvmexp = 0x158
471
472 type Uvmexp struct {
473 Pagesize int32
474 Pagemask int32
475 Pageshift int32
476 Npages int32
477 Free int32
478 Active int32
479 Inactive int32
480 Paging int32
481 Wired int32
482 Zeropages int32
483 Reserve_pagedaemon int32
484 Reserve_kernel int32
485 Anonpages int32
486 Vnodepages int32
487 Vtextpages int32
488 Freemin int32
489 Freetarg int32
490 Inactarg int32
491 Wiredmax int32
492 Anonmin int32
493 Vtextmin int32
494 Vnodemin int32
495 Anonminpct int32
496 Vtextminpct int32
497 Vnodeminpct int32
498 Nswapdev int32
499 Swpages int32
500 Swpginuse int32
501 Swpgonly int32
502 Nswget int32
503 Nanon int32
504 Nanonneeded int32
505 Nfreeanon int32
506 Faults int32
507 Traps int32
508 Intrs int32
509 Swtch int32
510 Softs int32
511 Syscalls int32
512 Pageins int32
513 Obsolete_swapins int32
514 Obsolete_swapouts int32
515 Pgswapin int32
516 Pgswapout int32
517 Forks int32
518 Forks_ppwait int32
519 Forks_sharevm int32
520 Pga_zerohit int32
521 Pga_zeromiss int32
522 Zeroaborts int32
523 Fltnoram int32
524 Fltnoanon int32
525 Fltnoamap int32
526 Fltpgwait int32
527 Fltpgrele int32
528 Fltrelck int32
529 Fltrelckok int32
530 Fltanget int32
531 Fltanretry int32
532 Fltamcopy int32
533 Fltnamap int32
534 Fltnomap int32
535 Fltlget int32
536 Fltget int32
537 Flt_anon int32
538 Flt_acow int32
539 Flt_obj int32
540 Flt_prcopy int32
541 Flt_przero int32
542 Pdwoke int32
543 Pdrevs int32
544 Pdswout int32
545 Pdfreed int32
546 Pdscans int32
547 Pdanscan int32
548 Pdobscan int32
549 Pdreact int32
550 Pdbusy int32
551 Pdpageouts int32
552 Pdpending int32
553 Pddeact int32
554 Pdreanon int32
555 Pdrevnode int32
556 Pdrevtext int32
557 Fpswtch int32
558 Kmapent int32
559 }
0 // Created by cgo -godefs - DO NOT EDIT
1 // cgo -godefs types_openbsd.go
0 // cgo -godefs types_openbsd.go | go run mkpost.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build amd64,openbsd
44
55 package unix
66
77 const (
8 sizeofPtr = 0x8
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x8
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
1313 )
1414
1515 type (
5555
5656 type _Gid_t uint32
5757
58 const (
59 S_IFMT = 0xf000
60 S_IFIFO = 0x1000
61 S_IFCHR = 0x2000
62 S_IFDIR = 0x4000
63 S_IFBLK = 0x6000
64 S_IFREG = 0x8000
65 S_IFLNK = 0xa000
66 S_IFSOCK = 0xc000
67 S_ISUID = 0x800
68 S_ISGID = 0x400
69 S_ISVTX = 0x200
70 S_IRUSR = 0x100
71 S_IWUSR = 0x80
72 S_IXUSR = 0x40
73 )
74
7558 type Stat_t struct {
76 Mode uint32
77 Dev int32
78 Ino uint64
79 Nlink uint32
80 Uid uint32
81 Gid uint32
82 Rdev int32
83 Atim Timespec
84 Mtim Timespec
85 Ctim Timespec
86 Size int64
87 Blocks int64
88 Blksize uint32
89 Flags uint32
90 Gen uint32
91 Pad_cgo_0 [4]byte
92 X__st_birthtim Timespec
59 Mode uint32
60 Dev int32
61 Ino uint64
62 Nlink uint32
63 Uid uint32
64 Gid uint32
65 Rdev int32
66 Atim Timespec
67 Mtim Timespec
68 Ctim Timespec
69 Size int64
70 Blocks int64
71 Blksize int32
72 Flags uint32
73 Gen uint32
74 _ [4]byte
75 _ Timespec
9376 }
9477
9578 type Statfs_t struct {
9679 F_flags uint32
9780 F_bsize uint32
9881 F_iosize uint32
99 Pad_cgo_0 [4]byte
82 _ [4]byte
10083 F_blocks uint64
10184 F_bfree uint64
10285 F_bavail int64
11598 F_mntonname [90]int8
11699 F_mntfromname [90]int8
117100 F_mntfromspec [90]int8
118 Pad_cgo_1 [2]byte
101 _ [2]byte
119102 Mount_info [160]byte
120103 }
121104
128111 }
129112
130113 type Dirent struct {
131 Fileno uint64
132 Off int64
133 Reclen uint16
134 Type uint8
135 Namlen uint8
136 X__d_padding [4]uint8
137 Name [256]int8
114 Fileno uint64
115 Off int64
116 Reclen uint16
117 Type uint8
118 Namlen uint8
119 _ [4]uint8
120 Name [256]int8
138121 }
139122
140123 type Fsid struct {
141124 Val [2]int32
142125 }
126
127 const (
128 PathMax = 0x400
129 )
143130
144131 type RawSockaddrInet4 struct {
145132 Len uint8
211198 type Msghdr struct {
212199 Name *byte
213200 Namelen uint32
214 Pad_cgo_0 [4]byte
201 _ [4]byte
215202 Iov *Iovec
216203 Iovlen uint32
217 Pad_cgo_1 [4]byte
204 _ [4]byte
218205 Control *byte
219206 Controllen uint32
220207 Flags int32
276263 }
277264
278265 const (
279 SizeofIfMsghdr = 0xf8
280 SizeofIfData = 0xe0
266 SizeofIfMsghdr = 0xa8
267 SizeofIfData = 0x90
281268 SizeofIfaMsghdr = 0x18
282269 SizeofIfAnnounceMsghdr = 0x1a
283270 SizeofRtMsghdr = 0x60
306293 Link_state uint8
307294 Mtu uint32
308295 Metric uint32
309 Pad uint32
296 Rdomain uint32
310297 Baudrate uint64
311298 Ipackets uint64
312299 Ierrors uint64
318305 Imcasts uint64
319306 Omcasts uint64
320307 Iqdrops uint64
308 Oqdrops uint64
321309 Noproto uint64
322310 Capabilities uint32
323 Pad_cgo_0 [4]byte
311 _ [4]byte
324312 Lastchange Timeval
325 Mclpool [7]Mclpool
326 Pad_cgo_1 [4]byte
327313 }
328314
329315 type IfaMsghdr struct {
384370 Pad uint32
385371 }
386372
387 type Mclpool struct {
388 Grown int32
389 Alive uint16
390 Hwm uint16
391 Cwm uint16
392 Lwm uint16
393 }
373 type Mclpool struct{}
394374
395375 const (
396376 SizeofBpfVersion = 0x4
411391 }
412392
413393 type BpfProgram struct {
414 Len uint32
415 Pad_cgo_0 [4]byte
416 Insns *BpfInsn
394 Len uint32
395 _ [4]byte
396 Insns *BpfInsn
417397 }
418398
419399 type BpfInsn struct {
424404 }
425405
426406 type BpfHdr struct {
427 Tstamp BpfTimeval
428 Caplen uint32
429 Datalen uint32
430 Hdrlen uint16
431 Pad_cgo_0 [2]byte
407 Tstamp BpfTimeval
408 Caplen uint32
409 Datalen uint32
410 Hdrlen uint16
411 _ [2]byte
432412 }
433413
434414 type BpfTimeval struct {
446426 Ospeed int32
447427 }
448428
429 type Winsize struct {
430 Row uint16
431 Col uint16
432 Xpixel uint16
433 Ypixel uint16
434 }
435
449436 const (
450437 AT_FDCWD = -0x64
451438 AT_SYMLINK_NOFOLLOW = 0x2
452439 )
440
441 type PollFd struct {
442 Fd int32
443 Events int16
444 Revents int16
445 }
446
447 const (
448 POLLERR = 0x8
449 POLLHUP = 0x10
450 POLLIN = 0x1
451 POLLNVAL = 0x20
452 POLLOUT = 0x4
453 POLLPRI = 0x2
454 POLLRDBAND = 0x80
455 POLLRDNORM = 0x40
456 POLLWRBAND = 0x100
457 POLLWRNORM = 0x4
458 )
459
460 type Sigset_t uint32
461
462 type Utsname struct {
463 Sysname [256]byte
464 Nodename [256]byte
465 Release [256]byte
466 Version [256]byte
467 Machine [256]byte
468 }
469
470 const SizeofUvmexp = 0x158
471
472 type Uvmexp struct {
473 Pagesize int32
474 Pagemask int32
475 Pageshift int32
476 Npages int32
477 Free int32
478 Active int32
479 Inactive int32
480 Paging int32
481 Wired int32
482 Zeropages int32
483 Reserve_pagedaemon int32
484 Reserve_kernel int32
485 Anonpages int32
486 Vnodepages int32
487 Vtextpages int32
488 Freemin int32
489 Freetarg int32
490 Inactarg int32
491 Wiredmax int32
492 Anonmin int32
493 Vtextmin int32
494 Vnodemin int32
495 Anonminpct int32
496 Vtextminpct int32
497 Vnodeminpct int32
498 Nswapdev int32
499 Swpages int32
500 Swpginuse int32
501 Swpgonly int32
502 Nswget int32
503 Nanon int32
504 Nanonneeded int32
505 Nfreeanon int32
506 Faults int32
507 Traps int32
508 Intrs int32
509 Swtch int32
510 Softs int32
511 Syscalls int32
512 Pageins int32
513 Obsolete_swapins int32
514 Obsolete_swapouts int32
515 Pgswapin int32
516 Pgswapout int32
517 Forks int32
518 Forks_ppwait int32
519 Forks_sharevm int32
520 Pga_zerohit int32
521 Pga_zeromiss int32
522 Zeroaborts int32
523 Fltnoram int32
524 Fltnoanon int32
525 Fltnoamap int32
526 Fltpgwait int32
527 Fltpgrele int32
528 Fltrelck int32
529 Fltrelckok int32
530 Fltanget int32
531 Fltanretry int32
532 Fltamcopy int32
533 Fltnamap int32
534 Fltnomap int32
535 Fltlget int32
536 Fltget int32
537 Flt_anon int32
538 Flt_acow int32
539 Flt_obj int32
540 Flt_prcopy int32
541 Flt_przero int32
542 Pdwoke int32
543 Pdrevs int32
544 Pdswout int32
545 Pdfreed int32
546 Pdscans int32
547 Pdanscan int32
548 Pdobscan int32
549 Pdreact int32
550 Pdbusy int32
551 Pdpageouts int32
552 Pdpending int32
553 Pddeact int32
554 Pdreanon int32
555 Pdrevnode int32
556 Pdrevtext int32
557 Fpswtch int32
558 Kmapent int32
559 }
0 // Created by cgo -godefs - DO NOT EDIT
1 // cgo -godefs types_openbsd.go
0 // cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go
1 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 // +build arm,openbsd
44
55 package unix
66
77 const (
8 sizeofPtr = 0x4
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x4
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x4
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x4
12 SizeofLongLong = 0x8
1313 )
1414
1515 type (
2222 type Timespec struct {
2323 Sec int64
2424 Nsec int32
25 _ [4]byte
2526 }
2627
2728 type Timeval struct {
2829 Sec int64
2930 Usec int32
31 _ [4]byte
3032 }
3133
3234 type Rusage struct {
5557
5658 type _Gid_t uint32
5759
58 const (
59 S_IFMT = 0xf000
60 S_IFIFO = 0x1000
61 S_IFCHR = 0x2000
62 S_IFDIR = 0x4000
63 S_IFBLK = 0x6000
64 S_IFREG = 0x8000
65 S_IFLNK = 0xa000
66 S_IFSOCK = 0xc000
67 S_ISUID = 0x800
68 S_ISGID = 0x400
69 S_ISVTX = 0x200
70 S_IRUSR = 0x100
71 S_IWUSR = 0x80
72 S_IXUSR = 0x40
73 )
74
7560 type Stat_t struct {
76 Mode uint32
77 Dev int32
78 Ino uint64
79 Nlink uint32
80 Uid uint32
81 Gid uint32
82 Rdev int32
83 Atim Timespec
84 Mtim Timespec
85 Ctim Timespec
86 Size int64
87 Blocks int64
88 Blksize int32
89 Flags uint32
90 Gen uint32
91 X__st_birthtim Timespec
61 Mode uint32
62 Dev int32
63 Ino uint64
64 Nlink uint32
65 Uid uint32
66 Gid uint32
67 Rdev int32
68 Atim Timespec
69 Mtim Timespec
70 Ctim Timespec
71 Size int64
72 Blocks int64
73 Blksize int32
74 Flags uint32
75 Gen uint32
76 _ [4]byte
77 _ Timespec
9278 }
9379
9480 type Statfs_t struct {
9581 F_flags uint32
9682 F_bsize uint32
9783 F_iosize uint32
84 _ [4]byte
9885 F_blocks uint64
9986 F_bfree uint64
10087 F_bavail int64
10996 F_namemax uint32
11097 F_owner uint32
11198 F_ctime uint64
112 F_fstypename [16]uint8
113 F_mntonname [90]uint8
114 F_mntfromname [90]uint8
115 F_mntfromspec [90]uint8
116 Pad_cgo_0 [2]byte
99 F_fstypename [16]int8
100 F_mntonname [90]int8
101 F_mntfromname [90]int8
102 F_mntfromspec [90]int8
103 _ [2]byte
117104 Mount_info [160]byte
118105 }
119106
126113 }
127114
128115 type Dirent struct {
129 Fileno uint64
130 Off int64
131 Reclen uint16
132 Type uint8
133 Namlen uint8
134 X__d_padding [4]uint8
135 Name [256]uint8
116 Fileno uint64
117 Off int64
118 Reclen uint16
119 Type uint8
120 Namlen uint8
121 _ [4]uint8
122 Name [256]int8
136123 }
137124
138125 type Fsid struct {
139126 Val [2]int32
140127 }
128
129 const (
130 PathMax = 0x400
131 )
141132
142133 type RawSockaddrInet4 struct {
143134 Len uint8
263254 Filter int16
264255 Flags uint16
265256 Fflags uint32
257 _ [4]byte
266258 Data int64
267259 Udata *byte
260 _ [4]byte
268261 }
269262
270263 type FdSet struct {
272265 }
273266
274267 const (
275 SizeofIfMsghdr = 0x98
276 SizeofIfData = 0x80
268 SizeofIfMsghdr = 0xa8
269 SizeofIfData = 0x90
277270 SizeofIfaMsghdr = 0x18
278271 SizeofIfAnnounceMsghdr = 0x1a
279272 SizeofRtMsghdr = 0x60
302295 Link_state uint8
303296 Mtu uint32
304297 Metric uint32
305 Pad uint32
298 Rdomain uint32
306299 Baudrate uint64
307300 Ipackets uint64
308301 Ierrors uint64
314307 Imcasts uint64
315308 Omcasts uint64
316309 Iqdrops uint64
310 Oqdrops uint64
317311 Noproto uint64
318312 Capabilities uint32
313 _ [4]byte
319314 Lastchange Timeval
320315 }
321316
340335 Hdrlen uint16
341336 Index uint16
342337 What uint16
343 Name [16]uint8
338 Name [16]int8
344339 }
345340
346341 type RtMsghdr struct {
410405 }
411406
412407 type BpfHdr struct {
413 Tstamp BpfTimeval
414 Caplen uint32
415 Datalen uint32
416 Hdrlen uint16
417 Pad_cgo_0 [2]byte
408 Tstamp BpfTimeval
409 Caplen uint32
410 Datalen uint32
411 Hdrlen uint16
412 _ [2]byte
418413 }
419414
420415 type BpfTimeval struct {
432427 Ospeed int32
433428 }
434429
430 type Winsize struct {
431 Row uint16
432 Col uint16
433 Xpixel uint16
434 Ypixel uint16
435 }
436
435437 const (
436438 AT_FDCWD = -0x64
437439 AT_SYMLINK_NOFOLLOW = 0x2
438440 )
441
442 type PollFd struct {
443 Fd int32
444 Events int16
445 Revents int16
446 }
447
448 const (
449 POLLERR = 0x8
450 POLLHUP = 0x10
451 POLLIN = 0x1
452 POLLNVAL = 0x20
453 POLLOUT = 0x4
454 POLLPRI = 0x2
455 POLLRDBAND = 0x80
456 POLLRDNORM = 0x40
457 POLLWRBAND = 0x100
458 POLLWRNORM = 0x4
459 )
460
461 type Sigset_t uint32
462
463 type Utsname struct {
464 Sysname [256]byte
465 Nodename [256]byte
466 Release [256]byte
467 Version [256]byte
468 Machine [256]byte
469 }
470
471 const SizeofUvmexp = 0x158
472
473 type Uvmexp struct {
474 Pagesize int32
475 Pagemask int32
476 Pageshift int32
477 Npages int32
478 Free int32
479 Active int32
480 Inactive int32
481 Paging int32
482 Wired int32
483 Zeropages int32
484 Reserve_pagedaemon int32
485 Reserve_kernel int32
486 Unused01 int32
487 Vnodepages int32
488 Vtextpages int32
489 Freemin int32
490 Freetarg int32
491 Inactarg int32
492 Wiredmax int32
493 Anonmin int32
494 Vtextmin int32
495 Vnodemin int32
496 Anonminpct int32
497 Vtextminpct int32
498 Vnodeminpct int32
499 Nswapdev int32
500 Swpages int32
501 Swpginuse int32
502 Swpgonly int32
503 Nswget int32
504 Nanon int32
505 Unused05 int32
506 Unused06 int32
507 Faults int32
508 Traps int32
509 Intrs int32
510 Swtch int32
511 Softs int32
512 Syscalls int32
513 Pageins int32
514 Unused07 int32
515 Unused08 int32
516 Pgswapin int32
517 Pgswapout int32
518 Forks int32
519 Forks_ppwait int32
520 Forks_sharevm int32
521 Pga_zerohit int32
522 Pga_zeromiss int32
523 Unused09 int32
524 Fltnoram int32
525 Fltnoanon int32
526 Fltnoamap int32
527 Fltpgwait int32
528 Fltpgrele int32
529 Fltrelck int32
530 Fltrelckok int32
531 Fltanget int32
532 Fltanretry int32
533 Fltamcopy int32
534 Fltnamap int32
535 Fltnomap int32
536 Fltlget int32
537 Fltget int32
538 Flt_anon int32
539 Flt_acow int32
540 Flt_obj int32
541 Flt_prcopy int32
542 Flt_przero int32
543 Pdwoke int32
544 Pdrevs int32
545 Pdswout int32
546 Pdfreed int32
547 Pdscans int32
548 Pdanscan int32
549 Pdobscan int32
550 Pdreact int32
551 Pdbusy int32
552 Pdpageouts int32
553 Pdpending int32
554 Pddeact int32
555 Unused11 int32
556 Unused12 int32
557 Unused13 int32
558 Fpswtch int32
559 Kmapent int32
560 }
55 package unix
66
77 const (
8 sizeofPtr = 0x8
9 sizeofShort = 0x2
10 sizeofInt = 0x4
11 sizeofLong = 0x8
12 sizeofLongLong = 0x8
8 SizeofPtr = 0x8
9 SizeofShort = 0x2
10 SizeofInt = 0x4
11 SizeofLong = 0x8
12 SizeofLongLong = 0x8
1313 PathMax = 0x400
1414 MaxHostNameLen = 0x100
1515 )
7474
7575 type _Gid_t uint32
7676
77 const (
78 S_IFMT = 0xf000
79 S_IFIFO = 0x1000
80 S_IFCHR = 0x2000
81 S_IFDIR = 0x4000
82 S_IFBLK = 0x6000
83 S_IFREG = 0x8000
84 S_IFLNK = 0xa000
85 S_IFSOCK = 0xc000
86 S_ISUID = 0x800
87 S_ISGID = 0x400
88 S_ISVTX = 0x200
89 S_IRUSR = 0x100
90 S_IWUSR = 0x80
91 S_IXUSR = 0x40
92 )
93
9477 type Stat_t struct {
95 Dev uint64
96 Ino uint64
97 Mode uint32
98 Nlink uint32
99 Uid uint32
100 Gid uint32
101 Rdev uint64
102 Size int64
103 Atim Timespec
104 Mtim Timespec
105 Ctim Timespec
106 Blksize int32
107 Pad_cgo_0 [4]byte
108 Blocks int64
109 Fstype [16]int8
78 Dev uint64
79 Ino uint64
80 Mode uint32
81 Nlink uint32
82 Uid uint32
83 Gid uint32
84 Rdev uint64
85 Size int64
86 Atim Timespec
87 Mtim Timespec
88 Ctim Timespec
89 Blksize int32
90 _ [4]byte
91 Blocks int64
92 Fstype [16]int8
11093 }
11194
11295 type Flock_t struct {
113 Type int16
114 Whence int16
115 Pad_cgo_0 [4]byte
116 Start int64
117 Len int64
118 Sysid int32
119 Pid int32
120 Pad [4]int64
96 Type int16
97 Whence int16
98 _ [4]byte
99 Start int64
100 Len int64
101 Sysid int32
102 Pid int32
103 Pad [4]int64
121104 }
122105
123106 type Dirent struct {
124 Ino uint64
125 Off int64
126 Reclen uint16
127 Name [1]int8
128 Pad_cgo_0 [5]byte
107 Ino uint64
108 Off int64
109 Reclen uint16
110 Name [1]int8
111 _ [5]byte
129112 }
130113
131114 type _Fsblkcnt_t uint64
212195 type Msghdr struct {
213196 Name *byte
214197 Namelen uint32
215 Pad_cgo_0 [4]byte
198 _ [4]byte
216199 Iov *Iovec
217200 Iovlen int32
218 Pad_cgo_1 [4]byte
201 _ [4]byte
219202 Accrights *int8
220203 Accrightslen int32
221 Pad_cgo_2 [4]byte
204 _ [4]byte
222205 }
223206
224207 type Cmsghdr struct {
262245 }
263246
264247 type Utsname struct {
265 Sysname [257]int8
266 Nodename [257]int8
267 Release [257]int8
268 Version [257]int8
269 Machine [257]int8
248 Sysname [257]byte
249 Nodename [257]byte
250 Release [257]byte
251 Version [257]byte
252 Machine [257]byte
270253 }
271254
272255 type Ustat_t struct {
273 Tfree int64
274 Tinode uint64
275 Fname [6]int8
276 Fpack [6]int8
277 Pad_cgo_0 [4]byte
256 Tfree int64
257 Tinode uint64
258 Fname [6]int8
259 Fpack [6]int8
260 _ [4]byte
278261 }
279262
280263 const (
294277 )
295278
296279 type IfMsghdr struct {
297 Msglen uint16
298 Version uint8
299 Type uint8
300 Addrs int32
301 Flags int32
302 Index uint16
303 Pad_cgo_0 [2]byte
304 Data IfData
280 Msglen uint16
281 Version uint8
282 Type uint8
283 Addrs int32
284 Flags int32
285 Index uint16
286 _ [2]byte
287 Data IfData
305288 }
306289
307290 type IfData struct {
308291 Type uint8
309292 Addrlen uint8
310293 Hdrlen uint8
311 Pad_cgo_0 [1]byte
294 _ [1]byte
312295 Mtu uint32
313296 Metric uint32
314297 Baudrate uint32
327310 }
328311
329312 type IfaMsghdr struct {
330 Msglen uint16
331 Version uint8
332 Type uint8
333 Addrs int32
334 Flags int32
335 Index uint16
336 Pad_cgo_0 [2]byte
337 Metric int32
313 Msglen uint16
314 Version uint8
315 Type uint8
316 Addrs int32
317 Flags int32
318 Index uint16
319 _ [2]byte
320 Metric int32
338321 }
339322
340323 type RtMsghdr struct {
341 Msglen uint16
342 Version uint8
343 Type uint8
344 Index uint16
345 Pad_cgo_0 [2]byte
346 Flags int32
347 Addrs int32
348 Pid int32
349 Seq int32
350 Errno int32
351 Use int32
352 Inits uint32
353 Rmx RtMetrics
324 Msglen uint16
325 Version uint8
326 Type uint8
327 Index uint16
328 _ [2]byte
329 Flags int32
330 Addrs int32
331 Pid int32
332 Seq int32
333 Errno int32
334 Use int32
335 Inits uint32
336 Rmx RtMetrics
354337 }
355338
356339 type RtMetrics struct {
387370 }
388371
389372 type BpfProgram struct {
390 Len uint32
391 Pad_cgo_0 [4]byte
392 Insns *BpfInsn
373 Len uint32
374 _ [4]byte
375 Insns *BpfInsn
393376 }
394377
395378 type BpfInsn struct {
405388 }
406389
407390 type BpfHdr struct {
408 Tstamp BpfTimeval
409 Caplen uint32
410 Datalen uint32
411 Hdrlen uint16
412 Pad_cgo_0 [2]byte
391 Tstamp BpfTimeval
392 Caplen uint32
393 Datalen uint32
394 Hdrlen uint16
395 _ [2]byte
413396 }
414397
415398 type Termios struct {
416 Iflag uint32
417 Oflag uint32
418 Cflag uint32
419 Lflag uint32
420 Cc [19]uint8
421 Pad_cgo_0 [1]byte
399 Iflag uint32
400 Oflag uint32
401 Cflag uint32
402 Lflag uint32
403 Cc [19]uint8
404 _ [1]byte
422405 }
423406
424407 type Termio struct {
425 Iflag uint16
426 Oflag uint16
427 Cflag uint16
428 Lflag uint16
429 Line int8
430 Cc [8]uint8
431 Pad_cgo_0 [1]byte
408 Iflag uint16
409 Oflag uint16
410 Cflag uint16
411 Lflag uint16
412 Line int8
413 Cc [8]uint8
414 _ [1]byte
432415 }
433416
434417 type Winsize struct {
437420 Xpixel uint16
438421 Ypixel uint16
439422 }
423
424 type PollFd struct {
425 Fd int32
426 Events int16
427 Revents int16
428 }
429
430 const (
431 POLLERR = 0x8
432 POLLHUP = 0x10
433 POLLIN = 0x1
434 POLLNVAL = 0x20
435 POLLOUT = 0x4
436 POLLPRI = 0x2
437 POLLRDBAND = 0x80
438 POLLRDNORM = 0x40
439 POLLWRBAND = 0x100
440 POLLWRNORM = 0x4
441 )
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build windows
5 // +build go1.9
6
7 package windows
8
9 import "syscall"
10
11 type Errno = syscall.Errno
12 type SysProcAttr = syscall.SysProcAttr
0 // Copyright 2009 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 //
5 // System calls for 386, Windows are implemented in runtime/syscall_windows.goc
6 //
7
8 TEXT ·getprocaddress(SB), 7, $0-16
9 JMP syscall·getprocaddress(SB)
10
11 TEXT ·loadlibrary(SB), 7, $0-12
12 JMP syscall·loadlibrary(SB)
0 // Copyright 2009 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 //
5 // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc
6 //
7
8 TEXT ·getprocaddress(SB), 7, $0-32
9 JMP syscall·getprocaddress(SB)
10
11 TEXT ·loadlibrary(SB), 7, $0-24
12 JMP syscall·loadlibrary(SB)
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 #include "textflag.h"
5
6 TEXT ·getprocaddress(SB),NOSPLIT,$0
7 B syscall·getprocaddress(SB)
8
9 TEXT ·loadlibrary(SB),NOSPLIT,$0
10 B syscall·loadlibrary(SB)
0 // Copyright 2011 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 package windows
5
6 import (
7 "sync"
8 "sync/atomic"
9 "syscall"
10 "unsafe"
11 )
12
13 // DLLError describes reasons for DLL load failures.
14 type DLLError struct {
15 Err error
16 ObjName string
17 Msg string
18 }
19
20 func (e *DLLError) Error() string { return e.Msg }
21
22 // Implemented in runtime/syscall_windows.goc; we provide jumps to them in our assembly file.
23 func loadlibrary(filename *uint16) (handle uintptr, err syscall.Errno)
24 func getprocaddress(handle uintptr, procname *uint8) (proc uintptr, err syscall.Errno)
25
26 // A DLL implements access to a single DLL.
27 type DLL struct {
28 Name string
29 Handle Handle
30 }
31
32 // LoadDLL loads DLL file into memory.
33 //
34 // Warning: using LoadDLL without an absolute path name is subject to
35 // DLL preloading attacks. To safely load a system DLL, use LazyDLL
36 // with System set to true, or use LoadLibraryEx directly.
37 func LoadDLL(name string) (dll *DLL, err error) {
38 namep, err := UTF16PtrFromString(name)
39 if err != nil {
40 return nil, err
41 }
42 h, e := loadlibrary(namep)
43 if e != 0 {
44 return nil, &DLLError{
45 Err: e,
46 ObjName: name,
47 Msg: "Failed to load " + name + ": " + e.Error(),
48 }
49 }
50 d := &DLL{
51 Name: name,
52 Handle: Handle(h),
53 }
54 return d, nil
55 }
56
57 // MustLoadDLL is like LoadDLL but panics if load operation failes.
58 func MustLoadDLL(name string) *DLL {
59 d, e := LoadDLL(name)
60 if e != nil {
61 panic(e)
62 }
63 return d
64 }
65
66 // FindProc searches DLL d for procedure named name and returns *Proc
67 // if found. It returns an error if search fails.
68 func (d *DLL) FindProc(name string) (proc *Proc, err error) {
69 namep, err := BytePtrFromString(name)
70 if err != nil {
71 return nil, err
72 }
73 a, e := getprocaddress(uintptr(d.Handle), namep)
74 if e != 0 {
75 return nil, &DLLError{
76 Err: e,
77 ObjName: name,
78 Msg: "Failed to find " + name + " procedure in " + d.Name + ": " + e.Error(),
79 }
80 }
81 p := &Proc{
82 Dll: d,
83 Name: name,
84 addr: a,
85 }
86 return p, nil
87 }
88
89 // MustFindProc is like FindProc but panics if search fails.
90 func (d *DLL) MustFindProc(name string) *Proc {
91 p, e := d.FindProc(name)
92 if e != nil {
93 panic(e)
94 }
95 return p
96 }
97
98 // Release unloads DLL d from memory.
99 func (d *DLL) Release() (err error) {
100 return FreeLibrary(d.Handle)
101 }
102
103 // A Proc implements access to a procedure inside a DLL.
104 type Proc struct {
105 Dll *DLL
106 Name string
107 addr uintptr
108 }
109
110 // Addr returns the address of the procedure represented by p.
111 // The return value can be passed to Syscall to run the procedure.
112 func (p *Proc) Addr() uintptr {
113 return p.addr
114 }
115
116 //go:uintptrescapes
117
118 // Call executes procedure p with arguments a. It will panic, if more than 15 arguments
119 // are supplied.
120 //
121 // The returned error is always non-nil, constructed from the result of GetLastError.
122 // Callers must inspect the primary return value to decide whether an error occurred
123 // (according to the semantics of the specific function being called) before consulting
124 // the error. The error will be guaranteed to contain windows.Errno.
125 func (p *Proc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {
126 switch len(a) {
127 case 0:
128 return syscall.Syscall(p.Addr(), uintptr(len(a)), 0, 0, 0)
129 case 1:
130 return syscall.Syscall(p.Addr(), uintptr(len(a)), a[0], 0, 0)
131 case 2:
132 return syscall.Syscall(p.Addr(), uintptr(len(a)), a[0], a[1], 0)
133 case 3:
134 return syscall.Syscall(p.Addr(), uintptr(len(a)), a[0], a[1], a[2])
135 case 4:
136 return syscall.Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], 0, 0)
137 case 5:
138 return syscall.Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], 0)
139 case 6:
140 return syscall.Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5])
141 case 7:
142 return syscall.Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], 0, 0)
143 case 8:
144 return syscall.Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], 0)
145 case 9:
146 return syscall.Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8])
147 case 10:
148 return syscall.Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], 0, 0)
149 case 11:
150 return syscall.Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], 0)
151 case 12:
152 return syscall.Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11])
153 case 13:
154 return syscall.Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], 0, 0)
155 case 14:
156 return syscall.Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], 0)
157 case 15:
158 return syscall.Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14])
159 default:
160 panic("Call " + p.Name + " with too many arguments " + itoa(len(a)) + ".")
161 }
162 }
163
164 // A LazyDLL implements access to a single DLL.
165 // It will delay the load of the DLL until the first
166 // call to its Handle method or to one of its
167 // LazyProc's Addr method.
168 type LazyDLL struct {
169 Name string
170
171 // System determines whether the DLL must be loaded from the
172 // Windows System directory, bypassing the normal DLL search
173 // path.
174 System bool
175
176 mu sync.Mutex
177 dll *DLL // non nil once DLL is loaded
178 }
179
180 // Load loads DLL file d.Name into memory. It returns an error if fails.
181 // Load will not try to load DLL, if it is already loaded into memory.
182 func (d *LazyDLL) Load() error {
183 // Non-racy version of:
184 // if d.dll != nil {
185 if atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&d.dll))) != nil {
186 return nil
187 }
188 d.mu.Lock()
189 defer d.mu.Unlock()
190 if d.dll != nil {
191 return nil
192 }
193
194 // kernel32.dll is special, since it's where LoadLibraryEx comes from.
195 // The kernel already special-cases its name, so it's always
196 // loaded from system32.
197 var dll *DLL
198 var err error
199 if d.Name == "kernel32.dll" {
200 dll, err = LoadDLL(d.Name)
201 } else {
202 dll, err = loadLibraryEx(d.Name, d.System)
203 }
204 if err != nil {
205 return err
206 }
207
208 // Non-racy version of:
209 // d.dll = dll
210 atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&d.dll)), unsafe.Pointer(dll))
211 return nil
212 }
213
214 // mustLoad is like Load but panics if search fails.
215 func (d *LazyDLL) mustLoad() {
216 e := d.Load()
217 if e != nil {
218 panic(e)
219 }
220 }
221
222 // Handle returns d's module handle.
223 func (d *LazyDLL) Handle() uintptr {
224 d.mustLoad()
225 return uintptr(d.dll.Handle)
226 }
227
228 // NewProc returns a LazyProc for accessing the named procedure in the DLL d.
229 func (d *LazyDLL) NewProc(name string) *LazyProc {
230 return &LazyProc{l: d, Name: name}
231 }
232
233 // NewLazyDLL creates new LazyDLL associated with DLL file.
234 func NewLazyDLL(name string) *LazyDLL {
235 return &LazyDLL{Name: name}
236 }
237
238 // NewLazySystemDLL is like NewLazyDLL, but will only
239 // search Windows System directory for the DLL if name is
240 // a base name (like "advapi32.dll").
241 func NewLazySystemDLL(name string) *LazyDLL {
242 return &LazyDLL{Name: name, System: true}
243 }
244
245 // A LazyProc implements access to a procedure inside a LazyDLL.
246 // It delays the lookup until the Addr method is called.
247 type LazyProc struct {
248 Name string
249
250 mu sync.Mutex
251 l *LazyDLL
252 proc *Proc
253 }
254
255 // Find searches DLL for procedure named p.Name. It returns
256 // an error if search fails. Find will not search procedure,
257 // if it is already found and loaded into memory.
258 func (p *LazyProc) Find() error {
259 // Non-racy version of:
260 // if p.proc == nil {
261 if atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&p.proc))) == nil {
262 p.mu.Lock()
263 defer p.mu.Unlock()
264 if p.proc == nil {
265 e := p.l.Load()
266 if e != nil {
267 return e
268 }
269 proc, e := p.l.dll.FindProc(p.Name)
270 if e != nil {
271 return e
272 }
273 // Non-racy version of:
274 // p.proc = proc
275 atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&p.proc)), unsafe.Pointer(proc))
276 }
277 }
278 return nil
279 }
280
281 // mustFind is like Find but panics if search fails.
282 func (p *LazyProc) mustFind() {
283 e := p.Find()
284 if e != nil {
285 panic(e)
286 }
287 }
288
289 // Addr returns the address of the procedure represented by p.
290 // The return value can be passed to Syscall to run the procedure.
291 // It will panic if the procedure cannot be found.
292 func (p *LazyProc) Addr() uintptr {
293 p.mustFind()
294 return p.proc.Addr()
295 }
296
297 //go:uintptrescapes
298
299 // Call executes procedure p with arguments a. It will panic, if more than 15 arguments
300 // are supplied. It will also panic if the procedure cannot be found.
301 //
302 // The returned error is always non-nil, constructed from the result of GetLastError.
303 // Callers must inspect the primary return value to decide whether an error occurred
304 // (according to the semantics of the specific function being called) before consulting
305 // the error. The error will be guaranteed to contain windows.Errno.
306 func (p *LazyProc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {
307 p.mustFind()
308 return p.proc.Call(a...)
309 }
310
311 var canDoSearchSystem32Once struct {
312 sync.Once
313 v bool
314 }
315
316 func initCanDoSearchSystem32() {
317 // https://msdn.microsoft.com/en-us/library/ms684179(v=vs.85).aspx says:
318 // "Windows 7, Windows Server 2008 R2, Windows Vista, and Windows
319 // Server 2008: The LOAD_LIBRARY_SEARCH_* flags are available on
320 // systems that have KB2533623 installed. To determine whether the
321 // flags are available, use GetProcAddress to get the address of the
322 // AddDllDirectory, RemoveDllDirectory, or SetDefaultDllDirectories
323 // function. If GetProcAddress succeeds, the LOAD_LIBRARY_SEARCH_*
324 // flags can be used with LoadLibraryEx."
325 canDoSearchSystem32Once.v = (modkernel32.NewProc("AddDllDirectory").Find() == nil)
326 }
327
328 func canDoSearchSystem32() bool {
329 canDoSearchSystem32Once.Do(initCanDoSearchSystem32)
330 return canDoSearchSystem32Once.v
331 }
332
333 func isBaseName(name string) bool {
334 for _, c := range name {
335 if c == ':' || c == '/' || c == '\\' {
336 return false
337 }
338 }
339 return true
340 }
341
342 // loadLibraryEx wraps the Windows LoadLibraryEx function.
343 //
344 // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms684179(v=vs.85).aspx
345 //
346 // If name is not an absolute path, LoadLibraryEx searches for the DLL
347 // in a variety of automatic locations unless constrained by flags.
348 // See: https://msdn.microsoft.com/en-us/library/ff919712%28VS.85%29.aspx
349 func loadLibraryEx(name string, system bool) (*DLL, error) {
350 loadDLL := name
351 var flags uintptr
352 if system {
353 if canDoSearchSystem32() {
354 const LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800
355 flags = LOAD_LIBRARY_SEARCH_SYSTEM32
356 } else if isBaseName(name) {
357 // WindowsXP or unpatched Windows machine
358 // trying to load "foo.dll" out of the system
359 // folder, but LoadLibraryEx doesn't support
360 // that yet on their system, so emulate it.
361 windir, _ := Getenv("WINDIR") // old var; apparently works on XP
362 if windir == "" {
363 return nil, errString("%WINDIR% not defined")
364 }
365 loadDLL = windir + "\\System32\\" + name
366 }
367 }
368 h, err := LoadLibraryEx(loadDLL, 0, flags)
369 if err != nil {
370 return nil, err
371 }
372 return &DLL{Name: name, Handle: h}, nil
373 }
374
375 type errString string
376
377 func (s errString) Error() string { return string(s) }
0 // Copyright 2010 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // Windows environment variables.
5
6 package windows
7
8 import "syscall"
9
10 func Getenv(key string) (value string, found bool) {
11 return syscall.Getenv(key)
12 }
13
14 func Setenv(key, value string) error {
15 return syscall.Setenv(key, value)
16 }
17
18 func Clearenv() {
19 syscall.Clearenv()
20 }
21
22 func Environ() []string {
23 return syscall.Environ()
24 }
25
26 func Unsetenv(key string) error {
27 return syscall.Unsetenv(key)
28 }
0 // Copyright 2012 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build windows
5
6 package windows
7
8 const (
9 EVENTLOG_SUCCESS = 0
10 EVENTLOG_ERROR_TYPE = 1
11 EVENTLOG_WARNING_TYPE = 2
12 EVENTLOG_INFORMATION_TYPE = 4
13 EVENTLOG_AUDIT_SUCCESS = 8
14 EVENTLOG_AUDIT_FAILURE = 16
15 )
16
17 //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW
18 //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource
19 //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW
0 // Copyright 2009 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // Fork, exec, wait, etc.
5
6 package windows
7
8 // EscapeArg rewrites command line argument s as prescribed
9 // in http://msdn.microsoft.com/en-us/library/ms880421.
10 // This function returns "" (2 double quotes) if s is empty.
11 // Alternatively, these transformations are done:
12 // - every back slash (\) is doubled, but only if immediately
13 // followed by double quote (");
14 // - every double quote (") is escaped by back slash (\);
15 // - finally, s is wrapped with double quotes (arg -> "arg"),
16 // but only if there is space or tab inside s.
17 func EscapeArg(s string) string {
18 if len(s) == 0 {
19 return "\"\""
20 }
21 n := len(s)
22 hasSpace := false
23 for i := 0; i < len(s); i++ {
24 switch s[i] {
25 case '"', '\\':
26 n++
27 case ' ', '\t':
28 hasSpace = true
29 }
30 }
31 if hasSpace {
32 n += 2
33 }
34 if n == len(s) {
35 return s
36 }
37
38 qs := make([]byte, n)
39 j := 0
40 if hasSpace {
41 qs[j] = '"'
42 j++
43 }
44 slashes := 0
45 for i := 0; i < len(s); i++ {
46 switch s[i] {
47 default:
48 slashes = 0
49 qs[j] = s[i]
50 case '\\':
51 slashes++
52 qs[j] = s[i]
53 case '"':
54 for ; slashes > 0; slashes-- {
55 qs[j] = '\\'
56 j++
57 }
58 qs[j] = '\\'
59 j++
60 qs[j] = s[i]
61 }
62 j++
63 }
64 if hasSpace {
65 for ; slashes > 0; slashes-- {
66 qs[j] = '\\'
67 j++
68 }
69 qs[j] = '"'
70 j++
71 }
72 return string(qs[:j])
73 }
74
75 func CloseOnExec(fd Handle) {
76 SetHandleInformation(Handle(fd), HANDLE_FLAG_INHERIT, 0)
77 }
78
79 // FullPath retrieves the full path of the specified file.
80 func FullPath(name string) (path string, err error) {
81 p, err := UTF16PtrFromString(name)
82 if err != nil {
83 return "", err
84 }
85 n := uint32(100)
86 for {
87 buf := make([]uint16, n)
88 n, err = GetFullPathName(p, uint32(len(buf)), &buf[0], nil)
89 if err != nil {
90 return "", err
91 }
92 if n <= uint32(len(buf)) {
93 return UTF16ToString(buf[:n]), nil
94 }
95 }
96 }
0 // Copyright 2017 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 package windows
5
6 const (
7 MEM_COMMIT = 0x00001000
8 MEM_RESERVE = 0x00002000
9 MEM_DECOMMIT = 0x00004000
10 MEM_RELEASE = 0x00008000
11 MEM_RESET = 0x00080000
12 MEM_TOP_DOWN = 0x00100000
13 MEM_WRITE_WATCH = 0x00200000
14 MEM_PHYSICAL = 0x00400000
15 MEM_RESET_UNDO = 0x01000000
16 MEM_LARGE_PAGES = 0x20000000
17
18 PAGE_NOACCESS = 0x01
19 PAGE_READONLY = 0x02
20 PAGE_READWRITE = 0x04
21 PAGE_WRITECOPY = 0x08
22 PAGE_EXECUTE_READ = 0x20
23 PAGE_EXECUTE_READWRITE = 0x40
24 PAGE_EXECUTE_WRITECOPY = 0x80
25 )
0 // Copyright 2009 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 package windows
5
6 //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go
0 // Copyright 2012 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build windows,race
5
6 package windows
7
8 import (
9 "runtime"
10 "unsafe"
11 )
12
13 const raceenabled = true
14
15 func raceAcquire(addr unsafe.Pointer) {
16 runtime.RaceAcquire(addr)
17 }
18
19 func raceReleaseMerge(addr unsafe.Pointer) {
20 runtime.RaceReleaseMerge(addr)
21 }
22
23 func raceReadRange(addr unsafe.Pointer, len int) {
24 runtime.RaceReadRange(addr, len)
25 }
26
27 func raceWriteRange(addr unsafe.Pointer, len int) {
28 runtime.RaceWriteRange(addr, len)
29 }
0 // Copyright 2012 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build windows,!race
5
6 package windows
7
8 import (
9 "unsafe"
10 )
11
12 const raceenabled = false
13
14 func raceAcquire(addr unsafe.Pointer) {
15 }
16
17 func raceReleaseMerge(addr unsafe.Pointer) {
18 }
19
20 func raceReadRange(addr unsafe.Pointer, len int) {
21 }
22
23 func raceWriteRange(addr unsafe.Pointer, len int) {
24 }
0 // Copyright 2012 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 package windows
5
6 import (
7 "syscall"
8 "unsafe"
9 )
10
11 const (
12 STANDARD_RIGHTS_REQUIRED = 0xf0000
13 STANDARD_RIGHTS_READ = 0x20000
14 STANDARD_RIGHTS_WRITE = 0x20000
15 STANDARD_RIGHTS_EXECUTE = 0x20000
16 STANDARD_RIGHTS_ALL = 0x1F0000
17 )
18
19 const (
20 NameUnknown = 0
21 NameFullyQualifiedDN = 1
22 NameSamCompatible = 2
23 NameDisplay = 3
24 NameUniqueId = 6
25 NameCanonical = 7
26 NameUserPrincipal = 8
27 NameCanonicalEx = 9
28 NameServicePrincipal = 10
29 NameDnsDomain = 12
30 )
31
32 // This function returns 1 byte BOOLEAN rather than the 4 byte BOOL.
33 // http://blogs.msdn.com/b/drnick/archive/2007/12/19/windows-and-upn-format-credentials.aspx
34 //sys TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) [failretval&0xff==0] = secur32.TranslateNameW
35 //sys GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) [failretval&0xff==0] = secur32.GetUserNameExW
36
37 // TranslateAccountName converts a directory service
38 // object name from one format to another.
39 func TranslateAccountName(username string, from, to uint32, initSize int) (string, error) {
40 u, e := UTF16PtrFromString(username)
41 if e != nil {
42 return "", e
43 }
44 n := uint32(50)
45 for {
46 b := make([]uint16, n)
47 e = TranslateName(u, from, to, &b[0], &n)
48 if e == nil {
49 return UTF16ToString(b[:n]), nil
50 }
51 if e != ERROR_INSUFFICIENT_BUFFER {
52 return "", e
53 }
54 if n <= uint32(len(b)) {
55 return "", e
56 }
57 }
58 }
59
60 const (
61 // do not reorder
62 NetSetupUnknownStatus = iota
63 NetSetupUnjoined
64 NetSetupWorkgroupName
65 NetSetupDomainName
66 )
67
68 type UserInfo10 struct {
69 Name *uint16
70 Comment *uint16
71 UsrComment *uint16
72 FullName *uint16
73 }
74
75 //sys NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) = netapi32.NetUserGetInfo
76 //sys NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) = netapi32.NetGetJoinInformation
77 //sys NetApiBufferFree(buf *byte) (neterr error) = netapi32.NetApiBufferFree
78
79 const (
80 // do not reorder
81 SidTypeUser = 1 + iota
82 SidTypeGroup
83 SidTypeDomain
84 SidTypeAlias
85 SidTypeWellKnownGroup
86 SidTypeDeletedAccount
87 SidTypeInvalid
88 SidTypeUnknown
89 SidTypeComputer
90 SidTypeLabel
91 )
92
93 type SidIdentifierAuthority struct {
94 Value [6]byte
95 }
96
97 var (
98 SECURITY_NULL_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 0}}
99 SECURITY_WORLD_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 1}}
100 SECURITY_LOCAL_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 2}}
101 SECURITY_CREATOR_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 3}}
102 SECURITY_NON_UNIQUE_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 4}}
103 SECURITY_NT_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 5}}
104 SECURITY_MANDATORY_LABEL_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 16}}
105 )
106
107 const (
108 SECURITY_NULL_RID = 0
109 SECURITY_WORLD_RID = 0
110 SECURITY_LOCAL_RID = 0
111 SECURITY_CREATOR_OWNER_RID = 0
112 SECURITY_CREATOR_GROUP_RID = 1
113 SECURITY_DIALUP_RID = 1
114 SECURITY_NETWORK_RID = 2
115 SECURITY_BATCH_RID = 3
116 SECURITY_INTERACTIVE_RID = 4
117 SECURITY_LOGON_IDS_RID = 5
118 SECURITY_SERVICE_RID = 6
119 SECURITY_LOCAL_SYSTEM_RID = 18
120 SECURITY_BUILTIN_DOMAIN_RID = 32
121 SECURITY_PRINCIPAL_SELF_RID = 10
122 SECURITY_CREATOR_OWNER_SERVER_RID = 0x2
123 SECURITY_CREATOR_GROUP_SERVER_RID = 0x3
124 SECURITY_LOGON_IDS_RID_COUNT = 0x3
125 SECURITY_ANONYMOUS_LOGON_RID = 0x7
126 SECURITY_PROXY_RID = 0x8
127 SECURITY_ENTERPRISE_CONTROLLERS_RID = 0x9
128 SECURITY_SERVER_LOGON_RID = SECURITY_ENTERPRISE_CONTROLLERS_RID
129 SECURITY_AUTHENTICATED_USER_RID = 0xb
130 SECURITY_RESTRICTED_CODE_RID = 0xc
131 SECURITY_NT_NON_UNIQUE_RID = 0x15
132 )
133
134 // Predefined domain-relative RIDs for local groups.
135 // See https://msdn.microsoft.com/en-us/library/windows/desktop/aa379649(v=vs.85).aspx
136 const (
137 DOMAIN_ALIAS_RID_ADMINS = 0x220
138 DOMAIN_ALIAS_RID_USERS = 0x221
139 DOMAIN_ALIAS_RID_GUESTS = 0x222
140 DOMAIN_ALIAS_RID_POWER_USERS = 0x223
141 DOMAIN_ALIAS_RID_ACCOUNT_OPS = 0x224
142 DOMAIN_ALIAS_RID_SYSTEM_OPS = 0x225
143 DOMAIN_ALIAS_RID_PRINT_OPS = 0x226
144 DOMAIN_ALIAS_RID_BACKUP_OPS = 0x227
145 DOMAIN_ALIAS_RID_REPLICATOR = 0x228
146 DOMAIN_ALIAS_RID_RAS_SERVERS = 0x229
147 DOMAIN_ALIAS_RID_PREW2KCOMPACCESS = 0x22a
148 DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS = 0x22b
149 DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS = 0x22c
150 DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS = 0x22d
151 DOMAIN_ALIAS_RID_MONITORING_USERS = 0X22e
152 DOMAIN_ALIAS_RID_LOGGING_USERS = 0x22f
153 DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS = 0x230
154 DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS = 0x231
155 DOMAIN_ALIAS_RID_DCOM_USERS = 0x232
156 DOMAIN_ALIAS_RID_IUSERS = 0x238
157 DOMAIN_ALIAS_RID_CRYPTO_OPERATORS = 0x239
158 DOMAIN_ALIAS_RID_CACHEABLE_PRINCIPALS_GROUP = 0x23b
159 DOMAIN_ALIAS_RID_NON_CACHEABLE_PRINCIPALS_GROUP = 0x23c
160 DOMAIN_ALIAS_RID_EVENT_LOG_READERS_GROUP = 0x23d
161 DOMAIN_ALIAS_RID_CERTSVC_DCOM_ACCESS_GROUP = 0x23e
162 )
163
164 //sys LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) = advapi32.LookupAccountSidW
165 //sys LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) = advapi32.LookupAccountNameW
166 //sys ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) = advapi32.ConvertSidToStringSidW
167 //sys ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) = advapi32.ConvertStringSidToSidW
168 //sys GetLengthSid(sid *SID) (len uint32) = advapi32.GetLengthSid
169 //sys CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) = advapi32.CopySid
170 //sys AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) = advapi32.AllocateAndInitializeSid
171 //sys FreeSid(sid *SID) (err error) [failretval!=0] = advapi32.FreeSid
172 //sys EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) = advapi32.EqualSid
173
174 // The security identifier (SID) structure is a variable-length
175 // structure used to uniquely identify users or groups.
176 type SID struct{}
177
178 // StringToSid converts a string-format security identifier
179 // sid into a valid, functional sid.
180 func StringToSid(s string) (*SID, error) {
181 var sid *SID
182 p, e := UTF16PtrFromString(s)
183 if e != nil {
184 return nil, e
185 }
186 e = ConvertStringSidToSid(p, &sid)
187 if e != nil {
188 return nil, e
189 }
190 defer LocalFree((Handle)(unsafe.Pointer(sid)))
191 return sid.Copy()
192 }
193
194 // LookupSID retrieves a security identifier sid for the account
195 // and the name of the domain on which the account was found.
196 // System specify target computer to search.
197 func LookupSID(system, account string) (sid *SID, domain string, accType uint32, err error) {
198 if len(account) == 0 {
199 return nil, "", 0, syscall.EINVAL
200 }
201 acc, e := UTF16PtrFromString(account)
202 if e != nil {
203 return nil, "", 0, e
204 }
205 var sys *uint16
206 if len(system) > 0 {
207 sys, e = UTF16PtrFromString(system)
208 if e != nil {
209 return nil, "", 0, e
210 }
211 }
212 n := uint32(50)
213 dn := uint32(50)
214 for {
215 b := make([]byte, n)
216 db := make([]uint16, dn)
217 sid = (*SID)(unsafe.Pointer(&b[0]))
218 e = LookupAccountName(sys, acc, sid, &n, &db[0], &dn, &accType)
219 if e == nil {
220 return sid, UTF16ToString(db), accType, nil
221 }
222 if e != ERROR_INSUFFICIENT_BUFFER {
223 return nil, "", 0, e
224 }
225 if n <= uint32(len(b)) {
226 return nil, "", 0, e
227 }
228 }
229 }
230
231 // String converts sid to a string format
232 // suitable for display, storage, or transmission.
233 func (sid *SID) String() (string, error) {
234 var s *uint16
235 e := ConvertSidToStringSid(sid, &s)
236 if e != nil {
237 return "", e
238 }
239 defer LocalFree((Handle)(unsafe.Pointer(s)))
240 return UTF16ToString((*[256]uint16)(unsafe.Pointer(s))[:]), nil
241 }
242
243 // Len returns the length, in bytes, of a valid security identifier sid.
244 func (sid *SID) Len() int {
245 return int(GetLengthSid(sid))
246 }
247
248 // Copy creates a duplicate of security identifier sid.
249 func (sid *SID) Copy() (*SID, error) {
250 b := make([]byte, sid.Len())
251 sid2 := (*SID)(unsafe.Pointer(&b[0]))
252 e := CopySid(uint32(len(b)), sid2, sid)
253 if e != nil {
254 return nil, e
255 }
256 return sid2, nil
257 }
258
259 // LookupAccount retrieves the name of the account for this sid
260 // and the name of the first domain on which this sid is found.
261 // System specify target computer to search for.
262 func (sid *SID) LookupAccount(system string) (account, domain string, accType uint32, err error) {
263 var sys *uint16
264 if len(system) > 0 {
265 sys, err = UTF16PtrFromString(system)
266 if err != nil {
267 return "", "", 0, err
268 }
269 }
270 n := uint32(50)
271 dn := uint32(50)
272 for {
273 b := make([]uint16, n)
274 db := make([]uint16, dn)
275 e := LookupAccountSid(sys, sid, &b[0], &n, &db[0], &dn, &accType)
276 if e == nil {
277 return UTF16ToString(b), UTF16ToString(db), accType, nil
278 }
279 if e != ERROR_INSUFFICIENT_BUFFER {
280 return "", "", 0, e
281 }
282 if n <= uint32(len(b)) {
283 return "", "", 0, e
284 }
285 }
286 }
287
288 const (
289 // do not reorder
290 TOKEN_ASSIGN_PRIMARY = 1 << iota
291 TOKEN_DUPLICATE
292 TOKEN_IMPERSONATE
293 TOKEN_QUERY
294 TOKEN_QUERY_SOURCE
295 TOKEN_ADJUST_PRIVILEGES
296 TOKEN_ADJUST_GROUPS
297 TOKEN_ADJUST_DEFAULT
298 TOKEN_ADJUST_SESSIONID
299
300 TOKEN_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED |
301 TOKEN_ASSIGN_PRIMARY |
302 TOKEN_DUPLICATE |
303 TOKEN_IMPERSONATE |
304 TOKEN_QUERY |
305 TOKEN_QUERY_SOURCE |
306 TOKEN_ADJUST_PRIVILEGES |
307 TOKEN_ADJUST_GROUPS |
308 TOKEN_ADJUST_DEFAULT |
309 TOKEN_ADJUST_SESSIONID
310 TOKEN_READ = STANDARD_RIGHTS_READ | TOKEN_QUERY
311 TOKEN_WRITE = STANDARD_RIGHTS_WRITE |
312 TOKEN_ADJUST_PRIVILEGES |
313 TOKEN_ADJUST_GROUPS |
314 TOKEN_ADJUST_DEFAULT
315 TOKEN_EXECUTE = STANDARD_RIGHTS_EXECUTE
316 )
317
318 const (
319 // do not reorder
320 TokenUser = 1 + iota
321 TokenGroups
322 TokenPrivileges
323 TokenOwner
324 TokenPrimaryGroup
325 TokenDefaultDacl
326 TokenSource
327 TokenType
328 TokenImpersonationLevel
329 TokenStatistics
330 TokenRestrictedSids
331 TokenSessionId
332 TokenGroupsAndPrivileges
333 TokenSessionReference
334 TokenSandBoxInert
335 TokenAuditPolicy
336 TokenOrigin
337 TokenElevationType
338 TokenLinkedToken
339 TokenElevation
340 TokenHasRestrictions
341 TokenAccessInformation
342 TokenVirtualizationAllowed
343 TokenVirtualizationEnabled
344 TokenIntegrityLevel
345 TokenUIAccess
346 TokenMandatoryPolicy
347 TokenLogonSid
348 MaxTokenInfoClass
349 )
350
351 type SIDAndAttributes struct {
352 Sid *SID
353 Attributes uint32
354 }
355
356 type Tokenuser struct {
357 User SIDAndAttributes
358 }
359
360 type Tokenprimarygroup struct {
361 PrimaryGroup *SID
362 }
363
364 type Tokengroups struct {
365 GroupCount uint32
366 Groups [1]SIDAndAttributes
367 }
368
369 // Authorization Functions
370 //sys checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) = advapi32.CheckTokenMembership
371 //sys OpenProcessToken(h Handle, access uint32, token *Token) (err error) = advapi32.OpenProcessToken
372 //sys GetTokenInformation(t Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) = advapi32.GetTokenInformation
373 //sys GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) = userenv.GetUserProfileDirectoryW
374
375 // An access token contains the security information for a logon session.
376 // The system creates an access token when a user logs on, and every
377 // process executed on behalf of the user has a copy of the token.
378 // The token identifies the user, the user's groups, and the user's
379 // privileges. The system uses the token to control access to securable
380 // objects and to control the ability of the user to perform various
381 // system-related operations on the local computer.
382 type Token Handle
383
384 // OpenCurrentProcessToken opens the access token
385 // associated with current process.
386 func OpenCurrentProcessToken() (Token, error) {
387 p, e := GetCurrentProcess()
388 if e != nil {
389 return 0, e
390 }
391 var t Token
392 e = OpenProcessToken(p, TOKEN_QUERY, &t)
393 if e != nil {
394 return 0, e
395 }
396 return t, nil
397 }
398
399 // Close releases access to access token.
400 func (t Token) Close() error {
401 return CloseHandle(Handle(t))
402 }
403
404 // getInfo retrieves a specified type of information about an access token.
405 func (t Token) getInfo(class uint32, initSize int) (unsafe.Pointer, error) {
406 n := uint32(initSize)
407 for {
408 b := make([]byte, n)
409 e := GetTokenInformation(t, class, &b[0], uint32(len(b)), &n)
410 if e == nil {
411 return unsafe.Pointer(&b[0]), nil
412 }
413 if e != ERROR_INSUFFICIENT_BUFFER {
414 return nil, e
415 }
416 if n <= uint32(len(b)) {
417 return nil, e
418 }
419 }
420 }
421
422 // GetTokenUser retrieves access token t user account information.
423 func (t Token) GetTokenUser() (*Tokenuser, error) {
424 i, e := t.getInfo(TokenUser, 50)
425 if e != nil {
426 return nil, e
427 }
428 return (*Tokenuser)(i), nil
429 }
430
431 // GetTokenGroups retrieves group accounts associated with access token t.
432 func (t Token) GetTokenGroups() (*Tokengroups, error) {
433 i, e := t.getInfo(TokenGroups, 50)
434 if e != nil {
435 return nil, e
436 }
437 return (*Tokengroups)(i), nil
438 }
439
440 // GetTokenPrimaryGroup retrieves access token t primary group information.
441 // A pointer to a SID structure representing a group that will become
442 // the primary group of any objects created by a process using this access token.
443 func (t Token) GetTokenPrimaryGroup() (*Tokenprimarygroup, error) {
444 i, e := t.getInfo(TokenPrimaryGroup, 50)
445 if e != nil {
446 return nil, e
447 }
448 return (*Tokenprimarygroup)(i), nil
449 }
450
451 // GetUserProfileDirectory retrieves path to the
452 // root directory of the access token t user's profile.
453 func (t Token) GetUserProfileDirectory() (string, error) {
454 n := uint32(100)
455 for {
456 b := make([]uint16, n)
457 e := GetUserProfileDirectory(t, &b[0], &n)
458 if e == nil {
459 return UTF16ToString(b), nil
460 }
461 if e != ERROR_INSUFFICIENT_BUFFER {
462 return "", e
463 }
464 if n <= uint32(len(b)) {
465 return "", e
466 }
467 }
468 }
469
470 // IsMember reports whether the access token t is a member of the provided SID.
471 func (t Token) IsMember(sid *SID) (bool, error) {
472 var b int32
473 if e := checkTokenMembership(t, sid, &b); e != nil {
474 return false, e
475 }
476 return b != 0, nil
477 }
0 // Copyright 2012 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build windows
5
6 package windows
7
8 const (
9 SC_MANAGER_CONNECT = 1
10 SC_MANAGER_CREATE_SERVICE = 2
11 SC_MANAGER_ENUMERATE_SERVICE = 4
12 SC_MANAGER_LOCK = 8
13 SC_MANAGER_QUERY_LOCK_STATUS = 16
14 SC_MANAGER_MODIFY_BOOT_CONFIG = 32
15 SC_MANAGER_ALL_ACCESS = 0xf003f
16 )
17
18 //sys OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenSCManagerW
19
20 const (
21 SERVICE_KERNEL_DRIVER = 1
22 SERVICE_FILE_SYSTEM_DRIVER = 2
23 SERVICE_ADAPTER = 4
24 SERVICE_RECOGNIZER_DRIVER = 8
25 SERVICE_WIN32_OWN_PROCESS = 16
26 SERVICE_WIN32_SHARE_PROCESS = 32
27 SERVICE_WIN32 = SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS
28 SERVICE_INTERACTIVE_PROCESS = 256
29 SERVICE_DRIVER = SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER | SERVICE_RECOGNIZER_DRIVER
30 SERVICE_TYPE_ALL = SERVICE_WIN32 | SERVICE_ADAPTER | SERVICE_DRIVER | SERVICE_INTERACTIVE_PROCESS
31
32 SERVICE_BOOT_START = 0
33 SERVICE_SYSTEM_START = 1
34 SERVICE_AUTO_START = 2
35 SERVICE_DEMAND_START = 3
36 SERVICE_DISABLED = 4
37
38 SERVICE_ERROR_IGNORE = 0
39 SERVICE_ERROR_NORMAL = 1
40 SERVICE_ERROR_SEVERE = 2
41 SERVICE_ERROR_CRITICAL = 3
42
43 SC_STATUS_PROCESS_INFO = 0
44
45 SC_ACTION_NONE = 0
46 SC_ACTION_RESTART = 1
47 SC_ACTION_REBOOT = 2
48 SC_ACTION_RUN_COMMAND = 3
49
50 SERVICE_STOPPED = 1
51 SERVICE_START_PENDING = 2
52 SERVICE_STOP_PENDING = 3
53 SERVICE_RUNNING = 4
54 SERVICE_CONTINUE_PENDING = 5
55 SERVICE_PAUSE_PENDING = 6
56 SERVICE_PAUSED = 7
57 SERVICE_NO_CHANGE = 0xffffffff
58
59 SERVICE_ACCEPT_STOP = 1
60 SERVICE_ACCEPT_PAUSE_CONTINUE = 2
61 SERVICE_ACCEPT_SHUTDOWN = 4
62 SERVICE_ACCEPT_PARAMCHANGE = 8
63 SERVICE_ACCEPT_NETBINDCHANGE = 16
64 SERVICE_ACCEPT_HARDWAREPROFILECHANGE = 32
65 SERVICE_ACCEPT_POWEREVENT = 64
66 SERVICE_ACCEPT_SESSIONCHANGE = 128
67
68 SERVICE_CONTROL_STOP = 1
69 SERVICE_CONTROL_PAUSE = 2
70 SERVICE_CONTROL_CONTINUE = 3
71 SERVICE_CONTROL_INTERROGATE = 4
72 SERVICE_CONTROL_SHUTDOWN = 5
73 SERVICE_CONTROL_PARAMCHANGE = 6
74 SERVICE_CONTROL_NETBINDADD = 7
75 SERVICE_CONTROL_NETBINDREMOVE = 8
76 SERVICE_CONTROL_NETBINDENABLE = 9
77 SERVICE_CONTROL_NETBINDDISABLE = 10
78 SERVICE_CONTROL_DEVICEEVENT = 11
79 SERVICE_CONTROL_HARDWAREPROFILECHANGE = 12
80 SERVICE_CONTROL_POWEREVENT = 13
81 SERVICE_CONTROL_SESSIONCHANGE = 14
82
83 SERVICE_ACTIVE = 1
84 SERVICE_INACTIVE = 2
85 SERVICE_STATE_ALL = 3
86
87 SERVICE_QUERY_CONFIG = 1
88 SERVICE_CHANGE_CONFIG = 2
89 SERVICE_QUERY_STATUS = 4
90 SERVICE_ENUMERATE_DEPENDENTS = 8
91 SERVICE_START = 16
92 SERVICE_STOP = 32
93 SERVICE_PAUSE_CONTINUE = 64
94 SERVICE_INTERROGATE = 128
95 SERVICE_USER_DEFINED_CONTROL = 256
96 SERVICE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_START | SERVICE_STOP | SERVICE_PAUSE_CONTINUE | SERVICE_INTERROGATE | SERVICE_USER_DEFINED_CONTROL
97 SERVICE_RUNS_IN_SYSTEM_PROCESS = 1
98 SERVICE_CONFIG_DESCRIPTION = 1
99 SERVICE_CONFIG_FAILURE_ACTIONS = 2
100
101 NO_ERROR = 0
102
103 SC_ENUM_PROCESS_INFO = 0
104 )
105
106 type SERVICE_STATUS struct {
107 ServiceType uint32
108 CurrentState uint32
109 ControlsAccepted uint32
110 Win32ExitCode uint32
111 ServiceSpecificExitCode uint32
112 CheckPoint uint32
113 WaitHint uint32
114 }
115
116 type SERVICE_TABLE_ENTRY struct {
117 ServiceName *uint16
118 ServiceProc uintptr
119 }
120
121 type QUERY_SERVICE_CONFIG struct {
122 ServiceType uint32
123 StartType uint32
124 ErrorControl uint32
125 BinaryPathName *uint16
126 LoadOrderGroup *uint16
127 TagId uint32
128 Dependencies *uint16
129 ServiceStartName *uint16
130 DisplayName *uint16
131 }
132
133 type SERVICE_DESCRIPTION struct {
134 Description *uint16
135 }
136
137 type SERVICE_STATUS_PROCESS struct {
138 ServiceType uint32
139 CurrentState uint32
140 ControlsAccepted uint32
141 Win32ExitCode uint32
142 ServiceSpecificExitCode uint32
143 CheckPoint uint32
144 WaitHint uint32
145 ProcessId uint32
146 ServiceFlags uint32
147 }
148
149 type ENUM_SERVICE_STATUS_PROCESS struct {
150 ServiceName *uint16
151 DisplayName *uint16
152 ServiceStatusProcess SERVICE_STATUS_PROCESS
153 }
154
155 type SERVICE_FAILURE_ACTIONS struct {
156 ResetPeriod uint32
157 RebootMsg *uint16
158 Command *uint16
159 ActionsCount uint32
160 Actions *SC_ACTION
161 }
162
163 type SC_ACTION struct {
164 Type uint32
165 Delay uint32
166 }
167
168 //sys CloseServiceHandle(handle Handle) (err error) = advapi32.CloseServiceHandle
169 //sys CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) [failretval==0] = advapi32.CreateServiceW
170 //sys OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenServiceW
171 //sys DeleteService(service Handle) (err error) = advapi32.DeleteService
172 //sys StartService(service Handle, numArgs uint32, argVectors **uint16) (err error) = advapi32.StartServiceW
173 //sys QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) = advapi32.QueryServiceStatus
174 //sys ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) = advapi32.ControlService
175 //sys StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) = advapi32.StartServiceCtrlDispatcherW
176 //sys SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) = advapi32.SetServiceStatus
177 //sys ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) = advapi32.ChangeServiceConfigW
178 //sys QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceConfigW
179 //sys ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) = advapi32.ChangeServiceConfig2W
180 //sys QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceConfig2W
181 //sys EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) = advapi32.EnumServicesStatusExW
182 //sys QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceStatusEx
0 // Copyright 2009 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build windows
5
6 package windows
7
8 func itoa(val int) string { // do it here rather than with fmt to avoid dependency
9 if val < 0 {
10 return "-" + itoa(-val)
11 }
12 var buf [32]byte // big enough for int64
13 i := len(buf) - 1
14 for val >= 10 {
15 buf[i] = byte(val%10 + '0')
16 i--
17 val /= 10
18 }
19 buf[i] = byte(val + '0')
20 return string(buf[i:])
21 }
0 // Copyright 2009 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build windows
5
6 // Package windows contains an interface to the low-level operating system
7 // primitives. OS details vary depending on the underlying system, and
8 // by default, godoc will display the OS-specific documentation for the current
9 // system. If you want godoc to display syscall documentation for another
10 // system, set $GOOS and $GOARCH to the desired system. For example, if
11 // you want to view documentation for freebsd/arm on linux/amd64, set $GOOS
12 // to freebsd and $GOARCH to arm.
13 //
14 // The primary use of this package is inside other packages that provide a more
15 // portable interface to the system, such as "os", "time" and "net". Use
16 // those packages rather than this one if you can.
17 //
18 // For details of the functions and data types in this package consult
19 // the manuals for the appropriate operating system.
20 //
21 // These calls return err == nil to indicate success; otherwise
22 // err represents an operating system error describing the failure and
23 // holds a value of type syscall.Errno.
24 package windows // import "golang.org/x/sys/windows"
25
26 import (
27 "syscall"
28 )
29
30 // ByteSliceFromString returns a NUL-terminated slice of bytes
31 // containing the text of s. If s contains a NUL byte at any
32 // location, it returns (nil, syscall.EINVAL).
33 func ByteSliceFromString(s string) ([]byte, error) {
34 for i := 0; i < len(s); i++ {
35 if s[i] == 0 {
36 return nil, syscall.EINVAL
37 }
38 }
39 a := make([]byte, len(s)+1)
40 copy(a, s)
41 return a, nil
42 }
43
44 // BytePtrFromString returns a pointer to a NUL-terminated array of
45 // bytes containing the text of s. If s contains a NUL byte at any
46 // location, it returns (nil, syscall.EINVAL).
47 func BytePtrFromString(s string) (*byte, error) {
48 a, err := ByteSliceFromString(s)
49 if err != nil {
50 return nil, err
51 }
52 return &a[0], nil
53 }
54
55 // Single-word zero for use when we need a valid pointer to 0 bytes.
56 // See mksyscall.pl.
57 var _zero uintptr
58
59 func (ts *Timespec) Unix() (sec int64, nsec int64) {
60 return int64(ts.Sec), int64(ts.Nsec)
61 }
62
63 func (tv *Timeval) Unix() (sec int64, nsec int64) {
64 return int64(tv.Sec), int64(tv.Usec) * 1000
65 }
66
67 func (ts *Timespec) Nano() int64 {
68 return int64(ts.Sec)*1e9 + int64(ts.Nsec)
69 }
70
71 func (tv *Timeval) Nano() int64 {
72 return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
73 }
0 // Copyright 2009 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // Windows system calls.
5
6 package windows
7
8 import (
9 errorspkg "errors"
10 "sync"
11 "syscall"
12 "unicode/utf16"
13 "unsafe"
14 )
15
16 type Handle uintptr
17
18 const (
19 InvalidHandle = ^Handle(0)
20
21 // Flags for DefineDosDevice.
22 DDD_EXACT_MATCH_ON_REMOVE = 0x00000004
23 DDD_NO_BROADCAST_SYSTEM = 0x00000008
24 DDD_RAW_TARGET_PATH = 0x00000001
25 DDD_REMOVE_DEFINITION = 0x00000002
26
27 // Return values for GetDriveType.
28 DRIVE_UNKNOWN = 0
29 DRIVE_NO_ROOT_DIR = 1
30 DRIVE_REMOVABLE = 2
31 DRIVE_FIXED = 3
32 DRIVE_REMOTE = 4
33 DRIVE_CDROM = 5
34 DRIVE_RAMDISK = 6
35
36 // File system flags from GetVolumeInformation and GetVolumeInformationByHandle.
37 FILE_CASE_SENSITIVE_SEARCH = 0x00000001
38 FILE_CASE_PRESERVED_NAMES = 0x00000002
39 FILE_FILE_COMPRESSION = 0x00000010
40 FILE_DAX_VOLUME = 0x20000000
41 FILE_NAMED_STREAMS = 0x00040000
42 FILE_PERSISTENT_ACLS = 0x00000008
43 FILE_READ_ONLY_VOLUME = 0x00080000
44 FILE_SEQUENTIAL_WRITE_ONCE = 0x00100000
45 FILE_SUPPORTS_ENCRYPTION = 0x00020000
46 FILE_SUPPORTS_EXTENDED_ATTRIBUTES = 0x00800000
47 FILE_SUPPORTS_HARD_LINKS = 0x00400000
48 FILE_SUPPORTS_OBJECT_IDS = 0x00010000
49 FILE_SUPPORTS_OPEN_BY_FILE_ID = 0x01000000
50 FILE_SUPPORTS_REPARSE_POINTS = 0x00000080
51 FILE_SUPPORTS_SPARSE_FILES = 0x00000040
52 FILE_SUPPORTS_TRANSACTIONS = 0x00200000
53 FILE_SUPPORTS_USN_JOURNAL = 0x02000000
54 FILE_UNICODE_ON_DISK = 0x00000004
55 FILE_VOLUME_IS_COMPRESSED = 0x00008000
56 FILE_VOLUME_QUOTAS = 0x00000020
57 )
58
59 // StringToUTF16 is deprecated. Use UTF16FromString instead.
60 // If s contains a NUL byte this function panics instead of
61 // returning an error.
62 func StringToUTF16(s string) []uint16 {
63 a, err := UTF16FromString(s)
64 if err != nil {
65 panic("windows: string with NUL passed to StringToUTF16")
66 }
67 return a
68 }
69
70 // UTF16FromString returns the UTF-16 encoding of the UTF-8 string
71 // s, with a terminating NUL added. If s contains a NUL byte at any
72 // location, it returns (nil, syscall.EINVAL).
73 func UTF16FromString(s string) ([]uint16, error) {
74 for i := 0; i < len(s); i++ {
75 if s[i] == 0 {
76 return nil, syscall.EINVAL
77 }
78 }
79 return utf16.Encode([]rune(s + "\x00")), nil
80 }
81
82 // UTF16ToString returns the UTF-8 encoding of the UTF-16 sequence s,
83 // with a terminating NUL removed.
84 func UTF16ToString(s []uint16) string {
85 for i, v := range s {
86 if v == 0 {
87 s = s[0:i]
88 break
89 }
90 }
91 return string(utf16.Decode(s))
92 }
93
94 // StringToUTF16Ptr is deprecated. Use UTF16PtrFromString instead.
95 // If s contains a NUL byte this function panics instead of
96 // returning an error.
97 func StringToUTF16Ptr(s string) *uint16 { return &StringToUTF16(s)[0] }
98
99 // UTF16PtrFromString returns pointer to the UTF-16 encoding of
100 // the UTF-8 string s, with a terminating NUL added. If s
101 // contains a NUL byte at any location, it returns (nil, syscall.EINVAL).
102 func UTF16PtrFromString(s string) (*uint16, error) {
103 a, err := UTF16FromString(s)
104 if err != nil {
105 return nil, err
106 }
107 return &a[0], nil
108 }
109
110 func Getpagesize() int { return 4096 }
111
112 // NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention.
113 // This is useful when interoperating with Windows code requiring callbacks.
114 // The argument is expected to be a function with with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr.
115 func NewCallback(fn interface{}) uintptr {
116 return syscall.NewCallback(fn)
117 }
118
119 // NewCallbackCDecl converts a Go function to a function pointer conforming to the cdecl calling convention.
120 // This is useful when interoperating with Windows code requiring callbacks.
121 // The argument is expected to be a function with with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr.
122 func NewCallbackCDecl(fn interface{}) uintptr {
123 return syscall.NewCallbackCDecl(fn)
124 }
125
126 // windows api calls
127
128 //sys GetLastError() (lasterr error)
129 //sys LoadLibrary(libname string) (handle Handle, err error) = LoadLibraryW
130 //sys LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, err error) = LoadLibraryExW
131 //sys FreeLibrary(handle Handle) (err error)
132 //sys GetProcAddress(module Handle, procname string) (proc uintptr, err error)
133 //sys GetVersion() (ver uint32, err error)
134 //sys FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) = FormatMessageW
135 //sys ExitProcess(exitcode uint32)
136 //sys CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW
137 //sys ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
138 //sys WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
139 //sys SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) [failretval==0xffffffff]
140 //sys CloseHandle(handle Handle) (err error)
141 //sys GetStdHandle(stdhandle uint32) (handle Handle, err error) [failretval==InvalidHandle]
142 //sys SetStdHandle(stdhandle uint32, handle Handle) (err error)
143 //sys findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) [failretval==InvalidHandle] = FindFirstFileW
144 //sys findNextFile1(handle Handle, data *win32finddata1) (err error) = FindNextFileW
145 //sys FindClose(handle Handle) (err error)
146 //sys GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error)
147 //sys GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) = GetCurrentDirectoryW
148 //sys SetCurrentDirectory(path *uint16) (err error) = SetCurrentDirectoryW
149 //sys CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) = CreateDirectoryW
150 //sys RemoveDirectory(path *uint16) (err error) = RemoveDirectoryW
151 //sys DeleteFile(path *uint16) (err error) = DeleteFileW
152 //sys MoveFile(from *uint16, to *uint16) (err error) = MoveFileW
153 //sys MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) = MoveFileExW
154 //sys GetComputerName(buf *uint16, n *uint32) (err error) = GetComputerNameW
155 //sys GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) = GetComputerNameExW
156 //sys SetEndOfFile(handle Handle) (err error)
157 //sys GetSystemTimeAsFileTime(time *Filetime)
158 //sys GetSystemTimePreciseAsFileTime(time *Filetime)
159 //sys GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) [failretval==0xffffffff]
160 //sys CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error)
161 //sys GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error)
162 //sys PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error)
163 //sys CancelIo(s Handle) (err error)
164 //sys CancelIoEx(s Handle, o *Overlapped) (err error)
165 //sys CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) = CreateProcessW
166 //sys OpenProcess(da uint32, inheritHandle bool, pid uint32) (handle Handle, err error)
167 //sys TerminateProcess(handle Handle, exitcode uint32) (err error)
168 //sys GetExitCodeProcess(handle Handle, exitcode *uint32) (err error)
169 //sys GetStartupInfo(startupInfo *StartupInfo) (err error) = GetStartupInfoW
170 //sys GetCurrentProcess() (pseudoHandle Handle, err error)
171 //sys GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error)
172 //sys DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error)
173 //sys WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) [failretval==0xffffffff]
174 //sys GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) = GetTempPathW
175 //sys CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error)
176 //sys GetFileType(filehandle Handle) (n uint32, err error)
177 //sys CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) = advapi32.CryptAcquireContextW
178 //sys CryptReleaseContext(provhandle Handle, flags uint32) (err error) = advapi32.CryptReleaseContext
179 //sys CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) = advapi32.CryptGenRandom
180 //sys GetEnvironmentStrings() (envs *uint16, err error) [failretval==nil] = kernel32.GetEnvironmentStringsW
181 //sys FreeEnvironmentStrings(envs *uint16) (err error) = kernel32.FreeEnvironmentStringsW
182 //sys GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) = kernel32.GetEnvironmentVariableW
183 //sys SetEnvironmentVariable(name *uint16, value *uint16) (err error) = kernel32.SetEnvironmentVariableW
184 //sys SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error)
185 //sys GetFileAttributes(name *uint16) (attrs uint32, err error) [failretval==INVALID_FILE_ATTRIBUTES] = kernel32.GetFileAttributesW
186 //sys SetFileAttributes(name *uint16, attrs uint32) (err error) = kernel32.SetFileAttributesW
187 //sys GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) = kernel32.GetFileAttributesExW
188 //sys GetCommandLine() (cmd *uint16) = kernel32.GetCommandLineW
189 //sys CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) [failretval==nil] = shell32.CommandLineToArgvW
190 //sys LocalFree(hmem Handle) (handle Handle, err error) [failretval!=0]
191 //sys SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error)
192 //sys FlushFileBuffers(handle Handle) (err error)
193 //sys GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) = kernel32.GetFullPathNameW
194 //sys GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) = kernel32.GetLongPathNameW
195 //sys GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) = kernel32.GetShortPathNameW
196 //sys CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) = kernel32.CreateFileMappingW
197 //sys MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error)
198 //sys UnmapViewOfFile(addr uintptr) (err error)
199 //sys FlushViewOfFile(addr uintptr, length uintptr) (err error)
200 //sys VirtualLock(addr uintptr, length uintptr) (err error)
201 //sys VirtualUnlock(addr uintptr, length uintptr) (err error)
202 //sys VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) = kernel32.VirtualAlloc
203 //sys VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) = kernel32.VirtualFree
204 //sys VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) = kernel32.VirtualProtect
205 //sys TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) = mswsock.TransmitFile
206 //sys ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) = kernel32.ReadDirectoryChangesW
207 //sys CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) = crypt32.CertOpenSystemStoreW
208 //sys CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) [failretval==InvalidHandle] = crypt32.CertOpenStore
209 //sys CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) [failretval==nil] = crypt32.CertEnumCertificatesInStore
210 //sys CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) = crypt32.CertAddCertificateContextToStore
211 //sys CertCloseStore(store Handle, flags uint32) (err error) = crypt32.CertCloseStore
212 //sys CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) = crypt32.CertGetCertificateChain
213 //sys CertFreeCertificateChain(ctx *CertChainContext) = crypt32.CertFreeCertificateChain
214 //sys CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) [failretval==nil] = crypt32.CertCreateCertificateContext
215 //sys CertFreeCertificateContext(ctx *CertContext) (err error) = crypt32.CertFreeCertificateContext
216 //sys CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) = crypt32.CertVerifyCertificateChainPolicy
217 //sys RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) = advapi32.RegOpenKeyExW
218 //sys RegCloseKey(key Handle) (regerrno error) = advapi32.RegCloseKey
219 //sys RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegQueryInfoKeyW
220 //sys RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegEnumKeyExW
221 //sys RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) = advapi32.RegQueryValueExW
222 //sys getCurrentProcessId() (pid uint32) = kernel32.GetCurrentProcessId
223 //sys GetConsoleMode(console Handle, mode *uint32) (err error) = kernel32.GetConsoleMode
224 //sys SetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode
225 //sys GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo
226 //sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW
227 //sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW
228 //sys CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot
229 //sys Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32FirstW
230 //sys Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32NextW
231 //sys DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBufferSize uint32, outBuffer *byte, outBufferSize uint32, bytesReturned *uint32, overlapped *Overlapped) (err error)
232 // This function returns 1 byte BOOLEAN rather than the 4 byte BOOL.
233 //sys CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) [failretval&0xff==0] = CreateSymbolicLinkW
234 //sys CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) [failretval&0xff==0] = CreateHardLinkW
235 //sys GetCurrentThreadId() (id uint32)
236 //sys CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) = kernel32.CreateEventW
237 //sys CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) = kernel32.CreateEventExW
238 //sys OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) = kernel32.OpenEventW
239 //sys SetEvent(event Handle) (err error) = kernel32.SetEvent
240 //sys ResetEvent(event Handle) (err error) = kernel32.ResetEvent
241 //sys PulseEvent(event Handle) (err error) = kernel32.PulseEvent
242
243 // Volume Management Functions
244 //sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW
245 //sys DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) = DeleteVolumeMountPointW
246 //sys FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, err error) [failretval==InvalidHandle] = FindFirstVolumeW
247 //sys FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, bufferLength uint32) (handle Handle, err error) [failretval==InvalidHandle] = FindFirstVolumeMountPointW
248 //sys FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) (err error) = FindNextVolumeW
249 //sys FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) = FindNextVolumeMountPointW
250 //sys FindVolumeClose(findVolume Handle) (err error)
251 //sys FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error)
252 //sys GetDriveType(rootPathName *uint16) (driveType uint32) = GetDriveTypeW
253 //sys GetLogicalDrives() (drivesBitMask uint32, err error) [failretval==0]
254 //sys GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) [failretval==0] = GetLogicalDriveStringsW
255 //sys GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) = GetVolumeInformationW
256 //sys GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) = GetVolumeInformationByHandleW
257 //sys GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16, bufferlength uint32) (err error) = GetVolumeNameForVolumeMountPointW
258 //sys GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength uint32) (err error) = GetVolumePathNameW
259 //sys GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16, bufferLength uint32, returnLength *uint32) (err error) = GetVolumePathNamesForVolumeNameW
260 //sys QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) [failretval==0] = QueryDosDeviceW
261 //sys SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) = SetVolumeLabelW
262 //sys SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) = SetVolumeMountPointW
263
264 // syscall interface implementation for other packages
265
266 // GetProcAddressByOrdinal retrieves the address of the exported
267 // function from module by ordinal.
268 func GetProcAddressByOrdinal(module Handle, ordinal uintptr) (proc uintptr, err error) {
269 r0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), ordinal, 0)
270 proc = uintptr(r0)
271 if proc == 0 {
272 if e1 != 0 {
273 err = errnoErr(e1)
274 } else {
275 err = syscall.EINVAL
276 }
277 }
278 return
279 }
280
281 func Exit(code int) { ExitProcess(uint32(code)) }
282
283 func makeInheritSa() *SecurityAttributes {
284 var sa SecurityAttributes
285 sa.Length = uint32(unsafe.Sizeof(sa))
286 sa.InheritHandle = 1
287 return &sa
288 }
289
290 func Open(path string, mode int, perm uint32) (fd Handle, err error) {
291 if len(path) == 0 {
292 return InvalidHandle, ERROR_FILE_NOT_FOUND
293 }
294 pathp, err := UTF16PtrFromString(path)
295 if err != nil {
296 return InvalidHandle, err
297 }
298 var access uint32
299 switch mode & (O_RDONLY | O_WRONLY | O_RDWR) {
300 case O_RDONLY:
301 access = GENERIC_READ
302 case O_WRONLY:
303 access = GENERIC_WRITE
304 case O_RDWR:
305 access = GENERIC_READ | GENERIC_WRITE
306 }
307 if mode&O_CREAT != 0 {
308 access |= GENERIC_WRITE
309 }
310 if mode&O_APPEND != 0 {
311 access &^= GENERIC_WRITE
312 access |= FILE_APPEND_DATA
313 }
314 sharemode := uint32(FILE_SHARE_READ | FILE_SHARE_WRITE)
315 var sa *SecurityAttributes
316 if mode&O_CLOEXEC == 0 {
317 sa = makeInheritSa()
318 }
319 var createmode uint32
320 switch {
321 case mode&(O_CREAT|O_EXCL) == (O_CREAT | O_EXCL):
322 createmode = CREATE_NEW
323 case mode&(O_CREAT|O_TRUNC) == (O_CREAT | O_TRUNC):
324 createmode = CREATE_ALWAYS
325 case mode&O_CREAT == O_CREAT:
326 createmode = OPEN_ALWAYS
327 case mode&O_TRUNC == O_TRUNC:
328 createmode = TRUNCATE_EXISTING
329 default:
330 createmode = OPEN_EXISTING
331 }
332 h, e := CreateFile(pathp, access, sharemode, sa, createmode, FILE_ATTRIBUTE_NORMAL, 0)
333 return h, e
334 }
335
336 func Read(fd Handle, p []byte) (n int, err error) {
337 var done uint32
338 e := ReadFile(fd, p, &done, nil)
339 if e != nil {
340 if e == ERROR_BROKEN_PIPE {
341 // NOTE(brainman): work around ERROR_BROKEN_PIPE is returned on reading EOF from stdin
342 return 0, nil
343 }
344 return 0, e
345 }
346 if raceenabled {
347 if done > 0 {
348 raceWriteRange(unsafe.Pointer(&p[0]), int(done))
349 }
350 raceAcquire(unsafe.Pointer(&ioSync))
351 }
352 return int(done), nil
353 }
354
355 func Write(fd Handle, p []byte) (n int, err error) {
356 if raceenabled {
357 raceReleaseMerge(unsafe.Pointer(&ioSync))
358 }
359 var done uint32
360 e := WriteFile(fd, p, &done, nil)
361 if e != nil {
362 return 0, e
363 }
364 if raceenabled && done > 0 {
365 raceReadRange(unsafe.Pointer(&p[0]), int(done))
366 }
367 return int(done), nil
368 }
369
370 var ioSync int64
371
372 func Seek(fd Handle, offset int64, whence int) (newoffset int64, err error) {
373 var w uint32
374 switch whence {
375 case 0:
376 w = FILE_BEGIN
377 case 1:
378 w = FILE_CURRENT
379 case 2:
380 w = FILE_END
381 }
382 hi := int32(offset >> 32)
383 lo := int32(offset)
384 // use GetFileType to check pipe, pipe can't do seek
385 ft, _ := GetFileType(fd)
386 if ft == FILE_TYPE_PIPE {
387 return 0, syscall.EPIPE
388 }
389 rlo, e := SetFilePointer(fd, lo, &hi, w)
390 if e != nil {
391 return 0, e
392 }
393 return int64(hi)<<32 + int64(rlo), nil
394 }
395
396 func Close(fd Handle) (err error) {
397 return CloseHandle(fd)
398 }
399
400 var (
401 Stdin = getStdHandle(STD_INPUT_HANDLE)
402 Stdout = getStdHandle(STD_OUTPUT_HANDLE)
403 Stderr = getStdHandle(STD_ERROR_HANDLE)
404 )
405
406 func getStdHandle(stdhandle uint32) (fd Handle) {
407 r, _ := GetStdHandle(stdhandle)
408 CloseOnExec(r)
409 return r
410 }
411
412 const ImplementsGetwd = true
413
414 func Getwd() (wd string, err error) {
415 b := make([]uint16, 300)
416 n, e := GetCurrentDirectory(uint32(len(b)), &b[0])
417 if e != nil {
418 return "", e
419 }
420 return string(utf16.Decode(b[0:n])), nil
421 }
422
423 func Chdir(path string) (err error) {
424 pathp, err := UTF16PtrFromString(path)
425 if err != nil {
426 return err
427 }
428 return SetCurrentDirectory(pathp)
429 }
430
431 func Mkdir(path string, mode uint32) (err error) {
432 pathp, err := UTF16PtrFromString(path)
433 if err != nil {
434 return err
435 }
436 return CreateDirectory(pathp, nil)
437 }
438
439 func Rmdir(path string) (err error) {
440 pathp, err := UTF16PtrFromString(path)
441 if err != nil {
442 return err
443 }
444 return RemoveDirectory(pathp)
445 }
446
447 func Unlink(path string) (err error) {
448 pathp, err := UTF16PtrFromString(path)
449 if err != nil {
450 return err
451 }
452 return DeleteFile(pathp)
453 }
454
455 func Rename(oldpath, newpath string) (err error) {
456 from, err := UTF16PtrFromString(oldpath)
457 if err != nil {
458 return err
459 }
460 to, err := UTF16PtrFromString(newpath)
461 if err != nil {
462 return err
463 }
464 return MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING)
465 }
466
467 func ComputerName() (name string, err error) {
468 var n uint32 = MAX_COMPUTERNAME_LENGTH + 1
469 b := make([]uint16, n)
470 e := GetComputerName(&b[0], &n)
471 if e != nil {
472 return "", e
473 }
474 return string(utf16.Decode(b[0:n])), nil
475 }
476
477 func Ftruncate(fd Handle, length int64) (err error) {
478 curoffset, e := Seek(fd, 0, 1)
479 if e != nil {
480 return e
481 }
482 defer Seek(fd, curoffset, 0)
483 _, e = Seek(fd, length, 0)
484 if e != nil {
485 return e
486 }
487 e = SetEndOfFile(fd)
488 if e != nil {
489 return e
490 }
491 return nil
492 }
493
494 func Gettimeofday(tv *Timeval) (err error) {
495 var ft Filetime
496 GetSystemTimeAsFileTime(&ft)
497 *tv = NsecToTimeval(ft.Nanoseconds())
498 return nil
499 }
500
501 func Pipe(p []Handle) (err error) {
502 if len(p) != 2 {
503 return syscall.EINVAL
504 }
505 var r, w Handle
506 e := CreatePipe(&r, &w, makeInheritSa(), 0)
507 if e != nil {
508 return e
509 }
510 p[0] = r
511 p[1] = w
512 return nil
513 }
514
515 func Utimes(path string, tv []Timeval) (err error) {
516 if len(tv) != 2 {
517 return syscall.EINVAL
518 }
519 pathp, e := UTF16PtrFromString(path)
520 if e != nil {
521 return e
522 }
523 h, e := CreateFile(pathp,
524 FILE_WRITE_ATTRIBUTES, FILE_SHARE_WRITE, nil,
525 OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0)
526 if e != nil {
527 return e
528 }
529 defer Close(h)
530 a := NsecToFiletime(tv[0].Nanoseconds())
531 w := NsecToFiletime(tv[1].Nanoseconds())
532 return SetFileTime(h, nil, &a, &w)
533 }
534
535 func UtimesNano(path string, ts []Timespec) (err error) {
536 if len(ts) != 2 {
537 return syscall.EINVAL
538 }
539 pathp, e := UTF16PtrFromString(path)
540 if e != nil {
541 return e
542 }
543 h, e := CreateFile(pathp,
544 FILE_WRITE_ATTRIBUTES, FILE_SHARE_WRITE, nil,
545 OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0)
546 if e != nil {
547 return e
548 }
549 defer Close(h)
550 a := NsecToFiletime(TimespecToNsec(ts[0]))
551 w := NsecToFiletime(TimespecToNsec(ts[1]))
552 return SetFileTime(h, nil, &a, &w)
553 }
554
555 func Fsync(fd Handle) (err error) {
556 return FlushFileBuffers(fd)
557 }
558
559 func Chmod(path string, mode uint32) (err error) {
560 if mode == 0 {
561 return syscall.EINVAL
562 }
563 p, e := UTF16PtrFromString(path)
564 if e != nil {
565 return e
566 }
567 attrs, e := GetFileAttributes(p)
568 if e != nil {
569 return e
570 }
571 if mode&S_IWRITE != 0 {
572 attrs &^= FILE_ATTRIBUTE_READONLY
573 } else {
574 attrs |= FILE_ATTRIBUTE_READONLY
575 }
576 return SetFileAttributes(p, attrs)
577 }
578
579 func LoadGetSystemTimePreciseAsFileTime() error {
580 return procGetSystemTimePreciseAsFileTime.Find()
581 }
582
583 func LoadCancelIoEx() error {
584 return procCancelIoEx.Find()
585 }
586
587 func LoadSetFileCompletionNotificationModes() error {
588 return procSetFileCompletionNotificationModes.Find()
589 }
590
591 // net api calls
592
593 const socket_error = uintptr(^uint32(0))
594
595 //sys WSAStartup(verreq uint32, data *WSAData) (sockerr error) = ws2_32.WSAStartup
596 //sys WSACleanup() (err error) [failretval==socket_error] = ws2_32.WSACleanup
597 //sys WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) [failretval==socket_error] = ws2_32.WSAIoctl
598 //sys socket(af int32, typ int32, protocol int32) (handle Handle, err error) [failretval==InvalidHandle] = ws2_32.socket
599 //sys Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) [failretval==socket_error] = ws2_32.setsockopt
600 //sys Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) [failretval==socket_error] = ws2_32.getsockopt
601 //sys bind(s Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socket_error] = ws2_32.bind
602 //sys connect(s Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socket_error] = ws2_32.connect
603 //sys getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) [failretval==socket_error] = ws2_32.getsockname
604 //sys getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) [failretval==socket_error] = ws2_32.getpeername
605 //sys listen(s Handle, backlog int32) (err error) [failretval==socket_error] = ws2_32.listen
606 //sys shutdown(s Handle, how int32) (err error) [failretval==socket_error] = ws2_32.shutdown
607 //sys Closesocket(s Handle) (err error) [failretval==socket_error] = ws2_32.closesocket
608 //sys AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) = mswsock.AcceptEx
609 //sys GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) = mswsock.GetAcceptExSockaddrs
610 //sys WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecv
611 //sys WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASend
612 //sys WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecvFrom
613 //sys WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASendTo
614 //sys GetHostByName(name string) (h *Hostent, err error) [failretval==nil] = ws2_32.gethostbyname
615 //sys GetServByName(name string, proto string) (s *Servent, err error) [failretval==nil] = ws2_32.getservbyname
616 //sys Ntohs(netshort uint16) (u uint16) = ws2_32.ntohs
617 //sys GetProtoByName(name string) (p *Protoent, err error) [failretval==nil] = ws2_32.getprotobyname
618 //sys DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) = dnsapi.DnsQuery_W
619 //sys DnsRecordListFree(rl *DNSRecord, freetype uint32) = dnsapi.DnsRecordListFree
620 //sys DnsNameCompare(name1 *uint16, name2 *uint16) (same bool) = dnsapi.DnsNameCompare_W
621 //sys GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) = ws2_32.GetAddrInfoW
622 //sys FreeAddrInfoW(addrinfo *AddrinfoW) = ws2_32.FreeAddrInfoW
623 //sys GetIfEntry(pIfRow *MibIfRow) (errcode error) = iphlpapi.GetIfEntry
624 //sys GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) = iphlpapi.GetAdaptersInfo
625 //sys SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) = kernel32.SetFileCompletionNotificationModes
626 //sys WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) [failretval==-1] = ws2_32.WSAEnumProtocolsW
627 //sys GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) = iphlpapi.GetAdaptersAddresses
628 //sys GetACP() (acp uint32) = kernel32.GetACP
629 //sys MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar
630
631 // For testing: clients can set this flag to force
632 // creation of IPv6 sockets to return EAFNOSUPPORT.
633 var SocketDisableIPv6 bool
634
635 type RawSockaddrInet4 struct {
636 Family uint16
637 Port uint16
638 Addr [4]byte /* in_addr */
639 Zero [8]uint8
640 }
641
642 type RawSockaddrInet6 struct {
643 Family uint16
644 Port uint16
645 Flowinfo uint32
646 Addr [16]byte /* in6_addr */
647 Scope_id uint32
648 }
649
650 type RawSockaddr struct {
651 Family uint16
652 Data [14]int8
653 }
654
655 type RawSockaddrAny struct {
656 Addr RawSockaddr
657 Pad [100]int8
658 }
659
660 type Sockaddr interface {
661 sockaddr() (ptr unsafe.Pointer, len int32, err error) // lowercase; only we can define Sockaddrs
662 }
663
664 type SockaddrInet4 struct {
665 Port int
666 Addr [4]byte
667 raw RawSockaddrInet4
668 }
669
670 func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, int32, error) {
671 if sa.Port < 0 || sa.Port > 0xFFFF {
672 return nil, 0, syscall.EINVAL
673 }
674 sa.raw.Family = AF_INET
675 p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
676 p[0] = byte(sa.Port >> 8)
677 p[1] = byte(sa.Port)
678 for i := 0; i < len(sa.Addr); i++ {
679 sa.raw.Addr[i] = sa.Addr[i]
680 }
681 return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil
682 }
683
684 type SockaddrInet6 struct {
685 Port int
686 ZoneId uint32
687 Addr [16]byte
688 raw RawSockaddrInet6
689 }
690
691 func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, int32, error) {
692 if sa.Port < 0 || sa.Port > 0xFFFF {
693 return nil, 0, syscall.EINVAL
694 }
695 sa.raw.Family = AF_INET6
696 p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
697 p[0] = byte(sa.Port >> 8)
698 p[1] = byte(sa.Port)
699 sa.raw.Scope_id = sa.ZoneId
700 for i := 0; i < len(sa.Addr); i++ {
701 sa.raw.Addr[i] = sa.Addr[i]
702 }
703 return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil
704 }
705
706 type RawSockaddrUnix struct {
707 Family uint16
708 Path [UNIX_PATH_MAX]int8
709 }
710
711 type SockaddrUnix struct {
712 Name string
713 raw RawSockaddrUnix
714 }
715
716 func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, int32, error) {
717 name := sa.Name
718 n := len(name)
719 if n > len(sa.raw.Path) {
720 return nil, 0, syscall.EINVAL
721 }
722 if n == len(sa.raw.Path) && name[0] != '@' {
723 return nil, 0, syscall.EINVAL
724 }
725 sa.raw.Family = AF_UNIX
726 for i := 0; i < n; i++ {
727 sa.raw.Path[i] = int8(name[i])
728 }
729 // length is family (uint16), name, NUL.
730 sl := int32(2)
731 if n > 0 {
732 sl += int32(n) + 1
733 }
734 if sa.raw.Path[0] == '@' {
735 sa.raw.Path[0] = 0
736 // Don't count trailing NUL for abstract address.
737 sl--
738 }
739
740 return unsafe.Pointer(&sa.raw), sl, nil
741 }
742
743 func (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) {
744 switch rsa.Addr.Family {
745 case AF_UNIX:
746 pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
747 sa := new(SockaddrUnix)
748 if pp.Path[0] == 0 {
749 // "Abstract" Unix domain socket.
750 // Rewrite leading NUL as @ for textual display.
751 // (This is the standard convention.)
752 // Not friendly to overwrite in place,
753 // but the callers below don't care.
754 pp.Path[0] = '@'
755 }
756
757 // Assume path ends at NUL.
758 // This is not technically the Linux semantics for
759 // abstract Unix domain sockets--they are supposed
760 // to be uninterpreted fixed-size binary blobs--but
761 // everyone uses this convention.
762 n := 0
763 for n < len(pp.Path) && pp.Path[n] != 0 {
764 n++
765 }
766 bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
767 sa.Name = string(bytes)
768 return sa, nil
769
770 case AF_INET:
771 pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
772 sa := new(SockaddrInet4)
773 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
774 sa.Port = int(p[0])<<8 + int(p[1])
775 for i := 0; i < len(sa.Addr); i++ {
776 sa.Addr[i] = pp.Addr[i]
777 }
778 return sa, nil
779
780 case AF_INET6:
781 pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
782 sa := new(SockaddrInet6)
783 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
784 sa.Port = int(p[0])<<8 + int(p[1])
785 sa.ZoneId = pp.Scope_id
786 for i := 0; i < len(sa.Addr); i++ {
787 sa.Addr[i] = pp.Addr[i]
788 }
789 return sa, nil
790 }
791 return nil, syscall.EAFNOSUPPORT
792 }
793
794 func Socket(domain, typ, proto int) (fd Handle, err error) {
795 if domain == AF_INET6 && SocketDisableIPv6 {
796 return InvalidHandle, syscall.EAFNOSUPPORT
797 }
798 return socket(int32(domain), int32(typ), int32(proto))
799 }
800
801 func SetsockoptInt(fd Handle, level, opt int, value int) (err error) {
802 v := int32(value)
803 return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&v)), int32(unsafe.Sizeof(v)))
804 }
805
806 func Bind(fd Handle, sa Sockaddr) (err error) {
807 ptr, n, err := sa.sockaddr()
808 if err != nil {
809 return err
810 }
811 return bind(fd, ptr, n)
812 }
813
814 func Connect(fd Handle, sa Sockaddr) (err error) {
815 ptr, n, err := sa.sockaddr()
816 if err != nil {
817 return err
818 }
819 return connect(fd, ptr, n)
820 }
821
822 func Getsockname(fd Handle) (sa Sockaddr, err error) {
823 var rsa RawSockaddrAny
824 l := int32(unsafe.Sizeof(rsa))
825 if err = getsockname(fd, &rsa, &l); err != nil {
826 return
827 }
828 return rsa.Sockaddr()
829 }
830
831 func Getpeername(fd Handle) (sa Sockaddr, err error) {
832 var rsa RawSockaddrAny
833 l := int32(unsafe.Sizeof(rsa))
834 if err = getpeername(fd, &rsa, &l); err != nil {
835 return
836 }
837 return rsa.Sockaddr()
838 }
839
840 func Listen(s Handle, n int) (err error) {
841 return listen(s, int32(n))
842 }
843
844 func Shutdown(fd Handle, how int) (err error) {
845 return shutdown(fd, int32(how))
846 }
847
848 func WSASendto(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to Sockaddr, overlapped *Overlapped, croutine *byte) (err error) {
849 rsa, l, err := to.sockaddr()
850 if err != nil {
851 return err
852 }
853 return WSASendTo(s, bufs, bufcnt, sent, flags, (*RawSockaddrAny)(unsafe.Pointer(rsa)), l, overlapped, croutine)
854 }
855
856 func LoadGetAddrInfo() error {
857 return procGetAddrInfoW.Find()
858 }
859
860 var connectExFunc struct {
861 once sync.Once
862 addr uintptr
863 err error
864 }
865
866 func LoadConnectEx() error {
867 connectExFunc.once.Do(func() {
868 var s Handle
869 s, connectExFunc.err = Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)
870 if connectExFunc.err != nil {
871 return
872 }
873 defer CloseHandle(s)
874 var n uint32
875 connectExFunc.err = WSAIoctl(s,
876 SIO_GET_EXTENSION_FUNCTION_POINTER,
877 (*byte)(unsafe.Pointer(&WSAID_CONNECTEX)),
878 uint32(unsafe.Sizeof(WSAID_CONNECTEX)),
879 (*byte)(unsafe.Pointer(&connectExFunc.addr)),
880 uint32(unsafe.Sizeof(connectExFunc.addr)),
881 &n, nil, 0)
882 })
883 return connectExFunc.err
884 }
885
886 func connectEx(s Handle, name unsafe.Pointer, namelen int32, sendBuf *byte, sendDataLen uint32, bytesSent *uint32, overlapped *Overlapped) (err error) {
887 r1, _, e1 := syscall.Syscall9(connectExFunc.addr, 7, uintptr(s), uintptr(name), uintptr(namelen), uintptr(unsafe.Pointer(sendBuf)), uintptr(sendDataLen), uintptr(unsafe.Pointer(bytesSent)), uintptr(unsafe.Pointer(overlapped)), 0, 0)
888 if r1 == 0 {
889 if e1 != 0 {
890 err = error(e1)
891 } else {
892 err = syscall.EINVAL
893 }
894 }
895 return
896 }
897
898 func ConnectEx(fd Handle, sa Sockaddr, sendBuf *byte, sendDataLen uint32, bytesSent *uint32, overlapped *Overlapped) error {
899 err := LoadConnectEx()
900 if err != nil {
901 return errorspkg.New("failed to find ConnectEx: " + err.Error())
902 }
903 ptr, n, err := sa.sockaddr()
904 if err != nil {
905 return err
906 }
907 return connectEx(fd, ptr, n, sendBuf, sendDataLen, bytesSent, overlapped)
908 }
909
910 var sendRecvMsgFunc struct {
911 once sync.Once
912 sendAddr uintptr
913 recvAddr uintptr
914 err error
915 }
916
917 func loadWSASendRecvMsg() error {
918 sendRecvMsgFunc.once.Do(func() {
919 var s Handle
920 s, sendRecvMsgFunc.err = Socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)
921 if sendRecvMsgFunc.err != nil {
922 return
923 }
924 defer CloseHandle(s)
925 var n uint32
926 sendRecvMsgFunc.err = WSAIoctl(s,
927 SIO_GET_EXTENSION_FUNCTION_POINTER,
928 (*byte)(unsafe.Pointer(&WSAID_WSARECVMSG)),
929 uint32(unsafe.Sizeof(WSAID_WSARECVMSG)),
930 (*byte)(unsafe.Pointer(&sendRecvMsgFunc.recvAddr)),
931 uint32(unsafe.Sizeof(sendRecvMsgFunc.recvAddr)),
932 &n, nil, 0)
933 if sendRecvMsgFunc.err != nil {
934 return
935 }
936 sendRecvMsgFunc.err = WSAIoctl(s,
937 SIO_GET_EXTENSION_FUNCTION_POINTER,
938 (*byte)(unsafe.Pointer(&WSAID_WSASENDMSG)),
939 uint32(unsafe.Sizeof(WSAID_WSASENDMSG)),
940 (*byte)(unsafe.Pointer(&sendRecvMsgFunc.sendAddr)),
941 uint32(unsafe.Sizeof(sendRecvMsgFunc.sendAddr)),
942 &n, nil, 0)
943 })
944 return sendRecvMsgFunc.err
945 }
946
947 func WSASendMsg(fd Handle, msg *WSAMsg, flags uint32, bytesSent *uint32, overlapped *Overlapped, croutine *byte) error {
948 err := loadWSASendRecvMsg()
949 if err != nil {
950 return err
951 }
952 r1, _, e1 := syscall.Syscall6(sendRecvMsgFunc.sendAddr, 6, uintptr(fd), uintptr(unsafe.Pointer(msg)), uintptr(flags), uintptr(unsafe.Pointer(bytesSent)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
953 if r1 == socket_error {
954 if e1 != 0 {
955 err = errnoErr(e1)
956 } else {
957 err = syscall.EINVAL
958 }
959 }
960 return err
961 }
962
963 func WSARecvMsg(fd Handle, msg *WSAMsg, bytesReceived *uint32, overlapped *Overlapped, croutine *byte) error {
964 err := loadWSASendRecvMsg()
965 if err != nil {
966 return err
967 }
968 r1, _, e1 := syscall.Syscall6(sendRecvMsgFunc.recvAddr, 5, uintptr(fd), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(bytesReceived)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0)
969 if r1 == socket_error {
970 if e1 != 0 {
971 err = errnoErr(e1)
972 } else {
973 err = syscall.EINVAL
974 }
975 }
976 return err
977 }
978
979 // Invented structures to support what package os expects.
980 type Rusage struct {
981 CreationTime Filetime
982 ExitTime Filetime
983 KernelTime Filetime
984 UserTime Filetime
985 }
986
987 type WaitStatus struct {
988 ExitCode uint32
989 }
990
991 func (w WaitStatus) Exited() bool { return true }
992
993 func (w WaitStatus) ExitStatus() int { return int(w.ExitCode) }
994
995 func (w WaitStatus) Signal() Signal { return -1 }
996
997 func (w WaitStatus) CoreDump() bool { return false }
998
999 func (w WaitStatus) Stopped() bool { return false }
1000
1001 func (w WaitStatus) Continued() bool { return false }
1002
1003 func (w WaitStatus) StopSignal() Signal { return -1 }
1004
1005 func (w WaitStatus) Signaled() bool { return false }
1006
1007 func (w WaitStatus) TrapCause() int { return -1 }
1008
1009 // Timespec is an invented structure on Windows, but here for
1010 // consistency with the corresponding package for other operating systems.
1011 type Timespec struct {
1012 Sec int64
1013 Nsec int64
1014 }
1015
1016 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
1017
1018 func NsecToTimespec(nsec int64) (ts Timespec) {
1019 ts.Sec = nsec / 1e9
1020 ts.Nsec = nsec % 1e9
1021 return
1022 }
1023
1024 // TODO(brainman): fix all needed for net
1025
1026 func Accept(fd Handle) (nfd Handle, sa Sockaddr, err error) { return 0, nil, syscall.EWINDOWS }
1027 func Recvfrom(fd Handle, p []byte, flags int) (n int, from Sockaddr, err error) {
1028 return 0, nil, syscall.EWINDOWS
1029 }
1030 func Sendto(fd Handle, p []byte, flags int, to Sockaddr) (err error) { return syscall.EWINDOWS }
1031 func SetsockoptTimeval(fd Handle, level, opt int, tv *Timeval) (err error) { return syscall.EWINDOWS }
1032
1033 // The Linger struct is wrong but we only noticed after Go 1.
1034 // sysLinger is the real system call structure.
1035
1036 // BUG(brainman): The definition of Linger is not appropriate for direct use
1037 // with Setsockopt and Getsockopt.
1038 // Use SetsockoptLinger instead.
1039
1040 type Linger struct {
1041 Onoff int32
1042 Linger int32
1043 }
1044
1045 type sysLinger struct {
1046 Onoff uint16
1047 Linger uint16
1048 }
1049
1050 type IPMreq struct {
1051 Multiaddr [4]byte /* in_addr */
1052 Interface [4]byte /* in_addr */
1053 }
1054
1055 type IPv6Mreq struct {
1056 Multiaddr [16]byte /* in6_addr */
1057 Interface uint32
1058 }
1059
1060 func GetsockoptInt(fd Handle, level, opt int) (int, error) { return -1, syscall.EWINDOWS }
1061
1062 func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) {
1063 sys := sysLinger{Onoff: uint16(l.Onoff), Linger: uint16(l.Linger)}
1064 return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&sys)), int32(unsafe.Sizeof(sys)))
1065 }
1066
1067 func SetsockoptInet4Addr(fd Handle, level, opt int, value [4]byte) (err error) {
1068 return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&value[0])), 4)
1069 }
1070 func SetsockoptIPMreq(fd Handle, level, opt int, mreq *IPMreq) (err error) {
1071 return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(mreq)), int32(unsafe.Sizeof(*mreq)))
1072 }
1073 func SetsockoptIPv6Mreq(fd Handle, level, opt int, mreq *IPv6Mreq) (err error) {
1074 return syscall.EWINDOWS
1075 }
1076
1077 func Getpid() (pid int) { return int(getCurrentProcessId()) }
1078
1079 func FindFirstFile(name *uint16, data *Win32finddata) (handle Handle, err error) {
1080 // NOTE(rsc): The Win32finddata struct is wrong for the system call:
1081 // the two paths are each one uint16 short. Use the correct struct,
1082 // a win32finddata1, and then copy the results out.
1083 // There is no loss of expressivity here, because the final
1084 // uint16, if it is used, is supposed to be a NUL, and Go doesn't need that.
1085 // For Go 1.1, we might avoid the allocation of win32finddata1 here
1086 // by adding a final Bug [2]uint16 field to the struct and then
1087 // adjusting the fields in the result directly.
1088 var data1 win32finddata1
1089 handle, err = findFirstFile1(name, &data1)
1090 if err == nil {
1091 copyFindData(data, &data1)
1092 }
1093 return
1094 }
1095
1096 func FindNextFile(handle Handle, data *Win32finddata) (err error) {
1097 var data1 win32finddata1
1098 err = findNextFile1(handle, &data1)
1099 if err == nil {
1100 copyFindData(data, &data1)
1101 }
1102 return
1103 }
1104
1105 func getProcessEntry(pid int) (*ProcessEntry32, error) {
1106 snapshot, err := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)
1107 if err != nil {
1108 return nil, err
1109 }
1110 defer CloseHandle(snapshot)
1111 var procEntry ProcessEntry32
1112 procEntry.Size = uint32(unsafe.Sizeof(procEntry))
1113 if err = Process32First(snapshot, &procEntry); err != nil {
1114 return nil, err
1115 }
1116 for {
1117 if procEntry.ProcessID == uint32(pid) {
1118 return &procEntry, nil
1119 }
1120 err = Process32Next(snapshot, &procEntry)
1121 if err != nil {
1122 return nil, err
1123 }
1124 }
1125 }
1126
1127 func Getppid() (ppid int) {
1128 pe, err := getProcessEntry(Getpid())
1129 if err != nil {
1130 return -1
1131 }
1132 return int(pe.ParentProcessID)
1133 }
1134
1135 // TODO(brainman): fix all needed for os
1136 func Fchdir(fd Handle) (err error) { return syscall.EWINDOWS }
1137 func Link(oldpath, newpath string) (err error) { return syscall.EWINDOWS }
1138 func Symlink(path, link string) (err error) { return syscall.EWINDOWS }
1139
1140 func Fchmod(fd Handle, mode uint32) (err error) { return syscall.EWINDOWS }
1141 func Chown(path string, uid int, gid int) (err error) { return syscall.EWINDOWS }
1142 func Lchown(path string, uid int, gid int) (err error) { return syscall.EWINDOWS }
1143 func Fchown(fd Handle, uid int, gid int) (err error) { return syscall.EWINDOWS }
1144
1145 func Getuid() (uid int) { return -1 }
1146 func Geteuid() (euid int) { return -1 }
1147 func Getgid() (gid int) { return -1 }
1148 func Getegid() (egid int) { return -1 }
1149 func Getgroups() (gids []int, err error) { return nil, syscall.EWINDOWS }
1150
1151 type Signal int
1152
1153 func (s Signal) Signal() {}
1154
1155 func (s Signal) String() string {
1156 if 0 <= s && int(s) < len(signals) {
1157 str := signals[s]
1158 if str != "" {
1159 return str
1160 }
1161 }
1162 return "signal " + itoa(int(s))
1163 }
1164
1165 func LoadCreateSymbolicLink() error {
1166 return procCreateSymbolicLinkW.Find()
1167 }
1168
1169 // Readlink returns the destination of the named symbolic link.
1170 func Readlink(path string, buf []byte) (n int, err error) {
1171 fd, err := CreateFile(StringToUTF16Ptr(path), GENERIC_READ, 0, nil, OPEN_EXISTING,
1172 FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, 0)
1173 if err != nil {
1174 return -1, err
1175 }
1176 defer CloseHandle(fd)
1177
1178 rdbbuf := make([]byte, MAXIMUM_REPARSE_DATA_BUFFER_SIZE)
1179 var bytesReturned uint32
1180 err = DeviceIoControl(fd, FSCTL_GET_REPARSE_POINT, nil, 0, &rdbbuf[0], uint32(len(rdbbuf)), &bytesReturned, nil)
1181 if err != nil {
1182 return -1, err
1183 }
1184
1185 rdb := (*reparseDataBuffer)(unsafe.Pointer(&rdbbuf[0]))
1186 var s string
1187 switch rdb.ReparseTag {
1188 case IO_REPARSE_TAG_SYMLINK:
1189 data := (*symbolicLinkReparseBuffer)(unsafe.Pointer(&rdb.reparseBuffer))
1190 p := (*[0xffff]uint16)(unsafe.Pointer(&data.PathBuffer[0]))
1191 s = UTF16ToString(p[data.PrintNameOffset/2 : (data.PrintNameLength-data.PrintNameOffset)/2])
1192 case IO_REPARSE_TAG_MOUNT_POINT:
1193 data := (*mountPointReparseBuffer)(unsafe.Pointer(&rdb.reparseBuffer))
1194 p := (*[0xffff]uint16)(unsafe.Pointer(&data.PathBuffer[0]))
1195 s = UTF16ToString(p[data.PrintNameOffset/2 : (data.PrintNameLength-data.PrintNameOffset)/2])
1196 default:
1197 // the path is not a symlink or junction but another type of reparse
1198 // point
1199 return -1, syscall.ENOENT
1200 }
1201 n = copy(buf, []byte(s))
1202
1203 return n, nil
1204 }
0 // Copyright 2011 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 package windows
5
6 import "syscall"
7
8 const (
9 // Windows errors.
10 ERROR_FILE_NOT_FOUND syscall.Errno = 2
11 ERROR_PATH_NOT_FOUND syscall.Errno = 3
12 ERROR_ACCESS_DENIED syscall.Errno = 5
13 ERROR_NO_MORE_FILES syscall.Errno = 18
14 ERROR_HANDLE_EOF syscall.Errno = 38
15 ERROR_NETNAME_DELETED syscall.Errno = 64
16 ERROR_FILE_EXISTS syscall.Errno = 80
17 ERROR_BROKEN_PIPE syscall.Errno = 109
18 ERROR_BUFFER_OVERFLOW syscall.Errno = 111
19 ERROR_INSUFFICIENT_BUFFER syscall.Errno = 122
20 ERROR_MOD_NOT_FOUND syscall.Errno = 126
21 ERROR_PROC_NOT_FOUND syscall.Errno = 127
22 ERROR_ALREADY_EXISTS syscall.Errno = 183
23 ERROR_ENVVAR_NOT_FOUND syscall.Errno = 203
24 ERROR_MORE_DATA syscall.Errno = 234
25 ERROR_OPERATION_ABORTED syscall.Errno = 995
26 ERROR_IO_PENDING syscall.Errno = 997
27 ERROR_SERVICE_SPECIFIC_ERROR syscall.Errno = 1066
28 ERROR_NOT_FOUND syscall.Errno = 1168
29 ERROR_PRIVILEGE_NOT_HELD syscall.Errno = 1314
30 WSAEACCES syscall.Errno = 10013
31 WSAEMSGSIZE syscall.Errno = 10040
32 WSAECONNRESET syscall.Errno = 10054
33 )
34
35 const (
36 // Invented values to support what package os expects.
37 O_RDONLY = 0x00000
38 O_WRONLY = 0x00001
39 O_RDWR = 0x00002
40 O_CREAT = 0x00040
41 O_EXCL = 0x00080
42 O_NOCTTY = 0x00100
43 O_TRUNC = 0x00200
44 O_NONBLOCK = 0x00800
45 O_APPEND = 0x00400
46 O_SYNC = 0x01000
47 O_ASYNC = 0x02000
48 O_CLOEXEC = 0x80000
49 )
50
51 const (
52 // More invented values for signals
53 SIGHUP = Signal(0x1)
54 SIGINT = Signal(0x2)
55 SIGQUIT = Signal(0x3)
56 SIGILL = Signal(0x4)
57 SIGTRAP = Signal(0x5)
58 SIGABRT = Signal(0x6)
59 SIGBUS = Signal(0x7)
60 SIGFPE = Signal(0x8)
61 SIGKILL = Signal(0x9)
62 SIGSEGV = Signal(0xb)
63 SIGPIPE = Signal(0xd)
64 SIGALRM = Signal(0xe)
65 SIGTERM = Signal(0xf)
66 )
67
68 var signals = [...]string{
69 1: "hangup",
70 2: "interrupt",
71 3: "quit",
72 4: "illegal instruction",
73 5: "trace/breakpoint trap",
74 6: "aborted",
75 7: "bus error",
76 8: "floating point exception",
77 9: "killed",
78 10: "user defined signal 1",
79 11: "segmentation fault",
80 12: "user defined signal 2",
81 13: "broken pipe",
82 14: "alarm clock",
83 15: "terminated",
84 }
85
86 const (
87 GENERIC_READ = 0x80000000
88 GENERIC_WRITE = 0x40000000
89 GENERIC_EXECUTE = 0x20000000
90 GENERIC_ALL = 0x10000000
91
92 FILE_LIST_DIRECTORY = 0x00000001
93 FILE_APPEND_DATA = 0x00000004
94 FILE_WRITE_ATTRIBUTES = 0x00000100
95
96 FILE_SHARE_READ = 0x00000001
97 FILE_SHARE_WRITE = 0x00000002
98 FILE_SHARE_DELETE = 0x00000004
99
100 FILE_ATTRIBUTE_READONLY = 0x00000001
101 FILE_ATTRIBUTE_HIDDEN = 0x00000002
102 FILE_ATTRIBUTE_SYSTEM = 0x00000004
103 FILE_ATTRIBUTE_DIRECTORY = 0x00000010
104 FILE_ATTRIBUTE_ARCHIVE = 0x00000020
105 FILE_ATTRIBUTE_DEVICE = 0x00000040
106 FILE_ATTRIBUTE_NORMAL = 0x00000080
107 FILE_ATTRIBUTE_TEMPORARY = 0x00000100
108 FILE_ATTRIBUTE_SPARSE_FILE = 0x00000200
109 FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400
110 FILE_ATTRIBUTE_COMPRESSED = 0x00000800
111 FILE_ATTRIBUTE_OFFLINE = 0x00001000
112 FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x00002000
113 FILE_ATTRIBUTE_ENCRYPTED = 0x00004000
114 FILE_ATTRIBUTE_INTEGRITY_STREAM = 0x00008000
115 FILE_ATTRIBUTE_VIRTUAL = 0x00010000
116 FILE_ATTRIBUTE_NO_SCRUB_DATA = 0x00020000
117 FILE_ATTRIBUTE_RECALL_ON_OPEN = 0x00040000
118 FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS = 0x00400000
119
120 INVALID_FILE_ATTRIBUTES = 0xffffffff
121
122 CREATE_NEW = 1
123 CREATE_ALWAYS = 2
124 OPEN_EXISTING = 3
125 OPEN_ALWAYS = 4
126 TRUNCATE_EXISTING = 5
127
128 FILE_FLAG_OPEN_REPARSE_POINT = 0x00200000
129 FILE_FLAG_BACKUP_SEMANTICS = 0x02000000
130 FILE_FLAG_OVERLAPPED = 0x40000000
131
132 HANDLE_FLAG_INHERIT = 0x00000001
133 STARTF_USESTDHANDLES = 0x00000100
134 STARTF_USESHOWWINDOW = 0x00000001
135 DUPLICATE_CLOSE_SOURCE = 0x00000001
136 DUPLICATE_SAME_ACCESS = 0x00000002
137
138 STD_INPUT_HANDLE = -10 & (1<<32 - 1)
139 STD_OUTPUT_HANDLE = -11 & (1<<32 - 1)
140 STD_ERROR_HANDLE = -12 & (1<<32 - 1)
141
142 FILE_BEGIN = 0
143 FILE_CURRENT = 1
144 FILE_END = 2
145
146 LANG_ENGLISH = 0x09
147 SUBLANG_ENGLISH_US = 0x01
148
149 FORMAT_MESSAGE_ALLOCATE_BUFFER = 256
150 FORMAT_MESSAGE_IGNORE_INSERTS = 512
151 FORMAT_MESSAGE_FROM_STRING = 1024
152 FORMAT_MESSAGE_FROM_HMODULE = 2048
153 FORMAT_MESSAGE_FROM_SYSTEM = 4096
154 FORMAT_MESSAGE_ARGUMENT_ARRAY = 8192
155 FORMAT_MESSAGE_MAX_WIDTH_MASK = 255
156
157 MAX_PATH = 260
158 MAX_LONG_PATH = 32768
159
160 MAX_COMPUTERNAME_LENGTH = 15
161
162 TIME_ZONE_ID_UNKNOWN = 0
163 TIME_ZONE_ID_STANDARD = 1
164
165 TIME_ZONE_ID_DAYLIGHT = 2
166 IGNORE = 0
167 INFINITE = 0xffffffff
168
169 WAIT_TIMEOUT = 258
170 WAIT_ABANDONED = 0x00000080
171 WAIT_OBJECT_0 = 0x00000000
172 WAIT_FAILED = 0xFFFFFFFF
173
174 PROCESS_TERMINATE = 1
175 PROCESS_QUERY_INFORMATION = 0x00000400
176 SYNCHRONIZE = 0x00100000
177
178 FILE_MAP_COPY = 0x01
179 FILE_MAP_WRITE = 0x02
180 FILE_MAP_READ = 0x04
181 FILE_MAP_EXECUTE = 0x20
182
183 CTRL_C_EVENT = 0
184 CTRL_BREAK_EVENT = 1
185
186 // Windows reserves errors >= 1<<29 for application use.
187 APPLICATION_ERROR = 1 << 29
188 )
189
190 const (
191 // Process creation flags.
192 CREATE_BREAKAWAY_FROM_JOB = 0x01000000
193 CREATE_DEFAULT_ERROR_MODE = 0x04000000
194 CREATE_NEW_CONSOLE = 0x00000010
195 CREATE_NEW_PROCESS_GROUP = 0x00000200
196 CREATE_NO_WINDOW = 0x08000000
197 CREATE_PROTECTED_PROCESS = 0x00040000
198 CREATE_PRESERVE_CODE_AUTHZ_LEVEL = 0x02000000
199 CREATE_SEPARATE_WOW_VDM = 0x00000800
200 CREATE_SHARED_WOW_VDM = 0x00001000
201 CREATE_SUSPENDED = 0x00000004
202 CREATE_UNICODE_ENVIRONMENT = 0x00000400
203 DEBUG_ONLY_THIS_PROCESS = 0x00000002
204 DEBUG_PROCESS = 0x00000001
205 DETACHED_PROCESS = 0x00000008
206 EXTENDED_STARTUPINFO_PRESENT = 0x00080000
207 INHERIT_PARENT_AFFINITY = 0x00010000
208 )
209
210 const (
211 // flags for CreateToolhelp32Snapshot
212 TH32CS_SNAPHEAPLIST = 0x01
213 TH32CS_SNAPPROCESS = 0x02
214 TH32CS_SNAPTHREAD = 0x04
215 TH32CS_SNAPMODULE = 0x08
216 TH32CS_SNAPMODULE32 = 0x10
217 TH32CS_SNAPALL = TH32CS_SNAPHEAPLIST | TH32CS_SNAPMODULE | TH32CS_SNAPPROCESS | TH32CS_SNAPTHREAD
218 TH32CS_INHERIT = 0x80000000
219 )
220
221 const (
222 // filters for ReadDirectoryChangesW
223 FILE_NOTIFY_CHANGE_FILE_NAME = 0x001
224 FILE_NOTIFY_CHANGE_DIR_NAME = 0x002
225 FILE_NOTIFY_CHANGE_ATTRIBUTES = 0x004
226 FILE_NOTIFY_CHANGE_SIZE = 0x008
227 FILE_NOTIFY_CHANGE_LAST_WRITE = 0x010
228 FILE_NOTIFY_CHANGE_LAST_ACCESS = 0x020
229 FILE_NOTIFY_CHANGE_CREATION = 0x040
230 FILE_NOTIFY_CHANGE_SECURITY = 0x100
231 )
232
233 const (
234 // do not reorder
235 FILE_ACTION_ADDED = iota + 1
236 FILE_ACTION_REMOVED
237 FILE_ACTION_MODIFIED
238 FILE_ACTION_RENAMED_OLD_NAME
239 FILE_ACTION_RENAMED_NEW_NAME
240 )
241
242 const (
243 // wincrypt.h
244 PROV_RSA_FULL = 1
245 PROV_RSA_SIG = 2
246 PROV_DSS = 3
247 PROV_FORTEZZA = 4
248 PROV_MS_EXCHANGE = 5
249 PROV_SSL = 6
250 PROV_RSA_SCHANNEL = 12
251 PROV_DSS_DH = 13
252 PROV_EC_ECDSA_SIG = 14
253 PROV_EC_ECNRA_SIG = 15
254 PROV_EC_ECDSA_FULL = 16
255 PROV_EC_ECNRA_FULL = 17
256 PROV_DH_SCHANNEL = 18
257 PROV_SPYRUS_LYNKS = 20
258 PROV_RNG = 21
259 PROV_INTEL_SEC = 22
260 PROV_REPLACE_OWF = 23
261 PROV_RSA_AES = 24
262 CRYPT_VERIFYCONTEXT = 0xF0000000
263 CRYPT_NEWKEYSET = 0x00000008
264 CRYPT_DELETEKEYSET = 0x00000010
265 CRYPT_MACHINE_KEYSET = 0x00000020
266 CRYPT_SILENT = 0x00000040
267 CRYPT_DEFAULT_CONTAINER_OPTIONAL = 0x00000080
268
269 USAGE_MATCH_TYPE_AND = 0
270 USAGE_MATCH_TYPE_OR = 1
271
272 /* msgAndCertEncodingType values for CertOpenStore function */
273 X509_ASN_ENCODING = 0x00000001
274 PKCS_7_ASN_ENCODING = 0x00010000
275
276 /* storeProvider values for CertOpenStore function */
277 CERT_STORE_PROV_MSG = 1
278 CERT_STORE_PROV_MEMORY = 2
279 CERT_STORE_PROV_FILE = 3
280 CERT_STORE_PROV_REG = 4
281 CERT_STORE_PROV_PKCS7 = 5
282 CERT_STORE_PROV_SERIALIZED = 6
283 CERT_STORE_PROV_FILENAME_A = 7
284 CERT_STORE_PROV_FILENAME_W = 8
285 CERT_STORE_PROV_FILENAME = CERT_STORE_PROV_FILENAME_W
286 CERT_STORE_PROV_SYSTEM_A = 9
287 CERT_STORE_PROV_SYSTEM_W = 10
288 CERT_STORE_PROV_SYSTEM = CERT_STORE_PROV_SYSTEM_W
289 CERT_STORE_PROV_COLLECTION = 11
290 CERT_STORE_PROV_SYSTEM_REGISTRY_A = 12
291 CERT_STORE_PROV_SYSTEM_REGISTRY_W = 13
292 CERT_STORE_PROV_SYSTEM_REGISTRY = CERT_STORE_PROV_SYSTEM_REGISTRY_W
293 CERT_STORE_PROV_PHYSICAL_W = 14
294 CERT_STORE_PROV_PHYSICAL = CERT_STORE_PROV_PHYSICAL_W
295 CERT_STORE_PROV_SMART_CARD_W = 15
296 CERT_STORE_PROV_SMART_CARD = CERT_STORE_PROV_SMART_CARD_W
297 CERT_STORE_PROV_LDAP_W = 16
298 CERT_STORE_PROV_LDAP = CERT_STORE_PROV_LDAP_W
299 CERT_STORE_PROV_PKCS12 = 17
300
301 /* store characteristics (low WORD of flag) for CertOpenStore function */
302 CERT_STORE_NO_CRYPT_RELEASE_FLAG = 0x00000001
303 CERT_STORE_SET_LOCALIZED_NAME_FLAG = 0x00000002
304 CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG = 0x00000004
305 CERT_STORE_DELETE_FLAG = 0x00000010
306 CERT_STORE_UNSAFE_PHYSICAL_FLAG = 0x00000020
307 CERT_STORE_SHARE_STORE_FLAG = 0x00000040
308 CERT_STORE_SHARE_CONTEXT_FLAG = 0x00000080
309 CERT_STORE_MANIFOLD_FLAG = 0x00000100
310 CERT_STORE_ENUM_ARCHIVED_FLAG = 0x00000200
311 CERT_STORE_UPDATE_KEYID_FLAG = 0x00000400
312 CERT_STORE_BACKUP_RESTORE_FLAG = 0x00000800
313 CERT_STORE_MAXIMUM_ALLOWED_FLAG = 0x00001000
314 CERT_STORE_CREATE_NEW_FLAG = 0x00002000
315 CERT_STORE_OPEN_EXISTING_FLAG = 0x00004000
316 CERT_STORE_READONLY_FLAG = 0x00008000
317
318 /* store locations (high WORD of flag) for CertOpenStore function */
319 CERT_SYSTEM_STORE_CURRENT_USER = 0x00010000
320 CERT_SYSTEM_STORE_LOCAL_MACHINE = 0x00020000
321 CERT_SYSTEM_STORE_CURRENT_SERVICE = 0x00040000
322 CERT_SYSTEM_STORE_SERVICES = 0x00050000
323 CERT_SYSTEM_STORE_USERS = 0x00060000
324 CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY = 0x00070000
325 CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY = 0x00080000
326 CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE = 0x00090000
327 CERT_SYSTEM_STORE_UNPROTECTED_FLAG = 0x40000000
328 CERT_SYSTEM_STORE_RELOCATE_FLAG = 0x80000000
329
330 /* Miscellaneous high-WORD flags for CertOpenStore function */
331 CERT_REGISTRY_STORE_REMOTE_FLAG = 0x00010000
332 CERT_REGISTRY_STORE_SERIALIZED_FLAG = 0x00020000
333 CERT_REGISTRY_STORE_ROAMING_FLAG = 0x00040000
334 CERT_REGISTRY_STORE_MY_IE_DIRTY_FLAG = 0x00080000
335 CERT_REGISTRY_STORE_LM_GPT_FLAG = 0x01000000
336 CERT_REGISTRY_STORE_CLIENT_GPT_FLAG = 0x80000000
337 CERT_FILE_STORE_COMMIT_ENABLE_FLAG = 0x00010000
338 CERT_LDAP_STORE_SIGN_FLAG = 0x00010000
339 CERT_LDAP_STORE_AREC_EXCLUSIVE_FLAG = 0x00020000
340 CERT_LDAP_STORE_OPENED_FLAG = 0x00040000
341 CERT_LDAP_STORE_UNBIND_FLAG = 0x00080000
342
343 /* addDisposition values for CertAddCertificateContextToStore function */
344 CERT_STORE_ADD_NEW = 1
345 CERT_STORE_ADD_USE_EXISTING = 2
346 CERT_STORE_ADD_REPLACE_EXISTING = 3
347 CERT_STORE_ADD_ALWAYS = 4
348 CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES = 5
349 CERT_STORE_ADD_NEWER = 6
350 CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES = 7
351
352 /* ErrorStatus values for CertTrustStatus struct */
353 CERT_TRUST_NO_ERROR = 0x00000000
354 CERT_TRUST_IS_NOT_TIME_VALID = 0x00000001
355 CERT_TRUST_IS_REVOKED = 0x00000004
356 CERT_TRUST_IS_NOT_SIGNATURE_VALID = 0x00000008
357 CERT_TRUST_IS_NOT_VALID_FOR_USAGE = 0x00000010
358 CERT_TRUST_IS_UNTRUSTED_ROOT = 0x00000020
359 CERT_TRUST_REVOCATION_STATUS_UNKNOWN = 0x00000040
360 CERT_TRUST_IS_CYCLIC = 0x00000080
361 CERT_TRUST_INVALID_EXTENSION = 0x00000100
362 CERT_TRUST_INVALID_POLICY_CONSTRAINTS = 0x00000200
363 CERT_TRUST_INVALID_BASIC_CONSTRAINTS = 0x00000400
364 CERT_TRUST_INVALID_NAME_CONSTRAINTS = 0x00000800
365 CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT = 0x00001000
366 CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT = 0x00002000
367 CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT = 0x00004000
368 CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT = 0x00008000
369 CERT_TRUST_IS_PARTIAL_CHAIN = 0x00010000
370 CERT_TRUST_CTL_IS_NOT_TIME_VALID = 0x00020000
371 CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID = 0x00040000
372 CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE = 0x00080000
373 CERT_TRUST_HAS_WEAK_SIGNATURE = 0x00100000
374 CERT_TRUST_IS_OFFLINE_REVOCATION = 0x01000000
375 CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY = 0x02000000
376 CERT_TRUST_IS_EXPLICIT_DISTRUST = 0x04000000
377 CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT = 0x08000000
378
379 /* InfoStatus values for CertTrustStatus struct */
380 CERT_TRUST_HAS_EXACT_MATCH_ISSUER = 0x00000001
381 CERT_TRUST_HAS_KEY_MATCH_ISSUER = 0x00000002
382 CERT_TRUST_HAS_NAME_MATCH_ISSUER = 0x00000004
383 CERT_TRUST_IS_SELF_SIGNED = 0x00000008
384 CERT_TRUST_HAS_PREFERRED_ISSUER = 0x00000100
385 CERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY = 0x00000400
386 CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS = 0x00000400
387 CERT_TRUST_IS_PEER_TRUSTED = 0x00000800
388 CERT_TRUST_HAS_CRL_VALIDITY_EXTENDED = 0x00001000
389 CERT_TRUST_IS_FROM_EXCLUSIVE_TRUST_STORE = 0x00002000
390 CERT_TRUST_IS_CA_TRUSTED = 0x00004000
391 CERT_TRUST_IS_COMPLEX_CHAIN = 0x00010000
392
393 /* policyOID values for CertVerifyCertificateChainPolicy function */
394 CERT_CHAIN_POLICY_BASE = 1
395 CERT_CHAIN_POLICY_AUTHENTICODE = 2
396 CERT_CHAIN_POLICY_AUTHENTICODE_TS = 3
397 CERT_CHAIN_POLICY_SSL = 4
398 CERT_CHAIN_POLICY_BASIC_CONSTRAINTS = 5
399 CERT_CHAIN_POLICY_NT_AUTH = 6
400 CERT_CHAIN_POLICY_MICROSOFT_ROOT = 7
401 CERT_CHAIN_POLICY_EV = 8
402 CERT_CHAIN_POLICY_SSL_F12 = 9
403
404 CERT_E_EXPIRED = 0x800B0101
405 CERT_E_ROLE = 0x800B0103
406 CERT_E_PURPOSE = 0x800B0106
407 CERT_E_UNTRUSTEDROOT = 0x800B0109
408 CERT_E_CN_NO_MATCH = 0x800B010F
409
410 /* AuthType values for SSLExtraCertChainPolicyPara struct */
411 AUTHTYPE_CLIENT = 1
412 AUTHTYPE_SERVER = 2
413
414 /* Checks values for SSLExtraCertChainPolicyPara struct */
415 SECURITY_FLAG_IGNORE_REVOCATION = 0x00000080
416 SECURITY_FLAG_IGNORE_UNKNOWN_CA = 0x00000100
417 SECURITY_FLAG_IGNORE_WRONG_USAGE = 0x00000200
418 SECURITY_FLAG_IGNORE_CERT_CN_INVALID = 0x00001000
419 SECURITY_FLAG_IGNORE_CERT_DATE_INVALID = 0x00002000
420 )
421
422 var (
423 OID_PKIX_KP_SERVER_AUTH = []byte("1.3.6.1.5.5.7.3.1\x00")
424 OID_SERVER_GATED_CRYPTO = []byte("1.3.6.1.4.1.311.10.3.3\x00")
425 OID_SGC_NETSCAPE = []byte("2.16.840.1.113730.4.1\x00")
426 )
427
428 // Pointer represents a pointer to an arbitrary Windows type.
429 //
430 // Pointer-typed fields may point to one of many different types. It's
431 // up to the caller to provide a pointer to the appropriate type, cast
432 // to Pointer. The caller must obey the unsafe.Pointer rules while
433 // doing so.
434 type Pointer *struct{}
435
436 // Invented values to support what package os expects.
437 type Timeval struct {
438 Sec int32
439 Usec int32
440 }
441
442 func (tv *Timeval) Nanoseconds() int64 {
443 return (int64(tv.Sec)*1e6 + int64(tv.Usec)) * 1e3
444 }
445
446 func NsecToTimeval(nsec int64) (tv Timeval) {
447 tv.Sec = int32(nsec / 1e9)
448 tv.Usec = int32(nsec % 1e9 / 1e3)
449 return
450 }
451
452 type SecurityAttributes struct {
453 Length uint32
454 SecurityDescriptor uintptr
455 InheritHandle uint32
456 }
457
458 type Overlapped struct {
459 Internal uintptr
460 InternalHigh uintptr
461 Offset uint32
462 OffsetHigh uint32
463 HEvent Handle
464 }
465
466 type FileNotifyInformation struct {
467 NextEntryOffset uint32
468 Action uint32
469 FileNameLength uint32
470 FileName uint16
471 }
472
473 type Filetime struct {
474 LowDateTime uint32
475 HighDateTime uint32
476 }
477
478 // Nanoseconds returns Filetime ft in nanoseconds
479 // since Epoch (00:00:00 UTC, January 1, 1970).
480 func (ft *Filetime) Nanoseconds() int64 {
481 // 100-nanosecond intervals since January 1, 1601
482 nsec := int64(ft.HighDateTime)<<32 + int64(ft.LowDateTime)
483 // change starting time to the Epoch (00:00:00 UTC, January 1, 1970)
484 nsec -= 116444736000000000
485 // convert into nanoseconds
486 nsec *= 100
487 return nsec
488 }
489
490 func NsecToFiletime(nsec int64) (ft Filetime) {
491 // convert into 100-nanosecond
492 nsec /= 100
493 // change starting time to January 1, 1601
494 nsec += 116444736000000000
495 // split into high / low
496 ft.LowDateTime = uint32(nsec & 0xffffffff)
497 ft.HighDateTime = uint32(nsec >> 32 & 0xffffffff)
498 return ft
499 }
500
501 type Win32finddata struct {
502 FileAttributes uint32
503 CreationTime Filetime
504 LastAccessTime Filetime
505 LastWriteTime Filetime
506 FileSizeHigh uint32
507 FileSizeLow uint32
508 Reserved0 uint32
509 Reserved1 uint32
510 FileName [MAX_PATH - 1]uint16
511 AlternateFileName [13]uint16
512 }
513
514 // This is the actual system call structure.
515 // Win32finddata is what we committed to in Go 1.
516 type win32finddata1 struct {
517 FileAttributes uint32
518 CreationTime Filetime
519 LastAccessTime Filetime
520 LastWriteTime Filetime
521 FileSizeHigh uint32
522 FileSizeLow uint32
523 Reserved0 uint32
524 Reserved1 uint32
525 FileName [MAX_PATH]uint16
526 AlternateFileName [14]uint16
527 }
528
529 func copyFindData(dst *Win32finddata, src *win32finddata1) {
530 dst.FileAttributes = src.FileAttributes
531 dst.CreationTime = src.CreationTime
532 dst.LastAccessTime = src.LastAccessTime
533 dst.LastWriteTime = src.LastWriteTime
534 dst.FileSizeHigh = src.FileSizeHigh
535 dst.FileSizeLow = src.FileSizeLow
536 dst.Reserved0 = src.Reserved0
537 dst.Reserved1 = src.Reserved1
538
539 // The src is 1 element bigger than dst, but it must be NUL.
540 copy(dst.FileName[:], src.FileName[:])
541 copy(dst.AlternateFileName[:], src.AlternateFileName[:])
542 }
543
544 type ByHandleFileInformation struct {
545 FileAttributes uint32
546 CreationTime Filetime
547 LastAccessTime Filetime
548 LastWriteTime Filetime
549 VolumeSerialNumber uint32
550 FileSizeHigh uint32
551 FileSizeLow uint32
552 NumberOfLinks uint32
553 FileIndexHigh uint32
554 FileIndexLow uint32
555 }
556
557 const (
558 GetFileExInfoStandard = 0
559 GetFileExMaxInfoLevel = 1
560 )
561
562 type Win32FileAttributeData struct {
563 FileAttributes uint32
564 CreationTime Filetime
565 LastAccessTime Filetime
566 LastWriteTime Filetime
567 FileSizeHigh uint32
568 FileSizeLow uint32
569 }
570
571 // ShowWindow constants
572 const (
573 // winuser.h
574 SW_HIDE = 0
575 SW_NORMAL = 1
576 SW_SHOWNORMAL = 1
577 SW_SHOWMINIMIZED = 2
578 SW_SHOWMAXIMIZED = 3
579 SW_MAXIMIZE = 3
580 SW_SHOWNOACTIVATE = 4
581 SW_SHOW = 5
582 SW_MINIMIZE = 6
583 SW_SHOWMINNOACTIVE = 7
584 SW_SHOWNA = 8
585 SW_RESTORE = 9
586 SW_SHOWDEFAULT = 10
587 SW_FORCEMINIMIZE = 11
588 )
589
590 type StartupInfo struct {
591 Cb uint32
592 _ *uint16
593 Desktop *uint16
594 Title *uint16
595 X uint32
596 Y uint32
597 XSize uint32
598 YSize uint32
599 XCountChars uint32
600 YCountChars uint32
601 FillAttribute uint32
602 Flags uint32
603 ShowWindow uint16
604 _ uint16
605 _ *byte
606 StdInput Handle
607 StdOutput Handle
608 StdErr Handle
609 }
610
611 type ProcessInformation struct {
612 Process Handle
613 Thread Handle
614 ProcessId uint32
615 ThreadId uint32
616 }
617
618 type ProcessEntry32 struct {
619 Size uint32
620 Usage uint32
621 ProcessID uint32
622 DefaultHeapID uintptr
623 ModuleID uint32
624 Threads uint32
625 ParentProcessID uint32
626 PriClassBase int32
627 Flags uint32
628 ExeFile [MAX_PATH]uint16
629 }
630
631 type Systemtime struct {
632 Year uint16
633 Month uint16
634 DayOfWeek uint16
635 Day uint16
636 Hour uint16
637 Minute uint16
638 Second uint16
639 Milliseconds uint16
640 }
641
642 type Timezoneinformation struct {
643 Bias int32
644 StandardName [32]uint16
645 StandardDate Systemtime
646 StandardBias int32
647 DaylightName [32]uint16
648 DaylightDate Systemtime
649 DaylightBias int32
650 }
651
652 // Socket related.
653
654 const (
655 AF_UNSPEC = 0
656 AF_UNIX = 1
657 AF_INET = 2
658 AF_INET6 = 23
659 AF_NETBIOS = 17
660
661 SOCK_STREAM = 1
662 SOCK_DGRAM = 2
663 SOCK_RAW = 3
664 SOCK_SEQPACKET = 5
665
666 IPPROTO_IP = 0
667 IPPROTO_IPV6 = 0x29
668 IPPROTO_TCP = 6
669 IPPROTO_UDP = 17
670
671 SOL_SOCKET = 0xffff
672 SO_REUSEADDR = 4
673 SO_KEEPALIVE = 8
674 SO_DONTROUTE = 16
675 SO_BROADCAST = 32
676 SO_LINGER = 128
677 SO_RCVBUF = 0x1002
678 SO_SNDBUF = 0x1001
679 SO_UPDATE_ACCEPT_CONTEXT = 0x700b
680 SO_UPDATE_CONNECT_CONTEXT = 0x7010
681
682 IOC_OUT = 0x40000000
683 IOC_IN = 0x80000000
684 IOC_VENDOR = 0x18000000
685 IOC_INOUT = IOC_IN | IOC_OUT
686 IOC_WS2 = 0x08000000
687 SIO_GET_EXTENSION_FUNCTION_POINTER = IOC_INOUT | IOC_WS2 | 6
688 SIO_KEEPALIVE_VALS = IOC_IN | IOC_VENDOR | 4
689 SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12
690
691 // cf. http://support.microsoft.com/default.aspx?scid=kb;en-us;257460
692
693 IP_TOS = 0x3
694 IP_TTL = 0x4
695 IP_MULTICAST_IF = 0x9
696 IP_MULTICAST_TTL = 0xa
697 IP_MULTICAST_LOOP = 0xb
698 IP_ADD_MEMBERSHIP = 0xc
699 IP_DROP_MEMBERSHIP = 0xd
700
701 IPV6_V6ONLY = 0x1b
702 IPV6_UNICAST_HOPS = 0x4
703 IPV6_MULTICAST_IF = 0x9
704 IPV6_MULTICAST_HOPS = 0xa
705 IPV6_MULTICAST_LOOP = 0xb
706 IPV6_JOIN_GROUP = 0xc
707 IPV6_LEAVE_GROUP = 0xd
708
709 MSG_OOB = 0x1
710 MSG_PEEK = 0x2
711 MSG_DONTROUTE = 0x4
712 MSG_WAITALL = 0x8
713
714 MSG_TRUNC = 0x0100
715 MSG_CTRUNC = 0x0200
716 MSG_BCAST = 0x0400
717 MSG_MCAST = 0x0800
718
719 SOMAXCONN = 0x7fffffff
720
721 TCP_NODELAY = 1
722
723 SHUT_RD = 0
724 SHUT_WR = 1
725 SHUT_RDWR = 2
726
727 WSADESCRIPTION_LEN = 256
728 WSASYS_STATUS_LEN = 128
729 )
730
731 type WSABuf struct {
732 Len uint32
733 Buf *byte
734 }
735
736 type WSAMsg struct {
737 Name *syscall.RawSockaddrAny
738 Namelen int32
739 Buffers *WSABuf
740 BufferCount uint32
741 Control WSABuf
742 Flags uint32
743 }
744
745 // Invented values to support what package os expects.
746 const (
747 S_IFMT = 0x1f000
748 S_IFIFO = 0x1000
749 S_IFCHR = 0x2000
750 S_IFDIR = 0x4000
751 S_IFBLK = 0x6000
752 S_IFREG = 0x8000
753 S_IFLNK = 0xa000
754 S_IFSOCK = 0xc000
755 S_ISUID = 0x800
756 S_ISGID = 0x400
757 S_ISVTX = 0x200
758 S_IRUSR = 0x100
759 S_IWRITE = 0x80
760 S_IWUSR = 0x80
761 S_IXUSR = 0x40
762 )
763
764 const (
765 FILE_TYPE_CHAR = 0x0002
766 FILE_TYPE_DISK = 0x0001
767 FILE_TYPE_PIPE = 0x0003
768 FILE_TYPE_REMOTE = 0x8000
769 FILE_TYPE_UNKNOWN = 0x0000
770 )
771
772 type Hostent struct {
773 Name *byte
774 Aliases **byte
775 AddrType uint16
776 Length uint16
777 AddrList **byte
778 }
779
780 type Protoent struct {
781 Name *byte
782 Aliases **byte
783 Proto uint16
784 }
785
786 const (
787 DNS_TYPE_A = 0x0001
788 DNS_TYPE_NS = 0x0002
789 DNS_TYPE_MD = 0x0003
790 DNS_TYPE_MF = 0x0004
791 DNS_TYPE_CNAME = 0x0005
792 DNS_TYPE_SOA = 0x0006
793 DNS_TYPE_MB = 0x0007
794 DNS_TYPE_MG = 0x0008
795 DNS_TYPE_MR = 0x0009
796 DNS_TYPE_NULL = 0x000a
797 DNS_TYPE_WKS = 0x000b
798 DNS_TYPE_PTR = 0x000c
799 DNS_TYPE_HINFO = 0x000d
800 DNS_TYPE_MINFO = 0x000e
801 DNS_TYPE_MX = 0x000f
802 DNS_TYPE_TEXT = 0x0010
803 DNS_TYPE_RP = 0x0011
804 DNS_TYPE_AFSDB = 0x0012
805 DNS_TYPE_X25 = 0x0013
806 DNS_TYPE_ISDN = 0x0014
807 DNS_TYPE_RT = 0x0015
808 DNS_TYPE_NSAP = 0x0016
809 DNS_TYPE_NSAPPTR = 0x0017
810 DNS_TYPE_SIG = 0x0018
811 DNS_TYPE_KEY = 0x0019
812 DNS_TYPE_PX = 0x001a
813 DNS_TYPE_GPOS = 0x001b
814 DNS_TYPE_AAAA = 0x001c
815 DNS_TYPE_LOC = 0x001d
816 DNS_TYPE_NXT = 0x001e
817 DNS_TYPE_EID = 0x001f
818 DNS_TYPE_NIMLOC = 0x0020
819 DNS_TYPE_SRV = 0x0021
820 DNS_TYPE_ATMA = 0x0022
821 DNS_TYPE_NAPTR = 0x0023
822 DNS_TYPE_KX = 0x0024
823 DNS_TYPE_CERT = 0x0025
824 DNS_TYPE_A6 = 0x0026
825 DNS_TYPE_DNAME = 0x0027
826 DNS_TYPE_SINK = 0x0028
827 DNS_TYPE_OPT = 0x0029
828 DNS_TYPE_DS = 0x002B
829 DNS_TYPE_RRSIG = 0x002E
830 DNS_TYPE_NSEC = 0x002F
831 DNS_TYPE_DNSKEY = 0x0030
832 DNS_TYPE_DHCID = 0x0031
833 DNS_TYPE_UINFO = 0x0064
834 DNS_TYPE_UID = 0x0065
835 DNS_TYPE_GID = 0x0066
836 DNS_TYPE_UNSPEC = 0x0067
837 DNS_TYPE_ADDRS = 0x00f8
838 DNS_TYPE_TKEY = 0x00f9
839 DNS_TYPE_TSIG = 0x00fa
840 DNS_TYPE_IXFR = 0x00fb
841 DNS_TYPE_AXFR = 0x00fc
842 DNS_TYPE_MAILB = 0x00fd
843 DNS_TYPE_MAILA = 0x00fe
844 DNS_TYPE_ALL = 0x00ff
845 DNS_TYPE_ANY = 0x00ff
846 DNS_TYPE_WINS = 0xff01
847 DNS_TYPE_WINSR = 0xff02
848 DNS_TYPE_NBSTAT = 0xff01
849 )
850
851 const (
852 DNS_INFO_NO_RECORDS = 0x251D
853 )
854
855 const (
856 // flags inside DNSRecord.Dw
857 DnsSectionQuestion = 0x0000
858 DnsSectionAnswer = 0x0001
859 DnsSectionAuthority = 0x0002
860 DnsSectionAdditional = 0x0003
861 )
862
863 type DNSSRVData struct {
864 Target *uint16
865 Priority uint16
866 Weight uint16
867 Port uint16
868 Pad uint16
869 }
870
871 type DNSPTRData struct {
872 Host *uint16
873 }
874
875 type DNSMXData struct {
876 NameExchange *uint16
877 Preference uint16
878 Pad uint16
879 }
880
881 type DNSTXTData struct {
882 StringCount uint16
883 StringArray [1]*uint16
884 }
885
886 type DNSRecord struct {
887 Next *DNSRecord
888 Name *uint16
889 Type uint16
890 Length uint16
891 Dw uint32
892 Ttl uint32
893 Reserved uint32
894 Data [40]byte
895 }
896
897 const (
898 TF_DISCONNECT = 1
899 TF_REUSE_SOCKET = 2
900 TF_WRITE_BEHIND = 4
901 TF_USE_DEFAULT_WORKER = 0
902 TF_USE_SYSTEM_THREAD = 16
903 TF_USE_KERNEL_APC = 32
904 )
905
906 type TransmitFileBuffers struct {
907 Head uintptr
908 HeadLength uint32
909 Tail uintptr
910 TailLength uint32
911 }
912
913 const (
914 IFF_UP = 1
915 IFF_BROADCAST = 2
916 IFF_LOOPBACK = 4
917 IFF_POINTTOPOINT = 8
918 IFF_MULTICAST = 16
919 )
920
921 const SIO_GET_INTERFACE_LIST = 0x4004747F
922
923 // TODO(mattn): SockaddrGen is union of sockaddr/sockaddr_in/sockaddr_in6_old.
924 // will be fixed to change variable type as suitable.
925
926 type SockaddrGen [24]byte
927
928 type InterfaceInfo struct {
929 Flags uint32
930 Address SockaddrGen
931 BroadcastAddress SockaddrGen
932 Netmask SockaddrGen
933 }
934
935 type IpAddressString struct {
936 String [16]byte
937 }
938
939 type IpMaskString IpAddressString
940
941 type IpAddrString struct {
942 Next *IpAddrString
943 IpAddress IpAddressString
944 IpMask IpMaskString
945 Context uint32
946 }
947
948 const MAX_ADAPTER_NAME_LENGTH = 256
949 const MAX_ADAPTER_DESCRIPTION_LENGTH = 128
950 const MAX_ADAPTER_ADDRESS_LENGTH = 8
951
952 type IpAdapterInfo struct {
953 Next *IpAdapterInfo
954 ComboIndex uint32
955 AdapterName [MAX_ADAPTER_NAME_LENGTH + 4]byte
956 Description [MAX_ADAPTER_DESCRIPTION_LENGTH + 4]byte
957 AddressLength uint32
958 Address [MAX_ADAPTER_ADDRESS_LENGTH]byte
959 Index uint32
960 Type uint32
961 DhcpEnabled uint32
962 CurrentIpAddress *IpAddrString
963 IpAddressList IpAddrString
964 GatewayList IpAddrString
965 DhcpServer IpAddrString
966 HaveWins bool
967 PrimaryWinsServer IpAddrString
968 SecondaryWinsServer IpAddrString
969 LeaseObtained int64
970 LeaseExpires int64
971 }
972
973 const MAXLEN_PHYSADDR = 8
974 const MAX_INTERFACE_NAME_LEN = 256
975 const MAXLEN_IFDESCR = 256
976
977 type MibIfRow struct {
978 Name [MAX_INTERFACE_NAME_LEN]uint16
979 Index uint32
980 Type uint32
981 Mtu uint32
982 Speed uint32
983 PhysAddrLen uint32
984 PhysAddr [MAXLEN_PHYSADDR]byte
985 AdminStatus uint32
986 OperStatus uint32
987 LastChange uint32
988 InOctets uint32
989 InUcastPkts uint32
990 InNUcastPkts uint32
991 InDiscards uint32
992 InErrors uint32
993 InUnknownProtos uint32
994 OutOctets uint32
995 OutUcastPkts uint32
996 OutNUcastPkts uint32
997 OutDiscards uint32
998 OutErrors uint32
999 OutQLen uint32
1000 DescrLen uint32
1001 Descr [MAXLEN_IFDESCR]byte
1002 }
1003
1004 type CertInfo struct {
1005 // Not implemented
1006 }
1007
1008 type CertContext struct {
1009 EncodingType uint32
1010 EncodedCert *byte
1011 Length uint32
1012 CertInfo *CertInfo
1013 Store Handle
1014 }
1015
1016 type CertChainContext struct {
1017 Size uint32
1018 TrustStatus CertTrustStatus
1019 ChainCount uint32
1020 Chains **CertSimpleChain
1021 LowerQualityChainCount uint32
1022 LowerQualityChains **CertChainContext
1023 HasRevocationFreshnessTime uint32
1024 RevocationFreshnessTime uint32
1025 }
1026
1027 type CertTrustListInfo struct {
1028 // Not implemented
1029 }
1030
1031 type CertSimpleChain struct {
1032 Size uint32
1033 TrustStatus CertTrustStatus
1034 NumElements uint32
1035 Elements **CertChainElement
1036 TrustListInfo *CertTrustListInfo
1037 HasRevocationFreshnessTime uint32
1038 RevocationFreshnessTime uint32
1039 }
1040
1041 type CertChainElement struct {
1042 Size uint32
1043 CertContext *CertContext
1044 TrustStatus CertTrustStatus
1045 RevocationInfo *CertRevocationInfo
1046 IssuanceUsage *CertEnhKeyUsage
1047 ApplicationUsage *CertEnhKeyUsage
1048 ExtendedErrorInfo *uint16
1049 }
1050
1051 type CertRevocationCrlInfo struct {
1052 // Not implemented
1053 }
1054
1055 type CertRevocationInfo struct {
1056 Size uint32
1057 RevocationResult uint32
1058 RevocationOid *byte
1059 OidSpecificInfo Pointer
1060 HasFreshnessTime uint32
1061 FreshnessTime uint32
1062 CrlInfo *CertRevocationCrlInfo
1063 }
1064
1065 type CertTrustStatus struct {
1066 ErrorStatus uint32
1067 InfoStatus uint32
1068 }
1069
1070 type CertUsageMatch struct {
1071 Type uint32
1072 Usage CertEnhKeyUsage
1073 }
1074
1075 type CertEnhKeyUsage struct {
1076 Length uint32
1077 UsageIdentifiers **byte
1078 }
1079
1080 type CertChainPara struct {
1081 Size uint32
1082 RequestedUsage CertUsageMatch
1083 RequstedIssuancePolicy CertUsageMatch
1084 URLRetrievalTimeout uint32
1085 CheckRevocationFreshnessTime uint32
1086 RevocationFreshnessTime uint32
1087 CacheResync *Filetime
1088 }
1089
1090 type CertChainPolicyPara struct {
1091 Size uint32
1092 Flags uint32
1093 ExtraPolicyPara Pointer
1094 }
1095
1096 type SSLExtraCertChainPolicyPara struct {
1097 Size uint32
1098 AuthType uint32
1099 Checks uint32
1100 ServerName *uint16
1101 }
1102
1103 type CertChainPolicyStatus struct {
1104 Size uint32
1105 Error uint32
1106 ChainIndex uint32
1107 ElementIndex uint32
1108 ExtraPolicyStatus Pointer
1109 }
1110
1111 const (
1112 // do not reorder
1113 HKEY_CLASSES_ROOT = 0x80000000 + iota
1114 HKEY_CURRENT_USER
1115 HKEY_LOCAL_MACHINE
1116 HKEY_USERS
1117 HKEY_PERFORMANCE_DATA
1118 HKEY_CURRENT_CONFIG
1119 HKEY_DYN_DATA
1120
1121 KEY_QUERY_VALUE = 1
1122 KEY_SET_VALUE = 2
1123 KEY_CREATE_SUB_KEY = 4
1124 KEY_ENUMERATE_SUB_KEYS = 8
1125 KEY_NOTIFY = 16
1126 KEY_CREATE_LINK = 32
1127 KEY_WRITE = 0x20006
1128 KEY_EXECUTE = 0x20019
1129 KEY_READ = 0x20019
1130 KEY_WOW64_64KEY = 0x0100
1131 KEY_WOW64_32KEY = 0x0200
1132 KEY_ALL_ACCESS = 0xf003f
1133 )
1134
1135 const (
1136 // do not reorder
1137 REG_NONE = iota
1138 REG_SZ
1139 REG_EXPAND_SZ
1140 REG_BINARY
1141 REG_DWORD_LITTLE_ENDIAN
1142 REG_DWORD_BIG_ENDIAN
1143 REG_LINK
1144 REG_MULTI_SZ
1145 REG_RESOURCE_LIST
1146 REG_FULL_RESOURCE_DESCRIPTOR
1147 REG_RESOURCE_REQUIREMENTS_LIST
1148 REG_QWORD_LITTLE_ENDIAN
1149 REG_DWORD = REG_DWORD_LITTLE_ENDIAN
1150 REG_QWORD = REG_QWORD_LITTLE_ENDIAN
1151 )
1152
1153 type AddrinfoW struct {
1154 Flags int32
1155 Family int32
1156 Socktype int32
1157 Protocol int32
1158 Addrlen uintptr
1159 Canonname *uint16
1160 Addr uintptr
1161 Next *AddrinfoW
1162 }
1163
1164 const (
1165 AI_PASSIVE = 1
1166 AI_CANONNAME = 2
1167 AI_NUMERICHOST = 4
1168 )
1169
1170 type GUID struct {
1171 Data1 uint32
1172 Data2 uint16
1173 Data3 uint16
1174 Data4 [8]byte
1175 }
1176
1177 var WSAID_CONNECTEX = GUID{
1178 0x25a207b9,
1179 0xddf3,
1180 0x4660,
1181 [8]byte{0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e},
1182 }
1183
1184 var WSAID_WSASENDMSG = GUID{
1185 0xa441e712,
1186 0x754f,
1187 0x43ca,
1188 [8]byte{0x84, 0xa7, 0x0d, 0xee, 0x44, 0xcf, 0x60, 0x6d},
1189 }
1190
1191 var WSAID_WSARECVMSG = GUID{
1192 0xf689d7c8,
1193 0x6f1f,
1194 0x436b,
1195 [8]byte{0x8a, 0x53, 0xe5, 0x4f, 0xe3, 0x51, 0xc3, 0x22},
1196 }
1197
1198 const (
1199 FILE_SKIP_COMPLETION_PORT_ON_SUCCESS = 1
1200 FILE_SKIP_SET_EVENT_ON_HANDLE = 2
1201 )
1202
1203 const (
1204 WSAPROTOCOL_LEN = 255
1205 MAX_PROTOCOL_CHAIN = 7
1206 BASE_PROTOCOL = 1
1207 LAYERED_PROTOCOL = 0
1208
1209 XP1_CONNECTIONLESS = 0x00000001
1210 XP1_GUARANTEED_DELIVERY = 0x00000002
1211 XP1_GUARANTEED_ORDER = 0x00000004
1212 XP1_MESSAGE_ORIENTED = 0x00000008
1213 XP1_PSEUDO_STREAM = 0x00000010
1214 XP1_GRACEFUL_CLOSE = 0x00000020
1215 XP1_EXPEDITED_DATA = 0x00000040
1216 XP1_CONNECT_DATA = 0x00000080
1217 XP1_DISCONNECT_DATA = 0x00000100
1218 XP1_SUPPORT_BROADCAST = 0x00000200
1219 XP1_SUPPORT_MULTIPOINT = 0x00000400
1220 XP1_MULTIPOINT_CONTROL_PLANE = 0x00000800
1221 XP1_MULTIPOINT_DATA_PLANE = 0x00001000
1222 XP1_QOS_SUPPORTED = 0x00002000
1223 XP1_UNI_SEND = 0x00008000
1224 XP1_UNI_RECV = 0x00010000
1225 XP1_IFS_HANDLES = 0x00020000
1226 XP1_PARTIAL_MESSAGE = 0x00040000
1227 XP1_SAN_SUPPORT_SDP = 0x00080000
1228
1229 PFL_MULTIPLE_PROTO_ENTRIES = 0x00000001
1230 PFL_RECOMMENDED_PROTO_ENTRY = 0x00000002
1231 PFL_HIDDEN = 0x00000004
1232 PFL_MATCHES_PROTOCOL_ZERO = 0x00000008
1233 PFL_NETWORKDIRECT_PROVIDER = 0x00000010
1234 )
1235
1236 type WSAProtocolInfo struct {
1237 ServiceFlags1 uint32
1238 ServiceFlags2 uint32
1239 ServiceFlags3 uint32
1240 ServiceFlags4 uint32
1241 ProviderFlags uint32
1242 ProviderId GUID
1243 CatalogEntryId uint32
1244 ProtocolChain WSAProtocolChain
1245 Version int32
1246 AddressFamily int32
1247 MaxSockAddr int32
1248 MinSockAddr int32
1249 SocketType int32
1250 Protocol int32
1251 ProtocolMaxOffset int32
1252 NetworkByteOrder int32
1253 SecurityScheme int32
1254 MessageSize uint32
1255 ProviderReserved uint32
1256 ProtocolName [WSAPROTOCOL_LEN + 1]uint16
1257 }
1258
1259 type WSAProtocolChain struct {
1260 ChainLen int32
1261 ChainEntries [MAX_PROTOCOL_CHAIN]uint32
1262 }
1263
1264 type TCPKeepalive struct {
1265 OnOff uint32
1266 Time uint32
1267 Interval uint32
1268 }
1269
1270 type symbolicLinkReparseBuffer struct {
1271 SubstituteNameOffset uint16
1272 SubstituteNameLength uint16
1273 PrintNameOffset uint16
1274 PrintNameLength uint16
1275 Flags uint32
1276 PathBuffer [1]uint16
1277 }
1278
1279 type mountPointReparseBuffer struct {
1280 SubstituteNameOffset uint16
1281 SubstituteNameLength uint16
1282 PrintNameOffset uint16
1283 PrintNameLength uint16
1284 PathBuffer [1]uint16
1285 }
1286
1287 type reparseDataBuffer struct {
1288 ReparseTag uint32
1289 ReparseDataLength uint16
1290 Reserved uint16
1291
1292 // GenericReparseBuffer
1293 reparseBuffer byte
1294 }
1295
1296 const (
1297 FSCTL_GET_REPARSE_POINT = 0x900A8
1298 MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16 * 1024
1299 IO_REPARSE_TAG_MOUNT_POINT = 0xA0000003
1300 IO_REPARSE_TAG_SYMLINK = 0xA000000C
1301 SYMBOLIC_LINK_FLAG_DIRECTORY = 0x1
1302 )
1303
1304 const (
1305 ComputerNameNetBIOS = 0
1306 ComputerNameDnsHostname = 1
1307 ComputerNameDnsDomain = 2
1308 ComputerNameDnsFullyQualified = 3
1309 ComputerNamePhysicalNetBIOS = 4
1310 ComputerNamePhysicalDnsHostname = 5
1311 ComputerNamePhysicalDnsDomain = 6
1312 ComputerNamePhysicalDnsFullyQualified = 7
1313 ComputerNameMax = 8
1314 )
1315
1316 const (
1317 MOVEFILE_REPLACE_EXISTING = 0x1
1318 MOVEFILE_COPY_ALLOWED = 0x2
1319 MOVEFILE_DELAY_UNTIL_REBOOT = 0x4
1320 MOVEFILE_WRITE_THROUGH = 0x8
1321 MOVEFILE_CREATE_HARDLINK = 0x10
1322 MOVEFILE_FAIL_IF_NOT_TRACKABLE = 0x20
1323 )
1324
1325 const GAA_FLAG_INCLUDE_PREFIX = 0x00000010
1326
1327 const (
1328 IF_TYPE_OTHER = 1
1329 IF_TYPE_ETHERNET_CSMACD = 6
1330 IF_TYPE_ISO88025_TOKENRING = 9
1331 IF_TYPE_PPP = 23
1332 IF_TYPE_SOFTWARE_LOOPBACK = 24
1333 IF_TYPE_ATM = 37
1334 IF_TYPE_IEEE80211 = 71
1335 IF_TYPE_TUNNEL = 131
1336 IF_TYPE_IEEE1394 = 144
1337 )
1338
1339 type SocketAddress struct {
1340 Sockaddr *syscall.RawSockaddrAny
1341 SockaddrLength int32
1342 }
1343
1344 type IpAdapterUnicastAddress struct {
1345 Length uint32
1346 Flags uint32
1347 Next *IpAdapterUnicastAddress
1348 Address SocketAddress
1349 PrefixOrigin int32
1350 SuffixOrigin int32
1351 DadState int32
1352 ValidLifetime uint32
1353 PreferredLifetime uint32
1354 LeaseLifetime uint32
1355 OnLinkPrefixLength uint8
1356 }
1357
1358 type IpAdapterAnycastAddress struct {
1359 Length uint32
1360 Flags uint32
1361 Next *IpAdapterAnycastAddress
1362 Address SocketAddress
1363 }
1364
1365 type IpAdapterMulticastAddress struct {
1366 Length uint32
1367 Flags uint32
1368 Next *IpAdapterMulticastAddress
1369 Address SocketAddress
1370 }
1371
1372 type IpAdapterDnsServerAdapter struct {
1373 Length uint32
1374 Reserved uint32
1375 Next *IpAdapterDnsServerAdapter
1376 Address SocketAddress
1377 }
1378
1379 type IpAdapterPrefix struct {
1380 Length uint32
1381 Flags uint32
1382 Next *IpAdapterPrefix
1383 Address SocketAddress
1384 PrefixLength uint32
1385 }
1386
1387 type IpAdapterAddresses struct {
1388 Length uint32
1389 IfIndex uint32
1390 Next *IpAdapterAddresses
1391 AdapterName *byte
1392 FirstUnicastAddress *IpAdapterUnicastAddress
1393 FirstAnycastAddress *IpAdapterAnycastAddress
1394 FirstMulticastAddress *IpAdapterMulticastAddress
1395 FirstDnsServerAddress *IpAdapterDnsServerAdapter
1396 DnsSuffix *uint16
1397 Description *uint16
1398 FriendlyName *uint16
1399 PhysicalAddress [syscall.MAX_ADAPTER_ADDRESS_LENGTH]byte
1400 PhysicalAddressLength uint32
1401 Flags uint32
1402 Mtu uint32
1403 IfType uint32
1404 OperStatus uint32
1405 Ipv6IfIndex uint32
1406 ZoneIndices [16]uint32
1407 FirstPrefix *IpAdapterPrefix
1408 /* more fields might be present here. */
1409 }
1410
1411 const (
1412 IfOperStatusUp = 1
1413 IfOperStatusDown = 2
1414 IfOperStatusTesting = 3
1415 IfOperStatusUnknown = 4
1416 IfOperStatusDormant = 5
1417 IfOperStatusNotPresent = 6
1418 IfOperStatusLowerLayerDown = 7
1419 )
1420
1421 // Console related constants used for the mode parameter to SetConsoleMode. See
1422 // https://docs.microsoft.com/en-us/windows/console/setconsolemode for details.
1423
1424 const (
1425 ENABLE_PROCESSED_INPUT = 0x1
1426 ENABLE_LINE_INPUT = 0x2
1427 ENABLE_ECHO_INPUT = 0x4
1428 ENABLE_WINDOW_INPUT = 0x8
1429 ENABLE_MOUSE_INPUT = 0x10
1430 ENABLE_INSERT_MODE = 0x20
1431 ENABLE_QUICK_EDIT_MODE = 0x40
1432 ENABLE_EXTENDED_FLAGS = 0x80
1433 ENABLE_AUTO_POSITION = 0x100
1434 ENABLE_VIRTUAL_TERMINAL_INPUT = 0x200
1435
1436 ENABLE_PROCESSED_OUTPUT = 0x1
1437 ENABLE_WRAP_AT_EOL_OUTPUT = 0x2
1438 ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x4
1439 DISABLE_NEWLINE_AUTO_RETURN = 0x8
1440 ENABLE_LVB_GRID_WORLDWIDE = 0x10
1441 )
1442
1443 type Coord struct {
1444 X int16
1445 Y int16
1446 }
1447
1448 type SmallRect struct {
1449 Left int16
1450 Top int16
1451 Right int16
1452 Bottom int16
1453 }
1454
1455 // Used with GetConsoleScreenBuffer to retrieve information about a console
1456 // screen buffer. See
1457 // https://docs.microsoft.com/en-us/windows/console/console-screen-buffer-info-str
1458 // for details.
1459
1460 type ConsoleScreenBufferInfo struct {
1461 Size Coord
1462 CursorPosition Coord
1463 Attributes uint16
1464 Window SmallRect
1465 MaximumWindowSize Coord
1466 }
1467
1468 const UNIX_PATH_MAX = 108 // defined in afunix.h
0 // Copyright 2011 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 package windows
5
6 type WSAData struct {
7 Version uint16
8 HighVersion uint16
9 Description [WSADESCRIPTION_LEN + 1]byte
10 SystemStatus [WSASYS_STATUS_LEN + 1]byte
11 MaxSockets uint16
12 MaxUdpDg uint16
13 VendorInfo *byte
14 }
15
16 type Servent struct {
17 Name *byte
18 Aliases **byte
19 Port uint16
20 Proto *byte
21 }
0 // Copyright 2011 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 package windows
5
6 type WSAData struct {
7 Version uint16
8 HighVersion uint16
9 MaxSockets uint16
10 MaxUdpDg uint16
11 VendorInfo *byte
12 Description [WSADESCRIPTION_LEN + 1]byte
13 SystemStatus [WSASYS_STATUS_LEN + 1]byte
14 }
15
16 type Servent struct {
17 Name *byte
18 Aliases **byte
19 Proto *byte
20 Port uint16
21 }
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 package windows
5
6 type WSAData struct {
7 Version uint16
8 HighVersion uint16
9 Description [WSADESCRIPTION_LEN + 1]byte
10 SystemStatus [WSASYS_STATUS_LEN + 1]byte
11 MaxSockets uint16
12 MaxUdpDg uint16
13 VendorInfo *byte
14 }
15
16 type Servent struct {
17 Name *byte
18 Aliases **byte
19 Port uint16
20 Proto *byte
21 }
0 // Code generated by 'go generate'; DO NOT EDIT.
1
2 package windows
3
4 import (
5 "syscall"
6 "unsafe"
7 )
8
9 var _ unsafe.Pointer
10
11 // Do the interface allocations only once for common
12 // Errno values.
13 const (
14 errnoERROR_IO_PENDING = 997
15 )
16
17 var (
18 errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
19 )
20
21 // errnoErr returns common boxed Errno values, to prevent
22 // allocations at runtime.
23 func errnoErr(e syscall.Errno) error {
24 switch e {
25 case 0:
26 return nil
27 case errnoERROR_IO_PENDING:
28 return errERROR_IO_PENDING
29 }
30 // TODO: add more here, after collecting data on the common
31 // error values see on Windows. (perhaps when running
32 // all.bat?)
33 return e
34 }
35
36 var (
37 modadvapi32 = NewLazySystemDLL("advapi32.dll")
38 modkernel32 = NewLazySystemDLL("kernel32.dll")
39 modshell32 = NewLazySystemDLL("shell32.dll")
40 modmswsock = NewLazySystemDLL("mswsock.dll")
41 modcrypt32 = NewLazySystemDLL("crypt32.dll")
42 modws2_32 = NewLazySystemDLL("ws2_32.dll")
43 moddnsapi = NewLazySystemDLL("dnsapi.dll")
44 modiphlpapi = NewLazySystemDLL("iphlpapi.dll")
45 modsecur32 = NewLazySystemDLL("secur32.dll")
46 modnetapi32 = NewLazySystemDLL("netapi32.dll")
47 moduserenv = NewLazySystemDLL("userenv.dll")
48
49 procRegisterEventSourceW = modadvapi32.NewProc("RegisterEventSourceW")
50 procDeregisterEventSource = modadvapi32.NewProc("DeregisterEventSource")
51 procReportEventW = modadvapi32.NewProc("ReportEventW")
52 procOpenSCManagerW = modadvapi32.NewProc("OpenSCManagerW")
53 procCloseServiceHandle = modadvapi32.NewProc("CloseServiceHandle")
54 procCreateServiceW = modadvapi32.NewProc("CreateServiceW")
55 procOpenServiceW = modadvapi32.NewProc("OpenServiceW")
56 procDeleteService = modadvapi32.NewProc("DeleteService")
57 procStartServiceW = modadvapi32.NewProc("StartServiceW")
58 procQueryServiceStatus = modadvapi32.NewProc("QueryServiceStatus")
59 procControlService = modadvapi32.NewProc("ControlService")
60 procStartServiceCtrlDispatcherW = modadvapi32.NewProc("StartServiceCtrlDispatcherW")
61 procSetServiceStatus = modadvapi32.NewProc("SetServiceStatus")
62 procChangeServiceConfigW = modadvapi32.NewProc("ChangeServiceConfigW")
63 procQueryServiceConfigW = modadvapi32.NewProc("QueryServiceConfigW")
64 procChangeServiceConfig2W = modadvapi32.NewProc("ChangeServiceConfig2W")
65 procQueryServiceConfig2W = modadvapi32.NewProc("QueryServiceConfig2W")
66 procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW")
67 procQueryServiceStatusEx = modadvapi32.NewProc("QueryServiceStatusEx")
68 procGetLastError = modkernel32.NewProc("GetLastError")
69 procLoadLibraryW = modkernel32.NewProc("LoadLibraryW")
70 procLoadLibraryExW = modkernel32.NewProc("LoadLibraryExW")
71 procFreeLibrary = modkernel32.NewProc("FreeLibrary")
72 procGetProcAddress = modkernel32.NewProc("GetProcAddress")
73 procGetVersion = modkernel32.NewProc("GetVersion")
74 procFormatMessageW = modkernel32.NewProc("FormatMessageW")
75 procExitProcess = modkernel32.NewProc("ExitProcess")
76 procCreateFileW = modkernel32.NewProc("CreateFileW")
77 procReadFile = modkernel32.NewProc("ReadFile")
78 procWriteFile = modkernel32.NewProc("WriteFile")
79 procSetFilePointer = modkernel32.NewProc("SetFilePointer")
80 procCloseHandle = modkernel32.NewProc("CloseHandle")
81 procGetStdHandle = modkernel32.NewProc("GetStdHandle")
82 procSetStdHandle = modkernel32.NewProc("SetStdHandle")
83 procFindFirstFileW = modkernel32.NewProc("FindFirstFileW")
84 procFindNextFileW = modkernel32.NewProc("FindNextFileW")
85 procFindClose = modkernel32.NewProc("FindClose")
86 procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle")
87 procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW")
88 procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW")
89 procCreateDirectoryW = modkernel32.NewProc("CreateDirectoryW")
90 procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW")
91 procDeleteFileW = modkernel32.NewProc("DeleteFileW")
92 procMoveFileW = modkernel32.NewProc("MoveFileW")
93 procMoveFileExW = modkernel32.NewProc("MoveFileExW")
94 procGetComputerNameW = modkernel32.NewProc("GetComputerNameW")
95 procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW")
96 procSetEndOfFile = modkernel32.NewProc("SetEndOfFile")
97 procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTimeAsFileTime")
98 procGetSystemTimePreciseAsFileTime = modkernel32.NewProc("GetSystemTimePreciseAsFileTime")
99 procGetTimeZoneInformation = modkernel32.NewProc("GetTimeZoneInformation")
100 procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort")
101 procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus")
102 procPostQueuedCompletionStatus = modkernel32.NewProc("PostQueuedCompletionStatus")
103 procCancelIo = modkernel32.NewProc("CancelIo")
104 procCancelIoEx = modkernel32.NewProc("CancelIoEx")
105 procCreateProcessW = modkernel32.NewProc("CreateProcessW")
106 procOpenProcess = modkernel32.NewProc("OpenProcess")
107 procTerminateProcess = modkernel32.NewProc("TerminateProcess")
108 procGetExitCodeProcess = modkernel32.NewProc("GetExitCodeProcess")
109 procGetStartupInfoW = modkernel32.NewProc("GetStartupInfoW")
110 procGetCurrentProcess = modkernel32.NewProc("GetCurrentProcess")
111 procGetProcessTimes = modkernel32.NewProc("GetProcessTimes")
112 procDuplicateHandle = modkernel32.NewProc("DuplicateHandle")
113 procWaitForSingleObject = modkernel32.NewProc("WaitForSingleObject")
114 procGetTempPathW = modkernel32.NewProc("GetTempPathW")
115 procCreatePipe = modkernel32.NewProc("CreatePipe")
116 procGetFileType = modkernel32.NewProc("GetFileType")
117 procCryptAcquireContextW = modadvapi32.NewProc("CryptAcquireContextW")
118 procCryptReleaseContext = modadvapi32.NewProc("CryptReleaseContext")
119 procCryptGenRandom = modadvapi32.NewProc("CryptGenRandom")
120 procGetEnvironmentStringsW = modkernel32.NewProc("GetEnvironmentStringsW")
121 procFreeEnvironmentStringsW = modkernel32.NewProc("FreeEnvironmentStringsW")
122 procGetEnvironmentVariableW = modkernel32.NewProc("GetEnvironmentVariableW")
123 procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW")
124 procSetFileTime = modkernel32.NewProc("SetFileTime")
125 procGetFileAttributesW = modkernel32.NewProc("GetFileAttributesW")
126 procSetFileAttributesW = modkernel32.NewProc("SetFileAttributesW")
127 procGetFileAttributesExW = modkernel32.NewProc("GetFileAttributesExW")
128 procGetCommandLineW = modkernel32.NewProc("GetCommandLineW")
129 procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW")
130 procLocalFree = modkernel32.NewProc("LocalFree")
131 procSetHandleInformation = modkernel32.NewProc("SetHandleInformation")
132 procFlushFileBuffers = modkernel32.NewProc("FlushFileBuffers")
133 procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW")
134 procGetLongPathNameW = modkernel32.NewProc("GetLongPathNameW")
135 procGetShortPathNameW = modkernel32.NewProc("GetShortPathNameW")
136 procCreateFileMappingW = modkernel32.NewProc("CreateFileMappingW")
137 procMapViewOfFile = modkernel32.NewProc("MapViewOfFile")
138 procUnmapViewOfFile = modkernel32.NewProc("UnmapViewOfFile")
139 procFlushViewOfFile = modkernel32.NewProc("FlushViewOfFile")
140 procVirtualLock = modkernel32.NewProc("VirtualLock")
141 procVirtualUnlock = modkernel32.NewProc("VirtualUnlock")
142 procVirtualAlloc = modkernel32.NewProc("VirtualAlloc")
143 procVirtualFree = modkernel32.NewProc("VirtualFree")
144 procVirtualProtect = modkernel32.NewProc("VirtualProtect")
145 procTransmitFile = modmswsock.NewProc("TransmitFile")
146 procReadDirectoryChangesW = modkernel32.NewProc("ReadDirectoryChangesW")
147 procCertOpenSystemStoreW = modcrypt32.NewProc("CertOpenSystemStoreW")
148 procCertOpenStore = modcrypt32.NewProc("CertOpenStore")
149 procCertEnumCertificatesInStore = modcrypt32.NewProc("CertEnumCertificatesInStore")
150 procCertAddCertificateContextToStore = modcrypt32.NewProc("CertAddCertificateContextToStore")
151 procCertCloseStore = modcrypt32.NewProc("CertCloseStore")
152 procCertGetCertificateChain = modcrypt32.NewProc("CertGetCertificateChain")
153 procCertFreeCertificateChain = modcrypt32.NewProc("CertFreeCertificateChain")
154 procCertCreateCertificateContext = modcrypt32.NewProc("CertCreateCertificateContext")
155 procCertFreeCertificateContext = modcrypt32.NewProc("CertFreeCertificateContext")
156 procCertVerifyCertificateChainPolicy = modcrypt32.NewProc("CertVerifyCertificateChainPolicy")
157 procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyExW")
158 procRegCloseKey = modadvapi32.NewProc("RegCloseKey")
159 procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfoKeyW")
160 procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyExW")
161 procRegQueryValueExW = modadvapi32.NewProc("RegQueryValueExW")
162 procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId")
163 procGetConsoleMode = modkernel32.NewProc("GetConsoleMode")
164 procSetConsoleMode = modkernel32.NewProc("SetConsoleMode")
165 procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo")
166 procWriteConsoleW = modkernel32.NewProc("WriteConsoleW")
167 procReadConsoleW = modkernel32.NewProc("ReadConsoleW")
168 procCreateToolhelp32Snapshot = modkernel32.NewProc("CreateToolhelp32Snapshot")
169 procProcess32FirstW = modkernel32.NewProc("Process32FirstW")
170 procProcess32NextW = modkernel32.NewProc("Process32NextW")
171 procDeviceIoControl = modkernel32.NewProc("DeviceIoControl")
172 procCreateSymbolicLinkW = modkernel32.NewProc("CreateSymbolicLinkW")
173 procCreateHardLinkW = modkernel32.NewProc("CreateHardLinkW")
174 procGetCurrentThreadId = modkernel32.NewProc("GetCurrentThreadId")
175 procCreateEventW = modkernel32.NewProc("CreateEventW")
176 procCreateEventExW = modkernel32.NewProc("CreateEventExW")
177 procOpenEventW = modkernel32.NewProc("OpenEventW")
178 procSetEvent = modkernel32.NewProc("SetEvent")
179 procResetEvent = modkernel32.NewProc("ResetEvent")
180 procPulseEvent = modkernel32.NewProc("PulseEvent")
181 procDefineDosDeviceW = modkernel32.NewProc("DefineDosDeviceW")
182 procDeleteVolumeMountPointW = modkernel32.NewProc("DeleteVolumeMountPointW")
183 procFindFirstVolumeW = modkernel32.NewProc("FindFirstVolumeW")
184 procFindFirstVolumeMountPointW = modkernel32.NewProc("FindFirstVolumeMountPointW")
185 procFindNextVolumeW = modkernel32.NewProc("FindNextVolumeW")
186 procFindNextVolumeMountPointW = modkernel32.NewProc("FindNextVolumeMountPointW")
187 procFindVolumeClose = modkernel32.NewProc("FindVolumeClose")
188 procFindVolumeMountPointClose = modkernel32.NewProc("FindVolumeMountPointClose")
189 procGetDriveTypeW = modkernel32.NewProc("GetDriveTypeW")
190 procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives")
191 procGetLogicalDriveStringsW = modkernel32.NewProc("GetLogicalDriveStringsW")
192 procGetVolumeInformationW = modkernel32.NewProc("GetVolumeInformationW")
193 procGetVolumeInformationByHandleW = modkernel32.NewProc("GetVolumeInformationByHandleW")
194 procGetVolumeNameForVolumeMountPointW = modkernel32.NewProc("GetVolumeNameForVolumeMountPointW")
195 procGetVolumePathNameW = modkernel32.NewProc("GetVolumePathNameW")
196 procGetVolumePathNamesForVolumeNameW = modkernel32.NewProc("GetVolumePathNamesForVolumeNameW")
197 procQueryDosDeviceW = modkernel32.NewProc("QueryDosDeviceW")
198 procSetVolumeLabelW = modkernel32.NewProc("SetVolumeLabelW")
199 procSetVolumeMountPointW = modkernel32.NewProc("SetVolumeMountPointW")
200 procWSAStartup = modws2_32.NewProc("WSAStartup")
201 procWSACleanup = modws2_32.NewProc("WSACleanup")
202 procWSAIoctl = modws2_32.NewProc("WSAIoctl")
203 procsocket = modws2_32.NewProc("socket")
204 procsetsockopt = modws2_32.NewProc("setsockopt")
205 procgetsockopt = modws2_32.NewProc("getsockopt")
206 procbind = modws2_32.NewProc("bind")
207 procconnect = modws2_32.NewProc("connect")
208 procgetsockname = modws2_32.NewProc("getsockname")
209 procgetpeername = modws2_32.NewProc("getpeername")
210 proclisten = modws2_32.NewProc("listen")
211 procshutdown = modws2_32.NewProc("shutdown")
212 procclosesocket = modws2_32.NewProc("closesocket")
213 procAcceptEx = modmswsock.NewProc("AcceptEx")
214 procGetAcceptExSockaddrs = modmswsock.NewProc("GetAcceptExSockaddrs")
215 procWSARecv = modws2_32.NewProc("WSARecv")
216 procWSASend = modws2_32.NewProc("WSASend")
217 procWSARecvFrom = modws2_32.NewProc("WSARecvFrom")
218 procWSASendTo = modws2_32.NewProc("WSASendTo")
219 procgethostbyname = modws2_32.NewProc("gethostbyname")
220 procgetservbyname = modws2_32.NewProc("getservbyname")
221 procntohs = modws2_32.NewProc("ntohs")
222 procgetprotobyname = modws2_32.NewProc("getprotobyname")
223 procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W")
224 procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree")
225 procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W")
226 procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW")
227 procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW")
228 procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
229 procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
230 procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes")
231 procWSAEnumProtocolsW = modws2_32.NewProc("WSAEnumProtocolsW")
232 procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
233 procGetACP = modkernel32.NewProc("GetACP")
234 procMultiByteToWideChar = modkernel32.NewProc("MultiByteToWideChar")
235 procTranslateNameW = modsecur32.NewProc("TranslateNameW")
236 procGetUserNameExW = modsecur32.NewProc("GetUserNameExW")
237 procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo")
238 procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation")
239 procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree")
240 procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW")
241 procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW")
242 procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW")
243 procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW")
244 procGetLengthSid = modadvapi32.NewProc("GetLengthSid")
245 procCopySid = modadvapi32.NewProc("CopySid")
246 procAllocateAndInitializeSid = modadvapi32.NewProc("AllocateAndInitializeSid")
247 procFreeSid = modadvapi32.NewProc("FreeSid")
248 procEqualSid = modadvapi32.NewProc("EqualSid")
249 procCheckTokenMembership = modadvapi32.NewProc("CheckTokenMembership")
250 procOpenProcessToken = modadvapi32.NewProc("OpenProcessToken")
251 procGetTokenInformation = modadvapi32.NewProc("GetTokenInformation")
252 procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW")
253 )
254
255 func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) {
256 r0, _, e1 := syscall.Syscall(procRegisterEventSourceW.Addr(), 2, uintptr(unsafe.Pointer(uncServerName)), uintptr(unsafe.Pointer(sourceName)), 0)
257 handle = Handle(r0)
258 if handle == 0 {
259 if e1 != 0 {
260 err = errnoErr(e1)
261 } else {
262 err = syscall.EINVAL
263 }
264 }
265 return
266 }
267
268 func DeregisterEventSource(handle Handle) (err error) {
269 r1, _, e1 := syscall.Syscall(procDeregisterEventSource.Addr(), 1, uintptr(handle), 0, 0)
270 if r1 == 0 {
271 if e1 != 0 {
272 err = errnoErr(e1)
273 } else {
274 err = syscall.EINVAL
275 }
276 }
277 return
278 }
279
280 func ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) {
281 r1, _, e1 := syscall.Syscall9(procReportEventW.Addr(), 9, uintptr(log), uintptr(etype), uintptr(category), uintptr(eventId), uintptr(usrSId), uintptr(numStrings), uintptr(dataSize), uintptr(unsafe.Pointer(strings)), uintptr(unsafe.Pointer(rawData)))
282 if r1 == 0 {
283 if e1 != 0 {
284 err = errnoErr(e1)
285 } else {
286 err = syscall.EINVAL
287 }
288 }
289 return
290 }
291
292 func OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) {
293 r0, _, e1 := syscall.Syscall(procOpenSCManagerW.Addr(), 3, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(databaseName)), uintptr(access))
294 handle = Handle(r0)
295 if handle == 0 {
296 if e1 != 0 {
297 err = errnoErr(e1)
298 } else {
299 err = syscall.EINVAL
300 }
301 }
302 return
303 }
304
305 func CloseServiceHandle(handle Handle) (err error) {
306 r1, _, e1 := syscall.Syscall(procCloseServiceHandle.Addr(), 1, uintptr(handle), 0, 0)
307 if r1 == 0 {
308 if e1 != 0 {
309 err = errnoErr(e1)
310 } else {
311 err = syscall.EINVAL
312 }
313 }
314 return
315 }
316
317 func CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) {
318 r0, _, e1 := syscall.Syscall15(procCreateServiceW.Addr(), 13, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(unsafe.Pointer(displayName)), uintptr(access), uintptr(srvType), uintptr(startType), uintptr(errCtl), uintptr(unsafe.Pointer(pathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), 0, 0)
319 handle = Handle(r0)
320 if handle == 0 {
321 if e1 != 0 {
322 err = errnoErr(e1)
323 } else {
324 err = syscall.EINVAL
325 }
326 }
327 return
328 }
329
330 func OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) {
331 r0, _, e1 := syscall.Syscall(procOpenServiceW.Addr(), 3, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(access))
332 handle = Handle(r0)
333 if handle == 0 {
334 if e1 != 0 {
335 err = errnoErr(e1)
336 } else {
337 err = syscall.EINVAL
338 }
339 }
340 return
341 }
342
343 func DeleteService(service Handle) (err error) {
344 r1, _, e1 := syscall.Syscall(procDeleteService.Addr(), 1, uintptr(service), 0, 0)
345 if r1 == 0 {
346 if e1 != 0 {
347 err = errnoErr(e1)
348 } else {
349 err = syscall.EINVAL
350 }
351 }
352 return
353 }
354
355 func StartService(service Handle, numArgs uint32, argVectors **uint16) (err error) {
356 r1, _, e1 := syscall.Syscall(procStartServiceW.Addr(), 3, uintptr(service), uintptr(numArgs), uintptr(unsafe.Pointer(argVectors)))
357 if r1 == 0 {
358 if e1 != 0 {
359 err = errnoErr(e1)
360 } else {
361 err = syscall.EINVAL
362 }
363 }
364 return
365 }
366
367 func QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) {
368 r1, _, e1 := syscall.Syscall(procQueryServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(status)), 0)
369 if r1 == 0 {
370 if e1 != 0 {
371 err = errnoErr(e1)
372 } else {
373 err = syscall.EINVAL
374 }
375 }
376 return
377 }
378
379 func ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) {
380 r1, _, e1 := syscall.Syscall(procControlService.Addr(), 3, uintptr(service), uintptr(control), uintptr(unsafe.Pointer(status)))
381 if r1 == 0 {
382 if e1 != 0 {
383 err = errnoErr(e1)
384 } else {
385 err = syscall.EINVAL
386 }
387 }
388 return
389 }
390
391 func StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) {
392 r1, _, e1 := syscall.Syscall(procStartServiceCtrlDispatcherW.Addr(), 1, uintptr(unsafe.Pointer(serviceTable)), 0, 0)
393 if r1 == 0 {
394 if e1 != 0 {
395 err = errnoErr(e1)
396 } else {
397 err = syscall.EINVAL
398 }
399 }
400 return
401 }
402
403 func SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) {
404 r1, _, e1 := syscall.Syscall(procSetServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(serviceStatus)), 0)
405 if r1 == 0 {
406 if e1 != 0 {
407 err = errnoErr(e1)
408 } else {
409 err = syscall.EINVAL
410 }
411 }
412 return
413 }
414
415 func ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) {
416 r1, _, e1 := syscall.Syscall12(procChangeServiceConfigW.Addr(), 11, uintptr(service), uintptr(serviceType), uintptr(startType), uintptr(errorControl), uintptr(unsafe.Pointer(binaryPathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), uintptr(unsafe.Pointer(displayName)), 0)
417 if r1 == 0 {
418 if e1 != 0 {
419 err = errnoErr(e1)
420 } else {
421 err = syscall.EINVAL
422 }
423 }
424 return
425 }
426
427 func QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) {
428 r1, _, e1 := syscall.Syscall6(procQueryServiceConfigW.Addr(), 4, uintptr(service), uintptr(unsafe.Pointer(serviceConfig)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0)
429 if r1 == 0 {
430 if e1 != 0 {
431 err = errnoErr(e1)
432 } else {
433 err = syscall.EINVAL
434 }
435 }
436 return
437 }
438
439 func ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) {
440 r1, _, e1 := syscall.Syscall(procChangeServiceConfig2W.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(info)))
441 if r1 == 0 {
442 if e1 != 0 {
443 err = errnoErr(e1)
444 } else {
445 err = syscall.EINVAL
446 }
447 }
448 return
449 }
450
451 func QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {
452 r1, _, e1 := syscall.Syscall6(procQueryServiceConfig2W.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0)
453 if r1 == 0 {
454 if e1 != 0 {
455 err = errnoErr(e1)
456 } else {
457 err = syscall.EINVAL
458 }
459 }
460 return
461 }
462
463 func EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) {
464 r1, _, e1 := syscall.Syscall12(procEnumServicesStatusExW.Addr(), 10, uintptr(mgr), uintptr(infoLevel), uintptr(serviceType), uintptr(serviceState), uintptr(unsafe.Pointer(services)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)), uintptr(unsafe.Pointer(resumeHandle)), uintptr(unsafe.Pointer(groupName)), 0, 0)
465 if r1 == 0 {
466 if e1 != 0 {
467 err = errnoErr(e1)
468 } else {
469 err = syscall.EINVAL
470 }
471 }
472 return
473 }
474
475 func QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {
476 r1, _, e1 := syscall.Syscall6(procQueryServiceStatusEx.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0)
477 if r1 == 0 {
478 if e1 != 0 {
479 err = errnoErr(e1)
480 } else {
481 err = syscall.EINVAL
482 }
483 }
484 return
485 }
486
487 func GetLastError() (lasterr error) {
488 r0, _, _ := syscall.Syscall(procGetLastError.Addr(), 0, 0, 0, 0)
489 if r0 != 0 {
490 lasterr = syscall.Errno(r0)
491 }
492 return
493 }
494
495 func LoadLibrary(libname string) (handle Handle, err error) {
496 var _p0 *uint16
497 _p0, err = syscall.UTF16PtrFromString(libname)
498 if err != nil {
499 return
500 }
501 return _LoadLibrary(_p0)
502 }
503
504 func _LoadLibrary(libname *uint16) (handle Handle, err error) {
505 r0, _, e1 := syscall.Syscall(procLoadLibraryW.Addr(), 1, uintptr(unsafe.Pointer(libname)), 0, 0)
506 handle = Handle(r0)
507 if handle == 0 {
508 if e1 != 0 {
509 err = errnoErr(e1)
510 } else {
511 err = syscall.EINVAL
512 }
513 }
514 return
515 }
516
517 func LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, err error) {
518 var _p0 *uint16
519 _p0, err = syscall.UTF16PtrFromString(libname)
520 if err != nil {
521 return
522 }
523 return _LoadLibraryEx(_p0, zero, flags)
524 }
525
526 func _LoadLibraryEx(libname *uint16, zero Handle, flags uintptr) (handle Handle, err error) {
527 r0, _, e1 := syscall.Syscall(procLoadLibraryExW.Addr(), 3, uintptr(unsafe.Pointer(libname)), uintptr(zero), uintptr(flags))
528 handle = Handle(r0)
529 if handle == 0 {
530 if e1 != 0 {
531 err = errnoErr(e1)
532 } else {
533 err = syscall.EINVAL
534 }
535 }
536 return
537 }
538
539 func FreeLibrary(handle Handle) (err error) {
540 r1, _, e1 := syscall.Syscall(procFreeLibrary.Addr(), 1, uintptr(handle), 0, 0)
541 if r1 == 0 {
542 if e1 != 0 {
543 err = errnoErr(e1)
544 } else {
545 err = syscall.EINVAL
546 }
547 }
548 return
549 }
550
551 func GetProcAddress(module Handle, procname string) (proc uintptr, err error) {
552 var _p0 *byte
553 _p0, err = syscall.BytePtrFromString(procname)
554 if err != nil {
555 return
556 }
557 return _GetProcAddress(module, _p0)
558 }
559
560 func _GetProcAddress(module Handle, procname *byte) (proc uintptr, err error) {
561 r0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), uintptr(unsafe.Pointer(procname)), 0)
562 proc = uintptr(r0)
563 if proc == 0 {
564 if e1 != 0 {
565 err = errnoErr(e1)
566 } else {
567 err = syscall.EINVAL
568 }
569 }
570 return
571 }
572
573 func GetVersion() (ver uint32, err error) {
574 r0, _, e1 := syscall.Syscall(procGetVersion.Addr(), 0, 0, 0, 0)
575 ver = uint32(r0)
576 if ver == 0 {
577 if e1 != 0 {
578 err = errnoErr(e1)
579 } else {
580 err = syscall.EINVAL
581 }
582 }
583 return
584 }
585
586 func FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) {
587 var _p0 *uint16
588 if len(buf) > 0 {
589 _p0 = &buf[0]
590 }
591 r0, _, e1 := syscall.Syscall9(procFormatMessageW.Addr(), 7, uintptr(flags), uintptr(msgsrc), uintptr(msgid), uintptr(langid), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(args)), 0, 0)
592 n = uint32(r0)
593 if n == 0 {
594 if e1 != 0 {
595 err = errnoErr(e1)
596 } else {
597 err = syscall.EINVAL
598 }
599 }
600 return
601 }
602
603 func ExitProcess(exitcode uint32) {
604 syscall.Syscall(procExitProcess.Addr(), 1, uintptr(exitcode), 0, 0)
605 return
606 }
607
608 func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) {
609 r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0)
610 handle = Handle(r0)
611 if handle == InvalidHandle {
612 if e1 != 0 {
613 err = errnoErr(e1)
614 } else {
615 err = syscall.EINVAL
616 }
617 }
618 return
619 }
620
621 func ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
622 var _p0 *byte
623 if len(buf) > 0 {
624 _p0 = &buf[0]
625 }
626 r1, _, e1 := syscall.Syscall6(procReadFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
627 if r1 == 0 {
628 if e1 != 0 {
629 err = errnoErr(e1)
630 } else {
631 err = syscall.EINVAL
632 }
633 }
634 return
635 }
636
637 func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
638 var _p0 *byte
639 if len(buf) > 0 {
640 _p0 = &buf[0]
641 }
642 r1, _, e1 := syscall.Syscall6(procWriteFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
643 if r1 == 0 {
644 if e1 != 0 {
645 err = errnoErr(e1)
646 } else {
647 err = syscall.EINVAL
648 }
649 }
650 return
651 }
652
653 func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) {
654 r0, _, e1 := syscall.Syscall6(procSetFilePointer.Addr(), 4, uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence), 0, 0)
655 newlowoffset = uint32(r0)
656 if newlowoffset == 0xffffffff {
657 if e1 != 0 {
658 err = errnoErr(e1)
659 } else {
660 err = syscall.EINVAL
661 }
662 }
663 return
664 }
665
666 func CloseHandle(handle Handle) (err error) {
667 r1, _, e1 := syscall.Syscall(procCloseHandle.Addr(), 1, uintptr(handle), 0, 0)
668 if r1 == 0 {
669 if e1 != 0 {
670 err = errnoErr(e1)
671 } else {
672 err = syscall.EINVAL
673 }
674 }
675 return
676 }
677
678 func GetStdHandle(stdhandle uint32) (handle Handle, err error) {
679 r0, _, e1 := syscall.Syscall(procGetStdHandle.Addr(), 1, uintptr(stdhandle), 0, 0)
680 handle = Handle(r0)
681 if handle == InvalidHandle {
682 if e1 != 0 {
683 err = errnoErr(e1)
684 } else {
685 err = syscall.EINVAL
686 }
687 }
688 return
689 }
690
691 func SetStdHandle(stdhandle uint32, handle Handle) (err error) {
692 r1, _, e1 := syscall.Syscall(procSetStdHandle.Addr(), 2, uintptr(stdhandle), uintptr(handle), 0)
693 if r1 == 0 {
694 if e1 != 0 {
695 err = errnoErr(e1)
696 } else {
697 err = syscall.EINVAL
698 }
699 }
700 return
701 }
702
703 func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) {
704 r0, _, e1 := syscall.Syscall(procFindFirstFileW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)), 0)
705 handle = Handle(r0)
706 if handle == InvalidHandle {
707 if e1 != 0 {
708 err = errnoErr(e1)
709 } else {
710 err = syscall.EINVAL
711 }
712 }
713 return
714 }
715
716 func findNextFile1(handle Handle, data *win32finddata1) (err error) {
717 r1, _, e1 := syscall.Syscall(procFindNextFileW.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
718 if r1 == 0 {
719 if e1 != 0 {
720 err = errnoErr(e1)
721 } else {
722 err = syscall.EINVAL
723 }
724 }
725 return
726 }
727
728 func FindClose(handle Handle) (err error) {
729 r1, _, e1 := syscall.Syscall(procFindClose.Addr(), 1, uintptr(handle), 0, 0)
730 if r1 == 0 {
731 if e1 != 0 {
732 err = errnoErr(e1)
733 } else {
734 err = syscall.EINVAL
735 }
736 }
737 return
738 }
739
740 func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error) {
741 r1, _, e1 := syscall.Syscall(procGetFileInformationByHandle.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
742 if r1 == 0 {
743 if e1 != 0 {
744 err = errnoErr(e1)
745 } else {
746 err = syscall.EINVAL
747 }
748 }
749 return
750 }
751
752 func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) {
753 r0, _, e1 := syscall.Syscall(procGetCurrentDirectoryW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
754 n = uint32(r0)
755 if n == 0 {
756 if e1 != 0 {
757 err = errnoErr(e1)
758 } else {
759 err = syscall.EINVAL
760 }
761 }
762 return
763 }
764
765 func SetCurrentDirectory(path *uint16) (err error) {
766 r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
767 if r1 == 0 {
768 if e1 != 0 {
769 err = errnoErr(e1)
770 } else {
771 err = syscall.EINVAL
772 }
773 }
774 return
775 }
776
777 func CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) {
778 r1, _, e1 := syscall.Syscall(procCreateDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(sa)), 0)
779 if r1 == 0 {
780 if e1 != 0 {
781 err = errnoErr(e1)
782 } else {
783 err = syscall.EINVAL
784 }
785 }
786 return
787 }
788
789 func RemoveDirectory(path *uint16) (err error) {
790 r1, _, e1 := syscall.Syscall(procRemoveDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
791 if r1 == 0 {
792 if e1 != 0 {
793 err = errnoErr(e1)
794 } else {
795 err = syscall.EINVAL
796 }
797 }
798 return
799 }
800
801 func DeleteFile(path *uint16) (err error) {
802 r1, _, e1 := syscall.Syscall(procDeleteFileW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
803 if r1 == 0 {
804 if e1 != 0 {
805 err = errnoErr(e1)
806 } else {
807 err = syscall.EINVAL
808 }
809 }
810 return
811 }
812
813 func MoveFile(from *uint16, to *uint16) (err error) {
814 r1, _, e1 := syscall.Syscall(procMoveFileW.Addr(), 2, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), 0)
815 if r1 == 0 {
816 if e1 != 0 {
817 err = errnoErr(e1)
818 } else {
819 err = syscall.EINVAL
820 }
821 }
822 return
823 }
824
825 func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) {
826 r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags))
827 if r1 == 0 {
828 if e1 != 0 {
829 err = errnoErr(e1)
830 } else {
831 err = syscall.EINVAL
832 }
833 }
834 return
835 }
836
837 func GetComputerName(buf *uint16, n *uint32) (err error) {
838 r1, _, e1 := syscall.Syscall(procGetComputerNameW.Addr(), 2, uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)), 0)
839 if r1 == 0 {
840 if e1 != 0 {
841 err = errnoErr(e1)
842 } else {
843 err = syscall.EINVAL
844 }
845 }
846 return
847 }
848
849 func GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) {
850 r1, _, e1 := syscall.Syscall(procGetComputerNameExW.Addr(), 3, uintptr(nametype), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)))
851 if r1 == 0 {
852 if e1 != 0 {
853 err = errnoErr(e1)
854 } else {
855 err = syscall.EINVAL
856 }
857 }
858 return
859 }
860
861 func SetEndOfFile(handle Handle) (err error) {
862 r1, _, e1 := syscall.Syscall(procSetEndOfFile.Addr(), 1, uintptr(handle), 0, 0)
863 if r1 == 0 {
864 if e1 != 0 {
865 err = errnoErr(e1)
866 } else {
867 err = syscall.EINVAL
868 }
869 }
870 return
871 }
872
873 func GetSystemTimeAsFileTime(time *Filetime) {
874 syscall.Syscall(procGetSystemTimeAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0)
875 return
876 }
877
878 func GetSystemTimePreciseAsFileTime(time *Filetime) {
879 syscall.Syscall(procGetSystemTimePreciseAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0)
880 return
881 }
882
883 func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) {
884 r0, _, e1 := syscall.Syscall(procGetTimeZoneInformation.Addr(), 1, uintptr(unsafe.Pointer(tzi)), 0, 0)
885 rc = uint32(r0)
886 if rc == 0xffffffff {
887 if e1 != 0 {
888 err = errnoErr(e1)
889 } else {
890 err = syscall.EINVAL
891 }
892 }
893 return
894 }
895
896 func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error) {
897 r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt), 0, 0)
898 handle = Handle(r0)
899 if handle == 0 {
900 if e1 != 0 {
901 err = errnoErr(e1)
902 } else {
903 err = syscall.EINVAL
904 }
905 }
906 return
907 }
908
909 func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error) {
910 r1, _, e1 := syscall.Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout), 0)
911 if r1 == 0 {
912 if e1 != 0 {
913 err = errnoErr(e1)
914 } else {
915 err = syscall.EINVAL
916 }
917 }
918 return
919 }
920
921 func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error) {
922 r1, _, e1 := syscall.Syscall6(procPostQueuedCompletionStatus.Addr(), 4, uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped)), 0, 0)
923 if r1 == 0 {
924 if e1 != 0 {
925 err = errnoErr(e1)
926 } else {
927 err = syscall.EINVAL
928 }
929 }
930 return
931 }
932
933 func CancelIo(s Handle) (err error) {
934 r1, _, e1 := syscall.Syscall(procCancelIo.Addr(), 1, uintptr(s), 0, 0)
935 if r1 == 0 {
936 if e1 != 0 {
937 err = errnoErr(e1)
938 } else {
939 err = syscall.EINVAL
940 }
941 }
942 return
943 }
944
945 func CancelIoEx(s Handle, o *Overlapped) (err error) {
946 r1, _, e1 := syscall.Syscall(procCancelIoEx.Addr(), 2, uintptr(s), uintptr(unsafe.Pointer(o)), 0)
947 if r1 == 0 {
948 if e1 != 0 {
949 err = errnoErr(e1)
950 } else {
951 err = syscall.EINVAL
952 }
953 }
954 return
955 }
956
957 func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) {
958 var _p0 uint32
959 if inheritHandles {
960 _p0 = 1
961 } else {
962 _p0 = 0
963 }
964 r1, _, e1 := syscall.Syscall12(procCreateProcessW.Addr(), 10, uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0, 0)
965 if r1 == 0 {
966 if e1 != 0 {
967 err = errnoErr(e1)
968 } else {
969 err = syscall.EINVAL
970 }
971 }
972 return
973 }
974
975 func OpenProcess(da uint32, inheritHandle bool, pid uint32) (handle Handle, err error) {
976 var _p0 uint32
977 if inheritHandle {
978 _p0 = 1
979 } else {
980 _p0 = 0
981 }
982 r0, _, e1 := syscall.Syscall(procOpenProcess.Addr(), 3, uintptr(da), uintptr(_p0), uintptr(pid))
983 handle = Handle(r0)
984 if handle == 0 {
985 if e1 != 0 {
986 err = errnoErr(e1)
987 } else {
988 err = syscall.EINVAL
989 }
990 }
991 return
992 }
993
994 func TerminateProcess(handle Handle, exitcode uint32) (err error) {
995 r1, _, e1 := syscall.Syscall(procTerminateProcess.Addr(), 2, uintptr(handle), uintptr(exitcode), 0)
996 if r1 == 0 {
997 if e1 != 0 {
998 err = errnoErr(e1)
999 } else {
1000 err = syscall.EINVAL
1001 }
1002 }
1003 return
1004 }
1005
1006 func GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) {
1007 r1, _, e1 := syscall.Syscall(procGetExitCodeProcess.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(exitcode)), 0)
1008 if r1 == 0 {
1009 if e1 != 0 {
1010 err = errnoErr(e1)
1011 } else {
1012 err = syscall.EINVAL
1013 }
1014 }
1015 return
1016 }
1017
1018 func GetStartupInfo(startupInfo *StartupInfo) (err error) {
1019 r1, _, e1 := syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0)
1020 if r1 == 0 {
1021 if e1 != 0 {
1022 err = errnoErr(e1)
1023 } else {
1024 err = syscall.EINVAL
1025 }
1026 }
1027 return
1028 }
1029
1030 func GetCurrentProcess() (pseudoHandle Handle, err error) {
1031 r0, _, e1 := syscall.Syscall(procGetCurrentProcess.Addr(), 0, 0, 0, 0)
1032 pseudoHandle = Handle(r0)
1033 if pseudoHandle == 0 {
1034 if e1 != 0 {
1035 err = errnoErr(e1)
1036 } else {
1037 err = syscall.EINVAL
1038 }
1039 }
1040 return
1041 }
1042
1043 func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) {
1044 r1, _, e1 := syscall.Syscall6(procGetProcessTimes.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime)), 0)
1045 if r1 == 0 {
1046 if e1 != 0 {
1047 err = errnoErr(e1)
1048 } else {
1049 err = syscall.EINVAL
1050 }
1051 }
1052 return
1053 }
1054
1055 func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error) {
1056 var _p0 uint32
1057 if bInheritHandle {
1058 _p0 = 1
1059 } else {
1060 _p0 = 0
1061 }
1062 r1, _, e1 := syscall.Syscall9(procDuplicateHandle.Addr(), 7, uintptr(hSourceProcessHandle), uintptr(hSourceHandle), uintptr(hTargetProcessHandle), uintptr(unsafe.Pointer(lpTargetHandle)), uintptr(dwDesiredAccess), uintptr(_p0), uintptr(dwOptions), 0, 0)
1063 if r1 == 0 {
1064 if e1 != 0 {
1065 err = errnoErr(e1)
1066 } else {
1067 err = syscall.EINVAL
1068 }
1069 }
1070 return
1071 }
1072
1073 func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) {
1074 r0, _, e1 := syscall.Syscall(procWaitForSingleObject.Addr(), 2, uintptr(handle), uintptr(waitMilliseconds), 0)
1075 event = uint32(r0)
1076 if event == 0xffffffff {
1077 if e1 != 0 {
1078 err = errnoErr(e1)
1079 } else {
1080 err = syscall.EINVAL
1081 }
1082 }
1083 return
1084 }
1085
1086 func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) {
1087 r0, _, e1 := syscall.Syscall(procGetTempPathW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
1088 n = uint32(r0)
1089 if n == 0 {
1090 if e1 != 0 {
1091 err = errnoErr(e1)
1092 } else {
1093 err = syscall.EINVAL
1094 }
1095 }
1096 return
1097 }
1098
1099 func CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error) {
1100 r1, _, e1 := syscall.Syscall6(procCreatePipe.Addr(), 4, uintptr(unsafe.Pointer(readhandle)), uintptr(unsafe.Pointer(writehandle)), uintptr(unsafe.Pointer(sa)), uintptr(size), 0, 0)
1101 if r1 == 0 {
1102 if e1 != 0 {
1103 err = errnoErr(e1)
1104 } else {
1105 err = syscall.EINVAL
1106 }
1107 }
1108 return
1109 }
1110
1111 func GetFileType(filehandle Handle) (n uint32, err error) {
1112 r0, _, e1 := syscall.Syscall(procGetFileType.Addr(), 1, uintptr(filehandle), 0, 0)
1113 n = uint32(r0)
1114 if n == 0 {
1115 if e1 != 0 {
1116 err = errnoErr(e1)
1117 } else {
1118 err = syscall.EINVAL
1119 }
1120 }
1121 return
1122 }
1123
1124 func CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) {
1125 r1, _, e1 := syscall.Syscall6(procCryptAcquireContextW.Addr(), 5, uintptr(unsafe.Pointer(provhandle)), uintptr(unsafe.Pointer(container)), uintptr(unsafe.Pointer(provider)), uintptr(provtype), uintptr(flags), 0)
1126 if r1 == 0 {
1127 if e1 != 0 {
1128 err = errnoErr(e1)
1129 } else {
1130 err = syscall.EINVAL
1131 }
1132 }
1133 return
1134 }
1135
1136 func CryptReleaseContext(provhandle Handle, flags uint32) (err error) {
1137 r1, _, e1 := syscall.Syscall(procCryptReleaseContext.Addr(), 2, uintptr(provhandle), uintptr(flags), 0)
1138 if r1 == 0 {
1139 if e1 != 0 {
1140 err = errnoErr(e1)
1141 } else {
1142 err = syscall.EINVAL
1143 }
1144 }
1145 return
1146 }
1147
1148 func CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) {
1149 r1, _, e1 := syscall.Syscall(procCryptGenRandom.Addr(), 3, uintptr(provhandle), uintptr(buflen), uintptr(unsafe.Pointer(buf)))
1150 if r1 == 0 {
1151 if e1 != 0 {
1152 err = errnoErr(e1)
1153 } else {
1154 err = syscall.EINVAL
1155 }
1156 }
1157 return
1158 }
1159
1160 func GetEnvironmentStrings() (envs *uint16, err error) {
1161 r0, _, e1 := syscall.Syscall(procGetEnvironmentStringsW.Addr(), 0, 0, 0, 0)
1162 envs = (*uint16)(unsafe.Pointer(r0))
1163 if envs == nil {
1164 if e1 != 0 {
1165 err = errnoErr(e1)
1166 } else {
1167 err = syscall.EINVAL
1168 }
1169 }
1170 return
1171 }
1172
1173 func FreeEnvironmentStrings(envs *uint16) (err error) {
1174 r1, _, e1 := syscall.Syscall(procFreeEnvironmentStringsW.Addr(), 1, uintptr(unsafe.Pointer(envs)), 0, 0)
1175 if r1 == 0 {
1176 if e1 != 0 {
1177 err = errnoErr(e1)
1178 } else {
1179 err = syscall.EINVAL
1180 }
1181 }
1182 return
1183 }
1184
1185 func GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) {
1186 r0, _, e1 := syscall.Syscall(procGetEnvironmentVariableW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(size))
1187 n = uint32(r0)
1188 if n == 0 {
1189 if e1 != 0 {
1190 err = errnoErr(e1)
1191 } else {
1192 err = syscall.EINVAL
1193 }
1194 }
1195 return
1196 }
1197
1198 func SetEnvironmentVariable(name *uint16, value *uint16) (err error) {
1199 r1, _, e1 := syscall.Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0)
1200 if r1 == 0 {
1201 if e1 != 0 {
1202 err = errnoErr(e1)
1203 } else {
1204 err = syscall.EINVAL
1205 }
1206 }
1207 return
1208 }
1209
1210 func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) {
1211 r1, _, e1 := syscall.Syscall6(procSetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0)
1212 if r1 == 0 {
1213 if e1 != 0 {
1214 err = errnoErr(e1)
1215 } else {
1216 err = syscall.EINVAL
1217 }
1218 }
1219 return
1220 }
1221
1222 func GetFileAttributes(name *uint16) (attrs uint32, err error) {
1223 r0, _, e1 := syscall.Syscall(procGetFileAttributesW.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
1224 attrs = uint32(r0)
1225 if attrs == INVALID_FILE_ATTRIBUTES {
1226 if e1 != 0 {
1227 err = errnoErr(e1)
1228 } else {
1229 err = syscall.EINVAL
1230 }
1231 }
1232 return
1233 }
1234
1235 func SetFileAttributes(name *uint16, attrs uint32) (err error) {
1236 r1, _, e1 := syscall.Syscall(procSetFileAttributesW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(attrs), 0)
1237 if r1 == 0 {
1238 if e1 != 0 {
1239 err = errnoErr(e1)
1240 } else {
1241 err = syscall.EINVAL
1242 }
1243 }
1244 return
1245 }
1246
1247 func GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) {
1248 r1, _, e1 := syscall.Syscall(procGetFileAttributesExW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(level), uintptr(unsafe.Pointer(info)))
1249 if r1 == 0 {
1250 if e1 != 0 {
1251 err = errnoErr(e1)
1252 } else {
1253 err = syscall.EINVAL
1254 }
1255 }
1256 return
1257 }
1258
1259 func GetCommandLine() (cmd *uint16) {
1260 r0, _, _ := syscall.Syscall(procGetCommandLineW.Addr(), 0, 0, 0, 0)
1261 cmd = (*uint16)(unsafe.Pointer(r0))
1262 return
1263 }
1264
1265 func CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) {
1266 r0, _, e1 := syscall.Syscall(procCommandLineToArgvW.Addr(), 2, uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)), 0)
1267 argv = (*[8192]*[8192]uint16)(unsafe.Pointer(r0))
1268 if argv == nil {
1269 if e1 != 0 {
1270 err = errnoErr(e1)
1271 } else {
1272 err = syscall.EINVAL
1273 }
1274 }
1275 return
1276 }
1277
1278 func LocalFree(hmem Handle) (handle Handle, err error) {
1279 r0, _, e1 := syscall.Syscall(procLocalFree.Addr(), 1, uintptr(hmem), 0, 0)
1280 handle = Handle(r0)
1281 if handle != 0 {
1282 if e1 != 0 {
1283 err = errnoErr(e1)
1284 } else {
1285 err = syscall.EINVAL
1286 }
1287 }
1288 return
1289 }
1290
1291 func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) {
1292 r1, _, e1 := syscall.Syscall(procSetHandleInformation.Addr(), 3, uintptr(handle), uintptr(mask), uintptr(flags))
1293 if r1 == 0 {
1294 if e1 != 0 {
1295 err = errnoErr(e1)
1296 } else {
1297 err = syscall.EINVAL
1298 }
1299 }
1300 return
1301 }
1302
1303 func FlushFileBuffers(handle Handle) (err error) {
1304 r1, _, e1 := syscall.Syscall(procFlushFileBuffers.Addr(), 1, uintptr(handle), 0, 0)
1305 if r1 == 0 {
1306 if e1 != 0 {
1307 err = errnoErr(e1)
1308 } else {
1309 err = syscall.EINVAL
1310 }
1311 }
1312 return
1313 }
1314
1315 func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) {
1316 r0, _, e1 := syscall.Syscall6(procGetFullPathNameW.Addr(), 4, uintptr(unsafe.Pointer(path)), uintptr(buflen), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(fname)), 0, 0)
1317 n = uint32(r0)
1318 if n == 0 {
1319 if e1 != 0 {
1320 err = errnoErr(e1)
1321 } else {
1322 err = syscall.EINVAL
1323 }
1324 }
1325 return
1326 }
1327
1328 func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) {
1329 r0, _, e1 := syscall.Syscall(procGetLongPathNameW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(buf)), uintptr(buflen))
1330 n = uint32(r0)
1331 if n == 0 {
1332 if e1 != 0 {
1333 err = errnoErr(e1)
1334 } else {
1335 err = syscall.EINVAL
1336 }
1337 }
1338 return
1339 }
1340
1341 func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) {
1342 r0, _, e1 := syscall.Syscall(procGetShortPathNameW.Addr(), 3, uintptr(unsafe.Pointer(longpath)), uintptr(unsafe.Pointer(shortpath)), uintptr(buflen))
1343 n = uint32(r0)
1344 if n == 0 {
1345 if e1 != 0 {
1346 err = errnoErr(e1)
1347 } else {
1348 err = syscall.EINVAL
1349 }
1350 }
1351 return
1352 }
1353
1354 func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) {
1355 r0, _, e1 := syscall.Syscall6(procCreateFileMappingW.Addr(), 6, uintptr(fhandle), uintptr(unsafe.Pointer(sa)), uintptr(prot), uintptr(maxSizeHigh), uintptr(maxSizeLow), uintptr(unsafe.Pointer(name)))
1356 handle = Handle(r0)
1357 if handle == 0 {
1358 if e1 != 0 {
1359 err = errnoErr(e1)
1360 } else {
1361 err = syscall.EINVAL
1362 }
1363 }
1364 return
1365 }
1366
1367 func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) {
1368 r0, _, e1 := syscall.Syscall6(procMapViewOfFile.Addr(), 5, uintptr(handle), uintptr(access), uintptr(offsetHigh), uintptr(offsetLow), uintptr(length), 0)
1369 addr = uintptr(r0)
1370 if addr == 0 {
1371 if e1 != 0 {
1372 err = errnoErr(e1)
1373 } else {
1374 err = syscall.EINVAL
1375 }
1376 }
1377 return
1378 }
1379
1380 func UnmapViewOfFile(addr uintptr) (err error) {
1381 r1, _, e1 := syscall.Syscall(procUnmapViewOfFile.Addr(), 1, uintptr(addr), 0, 0)
1382 if r1 == 0 {
1383 if e1 != 0 {
1384 err = errnoErr(e1)
1385 } else {
1386 err = syscall.EINVAL
1387 }
1388 }
1389 return
1390 }
1391
1392 func FlushViewOfFile(addr uintptr, length uintptr) (err error) {
1393 r1, _, e1 := syscall.Syscall(procFlushViewOfFile.Addr(), 2, uintptr(addr), uintptr(length), 0)
1394 if r1 == 0 {
1395 if e1 != 0 {
1396 err = errnoErr(e1)
1397 } else {
1398 err = syscall.EINVAL
1399 }
1400 }
1401 return
1402 }
1403
1404 func VirtualLock(addr uintptr, length uintptr) (err error) {
1405 r1, _, e1 := syscall.Syscall(procVirtualLock.Addr(), 2, uintptr(addr), uintptr(length), 0)
1406 if r1 == 0 {
1407 if e1 != 0 {
1408 err = errnoErr(e1)
1409 } else {
1410 err = syscall.EINVAL
1411 }
1412 }
1413 return
1414 }
1415
1416 func VirtualUnlock(addr uintptr, length uintptr) (err error) {
1417 r1, _, e1 := syscall.Syscall(procVirtualUnlock.Addr(), 2, uintptr(addr), uintptr(length), 0)
1418 if r1 == 0 {
1419 if e1 != 0 {
1420 err = errnoErr(e1)
1421 } else {
1422 err = syscall.EINVAL
1423 }
1424 }
1425 return
1426 }
1427
1428 func VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) {
1429 r0, _, e1 := syscall.Syscall6(procVirtualAlloc.Addr(), 4, uintptr(address), uintptr(size), uintptr(alloctype), uintptr(protect), 0, 0)
1430 value = uintptr(r0)
1431 if value == 0 {
1432 if e1 != 0 {
1433 err = errnoErr(e1)
1434 } else {
1435 err = syscall.EINVAL
1436 }
1437 }
1438 return
1439 }
1440
1441 func VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) {
1442 r1, _, e1 := syscall.Syscall(procVirtualFree.Addr(), 3, uintptr(address), uintptr(size), uintptr(freetype))
1443 if r1 == 0 {
1444 if e1 != 0 {
1445 err = errnoErr(e1)
1446 } else {
1447 err = syscall.EINVAL
1448 }
1449 }
1450 return
1451 }
1452
1453 func VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) {
1454 r1, _, e1 := syscall.Syscall6(procVirtualProtect.Addr(), 4, uintptr(address), uintptr(size), uintptr(newprotect), uintptr(unsafe.Pointer(oldprotect)), 0, 0)
1455 if r1 == 0 {
1456 if e1 != 0 {
1457 err = errnoErr(e1)
1458 } else {
1459 err = syscall.EINVAL
1460 }
1461 }
1462 return
1463 }
1464
1465 func TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) {
1466 r1, _, e1 := syscall.Syscall9(procTransmitFile.Addr(), 7, uintptr(s), uintptr(handle), uintptr(bytesToWrite), uintptr(bytsPerSend), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(transmitFileBuf)), uintptr(flags), 0, 0)
1467 if r1 == 0 {
1468 if e1 != 0 {
1469 err = errnoErr(e1)
1470 } else {
1471 err = syscall.EINVAL
1472 }
1473 }
1474 return
1475 }
1476
1477 func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
1478 var _p0 uint32
1479 if watchSubTree {
1480 _p0 = 1
1481 } else {
1482 _p0 = 0
1483 }
1484 r1, _, e1 := syscall.Syscall9(procReadDirectoryChangesW.Addr(), 8, uintptr(handle), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(_p0), uintptr(mask), uintptr(unsafe.Pointer(retlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine), 0)
1485 if r1 == 0 {
1486 if e1 != 0 {
1487 err = errnoErr(e1)
1488 } else {
1489 err = syscall.EINVAL
1490 }
1491 }
1492 return
1493 }
1494
1495 func CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) {
1496 r0, _, e1 := syscall.Syscall(procCertOpenSystemStoreW.Addr(), 2, uintptr(hprov), uintptr(unsafe.Pointer(name)), 0)
1497 store = Handle(r0)
1498 if store == 0 {
1499 if e1 != 0 {
1500 err = errnoErr(e1)
1501 } else {
1502 err = syscall.EINVAL
1503 }
1504 }
1505 return
1506 }
1507
1508 func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) {
1509 r0, _, e1 := syscall.Syscall6(procCertOpenStore.Addr(), 5, uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para), 0)
1510 handle = Handle(r0)
1511 if handle == InvalidHandle {
1512 if e1 != 0 {
1513 err = errnoErr(e1)
1514 } else {
1515 err = syscall.EINVAL
1516 }
1517 }
1518 return
1519 }
1520
1521 func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) {
1522 r0, _, e1 := syscall.Syscall(procCertEnumCertificatesInStore.Addr(), 2, uintptr(store), uintptr(unsafe.Pointer(prevContext)), 0)
1523 context = (*CertContext)(unsafe.Pointer(r0))
1524 if context == nil {
1525 if e1 != 0 {
1526 err = errnoErr(e1)
1527 } else {
1528 err = syscall.EINVAL
1529 }
1530 }
1531 return
1532 }
1533
1534 func CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) {
1535 r1, _, e1 := syscall.Syscall6(procCertAddCertificateContextToStore.Addr(), 4, uintptr(store), uintptr(unsafe.Pointer(certContext)), uintptr(addDisposition), uintptr(unsafe.Pointer(storeContext)), 0, 0)
1536 if r1 == 0 {
1537 if e1 != 0 {
1538 err = errnoErr(e1)
1539 } else {
1540 err = syscall.EINVAL
1541 }
1542 }
1543 return
1544 }
1545
1546 func CertCloseStore(store Handle, flags uint32) (err error) {
1547 r1, _, e1 := syscall.Syscall(procCertCloseStore.Addr(), 2, uintptr(store), uintptr(flags), 0)
1548 if r1 == 0 {
1549 if e1 != 0 {
1550 err = errnoErr(e1)
1551 } else {
1552 err = syscall.EINVAL
1553 }
1554 }
1555 return
1556 }
1557
1558 func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) {
1559 r1, _, e1 := syscall.Syscall9(procCertGetCertificateChain.Addr(), 8, uintptr(engine), uintptr(unsafe.Pointer(leaf)), uintptr(unsafe.Pointer(time)), uintptr(additionalStore), uintptr(unsafe.Pointer(para)), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(chainCtx)), 0)
1560 if r1 == 0 {
1561 if e1 != 0 {
1562 err = errnoErr(e1)
1563 } else {
1564 err = syscall.EINVAL
1565 }
1566 }
1567 return
1568 }
1569
1570 func CertFreeCertificateChain(ctx *CertChainContext) {
1571 syscall.Syscall(procCertFreeCertificateChain.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
1572 return
1573 }
1574
1575 func CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) {
1576 r0, _, e1 := syscall.Syscall(procCertCreateCertificateContext.Addr(), 3, uintptr(certEncodingType), uintptr(unsafe.Pointer(certEncoded)), uintptr(encodedLen))
1577 context = (*CertContext)(unsafe.Pointer(r0))
1578 if context == nil {
1579 if e1 != 0 {
1580 err = errnoErr(e1)
1581 } else {
1582 err = syscall.EINVAL
1583 }
1584 }
1585 return
1586 }
1587
1588 func CertFreeCertificateContext(ctx *CertContext) (err error) {
1589 r1, _, e1 := syscall.Syscall(procCertFreeCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
1590 if r1 == 0 {
1591 if e1 != 0 {
1592 err = errnoErr(e1)
1593 } else {
1594 err = syscall.EINVAL
1595 }
1596 }
1597 return
1598 }
1599
1600 func CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) {
1601 r1, _, e1 := syscall.Syscall6(procCertVerifyCertificateChainPolicy.Addr(), 4, uintptr(policyOID), uintptr(unsafe.Pointer(chain)), uintptr(unsafe.Pointer(para)), uintptr(unsafe.Pointer(status)), 0, 0)
1602 if r1 == 0 {
1603 if e1 != 0 {
1604 err = errnoErr(e1)
1605 } else {
1606 err = syscall.EINVAL
1607 }
1608 }
1609 return
1610 }
1611
1612 func RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) {
1613 r0, _, _ := syscall.Syscall6(procRegOpenKeyExW.Addr(), 5, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(options), uintptr(desiredAccess), uintptr(unsafe.Pointer(result)), 0)
1614 if r0 != 0 {
1615 regerrno = syscall.Errno(r0)
1616 }
1617 return
1618 }
1619
1620 func RegCloseKey(key Handle) (regerrno error) {
1621 r0, _, _ := syscall.Syscall(procRegCloseKey.Addr(), 1, uintptr(key), 0, 0)
1622 if r0 != 0 {
1623 regerrno = syscall.Errno(r0)
1624 }
1625 return
1626 }
1627
1628 func RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) {
1629 r0, _, _ := syscall.Syscall12(procRegQueryInfoKeyW.Addr(), 12, uintptr(key), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(subkeysLen)), uintptr(unsafe.Pointer(maxSubkeyLen)), uintptr(unsafe.Pointer(maxClassLen)), uintptr(unsafe.Pointer(valuesLen)), uintptr(unsafe.Pointer(maxValueNameLen)), uintptr(unsafe.Pointer(maxValueLen)), uintptr(unsafe.Pointer(saLen)), uintptr(unsafe.Pointer(lastWriteTime)))
1630 if r0 != 0 {
1631 regerrno = syscall.Errno(r0)
1632 }
1633 return
1634 }
1635
1636 func RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) {
1637 r0, _, _ := syscall.Syscall9(procRegEnumKeyExW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(lastWriteTime)), 0)
1638 if r0 != 0 {
1639 regerrno = syscall.Errno(r0)
1640 }
1641 return
1642 }
1643
1644 func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) {
1645 r0, _, _ := syscall.Syscall6(procRegQueryValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)))
1646 if r0 != 0 {
1647 regerrno = syscall.Errno(r0)
1648 }
1649 return
1650 }
1651
1652 func getCurrentProcessId() (pid uint32) {
1653 r0, _, _ := syscall.Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0)
1654 pid = uint32(r0)
1655 return
1656 }
1657
1658 func GetConsoleMode(console Handle, mode *uint32) (err error) {
1659 r1, _, e1 := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0)
1660 if r1 == 0 {
1661 if e1 != 0 {
1662 err = errnoErr(e1)
1663 } else {
1664 err = syscall.EINVAL
1665 }
1666 }
1667 return
1668 }
1669
1670 func SetConsoleMode(console Handle, mode uint32) (err error) {
1671 r1, _, e1 := syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(console), uintptr(mode), 0)
1672 if r1 == 0 {
1673 if e1 != 0 {
1674 err = errnoErr(e1)
1675 } else {
1676 err = syscall.EINVAL
1677 }
1678 }
1679 return
1680 }
1681
1682 func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) {
1683 r1, _, e1 := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(info)), 0)
1684 if r1 == 0 {
1685 if e1 != 0 {
1686 err = errnoErr(e1)
1687 } else {
1688 err = syscall.EINVAL
1689 }
1690 }
1691 return
1692 }
1693
1694 func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) {
1695 r1, _, e1 := syscall.Syscall6(procWriteConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved)), 0)
1696 if r1 == 0 {
1697 if e1 != 0 {
1698 err = errnoErr(e1)
1699 } else {
1700 err = syscall.EINVAL
1701 }
1702 }
1703 return
1704 }
1705
1706 func ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) {
1707 r1, _, e1 := syscall.Syscall6(procReadConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(toread), uintptr(unsafe.Pointer(read)), uintptr(unsafe.Pointer(inputControl)), 0)
1708 if r1 == 0 {
1709 if e1 != 0 {
1710 err = errnoErr(e1)
1711 } else {
1712 err = syscall.EINVAL
1713 }
1714 }
1715 return
1716 }
1717
1718 func CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) {
1719 r0, _, e1 := syscall.Syscall(procCreateToolhelp32Snapshot.Addr(), 2, uintptr(flags), uintptr(processId), 0)
1720 handle = Handle(r0)
1721 if handle == InvalidHandle {
1722 if e1 != 0 {
1723 err = errnoErr(e1)
1724 } else {
1725 err = syscall.EINVAL
1726 }
1727 }
1728 return
1729 }
1730
1731 func Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) {
1732 r1, _, e1 := syscall.Syscall(procProcess32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0)
1733 if r1 == 0 {
1734 if e1 != 0 {
1735 err = errnoErr(e1)
1736 } else {
1737 err = syscall.EINVAL
1738 }
1739 }
1740 return
1741 }
1742
1743 func Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) {
1744 r1, _, e1 := syscall.Syscall(procProcess32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0)
1745 if r1 == 0 {
1746 if e1 != 0 {
1747 err = errnoErr(e1)
1748 } else {
1749 err = syscall.EINVAL
1750 }
1751 }
1752 return
1753 }
1754
1755 func DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBufferSize uint32, outBuffer *byte, outBufferSize uint32, bytesReturned *uint32, overlapped *Overlapped) (err error) {
1756 r1, _, e1 := syscall.Syscall9(procDeviceIoControl.Addr(), 8, uintptr(handle), uintptr(ioControlCode), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferSize), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferSize), uintptr(unsafe.Pointer(bytesReturned)), uintptr(unsafe.Pointer(overlapped)), 0)
1757 if r1 == 0 {
1758 if e1 != 0 {
1759 err = errnoErr(e1)
1760 } else {
1761 err = syscall.EINVAL
1762 }
1763 }
1764 return
1765 }
1766
1767 func CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) {
1768 r1, _, e1 := syscall.Syscall(procCreateSymbolicLinkW.Addr(), 3, uintptr(unsafe.Pointer(symlinkfilename)), uintptr(unsafe.Pointer(targetfilename)), uintptr(flags))
1769 if r1&0xff == 0 {
1770 if e1 != 0 {
1771 err = errnoErr(e1)
1772 } else {
1773 err = syscall.EINVAL
1774 }
1775 }
1776 return
1777 }
1778
1779 func CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) {
1780 r1, _, e1 := syscall.Syscall(procCreateHardLinkW.Addr(), 3, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(existingfilename)), uintptr(reserved))
1781 if r1&0xff == 0 {
1782 if e1 != 0 {
1783 err = errnoErr(e1)
1784 } else {
1785 err = syscall.EINVAL
1786 }
1787 }
1788 return
1789 }
1790
1791 func GetCurrentThreadId() (id uint32) {
1792 r0, _, _ := syscall.Syscall(procGetCurrentThreadId.Addr(), 0, 0, 0, 0)
1793 id = uint32(r0)
1794 return
1795 }
1796
1797 func CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) {
1798 r0, _, e1 := syscall.Syscall6(procCreateEventW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(manualReset), uintptr(initialState), uintptr(unsafe.Pointer(name)), 0, 0)
1799 handle = Handle(r0)
1800 if handle == 0 {
1801 if e1 != 0 {
1802 err = errnoErr(e1)
1803 } else {
1804 err = syscall.EINVAL
1805 }
1806 }
1807 return
1808 }
1809
1810 func CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {
1811 r0, _, e1 := syscall.Syscall6(procCreateEventExW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0)
1812 handle = Handle(r0)
1813 if handle == 0 {
1814 if e1 != 0 {
1815 err = errnoErr(e1)
1816 } else {
1817 err = syscall.EINVAL
1818 }
1819 }
1820 return
1821 }
1822
1823 func OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) {
1824 var _p0 uint32
1825 if inheritHandle {
1826 _p0 = 1
1827 } else {
1828 _p0 = 0
1829 }
1830 r0, _, e1 := syscall.Syscall(procOpenEventW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))
1831 handle = Handle(r0)
1832 if handle == 0 {
1833 if e1 != 0 {
1834 err = errnoErr(e1)
1835 } else {
1836 err = syscall.EINVAL
1837 }
1838 }
1839 return
1840 }
1841
1842 func SetEvent(event Handle) (err error) {
1843 r1, _, e1 := syscall.Syscall(procSetEvent.Addr(), 1, uintptr(event), 0, 0)
1844 if r1 == 0 {
1845 if e1 != 0 {
1846 err = errnoErr(e1)
1847 } else {
1848 err = syscall.EINVAL
1849 }
1850 }
1851 return
1852 }
1853
1854 func ResetEvent(event Handle) (err error) {
1855 r1, _, e1 := syscall.Syscall(procResetEvent.Addr(), 1, uintptr(event), 0, 0)
1856 if r1 == 0 {
1857 if e1 != 0 {
1858 err = errnoErr(e1)
1859 } else {
1860 err = syscall.EINVAL
1861 }
1862 }
1863 return
1864 }
1865
1866 func PulseEvent(event Handle) (err error) {
1867 r1, _, e1 := syscall.Syscall(procPulseEvent.Addr(), 1, uintptr(event), 0, 0)
1868 if r1 == 0 {
1869 if e1 != 0 {
1870 err = errnoErr(e1)
1871 } else {
1872 err = syscall.EINVAL
1873 }
1874 }
1875 return
1876 }
1877
1878 func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) {
1879 r1, _, e1 := syscall.Syscall(procDefineDosDeviceW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)))
1880 if r1 == 0 {
1881 if e1 != 0 {
1882 err = errnoErr(e1)
1883 } else {
1884 err = syscall.EINVAL
1885 }
1886 }
1887 return
1888 }
1889
1890 func DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) {
1891 r1, _, e1 := syscall.Syscall(procDeleteVolumeMountPointW.Addr(), 1, uintptr(unsafe.Pointer(volumeMountPoint)), 0, 0)
1892 if r1 == 0 {
1893 if e1 != 0 {
1894 err = errnoErr(e1)
1895 } else {
1896 err = syscall.EINVAL
1897 }
1898 }
1899 return
1900 }
1901
1902 func FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, err error) {
1903 r0, _, e1 := syscall.Syscall(procFindFirstVolumeW.Addr(), 2, uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength), 0)
1904 handle = Handle(r0)
1905 if handle == InvalidHandle {
1906 if e1 != 0 {
1907 err = errnoErr(e1)
1908 } else {
1909 err = syscall.EINVAL
1910 }
1911 }
1912 return
1913 }
1914
1915 func FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, bufferLength uint32) (handle Handle, err error) {
1916 r0, _, e1 := syscall.Syscall(procFindFirstVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
1917 handle = Handle(r0)
1918 if handle == InvalidHandle {
1919 if e1 != 0 {
1920 err = errnoErr(e1)
1921 } else {
1922 err = syscall.EINVAL
1923 }
1924 }
1925 return
1926 }
1927
1928 func FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) (err error) {
1929 r1, _, e1 := syscall.Syscall(procFindNextVolumeW.Addr(), 3, uintptr(findVolume), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength))
1930 if r1 == 0 {
1931 if e1 != 0 {
1932 err = errnoErr(e1)
1933 } else {
1934 err = syscall.EINVAL
1935 }
1936 }
1937 return
1938 }
1939
1940 func FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) {
1941 r1, _, e1 := syscall.Syscall(procFindNextVolumeMountPointW.Addr(), 3, uintptr(findVolumeMountPoint), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
1942 if r1 == 0 {
1943 if e1 != 0 {
1944 err = errnoErr(e1)
1945 } else {
1946 err = syscall.EINVAL
1947 }
1948 }
1949 return
1950 }
1951
1952 func FindVolumeClose(findVolume Handle) (err error) {
1953 r1, _, e1 := syscall.Syscall(procFindVolumeClose.Addr(), 1, uintptr(findVolume), 0, 0)
1954 if r1 == 0 {
1955 if e1 != 0 {
1956 err = errnoErr(e1)
1957 } else {
1958 err = syscall.EINVAL
1959 }
1960 }
1961 return
1962 }
1963
1964 func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) {
1965 r1, _, e1 := syscall.Syscall(procFindVolumeMountPointClose.Addr(), 1, uintptr(findVolumeMountPoint), 0, 0)
1966 if r1 == 0 {
1967 if e1 != 0 {
1968 err = errnoErr(e1)
1969 } else {
1970 err = syscall.EINVAL
1971 }
1972 }
1973 return
1974 }
1975
1976 func GetDriveType(rootPathName *uint16) (driveType uint32) {
1977 r0, _, _ := syscall.Syscall(procGetDriveTypeW.Addr(), 1, uintptr(unsafe.Pointer(rootPathName)), 0, 0)
1978 driveType = uint32(r0)
1979 return
1980 }
1981
1982 func GetLogicalDrives() (drivesBitMask uint32, err error) {
1983 r0, _, e1 := syscall.Syscall(procGetLogicalDrives.Addr(), 0, 0, 0, 0)
1984 drivesBitMask = uint32(r0)
1985 if drivesBitMask == 0 {
1986 if e1 != 0 {
1987 err = errnoErr(e1)
1988 } else {
1989 err = syscall.EINVAL
1990 }
1991 }
1992 return
1993 }
1994
1995 func GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) {
1996 r0, _, e1 := syscall.Syscall(procGetLogicalDriveStringsW.Addr(), 2, uintptr(bufferLength), uintptr(unsafe.Pointer(buffer)), 0)
1997 n = uint32(r0)
1998 if n == 0 {
1999 if e1 != 0 {
2000 err = errnoErr(e1)
2001 } else {
2002 err = syscall.EINVAL
2003 }
2004 }
2005 return
2006 }
2007
2008 func GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) {
2009 r1, _, e1 := syscall.Syscall9(procGetVolumeInformationW.Addr(), 8, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0)
2010 if r1 == 0 {
2011 if e1 != 0 {
2012 err = errnoErr(e1)
2013 } else {
2014 err = syscall.EINVAL
2015 }
2016 }
2017 return
2018 }
2019
2020 func GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) {
2021 r1, _, e1 := syscall.Syscall9(procGetVolumeInformationByHandleW.Addr(), 8, uintptr(file), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0)
2022 if r1 == 0 {
2023 if e1 != 0 {
2024 err = errnoErr(e1)
2025 } else {
2026 err = syscall.EINVAL
2027 }
2028 }
2029 return
2030 }
2031
2032 func GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16, bufferlength uint32) (err error) {
2033 r1, _, e1 := syscall.Syscall(procGetVolumeNameForVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferlength))
2034 if r1 == 0 {
2035 if e1 != 0 {
2036 err = errnoErr(e1)
2037 } else {
2038 err = syscall.EINVAL
2039 }
2040 }
2041 return
2042 }
2043
2044 func GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength uint32) (err error) {
2045 r1, _, e1 := syscall.Syscall(procGetVolumePathNameW.Addr(), 3, uintptr(unsafe.Pointer(fileName)), uintptr(unsafe.Pointer(volumePathName)), uintptr(bufferLength))
2046 if r1 == 0 {
2047 if e1 != 0 {
2048 err = errnoErr(e1)
2049 } else {
2050 err = syscall.EINVAL
2051 }
2052 }
2053 return
2054 }
2055
2056 func GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16, bufferLength uint32, returnLength *uint32) (err error) {
2057 r1, _, e1 := syscall.Syscall6(procGetVolumePathNamesForVolumeNameW.Addr(), 4, uintptr(unsafe.Pointer(volumeName)), uintptr(unsafe.Pointer(volumePathNames)), uintptr(bufferLength), uintptr(unsafe.Pointer(returnLength)), 0, 0)
2058 if r1 == 0 {
2059 if e1 != 0 {
2060 err = errnoErr(e1)
2061 } else {
2062 err = syscall.EINVAL
2063 }
2064 }
2065 return
2066 }
2067
2068 func QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) {
2069 r0, _, e1 := syscall.Syscall(procQueryDosDeviceW.Addr(), 3, uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)), uintptr(max))
2070 n = uint32(r0)
2071 if n == 0 {
2072 if e1 != 0 {
2073 err = errnoErr(e1)
2074 } else {
2075 err = syscall.EINVAL
2076 }
2077 }
2078 return
2079 }
2080
2081 func SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) {
2082 r1, _, e1 := syscall.Syscall(procSetVolumeLabelW.Addr(), 2, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeName)), 0)
2083 if r1 == 0 {
2084 if e1 != 0 {
2085 err = errnoErr(e1)
2086 } else {
2087 err = syscall.EINVAL
2088 }
2089 }
2090 return
2091 }
2092
2093 func SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) {
2094 r1, _, e1 := syscall.Syscall(procSetVolumeMountPointW.Addr(), 2, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), 0)
2095 if r1 == 0 {
2096 if e1 != 0 {
2097 err = errnoErr(e1)
2098 } else {
2099 err = syscall.EINVAL
2100 }
2101 }
2102 return
2103 }
2104
2105 func WSAStartup(verreq uint32, data *WSAData) (sockerr error) {
2106 r0, _, _ := syscall.Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(unsafe.Pointer(data)), 0)
2107 if r0 != 0 {
2108 sockerr = syscall.Errno(r0)
2109 }
2110 return
2111 }
2112
2113 func WSACleanup() (err error) {
2114 r1, _, e1 := syscall.Syscall(procWSACleanup.Addr(), 0, 0, 0, 0)
2115 if r1 == socket_error {
2116 if e1 != 0 {
2117 err = errnoErr(e1)
2118 } else {
2119 err = syscall.EINVAL
2120 }
2121 }
2122 return
2123 }
2124
2125 func WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
2126 r1, _, e1 := syscall.Syscall9(procWSAIoctl.Addr(), 9, uintptr(s), uintptr(iocc), uintptr(unsafe.Pointer(inbuf)), uintptr(cbif), uintptr(unsafe.Pointer(outbuf)), uintptr(cbob), uintptr(unsafe.Pointer(cbbr)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine))
2127 if r1 == socket_error {
2128 if e1 != 0 {
2129 err = errnoErr(e1)
2130 } else {
2131 err = syscall.EINVAL
2132 }
2133 }
2134 return
2135 }
2136
2137 func socket(af int32, typ int32, protocol int32) (handle Handle, err error) {
2138 r0, _, e1 := syscall.Syscall(procsocket.Addr(), 3, uintptr(af), uintptr(typ), uintptr(protocol))
2139 handle = Handle(r0)
2140 if handle == InvalidHandle {
2141 if e1 != 0 {
2142 err = errnoErr(e1)
2143 } else {
2144 err = syscall.EINVAL
2145 }
2146 }
2147 return
2148 }
2149
2150 func Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) {
2151 r1, _, e1 := syscall.Syscall6(procsetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen), 0)
2152 if r1 == socket_error {
2153 if e1 != 0 {
2154 err = errnoErr(e1)
2155 } else {
2156 err = syscall.EINVAL
2157 }
2158 }
2159 return
2160 }
2161
2162 func Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) {
2163 r1, _, e1 := syscall.Syscall6(procgetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(unsafe.Pointer(optlen)), 0)
2164 if r1 == socket_error {
2165 if e1 != 0 {
2166 err = errnoErr(e1)
2167 } else {
2168 err = syscall.EINVAL
2169 }
2170 }
2171 return
2172 }
2173
2174 func bind(s Handle, name unsafe.Pointer, namelen int32) (err error) {
2175 r1, _, e1 := syscall.Syscall(procbind.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
2176 if r1 == socket_error {
2177 if e1 != 0 {
2178 err = errnoErr(e1)
2179 } else {
2180 err = syscall.EINVAL
2181 }
2182 }
2183 return
2184 }
2185
2186 func connect(s Handle, name unsafe.Pointer, namelen int32) (err error) {
2187 r1, _, e1 := syscall.Syscall(procconnect.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
2188 if r1 == socket_error {
2189 if e1 != 0 {
2190 err = errnoErr(e1)
2191 } else {
2192 err = syscall.EINVAL
2193 }
2194 }
2195 return
2196 }
2197
2198 func getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
2199 r1, _, e1 := syscall.Syscall(procgetsockname.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
2200 if r1 == socket_error {
2201 if e1 != 0 {
2202 err = errnoErr(e1)
2203 } else {
2204 err = syscall.EINVAL
2205 }
2206 }
2207 return
2208 }
2209
2210 func getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
2211 r1, _, e1 := syscall.Syscall(procgetpeername.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
2212 if r1 == socket_error {
2213 if e1 != 0 {
2214 err = errnoErr(e1)
2215 } else {
2216 err = syscall.EINVAL
2217 }
2218 }
2219 return
2220 }
2221
2222 func listen(s Handle, backlog int32) (err error) {
2223 r1, _, e1 := syscall.Syscall(proclisten.Addr(), 2, uintptr(s), uintptr(backlog), 0)
2224 if r1 == socket_error {
2225 if e1 != 0 {
2226 err = errnoErr(e1)
2227 } else {
2228 err = syscall.EINVAL
2229 }
2230 }
2231 return
2232 }
2233
2234 func shutdown(s Handle, how int32) (err error) {
2235 r1, _, e1 := syscall.Syscall(procshutdown.Addr(), 2, uintptr(s), uintptr(how), 0)
2236 if r1 == socket_error {
2237 if e1 != 0 {
2238 err = errnoErr(e1)
2239 } else {
2240 err = syscall.EINVAL
2241 }
2242 }
2243 return
2244 }
2245
2246 func Closesocket(s Handle) (err error) {
2247 r1, _, e1 := syscall.Syscall(procclosesocket.Addr(), 1, uintptr(s), 0, 0)
2248 if r1 == socket_error {
2249 if e1 != 0 {
2250 err = errnoErr(e1)
2251 } else {
2252 err = syscall.EINVAL
2253 }
2254 }
2255 return
2256 }
2257
2258 func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) {
2259 r1, _, e1 := syscall.Syscall9(procAcceptEx.Addr(), 8, uintptr(ls), uintptr(as), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(overlapped)), 0)
2260 if r1 == 0 {
2261 if e1 != 0 {
2262 err = errnoErr(e1)
2263 } else {
2264 err = syscall.EINVAL
2265 }
2266 }
2267 return
2268 }
2269
2270 func GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) {
2271 syscall.Syscall9(procGetAcceptExSockaddrs.Addr(), 8, uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(lrsa)), uintptr(unsafe.Pointer(lrsalen)), uintptr(unsafe.Pointer(rrsa)), uintptr(unsafe.Pointer(rrsalen)), 0)
2272 return
2273 }
2274
2275 func WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) {
2276 r1, _, e1 := syscall.Syscall9(procWSARecv.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
2277 if r1 == socket_error {
2278 if e1 != 0 {
2279 err = errnoErr(e1)
2280 } else {
2281 err = syscall.EINVAL
2282 }
2283 }
2284 return
2285 }
2286
2287 func WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) {
2288 r1, _, e1 := syscall.Syscall9(procWSASend.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
2289 if r1 == socket_error {
2290 if e1 != 0 {
2291 err = errnoErr(e1)
2292 } else {
2293 err = syscall.EINVAL
2294 }
2295 }
2296 return
2297 }
2298
2299 func WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) {
2300 r1, _, e1 := syscall.Syscall9(procWSARecvFrom.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
2301 if r1 == socket_error {
2302 if e1 != 0 {
2303 err = errnoErr(e1)
2304 } else {
2305 err = syscall.EINVAL
2306 }
2307 }
2308 return
2309 }
2310
2311 func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) {
2312 r1, _, e1 := syscall.Syscall9(procWSASendTo.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(to)), uintptr(tolen), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
2313 if r1 == socket_error {
2314 if e1 != 0 {
2315 err = errnoErr(e1)
2316 } else {
2317 err = syscall.EINVAL
2318 }
2319 }
2320 return
2321 }
2322
2323 func GetHostByName(name string) (h *Hostent, err error) {
2324 var _p0 *byte
2325 _p0, err = syscall.BytePtrFromString(name)
2326 if err != nil {
2327 return
2328 }
2329 return _GetHostByName(_p0)
2330 }
2331
2332 func _GetHostByName(name *byte) (h *Hostent, err error) {
2333 r0, _, e1 := syscall.Syscall(procgethostbyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
2334 h = (*Hostent)(unsafe.Pointer(r0))
2335 if h == nil {
2336 if e1 != 0 {
2337 err = errnoErr(e1)
2338 } else {
2339 err = syscall.EINVAL
2340 }
2341 }
2342 return
2343 }
2344
2345 func GetServByName(name string, proto string) (s *Servent, err error) {
2346 var _p0 *byte
2347 _p0, err = syscall.BytePtrFromString(name)
2348 if err != nil {
2349 return
2350 }
2351 var _p1 *byte
2352 _p1, err = syscall.BytePtrFromString(proto)
2353 if err != nil {
2354 return
2355 }
2356 return _GetServByName(_p0, _p1)
2357 }
2358
2359 func _GetServByName(name *byte, proto *byte) (s *Servent, err error) {
2360 r0, _, e1 := syscall.Syscall(procgetservbyname.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(proto)), 0)
2361 s = (*Servent)(unsafe.Pointer(r0))
2362 if s == nil {
2363 if e1 != 0 {
2364 err = errnoErr(e1)
2365 } else {
2366 err = syscall.EINVAL
2367 }
2368 }
2369 return
2370 }
2371
2372 func Ntohs(netshort uint16) (u uint16) {
2373 r0, _, _ := syscall.Syscall(procntohs.Addr(), 1, uintptr(netshort), 0, 0)
2374 u = uint16(r0)
2375 return
2376 }
2377
2378 func GetProtoByName(name string) (p *Protoent, err error) {
2379 var _p0 *byte
2380 _p0, err = syscall.BytePtrFromString(name)
2381 if err != nil {
2382 return
2383 }
2384 return _GetProtoByName(_p0)
2385 }
2386
2387 func _GetProtoByName(name *byte) (p *Protoent, err error) {
2388 r0, _, e1 := syscall.Syscall(procgetprotobyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
2389 p = (*Protoent)(unsafe.Pointer(r0))
2390 if p == nil {
2391 if e1 != 0 {
2392 err = errnoErr(e1)
2393 } else {
2394 err = syscall.EINVAL
2395 }
2396 }
2397 return
2398 }
2399
2400 func DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {
2401 var _p0 *uint16
2402 _p0, status = syscall.UTF16PtrFromString(name)
2403 if status != nil {
2404 return
2405 }
2406 return _DnsQuery(_p0, qtype, options, extra, qrs, pr)
2407 }
2408
2409 func _DnsQuery(name *uint16, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {
2410 r0, _, _ := syscall.Syscall6(procDnsQuery_W.Addr(), 6, uintptr(unsafe.Pointer(name)), uintptr(qtype), uintptr(options), uintptr(unsafe.Pointer(extra)), uintptr(unsafe.Pointer(qrs)), uintptr(unsafe.Pointer(pr)))
2411 if r0 != 0 {
2412 status = syscall.Errno(r0)
2413 }
2414 return
2415 }
2416
2417 func DnsRecordListFree(rl *DNSRecord, freetype uint32) {
2418 syscall.Syscall(procDnsRecordListFree.Addr(), 2, uintptr(unsafe.Pointer(rl)), uintptr(freetype), 0)
2419 return
2420 }
2421
2422 func DnsNameCompare(name1 *uint16, name2 *uint16) (same bool) {
2423 r0, _, _ := syscall.Syscall(procDnsNameCompare_W.Addr(), 2, uintptr(unsafe.Pointer(name1)), uintptr(unsafe.Pointer(name2)), 0)
2424 same = r0 != 0
2425 return
2426 }
2427
2428 func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) {
2429 r0, _, _ := syscall.Syscall6(procGetAddrInfoW.Addr(), 4, uintptr(unsafe.Pointer(nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)), uintptr(unsafe.Pointer(result)), 0, 0)
2430 if r0 != 0 {
2431 sockerr = syscall.Errno(r0)
2432 }
2433 return
2434 }
2435
2436 func FreeAddrInfoW(addrinfo *AddrinfoW) {
2437 syscall.Syscall(procFreeAddrInfoW.Addr(), 1, uintptr(unsafe.Pointer(addrinfo)), 0, 0)
2438 return
2439 }
2440
2441 func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
2442 r0, _, _ := syscall.Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIfRow)), 0, 0)
2443 if r0 != 0 {
2444 errcode = syscall.Errno(r0)
2445 }
2446 return
2447 }
2448
2449 func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {
2450 r0, _, _ := syscall.Syscall(procGetAdaptersInfo.Addr(), 2, uintptr(unsafe.Pointer(ai)), uintptr(unsafe.Pointer(ol)), 0)
2451 if r0 != 0 {
2452 errcode = syscall.Errno(r0)
2453 }
2454 return
2455 }
2456
2457 func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) {
2458 r1, _, e1 := syscall.Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(handle), uintptr(flags), 0)
2459 if r1 == 0 {
2460 if e1 != 0 {
2461 err = errnoErr(e1)
2462 } else {
2463 err = syscall.EINVAL
2464 }
2465 }
2466 return
2467 }
2468
2469 func WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) {
2470 r0, _, e1 := syscall.Syscall(procWSAEnumProtocolsW.Addr(), 3, uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength)))
2471 n = int32(r0)
2472 if n == -1 {
2473 if e1 != 0 {
2474 err = errnoErr(e1)
2475 } else {
2476 err = syscall.EINVAL
2477 }
2478 }
2479 return
2480 }
2481
2482 func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
2483 r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0)
2484 if r0 != 0 {
2485 errcode = syscall.Errno(r0)
2486 }
2487 return
2488 }
2489
2490 func GetACP() (acp uint32) {
2491 r0, _, _ := syscall.Syscall(procGetACP.Addr(), 0, 0, 0, 0)
2492 acp = uint32(r0)
2493 return
2494 }
2495
2496 func MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) {
2497 r0, _, e1 := syscall.Syscall6(procMultiByteToWideChar.Addr(), 6, uintptr(codePage), uintptr(dwFlags), uintptr(unsafe.Pointer(str)), uintptr(nstr), uintptr(unsafe.Pointer(wchar)), uintptr(nwchar))
2498 nwrite = int32(r0)
2499 if nwrite == 0 {
2500 if e1 != 0 {
2501 err = errnoErr(e1)
2502 } else {
2503 err = syscall.EINVAL
2504 }
2505 }
2506 return
2507 }
2508
2509 func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) {
2510 r1, _, e1 := syscall.Syscall6(procTranslateNameW.Addr(), 5, uintptr(unsafe.Pointer(accName)), uintptr(accNameFormat), uintptr(desiredNameFormat), uintptr(unsafe.Pointer(translatedName)), uintptr(unsafe.Pointer(nSize)), 0)
2511 if r1&0xff == 0 {
2512 if e1 != 0 {
2513 err = errnoErr(e1)
2514 } else {
2515 err = syscall.EINVAL
2516 }
2517 }
2518 return
2519 }
2520
2521 func GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) {
2522 r1, _, e1 := syscall.Syscall(procGetUserNameExW.Addr(), 3, uintptr(nameFormat), uintptr(unsafe.Pointer(nameBuffre)), uintptr(unsafe.Pointer(nSize)))
2523 if r1&0xff == 0 {
2524 if e1 != 0 {
2525 err = errnoErr(e1)
2526 } else {
2527 err = syscall.EINVAL
2528 }
2529 }
2530 return
2531 }
2532
2533 func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) {
2534 r0, _, _ := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0)
2535 if r0 != 0 {
2536 neterr = syscall.Errno(r0)
2537 }
2538 return
2539 }
2540
2541 func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) {
2542 r0, _, _ := syscall.Syscall(procNetGetJoinInformation.Addr(), 3, uintptr(unsafe.Pointer(server)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bufType)))
2543 if r0 != 0 {
2544 neterr = syscall.Errno(r0)
2545 }
2546 return
2547 }
2548
2549 func NetApiBufferFree(buf *byte) (neterr error) {
2550 r0, _, _ := syscall.Syscall(procNetApiBufferFree.Addr(), 1, uintptr(unsafe.Pointer(buf)), 0, 0)
2551 if r0 != 0 {
2552 neterr = syscall.Errno(r0)
2553 }
2554 return
2555 }
2556
2557 func LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
2558 r1, _, e1 := syscall.Syscall9(procLookupAccountSidW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
2559 if r1 == 0 {
2560 if e1 != 0 {
2561 err = errnoErr(e1)
2562 } else {
2563 err = syscall.EINVAL
2564 }
2565 }
2566 return
2567 }
2568
2569 func LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
2570 r1, _, e1 := syscall.Syscall9(procLookupAccountNameW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
2571 if r1 == 0 {
2572 if e1 != 0 {
2573 err = errnoErr(e1)
2574 } else {
2575 err = syscall.EINVAL
2576 }
2577 }
2578 return
2579 }
2580
2581 func ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) {
2582 r1, _, e1 := syscall.Syscall(procConvertSidToStringSidW.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(stringSid)), 0)
2583 if r1 == 0 {
2584 if e1 != 0 {
2585 err = errnoErr(e1)
2586 } else {
2587 err = syscall.EINVAL
2588 }
2589 }
2590 return
2591 }
2592
2593 func ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) {
2594 r1, _, e1 := syscall.Syscall(procConvertStringSidToSidW.Addr(), 2, uintptr(unsafe.Pointer(stringSid)), uintptr(unsafe.Pointer(sid)), 0)
2595 if r1 == 0 {
2596 if e1 != 0 {
2597 err = errnoErr(e1)
2598 } else {
2599 err = syscall.EINVAL
2600 }
2601 }
2602 return
2603 }
2604
2605 func GetLengthSid(sid *SID) (len uint32) {
2606 r0, _, _ := syscall.Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
2607 len = uint32(r0)
2608 return
2609 }
2610
2611 func CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) {
2612 r1, _, e1 := syscall.Syscall(procCopySid.Addr(), 3, uintptr(destSidLen), uintptr(unsafe.Pointer(destSid)), uintptr(unsafe.Pointer(srcSid)))
2613 if r1 == 0 {
2614 if e1 != 0 {
2615 err = errnoErr(e1)
2616 } else {
2617 err = syscall.EINVAL
2618 }
2619 }
2620 return
2621 }
2622
2623 func AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) {
2624 r1, _, e1 := syscall.Syscall12(procAllocateAndInitializeSid.Addr(), 11, uintptr(unsafe.Pointer(identAuth)), uintptr(subAuth), uintptr(subAuth0), uintptr(subAuth1), uintptr(subAuth2), uintptr(subAuth3), uintptr(subAuth4), uintptr(subAuth5), uintptr(subAuth6), uintptr(subAuth7), uintptr(unsafe.Pointer(sid)), 0)
2625 if r1 == 0 {
2626 if e1 != 0 {
2627 err = errnoErr(e1)
2628 } else {
2629 err = syscall.EINVAL
2630 }
2631 }
2632 return
2633 }
2634
2635 func FreeSid(sid *SID) (err error) {
2636 r1, _, e1 := syscall.Syscall(procFreeSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
2637 if r1 != 0 {
2638 if e1 != 0 {
2639 err = errnoErr(e1)
2640 } else {
2641 err = syscall.EINVAL
2642 }
2643 }
2644 return
2645 }
2646
2647 func EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) {
2648 r0, _, _ := syscall.Syscall(procEqualSid.Addr(), 2, uintptr(unsafe.Pointer(sid1)), uintptr(unsafe.Pointer(sid2)), 0)
2649 isEqual = r0 != 0
2650 return
2651 }
2652
2653 func checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) {
2654 r1, _, e1 := syscall.Syscall(procCheckTokenMembership.Addr(), 3, uintptr(tokenHandle), uintptr(unsafe.Pointer(sidToCheck)), uintptr(unsafe.Pointer(isMember)))
2655 if r1 == 0 {
2656 if e1 != 0 {
2657 err = errnoErr(e1)
2658 } else {
2659 err = syscall.EINVAL
2660 }
2661 }
2662 return
2663 }
2664
2665 func OpenProcessToken(h Handle, access uint32, token *Token) (err error) {
2666 r1, _, e1 := syscall.Syscall(procOpenProcessToken.Addr(), 3, uintptr(h), uintptr(access), uintptr(unsafe.Pointer(token)))
2667 if r1 == 0 {
2668 if e1 != 0 {
2669 err = errnoErr(e1)
2670 } else {
2671 err = syscall.EINVAL
2672 }
2673 }
2674 return
2675 }
2676
2677 func GetTokenInformation(t Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) {
2678 r1, _, e1 := syscall.Syscall6(procGetTokenInformation.Addr(), 5, uintptr(t), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen)), 0)
2679 if r1 == 0 {
2680 if e1 != 0 {
2681 err = errnoErr(e1)
2682 } else {
2683 err = syscall.EINVAL
2684 }
2685 }
2686 return
2687 }
2688
2689 func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {
2690 r1, _, e1 := syscall.Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen)))
2691 if r1 == 0 {
2692 if e1 != 0 {
2693 err = errnoErr(e1)
2694 } else {
2695 err = syscall.EINVAL
2696 }
2697 }
2698 return
2699 }