1
2
3
4
5 package oshi.jna.platform.unix;
6
7 import com.sun.jna.Native;
8 import com.sun.jna.Pointer;
9 import com.sun.jna.Structure;
10 import com.sun.jna.Structure.FieldOrder;
11
12
13
14
15
16 public interface OpenBsdLibc extends CLibrary {
17 OpenBsdLibc INSTANCE = Native.load(null, OpenBsdLibc.class);
18
19 int CTL_KERN = 1;
20 int CTL_VM = 1;
21 int CTL_HW = 6;
22 int CTL_MACHDEP = 7;
23 int CTL_VFS = 10;
24
25 int KERN_OSTYPE = 1;
26 int KERN_OSRELEASE = 2;
27 int KERN_OSREV = 3;
28 int KERN_VERSION = 4;
29 int KERN_MAXVNODES = 5;
30 int KERN_MAXPROC = 6;
31 int KERN_ARGMAX = 8;
32 int KERN_CPTIME = 40;
33 int KERN_CPTIME2 = 71;
34
35 int VM_UVMEXP = 4;
36
37 int HW_MACHINE = 1;
38 int HW_MODEL = 2;
39 int HW_PAGESIZE = 7;
40 int HW_CPUSPEED = 12;
41 int HW_NCPUFOUND = 21;
42 int HW_SMT = 24;
43 int HW_NCPUONLINE = 25;
44
45 int VFS_GENERIC = 0;
46 int VFS_BCACHESTAT = 3;
47
48
49
50
51 int CPUSTATES = 5;
52 int CP_USER = 0;
53 int CP_NICE = 1;
54 int CP_SYS = 2;
55 int CP_INTR = 3;
56 int CP_IDLE = 4;
57
58 int UINT64_SIZE = Native.getNativeSize(long.class);
59 int INT_SIZE = Native.getNativeSize(int.class);
60
61
62
63
64 @FieldOrder({ "numbufs", "numbufpages", "numdirtypages", "numcleanpages", "pendingwrites", "pendingreads",
65 "numwrites", "numreads", "cachehits", "busymapped", "dmapages", "highpages", "delwribufs", "kvaslots",
66 "kvaslots_avail", "highflips", "highflops", "dmaflips" })
67 class Bcachestats extends Structure {
68 public long numbufs;
69 public long numbufpages;
70 public long numdirtypages;
71 public long numcleanpages;
72 public long pendingwrites;
73 public long pendingreads;
74 public long numwrites;
75 public long numreads;
76 public long cachehits;
77 public long busymapped;
78 public long dmapages;
79 public long highpages;
80 public long delwribufs;
81 public long kvaslots;
82 public long kvaslots_avail;
83 public long highflips;
84 public long highflops;
85 public long dmaflips;
86
87 public Bcachestats(Pointer p) {
88 super(p);
89 read();
90 }
91 }
92
93
94
95
96 @FieldOrder({ "tv_sec", "tv_usec" })
97 class Timeval extends Structure {
98 public long tv_sec;
99 public long tv_usec;
100 }
101
102
103
104
105
106
107
108 int getthrid();
109 }