@ -182,19 +182,19 @@ unsafe fn try_{{crate_name}}(ctx: XdpContext) -> Result<u32, u32> {
{ % - when "classifier" % }
{ % - when "classifier" % }
use aya_bpf ::{
use aya_bpf ::{
macros ::classifier ,
macros ::classifier ,
programs ::SkBuff Context,
programs ::Tc Context,
} ;
} ;
use aya_log_ebpf ::info ;
use aya_log_ebpf ::info ;
#[ classifier(name= " {{crate_name}} " ) ]
#[ classifier(name= " {{crate_name}} " ) ]
pub fn { { crate_name } } ( ctx : SkBuff Context) -> i32 {
pub fn { { crate_name } } ( ctx : Tc Context) -> i32 {
match unsafe { try_ { { crate_name } } ( ctx ) } {
match unsafe { try_ { { crate_name } } ( ctx ) } {
Ok ( ret ) = > ret ,
Ok ( ret ) = > ret ,
Err ( ret ) = > ret ,
Err ( ret ) = > ret ,
}
}
}
}
unsafe fn try_ { { crate_name } } ( ctx : SkBuff Context) -> Result < i32 , i32 > {
unsafe fn try_ { { crate_name } } ( ctx : Tc Context) -> Result < i32 , i32 > {
info ! ( & ctx , "received a packet" ) ;
info ! ( & ctx , "received a packet" ) ;
Ok ( 0 )
Ok ( 0 )
}
}