소스 검색

tc: add SchedClassifierLink::attach_type() getter

The link already exposes priority() and handle(). Expose attach_type()
too.
Alessandro Decina 1 년 전
부모
커밋
b13645b13d
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      aya/src/programs/tc.rs

+ 5 - 0
aya/src/programs/tc.rs

@@ -292,6 +292,11 @@ impl SchedClassifierLink {
         })))
     }
 
+    /// Returns the attach type.
+    pub fn attach_type(&self) -> TcAttachType {
+        self.inner().attach_type
+    }
+
     /// Returns the allocated priority. If none was provided at attach time, this was allocated for you.
     pub fn priority(&self) -> u16 {
         self.inner().priority