|
@@ -994,6 +994,12 @@ func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
|
|
|
return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
|
|
return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// SetsockoptSockFprog attaches a classic BPF or an extended BPF program to a
|
|
|
|
|
+// socket to filter incoming packets. See 'man 7 socket' for usage information.
|
|
|
|
|
+func SetsockoptSockFprog(fd, level, opt int, fprog *SockFprog) error {
|
|
|
|
|
+ return setsockopt(fd, level, opt, unsafe.Pointer(fprog), unsafe.Sizeof(*fprog))
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
|
|
// Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
|
|
|
|
|
|
|
|
// KeyctlInt calls keyctl commands in which each argument is an int.
|
|
// KeyctlInt calls keyctl commands in which each argument is an int.
|