diff options
author | Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> | 2014-05-16 15:46:41 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-16 21:23:41 (GMT) |
commit | af9eed5bbf0fb4e398081e79a707545dcca5ebda (patch) | |
tree | 9692f6122fa3b281cc89410bad98d796bfa1eace /include/net/af_ieee802154.h | |
parent | f30be4d53cada48598dab0983866ae4b16af46dc (diff) | |
download | linux-af9eed5bbf0fb4e398081e79a707545dcca5ebda.tar.xz |
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/net/af_ieee802154.h')
-rw-r--r-- | include/net/af_ieee802154.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/net/af_ieee802154.h b/include/net/af_ieee802154.h index f79ae2a..085940f 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 |