net/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition.
This commit is contained in:
parent
ad2f7b0119
commit
f4fcdcdb4d
@ -96,7 +96,7 @@ void arp_arpin(FAR struct net_driver_s *dev)
|
||||
|
||||
if (dev->d_len < (sizeof(struct arp_hdr_s) + ETH_HDRLEN))
|
||||
{
|
||||
nllerr("Too small\n");
|
||||
nllerr("ERROR: Packet Too small\n");
|
||||
dev->d_len = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ FAR struct devif_callback_s *
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
else
|
||||
{
|
||||
nllerr("Failed to allocate callback\n");
|
||||
nllerr("ERROR: Failed to allocate callback\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -339,7 +339,8 @@ int ipv4_input(FAR struct net_driver_s *dev)
|
||||
g_netstats.ipv4.drop++;
|
||||
g_netstats.ipv4.vhlerr++;
|
||||
#endif
|
||||
nllerr("Invalid IP version or header length: %02x\n", pbuf->vhl);
|
||||
nllerr("ERROR: Invalid IP version or header length: %02x\n",
|
||||
pbuf->vhl);
|
||||
goto drop;
|
||||
}
|
||||
|
||||
@ -348,7 +349,7 @@ int ipv4_input(FAR struct net_driver_s *dev)
|
||||
hdrlen = NET_LL_HDRLEN(dev);
|
||||
if ((hdrlen + IPv4_HDRLEN) > dev->d_len)
|
||||
{
|
||||
nllerr("Packet shorter than IPv4 header\n");
|
||||
nllerr("ERROR: Packet shorter than IPv4 header\n");
|
||||
goto drop;
|
||||
}
|
||||
|
||||
@ -368,7 +369,7 @@ int ipv4_input(FAR struct net_driver_s *dev)
|
||||
}
|
||||
else
|
||||
{
|
||||
nllerr("IP packet shorter than length in IP header\n");
|
||||
nllerr("ERROR: IP packet shorter than length in IP header\n");
|
||||
goto drop;
|
||||
}
|
||||
|
||||
@ -387,7 +388,7 @@ int ipv4_input(FAR struct net_driver_s *dev)
|
||||
g_netstats.ipv4.drop++;
|
||||
g_netstats.ipv4.fragerr++;
|
||||
#endif
|
||||
nllerr("IP fragment dropped\n");
|
||||
nllerr("ERROR: IP fragment dropped\n");
|
||||
goto drop;
|
||||
#endif /* CONFIG_NET_TCP_REASSEMBLY */
|
||||
}
|
||||
@ -413,7 +414,7 @@ int ipv4_input(FAR struct net_driver_s *dev)
|
||||
#ifdef CONFIG_NET_ICMP
|
||||
if (net_ipv4addr_cmp(dev->d_ipaddr, INADDR_ANY))
|
||||
{
|
||||
nllerr("No IP address assigned\n");
|
||||
nllerr("ERROR: No IP address assigned\n");
|
||||
goto drop;
|
||||
}
|
||||
|
||||
@ -446,7 +447,7 @@ int ipv4_input(FAR struct net_driver_s *dev)
|
||||
g_netstats.ipv4.drop++;
|
||||
g_netstats.ipv4.chkerr++;
|
||||
#endif
|
||||
nllerr("Bad IP checksum\n");
|
||||
nllerr("ERROR: Bad IP checksum\n");
|
||||
goto drop;
|
||||
}
|
||||
|
||||
@ -494,7 +495,7 @@ int ipv4_input(FAR struct net_driver_s *dev)
|
||||
g_netstats.ipv4.protoerr++;
|
||||
#endif
|
||||
|
||||
nllerr("Unrecognized IP protocol\n");
|
||||
nllerr("ERROR: Unrecognized IP protocol\n");
|
||||
goto drop;
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ int ipv6_input(FAR struct net_driver_s *dev)
|
||||
hdrlen = NET_LL_HDRLEN(dev);
|
||||
if ((hdrlen + IPv6_HDRLEN) > dev->d_len)
|
||||
{
|
||||
nllerr("Packet shorter than IPv6 header\n");
|
||||
nllerr("ERROR: Packet shorter than IPv6 header\n");
|
||||
goto drop;
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ void icmp_input(FAR struct net_driver_s *dev)
|
||||
|
||||
else
|
||||
{
|
||||
nllerr("Unknown ICMP cmd: %d\n", picmp->type);
|
||||
nllerr("ERROR: Unknown ICMP cmd: %d\n", picmp->type);
|
||||
goto typeerr;
|
||||
}
|
||||
|
||||
|
@ -262,12 +262,12 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn,
|
||||
* that the destination address is not reachable.
|
||||
*/
|
||||
|
||||
nllerr("Not reachable\n");
|
||||
nllerr("ERROR:Not reachable\n");
|
||||
failcode = -ENETUNREACH;
|
||||
}
|
||||
else
|
||||
{
|
||||
nllerr("Ping timeout\n");
|
||||
nllerr("ERROR:Ping timeout\n");
|
||||
failcode = -ETIMEDOUT;
|
||||
}
|
||||
|
||||
@ -416,7 +416,7 @@ int icmp_ping(in_addr_t addr, uint16_t id, uint16_t seqno, uint16_t datalen,
|
||||
}
|
||||
else
|
||||
{
|
||||
nllerr("Return error=%d\n", -state.png_result);
|
||||
nllerr("ERROR: Return error=%d\n", -state.png_result);
|
||||
return state.png_result;
|
||||
}
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ void icmpv6_input(FAR struct net_driver_s *dev)
|
||||
|
||||
default:
|
||||
{
|
||||
nllerr("Unknown ICMPv6 type: %d\n", icmp->type);
|
||||
nllerr("ERROR: Unknown ICMPv6 type: %d\n", icmp->type);
|
||||
goto icmpv6_type_error;
|
||||
}
|
||||
}
|
||||
|
@ -336,12 +336,12 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn,
|
||||
* reason is that the destination address is not reachable.
|
||||
*/
|
||||
|
||||
nllerr("Not reachable\n");
|
||||
nllerr("ERROR: Not reachable\n");
|
||||
failcode = -ENETUNREACH;
|
||||
}
|
||||
else
|
||||
{
|
||||
nllerr("Ping timeout\n");
|
||||
nllerr("ERROR: Ping timeout\n");
|
||||
failcode = -ETIMEDOUT;
|
||||
}
|
||||
|
||||
@ -490,7 +490,7 @@ int icmpv6_ping(net_ipv6addr_t addr, uint16_t id, uint16_t seqno,
|
||||
}
|
||||
else
|
||||
{
|
||||
nllerr("Return error=%d\n", -state.png_result);
|
||||
nllerr("ERROR: Return error=%d\n", -state.png_result);
|
||||
return state.png_result;
|
||||
}
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ void igmp_grpinit(void)
|
||||
FAR struct igmp_group_s *group;
|
||||
int i;
|
||||
|
||||
grpllerr("Initializing\n");
|
||||
grpllinfo("Initializing\n");
|
||||
|
||||
#if CONFIG_PREALLOC_IGMPGROUPS > 0
|
||||
for (i = 0; i < CONFIG_PREALLOC_IGMPGROUPS; i++)
|
||||
@ -226,20 +226,20 @@ FAR struct igmp_group_s *igmp_grpalloc(FAR struct net_driver_s *dev,
|
||||
if (up_interrupt_context())
|
||||
{
|
||||
#if CONFIG_PREALLOC_IGMPGROUPS > 0
|
||||
grpllerr("Use a pre-allocated group entry\n");
|
||||
grpllinfo("Use a pre-allocated group entry\n");
|
||||
group = igmp_grpprealloc();
|
||||
#else
|
||||
grpllerr("Cannot allocate from interrupt handler\n");
|
||||
grpllerr("ERROR: Cannot allocate from interrupt handler\n");
|
||||
group = NULL;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
grpllerr("Allocate from the heap\n");
|
||||
grpllinfo("Allocate from the heap\n");
|
||||
group = igmp_grpheapalloc();
|
||||
}
|
||||
|
||||
grpllerr("group: %p\n", group);
|
||||
grpllinfo("group: %p\n", group);
|
||||
|
||||
/* Check if we successfully allocated a group structure */
|
||||
|
||||
@ -285,7 +285,7 @@ FAR struct igmp_group_s *igmp_grpfind(FAR struct net_driver_s *dev,
|
||||
FAR struct igmp_group_s *group;
|
||||
net_lock_t flags;
|
||||
|
||||
grpllerr("Searching for addr %08x\n", (int)*addr);
|
||||
grpllinfo("Searching for addr %08x\n", (int)*addr);
|
||||
|
||||
/* We must disable interrupts because we don't which context we were
|
||||
* called from.
|
||||
@ -296,10 +296,10 @@ FAR struct igmp_group_s *igmp_grpfind(FAR struct net_driver_s *dev,
|
||||
group;
|
||||
group = group->next)
|
||||
{
|
||||
grpllerr("Compare: %08x vs. %08x\n", group->grpaddr, *addr);
|
||||
grpllinfo("Compare: %08x vs. %08x\n", group->grpaddr, *addr);
|
||||
if (net_ipv4addr_cmp(group->grpaddr, *addr))
|
||||
{
|
||||
grpllerr("Match!\n");
|
||||
grpllinfo("Match!\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -325,13 +325,13 @@ FAR struct igmp_group_s *igmp_grpallocfind(FAR struct net_driver_s *dev,
|
||||
{
|
||||
FAR struct igmp_group_s *group = igmp_grpfind(dev, addr);
|
||||
|
||||
grpllerr("group: %p addr: %08x\n", group, (int)*addr);
|
||||
grpllinfo("group: %p addr: %08x\n", group, (int)*addr);
|
||||
if (!group)
|
||||
{
|
||||
group = igmp_grpalloc(dev, addr);
|
||||
}
|
||||
|
||||
grpllerr("group: %p\n", group);
|
||||
grpllinfo("group: %p\n", group);
|
||||
return group;
|
||||
}
|
||||
|
||||
@ -350,7 +350,7 @@ void igmp_grpfree(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group)
|
||||
{
|
||||
net_lock_t flags;
|
||||
|
||||
grpllerr("Free: %p flags: %02x\n", group, group->flags);
|
||||
grpllinfo("Free: %p flags: %02x\n", group, group->flags);
|
||||
|
||||
/* Cancel the wdog */
|
||||
|
||||
@ -376,7 +376,7 @@ void igmp_grpfree(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group)
|
||||
#if CONFIG_PREALLOC_IGMPGROUPS > 0
|
||||
if (IS_PREALLOCATED(group->flags))
|
||||
{
|
||||
grpllerr("Put back on free list\n");
|
||||
grpllinfo("Put back on free list\n");
|
||||
sq_addlast((FAR sq_entry_t *)group, &g_freelist);
|
||||
net_unlock(flags);
|
||||
}
|
||||
@ -388,7 +388,7 @@ void igmp_grpfree(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group)
|
||||
*/
|
||||
|
||||
net_unlock(flags);
|
||||
grpllerr("Call sched_kfree()\n");
|
||||
grpllinfo("Call sched_kfree()\n");
|
||||
sched_kfree(group);
|
||||
}
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ void igmp_input(struct net_driver_s *dev)
|
||||
if (dev->d_len < NET_LL_HDRLEN(dev) + IPIGMP_HDRLEN)
|
||||
{
|
||||
IGMP_STATINCR(g_netstats.igmp.length_errors);
|
||||
nllerr("Length error\n");
|
||||
nllerr("ERROR: Length error\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ void igmp_input(struct net_driver_s *dev)
|
||||
if (net_chksum((FAR uint16_t *)&IGMPBUF->type, IGMP_HDRLEN) != 0)
|
||||
{
|
||||
IGMP_STATINCR(g_netstats.igmp.chksum_errors);
|
||||
nllerr("Checksum error\n");
|
||||
nllerr("ERROR: Checksum error\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ void igmp_input(struct net_driver_s *dev)
|
||||
group = igmp_grpallocfind(dev, &destipaddr);
|
||||
if (!group)
|
||||
{
|
||||
nllerr("Failed to allocate/find group: %08x\n", destipaddr);
|
||||
nllerr("ERROR: Failed to allocate/find group: %08x\n", destipaddr);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -192,7 +192,7 @@ void igmp_input(struct net_driver_s *dev)
|
||||
IGMP_STATINCR(g_netstats.igmp.v1_received);
|
||||
IGMPBUF->maxresp = 10;
|
||||
|
||||
nllerr("V1 not implemented\n");
|
||||
nllerr("ERROR: V1 not implemented\n");
|
||||
}
|
||||
|
||||
IGMP_STATINCR(g_netstats.igmp.query_received);
|
||||
@ -241,7 +241,7 @@ void igmp_input(struct net_driver_s *dev)
|
||||
nllinfo("Unicast query\n");
|
||||
IGMP_STATINCR(g_netstats.igmp.ucast_query);
|
||||
|
||||
nllerr("Query to a specific group with the group address as destination\n");
|
||||
nllinfo("Query to a specific group with the group address as destination\n");
|
||||
|
||||
ticks = net_dsec2tick((int)IGMPBUF->maxresp);
|
||||
if (IS_IDLEMEMBER(group->flags) || igmp_cmptimer(group, ticks))
|
||||
@ -270,7 +270,7 @@ void igmp_input(struct net_driver_s *dev)
|
||||
|
||||
default:
|
||||
{
|
||||
nllerr("Unexpected msg %02x\n", IGMPBUF->type);
|
||||
nllerr("ERROR: Unexpected msg %02x\n", IGMPBUF->type);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ int igmp_leavegroup(struct net_driver_s *dev, FAR const struct in_addr *grpaddr)
|
||||
/* Find the entry corresponding to the address leaving the group */
|
||||
|
||||
group = igmp_grpfind(dev, &grpaddr->s_addr);
|
||||
nerr("Leaving group: %p\n", group);
|
||||
ninfo("Leaving group: %p\n", group);
|
||||
if (group)
|
||||
{
|
||||
/* Cancel the timer and discard any queued Membership Reports. Canceling
|
||||
@ -155,7 +155,7 @@ int igmp_leavegroup(struct net_driver_s *dev, FAR const struct in_addr *grpaddr)
|
||||
|
||||
if (IS_LASTREPORT(group->flags))
|
||||
{
|
||||
nerr("Schedule Leave Group message\n");
|
||||
ninfo("Schedule Leave Group message\n");
|
||||
IGMP_STATINCR(g_netstats.igmp.leave_sched);
|
||||
igmp_waitmsg(group, IGMP_LEAVE_GROUP);
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ void igmp_startticks(FAR struct igmp_group_s *group, unsigned int ticks)
|
||||
|
||||
/* Start the timer */
|
||||
|
||||
gtmrllerr("ticks: %d\n", ticks);
|
||||
gtmrllinfo("ticks: %d\n", ticks);
|
||||
|
||||
ret = wd_start(group->wdog, ticks, igmp_timeout, 1, (uint32_t)group);
|
||||
|
||||
@ -184,7 +184,7 @@ void igmp_starttimer(FAR struct igmp_group_s *group, uint8_t decisecs)
|
||||
* Important!! this should be a random timer from 0 to decisecs
|
||||
*/
|
||||
|
||||
gtmrerr("decisecs: %d\n", decisecs);
|
||||
gtmrinfo("decisecs: %d\n", decisecs);
|
||||
igmp_startticks(group, net_dsec2tick(decisecs));
|
||||
}
|
||||
|
||||
@ -224,7 +224,7 @@ bool igmp_cmptimer(FAR struct igmp_group_s *group, int maxticks)
|
||||
* test as well.
|
||||
*/
|
||||
|
||||
gtmrerr("maxticks: %d remaining: %d\n", maxticks, remaining);
|
||||
gtmrinfo("maxticks: %d remaining: %d\n", maxticks, remaining);
|
||||
if (maxticks > remaining)
|
||||
{
|
||||
/* Cancel the watchdog timer and return true */
|
||||
|
@ -168,7 +168,7 @@ int iob_clone(FAR struct iob_s *iob1, FAR struct iob_s *iob2, bool throttled)
|
||||
next = iob_alloc(throttled);
|
||||
if (!next)
|
||||
{
|
||||
nerr("Failed to allocate an I/O buffer/n");
|
||||
nerr("ERROR: Failed to allocate an I/O buffer/n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ FAR struct iob_s *iob_trimtail(FAR struct iob_s *iob, unsigned int trimlen)
|
||||
FAR struct iob_s *last;
|
||||
int len;
|
||||
|
||||
nllerr("iob=%p pktlen=%d trimlen=%d\n", iob, iob->io_pktlen, trimlen);
|
||||
nllinfo("iob=%p pktlen=%d trimlen=%d\n", iob, iob->io_pktlen, trimlen);
|
||||
|
||||
if (iob && trimlen > 0)
|
||||
{
|
||||
|
@ -152,7 +152,7 @@ void local_accept_pollnotify(FAR struct local_conn_s *conn,
|
||||
fds->revents |= (fds->events & eventset);
|
||||
if (fds->revents != 0)
|
||||
{
|
||||
nerr("Report events: %02x\n", fds->revents);
|
||||
ninfo("Report events: %02x\n", fds->revents);
|
||||
sem_post(fds->sem);
|
||||
}
|
||||
}
|
||||
|
@ -319,13 +319,13 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype)
|
||||
net_unlock(save);
|
||||
|
||||
#ifdef CONFIG_NET_ETHERNET
|
||||
nllerr("Registered MAC: %02x:%02x:%02x:%02x:%02x:%02x as dev: %s\n",
|
||||
dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1],
|
||||
dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3],
|
||||
dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5],
|
||||
dev->d_ifname);
|
||||
nllinfo("Registered MAC: %02x:%02x:%02x:%02x:%02x:%02x as dev: %s\n",
|
||||
dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1],
|
||||
dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3],
|
||||
dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5],
|
||||
dev->d_ifname);
|
||||
#else
|
||||
nllerr("Registered dev: %s\n", dev->d_ifname);
|
||||
nllinfo("Registered dev: %s\n", dev->d_ifname);
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
|
@ -128,13 +128,13 @@ int netdev_unregister(FAR struct net_driver_s *dev)
|
||||
net_unlock(save);
|
||||
|
||||
#ifdef CONFIG_NET_ETHERNET
|
||||
nllerr("Unregistered MAC: %02x:%02x:%02x:%02x:%02x:%02x as dev: %s\n",
|
||||
dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1],
|
||||
dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3],
|
||||
dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5],
|
||||
dev->d_ifname);
|
||||
nllinfo("Unregistered MAC: %02x:%02x:%02x:%02x:%02x:%02x as dev: %s\n",
|
||||
dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1],
|
||||
dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3],
|
||||
dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5],
|
||||
dev->d_ifname);
|
||||
#else
|
||||
nllerr("Registered dev: %s\n", dev->d_ifname);
|
||||
nllinfo("Registered dev: %s\n", dev->d_ifname);
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ int pkt_input(struct net_driver_s *dev)
|
||||
}
|
||||
else
|
||||
{
|
||||
nllerr("No listener\n");
|
||||
nllerr("ERROR: No listener\n");
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -78,7 +78,7 @@
|
||||
|
||||
void pkt_poll(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn)
|
||||
{
|
||||
nllerr("IN\n");
|
||||
nllinfo("IN\n");
|
||||
|
||||
/* Verify that the packet connection is valid */
|
||||
|
||||
|
@ -116,7 +116,7 @@ int net_clone(FAR struct socket *psock1, FAR struct socket *psock2)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
nerr("Unsupported type: %d\n", psock2->s_type);
|
||||
nerr("ERROR: Unsupported type: %d\n", psock2->s_type);
|
||||
ret = -EBADF;
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ static uint16_t netclose_interrupt(FAR struct net_driver_s *dev,
|
||||
{
|
||||
/* Yes.. Wake up the waiting thread and report the timeout */
|
||||
|
||||
nllerr("CLOSE timeout\n");
|
||||
nllerr("ERROR: CLOSE timeout\n");
|
||||
pstate->cl_result = -ETIMEDOUT;
|
||||
goto end_wait;
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ static uint16_t ack_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn,
|
||||
}
|
||||
else if ((flags & TCP_REXMIT) != 0)
|
||||
{
|
||||
nllerr("REXMIT\n");
|
||||
nllwarn("WARNING: TCP_REXMIT\n");
|
||||
|
||||
/* Yes.. in this case, reset the number of bytes that have been sent
|
||||
* to the number of bytes that have been ACKed.
|
||||
@ -221,7 +221,7 @@ static uint16_t ack_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn,
|
||||
{
|
||||
/* Report not connected */
|
||||
|
||||
nllerr("Lost connection\n");
|
||||
nllwarn("WARNING: Lost connection\n");
|
||||
|
||||
net_lostconnection(pstate->snd_sock, flags);
|
||||
pstate->snd_sent = -ENOTCONN;
|
||||
@ -345,7 +345,7 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon
|
||||
{
|
||||
/* Report not connected */
|
||||
|
||||
nllerr("Lost connection\n");
|
||||
nllwarn("WARNING: Lost connection\n");
|
||||
|
||||
net_lostconnection(pstate->snd_sock, flags);
|
||||
pstate->snd_sent = -ENOTCONN;
|
||||
@ -386,7 +386,7 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon
|
||||
if (ret < 0)
|
||||
{
|
||||
int errcode = get_errno();
|
||||
nllerr("failed to lseek: %d\n", errcode);
|
||||
nllerr("ERROR: Failed to lseek: %d\n", errcode);
|
||||
pstate->snd_sent = -errcode;
|
||||
goto end_wait;
|
||||
}
|
||||
@ -395,7 +395,7 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon
|
||||
if (ret < 0)
|
||||
{
|
||||
int errcode = get_errno();
|
||||
nllerr("failed to read from input file: %d\n", errcode);
|
||||
nllerr("ERROR: Failed to read from input file: %d\n", errcode);
|
||||
pstate->snd_sent = -errcode;
|
||||
goto end_wait;
|
||||
}
|
||||
@ -430,7 +430,7 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon
|
||||
}
|
||||
else
|
||||
{
|
||||
nllerr("Window full, wait for ack\n");
|
||||
nllwarn("WARNING: Window full, wait for ack\n");
|
||||
goto wait;
|
||||
}
|
||||
}
|
||||
@ -444,7 +444,7 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon
|
||||
{
|
||||
/* Yes.. report the timeout */
|
||||
|
||||
nllerr("SEND timeout\n");
|
||||
nllwarn("WARNING: SEND timeout\n");
|
||||
pstate->snd_sent = -ETIMEDOUT;
|
||||
goto end_wait;
|
||||
}
|
||||
@ -687,7 +687,7 @@ ssize_t net_sendfile(int outfd, struct file *infile, off_t *offset,
|
||||
|
||||
if (state.snd_datacb == NULL)
|
||||
{
|
||||
nllerr("Failed to allocate data callback\n");
|
||||
nllerr("ERROR: Failed to allocate data callback\n");
|
||||
errcode = ENOMEM;
|
||||
goto errout_locked;
|
||||
}
|
||||
@ -696,7 +696,7 @@ ssize_t net_sendfile(int outfd, struct file *infile, off_t *offset,
|
||||
|
||||
if (state.snd_ackcb == NULL)
|
||||
{
|
||||
nllerr("Failed to allocate ack callback\n");
|
||||
nllerr("ERROR: Failed to allocate ack callback\n");
|
||||
errcode = ENOMEM;
|
||||
goto errout_datacb;
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ int tcp_backlogcreate(FAR struct tcp_conn_s *conn, int nblg)
|
||||
bls = (FAR struct tcp_backlog_s *)kmm_zalloc(size);
|
||||
if (!bls)
|
||||
{
|
||||
nllerr("Failed to allocate backlog\n");
|
||||
nllerr("ERROR: Failed to allocate backlog\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -239,7 +239,7 @@ int tcp_backlogadd(FAR struct tcp_conn_s *conn, FAR struct tcp_conn_s *blconn)
|
||||
blc = (FAR struct tcp_blcontainer_s *)sq_remfirst(&bls->bl_free);
|
||||
if (!blc)
|
||||
{
|
||||
nllerr("Failed to allocate container\n");
|
||||
nllerr("ERROR: Failed to allocate container\n");
|
||||
ret = -ENOMEM;
|
||||
}
|
||||
else
|
||||
@ -390,7 +390,7 @@ int tcp_backlogdelete(FAR struct tcp_conn_s *conn,
|
||||
}
|
||||
}
|
||||
|
||||
nllerr("Failed to find pending connection\n");
|
||||
nllerr("ERROR: Failed to find pending connection\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -532,7 +532,7 @@ static inline int tcp_ipv4_bind(FAR struct tcp_conn_s *conn,
|
||||
|
||||
if (port < 0)
|
||||
{
|
||||
nerr("tcp_selectport failed: %d\n", port);
|
||||
nerr("ERROR: tcp_selectport failed: %d\n", port);
|
||||
return port;
|
||||
}
|
||||
|
||||
@ -552,7 +552,7 @@ static inline int tcp_ipv4_bind(FAR struct tcp_conn_s *conn,
|
||||
{
|
||||
/* If no device is found, then the address is not reachable */
|
||||
|
||||
nerr("tcp_local_ipv4_device failed: %d\n", ret);
|
||||
nerr("ERROR: tcp_local_ipv4_device failed: %d\n", ret);
|
||||
|
||||
/* Back out the local address setting */
|
||||
|
||||
@ -613,7 +613,7 @@ static inline int tcp_ipv6_bind(FAR struct tcp_conn_s *conn,
|
||||
|
||||
if (port < 0)
|
||||
{
|
||||
nerr("tcp_selectport failed: %d\n", port);
|
||||
nerr("ERROR: tcp_selectport failed: %d\n", port);
|
||||
return port;
|
||||
}
|
||||
|
||||
@ -633,7 +633,7 @@ static inline int tcp_ipv6_bind(FAR struct tcp_conn_s *conn,
|
||||
{
|
||||
/* If no device is found, then the address is not reachable */
|
||||
|
||||
nerr("tcp_local_ipv6_device failed: %d\n", ret);
|
||||
nerr("ERROR: tcp_local_ipv6_device failed: %d\n", ret);
|
||||
|
||||
/* Back out the local address setting */
|
||||
|
||||
@ -760,7 +760,7 @@ FAR struct tcp_conn_s *tcp_alloc(uint8_t domain)
|
||||
|
||||
if (conn != NULL)
|
||||
{
|
||||
nllerr("Closing unestablished connection: %p\n", conn);
|
||||
nllwarn("WARNING: Closing unestablished connection: %p\n", conn);
|
||||
|
||||
/* Yes... free it. This will remove the connection from the list
|
||||
* of active connections and release all resources held by the
|
||||
@ -1066,7 +1066,7 @@ FAR struct tcp_conn_s *tcp_alloc_accept(FAR struct net_driver_s *dev,
|
||||
* probably really just assert here.
|
||||
*/
|
||||
|
||||
nerr("Failed to find network device: %d\n", ret);
|
||||
nerr("ERROR: Failed to find network device: %d\n", ret);
|
||||
tcp_free(conn);
|
||||
return NULL;
|
||||
}
|
||||
@ -1320,7 +1320,7 @@ int tcp_connect(FAR struct tcp_conn_s *conn, FAR const struct sockaddr *addr)
|
||||
* just assert here.
|
||||
*/
|
||||
|
||||
nerr("Failed to find network device: %d\n", ret);
|
||||
nerr("ERROR: Failed to find network device: %d\n", ret);
|
||||
goto errout_with_lock;
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ static void tcp_input(FAR struct net_driver_s *dev, unsigned int iplen)
|
||||
g_netstats.tcp.drop++;
|
||||
g_netstats.tcp.chkerr++;
|
||||
#endif
|
||||
nllerr("Bad TCP checksum\n");
|
||||
nllerr("ERROR: Bad TCP checksum\n");
|
||||
goto drop;
|
||||
}
|
||||
|
||||
@ -206,7 +206,7 @@ static void tcp_input(FAR struct net_driver_s *dev, unsigned int iplen)
|
||||
#ifdef CONFIG_NET_STATISTICS
|
||||
g_netstats.tcp.syndrop++;
|
||||
#endif
|
||||
nllerr("No free TCP connections\n");
|
||||
nllerr("ERROR: No free TCP connections\n");
|
||||
goto drop;
|
||||
}
|
||||
|
||||
@ -308,7 +308,7 @@ found:
|
||||
if ((tcp->flags & TCP_RST) != 0)
|
||||
{
|
||||
conn->tcpstateflags = TCP_CLOSED;
|
||||
nllerr("RESET - TCP state: TCP_CLOSED\n");
|
||||
nllwarn("WARNING: RESET - TCP state: TCP_CLOSED\n");
|
||||
|
||||
(void)tcp_callback(dev, conn, TCP_ABORT);
|
||||
goto drop;
|
||||
|
@ -566,7 +566,8 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev,
|
||||
|
||||
if (++WRB_NRTX(wrb) >= TCP_MAXRTX)
|
||||
{
|
||||
nllerr("Expiring wrb=%p nrtx=%u\n", wrb, WRB_NRTX(wrb));
|
||||
nllerr("ERROR: Expiring wrb=%p nrtx=%u\n",
|
||||
wrb, WRB_NRTX(wrb));
|
||||
|
||||
/* The maximum retry count as been exhausted. Remove the write
|
||||
* buffer at the head of the queue.
|
||||
@ -631,7 +632,8 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev,
|
||||
|
||||
if (++WRB_NRTX(wrb) >= TCP_MAXRTX)
|
||||
{
|
||||
nllerr("Expiring wrb=%p nrtx=%u\n", wrb, WRB_NRTX(wrb));
|
||||
nllerr("ERROR: Expiring wrb=%p nrtx=%u\n",
|
||||
wrb, WRB_NRTX(wrb));
|
||||
|
||||
/* Return the write buffer to the free list */
|
||||
|
||||
|
@ -570,7 +570,7 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev,
|
||||
{
|
||||
/* Yes.. report the timeout */
|
||||
|
||||
nllerr("SEND timeout\n");
|
||||
nllerr("ERROR: SEND timeout\n");
|
||||
pstate->snd_sent = -ETIMEDOUT;
|
||||
goto end_wait;
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ static int udp_input(FAR struct net_driver_s *dev, unsigned int iplen)
|
||||
g_netstats.udp.drop++;
|
||||
g_netstats.udp.chkerr++;
|
||||
#endif
|
||||
nllerr("Bad UDP checksum\n");
|
||||
nllerr("ERROR: Bad UDP checksum\n");
|
||||
dev->d_len = 0;
|
||||
}
|
||||
else
|
||||
@ -207,7 +207,7 @@ static int udp_input(FAR struct net_driver_s *dev, unsigned int iplen)
|
||||
}
|
||||
else
|
||||
{
|
||||
nllerr("No listener on UDP port\n");
|
||||
nllerr("ERROR: No listener on UDP port\n");
|
||||
dev->d_len = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user