2014-06-22 19:27:57 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* net/tcp/tcp_wrbuffer_dump.c
|
|
|
|
*
|
2021-02-19 12:45:37 +01:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2014-06-22 19:27:57 +02:00
|
|
|
*
|
2021-02-19 12:45:37 +01:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2014-06-22 19:27:57 +02:00
|
|
|
*
|
2021-02-19 12:45:37 +01:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2014-06-22 19:27:57 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
|
2020-11-20 08:51:02 +01:00
|
|
|
#include <inttypes.h>
|
2014-06-22 19:27:57 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <debug.h>
|
|
|
|
|
2017-05-09 15:34:59 +02:00
|
|
|
#include <nuttx/mm/iob.h>
|
2014-06-22 19:27:57 +02:00
|
|
|
|
2014-07-07 01:58:36 +02:00
|
|
|
#include "tcp/tcp.h"
|
|
|
|
|
2016-06-11 22:14:08 +02:00
|
|
|
#ifdef CONFIG_DEBUG_FEATURES
|
2014-06-22 19:27:57 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Public Functions
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: tcp_wrbuffer_dump
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Dump the contents of a write buffer
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2014-06-23 15:31:55 +02:00
|
|
|
void tcp_wrbuffer_dump(FAR const char *msg, FAR struct tcp_wrbuffer_s *wrb,
|
2014-06-23 17:40:17 +02:00
|
|
|
unsigned int len, unsigned int offset)
|
2014-06-22 19:27:57 +02:00
|
|
|
{
|
2020-11-20 08:51:02 +01:00
|
|
|
syslog(LOG_DEBUG, "%s: wrb=%p segno=%" PRIu32 " sent=%d nrtx=%d\n",
|
2018-01-23 02:33:14 +01:00
|
|
|
msg, wrb, TCP_WBSEQNO(wrb), TCP_WBSENT(wrb), TCP_WBNRTX(wrb));
|
|
|
|
iob_dump("I/O Buffer Chain", TCP_WBIOB(wrb), len, offset);
|
2014-06-22 19:27:57 +02:00
|
|
|
}
|
|
|
|
|
2016-06-11 22:14:08 +02:00
|
|
|
#endif /* CONFIG_DEBUG_FEATURES */
|