Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0
0002  * Copyright (c) 2018 Davide Caratti, Red Hat inc.
0003  *
0004  * This program is free software; you can redistribute it and/or
0005  * modify it under the terms of version 2 of the GNU General Public
0006  * License as published by the Free Software Foundation.
0007  */
0008 
0009 #include <linux/bpf.h>
0010 #include <linux/pkt_cls.h>
0011 
0012 __attribute__((section("action-ok"),used)) int action_ok(struct __sk_buff *s)
0013 {
0014     return TC_ACT_OK;
0015 }
0016 
0017 __attribute__((section("action-ko"),used)) int action_ko(struct __sk_buff *s)
0018 {
0019     s->data = 0x0;
0020     return TC_ACT_OK;
0021 }
0022 
0023 char _license[] __attribute__((section("license"),used)) = "GPL";