/*
 * IEEE 802.15.4 interface for userspace
 *
 * Copyright 2007, 2008 Siemens AG
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * Written by:
 * Sergey Lapin <slapin@ossfans.org>
 * Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
 */

#ifndef _AF_IEEE802154_H
#define _AF_IEEE802154_H

#include <linux/socket.h> /* for sa_family_t */

enum {
	IEEE802154_ADDR_NONE = 0x0,
	/* RESERVED = 0x01, */
	IEEE802154_ADDR_SHORT = 0x2, /* 16-bit address + PANid */
	IEEE802154_ADDR_LONG = 0x3, /* 64-bit address + PANid */
};

/* address length, octets */
#define IEEE802154_ADDR_LEN	8

struct ieee802154_addr_sa {
	int addr_type;
	u16 pan_id;
	union {
		u8 hwaddr[IEEE802154_ADDR_LEN];
		u16 short_addr;
	};
};

#define IEEE802154_PANID_BROADCAST	0xffff
#define IEEE802154_ADDR_BROADCAST	0xffff
#define IEEE802154_ADDR_UNDEF		0xfffe

struct sockaddr_ieee802154 {
	sa_family_t family; /* AF_IEEE802154 */
	struct ieee802154_addr_sa addr;
};

/* get/setsockopt */
#define SOL_IEEE802154	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
3ba4d0c14e5271be87812fc577b197'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/net/wireless/wext-core.c'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/net/wireless/wext-core.c?id=1f3d62090d3ba4d0c14e5271be87812fc577b197'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/net/wireless/wext-core.c?id=1f3d62090d3ba4d0c14e5271be87812fc577b197'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/net/wireless/wext-core.c?id=1f3d62090d3ba4d0c14e5271be87812fc577b197'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/net/wireless/wext-core.c'>
<input type='hidden' name='id' value='1f3d62090d3ba4d0c14e5271be87812fc577b197'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?id=1f3d62090d3ba4d0c14e5271be87812fc577b197'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/net?id=1f3d62090d3ba4d0c14e5271be87812fc577b197'>net</a>/<a href='/cgit.cgi/linux/net-next.git/log/net/wireless?id=1f3d62090d3ba4d0c14e5271be87812fc577b197'>wireless</a>/<a href='/cgit.cgi/linux/net-next.git/log/net/wireless/wext-core.c?id=1f3d62090d3ba4d0c14e5271be87812fc577b197'>wext-core.c</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/net/wireless/wext-core.c?id=1f3d62090d3ba4d0c14e5271be87812fc577b197&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>
><th class='left'>Files</th><th class='left'>Lines</th></tr>