mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-16 08:42:28 +00:00
bnep: forward Ethernet packet to registered client
This commit is contained in:
parent
1bde12b42f
commit
c9bf9c270c
@ -66,9 +66,6 @@ static btstack_linked_list_t bnep_channels = NULL;
|
|||||||
|
|
||||||
static gap_security_level_t bnep_security_level;
|
static gap_security_level_t bnep_security_level;
|
||||||
|
|
||||||
static void (*app_packet_handler)(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
|
|
||||||
|
|
||||||
|
|
||||||
static bnep_channel_t * bnep_channel_for_l2cap_cid(uint16_t l2cap_cid);
|
static bnep_channel_t * bnep_channel_for_l2cap_cid(uint16_t l2cap_cid);
|
||||||
static void bnep_channel_finalize(bnep_channel_t *channel);
|
static void bnep_channel_finalize(bnep_channel_t *channel);
|
||||||
static void bnep_channel_start_timer(bnep_channel_t *channel, int timeout);
|
static void bnep_channel_start_timer(bnep_channel_t *channel, int timeout);
|
||||||
@ -1090,8 +1087,10 @@ static int bnep_handle_ethernet_packet(bnep_channel_t *channel, bd_addr_t addr_d
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Notify application layer and deliver the ethernet packet */
|
/* Notify application layer and deliver the ethernet packet */
|
||||||
(*app_packet_handler)(BNEP_DATA_PACKET, channel->l2cap_cid,
|
if (channel->packet_handler){
|
||||||
ethernet_packet, size + sizeof(uint16_t) + 2 * sizeof(bd_addr_t));
|
(*channel->packet_handler)(BNEP_DATA_PACKET, channel->l2cap_cid, ethernet_packet,
|
||||||
|
size + sizeof(uint16_t) + 2 * sizeof(bd_addr_t));
|
||||||
|
}
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user