Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __IEEE802154_H
00025 #define __IEEE802154_H
00026
00027 #ifdef HAVE_NET_IEEE802154_H
00028 #include <net/ieee802154.h>
00029 #endif
00030 #ifdef HAVE_NET_AF_IEEE802154_H
00031 #include <net/af_ieee802154.h>
00032 #endif
00033
00034 #ifndef IEEE802154_ADDR_LEN
00035 #define IEEE802154_ADDR_LEN 8
00036 #endif
00037
00038 #include <sys/socket.h>
00039 #include <stdint.h>
00040 #ifndef HAVE_STRUCT_SOCKADDR_IEEE802154
00041
00042 enum {
00043 IEEE802154_ADDR_NONE = 0x0,
00044
00045 IEEE802154_ADDR_SHORT = 0x2,
00046 IEEE802154_ADDR_LONG = 0x3,
00047 };
00048
00049 struct ieee802154_addr {
00050 int addr_type;
00051 uint16_t pan_id;
00052 union {
00053 uint8_t hwaddr[IEEE802154_ADDR_LEN];
00054 uint16_t short_addr;
00055 };
00056 };
00057
00058 struct sockaddr_ieee802154 {
00059 sa_family_t family;
00060 struct ieee802154_addr addr;
00061 };
00062 #endif
00063
00064 #ifndef N_IEEE802154
00065 #define N_IEEE802154 19
00066 #endif
00067
00068 #ifndef PF_IEEE802154
00069 #define PF_IEEE802154 36
00070 #define AF_IEEE802154 PF_IEEE802154
00071 #endif
00072
00073 #include <net/if_arp.h>
00074 #ifndef ARPHRD_IEEE802154
00075 #define ARPHRD_IEEE802154 804
00076 #define ARPHRD_IEEE802154_PHY 805
00077 #endif
00078
00079 #ifndef IEEE802154_MAC_SCAN_ED
00080 #define IEEE802154_MAC_SCAN_ED 0x0
00081 #define IEEE802154_MAC_SCAN_ACTIVE 0x1
00082 #define IEEE802154_MAC_SCAN_PASSIVE 0x2
00083 #define IEEE802154_MAC_SCAN_ORPHAN 0x3
00084 #endif
00085
00086 #include <linux/if_ether.h>
00087 #ifndef ETH_P_IEEE802154
00088 #define ETH_P_IEEE802154 0x00F6
00089 #endif
00090
00091
00092 #ifndef SOL_IEEE802154
00093 #define SOL_IEEE802154 0
00094 #endif
00095
00096 #ifndef WPAN_WANTACK
00097 #define WPAN_WANTACK 0
00098 #endif
00099
00100
00101 #endif