aya-obj: Remove name from ProgramSection

The name here is never used as we get the program name from the symbol
table instead.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
reviewable/pr720/r3
Dave Tucker 2 years ago
parent 368ddf10c4
commit 60d2fea35a

@ -188,35 +188,6 @@ pub struct Function {
/// ///
/// [Program Types and ELF Sections]: https://docs.kernel.org/bpf/libbpf/program_types.html /// [Program Types and ELF Sections]: https://docs.kernel.org/bpf/libbpf/program_types.html
/// ///
/// ## Program Name
///
/// Each section name is parsed into a section type and a program name.
///
/// Generally speaking,
/// - if the section name does not contain any slashes,
/// then the program name is just that section name;
/// - if there are some slashes, the name is `section_name.rsplitn(2, '/')[0]`,
/// - except for tracepoint programs, for which the name is
/// `section_name.splitn(2, '/')[1]`.
///
/// ```rust
/// use aya_obj::ProgramSection;
/// use std::str::FromStr;
///
/// assert_eq!(
/// ProgramSection::from_str("kprobe/do_unlinkat")
/// .unwrap().name(),
/// "do_unlinkat",
/// );
/// assert_eq!(
/// ProgramSection::from_str("tracepoint/syscalls/sys_enter_openat")
/// .unwrap().name(),
/// "syscalls/sys_enter_openat",
/// );
/// ```
///
/// The program name will be used in [Object] as references to each program.
///
/// # Unsupported Sections /// # Unsupported Sections
/// ///
/// Currently, the following section names are not supported yet: /// Currently, the following section names are not supported yet:
@ -240,135 +211,45 @@ pub struct Function {
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
#[allow(missing_docs)] #[allow(missing_docs)]
pub enum ProgramSection { pub enum ProgramSection {
KRetProbe { KRetProbe,
name: String, KProbe,
}, UProbe,
KProbe { URetProbe,
name: String, TracePoint,
}, SocketFilter,
UProbe {
name: String,
},
URetProbe {
name: String,
},
TracePoint {
name: String,
},
SocketFilter {
name: String,
},
Xdp { Xdp {
name: String,
frags: bool, frags: bool,
}, },
SkMsg { SkMsg,
name: String, SkSkbStreamParser,
}, SkSkbStreamVerdict,
SkSkbStreamParser { SockOps,
name: String, SchedClassifier,
}, CgroupSkb,
SkSkbStreamVerdict { CgroupSkbIngress,
name: String, CgroupSkbEgress,
},
SockOps {
name: String,
},
SchedClassifier {
name: String,
},
CgroupSkb {
name: String,
},
CgroupSkbIngress {
name: String,
},
CgroupSkbEgress {
name: String,
},
CgroupSockAddr { CgroupSockAddr {
name: String,
attach_type: CgroupSockAddrAttachType, attach_type: CgroupSockAddrAttachType,
}, },
CgroupSysctl { CgroupSysctl,
name: String,
},
CgroupSockopt { CgroupSockopt {
name: String,
attach_type: CgroupSockoptAttachType, attach_type: CgroupSockoptAttachType,
}, },
LircMode2 { LircMode2,
name: String, PerfEvent,
}, RawTracePoint,
PerfEvent {
name: String,
},
RawTracePoint {
name: String,
},
Lsm { Lsm {
name: String,
sleepable: bool, sleepable: bool,
}, },
BtfTracePoint { BtfTracePoint,
name: String, FEntry,
}, FExit,
FEntry { Extension,
name: String, SkLookup,
},
FExit {
name: String,
},
Extension {
name: String,
},
SkLookup {
name: String,
},
CgroupSock { CgroupSock {
name: String,
attach_type: CgroupSockAttachType, attach_type: CgroupSockAttachType,
}, },
CgroupDevice { CgroupDevice,
name: String,
},
}
impl ProgramSection {
/// Returns the program name
pub fn name(&self) -> &str {
match self {
ProgramSection::KRetProbe { name } => name,
ProgramSection::KProbe { name } => name,
ProgramSection::UProbe { name } => name,
ProgramSection::URetProbe { name } => name,
ProgramSection::TracePoint { name } => name,
ProgramSection::SocketFilter { name } => name,
ProgramSection::Xdp { name, .. } => name,
ProgramSection::SkMsg { name } => name,
ProgramSection::SkSkbStreamParser { name } => name,
ProgramSection::SkSkbStreamVerdict { name } => name,
ProgramSection::SockOps { name } => name,
ProgramSection::SchedClassifier { name } => name,
ProgramSection::CgroupSkb { name, .. } => name,
ProgramSection::CgroupSkbIngress { name, .. } => name,
ProgramSection::CgroupSkbEgress { name, .. } => name,
ProgramSection::CgroupSockAddr { name, .. } => name,
ProgramSection::CgroupSysctl { name } => name,
ProgramSection::CgroupSockopt { name, .. } => name,
ProgramSection::LircMode2 { name } => name,
ProgramSection::PerfEvent { name } => name,
ProgramSection::RawTracePoint { name } => name,
ProgramSection::Lsm { name, .. } => name,
ProgramSection::BtfTracePoint { name } => name,
ProgramSection::FEntry { name } => name,
ProgramSection::FExit { name } => name,
ProgramSection::Extension { name } => name,
ProgramSection::SkLookup { name } => name,
ProgramSection::CgroupSock { name, .. } => name,
ProgramSection::CgroupDevice { name } => name,
}
}
} }
impl FromStr for ProgramSection { impl FromStr for ProgramSection {
@ -383,70 +264,61 @@ impl FromStr for ProgramSection {
None => (section, section), None => (section, section),
Some((kind, name)) => (kind, name), Some((kind, name)) => (kind, name),
}; };
let name = name.to_owned();
Ok(match kind { Ok(match kind {
"kprobe" => KProbe { name }, "kprobe" => KProbe,
"kretprobe" => KRetProbe { name }, "kretprobe" => KRetProbe,
"uprobe" => UProbe { name }, "uprobe" => UProbe,
"uretprobe" => URetProbe { name }, "uretprobe" => URetProbe,
"xdp" => Xdp { name, frags: false }, "xdp" => Xdp { frags: false },
"xdp.frags" => Xdp { name, frags: true }, "xdp.frags" => Xdp { frags: true },
"tp_btf" => BtfTracePoint { name }, "tp_btf" => BtfTracePoint,
_ if kind.starts_with("tracepoint") || kind.starts_with("tp") => { kind if kind.starts_with("tracepoint") || kind.starts_with("tp") => TracePoint,
// tracepoint sections are named `tracepoint/category/event_name`, "socket" => SocketFilter,
// and we want to parse the name as "category/event_name" "sk_msg" => SkMsg,
let name = section.splitn(2, '/').last().unwrap().to_owned(); "sk_skb" => match name {
TracePoint { name } "stream_parser" => SkSkbStreamParser,
} "stream_verdict" => SkSkbStreamVerdict,
"socket" => SocketFilter { name },
"sk_msg" => SkMsg { name },
"sk_skb" => match &*name {
"stream_parser" => SkSkbStreamParser { name },
"stream_verdict" => SkSkbStreamVerdict { name },
_ => { _ => {
return Err(ParseError::InvalidProgramSection { return Err(ParseError::InvalidProgramSection {
section: section.to_owned(), section: section.to_owned(),
}) })
} }
}, },
"sk_skb/stream_parser" => SkSkbStreamParser { name }, "sk_skb/stream_parser" => SkSkbStreamParser,
"sk_skb/stream_verdict" => SkSkbStreamVerdict { name }, "sk_skb/stream_verdict" => SkSkbStreamVerdict,
"sockops" => SockOps { name }, "sockops" => SockOps,
"classifier" => SchedClassifier { name }, "classifier" => SchedClassifier,
"cgroup_skb" => match &*name { "cgroup_skb" => match name {
"ingress" => CgroupSkbIngress { name }, "ingress" => CgroupSkbIngress,
"egress" => CgroupSkbEgress { name }, "egress" => CgroupSkbEgress,
_ => { _ => {
return Err(ParseError::InvalidProgramSection { return Err(ParseError::InvalidProgramSection {
section: section.to_owned(), section: section.to_owned(),
}) })
} }
}, },
"cgroup_skb/ingress" => CgroupSkbIngress { name }, "cgroup_skb/ingress" => CgroupSkbIngress,
"cgroup_skb/egress" => CgroupSkbEgress { name }, "cgroup_skb/egress" => CgroupSkbEgress,
"cgroup/skb" => CgroupSkb { name }, "cgroup/skb" => CgroupSkb,
"cgroup/sock" => CgroupSock { "cgroup/sock" => CgroupSock {
name,
attach_type: CgroupSockAttachType::default(), attach_type: CgroupSockAttachType::default(),
}, },
"cgroup/sysctl" => CgroupSysctl { name }, "cgroup/sysctl" => CgroupSysctl,
"cgroup/dev" => CgroupDevice { name }, "cgroup/dev" => CgroupDevice,
"cgroup/getsockopt" => CgroupSockopt { "cgroup/getsockopt" => CgroupSockopt {
name,
attach_type: CgroupSockoptAttachType::Get, attach_type: CgroupSockoptAttachType::Get,
}, },
"cgroup/setsockopt" => CgroupSockopt { "cgroup/setsockopt" => CgroupSockopt {
name,
attach_type: CgroupSockoptAttachType::Set, attach_type: CgroupSockoptAttachType::Set,
}, },
"cgroup" => match &*name { "cgroup" => match name {
"skb" => CgroupSkb { name }, "skb" => CgroupSkb,
"sysctl" => CgroupSysctl { name }, "sysctl" => CgroupSysctl,
"dev" => CgroupDevice { name }, "dev" => CgroupDevice,
"getsockopt" | "setsockopt" => { "getsockopt" | "setsockopt" => {
if let Ok(attach_type) = CgroupSockoptAttachType::try_from(name.as_str()) { if let Ok(attach_type) = CgroupSockoptAttachType::try_from(name) {
CgroupSockopt { name, attach_type } CgroupSockopt { attach_type }
} else { } else {
return Err(ParseError::InvalidProgramSection { return Err(ParseError::InvalidProgramSection {
section: section.to_owned(), section: section.to_owned(),
@ -454,21 +326,20 @@ impl FromStr for ProgramSection {
} }
} }
"sock" => CgroupSock { "sock" => CgroupSock {
name,
attach_type: CgroupSockAttachType::default(), attach_type: CgroupSockAttachType::default(),
}, },
"post_bind4" | "post_bind6" | "sock_create" | "sock_release" => { "post_bind4" | "post_bind6" | "sock_create" | "sock_release" => {
if let Ok(attach_type) = CgroupSockAttachType::try_from(name.as_str()) { if let Ok(attach_type) = CgroupSockAttachType::try_from(name) {
CgroupSock { name, attach_type } CgroupSock { attach_type }
} else { } else {
return Err(ParseError::InvalidProgramSection { return Err(ParseError::InvalidProgramSection {
section: section.to_owned(), section: section.to_owned(),
}); });
} }
} }
_ => { name => {
if let Ok(attach_type) = CgroupSockAddrAttachType::try_from(name.as_str()) { if let Ok(attach_type) = CgroupSockAddrAttachType::try_from(name) {
CgroupSockAddr { name, attach_type } CgroupSockAddr { attach_type }
} else { } else {
return Err(ParseError::InvalidProgramSection { return Err(ParseError::InvalidProgramSection {
section: section.to_owned(), section: section.to_owned(),
@ -477,84 +348,62 @@ impl FromStr for ProgramSection {
} }
}, },
"cgroup/post_bind4" => CgroupSock { "cgroup/post_bind4" => CgroupSock {
name,
attach_type: CgroupSockAttachType::PostBind4, attach_type: CgroupSockAttachType::PostBind4,
}, },
"cgroup/post_bind6" => CgroupSock { "cgroup/post_bind6" => CgroupSock {
name,
attach_type: CgroupSockAttachType::PostBind6, attach_type: CgroupSockAttachType::PostBind6,
}, },
"cgroup/sock_create" => CgroupSock { "cgroup/sock_create" => CgroupSock {
name,
attach_type: CgroupSockAttachType::SockCreate, attach_type: CgroupSockAttachType::SockCreate,
}, },
"cgroup/sock_release" => CgroupSock { "cgroup/sock_release" => CgroupSock {
name,
attach_type: CgroupSockAttachType::SockRelease, attach_type: CgroupSockAttachType::SockRelease,
}, },
"cgroup/bind4" => CgroupSockAddr { "cgroup/bind4" => CgroupSockAddr {
name,
attach_type: CgroupSockAddrAttachType::Bind4, attach_type: CgroupSockAddrAttachType::Bind4,
}, },
"cgroup/bind6" => CgroupSockAddr { "cgroup/bind6" => CgroupSockAddr {
name,
attach_type: CgroupSockAddrAttachType::Bind6, attach_type: CgroupSockAddrAttachType::Bind6,
}, },
"cgroup/connect4" => CgroupSockAddr { "cgroup/connect4" => CgroupSockAddr {
name,
attach_type: CgroupSockAddrAttachType::Connect4, attach_type: CgroupSockAddrAttachType::Connect4,
}, },
"cgroup/connect6" => CgroupSockAddr { "cgroup/connect6" => CgroupSockAddr {
name,
attach_type: CgroupSockAddrAttachType::Connect6, attach_type: CgroupSockAddrAttachType::Connect6,
}, },
"cgroup/getpeername4" => CgroupSockAddr { "cgroup/getpeername4" => CgroupSockAddr {
name,
attach_type: CgroupSockAddrAttachType::GetPeerName4, attach_type: CgroupSockAddrAttachType::GetPeerName4,
}, },
"cgroup/getpeername6" => CgroupSockAddr { "cgroup/getpeername6" => CgroupSockAddr {
name,
attach_type: CgroupSockAddrAttachType::GetPeerName6, attach_type: CgroupSockAddrAttachType::GetPeerName6,
}, },
"cgroup/getsockname4" => CgroupSockAddr { "cgroup/getsockname4" => CgroupSockAddr {
name,
attach_type: CgroupSockAddrAttachType::GetSockName4, attach_type: CgroupSockAddrAttachType::GetSockName4,
}, },
"cgroup/getsockname6" => CgroupSockAddr { "cgroup/getsockname6" => CgroupSockAddr {
name,
attach_type: CgroupSockAddrAttachType::GetSockName6, attach_type: CgroupSockAddrAttachType::GetSockName6,
}, },
"cgroup/sendmsg4" => CgroupSockAddr { "cgroup/sendmsg4" => CgroupSockAddr {
name,
attach_type: CgroupSockAddrAttachType::UDPSendMsg4, attach_type: CgroupSockAddrAttachType::UDPSendMsg4,
}, },
"cgroup/sendmsg6" => CgroupSockAddr { "cgroup/sendmsg6" => CgroupSockAddr {
name,
attach_type: CgroupSockAddrAttachType::UDPSendMsg6, attach_type: CgroupSockAddrAttachType::UDPSendMsg6,
}, },
"cgroup/recvmsg4" => CgroupSockAddr { "cgroup/recvmsg4" => CgroupSockAddr {
name,
attach_type: CgroupSockAddrAttachType::UDPRecvMsg4, attach_type: CgroupSockAddrAttachType::UDPRecvMsg4,
}, },
"cgroup/recvmsg6" => CgroupSockAddr { "cgroup/recvmsg6" => CgroupSockAddr {
name,
attach_type: CgroupSockAddrAttachType::UDPRecvMsg6, attach_type: CgroupSockAddrAttachType::UDPRecvMsg6,
}, },
"lirc_mode2" => LircMode2 { name }, "lirc_mode2" => LircMode2,
"perf_event" => PerfEvent { name }, "perf_event" => PerfEvent,
"raw_tp" | "raw_tracepoint" => RawTracePoint { name }, "raw_tp" | "raw_tracepoint" => RawTracePoint,
"lsm" => Lsm { "lsm" => Lsm { sleepable: false },
name, "lsm.s" => Lsm { sleepable: true },
sleepable: false, "fentry" => FEntry,
}, "fexit" => FExit,
"lsm.s" => Lsm { "freplace" => Extension,
name, "sk_lookup" => SkLookup,
sleepable: true,
},
"fentry" => FEntry { name },
"fexit" => FExit { name },
"freplace" => Extension { name },
"sk_lookup" => SkLookup { name },
_ => { _ => {
return Err(ParseError::InvalidProgramSection { return Err(ParseError::InvalidProgramSection {
section: section.to_owned(), section: section.to_owned(),

@ -9,8 +9,10 @@ fn run_with_rbpf() {
let object = Object::parse(crate::PASS).unwrap(); let object = Object::parse(crate::PASS).unwrap();
assert_eq!(object.programs.len(), 1); assert_eq!(object.programs.len(), 1);
assert_matches!(object.programs["pass"].section, ProgramSection::Xdp { .. }); assert_matches!(
assert_eq!(object.programs["pass"].section.name(), "xdp.frags"); object.programs["pass"].section,
ProgramSection::Xdp { frags: true }
);
let instructions = &object let instructions = &object
.functions .functions
@ -40,7 +42,6 @@ fn use_map_with_rbpf() {
object.programs["bpf_prog"].section, object.programs["bpf_prog"].section,
ProgramSection::TracePoint { .. } ProgramSection::TracePoint { .. }
); );
assert_eq!(object.programs["bpf_prog"].section.name(), "tracepoint");
// Initialize maps: // Initialize maps:
// - fd: 0xCAFE00 or 0xCAFE01 (the 0xCAFE00 part is used to distinguish fds from indices), // - fd: 0xCAFE00 or 0xCAFE01 (the 0xCAFE00 part is used to distinguish fds from indices),

@ -5813,70 +5813,39 @@ impl<T> core::convert::From<T> for aya_obj::ParseError
pub fn aya_obj::ParseError::from(t: T) -> T pub fn aya_obj::ParseError::from(t: T) -> T
pub enum aya_obj::obj::ProgramSection pub enum aya_obj::obj::ProgramSection
pub aya_obj::obj::ProgramSection::BtfTracePoint pub aya_obj::obj::ProgramSection::BtfTracePoint
pub aya_obj::obj::ProgramSection::BtfTracePoint::name: alloc::string::String
pub aya_obj::obj::ProgramSection::CgroupDevice pub aya_obj::obj::ProgramSection::CgroupDevice
pub aya_obj::obj::ProgramSection::CgroupDevice::name: alloc::string::String
pub aya_obj::obj::ProgramSection::CgroupSkb pub aya_obj::obj::ProgramSection::CgroupSkb
pub aya_obj::obj::ProgramSection::CgroupSkb::name: alloc::string::String
pub aya_obj::obj::ProgramSection::CgroupSkbEgress pub aya_obj::obj::ProgramSection::CgroupSkbEgress
pub aya_obj::obj::ProgramSection::CgroupSkbEgress::name: alloc::string::String
pub aya_obj::obj::ProgramSection::CgroupSkbIngress pub aya_obj::obj::ProgramSection::CgroupSkbIngress
pub aya_obj::obj::ProgramSection::CgroupSkbIngress::name: alloc::string::String
pub aya_obj::obj::ProgramSection::CgroupSock pub aya_obj::obj::ProgramSection::CgroupSock
pub aya_obj::obj::ProgramSection::CgroupSock::attach_type: aya_obj::programs::cgroup_sock::CgroupSockAttachType pub aya_obj::obj::ProgramSection::CgroupSock::attach_type: aya_obj::programs::cgroup_sock::CgroupSockAttachType
pub aya_obj::obj::ProgramSection::CgroupSock::name: alloc::string::String
pub aya_obj::obj::ProgramSection::CgroupSockAddr pub aya_obj::obj::ProgramSection::CgroupSockAddr
pub aya_obj::obj::ProgramSection::CgroupSockAddr::attach_type: aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType pub aya_obj::obj::ProgramSection::CgroupSockAddr::attach_type: aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType
pub aya_obj::obj::ProgramSection::CgroupSockAddr::name: alloc::string::String
pub aya_obj::obj::ProgramSection::CgroupSockopt pub aya_obj::obj::ProgramSection::CgroupSockopt
pub aya_obj::obj::ProgramSection::CgroupSockopt::attach_type: aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType pub aya_obj::obj::ProgramSection::CgroupSockopt::attach_type: aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType
pub aya_obj::obj::ProgramSection::CgroupSockopt::name: alloc::string::String
pub aya_obj::obj::ProgramSection::CgroupSysctl pub aya_obj::obj::ProgramSection::CgroupSysctl
pub aya_obj::obj::ProgramSection::CgroupSysctl::name: alloc::string::String
pub aya_obj::obj::ProgramSection::Extension pub aya_obj::obj::ProgramSection::Extension
pub aya_obj::obj::ProgramSection::Extension::name: alloc::string::String
pub aya_obj::obj::ProgramSection::FEntry pub aya_obj::obj::ProgramSection::FEntry
pub aya_obj::obj::ProgramSection::FEntry::name: alloc::string::String
pub aya_obj::obj::ProgramSection::FExit pub aya_obj::obj::ProgramSection::FExit
pub aya_obj::obj::ProgramSection::FExit::name: alloc::string::String
pub aya_obj::obj::ProgramSection::KProbe pub aya_obj::obj::ProgramSection::KProbe
pub aya_obj::obj::ProgramSection::KProbe::name: alloc::string::String
pub aya_obj::obj::ProgramSection::KRetProbe pub aya_obj::obj::ProgramSection::KRetProbe
pub aya_obj::obj::ProgramSection::KRetProbe::name: alloc::string::String
pub aya_obj::obj::ProgramSection::LircMode2 pub aya_obj::obj::ProgramSection::LircMode2
pub aya_obj::obj::ProgramSection::LircMode2::name: alloc::string::String
pub aya_obj::obj::ProgramSection::Lsm pub aya_obj::obj::ProgramSection::Lsm
pub aya_obj::obj::ProgramSection::Lsm::name: alloc::string::String
pub aya_obj::obj::ProgramSection::Lsm::sleepable: bool pub aya_obj::obj::ProgramSection::Lsm::sleepable: bool
pub aya_obj::obj::ProgramSection::PerfEvent pub aya_obj::obj::ProgramSection::PerfEvent
pub aya_obj::obj::ProgramSection::PerfEvent::name: alloc::string::String
pub aya_obj::obj::ProgramSection::RawTracePoint pub aya_obj::obj::ProgramSection::RawTracePoint
pub aya_obj::obj::ProgramSection::RawTracePoint::name: alloc::string::String
pub aya_obj::obj::ProgramSection::SchedClassifier pub aya_obj::obj::ProgramSection::SchedClassifier
pub aya_obj::obj::ProgramSection::SchedClassifier::name: alloc::string::String
pub aya_obj::obj::ProgramSection::SkLookup pub aya_obj::obj::ProgramSection::SkLookup
pub aya_obj::obj::ProgramSection::SkLookup::name: alloc::string::String
pub aya_obj::obj::ProgramSection::SkMsg pub aya_obj::obj::ProgramSection::SkMsg
pub aya_obj::obj::ProgramSection::SkMsg::name: alloc::string::String
pub aya_obj::obj::ProgramSection::SkSkbStreamParser pub aya_obj::obj::ProgramSection::SkSkbStreamParser
pub aya_obj::obj::ProgramSection::SkSkbStreamParser::name: alloc::string::String
pub aya_obj::obj::ProgramSection::SkSkbStreamVerdict pub aya_obj::obj::ProgramSection::SkSkbStreamVerdict
pub aya_obj::obj::ProgramSection::SkSkbStreamVerdict::name: alloc::string::String
pub aya_obj::obj::ProgramSection::SockOps pub aya_obj::obj::ProgramSection::SockOps
pub aya_obj::obj::ProgramSection::SockOps::name: alloc::string::String
pub aya_obj::obj::ProgramSection::SocketFilter pub aya_obj::obj::ProgramSection::SocketFilter
pub aya_obj::obj::ProgramSection::SocketFilter::name: alloc::string::String
pub aya_obj::obj::ProgramSection::TracePoint pub aya_obj::obj::ProgramSection::TracePoint
pub aya_obj::obj::ProgramSection::TracePoint::name: alloc::string::String
pub aya_obj::obj::ProgramSection::UProbe pub aya_obj::obj::ProgramSection::UProbe
pub aya_obj::obj::ProgramSection::UProbe::name: alloc::string::String
pub aya_obj::obj::ProgramSection::URetProbe pub aya_obj::obj::ProgramSection::URetProbe
pub aya_obj::obj::ProgramSection::URetProbe::name: alloc::string::String
pub aya_obj::obj::ProgramSection::Xdp pub aya_obj::obj::ProgramSection::Xdp
pub aya_obj::obj::ProgramSection::Xdp::frags: bool pub aya_obj::obj::ProgramSection::Xdp::frags: bool
pub aya_obj::obj::ProgramSection::Xdp::name: alloc::string::String
impl aya_obj::ProgramSection
pub fn aya_obj::ProgramSection::name(&self) -> &str
impl core::str::traits::FromStr for aya_obj::ProgramSection impl core::str::traits::FromStr for aya_obj::ProgramSection
pub type aya_obj::ProgramSection::Err = aya_obj::ParseError pub type aya_obj::ProgramSection::Err = aya_obj::ParseError
pub fn aya_obj::ProgramSection::from_str(section: &str) -> core::result::Result<aya_obj::ProgramSection, aya_obj::ParseError> pub fn aya_obj::ProgramSection::from_str(section: &str) -> core::result::Result<aya_obj::ProgramSection, aya_obj::ParseError>
@ -6561,70 +6530,39 @@ impl<T> core::convert::From<T> for aya_obj::ParseError
pub fn aya_obj::ParseError::from(t: T) -> T pub fn aya_obj::ParseError::from(t: T) -> T
pub enum aya_obj::ProgramSection pub enum aya_obj::ProgramSection
pub aya_obj::ProgramSection::BtfTracePoint pub aya_obj::ProgramSection::BtfTracePoint
pub aya_obj::ProgramSection::BtfTracePoint::name: alloc::string::String
pub aya_obj::ProgramSection::CgroupDevice pub aya_obj::ProgramSection::CgroupDevice
pub aya_obj::ProgramSection::CgroupDevice::name: alloc::string::String
pub aya_obj::ProgramSection::CgroupSkb pub aya_obj::ProgramSection::CgroupSkb
pub aya_obj::ProgramSection::CgroupSkb::name: alloc::string::String
pub aya_obj::ProgramSection::CgroupSkbEgress pub aya_obj::ProgramSection::CgroupSkbEgress
pub aya_obj::ProgramSection::CgroupSkbEgress::name: alloc::string::String
pub aya_obj::ProgramSection::CgroupSkbIngress pub aya_obj::ProgramSection::CgroupSkbIngress
pub aya_obj::ProgramSection::CgroupSkbIngress::name: alloc::string::String
pub aya_obj::ProgramSection::CgroupSock pub aya_obj::ProgramSection::CgroupSock
pub aya_obj::ProgramSection::CgroupSock::attach_type: aya_obj::programs::cgroup_sock::CgroupSockAttachType pub aya_obj::ProgramSection::CgroupSock::attach_type: aya_obj::programs::cgroup_sock::CgroupSockAttachType
pub aya_obj::ProgramSection::CgroupSock::name: alloc::string::String
pub aya_obj::ProgramSection::CgroupSockAddr pub aya_obj::ProgramSection::CgroupSockAddr
pub aya_obj::ProgramSection::CgroupSockAddr::attach_type: aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType pub aya_obj::ProgramSection::CgroupSockAddr::attach_type: aya_obj::programs::cgroup_sock_addr::CgroupSockAddrAttachType
pub aya_obj::ProgramSection::CgroupSockAddr::name: alloc::string::String
pub aya_obj::ProgramSection::CgroupSockopt pub aya_obj::ProgramSection::CgroupSockopt
pub aya_obj::ProgramSection::CgroupSockopt::attach_type: aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType pub aya_obj::ProgramSection::CgroupSockopt::attach_type: aya_obj::programs::cgroup_sockopt::CgroupSockoptAttachType
pub aya_obj::ProgramSection::CgroupSockopt::name: alloc::string::String
pub aya_obj::ProgramSection::CgroupSysctl pub aya_obj::ProgramSection::CgroupSysctl
pub aya_obj::ProgramSection::CgroupSysctl::name: alloc::string::String
pub aya_obj::ProgramSection::Extension pub aya_obj::ProgramSection::Extension
pub aya_obj::ProgramSection::Extension::name: alloc::string::String
pub aya_obj::ProgramSection::FEntry pub aya_obj::ProgramSection::FEntry
pub aya_obj::ProgramSection::FEntry::name: alloc::string::String
pub aya_obj::ProgramSection::FExit pub aya_obj::ProgramSection::FExit
pub aya_obj::ProgramSection::FExit::name: alloc::string::String
pub aya_obj::ProgramSection::KProbe pub aya_obj::ProgramSection::KProbe
pub aya_obj::ProgramSection::KProbe::name: alloc::string::String
pub aya_obj::ProgramSection::KRetProbe pub aya_obj::ProgramSection::KRetProbe
pub aya_obj::ProgramSection::KRetProbe::name: alloc::string::String
pub aya_obj::ProgramSection::LircMode2 pub aya_obj::ProgramSection::LircMode2
pub aya_obj::ProgramSection::LircMode2::name: alloc::string::String
pub aya_obj::ProgramSection::Lsm pub aya_obj::ProgramSection::Lsm
pub aya_obj::ProgramSection::Lsm::name: alloc::string::String
pub aya_obj::ProgramSection::Lsm::sleepable: bool pub aya_obj::ProgramSection::Lsm::sleepable: bool
pub aya_obj::ProgramSection::PerfEvent pub aya_obj::ProgramSection::PerfEvent
pub aya_obj::ProgramSection::PerfEvent::name: alloc::string::String
pub aya_obj::ProgramSection::RawTracePoint pub aya_obj::ProgramSection::RawTracePoint
pub aya_obj::ProgramSection::RawTracePoint::name: alloc::string::String
pub aya_obj::ProgramSection::SchedClassifier pub aya_obj::ProgramSection::SchedClassifier
pub aya_obj::ProgramSection::SchedClassifier::name: alloc::string::String
pub aya_obj::ProgramSection::SkLookup pub aya_obj::ProgramSection::SkLookup
pub aya_obj::ProgramSection::SkLookup::name: alloc::string::String
pub aya_obj::ProgramSection::SkMsg pub aya_obj::ProgramSection::SkMsg
pub aya_obj::ProgramSection::SkMsg::name: alloc::string::String
pub aya_obj::ProgramSection::SkSkbStreamParser pub aya_obj::ProgramSection::SkSkbStreamParser
pub aya_obj::ProgramSection::SkSkbStreamParser::name: alloc::string::String
pub aya_obj::ProgramSection::SkSkbStreamVerdict pub aya_obj::ProgramSection::SkSkbStreamVerdict
pub aya_obj::ProgramSection::SkSkbStreamVerdict::name: alloc::string::String
pub aya_obj::ProgramSection::SockOps pub aya_obj::ProgramSection::SockOps
pub aya_obj::ProgramSection::SockOps::name: alloc::string::String
pub aya_obj::ProgramSection::SocketFilter pub aya_obj::ProgramSection::SocketFilter
pub aya_obj::ProgramSection::SocketFilter::name: alloc::string::String
pub aya_obj::ProgramSection::TracePoint pub aya_obj::ProgramSection::TracePoint
pub aya_obj::ProgramSection::TracePoint::name: alloc::string::String
pub aya_obj::ProgramSection::UProbe pub aya_obj::ProgramSection::UProbe
pub aya_obj::ProgramSection::UProbe::name: alloc::string::String
pub aya_obj::ProgramSection::URetProbe pub aya_obj::ProgramSection::URetProbe
pub aya_obj::ProgramSection::URetProbe::name: alloc::string::String
pub aya_obj::ProgramSection::Xdp pub aya_obj::ProgramSection::Xdp
pub aya_obj::ProgramSection::Xdp::frags: bool pub aya_obj::ProgramSection::Xdp::frags: bool
pub aya_obj::ProgramSection::Xdp::name: alloc::string::String
impl aya_obj::ProgramSection
pub fn aya_obj::ProgramSection::name(&self) -> &str
impl core::str::traits::FromStr for aya_obj::ProgramSection impl core::str::traits::FromStr for aya_obj::ProgramSection
pub type aya_obj::ProgramSection::Err = aya_obj::ParseError pub type aya_obj::ProgramSection::Err = aya_obj::ParseError
pub fn aya_obj::ProgramSection::from_str(section: &str) -> core::result::Result<aya_obj::ProgramSection, aya_obj::ParseError> pub fn aya_obj::ProgramSection::from_str(section: &str) -> core::result::Result<aya_obj::ProgramSection, aya_obj::ParseError>

@ -996,7 +996,7 @@ pub aya::maps::MapError::PinError
pub aya::maps::MapError::PinError::error: aya::pin::PinError pub aya::maps::MapError::PinError::error: aya::pin::PinError
pub aya::maps::MapError::PinError::name: core::option::Option<alloc::string::String> pub aya::maps::MapError::PinError::name: core::option::Option<alloc::string::String>
pub aya::maps::MapError::ProgramNotLoaded pub aya::maps::MapError::ProgramNotLoaded
pub aya::maps::MapError::SyscallError(crate::sys::SyscallError) pub aya::maps::MapError::SyscallError(SyscallError)
pub aya::maps::MapError::Unsupported pub aya::maps::MapError::Unsupported
pub aya::maps::MapError::Unsupported::map_type: u32 pub aya::maps::MapError::Unsupported::map_type: u32
impl core::convert::From<aya::maps::MapError> for aya::BpfError impl core::convert::From<aya::maps::MapError> for aya::BpfError
@ -1762,7 +1762,7 @@ pub aya::pin::PinError::InvalidPinPath
pub aya::pin::PinError::InvalidPinPath::error: alloc::string::String pub aya::pin::PinError::InvalidPinPath::error: alloc::string::String
pub aya::pin::PinError::NoFd pub aya::pin::PinError::NoFd
pub aya::pin::PinError::NoFd::name: alloc::string::String pub aya::pin::PinError::NoFd::name: alloc::string::String
pub aya::pin::PinError::SyscallError(crate::sys::SyscallError) pub aya::pin::PinError::SyscallError(SyscallError)
impl core::error::Error for aya::pin::PinError impl core::error::Error for aya::pin::PinError
pub fn aya::pin::PinError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> pub fn aya::pin::PinError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)>
impl core::fmt::Display for aya::pin::PinError impl core::fmt::Display for aya::pin::PinError
@ -3004,7 +3004,7 @@ pub fn aya::programs::kprobe::KProbeLinkId::from(t: T) -> T
pub mod aya::programs::links pub mod aya::programs::links
pub enum aya::programs::links::LinkError pub enum aya::programs::links::LinkError
pub aya::programs::links::LinkError::InvalidLink pub aya::programs::links::LinkError::InvalidLink
pub aya::programs::links::LinkError::SyscallError(crate::sys::SyscallError) pub aya::programs::links::LinkError::SyscallError(SyscallError)
impl core::error::Error for aya::programs::links::LinkError impl core::error::Error for aya::programs::links::LinkError
pub fn aya::programs::links::LinkError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> pub fn aya::programs::links::LinkError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)>
impl core::fmt::Display for aya::programs::links::LinkError impl core::fmt::Display for aya::programs::links::LinkError
@ -5167,7 +5167,7 @@ pub aya::programs::ProgramError::MapError(aya::maps::MapError)
pub aya::programs::ProgramError::NotAttached pub aya::programs::ProgramError::NotAttached
pub aya::programs::ProgramError::NotLoaded pub aya::programs::ProgramError::NotLoaded
pub aya::programs::ProgramError::SocketFilterError(aya::programs::SocketFilterError) pub aya::programs::ProgramError::SocketFilterError(aya::programs::SocketFilterError)
pub aya::programs::ProgramError::SyscallError(crate::sys::SyscallError) pub aya::programs::ProgramError::SyscallError(SyscallError)
pub aya::programs::ProgramError::TcError(aya::programs::tc::TcError) pub aya::programs::ProgramError::TcError(aya::programs::tc::TcError)
pub aya::programs::ProgramError::TracePointError(aya::programs::trace_point::TracePointError) pub aya::programs::ProgramError::TracePointError(aya::programs::trace_point::TracePointError)
pub aya::programs::ProgramError::UProbeError(aya::programs::uprobe::UProbeError) pub aya::programs::ProgramError::UProbeError(aya::programs::uprobe::UProbeError)

Loading…
Cancel
Save