netdebug.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. #ifndef _NET_NETDEBUG_H_
  2. #define _NET_NETDEBUG_H_
  3. /*
  4. * <MFS> Modified for Streamit
  5. * Added timer modifications from Harald Kipp, 2008/07/29 + new NutDelay implementation
  6. *
  7. * Copyright (C) 2001-2003 by egnite Software GmbH. All rights reserved.
  8. *
  9. * Redistribution and use in source and binary forms, with or without
  10. * modification, are permitted provided that the following conditions
  11. * are met:
  12. *
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions and the following disclaimer.
  15. * 2. Redistributions in binary form must reproduce the above copyright
  16. * notice, this list of conditions and the following disclaimer in the
  17. * documentation and/or other materials provided with the distribution.
  18. * 3. Neither the name of the copyright holders nor the names of
  19. * contributors may be used to endorse or promote products derived
  20. * from this software without specific prior written permission.
  21. *
  22. * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
  23. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  24. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  25. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
  26. * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  27. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  28. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  29. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  30. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  31. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  32. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  33. * SUCH DAMAGE.
  34. *
  35. * For additional information see http://www.ethernut.de/
  36. *
  37. */
  38. /*
  39. * $Log: netdebug.h,v $
  40. * Revision 1.2 2006/03/16 15:25:33 haraldkipp
  41. * Changed human readable strings from u_char to char to stop GCC 4 from
  42. * nagging about signedness.
  43. *
  44. * Revision 1.1.1.1 2003/05/09 14:41:12 haraldkipp
  45. * Initial using 3.2.1
  46. *
  47. * Revision 1.6 2003/05/06 18:45:34 harald
  48. * PPP debug functions added
  49. *
  50. * Revision 1.5 2003/02/04 18:00:42 harald
  51. * Version 3 released
  52. *
  53. * Revision 1.4 2002/10/29 15:40:49 harald
  54. * *** empty log message ***
  55. *
  56. * Revision 1.3 2002/06/26 17:29:18 harald
  57. * First pre-release with 2.4 stack
  58. *
  59. */
  60. #include <stdio.h>
  61. #include <sys/socket.h>
  62. #include <netinet/tcp.h>
  63. #include <net/errno.h>
  64. #ifdef __cplusplus
  65. extern "C" {
  66. #endif
  67. extern FILE *__tcp_trs;
  68. extern u_char __tcp_trf;
  69. extern FILE *__ppp_trs;
  70. extern u_char __ppp_trf;
  71. extern void NutTraceTcp(FILE *stream, u_char flags);
  72. extern void NutTracePPP(FILE *stream, u_char flags);
  73. extern void NutDumpTcpHeader(FILE *stream, char *ds, TCPSOCKET *sock, NETBUF *nb);
  74. extern void NutDumpSockState(FILE *stream, u_char state, char *lead, char *trail);
  75. extern void NutDumpSocketList(FILE *stream);
  76. extern void NutDumpLcpOption(FILE * stream, NETBUF * nb);
  77. extern void NutDumpLcp(FILE * stream, NETBUF * nb);
  78. extern void NutDumpPpp(FILE * stream, NETBUF * nb);
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82. #endif