#ifndef TSTAMPING_H #define TSTAMPING_H #include "config.h" #ifdef HAVE_HARDWARE_TIMESTAMPING extern int set_sockopt_hwtimestamp(int sock, const char *dev); #else static inline int set_sockopt_hwtimestamp(int sock, const char *dev) { return -1; } #endif #endif /* TSTAMPING_H */ .ch/cgit.cgi/linux/net-next.git/atom/?h=master' type='application/atom+xml'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Ahern <dsa@cumulusnetworks.com>2016-12-01 08:48:06 -0800
committerDavid S. Miller <davem@davemloft.net>2016-12-02 13:46:09 -0500
commitaa4c1037a30f4e88f444e83d42c2befbe0d5caf5 (patch)
treee2bb34c401d93df49f035a1d45c01fdff44b371d
parentad2805dc79e647ec2aee931a51924fda9d03b2fc (diff)
bpf: Add support for reading socket family, type, protocol
Add socket family, type and protocol to bpf_sock allowing bpf programs read-only access. Add __sk_flags_offset[0] to struct sock before the bitfield to programmtically determine the offset of the unsigned int containing protocol and type. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>