linux_bindings_riscv64.rs 70 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189
  1. /* automatically generated by rust-bindgen 0.65.1 */
  2. #[repr(C)]
  3. #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
  4. pub struct __BindgenBitfieldUnit<Storage> {
  5. storage: Storage,
  6. }
  7. impl<Storage> __BindgenBitfieldUnit<Storage> {
  8. #[inline]
  9. pub const fn new(storage: Storage) -> Self {
  10. Self { storage }
  11. }
  12. }
  13. impl<Storage> __BindgenBitfieldUnit<Storage>
  14. where
  15. Storage: AsRef<[u8]> + AsMut<[u8]>,
  16. {
  17. #[inline]
  18. pub fn get_bit(&self, index: usize) -> bool {
  19. debug_assert!(index / 8 < self.storage.as_ref().len());
  20. let byte_index = index / 8;
  21. let byte = self.storage.as_ref()[byte_index];
  22. let bit_index = if cfg!(target_endian = "big") {
  23. 7 - (index % 8)
  24. } else {
  25. index % 8
  26. };
  27. let mask = 1 << bit_index;
  28. byte & mask == mask
  29. }
  30. #[inline]
  31. pub fn set_bit(&mut self, index: usize, val: bool) {
  32. debug_assert!(index / 8 < self.storage.as_ref().len());
  33. let byte_index = index / 8;
  34. let byte = &mut self.storage.as_mut()[byte_index];
  35. let bit_index = if cfg!(target_endian = "big") {
  36. 7 - (index % 8)
  37. } else {
  38. index % 8
  39. };
  40. let mask = 1 << bit_index;
  41. if val {
  42. *byte |= mask;
  43. } else {
  44. *byte &= !mask;
  45. }
  46. }
  47. #[inline]
  48. pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
  49. debug_assert!(bit_width <= 64);
  50. debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
  51. debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
  52. let mut val = 0;
  53. for i in 0..(bit_width as usize) {
  54. if self.get_bit(i + bit_offset) {
  55. let index = if cfg!(target_endian = "big") {
  56. bit_width as usize - 1 - i
  57. } else {
  58. i
  59. };
  60. val |= 1 << index;
  61. }
  62. }
  63. val
  64. }
  65. #[inline]
  66. pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
  67. debug_assert!(bit_width <= 64);
  68. debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
  69. debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
  70. for i in 0..(bit_width as usize) {
  71. let mask = 1 << i;
  72. let val_bit_is_set = val & mask == mask;
  73. let index = if cfg!(target_endian = "big") {
  74. bit_width as usize - 1 - i
  75. } else {
  76. i
  77. };
  78. self.set_bit(index + bit_offset, val_bit_is_set);
  79. }
  80. }
  81. }
  82. #[repr(C)]
  83. #[derive(Default)]
  84. pub struct __IncompleteArrayField<T>(::core::marker::PhantomData<T>, [T; 0]);
  85. impl<T> __IncompleteArrayField<T> {
  86. #[inline]
  87. pub const fn new() -> Self {
  88. __IncompleteArrayField(::core::marker::PhantomData, [])
  89. }
  90. #[inline]
  91. pub fn as_ptr(&self) -> *const T {
  92. self as *const _ as *const T
  93. }
  94. #[inline]
  95. pub fn as_mut_ptr(&mut self) -> *mut T {
  96. self as *mut _ as *mut T
  97. }
  98. #[inline]
  99. pub unsafe fn as_slice(&self, len: usize) -> &[T] {
  100. ::core::slice::from_raw_parts(self.as_ptr(), len)
  101. }
  102. #[inline]
  103. pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
  104. ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
  105. }
  106. }
  107. impl<T> ::core::fmt::Debug for __IncompleteArrayField<T> {
  108. fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
  109. fmt.write_str("__IncompleteArrayField")
  110. }
  111. }
  112. pub const BPF_LD: u32 = 0;
  113. pub const BPF_LDX: u32 = 1;
  114. pub const BPF_ST: u32 = 2;
  115. pub const BPF_STX: u32 = 3;
  116. pub const BPF_ALU: u32 = 4;
  117. pub const BPF_JMP: u32 = 5;
  118. pub const BPF_W: u32 = 0;
  119. pub const BPF_H: u32 = 8;
  120. pub const BPF_B: u32 = 16;
  121. pub const BPF_K: u32 = 0;
  122. pub const BPF_ALU64: u32 = 7;
  123. pub const BPF_DW: u32 = 24;
  124. pub const BPF_CALL: u32 = 128;
  125. pub const BPF_F_ALLOW_OVERRIDE: u32 = 1;
  126. pub const BPF_F_ALLOW_MULTI: u32 = 2;
  127. pub const BPF_F_REPLACE: u32 = 4;
  128. pub const BPF_F_STRICT_ALIGNMENT: u32 = 1;
  129. pub const BPF_F_ANY_ALIGNMENT: u32 = 2;
  130. pub const BPF_F_TEST_RND_HI32: u32 = 4;
  131. pub const BPF_F_TEST_STATE_FREQ: u32 = 8;
  132. pub const BPF_F_SLEEPABLE: u32 = 16;
  133. pub const BPF_F_XDP_HAS_FRAGS: u32 = 32;
  134. pub const BPF_F_XDP_DEV_BOUND_ONLY: u32 = 64;
  135. pub const BPF_F_KPROBE_MULTI_RETURN: u32 = 1;
  136. pub const BPF_PSEUDO_MAP_FD: u32 = 1;
  137. pub const BPF_PSEUDO_MAP_IDX: u32 = 5;
  138. pub const BPF_PSEUDO_MAP_VALUE: u32 = 2;
  139. pub const BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6;
  140. pub const BPF_PSEUDO_BTF_ID: u32 = 3;
  141. pub const BPF_PSEUDO_FUNC: u32 = 4;
  142. pub const BPF_PSEUDO_CALL: u32 = 1;
  143. pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2;
  144. pub const BPF_F_QUERY_EFFECTIVE: u32 = 1;
  145. pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1;
  146. pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2;
  147. pub const BTF_INT_SIGNED: u32 = 1;
  148. pub const BTF_INT_CHAR: u32 = 2;
  149. pub const BTF_INT_BOOL: u32 = 4;
  150. pub const PERF_MAX_STACK_DEPTH: u32 = 127;
  151. pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8;
  152. pub const PERF_FLAG_FD_NO_GROUP: u32 = 1;
  153. pub const PERF_FLAG_FD_OUTPUT: u32 = 2;
  154. pub const PERF_FLAG_PID_CGROUP: u32 = 4;
  155. pub const PERF_FLAG_FD_CLOEXEC: u32 = 8;
  156. pub const NLMSG_ALIGNTO: u32 = 4;
  157. pub const XDP_FLAGS_UPDATE_IF_NOEXIST: u32 = 1;
  158. pub const XDP_FLAGS_SKB_MODE: u32 = 2;
  159. pub const XDP_FLAGS_DRV_MODE: u32 = 4;
  160. pub const XDP_FLAGS_HW_MODE: u32 = 8;
  161. pub const XDP_FLAGS_REPLACE: u32 = 16;
  162. pub const XDP_FLAGS_MODES: u32 = 14;
  163. pub const XDP_FLAGS_MASK: u32 = 31;
  164. pub const SO_ATTACH_BPF: u32 = 50;
  165. pub const SO_DETACH_BPF: u32 = 27;
  166. pub const TC_H_MAJ_MASK: u32 = 4294901760;
  167. pub const TC_H_MIN_MASK: u32 = 65535;
  168. pub const TC_H_UNSPEC: u32 = 0;
  169. pub const TC_H_ROOT: u32 = 4294967295;
  170. pub const TC_H_INGRESS: u32 = 4294967281;
  171. pub const TC_H_CLSACT: u32 = 4294967281;
  172. pub const TC_H_MIN_PRIORITY: u32 = 65504;
  173. pub const TC_H_MIN_INGRESS: u32 = 65522;
  174. pub const TC_H_MIN_EGRESS: u32 = 65523;
  175. pub const TCA_BPF_FLAG_ACT_DIRECT: u32 = 1;
  176. pub type __u8 = ::core::ffi::c_uchar;
  177. pub type __s16 = ::core::ffi::c_short;
  178. pub type __u16 = ::core::ffi::c_ushort;
  179. pub type __s32 = ::core::ffi::c_int;
  180. pub type __u32 = ::core::ffi::c_uint;
  181. pub type __s64 = ::core::ffi::c_longlong;
  182. pub type __u64 = ::core::ffi::c_ulonglong;
  183. #[repr(C)]
  184. #[derive(Debug, Copy, Clone)]
  185. pub struct bpf_insn {
  186. pub code: __u8,
  187. pub _bitfield_align_1: [u8; 0],
  188. pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
  189. pub off: __s16,
  190. pub imm: __s32,
  191. }
  192. impl bpf_insn {
  193. #[inline]
  194. pub fn dst_reg(&self) -> __u8 {
  195. unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) }
  196. }
  197. #[inline]
  198. pub fn set_dst_reg(&mut self, val: __u8) {
  199. unsafe {
  200. let val: u8 = ::core::mem::transmute(val);
  201. self._bitfield_1.set(0usize, 4u8, val as u64)
  202. }
  203. }
  204. #[inline]
  205. pub fn src_reg(&self) -> __u8 {
  206. unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) }
  207. }
  208. #[inline]
  209. pub fn set_src_reg(&mut self, val: __u8) {
  210. unsafe {
  211. let val: u8 = ::core::mem::transmute(val);
  212. self._bitfield_1.set(4usize, 4u8, val as u64)
  213. }
  214. }
  215. #[inline]
  216. pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> {
  217. let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
  218. __bindgen_bitfield_unit.set(0usize, 4u8, {
  219. let dst_reg: u8 = unsafe { ::core::mem::transmute(dst_reg) };
  220. dst_reg as u64
  221. });
  222. __bindgen_bitfield_unit.set(4usize, 4u8, {
  223. let src_reg: u8 = unsafe { ::core::mem::transmute(src_reg) };
  224. src_reg as u64
  225. });
  226. __bindgen_bitfield_unit
  227. }
  228. }
  229. #[repr(C)]
  230. #[derive(Debug)]
  231. pub struct bpf_lpm_trie_key {
  232. pub prefixlen: __u32,
  233. pub data: __IncompleteArrayField<__u8>,
  234. }
  235. impl bpf_cmd {
  236. pub const BPF_PROG_RUN: bpf_cmd = bpf_cmd::BPF_PROG_TEST_RUN;
  237. }
  238. #[repr(u32)]
  239. #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
  240. pub enum bpf_cmd {
  241. BPF_MAP_CREATE = 0,
  242. BPF_MAP_LOOKUP_ELEM = 1,
  243. BPF_MAP_UPDATE_ELEM = 2,
  244. BPF_MAP_DELETE_ELEM = 3,
  245. BPF_MAP_GET_NEXT_KEY = 4,
  246. BPF_PROG_LOAD = 5,
  247. BPF_OBJ_PIN = 6,
  248. BPF_OBJ_GET = 7,
  249. BPF_PROG_ATTACH = 8,
  250. BPF_PROG_DETACH = 9,
  251. BPF_PROG_TEST_RUN = 10,
  252. BPF_PROG_GET_NEXT_ID = 11,
  253. BPF_MAP_GET_NEXT_ID = 12,
  254. BPF_PROG_GET_FD_BY_ID = 13,
  255. BPF_MAP_GET_FD_BY_ID = 14,
  256. BPF_OBJ_GET_INFO_BY_FD = 15,
  257. BPF_PROG_QUERY = 16,
  258. BPF_RAW_TRACEPOINT_OPEN = 17,
  259. BPF_BTF_LOAD = 18,
  260. BPF_BTF_GET_FD_BY_ID = 19,
  261. BPF_TASK_FD_QUERY = 20,
  262. BPF_MAP_LOOKUP_AND_DELETE_ELEM = 21,
  263. BPF_MAP_FREEZE = 22,
  264. BPF_BTF_GET_NEXT_ID = 23,
  265. BPF_MAP_LOOKUP_BATCH = 24,
  266. BPF_MAP_LOOKUP_AND_DELETE_BATCH = 25,
  267. BPF_MAP_UPDATE_BATCH = 26,
  268. BPF_MAP_DELETE_BATCH = 27,
  269. BPF_LINK_CREATE = 28,
  270. BPF_LINK_UPDATE = 29,
  271. BPF_LINK_GET_FD_BY_ID = 30,
  272. BPF_LINK_GET_NEXT_ID = 31,
  273. BPF_ENABLE_STATS = 32,
  274. BPF_ITER_CREATE = 33,
  275. BPF_LINK_DETACH = 34,
  276. BPF_PROG_BIND_MAP = 35,
  277. }
  278. impl bpf_map_type {
  279. pub const BPF_MAP_TYPE_CGROUP_STORAGE: bpf_map_type =
  280. bpf_map_type::BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED;
  281. }
  282. #[repr(u32)]
  283. #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
  284. pub enum bpf_map_type {
  285. BPF_MAP_TYPE_UNSPEC = 0,
  286. BPF_MAP_TYPE_HASH = 1,
  287. BPF_MAP_TYPE_ARRAY = 2,
  288. BPF_MAP_TYPE_PROG_ARRAY = 3,
  289. BPF_MAP_TYPE_PERF_EVENT_ARRAY = 4,
  290. BPF_MAP_TYPE_PERCPU_HASH = 5,
  291. BPF_MAP_TYPE_PERCPU_ARRAY = 6,
  292. BPF_MAP_TYPE_STACK_TRACE = 7,
  293. BPF_MAP_TYPE_CGROUP_ARRAY = 8,
  294. BPF_MAP_TYPE_LRU_HASH = 9,
  295. BPF_MAP_TYPE_LRU_PERCPU_HASH = 10,
  296. BPF_MAP_TYPE_LPM_TRIE = 11,
  297. BPF_MAP_TYPE_ARRAY_OF_MAPS = 12,
  298. BPF_MAP_TYPE_HASH_OF_MAPS = 13,
  299. BPF_MAP_TYPE_DEVMAP = 14,
  300. BPF_MAP_TYPE_SOCKMAP = 15,
  301. BPF_MAP_TYPE_CPUMAP = 16,
  302. BPF_MAP_TYPE_XSKMAP = 17,
  303. BPF_MAP_TYPE_SOCKHASH = 18,
  304. BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED = 19,
  305. BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 20,
  306. BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 21,
  307. BPF_MAP_TYPE_QUEUE = 22,
  308. BPF_MAP_TYPE_STACK = 23,
  309. BPF_MAP_TYPE_SK_STORAGE = 24,
  310. BPF_MAP_TYPE_DEVMAP_HASH = 25,
  311. BPF_MAP_TYPE_STRUCT_OPS = 26,
  312. BPF_MAP_TYPE_RINGBUF = 27,
  313. BPF_MAP_TYPE_INODE_STORAGE = 28,
  314. BPF_MAP_TYPE_TASK_STORAGE = 29,
  315. BPF_MAP_TYPE_BLOOM_FILTER = 30,
  316. BPF_MAP_TYPE_USER_RINGBUF = 31,
  317. BPF_MAP_TYPE_CGRP_STORAGE = 32,
  318. }
  319. #[repr(u32)]
  320. #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
  321. pub enum bpf_prog_type {
  322. BPF_PROG_TYPE_UNSPEC = 0,
  323. BPF_PROG_TYPE_SOCKET_FILTER = 1,
  324. BPF_PROG_TYPE_KPROBE = 2,
  325. BPF_PROG_TYPE_SCHED_CLS = 3,
  326. BPF_PROG_TYPE_SCHED_ACT = 4,
  327. BPF_PROG_TYPE_TRACEPOINT = 5,
  328. BPF_PROG_TYPE_XDP = 6,
  329. BPF_PROG_TYPE_PERF_EVENT = 7,
  330. BPF_PROG_TYPE_CGROUP_SKB = 8,
  331. BPF_PROG_TYPE_CGROUP_SOCK = 9,
  332. BPF_PROG_TYPE_LWT_IN = 10,
  333. BPF_PROG_TYPE_LWT_OUT = 11,
  334. BPF_PROG_TYPE_LWT_XMIT = 12,
  335. BPF_PROG_TYPE_SOCK_OPS = 13,
  336. BPF_PROG_TYPE_SK_SKB = 14,
  337. BPF_PROG_TYPE_CGROUP_DEVICE = 15,
  338. BPF_PROG_TYPE_SK_MSG = 16,
  339. BPF_PROG_TYPE_RAW_TRACEPOINT = 17,
  340. BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 18,
  341. BPF_PROG_TYPE_LWT_SEG6LOCAL = 19,
  342. BPF_PROG_TYPE_LIRC_MODE2 = 20,
  343. BPF_PROG_TYPE_SK_REUSEPORT = 21,
  344. BPF_PROG_TYPE_FLOW_DISSECTOR = 22,
  345. BPF_PROG_TYPE_CGROUP_SYSCTL = 23,
  346. BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 24,
  347. BPF_PROG_TYPE_CGROUP_SOCKOPT = 25,
  348. BPF_PROG_TYPE_TRACING = 26,
  349. BPF_PROG_TYPE_STRUCT_OPS = 27,
  350. BPF_PROG_TYPE_EXT = 28,
  351. BPF_PROG_TYPE_LSM = 29,
  352. BPF_PROG_TYPE_SK_LOOKUP = 30,
  353. BPF_PROG_TYPE_SYSCALL = 31,
  354. BPF_PROG_TYPE_NETFILTER = 32,
  355. }
  356. #[repr(u32)]
  357. #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
  358. pub enum bpf_attach_type {
  359. BPF_CGROUP_INET_INGRESS = 0,
  360. BPF_CGROUP_INET_EGRESS = 1,
  361. BPF_CGROUP_INET_SOCK_CREATE = 2,
  362. BPF_CGROUP_SOCK_OPS = 3,
  363. BPF_SK_SKB_STREAM_PARSER = 4,
  364. BPF_SK_SKB_STREAM_VERDICT = 5,
  365. BPF_CGROUP_DEVICE = 6,
  366. BPF_SK_MSG_VERDICT = 7,
  367. BPF_CGROUP_INET4_BIND = 8,
  368. BPF_CGROUP_INET6_BIND = 9,
  369. BPF_CGROUP_INET4_CONNECT = 10,
  370. BPF_CGROUP_INET6_CONNECT = 11,
  371. BPF_CGROUP_INET4_POST_BIND = 12,
  372. BPF_CGROUP_INET6_POST_BIND = 13,
  373. BPF_CGROUP_UDP4_SENDMSG = 14,
  374. BPF_CGROUP_UDP6_SENDMSG = 15,
  375. BPF_LIRC_MODE2 = 16,
  376. BPF_FLOW_DISSECTOR = 17,
  377. BPF_CGROUP_SYSCTL = 18,
  378. BPF_CGROUP_UDP4_RECVMSG = 19,
  379. BPF_CGROUP_UDP6_RECVMSG = 20,
  380. BPF_CGROUP_GETSOCKOPT = 21,
  381. BPF_CGROUP_SETSOCKOPT = 22,
  382. BPF_TRACE_RAW_TP = 23,
  383. BPF_TRACE_FENTRY = 24,
  384. BPF_TRACE_FEXIT = 25,
  385. BPF_MODIFY_RETURN = 26,
  386. BPF_LSM_MAC = 27,
  387. BPF_TRACE_ITER = 28,
  388. BPF_CGROUP_INET4_GETPEERNAME = 29,
  389. BPF_CGROUP_INET6_GETPEERNAME = 30,
  390. BPF_CGROUP_INET4_GETSOCKNAME = 31,
  391. BPF_CGROUP_INET6_GETSOCKNAME = 32,
  392. BPF_XDP_DEVMAP = 33,
  393. BPF_CGROUP_INET_SOCK_RELEASE = 34,
  394. BPF_XDP_CPUMAP = 35,
  395. BPF_SK_LOOKUP = 36,
  396. BPF_XDP = 37,
  397. BPF_SK_SKB_VERDICT = 38,
  398. BPF_SK_REUSEPORT_SELECT = 39,
  399. BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40,
  400. BPF_PERF_EVENT = 41,
  401. BPF_TRACE_KPROBE_MULTI = 42,
  402. BPF_LSM_CGROUP = 43,
  403. BPF_STRUCT_OPS = 44,
  404. __MAX_BPF_ATTACH_TYPE = 45,
  405. }
  406. #[repr(u32)]
  407. #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
  408. pub enum bpf_link_type {
  409. BPF_LINK_TYPE_UNSPEC = 0,
  410. BPF_LINK_TYPE_RAW_TRACEPOINT = 1,
  411. BPF_LINK_TYPE_TRACING = 2,
  412. BPF_LINK_TYPE_CGROUP = 3,
  413. BPF_LINK_TYPE_ITER = 4,
  414. BPF_LINK_TYPE_NETNS = 5,
  415. BPF_LINK_TYPE_XDP = 6,
  416. BPF_LINK_TYPE_PERF_EVENT = 7,
  417. BPF_LINK_TYPE_KPROBE_MULTI = 8,
  418. BPF_LINK_TYPE_STRUCT_OPS = 9,
  419. BPF_LINK_TYPE_NETFILTER = 10,
  420. MAX_BPF_LINK_TYPE = 11,
  421. }
  422. pub const BPF_ANY: _bindgen_ty_2 = 0;
  423. pub const BPF_NOEXIST: _bindgen_ty_2 = 1;
  424. pub const BPF_EXIST: _bindgen_ty_2 = 2;
  425. pub const BPF_F_LOCK: _bindgen_ty_2 = 4;
  426. pub type _bindgen_ty_2 = ::core::ffi::c_uint;
  427. pub const BPF_F_NO_PREALLOC: _bindgen_ty_3 = 1;
  428. pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_3 = 2;
  429. pub const BPF_F_NUMA_NODE: _bindgen_ty_3 = 4;
  430. pub const BPF_F_RDONLY: _bindgen_ty_3 = 8;
  431. pub const BPF_F_WRONLY: _bindgen_ty_3 = 16;
  432. pub const BPF_F_STACK_BUILD_ID: _bindgen_ty_3 = 32;
  433. pub const BPF_F_ZERO_SEED: _bindgen_ty_3 = 64;
  434. pub const BPF_F_RDONLY_PROG: _bindgen_ty_3 = 128;
  435. pub const BPF_F_WRONLY_PROG: _bindgen_ty_3 = 256;
  436. pub const BPF_F_CLONE: _bindgen_ty_3 = 512;
  437. pub const BPF_F_MMAPABLE: _bindgen_ty_3 = 1024;
  438. pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_3 = 2048;
  439. pub const BPF_F_INNER_MAP: _bindgen_ty_3 = 4096;
  440. pub const BPF_F_LINK: _bindgen_ty_3 = 8192;
  441. pub const BPF_F_PATH_FD: _bindgen_ty_3 = 16384;
  442. pub type _bindgen_ty_3 = ::core::ffi::c_uint;
  443. #[repr(C)]
  444. #[derive(Copy, Clone)]
  445. pub union bpf_attr {
  446. pub __bindgen_anon_1: bpf_attr__bindgen_ty_1,
  447. pub __bindgen_anon_2: bpf_attr__bindgen_ty_2,
  448. pub batch: bpf_attr__bindgen_ty_3,
  449. pub __bindgen_anon_3: bpf_attr__bindgen_ty_4,
  450. pub __bindgen_anon_4: bpf_attr__bindgen_ty_5,
  451. pub __bindgen_anon_5: bpf_attr__bindgen_ty_6,
  452. pub test: bpf_attr__bindgen_ty_7,
  453. pub __bindgen_anon_6: bpf_attr__bindgen_ty_8,
  454. pub info: bpf_attr__bindgen_ty_9,
  455. pub query: bpf_attr__bindgen_ty_10,
  456. pub raw_tracepoint: bpf_attr__bindgen_ty_11,
  457. pub __bindgen_anon_7: bpf_attr__bindgen_ty_12,
  458. pub task_fd_query: bpf_attr__bindgen_ty_13,
  459. pub link_create: bpf_attr__bindgen_ty_14,
  460. pub link_update: bpf_attr__bindgen_ty_15,
  461. pub link_detach: bpf_attr__bindgen_ty_16,
  462. pub enable_stats: bpf_attr__bindgen_ty_17,
  463. pub iter_create: bpf_attr__bindgen_ty_18,
  464. pub prog_bind_map: bpf_attr__bindgen_ty_19,
  465. }
  466. #[repr(C)]
  467. #[derive(Debug, Copy, Clone)]
  468. pub struct bpf_attr__bindgen_ty_1 {
  469. pub map_type: __u32,
  470. pub key_size: __u32,
  471. pub value_size: __u32,
  472. pub max_entries: __u32,
  473. pub map_flags: __u32,
  474. pub inner_map_fd: __u32,
  475. pub numa_node: __u32,
  476. pub map_name: [::core::ffi::c_char; 16usize],
  477. pub map_ifindex: __u32,
  478. pub btf_fd: __u32,
  479. pub btf_key_type_id: __u32,
  480. pub btf_value_type_id: __u32,
  481. pub btf_vmlinux_value_type_id: __u32,
  482. pub map_extra: __u64,
  483. }
  484. #[repr(C)]
  485. #[derive(Copy, Clone)]
  486. pub struct bpf_attr__bindgen_ty_2 {
  487. pub map_fd: __u32,
  488. pub key: __u64,
  489. pub __bindgen_anon_1: bpf_attr__bindgen_ty_2__bindgen_ty_1,
  490. pub flags: __u64,
  491. }
  492. #[repr(C)]
  493. #[derive(Copy, Clone)]
  494. pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 {
  495. pub value: __u64,
  496. pub next_key: __u64,
  497. }
  498. #[repr(C)]
  499. #[derive(Debug, Copy, Clone)]
  500. pub struct bpf_attr__bindgen_ty_3 {
  501. pub in_batch: __u64,
  502. pub out_batch: __u64,
  503. pub keys: __u64,
  504. pub values: __u64,
  505. pub count: __u32,
  506. pub map_fd: __u32,
  507. pub elem_flags: __u64,
  508. pub flags: __u64,
  509. }
  510. #[repr(C)]
  511. #[derive(Copy, Clone)]
  512. pub struct bpf_attr__bindgen_ty_4 {
  513. pub prog_type: __u32,
  514. pub insn_cnt: __u32,
  515. pub insns: __u64,
  516. pub license: __u64,
  517. pub log_level: __u32,
  518. pub log_size: __u32,
  519. pub log_buf: __u64,
  520. pub kern_version: __u32,
  521. pub prog_flags: __u32,
  522. pub prog_name: [::core::ffi::c_char; 16usize],
  523. pub prog_ifindex: __u32,
  524. pub expected_attach_type: __u32,
  525. pub prog_btf_fd: __u32,
  526. pub func_info_rec_size: __u32,
  527. pub func_info: __u64,
  528. pub func_info_cnt: __u32,
  529. pub line_info_rec_size: __u32,
  530. pub line_info: __u64,
  531. pub line_info_cnt: __u32,
  532. pub attach_btf_id: __u32,
  533. pub __bindgen_anon_1: bpf_attr__bindgen_ty_4__bindgen_ty_1,
  534. pub core_relo_cnt: __u32,
  535. pub fd_array: __u64,
  536. pub core_relos: __u64,
  537. pub core_relo_rec_size: __u32,
  538. pub log_true_size: __u32,
  539. }
  540. #[repr(C)]
  541. #[derive(Copy, Clone)]
  542. pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 {
  543. pub attach_prog_fd: __u32,
  544. pub attach_btf_obj_fd: __u32,
  545. }
  546. #[repr(C)]
  547. #[derive(Debug, Copy, Clone)]
  548. pub struct bpf_attr__bindgen_ty_5 {
  549. pub pathname: __u64,
  550. pub bpf_fd: __u32,
  551. pub file_flags: __u32,
  552. pub path_fd: __s32,
  553. }
  554. #[repr(C)]
  555. #[derive(Debug, Copy, Clone)]
  556. pub struct bpf_attr__bindgen_ty_6 {
  557. pub target_fd: __u32,
  558. pub attach_bpf_fd: __u32,
  559. pub attach_type: __u32,
  560. pub attach_flags: __u32,
  561. pub replace_bpf_fd: __u32,
  562. }
  563. #[repr(C)]
  564. #[derive(Debug, Copy, Clone)]
  565. pub struct bpf_attr__bindgen_ty_7 {
  566. pub prog_fd: __u32,
  567. pub retval: __u32,
  568. pub data_size_in: __u32,
  569. pub data_size_out: __u32,
  570. pub data_in: __u64,
  571. pub data_out: __u64,
  572. pub repeat: __u32,
  573. pub duration: __u32,
  574. pub ctx_size_in: __u32,
  575. pub ctx_size_out: __u32,
  576. pub ctx_in: __u64,
  577. pub ctx_out: __u64,
  578. pub flags: __u32,
  579. pub cpu: __u32,
  580. pub batch_size: __u32,
  581. }
  582. #[repr(C)]
  583. #[derive(Copy, Clone)]
  584. pub struct bpf_attr__bindgen_ty_8 {
  585. pub __bindgen_anon_1: bpf_attr__bindgen_ty_8__bindgen_ty_1,
  586. pub next_id: __u32,
  587. pub open_flags: __u32,
  588. }
  589. #[repr(C)]
  590. #[derive(Copy, Clone)]
  591. pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 {
  592. pub start_id: __u32,
  593. pub prog_id: __u32,
  594. pub map_id: __u32,
  595. pub btf_id: __u32,
  596. pub link_id: __u32,
  597. }
  598. #[repr(C)]
  599. #[derive(Debug, Copy, Clone)]
  600. pub struct bpf_attr__bindgen_ty_9 {
  601. pub bpf_fd: __u32,
  602. pub info_len: __u32,
  603. pub info: __u64,
  604. }
  605. #[repr(C)]
  606. #[derive(Debug, Copy, Clone)]
  607. pub struct bpf_attr__bindgen_ty_10 {
  608. pub target_fd: __u32,
  609. pub attach_type: __u32,
  610. pub query_flags: __u32,
  611. pub attach_flags: __u32,
  612. pub prog_ids: __u64,
  613. pub prog_cnt: __u32,
  614. pub prog_attach_flags: __u64,
  615. }
  616. #[repr(C)]
  617. #[derive(Debug, Copy, Clone)]
  618. pub struct bpf_attr__bindgen_ty_11 {
  619. pub name: __u64,
  620. pub prog_fd: __u32,
  621. }
  622. #[repr(C)]
  623. #[derive(Debug, Copy, Clone)]
  624. pub struct bpf_attr__bindgen_ty_12 {
  625. pub btf: __u64,
  626. pub btf_log_buf: __u64,
  627. pub btf_size: __u32,
  628. pub btf_log_size: __u32,
  629. pub btf_log_level: __u32,
  630. pub btf_log_true_size: __u32,
  631. }
  632. #[repr(C)]
  633. #[derive(Debug, Copy, Clone)]
  634. pub struct bpf_attr__bindgen_ty_13 {
  635. pub pid: __u32,
  636. pub fd: __u32,
  637. pub flags: __u32,
  638. pub buf_len: __u32,
  639. pub buf: __u64,
  640. pub prog_id: __u32,
  641. pub fd_type: __u32,
  642. pub probe_offset: __u64,
  643. pub probe_addr: __u64,
  644. }
  645. #[repr(C)]
  646. #[derive(Copy, Clone)]
  647. pub struct bpf_attr__bindgen_ty_14 {
  648. pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1,
  649. pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2,
  650. pub attach_type: __u32,
  651. pub flags: __u32,
  652. pub __bindgen_anon_3: bpf_attr__bindgen_ty_14__bindgen_ty_3,
  653. }
  654. #[repr(C)]
  655. #[derive(Copy, Clone)]
  656. pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 {
  657. pub prog_fd: __u32,
  658. pub map_fd: __u32,
  659. }
  660. #[repr(C)]
  661. #[derive(Copy, Clone)]
  662. pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 {
  663. pub target_fd: __u32,
  664. pub target_ifindex: __u32,
  665. }
  666. #[repr(C)]
  667. #[derive(Copy, Clone)]
  668. pub union bpf_attr__bindgen_ty_14__bindgen_ty_3 {
  669. pub target_btf_id: __u32,
  670. pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1,
  671. pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2,
  672. pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3,
  673. pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4,
  674. pub netfilter: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5,
  675. }
  676. #[repr(C)]
  677. #[derive(Debug, Copy, Clone)]
  678. pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 {
  679. pub iter_info: __u64,
  680. pub iter_info_len: __u32,
  681. }
  682. #[repr(C)]
  683. #[derive(Debug, Copy, Clone)]
  684. pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 {
  685. pub bpf_cookie: __u64,
  686. }
  687. #[repr(C)]
  688. #[derive(Debug, Copy, Clone)]
  689. pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 {
  690. pub flags: __u32,
  691. pub cnt: __u32,
  692. pub syms: __u64,
  693. pub addrs: __u64,
  694. pub cookies: __u64,
  695. }
  696. #[repr(C)]
  697. #[derive(Debug, Copy, Clone)]
  698. pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 {
  699. pub target_btf_id: __u32,
  700. pub cookie: __u64,
  701. }
  702. #[repr(C)]
  703. #[derive(Debug, Copy, Clone)]
  704. pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 {
  705. pub pf: __u32,
  706. pub hooknum: __u32,
  707. pub priority: __s32,
  708. pub flags: __u32,
  709. }
  710. #[repr(C)]
  711. #[derive(Copy, Clone)]
  712. pub struct bpf_attr__bindgen_ty_15 {
  713. pub link_fd: __u32,
  714. pub __bindgen_anon_1: bpf_attr__bindgen_ty_15__bindgen_ty_1,
  715. pub flags: __u32,
  716. pub __bindgen_anon_2: bpf_attr__bindgen_ty_15__bindgen_ty_2,
  717. }
  718. #[repr(C)]
  719. #[derive(Copy, Clone)]
  720. pub union bpf_attr__bindgen_ty_15__bindgen_ty_1 {
  721. pub new_prog_fd: __u32,
  722. pub new_map_fd: __u32,
  723. }
  724. #[repr(C)]
  725. #[derive(Copy, Clone)]
  726. pub union bpf_attr__bindgen_ty_15__bindgen_ty_2 {
  727. pub old_prog_fd: __u32,
  728. pub old_map_fd: __u32,
  729. }
  730. #[repr(C)]
  731. #[derive(Debug, Copy, Clone)]
  732. pub struct bpf_attr__bindgen_ty_16 {
  733. pub link_fd: __u32,
  734. }
  735. #[repr(C)]
  736. #[derive(Debug, Copy, Clone)]
  737. pub struct bpf_attr__bindgen_ty_17 {
  738. pub type_: __u32,
  739. }
  740. #[repr(C)]
  741. #[derive(Debug, Copy, Clone)]
  742. pub struct bpf_attr__bindgen_ty_18 {
  743. pub link_fd: __u32,
  744. pub flags: __u32,
  745. }
  746. #[repr(C)]
  747. #[derive(Debug, Copy, Clone)]
  748. pub struct bpf_attr__bindgen_ty_19 {
  749. pub prog_fd: __u32,
  750. pub map_fd: __u32,
  751. pub flags: __u32,
  752. }
  753. pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_4 = 1;
  754. pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_4 = 2;
  755. pub type _bindgen_ty_4 = ::core::ffi::c_uint;
  756. pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_5 = 15;
  757. pub type _bindgen_ty_5 = ::core::ffi::c_uint;
  758. pub const BPF_F_PSEUDO_HDR: _bindgen_ty_6 = 16;
  759. pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_6 = 32;
  760. pub const BPF_F_MARK_ENFORCE: _bindgen_ty_6 = 64;
  761. pub type _bindgen_ty_6 = ::core::ffi::c_uint;
  762. pub const BPF_F_INGRESS: _bindgen_ty_7 = 1;
  763. pub type _bindgen_ty_7 = ::core::ffi::c_uint;
  764. pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_8 = 1;
  765. pub type _bindgen_ty_8 = ::core::ffi::c_uint;
  766. pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_9 = 255;
  767. pub const BPF_F_USER_STACK: _bindgen_ty_9 = 256;
  768. pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_9 = 512;
  769. pub const BPF_F_REUSE_STACKID: _bindgen_ty_9 = 1024;
  770. pub const BPF_F_USER_BUILD_ID: _bindgen_ty_9 = 2048;
  771. pub type _bindgen_ty_9 = ::core::ffi::c_uint;
  772. pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_10 = 2;
  773. pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_10 = 4;
  774. pub const BPF_F_SEQ_NUMBER: _bindgen_ty_10 = 8;
  775. pub const BPF_F_NO_TUNNEL_KEY: _bindgen_ty_10 = 16;
  776. pub type _bindgen_ty_10 = ::core::ffi::c_uint;
  777. pub const BPF_F_TUNINFO_FLAGS: _bindgen_ty_11 = 16;
  778. pub type _bindgen_ty_11 = ::core::ffi::c_uint;
  779. pub const BPF_F_INDEX_MASK: _bindgen_ty_12 = 4294967295;
  780. pub const BPF_F_CURRENT_CPU: _bindgen_ty_12 = 4294967295;
  781. pub const BPF_F_CTXLEN_MASK: _bindgen_ty_12 = 4503595332403200;
  782. pub type _bindgen_ty_12 = ::core::ffi::c_ulong;
  783. pub const BPF_F_CURRENT_NETNS: _bindgen_ty_13 = -1;
  784. pub type _bindgen_ty_13 = ::core::ffi::c_int;
  785. pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_15 = 1;
  786. pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_15 = 2;
  787. pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_15 = 4;
  788. pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: _bindgen_ty_15 = 8;
  789. pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: _bindgen_ty_15 = 16;
  790. pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_15 = 32;
  791. pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_15 = 64;
  792. pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_15 = 128;
  793. pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_15 = 256;
  794. pub type _bindgen_ty_15 = ::core::ffi::c_uint;
  795. pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_17 = 1;
  796. pub type _bindgen_ty_17 = ::core::ffi::c_uint;
  797. pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_19 = 1;
  798. pub type _bindgen_ty_19 = ::core::ffi::c_uint;
  799. pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_22 = 2147483648;
  800. pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_22 = 1073741824;
  801. pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_22 = 8;
  802. pub type _bindgen_ty_22 = ::core::ffi::c_uint;
  803. pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_24 = 1;
  804. pub type _bindgen_ty_24 = ::core::ffi::c_uint;
  805. pub const BPF_F_BROADCAST: _bindgen_ty_25 = 8;
  806. pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_25 = 16;
  807. pub type _bindgen_ty_25 = ::core::ffi::c_uint;
  808. #[repr(C)]
  809. #[derive(Copy, Clone)]
  810. pub struct bpf_devmap_val {
  811. pub ifindex: __u32,
  812. pub bpf_prog: bpf_devmap_val__bindgen_ty_1,
  813. }
  814. #[repr(C)]
  815. #[derive(Copy, Clone)]
  816. pub union bpf_devmap_val__bindgen_ty_1 {
  817. pub fd: ::core::ffi::c_int,
  818. pub id: __u32,
  819. }
  820. #[repr(C)]
  821. #[derive(Copy, Clone)]
  822. pub struct bpf_cpumap_val {
  823. pub qsize: __u32,
  824. pub bpf_prog: bpf_cpumap_val__bindgen_ty_1,
  825. }
  826. #[repr(C)]
  827. #[derive(Copy, Clone)]
  828. pub union bpf_cpumap_val__bindgen_ty_1 {
  829. pub fd: ::core::ffi::c_int,
  830. pub id: __u32,
  831. }
  832. #[repr(C)]
  833. #[derive(Debug, Copy, Clone)]
  834. pub struct bpf_prog_info {
  835. pub type_: __u32,
  836. pub id: __u32,
  837. pub tag: [__u8; 8usize],
  838. pub jited_prog_len: __u32,
  839. pub xlated_prog_len: __u32,
  840. pub jited_prog_insns: __u64,
  841. pub xlated_prog_insns: __u64,
  842. pub load_time: __u64,
  843. pub created_by_uid: __u32,
  844. pub nr_map_ids: __u32,
  845. pub map_ids: __u64,
  846. pub name: [::core::ffi::c_char; 16usize],
  847. pub ifindex: __u32,
  848. pub _bitfield_align_1: [u8; 0],
  849. pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
  850. pub netns_dev: __u64,
  851. pub netns_ino: __u64,
  852. pub nr_jited_ksyms: __u32,
  853. pub nr_jited_func_lens: __u32,
  854. pub jited_ksyms: __u64,
  855. pub jited_func_lens: __u64,
  856. pub btf_id: __u32,
  857. pub func_info_rec_size: __u32,
  858. pub func_info: __u64,
  859. pub nr_func_info: __u32,
  860. pub nr_line_info: __u32,
  861. pub line_info: __u64,
  862. pub jited_line_info: __u64,
  863. pub nr_jited_line_info: __u32,
  864. pub line_info_rec_size: __u32,
  865. pub jited_line_info_rec_size: __u32,
  866. pub nr_prog_tags: __u32,
  867. pub prog_tags: __u64,
  868. pub run_time_ns: __u64,
  869. pub run_cnt: __u64,
  870. pub recursion_misses: __u64,
  871. pub verified_insns: __u32,
  872. pub attach_btf_obj_id: __u32,
  873. pub attach_btf_id: __u32,
  874. }
  875. impl bpf_prog_info {
  876. #[inline]
  877. pub fn gpl_compatible(&self) -> __u32 {
  878. unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
  879. }
  880. #[inline]
  881. pub fn set_gpl_compatible(&mut self, val: __u32) {
  882. unsafe {
  883. let val: u32 = ::core::mem::transmute(val);
  884. self._bitfield_1.set(0usize, 1u8, val as u64)
  885. }
  886. }
  887. #[inline]
  888. pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> {
  889. let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
  890. __bindgen_bitfield_unit.set(0usize, 1u8, {
  891. let gpl_compatible: u32 = unsafe { ::core::mem::transmute(gpl_compatible) };
  892. gpl_compatible as u64
  893. });
  894. __bindgen_bitfield_unit
  895. }
  896. }
  897. #[repr(C)]
  898. #[derive(Debug, Copy, Clone)]
  899. pub struct bpf_map_info {
  900. pub type_: __u32,
  901. pub id: __u32,
  902. pub key_size: __u32,
  903. pub value_size: __u32,
  904. pub max_entries: __u32,
  905. pub map_flags: __u32,
  906. pub name: [::core::ffi::c_char; 16usize],
  907. pub ifindex: __u32,
  908. pub btf_vmlinux_value_type_id: __u32,
  909. pub netns_dev: __u64,
  910. pub netns_ino: __u64,
  911. pub btf_id: __u32,
  912. pub btf_key_type_id: __u32,
  913. pub btf_value_type_id: __u32,
  914. pub _bitfield_align_1: [u8; 0],
  915. pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
  916. pub map_extra: __u64,
  917. }
  918. impl bpf_map_info {
  919. #[inline]
  920. pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> {
  921. let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
  922. __bindgen_bitfield_unit
  923. }
  924. }
  925. #[repr(C)]
  926. #[derive(Debug, Copy, Clone)]
  927. pub struct bpf_btf_info {
  928. pub btf: __u64,
  929. pub btf_size: __u32,
  930. pub id: __u32,
  931. pub name: __u64,
  932. pub name_len: __u32,
  933. pub kernel_btf: __u32,
  934. }
  935. #[repr(C)]
  936. #[derive(Copy, Clone)]
  937. pub struct bpf_link_info {
  938. pub type_: __u32,
  939. pub id: __u32,
  940. pub prog_id: __u32,
  941. pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1,
  942. }
  943. #[repr(C)]
  944. #[derive(Copy, Clone)]
  945. pub union bpf_link_info__bindgen_ty_1 {
  946. pub raw_tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_1,
  947. pub tracing: bpf_link_info__bindgen_ty_1__bindgen_ty_2,
  948. pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_3,
  949. pub iter: bpf_link_info__bindgen_ty_1__bindgen_ty_4,
  950. pub netns: bpf_link_info__bindgen_ty_1__bindgen_ty_5,
  951. pub xdp: bpf_link_info__bindgen_ty_1__bindgen_ty_6,
  952. pub struct_ops: bpf_link_info__bindgen_ty_1__bindgen_ty_7,
  953. pub netfilter: bpf_link_info__bindgen_ty_1__bindgen_ty_8,
  954. }
  955. #[repr(C)]
  956. #[derive(Debug, Copy, Clone)]
  957. pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_1 {
  958. pub tp_name: __u64,
  959. pub tp_name_len: __u32,
  960. }
  961. #[repr(C)]
  962. #[derive(Debug, Copy, Clone)]
  963. pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_2 {
  964. pub attach_type: __u32,
  965. pub target_obj_id: __u32,
  966. pub target_btf_id: __u32,
  967. }
  968. #[repr(C)]
  969. #[derive(Debug, Copy, Clone)]
  970. pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_3 {
  971. pub cgroup_id: __u64,
  972. pub attach_type: __u32,
  973. }
  974. #[repr(C)]
  975. #[derive(Copy, Clone)]
  976. pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4 {
  977. pub target_name: __u64,
  978. pub target_name_len: __u32,
  979. pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1,
  980. pub __bindgen_anon_2: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2,
  981. }
  982. #[repr(C)]
  983. #[derive(Copy, Clone)]
  984. pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 {
  985. pub map: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
  986. }
  987. #[repr(C)]
  988. #[derive(Debug, Copy, Clone)]
  989. pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 {
  990. pub map_id: __u32,
  991. }
  992. #[repr(C)]
  993. #[derive(Copy, Clone)]
  994. pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 {
  995. pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1,
  996. pub task: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2,
  997. }
  998. #[repr(C)]
  999. #[derive(Debug, Copy, Clone)]
  1000. pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 {
  1001. pub cgroup_id: __u64,
  1002. pub order: __u32,
  1003. }
  1004. #[repr(C)]
  1005. #[derive(Debug, Copy, Clone)]
  1006. pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 {
  1007. pub tid: __u32,
  1008. pub pid: __u32,
  1009. }
  1010. #[repr(C)]
  1011. #[derive(Debug, Copy, Clone)]
  1012. pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 {
  1013. pub netns_ino: __u32,
  1014. pub attach_type: __u32,
  1015. }
  1016. #[repr(C)]
  1017. #[derive(Debug, Copy, Clone)]
  1018. pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 {
  1019. pub ifindex: __u32,
  1020. }
  1021. #[repr(C)]
  1022. #[derive(Debug, Copy, Clone)]
  1023. pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_7 {
  1024. pub map_id: __u32,
  1025. }
  1026. #[repr(C)]
  1027. #[derive(Debug, Copy, Clone)]
  1028. pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_8 {
  1029. pub pf: __u32,
  1030. pub hooknum: __u32,
  1031. pub priority: __s32,
  1032. pub flags: __u32,
  1033. }
  1034. #[repr(C)]
  1035. #[derive(Debug, Copy, Clone)]
  1036. pub struct bpf_func_info {
  1037. pub insn_off: __u32,
  1038. pub type_id: __u32,
  1039. }
  1040. #[repr(C)]
  1041. #[derive(Debug, Copy, Clone)]
  1042. pub struct bpf_line_info {
  1043. pub insn_off: __u32,
  1044. pub file_name_off: __u32,
  1045. pub line_off: __u32,
  1046. pub line_col: __u32,
  1047. }
  1048. pub const BPF_F_TIMER_ABS: _bindgen_ty_39 = 1;
  1049. pub type _bindgen_ty_39 = ::core::ffi::c_uint;
  1050. #[repr(C)]
  1051. #[derive(Debug, Copy, Clone)]
  1052. pub struct btf_header {
  1053. pub magic: __u16,
  1054. pub version: __u8,
  1055. pub flags: __u8,
  1056. pub hdr_len: __u32,
  1057. pub type_off: __u32,
  1058. pub type_len: __u32,
  1059. pub str_off: __u32,
  1060. pub str_len: __u32,
  1061. }
  1062. #[repr(C)]
  1063. #[derive(Copy, Clone)]
  1064. pub struct btf_type {
  1065. pub name_off: __u32,
  1066. pub info: __u32,
  1067. pub __bindgen_anon_1: btf_type__bindgen_ty_1,
  1068. }
  1069. #[repr(C)]
  1070. #[derive(Copy, Clone)]
  1071. pub union btf_type__bindgen_ty_1 {
  1072. pub size: __u32,
  1073. pub type_: __u32,
  1074. }
  1075. pub const BTF_KIND_UNKN: _bindgen_ty_40 = 0;
  1076. pub const BTF_KIND_INT: _bindgen_ty_40 = 1;
  1077. pub const BTF_KIND_PTR: _bindgen_ty_40 = 2;
  1078. pub const BTF_KIND_ARRAY: _bindgen_ty_40 = 3;
  1079. pub const BTF_KIND_STRUCT: _bindgen_ty_40 = 4;
  1080. pub const BTF_KIND_UNION: _bindgen_ty_40 = 5;
  1081. pub const BTF_KIND_ENUM: _bindgen_ty_40 = 6;
  1082. pub const BTF_KIND_FWD: _bindgen_ty_40 = 7;
  1083. pub const BTF_KIND_TYPEDEF: _bindgen_ty_40 = 8;
  1084. pub const BTF_KIND_VOLATILE: _bindgen_ty_40 = 9;
  1085. pub const BTF_KIND_CONST: _bindgen_ty_40 = 10;
  1086. pub const BTF_KIND_RESTRICT: _bindgen_ty_40 = 11;
  1087. pub const BTF_KIND_FUNC: _bindgen_ty_40 = 12;
  1088. pub const BTF_KIND_FUNC_PROTO: _bindgen_ty_40 = 13;
  1089. pub const BTF_KIND_VAR: _bindgen_ty_40 = 14;
  1090. pub const BTF_KIND_DATASEC: _bindgen_ty_40 = 15;
  1091. pub const BTF_KIND_FLOAT: _bindgen_ty_40 = 16;
  1092. pub const BTF_KIND_DECL_TAG: _bindgen_ty_40 = 17;
  1093. pub const BTF_KIND_TYPE_TAG: _bindgen_ty_40 = 18;
  1094. pub const BTF_KIND_ENUM64: _bindgen_ty_40 = 19;
  1095. pub const NR_BTF_KINDS: _bindgen_ty_40 = 20;
  1096. pub const BTF_KIND_MAX: _bindgen_ty_40 = 19;
  1097. pub type _bindgen_ty_40 = ::core::ffi::c_uint;
  1098. #[repr(C)]
  1099. #[derive(Debug, Copy, Clone)]
  1100. pub struct btf_enum {
  1101. pub name_off: __u32,
  1102. pub val: __s32,
  1103. }
  1104. #[repr(C)]
  1105. #[derive(Debug, Copy, Clone)]
  1106. pub struct btf_array {
  1107. pub type_: __u32,
  1108. pub index_type: __u32,
  1109. pub nelems: __u32,
  1110. }
  1111. #[repr(C)]
  1112. #[derive(Debug, Copy, Clone)]
  1113. pub struct btf_member {
  1114. pub name_off: __u32,
  1115. pub type_: __u32,
  1116. pub offset: __u32,
  1117. }
  1118. #[repr(C)]
  1119. #[derive(Debug, Copy, Clone)]
  1120. pub struct btf_param {
  1121. pub name_off: __u32,
  1122. pub type_: __u32,
  1123. }
  1124. pub const BTF_VAR_STATIC: _bindgen_ty_41 = 0;
  1125. pub const BTF_VAR_GLOBAL_ALLOCATED: _bindgen_ty_41 = 1;
  1126. pub const BTF_VAR_GLOBAL_EXTERN: _bindgen_ty_41 = 2;
  1127. pub type _bindgen_ty_41 = ::core::ffi::c_uint;
  1128. #[repr(u32)]
  1129. #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
  1130. pub enum btf_func_linkage {
  1131. BTF_FUNC_STATIC = 0,
  1132. BTF_FUNC_GLOBAL = 1,
  1133. BTF_FUNC_EXTERN = 2,
  1134. }
  1135. #[repr(C)]
  1136. #[derive(Debug, Copy, Clone)]
  1137. pub struct btf_var {
  1138. pub linkage: __u32,
  1139. }
  1140. #[repr(C)]
  1141. #[derive(Debug, Copy, Clone)]
  1142. pub struct btf_var_secinfo {
  1143. pub type_: __u32,
  1144. pub offset: __u32,
  1145. pub size: __u32,
  1146. }
  1147. #[repr(C)]
  1148. #[derive(Debug, Copy, Clone)]
  1149. pub struct btf_decl_tag {
  1150. pub component_idx: __s32,
  1151. }
  1152. #[repr(u32)]
  1153. #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
  1154. pub enum perf_type_id {
  1155. PERF_TYPE_HARDWARE = 0,
  1156. PERF_TYPE_SOFTWARE = 1,
  1157. PERF_TYPE_TRACEPOINT = 2,
  1158. PERF_TYPE_HW_CACHE = 3,
  1159. PERF_TYPE_RAW = 4,
  1160. PERF_TYPE_BREAKPOINT = 5,
  1161. PERF_TYPE_MAX = 6,
  1162. }
  1163. #[repr(u32)]
  1164. #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
  1165. pub enum perf_hw_id {
  1166. PERF_COUNT_HW_CPU_CYCLES = 0,
  1167. PERF_COUNT_HW_INSTRUCTIONS = 1,
  1168. PERF_COUNT_HW_CACHE_REFERENCES = 2,
  1169. PERF_COUNT_HW_CACHE_MISSES = 3,
  1170. PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4,
  1171. PERF_COUNT_HW_BRANCH_MISSES = 5,
  1172. PERF_COUNT_HW_BUS_CYCLES = 6,
  1173. PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7,
  1174. PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8,
  1175. PERF_COUNT_HW_REF_CPU_CYCLES = 9,
  1176. PERF_COUNT_HW_MAX = 10,
  1177. }
  1178. #[repr(u32)]
  1179. #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
  1180. pub enum perf_hw_cache_id {
  1181. PERF_COUNT_HW_CACHE_L1D = 0,
  1182. PERF_COUNT_HW_CACHE_L1I = 1,
  1183. PERF_COUNT_HW_CACHE_LL = 2,
  1184. PERF_COUNT_HW_CACHE_DTLB = 3,
  1185. PERF_COUNT_HW_CACHE_ITLB = 4,
  1186. PERF_COUNT_HW_CACHE_BPU = 5,
  1187. PERF_COUNT_HW_CACHE_NODE = 6,
  1188. PERF_COUNT_HW_CACHE_MAX = 7,
  1189. }
  1190. #[repr(u32)]
  1191. #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
  1192. pub enum perf_hw_cache_op_id {
  1193. PERF_COUNT_HW_CACHE_OP_READ = 0,
  1194. PERF_COUNT_HW_CACHE_OP_WRITE = 1,
  1195. PERF_COUNT_HW_CACHE_OP_PREFETCH = 2,
  1196. PERF_COUNT_HW_CACHE_OP_MAX = 3,
  1197. }
  1198. #[repr(u32)]
  1199. #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
  1200. pub enum perf_hw_cache_op_result_id {
  1201. PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0,
  1202. PERF_COUNT_HW_CACHE_RESULT_MISS = 1,
  1203. PERF_COUNT_HW_CACHE_RESULT_MAX = 2,
  1204. }
  1205. #[repr(u32)]
  1206. #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
  1207. pub enum perf_sw_ids {
  1208. PERF_COUNT_SW_CPU_CLOCK = 0,
  1209. PERF_COUNT_SW_TASK_CLOCK = 1,
  1210. PERF_COUNT_SW_PAGE_FAULTS = 2,
  1211. PERF_COUNT_SW_CONTEXT_SWITCHES = 3,
  1212. PERF_COUNT_SW_CPU_MIGRATIONS = 4,
  1213. PERF_COUNT_SW_PAGE_FAULTS_MIN = 5,
  1214. PERF_COUNT_SW_PAGE_FAULTS_MAJ = 6,
  1215. PERF_COUNT_SW_ALIGNMENT_FAULTS = 7,
  1216. PERF_COUNT_SW_EMULATION_FAULTS = 8,
  1217. PERF_COUNT_SW_DUMMY = 9,
  1218. PERF_COUNT_SW_BPF_OUTPUT = 10,
  1219. PERF_COUNT_SW_CGROUP_SWITCHES = 11,
  1220. PERF_COUNT_SW_MAX = 12,
  1221. }
  1222. #[repr(u32)]
  1223. #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
  1224. pub enum perf_event_sample_format {
  1225. PERF_SAMPLE_IP = 1,
  1226. PERF_SAMPLE_TID = 2,
  1227. PERF_SAMPLE_TIME = 4,
  1228. PERF_SAMPLE_ADDR = 8,
  1229. PERF_SAMPLE_READ = 16,
  1230. PERF_SAMPLE_CALLCHAIN = 32,
  1231. PERF_SAMPLE_ID = 64,
  1232. PERF_SAMPLE_CPU = 128,
  1233. PERF_SAMPLE_PERIOD = 256,
  1234. PERF_SAMPLE_STREAM_ID = 512,
  1235. PERF_SAMPLE_RAW = 1024,
  1236. PERF_SAMPLE_BRANCH_STACK = 2048,
  1237. PERF_SAMPLE_REGS_USER = 4096,
  1238. PERF_SAMPLE_STACK_USER = 8192,
  1239. PERF_SAMPLE_WEIGHT = 16384,
  1240. PERF_SAMPLE_DATA_SRC = 32768,
  1241. PERF_SAMPLE_IDENTIFIER = 65536,
  1242. PERF_SAMPLE_TRANSACTION = 131072,
  1243. PERF_SAMPLE_REGS_INTR = 262144,
  1244. PERF_SAMPLE_PHYS_ADDR = 524288,
  1245. PERF_SAMPLE_AUX = 1048576,
  1246. PERF_SAMPLE_CGROUP = 2097152,
  1247. PERF_SAMPLE_DATA_PAGE_SIZE = 4194304,
  1248. PERF_SAMPLE_CODE_PAGE_SIZE = 8388608,
  1249. PERF_SAMPLE_WEIGHT_STRUCT = 16777216,
  1250. PERF_SAMPLE_MAX = 33554432,
  1251. }
  1252. #[repr(C)]
  1253. #[derive(Copy, Clone)]
  1254. pub struct perf_event_attr {
  1255. pub type_: __u32,
  1256. pub size: __u32,
  1257. pub config: __u64,
  1258. pub __bindgen_anon_1: perf_event_attr__bindgen_ty_1,
  1259. pub sample_type: __u64,
  1260. pub read_format: __u64,
  1261. pub _bitfield_align_1: [u32; 0],
  1262. pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
  1263. pub __bindgen_anon_2: perf_event_attr__bindgen_ty_2,
  1264. pub bp_type: __u32,
  1265. pub __bindgen_anon_3: perf_event_attr__bindgen_ty_3,
  1266. pub __bindgen_anon_4: perf_event_attr__bindgen_ty_4,
  1267. pub branch_sample_type: __u64,
  1268. pub sample_regs_user: __u64,
  1269. pub sample_stack_user: __u32,
  1270. pub clockid: __s32,
  1271. pub sample_regs_intr: __u64,
  1272. pub aux_watermark: __u32,
  1273. pub sample_max_stack: __u16,
  1274. pub __reserved_2: __u16,
  1275. pub aux_sample_size: __u32,
  1276. pub __reserved_3: __u32,
  1277. pub sig_data: __u64,
  1278. pub config3: __u64,
  1279. }
  1280. #[repr(C)]
  1281. #[derive(Copy, Clone)]
  1282. pub union perf_event_attr__bindgen_ty_1 {
  1283. pub sample_period: __u64,
  1284. pub sample_freq: __u64,
  1285. }
  1286. #[repr(C)]
  1287. #[derive(Copy, Clone)]
  1288. pub union perf_event_attr__bindgen_ty_2 {
  1289. pub wakeup_events: __u32,
  1290. pub wakeup_watermark: __u32,
  1291. }
  1292. #[repr(C)]
  1293. #[derive(Copy, Clone)]
  1294. pub union perf_event_attr__bindgen_ty_3 {
  1295. pub bp_addr: __u64,
  1296. pub kprobe_func: __u64,
  1297. pub uprobe_path: __u64,
  1298. pub config1: __u64,
  1299. }
  1300. #[repr(C)]
  1301. #[derive(Copy, Clone)]
  1302. pub union perf_event_attr__bindgen_ty_4 {
  1303. pub bp_len: __u64,
  1304. pub kprobe_addr: __u64,
  1305. pub probe_offset: __u64,
  1306. pub config2: __u64,
  1307. }
  1308. impl perf_event_attr {
  1309. #[inline]
  1310. pub fn disabled(&self) -> __u64 {
  1311. unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) }
  1312. }
  1313. #[inline]
  1314. pub fn set_disabled(&mut self, val: __u64) {
  1315. unsafe {
  1316. let val: u64 = ::core::mem::transmute(val);
  1317. self._bitfield_1.set(0usize, 1u8, val as u64)
  1318. }
  1319. }
  1320. #[inline]
  1321. pub fn inherit(&self) -> __u64 {
  1322. unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) }
  1323. }
  1324. #[inline]
  1325. pub fn set_inherit(&mut self, val: __u64) {
  1326. unsafe {
  1327. let val: u64 = ::core::mem::transmute(val);
  1328. self._bitfield_1.set(1usize, 1u8, val as u64)
  1329. }
  1330. }
  1331. #[inline]
  1332. pub fn pinned(&self) -> __u64 {
  1333. unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) }
  1334. }
  1335. #[inline]
  1336. pub fn set_pinned(&mut self, val: __u64) {
  1337. unsafe {
  1338. let val: u64 = ::core::mem::transmute(val);
  1339. self._bitfield_1.set(2usize, 1u8, val as u64)
  1340. }
  1341. }
  1342. #[inline]
  1343. pub fn exclusive(&self) -> __u64 {
  1344. unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) }
  1345. }
  1346. #[inline]
  1347. pub fn set_exclusive(&mut self, val: __u64) {
  1348. unsafe {
  1349. let val: u64 = ::core::mem::transmute(val);
  1350. self._bitfield_1.set(3usize, 1u8, val as u64)
  1351. }
  1352. }
  1353. #[inline]
  1354. pub fn exclude_user(&self) -> __u64 {
  1355. unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) }
  1356. }
  1357. #[inline]
  1358. pub fn set_exclude_user(&mut self, val: __u64) {
  1359. unsafe {
  1360. let val: u64 = ::core::mem::transmute(val);
  1361. self._bitfield_1.set(4usize, 1u8, val as u64)
  1362. }
  1363. }
  1364. #[inline]
  1365. pub fn exclude_kernel(&self) -> __u64 {
  1366. unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) }
  1367. }
  1368. #[inline]
  1369. pub fn set_exclude_kernel(&mut self, val: __u64) {
  1370. unsafe {
  1371. let val: u64 = ::core::mem::transmute(val);
  1372. self._bitfield_1.set(5usize, 1u8, val as u64)
  1373. }
  1374. }
  1375. #[inline]
  1376. pub fn exclude_hv(&self) -> __u64 {
  1377. unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) }
  1378. }
  1379. #[inline]
  1380. pub fn set_exclude_hv(&mut self, val: __u64) {
  1381. unsafe {
  1382. let val: u64 = ::core::mem::transmute(val);
  1383. self._bitfield_1.set(6usize, 1u8, val as u64)
  1384. }
  1385. }
  1386. #[inline]
  1387. pub fn exclude_idle(&self) -> __u64 {
  1388. unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) }
  1389. }
  1390. #[inline]
  1391. pub fn set_exclude_idle(&mut self, val: __u64) {
  1392. unsafe {
  1393. let val: u64 = ::core::mem::transmute(val);
  1394. self._bitfield_1.set(7usize, 1u8, val as u64)
  1395. }
  1396. }
  1397. #[inline]
  1398. pub fn mmap(&self) -> __u64 {
  1399. unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) }
  1400. }
  1401. #[inline]
  1402. pub fn set_mmap(&mut self, val: __u64) {
  1403. unsafe {
  1404. let val: u64 = ::core::mem::transmute(val);
  1405. self._bitfield_1.set(8usize, 1u8, val as u64)
  1406. }
  1407. }
  1408. #[inline]
  1409. pub fn comm(&self) -> __u64 {
  1410. unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) }
  1411. }
  1412. #[inline]
  1413. pub fn set_comm(&mut self, val: __u64) {
  1414. unsafe {
  1415. let val: u64 = ::core::mem::transmute(val);
  1416. self._bitfield_1.set(9usize, 1u8, val as u64)
  1417. }
  1418. }
  1419. #[inline]
  1420. pub fn freq(&self) -> __u64 {
  1421. unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) }
  1422. }
  1423. #[inline]
  1424. pub fn set_freq(&mut self, val: __u64) {
  1425. unsafe {
  1426. let val: u64 = ::core::mem::transmute(val);
  1427. self._bitfield_1.set(10usize, 1u8, val as u64)
  1428. }
  1429. }
  1430. #[inline]
  1431. pub fn inherit_stat(&self) -> __u64 {
  1432. unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) }
  1433. }
  1434. #[inline]
  1435. pub fn set_inherit_stat(&mut self, val: __u64) {
  1436. unsafe {
  1437. let val: u64 = ::core::mem::transmute(val);
  1438. self._bitfield_1.set(11usize, 1u8, val as u64)
  1439. }
  1440. }
  1441. #[inline]
  1442. pub fn enable_on_exec(&self) -> __u64 {
  1443. unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) }
  1444. }
  1445. #[inline]
  1446. pub fn set_enable_on_exec(&mut self, val: __u64) {
  1447. unsafe {
  1448. let val: u64 = ::core::mem::transmute(val);
  1449. self._bitfield_1.set(12usize, 1u8, val as u64)
  1450. }
  1451. }
  1452. #[inline]
  1453. pub fn task(&self) -> __u64 {
  1454. unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) }
  1455. }
  1456. #[inline]
  1457. pub fn set_task(&mut self, val: __u64) {
  1458. unsafe {
  1459. let val: u64 = ::core::mem::transmute(val);
  1460. self._bitfield_1.set(13usize, 1u8, val as u64)
  1461. }
  1462. }
  1463. #[inline]
  1464. pub fn watermark(&self) -> __u64 {
  1465. unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) }
  1466. }
  1467. #[inline]
  1468. pub fn set_watermark(&mut self, val: __u64) {
  1469. unsafe {
  1470. let val: u64 = ::core::mem::transmute(val);
  1471. self._bitfield_1.set(14usize, 1u8, val as u64)
  1472. }
  1473. }
  1474. #[inline]
  1475. pub fn precise_ip(&self) -> __u64 {
  1476. unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) }
  1477. }
  1478. #[inline]
  1479. pub fn set_precise_ip(&mut self, val: __u64) {
  1480. unsafe {
  1481. let val: u64 = ::core::mem::transmute(val);
  1482. self._bitfield_1.set(15usize, 2u8, val as u64)
  1483. }
  1484. }
  1485. #[inline]
  1486. pub fn mmap_data(&self) -> __u64 {
  1487. unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) }
  1488. }
  1489. #[inline]
  1490. pub fn set_mmap_data(&mut self, val: __u64) {
  1491. unsafe {
  1492. let val: u64 = ::core::mem::transmute(val);
  1493. self._bitfield_1.set(17usize, 1u8, val as u64)
  1494. }
  1495. }
  1496. #[inline]
  1497. pub fn sample_id_all(&self) -> __u64 {
  1498. unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) }
  1499. }
  1500. #[inline]
  1501. pub fn set_sample_id_all(&mut self, val: __u64) {
  1502. unsafe {
  1503. let val: u64 = ::core::mem::transmute(val);
  1504. self._bitfield_1.set(18usize, 1u8, val as u64)
  1505. }
  1506. }
  1507. #[inline]
  1508. pub fn exclude_host(&self) -> __u64 {
  1509. unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) }
  1510. }
  1511. #[inline]
  1512. pub fn set_exclude_host(&mut self, val: __u64) {
  1513. unsafe {
  1514. let val: u64 = ::core::mem::transmute(val);
  1515. self._bitfield_1.set(19usize, 1u8, val as u64)
  1516. }
  1517. }
  1518. #[inline]
  1519. pub fn exclude_guest(&self) -> __u64 {
  1520. unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) }
  1521. }
  1522. #[inline]
  1523. pub fn set_exclude_guest(&mut self, val: __u64) {
  1524. unsafe {
  1525. let val: u64 = ::core::mem::transmute(val);
  1526. self._bitfield_1.set(20usize, 1u8, val as u64)
  1527. }
  1528. }
  1529. #[inline]
  1530. pub fn exclude_callchain_kernel(&self) -> __u64 {
  1531. unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) }
  1532. }
  1533. #[inline]
  1534. pub fn set_exclude_callchain_kernel(&mut self, val: __u64) {
  1535. unsafe {
  1536. let val: u64 = ::core::mem::transmute(val);
  1537. self._bitfield_1.set(21usize, 1u8, val as u64)
  1538. }
  1539. }
  1540. #[inline]
  1541. pub fn exclude_callchain_user(&self) -> __u64 {
  1542. unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) }
  1543. }
  1544. #[inline]
  1545. pub fn set_exclude_callchain_user(&mut self, val: __u64) {
  1546. unsafe {
  1547. let val: u64 = ::core::mem::transmute(val);
  1548. self._bitfield_1.set(22usize, 1u8, val as u64)
  1549. }
  1550. }
  1551. #[inline]
  1552. pub fn mmap2(&self) -> __u64 {
  1553. unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) }
  1554. }
  1555. #[inline]
  1556. pub fn set_mmap2(&mut self, val: __u64) {
  1557. unsafe {
  1558. let val: u64 = ::core::mem::transmute(val);
  1559. self._bitfield_1.set(23usize, 1u8, val as u64)
  1560. }
  1561. }
  1562. #[inline]
  1563. pub fn comm_exec(&self) -> __u64 {
  1564. unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) }
  1565. }
  1566. #[inline]
  1567. pub fn set_comm_exec(&mut self, val: __u64) {
  1568. unsafe {
  1569. let val: u64 = ::core::mem::transmute(val);
  1570. self._bitfield_1.set(24usize, 1u8, val as u64)
  1571. }
  1572. }
  1573. #[inline]
  1574. pub fn use_clockid(&self) -> __u64 {
  1575. unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) }
  1576. }
  1577. #[inline]
  1578. pub fn set_use_clockid(&mut self, val: __u64) {
  1579. unsafe {
  1580. let val: u64 = ::core::mem::transmute(val);
  1581. self._bitfield_1.set(25usize, 1u8, val as u64)
  1582. }
  1583. }
  1584. #[inline]
  1585. pub fn context_switch(&self) -> __u64 {
  1586. unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) }
  1587. }
  1588. #[inline]
  1589. pub fn set_context_switch(&mut self, val: __u64) {
  1590. unsafe {
  1591. let val: u64 = ::core::mem::transmute(val);
  1592. self._bitfield_1.set(26usize, 1u8, val as u64)
  1593. }
  1594. }
  1595. #[inline]
  1596. pub fn write_backward(&self) -> __u64 {
  1597. unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) }
  1598. }
  1599. #[inline]
  1600. pub fn set_write_backward(&mut self, val: __u64) {
  1601. unsafe {
  1602. let val: u64 = ::core::mem::transmute(val);
  1603. self._bitfield_1.set(27usize, 1u8, val as u64)
  1604. }
  1605. }
  1606. #[inline]
  1607. pub fn namespaces(&self) -> __u64 {
  1608. unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) }
  1609. }
  1610. #[inline]
  1611. pub fn set_namespaces(&mut self, val: __u64) {
  1612. unsafe {
  1613. let val: u64 = ::core::mem::transmute(val);
  1614. self._bitfield_1.set(28usize, 1u8, val as u64)
  1615. }
  1616. }
  1617. #[inline]
  1618. pub fn ksymbol(&self) -> __u64 {
  1619. unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) }
  1620. }
  1621. #[inline]
  1622. pub fn set_ksymbol(&mut self, val: __u64) {
  1623. unsafe {
  1624. let val: u64 = ::core::mem::transmute(val);
  1625. self._bitfield_1.set(29usize, 1u8, val as u64)
  1626. }
  1627. }
  1628. #[inline]
  1629. pub fn bpf_event(&self) -> __u64 {
  1630. unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) }
  1631. }
  1632. #[inline]
  1633. pub fn set_bpf_event(&mut self, val: __u64) {
  1634. unsafe {
  1635. let val: u64 = ::core::mem::transmute(val);
  1636. self._bitfield_1.set(30usize, 1u8, val as u64)
  1637. }
  1638. }
  1639. #[inline]
  1640. pub fn aux_output(&self) -> __u64 {
  1641. unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) }
  1642. }
  1643. #[inline]
  1644. pub fn set_aux_output(&mut self, val: __u64) {
  1645. unsafe {
  1646. let val: u64 = ::core::mem::transmute(val);
  1647. self._bitfield_1.set(31usize, 1u8, val as u64)
  1648. }
  1649. }
  1650. #[inline]
  1651. pub fn cgroup(&self) -> __u64 {
  1652. unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) }
  1653. }
  1654. #[inline]
  1655. pub fn set_cgroup(&mut self, val: __u64) {
  1656. unsafe {
  1657. let val: u64 = ::core::mem::transmute(val);
  1658. self._bitfield_1.set(32usize, 1u8, val as u64)
  1659. }
  1660. }
  1661. #[inline]
  1662. pub fn text_poke(&self) -> __u64 {
  1663. unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) }
  1664. }
  1665. #[inline]
  1666. pub fn set_text_poke(&mut self, val: __u64) {
  1667. unsafe {
  1668. let val: u64 = ::core::mem::transmute(val);
  1669. self._bitfield_1.set(33usize, 1u8, val as u64)
  1670. }
  1671. }
  1672. #[inline]
  1673. pub fn build_id(&self) -> __u64 {
  1674. unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) }
  1675. }
  1676. #[inline]
  1677. pub fn set_build_id(&mut self, val: __u64) {
  1678. unsafe {
  1679. let val: u64 = ::core::mem::transmute(val);
  1680. self._bitfield_1.set(34usize, 1u8, val as u64)
  1681. }
  1682. }
  1683. #[inline]
  1684. pub fn inherit_thread(&self) -> __u64 {
  1685. unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) }
  1686. }
  1687. #[inline]
  1688. pub fn set_inherit_thread(&mut self, val: __u64) {
  1689. unsafe {
  1690. let val: u64 = ::core::mem::transmute(val);
  1691. self._bitfield_1.set(35usize, 1u8, val as u64)
  1692. }
  1693. }
  1694. #[inline]
  1695. pub fn remove_on_exec(&self) -> __u64 {
  1696. unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) }
  1697. }
  1698. #[inline]
  1699. pub fn set_remove_on_exec(&mut self, val: __u64) {
  1700. unsafe {
  1701. let val: u64 = ::core::mem::transmute(val);
  1702. self._bitfield_1.set(36usize, 1u8, val as u64)
  1703. }
  1704. }
  1705. #[inline]
  1706. pub fn sigtrap(&self) -> __u64 {
  1707. unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) }
  1708. }
  1709. #[inline]
  1710. pub fn set_sigtrap(&mut self, val: __u64) {
  1711. unsafe {
  1712. let val: u64 = ::core::mem::transmute(val);
  1713. self._bitfield_1.set(37usize, 1u8, val as u64)
  1714. }
  1715. }
  1716. #[inline]
  1717. pub fn __reserved_1(&self) -> __u64 {
  1718. unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) }
  1719. }
  1720. #[inline]
  1721. pub fn set___reserved_1(&mut self, val: __u64) {
  1722. unsafe {
  1723. let val: u64 = ::core::mem::transmute(val);
  1724. self._bitfield_1.set(38usize, 26u8, val as u64)
  1725. }
  1726. }
  1727. #[inline]
  1728. pub fn new_bitfield_1(
  1729. disabled: __u64,
  1730. inherit: __u64,
  1731. pinned: __u64,
  1732. exclusive: __u64,
  1733. exclude_user: __u64,
  1734. exclude_kernel: __u64,
  1735. exclude_hv: __u64,
  1736. exclude_idle: __u64,
  1737. mmap: __u64,
  1738. comm: __u64,
  1739. freq: __u64,
  1740. inherit_stat: __u64,
  1741. enable_on_exec: __u64,
  1742. task: __u64,
  1743. watermark: __u64,
  1744. precise_ip: __u64,
  1745. mmap_data: __u64,
  1746. sample_id_all: __u64,
  1747. exclude_host: __u64,
  1748. exclude_guest: __u64,
  1749. exclude_callchain_kernel: __u64,
  1750. exclude_callchain_user: __u64,
  1751. mmap2: __u64,
  1752. comm_exec: __u64,
  1753. use_clockid: __u64,
  1754. context_switch: __u64,
  1755. write_backward: __u64,
  1756. namespaces: __u64,
  1757. ksymbol: __u64,
  1758. bpf_event: __u64,
  1759. aux_output: __u64,
  1760. cgroup: __u64,
  1761. text_poke: __u64,
  1762. build_id: __u64,
  1763. inherit_thread: __u64,
  1764. remove_on_exec: __u64,
  1765. sigtrap: __u64,
  1766. __reserved_1: __u64,
  1767. ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
  1768. let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
  1769. __bindgen_bitfield_unit.set(0usize, 1u8, {
  1770. let disabled: u64 = unsafe { ::core::mem::transmute(disabled) };
  1771. disabled as u64
  1772. });
  1773. __bindgen_bitfield_unit.set(1usize, 1u8, {
  1774. let inherit: u64 = unsafe { ::core::mem::transmute(inherit) };
  1775. inherit as u64
  1776. });
  1777. __bindgen_bitfield_unit.set(2usize, 1u8, {
  1778. let pinned: u64 = unsafe { ::core::mem::transmute(pinned) };
  1779. pinned as u64
  1780. });
  1781. __bindgen_bitfield_unit.set(3usize, 1u8, {
  1782. let exclusive: u64 = unsafe { ::core::mem::transmute(exclusive) };
  1783. exclusive as u64
  1784. });
  1785. __bindgen_bitfield_unit.set(4usize, 1u8, {
  1786. let exclude_user: u64 = unsafe { ::core::mem::transmute(exclude_user) };
  1787. exclude_user as u64
  1788. });
  1789. __bindgen_bitfield_unit.set(5usize, 1u8, {
  1790. let exclude_kernel: u64 = unsafe { ::core::mem::transmute(exclude_kernel) };
  1791. exclude_kernel as u64
  1792. });
  1793. __bindgen_bitfield_unit.set(6usize, 1u8, {
  1794. let exclude_hv: u64 = unsafe { ::core::mem::transmute(exclude_hv) };
  1795. exclude_hv as u64
  1796. });
  1797. __bindgen_bitfield_unit.set(7usize, 1u8, {
  1798. let exclude_idle: u64 = unsafe { ::core::mem::transmute(exclude_idle) };
  1799. exclude_idle as u64
  1800. });
  1801. __bindgen_bitfield_unit.set(8usize, 1u8, {
  1802. let mmap: u64 = unsafe { ::core::mem::transmute(mmap) };
  1803. mmap as u64
  1804. });
  1805. __bindgen_bitfield_unit.set(9usize, 1u8, {
  1806. let comm: u64 = unsafe { ::core::mem::transmute(comm) };
  1807. comm as u64
  1808. });
  1809. __bindgen_bitfield_unit.set(10usize, 1u8, {
  1810. let freq: u64 = unsafe { ::core::mem::transmute(freq) };
  1811. freq as u64
  1812. });
  1813. __bindgen_bitfield_unit.set(11usize, 1u8, {
  1814. let inherit_stat: u64 = unsafe { ::core::mem::transmute(inherit_stat) };
  1815. inherit_stat as u64
  1816. });
  1817. __bindgen_bitfield_unit.set(12usize, 1u8, {
  1818. let enable_on_exec: u64 = unsafe { ::core::mem::transmute(enable_on_exec) };
  1819. enable_on_exec as u64
  1820. });
  1821. __bindgen_bitfield_unit.set(13usize, 1u8, {
  1822. let task: u64 = unsafe { ::core::mem::transmute(task) };
  1823. task as u64
  1824. });
  1825. __bindgen_bitfield_unit.set(14usize, 1u8, {
  1826. let watermark: u64 = unsafe { ::core::mem::transmute(watermark) };
  1827. watermark as u64
  1828. });
  1829. __bindgen_bitfield_unit.set(15usize, 2u8, {
  1830. let precise_ip: u64 = unsafe { ::core::mem::transmute(precise_ip) };
  1831. precise_ip as u64
  1832. });
  1833. __bindgen_bitfield_unit.set(17usize, 1u8, {
  1834. let mmap_data: u64 = unsafe { ::core::mem::transmute(mmap_data) };
  1835. mmap_data as u64
  1836. });
  1837. __bindgen_bitfield_unit.set(18usize, 1u8, {
  1838. let sample_id_all: u64 = unsafe { ::core::mem::transmute(sample_id_all) };
  1839. sample_id_all as u64
  1840. });
  1841. __bindgen_bitfield_unit.set(19usize, 1u8, {
  1842. let exclude_host: u64 = unsafe { ::core::mem::transmute(exclude_host) };
  1843. exclude_host as u64
  1844. });
  1845. __bindgen_bitfield_unit.set(20usize, 1u8, {
  1846. let exclude_guest: u64 = unsafe { ::core::mem::transmute(exclude_guest) };
  1847. exclude_guest as u64
  1848. });
  1849. __bindgen_bitfield_unit.set(21usize, 1u8, {
  1850. let exclude_callchain_kernel: u64 =
  1851. unsafe { ::core::mem::transmute(exclude_callchain_kernel) };
  1852. exclude_callchain_kernel as u64
  1853. });
  1854. __bindgen_bitfield_unit.set(22usize, 1u8, {
  1855. let exclude_callchain_user: u64 =
  1856. unsafe { ::core::mem::transmute(exclude_callchain_user) };
  1857. exclude_callchain_user as u64
  1858. });
  1859. __bindgen_bitfield_unit.set(23usize, 1u8, {
  1860. let mmap2: u64 = unsafe { ::core::mem::transmute(mmap2) };
  1861. mmap2 as u64
  1862. });
  1863. __bindgen_bitfield_unit.set(24usize, 1u8, {
  1864. let comm_exec: u64 = unsafe { ::core::mem::transmute(comm_exec) };
  1865. comm_exec as u64
  1866. });
  1867. __bindgen_bitfield_unit.set(25usize, 1u8, {
  1868. let use_clockid: u64 = unsafe { ::core::mem::transmute(use_clockid) };
  1869. use_clockid as u64
  1870. });
  1871. __bindgen_bitfield_unit.set(26usize, 1u8, {
  1872. let context_switch: u64 = unsafe { ::core::mem::transmute(context_switch) };
  1873. context_switch as u64
  1874. });
  1875. __bindgen_bitfield_unit.set(27usize, 1u8, {
  1876. let write_backward: u64 = unsafe { ::core::mem::transmute(write_backward) };
  1877. write_backward as u64
  1878. });
  1879. __bindgen_bitfield_unit.set(28usize, 1u8, {
  1880. let namespaces: u64 = unsafe { ::core::mem::transmute(namespaces) };
  1881. namespaces as u64
  1882. });
  1883. __bindgen_bitfield_unit.set(29usize, 1u8, {
  1884. let ksymbol: u64 = unsafe { ::core::mem::transmute(ksymbol) };
  1885. ksymbol as u64
  1886. });
  1887. __bindgen_bitfield_unit.set(30usize, 1u8, {
  1888. let bpf_event: u64 = unsafe { ::core::mem::transmute(bpf_event) };
  1889. bpf_event as u64
  1890. });
  1891. __bindgen_bitfield_unit.set(31usize, 1u8, {
  1892. let aux_output: u64 = unsafe { ::core::mem::transmute(aux_output) };
  1893. aux_output as u64
  1894. });
  1895. __bindgen_bitfield_unit.set(32usize, 1u8, {
  1896. let cgroup: u64 = unsafe { ::core::mem::transmute(cgroup) };
  1897. cgroup as u64
  1898. });
  1899. __bindgen_bitfield_unit.set(33usize, 1u8, {
  1900. let text_poke: u64 = unsafe { ::core::mem::transmute(text_poke) };
  1901. text_poke as u64
  1902. });
  1903. __bindgen_bitfield_unit.set(34usize, 1u8, {
  1904. let build_id: u64 = unsafe { ::core::mem::transmute(build_id) };
  1905. build_id as u64
  1906. });
  1907. __bindgen_bitfield_unit.set(35usize, 1u8, {
  1908. let inherit_thread: u64 = unsafe { ::core::mem::transmute(inherit_thread) };
  1909. inherit_thread as u64
  1910. });
  1911. __bindgen_bitfield_unit.set(36usize, 1u8, {
  1912. let remove_on_exec: u64 = unsafe { ::core::mem::transmute(remove_on_exec) };
  1913. remove_on_exec as u64
  1914. });
  1915. __bindgen_bitfield_unit.set(37usize, 1u8, {
  1916. let sigtrap: u64 = unsafe { ::core::mem::transmute(sigtrap) };
  1917. sigtrap as u64
  1918. });
  1919. __bindgen_bitfield_unit.set(38usize, 26u8, {
  1920. let __reserved_1: u64 = unsafe { ::core::mem::transmute(__reserved_1) };
  1921. __reserved_1 as u64
  1922. });
  1923. __bindgen_bitfield_unit
  1924. }
  1925. }
  1926. #[repr(C)]
  1927. #[derive(Copy, Clone)]
  1928. pub struct perf_event_mmap_page {
  1929. pub version: __u32,
  1930. pub compat_version: __u32,
  1931. pub lock: __u32,
  1932. pub index: __u32,
  1933. pub offset: __s64,
  1934. pub time_enabled: __u64,
  1935. pub time_running: __u64,
  1936. pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1,
  1937. pub pmc_width: __u16,
  1938. pub time_shift: __u16,
  1939. pub time_mult: __u32,
  1940. pub time_offset: __u64,
  1941. pub time_zero: __u64,
  1942. pub size: __u32,
  1943. pub __reserved_1: __u32,
  1944. pub time_cycles: __u64,
  1945. pub time_mask: __u64,
  1946. pub __reserved: [__u8; 928usize],
  1947. pub data_head: __u64,
  1948. pub data_tail: __u64,
  1949. pub data_offset: __u64,
  1950. pub data_size: __u64,
  1951. pub aux_head: __u64,
  1952. pub aux_tail: __u64,
  1953. pub aux_offset: __u64,
  1954. pub aux_size: __u64,
  1955. }
  1956. #[repr(C)]
  1957. #[derive(Copy, Clone)]
  1958. pub union perf_event_mmap_page__bindgen_ty_1 {
  1959. pub capabilities: __u64,
  1960. pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1,
  1961. }
  1962. #[repr(C)]
  1963. #[repr(align(8))]
  1964. #[derive(Debug, Copy, Clone)]
  1965. pub struct perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 {
  1966. pub _bitfield_align_1: [u64; 0],
  1967. pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
  1968. }
  1969. impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 {
  1970. #[inline]
  1971. pub fn cap_bit0(&self) -> __u64 {
  1972. unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) }
  1973. }
  1974. #[inline]
  1975. pub fn set_cap_bit0(&mut self, val: __u64) {
  1976. unsafe {
  1977. let val: u64 = ::core::mem::transmute(val);
  1978. self._bitfield_1.set(0usize, 1u8, val as u64)
  1979. }
  1980. }
  1981. #[inline]
  1982. pub fn cap_bit0_is_deprecated(&self) -> __u64 {
  1983. unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) }
  1984. }
  1985. #[inline]
  1986. pub fn set_cap_bit0_is_deprecated(&mut self, val: __u64) {
  1987. unsafe {
  1988. let val: u64 = ::core::mem::transmute(val);
  1989. self._bitfield_1.set(1usize, 1u8, val as u64)
  1990. }
  1991. }
  1992. #[inline]
  1993. pub fn cap_user_rdpmc(&self) -> __u64 {
  1994. unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) }
  1995. }
  1996. #[inline]
  1997. pub fn set_cap_user_rdpmc(&mut self, val: __u64) {
  1998. unsafe {
  1999. let val: u64 = ::core::mem::transmute(val);
  2000. self._bitfield_1.set(2usize, 1u8, val as u64)
  2001. }
  2002. }
  2003. #[inline]
  2004. pub fn cap_user_time(&self) -> __u64 {
  2005. unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) }
  2006. }
  2007. #[inline]
  2008. pub fn set_cap_user_time(&mut self, val: __u64) {
  2009. unsafe {
  2010. let val: u64 = ::core::mem::transmute(val);
  2011. self._bitfield_1.set(3usize, 1u8, val as u64)
  2012. }
  2013. }
  2014. #[inline]
  2015. pub fn cap_user_time_zero(&self) -> __u64 {
  2016. unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) }
  2017. }
  2018. #[inline]
  2019. pub fn set_cap_user_time_zero(&mut self, val: __u64) {
  2020. unsafe {
  2021. let val: u64 = ::core::mem::transmute(val);
  2022. self._bitfield_1.set(4usize, 1u8, val as u64)
  2023. }
  2024. }
  2025. #[inline]
  2026. pub fn cap_user_time_short(&self) -> __u64 {
  2027. unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) }
  2028. }
  2029. #[inline]
  2030. pub fn set_cap_user_time_short(&mut self, val: __u64) {
  2031. unsafe {
  2032. let val: u64 = ::core::mem::transmute(val);
  2033. self._bitfield_1.set(5usize, 1u8, val as u64)
  2034. }
  2035. }
  2036. #[inline]
  2037. pub fn cap_____res(&self) -> __u64 {
  2038. unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) }
  2039. }
  2040. #[inline]
  2041. pub fn set_cap_____res(&mut self, val: __u64) {
  2042. unsafe {
  2043. let val: u64 = ::core::mem::transmute(val);
  2044. self._bitfield_1.set(6usize, 58u8, val as u64)
  2045. }
  2046. }
  2047. #[inline]
  2048. pub fn new_bitfield_1(
  2049. cap_bit0: __u64,
  2050. cap_bit0_is_deprecated: __u64,
  2051. cap_user_rdpmc: __u64,
  2052. cap_user_time: __u64,
  2053. cap_user_time_zero: __u64,
  2054. cap_user_time_short: __u64,
  2055. cap_____res: __u64,
  2056. ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
  2057. let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
  2058. __bindgen_bitfield_unit.set(0usize, 1u8, {
  2059. let cap_bit0: u64 = unsafe { ::core::mem::transmute(cap_bit0) };
  2060. cap_bit0 as u64
  2061. });
  2062. __bindgen_bitfield_unit.set(1usize, 1u8, {
  2063. let cap_bit0_is_deprecated: u64 =
  2064. unsafe { ::core::mem::transmute(cap_bit0_is_deprecated) };
  2065. cap_bit0_is_deprecated as u64
  2066. });
  2067. __bindgen_bitfield_unit.set(2usize, 1u8, {
  2068. let cap_user_rdpmc: u64 = unsafe { ::core::mem::transmute(cap_user_rdpmc) };
  2069. cap_user_rdpmc as u64
  2070. });
  2071. __bindgen_bitfield_unit.set(3usize, 1u8, {
  2072. let cap_user_time: u64 = unsafe { ::core::mem::transmute(cap_user_time) };
  2073. cap_user_time as u64
  2074. });
  2075. __bindgen_bitfield_unit.set(4usize, 1u8, {
  2076. let cap_user_time_zero: u64 = unsafe { ::core::mem::transmute(cap_user_time_zero) };
  2077. cap_user_time_zero as u64
  2078. });
  2079. __bindgen_bitfield_unit.set(5usize, 1u8, {
  2080. let cap_user_time_short: u64 = unsafe { ::core::mem::transmute(cap_user_time_short) };
  2081. cap_user_time_short as u64
  2082. });
  2083. __bindgen_bitfield_unit.set(6usize, 58u8, {
  2084. let cap_____res: u64 = unsafe { ::core::mem::transmute(cap_____res) };
  2085. cap_____res as u64
  2086. });
  2087. __bindgen_bitfield_unit
  2088. }
  2089. }
  2090. #[repr(C)]
  2091. #[derive(Debug, Copy, Clone)]
  2092. pub struct perf_event_header {
  2093. pub type_: __u32,
  2094. pub misc: __u16,
  2095. pub size: __u16,
  2096. }
  2097. #[repr(u32)]
  2098. #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
  2099. pub enum perf_event_type {
  2100. PERF_RECORD_MMAP = 1,
  2101. PERF_RECORD_LOST = 2,
  2102. PERF_RECORD_COMM = 3,
  2103. PERF_RECORD_EXIT = 4,
  2104. PERF_RECORD_THROTTLE = 5,
  2105. PERF_RECORD_UNTHROTTLE = 6,
  2106. PERF_RECORD_FORK = 7,
  2107. PERF_RECORD_READ = 8,
  2108. PERF_RECORD_SAMPLE = 9,
  2109. PERF_RECORD_MMAP2 = 10,
  2110. PERF_RECORD_AUX = 11,
  2111. PERF_RECORD_ITRACE_START = 12,
  2112. PERF_RECORD_LOST_SAMPLES = 13,
  2113. PERF_RECORD_SWITCH = 14,
  2114. PERF_RECORD_SWITCH_CPU_WIDE = 15,
  2115. PERF_RECORD_NAMESPACES = 16,
  2116. PERF_RECORD_KSYMBOL = 17,
  2117. PERF_RECORD_BPF_EVENT = 18,
  2118. PERF_RECORD_CGROUP = 19,
  2119. PERF_RECORD_TEXT_POKE = 20,
  2120. PERF_RECORD_AUX_OUTPUT_HW_ID = 21,
  2121. PERF_RECORD_MAX = 22,
  2122. }
  2123. pub const IFLA_XDP_UNSPEC: _bindgen_ty_90 = 0;
  2124. pub const IFLA_XDP_FD: _bindgen_ty_90 = 1;
  2125. pub const IFLA_XDP_ATTACHED: _bindgen_ty_90 = 2;
  2126. pub const IFLA_XDP_FLAGS: _bindgen_ty_90 = 3;
  2127. pub const IFLA_XDP_PROG_ID: _bindgen_ty_90 = 4;
  2128. pub const IFLA_XDP_DRV_PROG_ID: _bindgen_ty_90 = 5;
  2129. pub const IFLA_XDP_SKB_PROG_ID: _bindgen_ty_90 = 6;
  2130. pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_90 = 7;
  2131. pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_90 = 8;
  2132. pub const __IFLA_XDP_MAX: _bindgen_ty_90 = 9;
  2133. pub type _bindgen_ty_90 = ::core::ffi::c_uint;
  2134. #[repr(C)]
  2135. #[derive(Debug, Copy, Clone)]
  2136. pub struct ifinfomsg {
  2137. pub ifi_family: ::core::ffi::c_uchar,
  2138. pub __ifi_pad: ::core::ffi::c_uchar,
  2139. pub ifi_type: ::core::ffi::c_ushort,
  2140. pub ifi_index: ::core::ffi::c_int,
  2141. pub ifi_flags: ::core::ffi::c_uint,
  2142. pub ifi_change: ::core::ffi::c_uint,
  2143. }
  2144. #[repr(C)]
  2145. #[derive(Debug, Copy, Clone)]
  2146. pub struct tcmsg {
  2147. pub tcm_family: ::core::ffi::c_uchar,
  2148. pub tcm__pad1: ::core::ffi::c_uchar,
  2149. pub tcm__pad2: ::core::ffi::c_ushort,
  2150. pub tcm_ifindex: ::core::ffi::c_int,
  2151. pub tcm_handle: __u32,
  2152. pub tcm_parent: __u32,
  2153. pub tcm_info: __u32,
  2154. }
  2155. pub const TCA_UNSPEC: _bindgen_ty_103 = 0;
  2156. pub const TCA_KIND: _bindgen_ty_103 = 1;
  2157. pub const TCA_OPTIONS: _bindgen_ty_103 = 2;
  2158. pub const TCA_STATS: _bindgen_ty_103 = 3;
  2159. pub const TCA_XSTATS: _bindgen_ty_103 = 4;
  2160. pub const TCA_RATE: _bindgen_ty_103 = 5;
  2161. pub const TCA_FCNT: _bindgen_ty_103 = 6;
  2162. pub const TCA_STATS2: _bindgen_ty_103 = 7;
  2163. pub const TCA_STAB: _bindgen_ty_103 = 8;
  2164. pub const TCA_PAD: _bindgen_ty_103 = 9;
  2165. pub const TCA_DUMP_INVISIBLE: _bindgen_ty_103 = 10;
  2166. pub const TCA_CHAIN: _bindgen_ty_103 = 11;
  2167. pub const TCA_HW_OFFLOAD: _bindgen_ty_103 = 12;
  2168. pub const TCA_INGRESS_BLOCK: _bindgen_ty_103 = 13;
  2169. pub const TCA_EGRESS_BLOCK: _bindgen_ty_103 = 14;
  2170. pub const __TCA_MAX: _bindgen_ty_103 = 15;
  2171. pub type _bindgen_ty_103 = ::core::ffi::c_uint;
  2172. pub const TCA_BPF_UNSPEC: _bindgen_ty_159 = 0;
  2173. pub const TCA_BPF_ACT: _bindgen_ty_159 = 1;
  2174. pub const TCA_BPF_POLICE: _bindgen_ty_159 = 2;
  2175. pub const TCA_BPF_CLASSID: _bindgen_ty_159 = 3;
  2176. pub const TCA_BPF_OPS_LEN: _bindgen_ty_159 = 4;
  2177. pub const TCA_BPF_OPS: _bindgen_ty_159 = 5;
  2178. pub const TCA_BPF_FD: _bindgen_ty_159 = 6;
  2179. pub const TCA_BPF_NAME: _bindgen_ty_159 = 7;
  2180. pub const TCA_BPF_FLAGS: _bindgen_ty_159 = 8;
  2181. pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_159 = 9;
  2182. pub const TCA_BPF_TAG: _bindgen_ty_159 = 10;
  2183. pub const TCA_BPF_ID: _bindgen_ty_159 = 11;
  2184. pub const __TCA_BPF_MAX: _bindgen_ty_159 = 12;
  2185. pub type _bindgen_ty_159 = ::core::ffi::c_uint;
  2186. pub const AYA_PERF_EVENT_IOC_ENABLE: ::core::ffi::c_int = 9216;
  2187. pub const AYA_PERF_EVENT_IOC_DISABLE: ::core::ffi::c_int = 9217;
  2188. pub const AYA_PERF_EVENT_IOC_SET_BPF: ::core::ffi::c_int = 1074013192;