1
2
3
4 package route
5
6 const (
7 sysAF_UNSPEC = 0x0
8 sysAF_INET = 0x2
9 sysAF_ROUTE = 0x11
10 sysAF_LINK = 0x12
11 sysAF_INET6 = 0x18
12
13 sysSOCK_RAW = 0x3
14
15 sysNET_RT_DUMP = 0x1
16 sysNET_RT_FLAGS = 0x2
17 sysNET_RT_IFLIST = 0x3
18 sysNET_RT_STATS = 0x4
19 sysNET_RT_TABLE = 0x5
20 sysNET_RT_IFNAMES = 0x6
21 sysNET_RT_MAXID = 0x7
22 )
23
24 const (
25 sysCTL_MAXNAME = 0xc
26
27 sysCTL_UNSPEC = 0x0
28 sysCTL_KERN = 0x1
29 sysCTL_VM = 0x2
30 sysCTL_FS = 0x3
31 sysCTL_NET = 0x4
32 sysCTL_DEBUG = 0x5
33 sysCTL_HW = 0x6
34 sysCTL_MACHDEP = 0x7
35 sysCTL_DDB = 0x9
36 sysCTL_VFS = 0xa
37 sysCTL_MAXID = 0xb
38 )
39
40 const (
41 sysRTM_VERSION = 0x5
42
43 sysRTM_ADD = 0x1
44 sysRTM_DELETE = 0x2
45 sysRTM_CHANGE = 0x3
46 sysRTM_GET = 0x4
47 sysRTM_LOSING = 0x5
48 sysRTM_REDIRECT = 0x6
49 sysRTM_MISS = 0x7
50 sysRTM_LOCK = 0x8
51 sysRTM_RESOLVE = 0xb
52 sysRTM_NEWADDR = 0xc
53 sysRTM_DELADDR = 0xd
54 sysRTM_IFINFO = 0xe
55 sysRTM_IFANNOUNCE = 0xf
56 sysRTM_DESYNC = 0x10
57 sysRTM_INVALIDATE = 0x11
58 sysRTM_BFD = 0x12
59 sysRTM_PROPOSAL = 0x13
60
61 sysRTA_DST = 0x1
62 sysRTA_GATEWAY = 0x2
63 sysRTA_NETMASK = 0x4
64 sysRTA_GENMASK = 0x8
65 sysRTA_IFP = 0x10
66 sysRTA_IFA = 0x20
67 sysRTA_AUTHOR = 0x40
68 sysRTA_BRD = 0x80
69 sysRTA_SRC = 0x100
70 sysRTA_SRCMASK = 0x200
71 sysRTA_LABEL = 0x400
72 sysRTA_BFD = 0x800
73 sysRTA_DNS = 0x1000
74 sysRTA_STATIC = 0x2000
75 sysRTA_SEARCH = 0x4000
76
77 sysRTAX_DST = 0x0
78 sysRTAX_GATEWAY = 0x1
79 sysRTAX_NETMASK = 0x2
80 sysRTAX_GENMASK = 0x3
81 sysRTAX_IFP = 0x4
82 sysRTAX_IFA = 0x5
83 sysRTAX_AUTHOR = 0x6
84 sysRTAX_BRD = 0x7
85 sysRTAX_SRC = 0x8
86 sysRTAX_SRCMASK = 0x9
87 sysRTAX_LABEL = 0xa
88 sysRTAX_BFD = 0xb
89 sysRTAX_DNS = 0xc
90 sysRTAX_STATIC = 0xd
91 sysRTAX_SEARCH = 0xe
92 sysRTAX_MAX = 0xf
93 )
94
95 const (
96 sizeofRtMsghdr = 0x60
97
98 sizeofSockaddrStorage = 0x100
99 sizeofSockaddrInet = 0x10
100 sizeofSockaddrInet6 = 0x1c
101 )
102
View as plain text