Nut/OS  4.10.3
API Reference
netdebug.h File Reference
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <errno.h>
Include dependency graph for netdebug.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define NET_DBG_SOCKSTATE   0x01
#define NET_DBG_ARP   0x10
#define NET_DBG_DHCP   0x20

Functions

void NutTraceTcp (FILE *stream, uint8_t flags)
 Control TCP tracing.
void NutTracePPP (FILE *stream, uint8_t flags)
 Control PPP tracing.
void NutDumpTcpHeader (FILE *stream, char *ds, TCPSOCKET *sock, NETBUF *nb)
void NutDumpSockState (FILE *stream, uint8_t state, char *lead, char *trail)
void NutDumpSocketList (FILE *stream)
void NutDumpLcpOption (FILE *stream, NETBUF *nb)
void NutDumpLcp (FILE *stream, NETBUF *nb)
void NutDumpPpp (FILE *stream, NETBUF *nb)

Variables

FILE__tcp_trs
 TCP trace output stream.
uint_fast8_t __tcp_trf
 TCP trace flags.
FILE__ppp_trs
 PPP trace output stream.
uint_fast8_t __ppp_trf
 PPP trace flags.

Define Documentation

#define NET_DBG_SOCKSTATE   0x01

Definition at line 80 of file netdebug.h.

#define NET_DBG_ARP   0x10

Definition at line 81 of file netdebug.h.

#define NET_DBG_DHCP   0x20

Definition at line 82 of file netdebug.h.


Function Documentation

void NutTraceTcp ( FILE stream,
uint8_t  flags 
)

Control TCP tracing.

Parameters:
streamPointer to a previously opened stream or null to leave it unchanged.
flagsFlags to enable specific traces.
Examples:
httpd/httpserv.c.

Definition at line 202 of file netdebug.c.

References __tcp_trf, and __tcp_trs.

Referenced by main().

void NutTracePPP ( FILE stream,
uint8_t  flags 
)

Control PPP tracing.

Parameters:
streamPointer to a previously opened stream or null to disable trace output.
flagsFlags to enable specific traces.
Examples:
httpd/httpserv.c.

Definition at line 429 of file pppdebug.c.

References __ppp_trf, and __ppp_trs.

Referenced by main().

void NutDumpTcpHeader ( FILE stream,
char *  ds,
TCPSOCKET sock,
NETBUF nb 
)
void NutDumpSockState ( FILE stream,
uint8_t  state,
char *  lead,
char *  trail 
)

Definition at line 126 of file netdebug.c.

References fputs(), TCPS_CLOSE_WAIT, TCPS_CLOSED, TCPS_CLOSING, TCPS_ESTABLISHED, TCPS_FIN_WAIT_1, TCPS_FIN_WAIT_2, TCPS_LAST_ACK, TCPS_LISTEN, TCPS_SYN_RECEIVED, TCPS_SYN_SENT, and TCPS_TIME_WAIT.

Referenced by NutDumpSocketList().

Here is the call graph for this function:

void NutDumpLcpOption ( FILE stream,
NETBUF nb 
)
void NutDumpPpp ( FILE stream,
NETBUF nb 
)

Variable Documentation