linux_bindings_aarch64.rs 68 KB

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