linux_bindings_x86_64.rs 79 KB

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