1 /* Copyright (c) 2017 VMware
3 * This program is free software; you can redistribute it and/or
4 * modify it under the terms of version 2 of the GNU General Public
5 * License as published by the Free Software Foundation.
7 * This program is distributed in the hope that it will be useful, but
8 * WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * General Public License for more details.
12 #include <linux/bpf.h>
13 #include "bpf_helpers.h"
15 int _version SEC("version") = 1;
17 SEC("redirect_to_111")
18 int xdp_redirect_to_111(struct xdp_md *xdp)
20 return bpf_redirect(111, 0);
22 SEC("redirect_to_222")
23 int xdp_redirect_to_222(struct xdp_md *xdp)
25 return bpf_redirect(222, 0);
28 char _license[] SEC("license") = "GPL";