linux_bindings_x86_64.rs 77 KB

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