Update and move ieee802154.h socket header file. Fix some comments in net/pkt.

This commit is contained in:
Gregory Nutt
2017-08-18 07:08:02 -06:00
parent 50e2e08742
commit d7c90ae71b
4 changed files with 47 additions and 23 deletions
@@ -33,8 +33,8 @@
*
****************************************************************************/
#ifndef __INCLUDE_NET_IEEE802154_H
#define __INCLUDE_NET_IEEE802154_H
#ifndef __INCLUDE_NETPACKET_IEEE802154_H
#define __INCLUDE_NETPACKET_IEEE802154_H
/****************************************************************************
* Included Files
@@ -85,13 +85,12 @@ struct ieee802154_addr_s
* bind() - Associates local address with socket
* connect() - Associates a remote address with the socket (for send())
* sendto() - Send to specified remote address
* recvfrom()- Receive from specified remote address.
* recvfrom()- Receive from indicated remote address.
*/
struct sockaddr_ieee802154_s
{
sa_family_t sa_family; /* AF_IEEE802154 */
uint8_t sa_msdu_handle; /* Data carried with MSDU */
struct ieee802154_addr_s sa_addr; /* Radio address */
};
@@ -99,4 +98,4 @@ struct sockaddr_ieee802154_s
* Public Function Prototypes
****************************************************************************/
#endif /* __INCLUDE_NET_IEEE802154_H */
#endif /* __INCLUDE_NETPACKET_IEEE802154_H */
+24 -4
View File
@@ -59,10 +59,30 @@
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
/* This function provides the interface between Ethernet device drivers and
* packet socket logic. All frames that are received should be provided to
* pkt_input() prior to other routing.
*/
/****************************************************************************
* Name: pkt_input
*
* Description:
* Handle incoming packet input
*
* This function provides the interface between Ethernet device drivers and
* packet socket logic. All frames that are received should be provided to
* pkt_input() prior to other routing.
*
* Parameters:
* dev - The device driver structure containing the received packet
*
* Return:
* OK The packet has been processed and can be deleted
* ERROR There is a matching connection, but could not dispatch the packet
* yet. Useful when a packet arrives before a recv call is in
* place.
*
* Assumptions:
* Called from the network diver with the network locked.
*
****************************************************************************/
struct net_driver_s; /* Forward reference */
int pkt_input(FAR struct net_driver_s *dev);