Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
6555cfc6
Commit
6555cfc6
authored
Dec 09, 2010
by
Mikio Hara
Committed by
Russ Cox
Dec 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syscall: add network interface constants for linux/386, linux/amd64
R=rsc CC=golang-dev
https://golang.org/cl/3266042
parent
f9805770
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
3 deletions
+80
-3
mkerrors.sh
src/pkg/syscall/mkerrors.sh
+8
-3
zerrors_linux_386.go
src/pkg/syscall/zerrors_linux_386.go
+36
-0
zerrors_linux_amd64.go
src/pkg/syscall/zerrors_linux_amd64.go
+36
-0
No files found.
src/pkg/syscall/mkerrors.sh
View file @
6555cfc6
...
...
@@ -29,6 +29,8 @@ includes_Linux='
#include <sys/stat.h>
#include <linux/ptrace.h>
#include <linux/wait.h>
#include <linux/if_tun.h>
#include <net/if.h>
#include <netpacket/packet.h>
'
...
...
@@ -83,24 +85,27 @@ done
echo
"
${
!indirect
}
$includes
"
|
$GCC
-x
c -
-E
-dM
$ccflags
|
awk
'
$1 != "#define" || $2 ~ /\(/ {next}
$2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next} # 386 registers
$2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next}
$2 ~ /^(SCM_SRCRT)$/ {next}
$2 ~ /^(MAP_FAILED)$/ {next}
$2 !~ /^ETH_/ &&
$2 ~ /^E[A-Z0-9_]+$/ ||
$2 ~ /^SIG[^_]/ ||
$2 ~ /^IN_/ ||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|EVFILT|EV|SHUT|PROT|MAP|PACKET|MSG|SCM)_/ ||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|EVFILT|EV|SHUT|PROT|MAP|PACKET|MSG|SCM
|IFF
)_/ ||
$2 == "SOMAXCONN" ||
$2 == "NAME_MAX" ||
$2 == "IFNAMSIZ" ||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
$2 ~ /^(O|F|FD|NAME|S|PTRACE)_/ ||
$2 ~ /^SIO/ ||
$2 ~ /^W[A-Z0-9]+$/ {printf("\t$%s = %s,\n", $2, $2)}
$2 ~ /^__WCOREFLAG$/ {next}
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t$%s = %s,\n", substr($2,3), $2)}
{next}
'
|
sort
...
...
src/pkg/syscall/zerrors_linux_386.go
View file @
6555cfc6
...
...
@@ -232,6 +232,29 @@ const (
F_ULOCK
=
0
F_UNLCK
=
0x2
F_WRLCK
=
0x1
IFF_ALLMULTI
=
0x200
IFF_AUTOMEDIA
=
0x4000
IFF_BROADCAST
=
0x2
IFF_DEBUG
=
0x4
IFF_DYNAMIC
=
0x8000
IFF_LOOPBACK
=
0x8
IFF_MASTER
=
0x400
IFF_MULTICAST
=
0x1000
IFF_NOARP
=
0x80
IFF_NOTRAILERS
=
0x20
IFF_NO_PI
=
0x1000
IFF_ONE_QUEUE
=
0x2000
IFF_POINTOPOINT
=
0x10
IFF_PORTSEL
=
0x2000
IFF_PROMISC
=
0x100
IFF_RUNNING
=
0x40
IFF_SLAVE
=
0x800
IFF_TAP
=
0x2
IFF_TUN
=
0x1
IFF_TUN_EXCL
=
0x8000
IFF_UP
=
0x1
IFF_VNET_HDR
=
0x4000
IFNAMSIZ
=
0x10
IN_ACCESS
=
0x1
IN_ALL_EVENTS
=
0xfff
IN_ATTRIB
=
0x4
...
...
@@ -723,6 +746,19 @@ const (
TCP_QUICKACK
=
0xc
TCP_SYNCNT
=
0x7
TCP_WINDOW_CLAMP
=
0xa
TUNGETFEATURES
=
0x800454cf
TUNGETIFF
=
0x800454d2
TUNGETSNDBUF
=
0x800454d3
TUNSETDEBUG
=
0x400454c9
TUNSETGROUP
=
0x400454ce
TUNSETIFF
=
0x400454ca
TUNSETLINK
=
0x400454cd
TUNSETNOCSUM
=
0x400454c8
TUNSETOFFLOAD
=
0x400454d0
TUNSETOWNER
=
0x400454cc
TUNSETPERSIST
=
0x400454cb
TUNSETSNDBUF
=
0x400454d4
TUNSETTXFILTER
=
0x400454d1
WALL
=
0x40000000
WCLONE
=
0x80000000
WCONTINUED
=
0x8
...
...
src/pkg/syscall/zerrors_linux_amd64.go
View file @
6555cfc6
...
...
@@ -232,6 +232,29 @@ const (
F_ULOCK
=
0
F_UNLCK
=
0x2
F_WRLCK
=
0x1
IFF_ALLMULTI
=
0x200
IFF_AUTOMEDIA
=
0x4000
IFF_BROADCAST
=
0x2
IFF_DEBUG
=
0x4
IFF_DYNAMIC
=
0x8000
IFF_LOOPBACK
=
0x8
IFF_MASTER
=
0x400
IFF_MULTICAST
=
0x1000
IFF_NOARP
=
0x80
IFF_NOTRAILERS
=
0x20
IFF_NO_PI
=
0x1000
IFF_ONE_QUEUE
=
0x2000
IFF_POINTOPOINT
=
0x10
IFF_PORTSEL
=
0x2000
IFF_PROMISC
=
0x100
IFF_RUNNING
=
0x40
IFF_SLAVE
=
0x800
IFF_TAP
=
0x2
IFF_TUN
=
0x1
IFF_TUN_EXCL
=
0x8000
IFF_UP
=
0x1
IFF_VNET_HDR
=
0x4000
IFNAMSIZ
=
0x10
IN_ACCESS
=
0x1
IN_ALL_EVENTS
=
0xfff
IN_ATTRIB
=
0x4
...
...
@@ -724,6 +747,19 @@ const (
TCP_QUICKACK
=
0xc
TCP_SYNCNT
=
0x7
TCP_WINDOW_CLAMP
=
0xa
TUNGETFEATURES
=
0x800454cf
TUNGETIFF
=
0x800454d2
TUNGETSNDBUF
=
0x800454d3
TUNSETDEBUG
=
0x400454c9
TUNSETGROUP
=
0x400454ce
TUNSETIFF
=
0x400454ca
TUNSETLINK
=
0x400454cd
TUNSETNOCSUM
=
0x400454c8
TUNSETOFFLOAD
=
0x400454d0
TUNSETOWNER
=
0x400454cc
TUNSETPERSIST
=
0x400454cb
TUNSETSNDBUF
=
0x400454d4
TUNSETTXFILTER
=
0x400454d1
WALL
=
0x40000000
WCLONE
=
0x80000000
WCONTINUED
=
0x8
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment