home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 024 / psi110g.zip / TRACE.H < prev    next >
C/C++ Source or Header  |  1994-04-17  |  3KB  |  98 lines

  1. #ifndef _TRACE_H
  2. #define _TRACE_H
  3.   
  4. #ifndef _CONFIG_H
  5. #include "config.h"
  6. #endif
  7.   
  8. #ifndef _MBUF_H
  9. #include "mbuf.h"
  10. #endif
  11.   
  12. #ifndef _IFACE_H
  13. #include "iface.h"
  14. #endif
  15.   
  16. /* Definitions for packet dumping */
  17.   
  18. /* Table of trace subcommands */
  19. struct tracecmd {
  20.     char *name; /* Name of trace subcommand */
  21.     int val;    /* New setting for these bits */
  22.     int mask;   /* Mask of bits affected in trace word */
  23. };
  24. extern struct tracecmd Tracecmd[];  /* Defined in trace.c */
  25.   
  26. /* List of address testing and tracing functions for each interface.
  27.  * Entries are placed in this table by conditional compilation in main.c.
  28.  */
  29. struct trace {
  30.     int (*addrtest) __ARGS((struct iface *ifp,struct mbuf *bp));
  31.     void (*tracef) __ARGS((FILE *,struct mbuf **,int));
  32. };
  33.   
  34. extern struct trace Tracef[];
  35.   
  36. #ifdef MONITOR
  37. extern int Trace_compact_header;
  38. #endif
  39.   
  40. /* In trace.c: */
  41. void dump __ARGS((struct iface *ifp,int direction,unsigned type,struct mbuf *bp));
  42. void raw_dump __ARGS((struct iface *ifp,int direction, struct mbuf *bp));
  43. void trace_log __ARGS((struct iface *ifp,char *fmt, ...));
  44. void shuttrace __ARGS ((void));
  45.   
  46. /* In arcdump.c: */
  47. void arc_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  48. int arc_forus __ARGS((struct iface *iface,struct mbuf *bp));
  49.   
  50. /* In arpdump.c: */
  51. void arp_dump __ARGS((FILE *fp,struct mbuf **bpp));
  52.   
  53. /* In ax25dump.c: */
  54. void ax25_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  55. int ax_forus __ARGS((struct iface *iface,struct mbuf *bp));
  56.   
  57. /* In enetdump.c: */
  58. void ether_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  59. int ether_forus __ARGS((struct iface *iface,struct mbuf *bp));
  60.   
  61. /* In icmpdump.c: */
  62. void icmp_dump __ARGS((FILE *fp,struct mbuf **bpp,int32 source,int32 dest,int check));
  63.   
  64. /* In ipdump.c: */
  65. void ip_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  66.   
  67. /* In kissdump.c: */
  68. void ki_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  69. int ki_forus __ARGS((struct iface *iface,struct mbuf *bp));
  70.   
  71. /* In nrdump.c: */
  72. void netrom_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  73.   
  74. /* In pppdump.c: */
  75. void ppp_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  76.   
  77. /* In ripdump.c: */
  78. void rip_dump __ARGS((FILE *fp,struct mbuf **bpp));
  79.   
  80. /* In ripdump.c: */
  81. void rspf_dump __ARGS((FILE *fp,struct mbuf **bpp,int32 source,int32 dest,int check));
  82.   
  83. /* In slcompdump.c: */
  84. void sl_dump __ARGS((FILE *fp,struct mbuf **bpp,int check));
  85. void vjcomp_dump __ARGS((FILE *fp,struct mbuf **bpp,int unused));
  86.   
  87. /* In tcpdump.c: */
  88. void tcp_dump __ARGS((FILE *fp,struct mbuf **bpp,int32 source,int32 dest,int check));
  89.   
  90. /* In udpdump.c: */
  91. void udp_dump __ARGS((FILE *fp,struct mbuf **bpp,int32 source,int32 dest,int check));
  92.   
  93. #if defined LINUX && defined MONITOR
  94. #define fprintf tcmdprintf
  95. #endif
  96.   
  97. #endif  /* _TRACE_H */
  98.