13#ifndef ZEPHYR_INCLUDE_NET_IEEE802154_PKT_H_ 
   14#define ZEPHYR_INCLUDE_NET_IEEE802154_PKT_H_ 
   26#ifndef NET_PKT_HAS_CONTROL_BLOCK 
   27#define NET_PKT_HAS_CONTROL_BLOCK 
   30struct net_pkt_cb_ieee802154 {
 
   31#if defined(CONFIG_NET_L2_OPENTHREAD) 
   41#if defined(CONFIG_IEEE802154_SELECTIVE_TXPOWER) 
   61#if defined(CONFIG_NET_L2_OPENTHREAD) 
   68static inline void *net_pkt_cb(
struct net_pkt *pkt);
 
   70static inline struct net_pkt_cb_ieee802154 *net_pkt_cb_ieee802154(
struct net_pkt *pkt)
 
   72        return net_pkt_cb(pkt);
 
   77        return net_pkt_cb_ieee802154(pkt)->lqi;
 
   80static inline void net_pkt_set_ieee802154_lqi(
struct net_pkt *pkt, 
uint8_t lqi)
 
   82        net_pkt_cb_ieee802154(pkt)->lqi = lqi;
 
   87        return net_pkt_cb_ieee802154(pkt)->rssi;
 
   90static inline void net_pkt_set_ieee802154_rssi(
struct net_pkt *pkt, 
uint8_t rssi)
 
   92        net_pkt_cb_ieee802154(pkt)->rssi = rssi;
 
   95#if defined(CONFIG_IEEE802154_SELECTIVE_TXPOWER) 
   96static inline int8_t net_pkt_ieee802154_txpwr(
struct net_pkt *pkt)
 
   98        return net_pkt_cb_ieee802154(pkt)->txpwr;
 
  101static inline void net_pkt_set_ieee802154_txpwr(
struct net_pkt *pkt, 
int8_t txpwr)
 
  103        net_pkt_cb_ieee802154(pkt)->txpwr = txpwr;
 
  107static inline bool net_pkt_ieee802154_arb(
struct net_pkt *pkt)
 
  109        return net_pkt_cb_ieee802154(pkt)->arb;
 
  112static inline void net_pkt_set_ieee802154_arb(
struct net_pkt *pkt, 
bool arb)
 
  114        net_pkt_cb_ieee802154(pkt)->arb = arb;
 
  117static inline bool net_pkt_ieee802154_ack_fpb(
struct net_pkt *pkt)
 
  119        return net_pkt_cb_ieee802154(pkt)->ack_fpb;
 
  122static inline void net_pkt_set_ieee802154_ack_fpb(
struct net_pkt *pkt, 
bool fpb)
 
  124        net_pkt_cb_ieee802154(pkt)->ack_fpb = fpb;
 
  127static inline bool net_pkt_ieee802154_frame_secured(
struct net_pkt *pkt)
 
  129        return net_pkt_cb_ieee802154(pkt)->frame_secured;
 
  132static inline void net_pkt_set_ieee802154_frame_secured(
struct net_pkt *pkt, 
bool secured)
 
  134        net_pkt_cb_ieee802154(pkt)->frame_secured = secured;
 
  137static inline bool net_pkt_ieee802154_mac_hdr_rdy(
struct net_pkt *pkt)
 
  139        return net_pkt_cb_ieee802154(pkt)->mac_hdr_rdy;
 
  142static inline void net_pkt_set_ieee802154_mac_hdr_rdy(
struct net_pkt *pkt, 
bool rdy)
 
  144        net_pkt_cb_ieee802154(pkt)->mac_hdr_rdy = rdy;
 
  147#if defined(CONFIG_NET_L2_OPENTHREAD) 
  150        return net_pkt_cb_ieee802154(pkt)->ack_fc;
 
  153static inline void net_pkt_set_ieee802154_ack_fc(
struct net_pkt *pkt, 
uint32_t fc)
 
  155        net_pkt_cb_ieee802154(pkt)->ack_fc = fc;
 
  158static inline uint8_t net_pkt_ieee802154_ack_keyid(
struct net_pkt *pkt)
 
  160        return net_pkt_cb_ieee802154(pkt)->ack_keyid;
 
  163static inline void net_pkt_set_ieee802154_ack_keyid(
struct net_pkt *pkt, 
uint8_t keyid)
 
  165        net_pkt_cb_ieee802154(pkt)->ack_keyid = keyid;
 
  168static inline bool net_pkt_ieee802154_fv2015(
struct net_pkt *pkt)
 
  170        return net_pkt_cb_ieee802154(pkt)->fv2015;
 
  173static inline void net_pkt_set_ieee802154_fv2015(
struct net_pkt *pkt, 
bool fv2015)
 
  175        net_pkt_cb_ieee802154(pkt)->fv2015 = fv2015;
 
  178static inline bool net_pkt_ieee802154_ack_seb(
struct net_pkt *pkt)
 
  180        return net_pkt_cb_ieee802154(pkt)->ack_seb;
 
  183static inline void net_pkt_set_ieee802154_ack_seb(
struct net_pkt *pkt, 
bool seb)
 
  185        net_pkt_cb_ieee802154(pkt)->ack_seb = seb;
 
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
 
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
 
__INT8_TYPE__ int8_t
Definition: stdint.h:72
 
Network packet.
Definition: net_pkt.h:62