-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/socket: add platform-dependent boilerplate files
Change-Id: I951a1abc36083401d183d61c58a8186b5ce41c6c Reviewed-on: https://go-review.googlesource.com/38211 Reviewed-by: Ian Lance Taylor <[email protected]>
- Loading branch information
Showing
42 changed files
with
1,980 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2017 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
// +build ignore | ||
|
||
// +godefs map struct_in_addr [4]byte /* in_addr */ | ||
// +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
|
||
package socket | ||
|
||
/* | ||
#include <sys/socket.h> | ||
#include <netinet/in.h> | ||
*/ | ||
import "C" | ||
|
||
const ( | ||
sysAF_UNSPEC = C.AF_UNSPEC | ||
sysAF_INET = C.AF_INET | ||
sysAF_INET6 = C.AF_INET6 | ||
|
||
sysSOCK_RAW = C.SOCK_RAW | ||
) | ||
|
||
type iovec C.struct_iovec | ||
|
||
type msghdr C.struct_msghdr | ||
|
||
type cmsghdr C.struct_cmsghdr | ||
|
||
type sockaddrInet C.struct_sockaddr_in | ||
|
||
type sockaddrInet6 C.struct_sockaddr_in6 | ||
|
||
const ( | ||
sizeofIovec = C.sizeof_struct_iovec | ||
sizeofMsghdr = C.sizeof_struct_msghdr | ||
sizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
|
||
sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2017 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
// +build ignore | ||
|
||
// +godefs map struct_in_addr [4]byte /* in_addr */ | ||
// +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
|
||
package socket | ||
|
||
/* | ||
#include <sys/socket.h> | ||
#include <netinet/in.h> | ||
*/ | ||
import "C" | ||
|
||
const ( | ||
sysAF_UNSPEC = C.AF_UNSPEC | ||
sysAF_INET = C.AF_INET | ||
sysAF_INET6 = C.AF_INET6 | ||
|
||
sysSOCK_RAW = C.SOCK_RAW | ||
) | ||
|
||
type iovec C.struct_iovec | ||
|
||
type msghdr C.struct_msghdr | ||
|
||
type cmsghdr C.struct_cmsghdr | ||
|
||
type sockaddrInet C.struct_sockaddr_in | ||
|
||
type sockaddrInet6 C.struct_sockaddr_in6 | ||
|
||
const ( | ||
sizeofIovec = C.sizeof_struct_iovec | ||
sizeofMsghdr = C.sizeof_struct_msghdr | ||
sizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
|
||
sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2017 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
// +build ignore | ||
|
||
// +godefs map struct_in_addr [4]byte /* in_addr */ | ||
// +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
|
||
package socket | ||
|
||
/* | ||
#include <sys/socket.h> | ||
#include <netinet/in.h> | ||
*/ | ||
import "C" | ||
|
||
const ( | ||
sysAF_UNSPEC = C.AF_UNSPEC | ||
sysAF_INET = C.AF_INET | ||
sysAF_INET6 = C.AF_INET6 | ||
|
||
sysSOCK_RAW = C.SOCK_RAW | ||
) | ||
|
||
type iovec C.struct_iovec | ||
|
||
type msghdr C.struct_msghdr | ||
|
||
type cmsghdr C.struct_cmsghdr | ||
|
||
type sockaddrInet C.struct_sockaddr_in | ||
|
||
type sockaddrInet6 C.struct_sockaddr_in6 | ||
|
||
const ( | ||
sizeofIovec = C.sizeof_struct_iovec | ||
sizeofMsghdr = C.sizeof_struct_msghdr | ||
sizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
|
||
sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright 2017 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
// +build ignore | ||
|
||
// +godefs map struct_in_addr [4]byte /* in_addr */ | ||
// +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
|
||
package socket | ||
|
||
/* | ||
#include <linux/in.h> | ||
#include <linux/in6.h> | ||
#define _GNU_SOURCE | ||
#include <sys/socket.h> | ||
*/ | ||
import "C" | ||
|
||
const ( | ||
sysAF_UNSPEC = C.AF_UNSPEC | ||
sysAF_INET = C.AF_INET | ||
sysAF_INET6 = C.AF_INET6 | ||
|
||
sysSOCK_RAW = C.SOCK_RAW | ||
) | ||
|
||
type iovec C.struct_iovec | ||
|
||
type msghdr C.struct_msghdr | ||
|
||
type mmsghdr C.struct_mmsghdr | ||
|
||
type cmsghdr C.struct_cmsghdr | ||
|
||
type sockaddrInet C.struct_sockaddr_in | ||
|
||
type sockaddrInet6 C.struct_sockaddr_in6 | ||
|
||
const ( | ||
sizeofIovec = C.sizeof_struct_iovec | ||
sizeofMsghdr = C.sizeof_struct_msghdr | ||
sizeofMmsghdr = C.sizeof_struct_mmsghdr | ||
sizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
|
||
sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright 2017 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
// +build ignore | ||
|
||
// +godefs map struct_in_addr [4]byte /* in_addr */ | ||
// +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
|
||
package socket | ||
|
||
/* | ||
#include <sys/socket.h> | ||
#include <netinet/in.h> | ||
*/ | ||
import "C" | ||
|
||
const ( | ||
sysAF_UNSPEC = C.AF_UNSPEC | ||
sysAF_INET = C.AF_INET | ||
sysAF_INET6 = C.AF_INET6 | ||
|
||
sysSOCK_RAW = C.SOCK_RAW | ||
) | ||
|
||
type iovec C.struct_iovec | ||
|
||
type msghdr C.struct_msghdr | ||
|
||
type mmsghdr C.struct_mmsghdr | ||
|
||
type cmsghdr C.struct_cmsghdr | ||
|
||
type sockaddrInet C.struct_sockaddr_in | ||
|
||
type sockaddrInet6 C.struct_sockaddr_in6 | ||
|
||
const ( | ||
sizeofIovec = C.sizeof_struct_iovec | ||
sizeofMsghdr = C.sizeof_struct_msghdr | ||
sizeofMmsghdr = C.sizeof_struct_mmsghdr | ||
sizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
|
||
sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2017 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
// +build ignore | ||
|
||
// +godefs map struct_in_addr [4]byte /* in_addr */ | ||
// +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
|
||
package socket | ||
|
||
/* | ||
#include <sys/socket.h> | ||
#include <netinet/in.h> | ||
*/ | ||
import "C" | ||
|
||
const ( | ||
sysAF_UNSPEC = C.AF_UNSPEC | ||
sysAF_INET = C.AF_INET | ||
sysAF_INET6 = C.AF_INET6 | ||
|
||
sysSOCK_RAW = C.SOCK_RAW | ||
) | ||
|
||
type iovec C.struct_iovec | ||
|
||
type msghdr C.struct_msghdr | ||
|
||
type cmsghdr C.struct_cmsghdr | ||
|
||
type sockaddrInet C.struct_sockaddr_in | ||
|
||
type sockaddrInet6 C.struct_sockaddr_in6 | ||
|
||
const ( | ||
sizeofIovec = C.sizeof_struct_iovec | ||
sizeofMsghdr = C.sizeof_struct_msghdr | ||
sizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
|
||
sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2017 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
// +build ignore | ||
|
||
// +godefs map struct_in_addr [4]byte /* in_addr */ | ||
// +godefs map struct_in6_addr [16]byte /* in6_addr */ | ||
|
||
package socket | ||
|
||
/* | ||
#include <sys/socket.h> | ||
#include <netinet/in.h> | ||
*/ | ||
import "C" | ||
|
||
const ( | ||
sysAF_UNSPEC = C.AF_UNSPEC | ||
sysAF_INET = C.AF_INET | ||
sysAF_INET6 = C.AF_INET6 | ||
|
||
sysSOCK_RAW = C.SOCK_RAW | ||
) | ||
|
||
type iovec C.struct_iovec | ||
|
||
type msghdr C.struct_msghdr | ||
|
||
type cmsghdr C.struct_cmsghdr | ||
|
||
type sockaddrInet C.struct_sockaddr_in | ||
|
||
type sockaddrInet6 C.struct_sockaddr_in6 | ||
|
||
const ( | ||
sizeofIovec = C.sizeof_struct_iovec | ||
sizeofMsghdr = C.sizeof_struct_msghdr | ||
sizeofCmsghdr = C.sizeof_struct_cmsghdr | ||
|
||
sizeofSockaddrInet = C.sizeof_struct_sockaddr_in | ||
sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package socket | ||
|
||
const ( | ||
sysRECVMMSG = 0x12b | ||
sysSENDMMSG = 0x133 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package socket | ||
|
||
const ( | ||
sysRECVMMSG = 0x16d | ||
sysSENDMMSG = 0x176 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package socket | ||
|
||
const ( | ||
sysRECVMMSG = 0xf3 | ||
sysSENDMMSG = 0x10d | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package socket | ||
|
||
const ( | ||
sysRECVMMSG = 0x10ef | ||
sysSENDMMSG = 0x10f7 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package socket | ||
|
||
const ( | ||
sysRECVMMSG = 0x14ae | ||
sysSENDMMSG = 0x14b6 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package socket | ||
|
||
const ( | ||
sysRECVMMSG = 0x14ae | ||
sysSENDMMSG = 0x14b6 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package socket | ||
|
||
const ( | ||
sysRECVMMSG = 0x10ef | ||
sysSENDMMSG = 0x10f7 | ||
) |
Oops, something went wrong.