mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
set message type for lowpan and ipv6 notifier
This commit is contained in:
parent
6329076aeb
commit
079d654104
@ -131,6 +131,13 @@ enum transceiver_msg_type_t {
|
|||||||
|
|
||||||
/* Error messages */
|
/* Error messages */
|
||||||
ENOBUFFER, ///< No buffer left
|
ENOBUFFER, ///< No buffer left
|
||||||
|
|
||||||
|
/* reserve message types for higher layer notifications */
|
||||||
|
UPPER_LAYER_1, ///< reserved
|
||||||
|
UPPER_LAYER_2, ///< reserved
|
||||||
|
UPPER_LAYER_3, ///< reserved
|
||||||
|
UPPER_LAYER_4, ///< reserved
|
||||||
|
UPPER_LAYER_5, ///< reserved
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,6 +60,13 @@
|
|||||||
*/
|
*/
|
||||||
#define IPV6_PROTO_NUM_IPV6_OPTS (60)
|
#define IPV6_PROTO_NUM_IPV6_OPTS (60)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief message type for notification
|
||||||
|
*
|
||||||
|
* @see ipv6_register_packet_handler()
|
||||||
|
*/
|
||||||
|
#define IPV6_PACKET_RECEIVED (UPPER_LAYER_2)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get IPv6 send/receive buffer.
|
* @brief Get IPv6 send/receive buffer.
|
||||||
*
|
*
|
||||||
|
@ -152,6 +152,12 @@
|
|||||||
*/
|
*/
|
||||||
#define SIXLOWPAN_FRAGN_HDR_LEN (5)
|
#define SIXLOWPAN_FRAGN_HDR_LEN (5)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief message type for notification
|
||||||
|
*
|
||||||
|
* @see sixlowpan_lowpan_register()
|
||||||
|
*/
|
||||||
|
#define LOWPAN_FRAME_RECEIVED (UPPER_LAYER_1)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Data type to configure 6LoWPAN IPv6 header compression.
|
* @brief Data type to configure 6LoWPAN IPv6 header compression.
|
||||||
|
@ -304,6 +304,7 @@ void ipv6_process(void)
|
|||||||
for (i = 0; i < SIXLOWIP_MAX_REGISTERED; i++) {
|
for (i = 0; i < SIXLOWIP_MAX_REGISTERED; i++) {
|
||||||
if (sixlowip_reg[i]) {
|
if (sixlowip_reg[i]) {
|
||||||
msg_t m_send;
|
msg_t m_send;
|
||||||
|
m_send.type = IPV6_PACKET_RECEIVED;
|
||||||
m_send.content.ptr = (char *) &ipv6_buf;
|
m_send.content.ptr = (char *) &ipv6_buf;
|
||||||
msg_send(&m_send, sixlowip_reg[i], 1);
|
msg_send(&m_send, sixlowip_reg[i], 1);
|
||||||
}
|
}
|
||||||
|
@ -742,6 +742,7 @@ void lowpan_read(uint8_t *data, uint8_t length, ieee_802154_long_t *s_laddr,
|
|||||||
for (i = 0; i < SIXLOWPAN_MAX_REGISTERED; i++) {
|
for (i = 0; i < SIXLOWPAN_MAX_REGISTERED; i++) {
|
||||||
if (sixlowpan_reg[i]) {
|
if (sixlowpan_reg[i]) {
|
||||||
msg_t m_send;
|
msg_t m_send;
|
||||||
|
m_send.type = LOWPAN_FRAME_RECEIVED;;
|
||||||
current_frame.length = length;
|
current_frame.length = length;
|
||||||
current_frame.data = data;
|
current_frame.data = data;
|
||||||
m_send.content.ptr = (char *) ¤t_frame;
|
m_send.content.ptr = (char *) ¤t_frame;
|
||||||
|
Loading…
Reference in New Issue
Block a user