IBR-DTNSuite  0.8
ibrcommon/ibrcommon/net/nl802154.h
Go to the documentation of this file.
00001 /*
00002  * nl802154.h
00003  *
00004  * Copyright (C) 2007, 2008, 2009 Siemens AG
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License version 2
00008  * as published by the Free Software Foundation.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License along
00016  * with this program; if not, write to the Free Software Foundation, Inc.,
00017  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00018  *
00019  */
00020 
00021 #ifndef NL802154_H
00022 #define NL802154_H
00023 
00024 #define IEEE802154_NL_NAME "802.15.4 MAC"
00025 #define IEEE802154_MCAST_COORD_NAME "coordinator"
00026 #define IEEE802154_MCAST_BEACON_NAME "beacon"
00027 
00028 enum {
00029         __IEEE802154_ATTR_INVALID,
00030 
00031         IEEE802154_ATTR_DEV_NAME,
00032         IEEE802154_ATTR_DEV_INDEX,
00033 
00034         IEEE802154_ATTR_STATUS,
00035 
00036         IEEE802154_ATTR_SHORT_ADDR,
00037         IEEE802154_ATTR_HW_ADDR,
00038         IEEE802154_ATTR_PAN_ID,
00039 
00040         IEEE802154_ATTR_CHANNEL,
00041 
00042         IEEE802154_ATTR_COORD_SHORT_ADDR,
00043         IEEE802154_ATTR_COORD_HW_ADDR,
00044         IEEE802154_ATTR_COORD_PAN_ID,
00045 
00046         IEEE802154_ATTR_SRC_SHORT_ADDR,
00047         IEEE802154_ATTR_SRC_HW_ADDR,
00048         IEEE802154_ATTR_SRC_PAN_ID,
00049 
00050         IEEE802154_ATTR_DEST_SHORT_ADDR,
00051         IEEE802154_ATTR_DEST_HW_ADDR,
00052         IEEE802154_ATTR_DEST_PAN_ID,
00053 
00054         IEEE802154_ATTR_CAPABILITY,
00055         IEEE802154_ATTR_REASON,
00056         IEEE802154_ATTR_SCAN_TYPE,
00057         IEEE802154_ATTR_CHANNELS,
00058         IEEE802154_ATTR_DURATION,
00059         IEEE802154_ATTR_ED_LIST,
00060         IEEE802154_ATTR_BCN_ORD,
00061         IEEE802154_ATTR_SF_ORD,
00062         IEEE802154_ATTR_PAN_COORD,
00063         IEEE802154_ATTR_BAT_EXT,
00064         IEEE802154_ATTR_COORD_REALIGN,
00065         IEEE802154_ATTR_SEC,
00066 
00067         IEEE802154_ATTR_PAGE,
00068         IEEE802154_ATTR_CHANNEL_PAGE_LIST,
00069 
00070         IEEE802154_ATTR_PHY_NAME,
00071         IEEE802154_ATTR_DEV_TYPE,
00072 
00073         __IEEE802154_ATTR_MAX,
00074 };
00075 
00076 #define IEEE802154_ATTR_MAX (__IEEE802154_ATTR_MAX - 1)
00077 
00078 //extern struct nla_policy ieee802154_policy[];
00079 
00080 /* commands */
00081 /* REQ should be responded with CONF
00082  * and INDIC with RESP
00083  */
00084 enum {
00085         __IEEE802154_COMMAND_INVALID,
00086 
00087         IEEE802154_ASSOCIATE_REQ,
00088         IEEE802154_ASSOCIATE_CONF,
00089         IEEE802154_DISASSOCIATE_REQ,
00090         IEEE802154_DISASSOCIATE_CONF,
00091         IEEE802154_GET_REQ,
00092         IEEE802154_GET_CONF,
00093         IEEE802154_RESET_REQ,
00094         IEEE802154_RESET_CONF,
00095         IEEE802154_SCAN_REQ,
00096         IEEE802154_SCAN_CONF,
00097         IEEE802154_SET_REQ,
00098         IEEE802154_SET_CONF,
00099         IEEE802154_START_REQ,
00100         IEEE802154_START_CONF,
00101         IEEE802154_SYNC_REQ,
00102         IEEE802154_POLL_REQ,
00103         IEEE802154_POLL_CONF,
00104 
00105         IEEE802154_ASSOCIATE_INDIC,
00106         IEEE802154_ASSOCIATE_RESP,
00107         IEEE802154_DISASSOCIATE_INDIC,
00108         IEEE802154_BEACON_NOTIFY_INDIC,
00109         IEEE802154_ORPHAN_INDIC,
00110         IEEE802154_ORPHAN_RESP,
00111         IEEE802154_COMM_STATUS_INDIC,
00112         IEEE802154_SYNC_LOSS_INDIC,
00113 
00114         IEEE802154_GTS_REQ, /* Not supported yet */
00115         IEEE802154_GTS_INDIC, /* Not supported yet */
00116         IEEE802154_GTS_CONF, /* Not supported yet */
00117         IEEE802154_RX_ENABLE_REQ, /* Not supported yet */
00118         IEEE802154_RX_ENABLE_CONF, /* Not supported yet */
00119 
00120         IEEE802154_LIST_IFACE,
00121         IEEE802154_LIST_PHY,
00122         IEEE802154_ADD_IFACE,
00123         IEEE802154_DEL_IFACE,
00124 
00125         __IEEE802154_CMD_MAX,
00126 };
00127 
00128 #define IEEE802154_CMD_MAX (__IEEE802154_CMD_MAX - 1)
00129 
00130 enum {
00131         IEEE802154_DEV_WPAN,
00132         IEEE802154_DEV_MONITOR,
00133         IEEE802154_DEV_SMAC,
00134         __IEEE802154_DEV_MAX,
00135 };
00136 
00137 #endif