linux_bindings_aarch64.rs 78 KB

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