summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>2014-05-16 17:46:41 +0200
committerDavid S. Miller <davem@davemloft.net>2014-05-16 17:23:41 -0400
commitaf9eed5bbf0fb4e398081e79a707545dcca5ebda (patch)
tree9692f6122fa3b281cc89410bad98d796bfa1eace /include
parentf30be4d53cada48598dab0983866ae4b16af46dc (diff)
downloadlinux-af9eed5bbf0fb4e398081e79a707545dcca5ebda.tar.bz2
ieee802154: add dgram sockopts for security control
Allow datagram sockets to override the security settings of the device they send from on a per-socket basis. Requires CAP_NET_ADMIN or CAP_NET_RAW, since raw sockets can send arbitrary packets anyway. Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/af_ieee802154.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/net/af_ieee802154.h b/include/net/af_ieee802154.h
index f79ae2aa76d6..085940f7eeec 100644
--- a/include/net/af_ieee802154.h
+++ b/include/net/af_ieee802154.h
@@ -57,6 +57,14 @@ struct sockaddr_ieee802154 {
/* get/setsockopt */
#define SOL_IEEE802154 0
-#define WPAN_WANTACK 0
+#define WPAN_WANTACK 0
+#define WPAN_SECURITY 1
+#define WPAN_SECURITY_LEVEL 2
+
+#define WPAN_SECURITY_DEFAULT 0
+#define WPAN_SECURITY_OFF 1
+#define WPAN_SECURITY_ON 2
+
+#define WPAN_SECURITY_LEVEL_DEFAULT (-1)
#endif