-
Notifications
You must be signed in to change notification settings - Fork 24
/
defs_freebsd.go
58 lines (41 loc) · 1.24 KB
/
defs_freebsd.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
55
56
57
58
// 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 <net/if.h>
#include <net/pfvar.h>
#include <netinet/in.h>
#include <netpfil/pf/pf.h>
*/
import "C"
const (
sysFIONREAD = C.FIONREAD
sysFIONWRITE = C.FIONWRITE
sysFIONSPACE = C.FIONSPACE
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
)