/*1* IEEE 802.15.4 inteface for userspace2*3* Copyright 2007, 2008 Siemens AG4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License version 27* as published by the Free Software Foundation.8*9* This program is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12* GNU General Public License for more details.13*14* You should have received a copy of the GNU General Public License along15* with this program; if not, write to the Free Software Foundation, Inc.,16* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Written by:19* Sergey Lapin <[email protected]>20* Dmitry Eremin-Solenikov <[email protected]>21*/2223#ifndef _AF_IEEE802154_H24#define _AF_IEEE802154_H2526#include <linux/socket.h> /* for sa_family_t */2728enum {29IEEE802154_ADDR_NONE = 0x0,30/* RESERVED = 0x01, */31IEEE802154_ADDR_SHORT = 0x2, /* 16-bit address + PANid */32IEEE802154_ADDR_LONG = 0x3, /* 64-bit address + PANid */33};3435/* address length, octets */36#define IEEE802154_ADDR_LEN 83738struct ieee802154_addr {39int addr_type;40u16 pan_id;41union {42u8 hwaddr[IEEE802154_ADDR_LEN];43u16 short_addr;44};45};4647#define IEEE802154_PANID_BROADCAST 0xffff48#define IEEE802154_ADDR_BROADCAST 0xffff49#define IEEE802154_ADDR_UNDEF 0xfffe5051struct sockaddr_ieee802154 {52sa_family_t family; /* AF_IEEE802154 */53struct ieee802154_addr addr;54};5556/* get/setsockopt */57#define SOL_IEEE802154 05859#define WPAN_WANTACK 06061#endif626364