Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iproute2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
iproute2
Commits
aeedd8e1
Commit
aeedd8e1
authored
Apr 29, 2015
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update headers to reflect BPF changes
Reclone sanitized headers from 4.1-rc
parent
279d6a8b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
include/linux/bpf.h
include/linux/bpf.h
+6
-1
include/linux/filter.h
include/linux/filter.h
+5
-2
No files found.
include/linux/bpf.h
View file @
aeedd8e1
...
...
@@ -118,6 +118,7 @@ enum bpf_map_type {
enum
bpf_prog_type
{
BPF_PROG_TYPE_UNSPEC
,
BPF_PROG_TYPE_SOCKET_FILTER
,
BPF_PROG_TYPE_KPROBE
,
BPF_PROG_TYPE_SCHED_CLS
,
BPF_PROG_TYPE_SCHED_ACT
,
};
...
...
@@ -155,6 +156,7 @@ union bpf_attr {
__u32
log_level
;
/* verbosity level of verifier */
__u32
log_size
;
/* size of user buffer */
__aligned_u64
log_buf
;
/* user supplied buffer */
__u32
kern_version
;
/* checked when prog_type=kprobe */
};
}
__attribute__
((
aligned
(
8
)));
...
...
@@ -166,13 +168,16 @@ enum bpf_func_id {
BPF_FUNC_map_lookup_elem
,
/* void *map_lookup_elem(&map, &key) */
BPF_FUNC_map_update_elem
,
/* int map_update_elem(&map, &key, &value, flags) */
BPF_FUNC_map_delete_elem
,
/* int map_delete_elem(&map, &key) */
BPF_FUNC_probe_read
,
/* int bpf_probe_read(void *dst, int size, void *src) */
BPF_FUNC_ktime_get_ns
,
/* u64 bpf_ktime_get_ns(void) */
BPF_FUNC_trace_printk
,
/* int bpf_trace_printk(const char *fmt, int fmt_size, ...) */
BPF_FUNC_get_prandom_u32
,
/* u32 prandom_u32(void) */
BPF_FUNC_get_smp_processor_id
,
/* u32 raw_smp_processor_id(void) */
/**
* skb_store_bytes(skb, offset, from, len, flags) - store bytes into packet
* @skb: pointer to skb
* @offset: offset within packet from skb->
data
* @offset: offset within packet from skb->
mac_header
* @from: pointer where to copy bytes from
* @len: number of bytes to store into packet
* @flags: bit 0 - if true, recompute skb->csum
...
...
include/linux/filter.h
View file @
aeedd8e1
...
...
@@ -79,8 +79,11 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */
#define SKF_AD_RANDOM 56
#define SKF_AD_VLAN_TPID 60
#define SKF_AD_MAX 64
#define SKF_NET_OFF (-0x100000)
#define SKF_LL_OFF (-0x200000)
#define SKF_NET_OFF (-0x100000)
#define SKF_LL_OFF (-0x200000)
#define BPF_NET_OFF SKF_NET_OFF
#define BPF_LL_OFF SKF_LL_OFF
#endif
/* __LINUX_FILTER_H__ */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment