-
Notifications
You must be signed in to change notification settings - Fork 24
/
defs_openbsd.go
54 lines (38 loc) · 1.16 KB
/
defs_openbsd.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright 2014 Mikio Hara. 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
package tcp
// +godefs map struct_in_addr [4]byte /* in_addr */
// +godefs map struct_in6_addr [16]byte /* in6_addr */
// +godefs map struct_pf_addr [16]byte /* pf_addr */
/*
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <net/if.h>
#include <net/pfvar.h>
*/
import "C"
const (
sysFIONREAD = C.FIONREAD
sysAF_INET = C.AF_INET
sysAF_INET6 = C.AF_INET6
sysPF_INOUT = C.PF_INOUT
sysPF_IN = C.PF_IN
sysPF_OUT = C.PF_OUT
sysPF_FWD = C.PF_FWD
sysDIOCNATLOOK = C.DIOCNATLOOK
)
type sockaddrStorage C.struct_sockaddr_storage
type sockaddr C.struct_sockaddr
type sockaddrInet C.struct_sockaddr_in
type sockaddrInet6 C.struct_sockaddr_in6
type pfiocNatlook C.struct_pfioc_natlook
const (
sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
sizeofSockaddr = C.sizeof_struct_sockaddr
sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
sizeofPfiocNatlook = C.sizeof_struct_pfioc_natlook
)