mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
net/devif_callback: change flags type from uint16_t to uint32_t
increase the size of the flag to prepare for precise xxx_POLL. Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
parent
d377f6b788
commit
a0b847bf1b
75 changed files with 224 additions and 223 deletions
|
|
@ -81,12 +81,12 @@ static void arp_send_terminate(FAR struct net_driver_s *dev,
|
|||
* Name: arp_send_eventhandler
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t arp_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *priv, uint16_t flags)
|
||||
static uint32_t arp_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *priv, uint32_t flags)
|
||||
{
|
||||
FAR struct arp_send_s *state = (FAR struct arp_send_s *)priv;
|
||||
|
||||
ninfo("flags: %04x sent: %d\n", flags, state->snd_sent);
|
||||
ninfo("flags: %" PRIx32 " sent: %d\n", flags, state->snd_sent);
|
||||
|
||||
if (state)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -254,9 +254,9 @@ FAR struct bluetooth_conn_s *
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t bluetooth_callback(FAR struct radio_driver_s *radio,
|
||||
FAR struct bluetooth_conn_s *conn,
|
||||
uint16_t flags);
|
||||
uint32_t bluetooth_callback(FAR struct radio_driver_s *radio,
|
||||
FAR struct bluetooth_conn_s *conn,
|
||||
uint32_t flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: bluetooth_recvmsg
|
||||
|
|
|
|||
|
|
@ -59,11 +59,11 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t bluetooth_callback(FAR struct radio_driver_s *radio,
|
||||
FAR struct bluetooth_conn_s *conn,
|
||||
uint16_t flags)
|
||||
uint32_t bluetooth_callback(FAR struct radio_driver_s *radio,
|
||||
FAR struct bluetooth_conn_s *conn,
|
||||
uint32_t flags)
|
||||
{
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
/* Some sanity checking */
|
||||
|
||||
|
|
|
|||
|
|
@ -206,15 +206,15 @@ static ssize_t
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t bluetooth_recvfrom_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv,
|
||||
uint16_t flags)
|
||||
static uint32_t bluetooth_recvfrom_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv,
|
||||
uint32_t flags)
|
||||
{
|
||||
FAR struct bluetooth_recvfrom_s *pstate;
|
||||
FAR struct radio_driver_s *radio;
|
||||
ssize_t ret;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
DEBUGASSERT(pvpriv != NULL && dev != NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -83,9 +83,9 @@ struct bluetooth_sendto_s
|
|||
* Name: bluetooth_sendto_eventhandler
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t bluetooth_sendto_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv,
|
||||
uint16_t flags)
|
||||
static uint32_t bluetooth_sendto_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv,
|
||||
uint32_t flags)
|
||||
{
|
||||
FAR struct radio_driver_s *radio;
|
||||
FAR struct bluetooth_sendto_s *pstate;
|
||||
|
|
@ -110,7 +110,7 @@ static uint16_t bluetooth_sendto_eventhandler(FAR struct net_driver_s *dev,
|
|||
pstate = pvpriv;
|
||||
radio = (FAR struct radio_driver_s *)dev;
|
||||
|
||||
ninfo("flags: %04x sent: %zd\n", flags, pstate->is_sent);
|
||||
ninfo("flags: %" PRIx32 " sent: %zd\n", flags, pstate->is_sent);
|
||||
|
||||
if (pstate != NULL && (flags & BLUETOOTH_POLL) != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -237,8 +237,8 @@ FAR struct can_conn_s *can_active(FAR struct net_driver_s *dev,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t can_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct can_conn_s *conn, uint16_t flags);
|
||||
uint32_t can_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct can_conn_s *conn, uint32_t flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: can_datahandler
|
||||
|
|
|
|||
|
|
@ -62,13 +62,13 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static inline uint16_t
|
||||
static inline uint32_t
|
||||
can_data_event(FAR struct net_driver_s *dev, FAR struct can_conn_s *conn,
|
||||
uint16_t flags)
|
||||
uint32_t flags)
|
||||
{
|
||||
int buflen = dev->d_len;
|
||||
uint16_t recvlen;
|
||||
uint16_t ret;
|
||||
uint32_t ret;
|
||||
|
||||
#ifdef CONFIG_NET_TIMESTAMP
|
||||
buflen -= sizeof(struct timeval);
|
||||
|
|
@ -118,8 +118,8 @@ can_data_event(FAR struct net_driver_s *dev, FAR struct can_conn_s *conn,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t can_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct can_conn_s *conn, uint16_t flags)
|
||||
uint32_t can_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct can_conn_s *conn, uint32_t flags)
|
||||
{
|
||||
/* Some sanity checking */
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ const uint8_t g_len_to_can_dlc[65] =
|
|||
static int can_input_conn(FAR struct net_driver_s *dev,
|
||||
FAR struct can_conn_s *conn)
|
||||
{
|
||||
uint16_t flags;
|
||||
uint32_t flags;
|
||||
uint16_t buflen = dev->d_len;
|
||||
int ret = OK;
|
||||
|
||||
|
|
|
|||
|
|
@ -288,8 +288,8 @@ static inline int can_readahead(struct can_recvfrom_s *pstate)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static uint16_t can_recvfrom_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t can_recvfrom_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
struct can_recvfrom_s *pstate = pvpriv;
|
||||
|
||||
|
|
|
|||
|
|
@ -79,8 +79,8 @@ struct send_s
|
|||
* Name: psock_send_eventhandler
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct send_s *pstate = pvpriv;
|
||||
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@
|
|||
* Name: psock_send_eventhandler
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct can_conn_s *conn = pvpriv;
|
||||
|
||||
|
|
|
|||
|
|
@ -112,8 +112,8 @@ const struct sock_intf_s g_can_sockif =
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t can_poll_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t can_poll_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct can_poll_s *info = pvpriv;
|
||||
|
||||
|
|
|
|||
|
|
@ -267,9 +267,9 @@
|
|||
|
||||
struct net_driver_s; /* Forward reference */
|
||||
|
||||
typedef CODE uint16_t (*devif_callback_event_t)(FAR struct net_driver_s *dev,
|
||||
typedef CODE uint32_t (*devif_callback_event_t)(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv,
|
||||
uint16_t flags);
|
||||
uint32_t flags);
|
||||
|
||||
struct devif_callback_s
|
||||
{
|
||||
|
|
@ -278,7 +278,7 @@ struct devif_callback_s
|
|||
FAR struct devif_callback_s *nxtdev;
|
||||
FAR devif_callback_event_t event;
|
||||
FAR void *priv;
|
||||
uint16_t flags;
|
||||
uint32_t flags;
|
||||
uint8_t free_flags;
|
||||
};
|
||||
|
||||
|
|
@ -386,7 +386,7 @@ void devif_dev_callback_free(FAR struct net_driver_s *dev,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t devif_conn_event(FAR struct net_driver_s *dev, uint16_t flags,
|
||||
uint32_t devif_conn_event(FAR struct net_driver_s *dev, uint32_t flags,
|
||||
FAR struct devif_callback_s *list);
|
||||
|
||||
/****************************************************************************
|
||||
|
|
@ -408,7 +408,7 @@ uint16_t devif_conn_event(FAR struct net_driver_s *dev, uint16_t flags,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t devif_dev_event(FAR struct net_driver_s *dev, uint16_t flags);
|
||||
uint32_t devif_dev_event(FAR struct net_driver_s *dev, uint32_t flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: devif_send
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ static void devif_callback_free(FAR struct net_driver_s *dev,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static bool devif_event_trigger(uint16_t events, uint16_t triggers)
|
||||
static bool devif_event_trigger(uint32_t events, uint32_t triggers)
|
||||
{
|
||||
/* The events are divided into a set of individual bits that may be ORed
|
||||
* together PLUS a field that encodes a single poll event.
|
||||
|
|
@ -451,7 +451,7 @@ void devif_dev_callback_free(FAR struct net_driver_s *dev,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t devif_conn_event(FAR struct net_driver_s *dev, uint16_t flags,
|
||||
uint32_t devif_conn_event(FAR struct net_driver_s *dev, uint32_t flags,
|
||||
FAR struct devif_callback_s *list)
|
||||
{
|
||||
FAR struct devif_callback_s *next;
|
||||
|
|
@ -508,7 +508,7 @@ uint16_t devif_conn_event(FAR struct net_driver_s *dev, uint16_t flags,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t devif_dev_event(FAR struct net_driver_s *dev, uint16_t flags)
|
||||
uint32_t devif_dev_event(FAR struct net_driver_s *dev, uint32_t flags)
|
||||
{
|
||||
FAR struct devif_callback_s *cb;
|
||||
FAR struct devif_callback_s *next;
|
||||
|
|
|
|||
|
|
@ -63,15 +63,15 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t icmp_poll_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t icmp_poll_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct icmp_poll_s *info = pvpriv;
|
||||
FAR struct icmp_conn_s *conn;
|
||||
FAR struct socket *psock;
|
||||
pollevent_t eventset;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
DEBUGASSERT(info == NULL || info->fds != NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -86,14 +86,14 @@ struct icmp_recvfrom_s
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t recvfrom_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t recvfrom_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct icmp_recvfrom_s *pstate = pvpriv;
|
||||
FAR struct socket *psock;
|
||||
FAR struct ipv4_hdr_s *ipv4;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
if (pstate != NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -173,12 +173,12 @@ static void sendto_request(FAR struct net_driver_s *dev,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t sendto_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t sendto_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct icmp_sendto_s *pstate = pvpriv;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
if (pstate != NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -92,12 +92,12 @@ static void icmpv6_router_terminate(FAR struct icmpv6_router_s *state,
|
|||
* Name: icmpv6_router_eventhandler
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t icmpv6_router_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *priv, uint16_t flags)
|
||||
static uint32_t icmpv6_router_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *priv, uint32_t flags)
|
||||
{
|
||||
FAR struct icmpv6_router_s *state = (FAR struct icmpv6_router_s *)priv;
|
||||
|
||||
ninfo("flags: %04x sent: %d\n", flags, state->snd_sent);
|
||||
ninfo("flags: %" PRIx32 " sent: %d\n", flags, state->snd_sent);
|
||||
|
||||
if (state)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -74,12 +74,12 @@ struct icmpv6_neighbor_s
|
|||
* Name: icmpv6_neighbor_eventhandler
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t icmpv6_neighbor_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *priv, uint16_t flags)
|
||||
static uint32_t icmpv6_neighbor_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *priv, uint32_t flags)
|
||||
{
|
||||
FAR struct icmpv6_neighbor_s *state = (FAR struct icmpv6_neighbor_s *)priv;
|
||||
|
||||
ninfo("flags: %04x sent: %d\n", flags, state->snd_sent);
|
||||
ninfo("flags: %" PRIx32 " sent: %d\n", flags, state->snd_sent);
|
||||
|
||||
if (state)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -63,15 +63,15 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t icmpv6_poll_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t icmpv6_poll_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct icmpv6_poll_s *info = pvpriv;
|
||||
FAR struct icmpv6_conn_s *conn;
|
||||
FAR struct socket *psock;
|
||||
pollevent_t eventset;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
DEBUGASSERT(info == NULL || info->fds != NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -94,13 +94,13 @@ struct icmpv6_recvfrom_s
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t recvfrom_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t recvfrom_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct icmpv6_recvfrom_s *pstate = pvpriv;
|
||||
FAR struct ipv6_hdr_s *ipv6;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
if (pstate != NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -170,12 +170,12 @@ static void sendto_request(FAR struct net_driver_s *dev,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t sendto_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t sendto_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct icmpv6_sendto_s *pstate = pvpriv;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
if (pstate != NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -268,9 +268,9 @@ FAR struct ieee802154_conn_s *
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t ieee802154_callback(FAR struct radio_driver_s *radio,
|
||||
uint32_t ieee802154_callback(FAR struct radio_driver_s *radio,
|
||||
FAR struct ieee802154_conn_s *conn,
|
||||
uint16_t flags);
|
||||
uint32_t flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: ieee802154_recvmsg
|
||||
|
|
|
|||
|
|
@ -55,11 +55,11 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t ieee802154_callback(FAR struct radio_driver_s *radio,
|
||||
uint32_t ieee802154_callback(FAR struct radio_driver_s *radio,
|
||||
FAR struct ieee802154_conn_s *conn,
|
||||
uint16_t flags)
|
||||
uint32_t flags)
|
||||
{
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
/* Some sanity checking */
|
||||
|
||||
|
|
|
|||
|
|
@ -206,15 +206,15 @@ static ssize_t
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t
|
||||
ieee802154_recvfrom_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t
|
||||
ieee802154_recvfrom_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct ieee802154_recvfrom_s *pstate;
|
||||
FAR struct radio_driver_s *radio;
|
||||
ssize_t ret;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
DEBUGASSERT(pvpriv != NULL && dev != NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -270,9 +270,9 @@ static void ieee802154_meta_data(FAR struct radio_driver_s *radio,
|
|||
* Name: ieee802154_sendto_eventhandler
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t ieee802154_sendto_eventhandler(FAR struct net_driver_s *dev,
|
||||
static uint32_t ieee802154_sendto_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv,
|
||||
uint16_t flags)
|
||||
uint32_t flags)
|
||||
{
|
||||
FAR struct radio_driver_s *radio;
|
||||
FAR struct ieee802154_sendto_s *pstate;
|
||||
|
|
@ -297,7 +297,7 @@ static uint16_t ieee802154_sendto_eventhandler(FAR struct net_driver_s *dev,
|
|||
pstate = pvpriv;
|
||||
radio = (FAR struct radio_driver_s *)dev;
|
||||
|
||||
ninfo("flags: %04x sent: %zd\n", flags, pstate->is_sent);
|
||||
ninfo("flags: %" PRIx32 " sent: %zd\n", flags, pstate->is_sent);
|
||||
|
||||
if (pstate != NULL && (flags & IEEE802154_POLL) != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -120,12 +120,12 @@ static inline void forward_ipselect(FAR struct forward_s *fwd)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t ipfwd_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t ipfwd_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct forward_s *fwd = pvpriv;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
DEBUGASSERT(fwd != NULL && fwd->f_iob != NULL && fwd->f_dev != NULL);
|
||||
|
||||
/* Make sure that this is from the forwarding device */
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ static void ipfwd_packet_conversion(FAR struct net_driver_s *dev, int proto)
|
|||
|
||||
void ipfwd_poll(FAR struct net_driver_s *dev)
|
||||
{
|
||||
uint16_t flags;
|
||||
uint32_t flags;
|
||||
|
||||
/* Setup for the callback (most of these do not apply) */
|
||||
|
||||
|
|
|
|||
|
|
@ -245,8 +245,8 @@ void pkt_conn_list_unlock(void);
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t pkt_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct pkt_conn_s *conn, uint16_t flags);
|
||||
uint32_t pkt_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct pkt_conn_s *conn, uint32_t flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: pkt_input
|
||||
|
|
|
|||
|
|
@ -55,10 +55,10 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t pkt_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct pkt_conn_s *conn, uint16_t flags)
|
||||
uint32_t pkt_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct pkt_conn_s *conn, uint32_t flags)
|
||||
{
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
/* Some sanity checking */
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ static int pkt_in(FAR struct net_driver_s *dev)
|
|||
conn = pkt_active(dev);
|
||||
if (conn)
|
||||
{
|
||||
uint16_t flags;
|
||||
uint32_t flags;
|
||||
|
||||
if (conn->pendiob == dev->d_iob)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -98,12 +98,12 @@ static int psock_pkt_cansend(FAR struct pkt_conn_s *conn)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t pkt_poll_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t pkt_poll_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct pkt_poll_s *info = pvpriv;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
DEBUGASSERT(!info || (info->conn && info->fds));
|
||||
|
||||
|
|
|
|||
|
|
@ -217,12 +217,12 @@ static inline void pkt_recvfrom_sender(FAR struct net_driver_s *dev,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t pkt_recvfrom_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t pkt_recvfrom_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
struct pkt_recvfrom_s *pstate = pvpriv;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
/* 'priv' might be null in some race conditions (?) */
|
||||
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ static void pkt_sendbuffer_notify(FAR struct pkt_conn_s *conn)
|
|||
* Name: psock_send_eventhandler
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct pkt_conn_s *conn = pvpriv;
|
||||
|
||||
|
|
|
|||
|
|
@ -78,12 +78,12 @@ struct send_s
|
|||
* Name: psock_send_eventhandler
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct send_s *pstate = pvpriv;
|
||||
|
||||
ninfo("flags: %04x sent: %zd\n", flags, pstate->snd_sent);
|
||||
ninfo("flags: %" PRIx32 " sent: %zd\n", flags, pstate->snd_sent);
|
||||
|
||||
if (pstate)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -99,12 +99,12 @@ struct sixlowpan_send_s
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct sixlowpan_send_s *sinfo = pvpriv;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
/* Verify that this is a compatible network driver. */
|
||||
|
||||
|
|
|
|||
|
|
@ -302,8 +302,8 @@ static int sixlowpan_tcp_header(FAR struct tcp_conn_s *conn,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t tcp_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t tcp_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct sixlowpan_send_s *sinfo = pvpriv;
|
||||
FAR struct tcp_conn_s *conn = sinfo->s_conn;
|
||||
|
|
@ -339,7 +339,7 @@ static uint16_t tcp_send_eventhandler(FAR struct net_driver_s *dev,
|
|||
return flags;
|
||||
}
|
||||
|
||||
ninfo("flags: %04x acked: %" PRIu32 " sent: %zu\n",
|
||||
ninfo("flags: %" PRIx32 " acked: %" PRIu32 " sent: %zu\n",
|
||||
flags, sinfo->s_acked, sinfo->s_sent);
|
||||
|
||||
/* If this packet contains an acknowledgement, then update the count of
|
||||
|
|
|
|||
|
|
@ -806,7 +806,7 @@ int tcp_start_monitor(FAR struct socket *psock);
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
void tcp_stop_monitor(FAR struct tcp_conn_s *conn, uint16_t flags);
|
||||
void tcp_stop_monitor(FAR struct tcp_conn_s *conn, uint32_t flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: tcp_lost_connection
|
||||
|
|
@ -832,7 +832,7 @@ void tcp_stop_monitor(FAR struct tcp_conn_s *conn, uint16_t flags);
|
|||
****************************************************************************/
|
||||
|
||||
void tcp_lost_connection(FAR struct tcp_conn_s *conn,
|
||||
FAR struct devif_callback_s *cb, uint16_t flags);
|
||||
FAR struct devif_callback_s *cb, uint32_t flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: tcp_close
|
||||
|
|
@ -1399,8 +1399,8 @@ void tcp_ipv6_input(FAR struct net_driver_s *dev, unsigned int iplen);
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t tcp_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct tcp_conn_s *conn, uint16_t flags);
|
||||
uint32_t tcp_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct tcp_conn_s *conn, uint32_t flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: tcp_datahandler
|
||||
|
|
@ -1939,7 +1939,7 @@ int tcp_wrbuffer_test(void);
|
|||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
void tcp_event_handler_dump(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv,
|
||||
uint16_t flags,
|
||||
uint32_t flags,
|
||||
FAR struct tcp_conn_s *conn);
|
||||
#endif
|
||||
|
||||
|
|
@ -2381,7 +2381,7 @@ void tcp_cc_recv_ack(FAR struct tcp_conn_s *conn, FAR struct tcp_hdr_s *tcp);
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
void tcp_set_zero_probe(FAR struct tcp_conn_s *conn, uint16_t flags);
|
||||
void tcp_set_zero_probe(FAR struct tcp_conn_s *conn, uint32_t flags);
|
||||
|
||||
#endif /* NET_TCP_HAVE_STACK */
|
||||
#endif /* __NET_TCP_TCP_H */
|
||||
|
|
|
|||
|
|
@ -60,9 +60,9 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static inline uint16_t
|
||||
static inline uint32_t
|
||||
tcp_data_event(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
|
||||
uint16_t flags)
|
||||
uint32_t flags)
|
||||
{
|
||||
uint16_t recvlen;
|
||||
|
||||
|
|
@ -109,9 +109,9 @@ tcp_data_event(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
|
|||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_TCP_OUT_OF_ORDER
|
||||
static uint16_t tcp_ofoseg_data_event(FAR struct net_driver_s *dev,
|
||||
static uint32_t tcp_ofoseg_data_event(FAR struct net_driver_s *dev,
|
||||
FAR struct tcp_conn_s *conn,
|
||||
uint16_t flags)
|
||||
uint32_t flags)
|
||||
{
|
||||
FAR struct tcp_ofoseg_s *seg;
|
||||
uint32_t rcvseq;
|
||||
|
|
@ -257,11 +257,11 @@ int tcp_ofoseg_bufsize(FAR struct tcp_conn_s *conn)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t tcp_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct tcp_conn_s *conn, uint16_t flags)
|
||||
uint32_t tcp_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct tcp_conn_s *conn, uint32_t flags)
|
||||
{
|
||||
#if defined(CONFIG_NET_TCP_NOTIFIER) || defined(CONFIG_NET_TCP_OUT_OF_ORDER)
|
||||
uint16_t orig = flags;
|
||||
uint32_t orig = flags;
|
||||
#endif
|
||||
|
||||
/* Prepare device buffer */
|
||||
|
|
@ -277,7 +277,7 @@ uint16_t tcp_callback(FAR struct net_driver_s *dev,
|
|||
* must be explicitly set in the callback.
|
||||
*/
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
/* Perform the data callback. When a data callback is executed from
|
||||
* 'list', the input flags are normally returned, however, the
|
||||
|
|
|
|||
|
|
@ -70,12 +70,12 @@ static void tcp_close_work(FAR void *param)
|
|||
* Name: tcp_close_eventhandler
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t tcp_close_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t tcp_close_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct tcp_conn_s *conn = pvpriv;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
/* TCP_DISCONN_EVENTS:
|
||||
* TCP_ABORT: The remote host has aborted the connection
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ static inline int psock_setup_callbacks(FAR struct socket *psock,
|
|||
FAR struct tcp_connect_s *pstate);
|
||||
static void psock_teardown_callbacks(FAR struct tcp_connect_s *pstate,
|
||||
int status);
|
||||
static uint16_t psock_connect_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags);
|
||||
static uint32_t psock_connect_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
|
|
@ -159,13 +159,13 @@ static void psock_teardown_callbacks(FAR struct tcp_connect_s *pstate,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t psock_connect_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t psock_connect_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
struct tcp_connect_s *pstate = pvpriv;
|
||||
FAR struct tcp_conn_s *conn;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
/* 'priv' might be null in some race conditions (?) */
|
||||
|
||||
|
|
|
|||
|
|
@ -50,12 +50,12 @@
|
|||
|
||||
void tcp_event_handler_dump(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv,
|
||||
uint16_t flags,
|
||||
uint32_t flags,
|
||||
FAR struct tcp_conn_s *conn)
|
||||
{
|
||||
#ifdef CONFIG_NET_TCP_WRITE_BUFFERS
|
||||
nerr("ERROR: conn->dev == NULL:"
|
||||
" dev=%p pvpriv=%p flags=0x%04x"
|
||||
" dev=%p pvpriv=%p flags=0x%" PRIx32
|
||||
" conn->dev=%p conn->flags=0x%04x tcpstateflags=0x%02x crefs=%d"
|
||||
" isn=%" PRIu32 " sndseq=%" PRIu32
|
||||
" tx_unacked=%" PRId32 " sent=%" PRId32
|
||||
|
|
@ -67,7 +67,7 @@ void tcp_event_handler_dump(FAR struct net_driver_s *dev,
|
|||
conn, conn->sconn.s_flags);
|
||||
#else
|
||||
nerr("ERROR: conn->dev == NULL:"
|
||||
" dev=%p pvpriv=%p flags=0x%04x"
|
||||
" dev=%p pvpriv=%p flags=0x%" PRIx32
|
||||
" conn->dev=%p conn->flags=0x%04x tcpstateflags=0x%02x crefs=%d"
|
||||
" sndseq=%" PRIu32
|
||||
" tx_unacked=%" PRId32
|
||||
|
|
|
|||
|
|
@ -696,8 +696,8 @@ static void tcp_input(FAR struct net_driver_s *dev, uint8_t domain,
|
|||
FAR struct tcp_hdr_s *tcp;
|
||||
union ip_binding_u uaddr;
|
||||
unsigned int tcpiplen;
|
||||
uint32_t flags;
|
||||
uint16_t tmp16;
|
||||
uint16_t flags;
|
||||
uint16_t result;
|
||||
int len;
|
||||
|
||||
|
|
|
|||
|
|
@ -44,9 +44,9 @@
|
|||
****************************************************************************/
|
||||
|
||||
static void tcp_close_connection(FAR struct tcp_conn_s *conn,
|
||||
uint16_t flags);
|
||||
static uint16_t tcp_monitor_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags);
|
||||
uint32_t flags);
|
||||
static uint32_t tcp_monitor_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
|
|
@ -70,7 +70,7 @@ static uint16_t tcp_monitor_event(FAR struct net_driver_s *dev,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void tcp_close_connection(FAR struct tcp_conn_s *conn, uint16_t flags)
|
||||
static void tcp_close_connection(FAR struct tcp_conn_s *conn, uint32_t flags)
|
||||
{
|
||||
/* These loss-of-connection events may be reported:
|
||||
*
|
||||
|
|
@ -130,14 +130,15 @@ static void tcp_close_connection(FAR struct tcp_conn_s *conn, uint16_t flags)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t tcp_monitor_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t tcp_monitor_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct tcp_conn_s *conn = pvpriv;
|
||||
|
||||
if (conn != NULL)
|
||||
{
|
||||
ninfo("flags: %04x s_flags: %02x\n", flags, conn->sconn.s_flags);
|
||||
ninfo("flags: %" PRIx32 " s_flags: %02x\n", flags,
|
||||
conn->sconn.s_flags);
|
||||
|
||||
/* TCP_DISCONN_EVENTS: TCP_ABORT, TCP_TIMEDOUT, or NETDEV_DOWN.
|
||||
* All loss-of-connection events.
|
||||
|
|
@ -205,7 +206,7 @@ static uint16_t tcp_monitor_event(FAR struct net_driver_s *dev,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void tcp_shutdown_monitor(FAR struct tcp_conn_s *conn, uint16_t flags)
|
||||
static void tcp_shutdown_monitor(FAR struct tcp_conn_s *conn, uint32_t flags)
|
||||
{
|
||||
/* Perform callbacks to assure that all sockets, including dup'ed copies,
|
||||
* are informed of the loss of connection event.
|
||||
|
|
@ -335,7 +336,7 @@ int tcp_start_monitor(FAR struct socket *psock)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
void tcp_stop_monitor(FAR struct tcp_conn_s *conn, uint16_t flags)
|
||||
void tcp_stop_monitor(FAR struct tcp_conn_s *conn, uint32_t flags)
|
||||
{
|
||||
DEBUGASSERT(conn != NULL);
|
||||
|
||||
|
|
@ -368,7 +369,7 @@ void tcp_stop_monitor(FAR struct tcp_conn_s *conn, uint16_t flags)
|
|||
****************************************************************************/
|
||||
|
||||
void tcp_lost_connection(FAR struct tcp_conn_s *conn,
|
||||
FAR struct devif_callback_s *cb, uint16_t flags)
|
||||
FAR struct devif_callback_s *cb, uint32_t flags)
|
||||
{
|
||||
DEBUGASSERT(conn != NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -66,12 +66,12 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t tcp_poll_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t tcp_poll_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct tcp_poll_s *info = pvpriv;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
DEBUGASSERT(info == NULL || (info->conn != NULL && info->fds != NULL));
|
||||
|
||||
|
|
|
|||
|
|
@ -170,9 +170,9 @@ static size_t tcp_recvfrom_newdata(FAR struct net_driver_s *dev,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static inline uint16_t tcp_newdata(FAR struct net_driver_s *dev,
|
||||
static inline uint32_t tcp_newdata(FAR struct net_driver_s *dev,
|
||||
FAR struct tcp_recvfrom_s *pstate,
|
||||
uint16_t flags)
|
||||
uint32_t flags)
|
||||
{
|
||||
FAR struct tcp_conn_s *conn = pstate->ir_conn;
|
||||
|
||||
|
|
@ -391,13 +391,13 @@ static inline void tcp_sender(FAR struct net_driver_s *dev,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t tcp_recvhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t tcp_recvhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct tcp_recvfrom_s *pstate = pvpriv;
|
||||
FAR struct iob_s *iob = NULL;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
/* 'priv' might be null in some race conditions (?) */
|
||||
|
||||
|
|
|
|||
|
|
@ -431,8 +431,8 @@ static int parse_sack(FAR struct tcp_conn_s *conn, FAR struct tcp_hdr_s *tcp,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct tcp_conn_s *conn = pvpriv;
|
||||
#ifdef CONFIG_NET_TCP_SELECTIVE_ACK
|
||||
|
|
@ -459,7 +459,7 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
|||
return flags;
|
||||
}
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
/* The TCP_ACKDATA, TCP_REXMIT and TCP_DISCONN_EVENTS flags are expected to
|
||||
* appear here strictly one at a time, except for the FIN + ACK case.
|
||||
|
|
@ -505,7 +505,7 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
|||
/* Get the ACK number from the TCP header */
|
||||
|
||||
ackno = tcp_getsequence(tcp->ackno);
|
||||
ninfo("ACK: ackno=%" PRIu32 " flags=%04x\n", ackno, flags);
|
||||
ninfo("ACK: ackno=%" PRIu32 " flags=%" PRIx32 "\n", ackno, flags);
|
||||
|
||||
/* Look at every write buffer in the unacked_q. The unacked_q
|
||||
* holds write buffers that have been entirely sent, but which
|
||||
|
|
@ -707,7 +707,7 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
|||
|
||||
if ((flags & TCP_DISCONN_EVENTS) != 0)
|
||||
{
|
||||
ninfo("Lost connection: %04x\n", flags);
|
||||
ninfo("Lost connection: %" PRIx32 "\n", flags);
|
||||
|
||||
/* We could get here recursively through the callback actions of
|
||||
* tcp_lost_connection(). So don't repeat that action if we have
|
||||
|
|
@ -893,7 +893,7 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
|
|||
FAR struct tcp_wrbuffer_s *wrb;
|
||||
FAR sq_entry_t *entry;
|
||||
|
||||
ninfo("REXMIT: %04x\n", flags);
|
||||
ninfo("REXMIT: %" PRIx32 "\n", flags);
|
||||
|
||||
/* If there is a partially sent write buffer at the head of the
|
||||
* write_q? Has anything been sent from that write buffer?
|
||||
|
|
|
|||
|
|
@ -125,8 +125,8 @@ struct send_s
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t tcpsend_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t tcpsend_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct send_s *pstate = pvpriv;
|
||||
FAR struct tcp_conn_s *conn;
|
||||
|
|
@ -151,7 +151,7 @@ static uint16_t tcpsend_eventhandler(FAR struct net_driver_s *dev,
|
|||
return flags;
|
||||
}
|
||||
|
||||
ninfo("flags: %04x acked: %" PRId32 " sent: %zd\n",
|
||||
ninfo("flags: %" PRIx32 " acked: %" PRId32 " sent: %zd\n",
|
||||
flags, pstate->snd_acked, pstate->snd_sent);
|
||||
|
||||
/* The TCP_ACKDATA, TCP_REXMIT and TCP_DISCONN_EVENTS flags are expected to
|
||||
|
|
|
|||
|
|
@ -117,8 +117,8 @@ struct sendfile_s
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t sendfile_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t sendfile_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct sendfile_s *pstate = pvpriv;
|
||||
FAR struct tcp_conn_s *conn;
|
||||
|
|
@ -143,7 +143,7 @@ static uint16_t sendfile_eventhandler(FAR struct net_driver_s *dev,
|
|||
return flags;
|
||||
}
|
||||
|
||||
ninfo("flags: %04x acked: %" PRId32 " sent: %zd\n",
|
||||
ninfo("flags: %" PRIx32 " acked: %" PRId32 " sent: %zd\n",
|
||||
flags, pstate->snd_acked, pstate->snd_sent);
|
||||
|
||||
/* The TCP_ACKDATA, TCP_REXMIT and TCP_DISCONN_EVENTS flags are expected to
|
||||
|
|
|
|||
|
|
@ -49,12 +49,12 @@
|
|||
* Name: tcp_shutdown_eventhandler
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t tcp_shutdown_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t tcp_shutdown_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct tcp_conn_s *conn = pvpriv;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
#ifdef CONFIG_NET_TCP_WRITE_BUFFERS
|
||||
/* We don't need the send callback anymore. */
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ void tcp_stop_timer(FAR struct tcp_conn_s *conn)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
void tcp_set_zero_probe(FAR struct tcp_conn_s *conn, uint16_t flags)
|
||||
void tcp_set_zero_probe(FAR struct tcp_conn_s *conn, uint32_t flags)
|
||||
{
|
||||
if ((conn->tcpstateflags & TCP_ESTABLISHED) &&
|
||||
((flags & TCP_NEWDATA) == 0) && conn->tx_unacked <= 0 &&
|
||||
|
|
|
|||
|
|
@ -729,8 +729,8 @@ udp_find_raddr_device(FAR struct udp_conn_s *conn,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t udp_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct udp_conn_s *conn, uint16_t flags);
|
||||
uint32_t udp_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct udp_conn_s *conn, uint32_t flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: udp_callback_cleanup
|
||||
|
|
|
|||
|
|
@ -247,11 +247,11 @@ errout:
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static inline uint16_t
|
||||
static inline uint32_t
|
||||
net_dataevent(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn,
|
||||
uint16_t flags)
|
||||
uint32_t flags)
|
||||
{
|
||||
uint16_t ret;
|
||||
uint32_t ret;
|
||||
uint8_t *buffer = dev->d_appdata;
|
||||
int buflen = dev->d_len;
|
||||
uint16_t recvlen;
|
||||
|
|
@ -306,10 +306,10 @@ net_dataevent(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint16_t udp_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct udp_conn_s *conn, uint16_t flags)
|
||||
uint32_t udp_callback(FAR struct net_driver_s *dev,
|
||||
FAR struct udp_conn_s *conn, uint32_t flags)
|
||||
{
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
/* Some sanity checking */
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ static bool udp_is_broadcast(FAR struct net_driver_s *dev)
|
|||
static int udp_input_conn(FAR struct net_driver_s *dev,
|
||||
FAR struct udp_conn_s *conn, unsigned int udpiplen)
|
||||
{
|
||||
uint16_t flags;
|
||||
uint32_t flags;
|
||||
|
||||
/* Set-up for the application callback */
|
||||
|
||||
|
|
|
|||
|
|
@ -64,12 +64,12 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t udp_poll_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t udp_poll_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct udp_poll_s *info = pvpriv;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
DEBUGASSERT(!info || (info->conn && info->fds));
|
||||
|
||||
|
|
|
|||
|
|
@ -440,12 +440,12 @@ static void udp_terminate(FAR struct udp_recvfrom_s *pstate, int result)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t udp_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t udp_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct udp_recvfrom_s *pstate = pvpriv;
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
/* 'priv' might be null in some race conditions (?) */
|
||||
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ static inline void sendto_ipselect(FAR struct net_driver_s *dev,
|
|||
FAR struct udp_conn_s *conn);
|
||||
#endif
|
||||
static int sendto_next_transfer(FAR struct udp_conn_s *conn);
|
||||
static uint16_t sendto_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags);
|
||||
static uint32_t sendto_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
|
|
@ -386,20 +386,20 @@ out:
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t sendto_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t sendto_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct udp_conn_s *conn = pvpriv;
|
||||
|
||||
DEBUGASSERT(dev != NULL && conn != NULL);
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
/* Check if the network device has gone down */
|
||||
|
||||
if ((flags & NETDEV_DOWN) != 0)
|
||||
{
|
||||
ninfo("Device down: %04x\n", flags);
|
||||
ninfo("Device down: %" PRIx32 "\n", flags);
|
||||
|
||||
/* Free the write buffer at the head of the queue and attempt to setup
|
||||
* the next transfer.
|
||||
|
|
|
|||
|
|
@ -144,8 +144,8 @@ static inline void sendto_ipselect(FAR struct net_driver_s *dev,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t sendto_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t sendto_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct sendto_s *pstate = pvpriv;
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ static uint16_t sendto_eventhandler(FAR struct net_driver_s *dev,
|
|||
return flags;
|
||||
}
|
||||
|
||||
ninfo("flags: %04x\n", flags);
|
||||
ninfo("flags: %" PRIx32 "\n", flags);
|
||||
|
||||
/* If the network device has gone down, then we will have terminate
|
||||
* the wait now with an error.
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ FAR struct usrsock_conn_s *usrsock_active(int16_t usockid);
|
|||
int usrsock_setup_request_callback(FAR struct usrsock_conn_s *conn,
|
||||
FAR struct usrsock_reqstate_s *pstate,
|
||||
FAR devif_callback_event_t event,
|
||||
uint16_t flags);
|
||||
uint32_t flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usrsock_setup_data_request_callback()
|
||||
|
|
@ -220,7 +220,7 @@ int usrsock_setup_request_callback(FAR struct usrsock_conn_s *conn,
|
|||
int usrsock_setup_data_request_callback(FAR struct usrsock_conn_s *conn,
|
||||
FAR struct usrsock_data_reqstate_s *pstate,
|
||||
FAR devif_callback_event_t event,
|
||||
uint16_t flags);
|
||||
uint32_t flags);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usrsock_teardown_request_callback()
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t accept_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t accept_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct usrsock_data_reqstate_s *pstate = pvpriv;
|
||||
FAR struct usrsock_conn_s *conn = pstate->reqstate.conn;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t bind_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t bind_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct usrsock_reqstate_s *pstate = pvpriv;
|
||||
FAR struct usrsock_conn_s *conn = pstate->conn;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t close_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t close_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct usrsock_reqstate_s *pstate = pvpriv;
|
||||
FAR struct usrsock_conn_s *conn = pstate->conn;
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ FAR struct usrsock_conn_s *usrsock_active(int16_t usockid)
|
|||
int usrsock_setup_request_callback(FAR struct usrsock_conn_s *conn,
|
||||
FAR struct usrsock_reqstate_s *pstate,
|
||||
FAR devif_callback_event_t event,
|
||||
uint16_t flags)
|
||||
uint32_t flags)
|
||||
{
|
||||
int ret = -EBUSY;
|
||||
|
||||
|
|
@ -248,7 +248,7 @@ int usrsock_setup_data_request_callback(
|
|||
FAR struct usrsock_conn_s *conn,
|
||||
FAR struct usrsock_data_reqstate_s *pstate,
|
||||
FAR devif_callback_event_t event,
|
||||
uint16_t flags)
|
||||
uint32_t flags)
|
||||
{
|
||||
pstate->valuelen = 0;
|
||||
pstate->valuelen_nontrunc = 0;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t connect_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t connect_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct usrsock_reqstate_s *pstate = pvpriv;
|
||||
FAR struct usrsock_conn_s *conn = pstate->conn;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t getpeername_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t getpeername_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct usrsock_data_reqstate_s *pstate = pvpriv;
|
||||
FAR struct usrsock_conn_s *conn = pstate->reqstate.conn;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t getsockname_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t getsockname_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct usrsock_data_reqstate_s *pstate = pvpriv;
|
||||
FAR struct usrsock_conn_s *conn = pstate->reqstate.conn;
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t getsockopt_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t getsockopt_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct usrsock_data_reqstate_s *pstate = pvpriv;
|
||||
FAR struct usrsock_conn_s *conn = pstate->reqstate.conn;
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t ioctl_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t ioctl_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct usrsock_data_reqstate_s *pstate = pvpriv;
|
||||
FAR struct usrsock_conn_s *conn = pstate->reqstate.conn;
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t listen_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t listen_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct usrsock_reqstate_s *pstate = pvpriv;
|
||||
FAR struct usrsock_conn_s *conn = pstate->conn;
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t poll_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t poll_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct usrsock_poll_s *info = pvpriv;
|
||||
FAR struct usrsock_conn_s *conn = info->conn;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t recvfrom_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t recvfrom_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct usrsock_data_reqstate_s *pstate = pvpriv;
|
||||
FAR struct usrsock_conn_s *conn = pstate->reqstate.conn;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t sendto_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t sendto_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct usrsock_reqstate_s *pstate = pvpriv;
|
||||
FAR struct usrsock_conn_s *conn = pstate->conn;
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t setsockopt_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t setsockopt_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct usrsock_reqstate_s *pstate = pvpriv;
|
||||
FAR struct usrsock_conn_s *conn = pstate->conn;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t shutdown_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t shutdown_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct usrsock_reqstate_s *pstate = pvpriv;
|
||||
FAR struct usrsock_conn_s *conn = pstate->conn;
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t socket_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
static uint32_t socket_event(FAR struct net_driver_s *dev,
|
||||
FAR void *pvpriv, uint32_t flags)
|
||||
{
|
||||
FAR struct usrsock_reqstate_s *pstate = pvpriv;
|
||||
FAR struct usrsock_conn_s *conn = pstate->conn;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue